Browse Source

qt wizard: select_storage

sqlite_db
ThomasV 6 years ago
parent
commit
8f4967f7d0
  1. 6
      electrum/gui/qt/__init__.py
  2. 5
      electrum/gui/qt/installwizard.py

6
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:

5
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()

Loading…
Cancel
Save