Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 606 Lines • ▼ Show 20 Lines | if (HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { | ||||
HelpMessageDialog help(*node, nullptr, gArgs.IsArgSet("-version")); | HelpMessageDialog help(*node, nullptr, gArgs.IsArgSet("-version")); | ||||
help.showOrPrint(); | help.showOrPrint(); | ||||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||||
} | } | ||||
/// 5. Now that settings and translations are available, ask user for data | /// 5. Now that settings and translations are available, ask user for data | ||||
/// directory. User language is set up: pick a data directory. | /// directory. User language is set up: pick a data directory. | ||||
bool did_show_intro = false; | bool did_show_intro = false; | ||||
// Intro dialog prune check box | |||||
bool prune = false; | |||||
// Gracefully exit if the user cancels | // Gracefully exit if the user cancels | ||||
if (!Intro::showIfNeeded(*node, did_show_intro)) { | if (!Intro::showIfNeeded(*node, did_show_intro, prune)) { | ||||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||||
} | } | ||||
/// 6. Determine availability of data directory and parse | /// 6. Determine availability of data directory and parse | ||||
/// bitcoin.conf | /// bitcoin.conf | ||||
/// - Do not call GetDataDir(true) before this step finishes. | /// - Do not call GetDataDir(true) before this step finishes. | ||||
if (!CheckDataDirOption()) { | if (!CheckDataDirOption()) { | ||||
node->initError( | node->initError( | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
// Install qDebug() message handler to route to debug.log | // Install qDebug() message handler to route to debug.log | ||||
qInstallMessageHandler(DebugMessageHandler); | qInstallMessageHandler(DebugMessageHandler); | ||||
// Allow parameter interaction before we create the options model | // Allow parameter interaction before we create the options model | ||||
app.parameterSetup(); | app.parameterSetup(); | ||||
// Load GUI settings from QSettings | // Load GUI settings from QSettings | ||||
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); | app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false)); | ||||
if (did_show_intro) { | |||||
// Store intro dialog settings other than datadir (network specific) | |||||
app.SetPrune(prune, true); | |||||
} | |||||
// Get global config | // Get global config | ||||
Config &config = const_cast<Config &>(GetConfig()); | Config &config = const_cast<Config &>(GetConfig()); | ||||
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && | ||||
!gArgs.GetBoolArg("-min", false)) { | !gArgs.GetBoolArg("-min", false)) { | ||||
app.createSplashScreen(networkStyle.data()); | app.createSplashScreen(networkStyle.data()); | ||||
} | } | ||||
Show All 34 Lines |