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