Changeset 9280
- Timestamp:
- Oct 10, 2009, 8:42:23 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/details.c
r9275 r9280 71 71 GtkWidget * error_lb; 72 72 GtkWidget * date_started_lb; 73 GtkWidget * eta_lb; 73 74 GtkWidget * last_activity_lb; 74 75 … … 731 732 } 732 733 gtk_label_set_text( GTK_LABEL( di->date_started_lb ), str ); 734 735 736 /* eta */ 737 if( n <= 0 ) 738 str = none; 739 else { 740 const int baseline = stats[0]->eta; 741 for( i=1; i<n; ++i ) 742 if( baseline != stats[i]->eta ) 743 break; 744 if( i!=n ) 745 str = mixed; 746 else if( baseline < 0 ) 747 str = _( "Unknown" ); 748 else 749 str = tr_strltime( buf, baseline, sizeof( buf ) ); 750 } 751 gtk_label_set_text( GTK_LABEL( di->eta_lb ), str ); 752 733 753 734 754 … … 941 961 l = di->date_started_lb = gtk_label_new( NULL ); 942 962 hig_workarea_add_row( t, &row, _( "Running time:" ), l, NULL ); 963 964 /* eta */ 965 l = di->eta_lb = gtk_label_new( NULL ); 966 hig_workarea_add_row( t, &row, _( "Remaining time:" ), l, NULL ); 943 967 944 968 /* last activity */ -
trunk/qt/details.cc
r9247 r9280 330 330 331 331 332 // myETALabel 333 string.clear( ); 334 if( torrents.empty( ) ) 335 string = none; 336 else { 337 int baseline = torrents[0]->getETA( ); 338 foreach( const Torrent * t, torrents ) { 339 if( baseline != t->getETA( ) ) { 340 string = mixed; 341 break; 342 } 343 } 344 if( string.isEmpty( ) ) { 345 if( baseline < 0 ) 346 string = tr( "Unknown" ); 347 else 348 string = Utils::timeToString( baseline ); 349 } 350 } 351 myETALabel->setText( string ); 352 353 332 354 // myLastActivityLabel 333 355 if( torrents.empty( ) ) … … 792 814 hig->addRow( tr( "State:" ), myStateLabel = new SqueezeLabel ); 793 815 hig->addRow( tr( "Running time:" ), myRunTimeLabel = new SqueezeLabel ); 816 hig->addRow( tr( "Remaining time:" ), myETALabel = new SqueezeLabel ); 794 817 hig->addRow( tr( "Last activity:" ), myLastActivityLabel = new SqueezeLabel ); 795 818 hig->addRow( tr( "Error:" ), myErrorLabel = new SqueezeLabel ); -
trunk/qt/details.h
r9179 r9280 77 77 QLabel * myErrorLabel; 78 78 QLabel * myRunTimeLabel; 79 QLabel * myETALabel; 79 80 QLabel * myLastActivityLabel; 80 81
Note: See TracChangeset
for help on using the changeset viewer.