本文整理汇总了Python中Components.config.ConfigIP.getText方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigIP.getText方法的具体用法?Python ConfigIP.getText怎么用?Python ConfigIP.getText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components.config.ConfigIP
的用法示例。
在下文中一共展示了ConfigIP.getText方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ScanIP
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class ScanIP(Screen, ConfigListScreen):
skin = """
<screen name="ScanIP" position="center,center" size="560,80" title="Scan IP" >
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
<widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
<widget name="config" position="5,50" size="540,25" scrollbarMode="showOnDemand" />
</screen>"""
def __init__(self, session):
Screen.__init__(self, session)
self.session = session
self["key_red"] = StaticText(_("Cancel"))
self["key_green"] = StaticText(_("Scan NFS share"))
self["key_yellow"] = StaticText(_("Scan range"))
self["actions"] = ActionMap(["SetupActions", "ColorActions"],
{
"back": self.exit,
"red": self.exit,
"cancel": self.exit,
"green": self.goNfs,
"yellow": self.goAddress,
}, -1)
self.ipAddress = ConfigIP(default=[0,0,0,0])
ConfigListScreen.__init__(self, [
getConfigListEntry(_("IP Address"), self.ipAddress),
], self.session)
self.onLayoutFinish.append(self.layoutFinished)
def exit(self):
self.close((None,None))
def layoutFinished(self):
self.setWindowTitle()
def setWindowTitle(self):
self.setTitle(_("Enter IP to scan..."))
def goAddress(self):
if self.ipAddress.getText() != "0.0.0.0":
self.close((self.ipAddress.getText(), "address"))
else:
self.exit
def goNfs(self):
if self.ipAddress.getText() != "0.0.0.0":
self.close((self.ipAddress.getText(), "nfs"))
else:
self.exit
示例2: ScanIP
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class ScanIP(Screen, ConfigListScreen):
skin = '\n\t\t<screen name="ScanIP" position="center,center" size="560,80" title="Scan IP" >\n\t\t\t<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />\n\t\t\t<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />\n\t\t\t<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />\n\t\t\t<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />\n\t\t\t<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />\n\t\t\t<widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />\n\t\t\t<widget name="config" position="5,50" size="540,25" scrollbarMode="showOnDemand" />\n\t\t</screen>'
def __init__(self, session):
Screen.__init__(self, session)
self.session = session
self['key_red'] = StaticText(_('Cancel'))
self['key_green'] = StaticText(_('Scan NFS share'))
self['key_yellow'] = StaticText(_('Scan range'))
self['actions'] = ActionMap(['SetupActions', 'ColorActions'], {'back': self.exit,
'red': self.exit,
'cancel': self.exit,
'green': self.goNfs,
'yellow': self.goAddress}, -1)
self.ipAddress = ConfigIP(default=[0,
0,
0,
0])
ConfigListScreen.__init__(self, [getConfigListEntry(_('IP Address'), self.ipAddress)], self.session)
self.onLayoutFinish.append(self.layoutFinished)
def exit(self):
self.close((None, None))
def layoutFinished(self):
self.setWindowTitle()
def setWindowTitle(self):
self.setTitle(_('Enter IP to scan...'))
def goAddress(self):
if self.ipAddress.getText() != '0.0.0.0':
self.close((self.ipAddress.getText(), 'address'))
else:
self.exit
def goNfs(self):
if self.ipAddress.getText() != '0.0.0.0':
self.close((self.ipAddress.getText(), 'nfs'))
else:
self.exit
示例3: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
# STATE_CHOISE_SOFTCAM = 2
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {"ESI": "ESI default(13e-19e)", "19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
self.channellist_type = ConfigSelection(choices = modes, default = "ESI")
self.createMenu()
# elif self.index == self.STATE_CHOISE_SOFTCAM:
# self.enabled = ConfigYesNo(default = True)
# modes = {"cccam": _("default") + " (CCcam)", "scam": "scam"}
# self.softcam_type = ConfigSelection(choices = modes, default = "cccam")
# self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
# elif self.index == self.STATE_CHOISE_SOFTCAM:
# self.list.append(getConfigListEntry(_("Install softcam"), self.enabled))
# if self.enabled.value:
# self.list.append(getConfigListEntry(_("Softcam type"), self.softcam_type))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
def run(self):
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (updating packages)'), IpkgComponent.CMD_UPDATE)
elif self.index == self.STATE_CHOISE_CHANNELLIST and self.enabled.value and self.channellist_type.value != "ESI":
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (downloading channel list)'), IpkgComponent.CMD_REMOVE, {'package': 'enigma2-plugin-settings-henksat-' + self.channellist_type.value})
# elif self.index == self.STATE_CHOISE_SOFTCAM and self.enabled.value:
# self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (downloading softcam)'), IpkgComponent.CMD_INSTALL, {'package': 'enigma2-plugin-softcams-' + self.softcam_type.value})
return
示例4: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SOFTCAM = 2
STATE_CHOISE_PICONS = 3
STATE_CHOISE_TDT = 4
STATE_CHOISE_EPG = 5
STATE_CHOISE_CACHE = 6
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {"19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
self.channellist_type = ConfigSelection(choices = modes, default = "19e")
self.createMenu()
elif self.index == self.STATE_CHOISE_PICONS:
self.enabled = ConfigYesNo(default = True)
modes = {"19e": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
self.picons_type = ConfigSelection(choices = modes, default = "19e")
self.createMenu()
elif self.index == self.STATE_CHOISE_EPG:
self.enabled = ConfigYesNo(default = True)
modes = {"xmltvimport": "Xmltvimport", "crossepg": "CrossEPG"}
self.epg_type = ConfigSelection(choices = modes, default = "xmltvimport")
self.createMenu()
elif self.index == self.STATE_CHOISE_TDT:
self.enabled = ConfigYesNo(default = True)
modes = {"siano": "Siano", "Volar Black": "Hauppauge"}
self.tdt_type = ConfigSelection(choices = modes, default = "siano")
self.createMenu()
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.enabled = ConfigYesNo(default = True)
modes = {"cccam": "CCcam", "oscam": "Oscam"}
self.softcam_type = ConfigSelection(choices = modes, default = "cccam")
self.createMenu()
elif self.index == self.STATE_CHOISE_CACHE:
self.enabled = ConfigYesNo(default = True)
modes = {"multics": "MultiCS"}
self.cache_type = ConfigSelection(choices = modes, default = "multics")
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
elif self.index == self.STATE_CHOISE_PICONS:
self.list.append(getConfigListEntry(_("Install picons"), self.enabled))
#.........这里部分代码省略.........
示例5: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SOFTCAM = 2
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
elif x[1] == 'wlan0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {"default-ventonsupport": "Default Germany", "henksat-19e": "Astra 1", "henksat-23e": "Astra 3", "henksat-19e-23e": "Astra 1 Astra 3", "henksat-19e-23e-28e": "Astra 1 Astra 2 Astra 3", "henksat-13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
self.channellist_type = ConfigSelection(choices = modes, default = "default-ventonsupport")
self.createMenu()
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.enabled = ConfigYesNo(default = True)
modes = {"cccam": _("default") + " (CCcam)", "gbox": "GBox", "wicardd": "Wicardd"}
self.softcam_type = ConfigSelection(choices = modes, default = "cccam")
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.list.append(getConfigListEntry(_("Install softcam"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Softcam type"), self.softcam_type))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
def run(self):
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (updating packages)'), IpkgComponent.CMD_UPDATE)
elif self.index == self.STATE_CHOISE_CHANNELLIST and self.enabled.value:
#.........这里部分代码省略.........
示例6: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
# STATE_CHOISE_SOFTCAM = 2
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
self.ipConfigEntry = ConfigIP(default=[0,
0,
0,
0])
self.interface = 'eth0'
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: ' '}
self.enabled = ConfigSelection(choices=modes, default=0)
self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1' or x[1] == 'wlan0' or x[1] == 'ra0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
self.interface = x[1]
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default=True)
modes = {'default-ventonsupport': 'Default Germany',
'henksat-19e': 'Astra 1',
'henksat-23e': 'Astra 3',
'henksat-19e-23e': 'Astra 1 Astra 3',
'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e')
self.createMenu()
# elif self.index == self.STATE_CHOISE_SOFTCAM:
# self.enabled = ConfigYesNo(default=True)
# modes = {'cccam': _('default') + ' (CCcam)',
# 'gbox': 'GBox',
# 'wicardd': 'Wicardd'}
# self.softcam_type = ConfigSelection(choices=modes, default='cccam')
# self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
self.list = []
try:
test = self.index
except:
return
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(self.interface, 'ip'))
self.list.append(getConfigListEntry(_('Your internet connection is working (ip: %s)') % self.ipConfigEntry.getText(), self.enabled))
else:
self.list.append(getConfigListEntry(_('Your receiver does not have an internet connection'), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_('Install channel list'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Channel list type'), self.channellist_type))
# elif self.index == self.STATE_CHOISE_SOFTCAM:
# self.list.append(getConfigListEntry(_('Install softcam'), self.enabled))
# if self.enabled.value:
# self.list.append(getConfigListEntry(_('Softcam type'), self.softcam_type))
self['config'].list = self.list
self['config'].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
#.........这里部分代码省略.........
示例7: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SOFTCAM = 2
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
self.ipConfigEntry = ConfigIP(default=[0,
0,
0,
0])
self.interface = 'eth0'
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: ' '}
self.enabled = ConfigSelection(choices=modes, default=0)
self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1' or x[1] == 'wlan0' or x[1] == 'ra0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
self.interface = x[1]
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default=True)
modes = {'henksat-19e': 'Astra 1',
'henksat-23e': 'Astra 3',
'henksat-19e-23e': 'Astra 1 Astra 3',
'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e')
self.createMenu()
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.enabled = ConfigYesNo(default=True)
modes = {'oscam': _('default') + ' OSCam',
'cccam': 'CCcam',
'gbox': 'GBox',
'wicardd': 'Wicardd'}
if getBoxType() in 'vusolo4k':
modes = {'oscam': _('default') + ' OSCam'}
self.softcam_type = ConfigSelection(choices=modes, default='oscam')
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
self.list = []
try:
test = self.index
except:
return
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(self.interface, 'ip'))
self.list.append(getConfigListEntry(_('Your internet connection is working (ip: %s)') % self.ipConfigEntry.getText(), self.enabled))
else:
self.list.append(getConfigListEntry(_('Your receiver does not have an internet connection'), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_('Install channel list'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Channel list type'), self.channellist_type))
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.list.append(getConfigListEntry(_('Install softcam'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Softcam type'), self.softcam_type))
self['config'].list = self.list
self['config'].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
#.........这里部分代码省略.........
示例8: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SETTINGPLUGIN = 2
STATE_CHOISE_MULTIBOOTPLUGIN = 3
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: ' '}
self.enabled = ConfigSelection(choices=modes, default=0)
self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default=True)
modes = {'19e': 'Astra 1',
'23e': 'Astra 3',
'19e-23e': 'Astra 1 Astra 3',
'19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
'13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
self.channellist_type = ConfigSelection(choices=modes, default='19e')
self.createMenu()
elif self.index == self.STATE_CHOISE_SETTINGPLUGIN:
self.enabled = ConfigYesNo(default=True)
modes = {'isettinge2': 'iSettingE2',
'cyrussettings': 'Cyrus Setting'}
self.pluginsetting_type = ConfigSelection(choices=modes, default='isettinge2')
self.createMenu()
elif self.index == self.STATE_CHOISE_MULTIBOOTPLUGIN:
self.enabled = ConfigYesNo(default=True)
modes = {'multiboot': 'ItalySat Multiboot',
'openmultiboot': 'OpenMultiboot'}
self.pluginmultiboot_type = ConfigSelection(choices=modes, default='multiboot')
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_('Your internet connection is working (ip: %s)') % self.ipConfigEntry.getText(), self.enabled))
else:
self.list.append(getConfigListEntry(_('Your receiver does not have an internet connection'), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_('Install channel list'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Channel list type'), self.channellist_type))
elif self.index == self.STATE_CHOISE_SETTINGPLUGIN:
self.list.append(getConfigListEntry(_('Install setting plugins'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Plugins type'), self.pluginsetting_type))
elif self.index == self.STATE_CHOISE_MULTIBOOTPLUGIN:
self.list.append(getConfigListEntry(_('Install multiboot plugins'), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_('Plugins type'), self.pluginmultiboot_type))
self['config'].list = self.list
self['config'].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
#.........这里部分代码省略.........
示例9: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
INSTALL_PLUGINS = 2
SCAN = 3
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
self.doNextStep = False
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True, graphic = False)
modes = {"19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL"}
self.channellist_type = ConfigSelection(choices = modes, default = "19e-23e-basis")
self.createMenu()
elif self.index == self.INSTALL_PLUGINS:
self.noplugins = ConfigNothing()
self.doplugins = ConfigNothing()
self.createMenu()
elif self.index == self.SCAN:
self.noscan = ConfigNothing()
self.autoscan = ConfigNothing()
self.manualscan = ConfigNothing()
self.fastscan = ConfigNothing()
self.cablescan = ConfigNothing()
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
elif self.index == self.INSTALL_PLUGINS:
self.list.append(getConfigListEntry(_("No, I do not want to install plugins"), self.noplugins))
self.list.append(getConfigListEntry(_("Yes, I do want to install plugins"), self.doplugins))
elif self.index == self.SCAN:
self.list.append(getConfigListEntry(_("I do not want to perform any service scans"), self.noscan))
self.list.append(getConfigListEntry(_("Do an automatic service scan now"), self.autoscan))
self.list.append(getConfigListEntry(_("Do a manual service scan now"), self.manualscan))
self.list.append(getConfigListEntry(_("Do a fast service scan now"), self.fastscan))
self.list.append(getConfigListEntry(_("Do a cable service scan now"), self.cablescan))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
#.........这里部分代码省略.........
示例10: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SOFTCAM = 2
STATE_RUN_SOFTCAM = 3
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {"19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL"}
self.channellist_type = ConfigSelection(choices = modes, default = "19e-23e-basis")
self.createMenu()
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.enabled = ConfigYesNo(default = True)
modes = {"mgcamd": _("default") + " (MGCamd)", "cccam": "CCam", "scam": "scam"}
self.softcam_type = ConfigSelection(choices = modes, default = "mgcamd")
self.createMenu()
elif self.index == self.STATE_RUN_SOFTCAM:
#OpenMB - dirty CODE
modes = {"mgcamd": " "}
self.softcams = ConfigSelection(choices = modes, default = "mgcamd")
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.list.append(getConfigListEntry(_("Install softcam"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Softcam type"), self.softcam_type))
elif self.index == self.STATE_RUN_SOFTCAM:
self.softcam = CamControl('softcam')
softcams = self.softcam.getList()
for scam in softcams:
self.list.append(getConfigListEntry(_(scam), self.softcams))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
def run(self):
if self.index == self.STATE_UPDATE:
#.........这里部分代码省略.........
示例11: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
if os.path.isfile("/tmp/netwizardselection"):
f = open('/tmp/netwizardselection', 'r')
adapx1 = f.read()
f.close()
adapx1 = adapx1.replace('\n','')
print "adapx1:", adapx1
else:
adapx1 = 'eth0'
print "adapx1+1:", adapx1
for x in self.adapters:
if adapx1 == 'eth0':
if iNetwork.getAdapterAttribute(adapx1, 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
elif adapx1 == 'wlan0':
if iNetwork.getAdapterAttribute(adapx1, 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
elif adapx1 == 'ra0':
if iNetwork.getAdapterAttribute(adapx1, 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
def run(self):
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.run1()
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (updating packages)'), IpkgComponent.CMD_UPDATE)
def run1(self):
#.........这里部分代码省略.........
示例12: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOICE_CHANNELLIST = 1
INSTALL_PLUGINS = 2
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0' or x[1] == 'eth1':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOICE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {
"19e": "Astra 19.2e",
"19e-13e": "Astra 19.2e Hotbird 13.0e",
"kabel-bw": "Kabel BW",
"kabeldeutschland": " Kabel Deutschland",
"unity-media": "Kabel Unitymedia"
}
self.channellist_type = ConfigSelection(choices = modes, default = "19e-13e")
self.createMenu()
# elif self.index == self.STATE_CHOICE_SOFTCAM:
# self.enabled = ConfigYesNo(default = False)
# self.createMenu()
elif self.index == self.INSTALL_PLUGINS:
self.enabled = ConfigYesNo(default = True)
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOICE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
# elif self.index == self.STATE_CHOICE_SOFTCAM:
# self.list.append(getConfigListEntry(_("Install softcam support"), self.enabled))
elif self.index == self.INSTALL_PLUGINS:
self.list.append(getConfigListEntry(_("Do you want to install plugins"), self.enabled))
self["config"].list = self.list
self["config"].l.setList(self.list)
def keyLeft(self):
if self.index == 0:
return
ConfigListScreen.keyLeft(self)
self.createMenu()
def keyRight(self):
if self.index == 0:
return
ConfigListScreen.keyRight(self)
self.createMenu()
def run(self):
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (updating packages)'), IpkgComponent.CMD_UPDATE)
elif self.index == self.STATE_CHOICE_CHANNELLIST and self.enabled.value:
self.session.open(InstallWizardIpkgUpdater, self.index, _('Please wait (downloading channel list)'), IpkgComponent.CMD_REMOVE, {'package': 'enigma2-plugin-settings-gigablue-' + self.channellist_type.value})
#.........这里部分代码省略.........
示例13: InstallWizard
# 需要导入模块: from Components.config import ConfigIP [as 别名]
# 或者: from Components.config.ConfigIP import getText [as 别名]
class InstallWizard(Screen, ConfigListScreen):
STATE_UPDATE = 0
STATE_CHOISE_CHANNELLIST = 1
STATE_CHOISE_SOFTCAM = 4
STATE_CHOISE_PICONS = 2
STATE_CHOISE_MBOOT = 3
STATE_CHOISE_CARDSERVER = 5
STATE_CHOISE_HBBTV = 6
def __init__(self, session, args = None):
Screen.__init__(self, session)
self.index = args
self.list = []
ConfigListScreen.__init__(self, self.list)
if self.index == self.STATE_UPDATE:
config.misc.installwizard.hasnetwork.value = False
config.misc.installwizard.ipkgloaded.value = False
modes = {0: " "}
self.enabled = ConfigSelection(choices = modes, default = 0)
self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
is_found = False
for x in self.adapters:
if x[1] == 'eth0':
if iNetwork.getAdapterAttribute(x[1], 'up'):
self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
iNetwork.checkNetworkState(self.checkNetworkCB)
if_found = True
else:
iNetwork.restartNetwork(self.checkNetworkLinkCB)
break
if is_found is False:
self.createMenu()
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.enabled = ConfigYesNo(default = True)
modes = {"sfteam": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
self.channellist_type = ConfigSelection(choices = modes, default = "sfteam")
self.createMenu()
elif self.index == self.STATE_CHOISE_PICONS:
self.enabled = ConfigYesNo(default = True)
modes = {"220x132.black-white": "Astra 19e - Black White 220x132", "220x132.white-black": "Astra 19e - White Black 220x132", "220x132.blue-black": "Astra 19e - Blue Black 220x132", "220x132.reflection-black": "Astra 19e - Reflection Black 220x132", "220x132.transparent-black": "Astra 19e - Transparent Black 220x132", "220x132.transparent-white": "Astra 19e - Transparent White 220x132"}
self.picons_type = ConfigSelection(choices = modes, default = "220x132.black-white")
self.createMenu()
elif self.index == self.STATE_CHOISE_SOFTCAM:
self.enabled = ConfigYesNo(default = True)
modes = {"cccam230": "CCcam 2.3.0", "cccam221": "CCcam 2.2.1","cccam214": "CCcam 2.1.4","mgcamd": "MGcamd 1.30d","evocamd": "Evocamd 2.1.7","rqcamd": "RQcamd 1.3.1","scam": "Scam 3.5.3",}
self.softcam_type = ConfigSelection(choices = modes, default = "cccam230")
self.createMenu()
elif self.index == self.STATE_CHOISE_CARDSERVER:
self.enabled = ConfigYesNo(default = True)
modes = {"oscam": "OScam","newcs167": "NewCS 1.6.7"}
self.cardserver_type = ConfigSelection(choices = modes, default = "oscam")
self.createMenu()
elif self.index == self.STATE_CHOISE_MBOOT:
self.enabled = ConfigYesNo(default = True)
modes = {"openmultiboot": "OpenMultiBoot"}
self.cache_type = ConfigSelection(choices = modes, default = "openmultiboot")
self.createMenu()
elif self.index == self.STATE_CHOISE_HBBTV:
self.enabled = ConfigYesNo(default = True)
modes = {"browser": "Install"}
self.hbbtv_type = ConfigSelection(choices = modes, default = "browser")
self.createMenu()
def checkNetworkCB(self, data):
if data < 3:
config.misc.installwizard.hasnetwork.value = True
self.createMenu()
def checkNetworkLinkCB(self, retval):
if retval:
iNetwork.checkNetworkState(self.checkNetworkCB)
else:
self.createMenu()
def createMenu(self):
try:
test = self.index
except:
return
self.list = []
if self.index == self.STATE_UPDATE:
if config.misc.installwizard.hasnetwork.value:
self.list.append(getConfigListEntry(_("Your internet connection is working (ip: %s)") % (self.ipConfigEntry.getText()), self.enabled))
else:
self.list.append(getConfigListEntry(_("Your receiver does not have an internet connection"), self.enabled))
elif self.index == self.STATE_CHOISE_CHANNELLIST:
self.list.append(getConfigListEntry(_("Install channel list"), self.enabled))
if self.enabled.value:
self.list.append(getConfigListEntry(_("Channel list type"), self.channellist_type))
elif self.index == self.STATE_CHOISE_PICONS:
self.list.append(getConfigListEntry(_("Install picons"), self.enabled))
#.........这里部分代码省略.........