当前位置: 首页>>代码示例>>Python>>正文


Python ConfigList.ConfigList类代码示例

本文整理汇总了Python中Components.ConfigList.ConfigList的典型用法代码示例。如果您正苦于以下问题:Python ConfigList类的具体用法?Python ConfigList怎么用?Python ConfigList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ConfigList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					if  state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:Openeight,项目名称:enigma2,代码行数:34,代码来源:Ci.py

示例2: __init__

	def __init__(self, session):
		self.skin = Volume_adjust.skin
		Screen.__init__(self, session)
		# Path of the config file
		self.filename="/etc/volume.xml"
		global offset
		offset = 0
		self["key_red"] = StaticText(_("delete"))
		self["key_green"] = StaticText(_("add Service"))
		self["key_yellow"] = StaticText(_("change"))
		self["key_blue"] = StaticText(_("add Current"))
		self["press_menu"] = StaticText(_("press the menu button to set a general AC3/Dolby offset"))
		self["ServiceList.desc"] = Label(_("Channel \t\t\tVolume +"))

		self["actions"] = ActionMap(["ColorActions","OkCancelActions","MenuActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"blue": self.bluePressed,
				"menu": self.config_menu,
				"ok": self.okPressed,
				"cancel": self.cancel
			}, -1)

		self.servicelist = []
		self.read_volume=[]
		serviceList = ConfigList(self.servicelist)
		serviceList.list = self.servicelist
		serviceList.l.setList(self.servicelist)
		self["ServiceList"] = serviceList

		self.loadXML() # load the config file
		self.onShown.append(self.setWindowTitle)
开发者ID:OUARGLA86,项目名称:enigma2,代码行数:34,代码来源:plugin.py

示例3: __init__

	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
开发者ID:Anubisko,项目名称:enigma2,代码行数:26,代码来源:Ci.py

示例4: __init__

    def __init__(self, session, ci_slot="9"):

        Screen.__init__(self, session)
        self.ci_slot = ci_slot
        self.filename = "/etc/enigma2/ci" + str(self.ci_slot) + ".xml"

        self["key_red"] = StaticText(_("Delete"))
        self["key_green"] = StaticText(_("add Service"))
        self["key_yellow"] = StaticText(_("add Provider"))
        self["key_blue"] = StaticText(_("select CAId"))
        self["CAidList_desc"] = StaticText(_("assigned CAIds:"))
        self["CAidList"] = StaticText()
        self["ServiceList_desc"] = StaticText(_("assigned Services/Provider:"))
        self["ServiceList_info"] = StaticText()

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"],
            {
                "green": self.greenPressed,
                "red": self.redPressed,
                "yellow": self.yellowPressed,
                "blue": self.bluePressed,
                "cancel": self.cancel,
            },
            -1,
        )

        print "[CI_Wizzard_Config] Configuring CI Slots : %d  " % self.ci_slot

        i = 0
        self.caidlist = []
        print eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot)
        for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
            i += 1
            self.caidlist.append((str(hex(int(caid))), str(caid), i))

        print "[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s" % (self.ci_slot, self.caidlist)

        self.selectedcaid = []
        self.servicelist = []
        self.caids = ""

        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self["ServiceList"] = serviceList

        self.loadXML()
        # if config mode !=advanced autoselect any caid
        if config.usage.setup_level.index <= 1:  # advanced
            self.selectedcaid = self.caidlist
            self.finishedCAidSelection(self.selectedcaid)
        self.onShown.append(self.setWindowTitle)
开发者ID:kakunbsc,项目名称:enigma2.4,代码行数:53,代码来源:plugin.py

示例5: __init__

	def __init__(self, session, args = 0):
		self.skin = CIselectMainMenu.skin
		Screen.__init__(self, session)
		#--->
		#---<
		#+++>
		appname = ""
		#+++<	
		
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Config"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"ok": self.greenPressed,
				"cancel": self.cancel
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				#--->
				#-if state == 0:
				#---<
				#+++>
				if state == 0 or state == -1:
				#+++<	
					appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
				elif state == 1:	
					appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
				elif state == 2:
					appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
				self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:TitanNit,项目名称:tdt,代码行数:51,代码来源:plugin.py

示例6: __init__

    def __init__(self, session):
        Screen.__init__(self, session)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions", "CiSelectionActions"],
            {
                "left": self.keyLeft,
                "right": self.keyRight,
                "cancel": self.cancel,
                "green": self.reset_both,
                "yellow": self.reset_sc,
                "red": self.cancel,
                "blue": self.download,
            },
            -1,
        )

        self.list = []

        self.softcam = CamConfig("emu")
        self.cardserver = SrvConfig("crdsrv")

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["info"] = Label("")
        self["ecmtext"] = Label("")
        self.ecm()
        self.service()
        self.onShown.append(self.openTest)
        self.mytimer = eTimer()
        self.mytimer.callback.append(self.ecm)
        self.mytimer.start(1000)

        softcams = [_("None")] + self.softcam.getList()
        cardservers = [_("None")] + self.cardserver.getList()

        self.softcams = ConfigSelection(choices=softcams)
        self.softcams.value = self.softcam.current() or _("None")
        self.cardservers = ConfigSelection(choices=cardservers)
        self.cardservers.value = self.cardserver.current() or _("None")

        self.list.append(getConfigListEntry(_("Select Cam:"), self.softcams))
        self.list.append(getConfigListEntry(_("Select Cardserver:"), self.cardservers))

        self["key_red"] = Label(_("Cancel"))
        self["key_yellow"] = Label(_("Start"))
        self["key_green"] = Label(_("Restart"))
        self["key_blue"] = Label(_("Download"))
