diff options
author | lukefromdc <[email protected]> | 2016-10-07 00:02:56 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2016-10-08 14:17:39 -0400 |
commit | 24bb72b321c044479728fd1d43c941afc0309f18 (patch) | |
tree | 1e7a1995fba26dbcf52485a907cffa97cc16cb2d /libcaja-private | |
parent | 19ce563886e21fec980d9a697b98d2881f14d308 (diff) | |
download | caja-24bb72b321c044479728fd1d43c941afc0309f18.tar.bz2 caja-24bb72b321c044479728fd1d43c941afc0309f18.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 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-desktop-link-monitor.c | 3 | ||||
-rw-r--r-- | libcaja-private/caja-desktop-link.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libcaja-private/caja-desktop-link-monitor.c b/libcaja-private/caja-desktop-link-monitor.c index 05cb7f4a..ee5d85d4 100644 --- a/libcaja-private/caja-desktop-link-monitor.c +++ b/libcaja-private/caja-desktop-link-monitor.c @@ -488,6 +488,7 @@ desktop_link_monitor_finalize (GObject *object) desktop_volumes_visible_changed, monitor); +/* These sources are already gone, this just causes errors if (monitor->details->mount_id != 0) { g_source_remove (monitor->details->mount_id); @@ -500,7 +501,7 @@ desktop_link_monitor_finalize (GObject *object) { g_source_remove (monitor->details->changed_id); } - +*/ g_free (monitor->details); EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); diff --git a/libcaja-private/caja-desktop-link.c b/libcaja-private/caja-desktop-link.c index dfb1a54d..d695af6d 100644 --- a/libcaja-private/caja-desktop-link.c +++ b/libcaja-private/caja-desktop-link.c @@ -460,8 +460,11 @@ desktop_link_finalize (GObject *object) if (link->details->signal_handler != 0) { - g_signal_handler_disconnect (link->details->signal_handler_obj, - link->details->signal_handler); + if (g_signal_handler_is_connected(link->details->signal_handler_obj, + link->details->signal_handler)){ + g_signal_handler_disconnect (link->details->signal_handler_obj, + link->details->signal_handler); + } } if (link->details->icon_file != NULL) |