mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Merge bitcoin-core/gui#739: Disable and uncheck blank when private keys are disabled
9ea31eba04
gui: Disable and uncheck blank when private keys are disabled (Andrew Chow) Pull request description: Unify the GUI's create wallet with the RPC createwallet so that the blank flag is not set when private keys are disabled. ACKs for top commit: S3RK: Code review ACK9ea31eba04
jarolrod: ACK9ea31eba04
pablomartin4btc: tACK9ea31eba04
Tree-SHA512: 0c90dbd77e66f088c6a57711a4b91e254814c4ee301ab703807f281cacd4b08712d2dfeac7661f28bc0e93acc55d486a17b8b4a53ffa57093d992e7a3c51f4e8
This commit is contained in:
commit
bce7b087cb
1 changed files with 9 additions and 8 deletions
|
@ -58,10 +58,7 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
|||
ui->descriptor_checkbox->setChecked(checked);
|
||||
ui->encrypt_wallet_checkbox->setChecked(false);
|
||||
ui->disable_privkeys_checkbox->setChecked(checked);
|
||||
// The blank check box is ambiguous. This flag is always true for a
|
||||
// watch-only wallet, even though we immedidately fetch keys from the
|
||||
// external signer.
|
||||
ui->blank_wallet_checkbox->setChecked(checked);
|
||||
ui->blank_wallet_checkbox->setChecked(false);
|
||||
});
|
||||
|
||||
connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [this](bool checked) {
|
||||
|
@ -69,9 +66,10 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
|||
// set to true, enable it when isDisablePrivateKeysChecked is false.
|
||||
ui->encrypt_wallet_checkbox->setEnabled(!checked);
|
||||
|
||||
// Wallets without private keys start out blank
|
||||
// Wallets without private keys cannot set blank
|
||||
ui->blank_wallet_checkbox->setEnabled(!checked);
|
||||
if (checked) {
|
||||
ui->blank_wallet_checkbox->setChecked(true);
|
||||
ui->blank_wallet_checkbox->setChecked(false);
|
||||
}
|
||||
|
||||
// When the encrypt_wallet_checkbox is disabled, uncheck it.
|
||||
|
@ -81,8 +79,11 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
|||
});
|
||||
|
||||
connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) {
|
||||
if (!checked) {
|
||||
ui->disable_privkeys_checkbox->setChecked(false);
|
||||
// Disable the disable_privkeys_checkbox when blank_wallet_checkbox is checked
|
||||
// as blank-ness only pertains to wallets with private keys.
|
||||
ui->disable_privkeys_checkbox->setEnabled(!checked);
|
||||
if (checked) {
|
||||
ui->disable_privkeys_checkbox->setChecked(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue