File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
35
35
}
36
36
});
37
37
38
- #ifndef USE_SQLITE
39
- ui->descriptor_checkbox ->setToolTip (tr (" Compiled without sqlite support (required for descriptor wallets)" ));
40
- ui->descriptor_checkbox ->setEnabled (false );
41
- ui->descriptor_checkbox ->setChecked (false );
42
- #endif
38
+ connect (ui->disable_privkeys_checkbox , &QCheckBox::toggled, [this ](bool checked) {
39
+ // Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
40
+ // set to true, enable it when isDisablePrivateKeysChecked is false.
41
+ ui->encrypt_wallet_checkbox ->setEnabled (!checked);
42
+
43
+ // Wallets without private keys start out blank
44
+ if (checked) {
45
+ ui->blank_wallet_checkbox ->setChecked (true );
46
+ }
47
+
48
+ // When the encrypt_wallet_checkbox is disabled, uncheck it.
49
+ if (!ui->encrypt_wallet_checkbox ->isEnabled ()) {
50
+ ui->encrypt_wallet_checkbox ->setChecked (false );
51
+ }
52
+ });
53
+
54
+ #ifndef USE_SQLITE
55
+ ui->descriptor_checkbox ->setToolTip (tr (" Compiled without sqlite support (required for descriptor wallets)" ));
56
+ ui->descriptor_checkbox ->setEnabled (false );
57
+ ui->descriptor_checkbox ->setChecked (false );
58
+ #endif
59
+
43
60
}
44
61
45
62
CreateWalletDialog::~CreateWalletDialog ()
Original file line number Diff line number Diff line change 68
68
<string >Encrypt Wallet</string >
69
69
</property >
70
70
<property name =" checked" >
71
- <bool >true </bool >
71
+ <bool >false </bool >
72
72
</property >
73
73
</widget >
74
74
<widget class =" QCheckBox" name =" disable_privkeys_checkbox" >
75
75
<property name =" enabled" >
76
- <bool >false </bool >
76
+ <bool >true </bool >
77
77
</property >
78
78
<property name =" geometry" >
79
79
<rect >
You can’t perform that action at this time.
0 commit comments