summaryrefslogtreecommitdiff
path: root/plugins/filebrowser/pluma-file-browser-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/filebrowser/pluma-file-browser-plugin.c')
-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",