diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-06-28 15:36:47 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-06-28 15:36:47 +0800 |
commit | 0a7c1a7da1081845d5833486e7524cafd04f5989 (patch) | |
tree | e635814eb164180d75ead465be15875a1e2e756d /embed | |
parent | 33dd5a32b5c97b6bb5d0bd8039bd52bae4eb7b67 (diff) | |
download | gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar.gz gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar.bz2 gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar.lz gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar.xz gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.tar.zst gsoc2013-epiphany-0a7c1a7da1081845d5833486e7524cafd04f5989.zip |
Set done size to total size on download completed
2003-06-28 Marco Pesenti Gritti <marco@it.gnome.org>
* embed/downloader-view.c: (downloader_view_update_controls),
(downloader_view_set_download_info):
Set done size to total size on download completed
Diffstat (limited to 'embed')
-rw-r--r-- | embed/downloader-view.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c index adc3b210a..23aa59ea2 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -371,7 +371,7 @@ downloader_view_update_controls (DownloaderViewPrivate *priv) { gtk_button_set_label (GTK_BUTTON (priv->pause_button), _("_Pause")); } - + g_free (info); } @@ -489,13 +489,17 @@ downloader_view_set_download_info (DownloaderViewPrivate *priv, details->download_started = TRUE; downloader_view_update_controls (priv); } - + /* Progress */ if (details->status == DOWNLOAD_STATUS_COMPLETED) { details->progress = 1; + if (details->size_total > 0) + { + details->size_done = details->size_total; + } } - + sprintf (buffer, "%.1f%%", details->progress > 0 ? details->progress * 100.0 : @@ -533,10 +537,10 @@ downloader_view_set_download_info (DownloaderViewPrivate *priv, { sprintf (buffer, details->progress > 0 ? - _("00.00") : - _("Unknown")); + _("00.00") : + _("Unknown")); } - + gtk_list_store_set (GTK_LIST_STORE (priv->model), iter, COL_REMAINING, buffer, |