URI: 
       tadd is_final checkbox to bump_fee dialogs - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 6bc73f4d74bd0bbd1dd9f97d65a26fa66bd4e1ad
   DIR parent b8cd7eb8bd72acd9d6fa9012d04d46c7aa945bb7
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Fri, 10 Jun 2016 06:32:07 +0200
       
       add is_final checkbox to bump_fee dialogs
       
       Diffstat:
         M gui/kivy/uix/dialogs/bump_fee_dial… |      14 ++++++++++++--
         M gui/kivy/uix/dialogs/tx_dialog.py   |       4 +++-
         M gui/qt/main_window.py               |       7 ++++++-
       
       3 files changed, 21 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/gui/kivy/uix/dialogs/bump_fee_dialog.py b/gui/kivy/uix/dialogs/bump_fee_dialog.py
       t@@ -14,6 +14,7 @@ Builder.load_string('''
            pos_hint: {'top':0.9}
            BoxLayout:
                orientation: 'vertical'
       +        padding: '10dp'
        
                GridLayout:
                    height: self.minimum_height
       t@@ -22,7 +23,7 @@ Builder.load_string('''
                    spacing: '10dp'
                    BoxLabel:
                        id: old_fee
       -                text: _('Fee')
       +                text: _('Current Fee')
                        value: ''
                    BoxLabel:
                        id: new_fee
       t@@ -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:
       t@@ -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()
   DIR diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py
       t@@ -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
       t@@ -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()
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -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_()
       t@@ -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:
       t@@ -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)