GNOME Bugzilla – Bug 707252
datetime: Show the automatic timezone switch
Last modified: 2013-09-02 20:08:04 UTC
Automatic time zone updating is last major missing piece from the Date & Time redesign. The backend in gnome-settings-daemon is now functional, so we can finally expose the option in the control center UI. http://wiki.gnome.org/Design/SystemSettings/DateAndTime#Guidelines (Sorry, I got a bit carried away and cleaned up some surrounding code as well.)
Created attachment 253793 [details] [review] datetime: Rename settings to clock_settings
Created attachment 253794 [details] [review] datetime: Exit early if the timedate1 service isn't available We cannot meaningfully change (or display) any Date & Time system settings without the timedate1 DBus service, so just exit early.
Created attachment 253795 [details] [review] datetime: Move polkit initialization earlier ... so that in the following commit, we can rely on the permissions being available. While at this, also create a DATETIME_PERMISSION for the PolicyKit action ID at the top of the file.
Created attachment 253796 [details] [review] datetime: Use GObject property binding for the NTP switch This makes it possible to remove the code for manually keeping the NTP switch and the timedated1 DBus proxy properties in sync, and also makes it easy to share code with the automatic timezone switch.
Created attachment 253797 [details] [review] datetime: Show the automatic timezone switch The backend in gnome-settings-daemon is now functional, so we can expose the option in the UI.
Review of attachment 253793 [details] [review]: ack, could be pushed as trivial fix.
Review of attachment 253794 [details] [review]: ACK ::: panels/datetime/cc-datetime-panel.c @@ +600,3 @@ const gchar *timezone; + timezone = timedate1_get_timezone (self->priv->dtm); btw, would be nice to change the name of 'dtm' field. Unknown abbreviations make up for unreadable code.
Review of attachment 253795 [details] [review]: ACK (depending on the resolution of following commit.
Review of attachment 253796 [details] [review]: Looks good
Review of attachment 253797 [details] [review]: Looks good apart from these nitpicks ::: panels/datetime/cc-datetime-panel.c @@ +748,3 @@ allowed = (priv->permission == NULL || g_permission_get_allowed (priv->permission)); using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch"))); + auto_timezone = gtk_switch_get_active (GTK_SWITCH (W("auto_timezone_switch"))); Would have been nice if all widgets in UI file used the same format for naming, either '-' or '_'. @@ -747,1 @@ - /* All the widgets but the lock button and the 24h setting */ Seems very irrelevant
> - /* All the widgets but the lock button and the 24h setting */ > > Seems very irrelevant Ah yes, I misread what the comment said and thought it's obsolete now; I've added it back.
Thanks for the reviews! Attachment 253793 [details] pushed as a709ae4 - datetime: Rename settings to clock_settings Attachment 253794 [details] pushed as d7847fe - datetime: Exit early if the timedate1 service isn't available Attachment 253795 [details] pushed as 853fb8c - datetime: Move polkit initialization earlier Attachment 253796 [details] pushed as 88f4c30 - datetime: Use GObject property binding for the NTP switch Attachment 253797 [details] pushed as c68f9ec - datetime: Show the automatic timezone switch