From 389c5b03a7d1c707b426823009e74328ec0dacec Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 26 May 2009 22:47:10 +0200 Subject: [PATCH] switch output state only if enable/disable output command succeeded --- src/outputs.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/outputs.cpp b/src/outputs.cpp index d223dd63..dd8e2daa 100644 --- a/src/outputs.cpp +++ b/src/outputs.cpp @@ -70,16 +70,20 @@ void Outputs::EnterPressed() if (w->Current().second) { if (Mpd->DisableOutput(w->Choice())) + { ShowMessage("Output \"%s\" disabled", w->Current().first.c_str()); - w->Current().second = 0; - w->BoldOption(w->Choice(), 0); + w->Current().second = 0; + w->BoldOption(w->Choice(), 0); + } } else { if (Mpd->EnableOutput(w->Choice())) + { ShowMessage("Output \"%s\" enabled", w->Current().first.c_str()); - w->Current().second = 1; - w->BoldOption(w->Choice(), 1); + w->Current().second = 1; + w->BoldOption(w->Choice(), 1); + } } }