aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-09-12 16:29:48 +0800
committerMilan Crha <mcrha@redhat.com>2012-09-12 16:30:47 +0800
commit17ecde5404d585f973d8a0c895c5cf5c6274fd30 (patch)
tree2fa91b7068841a26c49f5b7722072317f85f8e23
parent28ac13a6ce9600b5636b8728ec9d3c0d9aa14235 (diff)
downloadgsoc2013-evolution-17ecde5404d585f973d8a0c895c5cf5c6274fd30.tar.gz
gsoc2013-evolution-17ecde5404d585f973d8a0c895c5cf5c6274fd30.tar.zst
gsoc2013-evolution-17ecde5404d585f973d8a0c895c5cf5c6274fd30.zip
Bug #683676 - Message source does not work when 'All Message Headers' enabled
-rw-r--r--mail/e-mail-reader.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 963b9e0f36..b08a4fcea5 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -1692,6 +1692,11 @@ action_mail_show_all_headers_cb (GtkToggleAction *action,
display = e_mail_reader_get_mail_display (reader);
+ /* mode change when viewing message source is ignored */
+ if (e_mail_display_get_mode (display) == E_MAIL_FORMATTER_MODE_SOURCE ||
+ e_mail_display_get_mode (display) == E_MAIL_FORMATTER_MODE_RAW)
+ return;
+
if (gtk_toggle_action_get_active (action))
e_mail_display_set_mode (display, E_MAIL_FORMATTER_MODE_ALL_HEADERS);
else
@@ -3821,10 +3826,7 @@ e_mail_reader_init (EMailReader *reader,
gboolean sensitive;
const gchar *action_name;
EMailDisplay *display;
-
-#ifndef G_OS_WIN32
GSettings *settings;
-#endif
g_return_if_fail (E_IS_MAIL_READER (reader));
@@ -3905,6 +3907,8 @@ e_mail_reader_init (EMailReader *reader,
action_group, mail_reader_search_folder_entries,
G_N_ELEMENTS (mail_reader_search_folder_entries), reader);
+ display = e_mail_reader_get_mail_display (reader);
+
/* Bind GObject properties to GSettings keys. */
settings = g_settings_new ("org.gnome.evolution.mail");
@@ -3921,6 +3925,13 @@ e_mail_reader_init (EMailReader *reader,
settings, "show-all-headers",
action, "active", G_SETTINGS_BIND_DEFAULT);
+ /* mode change when viewing message source is ignored */
+ if (e_mail_display_get_mode (display) == E_MAIL_FORMATTER_MODE_SOURCE ||
+ e_mail_display_get_mode (display) == E_MAIL_FORMATTER_MODE_RAW) {
+ gtk_action_set_sensitive (action, FALSE);
+ gtk_action_set_visible (action, FALSE);
+ }
+
g_object_unref (settings);
/* Fine tuning. */
@@ -3975,8 +3986,6 @@ e_mail_reader_init (EMailReader *reader,
gtk_action_set_is_important (action, TRUE);
gtk_action_set_short_label (action, _("Reply"));
- display = e_mail_reader_get_mail_display (reader);
-
action_name = "add-to-address-book";
action = e_mail_display_get_action (display, action_name);
g_signal_connect (