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 /mail | |
parent | f0900fd21d0c6abd7e038aac656de7b6cfeb19d2 (diff) | |
download | gsoc2013-evolution-7742fe08606c4d491355e8add61083284ec1264f.tar.gz 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);
Diffstat (limited to 'mail')
-rw-r--r-- | mail/message-list.c | 21 |
1 files changed, 13 insertions, 8 deletions
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; } |