示例#1
0
    def __init__(self, session):
        Screen.__init__(self, session)

        # Buttons
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("New"))
        self["key_blue"] = StaticText(_("Delete"))

        # Summary
        self.setup_title = "Growlee Configuration"
        self.onChangedEntry = []

        # Define Actions
        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions"],
            {"blue": self.delete, "yellow": self.new, "cancel": self.keyCancel, "save": self.keySave},
        )

        self.hostElement = NoSave(ConfigSelection(choices=[(x, x.name.value) for x in config.plugins.growlee.hosts]))
        self.hostElement.addNotifier(self.setupList, initial_call=False)
        ConfigListScreen.__init__(self, [], session=session, on_change=self.changed)
        self.cur = self.hostElement.value

        # Trigger change
        self.setupList()
        self.changed()
示例#2
0
	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		self.skinName = "Setup"
		self.menu_path = menu_path
		self["menu_path_compressed"] = StaticText()
		self['footnote'] = Label()
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["description"] = Label(_(""))

		self.onChangedEntry = [ ]
		self.setup = "recording"
		list = []
		ConfigListScreen.__init__(self, list, session = session, on_change = self.changedEntry)
		self.createSetup()

		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel,
			"ok": self.ok,
			"menu": self.closeRecursive,
		}, -2)
		self.onLayoutFinish.append(self.layoutFinished)
示例#3
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.session = session
		self.setup_title = _("AutoBouquetsMaker Configure")
		Screen.setTitle(self, self.setup_title)

		self.onChangedEntry = [ ]
		self.list = []
		ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry)

		self.activityTimer = eTimer()
		self.activityTimer.timeout.get().append(self.prepare)

		self["actions"] = ActionMap(["SetupActions", 'ColorActions', 'VirtualKeyboardActions', "MenuActions"],
		{
			"ok": self.keySave,
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"menu": self.keyCancel,
		}, -2)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))
		self["description"] = Label(_(""))
		self["pleasewait"] = Label()

		self.onLayoutFinish.append(self.populate)
示例#4
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
			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()
示例#5
0
	def __init__(self, session, slotid):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Tuner settings"))
		self.list = [ ]

		ServiceStopScreen.__init__(self)
		self.stopService()

		ConfigListScreen.__init__(self, self.list)

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

		self["actions"] = ActionMap(["SetupActions", "SatlistShortcutAction", "ColorActions"],
		{
			"ok": self.keySave,
			"cancel": self.keyCancel,
			"nothingconnected": self.nothingConnectedShortcut,
			"red": self.keyCancel,
			"green": self.keySave,
		}, -2)

		self.slotid = slotid
		self.nim = nimmanager.nim_slots[slotid]
		self.nimConfig = self.nim.config
		self.createConfigMode()
		self.createSetup()
示例#6
0
	def __init__(self, session, project = None):
		Screen.__init__(self, session)
		self.project = project
		
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["key_yellow"] = StaticText(_("Load"))
		if config.usage.setup_level.index >= 2: # expert+
			self["key_blue"] = StaticText(_("Save"))
		else:
			self["key_blue"] = StaticText()
		
		if config.usage.setup_level.index >= 2: # expert+
			infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
		else:
			infotext = ""
		self["info"] = StaticText(infotext)

		self.keydict = {}
		self.settings = project.settings
		ConfigListScreen.__init__(self, [])
		self.initConfigList()
		
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
		    "green": self.exit,
		    "red": self.cancel,
		    "blue": self.saveProject,
		    "yellow": self.loadProject,
		    "cancel": self.cancel,
		    "ok": self.ok,
		}, -2)
		self.onLayoutFinish.append(self.layoutFinished)
示例#7
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self.finished_cb = None
		self.updateSatList()
		self.service = session.nav.getCurrentService()
		self.feinfo = None
		self.networkid = 0
		frontendData = None
		if self.service is not None:
			self.feinfo = self.service.frontendInfo()
			frontendData = self.feinfo and self.feinfo.getAll(True)
		
		self.createConfig(frontendData)

		del self.feinfo
		del self.service

		self["actions"] = NumberActionMap(["SetupActions"],
		{
			"ok": self.keyGo,
			"cancel": self.keyCancel,
		}, -2)

		self.statusTimer = eTimer()
		self.statusTimer.callback.append(self.updateStatus)
		#self.statusTimer.start(5000, True)

		self.list = []
		ConfigListScreen.__init__(self, self.list)
		if not self.scan_nims.value == "":
			self.createSetup()
			self["introduction"] = Label(_("Press OK to start the scan"))
		else:
			self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
示例#8
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setup_title = _("Blind scan for dreambox DVB-S2 tuners")
		Screen.setTitle(self, _(self.setup_title))
		self.updateSatList()
		self.service = session.nav.getCurrentService()
		self.feinfo = None
		frontendData = None
		if self.service is not None:
			self.feinfo = self.service.frontendInfo()
			frontendData = self.feinfo and self.feinfo.getAll(True)
		self.createConfig(frontendData)
		del self.feinfo
		del self.service
		try:
			self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceOrGroup()
		except:
			self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceReference()

		self["actions"] = NumberActionMap(["SetupActions"],
		{
			"ok": self.keyGo,
			"cancel": self.keyCancel,
		}, -2)

		self.list = []
		ConfigListScreen.__init__(self, self.list)
		if not self.scan_nims.value == "":
			self.createSetup()
			self["introduction"] = Label(_("Press OK to start the scan"))
		else:
			self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
