aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-04 06:53:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-04 06:54:45 +0800
commit3d7193ad9d38264298d2767772ee57da12574c79 (patch)
tree6359e1b45aa9ce5ed5320e22711ecf77ac34be96
parentd94208b114ff961ad2db920cc00d93c2beb3ae48 (diff)
downloadgsoc2013-evolution-3d7193ad9d38264298d2767772ee57da12574c79.tar.gz
gsoc2013-evolution-3d7193ad9d38264298d2767772ee57da12574c79.tar.zst
gsoc2013-evolution-3d7193ad9d38264298d2767772ee57da12574c79.zip
Copy folder tree state of 1st window when opening new windows.
-rw-r--r--modules/mail/e-mail-shell-sidebar.c4
-rw-r--r--modules/mail/e-mail-shell-view-private.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index b45e30ddee..7d98f74558 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -465,9 +465,7 @@ mail_shell_sidebar_constructed (GObject *object)
selection = gtk_tree_view_get_selection (tree_view);
model = gtk_tree_view_get_model (tree_view);
- if (em_folder_tree_model_get_selection (
- EM_FOLDER_TREE_MODEL (model)) == NULL)
- mail_shell_sidebar_restore_state (mail_shell_sidebar);
+ mail_shell_sidebar_restore_state (mail_shell_sidebar);
em_folder_tree_model_set_selection (
EM_FOLDER_TREE_MODEL (model), selection);
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 984c3acf27..849efe63d7 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -313,6 +313,7 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
EMFolderTree *folder_tree;
RuleContext *context;
FilterRule *rule = NULL;
+ GtkTreeSelection *selection;
GtkTreeModel *tree_model;
GtkUIManager *ui_manager;
MessageList *message_list;
@@ -353,6 +354,7 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (shell_sidebar);
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_tree));
html = EM_FORMAT_HTML (html_display)->html;
@@ -442,6 +444,9 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
priv->search_rules[ii++] = g_object_ref (rule);
}
g_assert (ii == MAIL_NUM_SEARCH_RULES);
+
+ /* Now that we're all set up, simulate selecting a folder. */
+ g_signal_emit_by_name (selection, "changed");
}
void