commit e35bddcc09ccc9a5f761ccf3c4bce5cdab64f4c6
parent a4944cdcb20415ae7ebbaef25f43c491627aab47
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 23 Oct 2019 08:33:16 +0200
kivy: fix can_pay in invoice_dialog
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/electrum/gui/kivy/uix/dialogs/invoice_dialog.py b/electrum/gui/kivy/uix/dialogs/invoice_dialog.py
@@ -21,6 +21,7 @@ Builder.load_string('''
data: ''
status_color: 1,1,1,1
status_str:''
+ can_pay: True
shaded: False
show_text: False
AnchorLayout:
@@ -60,7 +61,7 @@ Builder.load_string('''
height: '48dp'
text: _('Pay')
on_release: root.do_pay()
- disabled: not root.can_pay()
+ disabled: not root.can_pay
''')
class InvoiceDialog(Factory.Popup):
@@ -73,13 +74,11 @@ class InvoiceDialog(Factory.Popup):
self.data = data
self.key = key
- def can_pay(self):
- return self.status == PR_UNPAID
-
def set_status(self, status):
self.status = status
self.status_str = pr_tooltips[status]
self.status_color = pr_color[status]
+ self.can_pay = self.status == PR_UNPAID
def on_dismiss(self):
self.app.request_popup = None