diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-01-31 17:03:48 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-01-31 17:03:48 +0800 |
commit | 5ec116e6a91ece7b9a303bd9a36fe47ca3156363 (patch) | |
tree | 35a88e5c2b5b43283036181debb3f65594c641b5 /widgets | |
parent | 6d22aa7bd1818288f4428398d1268102f615c5c7 (diff) | |
download | gsoc2013-evolution-5ec116e6a91ece7b9a303bd9a36fe47ca3156363.tar.gz gsoc2013-evolution-5ec116e6a91ece7b9a303bd9a36fe47ca3156363.tar.zst gsoc2013-evolution-5ec116e6a91ece7b9a303bd9a36fe47ca3156363.zip |
Make this function take a bitfield of parameters instead of two bools.
2002-01-31 Christopher James Lahey <clahey@ximian.com>
* e-tree.c, e-tree.h (e_tree_find_next): Make this function take a
bitfield of parameters instead of two bools.
svn path=/trunk/; revision=15538
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-tree.c | 8 | ||||
-rw-r--r-- | widgets/table/e-tree.h | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index d50eef2b3b..26a6751b75 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1738,7 +1738,7 @@ e_tree_get_tooltip (ETree *et) } gboolean -e_tree_find_next (ETree *et, gboolean forward_direction, gboolean wrap, ETreePathFunc func, gpointer data) +e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpointer data) { ETreePath cursor; ETreePath found; @@ -1746,7 +1746,7 @@ e_tree_find_next (ETree *et, gboolean forward_direction, gboolean wrap, ETreePat cursor = e_tree_get_cursor (et); cursor = e_tree_sorted_model_to_view_path (et->priv->sorted, cursor); - found = e_tree_model_node_find (E_TREE_MODEL (et->priv->sorted), cursor, NULL, forward_direction, func, data); + found = e_tree_model_node_find (E_TREE_MODEL (et->priv->sorted), cursor, NULL, params & E_TREE_FIND_NEXT_FORWARD, func, data); if (found) { e_tree_table_adapter_show_node (et->priv->etta, found); @@ -1755,8 +1755,8 @@ e_tree_find_next (ETree *et, gboolean forward_direction, gboolean wrap, ETreePat return TRUE; } - if (wrap) { - found = e_tree_model_node_find (E_TREE_MODEL (et->priv->sorted), NULL, cursor, forward_direction, func, data); + if (params & E_TREE_FIND_NEXT_WRAP) { + found = e_tree_model_node_find (E_TREE_MODEL (et->priv->sorted), NULL, cursor, params & E_TREE_FIND_NEXT_FORWARD, func, data); if (found && found != cursor) { e_tree_table_adapter_show_node (et->priv->etta, found); diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index f42e22eb87..fea53eb184 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -281,9 +281,15 @@ void e_tree_load_expanded_state (ETree *et, char *filename); int e_tree_row_count (ETree *et); GtkWidget *e_tree_get_tooltip (ETree *et); + +typedef enum { + E_TREE_FIND_NEXT_BACKWARD = 0, + E_TREE_FIND_NEXT_FORWARD = 1 << 0, + E_TREE_FIND_NEXT_WRAP = 1 << 1 +} ETreeFindNextParams; + gboolean e_tree_find_next (ETree *et, - gboolean forward_direction, - gboolean wrap, + ETreeFindNextParams params, ETreePathFunc func, gpointer data); |