示例#9
0
	def __init__(self, session, timerinstance):
		self.session = session
		self.list = []
		self.timerinstance = timerinstance
		self.remotetimer_old = config.ipboxclient.remotetimers.value
		
		Screen.__init__(self, session)
		ConfigListScreen.__init__(self, self.list)
		
		self.setTitle(_('IPTV Client'))
		
		self["VKeyIcon"] = Boolean(False)
		self["text"] = StaticText(_('NOTE: the remote HDD feature require samba installed on server box.'))
		self["key_red"] = Button(_('Cancel'))
		self["key_green"] = Button(_('Save'))
		self["key_yellow"] = Button(_('Scan'))
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow": self.keyScan
		}, -2)
		
		self.populateMenu()
		
		if not config.ipboxclient.firstconf.value:
			self.timer = eTimer()
			self.timer.callback.append(self.scanAsk)
			self.timer.start(100)
示例#10
0
	def __init__(self, session, slotid):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Tuner settings"))
		self.list = [ ]
		ServiceStopScreen.__init__(self)
		self.stopService()
		ConfigListScreen.__init__(self, self.list)

		self["key_red"] = Label(_("Close"))
		self["key_green"] = Label(_("Save"))
		self["key_yellow"] = Label(_("Configuration mode"))
		self["key_blue"] = Label()

		self["actions"] = ActionMap(["SetupActions", "SatlistShortcutAction", "ColorActions"],
		{
			"ok": self.keyOk,
			"save": self.keySave,
			"cancel": self.keyCancel,
			"changetype": self.changeConfigurationMode,
			"nothingconnected": self.nothingConnectedShortcut,
			"red": self.keyCancel,
			"green": self.keySave,
		}, -2)

		self.slotid = slotid
		self.nim = nimmanager.nim_slots[slotid]
		self.nimConfig = self.nim.config
		self.createConfigMode()
		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
示例#11
0
	def __init__(self, session):
		Screen.__init__(self, session)
		# for the skin: first try VideoSetup, then Setup, this allows individual skinning
		self.skinName = ["VideoSetup", "Setup" ]
		self.setup_title = _("Video settings")
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)
		self['footnote'] = Label()

		self.hw = iAVSwitch
		self.onChangedEntry = [ ]

		# handle hotplug by re-creating setup
		self.onShow.append(self.startHotplug)
		self.onHide.append(self.stopHotplug)

		self.list = [ ]
		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)

		from Components.ActionMap import ActionMap
		self["actions"] = ActionMap(["SetupActions", "MenuActions", "ColorActions"],
			{
				"cancel": self.keyCancel,
				"save": self.apply,
				"menu": self.closeRecursive,
			}, -2)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["description"] = Label("")

		self.createSetup()
		self.grabLastGoodMode()
		self.onLayoutFinish.append(self.layoutFinished)
示例#12
0
	def __init__(self, session, args = 0):
		self.session = session
		Screen.__init__(self, session)

		self.list = []
		self.list.append(getConfigListEntry(_("NAS/Server Name or IP"), config.plugins.elektro.NASname))
		self.list.append(getConfigListEntry(_("Username"), config.plugins.elektro.NASuser))
		self.list.append(getConfigListEntry(_("Password"), config.plugins.elektro.NASpass))
		self.list.append(getConfigListEntry(_("Command [poweroff, shutdown -h,...]"), config.plugins.elektro.NAScommand))
		self.list.append(getConfigListEntry(_("Telnet Port"), config.plugins.elektro.NASport))
		self.list.append(getConfigListEntry(_("Waiting until poweroff"), config.plugins.elektro.NASwait))

		ConfigListScreen.__init__(self, self.list)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Ok"))
		self["key_yellow"] = Button(_("Run"))
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"yellow": self.run,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self.save,
		}, -2)
示例#13
0
文件: Ci.py 项目: OpenLD/enigma2
	def __init__(self, session, pin, pin_slot):
		Screen.__init__(self, session)
		self.skinName = ["ParentalControlChangePin", "Setup" ]
		self.setup_title = _("Enter pin code")
		self.onChangedEntry = [ ]

		self.slot = pin_slot
		self.pin = pin
		self.list = []
		self.pin1 = ConfigPIN(default = 0, censor = "*")
		self.pin2 = ConfigPIN(default = 0, censor = "*")
		self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1))
		self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2))
		self.list.append(getConfigListEntry(_("Enter PIN"), NoSave(self.pin1)))
		self.list.append(getConfigListEntry(_("Reenter PIN"), NoSave(self.pin2)))
		ConfigListScreen.__init__(self, self.list)

		self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions"],
		{
			"cancel": self.cancel,
			"red": self.cancel,
			"save": self.keyOK,
		}, -1)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self.onLayoutFinish.append(self.layoutFinished)
