Commit 34d5eedc authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: random button is now just a checkable button and doesn't change icon nor tooltip.

This fixes the previous behaviour that was confusing.
parent 25407b7f
......@@ -118,16 +118,9 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Random 2-state button */
randomButton = new QPushButton( this );
if( model->hasRandom() )
{
randomButton->setIcon( QIcon( ":/shuffle_on" ));
randomButton->setToolTip( qtr( I_PL_RANDOM ));
}
else
{
randomButton->setIcon( QIcon( ":/shuffle_off" ) );
randomButton->setToolTip( qtr( I_PL_NORANDOM ));
}
randomButton->setIcon( QIcon( ":/shuffle_on" ));
randomButton->setToolTip( qtr( I_PL_RANDOM ));
randomButton->setCheckable( true );
BUTTONACT( randomButton, toggleRandom() );
buttons->addWidget( randomButton );
......@@ -204,10 +197,6 @@ void StandardPLPanel::toggleRandom()
{
bool prev = model->hasRandom();
model->setRandom( !prev );
randomButton->setIcon( prev ?
QIcon( ":/shuffle_off" ) :
QIcon( ":/shuffle_on" ) );
randomButton->setToolTip( prev ? qtr( I_PL_NORANDOM ) : qtr(I_PL_RANDOM ) );
}
void StandardPLPanel::gotoPlayingItem()
......
......@@ -39,7 +39,6 @@
<file alias="repeat_all">pixmaps/playlist/repeat_all.png</file>
<file alias="repeat_off">pixmaps/playlist/repeat_off.png</file>
<file alias="repeat_one">pixmaps/playlist/repeat_one.png</file>
<file alias="shuffle_off">pixmaps/playlist/shuffle_off.png</file>
<file alias="shuffle_on">pixmaps/playlist/shuffle_on.png</file>
<file alias="jump_to">pixmaps/playlist/jumpto.png</file>
<file alias="type_directory">pixmaps/types/type_directory.png</file>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment