Changeset 525 for trunk/gtk/main.c


Ignore:
Timestamp:
Jul 4, 2006, 10:31:14 PM (16 years ago)
Author:
joshe
Message:

Move the ETA cap of 99:59:59 from libtransmission to the MacOS X GUI.
Display the ETA better in the GTK GUI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r468 r525  
    679679dfname(GtkTreeViewColumn *col SHUTUP, GtkCellRenderer *rend,
    680680       GtkTreeModel *model, GtkTreeIter *iter, gpointer gdata SHUTUP) {
    681   char *name, *mb, *terr, *str, *top, *bottom;
     681  char *name, *mb, *terr, *str, *top, *bottom, *timestr;
    682682  guint64 size;
    683683  gfloat prog;
     
    701701  else if(status & TR_STATUS_DOWNLOAD) {
    702702    if(0 > eta)
    703       top = g_strdup_printf(_("Finishing in --:--:-- (%.1f%%)"), prog);
    704     else
    705       top = g_strdup_printf(_("Finishing in %02i:%02i:%02i (%.1f%%)"),
    706                             eta / 60 / 60, eta / 60 % 60, eta % 60, prog);
     703      top = g_strdup_printf(_("Stalled (%.1f%%)"), prog);
     704    else {
     705      timestr = readabletime(eta);
     706      top = g_strdup_printf(_("Finishing in %s (%.1f%%)"), timestr, prog);
     707      g_free(timestr);
     708    }
    707709  }
    708710  else if(status & TR_STATUS_SEED)
Note: See TracChangeset for help on using the changeset viewer.