From 763dbbffec69ec7dec320b841636029fa5cde85b Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 12 Feb 2011 00:39:34 +0100 Subject: 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 file changed, 19 insertions(+), 17 deletions(-) (limited to 'embed') diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index bfa45edfa..5c5113545 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -548,11 +548,30 @@ ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event) return GTK_WIDGET_CLASS (ephy_web_view_parent_class)->button_press_event (widget, 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); } @@ -2186,23 +2205,6 @@ vadjustment_changed_cb (EphyWebView *view, GParamSpec *pspec, gpointer data) g_signal_connect (adj, "value-changed", G_CALLBACK (adj_changed_cb), view); } -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) { -- cgit v1.2.3