[vlc-devel] commit: Qt: set TimeLabel to --:--/--:-- when input is stopped. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Jan 17 19:17:21 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jan 17 17:37:07 2009 +0100| [3b2c84632093ba93e024268a882b94aba1f4e945] | committer: Jean-Baptiste Kempf 

Qt: set TimeLabel to --:--/--:-- when input is stopped.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b2c84632093ba93e024268a882b94aba1f4e945
---

 modules/gui/qt4/components/interface_widgets.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 365c879..4010472 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -463,7 +463,11 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf  ) :QLabel(), p_intf( _p_intf )
 
 void TimeLabel::setDisplayPosition( float pos, int time, int length )
 {
-    VLC_UNUSED( pos );
+    if( pos == -1 )
+    {
+        setText( " --:--/--:-- " );
+        return;
+    }
 
     char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE];
     secstotimestr( psz_length, length );




More information about the vlc-devel mailing list