[gnome-photos/gnome-3-16] view-container: Fix the lifetime of the signal handlers



commit 5f900a762b7f8af2819fc969b51fbd7454b3825b
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Oct 29 02:24:32 2015 +0100

    view-container: Fix the lifetime of the signal handlers
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757199

 src/photos-view-container.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index 822556e..804928e 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -341,10 +341,18 @@ photos_view_container_constructed (GObject *object)
     }
 
   action = g_action_map_lookup_action (G_ACTION_MAP (app), "select-all");
-  g_signal_connect_swapped (action, "activate", G_CALLBACK (photos_view_container_select_all), self);
+  g_signal_connect_object (action,
+                           "activate",
+                           G_CALLBACK (photos_view_container_select_all),
+                           self,
+                           G_CONNECT_SWAPPED);
 
   action = g_action_map_lookup_action (G_ACTION_MAP (app), "select-none");
-  g_signal_connect_swapped (action, "activate", G_CALLBACK (gd_main_view_unselect_all), priv->view);
+  g_signal_connect_object (action,
+                           "activate",
+                           G_CALLBACK (gd_main_view_unselect_all),
+                           priv->view,
+                           G_CONNECT_SWAPPED);
 
   g_signal_connect_object (priv->offset_cntrlr,
                            "count-changed",


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