Ejemplo n.º 1
0
Archivo: data.py Proyecto: 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)
Ejemplo n.º 2
0
 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))