示例#14
0
文件: Ci.py 项目: OpenLD/enigma2
	def __init__(self, session):
		Screen.__init__(self, session)
		self.skinName = ["Setup" ]
		self.setup_title = _("CI settings")
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)
		self['footnote'] = Label()

		self.onChangedEntry = [ ]

		self.list = [ ]
		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)

		from Components.ActionMap import ActionMap
		self["actions"] = ActionMap(["SetupActions", "MenuActions", "ColorActions"],
			{
				"cancel": self.keyCancel,
				"save": self.apply,
				"menu": self.closeRecursive,
			}, -2)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["description"] = Label("")

		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
示例#15
0
    def __init__(self, session, pin, pinname):
        Screen.__init__(self, session)
        # for the skin: first try ParentalControlChangePin, then Setup, this allows individual skinning
        self.skinName = ["ParentalControlChangePin", "Setup"]
        self.setup_title = _("Change pin code")
        self.onChangedEntry = []

        self.pin = pin
        self.list = []
        self.pin1 = ConfigPIN(default=1111, censor="*")
        self.pin2 = ConfigPIN(default=1112, censor="*")
        self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1))
        self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2))
        self.list.append(getConfigListEntry(_("New PIN"), NoSave(self.pin1)))
        self.list.append(getConfigListEntry(_("Reenter new PIN"), NoSave(self.pin2)))
        ConfigListScreen.__init__(self, self.list)
        # 		print "old pin:", pin
        # if pin.value != "aaaa":
        # self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.pin.value], title = _("please enter the old pin"), windowTitle = _("Change pin code")))
        ProtectedScreen.__init__(self)

        self["actions"] = NumberActionMap(
            ["DirectionActions", "ColorActions", "OkCancelActions"],
            {"cancel": self.cancel, "red": self.cancel, "save": self.keyOK},
            -1,
        )
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self.onLayoutFinish.append(self.layoutFinished)
示例#16
0
	def __init__(self, session, timer):
		Screen.__init__(self, session)
		self.timer = timer

		self.entryDate = None
		self.entryService = None

		self["oktext"] = Label(_("OK"))
		self["canceltext"] = Label(_("Cancel"))
		self["ok"] = Pixmap()
		self["cancel"] = Pixmap()
		self["key_yellow"] = Label(_("Timer type"))
		self["key_blue"] = Label()

		self.createConfig()

		self["actions"] = NumberActionMap(["SetupActions", "GlobalActions", "PiPSetupActions", "ColorActions"],
		{
			"ok": self.keySelect,
			"save": self.keyGo,
			"cancel": self.keyCancel,
			"volumeUp": self.incrementStart,
			"volumeDown": self.decrementStart,
			"size+": self.incrementEnd,
			"size-": self.decrementEnd,
			"yellow": self.changeTimerType,
			"blue": self.changeZapWakeupType
		}, -2)

		self.list = []
		ConfigListScreen.__init__(self, self.list, session = session)
		self.setTitle(_("Timer entry"))
		self.createSetup("config")
示例#17
0
	def __init__(self, session, args = 0):
		self.session = session
		Screen.__init__(self, session)

		self.list = []

		for i in range(7):
			self.list.append(getConfigListEntry(" 1. " + weekdays[i] + ": "  + _("Wakeup"), config.plugins.elektro.wakeup[i]))
			self.list.append(getConfigListEntry(" 1. " + weekdays[i] + ": "  + _("Sleep"), config.plugins.elektro.sleep[i]))
		self.list.append(getConfigListEntry(" 1. " + _("Next day starts at"), config.plugins.elektro.nextday,
			_("If the box is supposed to enter deep standby e.g. monday night at 1 AM, it actually is already tuesday. To enable this anyway, differing next day start time can be specified here.")))
		for i in range(7):
			self.list.append(getConfigListEntry(" 2. " + weekdays[i] + ": "  + _("Wakeup"), config.plugins.elektro.wakeup2[i]))
			self.list.append(getConfigListEntry(" 2. " + weekdays[i] + ": "  + _("Sleep"), config.plugins.elektro.sleep2[i]))
		self.list.append(getConfigListEntry(" 2. " + _("Next day starts at"), config.plugins.elektro.nextday2,
			_("If the box is supposed to enter deep standby e.g. monday night at 1 AM, it actually is already tuesday. To enable this anyway, differing next day start time can be specified here.")))

		ConfigListScreen.__init__(self, self.list)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Ok"))
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self.save,
		}, -2)
