diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | embed/downloader-view.c | 18 | ||||
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 2 |
3 files changed, 25 insertions, 6 deletions
@@ -1,3 +1,14 @@ +2003-11-06 Xan Lopez <xan@masilla.org> + + * embed/downloader-view.c: (download_changed_cb): + + Use kB, MB and GB for the total size of the files being downloaded. + Fixes #126387 + + * embed/mozilla/ContentHandler.cpp: + + Small cleanup. + 2003-11-06 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-completion-model.c: (ephy_completion_model_iter_next): diff --git a/embed/downloader-view.c b/embed/downloader-view.c index ff5d03633..c4738f5f8 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -74,7 +74,6 @@ enum PROP_TREEVIEW, PROP_PAUSE_BUTTON, PROP_ABORT_BUTTON, - PROP_DETAILS_BUTTON }; static const @@ -221,8 +220,6 @@ download_changed_cb (EphyDownload *download, DownloaderView *dv) row_ref = get_row_from_download (dv, download); g_return_if_fail (row_ref != NULL); - total = ephy_download_get_total_progress (download) / 1024; - /* State special casing */ state = ephy_download_get_state (download); switch (state) @@ -245,7 +242,20 @@ download_changed_cb (EphyDownload *download, DownloaderView *dv) break; } - size = g_strdup_printf ("%ld kB", total); + total = ephy_download_get_total_progress (download)/1024; + if (total <= 1024) + { + size = g_strdup_printf ("%ld kB", total); + } + else if (total <= 1024*1024) + { + size = g_strdup_printf ("%ld MB", total/1024); + } + else + { + size = g_strdup_printf ("%ld GB", total/(1024*1024)); + } + remaining = format_interval (remaining_secs); path = gtk_tree_row_reference_get_path (row_ref); diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 386c082c2..8f0267d33 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -28,7 +28,6 @@ #include "nsCOMPtr.h" #include "nsString.h" -#include "nsIURI.h" #include "nsIURL.h" #include "nsILocalFile.h" #include "nsIMIMEInfo.h" @@ -360,7 +359,6 @@ NS_METHOD GContentHandler::MIMEAskAction (void) if (NS_FAILED (rv)) return rv; rv = mContentHandler->FindHelperApp (); if (NS_FAILED (rv)) return rv; - } return NS_OK; |