do not initialize screens lazily as it doesn't make much sense

This commit is contained in:
Andrzej Rybczak
2012-09-14 00:54:48 +02:00
parent 7c3f93e211
commit 1891c1c050
41 changed files with 153 additions and 205 deletions

View File

@@ -32,15 +32,13 @@ using Global::myOldScreen;
ServerInfo *myServerInfo = new ServerInfo;
void ServerInfo::init()
ServerInfo::ServerInfo()
{
SetDimensions();
w = new NC::Scrollpad((COLS-itsWidth)/2, (MainHeight-itsHeight)/2+MainStartY, itsWidth, itsHeight, "MPD server info", Config.main_color, Config.window_border);
itsURLHandlers = Mpd.GetURLHandlers();
itsTagTypes = Mpd.GetTagTypes();
isInitialized = 1;
}
void ServerInfo::switchTo()
@@ -53,9 +51,6 @@ void ServerInfo::switchTo()
return;
}
if (!isInitialized)
init();
// resize() can fall back to old screen, so we need it updated
myOldScreen = myScreen;