[vlc-devel] commit: Qt4: Save a couple temporaries. (JP Dinger )
git version control
git at videolan.org
Sat Dec 5 22:35:15 CET 2009
vlc | branch: master | JP Dinger <jpd at videolan.org> | Sat Nov 28 19:21:56 2009 +0100| [27e9a1b06377720603c74d1fff39f3d82de633f1] | committer: JP Dinger
Qt4: Save a couple temporaries.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27e9a1b06377720603c74d1fff39f3d82de633f1
---
modules/gui/qt4/components/interface_widgets.cpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 07520e5..595db88 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -619,12 +619,10 @@ void TimeLabel::setDisplayPosition( float pos, int time, int length )
: time );
QString timestr;
- timestr.sprintf( "%s/%s", psz_time,
- ( !length && time ) ? "--:--" : psz_length );
+ timestr.sprintf( " %s%s/%s ", (b_remainingTime && length) ? "-" : "",
+ psz_time, ( !length && time ) ? "--:--" : psz_length );
- /* Add a minus to remaining time*/
- if( b_remainingTime && length ) setText( " -"+timestr+" " );
- else setText( " "+timestr+" " );
+ setText( timestr );
}
void TimeLabel::toggleTimeDisplay()
@@ -635,8 +633,8 @@ void TimeLabel::toggleTimeDisplay()
void TimeLabel::setCaching( float f_cache )
{
QString amount;
- amount.setNum( (int)(100 * f_cache) );
- setText( "Buff: " + amount + "%" );
+ amount.sprintf("Buff: %i%%", (int)(100*f_cache) );
+ setText( amount );
}
More information about the vlc-devel
mailing list