diff options
author | Rui Matos <tiagomatos@gmail.com> | 2015-08-19 15:50:29 +0200 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2015-08-25 13:31:13 +0200 |
commit | f31897f7a3ad9fb1a1e144064bfc8611f598e218 (patch) | |
tree | 4d527487c0fe92a129fb9bfe5c5b88a008babcc7 | |
parent | e58197e2491b1f7ee2d49ebf00ca90aeb08b4e8e (diff) | |
download | gnome-control-center-f31897f7a3ad9fb1a1e144064bfc8611f598e218.tar.gz |
region: If language isn't set in AccountsService, show current locale
For newly created user accounts, AccountsService won't have the
language property set. Instead of defaulting to en_US in that case,
let's fallback to the current locale.
https://bugzilla.gnome.org/show_bug.cgi?id=753828
-rw-r--r-- | panels/region/cc-region-panel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c index e89268bc2..0955dd730 100644 --- a/panels/region/cc-region-panel.c +++ b/panels/region/cc-region-panel.c @@ -614,11 +614,12 @@ static void update_language_from_user (CcRegionPanel *self) { CcRegionPanelPrivate *priv = self->priv; - const gchar *language; + const gchar *language = NULL; if (act_user_is_loaded (priv->user)) language = act_user_get_language (priv->user); - else + + if (language == NULL || *language == '\0') language = setlocale (LC_MESSAGES, NULL); g_free (priv->language); |