Beispiel #1
0
  def do_update_state(self):
    if not self.impl:
      self.impl = Plugin(self.window)

    self.impl.update_menu()
    self.impl.update_console()
Beispiel #2
0
  def do_activate(self):
    if not self.impl:
      self.impl = Plugin(self.window)

    self.impl.create_menu()
    self.impl.create_console()
Beispiel #3
0
  def do_deactivate(self):
    if not self.impl:
      self.impl = Plugin(self.window)

    self.impl.destroy_menu()
    self.impl.destroy_console()
Beispiel #4
0
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()