We cannot simply set the state/active property of the switch without
also triggering the notify:: or state-set signals at the same time. As
such, we need to block the "set-state" handler when we update the
"state" of the switch.
Also, while at it, change the switch to react to "state-set" and only
update the "state" after we received the response from the system.
Fixes: #1299
When the user disables the use of location services in the privacy
panel, then the timezone will never be updated automatically. Automatic
timezone may still be enabled though, so we need to allow the user to
change the timezone when location services are disabled or when
automatic timezone updating is disabled.
Only the date time panel used it, all other panels add their own shell using
cc_shell_embed_widget_in_header which was added after the date time panel was
written. Update the date time panel to use this method.
The following warning occurs when the datetime panel is created:
(gnome-control-center:3173): GLib-GIO-CRITICAL **: 09:18:38.531: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed
This is due to the callback being called before the settings object is created
Automatic timezone does not work if location sharing is disabled in privacy.
Grays out automatic timezone setting if location sharing is disabled in privacy
settings. Enable automatic timezone seting if location sharing is enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=788714
As changing the time can have security implications, such as expiring
passwords, while changing the timezone doesn't, it's not unusual to
have a setup where org.freedesktop.timedate1.set-timezone is allowed
while other time-related actions aren't.
Therefore, if org.freedesktop.timedate1.set-timezone is allowed, there's
no reason to require that the user unlocks the panel to enable them to
change the timezone.
https://bugzilla.gnome.org/show_bug.cgi?id=646185
If the system does not support NTP (as determined by the presence of an
NTP unit in /usr/lib/systemd/ntp-units.d), the Automatic Date & Time row
is intended to be hidden. We respond to changes to timedated's CanNTP
property, but we never account for the initial state of the property,
so we wind up displaying the Automatic Date & Time row even though the
switch is guaranteed to be broken.
Check CanNTP when initializing the panel to fix this.
https://bugzilla.gnome.org/show_bug.cgi?id=732021
GTK+ now uses a 12h/24h setting in the org.gtk.Settings.FileChooser
schema to switch the time display in the file chooser. Set this
to be in sync with the global time format preference we have.
https://bugzilla.gnome.org/show_bug.cgi?id=722942
This caused criticals when on_permission_changed callback tried to
access priv->datetime_dialog or priv->timezone_dialog before they had
been set up.
Another attempt at fixing the leak in the following patch.
This reverts commit 545c886543.
https://bugzilla.gnome.org/show_bug.cgi?id=709443
Instead of hardcoding the accessible name as "Switch between AM and
PM.", set it to "AM" or "PM" depending on which label the stack switcher
is currently showing.
https://bugzilla.gnome.org/show_bug.cgi?id=708219
Use new %:::z format string to display timezone offset in a slightly
nicer way. This is also needed for consistency with the timezone
notifications from gnome-settings-daemon.
Also bump glib dependency to 2.37.7 for the new modifier.
https://bugzilla.gnome.org/show_bug.cgi?id=707253
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.
https://bugzilla.gnome.org/show_bug.cgi?id=707252
... 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.
https://bugzilla.gnome.org/show_bug.cgi?id=707252
... and add translator comments explainings what they do. The RTL
languages are likely going to want to show them in a different order.
We should eventually move to just using GnomeWallClock and/or
g_date_time_format with %c that already have translated the time format
strings. However, in case this doesn't make it in time for 3.10, mark
the current strings in g-c-c as translatable to get some translation
coverage.
https://bugzilla.gnome.org/show_bug.cgi?id=694985
... using the text bubble API from the previous commit. We're currently
displaying the time zone abbreviation, UTC offset, city and country
name, and the current time.
https://bugzilla.gnome.org/show_bug.cgi?id=694985