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



commit f8bb6c8d04572830bfeb2d61fd8ef080e77a5be6
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 |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 6a4b7c8..bf4609e 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -85,21 +85,6 @@ 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)
 {
@@ -259,10 +244,10 @@ e_composer_private_constructed (EMsgComposer *composer)
 		shell_settings, "composer-inline-spelling",
 		header->input_widget, "checking-enabled",
 		G_BINDING_SYNC_CREATE);
-
-	g_signal_connect_swapped (
-		editor_widget, "notify::spell-languages",
-		G_CALLBACK (composer_spell_languages_changed), composer);
+	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]