[evince] libview: Disconnect all model signals for EvView before unreffing the model
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] libview: Disconnect all model signals for EvView before unreffing the model
- Date: Tue, 14 Aug 2012 15:13:15 +0000 (UTC)
commit 9eadb49f1868daaf397aaf910899667c27b7ce28
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Tue Aug 14 17:11:47 2012 +0200
libview: Disconnect all model signals for EvView before unreffing the model
https://bugzilla.gnome.org/show_bug.cgi?id=680023
libview/ev-view.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index c84f5bf..3c390bb 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4563,6 +4563,7 @@ ev_view_dispose (GObject *object)
EvView *view = EV_VIEW (object);
if (view->model) {
+ g_signal_handlers_disconnect_by_data (view->model, view);
g_object_unref (view->model);
view->model = NULL;
}
@@ -5371,12 +5372,7 @@ ev_view_set_model (EvView *view,
return;
if (view->model) {
- g_signal_handlers_disconnect_by_func (view->model,
- ev_view_document_changed_cb,
- view);
- g_signal_handlers_disconnect_by_func (view->model,
- ev_view_page_changed_cb,
- view);
+ g_signal_handlers_disconnect_by_data (view->model, view);
g_object_unref (view->model);
}
view->model = g_object_ref (model);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]