def do_update_state(self): if not self.impl: self.impl = Plugin(self.window) self.impl.update_menu() self.impl.update_console()
def do_activate(self): if not self.impl: self.impl = Plugin(self.window) self.impl.create_menu() self.impl.create_console()
def do_deactivate(self): if not self.impl: self.impl = Plugin(self.window) self.impl.destroy_menu() self.impl.destroy_console()
class SrmTrainerWindowActivatable(GObject.Object, Gedit.WindowActivatable): __gtype_name__ = 'SrmTrainerWindowActivatable' window = GObject.property(type=Gedit.Window) def __init__(self): GObject.Object.__init__(self) self.impl = None def do_activate(self): if not self.impl: self.impl = Plugin(self.window) self.impl.create_menu() self.impl.create_console() def do_deactivate(self): if not self.impl: self.impl = Plugin(self.window) self.impl.destroy_menu() self.impl.destroy_console() def do_update_state(self): if not self.impl: self.impl = Plugin(self.window) self.impl.update_menu() self.impl.update_console()