def __init__(self, *args, **kw): if not EPGMarginItem.translation_dict: for d in config.HMI_TV['epg_margins']: _d = d * 60 EPGMarginItem.translation_dict[d] = strftime( _('%M min'), gmtime(_d)) UserConfigSetupItem.__init__(self, *args, **kw) return None
def _select_option(self, val): UserConfigSetupItem._select_option(self, val) WyRecord().setRecordPadding(val * 60) return None
def __init__(self, domain, key, choices, reload_center=True, **kw): if not user_config['security']['parental_control']: choices = [] self._reload_center = reload_center UserConfigSetupItem.__init__(self, domain, key, choices, **kw) return None
def __init__(self, exec_callback=False, **kw): UserConfigSetupItem.__init__(self, **kw) self.exec_callback = exec_callback return None
def __init__(self, *args, **kw): self.translation_dict = l10n.UnicodeDict(dict(([code, country_dict[code]['language']] for code in country_dict))) UserConfigSetupItem.__init__(self, *args, **kw) return None
def __init__(self, *args, **args): self.translation_dict = l10n.UnicodeDict(dict(<genexpr>(country_dict))) UserConfigSetupItem.__init__(self, *args, **kw)
depth = 2 def execute_action(self, val): try: iso_3166_lang = country_dict[val]['iso-3166'] from pygui.item.parameters.tv import wyscanserver wyscan = wyscanserver() wyscan.SetIso3166CountryCode(iso_3166_lang) except Exception, e: log.warn('Unable to set the country for wyscan (%r)', e) class LanguageUserConfigSetupItem(UserConfigSetupItem): def __init__(self, *args, **args): self.translation_dict = l10n.UnicodeDict(dict(<genexpr>(country_dict))) UserConfigSetupItem.__init__(self, *args, **kw) class OSDLanguageUserConfigSetupItem(UserConfigSetupItem): depth = 2 translation_dict = dict(<genexpr>(country_dict)) def __init__(self, exec_callback=False, **kw): UserConfigSetupItem.__init__(self, **kw) self.exec_callback = exec_callback def execute_action(self, val): l10n.set_language(val) if self.exec_callback and hasattr(self.menu, 'related_menu'): self.menu.related_menu.on_modify_lang() try:
def _select_option(self, val): ret = Mixer().set_hdmi_mute(val) if ret: UserConfigSetupItem._select_option(self, val) return None