diff options
author | Xan Lopez <xan@gnome.org> | 2010-05-18 22:15:56 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-05-19 00:08:47 +0800 |
commit | 1cda73c6a5be184e90cc998b1d51c30de4ec95bb (patch) | |
tree | 0144cd14804799894636a0e93b62a567213757e1 /embed/ephy-web-view.c | |
parent | 50c36fdf1c4224c4b2e2a97d635fd9184af7519d (diff) | |
download | gsoc2013-epiphany-1cda73c6a5be184e90cc998b1d51c30de4ec95bb.tar.gz gsoc2013-epiphany-1cda73c6a5be184e90cc998b1d51c30de4ec95bb.tar.zst gsoc2013-epiphany-1cda73c6a5be184e90cc998b1d51c30de4ec95bb.zip |
Update the status message from within the EphyWebView
There's no need anymore for the EphyWindow to do this, we can get rid
of one extra roundtrip.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 65298ebf5..1072bdb80 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -104,6 +104,8 @@ struct _EphyWebViewPrivate { guint seq_context_id; guint seq_message_id; + guint tab_message_id; + char *text; GdkRectangle text_rectangle; @@ -2278,6 +2280,23 @@ set_scroll_adjustments_cb (EphyWebView *view, GtkAdjustment *hadj, GtkAdjustment } 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; @@ -2294,6 +2313,7 @@ ephy_web_view_init (EphyWebView *web_view) priv->monitor_directory = FALSE; priv->seq_context_id = 1; priv->seq_message_id = 1; + priv->tab_message_id = ephy_web_view_statusbar_get_context_id (web_view, TAB_MESSAGE_CONTEXT_DESCRIPTION); priv->non_search_regex = g_regex_new ("(^localhost(\\.[^[:space:]]+)?(:\\d+)?(/.*)?$|" "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]$|" @@ -2338,6 +2358,10 @@ ephy_web_view_init (EphyWebView *web_view) G_CALLBACK (set_scroll_adjustments_cb), NULL); + g_signal_connect (web_view, "notify::status-message", + G_CALLBACK (status_message_notify_cb), + NULL); + cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache (embed_shell)); g_signal_connect_object (G_OBJECT (cache), "changed", |