[gnome-color-manager] trivial: Ensure we disconnect the 'changed' signal from GcmDevice in GcmClient



commit d7518ac913c69b238b3c5016c17ff7e9aadd6c72
Author: Richard Hughes <richard hughsie com>
Date:   Thu Mar 25 20:27:17 2010 +0000

    trivial: Ensure we disconnect the 'changed' signal from GcmDevice in GcmClient

 src/gcm-client.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 89dfe89..812c32c 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -1308,6 +1308,14 @@ gcm_client_finalize (GObject *object)
 {
 	GcmClient *client = GCM_CLIENT (object);
 	GcmClientPrivate *priv = client->priv;
+	GcmDevice *device;
+	guint i;
+
+	/* do not respond to changed events */
+	for (i=0; i<priv->array->len; i++) {
+		device = g_ptr_array_index (priv->array, i);
+		g_signal_handlers_disconnect_by_func (device, G_CALLBACK (gcm_client_device_changed_cb), client);
+	}
 
 	g_free (priv->display_name);
 	g_ptr_array_unref (priv->array);



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