diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-03-13 15:10:22 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-03-13 15:10:22 +0800 |
commit | abd6567ea011ed5546aa8b17bea86567ad9fb5f7 (patch) | |
tree | b62808ef22f53beba97f22a50f3f9bd96d74aeda /widgets/table/e-table.c | |
parent | e03e086323ba306b53f27f6e9e95d4c627a51717 (diff) | |
download | gsoc2013-evolution-abd6567ea011ed5546aa8b17bea86567ad9fb5f7.tar.gz gsoc2013-evolution-abd6567ea011ed5546aa8b17bea86567ad9fb5f7.tar.zst gsoc2013-evolution-abd6567ea011ed5546aa8b17bea86567ad9fb5f7.zip |
Replaced e_marshal_BOOL__STRING with this since the function it was used
2002-03-13 Christopher James Lahey <clahey@ximian.com>
* gal/util/e-util.c, gal/util/e-util.h
(e_marshal_BOOL__STRING_INT): Replaced e_marshal_BOOL__STRING with
this since the function it was used for has been modified.
From gal/e-table/ChangeLog:
2002-03-13 Christopher James Lahey <clahey@ximian.com>
* e-table-extras.c (e_string_search): Check for a NULL haystack
here.
* e-table-search.c, e-table-search.h: Added a parameter to the
search signal here to pass in flags. Specifically, added the
E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST flag. Improved the search
behavior here.
* e-table.c, e-tree.c: Handle the new signature for the search
signal here.
svn path=/trunk/; revision=16139
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 110d7a25e5..e730dabbc7 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -342,7 +342,7 @@ check_row (ETable *et, int model_row, int col, ETableSearchFunc search, char *st } static gboolean -et_search_search (ETableSearch *search, char *string, ETable *et) +et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, ETable *et) { int cursor; int rows; @@ -362,6 +362,9 @@ et_search_search (ETableSearch *search, char *string, ETable *et) "cursor_row", &cursor, NULL); + if ((flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST) && cursor < rows && cursor >= 0 && check_row (et, cursor, col, search_func, string)) + return TRUE; + cursor = e_sorter_model_to_sorted (E_SORTER (et->sorter), cursor); for (i = cursor + 1; i < rows; i++) { @@ -383,7 +386,7 @@ et_search_search (ETableSearch *search, char *string, ETable *et) cursor = e_sorter_sorted_to_model (E_SORTER (et->sorter), cursor); /* Check if the cursor row is the only matching row. */ - return (cursor < rows && cursor >= 0 && check_row (et, cursor, col, search_func, string)); + return (!(flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST) && cursor < rows && cursor >= 0 && check_row (et, cursor, col, search_func, string)); } static void |