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
This commit is contained in:
parent
fc2dc5a046
commit
ac59708d3f
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue