Commit a28bdff5 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre Committed by Jean-Baptiste Kempf

Qt menus: use addDPStaticEntry and add a static Subtitles Loader in popup

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5dd029ec
......@@ -479,9 +479,8 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
action = current->addMenu( submenu );
action->setData( "spu-es" );
action = submenu->addAction( qfu( "Load File..." ), THEDP,
SLOT( loadSubtitlesFile() ) );
action->setData( "_static_" );
addDPStaticEntry( submenu, qtr( "Load File..." ), "", "",
SLOT( loadSubtitlesFile() ) );
ACT_ADD( current, "fullscreen", qtr( "Toggle &Fullscreen" ) );
ACT_ADD( current, "zoom", qtr( "&Zoom" ) );
......@@ -608,8 +607,6 @@ QMenu *QVLCMenu::HelpMenu( QMenu *current )
return menu;
}
#undef ACT_ADD
/*****************************************************************************
* Popup menus - Right Click menus *
*****************************************************************************/
......@@ -805,10 +802,18 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
action->setEnabled( false );
/* Video menu */
submenu = new QMenu();
ACT_ADD( submenu, "video-es", qtr( "Video Track" ) );
QMenu *subsubmenu = new QMenu( qtr( "&Subtitles Track" ), submenu );
addDPStaticEntry( subsubmenu, qtr( "Load File..." ), "", "",
SLOT( loadSubtitlesFile() ) );
action = submenu->addMenu( subsubmenu );
action->setData( "spu-es" );
VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
if( p_vout )
vlc_object_release( p_vout );
submenu = Populate( p_intf, NULL, varnames, objects );
Populate( p_intf, submenu, varnames, objects );
varnames.clear(); objects.clear();
action = menu->addMenu( submenu );
action->setText( qtr( "Video" ) );
......@@ -854,6 +859,8 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
}
}
#undef ACT_ADD
/************************************************************************
* Systray Menu *
************************************************************************/
......
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