aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-10-12 18:52:59 +0800
committerMilan Crha <mcrha@redhat.com>2010-10-12 18:52:59 +0800
commitc0050ee921ed38757cc2b271ca6e56cd0eaeb722 (patch)
tree5877d34a31b915dcea5e1cfb7e9f7a5d12f08006
parentffab1c2a533aa55228764f1e6fde137d868ee9a7 (diff)
downloadgsoc2013-evolution-c0050ee921ed38757cc2b271ca6e56cd0eaeb722.tar.gz
gsoc2013-evolution-c0050ee921ed38757cc2b271ca6e56cd0eaeb722.tar.zst
gsoc2013-evolution-c0050ee921ed38757cc2b271ca6e56cd0eaeb722.zip
Bug #619387 - EMailBrowser doesn't honour sorting of a mail window
-rw-r--r--mail/e-mail-reader-utils.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 4c320ff9f6..32dcee6fd5 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -186,6 +186,28 @@ e_mail_reader_mark_selected (EMailReader *reader,
return ii;
}
+static void
+copy_tree_state (EMailReader *src_reader, EMailReader *des_reader)
+{
+ GtkWidget *src_mlist, *des_mlist;
+ gchar *state;
+
+ g_return_if_fail (src_reader != NULL);
+ g_return_if_fail (des_reader != NULL);
+
+ src_mlist = e_mail_reader_get_message_list (src_reader);
+ if (!src_mlist)
+ return;
+
+ des_mlist = e_mail_reader_get_message_list (des_reader);
+ if (!des_mlist)
+ return;
+
+ state = e_tree_get_state (E_TREE (src_mlist));
+ if (state)
+ e_tree_set_state (E_TREE (des_mlist), state);
+ g_free (state);
+}
guint
e_mail_reader_open_selected (EMailReader *reader)
@@ -270,6 +292,7 @@ e_mail_reader_open_selected (EMailReader *reader)
e_mail_reader_set_folder (
E_MAIL_READER (browser), folder, folder_uri);
e_mail_reader_set_message (E_MAIL_READER (browser), uid);
+ copy_tree_state (reader, E_MAIL_READER (browser));
e_mail_reader_set_group_by_threads (
E_MAIL_READER (browser),
e_mail_reader_get_group_by_threads (reader));