[gnome-photos/gnome-3-16] base-model: Fix the lifetime of the signal handlers
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-16] base-model: Fix the lifetime of the signal handlers
- Date: Sat, 14 Mar 2015 12:52:50 +0000 (UTC)
commit bdea35167e8c2ffbe10a5b4a20942d9dba7c0660
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 12 16:50:13 2015 +0100
base-model: Fix the lifetime of the signal handlers
https://bugzilla.gnome.org/show_bug.cgi?id=746104
src/photos-base-model.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-base-model.c b/src/photos-base-model.c
index 80326ac..a731f6e 100644
--- a/src/photos-base-model.c
+++ b/src/photos-base-model.c
@@ -99,8 +99,16 @@ photos_base_model_constructed (GObject *object)
G_OBJECT_CLASS (photos_base_model_parent_class)->constructed (object);
- g_signal_connect_swapped (priv->mngr, "object-added", G_CALLBACK (photos_base_model_refresh), self);
- g_signal_connect_swapped (priv->mngr, "object-removed", G_CALLBACK (photos_base_model_refresh), self);
+ g_signal_connect_object (priv->mngr,
+ "object-added",
+ G_CALLBACK (photos_base_model_refresh),
+ self,
+ G_CONNECT_SWAPPED);
+ g_signal_connect_object (priv->mngr,
+ "object-removed",
+ G_CALLBACK (photos_base_model_refresh),
+ self,
+ G_CONNECT_SWAPPED);
photos_base_model_refresh (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]