[evince] ev-zoom-action: Use g_signal_connect_object to connect to EvDocumentModel changes
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] ev-zoom-action: Use g_signal_connect_object to connect to EvDocumentModel changes
- Date: Sun, 22 Jun 2014 10:23:26 +0000 (UTC)
commit a7dfeac7bdaff9ccb57321cbabc7638ce1311bf6
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Jun 22 12:14:32 2014 +0200
ev-zoom-action: Use g_signal_connect_object to connect to EvDocumentModel changes
To make sure the signals are not emitted once the zoom control has been
destroyed.
shell/ev-zoom-action.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/shell/ev-zoom-action.c b/shell/ev-zoom-action.c
index 86b1929..a603577 100644
--- a/shell/ev-zoom-action.c
+++ b/shell/ev-zoom-action.c
@@ -430,15 +430,15 @@ ev_zoom_action_constructed (GObject *object)
gtk_widget_set_sensitive (GTK_WIDGET (zoom_action), FALSE);
}
- g_signal_connect (zoom_action->priv->model, "notify::document",
- G_CALLBACK (document_changed_cb),
- zoom_action);
- g_signal_connect (zoom_action->priv->model, "notify::scale",
- G_CALLBACK (zoom_changed_cb),
- zoom_action);
- g_signal_connect (zoom_action->priv->model, "notify::max-scale",
- G_CALLBACK (max_zoom_changed_cb),
- zoom_action);
+ g_signal_connect_object (zoom_action->priv->model, "notify::document",
+ G_CALLBACK (document_changed_cb),
+ zoom_action, 0);
+ g_signal_connect_object (zoom_action->priv->model, "notify::scale",
+ G_CALLBACK (zoom_changed_cb),
+ zoom_action, 0);
+ g_signal_connect_object (zoom_action->priv->model, "notify::max-scale",
+ G_CALLBACK (max_zoom_changed_cb),
+ zoom_action, 0);
setup_initial_entry_size (zoom_action);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]