Example #1
0
 def __init(self):
     # First we need to get the methods instead of the functions
     # create_actions accepts only methods and not class functions
     get_method = lambda func: getattr(self, func.__name__)
     meths = map(get_method, self.__class__.__actions__)
     # Now we can create the actions
     acts = actions.create_actions(meths, self.NAME)
     # Finally for each action we add it to the group
     add_action = self.__action_group.add_action
     map(add_action, acts)
Example #2
0
 def __init(self):
     # First we need to get the methods instead of the functions
     # create_actions accepts only methods and not class functions
     get_method = lambda func: getattr(self, func.__name__)
     meths = map(get_method, self.__class__.__actions__)
     # Now we can create the actions
     acts = actions.create_actions(meths, self.NAME)
     # Finally for each action we add it to the group
     add_action = self.__action_group.add_action
     map(add_action, acts)
    def __init__(self, path):
        self.path = path

        self.appdata = AppData()
        config.load(self.appdata.app_config)

        self.cursors = modes.get_cursors()
        self.default_cms = cms.ColorManager(self.stub)
        self.proxy = AppProxy(self)
        self.inspector = DocumentInspector(self)
        self.clipboard = AppClipboard(self)

        self.accelgroup = gtk.AccelGroup()
        self.actiongroup = gtk.ActionGroup('BasicAction')

        self.actions = create_actions(self)
        self.mw = MainWindow(self)
        self.proxy.update_references()