]> git.sesse.net Git - vlc/commitdiff
Qt4 - Display "--:--" in the status bar when vlc can't guess the total time.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 7 Nov 2007 02:21:04 +0000 (02:21 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 7 Nov 2007 02:21:04 +0000 (02:21 +0000)
I think it is better that way and confuse less the users.

modules/gui/qt4/main_interface.cpp

index c2f778e252b45e52aee14808917b9737543d5914..db283d03777bdc817259718cd74a324acba75ef5 100644 (file)
@@ -658,7 +658,10 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
     secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
                                                            : time );
 
-    QString title; title.sprintf( "%s/%s", psz_time, psz_length );
+    QString title;
+    title.sprintf( "%s/%s", psz_time,
+                            ( !length && time ) ? "--:--" : psz_length );
+
     /* Add a minus to remaining time*/
     if( b_remainingTime && length ) timeLabel->setText( " -"+title+" " );
     else timeLabel->setText( " "+title+" " );