[vlc-commits] Qt, menus: split the subtitles menu in a new function
Jean-Baptiste Kempf
git at videolan.org
Mon Mar 21 00:07:44 CET 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Mar 20 23:56:07 2011 +0100| [f3d3e076ed6e57c94926899706ab363fae1541b6] | committer: Jean-Baptiste Kempf
Qt, menus: split the subtitles menu in a new function
Exactly 0 functionnal change here
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3d3e076ed6e57c94926899706ab363fae1541b6
---
modules/gui/qt4/menus.cpp | 23 +++++++++++++++--------
modules/gui/qt4/menus.hpp | 3 ++-
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 72ad2fc..67b8448 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -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" ) );
diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp
index f264d6d..f0fd337 100644
--- a/modules/gui/qt4/menus.hpp
+++ b/modules/gui/qt4/menus.hpp
@@ -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 ) {
More information about the vlc-commits
mailing list