diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-04-03 19:57:55 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-04-03 19:57:55 +0800 |
commit | a9bf8b70bdbe58c6417cad05bb293817bf29c393 (patch) | |
tree | a0a09ca9e466f675c36fc4805902786eab7d2a85 | |
parent | d25608d94a39a9bbb5ec4770e1da6b68d420bb5b (diff) | |
download | gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.gz gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.zst gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.zip |
2006-04-03 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-dbus.c: (ephy_dbus_get_bus):
* src/ephy-net-monitor.c:
(ephy_net_monitor_check_for_active_device),
(ephy_net_monitor_attach_to_dbus), (ephy_net_monitor_startup):
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index 4591b1a90..8aa2ad334 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -554,13 +554,16 @@ MozDownload::OnProgressChange (nsIWebProgress *aWebProgress, mLastUpdate = now; - if (aMaxTotalProgress == -1) + if (aMaxTotalProgress <= 0) { mPercentComplete = -1; } else { - mPercentComplete = (PRInt32)(((float)aCurTotalProgress / (float)aMaxTotalProgress) * 100.0 + 0.5); + /* Make sure not to round up, so we don't display 100% unless + * it's really finished! + */ + mPercentComplete = (PRInt32)(((float)aCurTotalProgress / (float)aMaxTotalProgress) * 100.0); } mTotalProgress = aMaxTotalProgress; |