commit d2dcea67baeaeed87f948aa46be228d99dcdb170
parent 5d963d9a958122cdf3180c0b4326ac15ca824d36
Author: ThomasV <thomasv@electrum.org>
Date: Wed, 24 Aug 2016 10:19:45 +0200
fix settings_dialog buttons
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/plugins/trezor/qt_generic.py b/plugins/trezor/qt_generic.py
@@ -194,7 +194,7 @@ def qt_plugin_class(base_plugin_class):
if type(keystore) != self.keystore_class:
continue
button = StatusBarButton(QIcon(self.icon_file), self.device,
- partial(self.settings_dialog, window))
+ partial(self.settings_dialog, window, keystore))
window.statusBar().addPermanentWidget(button)
keystore.handler = self.create_handler(window)
keystore.thread = TaskThread(window, window.on_error)
@@ -209,15 +209,14 @@ def qt_plugin_class(base_plugin_class):
keystore.thread.add(partial(self.show_address, wallet, addrs[0]))
menu.addAction(_("Show on %s") % self.device, show_address)
- def settings_dialog(self, window):
- device_id = self.choose_device(window)
+ def settings_dialog(self, window, keystore):
+ device_id = self.choose_device(window, keystore)
if device_id:
SettingsDialog(window, self, device_id).exec_()
- def choose_device(self, window):
+ def choose_device(self, window, keystore):
'''This dialog box should be usable even if the user has
forgotten their PIN or it is in bootloader mode.'''
- keystore = window.wallet.get_keystore()
device_id = self.device_manager().xpub_id(keystore.xpub)
if not device_id:
info = self.device_manager().select_device(keystore.handler, self)