[gnome-control-center/gnome-3-0] datetime: Fix date sensitivity on permission changes
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-0] datetime: Fix date sensitivity on permission changes
- Date: Thu, 9 Jun 2011 22:24:36 +0000 (UTC)
commit 6d92bb08913472099054aad3f0f9c1d3a78c3e6a
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 10 00:01:40 2011 +0200
datetime: Fix date sensitivity on permission changes
Setting the date manually should be disabled when using NTP, but
the "Network Time" setting is not taken into account when updating
sensitivities after permission changes. As a result, the date is
always editable after unlocking the panel - to fix, take the NTP
setting into account on permission changes.
https://bugzilla.gnome.org/show_bug.cgi?id=652240
panels/datetime/cc-datetime-panel.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index dc25048..36e8338 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -754,15 +754,16 @@ on_permission_changed (GPermission *permission,
gpointer data)
{
CcDateTimePanelPrivate *priv = CC_DATE_TIME_PANEL (data)->priv;
- gboolean allowed;
+ gboolean allowed, using_ntp;
allowed = g_permission_get_allowed (permission);
+ using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch")));
/* All the widgets but the lock button and the 24h setting */
gtk_widget_set_sensitive (W("map-vbox"), allowed);
gtk_widget_set_sensitive (W("hbox2"), allowed);
gtk_widget_set_sensitive (W("alignment2"), allowed);
- gtk_widget_set_sensitive (W("table1"), allowed);
+ gtk_widget_set_sensitive (W("table1"), allowed && !using_ntp);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]