[vlc-commits] Qt: add the playlist view selection to the main menu
Jean-Baptiste Kempf
git at videolan.org
Mon Aug 27 14:35:55 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 27 14:35:29 2012 +0200| [305917c3ba7a30833238c8862cc1bfd051df86c3] | committer: Jean-Baptiste Kempf
Qt: add the playlist view selection to the main menu
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=305917c3ba7a30833238c8862cc1bfd051df86c3
---
modules/gui/qt4/components/playlist/playlist.hpp | 4 +++-
modules/gui/qt4/main_interface.cpp | 8 +++++++-
modules/gui/qt4/main_interface.hpp | 2 ++
modules/gui/qt4/menus.cpp | 3 +++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist.hpp b/modules/gui/qt4/components/playlist/playlist.hpp
index ea1c1ba..ff5c267 100644
--- a/modules/gui/qt4/components/playlist/playlist.hpp
+++ b/modules/gui/qt4/components/playlist/playlist.hpp
@@ -57,10 +57,12 @@ public:
void forceHide();
void forceShow();
QStackedWidget *artContainer;
+ StandardPLPanel *mainView;
+
private:
QSplitter *leftSplitter;
QSplitter *split;
- StandardPLPanel *mainView;
+
PLSelector *selector;
LocationBar *locationBar;
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 98bdb40..05f5888 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -933,7 +933,13 @@ int MainInterface::getControlsVisibilityStatus()
{
if( !controls ) return 0;
return( (controls->isVisible() ? CONTROLS_VISIBLE : CONTROLS_HIDDEN )
- + CONTROLS_ADVANCED * controls->b_advancedVisible );
+ + CONTROLS_ADVANCED * controls->b_advancedVisible );
+}
+
+StandardPLPanel *MainInterface::getPlaylistView()
+{
+ if( !playlistWidget ) return NULL;
+ else return playlistWidget->mainView;
}
void MainInterface::setStatusBarVisibility( bool b_visible )
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 78745ce..ae0a624 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -54,6 +54,7 @@ class SpeedControlWidget;
class QVBoxLayout;
class QMenu;
class QSize;
+class StandardPLPanel;
enum {
CONTROLS_VISIBLE = 0x1,
@@ -87,6 +88,7 @@ public:
int getControlsVisibilityStatus();
bool isPlDocked() { return ( b_plDocked != false ); }
bool isInterfaceFullScreen() { return b_interfaceFullScreen; }
+ StandardPLPanel* getPlaylistView();
protected:
void dropEventPlay( QDropEvent* event, bool b_play ) { dropEventPlay(event, b_play, true); }
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index af45129..f8bd1e5 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -49,6 +49,7 @@
#include "extensions_manager.hpp" /* Extensions menu */
#include "util/qmenuview.hpp" /* Simple Playlist menu */
#include "components/playlist/playlist_model.hpp" /* PLModel getter */
+#include "components/playlist/standardpanel.hpp" /* PLView getter */
#include <QMenu>
#include <QMenuBar>
@@ -474,6 +475,8 @@ QMenu *VLCMenuBar::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterfac
qtr( "Play&list" ), mi,
SLOT( togglePlaylist() ), qtr( "Ctrl+L" ) );
+ if( mi->getPlaylistView() )
+ menu->addMenu( StandardPLPanel::viewSelectionMenu( mi->getPlaylistView() ) );
menu->addSeparator();
/* Minimal View */
More information about the vlc-commits
mailing list