Commit 10962a57 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Qt: add the popup menu in the main interface

parent 7410f0f5
...@@ -256,6 +256,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -256,6 +256,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Playlist */ /* Playlist */
if( b_visible ) togglePlaylist(); 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 */ /* Final sizing and showing */
setMinimumWidth( __MAX( controls->sizeHint().width(), setMinimumWidth( __MAX( controls->sizeHint().width(),
menuBar()->sizeHint().width() ) ); menuBar()->sizeHint().width() ) );
...@@ -647,6 +652,11 @@ void MainInterface::toggleFSC() ...@@ -647,6 +652,11 @@ void MainInterface::toggleFSC()
QApplication::postEvent( fullscreenControls, eShow ); QApplication::postEvent( fullscreenControls, eShow );
} }
void MainInterface::popupMenu()
{
QVLCMenu::PopupMenu( p_intf, true );
}
void MainInterface::debug() void MainInterface::debug()
{ {
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -159,6 +159,7 @@ public slots: ...@@ -159,6 +159,7 @@ public slots:
void toggleAdvanced(); void toggleAdvanced();
void toggleFullScreen(); void toggleFullScreen();
void toggleFSC(); void toggleFSC();
void popupMenu();
/* Manage the Video Functions from the vout threads */ /* Manage the Video Functions from the vout threads */
void releaseVideoSlot( void ); void releaseVideoSlot( void );
......
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