Avoid flickering of the progress bar.
This commit is contained in:
parent
3a3fe02b61
commit
5101efb75b
@ -123,6 +123,7 @@ net_state_cb(GtkMozEmbed *embed, const char *aURI, gint state, guint status)
|
|||||||
if (state & GTK_MOZ_EMBED_FLAG_START) {
|
if (state & GTK_MOZ_EMBED_FLAG_START) {
|
||||||
browser->total_requests = 0;
|
browser->total_requests = 0;
|
||||||
browser->current_requests = 0;
|
browser->current_requests = 0;
|
||||||
|
browser->progress = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,8 +140,10 @@ net_state_cb(GtkMozEmbed *embed, const char *aURI, gint state, guint status)
|
|||||||
|
|
||||||
progress = float(browser->current_requests) /
|
progress = float(browser->current_requests) /
|
||||||
float(browser->total_requests);
|
float(browser->total_requests);
|
||||||
|
if (progress > browser->progress) {
|
||||||
gecko_browser_set_progress(browser, progress);
|
gecko_browser_set_progress(browser, progress);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user