class SmartHighlightingPlugin(GObject.Object, Gedit.WindowActivatable): __gtype_name__ = "SmartHighlightingPlugin" window = GObject.property(type=Gedit.Window) def __init__(self): GObject.Object.__init__(self) def do_activate(self): self._plugin = SmartHighlightWindowHelper(self, self.window) def do_deactivate(self): self._plugin.deactivate() del self._plugin def do_update_state(self): self._plugin.update_ui() ''' def do_create_configure_widget(self): #widget = Gtk.CheckButton("A configuration setting.") #widget.set_border_width(6) widget = ConfigUI(self.window, self.config).configWindow return widget #''' def get_instance(self): return self._plugin, self.window
def do_activate(self): self._plugin = SmartHighlightWindowHelper(self, self.window)
def activate(self, window): self._instances[window] = SmartHighlightWindowHelper(window)