Ejemplo n.º 1
0
 def __init__(self,
              name,
              type_,
              check=True,
              end_action=None,
              end_action_args=(),
              end_action_kw={}):
     ActionItem.__init__(self, name, type_, action=self._launch_qa_menu)
     self._check = check
     self._end_action = end_action
     self._end_action_args = end_action_args
     self._end_action_kw = end_action_kw
     return None
Ejemplo n.º 2
0
 def __init__(self, universe_name, universe, related_items, *args, **kw):
     self._universe = universe
     self.universe_name = universe_name
     self.related_items = related_items
     self._to_delete = False
     self._total_size = 0
     l = []
     for i in related_items:
         if int(i['storageUsed']):
             l.append(int(i['storageUsed']))
         else:
             l.append(0)
     name = '%s %s' % (universe_name, bytes_to_human(sum(l)))
     ActionItem.__init__(self,
                         name,
                         type_='setupitem',
                         display_type='not_checked',
                         *args,
                         **kw)
     self.action = self._action
     return None
Ejemplo n.º 3
0
 def __init__(self,
              can_modify,
              callback=None,
              callback_args=(),
              active_values=None,
              **kw):
     self._can_modify = can_modify
     self._callback = callback
     self._callback_args = callback_args
     if not active_values:
         active_cfg = wn_cfg.getActiveConfigurationInfos()
         active_values = wn_dev.getDeviceInfos(active_cfg['interface'])
     _default = ('0.0.0.0' if can_modify else _('Disconnected'))
     self.addr = (active_values[self.attribute]
                  if active_values[self.attribute] else _default)
     ActionItem.__init__(self,
                         name=_(self.pattern_name) % dict(
                             ((elt, getattr(self, elt))
                              for elt in self.pattern_values['name'])),
                         action=self._modify,
                         type_='setupitem',
                         **kw)
     return None
Ejemplo n.º 4
0
	def __init__(self, name, type_, *args, **kw):
		ActionItem.__init__(self, name, type_, action=self.execute_action, *args, **kw)
Ejemplo n.º 5
0
 def __init__(self, *args, **kw):
     ActionItem.__init__(self, action=self.execute_action, *args, **kw)
     return None
Ejemplo n.º 6
0
	def __init__(self, user_arg, *args, **kw):
		self.user_arg = user_arg
		ActionItem.__init__(self, action=self._check_action, **kw)
Ejemplo n.º 7
0
	def __init__(self, *args, **kwargs):
		ActionItem.__init__(self, *args, **kwargs)
Ejemplo n.º 8
0
 def __init__(self, name, type_):
     ActionItem.__init__(self, name, type_, action=self._launch_secret_menu)
     return None
Ejemplo n.º 9
0
 def __init__(self, *args, **kw):
     ActionItem.__init__(self, action=self._check_action, **kw)
     self.depth = 1
     return None
Ejemplo n.º 10
0
 def __init__(self, name, type_, action, *args, **kw):
     ActionItem.__init__(self, name, type_, action=action, *args, **kw)
     return None
Ejemplo n.º 11
0
 def __init__(self, *args, **kw):
     ActionItem.__init__(self, action=self._check_action, **kw)
Ejemplo n.º 12
0
	def __init__(self, language, translator):
		ActionItem.__init__(self, name=language.title(), action=self.translate, type_='')
		self.translator = translator
		return None
Ejemplo n.º 13
0
class LanguageItem(ActionItem):
	def __init__(self, language, translator):
		ActionItem.__init__(self, name=language.title(), action=self.translate, type_='')
Ejemplo n.º 14
0
 def __init__(self, *args, **kw):
     ActionItem.__init__(self,
                         action=self.launch_config,
                         type_='setupparameters',
                         **kw)
     return None