[vlc-commits] Qt, add a previous/reset function, when time < 10s
Jean-Baptiste Kempf
git at videolan.org
Thu Apr 21 17:55:42 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr 21 17:45:16 2011 +0200| [7c2000c33953bb6820d40aa667bfaacb3f8c20a7] | committer: Jean-Baptiste Kempf
Qt, add a previous/reset function, when time < 10s
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c2000c33953bb6820d40aa667bfaacb3f8c20a7
---
modules/gui/qt4/input_manager.cpp | 8 ++++++++
modules/gui/qt4/input_manager.hpp | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index e9ee7c7..dcf68ab 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1106,6 +1106,14 @@ void MainInputManager::prev()
playlist_Prev( THEPL );
}
+void MainInputManager::prevOrReset()
+{
+ if( !p_input || var_GetTime( p_input , "time") < 10000 )
+ playlist_Prev( THEPL );
+ else
+ getIM()->sliderUpdate( 0.0 );
+}
+
void MainInputManager::togglePlayPause()
{
/* No input, play */
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 4701102..db9db7e 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -277,6 +277,7 @@ public slots:
void stop();
void next();
void prev();
+ void prevOrReset();
void activatePlayQuit( bool );
void loopRepeatLoopStatus();
More information about the vlc-commits
mailing list