aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-30 20:27:49 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:26:43 +0800
commit51a35cd8be6904a3bb477eccc544a186a66b541c (patch)
treeebe63c9e8a39107ab9582aaa89b9159a2dabf0e8
parent148ca772f22e447ab1660adaf1c56b80c6fb1db7 (diff)
downloadgsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar.gz
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar.bz2
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar.lz
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar.xz
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.tar.zst
gsoc2013-evolution-51a35cd8be6904a3bb477eccc544a186a66b541c.zip
Express: Composer always defaults to HTML mode
Composer and signature editor always default to HTML in Express mode. Hide the corresponding composer preference. This will not affect the user preference in normal mode.
-rw-r--r--composer/e-msg-composer.c4
-rw-r--r--mail/em-account-editor.c5
-rw-r--r--modules/mail/e-mail-shell-backend.c11
-rw-r--r--modules/mail/em-composer-prefs.c19
4 files changed, 24 insertions, 15 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f239a2825f..308d7e8294 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1663,10 +1663,6 @@ msg_composer_constructed (GObject *object)
/* Honor User Preferences */
- active = e_shell_settings_get_boolean (
- shell_settings, "composer-format-html");
- gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), active);
-
action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
active = e_shell_settings_get_boolean (
shell_settings, "composer-request-receipt");
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 77d2dc8216..d3158fb48d 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -835,7 +835,6 @@ emae_signature_new (GtkWidget *widget, EMAccountEditor *emae)
EShell *shell;
EShellSettings *shell_settings;
GtkWidget *editor;
- gboolean html_mode;
gpointer parent;
shell = e_shell_get_default ();
@@ -844,11 +843,7 @@ emae_signature_new (GtkWidget *widget, EMAccountEditor *emae)
parent = gtk_widget_get_toplevel (widget);
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
- html_mode = e_shell_settings_get_boolean (
- shell_settings, "composer-format-html");
-
editor = e_signature_editor_new ();
- gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (editor), html_mode);
gtk_window_set_transient_for (GTK_WINDOW (editor), parent);
gtk_widget_show (editor);
}
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 00b4a78dc6..b3eb0a97c1 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -413,12 +413,23 @@ mail_shell_backend_window_created_cb (EShell *shell,
/* This applies to both the composer and signature editor. */
if (GTKHTML_IS_EDITOR (window)) {
+ EShellSettings *shell_settings;
GList *spell_languages;
+ gboolean active = TRUE;
spell_languages = e_load_spell_languages ();
gtkhtml_editor_set_spell_languages (
GTKHTML_EDITOR (window), spell_languages);
g_list_free (spell_languages);
+
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ /* Express mode does not honor this setting. */
+ if (!e_shell_get_express_mode (shell))
+ active = e_shell_settings_get_boolean (
+ shell_settings, "composer-format-html");
+
+ gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (window), active);
}
if (E_IS_MSG_COMPOSER (window)) {
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 3d1cf2ed08..eabde51396 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -398,10 +398,15 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
/* General tab */
/* Default Behavior */
+
+ /* Express mode does not honor this setting. */
widget = e_builder_get_widget (prefs->builder, "chkSendHTML");
- e_mutual_binding_new (
- shell_settings, "composer-format-html",
- widget, "active");
+ if (e_shell_get_express_mode (shell))
+ gtk_widget_hide (widget);
+ else
+ e_mutual_binding_new (
+ shell_settings, "composer-format-html",
+ widget, "active");
widget = e_builder_get_widget (prefs->builder, "chkPromptEmptySubject");
e_mutual_binding_new (
@@ -517,9 +522,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
widget, "editor-created",
G_CALLBACK (e_shell_watch_window), shell);
- e_binding_new (
- shell_settings, "composer-format-html",
- widget, "prefer-html");
+ /* Express mode does not honor this setting. */
+ if (!e_shell_get_express_mode (shell))
+ e_binding_new (
+ shell_settings, "composer-format-html",
+ widget, "prefer-html");
e_binding_new_with_negation (
shell_settings, "disable-command-line",