示例#18
0
文件: plugin.py 项目: timoRo/easy-gui
 def __init__(self, session):
     self.session = session
     Screen.__init__(self, session)
     self["instructions"] = Label(self._instructions)
     self["description"] = Label()
     self["HelpWindow"] = Label()
     self["key_red"] = Label(_("Cancel"))
     self["key_green"] = Label(_("Save"))
     self["key_yellow"] = Label()
     self["key_blue"] = Label(_("Keyboard"))
     self["VKeyIcon"] = Pixmap()
     self.list = [
          getConfigListEntry(self._email, config.plugins.icetv.member.email_address,
                             _("Your email address is used to login to IceTV services.")),
          getConfigListEntry(self._password, config.plugins.icetv.member.password,
                             _("Your password must have at least 5 characters.")),
          getConfigListEntry(self._label, config.plugins.icetv.device.label,
                             _("Choose a label that will identify this device within IceTV services.")),
          getConfigListEntry(self._update_interval, config.plugins.icetv.refresh_interval,
                             _("Choose how often to connect to IceTV server to check for updates.")),
     ]
     ConfigListScreen.__init__(self, self.list, session)
     self["InusActions"] = ActionMap(contexts=["SetupActions", "ColorActions"],
                                     actions={
                                          "cancel": self.cancel,
                                          "red": self.cancel,
                                          "green": self.save,
                                          "blue": self.keyboard,
                                          "ok": self.keyboard,
                                      }, prio=-2)
示例#19
0
	def __init__(self, session, args=None):
		Screen.__init__(self, session)
		#Summary
		self.setup_title = _("AspectRatioSwitch Setup")
		
		self.list = []
		self.list.append(getConfigListEntry(_("Quick switching via remote control"), config.plugins.AspectRatioSwitch.enabled))
		self.list.append(getConfigListEntry(_("Key mapping"), config.plugins.AspectRatioSwitch.keymap))
		self.list.append(getConfigListEntry(_("Show switch message"), config.plugins.AspectRatioSwitch.showmsg))
		for aspect in ASPECT:
			self.list.append(getConfigListEntry(_("Include %s") % ASPECTMSG[aspect], config.plugins.AspectRatioSwitch.modes[aspect]))
		self.list.append(getConfigListEntry(_("Set aspect ratio on startup"), config.plugins.AspectRatioSwitch.autostart_ratio_enabled))
		self.list.append(getConfigListEntry(_("Startup aspect ratio"), config.plugins.AspectRatioSwitch.autostart_ratio))
		self.list.append(getConfigListEntry(_('Show Setup in'), config.plugins.AspectRatioSwitch.menu,))
		
		ConfigListScreen.__init__(self, self.list)		

		# Initialize Buttons
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))		
		self["label"] = Label(_("Use the configured key(s) on your remote control to switch aspect ratio modes. If any 'Quickbutton' actions were assigned to these keys, they will be disabled as long as this plugin is activated!"))

		# Define Actions
		self["actions"] = ActionMap(["SetupActions"],
		{
			"save": self.save,
			"ok": self.save,
			"cancel": self.keyCancel
		}, -2)

		self.onLayoutFinish.append(self.setCustomTitle)
	def __init__(self, session, plugin_path):
		self.skin_path = plugin_path
		Screen.__init__(self, session)

		self.list = [ ]
		self.onChangedEntry = [ ]
		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedClockEntry)

		self.setup_title = _("Setup AnalogClock colors")
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.keyCancel,
				"red": self.keyCancel,
				"green": self.keySave,
				"ok": self.keySave,
			}, -2)

		self["key_green"] = Label(_("Ok"))
		self["key_red"] = Label(_("Cancel"))
		self["version"] = Label("v%s" % VERSION)

		cfg.background.value[0] = int(cfg.transparency.value)
		self.background = _("Background (a,r,g,b)")
		self.list.append(getConfigListEntry(_("Hand's color (a,r,g,b)"), cfg.hands_color))
		self.list.append(getConfigListEntry(_("Seconds color (a,r,g,b)"), cfg.shand_color))
		self.list.append(getConfigListEntry(_("Face's color (a,r,g,b)"), cfg.faces_color))
		self.list.append(getConfigListEntry( self.background, cfg.background))

		self["config"].list = self.list
		self["config"].setList(self.list)

		self.onLayoutFinish.append(self.layoutFinished)
示例#21
0
	def __init__(self,session):
		Screen.__init__(self,session)
		self.setTitle(_("Transcoding Setup"))
		TEXT = _("Transcoding can be started when there is no corresponding channel recordings.")
		if getBoxType() == "vusolo2":
			TEXT += _("\nWhen transcoding, both PIP and analog video outputs are disabled.")
		else:
			TEXT += _("\nWhen transcoding, PIP is disabled.")
		self.session = session
		self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
		{
			"ok": self.keySave,
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow" : self.KeyDefault,
		}, -2)
		self.list = []
		ConfigListScreen.__init__(self, self.list,session = self.session)
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["key_yellow"] = StaticText(_("Default"))
		self["text"] = StaticText(_("%s")%TEXT)
		self.createSetup()
		self.onLayoutFinish.append(self.checkEncoder)
		self.invaliedModelTimer = eTimer()
		self.invaliedModelTimer.callback.append(self.invalidmodel)
		global transcodingsetupinit
		transcodingsetupinit.pluginsetup = self
		self.onClose.append(self.onClosed)
