Commit 5d3ccc0d authored by Christophe Mutricy's avatar Christophe Mutricy

standardpanel: Add some tooltips

vlc_intf_strings.h: with the current intf having changing icons on the button (and not activated/desactivated state), tool tips can be confusing. So reword a strings slightly. Also "No repeat" may need to be improve
parent 285ed3d1
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#define I_PL_NOREPEAT N_("No repeat") #define I_PL_NOREPEAT N_("No repeat")
#define I_PL_RANDOM N_("Random") #define I_PL_RANDOM N_("Random")
#define I_PL_NORANDOM N_("No random") #define I_PL_NORANDOM N_("Random off")
#define I_PL_ADDPL N_("Add to playlist") #define I_PL_ADDPL N_("Add to playlist")
#define I_PL_ADDML N_("Add to media library") #define I_PL_ADDML N_("Add to media library")
......
...@@ -94,9 +94,16 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -94,9 +94,16 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
buttons->addWidget( addButton ); buttons->addWidget( addButton );
randomButton = new QPushButton( this ); randomButton = new QPushButton( this );
randomButton->setIcon( model->hasRandom() ? if( model->hasRandom() )
QIcon( ":/pixmaps/playlist_shuffle_on.png" ) : {
QIcon( ":/pixmaps/playlist_shuffle_off.png" ) ); randomButton->setIcon( QIcon( ":/pixmaps/playlist_shuffle_on.png" ));
randomButton->setToolTip( qtr( I_PL_RANDOM ));
}
else
{
randomButton->setIcon( QIcon( ":/pixmaps/playlist_shuffle_off.png" ) );
randomButton->setToolTip( qtr( I_PL_NORANDOM ));
}
BUTTONACT( randomButton, toggleRandom() ); BUTTONACT( randomButton, toggleRandom() );
buttons->addWidget( randomButton ); buttons->addWidget( randomButton );
...@@ -104,12 +111,21 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -104,12 +111,21 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
buttons->addItem( spacer ); buttons->addItem( spacer );
repeatButton = new QPushButton( this ); repeatButton = new QPushButton( this );
if( model->hasRepeat() ) repeatButton->setIcon( if( model->hasRepeat() )
QIcon( ":/pixmaps/playlist_repeat_one.png" ) ); {
else if( model->hasLoop() ) repeatButton->setIcon( repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_one.png" ) );
QIcon( ":/pixmaps/playlist_repeat_all.png" ) ); repeatButton->setToolTip( qtr( I_PL_REPEAT ));
else repeatButton->setIcon( }
QIcon( ":/pixmaps/playlist_repeat_off.png" ) ); else if( model->hasLoop() )
{
repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_all.png" ) );
repeatButton->setToolTip( qtr( I_PL_LOOP ));
}
else
{
repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_off.png" ) );
repeatButton->setToolTip( qtr( I_PL_NOREPEAT ));
}
BUTTONACT( repeatButton, toggleRepeat() ); BUTTONACT( repeatButton, toggleRepeat() );
buttons->addWidget( repeatButton ); buttons->addWidget( repeatButton );
...@@ -122,6 +138,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -122,6 +138,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
QPushButton *clear = new QPushButton( qfu( "CL") ); QPushButton *clear = new QPushButton( qfu( "CL") );
clear->setMaximumWidth( 30 ); clear->setMaximumWidth( 30 );
clear->setToolTip( qtr( "Clear" ));
BUTTONACT( clear, clearFilter() ); BUTTONACT( clear, clearFilter() );
buttons->addWidget( clear ); buttons->addWidget( clear );
...@@ -137,16 +154,19 @@ void StandardPLPanel::toggleRepeat() ...@@ -137,16 +154,19 @@ void StandardPLPanel::toggleRepeat()
{ {
model->setRepeat( false ); model->setLoop( true ); model->setRepeat( false ); model->setLoop( true );
repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_all.png" ) ); repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_all.png" ) );
repeatButton->setToolTip( qtr( I_PL_LOOP ));
} }
else if( model->hasLoop() ) else if( model->hasLoop() )
{ {
model->setRepeat( false ) ; model->setLoop( false ); model->setRepeat( false ) ; model->setLoop( false );
repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_off.png" ) ); repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_off.png" ) );
repeatButton->setToolTip( qtr( I_PL_NOREPEAT ));
} }
else else
{ {
model->setRepeat( true ); model->setRepeat( true );
repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_one.png" ) ); repeatButton->setIcon( QIcon( ":/pixmaps/playlist_repeat_one.png" ) );
repeatButton->setToolTip( qtr( I_PL_REPEAT ));
} }
} }
...@@ -157,6 +177,7 @@ void StandardPLPanel::toggleRandom() ...@@ -157,6 +177,7 @@ void StandardPLPanel::toggleRandom()
randomButton->setIcon( prev ? randomButton->setIcon( prev ?
QIcon( ":/pixmaps/playlist_shuffle_off.png" ) : QIcon( ":/pixmaps/playlist_shuffle_off.png" ) :
QIcon( ":/pixmaps/playlist_shuffle_on.png" ) ); QIcon( ":/pixmaps/playlist_shuffle_on.png" ) );
randomButton->setToolTip( prev ? qtr( I_PL_NORANDOM ) : qtr(I_PL_RANDOM ) );
} }
void StandardPLPanel::handleExpansion( const QModelIndex &index ) void StandardPLPanel::handleExpansion( const QModelIndex &index )
......
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