diff --git a/gtk/details.c b/gtk/details.c index b09a58bc5..d4cae3a4f 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -617,8 +617,8 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) { int i; const char * str; - const char * none = _( "None" ); const char * mixed = _( "Mixed" ); + const char * no_torrent = _( "No Torrents Selected" ); const char * stateString; char buf[512]; uint64_t available = 0; @@ -632,7 +632,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* privacy_lb */ if( n<=0 ) - str = none; + str = no_torrent; else { const tr_bool baseline = infos[0]->isPrivate; for( i=1; icreator ? infos[0]->creator : ""; const time_t date = infos[0]->dateCreated; @@ -696,7 +696,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* destination_lb */ if( n<=0 ) - str = none; + str = no_torrent; else { const char * baseline = tr_torrentGetDownloadDir( torrents[0] ); for( i=1; idestination_lb ), str ); /* state_lb */ - if( n < 1 ) - str = none; + if( n<=0 ) + str = no_torrent; else { const tr_torrent_activity activity = stats[0]->activity; tr_bool allFinished = stats[0]->finished; @@ -728,8 +728,8 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* date started */ - if( n < 1 ) - str = none; + if( n<=0 ) + str = no_torrent; else { const time_t baseline = stats[0]->startDate; for( i=1; ieta; for( i=1; i= 0 ) { char piecebuf[128]; tr_formatter_mem_B( piecebuf, pieceSize, sizeof( piecebuf ) ); @@ -801,7 +801,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* have_lb */ if( n <= 0 ) - str = none; + str = no_torrent; else { uint64_t leftUntilDone = 0; uint64_t haveUnchecked = 0; @@ -818,7 +818,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) available += st->sizeWhenDone - st->leftUntilDone + st->desiredAvailable; } if( !haveValid && !haveUnchecked ) - str = none; + str = ""; else { char buf2[32], unver[64], total[64]; const double ratio = 100.0 * ( leftUntilDone ? ( haveValid + haveUnchecked ) / (double)sizeWhenDone : 1 ); @@ -836,7 +836,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* availability_lb */ if( !sizeWhenDone ) - str = none; + str = ""; else { char buf2[32]; const double d = ( 100.0 * available ) / sizeWhenDone; @@ -848,7 +848,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* dl_lb */ if( n <= 0 ) - str = none; + str = no_torrent; else { char dbuf[64], fbuf[64]; uint64_t d=0, f=0; @@ -869,7 +869,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* ul_lb */ if( n <= 0 ) - str = none; + str = no_torrent; else { uint64_t sum = 0; for( i=0; iuploadedEver; @@ -880,7 +880,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* ratio */ if( n <= 0 ) - str = none; + str = no_torrent; else { uint64_t up = 0; uint64_t down = 0; @@ -893,8 +893,8 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) gtr_label_set_text( GTK_LABEL( di->ratio_lb ), str ); /* hash_lb */ - if( n<=0 ) - str = none; + if( n <= 0 ) + str = no_torrent; else if ( n==1 ) str = infos[0]->hashString; else @@ -903,7 +903,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n ) /* error */ if( n <= 0 ) - str = none; + str = no_torrent; else { const char * baseline = stats[0]->errorString; for( i=1; ierror_lb ), str ); /* activity date */ if( n <= 0 ) - str = none; + str = no_torrent; else { time_t latest = 0; for( i=0; iactivityDate ) latest = stats[i]->activityDate; if( latest <= 0 ) - str = none; + str = _( "Never" ); else { const int period = time( NULL ) - latest; if( period < 5 ) diff --git a/gtk/util.c b/gtk/util.c index 2950081d6..bcafab9d8 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -158,7 +158,7 @@ char* tr_strlsize( char * buf, guint64 bytes, size_t buflen ) { if( !bytes ) - g_strlcpy( buf, _( "None" ), buflen ); + g_strlcpy( buf, _( "size|None" ), buflen ); else tr_formatter_size_B( buf, bytes, buflen );