aboutsummaryrefslogtreecommitdiffstats
path: root/embed/downloader-view.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-09 04:03:07 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-09 04:03:07 +0800
commit84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37 (patch)
treee5ce0e95cbb3150baea114979e5811ba469da04e /embed/downloader-view.c
parent8fb008ce37b33a366c009d0f06acf46293c1bcd6 (diff)
downloadgsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar.gz
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar.bz2
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar.lz
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar.xz
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.tar.zst
gsoc2013-epiphany-84a1f9b6d75a64cc6fad2dddbedc058d79d1bf37.zip
More changes for 64bit downloads.
2005-04-08 Christian Persch <chpe@cvs.gnome.org> * embed/downloader-view.c: (format_interval), (update_download_row): * embed/ephy-download.c: (update_remaining_time), (ephy_download_get_remaining_time): * embed/ephy-download.h: * embed/mozilla/mozilla-download.cpp: More changes for 64bit downloads.
Diffstat (limited to 'embed/downloader-view.c')
-rw-r--r--embed/downloader-view.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 83ae90e09..4b518a39a 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -245,16 +245,17 @@ downloader_view_new (void)
}
static char *
-format_interval (long interval)
+format_interval (gint64 interval)
{
- int secs, hours, mins;
- secs = (int)(interval + .5);
- hours = secs / 3600;
- secs -= hours * 3600;
- mins = secs / 60;
- secs -= mins * 60;
-
- if (hours)
+ int hours, mins, secs;
+
+ hours = (int) interval / 3600;
+ interval -= hours * 3600;
+ mins = (int) interval / 60;
+ interval -= mins * 60;
+ secs = (int) interval;
+
+ if (hours > 0)
{
return g_strdup_printf (_("%u:%02u.%02u"), hours, mins, secs);
}
@@ -321,8 +322,7 @@ update_download_row (DownloaderView *dv, EphyDownload *download)
GtkTreePath *path;
GtkTreeIter iter;
EphyDownloadState state;
- long remaining_secs = 0;
- gint64 total, current;
+ gint64 remaining_secs = 0, total, current;
char *remaining, *file, *cur_progress, *name;
struct tm;
int percent = 0;