Commit 212b20dd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: override playlist configuration on request, _not_ on exit

Fixes #6346.
parent 7eb61415
...@@ -977,11 +977,6 @@ MainInputManager::~MainInputManager() ...@@ -977,11 +977,6 @@ MainInputManager::~MainInputManager()
var_DelCallback( THEPL, "item-current", PLItemChanged, this ); var_DelCallback( THEPL, "item-current", PLItemChanged, this );
var_DelCallback( THEPL, "playlist-item-append", PLItemAppended, this ); var_DelCallback( THEPL, "playlist-item-append", PLItemAppended, this );
var_DelCallback( THEPL, "playlist-item-deleted", PLItemRemoved, this ); var_DelCallback( THEPL, "playlist-item-deleted", PLItemRemoved, 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" ) );
} }
vout_thread_t* MainInputManager::getVout() vout_thread_t* MainInputManager::getVout()
...@@ -1125,7 +1120,7 @@ void MainInputManager::pause() ...@@ -1125,7 +1120,7 @@ void MainInputManager::pause()
void MainInputManager::toggleRandom() void MainInputManager::toggleRandom()
{ {
var_ToggleBool( THEPL, "random" ); config_PutInt( p_intf, "random", var_ToggleBool( THEPL, "random" ) );
} }
void MainInputManager::notifyRandom(bool value) void MainInputManager::notifyRandom(bool value)
...@@ -1144,15 +1139,29 @@ void MainInputManager::notifyRepeatLoop(bool) ...@@ -1144,15 +1139,29 @@ void MainInputManager::notifyRepeatLoop(bool)
void MainInputManager::loopRepeatLoopStatus() void MainInputManager::loopRepeatLoopStatus()
{ {
/* Toggle Normal -> Loop -> Repeat -> Normal ... */ /* Toggle Normal -> Loop -> Repeat -> Normal ... */
if( var_GetBool( THEPL, "repeat" ) ) bool loop = var_GetBool( THEPL, "loop" );
var_SetBool( THEPL, "repeat", false ); bool repeat = var_GetBool( THEPL, "repeat" );
else if( var_GetBool( THEPL, "loop" ) )
if( repeat )
{
loop = false;
repeat = false;
}
else if( loop )
{ {
var_SetBool( THEPL, "loop", false ); loop = false;
var_SetBool( THEPL, "repeat", true ); repeat = true;
} }
else 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 ) 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