diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2008-04-06 09:13:37 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-04-06 09:13:37 +0800 |
commit | 0828f35962a45c0f206d1f7d260783e282a55ecf (patch) | |
tree | 98122f7df1de46f284f03741f60fe19759fb0d36 /mail/em-composer-prefs.c | |
parent | 5cbf864dca7165ac60e3ce2eb6799228fbedef2c (diff) | |
download | gsoc2013-evolution-0828f35962a45c0f206d1f7d260783e282a55ecf.tar.gz gsoc2013-evolution-0828f35962a45c0f206d1f7d260783e282a55ecf.tar.zst gsoc2013-evolution-0828f35962a45c0f206d1f7d260783e282a55ecf.zip |
Fix a corner case that I missed in my last commit.
2008-04-05 Matthew Barnes <mbarnes@redhat.com>
* mail/em-composer-prefs.c:
Fix a corner case that I missed in my last commit.
svn path=/trunk/; revision=35324
Diffstat (limited to 'mail/em-composer-prefs.c')
-rw-r--r-- | mail/em-composer-prefs.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 52c7d205da..e74e8f8c34 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -558,12 +558,9 @@ spell_language_toggled_cb (GtkCellRendererToggle *renderer, const gchar *path_string, EMComposerPrefs *prefs) { - GSList *list = NULL; - GConfClient *client; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; - const gchar *key; gboolean active; gboolean valid; @@ -578,6 +575,19 @@ spell_language_toggled_cb (GtkCellRendererToggle *renderer, /* Toggle the active state. */ gtk_tree_model_get (model, &iter, 0, &active, -1); gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, !active, -1); +} + +static void +spell_language_save (EMComposerPrefs *prefs) +{ + GSList *list = NULL; + GConfClient *client; + GtkTreeModel *model; + GtkTreeIter iter; + const gchar *key; + gboolean valid; + + model = prefs->language_model; /* Build a list of active languages. */ valid = gtk_tree_model_get_iter_first (model, &iter); @@ -662,6 +672,9 @@ spell_setup (EMComposerPrefs *prefs) available_languages = available_languages->next; } + /* Update the GConf list in case we used a default language. */ + spell_language_save (prefs); + g_slist_free (active_languages); key = "/apps/evolution/mail/composer/spell_color"; @@ -944,13 +957,16 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) "/apps/evolution/mail/composer/charset"); g_free (buf); - /* Spell Checking: GNOME Spell part */ + /* Spell Checking */ widget = glade_xml_get_widget (gui, "colorButtonSpellCheckColor"); prefs->color = GTK_COLOR_BUTTON (widget); widget = glade_xml_get_widget (gui, "listSpellCheckLanguage"); view = GTK_TREE_VIEW (widget); store = gtk_list_store_new ( 3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); + g_signal_connect_swapped ( + store, "row-changed", + G_CALLBACK (spell_language_save), prefs); prefs->language_model = GTK_TREE_MODEL (store); gtk_tree_view_set_model (view, prefs->language_model); renderer = gtk_cell_renderer_toggle_new (); |