commit 6bc73f4d74bd0bbd1dd9f97d65a26fa66bd4e1ad
parent b8cd7eb8bd72acd9d6fa9012d04d46c7aa945bb7
Author: ThomasV <thomasv@electrum.org>
Date: Fri, 10 Jun 2016 06:32:07 +0200
add is_final checkbox to bump_fee dialogs
Diffstat:
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/gui/kivy/uix/dialogs/bump_fee_dialog.py b/gui/kivy/uix/dialogs/bump_fee_dialog.py
@@ -14,6 +14,7 @@ Builder.load_string('''
pos_hint: {'top':0.9}
BoxLayout:
orientation: 'vertical'
+ padding: '10dp'
GridLayout:
height: self.minimum_height
@@ -22,7 +23,7 @@ Builder.load_string('''
spacing: '10dp'
BoxLabel:
id: old_fee
- text: _('Fee')
+ text: _('Current Fee')
value: ''
BoxLabel:
id: new_fee
@@ -31,11 +32,19 @@ Builder.load_string('''
Label:
id: tooltip
text: ''
+ size_hint_y: None
Slider:
id: slider
range: 0, 4
step: 1
on_value: root.on_slider(self.value)
+ BoxLayout:
+ orientation: 'horizontal'
+ size_hint: 1, 0.2
+ Label:
+ text: _('Final')
+ CheckBox:
+ id: final_cb
Widget:
size_hint: 1, 1
BoxLayout:
@@ -98,7 +107,8 @@ class BumpFeeDialog(Factory.Popup):
def on_ok(self):
new_fee = self.get_fee()
- self.callback(self.init_fee, new_fee)
+ is_final = self.ids.final_cb.active
+ self.callback(self.init_fee, new_fee, is_final)
def on_slider(self, value):
self.update_text()
diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py
@@ -135,7 +135,7 @@ class TxDialog(Factory.Popup):
d = BumpFeeDialog(self.app, fee, size, self._do_rbf)
d.open()
- def _do_rbf(self, old_fee, new_fee):
+ def _do_rbf(self, old_fee, new_fee, is_final):
if new_fee is None:
return
delta = new_fee - old_fee
@@ -147,6 +147,8 @@ class TxDialog(Factory.Popup):
except BaseException as e:
self.app.show_error(e)
return
+ if is_final:
+ new_tx.set_sequence(0xffffffff)
self.tx = new_tx
self.update()
self.do_sign()
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -2695,7 +2695,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
text.setReadOnly(True)
text.setMaximumHeight(170)
vbox.addWidget(text)
- mpk_text = '\n'.join( account.get_master_pubkeys() )
+ mpk_text = '\n'.join(account.get_master_pubkeys())
text.setText(mpk_text)
vbox.addLayout(Buttons(CloseButton(d)))
d.exec_()
@@ -2709,9 +2709,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
e = BTCAmountEdit(self.get_decimal_point)
e.setAmount(fee *1.5)
vbox.addWidget(e)
+ cb = QCheckBox(_('Final'))
+ vbox.addWidget(cb)
vbox.addLayout(Buttons(CancelButton(d), OkButton(d)))
if not d.exec_():
return
+ is_final = cb.isChecked()
new_fee = e.get_amount()
delta = new_fee - fee
if delta < 0:
@@ -2722,4 +2725,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
except BaseException as e:
self.show_error(e)
return
+ if is_final:
+ new_tx.set_sequence(0xffffffff)
self.show_transaction(new_tx)