aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Rameau <jframeau@cvs.gnome.org>2006-07-07 05:56:28 +0800
committerJean-François Rameau <jframeau@src.gnome.org>2006-07-07 05:56:28 +0800
commite43955ce976018e77e51965fba4ebd19e47b3c78 (patch)
tree22647288ea22a8fe6b9ba88b053d7b8cb465a98a
parentbcdd93e6b16b930b6c00def2f82aae9a78fc3600 (diff)
downloadgsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar.gz
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar.bz2
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar.lz
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar.xz
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.tar.zst
gsoc2013-epiphany-e43955ce976018e77e51965fba4ebd19e47b3c78.zip
Don't hammer the cpu when downloading file with an unknown size. Fix bug
2006-07-06 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/mozilla/MozDownload.cpp: (OnProgressChange64): Don't hammer the cpu when downloading file with an unknown size. Fix bug 346671. * embed/ephy-embed-shell.c: (ephy_embed_shell_set_page_setup), (ephy_embed_shell_set_print_settings): Fix compiler warnings.
-rw-r--r--ChangeLog12
-rw-r--r--embed/ephy-embed-shell.c4
-rw-r--r--embed/mozilla/MozDownload.cpp3
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b9ad2050..fedcf8bf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-07-06 Jean-François Rameau <jframeau@cvs.gnome.org>
+
+ * embed/mozilla/MozDownload.cpp: (OnProgressChange64):
+
+ Don't hammer the cpu when downloading file with an unknown size.
+ Fix bug 346671.
+
+ * embed/ephy-embed-shell.c: (ephy_embed_shell_set_page_setup),
+ (ephy_embed_shell_set_print_settings):
+
+ Fix compiler warnings.
+
2006-07-06 Christian Persch <chpe@cvs.gnome.org>
* src/window-commands.c:
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 45c48fa2e..d4a1e4c38 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -379,7 +379,7 @@ ephy_embed_shell_set_page_setup (EphyEmbedShell *shell,
{
EphyEmbedShellPrivate *priv;
- g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ g_return_if_fail (EPHY_IS_EMBED_SHELL (shell));
priv = shell->priv;
if (page_setup != NULL)
@@ -420,7 +420,7 @@ ephy_embed_shell_set_print_settings (EphyEmbedShell *shell,
{
EphyEmbedShellPrivate *priv;
- g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+ g_return_if_fail (EPHY_IS_EMBED_SHELL (shell));
priv = shell->priv;
if (settings != NULL)
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 5c8ee71ec..198d6e0bb 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -396,8 +396,7 @@ MozDownload::OnProgressChange64 (nsIWebProgress *aWebProgress,
PRInt64 now = PR_Now ();
if ((now - mLastUpdate < mInterval) &&
- (aMaxTotalProgress != -1) &&
- (aCurTotalProgress < aMaxTotalProgress))
+ (aMaxTotalProgress == -1 || aCurTotalProgress < aMaxTotalProgress))
return NS_OK;
mLastUpdate = now;