do not initialize screens lazily as it doesn't make much sense
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user