summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c6
-rw-r--r--libmisc/ev-page-action-widget.c13
2 files changed, 19 insertions, 0 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index 551bbde3..cb07011f 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -149,6 +149,11 @@ egg_toolbar_editor_disconnect_model (EggToolbarEditor *t)
{
handler = priv->sig_handlers[i];
+#if GLIB_CHECK_VERSION(2,62,0)
+ if ((handler == 0) || !g_signal_handler_is_connected (model, handler))
+ continue;
+ g_clear_signal_handler (&handler, model);
+#else
if (handler != 0)
{
if (g_signal_handler_is_connected (model, handler))
@@ -158,6 +163,7 @@ egg_toolbar_editor_disconnect_model (EggToolbarEditor *t)
priv->sig_handlers[i] = 0;
}
+#endif
}
}
diff --git a/libmisc/ev-page-action-widget.c b/libmisc/ev-page-action-widget.c
index c24d9b97..30654d19 100644
--- a/libmisc/ev-page-action-widget.c
+++ b/libmisc/ev-page-action-widget.c
@@ -202,11 +202,16 @@ ev_page_action_widget_document_changed_cb (EvDocumentModel *model,
g_object_unref (action_widget->document);
action_widget->document = document;
+#if GLIB_CHECK_VERSION(2,62,0)
+ g_clear_signal_handler (&action_widget->signal_id,
+ action_widget->doc_model);
+#else
if (action_widget->signal_id > 0) {
g_signal_handler_disconnect (action_widget->doc_model,
action_widget->signal_id);
action_widget->signal_id = 0;
}
+#endif
action_widget->signal_id =
g_signal_connect_object (action_widget->doc_model,
"page-changed",
@@ -240,6 +245,13 @@ ev_page_action_widget_finalize (GObject *object)
EvPageActionWidget *action_widget = EV_PAGE_ACTION_WIDGET (object);
if (action_widget->doc_model != NULL) {
+#if GLIB_CHECK_VERSION(2,62,0)
+ if ((action_widget->signal_id != 0) &&
+ (g_signal_handler_is_connected (action_widget->doc_model,
+ action_widget->signal_id)))
+ g_clear_signal_handler (&action_widget->signal_id,
+ action_widget->doc_model);
+#else
if (action_widget->signal_id > 0) {
if (g_signal_handler_is_connected(action_widget->doc_model,
action_widget->signal_id))
@@ -247,6 +259,7 @@ ev_page_action_widget_finalize (GObject *object)
action_widget->signal_id);
action_widget->signal_id = 0;
}
+#endif
g_object_remove_weak_pointer (G_OBJECT (action_widget->doc_model),
(gpointer)&action_widget->doc_model);
action_widget->doc_model = NULL;