1
0

kivy: add context menus

This commit is contained in:
ThomasV
2015-12-12 16:54:32 +01:00
parent 06eb3142c4
commit 6bd37723d3
8 changed files with 129 additions and 88 deletions

View File

@@ -78,8 +78,6 @@ class ElectrumWindow(App):
keys = sorted(base_units.keys())
self.base_unit = keys[ (keys.index(self.base_unit) + 1) % len(keys)]
context = StringProperty('')
context_action = lambda x: None
status = StringProperty('')
fiat_unit = StringProperty('')
@@ -749,22 +747,11 @@ class ElectrumWindow(App):
pos = (win.center[0], win.center[1] - (info_bubble.height/2))
info_bubble.show(pos, duration, width, modal=modal, exit=exit)
def tx_dialog(self, tx_hash):
def tx_dialog(self, obj):
popup = Builder.load_file('gui/kivy/uix/ui_screens/transaction.kv')
popup.tx_hash = tx_hash
popup.tx_hash = obj.tx_hash
popup.open()
def tx_selected(self, txid, state):
if state == 'down':
self.context = 'tx'
self.context_action = lambda: self.tx_dialog(txid)
else:
self.reset_context()
def reset_context(self):
self.context = ''
self.context_action = lambda: None
def amount_dialog(self, screen, show_max):
popup = Builder.load_file('gui/kivy/uix/ui_screens/amount.kv')
but_max = popup.ids.but_max