[gnome-initial-setup] language: Don't set locale when adding languages
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] language: Don't set locale when adding languages
- Date: Tue, 20 Nov 2012 00:08:58 +0000 (UTC)
commit 6150dc3c3febf829f465df7a1d622b67e5909fc6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Nov 19 18:53:54 2012 -0500
language: Don't set locale when adding languages
This just turns things into a giant mess
.../pages/language/gis-language-page.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-language-page.c b/gnome-initial-setup/pages/language/gis-language-page.c
index 5ddf1d7..2b64a5d 100644
--- a/gnome-initial-setup/pages/language/gis-language-page.c
+++ b/gnome-initial-setup/pages/language/gis-language-page.c
@@ -60,6 +60,7 @@ struct _GisLanguagePagePrivate
GtkWidget *page;
GtkWidget *filter_entry;
GtkWidget *language_list;
+ gboolean adding_languages;
};
#define OBJ(type,name) ((type)gtk_builder_get_object(GIS_PAGE (page)->builder,(name)))
@@ -118,6 +119,8 @@ add_languages (GisLanguagePage *page,
GisLanguagePagePrivate *priv = page->priv;
char *orig_locale_id = cc_common_language_get_current_language ();
+ priv->adding_languages = TRUE;
+
while (*locale_ids) {
gchar *locale_id;
gchar *locale_name;
@@ -150,6 +153,8 @@ add_languages (GisLanguagePage *page,
egg_list_box_select_child (EGG_LIST_BOX (priv->language_list), widget);
}
+ priv->adding_languages = FALSE;
+
setlocale (LC_MESSAGES, orig_locale_id);
g_free (orig_locale_id);
}
@@ -201,6 +206,9 @@ selection_changed (EggListBox *box,
{
gchar *new_locale_id;
+ if (page->priv->adding_languages)
+ return;
+
if (child == NULL)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]