def show_help(self, page=None): '''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) ''' if page: ZIM_APPLICATION.run('--manual', page) else: ZIM_APPLICATION.run('--manual')
def open_notebook(self, location, pagename=None): '''Open another notebook. @param location: notebook location as uri or object with "uri" attribute @param pagename: optional page name ''' assert isinstance(location, str) or hasattr(location, 'uri') assert pagename is None or isinstance(pagename, str) uri = location.uri if hasattr(location, 'uri') else location if pagename: ZIM_APPLICATION.run('--gui', uri, pagename) else: ZIM_APPLICATION.run('--gui', uri)
def do_quick_note(self): '''Show the dialog from the quicknote plugin''' ZIM_APPLICATION.run('--plugin', 'quicknote')
def do_activate_notebook(self, uri): '''Open a specific notebook.''' if not isinstance(uri, str): uri = uri.uri ZIM_APPLICATION.run('--gui', uri)
def on_open_help(self, action): ''' Context menu: Open help ''' ZIM_APPLICATION.run('--manual', 'Plugins:Table Editor')
def do_activate_notebook(self, uri): '''Open a specific notebook.''' ZIM_APPLICATION.run('--gui', uri)
def on_help_button_clicked(self, button): klass = self.plugins.get_plugin_class(self._current_plugin) page = klass.plugin_info['help'] if page: ZIM_APPLICATION.run('--manual', page)
def show_server_gui(self): '''Menu action to show the server interface from L{zim.gui.server}. Spawns a new zim instance for the server. ''' ZIM_APPLICATION.run('--server', '--gui', self.notebook.uri)
def open_page(self, notebook, path): ZIM_APPLICATION.run('--gui', notebook.uri, path.name)