From de169b4feeeaf2013aa256ddf70276bacbd6542a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 10 Feb 2009 02:51:52 +0000 Subject: Rewrite the signature management UI from top to bottom. - Break the UI out of Glade and into small, manageable widgets: ESignatureEditor (moved from mail to widgets/misc) ESignatureManager ESignatureTreeView ESignatureScriptDialog - Move several signature utilities to e-util/e-signature-utils.c so they're accessible from widgets/misc without introducing circular dependences. - Have EMailShellModule listen for new GtkhtmlEditor windows (from which EMsgComposer and ESignatureEditor are derived) and configure the window with spelling and HTML editing user preferences. - Drastically simplifies em-composer-prefs.c. svn path=/branches/kill-bonobo/; revision=37239 --- mail/e-mail-shell-module.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mail/e-mail-shell-module.c') diff --git a/mail/e-mail-shell-module.c b/mail/e-mail-shell-module.c index 760eca6ab7..7c61663541 100644 --- a/mail/e-mail-shell-module.c +++ b/mail/e-mail-shell-module.c @@ -26,6 +26,7 @@ #include #include "e-util/e-account-utils.h" +#include "e-util/e-binding.h" #include "e-util/e-import.h" #include "e-util/e-util.h" #include "shell/e-shell.h" @@ -762,9 +763,34 @@ mail_shell_module_window_created_cb (EShell *shell, GtkWindow *window, EShellModule *shell_module) { + EShellSettings *shell_settings; static gboolean first_time = TRUE; const gchar *module_name; + shell_settings = e_shell_get_shell_settings (shell); + + /* This applies to both the composer and signature editor. */ + if (GTKHTML_IS_EDITOR (window)) { + GList *spell_languages; + + e_binding_new ( + G_OBJECT (shell_settings), "composer-inline-spelling", + G_OBJECT (window), "inline-spelling"); + + e_binding_new ( + G_OBJECT (shell_settings), "composer-magic-links", + G_OBJECT (window), "magic-links"); + + e_binding_new ( + G_OBJECT (shell_settings), "composer-magic-smileys", + G_OBJECT (window), "magic-smileys"); + + spell_languages = e_load_spell_languages (); + gtkhtml_editor_set_spell_languages ( + GTKHTML_EDITOR (window), spell_languages); + g_list_free (spell_languages); + } + if (E_IS_MSG_COMPOSER (window)) { /* Integrate the new composer into the mail module. */ em_configure_new_composer (E_MSG_COMPOSER (window)); -- cgit v1.2.3