kivy fixes
This commit is contained in:
parent
d9f6e738a4
commit
e2d00c61cd
|
@ -303,8 +303,6 @@ class ElectrumWindow(App):
|
||||||
def load_wallet_by_name(self, wallet_path):
|
def load_wallet_by_name(self, wallet_path):
|
||||||
if not wallet_path:
|
if not wallet_path:
|
||||||
return
|
return
|
||||||
self.stop_wallet()
|
|
||||||
|
|
||||||
config = self.electrum_config
|
config = self.electrum_config
|
||||||
storage = WalletStorage(wallet_path)
|
storage = WalletStorage(wallet_path)
|
||||||
Logger.info('Electrum: Check for existing wallet')
|
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.bind(on_wizard_complete=lambda instance, wallet: self.load_wallet(wallet))
|
||||||
wizard.run(action)
|
wizard.run(action)
|
||||||
else:
|
else:
|
||||||
wallet.start_threads(self.network)
|
|
||||||
self.load_wallet(wallet)
|
self.load_wallet(wallet)
|
||||||
self.on_resume()
|
self.on_resume()
|
||||||
|
|
||||||
|
@ -332,7 +329,6 @@ class ElectrumWindow(App):
|
||||||
d = LabelDialog(_('Enter wallet name'), '', f)
|
d = LabelDialog(_('Enter wallet name'), '', f)
|
||||||
d.open()
|
d.open()
|
||||||
|
|
||||||
|
|
||||||
def on_stop(self):
|
def on_stop(self):
|
||||||
self.stop_wallet()
|
self.stop_wallet()
|
||||||
|
|
||||||
|
@ -449,7 +445,9 @@ class ElectrumWindow(App):
|
||||||
|
|
||||||
@profiler
|
@profiler
|
||||||
def load_wallet(self, wallet):
|
def load_wallet(self, wallet):
|
||||||
|
self.stop_wallet()
|
||||||
self.wallet = wallet
|
self.wallet = wallet
|
||||||
|
self.wallet.start_threads(self.network)
|
||||||
self.current_account = self.wallet.storage.get('current_account', None)
|
self.current_account = self.wallet.storage.get('current_account', None)
|
||||||
self.update_wallet()
|
self.update_wallet()
|
||||||
# Once GUI has been initialized check if we want to announce something
|
# Once GUI has been initialized check if we want to announce something
|
||||||
|
@ -477,7 +475,6 @@ class ElectrumWindow(App):
|
||||||
else:
|
else:
|
||||||
self.status = _("Not connected")
|
self.status = _("Not connected")
|
||||||
|
|
||||||
|
|
||||||
def get_max_amount(self):
|
def get_max_amount(self):
|
||||||
inputs = self.wallet.get_spendable_coins(None)
|
inputs = self.wallet.get_spendable_coins(None)
|
||||||
amount, fee = self.wallet.get_max_amount(self.electrum_config, inputs, 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():
|
#if self.wallet.up_to_date or not self.network or not self.network.is_connected():
|
||||||
self.update_tabs()
|
self.update_tabs()
|
||||||
|
|
||||||
|
|
||||||
@profiler
|
@profiler
|
||||||
def notify_transactions(self, *dt):
|
def notify_transactions(self, *dt):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -66,14 +66,14 @@ Builder.load_string('''
|
||||||
text: _('Open') if popup.path else _('New Wallet')
|
text: _('Open') if popup.path else _('New Wallet')
|
||||||
on_release:
|
on_release:
|
||||||
popup.dismiss()
|
popup.dismiss()
|
||||||
root.new_wallet(app)
|
root.new_wallet(app, wallet_selector.path)
|
||||||
''')
|
''')
|
||||||
|
|
||||||
class WalletDialog(Factory.Popup):
|
class WalletDialog(Factory.Popup):
|
||||||
def new_wallet(self, app):
|
def new_wallet(self, app, dirname):
|
||||||
def cb(text):
|
def cb(text):
|
||||||
if text:
|
if text:
|
||||||
app.load_wallet_by_name(text)
|
app.load_wallet_by_name(os.path.join(dirname, text))
|
||||||
if self.path:
|
if self.path:
|
||||||
app.load_wallet_by_name(self.path)
|
app.load_wallet_by_name(self.path)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue