示例#1
0
文件: data.py 项目: hron/kupfer
 def get_can_enter_text_mode(self):
     """Check if there are any reasonable text sources for this action"""
     atroot = self.is_at_source_root()
     types = tuple(self.current_action.object_types())
     sc = GetSourceController()
     textsrcs = sc.get_text_sources()
     return atroot and any(sc.good_source_for_types(s, types) for s in textsrcs)
示例#2
0
文件: data.py 项目: jchtt/kupfer-adds
 def get_can_enter_text_mode(self):
     """Check if there are any reasonable text sources for this action"""
     atroot = self.is_at_source_root()
     types = tuple(self.current_action.object_types())
     sc = GetSourceController()
     textsrcs = sc.get_text_sources()
     return (atroot
             and any(sc.good_source_for_types(s, types) for s in textsrcs))