aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-11-12 14:54:43 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-13 09:22:00 +0100
commit146ba964e4b784171c29600e959a0fae3e2e0c03 (patch)
treec94ccf87d3a0386adc0e8b07ac35353995ad4e29 /src/qt/bitcoingui.cpp
parente6b7e3dc79e91db7a9e20ec8fd593145f6c3ac41 (diff)
qt: GUI support for -disablewallet mode
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 8b0aba1b5b..a1becc12ec 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -163,6 +163,9 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
// Install event filter to be able to catch status tip events (QEvent::StatusTip)
this->installEventFilter(this);
+
+ // Initially wallet actions should be disabled
+ setWalletActionsEnabled(false);
}
BitcoinGUI::~BitcoinGUI()
@@ -352,6 +355,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
{
+ setWalletActionsEnabled(true);
return walletFrame->addWallet(name, walletModel);
}
@@ -362,9 +366,26 @@ bool BitcoinGUI::setCurrentWallet(const QString& name)
void BitcoinGUI::removeAllWallets()
{
+ setWalletActionsEnabled(false);
walletFrame->removeAllWallets();
}
+void BitcoinGUI::setWalletActionsEnabled(bool enabled)
+{
+ overviewAction->setEnabled(enabled);
+ sendCoinsAction->setEnabled(enabled);
+ receiveCoinsAction->setEnabled(enabled);
+ historyAction->setEnabled(enabled);
+ encryptWalletAction->setEnabled(enabled);
+ backupWalletAction->setEnabled(enabled);
+ changePassphraseAction->setEnabled(enabled);
+ signMessageAction->setEnabled(enabled);
+ verifyMessageAction->setEnabled(enabled);
+ usedSendingAddressesAction->setEnabled(enabled);
+ usedReceivingAddressesAction->setEnabled(enabled);
+ openAction->setEnabled(enabled);
+}
+
void BitcoinGUI::createTrayIcon(bool fIsTestnet)
{
#ifndef Q_OS_MAC