electrum

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

commit e2d00c61cd45db13eef1c13ea5731ae4f84b4436
parent d9f6e738a4bd2ffee744b2f7ecf77607c8defe1c
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 18 Jan 2016 14:09:48 +0100

kivy fixes

Diffstat:
Mgui/kivy/main_window.py | 8++------
Mgui/kivy/uix/dialogs/wallets.py | 6+++---
2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -303,8 +303,6 @@ class ElectrumWindow(App): def load_wallet_by_name(self, wallet_path): if not wallet_path: return - self.stop_wallet() - config = self.electrum_config storage = WalletStorage(wallet_path) Logger.info('Electrum: Check for existing wallet') @@ -320,7 +318,6 @@ class ElectrumWindow(App): wizard.bind(on_wizard_complete=lambda instance, wallet: self.load_wallet(wallet)) wizard.run(action) else: - wallet.start_threads(self.network) self.load_wallet(wallet) self.on_resume() @@ -332,7 +329,6 @@ class ElectrumWindow(App): d = LabelDialog(_('Enter wallet name'), '', f) d.open() - def on_stop(self): self.stop_wallet() @@ -449,7 +445,9 @@ class ElectrumWindow(App): @profiler def load_wallet(self, wallet): + self.stop_wallet() self.wallet = wallet + self.wallet.start_threads(self.network) self.current_account = self.wallet.storage.get('current_account', None) self.update_wallet() # Once GUI has been initialized check if we want to announce something @@ -477,7 +475,6 @@ class ElectrumWindow(App): else: self.status = _("Not connected") - def get_max_amount(self): inputs = self.wallet.get_spendable_coins(None) amount, fee = self.wallet.get_max_amount(self.electrum_config, inputs, None) @@ -495,7 +492,6 @@ class ElectrumWindow(App): #if self.wallet.up_to_date or not self.network or not self.network.is_connected(): self.update_tabs() - @profiler def notify_transactions(self, *dt): ''' diff --git a/gui/kivy/uix/dialogs/wallets.py b/gui/kivy/uix/dialogs/wallets.py @@ -66,14 +66,14 @@ Builder.load_string(''' text: _('Open') if popup.path else _('New Wallet') on_release: popup.dismiss() - root.new_wallet(app) + root.new_wallet(app, wallet_selector.path) ''') class WalletDialog(Factory.Popup): - def new_wallet(self, app): + def new_wallet(self, app, dirname): def cb(text): if text: - app.load_wallet_by_name(text) + app.load_wallet_by_name(os.path.join(dirname, text)) if self.path: app.load_wallet_by_name(self.path) else: