Skip to content

Commit 2f5bdcb

Browse files
committed
gui: misc external signer fixes and translation hints
1 parent d672404 commit 2f5bdcb

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

src/qt/createwalletdialog.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
3131
// Disable the disable_privkeys_checkbox and external_signer_checkbox when isEncryptWalletChecked is
3232
// set to true, enable it when isEncryptWalletChecked is false.
3333
ui->disable_privkeys_checkbox->setEnabled(!checked);
34+
#ifdef ENABLE_EXTERNAL_SIGNER
3435
ui->external_signer_checkbox->setEnabled(!checked);
35-
36+
#endif
3637
// When the disable_privkeys_checkbox is disabled, uncheck it.
3738
if (!ui->disable_privkeys_checkbox->isEnabled()) {
3839
ui->disable_privkeys_checkbox->setChecked(false);
@@ -112,7 +113,7 @@ CreateWalletDialog::~CreateWalletDialog()
112113
delete ui;
113114
}
114115

115-
void CreateWalletDialog::setSigners(std::vector<ExternalSigner>& signers)
116+
void CreateWalletDialog::setSigners(const std::vector<ExternalSigner>& signers)
116117
{
117118
if (!signers.empty()) {
118119
ui->external_signer_checkbox->setEnabled(true);

src/qt/createwalletdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CreateWalletDialog : public QDialog
2424
explicit CreateWalletDialog(QWidget* parent);
2525
virtual ~CreateWalletDialog();
2626

27-
void setSigners(std::vector<ExternalSigner>& signers);
27+
void setSigners(const std::vector<ExternalSigner>& signers);
2828

2929
QString walletName() const;
3030
bool isEncryptWalletChecked() const;

src/qt/optionsdialog.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
9292
ui->thirdPartyTxUrls->setVisible(false);
9393
}
9494

95+
#ifndef ENABLE_EXTERNAL_SIGNER
96+
//: "External signing" means using devices such as hardware wallets.
97+
ui->externalSignerPath->setToolTip(tr("Compiled without external signing support (required for external signing)"));
98+
ui->externalSignerPath->setEnabled(false);
99+
#endif
95100
/* Display elements init */
96101
QDir translations(":translations");
97102

src/qt/receiverequestdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void ReceiveRequestDialog::setInfo(const SendCoinsRecipient &_info)
9090
ui->wallet_content->hide();
9191
}
9292

93-
ui->btnVerify->setVisible(this->model->wallet().hasExternalSigner());
93+
ui->btnVerify->setVisible(model->wallet().hasExternalSigner());
9494

9595
connect(ui->btnVerify, &QPushButton::clicked, [this] {
9696
model->displayAddress(info.address.toStdString());

src/qt/sendcoinsdialog.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,14 @@ void SendCoinsDialog::setModel(WalletModel *_model)
200200
ui->optInRBF->setCheckState(Qt::Checked);
201201

202202
if (model->wallet().hasExternalSigner()) {
203+
//: "device" usually means a hardware wallet
203204
ui->sendButton->setText(tr("Sign on device"));
204205
if (gArgs.GetArg("-signer", "") != "") {
205206
ui->sendButton->setEnabled(true);
206207
ui->sendButton->setToolTip(tr("Connect your hardware wallet first."));
207208
} else {
208209
ui->sendButton->setEnabled(false);
210+
//: "External signer" means using devices such as hardware wallets.
209211
ui->sendButton->setToolTip(tr("Set external signer script path in Options -> Wallet"));
210212
}
211213
} else if (model->wallet().privateKeysDisabled()) {
@@ -426,11 +428,13 @@ void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
426428
return;
427429
}
428430
if (err == TransactionError::EXTERNAL_SIGNER_NOT_FOUND) {
431+
//: "External signer" means using devices such as hardware wallets.
429432
QMessageBox::critical(nullptr, tr("External signer not found"), "External signer not found");
430433
send_failure = true;
431434
return;
432435
}
433436
if (err == TransactionError::EXTERNAL_SIGNER_FAILED) {
437+
//: "External signer" means using devices such as hardware wallets.
434438
QMessageBox::critical(nullptr, tr("External signer failure"), "External signer failure");
435439
send_failure = true;
436440
return;

0 commit comments

Comments
 (0)