class documentation

class UIActions(object): (source)

View In Hierarchy

Container for all kind of actions that can be triggered from the menubar, but do not directly link to a MainWindow object.
Method __init__ No summary
Method check_and_update_index No summary
Method copy_location Menu action to copy the current page name to the clipboard
Method delete_page Delete a page by either trashing it, or permanent deletion after confirmation of a TrashPageDialog or DeletePageDialog.
Method edit_page_source Menu action to edit the page source in an external editor. See edit_file for details.
Method email_page Menu action to open an email containing the current page. Encodes the current page as "mailto:" URI and calls open_url() to start the preferred email client.
Method ensure_index_uptodate Undocumented
Method import_page Menu action to show an ImportPageDialog
Method manage_custom_tools Menu action to show the CustomToolManagerDialog
Method move_page Menu action to show the MovePageDialog @param path: a Path object, or None to move to current selected page
Method new_page Menu action to create a new page, shows the NewPageDialog,
Method new_page_here Undocumented
Method new_sub_page Menu action to create a new page, shows the NewPageDialog. Like new_page() but forces a child page of the current page.
Method on_notebook_properties_changed Undocumented
Method open_attachments_folder Menu action to open the attachment folder for the current page
Method open_document_root Menu action to open the document root folder
Method open_new_window No summary
Method open_notebook Open another notebook. @param location: notebook location as uri or object with "uri" attribute @param pagename: optional page name
Method open_notebook_folder Menu action to open the notebook folder
Method populate_menu_with_actions Undocumented
Method quit Menu action for quit. @emits: quit
Method save_copy Menu action to show a SaveCopyDialog
Method show_about Menu action to show the "about" dialog
Method show_debug_log Undocumented
Method show_export Menu action to show an ExportDialog
Method show_help Menu action to show the user manual. Will start a new zim instance showing the notebook with the manual. @param page: manual page to show (string)
Method show_help_bugs Menu action to show the 'Bugs' page in the user manual
Method show_help_faq Menu action to show the 'FAQ' page in the user manual
Method show_help_keys Menu action to show the 'Key Bindings' page in the user manual
Method show_open_notebook Show the NotebookDialog dialog
Method show_preferences Menu action to show the PreferencesDialog
Method show_properties Menu action to show the PropertiesDialog
Method show_recent_changes Menu action to show the RecentChangesDialog
Method show_search Menu action to show the SearchDialog @param query: the search query to show
Method show_search_backlinks Menu action to show the SearchDialog with a query for backlinks
Method show_search_section Undocumented
Method show_server_gui Menu action to show the server interface from zim.gui.server. Spawns a new zim instance for the server.
Method show_templateeditor Menu action to show the TemplateEditorDialog
Instance Variable navigation Undocumented
Instance Variable notebook Undocumented
Instance Variable page Undocumented
Instance Variable widget Undocumented
def __init__(self, widget, notebook, page, navigation): (source)
Constructor
Parameters
widgetowning gtk widget or None, only used to determine parent window for dialogs
notebookNotebook object for actions to act on
pagePage object that reflects the _default_ page for actions to act on.
navigationa NavigationModel
@action(_('Check and Update Index'))
def check_and_update_index(self, update_only=False): (source)
Check the notebook for changes and update the index. Shows an progressbar while updateing.
Parameters
update_onlyif True only updates are done, if False also check is done for all files
Returns
True unless the user cancelled the update
@action(_('Copy _Location'), accelerator='<shift><Primary>L')
def copy_location(self): (source)
Menu action to copy the current page name to the clipboard
@action(_('_Delete Page'), menuhints='notebook:edit')
def delete_page(self, path=None): (source)
Delete a page by either trashing it, or permanent deletion after confirmation of a TrashPageDialog or DeletePageDialog.
Parameters
patha Path object, or None for the current selected page
@action(_('Edit _Source'), menuhints='tools:edit')
def edit_page_source(self, page=None): (source)
Menu action to edit the page source in an external editor. See edit_file for details.
Parameters
pagethe Page object, or None for te current page
@action(_('_Send To...'))
def email_page(self, _callback=open_url): (source)
Menu action to open an email containing the current page. Encodes the current page as "mailto:" URI and calls open_url() to start the preferred email client.
def ensure_index_uptodate(self): (source)

Undocumented

