[epiphany/wip/gtkaction-to-gaction: 3/6] lockdown: Remove unnecessary if-else
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/gtkaction-to-gaction: 3/6] lockdown: Remove unnecessary if-else
- Date: Thu, 28 Jul 2016 11:27:07 +0000 (UTC)
commit 57d220d8f5684a36d46863d0ee4b5198c68ac8a2
Author: Iulian Radu <iulian radu67 gmail com>
Date: Sat Jul 23 22:30:23 2016 +0300
lockdown: Remove unnecessary if-else
src/ephy-lockdown.c | 27 ++++++++++-----------------
1 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index c0d2b7a..171919b 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -148,23 +148,16 @@ bind_settings_and_actions (GSettings *settings,
action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
actions[i].action);
- if (g_strcmp0 (actions[i].prop, "visible") == 0) {
- g_settings_bind (settings, actions[i].key,
- action, actions[i].prop,
- G_SETTINGS_BIND_GET |
- G_SETTINGS_BIND_INVERT_BOOLEAN);
- } else {
- /* We need a custom get_mapping for 'enabled'
- * properties, see usage of
- * ephy_action_change_sensitivity_flags in
- * ephy-window.c. */
- g_settings_bind_with_mapping (settings, actions[i].key,
- action, actions[i].prop,
- G_SETTINGS_BIND_GET,
- sensitive_get_mapping,
- NULL,
- action, NULL);
- }
+ /* We need a custom get_mapping for 'enabled'
+ * properties, see usage of
+ * ephy_action_change_sensitivity_flags in
+ * ephy-window.c. */
+ g_settings_bind_with_mapping (settings, actions[i].key,
+ action, actions[i].prop,
+ G_SETTINGS_BIND_GET,
+ sensitive_get_mapping,
+ NULL,
+ action, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]