diff options
| author | Philip Kaufmann <[email protected]> | 2013-10-24 15:49:13 +0200 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2013-10-25 14:24:30 +0200 |
| commit | 2384a2864b6a0b29eec6410057aefe1fd8e7e585 (patch) | |
| tree | 13442ace1c06ba82339e8daad62557abeb7ab7d3 /src/qt/walletview.cpp | |
| parent | Merge pull request #3099 from laanwj/2013_10_new_receive_flow (diff) | |
| download | discoin-2384a2864b6a0b29eec6410057aefe1fd8e7e585.tar.xz discoin-2384a2864b6a0b29eec6410057aefe1fd8e7e585.zip | |
allow emit message() in sendcoinsdialog and walletview
- this allows us to use emit message() over MessageBox:: or gui->message()
calls in sendcoinsdialog and walletview
- move main handlePaymentRequest() functionality back to BitcoinGUI
- move a showNormalIfMinimized() before gotoSendCoinsPage()
Diffstat (limited to 'src/qt/walletview.cpp')
| -rw-r--r-- | src/qt/walletview.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 1b80ae34e..75f223d90 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -81,9 +81,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))); } } @@ -187,15 +193,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) @@ -229,12 +227,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); } } |