mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Copy messages to clipboard.
This commit is contained in:
parent
99c516d852
commit
fdac643e72
@ -108,7 +108,7 @@ def warning_dialog(parent, title, msg, det_msg='', show=False):
|
|||||||
parent)
|
parent)
|
||||||
d.setDetailedText(det_msg)
|
d.setDetailedText(det_msg)
|
||||||
d.setIconPixmap(QPixmap(':/images/dialog_warning.svg'))
|
d.setIconPixmap(QPixmap(':/images/dialog_warning.svg'))
|
||||||
|
QApplication.clipboard().setText('%s - %s: %s' % (title, msg, det_msg))
|
||||||
if show:
|
if show:
|
||||||
return d.exec_()
|
return d.exec_()
|
||||||
return d
|
return d
|
||||||
@ -118,6 +118,7 @@ def error_dialog(parent, title, msg, det_msg='', show=False):
|
|||||||
parent)
|
parent)
|
||||||
d.setDetailedText(det_msg)
|
d.setDetailedText(det_msg)
|
||||||
d.setIconPixmap(QPixmap(':/images/dialog_error.svg'))
|
d.setIconPixmap(QPixmap(':/images/dialog_error.svg'))
|
||||||
|
QApplication.clipboard().setText('%s - %s: %s' % (title, msg, det_msg))
|
||||||
if show:
|
if show:
|
||||||
return d.exec_()
|
return d.exec_()
|
||||||
return d
|
return d
|
||||||
@ -127,6 +128,7 @@ def question_dialog(parent, title, msg, det_msg=''):
|
|||||||
parent)
|
parent)
|
||||||
d.setDetailedText(det_msg)
|
d.setDetailedText(det_msg)
|
||||||
d.setIconPixmap(QPixmap(':/images/dialog_information.svg'))
|
d.setIconPixmap(QPixmap(':/images/dialog_information.svg'))
|
||||||
|
QApplication.clipboard().setText('%s - %s: %s' % (title, msg, det_msg))
|
||||||
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):
|
||||||
@ -134,6 +136,7 @@ def info_dialog(parent, title, msg, det_msg='', show=False):
|
|||||||
parent)
|
parent)
|
||||||
d.setDetailedText(det_msg)
|
d.setDetailedText(det_msg)
|
||||||
d.setIconPixmap(QPixmap(':/images/dialog_information.svg'))
|
d.setIconPixmap(QPixmap(':/images/dialog_information.svg'))
|
||||||
|
QApplication.clipboard().setText('%s - %s: %s' % (title, msg, det_msg))
|
||||||
if show:
|
if show:
|
||||||
return d.exec_()
|
return d.exec_()
|
||||||
return d
|
return d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user