diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 16c97ba626..1e4672360b 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -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 skip_dialog_name=None, skip_dialog_msg=_('Show this confirmation again'), 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, # Change the text/icons of the yes and no buttons. # The icons must be QIcon objects or strings for I() diff --git a/src/calibre/gui2/dialogs/message_box.py b/src/calibre/gui2/dialogs/message_box.py index df4fe4389b..fb1f62ea74 100644 --- a/src/calibre/gui2/dialogs/message_box.py +++ b/src/calibre/gui2/dialogs/message_box.py @@ -33,7 +33,7 @@ class MessageBox(QDialog): # {{{ la.setObjectName("icon_label") l.addWidget(la) self.msg = la = QLabel(self) - la.setWordWrap(True) + la.setWordWrap(True), la.setMinimumWidth(400) la.setOpenExternalLinks(True) la.setObjectName("msg") l.addWidget(la, 0, 1, 1, 1) @@ -68,7 +68,7 @@ class MessageBox(QDialog): # {{{ icon = 'dialog_%s.png'%icon self.icon = QIcon(I(icon)) else: - self.icon = q_icon + self.icon = q_icon if isinstance(q_icon, QIcon) else QIcon(I(q_icon)) self.setup_ui() self.setWindowTitle(title)