[vlc-commits] Qt: correctly init loop button state
Jean-Baptiste Kempf
git at videolan.org
Wed Aug 24 16:13:41 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Aug 24 16:12:45 2011 +0200| [fa94475a3c6b6fb5cc6943dd3a86d81a404a90e4] | committer: Jean-Baptiste Kempf
Qt: correctly init loop button state
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa94475a3c6b6fb5cc6943dd3a86d81a404a90e4
---
modules/gui/qt4/components/controller.cpp | 3 ++-
modules/gui/qt4/input_manager.hpp | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 1a64014..fb956e2 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -435,7 +435,8 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
setupButton( loopButton );
loopButton->setToolTip( qtr( "Click to toggle between loop all, loop one and no loop") );
loopButton->setCheckable( true );
- loopButton->updateButtonIcons( NORMAL );
+ int i_state = 2 * var_GetBool( THEPL, "loop" ) + var_GetBool( THEPL, "repeat" );
+ loopButton->updateButtonIcons( i_state );
CONNECT( THEMIM, repeatLoopChanged( int ), loopButton, updateButtonIcons( int ) );
CONNECT( loopButton, clicked(), THEMIM, loopRepeatLoopStatus() );
widget = loopButton;
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index a20d998..a03801a 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -73,8 +73,8 @@ enum {
};
enum { NORMAL, /* loop: 0, repeat: 0 */
- REPEAT_ONE,/* loop: 1, repeat: 0 */
- REPEAT_ALL,/* loop: 0, repeat: 1 */
+ REPEAT_ONE,/* loop: 0, repeat: 1 */
+ REPEAT_ALL,/* loop: 1, repeat: 0 */
};
class IMEvent : public QEvent
More information about the vlc-commits
mailing list