summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-24 12:51:44 +0200
committerraveit65 <[email protected]>2022-03-08 00:26:00 +0100
commit6216985d236b5c1e9c531367b7b1cfe0952441d8 (patch)
tree7bfac1f597eea12dd9d54cf39800b8ca1d003573 /plugins
parent91fb982083508ba9d411b70b370e95430ebfff7d (diff)
downloadpluma-6216985d236b5c1e9c531367b7b1cfe0952441d8.tar.bz2
pluma-6216985d236b5c1e9c531367b7b1cfe0952441d8.tar.xz
filebrowser: use GLib's new g_clear_signal_handler() function
Diffstat (limited to 'plugins')
-rw-r--r--plugins/filebrowser/pluma-file-browser-plugin.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c
index f7c0d57f..106ca4c3 100644
--- a/plugins/filebrowser/pluma-file-browser-plugin.c
+++ b/plugins/filebrowser/pluma-file-browser-plugin.c
@@ -192,8 +192,15 @@ on_end_loading_cb (PlumaFileBrowserStore *store,
PlumaFileBrowserPluginPrivate * priv)
{
/* Disconnect the signal */
- g_signal_handler_disconnect (store, priv->end_loading_handle);
- priv->end_loading_handle = 0;
+#if GLIB_CHECK_VERSION(2,62,0)
+ g_clear_signal_handler (&priv->end_loading_handle, store);
+#else
+ if (priv->end_loading_handle != 0) {
+ g_signal_handler_disconnect (store, priv->end_loading_handle);
+ priv->end_loading_handle = 0;
+ }
+#endif
+
priv->auto_root = FALSE;
}
@@ -206,10 +213,14 @@ prepare_auto_root (PlumaFileBrowserPluginPrivate *priv)
store = pluma_file_browser_widget_get_browser_store (priv->tree_widget);
+#if GLIB_CHECK_VERSION(2,62,0)
+ g_clear_signal_handler (&priv->end_loading_handle, store);
+#else
if (priv->end_loading_handle != 0) {
g_signal_handler_disconnect (store, priv->end_loading_handle);
priv->end_loading_handle = 0;
}
+#endif
priv->end_loading_handle = g_signal_connect (store,
"end-loading",