summaryrefslogtreecommitdiff
path: root/panels
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-09 23:11:31 +0200
committerBastien Nocera <hadess@hadess.net>2015-07-10 17:14:02 +0200
commitac59708d3f604be614306b802612bc66e40effee (patch)
tree8da1294b4bd519c01c0c962b2af4880da2ae16e3 /panels
parentfc2dc5a0463d43ea1ac6c203e2e476bfa14cae86 (diff)
downloadgnome-control-center-ac59708d3f604be614306b802612bc66e40effee.tar.gz
datetime: Fix incorrect sensitivity when permission is missing
When the permission is missing, we shouldn't make the rows sensitive. https://bugzilla.gnome.org/show_bug.cgi?id=709774
Diffstat (limited to 'panels')
-rw-r--r--panels/datetime/cc-datetime-panel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index c1a795e57..8c1221230 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -779,7 +779,7 @@ on_permission_changed (GPermission *permission,
CcDateTimePanelPrivate *priv = CC_DATE_TIME_PANEL (data)->priv;
gboolean allowed, auto_timezone, using_ntp;
- allowed = (priv->permission == NULL || g_permission_get_allowed (priv->permission));
+ 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")));
@@ -896,7 +896,7 @@ switch_to_row_transform_func (GBinding *binding,
gboolean allowed;
active = g_value_get_boolean (source_value);
- allowed = (priv->permission == NULL || g_permission_get_allowed (priv->permission));
+ allowed = (priv->permission != NULL && g_permission_get_allowed (priv->permission));
g_value_set_boolean (target_value, !active && allowed);