diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoingui.cpp | 18 | ||||
-rw-r--r-- | src/qt/bitcoingui.h | 2 | ||||
-rw-r--r-- | src/qt/peertablemodel.cpp | 2 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 4 | ||||
-rw-r--r-- | src/qt/walletview.cpp | 8 | ||||
-rw-r--r-- | src/qt/walletview.h | 2 |
6 files changed, 19 insertions, 17 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 58c005ae75..198dd1fdf9 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -859,18 +859,18 @@ void BitcoinGUI::closeEvent(QCloseEvent *event) } #ifdef ENABLE_WALLET -void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address) +void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label) { // On new transaction, make an info balloon + QString msg = tr("Date: %1\n").arg(date) + + tr("Amount: %1\n").arg(BitcoinUnits::formatWithUnit(unit, amount, true)) + + tr("Type: %1\n").arg(type); + if (!label.isEmpty()) + msg += tr("Label: %1\n").arg(label); + else if (!address.isEmpty()) + msg += tr("Address: %1\n").arg(address); message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"), - tr("Date: %1\n" - "Amount: %2\n" - "Type: %3\n" - "Address: %4\n") - .arg(date) - .arg(BitcoinUnits::formatWithUnit(unit, amount, true)) - .arg(type) - .arg(address), CClientUIInterface::MSG_INFORMATION); + msg, CClientUIInterface::MSG_INFORMATION); } #endif // ENABLE_WALLET diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 5a289a9046..494541f002 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -165,7 +165,7 @@ public slots: bool handlePaymentRequest(const SendCoinsRecipient& recipient); /** Show incoming transaction notification for new transactions. */ - void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address); + void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label); #endif // ENABLE_WALLET private slots: diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index dfb7a623af..220f273d02 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -115,7 +115,7 @@ PeerTableModel::PeerTableModel(ClientModel *parent) : clientModel(parent), timer(0) { - columns << tr("Address/Hostname") << tr("User Agent") << tr("Ping Time"); + columns << tr("Node/Service") << tr("User Agent") << tr("Ping Time"); priv = new PeerTablePriv(); // default to unsorted priv->sortColumn = -1; diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index dff2676b10..34464b4075 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -227,7 +227,7 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren priv(new TransactionTablePriv(wallet, this)), fProcessingQueuedTransactions(false) { - columns << QString() << QString() << tr("Date") << tr("Type") << tr("Address") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); + columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); priv->refreshWallet(); connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); @@ -626,7 +626,7 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat case Watchonly: return tr("Whether or not a watch-only address is involved in this transaction."); case ToAddress: - return tr("Destination address of transaction."); + return tr("User-defined intent/purpose of the transaction."); case Amount: return tr("Amount removed from or added to balance."); } diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 9d6a060194..956c8b8913 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -93,7 +93,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui) connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int))); // Pass through transaction notifications - connect(this, SIGNAL(incomingTransaction(QString,int,CAmount,QString,QString)), gui, SLOT(incomingTransaction(QString,int,CAmount,QString,QString))); + connect(this, SIGNAL(incomingTransaction(QString,int,CAmount,QString,QString,QString)), gui, SLOT(incomingTransaction(QString,int,CAmount,QString,QString,QString))); } } @@ -149,9 +149,11 @@ void WalletView::processNewTransaction(const QModelIndex& parent, int start, int QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString(); qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong(); QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString(); - QString address = ttm->index(start, TransactionTableModel::ToAddress, parent).data().toString(); + QModelIndex index = ttm->index(start, 0, parent); + QString address = ttm->data(index, TransactionTableModel::AddressRole).toString(); + QString label = ttm->data(index, TransactionTableModel::LabelRole).toString(); - emit incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address); + emit incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label); } void WalletView::gotoOverviewPage() diff --git a/src/qt/walletview.h b/src/qt/walletview.h index f3d14c065c..1840e21e9c 100644 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -113,7 +113,7 @@ signals: /** Encryption status of wallet changed */ void encryptionStatusChanged(int status); /** Notify that a new transaction appeared */ - void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address); + void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label); }; #endif // BITCOIN_QT_WALLETVIEW_H |