[glib] Fix binding between writability of key and sensitivity of a widget



commit 5b4189fc42afa697b7f13c38d9d6b441d731ed11
Author: Vincent Untz <vuntz gnome org>
Date:   Thu May 6 12:45:37 2010 +0200

    Fix binding between writability of key and sensitivity of a widget
    
    We were not setting the key correctly, result in usage of invalid keys.
    
    Bug 617788.

 gio/gsettings.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 801f570..fc98176 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -1449,6 +1449,8 @@ g_settings_writable_binding_free (gpointer data)
 
   g_signal_handler_disconnect (binding->settings, binding->handler_id);
   g_object_unref (binding->settings);
+  g_free (binding->key);
+  g_slice_free (GSettingsWritableBinding, binding);
 }
 
 static void
@@ -1529,6 +1531,7 @@ g_settings_bind_writable (GSettings   *settings,
   binding = g_slice_new (GSettingsWritableBinding);
   binding->settings = g_object_ref (settings);
   binding->object = object;
+  binding->key = g_strdup (key);
   binding->property = g_intern_string (property);
   binding->inverted = inverted;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]