Do not show the Wallet tab when running -disablewallet.
Issue #5109 #5222
pull sinetek wants to merge 3 commits into bitcoin:master from sinetek:master changing 4 files +11 −5-
sinetek commented at 6:32 AM on November 6, 2014: contributor
-
Don't show wallet options in the preferences menu when running with -disablewallet 99eaba304b
-
in src/qt/optionsdialog.cpp:None in 99eaba304b outdated
65 | @@ -66,6 +66,12 @@ OptionsDialog::OptionsDialog(QWidget *parent) : 66 | ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow)); 67 | #endif 68 | 69 | + /* remove Wallet tab in case of -disablewallet */
laanwj commented at 9:00 AM on November 6, 2014:Also needs to take into account the build-time setting ie
#ifndef ENABLE_WALLET bool enableWallet = false; #else bool enableWallet = !GetBoolArg("-disablewallet", false); #endifHowever this would duplicate the logic from bitcoingui.cpp. I'd prefer a slightly different solution:
- make enableWallet an attribute of
BitcoinGUIclass - pass it into the OptionsDialog constructor when constructed in
BitcoinGUI::optionsClicked - use the passed-in enableWallet here
laanwj added the label GUI on Nov 6, 2014sinetek commented at 7:11 PM on November 6, 2014: contributorAll three points done. How do I amend this pull request to add the new commit?
sipa commented at 7:16 PM on November 6, 2014: membergit push origin masterDon't show wallet options in the preferences menu when running with -disablewallet 30132b7832sinetek commented at 8:45 PM on November 6, 2014: contributorThanks Pieter, got it. Please review my work and pull it in if you feel it fixed the issue at hand.
enableWallet flag fix ef0bad7990in src/qt/bitcoingui.h:None in 30132b7832 outdated
62 | @@ -63,6 +63,7 @@ class BitcoinGUI : public QMainWindow 63 | bool addWallet(const QString& name, WalletModel *walletModel); 64 | bool setCurrentWallet(const QString& name); 65 | void removeAllWallets(); 66 | + bool enableWallet;
laanwj commented at 10:13 AM on November 7, 2014:You need this attribute as well in
!ENABLE_WALLET, otherwise you can't pass it on :)sinetek commented at 5:30 AM on November 8, 2014: contributorWoops :-) Well, that should fix it. Thanks for your patience.
sinetek commented at 6:58 PM on November 8, 2014: contributorI got confused with git when squashing and nuked my git repo. When I figure out I'll make a new pull request.
sinetek closed this on Nov 11, 2014MarcoFalke locked this on Sep 8, 2021 - make enableWallet an attribute of
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me