def save_current_session(self, window): name = window.get_data(self.CURRENT_SESSION_NAME_KEY) if not name: return debug.msg('SessionOperations save_current_session') self.save(name, window)
def deactivate(self): debug.msg('deactivate function called') for view in self.handlers: view.disconnect(self.handlers[view]) self.window = None self.plugin = None
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 __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): model, rows = self._treeview.get_selection().get_selected_rows() ret = True for row in rows: s = model.get_iter(row) info = model.get(s, 1) debug.msg(str(info)) ret = True and self. _handler(info[0]) if rows and ret: self.destroy() return ret
def _activate(self): model, rows = self._treeview.get_selection().get_selected_rows() ret = True for row in rows: s = model.get_iter(row) info = model.get(s, 1) debug.msg(str(info)) ret = True and self._handler(info[0]) if rows and ret: self.destroy() return ret
def on_key_press(self, view, event): hotkey = { 'ctrl': False, 'shift': False, 'alt': False, 'key': event.keyval } if event.state & gtk.gdk.CONTROL_MASK: hotkey['ctrl'] = True if event.state & gtk.gdk.SHIFT_MASK: hotkey['shift'] = True if event.state & gtk.gdk.MOD1_MASK: hotkey['alt'] = True result = self.command_handler.handle(hotkey, view) status_text = self.command_handler.get_status_text() debug.msg('set status: %s' % status_text) self.set_status(status_text) return result
def on_key_press(self, view, event): hotkey = { 'ctrl' : False, 'shift' : False, 'alt' : False, 'key' : event.keyval } if event.state & gtk.gdk.CONTROL_MASK: hotkey['ctrl'] = True if event.state & gtk.gdk.SHIFT_MASK: hotkey['shift'] = True if event.state & gtk.gdk.MOD1_MASK: hotkey['alt'] = True result = self.command_handler.handle(hotkey, view) status_text = self.command_handler.get_status_text() debug.msg('set status: %s' % status_text) self.set_status(status_text) return result
def activate(self, window): debug.msg("PowerProjectQuickOpenPlugin activate %s" % str(window)) self._helpers[window] = WindowHelper(window, self, search)
def deactivate(self, window): debug.msg("PowerProjectHotkeysPlugin deactivating") self.window = None
def close_current_session(self, window): debug.msg('SessionOperations close_current_session') name = window.set_data(self.CURRENT_SESSION_NAME_KEY, None)
def execute(self, command, subcommand, view): if self.command_exists(command): debug.msg('Commands execute %s %s' % (command, subcommand)) return self._modules[command].execute(subcommand, view)
def __init__(self): super(SessionSaverPlugin, self).__init__() self.operations = SessionOperations(self) self.dialogs = SessionDialogs(self) self.sessions = XMLSessionStore() debug.msg(str(self.sessions))
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 _reset(self): debug.msg('CommandHandler reset') self.__command_group = None
def activate(self, window): debug.msg('PowerProjectHotkeysPlugin activating') self.window = WindowHelper(self, window)