diff -x '*~' -uNr gnome-spell-1.0.7/gnome-spell/control.c gnome-spell-1.0.7.patched/gnome-spell/control.c --- gnome-spell-1.0.7/gnome-spell/control.c 2006-01-20 00:37:50.000000000 +0100 +++ gnome-spell-1.0.7.patched/gnome-spell/control.c 2006-03-31 20:10:10.000000000 +0200 @@ -23,19 +23,19 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include +#include #include #include #include -#include #include #include #include @@ -67,7 +67,6 @@ GtkWidget *button_back; GtkWidget *combo_add; - GtkWidget *entry_add; GList *abbrevs; GList *langs; } SpellControlData; @@ -140,7 +139,7 @@ } static void -set_entry_add (SpellControlData *cd) +set_combo_add (SpellControlData *cd) { CORBA_sequence_GNOME_Spell_Language *language_seq; @@ -153,12 +152,16 @@ abbrevs_langs_clear (cd); for (i = 0, n = 1; i < language_seq->_length; i++) { + gchar *lang; + if (strstr (cd->language, language_seq->_buffer[i].abbreviation)) { - cd->langs = g_list_append (cd->langs, g_strdup (_(language_seq->_buffer[i].name))); + lang = g_strdup (_(language_seq->_buffer[i].name)); + cd->langs = g_list_append (cd->langs, lang); + gtk_combo_box_append_text (GTK_COMBO_BOX (cd->combo_add), lang); cd->abbrevs = g_list_append (cd->abbrevs, g_strdup (language_seq->_buffer[i].abbreviation)); } } - gtk_combo_set_popdown_strings (GTK_COMBO (cd->combo_add), cd->langs); + gtk_combo_box_set_active (GTK_COMBO_BOX (cd->combo_add), 0); } CORBA_exception_free (&ev); } @@ -166,15 +169,11 @@ static gchar * get_abbrev (SpellControlData *cd) { - GList *l, *a; - const gchar *text; - - text = gtk_entry_get_text (GTK_ENTRY (cd->entry_add)); + gint idx; - if (text) - for (l = cd->langs, a = cd->abbrevs; l && a; l = l->next, a = a->next) - if (!strcmp (text, l->data)) - return (gchar *) a->data; + idx = gtk_combo_box_get_active (GTK_COMBO_BOX (cd->combo_add)); + if (idx >= 0) + return g_list_nth_data (cd->abbrevs, idx); return NULL; } @@ -268,7 +267,7 @@ GNOME_Spell_Dictionary_setLanguage (cd->dict, cd->language, &ev); CORBA_exception_free (&ev); - set_entry_add (cd); + set_combo_add (cd); } static void @@ -344,8 +343,9 @@ cd->button_ignore = glade_xml_get_widget (xml, "button_ignore"); cd->button_skip = glade_xml_get_widget (xml, "button_skip"); cd->button_back = glade_xml_get_widget (xml, "button_back"); - cd->combo_add = glade_xml_get_widget (xml, "combo_add"); - cd->entry_add = glade_xml_get_widget (xml, "entry_add"); + cd->combo_add = gtk_combo_box_new_text (); + gtk_widget_show (cd->combo_add); + gtk_table_attach_defaults (GTK_TABLE (table), cd->combo_add, 0, 1, 3, 4); g_signal_connect (cd->button_replace, "clicked", G_CALLBACK (clicked_replace), cd); g_signal_connect (cd->button_add, "clicked", G_CALLBACK (clicked_add), cd); diff -x '*~' -uNr gnome-spell-1.0.7/gnome-spell/spell-checker.glade gnome-spell-1.0.7.patched/gnome-spell/spell-checker.glade --- gnome-spell-1.0.7/gnome-spell/spell-checker.glade 2004-08-25 11:47:58.000000000 +0200 +++ gnome-spell-1.0.7.patched/gnome-spell/spell-checker.glade 2006-03-31 20:05:32.000000000 +0200 @@ -2,6 +2,7 @@ + True @@ -11,6 +12,11 @@ False True False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST True @@ -32,6 +38,7 @@ Replace True GTK_RELIEF_NORMAL + True 0 @@ -44,6 +51,7 @@ Remember True GTK_RELIEF_NORMAL + True 0 @@ -56,6 +64,7 @@ Ignore True GTK_RELIEF_NORMAL + True 0 @@ -68,6 +77,7 @@ gtk-go-forward True GTK_RELIEF_NORMAL + True 0 @@ -80,6 +90,7 @@ gtk-close True GTK_RELIEF_NORMAL + True 0 @@ -264,6 +275,7 @@ D_ictionaries True GTK_RELIEF_NORMAL + True @@ -274,6 +286,7 @@ _Describe True GTK_RELIEF_NORMAL + True @@ -284,6 +297,7 @@ Describe _all True GTK_RELIEF_NORMAL + True @@ -295,6 +309,7 @@ _Help True GTK_RELIEF_NORMAL + True @@ -362,6 +377,11 @@ False True False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST @@ -471,6 +491,7 @@ True True GTK_RELIEF_NORMAL + True @@ -479,6 +500,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 @@ -536,6 +561,7 @@ True True GTK_RELIEF_NORMAL + True @@ -544,6 +570,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 @@ -601,6 +631,7 @@ True True GTK_RELIEF_NORMAL + True @@ -609,6 +640,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 @@ -666,6 +701,7 @@ True True GTK_RELIEF_NORMAL + True @@ -674,6 +710,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 @@ -748,6 +788,7 @@ True True GTK_RELIEF_NORMAL + True @@ -756,6 +797,10 @@ 0.5 0 0 + 0 + 0 + 0 + 0 @@ -814,45 +859,6 @@ - - - - True - True - False - True - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - - - - 0 - 1 - 3 - 4 - - -