mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00
Merge bitcoin-core/gui#96: Slight improve create wallet dialog
ac64cec4ce
gui: create wallet: add advanced section (Sjors Provoost)c99d6f644a
gui: create wallet: name placeholder (Sjors Provoost)5bff82540b
[gui] create wallet: smarter checkbox toggling (Sjors Provoost) Pull request description: Previously only users who needed a second wallet had to use to the create wallet dialog. With the merge of https://github.com/bitcoin/bitcoin/pull/15454 now all new users have to. I don't think it was user-friendly enough for that. <img width="403" alt="Schermafbeelding 2020-09-18 om 09 41 44" src="https://user-images.githubusercontent.com/10217/93574129-52ef9680-f998-11ea-9a6f-31144f66d3bf.png"> This PR makes a few simple improvements so that new users don't have to think too much: <img width="369" alt="Schermafbeelding 2020-10-15 om 16 45 22" src="https://user-images.githubusercontent.com/10217/96145959-0c914700-0f06-11eb-9526-cf447d841d7a.png"> It's lightly inspired by #77. It would be better if those changes made it into the upcoming release, but this PR is a good start imo. * wallet encryption is no longer checked by default, because such a change in the default needs a separate discussion (fwiw, I suspect it increases the number of users losing access to coins) * watch-only and descriptor wallet stuff is moved to advanced, so new users know they can safely ignore these check boxes * bonus: when you click on "disable private keys" it disables encrypt wallet and checks blank wallet * label changes: see screenshot * tooltip changes: see code diff Note that a blank wallet name isn't allowed in the dialog; I haven't addressed that. _Update 2020-10-30_, dropped the new strings for now: <img width="450" alt="Schermafbeelding 2020-10-30 om 11 26 55" src="https://user-images.githubusercontent.com/10217/97694591-1b99fc80-1aa3-11eb-8b85-e19f1ad5add4.png"> ACKs for top commit: fjahr: Tested ACKac64cec4ce
jonatack: re-ACKac64cec4ce
, per `git diff d393708 ac64cec` only change since my last review is improving the placeholder from "MyWallet" to "Wallet" and dropping the last commit. Tested creating a dozen wallets in signet with different combinations of options and then verifying/comparing their characteristics in the console with getwalletinfo. My remaining caveats are (1) the need for less user surprise by either (a) improving the user info or (b) with less auto-(un)selecting as mentioned in https://github.com/bitcoin-core/gui/pull/96#issuecomment-727017409 and (2) I prefer the "Encrypt private keys" and "Watch-only" wording and descriptions below over the current ones; hopefully these can be addressed in a follow-up. hebasto: re-ACKac64cec4ce
ryanofsky: Code review ACKac64cec4ce
. Only changes since last review are tweaking placeholder text and dropping "allow nameless" commit Tree-SHA512: a25f84eb66ee4f99af441d73e33928df9d9cf592177398ef48f0037f5913699e47a162cf1301c83b34501546d43ff4ae12607fd078c5c03b92f573bf7604a9f2
This commit is contained in:
commit
e7986c51bc
@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
||||
}
|
||||
});
|
||||
|
||||
#ifndef USE_SQLITE
|
||||
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
|
||||
ui->descriptor_checkbox->setEnabled(false);
|
||||
ui->descriptor_checkbox->setChecked(false);
|
||||
#endif
|
||||
connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [this](bool checked) {
|
||||
// Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
|
||||
// set to true, enable it when isDisablePrivateKeysChecked is false.
|
||||
ui->encrypt_wallet_checkbox->setEnabled(!checked);
|
||||
|
||||
// Wallets without private keys start out blank
|
||||
if (checked) {
|
||||
ui->blank_wallet_checkbox->setChecked(true);
|
||||
}
|
||||
|
||||
// When the encrypt_wallet_checkbox is disabled, uncheck it.
|
||||
if (!ui->encrypt_wallet_checkbox->isEnabled()) {
|
||||
ui->encrypt_wallet_checkbox->setChecked(false);
|
||||
}
|
||||
});
|
||||
|
||||
#ifndef USE_SQLITE
|
||||
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
|
||||
ui->descriptor_checkbox->setEnabled(false);
|
||||
ui->descriptor_checkbox->setChecked(false);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
CreateWalletDialog::~CreateWalletDialog()
|
||||
|
@ -38,6 +38,9 @@
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Wallet</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
@ -68,17 +71,33 @@
|
||||
<string>Encrypt Wallet</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="advanced_options_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>130</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Advanced options</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="disable_privkeys_checkbox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<y>115</y>
|
||||
<width>171</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -94,8 +113,8 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>171</width>
|
||||
<y>135</y>
|
||||
<width>220</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -110,7 +129,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>140</y>
|
||||
<y>155</y>
|
||||
<width>171</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -128,6 +147,7 @@
|
||||
<tabstop>encrypt_wallet_checkbox</tabstop>
|
||||
<tabstop>disable_privkeys_checkbox</tabstop>
|
||||
<tabstop>blank_wallet_checkbox</tabstop>
|
||||
<tabstop>descriptor_checkbox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
Loading…
Reference in New Issue
Block a user