aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-09-04 16:43:22 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-04 16:44:39 +0200
commitb4cd0975fbc93063473a4d9a09e2b2fe3c4ad489 (patch)
treec4cba7822261238581a6d9e814a8fcf76acc9fe1 /src
parentd800dcc32a5bd103c657815466669e764b0a9749 (diff)
parentfbe0fcae7641889b778ecb6bd7067eff5b1b2c4e (diff)
Merge pull request #4783
fbe0fca [Qt] minor watch-only changes (Philip Kaufmann)
Diffstat (limited to 'src')
-rw-r--r--src/qt/overviewpage.cpp2
-rw-r--r--src/qt/transactiontablemodel.cpp14
-rw-r--r--src/qt/transactionview.cpp2
-rw-r--r--src/qt/walletmodel.h2
4 files changed, 13 insertions, 7 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 15501b8a8a..90762bea5d 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -172,7 +172,7 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
// for symmetry reasons also show immature label when the watch-only one is shown
ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);
ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
- ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watch-only immature balance
+ ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watch-only immature balance
}
// show/hide watch-only labels
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;
}
}
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 2d34d58129..a7ba100cd2 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -331,7 +331,7 @@ void TransactionView::exportClicked()
writer.setModel(transactionProxyModel);
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
if (model && model->haveWatchOnly())
- writer.addColumn(tr("Watchonly"), TransactionTableModel::Watchonly);
+ writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 52d02038cd..00a011d937 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -256,7 +256,7 @@ public slots:
void updateTransaction(const QString &hash, int status);
/* New, updated or removed address book entry */
void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
- /* Watchonly added */
+ /* Watch-only added */
void updateWatchOnlyFlag(bool fHaveWatchonly);
/* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
void pollBalanceChanged();