class QuickOpenPlugin(GObject.Object, Peas.Activatable): __gtype_name__ = "QuickOpenPlugin" object = GObject.Property(type=GObject.Object) def __init__(self): GObject.Object.__init__(self) self._popup_size = (450, 300) def do_activate(self): window = self.object self._helper = WindowHelper(window, self) def do_deactivate(self): self._helper.deactivate() self._helper = None def do_update_state(self): self._helper.update_ui() def get_popup_size(self): return self._popup_size def set_popup_size(self, size): self._popup_size = size
class PowerProjectHotkeysPlugin(gedit.Plugin): def __init__(self): gedit.Plugin.__init__(self) debug.msg(os.path.join(os.path.dirname(__file__), "hotkeys")) Commands().set_dirs( [ os.path.expanduser("~/.gnome2/gedit/powerproject/hotkeys"), os.path.join(os.path.dirname(__file__), "hotkeys"), ] ) self.window = None def activate(self, window): debug.msg("PowerProjectHotkeysPlugin activating") self.window = WindowHelper(self, window) def deactivate(self, window): debug.msg("PowerProjectHotkeysPlugin deactivating") self.window = None def update_ui(self, window): self.window.update_ui()
class PowerProjectHotkeysPlugin(gedit.Plugin): def __init__(self): gedit.Plugin.__init__(self) debug.msg(os.path.join(os.path.dirname(__file__), 'hotkeys')) Commands().set_dirs([ os.path.expanduser('~/.gnome2/gedit/powerproject/hotkeys'), os.path.join(os.path.dirname(__file__), 'hotkeys'), ]) self.window = None def activate(self, window): debug.msg('PowerProjectHotkeysPlugin activating') self.window = WindowHelper(self, window) def deactivate(self, window): debug.msg('PowerProjectHotkeysPlugin deactivating') self.window = None def update_ui(self, window): self.window.update_ui()
def activate(self, window): self._instances[window] = WindowHelper(self, window)
def activate(self, window): self._helpers[window] = WindowHelper(window, self)
def do_activate(self): window = self.object self._helper = WindowHelper(window, self)
def activate(self, window): helper = WindowHelper(window, self) window.set_data(self.WINDOW_DATA_KEY, helper)
def activate(self, window): debug.msg("PowerProjectHotkeysPlugin activating") self.window = WindowHelper(self, window)
def activate(self, window): debug.msg("PowerProjectQuickOpenPlugin activate %s" % str(window)) self._helpers[window] = WindowHelper(window, self, search)
def activate(self, window): debug.msg('PowerProjectHotkeysPlugin activating') self.window = WindowHelper(self, window)