Commit df8b5035 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

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.
parent 00af1fa9
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment