command line switch -noui

This commit is contained in:
s_nakamoto 2009-12-17 23:16:27 +00:00
parent 9228c53cf5
commit 95d839f15c

34
ui.cpp
View file

@ -190,6 +190,9 @@ void CalledMessageBox(const string& message, const string& caption, int style, w
int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y) int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
{ {
if (mapArgs.count("-noui"))
return wxOK;
#ifdef __WXMSW__ #ifdef __WXMSW__
return wxMessageBox(message, caption, style, parent, x, y); return wxMessageBox(message, caption, style, parent, x, y);
#else #else
@ -3716,16 +3719,19 @@ bool CMyApp::OnInit2()
// //
// Create the main frame window // Create the main frame window
// //
pframeMain = new CMainFrame(NULL); if (!mapArgs.count("-noui"))
if (mapArgs.count("-min")) {
pframeMain->Iconize(true); pframeMain = new CMainFrame(NULL);
pframeMain->Show(true); // have to show first to get taskbar button to hide if (mapArgs.count("-min"))
if (fMinimizeToTray && pframeMain->IsIconized()) pframeMain->Iconize(true);
fClosedToTray = true; pframeMain->Show(true); // have to show first to get taskbar button to hide
pframeMain->Show(!fClosedToTray); if (fMinimizeToTray && pframeMain->IsIconized())
ptaskbaricon->Show(fMinimizeToTray || fClosedToTray); fClosedToTray = true;
pframeMain->Show(!fClosedToTray);
ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
CreateThread(ThreadDelayedRepaint, NULL); CreateThread(ThreadDelayedRepaint, NULL);
}
if (!CheckDiskSpace()) if (!CheckDiskSpace())
return false; return false;
@ -3928,13 +3934,3 @@ void SetStartOnSystemStartup(bool fAutoStart)
bool GetStartOnSystemStartup() { return false; } bool GetStartOnSystemStartup() { return false; }
void SetStartOnSystemStartup(bool fAutoStart) { } void SetStartOnSystemStartup(bool fAutoStart) { }
#endif #endif