mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
87cfaa6ba5
commit
d6bf59d83f
@ -205,11 +205,14 @@ def error_dialog(parent, title, msg, det_msg='', show=False,
|
|||||||
return d.exec_()
|
return d.exec_()
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def question_dialog(parent, title, msg, det_msg=''):
|
def question_dialog(parent, title, msg, det_msg='', show_copy_button=True):
|
||||||
d = MessageBox(QMessageBox.Question, title, msg, QMessageBox.Yes|QMessageBox.No,
|
d = MessageBox(QMessageBox.Question, title, msg, QMessageBox.Yes|QMessageBox.No,
|
||||||
parent, det_msg)
|
parent, det_msg)
|
||||||
d.setIconPixmap(QPixmap(I('dialog_information.svg')))
|
d.setIconPixmap(QPixmap(I('dialog_information.svg')))
|
||||||
d.setEscapeButton(QMessageBox.No)
|
d.setEscapeButton(QMessageBox.No)
|
||||||
|
if not show_copy_button:
|
||||||
|
d.cb.setVisible(False)
|
||||||
|
|
||||||
return d.exec_() == QMessageBox.Yes
|
return d.exec_() == QMessageBox.Yes
|
||||||
|
|
||||||
def info_dialog(parent, title, msg, det_msg='', show=False):
|
def info_dialog(parent, title, msg, det_msg='', show=False):
|
||||||
|
@ -656,7 +656,7 @@ class ConfigDialog(ResizableDialog, Ui_Dialog):
|
|||||||
_('The selected column is not a custom column'), show=True)
|
_('The selected column is not a custom column'), show=True)
|
||||||
if not question_dialog(self, _('Are you sure?'),
|
if not question_dialog(self, _('Are you sure?'),
|
||||||
_('Do you really want to delete column %s and all its data?') %
|
_('Do you really want to delete column %s and all its data?') %
|
||||||
self.custcols[col]['name']):
|
self.custcols[col]['name'], show_copy_button=False):
|
||||||
return
|
return
|
||||||
self.columns.item(idx).setCheckState(False)
|
self.columns.item(idx).setCheckState(False)
|
||||||
self.columns.takeItem(idx)
|
self.columns.takeItem(idx)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Create a custom column</string>
|
<string>Create or edit custom columns</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -126,7 +126,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create and edit custom columns</string>
|
<string>Create or edit custom columns</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user