From ac3d10777d65b68862c6deb57594c8fc4d21ca77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Wed, 15 Jan 2020 22:48:33 +0000 Subject: [PATCH] gui: Add transactionClicked and coinsSent signals to WalletView --- src/qt/walletview.cpp | 6 ++++-- src/qt/walletview.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index c777d633be..246c8eee38 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -65,11 +65,13 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent): addWidget(receiveCoinsPage); addWidget(sendCoinsPage); + connect(overviewPage, &OverviewPage::transactionClicked, this, &WalletView::transactionClicked); // Clicking on a transaction on the overview pre-selects the transaction on the transaction history page connect(overviewPage, &OverviewPage::transactionClicked, transactionView, static_cast(&TransactionView::focusTransaction)); connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::requestedSyncWarningInfo); + connect(sendCoinsPage, &SendCoinsDialog::coinsSent, this, &WalletView::coinsSent); // Highlight transaction after send connect(sendCoinsPage, &SendCoinsDialog::coinsSent, transactionView, static_cast(&TransactionView::focusTransaction)); @@ -91,10 +93,10 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui) if (gui) { // Clicking on a transaction on the overview page simply sends you to transaction history page - connect(overviewPage, &OverviewPage::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage); + connect(this, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage); // Navigate to transaction history page after send - connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage); + connect(this, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage); // Receive and report messages connect(this, &WalletView::message, [gui](const QString &title, const QString &message, unsigned int style) { diff --git a/src/qt/walletview.h b/src/qt/walletview.h index 4313f0bfa2..7d8b09c0be 100644 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -115,6 +115,8 @@ public Q_SLOTS: void requestedSyncWarningInfo(); Q_SIGNALS: + void transactionClicked(); + void coinsSent(); /** Fired when a message should be reported to the user */ void message(const QString &title, const QString &message, unsigned int style); /** Encryption status of wallet changed */