do not ask if one wants to enter password, just ask for password

This commit is contained in:
Andrzej Rybczak
2009-11-08 19:34:10 +01:00
parent 5b2dbe026c
commit c6e26e121f

View File

@@ -174,14 +174,6 @@ void TraceMpdStatus()
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: ";
@@ -190,7 +182,6 @@ void NcmpcppErrorCallback(Connection *, int errorid, const char *msg, void *)
ShowMessage("Password accepted!");
wFooter->SetGetStringHelper(StatusbarGetStringHelper);
}
}
else
ShowMessage("%s", msg);
}