[gnome-photos] selection-toolbar: Fix the lifetime of the signal handlers
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] selection-toolbar: Fix the lifetime of the signal handlers
- Date: Mon, 26 Oct 2015 15:29:06 +0000 (UTC)
commit 1487789a7e08dcaea4bdba8b2f14b3857ae840f5
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Oct 26 13:03:21 2015 +0100
selection-toolbar: Fix the lifetime of the signal handlers
src/photos-selection-toolbar.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/photos-selection-toolbar.c b/src/photos-selection-toolbar.c
index 670cb61..e5d5e29 100644
--- a/src/photos-selection-toolbar.c
+++ b/src/photos-selection-toolbar.c
@@ -479,14 +479,16 @@ photos_selection_toolbar_init (PhotosSelectionToolbar *self)
priv->item_mngr = g_object_ref (state->item_mngr);
priv->sel_cntrlr = photos_selection_controller_dup_singleton ();
- g_signal_connect_swapped (priv->sel_cntrlr,
- "selection-changed",
- G_CALLBACK (photos_selection_toolbar_selection_changed),
- self);
- g_signal_connect_swapped (priv->sel_cntrlr,
- "selection-mode-changed",
- G_CALLBACK (photos_selection_toolbar_selection_mode_changed),
- self);
+ g_signal_connect_object (priv->sel_cntrlr,
+ "selection-changed",
+ G_CALLBACK (photos_selection_toolbar_selection_changed),
+ self,
+ G_CONNECT_SWAPPED);
+ g_signal_connect_object (priv->sel_cntrlr,
+ "selection-mode-changed",
+ G_CALLBACK (photos_selection_toolbar_selection_mode_changed),
+ self,
+ G_CONNECT_SWAPPED);
action = g_action_map_lookup_action (G_ACTION_MAP (app), "delete");
g_signal_connect_object (action,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]