Skip to content

Commit ac3d107

Browse files
committed
gui: Add transactionClicked and coinsSent signals to WalletView
1 parent ac61ec9 commit ac3d107

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/qt/walletview.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent):
6565
addWidget(receiveCoinsPage);
6666
addWidget(sendCoinsPage);
6767

68+
connect(overviewPage, &OverviewPage::transactionClicked, this, &WalletView::transactionClicked);
6869
// Clicking on a transaction on the overview pre-selects the transaction on the transaction history page
6970
connect(overviewPage, &OverviewPage::transactionClicked, transactionView, static_cast<void (TransactionView::*)(const QModelIndex&)>(&TransactionView::focusTransaction));
7071

7172
connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::requestedSyncWarningInfo);
7273

74+
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, this, &WalletView::coinsSent);
7375
// Highlight transaction after send
7476
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, transactionView, static_cast<void (TransactionView::*)(const uint256&)>(&TransactionView::focusTransaction));
7577

@@ -91,10 +93,10 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
9193
if (gui)
9294
{
9395
// Clicking on a transaction on the overview page simply sends you to transaction history page
94-
connect(overviewPage, &OverviewPage::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
96+
connect(this, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
9597

9698
// Navigate to transaction history page after send
97-
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
99+
connect(this, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
98100

99101
// Receive and report messages
100102
connect(this, &WalletView::message, [gui](const QString &title, const QString &message, unsigned int style) {

src/qt/walletview.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ public Q_SLOTS:
115115
void requestedSyncWarningInfo();
116116

117117
Q_SIGNALS:
118+
void transactionClicked();
119+
void coinsSent();
118120
/** Fired when a message should be reported to the user */
119121
void message(const QString &title, const QString &message, unsigned int style);
120122
/** Encryption status of wallet changed */

0 commit comments

Comments
 (0)