aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletview.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-25 06:43:19 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-25 06:43:19 -0700
commit0d09b3e8b0218169ab7ad2aa787c43ea11bc7060 (patch)
treeca452e91451b9c531fc0a84e0a578093a6080792 /src/qt/walletview.cpp
parent3b7028201544e647257b3bf5e358f5ae335f7897 (diff)
parent2384a2864b6a0b29eec6410057aefe1fd8e7e585 (diff)
Merge pull request #3144 from Diapolo/message_sendcoinsdialog
allow emit message() in sendcoinsdialog and walletview
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r--src/qt/walletview.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 578874c54e..57e64b0826 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -79,9 +79,15 @@ WalletView::~WalletView()
void WalletView::setBitcoinGUI(BitcoinGUI *gui)
{
this->gui = gui;
- if(gui)
+
+ if (gui)
{
+ // Clicking on a transaction on the overview page sends you to the transactions tab
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui, SLOT(gotoHistoryPage()));
+
+ // Receive and report messages
+ connect(this, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int)));
+ connect(sendCoinsPage, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int)));
}
}
@@ -185,15 +191,7 @@ void WalletView::gotoVerifyMessageTab(QString addr)
bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
{
- // URI has to be valid
- if (sendCoinsPage->handlePaymentRequest(recipient))
- {
- gotoSendCoinsPage();
- emit showNormalIfMinimized();
- return true;
- }
- else
- return false;
+ return sendCoinsPage->handlePaymentRequest(recipient);
}
void WalletView::showOutOfSyncWarning(bool fShow)
@@ -227,12 +225,12 @@ void WalletView::backupWallet()
QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)"));
if (!filename.isEmpty()) {
if (!walletModel->backupWallet(filename)) {
- gui->message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to the new location."),
- CClientUIInterface::MSG_ERROR);
+ emit message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to the new location."),
+ CClientUIInterface::MSG_ERROR);
}
else
- gui->message(tr("Backup Successful"), tr("The wallet data was successfully saved to the new location."),
- CClientUIInterface::MSG_INFORMATION);
+ emit message(tr("Backup Successful"), tr("The wallet data was successfully saved to the new location."),
+ CClientUIInterface::MSG_INFORMATION);
}
}