[evolution/webkit-composer: 143/182] EMsgComposer: Share the ESpellChecker with the subject header.



commit fb546710c934698231c8c1e8bb9d949971e69b0d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jan 20 16:01:17 2013 -0500

    EMsgComposer: Share the ESpellChecker with the subject header.

 composer/e-composer-private.c |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 8a4c1cf..f774619 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -85,26 +85,12 @@ composer_update_gallery_visibility (EMsgComposer *composer)
        }
 }
 
-static void
-composer_spell_languages_changed (EMsgComposer *composer,
-                                  GParamSpec *pspec,
-                                  EEditorWidget *editor_widget)
-{
-       GList *languages;
-       EComposerHeader *header;
-       EComposerHeaderTable *table = e_msg_composer_get_header_table (composer);
-
-       languages = e_editor_widget_get_spell_languages (editor_widget);
-       header = e_composer_header_table_get_header (table, E_COMPOSER_HEADER_SUBJECT);
-       e_composer_spell_header_set_languages (E_COMPOSER_SPELL_HEADER (header), languages);
-       g_list_free (languages);
-}
-
 void
 e_composer_private_constructed (EMsgComposer *composer)
 {
        EMsgComposerPrivate *priv = composer->priv;
        EFocusTracker *focus_tracker;
+       EComposerHeader *header;
        EShell *shell;
        ESourceRegistry *registry;
        EEditor *editor;
@@ -255,9 +241,13 @@ e_composer_private_constructed (EMsgComposer *composer)
        priv->header_table = g_object_ref (widget);
        gtk_widget_show (widget);
 
-       g_signal_connect_swapped (
-               editor_widget, "notify::spell-languages",
-               G_CALLBACK (composer_spell_languages_changed), composer);
+       header = e_composer_header_table_get_header (
+               E_COMPOSER_HEADER_TABLE (widget),
+               E_COMPOSER_HEADER_SUBJECT);
+       g_object_bind_property (
+               editor_widget, "spell-checker",
+               header->input_widget, "spell-checker",
+               G_BINDING_SYNC_CREATE);
 
        /* Construct the attachment paned. */
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]