mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
(trunk qt) #3706 "improve torrent details" -- committed patch from Longinus00
This commit is contained in:
parent
0a64fd4b40
commit
2087241a62
1 changed files with 10 additions and 17 deletions
|
@ -373,32 +373,25 @@ Details :: refresh( )
|
|||
{
|
||||
const double d = 100.0 * ( sizeWhenDone ? ( sizeWhenDone - leftUntilDone ) / sizeWhenDone : 1 );
|
||||
QString pct = Formatter::percentToString( d );
|
||||
QString astr;
|
||||
|
||||
if( sizeWhenDone )
|
||||
astr = Formatter::percentToString( ( 100.0 * available ) / sizeWhenDone );
|
||||
else
|
||||
astr = "100";
|
||||
|
||||
if( !haveUnverified && !leftUntilDone )
|
||||
{
|
||||
string = tr( "%1 (%2%)" )
|
||||
.arg( Formatter::sizeToString( haveVerified + haveUnverified ) )
|
||||
.arg( pct );
|
||||
string = tr( "%1 (100%)" )
|
||||
.arg( Formatter::sizeToString( haveVerified ) );
|
||||
}
|
||||
else if( !haveUnverified )
|
||||
{
|
||||
string = tr( "%1 (%2% of %3% Available)" )
|
||||
.arg( Formatter::sizeToString( haveVerified + haveUnverified ) )
|
||||
.arg( pct )
|
||||
.arg( astr );
|
||||
string = tr( "%1 of %2 (%3%)" )
|
||||
.arg( Formatter::sizeToString( haveVerified ) )
|
||||
.arg( Formatter::sizeToString( sizeWhenDone ) )
|
||||
.arg( pct );
|
||||
}
|
||||
else
|
||||
{
|
||||
string = tr( "%1 (%2% of %3% Available) + %4 Unverified" )
|
||||
string = tr( "%1 of %2% (%3%), %4 Unverified" )
|
||||
.arg( Formatter::sizeToString( haveVerified + haveUnverified ) )
|
||||
.arg( Formatter::sizeToString( sizeWhenDone ) )
|
||||
.arg( pct )
|
||||
.arg( astr )
|
||||
.arg( Formatter::sizeToString( haveUnverified ) );
|
||||
}
|
||||
}
|
||||
|
@ -428,7 +421,7 @@ Details :: refresh( )
|
|||
const QString dstr = Formatter::sizeToString( d );
|
||||
const QString fstr = Formatter::sizeToString( f );
|
||||
if( f )
|
||||
string = tr( "%1 (+%2 corrupt)" ).arg( dstr ).arg( fstr );
|
||||
string = tr( "%1 (%2 corrupt)" ).arg( dstr ).arg( fstr );
|
||||
else
|
||||
string = dstr;
|
||||
}
|
||||
|
@ -846,7 +839,6 @@ Details :: createInfoTab( )
|
|||
HIG * hig = new HIG( this );
|
||||
|
||||
hig->addSectionTitle( tr( "Activity" ) );
|
||||
hig->addRow( tr( "Torrent size:" ), mySizeLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Have:" ), myHaveLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Availability:" ), myAvailabilityLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Downloaded:" ), myDownloadedLabel = new SqueezeLabel );
|
||||
|
@ -860,6 +852,7 @@ Details :: createInfoTab( )
|
|||
|
||||
hig->addSectionDivider( );
|
||||
hig->addSectionTitle( tr( "Details" ) );
|
||||
hig->addRow( tr( "Size:" ), mySizeLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Location:" ), myLocationLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Hash:" ), myHashLabel = new SqueezeLabel );
|
||||
hig->addRow( tr( "Privacy:" ), myPrivacyLabel = new SqueezeLabel );
|
||||
|
|
Loading…
Reference in a new issue