2008-09-16 [colin] 3.5.0cvs110
[claws.git] / src / gtk / gtkaspell.c
index 2c9fea598091a2e62e524cefe01d4acfeb2f17c9..2870b8ad1c0775bfe99b2a620f12ace9a5d7ab9f 100644 (file)
@@ -393,6 +393,9 @@ GtkAspell *gtkaspell_new(const gchar *dictionary,
                dict->dictname = g_strdup(dictionary);
        }
 
+       if (strchr(dictionary, '-')) {
+               *(strchr(dictionary, '-')) = '\0';
+       }
        gtkaspeller    = gtkaspeller_new(dict); 
        dictionary_delete(dict);
 
@@ -418,6 +421,9 @@ GtkAspell *gtkaspell_new(const gchar *dictionary,
                        alt_dict->fullname = g_strdup(alt_dictionary);
                        alt_dict->dictname = g_strdup(alt_dictionary);
                }
+               if (strchr(alt_dictionary, '-')) {
+                       *(strchr(alt_dictionary, '-')) = '\0';
+               }
 
                alt_gtkaspeller    = gtkaspeller_new(alt_dict);
                dictionary_delete(alt_dict);
@@ -2055,6 +2061,10 @@ gboolean gtkaspell_change_dict(GtkAspell *gtkaspell, const gchar *dictionary,
                dict->dictname = g_strdup(dictionary);
        }
 
+       if (strchr(dictionary, '-')) {
+               *(strchr(dictionary, '-')) = '\0';
+       }
+
        gtkaspeller = gtkaspeller_new(dict);
 
        if (!gtkaspeller) {
@@ -2101,6 +2111,10 @@ gboolean gtkaspell_change_alt_dict(GtkAspell *gtkaspell, const gchar *alt_dictio
                dict->dictname = g_strdup(alt_dictionary);
        }
 
+       if (strchr(alt_dictionary, '-')) {
+               *(strchr(alt_dictionary, '-')) = '\0';
+       }
+
        gtkaspeller = gtkaspeller_new(dict);
 
        if (!gtkaspeller) {