[evolution/webkit-composer: 137/147] Remove e_load_spell_languages().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 137/147] Remove e_load_spell_languages().
- Date: Mon, 21 Jan 2013 02:21:39 +0000 (UTC)
commit e0553d0b2ac88150f0e00ef2427e9f2e62e6dda5
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 81c9f64..c3c27a2 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -4970,47 +4970,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 429f44a..556f55e 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 5e186a4..b2d5420 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -372,19 +372,11 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
EShellSettings *shell_settings;
EEditor *editor;
EEditorWidget *editor_widget;
- 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);
-
shell_settings = e_shell_get_shell_settings (shell);
/* Express mode does not honor this setting. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]