aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-09 10:53:55 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-09 10:54:17 +0200
commitf54d59ba4a9136a79734ac399433b0e74b1bec00 (patch)
treef16f3c5a0ef80b9bbda5fe7d264ab5db3969c859 /src/qt/bitcoingui.cpp
parent2eace48d9a50e5393f3627bcd0614ed9b262794a (diff)
add export functionality for address book / receiving addresses
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 5291951334..94bd9765e3 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -184,7 +184,6 @@ void BitcoinGUI::createActions()
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(openBitcoinAction, SIGNAL(triggered()), this, SLOT(show()));
- connect(exportAction, SIGNAL(triggered()), this, SLOT(exportClicked()));
}
void BitcoinGUI::setClientModel(ClientModel *clientModel)
@@ -440,28 +439,39 @@ void BitcoinGUI::gotoOverviewPage()
{
overviewAction->setChecked(true);
centralWidget->setCurrentWidget(overviewPage);
+
exportAction->setEnabled(false);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}
void BitcoinGUI::gotoHistoryPage()
{
historyAction->setChecked(true);
centralWidget->setCurrentWidget(transactionsPage);
+
exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked()));
}
void BitcoinGUI::gotoAddressBookPage()
{
addressBookAction->setChecked(true);
centralWidget->setCurrentWidget(addressBookPage);
- exportAction->setEnabled(false); // TODO
+
+ exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked()));
}
void BitcoinGUI::gotoReceiveCoinsPage()
{
receiveCoinsAction->setChecked(true);
centralWidget->setCurrentWidget(receiveCoinsPage);
- exportAction->setEnabled(false); // TODO
+
+ exportAction->setEnabled(true);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
+ connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked()));
}
void BitcoinGUI::gotoSendCoinsPage()
@@ -469,13 +479,8 @@ void BitcoinGUI::gotoSendCoinsPage()
sendCoinsAction->setChecked(true);
sendCoinsPage->clear();
centralWidget->setCurrentWidget(sendCoinsPage);
- exportAction->setEnabled(false);
-}
-void BitcoinGUI::exportClicked()
-{
- // Redirect to the right view, as soon as export for other views
- // (such as address book) is implemented.
- transactionView->exportClicked();
+ exportAction->setEnabled(false);
+ disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}