diff options
author | Corey Berla <corey@berla.me> | 2022-10-30 16:21:03 -0700 |
---|---|---|
committer | Corey Berla <corey@berla.me> | 2022-12-15 17:33:49 +0000 |
commit | fede594335ab27ce254ebf780323d52e83e4da5c (patch) | |
tree | e0187a2e6a36bfaf96528717ed828eea5535d96e | |
parent | b27a8cdd35b25e9513df1a43ac9f0130f34ec16e (diff) | |
download | nautilus-fede594335ab27ce254ebf780323d52e83e4da5c.tar.gz |
window: Disconnect NautilusBookmarkList "changed" signal on window destruction
Use g_signal_connect_object to automatically disconnect the signal
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2548
-rw-r--r-- | src/nautilus-window.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 3e68c0938..1a28828d8 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1574,9 +1574,10 @@ nautilus_window_constructed (GObject *self) * some actions trigger UI widgets to show/hide. */ nautilus_window_initialize_actions (window); - window->bookmarks_id = - g_signal_connect_swapped (nautilus_application_get_bookmarks (application), "changed", - G_CALLBACK (nautilus_window_sync_bookmarks), window); + window->bookmarks_id = g_signal_connect_object (nautilus_application_get_bookmarks (application), + "changed", + G_CALLBACK (nautilus_window_sync_bookmarks), + window, G_CONNECT_SWAPPED); nautilus_toolbar_on_window_constructed (NAUTILUS_TOOLBAR (window->toolbar)); |