[gnome-photos] view-container: Fix the lifetime of the signal handlers
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] view-container: Fix the lifetime of the signal handlers
- Date: Fri, 13 Mar 2015 19:11:54 +0000 (UTC)
commit 54a28f549e19c72174c69d69c1fcae7017f4300d
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 12 16:47:27 2015 +0100
view-container: Fix the lifetime of the signal handlers
https://bugzilla.gnome.org/show_bug.cgi?id=746104
src/photos-view-container.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index da0b901..3d88097 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -283,19 +283,21 @@ photos_view_container_constructed (GObject *object)
priv->item_mngr = g_object_ref (state->item_mngr);
priv->sel_cntrlr = photos_selection_controller_dup_singleton ();
- g_signal_connect (priv->sel_cntrlr,
- "selection-mode-changed",
- G_CALLBACK (photos_view_container_selection_mode_changed),
- self);
+ g_signal_connect_object (priv->sel_cntrlr,
+ "selection-mode-changed",
+ G_CALLBACK (photos_view_container_selection_mode_changed),
+ self,
+ 0);
photos_view_container_selection_mode_changed (priv->sel_cntrlr,
photos_selection_controller_get_selection_mode
(priv->sel_cntrlr),
self);
priv->mode_cntrlr = photos_mode_controller_dup_singleton ();
- g_signal_connect (priv->mode_cntrlr,
- "window-mode-changed",
- G_CALLBACK (photos_view_container_window_mode_changed),
- self);
+ g_signal_connect_object (priv->mode_cntrlr,
+ "window-mode-changed",
+ G_CALLBACK (photos_view_container_window_mode_changed),
+ self,
+ 0);
priv->remote_mngr = photos_remote_display_manager_dup_singleton ();
@@ -343,10 +345,11 @@ photos_view_container_constructed (GObject *object)
G_CALLBACK (photos_view_container_query_error),
self,
G_CONNECT_SWAPPED);
- g_signal_connect (priv->trk_cntrlr,
- "query-status-changed",
- G_CALLBACK (photos_view_container_query_status_changed),
- self);
+ g_signal_connect_object (priv->trk_cntrlr,
+ "query-status-changed",
+ G_CALLBACK (photos_view_container_query_status_changed),
+ self,
+ 0);
photos_tracker_controller_start (priv->trk_cntrlr);
status = photos_tracker_controller_get_query_status (priv->trk_cntrlr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]