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

Qt, menus: split the subtitles menu in a new function

Exactly 0 functionnal change here
parent 469eb24a
......@@ -580,11 +580,23 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
return Populate( p_intf, current, varnames, objects );
}
/* Subtitles */
void QVLCMenu::SubMenu( intf_thread_t *p_intf, QMenu *current )
{
QAction *action;
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
action = current->addMenu( submenu );
action->setData( "spu-es" );
addDPStaticEntry( submenu, qtr( "Open File..." ), "",
SLOT( loadSubtitlesFile() ) );
submenu->addSeparator();
}
/**
* Main Video Menu
* Subtitles are part of Video.
**/
QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subtitle )
{
vout_thread_t *p_vout;
input_thread_t *p_input;
......@@ -594,14 +606,9 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
if( current->isEmpty() )
{
addActionWithSubmenu( current, "video-es", qtr( "Video &Track" ) );
if( b_subtitle)
SubMenu( p_intf, current );
QAction *action;
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
action = current->addMenu( submenu );
action->setData( "spu-es" );
addDPStaticEntry( submenu, qtr( "Open File..." ), "",
SLOT( loadSubtitlesFile() ) );
submenu->addSeparator();
current->addSeparator();
addActionWithCheckbox( current, "fullscreen", qtr( "&Fullscreen" ) );
......
......@@ -109,10 +109,11 @@ private:
}
static QMenu *RebuildNavigMenu( intf_thread_t *, QMenu *);
static QMenu *VideoMenu( intf_thread_t *, QMenu * );
static QMenu *VideoMenu( intf_thread_t *, QMenu *, bool b_subtitle = true );
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 *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