[vlc-devel] commit: Qt: add the popup menu in the main interface (Jean-Philippe Andre )
git version control
git at videolan.org
Sat Mar 7 09:27:11 CET 2009
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Thu Feb 19 21:51:46 2009 +0800| [10962a57ff7652aba71f606229304558270da095] | committer: Jean-Philippe Andre
Qt: add the popup menu in the main interface
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10962a57ff7652aba71f606229304558270da095
---
modules/gui/qt4/main_interface.cpp | 10 ++++++++++
modules/gui/qt4/main_interface.hpp | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index e91d12a..5f1eb0f 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -256,6 +256,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Playlist */
if( b_visible ) togglePlaylist();
+ /* Enable the popup menu in the MI */
+ setContextMenuPolicy( Qt::CustomContextMenu );
+ CONNECT( this, customContextMenuRequested( const QPoint& ),
+ this, popupMenu() );
+
/* Final sizing and showing */
setMinimumWidth( __MAX( controls->sizeHint().width(),
menuBar()->sizeHint().width() ) );
@@ -647,6 +652,11 @@ void MainInterface::toggleFSC()
QApplication::postEvent( fullscreenControls, eShow );
}
+void MainInterface::popupMenu()
+{
+ QVLCMenu::PopupMenu( p_intf, true );
+}
+
void MainInterface::debug()
{
#ifndef NDEBUG
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 4034eb5..6ca203c 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -159,6 +159,7 @@ public slots:
void toggleAdvanced();
void toggleFullScreen();
void toggleFSC();
+ void popupMenu();
/* Manage the Video Functions from the vout threads */
void releaseVideoSlot( void );
More information about the vlc-devel
mailing list