This commit is contained in:
Kovid Goyal 2014-09-04 13:37:47 +05:30
parent 7b44654e20
commit ecb64743eb
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ def question_dialog(parent, title, msg, det_msg='', show_copy_button=False,
# Set skip_dialog_msg to a message displayed to the user # Set skip_dialog_msg to a message displayed to the user
skip_dialog_name=None, skip_dialog_msg=_('Show this confirmation again'), skip_dialog_name=None, skip_dialog_msg=_('Show this confirmation again'),
skip_dialog_skipped_value=True, skip_dialog_skip_precheck=True, skip_dialog_skipped_value=True, skip_dialog_skip_precheck=True,
# Override icon (QIcon to be used as the icon for this dialog) # Override icon (QIcon to be used as the icon for this dialog or string for I())
override_icon=None, override_icon=None,
# Change the text/icons of the yes and no buttons. # Change the text/icons of the yes and no buttons.
# The icons must be QIcon objects or strings for I() # The icons must be QIcon objects or strings for I()

View File

@ -33,7 +33,7 @@ class MessageBox(QDialog): # {{{
la.setObjectName("icon_label") la.setObjectName("icon_label")
l.addWidget(la) l.addWidget(la)
self.msg = la = QLabel(self) self.msg = la = QLabel(self)
la.setWordWrap(True) la.setWordWrap(True), la.setMinimumWidth(400)
la.setOpenExternalLinks(True) la.setOpenExternalLinks(True)
la.setObjectName("msg") la.setObjectName("msg")
l.addWidget(la, 0, 1, 1, 1) l.addWidget(la, 0, 1, 1, 1)
@ -68,7 +68,7 @@ class MessageBox(QDialog): # {{{
icon = 'dialog_%s.png'%icon icon = 'dialog_%s.png'%icon
self.icon = QIcon(I(icon)) self.icon = QIcon(I(icon))
else: else:
self.icon = q_icon self.icon = q_icon if isinstance(q_icon, QIcon) else QIcon(I(q_icon))
self.setup_ui() self.setup_ui()
self.setWindowTitle(title) self.setWindowTitle(title)