Commit 50a2677b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Adding a Fast Playlist access in the right-click menus

As asked by Laurent
Close #4722
parent 6196b032
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_intf_strings.h> #include <vlc_intf_strings.h>
#include <vlc_vout.h> /* vout_thread_t */ #include <vlc_vout.h> /* vout_thread_t */
#include <vlc_aout.h> #include <vlc_aout.h> /* audio_output_t */
#include "menus.hpp" #include "menus.hpp"
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
#include "input_manager.hpp" /* Input Management */ #include "input_manager.hpp" /* Input Management */
#include "recents.hpp" /* Recent Items */ #include "recents.hpp" /* Recent Items */
#include "actions_manager.hpp" /* Actions Management: play+volume */ #include "actions_manager.hpp" /* Actions Management: play+volume */
#include "extensions_manager.hpp" /* Extensions menu*/ #include "extensions_manager.hpp" /* Extensions menu */
#include "util/qmenuview.hpp" /* Simple Playlist menu */
#include "components/playlist/playlist_model.hpp" /* PLModel getter */
#include <QMenu> #include <QMenu>
#include <QMenuBar> #include <QMenuBar>
...@@ -1062,6 +1064,15 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -1062,6 +1064,15 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
menu->addMenu( submenu ); menu->addMenu( submenu );
} }
/* */
QMenuView *plMenu = new QMenuView( menu );
plMenu->setTitle( qtr("Playlist") );
PLModel *model = PLModel::getPLModel( p_intf );
plMenu->setModel( model );
CONNECT( plMenu, activated(const QModelIndex&),
model, activateItem(const QModelIndex&));
menu->addMenu( plMenu );
/* Static entries for ending, like open */ /* Static entries for ending, like open */
PopupMenuStaticEntries( menu ); PopupMenuStaticEntries( menu );
......
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