[evolution/webkit-composer: 136/210] Remove e_load_spell_languages().



commit 18ef53eb51be0684df9eb6c80a4ffffa873054ab
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jan 20 11:16:54 2013 -0500

    Remove e_load_spell_languages().
    
    No longer needed.  ESettingsSpellChecker automatically initializes
    ESpellChecker with the initial set of active languages from GSettings.

 composer/e-msg-composer.c           |   41 -----------------------------------
 composer/e-msg-composer.h           |    1 -
 modules/mail/e-mail-shell-backend.c |    8 ------
 3 files changed, 0 insertions(+), 50 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 51026d7..8f21ee8 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4938,47 +4938,6 @@ e_msg_composer_get_attachment_view (EMsgComposer *composer)
        return E_ATTACHMENT_VIEW (composer->priv->attachment_paned);
 }
 
-GList *
-e_load_spell_languages (ESpellChecker *spell_checker)
-{
-       GSettings *settings;
-       GList *spell_dicts = NULL;
-       gchar **strv;
-       gint ii;
-
-       /* Ask GSettings for a list of spell check language codes. */
-       settings = g_settings_new ("org.gnome.evolution.mail");
-       strv = g_settings_get_strv (settings, "composer-spell-languages");
-       g_object_unref (settings);
-
-       /* Convert the codes to spell language structs. */
-       for (ii = 0; strv[ii] != NULL; ii++) {
-               gchar *language_code = strv[ii];
-               ESpellDictionary *dict;
-
-               dict = e_spell_checker_ref_dictionary (
-                       spell_checker, language_code);
-               if (dict != NULL)
-                       spell_dicts = g_list_prepend (spell_dicts, dict);
-       }
-
-       g_strfreev (strv);
-
-       spell_dicts = g_list_reverse (spell_dicts);
-
-       /* Pick a default spell language if it came back empty. */
-       if (spell_dicts == NULL) {
-               ESpellDictionary *dict;
-
-               dict = e_spell_checker_ref_dictionary (spell_checker, NULL);
-
-               if (dict != NULL)
-                       spell_dicts = g_list_prepend (spell_dicts, dict);
-       }
-
-       return spell_dicts;
-}
-
 void
 e_save_spell_languages (const GList *spell_dicts)
 {
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 7584816..088e848 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -196,7 +196,6 @@ GByteArray *        e_msg_composer_get_raw_message_text
 
 gboolean       e_msg_composer_is_exiting       (EMsgComposer *composer);
 
-GList *                e_load_spell_languages          (ESpellChecker *spell_checker);
 void           e_save_spell_languages          (const GList *spell_languages);
 
 G_END_DECLS
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 8222b7e..6b4b66c 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -370,20 +370,12 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
        if (E_IS_EDITOR_WINDOW (window)) {
                EEditor *editor;
                EEditorWidget *editor_widget;
-               ESpellChecker *spell_checker;
                GSettings *settings;
-               GList *list;
                gboolean active = TRUE;
 
                editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
                editor_widget = e_editor_get_editor_widget (editor);
 
-               spell_checker =
-                       e_editor_widget_get_spell_checker (editor_widget);
-               list = e_load_spell_languages (spell_checker);
-               e_editor_widget_set_spell_languages (editor_widget, list);
-               g_list_free_full (list, (GDestroyNotify) g_object_unref);
-
                settings = g_settings_new ("org.gnome.evolution.mail");
 
                active = g_settings_get_boolean (


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