[vlc-devel] commit: Qt: add UI for play-and-exit activation. Just a menu for now. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Feb 28 00:58:12 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 28 00:56:20 2009 +0100| [eef168a36ed123d6071870e190f255793393f75a] | committer: Jean-Baptiste Kempf
Qt: add UI for play-and-exit activation. Just a menu for now.
Close partly #2237
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eef168a36ed123d6071870e190f255793393f75a
---
modules/gui/qt4/input_manager.cpp | 5 +++++
modules/gui/qt4/input_manager.hpp | 1 +
modules/gui/qt4/menus.cpp | 8 ++++++++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 9564438..cdefa32 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -983,6 +983,11 @@ void MainInputManager::togglePlayPause()
getIM()->togglePlayPause();
}
+void MainInputManager::activatePlayQuit( bool b_exit )
+{
+ var_SetBool( THEPL, "play-and-exit", b_exit );
+}
+
/* Static callbacks for MIM */
static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *param )
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 69732e0..e6729f2 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -237,6 +237,7 @@ public slots:
void stop();
void next();
void prev();
+ void activatePlayQuit( bool );
signals:
void inputChanged( input_thread_t * );
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index efd5cc4..8ffa151 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -432,6 +432,14 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
if( mi->getControlsVisibilityStatus() & CONTROLS_ADVANCED )
action->setChecked( true );
+ if( with_intf )
+ // I don't want to manage consistency between menus, so no popup-menu
+ {
+ action = menu->addAction( qtr( "Quit after Playback" ) );
+ action->setCheckable( true );
+ CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) );
+ }
+
#if 0 /* For Visualisations. Not yet working */
adv = menu->addAction( qtr( "Visualizations selector" ),
mi, SLOT( visual() ) );
More information about the vlc-devel
mailing list