diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 14:35:42 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 14:35:42 (GMT) |
commit | 5101efb75bed09e2f7fcbe2a5db9ddf947fabef1 (patch) | |
tree | b8e4a77ce2b1829cdce236452fdce4fc92876b94 | |
parent | 3a3fe02b6198d08b944c4b69a55b240e1e1ab813 (diff) |
Avoid flickering of the progress bar.
-rw-r--r-- | lib/src/gecko-browser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/src/gecko-browser.cpp b/lib/src/gecko-browser.cpp index bce6c40..b0612c0 100644 --- a/lib/src/gecko-browser.cpp +++ b/lib/src/gecko-browser.cpp @@ -123,6 +123,7 @@ net_state_cb(GtkMozEmbed *embed, const char *aURI, gint state, guint status) if (state & GTK_MOZ_EMBED_FLAG_START) { browser->total_requests = 0; browser->current_requests = 0; + browser->progress = 0.0; } } @@ -139,7 +140,9 @@ net_state_cb(GtkMozEmbed *embed, const char *aURI, gint state, guint status) progress = float(browser->current_requests) / float(browser->total_requests); - gecko_browser_set_progress(browser, progress); + if (progress > browser->progress) { + gecko_browser_set_progress(browser, progress); + } } } |