diff options
author | Xan Lopez <xan@gnome.org> | 2009-06-14 06:26:03 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-06-14 06:26:03 +0800 |
commit | ed081ffca28639a928d9cb85bbbc3cb0474b9729 (patch) | |
tree | 193c6eabd5dd9ca272c43247981654e5ee20cba5 | |
parent | a1af750fa1343236fd81ea9c1b6962e8ebabd4af (diff) | |
download | gsoc2013-epiphany-ed081ffca28639a928d9cb85bbbc3cb0474b9729.tar.gz gsoc2013-epiphany-ed081ffca28639a928d9cb85bbbc3cb0474b9729.tar.zst gsoc2013-epiphany-ed081ffca28639a928d9cb85bbbc3cb0474b9729.zip |
ephy-window.c: a different hack to not show progress when loading about:blank.
-rw-r--r-- | src/ephy-window.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 = |