@action(_('_Import Page...'), menuhints='notebook:edit')
def import_page(self): (source)
Menu action to show an ImportPageDialog
@action(_('Custom _Tools'))
def manage_custom_tools(self): (source)
Menu action to show the CustomToolManagerDialog
@action(_('_Rename or Move Page...'), accelerator='F2', menuhints='notebook:edit')
def move_page(self, path=None): (source)
Menu action to show the MovePageDialog
Parameters
patha Path object, or None to move to current selected page
@action(_('_New Page...'), '<Primary>N', menuhints='notebook:edit')
def new_page(self): (source)

Menu action to create a new page, shows the NewPageDialog,

Difference with open_page() is that the page is saved directly, so it exists and is stays visible if the user navigates away without first adding content. Though subtle this is expected behavior for users.

@action(_('_New Page Here...'), menuhints='notebook:edit')
def new_page_here(self): (source)

Undocumented

@action(_('New S_ub Page...'), '<shift><Primary>N', menuhints='notebook:edit')
def new_sub_page(self): (source)
Menu action to create a new page, shows the NewPageDialog. Like new_page() but forces a child page of the current page.
def on_notebook_properties_changed(self, propeties): (source)

Undocumented

@action(_('Open Attachments _Folder'), menuhints='tools', icon='folder')
def open_attachments_folder(self): (source)
Menu action to open the attachment folder for the current page
@action(_('Open _Document Root'))
def open_document_root(self): (source)
Menu action to open the document root folder
@action(_('Open in New _Window'))
def open_new_window(self, page=None, anchor=None, anchor_fail_silent=False): (source)
Menu action to open a page in a PageWindow
Parameters
pagethe page Path, deafults to current selected
anchoroptional anchor id
anchor_fail_silentignore error when anchor id does not exist in page
def open_notebook(self, location, pagename=None): (source)
Open another notebook.
Parameters
locationnotebook location as uri or object with "uri" attribute
pagenameoptional page name
@action(_('Open _Notebook Folder'))
def open_notebook_folder(self): (source)
Menu action to open the notebook folder
def populate_menu_with_actions(self, scope, menu): (source)

Undocumented

@action(_('_Quit'), '<Primary>Q')
def quit(self): (source)
Menu action for quit.
Unknown Field: emits
quit
@action(_('Save A _Copy...'))
def save_copy(self): (source)
Menu action to show a SaveCopyDialog
@action(_('_About'))
def show_about(self): (source)
Menu action to show the "about" dialog
@action(_('View debug log'), menuhints='tools')
def show_debug_log(self): (source)

Undocumented

@action(_('E_xport...'))
def show_export(self): (source)
Menu action to show an ExportDialog
@action(_('_Contents'), 'F1')
def show_help(self, page=None): (source)
Menu action to show the user manual. Will start a new zim instance showing the notebook with the manual.
Parameters
pagemanual page to show (string)
@action(_('_Bugs'))
def show_help_bugs(self): (source)
Menu action to show the 'Bugs' page in the user manual
@action(_('_FAQ'))
def show_help_faq(self): (source)
Menu action to show the 'FAQ' page in the user manual
@action(_('_Keybindings'))
def show_help_keys(self): (source)
Menu action to show the 'Key Bindings' page in the user manual
@action(_('_Open Another Notebook...'), '<Primary>O')
def show_open_notebook(self): (source)
Show the NotebookDialog dialog
@action(_('Pr_eferences'), '<Primary>comma')
def show_preferences(self): (source)
Menu action to show the PreferencesDialog
@action(_('Proper_ties'))
def show_properties(self): (source)
Menu action to show the PropertiesDialog
@action(_('Recent Changes...'))
def show_recent_changes(self): (source)
Menu action to show the RecentChangesDialog
@action(_('_Search...'), '<shift><Primary>F', verb_icon='edit-find-symbolic')
def show_search(self, query=None, focus_results=False): (source)
Menu action to show the SearchDialog
Parameters
querythe search query to show
focus_resultsUndocumented
@action(_('Search _Backlinks...'))
def show_search_backlinks(self, page=None): (source)
Menu action to show the SearchDialog with a query for backlinks
@action(_('Search this section'))
def show_search_section(self, page=None): (source)

Undocumented

@action(_('Start _Web Server'))
def show_server_gui(self): (source)
Menu action to show the server interface from zim.gui.server. Spawns a new zim instance for the server.
@action(_('_Templates'))
def show_templateeditor(self): (source)
Menu action to show the TemplateEditorDialog
navigation = (source)

Undocumented

notebook = (source)

Undocumented

page = (source)

Undocumented

widget = (source)

Undocumented