Browse Source

Add option "-splash" so we can disable the splash screen.

Don't show splash screen when -min is specified on the command line.
miguelfreitas
Chris Moore 13 years ago
parent
commit
ec4efde40c
  1. 1
      src/init.cpp
  2. 12
      src/qt/bitcoin.cpp

1
src/init.cpp

@ -187,6 +187,7 @@ bool AppInit2(int argc, char* argv[])
" -gen \t\t " + _("Generate coins") + "\n" + " -gen \t\t " + _("Generate coins") + "\n" +
" -gen=0 \t\t " + _("Don't generate coins") + "\n" + " -gen=0 \t\t " + _("Don't generate coins") + "\n" +
" -min \t\t " + _("Start minimized") + "\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" + " -datadir=<dir> \t\t " + _("Specify data directory") + "\n" +
" -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)") + "\n" + " -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)") + "\n" +
" -proxy=<ip:port> \t " + _("Connect through socks4 proxy") + "\n" + " -proxy=<ip:port> \t " + _("Connect through socks4 proxy") + "\n" +

12
src/qt/bitcoin.cpp

@ -183,9 +183,12 @@ int main(int argc, char *argv[])
app.setApplicationName(QApplication::translate("main", "Bitcoin-Qt")); app.setApplicationName(QApplication::translate("main", "Bitcoin-Qt"));
QSplashScreen splash(QPixmap(":/images/splash"), 0); QSplashScreen splash(QPixmap(":/images/splash"), 0);
splash.show(); if (GetBoolArg("-splash", true) && !GetBoolArg("-min"))
splash.setAutoFillBackground(true); {
splashref = &splash; splash.show();
splash.setAutoFillBackground(true);
splashref = &splash;
}
app.processEvents(); app.processEvents();
@ -199,7 +202,8 @@ int main(int argc, char *argv[])
// Put this in a block, so that BitcoinGUI is cleaned up properly before // Put this in a block, so that BitcoinGUI is cleaned up properly before
// calling Shutdown() in case of exceptions. // calling Shutdown() in case of exceptions.
BitcoinGUI window; BitcoinGUI window;
splash.finish(&window); if (splashref)
splash.finish(&window);
OptionsModel optionsModel(pwalletMain); OptionsModel optionsModel(pwalletMain);
ClientModel clientModel(&optionsModel); ClientModel clientModel(&optionsModel);
WalletModel walletModel(pwalletMain, &optionsModel); WalletModel walletModel(pwalletMain, &optionsModel);

Loading…
Cancel
Save