Skip to content

Commit 50dafec

Browse files
committed
Merge e7986c5 into merged_master (Bitcoin PR bitcoin-core/gui#96)
2 parents 94f7b7b + e7986c5 commit 50dafec

File tree

2 files changed

+48
-11
lines changed

2 files changed

+48
-11
lines changed

src/qt/createwalletdialog.cpp

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
3535
}
3636
});
3737

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+
4360
}
4461

4562
CreateWalletDialog::~CreateWalletDialog()

src/qt/forms/createwalletdialog.ui

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
<height>24</height>
3939
</rect>
4040
</property>
41+
<property name="placeholderText">
42+
<string>Wallet</string>
43+
</property>
4144
</widget>
4245
<widget class="QLabel" name="label">
4346
<property name="geometry">
@@ -68,17 +71,33 @@
6871
<string>Encrypt Wallet</string>
6972
</property>
7073
<property name="checked">
71-
<bool>true</bool>
74+
<bool>false</bool>
75+
</property>
76+
</widget>
77+
<widget class="QLabel" name="advanced_options_label">
78+
<property name="geometry">
79+
<rect>
80+
<x>20</x>
81+
<y>90</y>
82+
<width>130</width>
83+
<height>21</height>
84+
</rect>
85+
</property>
86+
<property name="styleSheet">
87+
<string notr="true">font-weight:bold;</string>
88+
</property>
89+
<property name="text">
90+
<string>Advanced options</string>
7291
</property>
7392
</widget>
7493
<widget class="QCheckBox" name="disable_privkeys_checkbox">
7594
<property name="enabled">
76-
<bool>false</bool>
95+
<bool>true</bool>
7796
</property>
7897
<property name="geometry">
7998
<rect>
8099
<x>20</x>
81-
<y>80</y>
100+
<y>115</y>
82101
<width>171</width>
83102
<height>22</height>
84103
</rect>
@@ -94,8 +113,8 @@
94113
<property name="geometry">
95114
<rect>
96115
<x>20</x>
97-
<y>110</y>
98-
<width>171</width>
116+
<y>135</y>
117+
<width>220</width>
99118
<height>22</height>
100119
</rect>
101120
</property>
@@ -110,7 +129,7 @@
110129
<property name="geometry">
111130
<rect>
112131
<x>20</x>
113-
<y>140</y>
132+
<y>155</y>
114133
<width>171</width>
115134
<height>22</height>
116135
</rect>
@@ -128,6 +147,7 @@
128147
<tabstop>encrypt_wallet_checkbox</tabstop>
129148
<tabstop>disable_privkeys_checkbox</tabstop>
130149
<tabstop>blank_wallet_checkbox</tabstop>
150+
<tabstop>descriptor_checkbox</tabstop>
131151
</tabstops>
132152
<resources/>
133153
<connections>

0 commit comments

Comments
 (0)