[gnome-control-center] 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] datetime: Fix date sensitivity on permission changes
- Date: Thu, 9 Jun 2011 22:25:55 +0000 (UTC)
commit ee73a6cf2b52648379d5bb410212e214bc9371ca
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 ac9c735..5863959 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -834,15 +834,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]