[gnome-control-center] region: Use log out button in future language
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Use log out button in future language
- Date: Fri, 23 Nov 2012 17:52:56 +0000 (UTC)
commit 1cfc4693c43c5152ca8deb21279fb49dff9e308d
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 26 17:05:15 2012 +0200
region: Use log out button in future language
https://bugzilla.gnome.org/show_bug.cgi?id=647373
panels/region/gnome-region-panel-lang.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/panels/region/gnome-region-panel-lang.c b/panels/region/gnome-region-panel-lang.c
index 7e92f04..f63756f 100644
--- a/panels/region/gnome-region-panel-lang.c
+++ b/panels/region/gnome-region-panel-lang.c
@@ -87,6 +87,7 @@ selection_changed (GtkTreeSelection *selection,
GError *error = NULL;
char *object_path;
GtkWidget *widget;
+ char *old_lang;
if (gtk_tree_selection_get_selected (selection, &model, &iter) == FALSE) {
g_warning ("No selected languages, this shouldn't happen");
@@ -155,9 +156,14 @@ selection_changed (GtkTreeSelection *selection,
formats_update_language (builder, locale);
system_update_language (builder, locale);
- /* And done, ask for logout */
- //FIXME we should only do that if it wasn't the original language we started the session with
+ /* Offer log out in the new language */
widget = (GtkWidget *)gtk_builder_get_object (builder, "logout_button");
+ old_lang = g_strdup (setlocale (LC_MESSAGES, NULL));
+ setlocale (LC_MESSAGES, locale);
+ gtk_button_set_label (GTK_BUTTON (widget), _("Log out for changes to take effect"));
+ setlocale (LC_MESSAGES, old_lang);
+ g_free (old_lang);
+
gtk_widget_show (widget);
bail:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]