@@ -79,9 +79,15 @@ WalletView::~WalletView()
7979void WalletView::setBitcoinGUI (BitcoinGUI *gui)
8080{
8181 this ->gui = gui;
82- if (gui)
82+
83+ if (gui)
8384 {
85+ // Clicking on a transaction on the overview page sends you to the transactions tab
8486 connect (overviewPage, SIGNAL (transactionClicked (QModelIndex)), gui, SLOT (gotoHistoryPage ()));
87+
88+ // Receive and report messages
89+ connect (this , SIGNAL (message (QString,QString,unsigned int )), gui, SLOT (message (QString,QString,unsigned int )));
90+ connect (sendCoinsPage, SIGNAL (message (QString,QString,unsigned int )), gui, SLOT (message (QString,QString,unsigned int )));
8591 }
8692}
8793
@@ -185,15 +191,7 @@ void WalletView::gotoVerifyMessageTab(QString addr)
185191
186192bool WalletView::handlePaymentRequest (const SendCoinsRecipient& recipient)
187193{
188- // URI has to be valid
189- if (sendCoinsPage->handlePaymentRequest (recipient))
190- {
191- gotoSendCoinsPage ();
192- emit showNormalIfMinimized ();
193- return true ;
194- }
195- else
196- return false ;
194+ return sendCoinsPage->handlePaymentRequest (recipient);
197195}
198196
199197void WalletView::showOutOfSyncWarning (bool fShow )
@@ -227,12 +225,12 @@ void WalletView::backupWallet()
227225 QString filename = QFileDialog::getSaveFileName (this , tr (" Backup Wallet" ), saveDir, tr (" Wallet Data (*.dat)" ));
228226 if (!filename.isEmpty ()) {
229227 if (!walletModel->backupWallet (filename)) {
230- gui-> message (tr (" Backup Failed" ), tr (" There was an error trying to save the wallet data to the new location." ),
231- CClientUIInterface::MSG_ERROR);
228+ emit message (tr (" Backup Failed" ), tr (" There was an error trying to save the wallet data to the new location." ),
229+ CClientUIInterface::MSG_ERROR);
232230 }
233231 else
234- gui-> message (tr (" Backup Successful" ), tr (" The wallet data was successfully saved to the new location." ),
235- CClientUIInterface::MSG_INFORMATION);
232+ emit message (tr (" Backup Successful" ), tr (" The wallet data was successfully saved to the new location." ),
233+ CClientUIInterface::MSG_INFORMATION);
236234 }
237235}
238236
0 commit comments