aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-04-28 16:54:58 -0400
committerAndrew Chow <achow101-github@achow101.com>2018-05-09 12:21:05 -0400
commit4d4185a4f0e40c033a587871839a47cb3f89ee93 (patch)
treede7d02bcfe19bafb3faf0f220a35b303fbfc3ba8 /src/qt/bitcoin.cpp
parent08c1caf863656e8c4302f0ff392772f0055760e5 (diff)
downloadbitcoin-4d4185a4f0e40c033a587871839a47cb3f89ee93.tar.xz
Make gArgs aware of the arguments
gArgs knows what the available arguments are and their help. Getting the help message is moved to gArgs and HelpMessage() is removed
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