aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-21 00:10:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-21 03:31:52 +0800
commit662c1a21bf74ebb4724612eea840a3dd810860b4 (patch)
treec92a38ec3c7276da692e960a5a6fb367fc498476
parent68b0b1022158a2442fffdd67820c1576adfdb9b0 (diff)
downloadgsoc2013-evolution-662c1a21bf74ebb4724612eea840a3dd810860b4.tar.gz
gsoc2013-evolution-662c1a21bf74ebb4724612eea840a3dd810860b4.tar.zst
gsoc2013-evolution-662c1a21bf74ebb4724612eea840a3dd810860b4.zip
Remove e_tree_force_expanded_state().
Reducing API bloat. Do this instead: adapter = e_tree_get_table_adapter (tree); e_tree_table_adapter_force_expanded_state (adapter, state);
-rw-r--r--doc/reference/evolution-util/evolution-util-sections.txt1
-rw-r--r--e-util/e-tree.c12
-rw-r--r--e-util/e-tree.h2
-rw-r--r--mail/message-list.c13
4 files changed, 9 insertions, 19 deletions
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt
index 4292d40e9d..10b10da618 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4209,7 +4209,6 @@ e_tree_drag_begin
e_tree_is_dragging
e_tree_row_count
e_tree_get_tooltip
-e_tree_force_expanded_state
ETreeFindNextParams
e_tree_find_next
e_tree_get_item
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 77a6c2f142..d9f723b3a9 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -2196,18 +2196,6 @@ e_tree_view_to_model_row (ETree *tree,
return view_row;
}
-/* state: <0 ... collapse; 0 ... no force - use default; >0 ... expand;
- * when using this, be sure to reset to 0 once no forcing is required
- * anymore, aka the build of the tree is done */
-void
-e_tree_force_expanded_state (ETree *tree,
- gint state)
-{
- g_return_if_fail (E_IS_TREE (tree));
-
- e_tree_table_adapter_force_expanded_state (tree->priv->etta, state);
-}
-
gint
e_tree_row_count (ETree *tree)
{
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index c937e62f0d..6a2745c7c2 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -274,8 +274,6 @@ gboolean e_tree_is_dragging (ETree *tree);
gint e_tree_row_count (ETree *tree);
GtkWidget * e_tree_get_tooltip (ETree *tree);
-void e_tree_force_expanded_state (ETree *tree,
- gint state);
typedef enum {
E_TREE_FIND_NEXT_BACKWARD = 0,
diff --git a/mail/message-list.c b/mail/message-list.c
index c6bde53bf8..ed3790181a 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -5421,10 +5421,15 @@ message_list_regen_done_cb (GObject *source_object,
}
if (forcing_expand_state || searching) {
+ gint state;
+
if (message_list->expand_all || searching)
- e_tree_force_expanded_state (tree, 1);
+ state = 1; /* force expand */
else
- e_tree_force_expanded_state (tree, -1);
+ state = -1; /* force collapse */
+
+ e_tree_table_adapter_force_expanded_state (
+ adapter, state);
}
/* Show the cursor unless we're responding to a
@@ -5446,8 +5451,8 @@ message_list_regen_done_cb (GObject *source_object,
save_tree_state (
message_list,
regen_data->folder);
- /* do not forget to set this back to use the default value... */
- e_tree_force_expanded_state (tree, 0);
+ /* Disable forced expand/collapse state. */
+ e_tree_table_adapter_force_expanded_state (adapter, 0);
} else {
load_tree_state (
message_list,