[gnome-control-center] user-accounts: fix language showing



commit 0173b88f99e1a0356fcfa5e1cd1e568dd3dbf6cf
Author: Ondrej Holy <oholy redhat com>
Date:   Fri May 30 13:02:00 2014 +0200

    user-accounts: fix language showing
    
    Wrong language is shown for user with unset language if we are
    switching between "Other accounts" and panel is locked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731272

 panels/user-accounts/um-user-panel.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index b86d66d..80c933c 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -702,8 +702,12 @@ show_user (ActUser *user, CcUserPanelPrivate *d)
         lang = g_strdup (act_user_get_language (user));
         if (!lang)
                 lang = cc_common_language_get_current_language ();
-        if (cc_common_language_get_iter_for_language (model, lang, &iter))
-          um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (widget), &iter);
+
+        if (cc_common_language_get_iter_for_language (model, lang, &iter)) {
+                um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (widget), &iter);
+        } else {
+                um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (widget), NULL);
+        }
         g_free (lang);
 
         /* Fingerprint: show when self, possible, and local account */


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