[gnome-color-manager] Ensure we remove the saved device by emitting a signal, rather than rely on the UI to do this



commit 12f80c7a51547e94e2672df3cf7bfc7c849cdb7a
Author: Richard Hughes <richard hughsie com>
Date:   Wed Dec 2 14:06:41 2009 +0000

    Ensure we remove the saved device by emitting a signal, rather than rely on the UI to do this

 src/gcm-client.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 9126d3a..55810b9 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -210,7 +210,14 @@ gcm_client_gudev_add_type (GcmClient *client, GUdevDevice *udev_device, GcmDevic
 	/* we might have a previous saved device with this ID, in which case nuke it */
 	device = gcm_client_get_device_by_id (client, id);
 	if (device != NULL) {
+		/* remove from the array */
 		g_ptr_array_remove (client->priv->array, device);
+
+		/* emit a signal */
+		egg_debug ("emit removed: %s", id);
+		g_signal_emit (client, signals[SIGNAL_REMOVED], 0, device);
+
+		/* unref our copy */
 		g_object_unref (device);
 	}
 



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