diff options
author | lukefromdc <[email protected]> | 2016-10-07 00:02:56 -0400 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-22 12:49:34 +0300 |
commit | 6b020640202f9e14af14845e54b8f3a74e941bf0 (patch) | |
tree | f727b39f38c3f536879a36bc714413a4f9844922 /src | |
parent | 136512259cbbf1dab007939ef7cb172ac277b0d3 (diff) | |
download | caja-6b020640202f9e14af14845e54b8f3a74e941bf0.tar.bz2 caja-6b020640202f9e14af14845e54b8f3a74e941bf0.tar.xz |
Stop warnings on window-close and 3 warnings on exit
Fix the gsignal warnings on window-close
based on https://github.com/mate-desktop/atril/commit/fda33fbeedc0aab64d9479850047d0817d0b38be
"Check if handler_id is connected before disconnect" from Atril
Also Fix "Source ID XXX was not found..." warnings on closing Caja
These three gsources are already gone when Caja exits, their ID's still exist but they cannot be found to remove. The warnings indicate double removal so this code block is just a source of errors. Leave it in place but commented out for now.
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-sidebar-title.c | 5 | ||||
-rw-r--r-- | src/caja-window-menus.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/caja-sidebar-title.c b/src/caja-sidebar-title.c index 1cd8e14c..1f2c4295 100644 --- a/src/caja-sidebar-title.c +++ b/src/caja-sidebar-title.c @@ -212,8 +212,11 @@ release_file (CajaSidebarTitle *sidebar_title) { if (sidebar_title->details->file_changed_connection != 0) { - g_signal_handler_disconnect (sidebar_title->details->file, + if (g_signal_handler_is_connected(G_OBJECT (sidebar_title->details->file), + sidebar_title->details->file_changed_connection)){ + g_signal_handler_disconnect (sidebar_title->details->file, sidebar_title->details->file_changed_connection); + } sidebar_title->details->file_changed_connection = 0; } diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c index d0fc2254..f6691876 100644 --- a/src/caja-window-menus.c +++ b/src/caja-window-menus.c @@ -98,8 +98,11 @@ bookmark_holder_new (CajaBookmark *bookmark, static void bookmark_holder_free (BookmarkHolder *bookmark_holder) { + if (g_signal_handler_is_connected(bookmark_holder->bookmark, + bookmark_holder->changed_handler_id)){ g_signal_handler_disconnect (bookmark_holder->bookmark, - bookmark_holder->changed_handler_id); + bookmark_holder->changed_handler_id); + } g_object_unref (bookmark_holder->bookmark); g_free (bookmark_holder); } |