GNOME Bugzilla – Bug 694922
Users' region and language settings should be applied system-wide when there's only one user
Last modified: 2013-04-12 14:54:18 UTC
When there's only one user, there's no conceptual difference between user settings and system settings: it's just "the device". In this case we should apply the user's settings to the system. If they change the display language, this should automatically be reflected in the login screen rather than having to do the extra work involved in apply their settings to the system. This change has the added advantage of meaning that we don't have to show the "Login Settings" button when there's only one user. (This is actually already the case with the new Region and Language settings design - it means that we don't currently have a way for someone to change the login screen options if there is only one user on the system.)
Indeed, with the current code in master it's impossible to change the system settings on a single user system. Auto-applying to the system will fix that. Let's see if we can manage to do that without throwing a policy-kit password dialog at the user...
It should check whether that single user is an admin or not, and offer the "login settings" tab otherwise.
checking for admin does not really tell you whether the action will or will not be allowed or whether a polkit dialog will pop up
we should do a non-interactive polkit check, and depending on the result: yes -> no button, apply automatically challenge -> show button no -> show button anyway, but display settings readonly (so people can learn about the systemwide settings)
Created attachment 241002 [details] [review] region: Apply user settings system-wide on single account systems On single account systems we don't show the login button but the user should still be able to set system-wide locale settings. We can simply export the user's own settings to the system in that case. -- (In reply to comment #4) > we should do a non-interactive polkit check, and depending on the result: The only way I found to do a non-interactive polkit check was to add these actions to the .rules file we ship which checks if the user is in the wheel unix group. Is there a better way?
Created attachment 241003 [details] [review] region: Fix setting the system language We need to actually change the variable holding the system language so that it gets applied. -- This is a brown paper bag fix for a bug I introduced shortly before 3.8.0.
Created attachment 241055 [details] [review] region: Apply user settings system-wide on single account systems -- * Added a fix for the case where the user manager object is already loaded, since it's a singleton used elsewhere, in which case the signal handler would never run.
Review of attachment 241003 [details] [review]: Looks good.
Review of attachment 241055 [details] [review]: Rest looks fine. ::: panels/region/cc-region-panel.c @@ +1680,3 @@ + set_login_button_visibility (self); + else + g_signal_connect_swapped (priv->user_manager, "notify::is-loaded", You need to check that the is-loaded is actually TRUE though. We might get notify:: of properties changing even if it didn't really change.
Created attachment 241344 [details] [review] region: Apply user settings system-wide on single account systems -- Now checking that the property really changed inside the handler.
Review of attachment 241344 [details] [review]: Looks good.
Attachment 241003 [details] pushed as 29e96e4 - region: Fix setting the system language Attachment 241344 [details] pushed as 98adcbf - region: Apply user settings system-wide on single account systems