aboutsummaryrefslogtreecommitdiff
path: root/src/qt/editaddressdialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-16 19:01:05 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-16 19:25:02 +0200
commita5e6d72339f28699bc356603f695bd620be37e83 (patch)
treee1e0501a5b58cbc018f5f6ad60c064f84d747a9c /src/qt/editaddressdialog.cpp
parentd4211176208b5e4ae4a699c6ce3239447752cdb2 (diff)
downloadbitcoin-a5e6d72339f28699bc356603f695bd620be37e83.tar.xz
add sendmany support
Diffstat (limited to 'src/qt/editaddressdialog.cpp')
-rw-r--r--src/qt/editaddressdialog.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp
index 7ea5638b4b..a0b27e83bb 100644
--- a/src/qt/editaddressdialog.cpp
+++ b/src/qt/editaddressdialog.cpp
@@ -79,23 +79,22 @@ QString EditAddressDialog::saveCurrentRow()
void EditAddressDialog::accept()
{
- if(mode == NewSendingAddress || mode == EditSendingAddress)
+ if(saveCurrentRow().isEmpty())
{
- // For sending addresses, check validity
- // Not needed for receiving addresses, as those are generated
- if(!model->validateAddress(ui->addressEdit->text()))
+ switch(model->getEditStatus())
{
+ case AddressTableModel::DUPLICATE_ADDRESS:
+ QMessageBox::warning(this, windowTitle(),
+ tr("The entered address \"%1\" is already in the address book.").arg(ui->addressEdit->text()),
+ QMessageBox::Ok, QMessageBox::Ok);
+ break;
+ case AddressTableModel::INVALID_ADDRESS:
QMessageBox::warning(this, windowTitle(),
tr("The entered address \"%1\" is not a valid bitcoin address.").arg(ui->addressEdit->text()),
QMessageBox::Ok, QMessageBox::Ok);
return;
}
- }
- if(saveCurrentRow().isEmpty())
- {
- QMessageBox::warning(this, windowTitle(),
- tr("The entered address \"%1\" is already in the address book.").arg(ui->addressEdit->text()),
- QMessageBox::Ok, QMessageBox::Ok);
+
return;
}
QDialog::accept();