diff options
author | Stefano Karapetsas <[email protected]> | 2012-12-23 11:14:36 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-12-23 11:14:36 -0800 |
commit | 3ec2cb1ade8ed91ed472091adcc592485dc49f4d (patch) | |
tree | 122f234160898266040a89a6767871856bd607c9 /src/caja-file-management-properties.c | |
parent | 8379b1dc107c9e0daf31ef1b654c9ab44d9bac23 (diff) | |
parent | c598aa7e65d9e370c63f883acbbb6504044c2531 (diff) | |
download | caja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.bz2 caja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.xz |
Merge pull request #65 from jasmineaura/develop
Most of remaining deprecations, some cleanups, and a leak fix
Diffstat (limited to 'src/caja-file-management-properties.c')
-rw-r--r-- | src/caja-file-management-properties.c | 24 |
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 |