Commit eef168a3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: add UI for play-and-exit activation. Just a menu for now.

Close partly #2237
parent 0ba671da
......@@ -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 )
......
......@@ -237,6 +237,7 @@ public slots:
void stop();
void next();
void prev();
void activatePlayQuit( bool );
signals:
void inputChanged( input_thread_t * );
......
......@@ -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() ) );
......
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