diff options
author | rbuj <[email protected]> | 2021-10-24 11:45:20 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-03-10 23:18:08 +0100 |
commit | b84d06bf1fe99874cdc6c18f2ae4f19acc158ca1 (patch) | |
tree | cf4ff2d39c2b2be9faa3ebb4118f46bd35d671d8 /plugins/background | |
parent | 2707880e8f55e27a6037bb8a3403254c150f4469 (diff) | |
download | mate-settings-daemon-b84d06bf1fe99874cdc6c18f2ae4f19acc158ca1.tar.bz2 mate-settings-daemon-b84d06bf1fe99874cdc6c18f2ae4f19acc158ca1.tar.xz |
Use GLib's new g_clear_signal_handler() function to simplify code
Diffstat (limited to 'plugins/background')
-rw-r--r-- | plugins/background/msd-background-manager.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c index b6fed5d..78a38bf 100644 --- a/plugins/background/msd-background-manager.c +++ b/plugins/background/msd-background-manager.c @@ -415,10 +415,16 @@ queue_timeout (MsdBackgroundManager *manager) static void disconnect_session_manager_listener (MsdBackgroundManager* manager) { +#if GLIB_CHECK_VERSION(2,62,0) + if (manager->proxy) { + g_clear_signal_handler (&manager->proxy_signal_id, manager->proxy); + } +#else if (manager->proxy && manager->proxy_signal_id) { g_signal_handler_disconnect (manager->proxy, manager->proxy_signal_id); manager->proxy_signal_id = 0; } +#endif } static void |