mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 07:33:42 +02:00
Use Yes/No for confirm_delete dialogs
This commit is contained in:
parent
2bedd3bfb2
commit
aca602c118
1 changed files with 3 additions and 2 deletions
|
|
@ -40,9 +40,10 @@ def __init__(self, msg, name, parent, config_set=dynamic, icon='dialog_warning.p
|
|||
a.stateChanged.connect(self.toggle)
|
||||
l.addWidget(a)
|
||||
|
||||
buttons = QDialogButtonBox.Ok
|
||||
if show_cancel_button:
|
||||
buttons |= QDialogButtonBox.Cancel
|
||||
buttons = QDialogButtonBox.Yes | QDialogButtonBox.No
|
||||
else:
|
||||
buttons = QDialogButtonBox.Ok
|
||||
self.buttonBox = bb = QDialogButtonBox(buttons, self)
|
||||
bb.setObjectName("buttonBox")
|
||||
bb.setFocus(Qt.OtherFocusReason)
|
||||
|
|
|
|||
Loading…
Reference in a new issue