electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7cf276c10b5bfde0c6f6f65ecd657a313f5c1eff
parent 4fd43882c412cace2325fe39daf06953b1045cda
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  4 Sep 2015 13:01:50 +0200

kivy: workaround locale issue and fix set_qr_data

Diffstat:
Mgui/kivy/main_window.py | 6+++---
Mgui/kivy/uix/dialogs/qr_scanner.py | 8++------
Mgui/kivy/uix/screens.py | 8++++----
3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -584,11 +584,11 @@ class ElectrumWindow(App): icon = "atlas://gui/kivy/theming/light/confirmed" if value is not None: - v_str = self.format_amount(value, True, whitespaces=True) + v_str = self.format_amount(value, True).replace(',','.') else: v_str = '--' - balance_str = self.format_amount(balance, whitespaces=True) + balance_str = self.format_amount(balance).replace(',','.') if tx_hash: label, is_default_label = self.wallet.get_label(tx_hash) @@ -630,7 +630,7 @@ class ElectrumWindow(App): ri.date = date_time mintimestr = date_time.split()[0] ri.address = address - ri.amount = amount.strip() + ri.amount = amount ri.quote_text = get_history_rate(ref(ri), Decimal(amount), mintimestr) diff --git a/gui/kivy/uix/dialogs/qr_scanner.py b/gui/kivy/uix/dialogs/qr_scanner.py @@ -12,16 +12,12 @@ class QrScannerDialog(Factory.AnimatedPopup): instance.stop() self.dismiss() 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) - def on_complete(self): + def on_complete(self, x): ''' Default Handler for on_complete event. ''' - pass + print x Builder.load_string(''' diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -101,10 +101,10 @@ class MainScreen(Factory.Screen): class ScreenSend(CScreen): - def set_qr_data(self, uri): - self.ids.payto_e.text = uri.get('address') - self.ids.message_e.text = uri.get('message') - self.ids.amount_e.text = uri.get('amount') + def set_qr_data(self, dialog, uri): + self.ids.payto_e.text = uri.get('address', '') + self.ids.message_e.text = uri.get('message', '') + self.ids.amount_e.text = uri.get('amount', '') #label = uri.get('label') #if label: # TODO: update label, add to contacts