[evince] browser-plugin: manually destroy the search popover on toolbar dispose
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] browser-plugin: manually destroy the search popover on toolbar dispose
- Date: Sun, 13 Mar 2016 09:20:34 +0000 (UTC)
commit df8b503552eb298f02c9903cb2f58806deae7351
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Mar 13 10:18:56 2016 +0100
browser-plugin: manually destroy the search popover on toolbar dispose
That way if it's still visible the closed signal will not be emited
during destruction.
browser-plugin/EvBrowserPluginToolbar.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/EvBrowserPluginToolbar.cpp b/browser-plugin/EvBrowserPluginToolbar.cpp
index 824ab38..3f8c58f 100644
--- a/browser-plugin/EvBrowserPluginToolbar.cpp
+++ b/browser-plugin/EvBrowserPluginToolbar.cpp
@@ -456,11 +456,23 @@ static void evBrowserPluginToolbarConstructed(GObject *object)
gtk_widget_show(toolItem);
}
+static void evBrowserPluginToolbarDispose(GObject *object)
+{
+ EvBrowserPluginToolbar *toolbar = EV_BROWSER_PLUGIN_TOOLBAR(object);
+ if (toolbar->priv->searchPopover) {
+ gtk_widget_destroy(toolbar->priv->searchPopover);
+ toolbar->priv->searchPopover = nullptr;
+ }
+
+ G_OBJECT_CLASS(ev_browser_plugin_toolbar_parent_class)->dispose(object);
+}
+
static void ev_browser_plugin_toolbar_class_init(EvBrowserPluginToolbarClass *klass)
{
GObjectClass *gObjectClass = G_OBJECT_CLASS(klass);
gObjectClass->set_property = evBrowserPluginToolbarSetProperty;
gObjectClass->constructed = evBrowserPluginToolbarConstructed;
+ gObjectClass->dispose = evBrowserPluginToolbarDispose;
g_object_class_install_property(gObjectClass,
PROP_PLUGIN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]