1
0

MessageBoxMixin-related cleanup

This commit is contained in:
Neil Booth
2015-12-23 20:05:09 +09:00
parent 8bcd132423
commit 0ecf2565ce
3 changed files with 26 additions and 58 deletions

View File

@@ -384,22 +384,6 @@ class InstallWizard(WindowModalDialog, MessageBoxMixin):
wallet_type = '%dof%d'%(m,n)
return wallet_type
def question(self, msg, yes_label=_('OK'), no_label=_('Cancel'), icon=None):
vbox = QVBoxLayout()
self.set_layout(vbox)
if icon:
logo = QLabel()
logo.setPixmap(icon)
vbox.addWidget(logo)
label = QLabel(msg)
label.setWordWrap(True)
vbox.addWidget(label)
vbox.addStretch(1)
vbox.addLayout(Buttons(CancelButton(self, no_label), OkButton(self, yes_label)))
if not self.exec_():
return None
return True
def show_seed(self, seed, sid):
vbox = seed_dialog.show_seed_box_msg(seed, sid)
vbox.addLayout(Buttons(CancelButton(self), OkButton(self, _("Next"))))
@@ -418,8 +402,8 @@ class InstallWizard(WindowModalDialog, MessageBoxMixin):
path = self.storage.path
msg = _("The file '%s' contains an incompletely created wallet.\n"
"Do you want to complete its creation now?") % path
if not question(msg):
if question(_("Do you want to delete '%s'?") % path):
if not self.question(msg):
if self.question(_("Do you want to delete '%s'?") % path):
os.remove(path)
self.show_warning(_('The file was removed'))
return