Skip to content

Commit afab131

Browse files
committed
Merge #16118: gui: Enable open wallet menu on setWalletController
75485ef gui: Enable open wallet menu on setWalletController (João Barbosa) Pull request description: `BitcoinApplication::initializeResult` and `BitcoinGUI::setWalletController` are only called after the startup rescan is completed. While the rescan is in progress the window menus are already available. This PR makes the Open Wallet menu disabled until `BitcoinGUI::setWalletController` is called. ![Screenshot 2019-05-29 at 14 17 48](https://user-images.githubusercontent.com/3534524/58560510-35377480-821d-11e9-8f96-d0573c9e47b0.png) Fixes #16087 ACKs for commit 75485e: jonasschnelli: utACK 75485ef ryanofsky: utACK 75485ef. It's a simple, sensible fix. Tree-SHA512: 9395ceed54bbceb6cbf1cd443f783d07a6ebb8fc5515b63c6e1b8b19b216b08d1cba7eaf872814d7c426ab7192f3b416ba0d57fc84f3bcbfebf01ce153794201
2 parents f792395 + 75485ef commit afab131

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/qt/bitcoingui.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void BitcoinGUI::createActions()
335335
openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
336336

337337
m_open_wallet_action = new QAction(tr("Open Wallet"), this);
338-
m_open_wallet_action->setMenu(new QMenu(this));
338+
m_open_wallet_action->setEnabled(false);
339339
m_open_wallet_action->setStatusTip(tr("Open a wallet"));
340340

341341
m_close_wallet_action = new QAction(tr("Close Wallet..."), this);
@@ -633,6 +633,9 @@ void BitcoinGUI::setWalletController(WalletController* wallet_controller)
633633

634634
m_wallet_controller = wallet_controller;
635635

636+
m_open_wallet_action->setEnabled(true);
637+
m_open_wallet_action->setMenu(new QMenu(this));
638+
636639
connect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet);
637640
connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet);
638641

0 commit comments

Comments
 (0)