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

@@ -31,7 +31,7 @@
using Global::MainHeight;
using Global::MainStartY;
Help *myHelp = new Help;
Help *myHelp;
namespace {//
@@ -95,12 +95,11 @@ std::string keyToString(const Key &key, bool *print_backspace)
}
void Help::init()
Help::Help()
{
w = new NC::Scrollpad(0, MainStartY, COLS, MainHeight, "", Config.main_color, NC::brNone);
GetKeybindings();
w->flush();
isInitialized = 1;
}
void Help::resize()
@@ -120,9 +119,6 @@ void Help::switchTo()
if (myScreen == this)
return;
if (!isInitialized)
init();
if (myLockedScreen)
updateInactiveScreen(this);