This commit is contained in:
ThomasV 2017-07-07 23:26:42 +02:00
parent 777a3aa8bf
commit c6bdd3c1b0
1 changed files with 5 additions and 6 deletions

View File

@ -96,14 +96,11 @@ def wizard_dialog(func):
class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
def __init__(self, config, app, plugins, storage): def __init__(self, config, app, plugins, storage):
BaseWizard.__init__(self, config, storage) BaseWizard.__init__(self, config, storage)
QDialog.__init__(self, None) QDialog.__init__(self, None)
self.setWindowTitle('Electrum - ' + _('Install Wizard')) self.setWindowTitle('Electrum - ' + _('Install Wizard'))
self.app = app self.app = app
self.config = config self.config = config
# Set for base base class # Set for base base class
self.plugins = plugins self.plugins = plugins
self.language_for_seed = config.get('language') self.language_for_seed = config.get('language')
@ -169,15 +166,17 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
vbox.addLayout(hbox2) vbox.addLayout(hbox2)
self.set_layout(vbox, title=_('Electrum wallet')) self.set_layout(vbox, title=_('Electrum wallet'))
def on_choose():
wallet_folder = os.path.dirname(self.storage.path) wallet_folder = os.path.dirname(self.storage.path)
def on_choose():
path = unicode(QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder)) path = unicode(QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder))
if path: if path:
self.name_e.setText(path) self.name_e.setText(path)
def on_filename(path): def on_filename(filename):
path = os.path.join(wallet_folder, unicode(filename))
try: try:
self.storage = WalletStorage(unicode(path)) self.storage = WalletStorage(path)
except IOError: except IOError:
self.storage = None self.storage = None
if self.storage: if self.storage: