From abf11f79ae2a9767778b36a2f9e0c4bc97624602 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 1 Apr 2013 14:43:50 +0200 Subject: fix "send coins" via context menu in address book - the send coins context menu entry was not working anymore, because a non current version of #2220 was merged onto current master - also removes some unneeded spaces and adds a comment to WalletModel::getNumTransactions() --- src/qt/walletview.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/qt/walletview.cpp') diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 7dd36234c9..6be34e5ff4 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -74,9 +74,11 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui): // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); - // Clicking on "Verify Message" in the address book sends you to the verify message tab + // Clicking on "Send Coins" in the address book sends you to the send coins tab + connect(addressBookPage, SIGNAL(sendCoins(QString)), this, SLOT(gotoSendCoinsPage(QString))); + // Clicking on "Verify Message" in the address book opens the verify message tab in the Sign/Verify Message dialog connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString))); - // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab + // Clicking on "Sign Message" in the receive coins page opens the sign message tab in the Sign/Verify Message dialog connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString))); gotoOverviewPage(); @@ -257,13 +259,16 @@ void WalletView::gotoReceiveCoinsPage() connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked())); } -void WalletView::gotoSendCoinsPage() +void WalletView::gotoSendCoinsPage(QString addr) { sendCoinsAction->setChecked(true); setCurrentWidget(sendCoinsPage); exportAction->setEnabled(false); disconnect(exportAction, SIGNAL(triggered()), 0, 0); + + if(!addr.isEmpty()) + sendCoinsPage->setAddress(addr); } void WalletView::gotoSignMessageTab(QString addr) -- cgit v1.2.3