From c8de347a9d6c88fe67d77aba6fcce1b7fd66791c Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Sat, 24 Aug 2019 19:13:04 +0200 Subject: [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 --- src/qt/bitcoin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/qt/bitcoin.cpp') 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()); -- cgit v1.2.3