mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-04 04:45:16 +00:00
More message box cleanup
This commit is contained in:
parent
37a49752eb
commit
64887f7a74
4 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
from PyQt4.Qt import QMessageBox, QVBoxLayout, QLabel, QThread, SIGNAL, QGridLayout, QInputDialog, QPushButton
|
from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL, QGridLayout, QInputDialog, QPushButton
|
||||||
import PyQt4.QtCore as QtCore
|
import PyQt4.QtCore as QtCore
|
||||||
from electrum_gui.qt.util import *
|
from electrum_gui.qt.util import *
|
||||||
from electrum_gui.qt.main_window import StatusBarButton, ElectrumWindow
|
from electrum_gui.qt.main_window import StatusBarButton, ElectrumWindow
|
||||||
|
@ -26,11 +26,11 @@ class Plugin(KeepKeyPlugin):
|
||||||
try:
|
try:
|
||||||
self.get_client().ping('t')
|
self.get_client().ping('t')
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
QMessageBox.information(window, _('Error'), _("KeepKey device not detected.\nContinuing in watching-only mode." + '\n\nReason:\n' + str(e)), _('OK'))
|
window.show_error(_('KeepKey device not detected.\nContinuing in watching-only mode.\nReason:\n' + str(e)))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
return
|
return
|
||||||
if self.wallet.addresses() and not self.wallet.check_proper_device():
|
if self.wallet.addresses() and not self.wallet.check_proper_device():
|
||||||
QMessageBox.information(window, _('Error'), _("This wallet does not match your KeepKey device"), _('OK'))
|
window.show_error(_("This wallet does not match your KeepKey device"))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from PyQt4.Qt import QApplication, QMessageBox, QDialog, QInputDialog, QLineEdit, QVBoxLayout, QLabel, QThread, SIGNAL
|
from PyQt4.Qt import QDialog, QInputDialog, QLineEdit, QVBoxLayout, QLabel, SIGNAL
|
||||||
import PyQt4.QtCore as QtCore
|
import PyQt4.QtCore as QtCore
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ class Plugin(LedgerPlugin):
|
||||||
self.handler = BTChipQTHandler(window)
|
self.handler = BTChipQTHandler(window)
|
||||||
if self.btchip_is_connected():
|
if self.btchip_is_connected():
|
||||||
if not self.wallet.check_proper_device():
|
if not self.wallet.check_proper_device():
|
||||||
QMessageBox.information(window, _('Error'), _("This wallet does not match your Ledger device"), _('OK'))
|
window.show_error(_("This wallet does not match your Ledger device"))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
else:
|
else:
|
||||||
QMessageBox.information(window, _('Error'), _("Ledger device not detected.\nContinuing in watching-only mode."), _('OK'))
|
window.show_error(_("Ledger device not detected.\nContinuing in watching-only mode."))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from PyQt4.Qt import QMessageBox, QVBoxLayout, QLabel, QThread, SIGNAL, QGridLayout, QInputDialog, QPushButton
|
from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL, QGridLayout, QInputDialog, QPushButton
|
||||||
import PyQt4.QtCore as QtCore
|
import PyQt4.QtCore as QtCore
|
||||||
from electrum_gui.qt.util import *
|
from electrum_gui.qt.util import *
|
||||||
from electrum_gui.qt.main_window import StatusBarButton, ElectrumWindow
|
from electrum_gui.qt.main_window import StatusBarButton, ElectrumWindow
|
||||||
|
@ -100,11 +100,11 @@ class Plugin(TrezorPlugin):
|
||||||
try:
|
try:
|
||||||
self.get_client().ping('t')
|
self.get_client().ping('t')
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
QMessageBox.information(window, _('Error'), _("Trezor device not detected.\nContinuing in watching-only mode." + '\n\nReason:\n' + str(e)), _('OK'))
|
window.show_error(_('Trezor device not detected.\nContinuing in watching-only mode.\nReason:\n' + str(e)))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
return
|
return
|
||||||
if self.wallet.addresses() and not self.wallet.check_proper_device():
|
if self.wallet.addresses() and not self.wallet.check_proper_device():
|
||||||
QMessageBox.information(window, _('Error'), _("This wallet does not match your Trezor device"), _('OK'))
|
window.show_error(_("This wallet does not match your Trezor device"))
|
||||||
self.wallet.force_watching_only = True
|
self.wallet.force_watching_only = True
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
|
|
|
@ -267,5 +267,5 @@ class Plugin(TrustedCoinPlugin):
|
||||||
server.auth(_id, otp)
|
server.auth(_id, otp)
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
QMessageBox.information(window, _('Message'), _('Incorrect password'), _('OK'))
|
window.show_message(_('Incorrect password'))
|
||||||
pw.setText('')
|
pw.setText('')
|
||||||
|
|
Loading…
Add table
Reference in a new issue