示例#22
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["actions"] = ActionMap(["SetupActions", "MenuActions"],
		{
			"ok": self.keyGo,
			"save": self.keyGo,
			"cancel": self.keyCancel,
			"menu": self.doCloseRecursive,
		}, -2)

		self.session.postScanService = session.nav.getCurrentlyPlayingServiceOrGroup()

		self.list = []
		tlist = []

		known_networks = [ ]
		nims_to_scan = [ ]
		self.finished_cb = None

		for nim in nimmanager.nim_slots:
			# collect networks provided by this tuner

			need_scan = False
			networks = self.getNetworksForNim(nim)

			print "nim %d provides" % nim.slot, networks
			print "known:", known_networks

			# we only need to scan on the first tuner which provides a network.
			# this gives the first tuner for each network priority for scanning.
			for x in networks:
				if x not in known_networks:
					need_scan = True
					print x, "not in ", known_networks
					known_networks.append(x)

			# don't offer to scan nims if nothing is connected
			if not nimmanager.somethingConnected(nim.slot):
				need_scan = False

			if need_scan:
				nims_to_scan.append(nim)

		# we save the config elements to use them on keyGo
		self.nim_enable = [ ]

		if len(nims_to_scan):
			self.scan_clearallservices = ConfigSelection(default = "yes", choices = [("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (keep feeds)"))])
			self.list.append(getConfigListEntry(_("Clear before scan"), self.scan_clearallservices))

			for nim in nims_to_scan:
				nimconfig = ConfigYesNo(default = True)
				nimconfig.nim_index = nim.slot
				self.nim_enable.append(nimconfig)
				self.list.append(getConfigListEntry(_("Scan ") + nim.slot_name + " (" + nim.friendly_type + ")", nimconfig))

		ConfigListScreen.__init__(self, self.list)
		self["header"] = Label(_("Automatic scan"))
		self["footer"] = Label(_("Press OK to scan"))
示例#23
0
	def __init__(self, session):
		from Components.Sources.StaticText import StaticText
		Screen.__init__(self, session)
		setupfile = file(eEnv.resolve('${datadir}/enigma2/setup.xml'), 'r')
		self.setupdom = xml.etree.cElementTree.parse(setupfile)
		setupfile.close()

		self.skinName = "Setup"
		self['footnote'] = Label()
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["description"] = Label(_(""))

		self.onChangedEntry = [ ]
		self.setup = "recording"
		list = []
		ConfigListScreen.__init__(self, list, session = session, on_change = self.changedEntry)
		self.createSetup()

		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel,
			"ok": self.ok,
			"menu": self.closeRecursive,
		}, -2)
		self.onLayoutFinish.append(self.layoutFinished)
示例#24
0
文件: Setup.py 项目: popazerty/12
	def __init__(self, session, setup):
		Screen.__init__(self, session)
		# for the skin: first try a setup_<setupID>, then Setup
		self.skinName = ["setup_" + setup, "Setup" ]

		self.onChangedEntry = [ ]

		self.setup = setup
		list = []
		self.refill(list)

		#check for list.entries > 0 else self.close
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))

		self["actions"] = NumberActionMap(["SetupActions"], 
			{
				"cancel": self.keyCancel,
				"save": self.keySave,
			}, -2)

		ConfigListScreen.__init__(self, list, session = session, on_change = self.changedEntry)

		self.changedEntry()
		self.onLayoutFinish.append(self.layoutFinished)
示例#25
0
文件: plugin.py 项目: timoRo/easy-gui
 def __init__(self, session):
     self.session = session
     Screen.__init__(self, session)
     self["instructions"] = Label(self._instructions % config.plugins.icetv.member.email_address.value)
     self["description"] = Label()
     self["key_red"] = Label(_("Cancel"))
     self["key_green"] = Label(_("Login"))
     self["key_yellow"] = Label()
     self["key_blue"] = Label(_("Keyboard"))
     self["VKeyIcon"] = Pixmap()
     self.list = [
          getConfigListEntry(self._password, config.plugins.icetv.member.password,
                             _("Your existing IceTV password.")),
          getConfigListEntry(self._update_interval, config.plugins.icetv.refresh_interval,
                             _("Choose how often to connect to IceTV server to check for updates.")),
     ]
     ConfigListScreen.__init__(self, self.list, session)
     self["InpActions"] = ActionMap(contexts=["SetupActions", "ColorActions"],
                                    actions={
                                          "cancel": self.cancel,
                                          "red": self.cancel,
                                          "green": self.doLogin,
                                          "blue": self.keyboard,
                                          "ok": self.keyboard,
                                      }, prio=-2)
示例#26
0
	def __init__(self, session, entry):
		Screen.__init__(self, session)
		self.title = _("WeatherPlugin: Edit Entry")
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"blue": self.keyDelete,
			"yellow": self.searchLocation,
			"cancel": self.keyCancel
		}, -2)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["key_blue"] = StaticText(_("Delete"))
		self["key_yellow"] = StaticText(_("Search Code"))

		if entry is None:
			self.newmode = 1
			self.current = initWeatherPluginEntryConfig()
		else:
			self.newmode = 0
			self.current = entry

		cfglist = [
			getConfigListEntry(_("City"), self.current.city),
			getConfigListEntry(_("Location code"), self.current.weatherlocationcode),
			getConfigListEntry(_("System"), self.current.degreetype)
		]

		ConfigListScreen.__init__(self, cfglist, session)
