do not ask if one wants to enter password, just ask for password
This commit is contained in:
@@ -174,14 +174,6 @@ void TraceMpdStatus()
|
|||||||
void NcmpcppErrorCallback(Connection *, int errorid, const char *msg, void *)
|
void NcmpcppErrorCallback(Connection *, int errorid, const char *msg, void *)
|
||||||
{
|
{
|
||||||
if (errorid == MPD_SERVER_ERROR_PERMISSION)
|
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);
|
wFooter->SetGetStringHelper(0);
|
||||||
Statusbar() << "Password: ";
|
Statusbar() << "Password: ";
|
||||||
@@ -190,7 +182,6 @@ void NcmpcppErrorCallback(Connection *, int errorid, const char *msg, void *)
|
|||||||
ShowMessage("Password accepted!");
|
ShowMessage("Password accepted!");
|
||||||
wFooter->SetGetStringHelper(StatusbarGetStringHelper);
|
wFooter->SetGetStringHelper(StatusbarGetStringHelper);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
ShowMessage("%s", msg);
|
ShowMessage("%s", msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user