Changeset 5538
- Timestamp:
- Apr 6, 2008, 2:42:15 PM (15 years ago)
- Location:
- branches/1.1x
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1x/gtk/torrent-cell-renderer.c
r5537 r5538 84 84 GString * gstr = g_string_new( str ); 85 85 g_string_append( gstr, " - " ); 86 if( eta == TR_ETA_NOT_AVAIL ) 87 g_string_append( gstr, _( "Not available" ) ); 88 else if( eta == TR_ETA_UNKNOWN ) 86 if( eta < 0 ) 89 87 g_string_append( gstr, _( "Stalled" ) ); 90 88 else { -
branches/1.1x/gtk/tr-torrent.c
r5537 r5538 285 285 286 286 case TR_STATUS_DOWNLOAD: 287 288 if( eta == TR_ETA_NOT_AVAIL ) 289 top = g_strdup_printf( _("Not available (%.1f%%)" ), prog ); 290 else if( eta == TR_ETA_UNKNOWN ) 291 top = g_strdup_printf( _( "Stalled (%.1f%%)" ), prog ); 287 if( eta < 0 ) 288 top = g_strdup_printf( _("Stalled (%.1f%%)"), prog ); 292 289 else { 293 290 char timestr[128]; -
branches/1.1x/libtransmission/torrent.c
r5537 r5538 625 625 s->activityDate = tor->activityDate; 626 626 627 s->eta = s->rateDownload < 0.1 628 ? -1.0f 629 : (s->leftUntilDone / s->rateDownload / 1024.0); 630 627 631 s->corruptEver = tor->corruptCur + tor->corruptPrev; 628 632 s->downloadedEver = tor->downloadedCur + tor->downloadedPrev; … … 654 658 tr_bitfieldFree( availablePieces ); 655 659 } 656 657 if( s->desiredAvailable != s->leftUntilDone )658 s->eta = TR_ETA_NOT_AVAIL;659 else if( s->rateDownload < 0.1 )660 s->eta = TR_ETA_UNKNOWN;661 else662 s->eta = s->leftUntilDone / (s->rateDownload / 1024.0);663 660 664 661 s->ratio = tr_getRatio( s->uploadedEver, -
branches/1.1x/libtransmission/transmission.h
r5537 r5538 793 793 char errorString[128]; 794 794 795 /* [0..1] */ 795 796 796 float recheckProgress; 797 798 /* [0..1] */799 797 float percentComplete; 800 801 /* [0..1] */802 798 float percentDone; 803 804 /* KiB/s */805 799 float rateDownload; 806 807 /* KiB/s */808 800 float rateUpload; 809 801 810 #define TR_ETA_NOT_AVAIL -1811 #define TR_ETA_UNKNOWN -2812 /* seconds */813 802 int eta; 814 815 803 int peersKnown; 816 804 int peersConnected;
Note: See TracChangeset
for help on using the changeset viewer.