From ac1cf1186258b726b8d695554a83db81170497ef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 27 Jan 2011 17:07:10 -0700 Subject: [PATCH] ... --- src/calibre/gui2/dialogs/message_box.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/dialogs/message_box.py b/src/calibre/gui2/dialogs/message_box.py index 123476b734..45ab73f8a1 100644 --- a/src/calibre/gui2/dialogs/message_box.py +++ b/src/calibre/gui2/dialogs/message_box.py @@ -39,6 +39,12 @@ class MessageBox(QDialog, Ui_Dialog): self.det_msg.setPlainText(det_msg) self.det_msg.setVisible(False) + if show_copy_button: + self.ctc_button = self.bb.addButton(_('&Copy to clipboard'), + self.bb.ActionRole) + self.ctc_button.clicked.connect(self.copy_to_clipboard) + + if det_msg: self.show_det_msg = _('Show &details') self.hide_det_msg = _('Hide &details') @@ -47,11 +53,6 @@ class MessageBox(QDialog, Ui_Dialog): self.det_msg_toggle.setToolTip( _('Show detailed information about this error')) - if show_copy_button: - self.ctc_button = self.bb.addButton(_('&Copy to clipboard'), - self.bb.ActionRole) - self.ctc_button.clicked.connect(self.copy_to_clipboard) - self.copy_action = QAction(self) self.addAction(self.copy_action)