add export functionality for address book / receiving addresses
[novacoin.git] / src / qt / sendcoinsdialog.cpp
index 2265f88..4adda7e 100644 (file)
@@ -1,6 +1,7 @@
 #include "sendcoinsdialog.h"
 #include "ui_sendcoinsdialog.h"
 #include "walletmodel.h"
+#include "addresstablemodel.h"
 #include "guiutil.h"
 
 #include "addressbookpage.h"
@@ -20,8 +21,10 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent, const QString &address) :
 {
     ui->setupUi(this);
 #if QT_VERSION >= 0x040700
+    ui->payTo->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
     ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
 #endif
+
     GUIUtil::setupAddressWidget(ui->payTo, this);
 
     // Set initial send-to address if provided
@@ -129,7 +132,7 @@ void SendCoinsDialog::on_buttonBox_rejected()
 
 void SendCoinsDialog::on_payTo_textChanged(const QString &address)
 {
-    ui->addAsLabel->setText(model->labelForAddress(address));
+    ui->addAsLabel->setText(model->getAddressTableModel()->labelForAddress(address));
 }
 
 void SendCoinsDialog::clear()
@@ -138,6 +141,7 @@ void SendCoinsDialog::clear()
     ui->addAsLabel->setText(QString());
     ui->payAmount->setText(QString());
     ui->payTo->setFocus();
+    ui->sendButton->setDefault(true);
 }
 
 void SendCoinsDialog::reject()