1
0

qt hww show_settings_dialog: don't scan devices in GUI thread

Just makes sense in general.
Also, previously, the GUI would freeze if right after startup the user
clicked the hww status bar icon (especially with multiple hww connected).
This commit is contained in:
SomberNight
2020-04-01 18:42:06 +02:00
parent 276631fab7
commit e6d43b60fa
8 changed files with 40 additions and 13 deletions

View File

@@ -208,9 +208,13 @@ class QtPlugin(QtPluginBase):
menu.addAction(_("Show on {}").format(device_name), show_address)
def show_settings_dialog(self, window, keystore):
device_id = self.choose_device(window, keystore)
if device_id:
SettingsDialog(window, self, keystore, device_id).exec_()
def connect():
device_id = self.choose_device(window, keystore)
return device_id
def show_dialog(device_id):
if device_id:
SettingsDialog(window, self, keystore, device_id).exec_()
keystore.thread.add(connect, on_success=show_dialog)
def request_trezor_init_settings(self, wizard, method, device):
vbox = QVBoxLayout()