[vlc-devel] commit: Qt: consistency between loop and random buttons. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Feb 28 12:24:17 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 28 12:23:13 2009 +0100| [862258e86722f54e5e9fc417fc8fcd21bfdcc518] | committer: Jean-Baptiste Kempf
Qt: consistency between loop and random buttons.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=862258e86722f54e5e9fc417fc8fcd21bfdcc518
---
.../gui/qt4/components/playlist/standardpanel.cpp | 21 +++++++++++--------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 3b68e98..4ecc873 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -127,20 +127,23 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Repeat 3-state button */
repeatButton = new QPushButton( this );
+ repeatButton->setToolTip( qtr( "Click to toggle between loop one, loop all" ) );
+ repeatButton->setCheckable( true );
+
if( model->hasRepeat() )
{
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
- repeatButton->setToolTip( qtr( I_PL_REPEAT ));
+ repeatButton->setChecked( true );
}
else if( model->hasLoop() )
{
repeatButton->setIcon( QIcon( ":/repeat_all" ) );
- repeatButton->setToolTip( qtr( I_PL_LOOP ));
+ repeatButton->setChecked( true );
}
else
{
- repeatButton->setIcon( QIcon( ":/repeat_off" ) );
- repeatButton->setToolTip( qtr( I_PL_NOREPEAT ));
+ repeatButton->setIcon( QIcon( ":/repeat_one" ) );
+ repeatButton->setChecked( false );
}
BUTTONACT( repeatButton, toggleRepeat() );
buttons->addWidget( repeatButton );
@@ -177,19 +180,19 @@ void StandardPLPanel::toggleRepeat()
{
model->setRepeat( false ); model->setLoop( true );
repeatButton->setIcon( QIcon( ":/repeat_all" ) );
- repeatButton->setToolTip( qtr( I_PL_LOOP ));
+ repeatButton->setChecked( true );
}
else if( model->hasLoop() )
{
model->setRepeat( false ) ; model->setLoop( false );
- repeatButton->setIcon( QIcon( ":/repeat_off" ) );
- repeatButton->setToolTip( qtr( I_PL_NOREPEAT ));
+ repeatButton->setChecked( false );
+ repeatButton->setIcon( QIcon( ":/repeat_one" ) );
}
else
{
- model->setRepeat( true );
+ model->setRepeat( true ); model->setLoop( false );
+ repeatButton->setChecked( true );
repeatButton->setIcon( QIcon( ":/repeat_one" ) );
- repeatButton->setToolTip( qtr( I_PL_REPEAT ));
}
}
More information about the vlc-devel
mailing list