electrum

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

commit 8f4967f7d0715a9f279ef4b3f0f8bf96ee6844bd
parent beb9f63274723174ddd8e7df23c01ad24fc95026
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  8 Feb 2019 08:59:20 +0100

qt wizard: select_storage

Diffstat:
Melectrum/gui/qt/__init__.py | 6+++---
Melectrum/gui/qt/installwizard.py | 5++++-
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py @@ -226,10 +226,10 @@ class ElectrumGui(PrintError): else: return if not wallet: - storage = WalletStorage(path, manual_upgrades=True) - wizard = InstallWizard(self.config, self.app, self.plugins, storage) + wizard = InstallWizard(self.config, self.app, self.plugins, None) try: - wallet = wizard.run_and_get_wallet(self.daemon.get_wallet) + if wizard.select_storage(path, self.daemon.get_wallet): + wallet = wizard.run_and_get_wallet() except UserCancelled: pass except GoBack as e: diff --git a/electrum/gui/qt/installwizard.py b/electrum/gui/qt/installwizard.py @@ -159,7 +159,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): self.raise_() self.refresh_gui() # Need for QT on MacOSX. Lame. - def run_and_get_wallet(self, get_wallet_from_daemon): + def select_storage(self, path, get_wallet_from_daemon): vbox = QVBoxLayout() hbox = QHBoxLayout() @@ -183,6 +183,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): vbox.addLayout(hbox2) self.set_layout(vbox, title=_('Electrum wallet')) + self.storage = WalletStorage(path, manual_upgrades=True) wallet_folder = os.path.dirname(self.storage.path) def on_choose(): @@ -284,7 +285,9 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): return else: raise Exception('Unexpected encryption version') + return True + def run_and_get_wallet(self): path = self.storage.path if self.storage.requires_split(): self.hide()