From ed081ffca28639a928d9cb85bbbc3cb0474b9729 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sun, 14 Jun 2009 01:26:03 +0300 Subject: ephy-window.c: a different hack to not show progress when loading about:blank. --- src/ephy-window.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ephy-window.c') diff --git a/src/ephy-window.c b/src/ephy-window.c index f90b315a5..b5e32c61d 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1608,6 +1608,7 @@ sync_tab_load_progress (EphyWebView *view, GParamSpec *pspec, EphyWindow *window { gdouble progress; gboolean loading; + const char *uri; if (window->priv->closing) return; @@ -1617,9 +1618,18 @@ sync_tab_load_progress (EphyWebView *view, GParamSpec *pspec, EphyWindow *window window->priv->clear_progress_timeout_id = 0; } - progress = webkit_web_view_get_progress (WEBKIT_WEB_VIEW (view))/100.0; loading = ephy_web_view_get_load_status (view); + /* If we are loading about:blank do not show progress, as the + blink it causes is annoying. */ + /* FIXME: for some reason webkit_web_view_get_uri returns NULL + for about:blank until the load is finished, so assume NULL + here means we are loading about:blank. This might not be + rigt :) */ + uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view)); + if (loading && (!uri || strcmp (uri, "about:blank") == 0)) + return; + progress = webkit_web_view_get_progress (WEBKIT_WEB_VIEW (view))/100.0; if (progress == 1.0 && loading) { window->priv->clear_progress_timeout_id = -- cgit v1.2.3