Esempio n. 1
0
 def can_enable(self):
     if self.type == "config":
         config = data.get_config(self.value)
         if 'choice_group' in config:
             # Check if any member of the group is forced by a select
             group = config['choice_group']
             for k in data.get_choice_group(group)['configs']:
                 if k != self.value and len(
                         data.get_config(k)['selected_by']) > 0:
                     return False
     elif self.type == "empty":
         return False
     return can_enable(data.get_menu_configitem(self.type, self.value))
Esempio n. 2
0
 def is_visible(self):
     if self.type == "empty":
         return False
     return is_visible(data.get_menu_configitem(self.type, self.value))