This commit is contained in:
Kovid Goyal 2010-05-03 20:49:09 -06:00
parent 87cfaa6ba5
commit d6bf59d83f
3 changed files with 7 additions and 4 deletions

View File

@ -205,11 +205,14 @@ def error_dialog(parent, title, msg, det_msg='', show=False,
return d.exec_()
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,
parent, det_msg)
d.setIconPixmap(QPixmap(I('dialog_information.svg')))
d.setEscapeButton(QMessageBox.No)
if not show_copy_button:
d.cb.setVisible(False)
return d.exec_() == QMessageBox.Yes
def info_dialog(parent, title, msg, det_msg='', show=False):

View File

@ -656,7 +656,7 @@ class ConfigDialog(ResizableDialog, Ui_Dialog):
_('The selected column is not a custom column'), show=True)
if not question_dialog(self, _('Are you sure?'),
_('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
self.columns.item(idx).setCheckState(False)
self.columns.takeItem(idx)

View File

@ -20,7 +20,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Create a custom column</string>
<string>Create or edit custom columns</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@ -126,7 +126,7 @@
</font>
</property>
<property name="text">
<string>Create and edit custom columns</string>
<string>Create or edit custom columns</string>
</property>
</widget>
</item>