Commit ae296115 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

Qt4: override playlist configuration on request, _not_ on exit

Fixes #6346.
(cherry picked from commit 212b20ddf01c4eef7817e34a8107620bdff170ed)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent bb4b1b5f
......@@ -988,11 +988,6 @@ MainInputManager::~MainInputManager()
var_DelCallback( THEPL, "repeat", RepeatChanged, this );
var_DelCallback( THEPL, "loop", LoopChanged, this );
/* Save some interface state in configuration, at module quit */
config_PutInt( p_intf, "random", var_GetBool( THEPL, "random" ) );
config_PutInt( p_intf, "loop", var_GetBool( THEPL, "loop" ) );
config_PutInt( p_intf, "repeat", var_GetBool( THEPL, "repeat" ) );
if( var_InheritBool( p_intf, "qt-autosave-volume" ) )
config_PutInt( p_intf, "volume", aout_VolumeGet( THEPL ) );
}
......@@ -1145,7 +1140,7 @@ void MainInputManager::pause()
void MainInputManager::toggleRandom()
{
var_ToggleBool( THEPL, "random" );
config_PutInt( p_intf, "random", var_ToggleBool( THEPL, "random" ) );
}
void MainInputManager::notifyRepeatLoop()
......@@ -1159,15 +1154,29 @@ void MainInputManager::notifyRepeatLoop()
void MainInputManager::loopRepeatLoopStatus()
{
/* Toggle Normal -> Loop -> Repeat -> Normal ... */
if( var_GetBool( THEPL, "repeat" ) )
var_SetBool( THEPL, "repeat", false );
else if( var_GetBool( THEPL, "loop" ) )
bool loop = var_GetBool( THEPL, "loop" );
bool repeat = var_GetBool( THEPL, "repeat" );
if( repeat )
{
loop = false;
repeat = false;
}
else if( loop )
{
var_SetBool( THEPL, "loop", false );
var_SetBool( THEPL, "repeat", true );
loop = false;
repeat = true;
}
else
var_SetBool( THEPL, "loop", true );
{
loop = true;
//repeat = false;
}
var_SetBool( THEPL, "loop", loop );
var_SetBool( THEPL, "repeat", repeat );
config_PutInt( p_intf, "loop", loop );
config_PutInt( p_intf, "repeat", repeat );
}
void MainInputManager::activatePlayQuit( bool b_exit )
......
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