switch output state only if enable/disable output command succeeded
This commit is contained in:
@@ -70,17 +70,21 @@ void Outputs::EnterPressed()
|
|||||||
if (w->Current().second)
|
if (w->Current().second)
|
||||||
{
|
{
|
||||||
if (Mpd->DisableOutput(w->Choice()))
|
if (Mpd->DisableOutput(w->Choice()))
|
||||||
|
{
|
||||||
ShowMessage("Output \"%s\" disabled", w->Current().first.c_str());
|
ShowMessage("Output \"%s\" disabled", w->Current().first.c_str());
|
||||||
w->Current().second = 0;
|
w->Current().second = 0;
|
||||||
w->BoldOption(w->Choice(), 0);
|
w->BoldOption(w->Choice(), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Mpd->EnableOutput(w->Choice()))
|
if (Mpd->EnableOutput(w->Choice()))
|
||||||
|
{
|
||||||
ShowMessage("Output \"%s\" enabled", w->Current().first.c_str());
|
ShowMessage("Output \"%s\" enabled", w->Current().first.c_str());
|
||||||
w->Current().second = 1;
|
w->Current().second = 1;
|
||||||
w->BoldOption(w->Choice(), 1);
|
w->BoldOption(w->Choice(), 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user