def __init__(self, extra_num, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.extra_num = extra_num self.Start_Extra_Item = ActionItem(_('Start Extra'), type_='setupitem', display_type=self._get_extra_status( 'yes', 1), action=self._start_extra, args=[]) self.Stop_Extra_Item = ActionItem(_('Stop Extra'), type_='setupitem', display_type=self._get_extra_status( 'no', 1), action=self._stop_extra, args=[]) self.Enable_Extra_Item = ActionItem( _('Enable Extra'), type_='setupitem', display_type=self._get_extra_status('running', 2), action=self._enable_extra, args=[]) self.Disable_Extra_Item = ActionItem( _('Disable Extra'), type_='setupitem', display_type=self._get_extra_status('stopped', 2), action=self._disable_extra, args=[]) self.preview_list = [ self.Start_Extra_Item, self.Stop_Extra_Item, self.Enable_Extra_Item, self.Disable_Extra_Item ]
def __init__(self, *args, **kw): global glob_usb_mode_dict, glob_current_usb_mode, glob_ps3_fw_dict, glob_current_ps3_fw, glob_usb_mode_orig self._get_psfreedom_conf() glob_usb_mode_orig = glob_current_usb_mode ParametersSetupItem.__init__(self, *args, **kw) self.USBModeItem = PSFreedomCommonSetupItem(name=_( 'Mode: %s' % (glob_usb_mode_dict[glob_current_usb_mode])), type_='setupitem', menu=self.menu, display_type=None, action=self._set_usb_mode) self.PS3FwVersionItem = PSFreedomCommonSetupItem( name=_('PS3 firmware: v%s' % (glob_ps3_fw_dict[glob_current_ps3_fw])), type_='setupitem', menu=self.menu, display_type=None, action=self._set_ps3_fw_version) self.PSFreedomStatusItem = PSFreedomCommonSetupItem(name=_( 'Status: %s' % (self._get_psfreedom_status())), type_='setupitem', menu=self.menu, display_type=None, action=None) self.SaveSettingsItem = ActionItem(name=_('Save settings'), type_='setupitem', display_type=None, action=self._save_usb_mode) self.refresh_task = Task(self._refresh_status)
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.preview_list = [ TransitionParametersSetupItem('photo', 'transition', config.HMI_PHOTO['transitions'], 'Transition', type_='setupitem') ] return None
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.preview_list = [ LanguageUserConfigSetupItem( domain='video', key='language', choices_list=config.HMI_VIDEO['languages'], name='Default audio track', type_='setupitem') ] return None
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.preview_list = [ TVReplayHDParametersSetupItem(name='TVReplay HD videos', menu=self.menu, domain='video', key='tvreplay_hd', choices_list=sorted(UnicodeDict({ True: 'Yes', False: 'No' }), reverse=False)) ] return None
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.preview_list = [ LanguageUserConfigSetupItem( domain='video', key='dailymotion_languages', choices_list=config.HMI_VIDEO['dailymotion_languages'], name=_('Default search language'), type_='setupitem'), DailyMotionFormatParametersSetupItem( domain='video', key='dailymotion_formats', choices_list=config.HMI_VIDEO['dailymotion_formats'], name=_('Default video format'), type_='setupitem') ] return None
def __init__(self, domain, key, choices_list, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.domain = domain self.key = key self.choices_list = choices_list try: value = config.user_config[domain][key] self.preview_list = [ ActionItem(name=self.translation_dict.get(val, str(val)), display_type=(('%s_checked' % val) if val == value else ('%s_not_checked' % val)), type_='setupitem', action=self._select_option, args=[val]) for val in choices_list ] except AttributeError, e: PRINT_EXCEPTION(e)
def __init__(self, device, *args, **kw): self.device = device if self.device == 'Fan': self.prefix = _('Fan Speed : ') self.unit = _('Rpm') self.div = 1 self.command = 'cat /sys/devices/platform/stm-pwm/pwm1 | tr -d "\n"' elif self.device == 'Cpu': self.prefix = _('Cpu Temp : ') self.unit = '\xc2\xb0C' self.command = 'cat /sys/bus/i2c/devices/0-0048/temp1_input | tr -d "\n"' self.div = 1000 elif self.device == 'Hdd': self.prefix = _('Hdd Temp : ') self.unit = '\xc2\xb0C' self.command = '/wymedia/usr/bin/hddtemp -n /dev/sda 2> /dev/null | tr -d "\n"' self.div = 1 self.name = '%s-- %s'%(self.prefix, self.unit) ParametersSetupItem.__init__(self, name=self.name, *args, **kw) if self.device == 'Cpu': self.preview_list = [CpuTempSetPointItem(name=_('Set Cpu Temp (%d %s)') % (self._get_setpoint_temp(), self.unit), type_='setupitem', menu=self.menu)]
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.include_scrambled = user_config['tv']['scan_with_scrambled'] self.all_channels_item = ActionItem( _('Free and pay channels'), type_='setupitem', display_type=('checked' if self.include_scrambled else 'not_checked'), action=self.set_include_scrambled, args=(True, )) self.free_channels_only_item = ActionItem( _('Free channels only'), type_='setupitem', display_type=('not_checked' if self.include_scrambled else 'checked'), action=self.set_include_scrambled, args=(False, )) self.preview_list = [ self.all_channels_item, self.free_channels_only_item, TNTAutomaticScanItem(parent=self, name='Start scan', type_='setupitem') ] return None
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) return None
def __init__(self, parent, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.parent = parent return None
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) Task(self._get_extras_status).start(delay=1, loop=False) Task(self._set_preview_list).start(delay=1, loop=False)
def __init__(self, *args, **kw): ParametersSetupItem.__init__(self, *args, **kw) self.refresh_task = Task(self._refresh_infos) Task(self._set_preview_list).start(delay=1,loop=False)
def __init__(self, *args, **kw): self.name = _('Mem Usage : -- %') ParametersSetupItem.__init__(self, name=self.name, *args, **kw)