[evolution/gnome-2-32] Bug #619387 - EMailBrowser doesn't honour sorting of a mail window
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-32] Bug #619387 - EMailBrowser doesn't honour sorting of a mail window
- Date: Tue, 12 Oct 2010 10:53:54 +0000 (UTC)
commit 03acdfb763bb777402955db5ed117c19ad23a3dc
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 12 12:53:27 2010 +0200
Bug #619387 - EMailBrowser doesn't honour sorting of a mail window
mail/e-mail-reader-utils.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index a7bddfe..f041c57 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -184,6 +184,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)
@@ -268,6 +290,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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]