[vlc-devel] commit: Qt reverse for trickplay: show the button by default, and show it only when trickplay is possible. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Feb 21 11:49:03 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 21 11:46:09 2009 +0100| [e6072d0d9ce86621feadde64471f749671f15b8b] | committer: Jean-Baptiste Kempf 

Qt reverse for trickplay: show the button by default, and show it only when trickplay is possible.

It is based on the "can-rewind" variable. This may be wrong, if so, tell me so and I'll revert this.

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

 modules/gui/qt4/components/controller.cpp |    5 ++++-
 modules/gui/qt4/components/controller.hpp |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 3cb2d23..e1aaad1 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -79,6 +79,9 @@ void AbstractController::setStatus( int status )
 
     emit inputIsRecordable( b_hasInput &&
                             var_GetBool( THEMIM->getInput(), "can-record" ) );
+
+    emit inputIsTrickPlayable( b_hasInput &&
+                            var_GetBool( THEMIM->getInput(), "can-rewind" ) );
 }
 
 /* Generic button setup */
@@ -383,7 +386,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
         reverseButton->setCheckable( true );
         /* You should, of COURSE change this to the correct event,
            when/if we have one, that tells us if trickplay is possible . */
-        CONNECT( this, inputExists( bool ), reverseButton, setVisible( bool ) );
+        CONNECT( this, inputIsTrickPlayable( bool ), reverseButton, setVisible( bool ) );
         reverseButton->setVisible( false );
         widget = reverseButton;
         }
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 43ae9be..4a6b73e 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -38,7 +38,7 @@
 #define MAIN_TB1_DEFAULT "64;39;64;38;65"
 #define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;10;9;64-4;37;65;35-4"
 #define ADV_TB_DEFAULT "12;11;13;14"
-#define INPT_TB_DEFAULT "5-1;33;6-1"
+#define INPT_TB_DEFAULT "5-1;15-1;33;6-1"
 #define FSC_TB_DEFAULT "0-2;64;3;1;4;64;37;64;38;64;8;65;35-4;34"
 
 
@@ -162,6 +162,7 @@ signals:
     void inputExists( bool ); /// This might be usefull in the IM ?
     void inputPlaying( bool ); /// This might be usefull in the IM ?
     void inputIsRecordable( bool ); /// same ?
+    void inputIsTrickPlayable( bool ); /// same ?
 };
 
 /* Advanced Button Bar */




More information about the vlc-devel mailing list