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