Merge pull request #894 from dooglus/nosplash
Add option "-splash" so we can disable the splash screen.
This commit is contained in:
commit
1168d30b0a
2 changed files with 9 additions and 4 deletions
|
@ -187,6 +187,7 @@ bool AppInit2(int argc, char* argv[])
|
|||
" -gen \t\t " + _("Generate coins") + "\n" +
|
||||
" -gen=0 \t\t " + _("Don't generate coins") + "\n" +
|
||||
" -min \t\t " + _("Start minimized") + "\n" +
|
||||
" -splash \t\t " + _("Show splash screen on startup (default: 1)") + "\n" +
|
||||
" -datadir=<dir> \t\t " + _("Specify data directory") + "\n" +
|
||||
" -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)") + "\n" +
|
||||
" -proxy=<ip:port> \t " + _("Connect through socks4 proxy") + "\n" +
|
||||
|
|
|
@ -183,9 +183,12 @@ int main(int argc, char *argv[])
|
|||
app.setApplicationName(QApplication::translate("main", "Bitcoin-Qt"));
|
||||
|
||||
QSplashScreen splash(QPixmap(":/images/splash"), 0);
|
||||
if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
|
||||
{
|
||||
splash.show();
|
||||
splash.setAutoFillBackground(true);
|
||||
splashref = &splash;
|
||||
}
|
||||
|
||||
app.processEvents();
|
||||
|
||||
|
@ -199,6 +202,7 @@ int main(int argc, char *argv[])
|
|||
// Put this in a block, so that BitcoinGUI is cleaned up properly before
|
||||
// calling Shutdown() in case of exceptions.
|
||||
BitcoinGUI window;
|
||||
if (splashref)
|
||||
splash.finish(&window);
|
||||
OptionsModel optionsModel(pwalletMain);
|
||||
ClientModel clientModel(&optionsModel);
|
||||
|
|
Loading…
Reference in a new issue