Commit 85149ef4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: add a right-click action to save the playlist

parent babcef91
...@@ -1099,6 +1099,8 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons ...@@ -1099,6 +1099,8 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons
case ACTION_ENQUEUEDIR: case ACTION_ENQUEUEDIR:
case ACTION_ENQUEUEGENERIC: case ACTION_ENQUEUEGENERIC:
return canEdit(); return canEdit();
case ACTION_SAVETOPLAYLIST:
return rowCount() > 0;
default: default:
return false; return false;
} }
......
...@@ -221,6 +221,10 @@ bool StandardPLPanel::popup( const QPoint &point ) ...@@ -221,6 +221,10 @@ bool StandardPLPanel::popup( const QPoint &point )
ADD_MENU_ENTRY( QIcon(), qtr(I_PL_ADDPL), ADD_MENU_ENTRY( QIcon(), qtr(I_PL_ADDPL),
VLCModelSubInterface::ACTION_ADDTOPLAYLIST ); VLCModelSubInterface::ACTION_ADDTOPLAYLIST );
menu.addSeparator();
ADD_MENU_ENTRY( QIcon(), qtr( I_PL_SAVE ),
VLCModelSubInterface::ACTION_SAVETOPLAYLIST );
menu.addSeparator(); menu.addSeparator();
/* Item removal */ /* Item removal */
...@@ -375,6 +379,9 @@ void StandardPLPanel::popupAction( QAction *action ) ...@@ -375,6 +379,9 @@ void StandardPLPanel::popupAction( QAction *action )
RecentsMRL::getInstance( p_intf )->addRecent( file ); RecentsMRL::getInstance( p_intf )->addRecent( file );
break; break;
case VLCModelSubInterface::ACTION_SAVETOPLAYLIST:
THEDP->savePlayingToPlaylist();
break;
default: default:
model->action( action, list ); model->action( action, list );
} }
......
...@@ -94,7 +94,8 @@ public: ...@@ -94,7 +94,8 @@ public:
ACTION_CLEAR, ACTION_CLEAR,
ACTION_ENQUEUEFILE, ACTION_ENQUEUEFILE,
ACTION_ENQUEUEDIR, ACTION_ENQUEUEDIR,
ACTION_ENQUEUEGENERIC ACTION_ENQUEUEGENERIC,
ACTION_SAVETOPLAYLIST
}; };
struct actionsContainerType struct actionsContainerType
{ {
......
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