diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-06-20 22:14:30 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-06-21 03:31:51 +0800 |
commit | 7742fe08606c4d491355e8add61083284ec1264f (patch) | |
tree | 1d07d32d2bb72501f37d7929bf772f5e6cbceecf | |
parent | f0900fd21d0c6abd7e038aac656de7b6cfeb19d2 (diff) | |
download | gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.gz gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.bz2 gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.lz gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.xz gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.zst gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.zip |
Remove e_tree_node_is_expanded().
Reducing API bloat. Do this instead:
adapter = e_tree_get_table_adapter (tree);
expanded = e_tree_table_adapter_node_is_expanded (adapter, path);
-rw-r--r-- | doc/reference/evolution-util/evolution-util-sections.txt | 1 | ||||
-rw-r--r-- | e-util/e-tree.c | 9 | ||||
-rw-r--r-- | e-util/e-tree.h | 2 | ||||
-rw-r--r-- | mail/message-list.c | 21 |
4 files changed, 13 insertions, 20 deletions
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt index d7ced3e592..7143809df9 100644 --- a/doc/reference/evolution-util/evolution-util-sections.txt +++ b/doc/reference/evolution-util/evolution-util-sections.txt @@ -4207,7 +4207,6 @@ e_tree_drag_source_set e_tree_drag_source_unset e_tree_drag_begin e_tree_is_dragging -e_tree_node_is_expanded e_tree_node_set_expanded e_tree_node_set_expanded_recurse e_tree_root_node_set_visible diff --git a/e-util/e-tree.c b/e-util/e-tree.c index 20eb8a4588..d8aa3e8f9b 100644 --- a/e-util/e-tree.c +++ b/e-util/e-tree.c @@ -2190,15 +2190,6 @@ e_tree_view_to_model_row (ETree *tree, return view_row; } -gboolean -e_tree_node_is_expanded (ETree *tree, - ETreePath path) -{ - g_return_val_if_fail (path, FALSE); - - return e_tree_table_adapter_node_is_expanded (tree->priv->etta, path); -} - void e_tree_node_set_expanded (ETree *tree, ETreePath path, diff --git a/e-util/e-tree.h b/e-util/e-tree.h index d413972d02..4b70ea876b 100644 --- a/e-util/e-tree.h +++ b/e-util/e-tree.h @@ -273,8 +273,6 @@ GdkDragContext *e_tree_drag_begin (ETree *tree, gboolean e_tree_is_dragging (ETree *tree); /* Adapter functions */ -gboolean e_tree_node_is_expanded (ETree *tree, - ETreePath path); void e_tree_node_set_expanded (ETree *tree, ETreePath path, gboolean expanded); diff --git a/mail/message-list.c b/mail/message-list.c index adf60aec41..96a5aacb36 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1238,17 +1238,18 @@ for_node_and_subtree_if_collapsed (MessageList *message_list, gpointer data) { ETreeModel *tree_model; - GNode *child; + ETreeTableAdapter *adapter; + GNode *child = NULL; tree_model = E_TREE_MODEL (message_list); + adapter = e_tree_get_table_adapter (E_TREE (message_list)); func (NULL, (ETreePath) mi, data); - if (!node) - return; + if (node != NULL) + child = g_node_first_child (node); - child = g_node_first_child (node); - if (child && !e_tree_node_is_expanded (E_TREE (message_list), node)) + if (child && !e_tree_table_adapter_node_is_expanded (adapter, node)) e_tree_model_node_traverse (tree_model, node, func, data); } @@ -3672,6 +3673,7 @@ build_tree (MessageList *message_list, { gint row = 0; ETableItem *table_item = e_tree_get_item (E_TREE (message_list)); + ETreeTableAdapter *adapter; gchar *saveuid = NULL; GPtrArray *selected; #ifdef TIMEIT @@ -3689,6 +3691,8 @@ build_tree (MessageList *message_list, printf ("Loading tree state took %ld.%03ld seconds\n", diff / 1000, diff % 1000); #endif + adapter = e_tree_get_table_adapter (E_TREE (message_list)); + if (message_list->priv->tree_model_root == NULL) { message_list_tree_model_insert (message_list, NULL, 0, NULL); g_warn_if_fail (message_list->priv->tree_model_root != NULL); @@ -3748,11 +3752,10 @@ build_tree (MessageList *message_list, message_list, signals[MESSAGE_SELECTED], 0, NULL); } else { - ETree *tree = E_TREE (message_list); GNode *parent = node; while ((parent = parent->parent) != NULL) { - if (!e_tree_node_is_expanded (tree, parent)) + if (!e_tree_table_adapter_node_is_expanded (adapter, parent)) node = parent; } @@ -4055,12 +4058,14 @@ message_list_change_first_visible_parent (MessageList *message_list, GNode *node) { ETreeModel *tree_model; + ETreeTableAdapter *adapter; GNode *first_visible = NULL; tree_model = E_TREE_MODEL (message_list); + adapter = e_tree_get_table_adapter (E_TREE (message_list)); while (node != NULL && (node = node->parent) != NULL) { - if (!e_tree_node_is_expanded (E_TREE (message_list), node)) + if (!e_tree_table_adapter_node_is_expanded (adapter, node)) first_visible = node; } |