[evolution/gnome-3-6] Bug #645476 - Avoid scroll to cursor on folder change in message list (take 3)



commit 6025638f1ffa9f312bcd93b4015223b7db69b10e
Author: Milan Crha <mcrha redhat com>
Date:   Mon Mar 4 22:09:19 2013 +0100

    Bug #645476 - Avoid scroll to cursor on folder change in message list (take 3)

 mail/message-list.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/mail/message-list.c b/mail/message-list.c
index da0be14..a592bf9 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4801,6 +4801,7 @@ regen_list_done (struct _regen_list_msg *m)
 
        if (m->dotree) {
                gboolean forcing_expand_state = m->ml->expand_all || m->ml->collapse_all;
+               ETableItem *table_item = e_tree_get_item (E_TREE (m->ml));
 
                if (m->ml->just_set_folder) {
                        m->ml->just_set_folder = FALSE;
@@ -4814,12 +4815,19 @@ regen_list_done (struct _regen_list_msg *m)
                if (forcing_expand_state || searching)
                        e_tree_force_expanded_state (tree, (m->ml->expand_all || searching) ? 1 : -1);
 
+               e_tree_memory_freeze (E_TREE_MEMORY (m->ml->model));
+
                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->scroll_to_cursor && table_item)
+                       table_item->queue_show_cursor = FALSE;
+
+               e_tree_memory_thaw (E_TREE_MEMORY (m->ml->model));
+
                if (forcing_expand_state || searching) {
                        if (m->ml->folder != NULL && tree != NULL && !searching)
                                save_tree_state (m->ml);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]