electrum

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

commit e2237de739375bf10b9a62ca2c0b4078232867d0
parent f0b236b317407b5397d170189c0f35ead5607d72
Author: ThomasV <thomasv@electrum.org>
Date:   Tue,  6 Oct 2015 17:42:19 +0200

kivy: remove loading_image in qrcodewidget (too slow)

Diffstat:
Mgui/kivy/uix/qrcodewidget.py | 4++--
Mgui/kivy/uix/screens.py | 17++++++++---------
2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/gui/kivy/uix/qrcodewidget.py b/gui/kivy/uix/qrcodewidget.py @@ -18,7 +18,7 @@ from kivy.clock import Clock Builder.load_string(''' <QRCodeWidget> - on_parent: if args[1]: qrimage.source = self.loading_image + #on_parent: if args[1]: qrimage.source = self.loading_image canvas.before: # Draw white Rectangle Color: @@ -61,7 +61,7 @@ class QRCodeWidget(FloatLayout): defaulting to `(1, 1, 1, 1)`. ''' - loading_image = StringProperty('gui/kivy/theming/loading.gif') + #loading_image = StringProperty('gui/kivy/theming/loading.gif') def __init__(self, **kwargs): super(QRCodeWidget, self).__init__(**kwargs) diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -216,29 +216,27 @@ class SendScreen(CScreen): app.show_error(_('Invalid Fee')) return - message = 'sending {} {} to {}'.format(app.base_unit, scrn.amount_e.text, r) - + message = 'sending {} {} to {}'.format(self.app.base_unit, scrn.amount_e.text, r) # assume no password and fee is None password = None fee = None - #self.send_tx([('address', to_address, amount)], fee, label, password) + self.send_tx([('address', to_address, amount)], fee, label, password) def send_tx(self, outputs, fee, label, password): - app = App.get_running_app() # make unsigned transaction - coins = self.wallet.get_spendable_coins() + coins = self.app.wallet.get_spendable_coins() try: - tx = self.wallet.make_unsigned_transaction(coins, outputs, self.electrum_config, fee) + tx = self.app.wallet.make_unsigned_transaction(coins, outputs, self.electrum_config, fee) except Exception as e: traceback.print_exc(file=sys.stdout) - app.show_error(str(e)) + self.app.show_error(str(e)) return # sign transaction try: - self.wallet.sign_transaction(tx, password) + self.app.wallet.sign_transaction(tx, password) except Exception as e: traceback.print_exc(file=sys.stdout) - app.show_error(str(e)) + self.app.show_error(str(e)) return # broadcast self.wallet.sendtx(tx) @@ -247,6 +245,7 @@ class SendScreen(CScreen): class ReceiveScreen(CScreen): kvname = 'receive' + @profiler def update(self): addr = self.app.wallet.get_unused_address(None) qr = self.screen.ids.get('qr')