mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-02-06 12:14:14 +00:00
Don't show wallet options in the preferences menu when running with -disablewallet
This commit is contained in:
parent
af3ec17f67
commit
d52f072605
@ -103,9 +103,9 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
|
|||||||
QString windowTitle = tr("Bitcoin Core") + " - ";
|
QString windowTitle = tr("Bitcoin Core") + " - ";
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
/* if compiled with wallet support, -disablewallet can still disable the wallet */
|
/* if compiled with wallet support, -disablewallet can still disable the wallet */
|
||||||
bool enableWallet = !GetBoolArg("-disablewallet", false);
|
enableWallet = !GetBoolArg("-disablewallet", false);
|
||||||
#else
|
#else
|
||||||
bool enableWallet = false;
|
enableWallet = false;
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
if(enableWallet)
|
if(enableWallet)
|
||||||
{
|
{
|
||||||
@ -554,7 +554,7 @@ void BitcoinGUI::optionsClicked()
|
|||||||
if(!clientModel || !clientModel->getOptionsModel())
|
if(!clientModel || !clientModel->getOptionsModel())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OptionsDialog dlg(this);
|
OptionsDialog dlg(this, enableWallet);
|
||||||
dlg.setModel(clientModel->getOptionsModel());
|
dlg.setModel(clientModel->getOptionsModel());
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ public:
|
|||||||
bool setCurrentWallet(const QString& name);
|
bool setCurrentWallet(const QString& name);
|
||||||
void removeAllWallets();
|
void removeAllWallets();
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
bool enableWallet;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent *e);
|
void changeEvent(QEvent *e);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
OptionsDialog::OptionsDialog(QWidget *parent) :
|
OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::OptionsDialog),
|
ui(new Ui::OptionsDialog),
|
||||||
model(0),
|
model(0),
|
||||||
@ -66,6 +66,11 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
|
|||||||
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
|
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* remove Wallet tab in case of -disablewallet */
|
||||||
|
if (!enableWallet) {
|
||||||
|
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWallet));
|
||||||
|
}
|
||||||
|
|
||||||
/* Display elements init */
|
/* Display elements init */
|
||||||
QDir translations(":translations");
|
QDir translations(":translations");
|
||||||
ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
|
ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
|
||||||
|
@ -24,7 +24,7 @@ class OptionsDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OptionsDialog(QWidget *parent);
|
explicit OptionsDialog(QWidget *parent, bool enableWallet);
|
||||||
~OptionsDialog();
|
~OptionsDialog();
|
||||||
|
|
||||||
void setModel(OptionsModel *model);
|
void setModel(OptionsModel *model);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user