Blame SOURCES/window-Fix-criticals-when-moving-file-to-trash.patch

0f37e7
From 668e0673a7ea3fe4cb6c99bc7b56bc52597e2061 Mon Sep 17 00:00:00 2001
0f37e7
From: Ondrej Holy <oholy@redhat.com>
0f37e7
Date: Wed, 25 Sep 2019 09:16:44 +0200
0f37e7
Subject: [PATCH] window: Fix criticals when moving file to trash
0f37e7
0f37e7
The "gtk_revealer_get_transition_type: assertion 'GTK_IS_REVEALER (revealer)'
0f37e7
failed" critical is printed when moving file to trash after closing a window.
0f37e7
This is because the "undo-changed" signal handler is not disconnected when
0f37e7
the window is destroyed. Let's use g_signal_connect_object() to ensure
0f37e7
disconnection and prevent those criticals.
0f37e7
0f37e7
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1076
0f37e7
---
0f37e7
 src/nautilus-window.c | 5 +++--
0f37e7
 1 file changed, 3 insertions(+), 2 deletions(-)
0f37e7
0f37e7
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
0f37e7
index 285a6a6ce..056c75c7a 100644
0f37e7
--- a/src/nautilus-window.c
0f37e7
+++ b/src/nautilus-window.c
0f37e7
@@ -2239,8 +2239,9 @@ nautilus_window_constructed (GObject *self)
0f37e7
     nautilus_window_set_up_sidebar (window);
0f37e7
 
0f37e7
 
0f37e7
-    g_signal_connect_after (nautilus_file_undo_manager_get (), "undo-changed",
0f37e7
-                            G_CALLBACK (nautilus_window_on_undo_changed), self);
0f37e7
+    g_signal_connect_object (nautilus_file_undo_manager_get (), "undo-changed",
0f37e7
+                             G_CALLBACK (nautilus_window_on_undo_changed), self,
0f37e7
+                             G_CONNECT_AFTER);
0f37e7
 
0f37e7
     /* Is required that the UI is constructed before initializating the actions, since
0f37e7
      * some actions trigger UI widgets to show/hide. */
0f37e7
-- 
0f37e7
2.23.0
0f37e7