aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-04-27 16:57:39 -0400
committerAndrew Chow <achow101-github@achow101.com>2021-10-07 15:23:26 -0400
commit5c3b800acd3ceb75ff6bbac8d0e2e1aaa95b0728 (patch)
tree8a2a0eef18e150afed9a3161254dd333b326cea9 /src/qt/sendcoinsdialog.h
parent571bb94dfb5047c9be8fcbae5dae71de7256b86c (diff)
qt: Add Create Unsigned button to SendConfirmationDialog
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.
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 33736f8095..5d09da0d23 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