Commit 367c7701 authored by Jakob Leben's avatar Jakob Leben

Qt: playlist menu strings and icons

parent 1497d96c
...@@ -54,26 +54,26 @@ ...@@ -54,26 +54,26 @@
#define I_POP_DEL N_("Delete") #define I_POP_DEL N_("Delete")
#define I_POP_INFO N_("Information...") #define I_POP_INFO N_("Information...")
#define I_POP_SORT N_("Sort") #define I_POP_SORT N_("Sort")
#define I_POP_ADD N_("Add Node") #define I_POP_NEWFOLDER N_("Create Folder...")
#define I_POP_STREAM N_("Stream...") #define I_POP_STREAM N_("Stream...")
#define I_POP_SAVE N_("Save...") #define I_POP_SAVE N_("Save...")
#define I_POP_EXPLORE N_("Open Folder...") #define I_POP_EXPLORE N_("Show Containing Folder...")
/*************** Playlist *************/ /*************** Playlist *************/
#define I_PL_LOOP N_("Repeat all") #define I_PL_LOOP N_("Repeat All")
#define I_PL_REPEAT N_("Repeat one") #define I_PL_REPEAT N_("Repeat One")
#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_("Random off") #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")
#define I_PL_ADDF N_("Add file...") #define I_PL_ADDF N_("Add File...")
#define I_PL_ADVADD N_("Advanced open...") #define I_PL_ADVADD N_("Advanced Open...")
#define I_PL_ADDDIR N_("Add directory...") #define I_PL_ADDDIR N_("Add Folder...")
#define I_PL_SAVE N_("Save Playlist to &File...") #define I_PL_SAVE N_("Save Playlist to &File...")
#define I_PL_LOAD N_("Open Play&list...") #define I_PL_LOAD N_("Open Play&list...")
......
...@@ -896,31 +896,35 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode ...@@ -896,31 +896,35 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
QMenu menu; QMenu menu;
if( i_popup_item > -1 ) if( i_popup_item > -1 )
{ {
menu.addAction( qtr(I_POP_PLAY), this, SLOT( popupPlay() ) ); menu.addAction( QIcon( ":/menu/play" ), qtr(I_POP_PLAY), this, SLOT( popupPlay() ) );
menu.addAction( qtr(I_POP_DEL), this, SLOT( popupDel() ) ); menu.addAction( QIcon( ":/buttons/playlist/playlist_remove" ),
qtr(I_POP_DEL), this, SLOT( popupDel() ) );
menu.addSeparator(); menu.addSeparator();
menu.addAction( qtr(I_POP_STREAM), this, SLOT( popupStream() ) ); menu.addAction( QIcon( ":/menu/stream" ),
qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) ); menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
menu.addSeparator(); menu.addSeparator();
menu.addAction( qtr(I_POP_INFO), this, SLOT( popupInfo() ) ); menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
menu.addAction( qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) ); menu.addAction( QIcon( ":/type/folder-grey" ),
qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
} }
if( canEdit() ) if( canEdit() )
{ {
QIcon addIcon( ":/buttons/playlist/playlist_add" );
menu.addSeparator(); menu.addSeparator();
if( tree ) menu.addAction( qtr(I_POP_ADD) + QString("..."), this, SLOT( popupAddNode() ) ); if( tree ) menu.addAction( addIcon, qtr(I_POP_NEWFOLDER), this, SLOT( popupAddNode() ) );
if( rootItem->i_id == THEPL->p_playing->i_id ) if( rootItem->i_id == THEPL->p_playing->i_id )
{ {
menu.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simplePLAppendDialog()) ); menu.addAction( addIcon, qtr(I_PL_ADDF), THEDP, SLOT( simplePLAppendDialog()) );
menu.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) ); menu.addAction( addIcon, qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) );
menu.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( PLAppendDialog()) ); menu.addAction( addIcon, qtr(I_OP_ADVOP), THEDP, SLOT( PLAppendDialog()) );
} }
else if( THEPL->p_media_library && else if( THEPL->p_media_library &&
rootItem->i_id == THEPL->p_media_library->i_id ) rootItem->i_id == THEPL->p_media_library->i_id )
{ {
menu.addAction( qtr(I_PL_ADDF), THEDP, SLOT( simpleMLAppendDialog()) ); menu.addAction( addIcon, qtr(I_PL_ADDF), THEDP, SLOT( simpleMLAppendDialog()) );
menu.addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) ); menu.addAction( addIcon, qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) );
menu.addAction( qtr(I_OP_ADVOP), THEDP, SLOT( MLAppendDialog() ) ); menu.addAction( addIcon, qtr(I_OP_ADVOP), THEDP, SLOT( MLAppendDialog() ) );
} }
} }
if( i_popup_item > -1 ) if( i_popup_item > -1 )
...@@ -1030,7 +1034,7 @@ void PLModel::popupAddNode() ...@@ -1030,7 +1034,7 @@ void PLModel::popupAddNode()
{ {
bool ok; bool ok;
QString name = QInputDialog::getText( PlaylistDialog::getInstance( p_intf ), QString name = QInputDialog::getText( PlaylistDialog::getInstance( p_intf ),
qtr( I_POP_ADD ), qtr( "Enter name for new folder:" ), qtr( "Create Folder" ), qtr( "Enter name for new folder:" ),
QLineEdit::Normal, QString(), &ok); QLineEdit::Normal, QString(), &ok);
if( !ok || name.isEmpty() ) return; if( !ok || name.isEmpty() ) return;
PL_LOCK; PL_LOCK;
......
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