[epiphany/gnome-3-20] downloads-popover: Disconnect more signals when popover is destroyed



commit 26db04807fcc12de96a41d32edf6fbfba1d57cf6
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Feb 15 10:28:28 2017 -0600

    downloads-popover: Disconnect more signals when popover is destroyed
    
    These signals can run after the popover has been destroyed. We don't
    want that. Speculative fix for this critical:
    
    epiphany-Gtk-CRITICAL: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778659

 lib/widgets/ephy-downloads-popover.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index a0f1e4e..5c29fc6 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -73,12 +73,12 @@ download_added_cb (EphyDownloadsPopover *popover,
   GtkWidget *widget;
 
   widget = ephy_download_widget_new (download);
-  g_signal_connect_swapped (download, "completed",
-                            G_CALLBACK (download_completed_cb),
-                            popover);
-  g_signal_connect_swapped (download, "error",
-                            G_CALLBACK (download_failed_cb),
-                            popover);
+  g_signal_connect_object (download, "completed",
+                           G_CALLBACK (download_completed_cb),
+                           popover, G_CONNECT_SWAPPED);
+  g_signal_connect_object (download, "error",
+                           G_CALLBACK (download_failed_cb),
+                           popover, G_CONNECT_SWAPPED);
   gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), widget);
   gtk_widget_show (widget);
 }
@@ -190,12 +190,12 @@ ephy_downloads_popover_init (EphyDownloadsPopover *popover)
     EphyDownload *download = (EphyDownload *)l->data;
     GtkWidget *widget;
 
-    g_signal_connect_swapped (download, "completed",
-                              G_CALLBACK (download_completed_cb),
-                              popover);
-    g_signal_connect_swapped (download, "error",
-                              G_CALLBACK (download_failed_cb),
-                              popover);
+    g_signal_connect_object (download, "completed",
+                             G_CALLBACK (download_completed_cb),
+                             popover, G_CONNECT_SWAPPED);
+    g_signal_connect_object (download, "error",
+                             G_CALLBACK (download_failed_cb),
+                             popover, G_CONNECT_SWAPPED);
 
     widget = ephy_download_widget_new (download);
     gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), widget);


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