From 3c1e4ba5a508baef76fca602f8c250b96da326b8 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 17 Jan 2023 18:03:13 +0100 Subject: [PATCH] qml: remove Dialog standardButtons everywhere --- electrum/gui/qml/components/ChannelOpenProgressDialog.qml | 3 +-- electrum/gui/qml/components/CloseChannelDialog.qml | 1 - electrum/gui/qml/components/ConfirmTxDialog.qml | 2 -- electrum/gui/qml/components/CpfpBumpFeeDialog.qml | 2 -- electrum/gui/qml/components/ExportTxDialog.qml | 1 - electrum/gui/qml/components/GenericShareDialog.qml | 1 - electrum/gui/qml/components/ImportAddressesKeysDialog.qml | 1 - electrum/gui/qml/components/ImportChannelBackupDialog.qml | 1 - electrum/gui/qml/components/InvoiceDialog.qml | 1 - electrum/gui/qml/components/LightningPaymentProgressDialog.qml | 3 --- electrum/gui/qml/components/LnurlPayRequestDialog.qml | 2 -- electrum/gui/qml/components/OpenChannelDialog.qml | 1 - electrum/gui/qml/components/OpenWalletDialog.qml | 2 -- electrum/gui/qml/components/OtpDialog.qml | 2 -- electrum/gui/qml/components/PasswordDialog.qml | 2 +- electrum/gui/qml/components/Pin.qml | 1 - electrum/gui/qml/components/ProxyConfigDialog.qml | 1 - electrum/gui/qml/components/RbfBumpFeeDialog.qml | 2 -- electrum/gui/qml/components/RbfCancelDialog.qml | 2 -- electrum/gui/qml/components/ReceiveDetailsDialog.qml | 1 - electrum/gui/qml/components/ReceiveDialog.qml | 1 - electrum/gui/qml/components/RequestDialog.qml | 1 - electrum/gui/qml/components/SendDialog.qml | 2 -- electrum/gui/qml/components/ServerConfigDialog.qml | 1 - electrum/gui/qml/components/SwapDialog.qml | 1 - 25 files changed, 2 insertions(+), 36 deletions(-) diff --git a/electrum/gui/qml/components/ChannelOpenProgressDialog.qml b/electrum/gui/qml/components/ChannelOpenProgressDialog.qml index 2aa5778b0..65d7d0086 100644 --- a/electrum/gui/qml/components/ChannelOpenProgressDialog.qml +++ b/electrum/gui/qml/components/ChannelOpenProgressDialog.qml @@ -13,8 +13,7 @@ ElDialog { height: parent.height title: qsTr('Opening Channel...') - standardButtons: Dialog.Close - footer.visible: allowClose // work around standardButtons not really mutable to/from zero buttons + allowClose: false modal: true diff --git a/electrum/gui/qml/components/CloseChannelDialog.qml b/electrum/gui/qml/components/CloseChannelDialog.qml index 5a64cca72..c80e673c3 100644 --- a/electrum/gui/qml/components/CloseChannelDialog.qml +++ b/electrum/gui/qml/components/CloseChannelDialog.qml @@ -15,7 +15,6 @@ ElDialog { property string channelid title: qsTr('Close Channel') - standardButtons: closing ? 0 : Dialog.Cancel iconSource: Qt.resolvedUrl('../../icons/lightning_disconnected.png') modal: true diff --git a/electrum/gui/qml/components/ConfirmTxDialog.qml b/electrum/gui/qml/components/ConfirmTxDialog.qml index 2beab78a0..5b66966dd 100644 --- a/electrum/gui/qml/components/ConfirmTxDialog.qml +++ b/electrum/gui/qml/components/ConfirmTxDialog.qml @@ -30,8 +30,6 @@ ElDialog { height: parent.height padding: 0 - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/CpfpBumpFeeDialog.qml b/electrum/gui/qml/components/CpfpBumpFeeDialog.qml index 310c443dd..7f573f51d 100644 --- a/electrum/gui/qml/components/CpfpBumpFeeDialog.qml +++ b/electrum/gui/qml/components/CpfpBumpFeeDialog.qml @@ -21,8 +21,6 @@ ElDialog { height: parent.height padding: 0 - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/ExportTxDialog.qml b/electrum/gui/qml/components/ExportTxDialog.qml index 2cc092c27..997276ef6 100644 --- a/electrum/gui/qml/components/ExportTxDialog.qml +++ b/electrum/gui/qml/components/ExportTxDialog.qml @@ -19,7 +19,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close width: parent.width height: parent.height diff --git a/electrum/gui/qml/components/GenericShareDialog.qml b/electrum/gui/qml/components/GenericShareDialog.qml index 870618903..0c3ee2ebb 100644 --- a/electrum/gui/qml/components/GenericShareDialog.qml +++ b/electrum/gui/qml/components/GenericShareDialog.qml @@ -17,7 +17,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close width: parent.width height: parent.height diff --git a/electrum/gui/qml/components/ImportAddressesKeysDialog.qml b/electrum/gui/qml/components/ImportAddressesKeysDialog.qml index 57add3c2a..58e4b0606 100644 --- a/electrum/gui/qml/components/ImportAddressesKeysDialog.qml +++ b/electrum/gui/qml/components/ImportAddressesKeysDialog.qml @@ -11,7 +11,6 @@ ElDialog { property bool valid: false - standardButtons: Dialog.Close modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/ImportChannelBackupDialog.qml b/electrum/gui/qml/components/ImportChannelBackupDialog.qml index 497d3615a..036159e26 100644 --- a/electrum/gui/qml/components/ImportChannelBackupDialog.qml +++ b/electrum/gui/qml/components/ImportChannelBackupDialog.qml @@ -11,7 +11,6 @@ ElDialog { property bool valid: false - standardButtons: Dialog.Cancel modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index e845f03e9..7a23b7768 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -17,7 +17,6 @@ ElDialog { signal invoiceAmountChanged title: qsTr('Invoice') - standardButtons: invoice_key != '' ? Dialog.Close : Dialog.Cancel iconSource: Qt.resolvedUrl('../../icons/tab_send.png') padding: 0 diff --git a/electrum/gui/qml/components/LightningPaymentProgressDialog.qml b/electrum/gui/qml/components/LightningPaymentProgressDialog.qml index 2eaed5780..326bfc41d 100644 --- a/electrum/gui/qml/components/LightningPaymentProgressDialog.qml +++ b/electrum/gui/qml/components/LightningPaymentProgressDialog.qml @@ -16,7 +16,6 @@ ElDialog { height: parent.height title: qsTr('Paying Lightning Invoice...') - standardButtons: Dialog.Close modal: true parent: Overlay.overlay @@ -35,14 +34,12 @@ ElDialog { name: 'success' PropertyChanges { target: spinner; running: false } PropertyChanges { target: helpText; text: qsTr('Paid!') } - // PropertyChanges { target: dialog; standardButtons: Dialog.Ok } PropertyChanges { target: icon; source: '../../icons/confirmed.png' } }, State { name: 'failed' PropertyChanges { target: spinner; running: false } PropertyChanges { target: helpText; text: qsTr('Payment failed') } - // PropertyChanges { target: dialog; standardButtons: Dialog.Ok } PropertyChanges { target: errorText; visible: true } PropertyChanges { target: icon; source: '../../icons/warning.png' } } diff --git a/electrum/gui/qml/components/LnurlPayRequestDialog.qml b/electrum/gui/qml/components/LnurlPayRequestDialog.qml index 758245005..7d72965f5 100644 --- a/electrum/gui/qml/components/LnurlPayRequestDialog.qml +++ b/electrum/gui/qml/components/LnurlPayRequestDialog.qml @@ -15,8 +15,6 @@ ElDialog { property InvoiceParser invoiceParser - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/OpenChannelDialog.qml b/electrum/gui/qml/components/OpenChannelDialog.qml index c88cb0add..44545c04f 100644 --- a/electrum/gui/qml/components/OpenChannelDialog.qml +++ b/electrum/gui/qml/components/OpenChannelDialog.qml @@ -15,7 +15,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Cancel padding: 0 width: parent.width diff --git a/electrum/gui/qml/components/OpenWalletDialog.qml b/electrum/gui/qml/components/OpenWalletDialog.qml index e747979c7..45d159a87 100644 --- a/electrum/gui/qml/components/OpenWalletDialog.qml +++ b/electrum/gui/qml/components/OpenWalletDialog.qml @@ -20,8 +20,6 @@ ElDialog { property string name property string path - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/OtpDialog.qml b/electrum/gui/qml/components/OtpDialog.qml index e971d4c24..8b6a6d5f6 100644 --- a/electrum/gui/qml/components/OtpDialog.qml +++ b/electrum/gui/qml/components/OtpDialog.qml @@ -18,8 +18,6 @@ ElDialog { property bool _waiting: false property string _otpError - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/PasswordDialog.qml b/electrum/gui/qml/components/PasswordDialog.qml index 637568389..e1a5455aa 100644 --- a/electrum/gui/qml/components/PasswordDialog.qml +++ b/electrum/gui/qml/components/PasswordDialog.qml @@ -19,7 +19,7 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Cancel + anchors.centerIn: parent padding: 0 diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index e1332e062..9e58efb40 100644 --- a/electrum/gui/qml/components/Pin.qml +++ b/electrum/gui/qml/components/Pin.qml @@ -25,7 +25,6 @@ ElDialog { focus: true - standardButtons: canCancel ? Dialog.Cancel : 0 closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose property bool canCancel: true diff --git a/electrum/gui/qml/components/ProxyConfigDialog.qml b/electrum/gui/qml/components/ProxyConfigDialog.qml index 8b816c0df..218fe3ad4 100644 --- a/electrum/gui/qml/components/ProxyConfigDialog.qml +++ b/electrum/gui/qml/components/ProxyConfigDialog.qml @@ -14,7 +14,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close width: parent.width height: parent.height diff --git a/electrum/gui/qml/components/RbfBumpFeeDialog.qml b/electrum/gui/qml/components/RbfBumpFeeDialog.qml index d164b78a4..d3c8381eb 100644 --- a/electrum/gui/qml/components/RbfBumpFeeDialog.qml +++ b/electrum/gui/qml/components/RbfBumpFeeDialog.qml @@ -21,8 +21,6 @@ ElDialog { height: parent.height padding: 0 - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/RbfCancelDialog.qml b/electrum/gui/qml/components/RbfCancelDialog.qml index f8d5598ec..b9643bb44 100644 --- a/electrum/gui/qml/components/RbfCancelDialog.qml +++ b/electrum/gui/qml/components/RbfCancelDialog.qml @@ -21,8 +21,6 @@ ElDialog { height: parent.height padding: 0 - standardButtons: Dialog.Cancel - modal: true parent: Overlay.overlay Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/ReceiveDetailsDialog.qml b/electrum/gui/qml/components/ReceiveDetailsDialog.qml index d59db8435..eb8ad4fcc 100644 --- a/electrum/gui/qml/components/ReceiveDetailsDialog.qml +++ b/electrum/gui/qml/components/ReceiveDetailsDialog.qml @@ -19,7 +19,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Cancel iconSource: Qt.resolvedUrl('../../icons/pen.png') Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/ReceiveDialog.qml b/electrum/gui/qml/components/ReceiveDialog.qml index a24daa57a..de42cc39c 100644 --- a/electrum/gui/qml/components/ReceiveDialog.qml +++ b/electrum/gui/qml/components/ReceiveDialog.qml @@ -23,7 +23,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close iconSource: Qt.resolvedUrl('../../icons/tab_receive.png') Overlay.modal: Rectangle { diff --git a/electrum/gui/qml/components/RequestDialog.qml b/electrum/gui/qml/components/RequestDialog.qml index 5007efd52..e0a9bc18d 100644 --- a/electrum/gui/qml/components/RequestDialog.qml +++ b/electrum/gui/qml/components/RequestDialog.qml @@ -21,7 +21,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close width: parent.width height: parent.height diff --git a/electrum/gui/qml/components/SendDialog.qml b/electrum/gui/qml/components/SendDialog.qml index 44445e318..656784cd3 100644 --- a/electrum/gui/qml/components/SendDialog.qml +++ b/electrum/gui/qml/components/SendDialog.qml @@ -16,7 +16,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close Overlay.modal: Rectangle { color: "#aa000000" @@ -83,7 +82,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Ok Overlay.modal: Rectangle { color: "#aa000000" diff --git a/electrum/gui/qml/components/ServerConfigDialog.qml b/electrum/gui/qml/components/ServerConfigDialog.qml index fe5f25735..edd16ea49 100644 --- a/electrum/gui/qml/components/ServerConfigDialog.qml +++ b/electrum/gui/qml/components/ServerConfigDialog.qml @@ -14,7 +14,6 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close width: parent.width height: parent.height diff --git a/electrum/gui/qml/components/SwapDialog.qml b/electrum/gui/qml/components/SwapDialog.qml index 7426868a1..32eeaed17 100644 --- a/electrum/gui/qml/components/SwapDialog.qml +++ b/electrum/gui/qml/components/SwapDialog.qml @@ -15,7 +15,6 @@ ElDialog { title: qsTr('Lightning Swap') iconSource: Qt.resolvedUrl('../../icons/update.png') - standardButtons: Dialog.Cancel modal: true parent: Overlay.overlay