[vlc-commits] Qt: fix subtitle menu
Jean-Baptiste Kempf
git at videolan.org
Sat Apr 23 18:38:23 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Apr 23 18:36:02 2011 +0200| [492b2bc195f9a111dd1abf9423aa44bb970ef10d] | committer: Jean-Baptiste Kempf
Qt: fix subtitle menu
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=492b2bc195f9a111dd1abf9423aa44bb970ef10d
---
modules/gui/qt4/menus.cpp | 8 +++++---
modules/gui/qt4/menus.hpp | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 0e21b2a..952b244 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -597,7 +597,7 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
}
/* Subtitles */
-QMenu *QVLCMenu::SubMenu( intf_thread_t *p_intf, QMenu *current )
+QMenu *QVLCMenu::SubtitleMenu( intf_thread_t *p_intf, QMenu *current )
{
QAction *action;
QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
@@ -624,7 +624,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subtit
{
addActionWithSubmenu( current, "video-es", qtr( "Video &Track" ) );
if( b_subtitle)
- SubMenu( p_intf, current );
+ SubtitleMenu( p_intf, current );
current->addSeparator();
@@ -982,7 +982,9 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
if( action->menu()->isEmpty() )
action->setEnabled( false );
- SubMenu( p_intf, menu )->setTitle( qtr( "Subti&tle") );
+ submenu = SubtitleMenu( p_intf, menu );
+ submenu->setTitle( qtr( "Subti&tle") );
+ UpdateItem( p_intf, menu, "spu-es", VLC_OBJECT(p_input), true );
/* Playback menu for chapters */
submenu = new QMenu( menu );
diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp
index 21ea0d9..ed6900c 100644
--- a/modules/gui/qt4/menus.hpp
+++ b/modules/gui/qt4/menus.hpp
@@ -113,7 +113,7 @@ private:
static QMenu *VideoMenu( intf_thread_t *p_intf, QWidget *parent ) {
return VideoMenu( p_intf, new QMenu( parent ) );
}
- static QMenu *SubMenu(intf_thread_t *p_intf, QMenu *current);
+ static QMenu *SubtitleMenu(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