diff options
author | Xan Lopez <xan@src.gnome.org> | 2009-01-21 23:56:47 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2009-01-21 23:56:47 +0800 |
commit | c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b (patch) | |
tree | 76cdcbb415bce7095261d0e270cbcab1ec734e05 /src | |
parent | 49265f276b828acfaadc05fc288274f8b8b385b5 (diff) | |
download | gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar.gz gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar.bz2 gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar.lz gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar.xz gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.tar.zst gsoc2013-epiphany-c0910bfcfcff2a79efa4e6d5bfe629f541cfa13b.zip |
ephy-window: do not set load progress on already loaded pages.
Avoids setting the load progress to 100% when switching tabs.
svn path=/trunk/; revision=8712
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 46b2dfdb1..219fb333d 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1614,6 +1614,7 @@ static void sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window) { gdouble progress; + gboolean loading; if (window->priv->closing) return; @@ -1624,7 +1625,9 @@ sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window) } progress = ephy_embed_get_load_percent (embed)/100.0; - if (progress == 1.0) + loading = ephy_embed_get_load_status (embed); + + if (progress == 1.0 && loading) { window->priv->clear_progress_timeout_id = g_timeout_add (500, @@ -1632,7 +1635,10 @@ sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window) window); } - gtk_entry_set_progress_fraction (GTK_ENTRY (window->priv->entry), progress); + /* Do not set progress in the entry if the load is already + finished */ + gtk_entry_set_progress_fraction (GTK_ENTRY (window->priv->entry), + loading ? progress : 0.0); } static void |