aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-01-09 17:39:31 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-01-09 17:46:23 +0200
commit2e01b6986099715afa40ed6464da4b321b630e9c (patch)
tree33e5b1839011cac6ece63b977a535ee647adf173 /src/qt/sendcoinsdialog.h
parent6182e5086fc82b49a5f0d2abdab4bc7e2a4686ef (diff)
parent742918c8ef353993a07c060f476a160e8272a9ef (diff)
downloadbitcoin-2e01b6986099715afa40ed6464da4b321b630e9c.tar.xz
Merge bitcoin-core/gui#441: Add Create Unsigned button to SendConfirmationDialog
742918c8ef353993a07c060f476a160e8272a9ef qt: hide Create Unsigned button behind an expert mode option (Andrew Chow) 5c3b800acd3ceb75ff6bbac8d0e2e1aaa95b0728 qt: Add Create Unsigned button to SendConfirmationDialog (Andrew Chow) Pull request description: Instead of having different buttons or changing button behavior for making a PSBT, just have SendConfirmationDialog return whether the user wants a PSBT or a broadcasted transaction. Since this dialog is used by both the bumpFeeAction and the SendCoinsDialog, changes to both to support the different behavior is needed. They will check the return value of the SendConfirmationDialog for whether a PSBT needs to be created instead of checking whether private keys are disabled. Strings used in this dialog are being slightly modified to work with both private keys enabled and disabled wallets. Moved from https://github.com/bitcoin/bitcoin/pull/18789 ACKs for top commit: jarolrod: ACK 742918c ryanofsky: Code review ACK 742918c8ef353993a07c060f476a160e8272a9ef. Just suggested changes since last review. Looks great! hebasto: ACK 742918c8ef353993a07c060f476a160e8272a9ef, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: dd29f4364c7b4f15befe8fe63257b26187918786b005e0f8336183270b1a162680b93f6ced60f0285c6e607c084cc0d24950fc68a8f9c056521ede614041be66
Diffstat (limited to 'src/qt/sendcoinsdialog.h')
-rw-r--r--src/qt/sendcoinsdialog.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 4e43697f78..ad31790db6 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -114,18 +114,21 @@ class SendConfirmationDialog : public QMessageBox
Q_OBJECT
public:
- SendConfirmationDialog(const QString& title, const QString& text, const QString& informative_text = "", const QString& detailed_text = "", int secDelay = SEND_CONFIRM_DELAY, const QString& confirmText = "", QWidget* parent = nullptr);
+ SendConfirmationDialog(const QString& title, const QString& text, const QString& informative_text = "", const QString& detailed_text = "", int secDelay = SEND_CONFIRM_DELAY, bool enable_send = true, bool always_show_unsigned = true, QWidget* parent = nullptr);
int exec() override;
private Q_SLOTS:
void countDown();
- void updateYesButton();
+ void updateButtons();
private:
QAbstractButton *yesButton;
+ QAbstractButton *m_psbt_button;
QTimer countDownTimer;
int secDelay;
- QString confirmButtonText;
+ QString confirmButtonText{tr("Send")};
+ bool m_enable_send;
+ QString m_psbt_button_text{tr("Create Unsigned")};
};
#endif // BITCOIN_QT_SENDCOINSDIALOG_H