]> git.sesse.net Git - vlc/commitdiff
Qt: random button is now just a checkable button and doesn't change icon nor tooltip.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 28 Feb 2009 00:39:17 +0000 (01:39 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 28 Feb 2009 00:39:17 +0000 (01:39 +0100)
This fixes the previous behaviour that was confusing.

modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/vlc.qrc

index 6b57047e85bbf1533958bc7b98e96d60f01ae121..35b4fd0451a46932861a999fd505520302f2e4df 100644 (file)
@@ -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()
index 0e5aef322a05d3d8ce4055b192ff6fef1744639c..e74f5bbf3c1ee3ad2f9c89069a1c4e5e8e3f135a 100644 (file)
@@ -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>