Avoid using locales without language names.

Quick and dirty fix for not using all the iso-codes resources for
finding a suitable language name for a locale.
This commit is contained in:
Yanko Kaneti 2011-02-03 20:17:34 +02:00 committed by Bastien Nocera
parent 7f78615272
commit 7cfa641feb

View file

@ -206,6 +206,11 @@ cc_common_language_add_available_languages (GtkListStore *store,
}
language = gdm_get_language_from_name (name, NULL);
if (!language) {
g_debug ("Ignoring '%s' as a locale, because we couldn't figure the language name", name);
g_free (name);
continue;
}
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, LOCALE_COL, name, DISPLAY_LOCALE_COL, language, -1);