开发者ID:pelavo,项目名称:Softcam-Panel,代码行数:50,代码来源:plugin.py

示例7: __init__

	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Edit"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.close,
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		if getBoxType() in ('zgemmah9combo'):
			NUM_CI = 1
		else:
			NUM_CI = eDVBCIInterfaces.getInstance() and eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if  NUM_CI and NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					appname = _("Slot %d") %(slot+1) + " - " + _("unknown error")
					if state == 0:
						appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
					elif state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")

					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )
		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:openhdf,项目名称:enigma2,代码行数:45,代码来源:plugin.py

示例8: __init__

	def __init__(self, session):
		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyRight,
				"cancel": self.cancel,
				"ok": self.ok,
				"green": self.save,
				"red": self.cancel,
				"blue": self.blue,
			},-1)

		self.list = [ ]

		self.softcam = CamControl('softcam')
		self.cardserver = CamControl('cardserver')

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList

		softcams = self.softcam.getList()
		cardservers = self.cardserver.getList()

		self.softcams = ConfigSelection(choices = softcams)
		self.softcams.value = self.softcam.current()

		self.list.append(getConfigListEntry(_("Select Softcam"), self.softcams))
		if cardservers:
			self.cardservers = ConfigSelection(choices = cardservers)
			self.cardservers.value = self.cardserver.current()
			self.list.append(getConfigListEntry(_("Select Card Server"), self.cardservers))

		self.list.append(getConfigListEntry(_("Restart softcam"), ConfigAction(self.restart, "s")))
		if cardservers:
			self.list.append(getConfigListEntry(_("Restart cardserver"), ConfigAction(self.restart, "c")))
			self.list.append(getConfigListEntry(_("Restart both"), ConfigAction(self.restart, "sc")))

		self["key_red"] = Label(_("Cancel"))
		self["key_green"] = Label(_("OK"))
		self["key_blue"] = Label(_("ECM Info's"))
开发者ID:henrylicious,项目名称:test,代码行数:44,代码来源:Sc.py

示例9: __init__

	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		screentitle = _("Common interface")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)

		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.layoutFinished)
开发者ID:rimasx,项目名称:enigma2,代码行数:40,代码来源:Ci.py

示例10: __init__

    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('Common Interface'))
        self['actions'] = ActionMap(['OkCancelActions', 'CiSelectionActions'], {'left': self.keyLeft,
         'right': self.keyLeft,
         'ok': self.okbuttonClick,
         'cancel': self.cancel}, -1)
        self.dlg = None
        self.state = {}
        self.list = []
        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['entries'] = menuList
        self['entries'].onSelectionChanged.append(self.selectionChanged)
        self['text'] = Label(_('Slot %d') % 1)
开发者ID:sodo13,项目名称:EG-gui,代码行数:22,代码来源:Ci.py

示例11: __init__

    def __init__(self, session, args = 0):
        Screen.__init__(self, session)
        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Edit'))
        self['actions'] = ActionMap(['ColorActions', 'SetupActions'], {'green': self.greenPressed,
         'red': self.close,
         'ok': self.greenPressed,
         'cancel': self.close}, -1)
        NUM_CI = eDVBCIInterfaces.getInstance().getNumOfSlots()
        print '[CI_Wizzard] FOUND %d CI Slots ' % NUM_CI
        self.dlg = None
        self.state = {}
        self.list = []
        if NUM_CI > 0:
            for slot in range(NUM_CI):
                state = eDVBCI_UI.getInstance().getState(slot)
                if state == 0:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('no module found')
                elif state == 1:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('init modules')
                elif state == 2:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + eDVBCI_UI.getInstance().getAppName(slot)
                else:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + 'Unknown state %d' % state
                self.list.append((appname,
                 ConfigNothing(),
                 0,
                 slot))

        else:
            self.list.append((_('no CI slots found'),
             ConfigNothing(),
             1,
             -1))
        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['CiList'] = menuList
        self.onShown.append(self.setWindowTitle)
开发者ID:kingvuplus,项目名称:ZDE-gui,代码行数:39,代码来源:plugin.py

示例12: __init__

	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Common Interface"))
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.slots = []
		self.HighBitrateEntry = {}
		self.RelevantPidsRoutingEntry = {}
		self.entryData = []

		self.list = [ ]
		self["entries"] = ConfigList(self.list)
		self["entries"].list = self.list
		self["entries"].l.setList(self.list)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.initialUpdate)
开发者ID:openhdf,项目名称:enigma2,代码行数:24,代码来源:Ci.py

