Merge #8777: [qt] WalletModel: Expose disablewallet
6666ca6 [qt] WalletModel: Expose disablewallet (MarcoFalke)
This commit is contained in:
parent
bd9449c00f
commit
bfa539a1dd
@ -81,6 +81,7 @@ const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
|
||||
|
||||
BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
enableWallet(false),
|
||||
clientModel(0),
|
||||
walletFrame(0),
|
||||
unitDisplayControl(0),
|
||||
@ -133,10 +134,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
|
||||
|
||||
QString windowTitle = tr(PACKAGE_NAME) + " - ";
|
||||
#ifdef ENABLE_WALLET
|
||||
/* if compiled with wallet support, -disablewallet can still disable the wallet */
|
||||
enableWallet = !GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
|
||||
#else
|
||||
enableWallet = false;
|
||||
enableWallet = WalletModel::isWalletEnabled();
|
||||
#endif // ENABLE_WALLET
|
||||
if(enableWallet)
|
||||
{
|
||||
|
@ -760,6 +760,11 @@ bool WalletModel::abandonTransaction(uint256 hash) const
|
||||
return wallet->AbandonTransaction(hash);
|
||||
}
|
||||
|
||||
bool WalletModel::isWalletEnabled()
|
||||
{
|
||||
return !GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
|
||||
}
|
||||
|
||||
bool WalletModel::hdEnabled() const
|
||||
{
|
||||
return wallet->IsHDEnabled();
|
||||
|
@ -214,6 +214,8 @@ public:
|
||||
bool transactionCanBeAbandoned(uint256 hash) const;
|
||||
bool abandonTransaction(uint256 hash) const;
|
||||
|
||||
static bool isWalletEnabled();
|
||||
|
||||
bool hdEnabled() const;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user