[evolution/webkit-composer: 139/182] Remove e_load_spell_languages().



commit 070b284542ecdebdb1cd2b5f6c0e1aeee87c893b
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 3482e2e..251fe2d 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4955,47 +4955,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 70a641f..6ef99fd 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -195,7 +195,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 564b30c..52414f8 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -371,19 +371,11 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
                EEditor *editor;
                EEditorWidget *editor_widget;
                GSettings *settings;
-               ESpellChecker *spell_checker;
-               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");
 
                /* Express mode does not honor this setting. */


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