Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | |||||
WId BitcoinApplication::getMainWinId() const { | WId BitcoinApplication::getMainWinId() const { | ||||
if (!window) { | if (!window) { | ||||
return 0; | return 0; | ||||
} | } | ||||
return window->winId(); | return window->winId(); | ||||
} | } | ||||
static void SetupUIArgs() { | |||||
#ifdef ENABLE_WALLET | |||||
gArgs.AddArg("-allowselfsignedrootcertificates", | |||||
strprintf("Allow self signed root certificates (default: %d)", | |||||
DEFAULT_SELFSIGNED_ROOTCERTS), | |||||
true, OptionsCategory::GUI); | |||||
#endif | |||||
gArgs.AddArg( | |||||
"-choosedatadir", | |||||
strprintf(QObject::tr("Choose data directory on startup (default: %d)") | |||||
.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( | |||||
"-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: %d)") | |||||
.toStdString(), | |||||
DEFAULT_SPLASHSCREEN), | |||||
false, OptionsCategory::GUI); | |||||
gArgs.AddArg( | |||||
"-resetguisettings", | |||||
QObject::tr("Reset all settings changed in the GUI").toStdString(), | |||||
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 | #ifndef BITCOIN_QT_TEST | ||||
static void MigrateSettings() { | static void MigrateSettings() { | ||||
assert(!QApplication::applicationName().isEmpty()); | assert(!QApplication::applicationName().isEmpty()); | ||||
static const QString legacyAppName("Bitcoin-Qt"), | static const QString legacyAppName("Bitcoin-Qt"), | ||||
#ifdef Q_OS_DARWIN | #ifdef Q_OS_DARWIN | ||||
// Macs and/or iOS et al use a domain-style name for Settings | // Macs and/or iOS et al use a domain-style name for Settings | ||||
Show All 30 Lines | |||||
int main(int argc, char *argv[]) { | int main(int argc, char *argv[]) { | ||||
SetupEnvironment(); | SetupEnvironment(); | ||||
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | ||||
/// 1. Parse command-line options. These take precedence over anything else. | /// 1. Parse command-line options. These take precedence over anything else. | ||||
// Command-line options take precedence: | // Command-line options take precedence: | ||||
node->setupServerArgs(); | |||||
SetupUIArgs(); | |||||
node->parseParameters(argc, argv); | node->parseParameters(argc, argv); | ||||
// Do not refer to data directory yet, this can be overridden by | // Do not refer to data directory yet, this can be overridden by | ||||
// Intro::pickDataDirectory | // Intro::pickDataDirectory | ||||
/// 2. Basic Qt initialization (not dependent on parameters or | /// 2. Basic Qt initialization (not dependent on parameters or | ||||
/// configuration) | /// configuration) | ||||
Q_INIT_RESOURCE(bitcoin); | Q_INIT_RESOURCE(bitcoin); | ||||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |