Skip to content

Commit fa41d4c

Browse files
author
MarcoFalke
committed
[qt] Move GUI related HelpMessage() part downstream
1 parent faf93f3 commit fa41d4c

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
lines changed

src/init.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -499,23 +499,6 @@ std::string HelpMessage(HelpMessageMode mode)
499499
strUsage += HelpMessageOpt("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT));
500500
}
501501

502-
if (mode == HMM_BITCOIN_QT)
503-
{
504-
strUsage += HelpMessageGroup(_("UI Options:"));
505-
if (showDebug) {
506-
strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS));
507-
}
508-
strUsage += HelpMessageOpt("-choosedatadir", strprintf(_("Choose data directory on startup (default: %u)"), DEFAULT_CHOOSE_DATADIR));
509-
strUsage += HelpMessageOpt("-lang=<lang>", _("Set language, for example \"de_DE\" (default: system locale)"));
510-
strUsage += HelpMessageOpt("-min", _("Start minimized"));
511-
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
512-
strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN));
513-
strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
514-
if (showDebug) {
515-
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
516-
}
517-
}
518-
519502
return strUsage;
520503
}
521504

src/qt/guiconstants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ static const int MAX_PASSPHRASE_SIZE = 1024;
1414
/* BitcoinGUI -- Size of icons in status bar */
1515
static const int STATUSBAR_ICONSIZE = 16;
1616

17+
static const bool DEFAULT_SPLASHSCREEN = true;
18+
1719
/* Invalid field background style */
1820
#define STYLE_INVALID "background:#FF8080"
1921

src/qt/intro.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <QMutex>
1010
#include <QThread>
1111

12+
static const bool DEFAULT_CHOOSE_DATADIR = false;
13+
1214
class FreespaceChecker;
1315

1416
namespace Ui {

src/qt/paymentrequestplus.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <QList>
1616
#include <QString>
1717

18+
static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
19+
1820
//
1921
// Wraps dumb protocol buffer paymentRequest
2022
// with extra methods

src/qt/utilitydialog.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#include "bitcoingui.h"
1010
#include "clientmodel.h"
11+
#include "guiconstants.h"
12+
#include "intro.h"
13+
#include "paymentrequestplus.h"
1114
#include "guiutil.h"
1215

1316
#include "clientversion.h"
@@ -70,7 +73,22 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
7073
cursor.insertText(header);
7174
cursor.insertBlock();
7275

73-
QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
76+
std::string strUsage = HelpMessage(HMM_BITCOIN_QT);
77+
const bool showDebug = GetBoolArg("-help-debug", false);
78+
strUsage += HelpMessageGroup(_("UI Options:"));
79+
if (showDebug) {
80+
strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS));
81+
}
82+
strUsage += HelpMessageOpt("-choosedatadir", strprintf(_("Choose data directory on startup (default: %u)"), DEFAULT_CHOOSE_DATADIR));
83+
strUsage += HelpMessageOpt("-lang=<lang>", _("Set language, for example \"de_DE\" (default: system locale)"));
84+
strUsage += HelpMessageOpt("-min", _("Start minimized"));
85+
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
86+
strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN));
87+
strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
88+
if (showDebug) {
89+
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
90+
}
91+
QString coreOptions = QString::fromStdString(strUsage);
7492
text = version + "\n" + header + "\n" + coreOptions;
7593

7694
QTextTableFormat tf;

src/util.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ extern CTranslationInterface translationInterface;
5656
extern const char * const BITCOIN_CONF_FILENAME;
5757
extern const char * const BITCOIN_PID_FILENAME;
5858

59-
static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
60-
static const bool DEFAULT_CHOOSE_DATADIR = false;
61-
static const bool DEFAULT_SPLASHSCREEN = true;
62-
6359
/**
6460
* Translation function: Call Translate signal on UI interface, which returns a boost::optional result.
6561
* If no translation slot is registered, nothing is returned, and simply return the input.

0 commit comments

Comments
 (0)