user-accounts: Remove implicit language setting

The commit targets to remove the behavior of implicit set of the language
when the user panel is clicked in g-c-c.

The behavior looks like introduced to partly resolve the bug [0] when the
gnome-initial-setup somehow did not set the language correctly. However the
gnome-initial-setup is able to handle the language nicely now.

Furthermore, the current user could not see its own language chooser in the
g-c-c User panel, instead the Region&Language panel is supposed to do the
task. And the Region&Language panel has already got a default locale set [1]
[2]. So even if the language is not set in the key file, it is less an issue
nowadays than when the issue was originally described in [0].

[0] https://bugzilla.gnome.org/show_bug.cgi?id=737216
[1] https://bugzilla.gnome.org/show_bug.cgi?id=767065
[2] 5e2ed8e

https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/161
This commit is contained in:
Yifan J 2018-08-15 10:06:50 +08:00 committed by Ondrej Holy
parent cfe6c6a214
commit a1066a27e0

View file

@ -837,10 +837,6 @@ show_user (ActUser *user, CcUserPanel *self)
name = NULL;
lang = g_strdup (act_user_get_language (user));
if ((!lang || *lang == '\0') && act_user_get_uid (user) == getuid ()) {
lang = cc_common_language_get_current_language ();
act_user_set_language (user, lang);
}
if (lang && *lang != '\0') {
name = gnome_get_language_from_locale (lang, NULL);