mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
Merge bitcoin-core/gui#396: Ensure external signer option remains disabled without signers
a9b9ca82da
gui: ensure external signer option remains disabled without signers (Andrew Chow) Pull request description: When no external signers are available, the option to enable external signers should always be disabled. However the encrypt wallet checkbox can erroneously re-enable the external signer checkbox. To avoid this, CreateWalletDialog now stores whether signers were available during setSigners so that future calls to external_signer_checkbox->setEnabled can account for whether signers are available. Fixes #395 ACKs for top commit: hebasto: ACKa9b9ca82da
, tested on Linux Mint 20.2 (Qt 5.12.8). Sjors: tACKa9b9ca82da
jarolrod: ACKa9b9ca82da
Tree-SHA512: 98951bcadc23fce99a66ea2d367c44360989e888c253845a767e1f7085c594562d0f099de4130f4a078c5072aa7806294097d976ee6407291f3d3c5a4a608b44
This commit is contained in:
commit
03826aecc5
2 changed files with 4 additions and 2 deletions
|
@ -32,7 +32,7 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
|||
// set to true, enable it when isEncryptWalletChecked is false.
|
||||
ui->disable_privkeys_checkbox->setEnabled(!checked);
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
ui->external_signer_checkbox->setEnabled(!checked);
|
||||
ui->external_signer_checkbox->setEnabled(m_has_signers && !checked);
|
||||
#endif
|
||||
// When the disable_privkeys_checkbox is disabled, uncheck it.
|
||||
if (!ui->disable_privkeys_checkbox->isEnabled()) {
|
||||
|
@ -115,7 +115,8 @@ CreateWalletDialog::~CreateWalletDialog()
|
|||
|
||||
void CreateWalletDialog::setSigners(const std::vector<ExternalSigner>& signers)
|
||||
{
|
||||
if (!signers.empty()) {
|
||||
m_has_signers = !signers.empty();
|
||||
if (m_has_signers) {
|
||||
ui->external_signer_checkbox->setEnabled(true);
|
||||
ui->external_signer_checkbox->setChecked(true);
|
||||
ui->encrypt_wallet_checkbox->setEnabled(false);
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
|
||||
private:
|
||||
Ui::CreateWalletDialog *ui;
|
||||
bool m_has_signers = false;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_CREATEWALLETDIALOG_H
|
||||
|
|
Loading…
Add table
Reference in a new issue