add 'spend unconfirmed' config option
This commit is contained in:
@@ -41,7 +41,7 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Switch {
|
||||||
id: thousands
|
id: thousands
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
text: qsTr('Add thousands separators to bitcoin amounts')
|
text: qsTr('Add thousands separators to bitcoin amounts')
|
||||||
@@ -51,14 +51,14 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Switch {
|
||||||
id: checkSoftware
|
id: checkSoftware
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
text: qsTr('Automatically check for software updates')
|
text: qsTr('Automatically check for software updates')
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Switch {
|
||||||
id: fiatEnable
|
id: fiatEnable
|
||||||
text: qsTr('Fiat Currency')
|
text: qsTr('Fiat Currency')
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
@@ -77,12 +77,12 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Switch {
|
||||||
id: historicRates
|
id: historicRates
|
||||||
text: qsTr('Historic rates')
|
text: qsTr('Historic rates')
|
||||||
enabled: Daemon.fx.enabled
|
enabled: Daemon.fx.enabled
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
onCheckStateChanged: {
|
onCheckedChanged: {
|
||||||
if (activeFocus)
|
if (activeFocus)
|
||||||
Daemon.fx.historicRates = checked
|
Daemon.fx.historicRates = checked
|
||||||
}
|
}
|
||||||
@@ -106,6 +106,16 @@ Pane {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
id: spendUnconfirmed
|
||||||
|
text: qsTr('Spend unconfirmed')
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (activeFocus)
|
||||||
|
Config.spendUnconfirmed = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('Lightning Routing')
|
text: qsTr('Lightning Routing')
|
||||||
}
|
}
|
||||||
@@ -133,6 +143,7 @@ Pane {
|
|||||||
historicRates.checked = Daemon.fx.historicRates
|
historicRates.checked = Daemon.fx.historicRates
|
||||||
rateSources.currentIndex = rateSources.indexOfValue(Daemon.fx.rateSource)
|
rateSources.currentIndex = rateSources.indexOfValue(Daemon.fx.rateSource)
|
||||||
fiatEnable.checked = Daemon.fx.enabled
|
fiatEnable.checked = Daemon.fx.enabled
|
||||||
|
spendUnconfirmed.checked = Config.spendUnconfirmed
|
||||||
lnRoutingType.currentIndex = Config.useGossip ? 0 : 1
|
lnRoutingType.currentIndex = Config.useGossip ? 0 : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,16 @@ class QEConfig(QObject):
|
|||||||
self.config.amt_add_thousands_sep = checked
|
self.config.amt_add_thousands_sep = checked
|
||||||
self.thousandsSeparatorChanged.emit()
|
self.thousandsSeparatorChanged.emit()
|
||||||
|
|
||||||
|
spendUnconfirmedChanged = pyqtSignal()
|
||||||
|
@pyqtProperty(bool, notify=spendUnconfirmedChanged)
|
||||||
|
def spendUnconfirmed(self):
|
||||||
|
return not self.config.get('confirmed_only', False)
|
||||||
|
|
||||||
|
@spendUnconfirmed.setter
|
||||||
|
def spendUnconfirmed(self, checked):
|
||||||
|
self.config.set_key('confirmed_only', not checked, True)
|
||||||
|
self.spendUnconfirmedChanged.emit()
|
||||||
|
|
||||||
useGossipChanged = pyqtSignal()
|
useGossipChanged = pyqtSignal()
|
||||||
@pyqtProperty(bool, notify=useGossipChanged)
|
@pyqtProperty(bool, notify=useGossipChanged)
|
||||||
def useGossip(self):
|
def useGossip(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user