2008-09-17 [colin] 3.5.0cvs112
[claws.git] / src / gtk / gtkaspell.c
index 2c9fea598091a2e62e524cefe01d4acfeb2f17c9..1f62bc34eccd0ba1a52096754c3af7e9803647fe 100644 (file)
@@ -393,6 +393,10 @@ GtkAspell *gtkaspell_new(const gchar *dictionary,
                dict->dictname = g_strdup(dictionary);
        }
 
+       if (strchr(dict->fullname, '-')) {
+               *(strchr(dict->fullname, '-')) = '\0';
+               *(strchr(dict->dictname, '-')) = '\0';
+       }
        gtkaspeller    = gtkaspeller_new(dict); 
        dictionary_delete(dict);
 
@@ -418,6 +422,10 @@ GtkAspell *gtkaspell_new(const gchar *dictionary,
                        alt_dict->fullname = g_strdup(alt_dictionary);
                        alt_dict->dictname = g_strdup(alt_dictionary);
                }
+               if (strchr(alt_dict->fullname, '-')) {
+                       *(strchr(alt_dict->fullname, '-')) = '\0';
+                       *(strchr(alt_dict->dictname, '-')) = '\0';
+               }
 
                alt_gtkaspeller    = gtkaspeller_new(alt_dict);
                dictionary_delete(alt_dict);
@@ -2055,6 +2063,11 @@ gboolean gtkaspell_change_dict(GtkAspell *gtkaspell, const gchar *dictionary,
                dict->dictname = g_strdup(dictionary);
        }
 
+       if (strchr(dict->fullname, '-')) {
+               *(strchr(dict->fullname, '-')) = '\0';
+               *(strchr(dict->dictname, '-')) = '\0';
+       }
+
        gtkaspeller = gtkaspeller_new(dict);
 
        if (!gtkaspeller) {
@@ -2101,6 +2114,11 @@ gboolean gtkaspell_change_alt_dict(GtkAspell *gtkaspell, const gchar *alt_dictio
                dict->dictname = g_strdup(alt_dictionary);
        }
 
+       if (strchr(dict->fullname, '-')) {
+               *(strchr(dict->fullname, '-')) = '\0';
+               *(strchr(dict->dictname, '-')) = '\0';
+       }
+
        gtkaspeller = gtkaspeller_new(dict);
 
        if (!gtkaspeller) {