示例#27
0
	def __init__(self, session):
		self.session = session
		Screen.__init__(self, session)
		self.setTitle(_("E-Panel Menu/Extensionmenu config"))
		self.list = []
		self.list.append(getConfigListEntry(_("Show E-Panel in MainMenu"), config.plugins.epanel.showmain))
		self.list.append(getConfigListEntry(_("Show E-Panel in ExtensionMenu"), config.plugins.epanel.showepanelmenu))
		self.list.append(getConfigListEntry(_("Show E-SoftCam manager in ExtensionMenu"), config.plugins.epanel.showextsoft))
		self.list.append(getConfigListEntry(_("Show E-CrashLog viewr in ExtensionMenu"), config.plugins.epanel.showclviewer))
		self.list.append(getConfigListEntry(_("Show E-Script Executter in ExtensionMenu"), config.plugins.epanel.showscriptex))
		self.list.append(getConfigListEntry(_("Show E-Usb Unmount in ExtensionMenu"), config.plugins.epanel.showusbunmt))
		self.list.append(getConfigListEntry(_("Show E-Installer in ExtensionMenu"), config.plugins.epanel.showsetupipk))
		self.list.append(getConfigListEntry(_("Show reload epg.dat in ExtensionMenu"), config.plugins.epanel.showepgreload))
		self.list.append(getConfigListEntry(_("Show E-EPG Downloader in ExtensionMenu"), config.plugins.epanel.showepgdwnload))
		self.list.append(getConfigListEntry(_("Show PluginBrowser in E-Panel MainMenu"), config.plugins.epanel.showpbmain))
		self.list.append(getConfigListEntry(_("E-Installer: User directory on mount device"), config.plugins.epanel.userdir))
		self.list.append(getConfigListEntry(_("E-Installer: Selection mode"), config.plugins.epanel.multifilemode))
		self.list.append(getConfigListEntry(_("Filter by Name in download extentions"), config.plugins.epanel.filtername))
		self.list.append(getConfigListEntry(_("Crashlog viewer path"), config.plugins.epanel.crashpath))
		self.list.append(getConfigListEntry(_("E-script path"), config.plugins.epanel.scriptpath))
		ConfigListScreen.__init__(self, self.list)
		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Save"))
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "EPGSelectActions"],
		{
			"red": self.cancel,
			"cancel": self.cancel,
			"green": self.save,
			"ok": self.save
		}, -2)
示例#28
0
	def __init__(self, session):
		Screen.__init__(self, session)

		# Summary
		self.setup_title = _("AutoTimer Settings")
		self.onChangedEntry = []

		ConfigListScreen.__init__(
			self,
			[
				getConfigListEntry(_("Poll automatically"), config.plugins.autotimer.autopoll, _("Unless this is enabled AutoTimer will NOT automatically look for events matching your AutoTimers but only when you leave the GUI with the green button.")),
				getConfigListEntry(_("Only poll while in standby"), config.plugins.autotimer.onlyinstandby, _("When this is enabled AutoTimer will ONLY check for new events whilst in stanadby.")),
				getConfigListEntry(_("Startup delay (in min)"), config.plugins.autotimer.delay, _("This is the delay in minutes that the AutoTimer will wait on initial launch to not delay enigma2 startup time.")),
				getConfigListEntry(_("Poll Interval (in mins)"), config.plugins.autotimer.interval, _("This is the delay in minutes that the AutoTimer will wait after a search to search the EPG again.")),
				getConfigListEntry(_("Only add timer for next x days"), config.plugins.autotimer.maxdaysinfuture, _("You can control for how many days in the future timers are added. Set this to 0 to disable this feature.")),
				getConfigListEntry(_("Show in plugin browser"), config.plugins.autotimer.show_in_plugins, _("Enable this to be able to access the AutoTimer Overview from within the plugin browser.")),
				getConfigListEntry(_("Show in extension menu"), config.plugins.autotimer.show_in_extensionsmenu, _("Enable this to be able to access the AutoTimer Overview from within the extension menu.")),
				getConfigListEntry(_("Modify existing timers"), config.plugins.autotimer.refresh, _("This setting controls the behavior when a timer matches a found event.")),
				getConfigListEntry(_("Guess existing timer based on begin/end"), config.plugins.autotimer.try_guessing, _("If this is enabled an existing timer will also be considered recording an event if it records at least 80%% of the it.")),
				getConfigListEntry(_("Add similar timer on conflict"), config.plugins.autotimer.addsimilar_on_conflict, _("If a timer conflict occurs, AutoTimer will search outside the timespan for a similar event and add it.")),
				getConfigListEntry(_("Add timer as disabled on conflict"), config.plugins.autotimer.disabled_on_conflict, _("This toggles the behavior on timer conflicts. If an AutoTimer matches an event that conflicts with an existing timer it will not ignore this event but add it disabled.")),
				getConfigListEntry(_("Include \"AutoTimer\" in tags"), config.plugins.autotimer.add_autotimer_to_tags, _("If this is selected, the tag \"AutoTimer\" will be given to timers created by this plugin.")),
				getConfigListEntry(_("Include AutoTimer name in tags"), config.plugins.autotimer.add_name_to_tags, _("If this is selected, the name of the respective AutoTimer will be added as a tag to timers created by this plugin.")),
				getConfigListEntry(_("Show notification on conflicts"), config.plugins.autotimer.notifconflict, _("By enabling this you will be notified about timer conflicts found during automated polling. There is no intelligence involved, so it might bother you about the same conflict over and over.")),
				getConfigListEntry(_("Show notification on similars"), config.plugins.autotimer.notifsimilar, _("By enabling this you will be notified about similar timers added during automated polling. There is no intelligence involved, so it might bother you about the same conflict over and over.")),
				getConfigListEntry(_("Editor for new AutoTimers"), config.plugins.autotimer.editor, _("The editor to be used for new AutoTimers. This can either be the Wizard or the classic editor.")),
				getConfigListEntry(_("Support \"Fast Scan\"?"), config.plugins.autotimer.fastscan, _("When supporting \"Fast Scan\" the service type is ignored. You don't need to enable this unless your Image supports \"Fast Scan\" and you are using it.")),
				getConfigListEntry(_("Skip poll during records"), config.plugins.autotimer.skip_during_records, _("If enabled, the polling will be skipped if a recording is in progress.")),
			],
			session = session,
			on_change = self.changed
		)
		def selectionChanged():
			if self["config"].current:
				self["config"].current[1].onDeselect(self.session)
			self["config"].current = self["config"].getCurrent()
			if self["config"].current:
				self["config"].current[1].onSelect(self.session)
			for x in self["config"].onSelectionChanged:
				x()
		self["config"].selectionChanged = selectionChanged
		self["config"].onSelectionChanged.append(self.updateHelp)

		# Initialize widgets
		self["key_green"] = StaticText(_("OK"))
		self["key_red"] = StaticText(_("Cancel"))
		self["help"] = StaticText()

		# Define Actions
		self["actions"] = ActionMap(["SetupActions"],
			{
				"cancel": self.keyCancel,
				"save": self.Save,
			}
		)

		# Trigger change
		self.changed()

		self.onLayoutFinish.append(self.setCustomTitle)
