kivy: fix OutputItem initialisation

This commit is contained in:
ThomasV 2016-02-18 07:47:09 +01:00
parent 100252258b
commit 49679cf8be
3 changed files with 8 additions and 4 deletions

View File

@ -90,7 +90,7 @@
id: lbl2
text: root.value
<OutputItem@BoxLayout>
<OutputItem>
address: ''
value: ''
size_hint_y: None

View File

@ -32,6 +32,7 @@ Factory.register('InstallWizard',
module='electrum_gui.kivy.uix.dialogs.installwizard')
Factory.register('InfoBubble', module='electrum_gui.kivy.uix.dialogs')
Factory.register('OutputList', module='electrum_gui.kivy.uix.dialogs')
Factory.register('OutputItem', module='electrum_gui.kivy.uix.dialogs')

View File

@ -192,6 +192,9 @@ class InfoBubble(Factory.Bubble):
class OutputItem(Factory.BoxLayout):
pass
class OutputList(Factory.GridLayout):
def __init__(self, **kwargs):
@ -204,8 +207,8 @@ class OutputList(Factory.GridLayout):
self.add_output(address, amount)
def add_output(self, address, amount):
b = Factory.OutputItem(
address = address,
value = self.app.format_amount_and_units(amount))
b = Factory.OutputItem()
b.address = address
b.value = self.app.format_amount_and_units(amount)
self.add_widget(b)