aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2010-06-08 19:55:58 +0800
committerChenthill Palanisamy <pchenthill@novell.com>2010-06-08 19:56:52 +0800
commitb5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646 (patch)
treec2da16075cce9e4e233dfaaa8148050ddf2cbdfe /modules
parent1837179f0253a133f9fd5636b9a4d347ba5d1201 (diff)
downloadgsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar.gz
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar.bz2
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar.lz
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar.xz
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.tar.zst
gsoc2013-evolution-b5b45ab7e8bd8d663ef81a5c8d6dfc5efaa7d646.zip
Bug 501534 - apply new customized view to all folders
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-content.c13
-rw-r--r--modules/mail/e-mail-shell-settings.c4
-rw-r--r--modules/mail/em-mailer-prefs.c5
3 files changed, 21 insertions, 1 deletions
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 5d5ee14e3a..135888d782 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -968,9 +968,12 @@ void
e_mail_shell_content_update_view_instance (EMailShellContent *mail_shell_content)
{
EMailReader *reader;
+ EShell *shell;
EShellContent *shell_content;
EShellView *shell_view;
+ EShellWindow *shell_window;
EShellViewClass *shell_view_class;
+ EShellSettings *shell_settings;
GalViewCollection *view_collection;
GalViewInstance *view_instance;
CamelFolder *folder;
@@ -987,6 +990,10 @@ e_mail_shell_content_update_view_instance (EMailShellContent *mail_shell_content
shell_view = e_shell_content_get_shell_view (shell_content);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
view_collection = shell_view_class->view_collection;
+
+ shell_window = e_shell_view_get_shell_window (shell_view);
+ shell = e_shell_window_get_shell (shell_window);
+ shell_settings = e_shell_get_shell_settings (shell);
reader = E_MAIL_READER (mail_shell_content);
folder = e_mail_reader_get_folder (reader);
@@ -1005,7 +1012,11 @@ e_mail_shell_content_update_view_instance (EMailShellContent *mail_shell_content
}
view_id = mail_config_folder_to_safe_url (folder);
- view_instance = e_shell_view_new_view_instance (shell_view, view_id);
+ if (e_shell_settings_get_boolean (shell_settings, "mail-global-view-setting"))
+ view_instance = e_shell_view_new_view_instance (shell_view, "global_view_setting");
+ else
+ view_instance = e_shell_view_new_view_instance (shell_view, view_id);
+
mail_shell_content->priv->view_instance = view_instance;
orientable = GTK_ORIENTABLE (mail_shell_content);
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 7303aeea5b..d9f2c80538 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -129,6 +129,10 @@ e_mail_shell_settings_init (EShell *shell)
e_shell_settings_install_property_for_key (
"mail-magic-spacebar",
"/apps/evolution/mail/display/magic_spacebar");
+
+ e_shell_settings_install_property_for_key (
+ "mail-global-view-setting",
+ "/apps/evolution/mail/display/global_view_setting");
e_shell_settings_install_property_for_key (
"mail-mark-citations",
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 11795a92d8..168965f02b 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -921,6 +921,11 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
e_mutual_binding_new (
shell_settings, "mail-magic-spacebar",
widget, "active");
+
+ widget = e_builder_get_widget (prefs->builder, "view-check");
+ e_mutual_binding_new (
+ shell_settings, "mail-global-view-setting",
+ widget, "active");
widget = e_charset_combo_box_new ();
container = e_builder_get_widget (prefs->builder, "hboxDefaultCharset");