diff options
| author | fanquake <[email protected]> | 2019-06-13 16:36:43 +0800 |
|---|---|---|
| committer | fanquake <[email protected]> | 2019-06-13 16:47:38 +0800 |
| commit | afab1312c5e151b8688ef62da8c4e7c4f542a1f4 (patch) | |
| tree | 4d14a0d911bd7762bb16f052bfeffd719af67a9a /src | |
| parent | Merge #15834: Fix transaction relay bugs introduced in #14897 and expire tran... (diff) | |
| parent | gui: Enable open wallet menu on setWalletController (diff) | |
| download | discoin-afab1312c5e151b8688ef62da8c4e7c4f542a1f4.tar.xz discoin-afab1312c5e151b8688ef62da8c4e7c4f542a1f4.zip | |
Merge #16118: gui: Enable open wallet menu on setWalletController
75485ef09 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.

Fixes #16087
ACKs for commit 75485e:
jonasschnelli:
utACK 75485ef0962a53946f17b761c4445627b07e6eff
ryanofsky:
utACK 75485ef0962a53946f17b761c4445627b07e6eff. It's a simple, sensible fix.
Tree-SHA512: 9395ceed54bbceb6cbf1cd443f783d07a6ebb8fc5515b63c6e1b8b19b216b08d1cba7eaf872814d7c426ab7192f3b416ba0d57fc84f3bcbfebf01ce153794201
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index b5c92e10a..1444dddeb 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -335,7 +335,7 @@ void BitcoinGUI::createActions() openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); m_open_wallet_action = new QAction(tr("Open Wallet"), this); - m_open_wallet_action->setMenu(new QMenu(this)); + m_open_wallet_action->setEnabled(false); m_open_wallet_action->setStatusTip(tr("Open a wallet")); m_close_wallet_action = new QAction(tr("Close Wallet..."), this); @@ -633,6 +633,9 @@ void BitcoinGUI::setWalletController(WalletController* wallet_controller) m_wallet_controller = wallet_controller; + m_open_wallet_action->setEnabled(true); + m_open_wallet_action->setMenu(new QMenu(this)); + connect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet); connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet); |