[gnome-control-center] datetime: Fix incorrect sensitivity when permission is missing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: Fix incorrect sensitivity when permission is missing
- Date: Fri, 10 Jul 2015 15:15:03 +0000 (UTC)
commit ac59708d3f604be614306b802612bc66e40effee
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 9 23:11:31 2013 +0200
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
panels/datetime/cc-datetime-panel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index c1a795e..8c12212 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]