aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 92be835c56..c3a4e4a0db 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -33,9 +33,8 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
ui->clearButton->setIcon(QIcon());
ui->sendButton->setIcon(QIcon());
#endif
-#if QT_VERSION >= 0x040700
- ui->lineEditCoinControlChange->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
-#endif
+
+ GUIUtil::setupAddressWidget(ui->lineEditCoinControlChange, this);
addEntry();
@@ -43,7 +42,6 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
// Coin Control
- ui->lineEditCoinControlChange->setFont(GUIUtil::bitcoinAddressFont());
connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked()));
connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int)));
connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &)));
@@ -327,9 +325,10 @@ QWidget *SendCoinsDialog::setupTabChain(QWidget *prev)
prev = entry->setupTabChain(prev);
}
}
- QWidget::setTabOrder(prev, ui->addButton);
- QWidget::setTabOrder(ui->addButton, ui->sendButton);
- return ui->sendButton;
+ QWidget::setTabOrder(prev, ui->sendButton);
+ QWidget::setTabOrder(ui->sendButton, ui->clearButton);
+ QWidget::setTabOrder(ui->clearButton, ui->addButton);
+ return ui->addButton;
}
void SendCoinsDialog::setAddress(const QString &address)
@@ -516,6 +515,9 @@ void SendCoinsDialog::coinControlFeatureChanged(bool checked)
if (!checked && model) // coin control features disabled
CoinControlDialog::coinControl->SetNull();
+
+ if (checked)
+ coinControlUpdateLabels();
}
// Coin Control: button inputs -> show actual coin control dialog
@@ -533,7 +535,6 @@ void SendCoinsDialog::coinControlChangeChecked(int state)
if (state == Qt::Unchecked)
{
CoinControlDialog::coinControl->destChange = CNoDestination();
- ui->lineEditCoinControlChange->setValid(true);
ui->labelCoinControlChangeLabel->clear();
}
else
@@ -560,7 +561,6 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
}
else if (!addr.IsValid()) // Invalid address
{
- ui->lineEditCoinControlChange->setValid(false);
ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address"));
}
else // Valid address
@@ -570,7 +570,6 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
addr.GetKeyID(keyid);
if (!model->getPubKey(keyid, pubkey)) // Unknown change address
{
- ui->lineEditCoinControlChange->setValid(false);
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
}
else // Known change address