[epiphany] ephy-web-view: do not update status after we are dead
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-web-view: do not update status after we are dead
- Date: Fri, 11 Feb 2011 23:40:10 +0000 (UTC)
commit 763dbbffec69ec7dec320b841636029fa5cde85b
Author: Xan Lopez <xan gnome org>
Date: Sat Feb 12 00:39:34 2011 +0100
ephy-web-view: do not update status after we are dead
We now reach to the EphyEmbed, so this is dangerous.
embed/ephy-web-view.c | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index bfa45ed..5c51135 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -549,10 +549,29 @@ ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
}
static void
+status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, gpointer data)
+{
+ const char *message;
+ EphyWebViewPrivate *priv;
+
+ message = ephy_web_view_get_status_message (view);
+
+ priv = view->priv;
+
+ ephy_web_view_statusbar_pop (view, priv->tab_message_id);
+
+ if (message)
+ ephy_web_view_statusbar_push (view, priv->tab_message_id, message);
+
+}
+
+static void
ephy_web_view_dispose (GObject *object)
{
ephy_web_view_file_monitor_cancel (EPHY_WEB_VIEW (object));
+ g_signal_handlers_disconnect_by_func (object, G_CALLBACK (status_message_notify_cb), NULL);
+
G_OBJECT_CLASS (ephy_web_view_parent_class)->dispose (object);
}
@@ -2187,23 +2206,6 @@ vadjustment_changed_cb (EphyWebView *view, GParamSpec *pspec, gpointer data)
}
static void
-status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, gpointer data)
-{
- const char *message;
- EphyWebViewPrivate *priv;
-
- message = ephy_web_view_get_status_message (view);
-
- priv = view->priv;
-
- ephy_web_view_statusbar_pop (view, priv->tab_message_id);
-
- if (message)
- ephy_web_view_statusbar_push (view, priv->tab_message_id, message);
-
-}
-
-static void
ephy_web_view_init (EphyWebView *web_view)
{
EphyWebViewPrivate *priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]