示例13: __init__

	def __init__(self, session, currentTitle, currentUrl, menulist = None):
		Screen.__init__(self, session)

		self.currentUrl = currentUrl
		self.currentTitle = currentTitle

		#Menu
		if menulist is None:
			self.menu = MenuList([
						(_("Bookmarks"), self.MENU_BOOKMARKS),
						(_("History"), self.MENU_HISTORY),
						(_("Downloads"), self.MENU_DOWNLOADS),
						(_("Certificates"), self.MENU_CERTS),
						(_("Cookies"), self.MENU_COOKIES),
						(_("Settings"), self.MENU_SETTINGS),
				], enableWrapAround = True)
		else:
			self.menu = MenuList(menulist, enableWrapAround=True)
		self["menu"] = self.menu

		self["statuslabel"] = Label("")
		self["statuslabel"].hide()

		#Color Buttons
		self["button_red"] = Boolean(False)
		self["button_green"] = Boolean(False)
		self["button_yellow"] = Boolean(False)
		self["button_blue"] = Boolean(False)
		self.red = Label("")
		self.green = Label("")
		self.yellow = Label("")
		self.blue = Label("")
		self["red"] = self.red
		self["green"] = self.green
		self["yellow"] = self.yellow
		self["blue"] = self.blue

		#Lists
		self.detailList = List([], enableWrapAround = True)
		self.detailConfigList = ConfigList([])
		self.detailConfigList.l.setSeperation( (BrowserMenu.width - 210) / 2 )
		config.plugins.WebBrowser.storage.enabled.addNotifier(self.__cfgExpandableElementChanged, initial_call = False)
		config.plugins.WebBrowser.storage.enabled.addNotifier(self.__cfgStoragePathChanged, initial_call = False)
		config.plugins.WebBrowser.storage.path.addNotifier(self.__cfgStoragePathChanged, initial_call = False)

		self.detailInput = EnhancedInput()

		self["list"] = self.detailList
		self["config"] = self.detailConfigList
		self["input"] = self.detailInput
		self["line"] = CanvasSource()

		self.__cfgCreateSetup()

		self.__db = BrowserDB.getInstance()
		self.__curMenu = self.MENU_BOOKMARKS
		self.__bmList = None
		self.__hisList = None
		self.__crtList = None
		self.__ckList = None
		self.__bmNeedle = ""
		self.__bmFilterTimer = eTimer()
		self.__bmFilterTimer_conn = self.__bmFilterTimer.timeout.connect(self.__bmFilterCB)
		self.__hisNeedle = ""
		self.__hisFilterTimer = eTimer()
		self.__hisFilterTimer_conn = self.__hisFilterTimer.timeout.connect(self.__hisFilterCB)
		self.__dlRefreshTimer = eTimer()
		self.__dlRefreshTimer_conn = self.__dlRefreshTimer.timeout.connect(self.__dlBuildList)
		self.__statusTimer = eTimer()
		self.__statusTimer_conn = self.__statusTimer.timeout.connect(self.__hideStatus)
		self.__actions = []

		self.onFirstExecBegin.append(self.__drawSeparator)
		self.onFirstExecBegin.append(self.__onMenuChanged)
		self.onExecBegin.append(self.__reloadData)
		self.onShow.append(self.setKeyboardModeAscii)

		self["actions"] = ActionMap(["BrowserActions", "ColorActions"],
		{
			"ok" : self.__actionOk,
			"enter" : self.__actionOk,
			"exit" : self.__actionExit,
			"pageUp" : self.__actionMenuUp,
			"pageDown" : self.__actionMenuDown,
			"up" : boundFunction(self.__action, "up"),
			"down" : boundFunction(self.__action, "down"),
			"left" : boundFunction(self.__action, "left"),
			"right" : boundFunction(self.__action, "right"),
			"red" : boundFunction(self.__action, "red"),
			"green" : boundFunction(self.__action, "green"),
			"yellow" : boundFunction(self.__action, "yellow"),
			"blue" : boundFunction(self.__action, "blue"),
			"backspace" : boundFunction(self.__action, "backspace"),
			"delete" : boundFunction(self.__action, "delete"),
			"ascii": boundFunction(self.__action, "ascii"),
			# TODO "text" : self.__text
		}, -2)

		self["numberactions"] = NumberActionMap(["NumberActions"],
		{
#.........这里部分代码省略.........
开发者ID:aitchala,项目名称:enigma2,代码行数:101,代码来源:BrowserMenu.py

示例14: postWidgetCreate

 def postWidgetCreate(self, instance):
     if not self.enabled:
         instance.setSelectionEnable(False)
     ConfigList.postWidgetCreate(self, instance)
开发者ID:VytenisP,项目名称:subssupport,代码行数:4,代码来源:e2_utils.py

示例15: selectionChanged

 def selectionChanged(self):
     if self.enabled:
         return ConfigList.selectionChanged(self)
开发者ID:VytenisP,项目名称:subssupport,代码行数:3,代码来源:e2_utils.py


注:本文中的Components.ConfigList.ConfigList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。