mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
[qt] Move GUI related HelpMessage() part downstream
This commit is contained in:
parent
faf93f37fe
commit
fa41d4c8c6
6 changed files with 25 additions and 22 deletions
17
src/init.cpp
17
src/init.cpp
|
@ -499,23 +499,6 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||||
strUsage += HelpMessageOpt("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT));
|
strUsage += HelpMessageOpt("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == HMM_BITCOIN_QT)
|
|
||||||
{
|
|
||||||
strUsage += HelpMessageGroup(_("UI Options:"));
|
|
||||||
if (showDebug) {
|
|
||||||
strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS));
|
|
||||||
}
|
|
||||||
strUsage += HelpMessageOpt("-choosedatadir", strprintf(_("Choose data directory on startup (default: %u)"), DEFAULT_CHOOSE_DATADIR));
|
|
||||||
strUsage += HelpMessageOpt("-lang=<lang>", _("Set language, for example \"de_DE\" (default: system locale)"));
|
|
||||||
strUsage += HelpMessageOpt("-min", _("Start minimized"));
|
|
||||||
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
|
|
||||||
strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN));
|
|
||||||
strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
|
|
||||||
if (showDebug) {
|
|
||||||
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return strUsage;
|
return strUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ static const int MAX_PASSPHRASE_SIZE = 1024;
|
||||||
/* BitcoinGUI -- Size of icons in status bar */
|
/* BitcoinGUI -- Size of icons in status bar */
|
||||||
static const int STATUSBAR_ICONSIZE = 16;
|
static const int STATUSBAR_ICONSIZE = 16;
|
||||||
|
|
||||||
|
static const bool DEFAULT_SPLASHSCREEN = true;
|
||||||
|
|
||||||
/* Invalid field background style */
|
/* Invalid field background style */
|
||||||
#define STYLE_INVALID "background:#FF8080"
|
#define STYLE_INVALID "background:#FF8080"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
|
static const bool DEFAULT_CHOOSE_DATADIR = false;
|
||||||
|
|
||||||
class FreespaceChecker;
|
class FreespaceChecker;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Wraps dumb protocol buffer paymentRequest
|
// Wraps dumb protocol buffer paymentRequest
|
||||||
// with extra methods
|
// with extra methods
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
|
|
||||||
#include "bitcoingui.h"
|
#include "bitcoingui.h"
|
||||||
#include "clientmodel.h"
|
#include "clientmodel.h"
|
||||||
|
#include "guiconstants.h"
|
||||||
|
#include "intro.h"
|
||||||
|
#include "paymentrequestplus.h"
|
||||||
#include "guiutil.h"
|
#include "guiutil.h"
|
||||||
|
|
||||||
#include "clientversion.h"
|
#include "clientversion.h"
|
||||||
|
@ -70,7 +73,22 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
|
||||||
cursor.insertText(header);
|
cursor.insertText(header);
|
||||||
cursor.insertBlock();
|
cursor.insertBlock();
|
||||||
|
|
||||||
QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
|
std::string strUsage = HelpMessage(HMM_BITCOIN_QT);
|
||||||
|
const bool showDebug = GetBoolArg("-help-debug", false);
|
||||||
|
strUsage += HelpMessageGroup(_("UI Options:"));
|
||||||
|
if (showDebug) {
|
||||||
|
strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS));
|
||||||
|
}
|
||||||
|
strUsage += HelpMessageOpt("-choosedatadir", strprintf(_("Choose data directory on startup (default: %u)"), DEFAULT_CHOOSE_DATADIR));
|
||||||
|
strUsage += HelpMessageOpt("-lang=<lang>", _("Set language, for example \"de_DE\" (default: system locale)"));
|
||||||
|
strUsage += HelpMessageOpt("-min", _("Start minimized"));
|
||||||
|
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
|
||||||
|
strUsage += HelpMessageOpt("-splash", strprintf(_("Show splash screen on startup (default: %u)"), DEFAULT_SPLASHSCREEN));
|
||||||
|
strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
|
||||||
|
if (showDebug) {
|
||||||
|
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
|
||||||
|
}
|
||||||
|
QString coreOptions = QString::fromStdString(strUsage);
|
||||||
text = version + "\n" + header + "\n" + coreOptions;
|
text = version + "\n" + header + "\n" + coreOptions;
|
||||||
|
|
||||||
QTextTableFormat tf;
|
QTextTableFormat tf;
|
||||||
|
|
|
@ -56,10 +56,6 @@ extern CTranslationInterface translationInterface;
|
||||||
extern const char * const BITCOIN_CONF_FILENAME;
|
extern const char * const BITCOIN_CONF_FILENAME;
|
||||||
extern const char * const BITCOIN_PID_FILENAME;
|
extern const char * const BITCOIN_PID_FILENAME;
|
||||||
|
|
||||||
static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
|
|
||||||
static const bool DEFAULT_CHOOSE_DATADIR = false;
|
|
||||||
static const bool DEFAULT_SPLASHSCREEN = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translation function: Call Translate signal on UI interface, which returns a boost::optional result.
|
* Translation function: Call Translate signal on UI interface, which returns a boost::optional result.
|
||||||
* If no translation slot is registered, nothing is returned, and simply return the input.
|
* If no translation slot is registered, nothing is returned, and simply return the input.
|
||||||
|
|
Loading…
Reference in a new issue