1
0

Trezor: Add wipe device functionality

Also add a chicken box for PIN removal.
This commit is contained in:
Neil Booth
2015-12-28 00:12:26 +09:00
parent 9aae66a9d2
commit a7028176cd
6 changed files with 122 additions and 56 deletions

View File

@@ -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):