[gnome-photos] preview-view: Fix the lifetime of the signal handlers



commit f754de0c21e40b1595e0311616427b0111e59023
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri May 15 08:35:31 2015 +0200

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

 src/photos-preview-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-preview-view.c b/src/photos-preview-view.c
index 852551c..b517ca6 100644
--- a/src/photos-preview-view.c
+++ b/src/photos-preview-view.c
@@ -313,10 +313,11 @@ photos_preview_view_init (PhotosPreviewView *self)
   priv = self->priv;
 
   priv->mode_cntrlr = photos_mode_controller_dup_singleton ();
-  g_signal_connect_swapped (priv->mode_cntrlr,
-                            "window-mode-changed",
-                            G_CALLBACK (photos_preview_view_window_mode_changed),
-                            self);
+  g_signal_connect_object (priv->mode_cntrlr,
+                           "window-mode-changed",
+                           G_CALLBACK (photos_preview_view_window_mode_changed),
+                           self,
+                           G_CONNECT_SWAPPED);
 
   gtk_widget_set_hexpand (GTK_WIDGET (self), TRUE);
   gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE);


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