kivy: workaround locale issue and fix set_qr_data
This commit is contained in:
@@ -584,11 +584,11 @@ class ElectrumWindow(App):
|
|||||||
icon = "atlas://gui/kivy/theming/light/confirmed"
|
icon = "atlas://gui/kivy/theming/light/confirmed"
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
v_str = self.format_amount(value, True, whitespaces=True)
|
v_str = self.format_amount(value, True).replace(',','.')
|
||||||
else:
|
else:
|
||||||
v_str = '--'
|
v_str = '--'
|
||||||
|
|
||||||
balance_str = self.format_amount(balance, whitespaces=True)
|
balance_str = self.format_amount(balance).replace(',','.')
|
||||||
|
|
||||||
if tx_hash:
|
if tx_hash:
|
||||||
label, is_default_label = self.wallet.get_label(tx_hash)
|
label, is_default_label = self.wallet.get_label(tx_hash)
|
||||||
@@ -630,7 +630,7 @@ class ElectrumWindow(App):
|
|||||||
ri.date = date_time
|
ri.date = date_time
|
||||||
mintimestr = date_time.split()[0]
|
mintimestr = date_time.split()[0]
|
||||||
ri.address = address
|
ri.address = address
|
||||||
ri.amount = amount.strip()
|
ri.amount = amount
|
||||||
ri.quote_text = get_history_rate(ref(ri),
|
ri.quote_text = get_history_rate(ref(ri),
|
||||||
Decimal(amount),
|
Decimal(amount),
|
||||||
mintimestr)
|
mintimestr)
|
||||||
|
|||||||
@@ -12,16 +12,12 @@ class QrScannerDialog(Factory.AnimatedPopup):
|
|||||||
instance.stop()
|
instance.stop()
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
uri = App.get_running_app().decode_uri(value[0].data)
|
uri = App.get_running_app().decode_uri(value[0].data)
|
||||||
#address = uri.get('address', 'empty')
|
|
||||||
#label = uri.get('label', '')
|
|
||||||
#amount = uri.get('amount', 0.0)
|
|
||||||
#message = uir.get('message', '')
|
|
||||||
self.dispatch('on_complete', uri)
|
self.dispatch('on_complete', uri)
|
||||||
|
|
||||||
def on_complete(self):
|
def on_complete(self, x):
|
||||||
''' Default Handler for on_complete event.
|
''' Default Handler for on_complete event.
|
||||||
'''
|
'''
|
||||||
pass
|
print x
|
||||||
|
|
||||||
|
|
||||||
Builder.load_string('''
|
Builder.load_string('''
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ class MainScreen(Factory.Screen):
|
|||||||
|
|
||||||
class ScreenSend(CScreen):
|
class ScreenSend(CScreen):
|
||||||
|
|
||||||
def set_qr_data(self, uri):
|
def set_qr_data(self, dialog, uri):
|
||||||
self.ids.payto_e.text = uri.get('address')
|
self.ids.payto_e.text = uri.get('address', '')
|
||||||
self.ids.message_e.text = uri.get('message')
|
self.ids.message_e.text = uri.get('message', '')
|
||||||
self.ids.amount_e.text = uri.get('amount')
|
self.ids.amount_e.text = uri.get('amount', '')
|
||||||
#label = uri.get('label')
|
#label = uri.get('label')
|
||||||
#if label:
|
#if label:
|
||||||
# TODO: update label, add to contacts
|
# TODO: update label, add to contacts
|
||||||
|
|||||||
Reference in New Issue
Block a user