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,7 +32,7 @@
using Global::MainHeight;
using Global::MainStartY;
SongInfo *mySongInfo = new SongInfo;
SongInfo *mySongInfo;
const SongInfo::Metadata SongInfo::Tags[] =
{
@@ -47,13 +47,12 @@ const SongInfo::Metadata SongInfo::Tags[] =
{ "Performer", &MPD::Song::getPerformer, &MPD::MutableSong::setPerformer },
{ "Disc", &MPD::Song::getDisc, &MPD::MutableSong::setDisc },
{ "Comment", &MPD::Song::getComment, &MPD::MutableSong::setComment },
{ 0, 0, 0 }
{ 0, 0, 0 }
};
void SongInfo::init()
SongInfo::SongInfo()
{
w = new NC::Scrollpad(0, MainStartY, COLS, MainHeight, "", Config.main_color, NC::brNone);
isInitialized = 1;
}
void SongInfo::resize()
@@ -79,9 +78,6 @@ void SongInfo::switchTo()
if (myScreen == this)
return myOldScreen->switchTo();
if (!isInitialized)
init();
if (myLockedScreen)
updateInactiveScreen(this);