aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-05-09 14:33:55 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-05-09 14:34:49 -0400
commitfc642cbdad6e5bef42dddfbb0b76e662a6a5de6c (patch)
treede7d02bcfe19bafb3faf0f220a35b303fbfc3ba8 /src/qt/bitcoin.cpp
parent08c1caf863656e8c4302f0ff392772f0055760e5 (diff)
parent4d4185a4f0e40c033a587871839a47cb3f89ee93 (diff)
downloadbitcoin-fc642cbdad6e5bef42dddfbb0b76e662a6a5de6c.tar.xz
Merge #13190: Have gArgs handle printing help
4d4185a4f0 Make gArgs aware of the arguments (Andrew Chow) Pull request description: Instead of each binary generating and printing it's own help string, have gArgs know what the args are and generate the help string. This is the first commit of #13112 pulled out. Tree-SHA512: d794c872b834bc56c78d947549f9cf046a8174984ab0c7b4ba06bc51d36dca11a4ed88afafe76bb4f776cdba042e17e30b9c2ed7b195bef7df77a1327823f989
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index c0fb641b1c..9178317601 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -531,6 +531,20 @@ WId BitcoinApplication::getMainWinId() const
return window->winId();
}
+static void SetupUIArgs()
+{
+#ifdef ENABLE_WALLET
+ gArgs.AddArg("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS), true, OptionsCategory::GUI);
+#endif
+ gArgs.AddArg("-choosedatadir", strprintf(QObject::tr("Choose data directory on startup (default: %u)").toStdString(), DEFAULT_CHOOSE_DATADIR), false, OptionsCategory::GUI);
+ gArgs.AddArg("-lang=<lang>", QObject::tr("Set language, for example \"de_DE\" (default: system locale)").toStdString(), false, OptionsCategory::GUI);
+ gArgs.AddArg("-min", QObject::tr("Start minimized").toStdString(), false, OptionsCategory::GUI);
+ gArgs.AddArg("-resetguisettings", QObject::tr("Reset all settings changed in the GUI").toStdString(), false, OptionsCategory::GUI);
+ gArgs.AddArg("-rootcertificates=<file>", QObject::tr("Set SSL root certificates for payment request (default: -system-)").toStdString(), false, OptionsCategory::GUI);
+ gArgs.AddArg("-splash", strprintf(QObject::tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN), false, OptionsCategory::GUI);
+ gArgs.AddArg("-uiplatform", strprintf("Select platform to customize UI for (one of windows, macosx, other; default: %s)", BitcoinGUI::DEFAULT_UIPLATFORM), true, OptionsCategory::GUI);
+}
+
#ifndef BITCOIN_QT_TEST
int main(int argc, char *argv[])
{
@@ -540,6 +554,8 @@ int main(int argc, char *argv[])
/// 1. Parse command-line options. These take precedence over anything else.
// Command-line options take precedence:
+ node->setupServerArgs();
+ SetupUIArgs();
node->parseParameters(argc, argv);
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory