Beispiel #1
0
    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')
Beispiel #2
0
    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)
Beispiel #3
0
 def do_quick_note(self):
     '''Show the dialog from the quicknote plugin'''
     ZIM_APPLICATION.run('--plugin', 'quicknote')
Beispiel #4
0
 def do_activate_notebook(self, uri):
     '''Open a specific notebook.'''
     if not isinstance(uri, str):
         uri = uri.uri
     ZIM_APPLICATION.run('--gui', uri)
Beispiel #5
0
 def on_open_help(self, action):
     ''' Context menu: Open help '''
     ZIM_APPLICATION.run('--manual', 'Plugins:Table Editor')
Beispiel #6
0
	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)
Beispiel #8
0
    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)
Beispiel #9
0
 def open_page(self, notebook, path):
     ZIM_APPLICATION.run('--gui', notebook.uri, path.name)