Trezor: Add wipe device functionality
Also add a chicken box for PIN removal.
This commit is contained in:
@@ -55,7 +55,7 @@ class CosignWidget(QWidget):
|
||||
|
||||
|
||||
|
||||
class InstallWizard(WindowModalDialog, MessageBoxMixin, WizardBase):
|
||||
class InstallWizard(WindowModalDialog, WizardBase):
|
||||
|
||||
def __init__(self, config, app, plugins):
|
||||
title = 'Electrum - ' + _('Install Wizard')
|
||||
|
||||
@@ -8,7 +8,7 @@ import qrcode
|
||||
import electrum
|
||||
from electrum import bmp
|
||||
from electrum.i18n import _
|
||||
from util import WindowModalDialog, MessageBoxMixin
|
||||
from util import WindowModalDialog
|
||||
|
||||
|
||||
class QRCodeWidget(QWidget):
|
||||
@@ -83,7 +83,7 @@ class QRCodeWidget(QWidget):
|
||||
|
||||
|
||||
|
||||
class QRDialog(WindowModalDialog, MessageBoxMixin):
|
||||
class QRDialog(WindowModalDialog):
|
||||
|
||||
def __init__(self, data, parent=None, title = "", show_text=False):
|
||||
WindowModalDialog.__init__(self, parent, title)
|
||||
|
||||
@@ -156,9 +156,10 @@ class CancelButton(QPushButton):
|
||||
self.clicked.connect(dialog.reject)
|
||||
|
||||
class MessageBoxMixin:
|
||||
def question(self, msg, parent=None, title=None):
|
||||
def question(self, msg, parent=None, title=None, icon=None):
|
||||
Yes, No = QMessageBox.Yes, QMessageBox.No
|
||||
return self.msg_box(QMessageBox.Question, parent or self, title or '',
|
||||
return self.msg_box(icon or QMessageBox.Question,
|
||||
parent or self, title or '',
|
||||
msg, buttons=Yes|No, defaultButton=No) == Yes
|
||||
|
||||
def show_warning(self, msg, parent=None, title=None):
|
||||
@@ -188,7 +189,7 @@ class MessageBoxMixin:
|
||||
d.setDefaultButton(defaultButton)
|
||||
return d.exec_()
|
||||
|
||||
class WindowModalDialog(QDialog):
|
||||
class WindowModalDialog(QDialog, MessageBoxMixin):
|
||||
'''Handy wrapper; window modal dialogs are better for our multi-window
|
||||
daemon model as other wallet windows can still be accessed.'''
|
||||
def __init__(self, parent, title=None):
|
||||
|
||||
Reference in New Issue
Block a user