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
......@@ -36,17 +36,19 @@
#include <vlc_common.h>
#include <vlc_intf_strings.h>
#include <vlc_vout.h> /* vout_thread_t */
#include <vlc_aout.h>
#include <vlc_vout.h> /* vout_thread_t */
#include <vlc_aout.h> /* audio_output_t */
#include "menus.hpp"
#include "main_interface.hpp" /* View modifications */
#include "dialogs_provider.hpp" /* Dialogs display */
#include "input_manager.hpp" /* Input Management */
#include "recents.hpp" /* Recent Items */
#include "actions_manager.hpp" /* Actions Management: play+volume */
#include "extensions_manager.hpp" /* Extensions menu*/
#include "main_interface.hpp" /* View modifications */
#include "dialogs_provider.hpp" /* Dialogs display */
#include "input_manager.hpp" /* Input Management */
#include "recents.hpp" /* Recent Items */
#include "actions_manager.hpp" /* Actions Management: play+volume */
#include "extensions_manager.hpp" /* Extensions menu */
#include "util/qmenuview.hpp" /* Simple Playlist menu */
#include "components/playlist/playlist_model.hpp" /* PLModel getter */
#include <QMenu>
#include <QMenuBar>
......@@ -1062,6 +1064,15 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
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 */
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