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

@@ -29,9 +29,9 @@
using Global::MainHeight;
using Global::MainStartY;
SortPlaylistDialog *mySortPlaylistDialog = new SortPlaylistDialog;
SortPlaylistDialog *mySortPlaylistDialog;
void SortPlaylistDialog::init()
SortPlaylistDialog::SortPlaylistDialog()
{
setDimensions();
@@ -54,12 +54,10 @@ void SortPlaylistDialog::init()
m_sort_options = w->size();
m_sort_entry = std::make_pair("Sort", static_cast<MPD::Song::GetFunction>(0));
m_cancel_entry = std::make_pair("Cancel", static_cast<MPD::Song::GetFunction>(0));
w->addSeparator();
w->addItem(m_sort_entry);
w->addItem(m_cancel_entry);
isInitialized = true;
}
void SortPlaylistDialog::switchTo()
@@ -71,9 +69,6 @@ void SortPlaylistDialog::switchTo()
assert(myScreen != this);
if (!isInitialized)
init();
if (hasToBeResized)
resize();