diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-06-21 01:45:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-06-21 03:31:53 +0800 |
commit | b63340b736b9ef505d5ae53452b4636eff7133f6 (patch) | |
tree | 22b1de53909fa523c862ff1a33993282f5dc60a6 | |
parent | a0bfd19716e218d9666ff38cb97b2ffc2cd14749 (diff) | |
download | gsoc2013-evolution-b63340b736b9ef505d5ae53452b4636eff7133f6.tar.gz gsoc2013-evolution-b63340b736b9ef505d5ae53452b4636eff7133f6.tar.zst gsoc2013-evolution-b63340b736b9ef505d5ae53452b4636eff7133f6.zip |
Remove unused e_tree_find_next().
-rw-r--r-- | doc/reference/evolution-util/evolution-util-sections.txt | 2 | ||||
-rw-r--r-- | e-util/e-tree.c | 78 | ||||
-rw-r--r-- | e-util/e-tree.h | 11 |
3 files changed, 0 insertions, 91 deletions
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt index 4cced03ac1..176c0fe904 100644 --- a/doc/reference/evolution-util/evolution-util-sections.txt +++ b/doc/reference/evolution-util/evolution-util-sections.txt @@ -4200,8 +4200,6 @@ e_tree_drag_source_set e_tree_drag_source_unset e_tree_drag_begin e_tree_is_dragging -ETreeFindNextParams -e_tree_find_next e_tree_get_item e_tree_get_header_item e_tree_set_info_message diff --git a/e-util/e-tree.c b/e-util/e-tree.c index 279602b890..da1eaadae0 100644 --- a/e-util/e-tree.c +++ b/e-util/e-tree.c @@ -2063,84 +2063,6 @@ e_tree_view_to_model_row (ETree *tree, return view_row; } -static ETreePath -find_next_in_range (ETree *tree, - gint start, - gint end, - ETreePathFunc func, - gpointer data) -{ - ETreePath path; - gint row; - - for (row = start; row <= end; row++) { - path = e_tree_table_adapter_node_at_row (tree->priv->etta, row); - if (path && func (tree->priv->model, path, data)) - return path; - } - - return NULL; -} - -static ETreePath -find_prev_in_range (ETree *tree, - gint start, - gint end, - ETreePathFunc func, - gpointer data) -{ - ETreePath path; - gint row; - - for (row = start; row >= end; row--) { - path = e_tree_table_adapter_node_at_row (tree->priv->etta, row); - if (path && func (tree->priv->model, path, data)) - return path; - } - - return NULL; -} - -gboolean -e_tree_find_next (ETree *tree, - ETreeFindNextParams params, - ETreePathFunc func, - gpointer data) -{ - ETreePath cursor, found; - gint row, row_count; - - cursor = e_tree_get_cursor (tree); - row = e_tree_table_adapter_row_of_node (tree->priv->etta, cursor); - row_count = e_table_model_row_count (E_TABLE_MODEL (tree->priv->etta)); - - if (params & E_TREE_FIND_NEXT_FORWARD) - found = find_next_in_range (tree, row + 1, row_count - 1, func, data); - else - found = find_prev_in_range (tree, row == -1 ? -1 : row - 1, 0, func, data); - - if (found) { - e_tree_table_adapter_show_node (tree->priv->etta, found); - e_tree_set_cursor (tree, found); - return TRUE; - } - - if (params & E_TREE_FIND_NEXT_WRAP) { - if (params & E_TREE_FIND_NEXT_FORWARD) - found = find_next_in_range (tree, 0, row, func, data); - else - found = find_prev_in_range (tree, row_count - 1, row, func, data); - - if (found && found != cursor) { - e_tree_table_adapter_show_node (tree->priv->etta, found); - e_tree_set_cursor (tree, found); - return TRUE; - } - } - - return FALSE; -} - /** * e_tree_get_model: * @et: the ETree diff --git a/e-util/e-tree.h b/e-util/e-tree.h index 8ce1ae0525..98b292a33f 100644 --- a/e-util/e-tree.h +++ b/e-util/e-tree.h @@ -259,17 +259,6 @@ GdkDragContext *e_tree_drag_begin (ETree *tree, gboolean e_tree_is_dragging (ETree *tree); -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 *tree, - ETreeFindNextParams params, - ETreePathFunc func, - gpointer data); - ETableItem * e_tree_get_item (ETree *tree); GnomeCanvasItem * |