aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-02-12 07:55:56 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-02-12 07:55:56 +0000
commit73abdc0d336211b692701759b7017fcc2da9eb77 (patch)
treee12a3d43bfa0978383a33d6134782554c65bac13
parent716006d0ec63efad9ca5d36950db9179f173ef31 (diff)
compose_change_spell_lang_menu(): force selection of currently selected item to update compose->spell_lang.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2473 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--src/compose.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e2723eb..78a070cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-02-12
+ * src/compose.c: compose_change_spell_lang_menu(): force selection of
+ currently selected item to update compose->spell_lang.
+
+2010-02-12
+
* src/compose.c: Preserve PGP settings saving and loading drafts
(thanks to Antonio).
diff --git a/src/compose.c b/src/compose.c
index 84cd2a5f..f6a3b9c9 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -6016,6 +6016,7 @@ static void compose_set_spell_lang_menu(Compose *compose)
static void compose_change_spell_lang_menu(Compose *compose, const gchar *lang)
{
GtkWidget *menu;
+ GtkWidget *def_item = NULL;
GList *cur_item;
const gchar *dict;
@@ -6025,13 +6026,21 @@ static void compose_change_spell_lang_menu(Compose *compose, const gchar *lang)
menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(compose->spell_menu));
for (cur_item = GTK_MENU_SHELL(menu)->children; cur_item != NULL;
cur_item = cur_item->next) {
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(cur_item->data)))
+ def_item = GTK_WIDGET(cur_item->data);
dict = g_object_get_data(G_OBJECT(cur_item->data), "spell-lang");
if (dict && !g_ascii_strcasecmp(dict, lang)) {
gtk_check_menu_item_set_active
(GTK_CHECK_MENU_ITEM(cur_item->data), TRUE);
- break;
+ return;
}
}
+
+ if (def_item) {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(def_item),
+ TRUE);
+ compose_set_spell_lang_cb(def_item, compose);
+ }
}
#endif /* USE_GTKSPELL */