From: Fredrik Tolf Date: Mon, 25 Feb 2008 04:44:45 +0000 (+0100) Subject: Merge branch 'master' of git.dolda2000.com:/srv/git/r/doldaconnect X-Git-Tag: 1.2~18 X-Git-Url: http://dolda2000.com/gitweb/?a=commitdiff_plain;h=24b67b52955f9fe26daad3abf08eb5305a488951;hp=-c;p=doldaconnect.git Merge branch 'master' of git.dolda2000.com:/srv/git/r/doldaconnect --- 24b67b52955f9fe26daad3abf08eb5305a488951 diff --combined clients/gnome-trans-applet/dolcon-trans-applet.c index 5520776,9310a22..e909d0c --- a/clients/gnome-trans-applet/dolcon-trans-applet.c +++ b/clients/gnome-trans-applet/dolcon-trans-applet.c @@@ -80,7 -80,7 +80,7 @@@ static gboolean updatetip(struct applet return(TRUE); } now = time(NULL); - if(data->curdisplay->cmptime == 0) + if((data->curdisplay->cmptime == 0) || (now == data->curdisplay->cmptime)) { strcpy(buf, _("Calculating remaining time...")); } else { @@@ -91,12 -91,7 +91,12 @@@ strcpy(buf, _("Time left: Infinite (Transfer is standing still)")); } else { left = (data->curdisplay->size - data->curdisplay->pos) / speed; - sprintf(buf, _("Time left: %i:%02i"), left / 3600, (left / 60) % 60); + if(left >= 86400) + sprintf(buf, _("Time left: %id%02ih%02im"), left / 86400, (left / 3600) % 24, (left / 60) % 60); + else if(left >= 3600) + sprintf(buf, _("Time left: %ih%02im"), left / 3600, (left / 60) % 60); + else + sprintf(buf, _("Time left: %im"), left / 60); } } gtk_tooltips_set_tip(data->tips, GTK_WIDGET(data->applet), buf, NULL);