예제 #1
0
파일: item.py 프로젝트: adozenlines/freevo2
 def cfgitems(self):
     """
     Return configure items.
     """
     configure = []
     for p in ItemPlugin.plugins(self.type):
         configure += p.actions_cfg(self)
     return [ SubMenuItem(self, a) for a in configure ]
예제 #2
0
 def cfgitems(self):
     """
     Return configure items.
     """
     configure = []
     for p in ItemPlugin.plugins(self.type):
         configure += p.actions_cfg(self)
     return [SubMenuItem(self, a) for a in configure]
예제 #3
0
파일: item.py 프로젝트: adozenlines/freevo2
 def eventhandler(self, event):
     """
     Simple eventhandler for an item
     """
     # call eventhandler from plugins
     for p in ItemPlugin.plugins(self.type):
         if p.eventhandler(self, event):
             return True
     # give the event to the next eventhandler in the list
     if self.parent:
         return self.parent.eventhandler(event)
     # nothing to do
     return False
예제 #4
0
 def eventhandler(self, event):
     """
     Simple eventhandler for an item
     """
     # call eventhandler from plugins
     for p in ItemPlugin.plugins(self.type):
         if p.eventhandler(self, event):
             return True
     # give the event to the next eventhandler in the list
     if self.parent:
         return self.parent.eventhandler(event)
     # nothing to do
     return False
예제 #5
0
파일: item.py 프로젝트: adozenlines/freevo2
 def _get_actions(self):
     """
     Get all actions for the item. Do not override this function,
     override 'actions' instead.
     """
     # get actions defined by the item
     post_actions = []
     pre_actions = []
     # get actions defined by plugins
     for p in ItemPlugin.plugins(self.type):
         actions = post_actions
         if p.plugin_level() < 10:
             actions = pre_actions
         for a in p.actions_menu(self):
             # set item for the action
             a.item = self
             actions.append(a)
     return pre_actions + self.actions() + post_actions
예제 #6
0
 def _get_actions(self):
     """
     Get all actions for the item. Do not override this function,
     override 'actions' instead.
     """
     # get actions defined by the item
     post_actions = []
     pre_actions = []
     # get actions defined by plugins
     for p in ItemPlugin.plugins(self.type):
         actions = post_actions
         if p.plugin_level() < 10:
             actions = pre_actions
         for a in p.actions_menu(self):
             # set item for the action
             a.item = self
             actions.append(a)
     return pre_actions + self.actions() + post_actions