mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
5e3e063b49
commit
e9296b9763
@ -158,6 +158,13 @@ _proceed_memory = []
|
|||||||
|
|
||||||
class ProceedNotification(MessageBox): # {{{
|
class ProceedNotification(MessageBox): # {{{
|
||||||
|
|
||||||
|
'''
|
||||||
|
WARNING: This class is deprecated. DO not use it as some users ahve
|
||||||
|
reported crashes when closing the dialog box generated by this class.
|
||||||
|
Instead use: gui.proceed_question(...) The arguments are the same as for
|
||||||
|
this class.
|
||||||
|
'''
|
||||||
|
|
||||||
def __init__(self, callback, payload, html_log, log_viewer_title, title, msg,
|
def __init__(self, callback, payload, html_log, log_viewer_title, title, msg,
|
||||||
det_msg='', show_copy_button=False, parent=None,
|
det_msg='', show_copy_button=False, parent=None,
|
||||||
cancel_callback=None, log_is_file=False):
|
cancel_callback=None, log_is_file=False):
|
||||||
|
@ -129,6 +129,25 @@ class ProceedQuestion(QDialog):
|
|||||||
def __call__(self, callback, payload, html_log, log_viewer_title, title,
|
def __call__(self, callback, payload, html_log, log_viewer_title, title,
|
||||||
msg, det_msg='', show_copy_button=False, cancel_callback=None,
|
msg, det_msg='', show_copy_button=False, cancel_callback=None,
|
||||||
log_is_file=False):
|
log_is_file=False):
|
||||||
|
'''
|
||||||
|
A non modal popup that notifies the user that a background task has
|
||||||
|
been completed. This class guarantees that onlya single popup is
|
||||||
|
visible at any one time. Other requests are queued and displayed after
|
||||||
|
the user dismisses the current popup.
|
||||||
|
|
||||||
|
:param callback: A callable that is called with payload if the user
|
||||||
|
asks to proceed. Note that this is always called in the GUI thread.
|
||||||
|
:param cancel_callback: A callable that is called with the payload if
|
||||||
|
the users asks not to proceed.
|
||||||
|
:param payload: Arbitrary object, passed to callback
|
||||||
|
:param html_log: An HTML or plain text log
|
||||||
|
:param log_viewer_title: The title for the log viewer window
|
||||||
|
:param title: The title for this popup
|
||||||
|
:param msg: The msg to display
|
||||||
|
:param det_msg: Detailed message
|
||||||
|
:param log_is_file: If True the html_log parameter is interpreted as
|
||||||
|
the path to a file on disk containing the log encoded with utf-8
|
||||||
|
'''
|
||||||
question = Question(payload, callback, cancel_callback, title, msg,
|
question = Question(payload, callback, cancel_callback, title, msg,
|
||||||
html_log, log_viewer_title, log_is_file, det_msg,
|
html_log, log_viewer_title, log_is_file, det_msg,
|
||||||
show_copy_button)
|
show_copy_button)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user