aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-08-11 18:08:14 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-08-11 18:08:14 +0800
commit28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9 (patch)
tree19c341addfb7d286a202084f14bdb146c1875c3b /mail
parentc29e1c65703bc651f786130024da2efcedcf607d (diff)
downloadgsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar.gz
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar.bz2
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar.lz
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar.xz
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.tar.zst
gsoc2013-evolution-28a98b7973e5fd9341fbc7faa6f49b7d0b8d4de9.zip
** Fix for bug #519292
2008-08-11 Milan Crha <mcrha@redhat.com> ** Fix for bug #519292 * mail/message-list.c: (load_tree_expand_all): Drop function. * mail/message-list.c: (regen_list_done): Rather use desired expanded state value when creating the tree instead of the default model's value for this to have 'expand/collapse all' commands work better and quicker. * widgets/tablee-tree.h: (e_tree_load_all_expanded_state): * widgets/tablee-tree.c: (e_tree_load_all_expanded_state): * widgets/tablee-tree-table-adapter.h: (e_tree_table_adapter_load_all_expanded_state): * widgets/tablee-tree-table-adapter.c: (e_tree_table_adapter_load_all_expanded_state), (set_expanded_state_func), (set_collapsed_state_func): Drop functions in favor of new functions. * widgets/tablee-tree.h: (e_tree_force_expanded_state): * widgets/tablee-tree.c: (e_tree_force_expanded_state): * widgets/tablee-tree-table-adapter.h: (e_tree_table_adapter_force_expanded_state): * widgets/tablee-tree-table-adapter.c: (e_tree_table_adapter_force_expanded_state), (struct ETreeTableAdapterPriv), (create_gnode), (etta_init): Use either default value of the model to expanded state of new node or use the one which has been set (forced) by new functions. svn path=/trunk/; revision=35954
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/message-list.c26
2 files changed, 20 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index feeea7839d..ae6c4780f3 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,14 @@
2008-08-11 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #519292
+
+ * message-list.c: (load_tree_expand_all): Drop function.
+ * message-list.c: (regen_list_done): Rather use desired expanded state
+ value when creating the tree instead of the default model's value for
+ this to have 'expand/collapse all' commands work better and quicker.
+
+2008-08-11 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #352695
* message-list.c: (struct _MessageListPrivate), (save_tree_state),
diff --git a/mail/message-list.c b/mail/message-list.c
index 73e2d30931..3f43f58cb6 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1804,16 +1804,6 @@ save_tree_state(MessageList *ml)
}
static void
-load_tree_expand_all (MessageList *ml, gboolean state)
-{
-
- if (ml->folder == NULL || ml->tree == NULL)
- return;
-
- e_tree_load_all_expanded_state (ml->tree, state);
- save_tree_state (ml);
-}
-static void
load_tree_state (MessageList *ml, xmlDoc *expand_state)
{
if (ml->folder == NULL || ml->tree == NULL)
@@ -4147,6 +4137,8 @@ regen_list_done (struct _regen_list_msg *m)
e_profile_event_emit("list.buildtree", m->folder->full_name, 0);
if (m->dotree) {
+ gboolean forcing_expand_state = m->ml->expand_all || m->ml->collapse_all;
+
if (m->ml->just_set_folder) {
m->ml->just_set_folder = FALSE;
if (m->expand_state) {
@@ -4156,17 +4148,21 @@ regen_list_done (struct _regen_list_msg *m)
}
}
+ if (forcing_expand_state)
+ e_tree_force_expanded_state (m->ml->tree, m->ml->expand_all ? 1 : -1);
+
build_tree (m->ml, m->tree, m->changes);
if (m->ml->thread_tree)
camel_folder_thread_messages_unref(m->ml->thread_tree);
m->ml->thread_tree = m->tree;
m->tree = NULL;
- if (m->ml->expand_all)
- load_tree_expand_all (m->ml, TRUE);
- else if (m->ml->collapse_all)
- load_tree_expand_all (m->ml, FALSE);
- else
+ if (forcing_expand_state) {
+ if (m->ml->folder != NULL && m->ml->tree != NULL)
+ save_tree_state (m->ml);
+ /* do not forget to set this back to use the default value... */
+ e_tree_force_expanded_state (m->ml->tree, 0);
+ } else
load_tree_state (m->ml, m->expand_state);
m->ml->expand_all = 0;