[gnome-color-manager] trivial: remove the profile from the list before we emit the signal to avoid clients having to check



commit 09ce8458cb07c7486861339627bb9390caa899c3
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 7 18:51:13 2010 +0000

    trivial: remove the profile from the list before we emit the signal to avoid clients having to check filename for NULL

 src/gcm-profile-store.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-profile-store.c b/src/gcm-profile-store.c
index a30a536..30f8822 100644
--- a/src/gcm-profile-store.c
+++ b/src/gcm-profile-store.c
@@ -153,13 +153,14 @@ gcm_profile_store_notify_filename_cb (GcmProfile *profile, GParamSpec *pspec, Gc
 		      "description", &description,
 		      NULL);
 
-	/* emit a signal */
-	egg_debug ("emit removed: %s", description);
-	g_signal_emit (profile_store, signals[SIGNAL_REMOVED], 0, profile);
-
 	/* remove from list */
 	g_ptr_array_remove (priv->profile_array, profile);
 
+	/* emit a signal */
+	egg_debug ("emit removed (and changed): %s", description);
+	g_signal_emit (profile_store, signals[SIGNAL_REMOVED], 0, profile);
+	g_signal_emit (profile_store, signals[SIGNAL_CHANGED], 0);
+
 	g_free (description);
 }
 



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