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