From c6e26e121fb14b24c8fe5ff8056e57500a823b4d Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 8 Nov 2009 19:34:10 +0100 Subject: [PATCH] do not ask if one wants to enter password, just ask for password --- src/status.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/status.cpp b/src/status.cpp index 3e22436a..2624abf4 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -175,21 +175,12 @@ void NcmpcppErrorCallback(Connection *, int errorid, const char *msg, void *) { if (errorid == MPD_SERVER_ERROR_PERMISSION) { - Statusbar() << msg << ", enter password ? [" << fmtBold << 'y' << fmtBoldEnd << "/" << fmtBold << 'n' << fmtBoldEnd << "]"; - wFooter->Refresh(); - int answer = 0; - do - wFooter->ReadKey(answer); - while (answer != 'y' && answer != 'n'); - if (answer == 'y') - { - wFooter->SetGetStringHelper(0); - Statusbar() << "Password: "; - Mpd.SetPassword(wFooter->GetString(-1, 0, 1)); - if (Mpd.SendPassword()) - ShowMessage("Password accepted!"); - wFooter->SetGetStringHelper(StatusbarGetStringHelper); - } + wFooter->SetGetStringHelper(0); + Statusbar() << "Password: "; + Mpd.SetPassword(wFooter->GetString(-1, 0, 1)); + if (Mpd.SendPassword()) + ShowMessage("Password accepted!"); + wFooter->SetGetStringHelper(StatusbarGetStringHelper); } else ShowMessage("%s", msg);