[gnome-control-center] user: Prepopulate the language combo



commit daf2dae1ff1ab9a39d650f04de089edd53a70fc2
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 20 01:43:10 2011 -0400

    user: Prepopulate the language combo
    
    Add a small set of major languages to the combobox. This covers
    the 80% case and makes the list look less empty.

 panels/user-accounts/um-language-dialog.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/panels/user-accounts/um-language-dialog.c b/panels/user-accounts/um-language-dialog.c
index 72217a0..945eb72 100644
--- a/panels/user-accounts/um-language-dialog.c
+++ b/panels/user-accounts/um-language-dialog.c
@@ -84,6 +84,13 @@ new_ht_for_user_languages (void)
 
         ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
+	/* Add some common languages here */
+	g_hash_table_insert (ht, g_strdup ("en_US.utf8"), g_strdup (_("English"))); 
+	g_hash_table_insert (ht, g_strdup ("de_DE.utf8"), g_strdup (_("German"))); 
+	g_hash_table_insert (ht, g_strdup ("fr_FR.utf8"), g_strdup (_("French"))); 
+	g_hash_table_insert (ht, g_strdup ("es_ES.utf8"), g_strdup (_("Spanish"))); 
+	g_hash_table_insert (ht, g_strdup ("zh_CN.utf8"), g_strdup (_("Chinese"))); 
+
         manager = um_user_manager_ref_default ();
         users = um_user_manager_list_users (manager);
         g_object_unref (manager);
@@ -141,7 +148,6 @@ languages_foreach_cb (gpointer key,
 			    -1);
 }
 
-
 void
 um_add_user_languages (GtkTreeModel *model)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]