[epiphany] ephy-embed: disconnect statusbar timeout on dispose
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-embed: disconnect statusbar timeout on dispose
- Date: Wed, 30 Nov 2011 11:55:55 +0000 (UTC)
commit 4bd76258dfb086976c7daf1d854aab852c422c85
Author: Xan Lopez <xan igalia com>
Date: Wed Nov 30 12:55:27 2011 +0100
ephy-embed: disconnect statusbar timeout on dispose
Otherwise we'll crash when we close windows/tabs too fast.
embed/ephy-embed.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 36c6126..e9b442a 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -251,23 +251,28 @@ static void
ephy_embed_dispose (GObject *object)
{
EphyEmbed *embed = EPHY_EMBED (object);
+ EphyEmbedPrivate *priv = embed->priv;
- if (embed->priv->inspector_window)
- {
+ if (embed->priv->inspector_window) {
WebKitWebInspector *inspector;
- inspector = webkit_web_view_get_inspector (embed->priv->web_view);
+ inspector = webkit_web_view_get_inspector (priv->web_view);
g_signal_handlers_disconnect_by_func (inspector,
ephy_embed_inspect_show_cb,
- embed->priv->inspector_window);
+ priv->inspector_window);
g_signal_handlers_disconnect_by_func (inspector,
ephy_embed_inspect_close_cb,
- embed->priv->inspector_window);
+ priv->inspector_window);
+
+ gtk_widget_destroy (GTK_WIDGET (priv->inspector_window));
+ priv->inspector_window = NULL;
+ }
- gtk_widget_destroy (GTK_WIDGET (embed->priv->inspector_window));
- embed->priv->inspector_window = NULL;
+ if (priv->pop_statusbar_later_source_id) {
+ g_source_remove (priv->pop_statusbar_later_source_id);
+ priv->pop_statusbar_later_source_id = 0;
}
G_OBJECT_CLASS (ephy_embed_parent_class)->dispose (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]