class documentation

class SavePageErrorDialog(ErrorDialog): (source)

View In Hierarchy

Error dialog used when we hit an error while trying to save a page. Allow to save a copy or to discard changes. Includes a timer which delays the action buttons becoming sensitive. Reason for this timer is that the dialog may popup from auto-save while the user is typing, and we want to prevent an accidental action.
Method __init__ Constructor
Method discard Undocumented
Method do_response_ok Response handler for the 'OK' button @implementation: optional to be implemented by sub-classes that want to run some action after presenting the error.
Method run Runs the dialog and destroys it directly.
Method save_copy Undocumented
Instance Variable error Undocumented
Instance Variable page Undocumented
Instance Variable pageview Undocumented
Instance Variable timeout Undocumented
Instance Variable timer Undocumented
Instance Variable timer_label Undocumented
Instance Variable _done Undocumented

Inherited from ErrorDialog:

Method assert_response_ok Undocumented
Method get_debug_text Get the text to show in the log of a "You found a bug" dialog. Includes zim version info and traceback info.
Instance Variable do_logging Undocumented
Instance Variable showing_trace Undocumented
Method _run Undocumented
def __init__(self, pageview, error, page, timeout=False): (source)
Constructor
Parameters
pageviewUndocumented
errorthe actual error, either an Exception object (including instances of zim.errors.Error), a string with the error description, or a 2-tuple of the short message and the longer description as strings. Using a tuple here will give a better looking dialog over using a simple string.
pageUndocumented
timeoutUndocumented
parenteither a parent window or dialog or None
exc_infothis is an optional argument that takes the result of sys.exc_info(). This parameter is not necessary in most cases where the dialog is run while the exception is still in scope. One reason to pass it on explicitly is the handling of errors from an async operation in the main tread.
do_loggingif True also log the error, if False assume someone else already did
buttons

a constant controlling what kind of buttons the dialog will have. One of:

  • None or Gtk.ButtonsType.NONE: for dialogs taking care of constructing the buttons themselves
  • Gtk.ButtonsType.OK_CANCEL: Render Ok and Cancel
  • Gtk.ButtonsType.CLOSE: Only set a Close button
def discard(self): (source)

Undocumented

def do_response_ok(self): (source)
Response handler for the 'OK' button
Unknown Field: implementation
optional to be implemented by sub-classes that want to run some action after presenting the error.
def run(self): (source)
Runs the dialog and destroys it directly.
def save_copy(self): (source)

Undocumented

error = (source)

Undocumented

page = (source)

Undocumented

pageview = (source)

Undocumented

timeout = (source)

Undocumented

timer: int = (source)

Undocumented

timer_label = (source)

Undocumented

_done: bool = (source)

Undocumented