[anjuta] sourceview: connect settings notifications with g_signal_connect_object().



commit 112a1832ffddf711b578eaa38c407424b7442db3
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Jan 17 10:31:40 2013 +0100

    sourceview: connect settings notifications with g_signal_connect_object().
    
    So that the signals get disconnected automatically when the Sourceview
    gets finalized. This is needed due to the fact that the Sourceview is not the
    only thing that owns a reference to the settings object.

 plugins/sourceview/sourceview-prefs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/sourceview/sourceview-prefs.c b/plugins/sourceview/sourceview-prefs.c
index 83f0792..1c4da58 100644
--- a/plugins/sourceview/sourceview-prefs.c
+++ b/plugins/sourceview/sourceview-prefs.c
@@ -24,7 +24,7 @@
 #include <libanjuta/interfaces/ianjuta-editor.h>
 
 #define REGISTER_NOTIFY(settings, key, func) \
-	g_signal_connect (settings, "changed::" key, G_CALLBACK(func), sv);
+	g_signal_connect_object (settings, "changed::" key, G_CALLBACK(func), sv, 0);
 
 #define ANJUTA_PREF_SCHEMA_PREFIX "org.gnome.anjuta."
 #define PREF_SCHEMA "org.gnome.anjuta.plugins.sourceview"



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