Browse Source

kivy: fix OutputItem initialisation

283
ThomasV 9 years ago
parent
commit
49679cf8be
  1. 2
      gui/kivy/main.kv
  2. 1
      gui/kivy/main_window.py
  3. 9
      gui/kivy/uix/dialogs/__init__.py

2
gui/kivy/main.kv

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

1
gui/kivy/main_window.py

@ -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')

9
gui/kivy/uix/dialogs/__init__.py

@ -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)

Loading…
Cancel
Save