class documentation

class SavePageHandler(object): (source)

View In Hierarchy

Object for handling page saving.

This class implements auto-saving on a timer and tries writing in a background thread to ot block the user interface.

Method __init__ Undocumented
Method cancel_autosave Cancel a pending autosave
Method do_try_save_page Undocumented
Method queue_autosave No summary
Method save_page_now Save the page in the foregound
Method try_save_page Try to save the page
Method wait_for_store_page_async Undocumented
Instance Variable get_page_cb Undocumented
Instance Variable notebook Undocumented
Instance Variable pageview Undocumented
Instance Variable timeout Undocumented
Instance Variable use_thread Undocumented
Method _assert_can_save_page Undocumented
Instance Variable _autosave_timer Undocumented
Instance Variable _error_event Undocumented
def __init__(self, pageview, notebook, get_page_cb, timeout=15, use_thread=True): (source)

Undocumented

def cancel_autosave(self): (source)
Cancel a pending autosave
def do_try_save_page(self, *a): (source)

Undocumented

def queue_autosave(self, timeout=15): (source)
Queue a single autosave action after a given timeout. Will not do anything once an autosave is already queued. Autosave will keep running until page is no longer modified and then stop.
Parameters
timeouttimeout in seconds
def save_page_now(self, dialog_timeout=False): (source)

Save the page in the foregound

Can result in a SavePageErrorDialog when there is an error while saving a page. If that dialog is cancelled by the user, the page may not be saved after all.

Parameters
dialog_timeoutpassed on to SavePageErrorDialog
def try_save_page(self): (source)
def wait_for_store_page_async(self): (source)

Undocumented

get_page_cb = (source)

Undocumented

notebook = (source)

Undocumented

pageview = (source)

Undocumented

timeout = (source)

Undocumented

use_thread = (source)

Undocumented

def _assert_can_save_page(self, page): (source)

Undocumented

_autosave_timer = (source)

Undocumented

_error_event = (source)

Undocumented