diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-08-28 23:20:46 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-08-28 23:20:46 +0200 |
commit | fbe0fcae7641889b778ecb6bd7067eff5b1b2c4e (patch) | |
tree | b72cfcec8a07a6ff1b98c26e04b5ac1e7c52d9c4 /src/qt/transactiontablemodel.cpp | |
parent | 3ed668dbe220168198e651f0cef38d29bd9bbbb0 (diff) |
[Qt] minor watch-only changes
- use watch-only, not watchonly
- add back a tooltip hint when hovering addresses and attach
"(watch-only)" at the end
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 1a1f726bf8..734c7afc4e 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -394,19 +394,25 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const { + QString watchAddress; + if (tooltip) { + // Mark transactions involving watch-only addresses by adding " (watch-only)" + watchAddress = wtx->involvesWatchAddress ? QString(" (") + tr("watch-only") + QString(")") : ""; + } + switch(wtx->type) { case TransactionRecord::RecvFromOther: - return QString::fromStdString(wtx->address); + return QString::fromStdString(wtx->address) + watchAddress; case TransactionRecord::RecvWithAddress: case TransactionRecord::SendToAddress: case TransactionRecord::Generated: - return lookupAddress(wtx->address, tooltip); + return lookupAddress(wtx->address, tooltip) + watchAddress; case TransactionRecord::SendToOther: - return QString::fromStdString(wtx->address); + return QString::fromStdString(wtx->address) + watchAddress; case TransactionRecord::SendToSelf: default: - return tr("(n/a)"); + return tr("(n/a)") + watchAddress; } } |