Commit 2822e04a authored by Rui Matos's avatar Rui Matos
Browse files

region: Fix setting the system language

We need to actually change the variable holding the system language so
that it gets applied.

https://bugzilla.gnome.org/show_bug.cgi?id=694922
parent 6154170b
......@@ -355,6 +355,21 @@ maybe_notify (CcRegionPanel *self,
static void set_localed_locale (CcRegionPanel *self);
static void
set_system_language (CcRegionPanel *self,
const gchar *language)
{
CcRegionPanelPrivate *priv = self->priv;
if (g_strcmp0 (language, priv->system_language) == 0)
return;
g_free (priv->system_language);
priv->system_language = g_strdup (language);
set_localed_locale (self);
}
static void
update_language (CcRegionPanel *self,
const gchar *language)
......@@ -362,15 +377,13 @@ update_language (CcRegionPanel *self,
CcRegionPanelPrivate *priv = self->priv;
if (priv->login) {
if (g_strcmp0 (language, priv->system_language) == 0)
return;
set_localed_locale (self);
set_system_language (self, language);
} else {
if (g_strcmp0 (language, priv->language) == 0)
return;
act_user_set_language (priv->user, language);
if (priv->login_auto_apply)
set_localed_locale (self);
set_system_language (self, language);
maybe_notify (self, LC_MESSAGES, language);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment