move update_status in handler
This commit is contained in:
@@ -97,7 +97,6 @@ class TrezorCompatiblePlugin(HW_PluginBase):
|
||||
|
||||
def _try_bridge(self, device):
|
||||
self.print_error("Trying to connect over Trezor Bridge...")
|
||||
|
||||
try:
|
||||
return self.bridge_transport({'path': hexlify(device.path)})
|
||||
except BaseException as e:
|
||||
|
||||
@@ -194,6 +194,8 @@ class QtPlugin(object):
|
||||
tooltip = self.device + ' ' + (keystore.label or '')
|
||||
cb = lambda: self.show_settings_dialog(window, keystore)
|
||||
button = StatusBarButton(QIcon(self.icon_unpaired), tooltip, cb)
|
||||
button.icon_paired = self.icon_paired
|
||||
button.icon_unpaired = self.icon_unpaired
|
||||
window.statusBar().addPermanentWidget(button)
|
||||
handler = self.create_handler(window)
|
||||
handler.button = button
|
||||
@@ -202,15 +204,6 @@ class QtPlugin(object):
|
||||
# Trigger a pairing
|
||||
keystore.thread.add(partial(self.get_client, keystore))
|
||||
|
||||
window.connect(window, SIGNAL('keystore_status'), self._update_status)
|
||||
|
||||
def update_status(self, handler, paired):
|
||||
handler.win.emit(SIGNAL('keystore_status'), handler, paired)
|
||||
|
||||
def _update_status(self, handler, paired):
|
||||
icon = self.icon_paired if paired else self.icon_unpaired
|
||||
handler.button.setIcon(QIcon(icon))
|
||||
|
||||
@hook
|
||||
def receive_menu(self, menu, addrs, wallet):
|
||||
if type(wallet) is not Standard_Wallet:
|
||||
|
||||
Reference in New Issue
Block a user