Trezor: Add wipe device functionality
Also add a chicken box for PIN removal.
This commit is contained in:
@@ -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