aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-25 19:32:36 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-25 19:32:36 +0200
commit38deedc1b52e915f2eac733e0fd7f5112361241b (patch)
tree06543bcecdab9d5a0fe095ff0fa858a6afc46f87 /src/qt/sendcoinsdialog.cpp
parentc88e14fe26b7b8bfd8f5828c7060ac1196b34f50 (diff)
allow adding address to address book in send dialog
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 5f9ee18a37..67c270e6f8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -46,6 +46,7 @@ void SendCoinsDialog::on_sendButton_clicked()
{
bool valid;
QString payAmount = ui->payAmount->text();
+ QString label;
qint64 payAmountParsed;
valid = ParseMoney(payAmount.toStdString(), payAmountParsed);
@@ -58,7 +59,13 @@ void SendCoinsDialog::on_sendButton_clicked()
return;
}
- switch(model->sendCoins(ui->payTo->text(), payAmountParsed))
+ if(ui->addToAddressBook->isChecked())
+ {
+ // Add address to address book under label, if specified
+ label = ui->addAsLabel->text();
+ }
+
+ switch(model->sendCoins(ui->payTo->text(), payAmountParsed, label))
{
case ClientModel::InvalidAddress:
QMessageBox::warning(this, tr("Send Coins"),
@@ -110,3 +117,8 @@ void SendCoinsDialog::on_buttonBox_rejected()
{
reject();
}
+
+void SendCoinsDialog::on_addToAddressBook_toggled(bool checked)
+{
+ ui->addAsLabel->setEnabled(checked);
+}