Commit a9d32139 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt, menu: split the subtitle menu from video menu

This is one of the most used function, and thus makes it faster to
activate
parent f3d3e076
......@@ -581,7 +581,7 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
}
/* Subtitles */
void QVLCMenu::SubMenu( intf_thread_t *p_intf, QMenu *current )
QMenu *QVLCMenu::SubMenu( intf_thread_t *p_intf, QMenu *current )
{
QAction *action;
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
......@@ -590,6 +590,7 @@ void QVLCMenu::SubMenu( intf_thread_t *p_intf, QMenu *current )
addDPStaticEntry( submenu, qtr( "Open File..." ), "",
SLOT( loadSubtitlesFile() ) );
submenu->addSeparator();
return submenu;
}
/**
......@@ -965,11 +966,13 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
/* Video menu */
submenu = new QMenu( menu );
action = menu->addMenu( VideoMenu( p_intf, submenu ) );
action = menu->addMenu( VideoMenu( p_intf, submenu, false ) );
action->setText( qtr( "&Video" ) );
if( action->menu()->isEmpty() )
action->setEnabled( false );
SubMenu( p_intf, menu )->setTitle( qtr( "Subti&tle") );
/* Playback menu for chapters */
submenu = new QMenu( menu );
action = menu->addMenu( NavigMenu( p_intf, submenu ) );
......
......@@ -113,7 +113,7 @@ private:
static QMenu *VideoMenu( intf_thread_t *p_intf, QWidget *parent ) {
return VideoMenu( p_intf, new QMenu( parent ) );
}
static void SubMenu(intf_thread_t *p_intf, QMenu *current);
static QMenu *SubMenu(intf_thread_t *p_intf, QMenu *current);
static QMenu *AudioMenu( intf_thread_t *, QMenu * );
static QMenu *AudioMenu( intf_thread_t *p_intf, QWidget *parent ) {
......
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