summaryrefslogtreecommitdiff
path: root/panels/common
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-02-23 23:43:16 -0500
committerMatthias Clasen <mclasen@redhat.com>2011-02-23 23:43:16 -0500
commit3be36e735b5b6ae6654d20326b22ab8fd3fd2494 (patch)
tree4ba7163b1f8f0510a58aaf09e69b57356f125e77 /panels/common
parenta13cf931a9bb49f612104b4e4fd08a6c439fc147 (diff)
downloadgnome-control-center-3be36e735b5b6ae6654d20326b22ab8fd3fd2494.tar.gz
Drop the sync language loading code
All users have been ported to use the async variant.
Diffstat (limited to 'panels/common')
-rw-r--r--panels/common/cc-common-language.c45
-rw-r--r--panels/common/cc-common-language.h6
2 files changed, 4 insertions, 47 deletions
diff --git a/panels/common/cc-common-language.c b/panels/common/cc-common-language.c
index f15be6002..aab585156 100644
--- a/panels/common/cc-common-language.c
+++ b/panels/common/cc-common-language.c
@@ -181,47 +181,6 @@ cc_common_language_has_font (const gchar *locale)
return is_displayable;
}
-void
-cc_common_language_add_available_languages (GtkListStore *store,
- GHashTable *user_langs)
-{
- char **languages;
- int i;
- char *name;
- char *language;
- GtkTreeIter iter;
-
- languages = gdm_get_all_language_names ();
-
- for (i = 0; languages[i] != NULL; i++) {
- name = gdm_normalize_language_name (languages[i]);
- if (g_hash_table_lookup (user_langs, name) != NULL) {
- g_free (name);
- continue;
- }
-
- if (!cc_common_language_has_font (languages[i])) {
- g_free (name);
- continue;
- }
-
- 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);
-
- g_free (name);
- g_free (language);
- }
-
- g_strfreev (languages);
-}
-
typedef struct
{
GtkListStore *store;
@@ -284,8 +243,8 @@ add_one_language (gpointer d)
}
guint
-cc_common_language_add_available_languages_async (GtkListStore *store,
- GHashTable *user_langs)
+cc_common_language_add_available_languages (GtkListStore *store,
+ GHashTable *user_langs)
{
AsyncLangData *data;
diff --git a/panels/common/cc-common-language.h b/panels/common/cc-common-language.h
index bc1cabad7..be6403760 100644
--- a/panels/common/cc-common-language.h
+++ b/panels/common/cc-common-language.h
@@ -37,10 +37,8 @@ enum {
gboolean cc_common_language_get_iter_for_language (GtkTreeModel *model,
const gchar *lang,
GtkTreeIter *iter);
-void cc_common_language_add_available_languages (GtkListStore *store,
- GHashTable *user_langs);
-guint cc_common_language_add_available_languages_async (GtkListStore *store,
- GHashTable *user_langs);
+guint cc_common_language_add_available_languages (GtkListStore *store,
+ GHashTable *user_langs);
gboolean cc_common_language_has_font (const gchar *locale);
gchar *cc_common_language_get_current_language (void);