def __init__(self, ui): PluginClass.__init__(self, ui) # Add menu items. if self.ui.ui_type == 'gtk': self.ui.add_actions(ui_actions, self) self.ui.add_ui(ui_xml, self)
def __init__(self, config=None): PluginClass.__init__(self, config) # Construct a new class on run time klassname = self.object_type.title() + 'MainWindowExtension' insert_action = Action('insert_%s' % self.object_type, MainWindowExtensionBase.insert_object, self.short_label + '...', readonly=False) generatorklass = self.lookup_subclass(ImageGeneratorClass) assert generatorklass.object_type == self.object_type, \ 'Object type of ImageGenerator (%s) does not match object type of plugin (%s)' \ % (generatorklass.object_type, self.object_type) mainwindow_extension_base = \ self.lookup_subclass(MainWindowExtensionBase) \ or MainWindowExtensionBase klass = type( klassname, (mainwindow_extension_base, ), { 'object_type': self.object_type, 'syntax': self.syntax, 'uimanager_xml': uimanager_xml_template % self.object_type, 'generator_class': generatorklass, 'short_label': self.short_label, 'insert_label': self.insert_label, 'edit_label': self.edit_label, 'insert_%s' % self.object_type: insert_action, }) self.set_extension_class('MainWindow', klass)
def __init__(self, config=None): PluginClass.__init__(self, config) # Construct a new class on run time klassname = self.object_type.title() + 'MainWindowExtension' insert_action = Action( 'insert_%s' % self.object_type, MainWindowExtensionBase.insert_object, self.short_label + '...', readonly=False ) generatorklass = self.lookup_subclass(ImageGeneratorClass) assert generatorklass.object_type == self.object_type, \ 'Object type of ImageGenerator (%s) does not match object type of plugin (%s)' \ % (generatorklass.object_type, self.object_type) mainwindow_extension_base = \ self.lookup_subclass(MainWindowExtensionBase) \ or MainWindowExtensionBase klass = type(klassname, (mainwindow_extension_base,), { 'object_type': self.object_type, 'syntax': self.syntax, 'uimanager_xml': uimanager_xml_template % self.object_type, 'generator_class': generatorklass, 'short_label': self.short_label, 'insert_label': self.insert_label, 'edit_label': self.edit_label, 'insert_%s' % self.object_type: insert_action, }) self.set_extension_class('MainWindow', klass)
def __init__(self, config=None): PluginClass.__init__(self, config) self.connectto(TemplateManager, 'process-page', self.on_process_page_template) self.preferences.connect('changed', self.on_preferences_changed) self.on_preferences_changed(self.preferences)
def __init__(self, config=None): PluginClass.__init__(self, config) # Construct a new class on run time klassname = self.object_type.title() + 'PageViewExtension' insert_action = Action( 'insert_%s' % self.object_type, ImageGeneratorPageViewExtensionBase.insert_object, self.short_label + '...', menuhints='insert' ) generatorklass = self.lookup_subclass(ImageGeneratorClass) assert generatorklass.object_type == self.object_type, \ 'Object type of ImageGenerator (%s) does not match object type of plugin (%s)' \ % (generatorklass.object_type, self.object_type) mainwindow_extension_base = \ self.lookup_subclass(ImageGeneratorPageViewExtensionBase) \ or ImageGeneratorPageViewExtensionBase klass = type(klassname, (mainwindow_extension_base,), { 'object_type': self.object_type, 'syntax': self.syntax, 'generator_class': generatorklass, 'short_label': self.short_label, 'insert_label': self.insert_label, 'edit_label': self.edit_label, 'insert_%s' % self.object_type: insert_action, }) self.extension_classes['PageView'] = klass
def __init__(self, ui): PluginClass.__init__(self, ui) if self.ui.ui_type == 'gtk': import gui self.gui = gui.GtkLinkMap(self.ui) else: self.gui = False
def destroy(self): # show at least menubar again, set margins to zero & restore colors self.ui.uistate['MainWindow']['show_menubar_fullscreen'] = True self._set_margins(0, 0, 0, 0) if self._normal_colors: self._set_colors(self._normal_colors) PluginClass.destroy(self)
def __init__(self, config=None): PluginClass.__init__(self, config) ObjectManager.register_object( OBJECT_TYPE, self.create_object ) # register the plugin in the main init so it works for a non-gui export self.connectto(self.preferences, 'changed', self.on_preferences_changed)
def __init__(self, ui): PluginClass.__init__(self, ui) self.spell = None self.uistate.setdefault('active', False) if self.ui.ui_type == 'gtk': self.ui.add_toggle_actions(ui_toggle_actions, self) self.ui.add_ui(ui_xml, self) self.connectto(self.ui, 'open-page', order=SIGNAL_AFTER)
def __init__(self, ui): PluginClass.__init__(self, ui) self.spell = None self.uistate.setdefault('active', False) if self.ui.ui_type == 'gtk': self.ui.add_toggle_actions(ui_toggle_actions, self) self.ui.add_ui(ui_xml, self) self.ui.connect_after('open-page', self.do_open_page)
def extend(self, obj): name = obj.__class__.__name__ if name == 'MainWindow': index = obj.ui.notebook.index # XXX i_ext = self.get_extension(IconsIndexExtension, index=index) mw_ext = MainWindowExtension(self, obj, i_ext) self.extensions.add(mw_ext) else: PluginClass.extend(self, obj)
def disconnect(self): self.ui.notebook.unregister_hook('suggest_link', self.suggest_link) if self._set_template: ns = self._set_template try: self.ui.notebook.namespace_properties[ns].remove('template') except KeyError: pass PluginClass.disconnect(self)
def __init__(self, ui): PluginClass.__init__(self, ui) self.sidepane_widget = None self.ui_id_show_dialog = None self._set_template = None if self.ui.ui_type == 'gtk': self.ui.add_actions(ui_actions, self) self.ui.add_ui(ui_xml, self) self.ui.connect_after('open-notebook', self.do_open_notebook)
def destroy(self): if self._set_template: ns = self._set_template try: self.ui.notebook.namespace_properties[ns].remove('template') except KeyError: pass self.destroy_embedded_widget() PluginClass.destroy(self)
def __init__(self, ui): PluginClass.__init__(self, ui) try: self.zeitgeist_client = ZeitgeistClient() self.zeitgeist_client.register_data_source('application://zim.desktop', 'Zim', _('Zim Desktop Wiki'), []) # T: short description of zim except RuntimeError, e: logger.exception('Loading zeitgeist client failed, will not log events') self.zeitgeist_client = None
def extend(self, obj): name = obj.__class__.__name__ if name == 'MainWindow': index = obj.ui.notebook.index # XXX i_ext = self.get_extension(IndexExtension, index=index) mw_ext = MainWindowExtension(self, obj, i_ext) self.extensions.add(mw_ext) else: PluginClass.extend(self, obj)
def extend(self, obj): name = obj.__class__.__name__ if name == 'MainWindow': nb = obj.ui.notebook # XXX nb_ext = self.get_extension(NotebookExtension, notebook=nb) assert nb_ext, 'No notebook extension found for: %s' % nb mw_ext = MainWindowExtension(self, obj, nb_ext) self.extensions.add(mw_ext) else: PluginClass.extend(self, obj)
def __init__(self, ui): PluginClass.__init__(self, ui) self.task_labels = None self.task_label_re = None self.next_label = None self.next_label_re = None self.nonactionable_tags = [] self.included_re = None self.excluded_re = None self.db_initialized = False self._current_preferences = None
def __init__(self, ui): PluginClass.__init__(self, ui) try: self.zeitgeist_client = ZeitgeistClient() self.zeitgeist_client.register_data_source( 'application://zim.desktop', 'Zim', _('Zim Desktop Wiki'), []) # T: short description of zim except RuntimeError, e: logger.exception( 'Loading zeitgeist client failed, will not log events') self.zeitgeist_client = None
def __init__(self, ui): PluginClass.__init__(self, ui) self.codes_labels = None self.codes_label_re = None self.included_re = None self.excluded_re = None self.db_initialized = False self._current_preferences = None # Permite el indexamiento de la db en batch self.allow_index = False
def __init__(self, ui): PluginClass.__init__(self, ui) self.icon = None self.proxyobject = None if self.ui.ui_type == 'gtk': if ui.usedaemon: #~ and not self.preferences['standalone'] from zim.daemon import DaemonProxy self.proxyobject = DaemonProxy().get_object( 'zim.plugins.trayicon.DaemonTrayIcon', 'TrayIcon') self.ui.hideonclose = True else: self.icon = StandAloneTrayIcon(self.ui)
def __init__(self, ui): PluginClass.__init__(self, ui) self.vcs = None if self.ui.ui_type == 'gtk': self.ui.add_actions(ui_actions, self) self.ui.add_ui(ui_xml, self) self.actiongroup.get_action('show_versions').set_sensitive(False) if self.ui.notebook: self.detect_vcs() else: self.ui.connect_after('open-notebook', lambda o, n: self.detect_vcs() ) def on_quit(o): if self.preferences['autosave']: self.autosave() self.ui.connect('quit', on_quit)
def __init__(self, config=None): PluginClass.__init__(self, config) self.connectto(self.preferences, 'changed', self.on_preferences_changed)
def __init__(self, ui): PluginClass.__init__(self, ui)
def __init__(self, ui): PluginClass.__init__(self, ui) if self.ui.ui_type == 'gtk': self.ui.add_actions(ui_actions, self) self.ui.add_ui(ui_xml, self) self.register_image_generator_plugin('gnu_r_plot')
def __init__(self, ui): PluginClass.__init__(self, ui) if self.ui.ui_type == "gtk": self.ui.add_actions(ui_actions, self) self.ui.add_ui(ui_xml, self)
def __init__(self, config=None): PluginClass.__init__(self, config) self.add_manifests() self.preferences.connect('changed', self.on_preferences_changed) self.on_preferences_changed(self.preferences)
def __init__(self, ui): PluginClass.__init__(self, ui) self.sidepane_widget = None
def __init__(self): PluginClass.__init__(self) self.symbols = {} self.symbol_order = []
def __init__(self, *a): self._normal_colors = None self._show_panes = True PluginClass.__init__(self, *a)
def __init__(self): PluginClass.__init__(self) self.preferences.connect('changed', self.on_preferences_changed)
def destroy(self): self.disconnect_sidepane() self.disconnect_floating() PluginClass.destroy(self)
def __init__(self, ui): PluginClass.__init__(self, ui) self.sidepane_widget = None # For the embedded version self.ui_id_show_dialog = None # For the 'show dialog' action self._set_template = None
def __init__(self, config=None): ''' Constructor ''' PluginClass.__init__(self, config) ObjectManager.register_object(OBJECT_TYPE, self.create_table) self.connectto(self.preferences, 'changed', self.on_preferences_changed)
def __init__(self, config=None): PluginClass.__init__(self, config) self.symbols = {} self.symbol_order = []
def __init__(self, ui): PluginClass.__init__(self, ui) self._trayicon_class = None self.icon = None self.proxyobject = None
def destroy(self): self._drop_table() PluginClass.destroy(self)
def destroy(self): self.disconnect_embedded_widget() PluginClass.destroy(self)
def __init__(self, config=None): PluginClass.__init__(self, config)
def destroy(self): self.disconnect_trayicon() self.ui.hideonclose = False PluginClass.destroy(self)
def __init__(self): PluginClass.__init__(self)