[vlc-commits] Qt: fix subtitles track update
Jean-Baptiste Kempf
git at videolan.org
Tue Apr 23 17:37:07 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 23 17:19:24 2013 +0200| [5453ba10bd843cad920e8259a7fc7dea2f0c22a4] | committer: Jean-Baptiste Kempf
Qt: fix subtitles track update
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5453ba10bd843cad920e8259a7fc7dea2f0c22a4
---
modules/gui/qt4/menus.cpp | 37 ++++++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 90b5f48..dabc53e 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -233,7 +233,6 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
QVector<const char *> &varnames )
{
PUSH_INPUTVAR( "video-es" );
- PUSH_INPUTVAR( "spu-es" );
PUSH_VAR( "fullscreen" );
PUSH_VAR( "video-on-top" );
PUSH_VAR( "video-wallpaper" );
@@ -249,6 +248,17 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
return VLC_SUCCESS;
}
+static int SubsAutoMenuBuilder( input_thread_t *p_object,
+ QVector<vlc_object_t *> &objects,
+ QVector<const char *> &varnames )
+{
+ PUSH_VAR( "spu-es" );
+
+ return VLC_SUCCESS;
+}
+
+
+
static int AudioAutoMenuBuilder( audio_output_t *p_object,
input_thread_t *p_input,
QVector<vlc_object_t *> &objects,
@@ -615,19 +625,26 @@ QMenu *VLCMenuBar::AudioMenu( intf_thread_t *p_intf, QMenu * current )
}
/* Subtitles */
-QMenu *VLCMenuBar::SubtitleMenu( intf_thread_t *, QMenu *current )
+QMenu *VLCMenuBar::SubtitleMenu( intf_thread_t *p_intf, QMenu *current )
{
+ input_thread_t *p_input;
+ QVector<vlc_object_t *> objects;
+ QVector<const char *> varnames;
+
+ msg_Err( p_intf, "Here I am" );
+
if( current->isEmpty() )
{
- QAction *action;
- QMenu *submenu = new QMenu( qtr( "&Subtitle Track" ), current );
- action = current->addMenu( submenu );
- action->setData( "spu-es" );
- addDPStaticEntry( submenu, qtr( "Open File..." ), "",
+ addDPStaticEntry( current, qtr( "Add &Subtitle File..." ), "",
SLOT( loadSubtitlesFile() ) );
- submenu->addSeparator();
+ addActionWithSubmenu( current, "spu-es", qtr( "Sub &Track" ) );
+ current->addSeparator();
}
- return current;
+
+ p_input = THEMIM->getInput();
+ SubsAutoMenuBuilder( p_input, objects, varnames );
+
+ return Populate( p_intf, current, varnames, objects );
}
/**
@@ -644,8 +661,6 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subt
if( current->isEmpty() )
{
addActionWithSubmenu( current, "video-es", qtr( "Video &Track" ) );
- if( b_subtitle)
- SubtitleMenu( p_intf, current );
current->addSeparator();
/* Surface modifiers */
More information about the vlc-commits
mailing list