PPCoin: Qt: display coinstake as single 'mint by stake' transaction
[novacoin.git] / src / qt / sendcoinsdialog.cpp
index 592ae6f..25b125e 100644 (file)
@@ -48,8 +48,8 @@ void SendCoinsDialog::setModel(WalletModel *model)
     }
     if(model)
     {
-        setBalance(model->getBalance(), model->getUnconfirmedBalance());
-        connect(model, SIGNAL(balanceChanged(qint64, qint64)), this, SLOT(setBalance(qint64, qint64)));
+        setBalance(model->getBalance(), model->getStake(), model->getUnconfirmedBalance());
+        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64)));
     }
 }
 
@@ -154,6 +154,8 @@ void SendCoinsDialog::on_sendButton_clicked()
             tr("Error: The transaction was rejected.  This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."),
             QMessageBox::Ok, QMessageBox::Ok);
         break;
+    case WalletModel::Aborted: // User aborted, nothing to do
+        break;
     case WalletModel::OK:
         accept();
         break;
@@ -275,8 +277,9 @@ void SendCoinsDialog::handleURI(const QString &uri)
     pasteEntry(rv);
 }
 
-void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance)
+void SendCoinsDialog::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance)
 {
+    Q_UNUSED(stake);
     Q_UNUSED(unconfirmedBalance);
     if(!model || !model->getOptionsModel())
         return;