示例#29
0
	def keyOK(self):
		ConfigListScreen.keyOK(self)
		sel = self["config"].getCurrent()[1]
		if sel == config.plugins.elektro.IPenable:
			self.session.open(ElektroIP)
		if sel == config.plugins.elektro.NASenable:
			self.session.open(ElektroNAS)
	def __init__(self, session, plugin_path):
		self.skin_path = plugin_path
		Screen.__init__(self, session)

		self.list = [ ]
		self.onChangedEntry = [ ]
		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)

		self.setup_title = _("Setup AnalogClock")
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
			{
				"cancel": self.keyCancel,
				"red": self.keyCancel,
				"green": self.keySave,
				"ok": self.keySave,
				"blue": self.keyBlue,
			}, -2)

		self["key_green"] = Label(_("Ok"))
		self["key_red"] = Label(_("Cancel"))

		self["red"] = Pixmap()
		self["green"] = Pixmap()
		self["blue"] = Pixmap()

		self.changeItemsTimer = eTimer()
		self.changeItemsTimer.timeout.get().append(self.changeItems)

		self.enable = _("Enable AnalogClock")
		self.itemSize = _("Size")
		self.itemXpos = _("X Position")
		self.itemYpos = _("Y Position")
		self.extended = _("Extended settings")

		self.onLayoutFinish.append(self.layoutFinished)
示例#31
0
 def handleKeyFileCallback(self, answer):
     if self["config"].getCurrent() in (self.channelEntry, self.tagsSet):
         self.keySelect()
     else:
         ConfigListScreen.handleKeyFileCallback(self, answer)
         self.newConfig()
 def keyCancel(self):
     if self.newmode == 1:
         config.plugins.Partnerbox.Entries.remove(self.current)
     ConfigListScreen.cancelConfirm(self, True)
示例#33
0
 def keyCancel(self):
     if self.newmode == 1:
         config.plugins.WeatherPlugin.Entry.remove(self.current)
     ConfigListScreen.cancelConfirm(self, True)
 def keyLeft(self):
     ConfigListScreen.keyLeft(self)
     self.initConfig()
示例#35
0
 def keyRight(self):
     ConfigListScreen.keyRight(self)
     self.createSetup()
