aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2019-08-24 19:13:04 +0200
committerSjors Provoost <sjors@sprovoost.nl>2019-08-24 22:41:32 +0200
commitc8de347a9d6c88fe67d77aba6fcce1b7fd66791c (patch)
treeadaefc5bf862bfa403edafd7f2be2b658db96a75 /src/qt/bitcoin.cpp
parent1bbc49d2078ee53488e214d00eb47462687b05c5 (diff)
[gui] intro: add prune preference
Adds a checkbox to the introduction screen letting the user enable pruning from the start. Disable checkbox when launched with -prune
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2592efc491..eb8b224929 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -492,8 +492,9 @@ int GuiMain(int argc, char* argv[])
/// 5. Now that settings and translations are available, ask user for data directory
// User language is set up: pick a data directory
bool did_show_intro = false;
+ bool prune = false; // Intro dialog prune check box
// Gracefully exit if the user cancels
- if (!Intro::showIfNeeded(*node, did_show_intro)) return EXIT_SUCCESS;
+ if (!Intro::showIfNeeded(*node, did_show_intro, prune)) return EXIT_SUCCESS;
/// 6. Determine availability of data directory and parse bitcoin.conf
/// - Do not call GetDataDir(true) before this step finishes
@@ -567,6 +568,11 @@ int GuiMain(int argc, char* argv[])
// Load GUI settings from QSettings
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));
+ if (did_show_intro) {
+ // Store intro dialog settings other than datadir (network specific)
+ app.SetPrune(prune, true);
+ }
+
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
app.createSplashScreen(networkStyle.data());