aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-04-03 19:57:55 +0800
committerChristian Persch <chpe@src.gnome.org>2006-04-03 19:57:55 +0800
commita9bf8b70bdbe58c6417cad05bb293817bf29c393 (patch)
treea0a09ca9e466f675c36fc4805902786eab7d2a85 /embed
parentd25608d94a39a9bbb5ec4770e1da6b68d420bb5b (diff)
downloadgsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar
gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.gz
gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.bz2
gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.lz
gsoc2013-epiphany-a9bf8b70bdbe58c6417cad05bb293817bf29c393.tar.xz
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):
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/MozDownload.cpp7
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;