示例#36
0
    def __init__(self, session, args=None):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Fan Control"))

        templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
        tempcount = len(templist)
        fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
        fancount = len(fanlist)

        self["red"] = StaticText(_("Cancel"))
        self["green"] = StaticText(_("OK"))

        for count in range(8):
            if count < tempcount:
                id = templist[count]
                if getBrandOEM() not in ('dags', 'vuplus'):
                    self["SensorTempText%d" % count] = StaticText(
                        sensors.getSensorName(id))
                    self["SensorTemp%d" % count] = SensorSource(sensorid=id)
                elif getBrandOEM() in ('dags', 'vuplus') and id < 1:
                    self["SensorTempText%d" % count] = StaticText(
                        sensors.getSensorName(id))
                    self["SensorTemp%d" % count] = SensorSource(sensorid=id)
                else:
                    self["SensorTempText%d" % count] = StaticText("")
                    self["SensorTemp%d" % count] = SensorSource()
            else:
                self["SensorTempText%d" % count] = StaticText("")
                self["SensorTemp%d" % count] = SensorSource()

            if count < fancount:
                id = fanlist[count]
                self["SensorFanText%d" % count] = StaticText(
                    sensors.getSensorName(id))
                self["SensorFan%d" % count] = SensorSource(sensorid=id)
            else:
                self["SensorFanText%d" % count] = StaticText("")
                self["SensorFan%d" % count] = SensorSource()

        self.list = []
        for count in range(fancontrol.getFanCount()):
            if getBrandOEM() not in ('dags', 'vuplus'):
                self.list.append(
                    getConfigListEntry(
                        _("Fan %d voltage") % (count + 1),
                        fancontrol.getConfig(count).vlt))
            self.list.append(
                getConfigListEntry(
                    _("Fan %d PWM") % (count + 1),
                    fancontrol.getConfig(count).pwm))
            if getBrandOEM() not in ('dags', 'vuplus'):
                self.list.append(
                    getConfigListEntry(
                        _("Standby fan %d voltage") % (count + 1),
                        fancontrol.getConfig(count).vlt_standby))
            self.list.append(
                getConfigListEntry(
                    _("Standby fan %d PWM") % (count + 1),
                    fancontrol.getConfig(count).pwm_standby))

        ConfigListScreen.__init__(self, self.list, session=self.session)
        #self["config"].list = self.list
        #self["config"].setList(self.list)
        self["config"].l.setSeperation(300)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions", "MenuActions"], {
                "ok": self.save,
                "cancel": self.revert,
                "red": self.revert,
                "green": self.save,
                "menu": self.closeRecursive,
            }, -1)
 def keyRight(self):
     ConfigListScreen.keyRight(self)
     self.initConfig()
示例#38
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Transcoding Setup"))

        config_list = []
        ConfigListScreen.__init__(self, config_list)

        self.statusTimer = eTimer()
        self.warningTimer = eTimer()

        needstreamproxy = False
        port = None

        if os.path.exists("/dev/bcm_enc0"):
            port = 8002
            needstreamproxy = True
        else:
            if os.path.exists("/proc/stb/encoder/0"):
                port = 8001
            else:
                self.statusTimer.callback.append(self.setErrorMessage)
                self.statusTimer.start(500, True)
                return

        config_list.append(
            getConfigListEntry(_("Bitrate"),
                               config.plugins.transcodingsetup.bitrate))
        config_list.append(
            getConfigListEntry(_("Video size"),
                               config.plugins.transcodingsetup.resolution))
        config_list.append(
            getConfigListEntry(_("Frame rate"),
                               config.plugins.transcodingsetup.framerate))
        if SystemInfo["HasH265Encoder"]:
            config_list.append(
                getConfigListEntry(_("Video codec"),
                                   config.plugins.transcodingsetup.vcodec))

        self["config"].list = config_list

        if config.plugins.transcodingsetup.port.value is None:
            config.plugins.transcodingsetup.port.value = port

        rawcontent = []

        try:
            f = open(TRANSCODING_CONFIG, "r")
            rawcontent = f.readlines()
            rawcontent = [x.translate(None, ' \n\r') for x in rawcontent]
            f.close()
        except:
            if needstreamproxy:
                self.warningTimer.callback.append(self.setWarningMessage)
                self.warningTimer.start(500, True)

        self.content = []

        for line in rawcontent:
            if not line.startswith('#') and not line.startswith(';'):
                tokens = line.split('=')

                if (tokens[0] == "bitrate"):
                    for choice in config.plugins.transcodingsetup.bitrate.choices:
                        if int(tokens[1]) * 1000 <= int(choice):
                            config.plugins.transcodingsetup.bitrate.value = choice
                            break

                if (tokens[0] == "size"):
                    if tokens[1] == "480p":
                        config.plugins.transcodingsetup.resolution.value = "720x480"
                    elif tokens[1] == "576p":
                        config.plugins.transcodingsetup.resolution.value = "720x576"
                    elif tokens[1] == "720p":
                        config.plugins.transcodingsetup.resolution.value = "1280x720"

                self.content += [tokens]

        self["actions"] = ActionMap(
            ["OkCancelActions", "ShortcutActions", "ColorActions"], {
                "red": self.keyCancel,
                "green": self.keyGo,
                "ok": self.keyGo,
                "cancel": self.keyCancel,
            }, -2)

        self["key_red"] = StaticText(_("Quit"))
        self["key_green"] = StaticText(_("Set"))

        self["content"] = Label(_("Default values for trancoding"))
 def keyRight(self):
     if self.isStepSlider is True:
         self["config"].getCurrent(
         )[1].increment = config.psi.configsteps.value
     ConfigListScreen.keyRight(self)
示例#40
0
 def keyLeft(self):
     ConfigListScreen.keyLeft(self)
示例#41
0
	def keyRight(self):
		ConfigListScreen.keyRight(self)
		self.setPreviewSettings()
示例#42
0
 def keyRight(self):
     if self.index == 0:
         return
     ConfigListScreen.keyRight(self)
     self.createMenu()
示例#43
0
 def keyRight(self):
     ConfigListScreen.keyRight(self)