diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-22 05:42:22 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-22 05:42:31 +0100 |
commit | be5d37c59757ac3b6deae1e3b238dcb2168207cb (patch) | |
tree | 7fb5012f4f895d2421e48c81140f683f9785bba3 /src/qt | |
parent | 76cfa6022224c2a0dceff012ed774ce2f2a63a46 (diff) | |
parent | fb0507fe4b3ff733386c8e3580032cfc965eec17 (diff) |
Merge pull request #3273
fb0507f qt: show all units in send confirmation (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 0adf24691e..fa8da1c8dd 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -216,12 +216,19 @@ void SendCoinsDialog::on_sendButton_clicked() questionString.append("</span> "); questionString.append(tr("added as transaction fee")); } - if(txFee > 0 || recipients.count() > 1) + + // add total amount in all subdivision units + questionString.append("<hr />"); + qint64 totalAmount = currentTransaction.getTotalTransactionAmount() + txFee; + QStringList alternativeUnits; + foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits()) { - // add total amount string if there are more then one recipients or a fee is required - questionString.append("<hr />"); - questionString.append(tr("Total Amount %1").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), currentTransaction.getTotalTransactionAmount()+txFee))); + if(u != model->getOptionsModel()->getDisplayUnit()) + alternativeUnits.append(BitcoinUnits::formatWithUnit(u, totalAmount)); } + questionString.append(tr("Total Amount %1 (= %2)") + .arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount)) + .arg(alternativeUnits.join(" "+tr("or")+" "))); QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"), questionString.arg(formatted.join("<br />")), |