]> granicus.if.org Git - transmission/commitdiff
(trunk qt) use the unicode up/down arrows as in the GTK+ client
authorCharles Kerr <charles@transmissionbt.com>
Sat, 24 Jul 2010 23:51:02 +0000 (23:51 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sat, 24 Jul 2010 23:51:02 +0000 (23:51 +0000)
qt/torrent-delegate.cc

index c05a5cc2ced58dd89065c749eaaba71f86f9d3cd..5b42fca10b0c05b12efd9a37005e8b08f2e90386 100644 (file)
@@ -160,6 +160,8 @@ TorrentDelegate :: progressString( const Torrent& tor ) const
 QString
 TorrentDelegate :: shortTransferString( const Torrent& tor ) const
 {
+    static const QChar upArrow( 0x2191 );
+    static const QChar downArrow( 0x2193 );
     const bool haveMeta( tor.hasMetadata( ) );
     const bool haveDown( haveMeta && tor.peersWeAreDownloadingFrom( ) > 0 );
     const bool haveUp( haveMeta && tor.peersWeAreUploadingTo( ) > 0 );
@@ -171,11 +173,11 @@ TorrentDelegate :: shortTransferString( const Torrent& tor ) const
         upStr = Formatter::speedToString( tor.uploadSpeed( ) );
 
     if( haveDown && haveUp )
-        str = tr( "Down: %1, Up: %2" ).arg(downStr).arg(upStr);
+        str = tr( "%1 %2, %3 %4" ).arg(downArrow).arg(downStr).arg(upArrow).arg(upStr);
     else if( haveDown )
-        str = tr( "Down: %1" ).arg( downStr );
+        str = tr( "%1 %2" ).arg(downArrow).arg(downStr);
     else if( haveUp )
-        str = tr( "Up: %1" ).arg( upStr );
+        str = tr( "%1 %2" ).arg(upArrow).arg(upStr);
     else if( tor.hasMetadata( ) )
         str = tr( "Idle" );