Commit f56088f1 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

Qt: menus: rename MenusManager to MenuBar.

as *Manager seems disliked.
(cherry picked from commit 2dc2da86b9506620e1eeb657b3a99eeac0b59012)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e89fc639
...@@ -272,7 +272,7 @@ void BackgroundWidget::paintEvent( QPaintEvent *e ) ...@@ -272,7 +272,7 @@ void BackgroundWidget::paintEvent( QPaintEvent *e )
void BackgroundWidget::contextMenuEvent( QContextMenuEvent *event ) void BackgroundWidget::contextMenuEvent( QContextMenuEvent *event )
{ {
QVLCMenuManager::PopupMenu( p_intf, true ); VLCMenuBar::PopupMenu( p_intf, true );
event->accept(); event->accept();
} }
......
...@@ -120,7 +120,7 @@ void StandardPLPanel::popupPlView( const QPoint &point ) ...@@ -120,7 +120,7 @@ void StandardPLPanel::popupPlView( const QPoint &point )
QModelIndexList list = selection->selectedIndexes(); QModelIndexList list = selection->selectedIndexes();
if( !model->popup( index, globalPoint, list ) ) if( !model->popup( index, globalPoint, list ) )
QVLCMenuManager::PopupMenu( p_intf, true ); VLCMenuBar::PopupMenu( p_intf, true );
} }
void StandardPLPanel::popupSelectColumn( QPoint ) void StandardPLPanel::popupSelectColumn( QPoint )
......
...@@ -102,10 +102,10 @@ DialogsProvider::~DialogsProvider() ...@@ -102,10 +102,10 @@ DialogsProvider::~DialogsProvider()
delete menusUpdateMapper; delete menusUpdateMapper;
delete SDMapper; delete SDMapper;
QVLCMenuManager::PopupMenu( p_intf, false ); VLCMenuBar::PopupMenu( p_intf, false );
QVLCMenuManager::AudioPopupMenu( p_intf, false ); VLCMenuBar::AudioPopupMenu( p_intf, false );
QVLCMenuManager::VideoPopupMenu( p_intf, false ); VLCMenuBar::VideoPopupMenu( p_intf, false );
QVLCMenuManager::MiscPopupMenu( p_intf, false ); VLCMenuBar::MiscPopupMenu( p_intf, false );
} }
void DialogsProvider::quit() void DialogsProvider::quit()
...@@ -152,13 +152,13 @@ void DialogsProvider::customEvent( QEvent *event ) ...@@ -152,13 +152,13 @@ void DialogsProvider::customEvent( QEvent *event )
vlmDialog(); break; vlmDialog(); break;
#endif #endif
case INTF_DIALOG_POPUPMENU: case INTF_DIALOG_POPUPMENU:
QVLCMenuManager::PopupMenu( p_intf, (de->i_arg != 0) ); break; VLCMenuBar::PopupMenu( p_intf, (de->i_arg != 0) ); break;
case INTF_DIALOG_AUDIOPOPUPMENU: case INTF_DIALOG_AUDIOPOPUPMENU:
QVLCMenuManager::AudioPopupMenu( p_intf, (de->i_arg != 0) ); break; VLCMenuBar::AudioPopupMenu( p_intf, (de->i_arg != 0) ); break;
case INTF_DIALOG_VIDEOPOPUPMENU: case INTF_DIALOG_VIDEOPOPUPMENU:
QVLCMenuManager::VideoPopupMenu( p_intf, (de->i_arg != 0) ); break; VLCMenuBar::VideoPopupMenu( p_intf, (de->i_arg != 0) ); break;
case INTF_DIALOG_MISCPOPUPMENU: case INTF_DIALOG_MISCPOPUPMENU:
QVLCMenuManager::MiscPopupMenu( p_intf, (de->i_arg != 0) ); break; VLCMenuBar::MiscPopupMenu( p_intf, (de->i_arg != 0) ); break;
case INTF_DIALOG_WIZARD: case INTF_DIALOG_WIZARD:
case INTF_DIALOG_STREAMWIZARD: case INTF_DIALOG_STREAMWIZARD:
openAndStreamingDialogs(); break; openAndStreamingDialogs(); break;
...@@ -724,7 +724,7 @@ void DialogsProvider::loadSubtitlesFile() ...@@ -724,7 +724,7 @@ void DialogsProvider::loadSubtitlesFile()
void DialogsProvider::menuAction( QObject *data ) void DialogsProvider::menuAction( QObject *data )
{ {
QVLCMenuManager::DoAction( data ); VLCMenuBar::DoAction( data );
} }
void DialogsProvider::menuUpdateAction( QObject *data ) void DialogsProvider::menuUpdateAction( QObject *data )
......
...@@ -83,12 +83,12 @@ enum { ...@@ -83,12 +83,12 @@ enum {
class QEvent; class QEvent;
class QSignalMapper; class QSignalMapper;
class QVLCMenuManager; class VLCMenuBar;
class DialogsProvider : public QObject class DialogsProvider : public QObject
{ {
Q_OBJECT Q_OBJECT
friend class QVLCMenuManager; friend class VLCMenuBar;
public: public:
static DialogsProvider *getInstance() static DialogsProvider *getInstance()
......
...@@ -146,7 +146,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -146,7 +146,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/************ /************
* Menu Bar * * Menu Bar *
************/ ************/
QVLCMenuManager::createMenuBar( this, p_intf ); VLCMenuBar::createMenuBar( this, p_intf );
CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ), CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
this, destroyPopupMenu() ); this, destroyPopupMenu() );
...@@ -570,12 +570,12 @@ inline void MainInterface::showTab( QWidget *widget ) ...@@ -570,12 +570,12 @@ inline void MainInterface::showTab( QWidget *widget )
void MainInterface::destroyPopupMenu() void MainInterface::destroyPopupMenu()
{ {
QVLCMenuManager::PopupMenu( p_intf, false ); VLCMenuBar::PopupMenu( p_intf, false );
} }
void MainInterface::popupMenu( const QPoint & ) void MainInterface::popupMenu( const QPoint & )
{ {
QVLCMenuManager::PopupMenu( p_intf, true ); VLCMenuBar::PopupMenu( p_intf, true );
} }
void MainInterface::toggleFSC() void MainInterface::toggleFSC()
...@@ -1002,7 +1002,7 @@ void MainInterface::createSystray() ...@@ -1002,7 +1002,7 @@ void MainInterface::createSystray()
systrayMenu = new QMenu( qtr( "VLC media player" ), this ); systrayMenu = new QMenu( qtr( "VLC media player" ), this );
systrayMenu->setIcon( iconVLC ); systrayMenu->setIcon( iconVLC );
QVLCMenuManager::updateSystrayMenu( this, p_intf, true ); VLCMenuBar::updateSystrayMenu( this, p_intf, true );
sysTray->show(); sysTray->show();
CONNECT( sysTray, activated( QSystemTrayIcon::ActivationReason ), CONNECT( sysTray, activated( QSystemTrayIcon::ActivationReason ),
...@@ -1062,7 +1062,7 @@ void MainInterface::toggleUpdateSystrayMenu() ...@@ -1062,7 +1062,7 @@ void MainInterface::toggleUpdateSystrayMenu()
#endif #endif
} }
if( sysTray ) if( sysTray )
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
} }
/* First Item of the systray menu */ /* First Item of the systray menu */
...@@ -1074,14 +1074,14 @@ void MainInterface::showUpdateSystrayMenu() ...@@ -1074,14 +1074,14 @@ void MainInterface::showUpdateSystrayMenu()
showNormal(); showNormal();
activateWindow(); activateWindow();
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
} }
/* First Item of the systray menu */ /* First Item of the systray menu */
void MainInterface::hideUpdateSystrayMenu() void MainInterface::hideUpdateSystrayMenu()
{ {
hide(); hide();
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
} }
/* Click on systray Icon */ /* Click on systray Icon */
...@@ -1093,7 +1093,7 @@ void MainInterface::handleSystrayClick( ...@@ -1093,7 +1093,7 @@ void MainInterface::handleSystrayClick(
case QSystemTrayIcon::Trigger: case QSystemTrayIcon::Trigger:
case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::DoubleClick:
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
#else #else
toggleUpdateSystrayMenu(); toggleUpdateSystrayMenu();
#endif #endif
...@@ -1128,7 +1128,7 @@ void MainInterface::updateSystrayTooltipName( const QString& name ) ...@@ -1128,7 +1128,7 @@ void MainInterface::updateSystrayTooltipName( const QString& name )
} }
} }
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
} }
/** /**
...@@ -1149,7 +1149,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status ) ...@@ -1149,7 +1149,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
sysTray->setToolTip( qtr( "VLC media player" ) ); sysTray->setToolTip( qtr( "VLC media player" ) );
break; break;
} }
QVLCMenuManager::updateSystrayMenu( this, p_intf ); VLCMenuBar::updateSystrayMenu( this, p_intf );
} }
void MainInterface::changeEvent(QEvent *event) void MainInterface::changeEvent(QEvent *event)
......
...@@ -82,7 +82,7 @@ enum ...@@ -82,7 +82,7 @@ enum
static QActionGroup *currentGroup; static QActionGroup *currentGroup;
QMenu *QVLCMenuManager::recentsMenu = NULL; QMenu *VLCMenuBar::recentsMenu = NULL;
/** /**
* @brief Add static entries to DP in menus * @brief Add static entries to DP in menus
...@@ -113,7 +113,7 @@ QAction *addDPStaticEntry( QMenu *menu, ...@@ -113,7 +113,7 @@ QAction *addDPStaticEntry( QMenu *menu,
else else
action = menu->addAction( text, THEDP, member ); action = menu->addAction( text, THEDP, member );
} }
action->setData( QVLCMenuManager::ACTION_STATIC ); action->setData( VLCMenuBar::ACTION_STATIC );
return action; return action;
} }
...@@ -139,9 +139,9 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf, ...@@ -139,9 +139,9 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
{ {
action = menu->addAction( text, THEMIM, member ); action = menu->addAction( text, THEMIM, member );
} }
action->setData( QVLCMenuManager::ACTION_STATIC | action->setData( VLCMenuBar::ACTION_STATIC |
( bStatic ) ? QVLCMenuManager::ACTION_ALWAYS_ENABLED ( bStatic ) ? VLCMenuBar::ACTION_ALWAYS_ENABLED
: QVLCMenuManager::ACTION_NONE : VLCMenuBar::ACTION_NONE
); );
return action; return action;
} }
...@@ -151,7 +151,7 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf, ...@@ -151,7 +151,7 @@ QAction* addMIMStaticEntry( intf_thread_t *p_intf,
* @param menu the menu in which the entries will be disabled * @param menu the menu in which the entries will be disabled
* @param enable if false, disable all entries * @param enable if false, disable all entries
**/ **/
void QVLCMenuManager::EnableStaticEntries( QMenu *menu, bool enable = true ) void VLCMenuBar::EnableStaticEntries( QMenu *menu, bool enable = true )
{ {
if( !menu ) return; if( !menu ) return;
...@@ -180,7 +180,7 @@ inline int DeleteNonStaticEntries( QMenu *menu ) ...@@ -180,7 +180,7 @@ inline int DeleteNonStaticEntries( QMenu *menu )
QList< QAction* > actions = menu->actions(); QList< QAction* > actions = menu->actions();
for( int i = 0; i < actions.count(); ++i ) for( int i = 0; i < actions.count(); ++i )
{ {
if( actions[i]->data().toInt() & QVLCMenuManager::ACTION_NO_CLEANUP ) if( actions[i]->data().toInt() & VLCMenuBar::ACTION_NO_CLEANUP )
i_ret++; i_ret++;
else else
delete actions[i]; delete actions[i];
...@@ -306,7 +306,7 @@ static inline void addActionWithCheckbox( QMenu *_menu, QVariant val, QString ti ...@@ -306,7 +306,7 @@ static inline void addActionWithCheckbox( QMenu *_menu, QVariant val, QString ti
/** /**
* Main Menu Bar Creation * Main Menu Bar Creation
**/ **/
void QVLCMenuManager::createMenuBar( MainInterface *mi, void VLCMenuBar::createMenuBar( MainInterface *mi,
intf_thread_t *p_intf ) intf_thread_t *p_intf )
{ {
/* QMainWindows->menuBar() /* QMainWindows->menuBar()
...@@ -334,7 +334,7 @@ void QVLCMenuManager::createMenuBar( MainInterface *mi, ...@@ -334,7 +334,7 @@ void QVLCMenuManager::createMenuBar( MainInterface *mi,
* Media ( File ) Menu * Media ( File ) Menu
* Opening, streaming and quit * Opening, streaming and quit
**/ **/
QMenu *QVLCMenuManager::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainInterface *mi ) QMenu *VLCMenuBar::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainInterface *mi )
{ {
QMenu *menu = new QMenu( parent ); QMenu *menu = new QMenu( parent );
QAction *action; QAction *action;
...@@ -398,7 +398,7 @@ QMenu *QVLCMenuManager::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainIn ...@@ -398,7 +398,7 @@ QMenu *QVLCMenuManager::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainIn
/** /**
* Tools, like Media Information, Preferences or Messages * Tools, like Media Information, Preferences or Messages
**/ **/
QMenu *QVLCMenuManager::ToolsMenu( QMenu *menu ) QMenu *VLCMenuBar::ToolsMenu( QMenu *menu )
{ {
addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/menu/settings", addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/menu/settings",
SLOT( extendedDialog() ), "Ctrl+E" ); SLOT( extendedDialog() ), "Ctrl+E" );
...@@ -440,7 +440,7 @@ QMenu *QVLCMenuManager::ToolsMenu( QMenu *menu ) ...@@ -440,7 +440,7 @@ QMenu *QVLCMenuManager::ToolsMenu( QMenu *menu )
* Interface modification, load other interfaces, activate Extensions * Interface modification, load other interfaces, activate Extensions
* \param current, set to NULL for menu creation, else for menu update * \param current, set to NULL for menu creation, else for menu update
**/ **/
QMenu *QVLCMenuManager::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface *_mi ) QMenu *VLCMenuBar::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInterface *_mi )
{ {
QAction *action; QAction *action;
QMenu *menu; QMenu *menu;
...@@ -531,7 +531,7 @@ QMenu *QVLCMenuManager::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInt ...@@ -531,7 +531,7 @@ QMenu *QVLCMenuManager::ViewMenu( intf_thread_t *p_intf, QMenu *current, MainInt
/** /**
* Interface Sub-Menu, to list extras interface and skins * Interface Sub-Menu, to list extras interface and skins
**/ **/
QMenu *QVLCMenuManager::InterfacesMenu( intf_thread_t *p_intf, QMenu *current ) QMenu *VLCMenuBar::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
{ {
QVector<vlc_object_t *> objects; QVector<vlc_object_t *> objects;
QVector<const char *> varnames; QVector<const char *> varnames;
...@@ -544,7 +544,7 @@ QMenu *QVLCMenuManager::InterfacesMenu( intf_thread_t *p_intf, QMenu *current ) ...@@ -544,7 +544,7 @@ QMenu *QVLCMenuManager::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
/** /**
* Extensions menu: populate the current menu with extensions * Extensions menu: populate the current menu with extensions
**/ **/
void QVLCMenuManager::ExtensionsMenu( intf_thread_t *p_intf, QMenu *extMenu ) void VLCMenuBar::ExtensionsMenu( intf_thread_t *p_intf, QMenu *extMenu )
{ {
/* Get ExtensionsManager and load extensions if needed */ /* Get ExtensionsManager and load extensions if needed */
ExtensionsManager *extMgr = ExtensionsManager::getInstance( p_intf ); ExtensionsManager *extMgr = ExtensionsManager::getInstance( p_intf );
...@@ -571,19 +571,19 @@ static inline void VolumeEntries( intf_thread_t *p_intf, QMenu *current ) ...@@ -571,19 +571,19 @@ static inline void VolumeEntries( intf_thread_t *p_intf, QMenu *current )
QAction *action = current->addAction( qtr( "Increase Volume" ), QAction *action = current->addAction( qtr( "Increase Volume" ),
ActionsManager::getInstance( p_intf ), SLOT( AudioUp() ) ); ActionsManager::getInstance( p_intf ), SLOT( AudioUp() ) );
action->setData( QVLCMenuManager::ACTION_STATIC ); action->setData( VLCMenuBar::ACTION_STATIC );
action = current->addAction( qtr( "Decrease Volume" ), action = current->addAction( qtr( "Decrease Volume" ),
ActionsManager::getInstance( p_intf ), SLOT( AudioDown() ) ); ActionsManager::getInstance( p_intf ), SLOT( AudioDown() ) );
action->setData( QVLCMenuManager::ACTION_STATIC ); action->setData( VLCMenuBar::ACTION_STATIC );
action = current->addAction( qtr( "Mute" ), action = current->addAction( qtr( "Mute" ),
ActionsManager::getInstance( p_intf ), SLOT( toggleMuteAudio() ) ); ActionsManager::getInstance( p_intf ), SLOT( toggleMuteAudio() ) );
action->setData( QVLCMenuManager::ACTION_STATIC ); action->setData( VLCMenuBar::ACTION_STATIC );
} }
/** /**
* Main Audio Menu * Main Audio Menu
**/ **/
QMenu *QVLCMenuManager::AudioMenu( intf_thread_t *p_intf, QMenu * current ) QMenu *VLCMenuBar::AudioMenu( intf_thread_t *p_intf, QMenu * current )
{ {
QVector<vlc_object_t *> objects; QVector<vlc_object_t *> objects;
QVector<const char *> varnames; QVector<const char *> varnames;
...@@ -614,7 +614,7 @@ QMenu *QVLCMenuManager::AudioMenu( intf_thread_t *p_intf, QMenu * current ) ...@@ -614,7 +614,7 @@ QMenu *QVLCMenuManager::AudioMenu( intf_thread_t *p_intf, QMenu * current )
} }
/* Subtitles */ /* Subtitles */
QMenu *QVLCMenuManager::SubtitleMenu( QMenu *current ) QMenu *VLCMenuBar::SubtitleMenu( QMenu *current )
{ {
QAction *action; QAction *action;
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current ); QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
...@@ -630,7 +630,7 @@ QMenu *QVLCMenuManager::SubtitleMenu( QMenu *current ) ...@@ -630,7 +630,7 @@ QMenu *QVLCMenuManager::SubtitleMenu( QMenu *current )
* Main Video Menu * Main Video Menu
* Subtitles are part of Video. * Subtitles are part of Video.
**/ **/
QMenu *QVLCMenuManager::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subtitle ) QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subtitle )
{ {
vout_thread_t *p_vout; vout_thread_t *p_vout;
input_thread_t *p_input; input_thread_t *p_input;
...@@ -687,7 +687,7 @@ QMenu *QVLCMenuManager::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b ...@@ -687,7 +687,7 @@ QMenu *QVLCMenuManager::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b
* Navigation Menu * Navigation Menu
* For DVD, MP4, MOV and other chapter based format * For DVD, MP4, MOV and other chapter based format
**/ **/
QMenu *QVLCMenuManager::NavigMenu( intf_thread_t *p_intf, QMenu *menu ) QMenu *VLCMenuBar::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
{ {
QAction *action; QAction *action;
QMenu *submenu; QMenu *submenu;
...@@ -715,7 +715,7 @@ QMenu *QVLCMenuManager::NavigMenu( intf_thread_t *p_intf, QMenu *menu ) ...@@ -715,7 +715,7 @@ QMenu *QVLCMenuManager::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
return RebuildNavigMenu( p_intf, menu ); return RebuildNavigMenu( p_intf, menu );
} }
QMenu *QVLCMenuManager::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu ) QMenu *VLCMenuBar::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu )
{ {
/* */ /* */
input_thread_t *p_object; input_thread_t *p_object;
...@@ -742,7 +742,7 @@ QMenu *QVLCMenuManager::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu ) ...@@ -742,7 +742,7 @@ QMenu *QVLCMenuManager::RebuildNavigMenu( intf_thread_t *p_intf, QMenu *menu )
/** /**
* Help/About Menu * Help/About Menu
**/ **/
QMenu *QVLCMenuManager::HelpMenu( QWidget *parent ) QMenu *VLCMenuBar::HelpMenu( QWidget *parent )
{ {
QMenu *menu = new QMenu( parent ); QMenu *menu = new QMenu( parent );
addDPStaticEntry( menu, qtr( "&Help..." ) , addDPStaticEntry( menu, qtr( "&Help..." ) ,
...@@ -774,7 +774,7 @@ QMenu *QVLCMenuManager::HelpMenu( QWidget *parent ) ...@@ -774,7 +774,7 @@ QMenu *QVLCMenuManager::HelpMenu( QWidget *parent )
Populate( p_intf, menu, varnames, objects ); \ Populate( p_intf, menu, varnames, objects ); \
menu->popup( QCursor::pos() ); \ menu->popup( QCursor::pos() ); \
void QVLCMenuManager::PopupPlayEntries( QMenu *menu, void VLCMenuBar::PopupPlayEntries( QMenu *menu,
intf_thread_t *p_intf, intf_thread_t *p_intf,
input_thread_t *p_input ) input_thread_t *p_input )
{ {
...@@ -796,7 +796,7 @@ void QVLCMenuManager::PopupPlayEntries( QMenu *menu, ...@@ -796,7 +796,7 @@ void QVLCMenuManager::PopupPlayEntries( QMenu *menu,
} }
} }
void QVLCMenuManager::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf, void VLCMenuBar::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf,
bool b_normal ) bool b_normal )
{ {
QAction *action; QAction *action;
...@@ -861,7 +861,7 @@ void QVLCMenuManager::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_int ...@@ -861,7 +861,7 @@ void QVLCMenuManager::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_int
menu->addSeparator(); menu->addSeparator();
} }
void QVLCMenuManager::PopupMenuPlaylistControlEntries( QMenu *menu, void VLCMenuBar::PopupMenuPlaylistControlEntries( QMenu *menu,
intf_thread_t *p_intf ) intf_thread_t *p_intf )
{ {
bool bEnable = THEMIM->getInput() != NULL; bool bEnable = THEMIM->getInput() != NULL;
...@@ -889,7 +889,7 @@ void QVLCMenuManager::PopupMenuPlaylistControlEntries( QMenu *menu, ...@@ -889,7 +889,7 @@ void QVLCMenuManager::PopupMenuPlaylistControlEntries( QMenu *menu,
menu->addSeparator(); menu->addSeparator();
} }
void QVLCMenuManager::PopupMenuStaticEntries( QMenu *menu ) void VLCMenuBar::PopupMenuStaticEntries( QMenu *menu )
{ {
QMenu *openmenu = new QMenu( qtr( "Open a Media" ), menu ); QMenu *openmenu = new QMenu( qtr( "Open a Media" ), menu );
addDPStaticEntry( openmenu, qtr( "&Open File..." ), addDPStaticEntry( openmenu, qtr( "&Open File..." ),
...@@ -916,7 +916,7 @@ void QVLCMenuManager::PopupMenuStaticEntries( QMenu *menu ) ...@@ -916,7 +916,7 @@ void QVLCMenuManager::PopupMenuStaticEntries( QMenu *menu )
} }
/* Video Tracks and Subtitles tracks */ /* Video Tracks and Subtitles tracks */
void QVLCMenuManager::VideoPopupMenu( intf_thread_t *p_intf, bool show ) void VLCMenuBar::VideoPopupMenu( intf_thread_t *p_intf, bool show )
{ {
POPUP_BOILERPLATE POPUP_BOILERPLATE
if( p_input ) if( p_input )
...@@ -932,7 +932,7 @@ void QVLCMenuManager::VideoPopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -932,7 +932,7 @@ void QVLCMenuManager::VideoPopupMenu( intf_thread_t *p_intf, bool show )
} }
/* Audio Tracks */ /* Audio Tracks */
void QVLCMenuManager::AudioPopupMenu( intf_thread_t *p_intf, bool show ) void VLCMenuBar::AudioPopupMenu( intf_thread_t *p_intf, bool show )
{ {
POPUP_BOILERPLATE POPUP_BOILERPLATE
if( p_input ) if( p_input )
...@@ -946,7 +946,7 @@ void QVLCMenuManager::AudioPopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -946,7 +946,7 @@ void QVLCMenuManager::AudioPopupMenu( intf_thread_t *p_intf, bool show )
} }
/* Navigation stuff, and general menus ( open ), used only for skins */ /* Navigation stuff, and general menus ( open ), used only for skins */
void QVLCMenuManager::MiscPopupMenu( intf_thread_t *p_intf, bool show ) void VLCMenuBar::MiscPopupMenu( intf_thread_t *p_intf, bool show )
{ {
POPUP_BOILERPLATE POPUP_BOILERPLATE
...@@ -974,7 +974,7 @@ void QVLCMenuManager::MiscPopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -974,7 +974,7 @@ void QVLCMenuManager::MiscPopupMenu( intf_thread_t *p_intf, bool show )
} }
/* Main Menu that sticks everything together */ /* Main Menu that sticks everything together */
void QVLCMenuManager::PopupMenu( intf_thread_t *p_intf, bool show ) void VLCMenuBar::PopupMenu( intf_thread_t *p_intf, bool show )
{ {
POPUP_BOILERPLATE POPUP_BOILERPLATE
...@@ -1102,7 +1102,7 @@ void QVLCMenuManager::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -1102,7 +1102,7 @@ void QVLCMenuManager::PopupMenu( intf_thread_t *p_intf, bool show )
* Systray Menu * * Systray Menu *
************************************************************************/ ************************************************************************/
void QVLCMenuManager::updateSystrayMenu( MainInterface *mi, void VLCMenuBar::updateSystrayMenu( MainInterface *mi,
intf_thread_t *p_intf, intf_thread_t *p_intf,
bool b_force_visible ) bool b_force_visible )
{ {
...@@ -1150,7 +1150,7 @@ void QVLCMenuManager::updateSystrayMenu( MainInterface *mi, ...@@ -1150,7 +1150,7 @@ void QVLCMenuManager::updateSystrayMenu( MainInterface *mi,
/************************************************************************* /*************************************************************************
* Builders for automenus * Builders for automenus
*************************************************************************/ *************************************************************************/
QMenu * QVLCMenuManager::Populate( intf_thread_t *p_intf, QMenu * VLCMenuBar::Populate( intf_thread_t *p_intf,
QMenu *current, QMenu *current,
QVector< const char *> & varnames, QVector< const char *> & varnames,
QVector<vlc_object_t *> & objects ) QVector<vlc_object_t *> & objects )
...@@ -1223,7 +1223,7 @@ static bool IsMenuEmpty( const char *psz_var, ...@@ -1223,7 +1223,7 @@ static bool IsMenuEmpty( const char *psz_var,
#define TEXT_OR_VAR qfu ( text.psz_string ? text.psz_string : psz_var ) #define TEXT_OR_VAR qfu ( text.psz_string ? text.psz_string : psz_var )
void QVLCMenuManager::UpdateItem( intf_thread_t *p_intf, QMenu *menu, void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
const char *psz_var, vlc_object_t *p_object, bool b_submenu ) const char *psz_var, vlc_object_t *p_object, bool b_submenu )
{ {
vlc_value_t val, text; vlc_value_t val, text;
...@@ -1358,7 +1358,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var ) ...@@ -1358,7 +1358,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
} }
int QVLCMenuManager::CreateChoicesMenu( QMenu *submenu, const char *psz_var, int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
vlc_object_t *p_object, bool b_root ) vlc_object_t *p_object, bool b_root )
{ {
vlc_value_t val, val_list, text_list; vlc_value_t val, val_list, text_list;
...@@ -1454,7 +1454,7 @@ int QVLCMenuManager::CreateChoicesMenu( QMenu *submenu, const char *psz_var, ...@@ -1454,7 +1454,7 @@ int QVLCMenuManager::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
return submenu->isEmpty() ? VLC_EGENERIC : VLC_SUCCESS; return submenu->isEmpty() ? VLC_EGENERIC : VLC_SUCCESS;
} }
void QVLCMenuManager::CreateAndConnect( QMenu *menu, const char *psz_var, void VLCMenuBar::CreateAndConnect( QMenu *menu, const char *psz_var,
const QString& text, const QString& help, const QString& text, const QString& help,
int i_item_type, vlc_object_t *p_obj, int i_item_type, vlc_object_t *p_obj,
vlc_value_t val, int i_val_type, vlc_value_t val, int i_val_type,
...@@ -1501,7 +1501,7 @@ void QVLCMenuManager::CreateAndConnect( QMenu *menu, const char *psz_var, ...@@ -1501,7 +1501,7 @@ void QVLCMenuManager::CreateAndConnect( QMenu *menu, const char *psz_var,
menu->addAction( action ); menu->addAction( action );
} }
void QVLCMenuManager::DoAction( QObject *data ) void VLCMenuBar::DoAction( QObject *data )
{ {
MenuItemData *itemData = qobject_cast<MenuItemData *>( data ); MenuItemData *itemData = qobject_cast<MenuItemData *>( data );
vlc_object_t *p_object = itemData->p_obj; vlc_object_t *p_object = itemData->p_obj;
...@@ -1515,7 +1515,7 @@ void QVLCMenuManager::DoAction( QObject *data ) ...@@ -1515,7 +1515,7 @@ void QVLCMenuManager::DoAction( QObject *data )
var_Set( p_object, itemData->psz_var, itemData->val ); var_Set( p_object, itemData->psz_var, itemData->val );
} }
void QVLCMenuManager::updateRecents( intf_thread_t *p_intf ) void VLCMenuBar::updateRecents( intf_thread_t *p_intf )
{ {
if( recentsMenu ) if( recentsMenu )
{ {
......
...@@ -69,7 +69,7 @@ private: ...@@ -69,7 +69,7 @@ private:
int i_val_type; int i_val_type;
}; };
class QVLCMenuManager : public QObject class VLCMenuBar : public QObject
{ {
Q_OBJECT Q_OBJECT
friend class MenuFunc; friend class MenuFunc;
...@@ -155,7 +155,7 @@ private: ...@@ -155,7 +155,7 @@ private:
public slots: public slots:
static void updateRecents( intf_thread_t * ); static void updateRecents( intf_thread_t * );
}; };
Q_DECLARE_OPERATORS_FOR_FLAGS(QVLCMenuManager::actionflags) Q_DECLARE_OPERATORS_FOR_FLAGS(VLCMenuBar::actionflags)
class MenuFunc : public QObject class MenuFunc : public QObject
{ {
...@@ -169,10 +169,10 @@ public: ...@@ -169,10 +169,10 @@ public:
{ {
switch( id ) switch( id )
{ {
case 1: QVLCMenuManager::AudioMenu( p_intf, menu ); break; case 1: VLCMenuBar::AudioMenu( p_intf, menu ); break;
case 2: QVLCMenuManager::VideoMenu( p_intf, menu ); break; case 2: VLCMenuBar::VideoMenu( p_intf, menu ); break;
case 3: QVLCMenuManager::RebuildNavigMenu( p_intf, menu ); break; case 3: VLCMenuBar::RebuildNavigMenu( p_intf, menu ); break;
case 4: QVLCMenuManager::ViewMenu( p_intf, menu ); break; case 4: VLCMenuBar::ViewMenu( p_intf, menu ); break;
} }
} }
private: private:
......
...@@ -103,7 +103,7 @@ void RecentsMRL::addRecent( const QString &mrl ) ...@@ -103,7 +103,7 @@ void RecentsMRL::addRecent( const QString &mrl )
if( stack->count() > RECENTS_LIST_SIZE ) if( stack->count() > RECENTS_LIST_SIZE )
stack->takeLast(); stack->takeLast();
} }
QVLCMenuManager::updateRecents( p_intf ); VLCMenuBar::updateRecents( p_intf );
save(); save();
} }
...@@ -113,7 +113,7 @@ void RecentsMRL::clear() ...@@ -113,7 +113,7 @@ void RecentsMRL::clear()
return; return;
stack->clear(); stack->clear();
if( isActive ) QVLCMenuManager::updateRecents( p_intf ); if( isActive ) VLCMenuBar::updateRecents( p_intf );
save(); save();
} }
......
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