aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r--src/qt/optionsdialog.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 67be174d55..069080219e 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -30,7 +30,7 @@
#include <QMessageBox>
#include <QTimer>
-OptionsDialog::OptionsDialog(QWidget *parent) :
+OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
QDialog(parent),
ui(new Ui::OptionsDialog),
model(0),
@@ -66,6 +66,11 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
#endif
+ /* remove Wallet tab in case of -disablewallet */
+ if (!enableWallet) {
+ ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWallet));
+ }
+
/* Display elements init */
QDir translations(":translations");
ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
@@ -100,9 +105,6 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
#endif
ui->unit->setModel(new BitcoinUnits(this));
-#ifdef ENABLE_WALLET
- ui->transactionFee->setSingleStep(CWallet::minTxFee.GetFeePerK());
-#endif
/* Widget-to-option mapper */
mapper = new QDataWidgetMapper(this);
@@ -134,16 +136,11 @@ void OptionsDialog::setModel(OptionsModel *model)
strLabel = tr("none");
ui->overriddenByCommandLineLabel->setText(strLabel);
- connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
-
mapper->setModel(model);
setMapper();
mapper->toFirst();
}
- /* update the display unit, to not use the default ("BTC") */
- updateDisplayUnit();
-
/* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */
/* Main */
@@ -167,7 +164,6 @@ void OptionsDialog::setMapper()
mapper->addMapping(ui->databaseCache, OptionsModel::DatabaseCache);
/* Wallet */
- mapper->addMapping(ui->transactionFee, OptionsModel::Fee);
mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
@@ -259,15 +255,6 @@ void OptionsDialog::clearStatusLabel()
ui->statusLabel->clear();
}
-void OptionsDialog::updateDisplayUnit()
-{
- if(model)
- {
- /* Update transactionFee with the current unit */
- ui->transactionFee->setDisplayUnit(model->getDisplayUnit());
- }
-}
-
void OptionsDialog::doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort)
{
Q_UNUSED(nProxyPort);