window: add ScopedStringHelper and use it where appropriate

This commit is contained in:
Andrzej Rybczak
2014-10-31 15:30:54 +01:00
parent fa1cd965fa
commit b265d56cdf
3 changed files with 31 additions and 9 deletions

View File

@@ -167,7 +167,7 @@ void Status::handleServerError(MPD::ServerError &e)
Statusbar::printf("MPD: %1%", e.what());
if (e.code() == MPD_SERVER_ERROR_PERMISSION)
{
wFooter->setGetStringHelper(nullptr);
NC::Window::ScopedStringHelper helper(*wFooter, nullptr);
Statusbar::put() << "Password: ";
Mpd.SetPassword(wFooter->getString(0, true));
try {
@@ -176,7 +176,6 @@ void Status::handleServerError(MPD::ServerError &e)
} catch (MPD::ServerError &e_prim) {
handleServerError(e_prim);
}
wFooter->setGetStringHelper(Statusbar::Helpers::getString);
}
else if (e.code() == MPD_SERVER_ERROR_NO_EXIST && myScreen == myBrowser)
{