[evince/gnome-3-28] shell: Disconnect bookmarks signal on toolbar dispose
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-28] shell: Disconnect bookmarks signal on toolbar dispose
- Date: Tue, 10 Jul 2018 17:21:49 +0000 (UTC)
commit 78889e451670ac01788a99e7518b34c6f262a156
Author: Jason Crain <jcrain src gnome org>
Date: Tue Jul 10 01:53:51 2018 -0500
shell: Disconnect bookmarks signal on toolbar dispose
Fullscreen mode creates and deletes a toolbar. The toolbar shouldn't
receive signals after it is destructed.
Fixes https://gitlab.gnome.org/GNOME/evince/issues/920
shell/ev-toolbar.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index fdc3fc18..4cd8c96c 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -277,6 +277,22 @@ ev_toolbar_constructed (GObject *object)
g_object_unref (builder);
}
+static void
+ev_toolbar_dispose (GObject *object)
+{
+ EvToolbar *ev_toolbar = EV_TOOLBAR (object);
+ GMenuModel *bookmarks_submenu_model;
+
+ bookmarks_submenu_model = ev_window_get_bookmarks_menu (ev_toolbar->priv->window);
+ if (bookmarks_submenu_model) {
+ g_signal_handlers_disconnect_by_func (bookmarks_submenu_model,
+ ev_toolbar_bookmarks_menu_model_changed,
+ ev_toolbar);
+ }
+
+ G_OBJECT_CLASS (ev_toolbar_parent_class)->dispose (object);
+}
+
static void
ev_toolbar_class_init (EvToolbarClass *klass)
{
@@ -284,6 +300,7 @@ ev_toolbar_class_init (EvToolbarClass *klass)
g_object_class->set_property = ev_toolbar_set_property;
g_object_class->constructed = ev_toolbar_constructed;
+ g_object_class->dispose = ev_toolbar_dispose;
g_object_class_install_property (g_object_class,
PROP_WINDOW,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]