aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-09 10:08:11 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-09 10:08:41 +0100
commit13e99e463d4aa0bd2b2892010ca8c7007c40c242 (patch)
tree5d943f5db33017d1b9784108f59a3f1596e735d0 /src/qt
parent6d697e9fa45b3f3bf67d79cc3d17717b68a43825 (diff)
parent04f58ffd9d2deed7f3ba872e242d967a550ff1d6 (diff)
Merge pull request #3491
04f58ff qt: Better status text for mined transactions (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/transactiontablemodel.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 3777e82f31..b29be7e0cb 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -285,38 +285,40 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
{
QString status;
- switch(wtx->status.status)
- {
- case TransactionStatus::OpenUntilBlock:
- status = tr("Open for %n more block(s)","",wtx->status.open_for);
- break;
- case TransactionStatus::OpenUntilDate:
- status = tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx->status.open_for));
- break;
- case TransactionStatus::Offline:
- status = tr("Offline (%1 confirmations)").arg(wtx->status.depth);
- break;
- case TransactionStatus::Unconfirmed:
- status = tr("Unconfirmed (%1 of %2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
- break;
- case TransactionStatus::HaveConfirmations:
- status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
- break;
- }
if(wtx->type == TransactionRecord::Generated)
{
switch(wtx->status.maturity)
{
case TransactionStatus::Immature:
- status += "\n" + tr("Mined balance will be available when it matures in %n more block(s)", "", wtx->status.matures_in);
+ status = tr("Immature (%1 confirmations, will be available after %2)").arg(wtx->status.depth).arg(wtx->status.depth + wtx->status.matures_in);
break;
case TransactionStatus::Mature:
+ status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
break;
case TransactionStatus::MaturesWarning:
- status += "\n" + tr("This block was not received by any other nodes and will probably not be accepted!");
+ status = tr("This block was not received by any other nodes and will probably not be accepted!");
break;
case TransactionStatus::NotAccepted:
- status += "\n" + tr("Generated but not accepted");
+ status = tr("Generated but not accepted");
+ break;
+ }
+ } else {
+ switch(wtx->status.status)
+ {
+ case TransactionStatus::OpenUntilBlock:
+ status = tr("Open for %n more block(s)","",wtx->status.open_for);
+ break;
+ case TransactionStatus::OpenUntilDate:
+ status = tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx->status.open_for));
+ break;
+ case TransactionStatus::Offline:
+ status = tr("Offline (%1 confirmations)").arg(wtx->status.depth);
+ break;
+ case TransactionStatus::Unconfirmed:
+ status = tr("Unconfirmed (%1 of %2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
+ break;
+ case TransactionStatus::HaveConfirmations:
+ status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
break;
}
}