add command line option to auto hide the log window at startup;

pull/33/head
Bryan Biedenkapp 3 years ago
parent caa2a37a49
commit 8c5d9eb2c6

@ -53,6 +53,8 @@ std::string g_iniFile = std::string(DEFAULT_CONF_FILE);
yaml::Node g_conf;
bool g_debug = false;
bool g_hideLoggingWnd = false;
lookups::IdenTableLookup* g_idenTable = nullptr;
// ---------------------------------------------------------------------------
@ -96,9 +98,11 @@ void usage(const char* message, const char* arg)
::fprintf(stderr, "\n\n");
}
::fprintf(stdout, "usage: %s [-dvh] [-c <monitor configuration file>]\n\n"
::fprintf(stdout, "usage: %s [-dvh][--hide-log][-c <monitor configuration file>]\n\n"
" -c <file> specifies the monitor configuration file to use\n"
"\n"
" --hide-log hide interactive logging window on startup\n"
"\n"
" -d enable debug\n"
" -v show version information\n"
" -h show this screen\n"
@ -142,6 +146,10 @@ int checkArgs(int argc, char* argv[])
p += 2;
}
else if (IS("--hide-log")) {
++p;
g_hideLoggingWnd = true;
}
else if (IS("-d")) {
++p;
g_debug = true;

@ -50,6 +50,8 @@ extern std::string g_iniFile;
extern yaml::Node g_conf;
extern bool g_debug;
extern bool g_hideLoggingWnd;
extern lookups::IdenTableLookup* g_idenTable;
#endif // __MONITOR_MAIN_H__

@ -236,6 +236,12 @@ private:
void onShow(FShowEvent* e) override
{
intializeNodeDisplay();
if (g_hideLoggingWnd) {
const auto& rootWidget = getRootWidget();
m_logWnd.setGeometry(FPoint{(int)(rootWidget->getClientWidth() - 81), (int)(rootWidget->getClientHeight() - 1)}, FSize{80, 20});
m_logWnd.minimizeWindow();
}
}
/// <summary>

Loading…
Cancel
Save

Powered by TurnKey Linux.