Browse Source

qml: consistency camelcase public slots qetxdetails, qelnpaymentdetails, qechannelopener, qeaddressdetails

master
Sander van Grieken 3 years ago
parent
commit
e26d49f11e
  1. 2
      electrum/gui/qml/components/AddressDetails.qml
  2. 2
      electrum/gui/qml/components/LightningPaymentDetails.qml
  3. 8
      electrum/gui/qml/components/OpenChannelDialog.qml
  4. 2
      electrum/gui/qml/components/TxDetails.qml
  5. 2
      electrum/gui/qml/qeaddressdetails.py
  6. 4
      electrum/gui/qml/qechannelopener.py
  7. 2
      electrum/gui/qml/qelnpaymentdetails.py
  8. 2
      electrum/gui/qml/qetxdetails.py

2
electrum/gui/qml/components/AddressDetails.qml

@ -123,7 +123,7 @@ Pane {
icon.color: 'transparent'
onClicked: {
labelContent.editmode = false
addressdetails.set_label(labelEdit.text)
addressdetails.setLabel(labelEdit.text)
}
}
ToolButton {

2
electrum/gui/qml/components/LightningPaymentDetails.qml

@ -120,7 +120,7 @@ Pane {
icon.color: 'transparent'
onClicked: {
labelContent.editmode = false
lnpaymentdetails.set_label(labelEdit.text)
lnpaymentdetails.setLabel(labelEdit.text)
}
}
ToolButton {

8
electrum/gui/qml/components/OpenChannelDialog.qml

@ -95,7 +95,7 @@ ElDialog {
icon.height: constants.iconSizeMedium
icon.width: constants.iconSizeMedium
onClicked: {
if (channelopener.validate_connect_str(AppController.clipboardToText())) {
if (channelopener.validateConnectString(AppController.clipboardToText())) {
channelopener.connectStr = AppController.clipboardToText()
node.text = channelopener.connectStr
}
@ -111,7 +111,7 @@ ElDialog {
hint: qsTr('Scan a channel connect string')
})
dialog.onFound.connect(function() {
if (channelopener.validate_connect_str(dialog.scanData)) {
if (channelopener.validateConnectString(dialog.scanData)) {
channelopener.connectStr = dialog.scanData
node.text = channelopener.connectStr
}
@ -196,7 +196,7 @@ ElDialog {
text: qsTr('Open Channel')
icon.source: '../../icons/confirmed.png'
enabled: channelopener.valid
onClicked: channelopener.open_channel()
onClicked: channelopener.openChannel()
}
}
@ -225,7 +225,7 @@ ElDialog {
var dialog = app.messageDialog.createObject(app, { 'text': message, 'yesno': true })
dialog.open()
dialog.accepted.connect(function() {
channelopener.open_channel(true)
channelopener.openChannel(true)
})
}
onFinalizerChanged: {

2
electrum/gui/qml/components/TxDetails.qml

@ -212,7 +212,7 @@ Pane {
icon.color: 'transparent'
onClicked: {
labelContent.editmode = false
txdetails.set_label(labelEdit.text)
txdetails.setLabel(labelEdit.text)
}
}
ToolButton {

2
electrum/gui/qml/qeaddressdetails.py

@ -94,7 +94,7 @@ class QEAddressDetails(QObject):
self._wallet.balanceChanged.emit()
@pyqtSlot(str)
def set_label(self, label: str):
def setLabel(self, label: str):
if label != self._label:
self._wallet.wallet.set_label(self._address, label)
self._label = label

4
electrum/gui/qml/qechannelopener.py

@ -132,7 +132,7 @@ class QEChannelOpener(QObject, AuthMixin):
self.validChanged.emit()
@pyqtSlot(str, result=bool)
def validate_connect_str(self, connect_str):
def validateConnectString(self, connect_str):
try:
node_id, rest = extract_nodeid(connect_str)
except ConnStringFormatError as e:
@ -143,7 +143,7 @@ class QEChannelOpener(QObject, AuthMixin):
# FIXME "max" button in amount_dialog should enforce LN_MAX_FUNDING_SAT
@pyqtSlot()
@pyqtSlot(bool)
def open_channel(self, confirm_backup_conflict=False):
def openChannel(self, confirm_backup_conflict=False):
if not self.valid:
return

2
electrum/gui/qml/qelnpaymentdetails.py

@ -50,7 +50,7 @@ class QELnPaymentDetails(QObject):
return self._label
@pyqtSlot(str)
def set_label(self, label: str):
def setLabel(self, label: str):
if label != self._label:
self._wallet.wallet.set_label(self._key, label)
self._label = label

2
electrum/gui/qml/qetxdetails.py

@ -126,7 +126,7 @@ class QETxDetails(QObject, QtEventListener):
return self._label
@pyqtSlot(str)
def set_label(self, label: str):
def setLabel(self, label: str):
if label != self._label:
self._wallet.wallet.set_label(self._txid, label)
self._label = label

Loading…
Cancel
Save