summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/caja-file-management-properties.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index ef532d72..3db0d05b 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -726,35 +726,15 @@ bind_builder_bool (GtkBuilder *builder,
"active", G_SETTINGS_BIND_DEFAULT);
}
-static gboolean
-inverted_get_mapping (GValue *value,
- GVariant *variant,
- gpointer user_data)
-{
- g_value_set_boolean (value, !g_variant_get_boolean (variant));
- return TRUE;
-}
-
-static GVariant *
-inverted_set_mapping (const GValue *value,
- const GVariantType *expected_type,
- gpointer user_data)
-{
- return g_variant_new_boolean (!g_value_get_boolean (value));
-}
-
static void
bind_builder_bool_inverted (GtkBuilder *builder,
GSettings *settings,
const char *widget_name,
const char *prefs)
{
- g_settings_bind_with_mapping (settings, prefs,
+ g_settings_bind (settings, prefs,
gtk_builder_get_object (builder, widget_name),
- "active", G_SETTINGS_BIND_DEFAULT,
- inverted_get_mapping,
- inverted_set_mapping,
- NULL, NULL);
+ "active", G_SETTINGS_BIND_INVERT_BOOLEAN);
}
static gboolean