Ejemplo n.º 1
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(_("Re-enter new PIN"), NoSave(self.pin2)))
		ConfigListScreen.__init__(self, self.list)
		ProtectedScreen.__init__(self)

		self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions", "MenuActions"],
		{
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"save": self.keyOK,
			"menu": self.closeRecursive,
		}, -1)
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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."))
Ejemplo n.º 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."))
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 12
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)
Ejemplo n.º 13
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)
Ejemplo n.º 14
0
	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)
Ejemplo n.º 15
0
	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)
Ejemplo n.º 16
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)
Ejemplo n.º 17
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)
Ejemplo n.º 18
0
Archivo: Ci.py Proyecto: 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)
Ejemplo n.º 19
0
Archivo: Ci.py Proyecto: 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)
Ejemplo n.º 20
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)
Ejemplo n.º 21
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")
Ejemplo n.º 22
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()
Ejemplo n.º 23
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)
Ejemplo n.º 24
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)
Ejemplo n.º 25
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"))
Ejemplo n.º 26
0
	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)
Ejemplo n.º 27
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)
Ejemplo n.º 28
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)
Ejemplo n.º 29
0
 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)
Ejemplo n.º 30
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()
Ejemplo n.º 31
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setup_title = _("Position Setup")
        #		self.Console = Console()
        self["status"] = StaticText()
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("save"))
        self["key_yellow"] = StaticText(_("Defaults"))

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "cancel": self.keyCancel,
                "save": self.keySave,
                "left": self.keyLeft,
                "right": self.keyRight,
                "yellow": self.keyDefault,
            }, -2)

        self.onChangedEntry = []
        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)
        if SystemInfo["CanChangeOsdAlpha"] == True:
            self.list.append(
                getConfigListEntry(
                    _("User interface visibility"), config.osd.alpha,
                    _("This option lets you adjust the transparency of the user interface"
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Teletext base visibility"), config.osd.alpha_teletext,
                    _("Base transparency for teletext, more options available within teletext screen."
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Web browser base visibility"),
                    config.osd.alpha_webbrowser,
                    _("Base transparency for OpenOpera web browser")))
        if SystemInfo["CanChangeOsdPosition"] == True:
            self.list.append(
                getConfigListEntry(
                    _("Move Left/Right"), config.osd.dst_left,
                    _("Use the Left/Right buttons on your remote to move the user interface left/right"
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Width"), config.osd.dst_width,
                    _("Use the Left/Right buttons on your remote to adjust the size of the user interface. Left button decreases the size, Right increases the size."
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Move Up/Down"), config.osd.dst_top,
                    _("Use the Left/Right buttons on your remote to move the user interface up/down"
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Height"), config.osd.dst_height,
                    _("Use the Left/Right buttons on your remote to adjust the size of the user interface. Left button decreases the size, Right increases the size."
                      )))
        self["config"].list = self.list
        self["config"].l.setList(self.list)

        self.onLayoutFinish.append(self.layoutFinished)
        if not self.selectionChanged in self["config"].onSelectionChanged:
            self["config"].onSelectionChanged.append(self.selectionChanged)
        self.selectionChanged()
Ejemplo n.º 32
0
    def __init__(self, session):
        self.skin = HdmiCECSetupScreen.skin
        Screen.__init__(self, session)

        from Components.ActionMap import ActionMap
        from Components.Button import Button

        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("Set fixed"))
        self["key_blue"] = StaticText(_("Clear fixed"))
        self["current_address"] = StaticText()
        self["fixed_address"] = StaticText()

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"], {
                "ok": self.keyGo,
                "save": self.keyGo,
                "cancel": self.keyCancel,
                "green": self.keyGo,
                "red": self.keyCancel,
                "yellow": self.setFixedAddress,
                "blue": self.clearFixedAddress,
                "menu": self.closeRecursive,
            }, -2)

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

        self.list.append(
            getConfigListEntry(_("Enabled"), config.hdmicec.enabled))
        self.list.append(
            getConfigListEntry(_("Put TV in standby"),
                               config.hdmicec.control_tv_standby))
        self.list.append(
            getConfigListEntry(_("Wakeup TV from standby"),
                               config.hdmicec.control_tv_wakeup))
        self.list.append(
            getConfigListEntry(_("Regard deep standby as standby"),
                               config.hdmicec.handle_deepstandby_events))
        self.list.append(
            getConfigListEntry(_("Switch TV to correct input"),
                               config.hdmicec.report_active_source))
        self.list.append(
            getConfigListEntry(_("Use TV remote control"),
                               config.hdmicec.report_active_menu))
        self.list.append(
            getConfigListEntry(_("Handle standby from TV"),
                               config.hdmicec.handle_tv_standby))
        self.list.append(
            getConfigListEntry(_("Handle wakeup from TV"),
                               config.hdmicec.handle_tv_wakeup))
        self.list.append(
            getConfigListEntry(_("Wakeup signal from TV"),
                               config.hdmicec.tv_wakeup_detection))
        self.list.append(
            getConfigListEntry(_("Forward volume keys"),
                               config.hdmicec.volume_forwarding))
        self.list.append(
            getConfigListEntry(_("Put receiver in standby"),
                               config.hdmicec.control_receiver_standby))
        self.list.append(
            getConfigListEntry(_("Wakeup receiver from standby"),
                               config.hdmicec.control_receiver_wakeup))
        self["config"].list = self.list
        self["config"].l.setList(self.list)

        self.updateAddress()
    def __init__(self, session, infobar):
        Screen.__init__(self, session)
        self.skin = QuickSubtitlesConfigMenu.skin
        self.infobar = infobar or self.session.infobar
        self.wait = eTimer()
        self.wait.timeout.get().append(self.resyncSubtitles)
        self.resume = eTimer()
        self.resume.timeout.get().append(self.resyncSubtitlesResume)
        self.service = self.session.nav.getCurrentlyPlayingServiceReference()
        servicepath = self.service and self.service.getPath()
        if servicepath and servicepath.startswith(
                "/") and self.service.toString().startswith("1:"):
            info = eServiceCenter.getInstance().info(self.service)
            self.service_string = info and info.getInfoString(
                self.service, iServiceInformation.sServiceref)
        else:
            self.service_string = self.service.toString()
        self.center_dvb_subs = ConfigYesNo(
            default=(eDVBDB.getInstance().getFlag(
                eServiceReference(self.service_string))
                     & self.FLAG_CENTER_DVB_SUBS) and True)
        self.center_dvb_subs.addNotifier(self.setCenterDvbSubs)
        self["videofps"] = Label("")

        sub = self.infobar.selected_subtitle
        if sub[0] == 0:  # dvb
            menu = [
                getConfigMenuItem("config.subtitles.dvb_subtitles_yellow"),
                getConfigMenuItem("config.subtitles.dvb_subtitles_backtrans"),
                getConfigMenuItem(
                    "config.subtitles.dvb_subtitles_original_position"),
                (_("Center DVB subtitles"), self.center_dvb_subs),
                getConfigMenuItem("config.subtitles.subtitle_position"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_bad_timing_delay"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_noPTSrecordingdelay"),
            ]
        elif sub[0] == 1:  # teletext
            menu = [
                getConfigMenuItem("config.subtitles.ttx_subtitle_colors"),
                getConfigMenuItem(
                    "config.subtitles.ttx_subtitle_original_position"),
                getConfigMenuItem("config.subtitles.ttx_subtitle_position"),
                getConfigMenuItem("config.subtitles.subtitle_fontsize"),
                getConfigMenuItem("config.subtitles.subtitle_rewrap"),
                getConfigMenuItem("config.subtitles.subtitle_borderwidth"),
                getConfigMenuItem("config.subtitles.showbackground"),
                getConfigMenuItem("config.subtitles.subtitle_alignment"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_bad_timing_delay"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_noPTSrecordingdelay"),
            ]
        else:  # pango
            menu = [
                getConfigMenuItem("config.subtitles.pango_subtitles_delay"),
                getConfigMenuItem("config.subtitles.pango_subtitle_colors"),
                getConfigMenuItem(
                    "config.subtitles.pango_subtitle_fontswitch"),
                getConfigMenuItem("config.subtitles.colourise_dialogs"),
                getConfigMenuItem("config.subtitles.subtitle_fontsize"),
                getConfigMenuItem("config.subtitles.subtitle_position"),
                getConfigMenuItem("config.subtitles.subtitle_alignment"),
                getConfigMenuItem("config.subtitles.subtitle_rewrap"),
                getConfigMenuItem("config.subtitles.pango_subtitle_removehi"),
                getConfigMenuItem("config.subtitles.subtitle_borderwidth"),
                getConfigMenuItem("config.subtitles.showbackground"),
                getConfigMenuItem("config.subtitles.pango_subtitles_fps"),
            ]
            self["videofps"].setText(
                _("Video: %s fps") % (self.getFps().rstrip(".000")))

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

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

        self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 34
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self.setTitle(_("Fast Scan"))

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

        lastConfiguration = eval(config.misc.fastscan.last_configuration.value)

        def providerChanged(configEntry):
            if configEntry.value:
                nimList = [
                    (str(x), nimmanager.nim_slots[x].friendly_full_description)
                    for x in nimmanager.getNimListForSat(transponders[[
                        x[1][0] for x in providers if x[0] == configEntry.value
                    ][0]][3])
                ]
                self.scan_nims = ConfigSelection(
                    default=lastConfiguration[0] if lastConfiguration
                    and lastConfiguration[0] in [x[0] for x in nimList] else
                    nimList[0][0],
                    choices=nimList)
                self.tunerEntry = getConfigListEntry(_("Tuner"),
                                                     self.scan_nims)

        providerList = getProviderList()
        if lastConfiguration and lastConfiguration[1] in providerList:
            self.scan_provider = ConfigSelection(default=lastConfiguration[1],
                                                 choices=[(None, _("None"))] +
                                                 providerList)
            self.scan_provider.addNotifier(providerChanged)
            self.scan_hd = ConfigYesNo(default=lastConfiguration[2])
            self.scan_keepnumbering = ConfigYesNo(default=lastConfiguration[3])
            self.scan_keepsettings = ConfigYesNo(default=lastConfiguration[4])
            self.scan_create_radio_bouquet = ConfigYesNo(
                default=len(lastConfiguration) > 5 and lastConfiguration[5])
        else:
            self.scan_provider = ConfigSelection(default=None,
                                                 choices=[(None, _("None"))] +
                                                 providerList)
            self.scan_provider.addNotifier(providerChanged)
            self.scan_hd = ConfigYesNo(default=True)
            self.scan_keepnumbering = ConfigYesNo(default=True)
            self.scan_keepsettings = ConfigYesNo(default=False)
            self.scan_create_radio_bouquet = ConfigYesNo(default=False)
        self.scanProvider = getConfigListEntry(_("Provider"),
                                               self.scan_provider)
        self.scanHD = getConfigListEntry(_("HD list"), self.scan_hd)
        self.config_autoproviders = {}
        auto_providers = config.misc.fastscan.autoproviders.value.split(",")
        for provider in providers:
            self.config_autoproviders[provider[0]] = ConfigYesNo(
                default=provider[0] in auto_providers)
        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.createSetup()
        self.finished_cb = None
        self["introduction"] = Label(
            _("Select your provider, and press OK to start the scan"))
        self["key_red"] = Label(_("Cancel"))
        self["key_green"] = Label(_("Save"))
    def __init__(self, session):
        Screen.__init__(self, session)
        self.skinName = ["SeriesPluginConfiguration"]

        from .plugin import NAME, VERSION
        self.setup_title = NAME + " " + _("Configuration") + " " + VERSION

        log.debug("SeriesPluginConfiguration")

        self.onChangedEntry = []

        # Buttons
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button(_("OK"))
        self["key_blue"] = Button(_("Show Log"))
        self["key_yellow"] = Button(_("Channel Edit"))

        # Define Actions
        self["actions"] = ActionMap(
            ["SetupActions", "ChannelSelectBaseActions", "ColorActions"], {
                "cancel": self.keyCancel,
                "save": self.keySave,
                "nextBouquet": self.pageUp,
                "prevBouquet": self.pageDown,
                "blue": self.showLog,
                "yellow": self.openChannelEditor,
                "ok": self.keyOK,
                "left": self.keyLeft,
                "right": self.keyRight,
            }, -2)  # higher priority

        stopIndependent()
        #resetInstance()
        self.seriesPlugin = getInstance()

        # Create temporary identifier config elements
        identifiers = self.seriesPlugin.modules
        identifiers_elapsed = [
            k for k, v in list(identifiers.items()) if v.knowsElapsed()
        ]
        identifiers_today = [
            k for k, v in list(identifiers.items()) if v.knowsToday()
        ]
        identifiers_future = [
            k for k, v in list(identifiers.items()) if v.knowsFuture()
        ]
        if config.plugins.seriesplugin.identifier_elapsed.value in identifiers_elapsed:
            self.cfg_identifier_elapsed = NoSave(
                ConfigSelection(choices=identifiers_elapsed,
                                default=config.plugins.seriesplugin.
                                identifier_elapsed.value))
        else:
            self.cfg_identifier_elapsed = NoSave(
                ConfigSelection(choices=identifiers_elapsed,
                                default=identifiers_elapsed[0]))
            self.changesMade = True
        if config.plugins.seriesplugin.identifier_today.value in identifiers_today:
            self.cfg_identifier_today = NoSave(
                ConfigSelection(choices=identifiers_today,
                                default=config.plugins.seriesplugin.
                                identifier_today.value))
        else:
            self.cfg_identifier_today = NoSave(
                ConfigSelection(choices=identifiers_today,
                                default=identifiers_today[0]))
            self.changesMade = True
        if config.plugins.seriesplugin.identifier_future.value in identifiers_future:
            self.cfg_identifier_future = NoSave(
                ConfigSelection(choices=identifiers_future,
                                default=config.plugins.seriesplugin.
                                identifier_future.value))
        else:
            self.cfg_identifier_future = NoSave(
                ConfigSelection(choices=identifiers_future,
                                default=identifiers_future[0]))
            self.changesMade = True

        # Load patterns
        patterns_file = readFilePatterns()
        self.cfg_pattern_title = NoSave(
            ConfigSelection(
                choices=patterns_file,
                default=config.plugins.seriesplugin.pattern_title.value))
        self.cfg_pattern_description = NoSave(
            ConfigSelection(
                choices=patterns_file,
                default=config.plugins.seriesplugin.pattern_description.value))
        #self.cfg_pattern_record     = NoSave( ConfigSelection(choices = patterns_file, default = config.plugins.seriesplugin.pattern_record.value ) )
        patterns_directory = readDirectoryPatterns()
        self.cfg_pattern_directory = NoSave(
            ConfigSelection(
                choices=patterns_directory,
                default=config.plugins.seriesplugin.pattern_directory.value))

        bouquetList = [("", "")]
        tvbouquets = getTVBouquets()
        for bouquet in tvbouquets:
            bouquetList.append((bouquet[1], bouquet[1]))
        self.cfg_bouquet_main = NoSave(
            ConfigSelection(
                choices=bouquetList,
                default=config.plugins.seriesplugin.bouquet_main.value
                or str(list(zip(*bouquetList)[1]))))

        checkList(self.cfg_pattern_title)
        checkList(self.cfg_pattern_description)
        checkList(self.cfg_pattern_directory)
        checkList(self.cfg_bouquet_main)

        self.changesMade = False

        # Initialize Configuration
        self.list = []
        self.buildConfig()
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=session,
                                  on_change=self.changed)

        self.changed()
        self.onLayoutFinish.append(self.layoutFinished)
	def __init__(self, session, exportDir, client, options):
		self.skin = editExportEntry.skin
		self.session = session
		Screen.__init__(self, session)

		nfsoptions = [
		"ro,sync",
		"rw,sync",
		"ro,async",
		"rw,async",
		"ro,no_root_squash",
		"rw,no_root_squash",
		"ro,no_subtree_check",
		"rw,no_subtree_check",
		"ro,insecure",
		"rw,insecure",
		"ro,insecure,no_subtree_check",
		"rw,insecure,no_subtree_check",
		"ro,sync,no_subtree_check",
		"rw,sync,no_subtree_check",
		"ro,async,no_subtree_check",
		"rw,async,no_subtree_check",
		"ro,no_root_squash,no_subtree_check",
		"rw,no_root_squash,no_subtree_check",
		"ro,no_root_squash,sync",
		"rw,no_root_squash,sync",
		"ro,no_root_squash,sync,no_subtree_check",
		"rw,no_root_squash,sync,no_subtree_check",
		"ro,no_root_squash,async",
		"rw,no_root_squash,async",
		"ro,no_root_squash,async,no_subtree_check",
		"rw,no_root_squash,async,no_subtree_check"]

		optionsEntrys = {}
		for x in nfsoptions:
			optionsEntrys[x] = x

		clientIP = [192, 168, 0, 0]
		self.netmask = ''

		tmp = client.split('/')
		if len(tmp) > 1:
			client = tmp[0]
			self.netmask = tmp[1]

		if client == '*':
			everyIP = True
		else:
			everyIP = False
			theIP = client.split('.')
			clientIP = []
			for x in theIP:
				clientIP.append(int(x))

		self.exportDirConfigEntry = NoSave(ConfigDirectory(exportDir))
		self.everyIPConfigEntry = NoSave(ConfigEnableDisable(default=everyIP))
		self.clientConfigEntry = NoSave(ConfigIP(clientIP))
		self.optionsConfigEntry = NoSave(ConfigSelection(optionsEntrys, options))

		ConfigListScreen.__init__(self, [])
		self.createSetup()
		self.everyIPConfigEntry.addNotifier(self.toggleEveryIP)

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

		self["ButtonGreen"] = Pixmap()
		self["ButtonGreentext"] = Label(_("Save and Close"))
		self["ButtonRed"] = Pixmap()
		self["ButtonRedtext"] = Label(_("Close"))
	def __init__(self, session, iface, plugin_path):
		self.skin = setupNfs.skin
		self.session = session
		Screen.__init__(self, session)

		self.container = eConsoleAppContainer()
		self.container.appClosed.append(self.runFinished)
		self.container.dataAvail.append(self.dataAvail)

		if isRunning('portmap') and isRunning('nfsd'):
			isEnabled = True
		else:
			isEnabled = False

		self.activeConfigEntry = NoSave(ConfigEnableDisable(default=isEnabled))

		self["nfsdLabel"] = Label()
		self["portmapLabel"] = Label()
		self["ButtonGreen"] = Pixmap()
		self["ButtonGreentext"] = Button(_("save and start/restart NFS-Server"))
		self["ButtonRed"] = Pixmap()
		self["ButtonRedtext"] = Label(_("Close"))
		self["ButtonYellow"] = Pixmap()
		self["ButtonYellowtext"] = Label(_("New Entry"))
		self["ButtonBlue"] = Pixmap()
		self["ButtonBluetext"] = Label(_("Remove Entry"))

		self.startingUp = False
		self.goingDown = False
		self.cmdlist = []
		self.run = 0

		self.exportlist = []
		data = self.readExports()
		if data != None:
			for line in data:
				exportDir = line[0]
				client = line[1]
				options = line[2]
				options = options.replace('(', '')
				options = options.replace(')', '')
				self.exportlist.append((exportDir, client, options))
		else:
			self.exportlist.append(('/media/hdd', '*', 'rw,no_root_squash,sync'))

		self["exportlist"] = List(self.exportlist)
		self.hideList = self["exportlist"].list

		self.createSetup()
		ConfigListScreen.__init__(self, self.list, session=session)
		self.activeConfigEntry.addNotifier(self.toggleServer)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"cancel": self.cancel,
			"ok": self.editExportEntry,
			"green": self.green,
			"red": self.cancel,
			"yellow": self.newExportEntry,
			"blue": self.deleteExportEntry
		}, -2)
Ejemplo n.º 38
0
    def __init__(self, session, name, path, descr):
        Screen.__init__(self, session)
        self.skinName = ["AdvancedCutInput", "Setup"]

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

        if self.baseName(path) == self.baseName(name):
            title = ""
        else:
            title = name
        dir = self.dirName(path)
        file = self.baseName(path) + " cut"
        self.input_replace = ConfigSelection(choices=[("no", _("No")),
                                                      ("yes", _("Yes"))],
                                             default="no")
        self.input_file = ConfigText(default=file,
                                     fixed_size=False,
                                     visible_width=45)
        self.input_title = ConfigText(default=title,
                                      fixed_size=False,
                                      visible_width=45)
        self.input_descr = ConfigText(default=descr,
                                      fixed_size=False,
                                      visible_width=45)
        tmp = config.movielist.videodirs.value
        if not dir in tmp:
            tmp.append(dir)
        self.input_dir = ConfigSelection(choices=tmp, default=dir)
        self.input_manual = ConfigSelection(choices=[
            ("no", _("Cutlist")), ("yes", _("Manual specification"))
        ],
                                            default="no")
        self.input_space = ConfigNothing()
        self.input_manualcuts = ConfigText(default="", fixed_size=False)
        self.input_manualcuts.setUseableChars(" 0123456789:.")

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

        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.entry_replace = getConfigListEntry(_("Replace original:"),
                                                self.input_replace)
        self.entry_file = getConfigListEntry(_("New filename:"),
                                             self.input_file)
        self.entry_title = getConfigListEntry(_("New title:"),
                                              self.input_title)
        self.entry_descr = getConfigListEntry(_("New description:"),
                                              self.input_descr)
        self.entry_dir = getConfigListEntry(_("New location:"), self.input_dir)
        self.entry_manual = getConfigListEntry(_("Cut source:"),
                                               self.input_manual)
        self.entry_space = getConfigListEntry(
            _("Cuts (an IN OUT IN OUT ... sequence of hour:min:sec)"),
            self.input_space)
        self.entry_manualcuts = getConfigListEntry(":", self.input_manualcuts)
        self.createSetup(self["config"])

        self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 39
0
    def __init__(self,
                 session,
                 job,
                 parent=None,
                 cancelable=True,
                 backgroundable=True,
                 afterEventChangeable=True,
                 afterEvent="nothing"):
        from Components.Sources.StaticText import StaticText
        from Components.Sources.Progress import Progress
        from Components.Sources.Boolean import Boolean
        from Components.ActionMap import ActionMap
        Screen.__init__(self, session, parent)
        Screen.setTitle(self, _("Job View"))
        InfoBarNotifications.__init__(self)
        ConfigListScreen.__init__(self, [])
        self.parent = parent
        self.job = job
        if afterEvent:
            self.job.afterEvent = afterEvent

        self["job_name"] = StaticText(job.name)
        self["job_progress"] = Progress()
        self["job_task"] = StaticText()
        self["summary_job_name"] = StaticText(job.name)
        self["summary_job_progress"] = Progress()
        self["summary_job_task"] = StaticText()
        self["job_status"] = StaticText()
        self["finished"] = Boolean()
        self["cancelable"] = Boolean(cancelable)
        self["backgroundable"] = Boolean(backgroundable)

        self["key_blue"] = StaticText(_("Background"))

        self.onShow.append(self.windowShow)
        self.onHide.append(self.windowHide)

        self["setupActions"] = ActionMap(
            ["ColorActions", "OkCancelActions"], {
                "green": self.ok,
                "red": self.abort,
                "blue": self.background,
                "cancel": self.ok,
                "ok": self.ok,
            }, -2)

        self.settings = ConfigSubsection()
        if SystemInfo["DeepstandbySupport"]:
            shutdownString = _("go to deep standby")
        else:
            shutdownString = _("shut down")
        self.settings.afterEvent = ConfigSelection(choices=[
            ("nothing", _("do nothing")), ("close", _("Close")),
            ("standby", _("go to standby")), ("deepstandby", shutdownString)
        ],
                                                   default=self.job.afterEvent
                                                   or "nothing")
        self.job.afterEvent = self.settings.afterEvent.value
        self.afterEventChangeable = afterEventChangeable
        self.setupList()
        self.state_changed()
Ejemplo n.º 40
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self.onChangedEntry = []

        ConfigListScreen.__init__(self, [], session)
        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "cancel": self.keyCancel,
                "red": self.keyCancel,
                "green": self.keySave,
                "ok": self.keyOK,
                "blue": self.keyBlue,
            }, -2)

        self["key_green"] = Label(_("Save"))
        self["key_red"] = Label(_("Cancel"))
        self["key_blue"] = Label()  # _("Update"))

        self.list = []
        myConfig.separator = NoSave(ConfigNothing())
        self.list.append(
            getConfigListEntry(_("--- Standard settings ---"),
                               myConfig.separator))
        self.list.append(
            getConfigListEntry(_("Show Movie name instead of Filename:"),
                               myConfig.NamesNOfiles))
        #self.list.append(getConfigListEntry(_("FileList font size (20-32):"), myConfig.FileListFontSize))
        self.list.append(
            getConfigListEntry(_("Show subtitles files on the list:"),
                               myConfig.TextFilesOnFileList))
        self.list.append(
            getConfigListEntry(_("Show Music files on the list:"),
                               myConfig.ShowMusicFiles))
        #self.list.append(getConfigListEntry(_("Show Picture files on the list:"), myConfig.ShowPicturesFiles))
        self.list.append(
            getConfigListEntry(_("Initial files sorting:"),
                               myConfig.FileListSort))
        self.list.append(
            getConfigListEntry(_("Stop playing entering AdvancedFreePlayer:"),
                               myConfig.StopService))
        self.list.append(
            getConfigListEntry(_("Initial movies folder:"),
                               myConfig.FileListLastFolder))
        self.list.append(
            getConfigListEntry(_("Remember last used folder:"),
                               myConfig.StoreLastFolder))
        self.list.append(
            getConfigListEntry(_("Key OK behavior:"), myConfig.KeyOK))
        self.list.append(
            getConfigListEntry(
                _("Ask for file removal when % played (0=off):"),
                myConfig.DeleteWhenPercentagePlayed))
        self.list.append(
            getConfigListEntry(_("Always ask for file removal:"),
                               myConfig.DeleteFileQuestion))
        self.list.append(
            getConfigListEntry(_("Move to trash folder instead delete:"),
                               myConfig.MoveToTrash))
        self.list.append(
            getConfigListEntry(_("Trash folder:"), myConfig.TrashFolder))
        self.list.append(getConfigListEntry("", myConfig.separator))
        self.list.append(
            getConfigListEntry(_("--- Infobar settings ---"),
                               myConfig.separator))
        self.list.append(
            getConfigListEntry(_("Time displaying infobar:"),
                               myConfig.InfobarTime))
        self.list.append(
            getConfigListEntry(_("Display infobar on pause:"),
                               myConfig.InfobarOnPause))

        self.list.append(getConfigListEntry("", myConfig.separator))
        self.list.append(
            getConfigListEntry(_("--- Subtitles settings ---"),
                               myConfig.separator))
        self.list.append(
            getConfigListEntry(_("SRT subtitles displayed by:"),
                               myConfig.SRTplayer))
        if getPlatform() in ['sh4', 'ServiceApp']:
            self.list.append(
                getConfigListEntry(_("MultiFramework selection:"),
                                   myConfig.MultiFramework))

        self.list.append(getConfigListEntry("", myConfig.separator))
        self.list.append(
            getConfigListEntry(_("--- Cover & Descriptions settings ---"),
                               myConfig.separator))
        self.list.append(
            getConfigListEntry(_("Download from WEB:"),
                               myConfig.AutoDownloadCoversDescriptions))
        self.list.append(
            getConfigListEntry(_("Download to movie folder:"),
                               myConfig.PermanentCoversDescriptons))
        self.list.append(
            getConfigListEntry(_("Search TMDB for the language:"),
                               myConfig.coverfind_language))
        self.list.append(
            getConfigListEntry(_("Cover size:"),
                               myConfig.coverfind_themoviedb_coversize))

        self["config"].list = self.list
        self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 41
0
    def __init__(self, session):
        self.session = session
        Screen.__init__(self, self.session)
        ProtectedScreen.__init__(self)

        # Lets get a list of elements for the config list
        self.list = [
            getConfigListEntry(_("Enabled"),
                               config.plugins.KiddyTimer.enabled),
            getConfigListEntry(_("PIN"), config.plugins.KiddyTimer.pin),
            getConfigListEntry(_("Don't monitor TV started before"),
                               config.plugins.KiddyTimer.monitorStartTime),
            getConfigListEntry(_("Don't monitor TV started after"),
                               config.plugins.KiddyTimer.monitorEndTime),
            getConfigListEntry(_("Style of timer"),
                               config.plugins.KiddyTimer.timerStyle),
            getConfigListEntry(
                _("Timeout for activation dialog"),
                config.plugins.KiddyTimer.activationDialogTimeout)
        ]
        for i in range(0, 7):
            self.list.append(
                getConfigListEntry(
                    KTglob.DAYNAMES[i],
                    config.plugins.KiddyTimer.dayTimes[i].timeValue))

        ConfigListScreen.__init__(self, self.list)

        self["config"].list = self.list

        self.skin_path = KTglob.plugin_path
        self.kiddyTimerStopped = False

        # Plugin Information
        self.remainingTime = config.plugins.KiddyTimer.remainingTime.value
        sRemainingTime = KTglob.getTimeFromSeconds(self.remainingTime, True)

        self["PluginInfo"] = Label(
            _("Plugin: %(plugin)s , Version: %(version)s") %
            dict(plugin=KTglob.PLUGIN_BASE, version=KTglob.PLUGIN_VERSION))
        self["RemainingTime"] = Label(_("Remaining time: %s") % sRemainingTime)
        self["LastDayStarted"] = Label(
            _("Last day started: %s") %
            config.plugins.KiddyTimer.lastStartDay.getValue())

        # BUTTONS
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button(_("Save"))
        self["key_yellow"] = Button(_("Reset clock"))
        self["key_blue"] = Button(_("Move clock"))

        self["setupActions"] = NumberActionMap(
            ["SetupActions", "ColorActions"], {
                "save": self.save,
                "cancel": self.cancel,
                "green": self.save,
                "red": self.cancel,
                "ok": self.save,
                "blue": self.keyPositioner,
                "yellow": self.resetTimer
            }, -2)
Ejemplo n.º 42
0
    def __init__(self, session, args=None):
        Screen.__init__(self, session)
        self.session = session
        self.picPath = COLOR_IMAGE_PATH % "FFFFFF"
        self.Scale = AVSwitch().getFramebufferScale()
        self.PicLoad = ePicLoad()
        self["helperimage"] = Pixmap()

        self["titleText"] = StaticText("")
        self["titleText"].setText(_("Color settings"))

        self["cancelBtn"] = StaticText("")
        self["cancelBtn"].setText(_("Cancel"))

        self["saveBtn"] = StaticText("")
        self["saveBtn"].setText(_("Save"))

        self["defaultsBtn"] = StaticText("")
        self["defaultsBtn"].setText(_("Defaults"))

        initColorsConfig()

        list = []
        list.append(
            getConfigListEntry(
                _("Channelselection  -----------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("    Service"), ))
        list.append(
            getConfigListEntry(
                _("        Font color"),
                config.plugins.MyMetrixLiteColors.channelselectionservice))
        list.append(
            getConfigListEntry(
                _("        Font color selected"), config.plugins.
                MyMetrixLiteColors.channelselectionserviceselected))
        list.append(getConfigListEntry(_("    Service Description"), ))
        list.append(
            getConfigListEntry(
                _("        Font color"), config.plugins.MyMetrixLiteColors.
                channelselectionservicedescription))
        list.append(
            getConfigListEntry(
                _("        Font color selected"), config.plugins.
                MyMetrixLiteColors.channelselectionservicedescriptionselected))
        list.append(
            getConfigListEntry(
                _("Text Windowtitle  ------------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("    Foreground"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.windowtitletext))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.windowtitletexttransparency))
        list.append(getConfigListEntry(_("    Background"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.windowtitletextback))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                windowtitletextbacktransparency))
        list.append(
            getConfigListEntry(
                _("Text in background  ----------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("    Foreground"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.backgroundtext))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.backgroundtexttransparency))
        list.append(getConfigListEntry(_("    Background"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.backgroundtextback))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                backgroundtextbacktransparency))
        list.append(
            getConfigListEntry(
                _("Layer A (main layer)  --------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("    Background"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.layerabackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                layerabackgroundtransparency))
        list.append(
            getConfigListEntry(
                _("    Font color"),
                config.plugins.MyMetrixLiteColors.layeraforeground))
        list.append(getConfigListEntry(_("    Selection bar"), ))
        list.append(getConfigListEntry(_("        Background"), ))
        list.append(
            getConfigListEntry(
                _("            Color"),
                config.plugins.MyMetrixLiteColors.layeraselectionbackground))
        list.append(
            getConfigListEntry(
                _("            Transparency"), config.plugins.
                MyMetrixLiteColors.layeraselectionbackgroundtransparency))
        list.append(
            getConfigListEntry(
                _("        Font color"),
                config.plugins.MyMetrixLiteColors.layeraselectionforeground))
        list.append(getConfigListEntry(_("    Progress bar"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.layeraprogress))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.layeraprogresstransparency))
        list.append(getConfigListEntry(_("    Accent colors"), ))
        list.append(
            getConfigListEntry(
                _("        Color 1"),
                config.plugins.MyMetrixLiteColors.layeraaccent1))
        list.append(
            getConfigListEntry(
                _("        Color 2"),
                config.plugins.MyMetrixLiteColors.layeraaccent2))
        list.append(
            getConfigListEntry(
                _("Layer B (secondary layer)  ---------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("    Background"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.layerbbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                layerbbackgroundtransparency))
        list.append(
            getConfigListEntry(
                _("    Font color"),
                config.plugins.MyMetrixLiteColors.layerbforeground))
        list.append(getConfigListEntry(_("    Selection bar"), ))
        list.append(getConfigListEntry(_("        Background"), ))
        list.append(
            getConfigListEntry(
                _("            Color"),
                config.plugins.MyMetrixLiteColors.layerbselectionbackground))
        list.append(
            getConfigListEntry(
                _("            Transparency"), config.plugins.
                MyMetrixLiteColors.layerbselectionbackgroundtransparency))
        list.append(
            getConfigListEntry(
                _("        Font color"),
                config.plugins.MyMetrixLiteColors.layerbselectionforeground))
        list.append(getConfigListEntry(_("    Progress bar"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.layerbprogress))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.layerbprogresstransparency))
        list.append(getConfigListEntry(_("    Accent colors"), ))
        list.append(
            getConfigListEntry(
                _("        Color 1"),
                config.plugins.MyMetrixLiteColors.layerbaccent1))
        list.append(
            getConfigListEntry(
                _("        Color 2"),
                config.plugins.MyMetrixLiteColors.layerbaccent2))
        list.append(
            getConfigListEntry(
                _("Graphical EPG  ---------------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("  Event Description"), ))
        list.append(getConfigListEntry(_("        Background"), ))
        list.append(
            getConfigListEntry(
                _("        Color"), config.plugins.MyMetrixLiteColors.
                epgeventdescriptionbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                epgeventdescriptionbackgroundtransparency))
        list.append(
            getConfigListEntry(
                _("        Font color"), config.plugins.MyMetrixLiteColors.
                epgeventdescriptionforeground))
        list.append(getConfigListEntry(_("  Event List"), ))
        list.append(
            getConfigListEntry(
                _("        Font color"),
                config.plugins.MyMetrixLiteColors.epgeventforeground))
        list.append(getConfigListEntry(_("  Time Line"), ))
        list.append(
            getConfigListEntry(
                _("        Font color"),
                config.plugins.MyMetrixLiteColors.epgtimelineforeground))
        list.append(
            getConfigListEntry(
                _("Skin Design   ---------------------------------------------------------------------------------------"
                  ), ))
        list.append(getConfigListEntry(_("     upper left Corner Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.upperleftcornerbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.upperleftcornertransparency))
        list.append(getConfigListEntry(_("    lower left Corner Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.lowerleftcornerbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"),
                config.plugins.MyMetrixLiteColors.lowerleftcornertransparency))
        list.append(getConfigListEntry(_("    upper right Corner Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.upperrightcornerbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                upperrightcornertransparency))
        list.append(getConfigListEntry(_("    lower right Corner Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"),
                config.plugins.MyMetrixLiteColors.lowerrightcornerbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                lowerrightcornertransparency))
        list.append(getConfigListEntry(_("    optional horizontal Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"), config.plugins.MyMetrixLiteColors.
                optionallayerhorizontalbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                optionallayerhorizontaltransparency))
        list.append(getConfigListEntry(_("    optional vertical Layer"), ))
        list.append(
            getConfigListEntry(
                _("        Color"), config.plugins.MyMetrixLiteColors.
                optionallayerverticalbackground))
        list.append(
            getConfigListEntry(
                _("        Transparency"), config.plugins.MyMetrixLiteColors.
                optionallayerverticaltransparency))

        ConfigListScreen.__init__(self, list)

        self["actions"] = ActionMap(
            [
                "OkCancelActions", "DirectionActions", "InputActions",
                "ColorActions"
            ], {
                "left": self.keyLeft,
                "down": self.keyDown,
                "up": self.keyUp,
                "right": self.keyRight,
                "red": self.exit,
                "yellow": self.defaults,
                "green": self.save,
                "cancel": self.exit
            }, -1)

        self.onLayoutFinish.append(self.UpdatePicture)
Ejemplo n.º 43
0
    def __init__(self, session):
        Screen.__init__(self, session)
        fn = 'NewImage'
        sourcelist = []
        for fn in os.listdir('%sImagesUpload' % getNeoLocation()):
            if fn.find('.zip') != -1:
                fn = fn.replace('.zip', '')
                sourcelist.append((fn, fn))
                continue
            if fn.find('.tar.xz') != -1:
                fn = fn.replace('.tar.xz', '')
                sourcelist.append((fn, fn))
                continue
            if fn.find('.nfi') != -1:
                fn = fn.replace('.nfi', '')
                sourcelist.append((fn, fn))
                continue
        if len(sourcelist) == 0:
            sourcelist = [('None', 'None')]
        self.source = ConfigSelection(choices=sourcelist)
        self.target = ConfigText(fixed_size=False)
        self.stopenigma = ConfigYesNo(default=False)
        self.CopyFiles = ConfigYesNo(default=True)
        self.CopyKernel = ConfigYesNo(default=True)
        self.TvList = ConfigYesNo(default=False)
        self.Sterowniki = ConfigYesNo(default=False)
        self.InstallSettings = ConfigYesNo(default=False)
        self.ZipDelete = ConfigYesNo(default=False)
        self.RepairFTP = ConfigYesNo(default=False)
        self.SoftCam = ConfigYesNo(default=False)
        self.MediaPortal = ConfigYesNo(default=False)
        self.BlackHole = ConfigYesNo(default=False)
        self.target.value = ''
        self.curselimage = ''
        try:
            if self.curselimage != self.source.value:
                self.target.value = self.source.value[:-13]
                self.curselimage = self.source.value
        except:
            pass

        self.createSetup()
        ConfigListScreen.__init__(self, self.list, session=session)
        self.source.addNotifier(self.typeChange)
        self['actions'] = ActionMap(
            [
                'OkCancelActions', 'ColorActions', 'CiSelectionActions',
                'VirtualKeyboardActions'
            ], {
                'cancel': self.cancel,
                'red': self.cancel,
                'green': self.imageInstall,
                'yellow': self.HelpInstall,
                'blue': self.openKeyboard
            }, -2)
        self['key_green'] = Label(_('Install'))
        self['key_red'] = Label(_('Cancel'))
        self['key_yellow'] = Label(_('Help'))
        self['key_blue'] = Label(_('Keyboard'))
        self['HelpWindow'] = Pixmap()
        self['HelpWindow'].hide()
Ejemplo n.º 44
0
	def __init__(self, session, EIB_objects):
		skin = """
		<screen position="center,center" size="550,450" title="E.I.B.ox" >
			<widget name="config" position="10,420" size="530,26" zPosition="1" transparent="1" scrollbarMode="showNever" />
			<ePixmap pixmap="%s" position="0,0" size="550,400" zPosition="-1" alphatest="on" />\n""" % (img_prefix + EIB_objects.zone_img)

		offset = [12, 10] # fix up browser css spacing
		iconsize = [32, 32]

		self.setup_title = "E.I.B.ox"

		self.EIB_objects = EIB_objects
		for EIB_object in self.EIB_objects:
			if EIB_object.object_type == EIB_GOTO:
				pixmap_src = (img_prefix + 'goto' + EIB_object.img.capitalize() + '.png')
				skin += '\t\t\t<widget name="%s" pixmap="%s" position="%s" size="32,32" transparent="1" alphatest="on" borderColor="#004679" zPosition="1" />\n' % (EIB_object.object_id, pixmap_src, EIB_object.getPos(offset))
				self[EIB_object.object_id] = Pixmap()

			elif EIB_object.object_type in (EIB_SWITCH, EIB_MULTISWITCH, EIB_DIMMER):
				if EIB_object.object_type == EIB_DIMMER or EIB_object.img == "light":
					pixmaps_sources = ['light_off.png', 'light_on.png']
				elif EIB_object.img == "blinds":
					pixmaps_sources = ['blinds_up.png', 'blinds_down.png']
				elif EIB_object.img == "outlet":
					pixmaps_sources = ['outlet_off.png', 'outlet_on.png']
				elif EIB_object.img == "fan":
					pixmaps_sources = ['fan_off.png', 'fan_on.png']
				elif EIB_object.img == "pump":
					pixmaps_sources = ['pump_off.png', 'pump_on.png']
				else:
					pixmaps_sources = list(EIB_object.custom_img)

				for idx, filename in enumerate(pixmaps_sources):
					  pixmaps_sources[idx] = img_prefix + filename
				pixmaps_string = ','.join(pixmaps_sources)
				skin += '\t\t\t<widget name="%s" pixmaps="%s" position="%s" size="32,32" transparent="1" alphatest="on" borderColor="#004679" zPosition="1" />\n' % (EIB_object.object_id, pixmaps_string, EIB_object.getPos(offset))
				self[EIB_object.object_id] = MultiPixmap()

				if EIB_object.object_type == EIB_DIMMER:
					skin += '\t\t\t<widget source="%s_progress" render="Progress" pixmap="skin_default/progress_small.png" position="%s" size="32,5" backgroundColor="#4f74BB" zPosition="1" />\n' % (EIB_object.object_id, EIB_object.getPos([offset[0], offset[1] - iconsize[1]]))
					self[EIB_object.object_id + "_progress"] = Progress()
					self[EIB_object.object_id + "_progress"].range = 255

			elif EIB_object.object_type in (EIB_THERMO, EIB_TEXT):
				skin += '\t\t\t<widget name="%s" position="%s" size="120,20" font="Regular;14" halign="left" valign="center" foregroundColors="#000000,#0000FF" transparent="1" zPosition="1" />\n' % (EIB_object.object_id, EIB_object.getPos(offset))
				self[EIB_object.object_id] = MultiColorLabel()
		skin += """
		</screen>"""
		if config.eib.debug.value:
			print(skin)

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

		self["actions"] = ActionMap(["SetupActions", "OkCancelActions", "ColorActions", "DirectionActions"],
		{
			"up": self.keyUp,
			"upUp": self.keyPass,
			"upRepeated": self.keyUp,
			"down": self.keyDown,
			"downUp": self.keyPass,
			"downRepeated": self.keyDown,
			"leftRepeated": self.keyLeftRepeated,
			"rightRepeated": self.keyRightRepeated,
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keyOk,
			"ok": self.keyOk
		}, -2)

		self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 45
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(
                    _("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(
                    _("Delay after editing (in sec)"),
                    config.plugins.autotimer.editdelay,
                    _("This is the delay in seconds that the AutoTimer will wait after editing the AutoTimers."
                      )),
                getConfigListEntry(
                    _("Poll Interval (in h)"),
                    config.plugins.autotimer.interval,
                    _("This is the delay in hours that the AutoTimer will wait after a search to search the EPG again."
                      )),
                getConfigListEntry(
                    _("Timeout (in min)"), config.plugins.autotimer.timeout,
                    _("This is the duration in minutes that the AutoTimer is allowed to run."
                      )),
                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 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."
                      )),
                # TRANSLATORS: the double-percent is intentional and required, please don't make me hunt you down individually
                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 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 the Dreambox is recording."
                      )),
                getConfigListEntry(
                    _("Skip poll during epg refresh"),
                    config.plugins.autotimer.skip_during_epgrefresh,
                    _("If enabled, the polling will be skipped if EPGRefres is currently running."
                      )),
                getConfigListEntry(_("Popup timeout in seconds"),
                                   config.plugins.autotimer.popup_timeout,
                                   _("If 0, the popup will remain open.")),
                getConfigListEntry(
                    _("Remove not existing events"),
                    config.plugins.autotimer.check_eit_and_remove,
                    _("Check the event id (eit) and remove the timer if there is no corresponding EPG event. Due to compatible issues with SerienRecorder and IPRec, only timer created by AutoTimer are affected."
                      )),
                getConfigListEntry(_("Send debug messages to shell"),
                                   config.plugins.autotimer.log_shell, _("")),
                getConfigListEntry(_("Write debug messages into file"),
                                   config.plugins.autotimer.log_write, _("")),
                getConfigListEntry(_("Location and name of log file"),
                                   config.plugins.autotimer.log_file, _("")),
            ],
            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.keySave,
        })

        # Trigger change
        self.changed()

        self.onLayoutFinish.append(self.setCustomTitle)
Ejemplo n.º 46
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.skinName = "EnhancedMovieCenterMenu"
        self.skin = EnhancedMovieCenterMenu.skin
        self.screenTitle = "Enhanced Movie Center " + EMCVersion + " (Setup)"

        self["actions"] = ActionMap(
            ["SetupActions", "OkCancelActions", "EMCConfigActions"], {
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "red": self.keyCancel,
                "green": self.keySaveNew,
                "blueshort": self.loadPredefinedSettings,
                "bluelong": self.loadDefaultSettings,
                "nextBouquet": self.bouquetPlus,
                "prevBouquet": self.bouquetMinus,
            }, -2)  # higher priority

        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button(_("Save"))
        #		self["key_yellow"] = Button(" ")
        self["key_blue"] = Button()
        self["help"] = StaticText()

        # Key short / long pressed detection
        self.keylong = False

        self.list = []
        self.EMCConfig = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=session,
                                  on_change=self.changedEntry)
        self.needsRestartFlag = False
        self.defineConfig()
        self.createConfig()

        self.reloadTimer = eTimer()
        self.reloadTimer.callback.append(self.createConfig)

        # Override selectionChanged because our config tuples have a size bigger than 2
        def selectionChanged():
            current = self["config"].getCurrent()
            if self["config"].current != current:
                if self["config"].current:
                    self["config"].current[1].onDeselect(self.session)
                if current:
                    current[1].onSelect(self.session)
                self["config"].current = current
            for x in self["config"].onSelectionChanged:
                x()

        self["config"].selectionChanged = selectionChanged
        self["config"].onSelectionChanged.append(self.updateHelp)

        #Todo Remove if there is another solution, maybe thinkabout xml
        config.EMC.movie_finished_clean.addNotifier(self.changedEntry,
                                                    initial_call=False,
                                                    immediate_feedback=True)

        self.onShow.append(self.onDialogShow)
Ejemplo n.º 47
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["key_red"] = self["red"] = StaticText(_("Cancel"))
        self["key_green"] = 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)
Ejemplo n.º 48
0
    def __init__(self, session):
        global emuDir
        emuDir = "/etc/"
        self.service = None
        Screen.__init__(self, session)

        self.skin = SOFTCAM_SKIN
        self.onShown.append(self.setWindowTitle)
        self.partyfeed = None
        self.YellowAction = REFRESH

        self.mlist = []
        self["key_green"] = Label(_("Restart"))
        self["key_red"] = Label(_("Stop"))
        self["key_yellow"] = Label(_("Refresh"))
        self.partyfeed = os.path.exists(
            "/etc/opkg/3rdparty-feed.conf") or os.path.exists(
                "/etc/opkg/3rd-party-feed.conf")
        if self.partyfeed:
            self["key_blue"] = Label(_("Install"))
        else:
            self["key_blue"] = Label(_("Exit"))
        self["ecminfo"] = Label(_("No ECM info"))
        self["actifcam"] = Label(_("no CAM 1 active"))
        self["actifcam2"] = Label(_("no CAM 2 active"))

        #// create listings
        self.emuDirlist = []
        self.emuList = []
        self.emuBin = []
        self.emuStart = []
        self.emuStop = []
        self.emuRgui = []
        self.emuDirlist = os.listdir(emuDir)
        self.ecmtel = 0
        self.first = 0
        global count
        count = 0
        #// check emu dir for config files
        print "************ go in the emuloop ************"
        for x in self.emuDirlist:
            #// if file contains the string "emu" (then this is a emu config file)
            if x.find("emu") > -1:
                self.emuList.append(emuDir + x)
                em = open(emuDir + x)
                self.emuRgui.append(0)
                #// read the emu config file
                for line in em.readlines():
                    line1 = line
                    #// startcam
                    line = line1
                    if line.find("startcam") > -1:
                        line = line.split("=")
                        self.emuStart.append(line[1].strip())

                    #// stopcam
                    line = line1
                    if line.find("stopcam") > -1:
                        line = line.split("=")
                        self.emuStop.append(line[1].strip())

                    #// Restart GUI
                    line = line1
                    if line.find("restartgui") > -1:
                        self.emuRgui[count] = 1

                    #// binname
                    line = line1
                    if line.find("binname") > -1:
                        line = line.split("=")
                        self.emuBin.append(line[1].strip())

                em.close()
                count += 1

        self.maxcount = count

        self.onChangedEntry = []
        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)
        self.ReadMenu()
        self.createSetup()
        self["ecminfo"].show()

        self.read_shareinfo()
        self.Timer = eTimer()
        self.Timer.callback.append(self.layoutFinished)
        self.Timer.start(2000, True)
        #// get the remote buttons
        self["actions"] = ActionMap(
            ["OkCancelActions", "DirectionActions", "ColorActions"], {
                "cancel": self.Exit,
                "ok": self.ok,
                "blue": self.Blue,
                "red": self.Red,
                "green": self.Green,
                "yellow": self.Yellow,
            }, -1)
        #// update screen
        self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 49
0
    def __init__(self,
                 session,
                 job,
                 parent=None,
                 cancelable=True,
                 backgroundable=True,
                 afterEventChangeable=True,
                 afterEvent="nothing"):
        Screen.__init__(self, session, parent)
        Screen.setTitle(self, _("Job View"))
        InfoBarNotifications.__init__(self)
        ConfigListScreen.__init__(self, [])
        self.parent = parent
        self.job = job
        if afterEvent:
            self.job.afterEvent = afterEvent

        self["job_name"] = StaticText(job.name)
        self["job_progress"] = Progress()
        self["job_task"] = StaticText()
        self["summary_job_name"] = StaticText(job.name)
        self["summary_job_progress"] = Progress()
        self["summary_job_task"] = StaticText()
        self["job_status"] = StaticText()

        self.cancelable = cancelable
        self.backgroundable = backgroundable

        self["okActions"] = ActionMap(["SetupActions"], {
            "save": self.ok,
            "ok": self.ok,
        }, -2)

        self["abortActions"] = ActionMap(["SetupActions"], {
            "cancel": self.abort,
        }, -2)

        self["backgroundActions"] = ActionMap(["ColorActions"], {
            "blue": self.background,
        }, -2)

        self["key_green"] = StaticText("")
        self["okActions"].setEnabled(False)

        if self.cancelable:
            self["key_red"] = StaticText(_("Cancel"))
        else:
            self["key_red"] = StaticText("")
            self["abortActions"].setEnabled(False)

        if self.backgroundable:
            self["key_blue"] = StaticText(_("Background"))
        else:
            self["key_blue"] = StaticText("")
            self["backgroundActions"].setEnabled(False)

        self.onShow.append(self.windowShow)
        self.onHide.append(self.windowHide)

        self.settings = ConfigSubsection()
        if SystemInfo["DeepstandbySupport"]:
            shutdownString = _("go to deep standby")
        else:
            shutdownString = _("shut down")
        self.settings.afterEvent = ConfigSelection(choices=[
            ("nothing", _("do nothing")), ("close", _("Close")),
            ("standby", _("go to standby")), ("deepstandby", shutdownString)
        ],
                                                   default=self.job.afterEvent
                                                   or "nothing")
        self.job.afterEvent = self.settings.afterEvent.value
        self.afterEventChangeable = afterEventChangeable
        self.setupList()
        self.state_changed()
Ejemplo n.º 50
0
    def __init__(self, session):
        try:
            log("", self)
            Screen.__init__(self, session)
            HelpableScreen.__init__(self)

            self.cfglist = []
            ConfigListScreen.__init__(self,
                                      self.cfglist,
                                      session,
                                      on_change=self._changed)

            self._session = session
            self._hasChanged = False

            self.controller = None
            self.selected = None

            self.aspect = getAspect()
            self.old_service = self.session.nav.getCurrentlyPlayingServiceReference(
            )

            # Disable OSD Transparency
            try:
                self.can_osd_alpha = open("/proc/stb/video/alpha",
                                          "r") and True or False
            except:
                self.can_osd_alpha = False

            if config.plugins.enigmalight.sampleBackground.getValue() == True:
                self.showBackground()

            self["txt_green"] = Label()
            self["btn_green"] = Pixmap()

            self["statusbar"] = Pixmap()
            self["txt_statusbar"] = Label()
            self["txt_statusbar_info"] = Label()

            self["help"] = StaticText()

            self["setupActions"] = ActionMap(
                ["SetupActions", "ColorActions", "EL_Settings"], {
                    "green": self.keySave,
                    "red": self.keyCancel,
                    "cancel": self.keyCancel,
                    "ok": self.ok,
                    "left": self.keyLeft,
                    "right": self.keyRight,
                    "bouquet_up": self.keyBouquetUp,
                    "bouquet_down": self.keyBouquetDown,
                    "jumpNextMark": self.keyNext,
                    "jumpPreviousMark": self.keyPrev,
                }, -2)

            self["txt_green"].setText(_("Save"))

            self.createSetup()

            self.onLayoutFinish.append(self.finishLayout)

        except:
            from traceback import format_exc
            log("", self, "Error:" + format_exc())
            try:
                open(getCrashFilePath(), "w").write(format_exc())
            except:
                pass
Ejemplo n.º 51
0
    def __init__(self, session):
        self.session = session
        Screen.__init__(self, session)
        ### EDit By RAED To DreamOS OE2.5/2.6
        if DreamOS():
            self.wget = "/usr/bin/wget2 --no-check-certificate"
        else:
            self.wget = "/usr/bin/wget"
        if isHD():
            skin = loadSkin(PLUGIN_PATH + '/skin.xml')
        else:
            if DreamOS():
                skin = loadSkin(PLUGIN_PATH + '/skinfhdOS.xml')
            else:
                skin = loadSkin(PLUGIN_PATH + '/skinfhd.xml')


### End
        self.onChangedEntry = []
        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)
        ### EDit By RAED To Add privet keymap.xml
        self["actions"] = HelpableActionMap(
            self, "FreeServerminoActions", {
                'menu': self.KeyMenu,
                'info': self.KeyInfo,
                'blue': self.KeyBlue,
                'yellow': self.KeyYellow,
                'green': self.keySave,
                'red': self.keyClose,
                'cancel': self.keyClose,
                'ok': self.keySave,
                'left': self.keyLeft,
                'right': self.keyRight
            }, -1)
        ### End
        try:
            fp = urllib.urlopen(xml_path)
            count = 0
            self.labeltext = ''
            s1 = fp.readline()
            s2 = fp.readline()
            s3 = fp.readline()
            s1 = s1.strip()
            s2 = s2.strip()
            s3 = s3.strip()
            self.link = s2
            self.version = s1
            self.info = s3
            fp.close()
            cstr = s1 + ' ' + s2
            if s1 <= currversion:
                self.update = False
            else:
                self.update()
        except:
            if self.update == False:
                return

        self.__changed = self.changedEntry
        self['Box_1'] = Label('FreeServer V_' + version)
        self['Box_2'] = Label(line)
        self['Box_3'] = Label()
        self['Box_4'] = Label()
        self['text'] = Label('')
        self['logo'] = Pixmap()
        self['aime'] = Pixmap()
        self['logo'].hide()
        self['Box_2'].hide()
        self['Box_4'].setText('Last Update Servers  ' + ImportWritetimes())
        self['text'].hide()
        self['aime'].hide()
        self.showhide = False
        config.plugins.FreeServerminoo.Updattime.value = self.Verif_1(
            config.plugins.FreeServerminoo.Updattime.value)
        self.runSetup()
Ejemplo n.º 52
0
    def __init__(self, session, args=0):
        self.session = session
        Screen.__init__(self, session)
        if debug:
            print pluginPrintname, "Displays config screen"

        self.onChangedEntry = []

        self.list = [
            getConfigListEntry(_("Active Time Profile"),
                               config.plugins.elektro.profile,
                               _("The active Time Profile is (1 or 2).")),
            getConfigListEntry(
                _("Enable Elektro Power Save"), config.plugins.elektro.enable,
                _("Unless this is enabled, this plugin won't run automatically."
                  )),
            getConfigListEntry(
                _("Use both profiles alternately"),
                config.plugins.elektro.profileShift,
                _("Both profiles are used alternately. When shutting down the other profile is enabled. This allows two time cycles per day. Do not overlap the times."
                  )),
            getConfigListEntry(_("Standby on boot"),
                               config.plugins.elektro.standbyOnBoot,
                               _("Puts the box in standby mode after boot.")),
            getConfigListEntry(
                _("Standby on manual boot"),
                config.plugins.elektro.standbyOnManualBoot,
                _("Whether to put the box in standby when booted manually. On manual boot the box will not go to standby before the next deep standby interval starts, even if this option is set. This option is only active if 'Standby on boot' option is set, too."
                  )),
            getConfigListEntry(
                _("Standby on boot screen timeout"),
                config.plugins.elektro.standbyOnBootTimeout,
                _("Specify how long to show the standby query on boot screen. This value can be set to ensure the box does not shut down to deep standby again too fast when in standby mode."
                  )),
            getConfigListEntry(
                _("Force sleep (even when not in standby)"),
                config.plugins.elektro.force,
                _("Forces deep standby, even when not in standby mode. Scheduled recordings remain unaffected."
                  )),
            getConfigListEntry(
                _("Avoid deep standby when HDD is active, e.g. for FTP"),
                config.plugins.elektro.hddsleep,
                _("Wait for the HDD to enter sleep mode. Depending on the configuration this can prevent the box entirely from entering deep standby mode."
                  )),
            getConfigListEntry(
                _("Check IPs (press OK to edit)"),
                config.plugins.elektro.IPenable,
                _("This list of IP addresses is checked. Elektro waits until addresses no longer responds to ping."
                  )),
            getConfigListEntry(
                _("NAS Poweroff (press OK to edit)"),
                config.plugins.elektro.NASenable,
                _("A NAS/Server can be shut down. Is required activated Telnet."
                  )),
            getConfigListEntry(
                _("Don't wake up"), config.plugins.elektro.dontwakeup,
                _("Do not wake up at the end of next deep standby interval.")),
            getConfigListEntry(
                _("Holiday mode (experimental)"),
                config.plugins.elektro.holiday,
                _("The box always enters deep standby mode, except for recording."
                  )),
            getConfigListEntry(
                _("Show in"), config.plugins.elektro.menu,
                _("Specify whether plugin shall show up in plugin menu or extensions menu (needs GUI restart)"
                  )),
            getConfigListEntry(
                _("Name"), config.plugins.elektro.name,
                _("Specify plugin name to be used in menu (needs GUI restart)."
                  )),
            getConfigListEntry(
                _("Description"), config.plugins.elektro.description,
                _("Specify plugin description to be used in menu (needs GUI restart)."
                  )),
        ]

        ConfigListScreen.__init__(self,
                                  self.list,
                                  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.configHelp)

        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button(_("Ok"))
        self["key_yellow"] = Button(_("Help"))
        self["key_blue"] = Button(_("Times"))
        self["help"] = StaticText()

        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "red": self.keyCancel,
                "green": self.keySave,
                "yellow": self.help,
                "blue": self.profile,
                "save": self.keySave,
                "cancel": self.keyCancel,
                "ok": self.keyOK,
            }, -2)

        # Trigger change
        self.changed()

        self.onLayoutFinish.append(self.setCustomTitle)
Ejemplo n.º 53
0
	def __init__(self, session, nimList):
		Screen.__init__(self, session)
		self.setTitle(_("Fast Scan"))

		self.providers = {}
		self.providers['Canal Digitaal'] = (0, 900, True)
		self.providers['TV Vlaanderen'] = (0, 910, True)
		self.providers['TéléSAT'] = (0, 920, True)
		self.providers['Mobistar NL'] = (0, 930, False)
		self.providers['Mobistar FR'] = (0, 940, False)
		self.providers['AustriaSat'] = (0, 950, False)
		self.providers['Czech Republic'] = (1, 30, False)
		self.providers['Slovak Republic'] = (1, 31, False)

		self.transponders = ((12515000, 22000000, eDVBFrontendParametersSatellite.FEC_5_6, 192,
			eDVBFrontendParametersSatellite.Polarisation_Horizontal, eDVBFrontendParametersSatellite.Inversion_Unknown,
			eDVBFrontendParametersSatellite.System_DVB_S, eDVBFrontendParametersSatellite.Modulation_QPSK,
			eDVBFrontendParametersSatellite.RollOff_alpha_0_35, eDVBFrontendParametersSatellite.Pilot_Off),
			(12070000, 27500000, eDVBFrontendParametersSatellite.FEC_3_4, 235,
			eDVBFrontendParametersSatellite.Polarisation_Horizontal, eDVBFrontendParametersSatellite.Inversion_Unknown,
			eDVBFrontendParametersSatellite.System_DVB_S, eDVBFrontendParametersSatellite.Modulation_QPSK,
			eDVBFrontendParametersSatellite.RollOff_alpha_0_35, eDVBFrontendParametersSatellite.Pilot_Off))

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

		providerList = list(x[0] for x in sorted(self.providers.iteritems(), key = operator.itemgetter(1)))

		lastConfiguration = eval(config.misc.fastscan.last_configuration.value)
		if not lastConfiguration:
			lastConfiguration = (nimList[0][0], providerList[0], True, True, False)

		self.scan_nims = ConfigSelection(default = lastConfiguration[0], choices = nimList)
		self.scan_provider = ConfigSelection(default = lastConfiguration[1], choices = providerList)
		self.scan_hd = ConfigYesNo(default = lastConfiguration[2])
		self.scan_keepnumbering = ConfigYesNo(default = lastConfiguration[3])
		self.scan_keepsettings = ConfigYesNo(default = lastConfiguration[4])

		self.list = []
		self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims)
		self.list.append(self.tunerEntry)

		self.scanProvider = getConfigListEntry(_("Provider"), self.scan_provider)
		self.list.append(self.scanProvider)

		self.scanHD = getConfigListEntry(_("HD list"), self.scan_hd)
		self.list.append(self.scanHD)

		self.list.append(getConfigListEntry(_("Use fastscan channel numbering"), self.scan_keepnumbering))

		self.list.append(getConfigListEntry(_("Use fastscan channel names"), self.scan_keepsettings))

		ConfigListScreen.__init__(self, self.list)
		self["config"].list = self.list
		self["config"].l.setList(self.list)

		self.finished_cb = None

		self["introduction"] = Label(_("Select your provider, and press OK to start the scan"))
Ejemplo n.º 54
0
    def __init__(self, session, infobar):
        Screen.__init__(self, session)
        self.infobar = infobar or self.session.infobar

        self.wait = eTimer()
        self.wait.timeout.get().append(self.resyncSubtitles)

        self["videofps"] = Label("")

        sub = self.infobar.selected_subtitle
        if sub[0] == 0:  # dvb
            menu = [
                getConfigMenuItem("config.subtitles.dvb_subtitles_yellow"),
                getConfigMenuItem("config.subtitles.dvb_subtitles_centered"),
                getConfigMenuItem("config.subtitles.dvb_subtitles_backtrans"),
                getConfigMenuItem(
                    "config.subtitles.dvb_subtitles_original_position"),
                getConfigMenuItem("config.subtitles.subtitle_position"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_bad_timing_delay"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_noPTSrecordingdelay"),
            ]
        elif sub[0] == 1:  # teletext
            menu = [
                getConfigMenuItem("config.subtitles.ttx_subtitle_colors"),
                getConfigMenuItem(
                    "config.subtitles.ttx_subtitle_original_position"),
                getConfigMenuItem("config.subtitles.subtitle_fontsize"),
                getConfigMenuItem("config.subtitles.subtitle_position"),
                getConfigMenuItem("config.subtitles.subtitle_rewrap"),
                getConfigMenuItem("config.subtitles.subtitle_borderwidth"),
                getConfigMenuItem("config.subtitles.subtitle_alignment"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_bad_timing_delay"),
                getConfigMenuItem(
                    "config.subtitles.subtitle_noPTSrecordingdelay"),
            ]
        else:  # pango
            menu = [
                getConfigMenuItem("config.subtitles.pango_subtitles_delay"),
                getConfigMenuItem("config.subtitles.pango_subtitle_colors"),
                getConfigMenuItem(
                    "config.subtitles.pango_subtitle_fontswitch"),
                getConfigMenuItem("config.subtitles.colourise_dialogs"),
                getConfigMenuItem("config.subtitles.subtitle_fontsize"),
                getConfigMenuItem("config.subtitles.subtitle_position"),
                getConfigMenuItem("config.subtitles.subtitle_alignment"),
                getConfigMenuItem("config.subtitles.subtitle_rewrap"),
                getConfigMenuItem("config.subtitles.subtitle_borderwidth"),
                getConfigMenuItem("config.subtitles.pango_subtitles_fps"),
            ]
            self["videofps"].setText(
                _("Video: %s fps") % (self.getFps().rstrip(".000")))

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

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

        self.onLayoutFinish.append(self.layoutFinished)
Ejemplo n.º 55
0
    def __init__(self, session, args=None, picPath=None):
        self.skin_lines = []
        Screen.__init__(self, session)
        self.session = session
        self.datei = "/usr/share/enigma2/HDFreaks/skin.xml"
        self.dateiTMP = self.datei + ".tmp"
        self.daten = "/usr/lib/enigma2/python/Plugins/Extensions/HDFreaks/data/"
        self.komponente = "/usr/lib/enigma2/python/Plugins/Extensions/HDFreaks/comp/"
        self.picPath = picPath
        self.Scale = AVSwitch().getFramebufferScale()
        self.PicLoad = ePicLoad()
        self["helperimage"] = Pixmap()
        list = []

        list.append(
            getConfigListEntry(
                _(" >>>>>>>>> Weather - ID on weather.open-store.net <<<<<<<<"
                  ), ))
        list.append(
            getConfigListEntry(_("Weather"),
                               config.plugins.HDFreaks.WeatherStyle))
        list.append(
            getConfigListEntry(_("Weather ID"),
                               config.plugins.HDFreaks.weather_city))
        list.append(
            getConfigListEntry(
                _(" >>>>>>>>>>>>>>>>>> System Settings <<<<<<<<<<<<<<<<<"), ))
        list.append(
            getConfigListEntry(_("Running text"),
                               config.plugins.HDFreaks.RunningText))
        list.append(
            getConfigListEntry(_("Background transparency"),
                               config.plugins.HDFreaks.BackgroundColorTrans))
        list.append(
            getConfigListEntry(
                _(" >>>>>>>>>>>>>>>>>>> Color Settings <<<<<<<<<<<<<<<<<<"), ))
        list.append(
            getConfigListEntry(_("Listselection"),
                               config.plugins.HDFreaks.SelectionBackground))
        list.append(
            getConfigListEntry(_("Progress-/Volumebar"),
                               config.plugins.HDFreaks.Progress))
        list.append(
            getConfigListEntry(_("Primary font"),
                               config.plugins.HDFreaks.Font1))
        list.append(
            getConfigListEntry(_("Secondary font"),
                               config.plugins.HDFreaks.Font2))
        list.append(
            getConfigListEntry(_("Listselection font"),
                               config.plugins.HDFreaks.SelFont))

        ConfigListScreen.__init__(self, list)
        self["actions"] = ActionMap(
            [
                "OkCancelActions", "DirectionActions", "InputActions",
                "ColorActions"
            ], {
                "left": self.keyLeft,
                "down": self.keyDown,
                "up": self.keyUp,
                "right": self.keyRight,
                "red": self.exit,
                "yellow": self.reboot,
                "blue": self.showInfo,
                "green": self.save,
                "cancel": self.exit
            }, -1)
        self.onLayoutFinish.append(self.UpdatePicture)
    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(
                _("Poll Interval (in h)"), config.plugins.autotimer.interval,
                _("This is the delay in hours 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 extension menu"),
                config.plugins.autotimer.show_in_extensionsmenu,
                _("Enable this to be able to access the AutoTimer Overview from within the extension menu."
                  )),
            getConfigListEntry(
                _("Show in event menu"),
                config.plugins.autotimer.show_in_furtheroptionsmenu,
                _("Enable this to add item for create the AutoTimer into event menu (needs restart GUI)."
                  )),
            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(
                _("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."
                  )),
        ],
                                  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.keySave,
        })

        # Trigger change
        self.changed()

        self.onLayoutFinish.append(self.setCustomTitle)
Ejemplo n.º 57
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.session = session

        skin = skin_path + 'jmx_settings.xml'

        self.dreamos = False

        try:
            from boxbranding import getImageDistro, getImageVersion, getOEVersion
        except:
            self.dreamos = True
            if owibranding.getMachineBrand(
            ) == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
                skin = skin_path + 'DreamOS/jmx_settings.xml'

        with open(skin, 'r') as f:
            self.skin = f.read()

        self.setup_title = _('Bouquets Settings')

        self.onChangedEntry = []

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

        self.loaded = False

        self['information'] = Label('')

        self['key_red'] = StaticText(_('Cancel'))
        self['key_green'] = StaticText(_('Continue'))

        self['VirtualKB'].setEnabled(False)
        self['HelpWindow'] = Pixmap()
        self['VKeyIcon'] = Pixmap()
        self['HelpWindow'].hide()
        self['VKeyIcon'].hide()
        self['lab1'] = Label(_('Loading data... Please wait...'))

        self['actions'] = ActionMap(['SetupActions'], {
            'save': self.save,
            'cancel': self.cancel
        }, -2)

        self.pause = 100

        address = jglob.current_playlist['playlist_info']['address']
        self.playlisttype = jglob.current_playlist['playlist_info'][
            'playlisttype']

        # defaults
        if cfg.bouquet_id.value:
            jglob.bouquet_id = cfg.bouquet_id.value
        else:
            jglob.bouquet_id = 666

        # if xtream or external
        if self.playlisttype != 'local':
            protocol = jglob.current_playlist['playlist_info']['protocol']
            domain = jglob.current_playlist['playlist_info']['domain']
            port = str(jglob.current_playlist['playlist_info']['port'])
            host = str(protocol) + str(domain) + ':' + str(port) + '/'
            jglob.name = domain
        else:
            jglob.name = address

        if self.playlisttype == 'xtream':
            username = jglob.current_playlist['playlist_info']['username']
            password = jglob.current_playlist['playlist_info']['password']
            player_api = str(host) + 'player_api.php?username='******'&password='******'xmltv.php?username='******'&password='******'&action=get_live_categories'
            self.VodCategoriesUrl = player_api + '&action=get_vod_categories'
            self.SeriesCategoriesUrl = player_api + '&action=get_series_categories'

            self.LiveStreamsUrl = player_api + '&action=get_live_streams'
            self.VodStreamsUrl = player_api + '&action=get_vod_streams'
            self.SeriesUrl = player_api + '&action=get_series'

            jglob.epg_provider = True

        elif self.playlisttype == 'panel':
            username = jglob.current_playlist['playlist_info']['username']
            password = jglob.current_playlist['playlist_info']['password']
            jglob.xmltv_address = str(host) + 'xmltv.php?username='******'&password='******'bouquet_info' in jglob.current_playlist and jglob.current_playlist[
                'bouquet_info'] != {}:
            jfunc.readbouquetdata()
        else:
            # reset globals
            jglob.live_type = '4097'
            jglob.vod_type = '4097'
            jglob.vod_order = 'original'

            jglob.epg_rytec_uk = False
            jglob.epg_swap_names = False
            jglob.epg_force_rytec_uk = False

            jglob.live = True
            jglob.vod = False
            jglob.series = False
            jglob.prefix_name = True
            jglob.fixepg = False

        if self.playlisttype == 'xtream':
            self.timer = eTimer()
            self.timer.start(self.pause, 1)
            try:
                self.timer_conn = self.timer.timeout.connect(
                    self.downloadEnigma2Data)
            except:
                self.timer.callback.append(self.downloadEnigma2Data)

        elif self.playlisttype == "panel":
            self.timer = eTimer()
            self.timer.start(self.pause, 1)
            try:
                self.timer_conn = self.timer.timeout.connect(self.getPanelData)
            except:
                self.timer.callback.append(self.getPanelData)
        else:
            self.createConfig()
            self.createSetup()

        self.onLayoutFinish.append(self.__layoutFinished)

        if self.setInfo not in self['config'].onSelectionChanged:
            self['config'].onSelectionChanged.append(self.setInfo)
Ejemplo n.º 58
0
    def __init__(self, session):

        Screen.__init__(self, session)
        self.session = session
        #Summary
        self.setup_title = _("Show Clock Setup")

        self.onChangedEntry = []

        self.list = [
            getConfigListEntry(
                _('Clock show timeout'), config.plugins.ShowClock.showTimeout,
                _('Specify how long (seconds) the clock shall be shown before it disappears. Set to "0" to show clock until hidden manually.'
                  )),
            getConfigListEntry(
                _('Show clock und system startup?'),
                config.plugins.ShowClock.showOnBoot,
                _('Specify wheter the clock shall be shown at system start (will be hidden after the timeout defined above)'
                  )),
            getConfigListEntry(
                _('Show in'), config.plugins.ShowClock.menu,
                _('Specify whether plugin shall show up in plugin menu or extensions menu (needs GUI restart)'
                  )),
            getConfigListEntry(
                _('Name'), config.plugins.ShowClock.name,
                _('Specify plugin name to be used in menu (needs GUI restart).'
                  )),
            getConfigListEntry(
                _("Description"), config.plugins.ShowClock.description,
                _('Specify plugin description to be used in menu (needs GUI restart).'
                  )),
        ]

        ConfigListScreen.__init__(self,
                                  self.list,
                                  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.configHelp)

        # Initialize Buttons
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("Help"))
        self["key_blue"] = StaticText(_("Move clock"))

        self["help"] = StaticText()

        # Define Actions
        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "red": self.keyCancel,
                "green": self.keySave,
                "yellow": self.keyHelp,
                "blue": self.keyMove,
                "cancel": self.keyCancel,
                "save": self.keySave,
                "ok": self.keySave,
            }, -2)

        # Trigger change
        self.changed()

        self.onLayoutFinish.append(self.setCustomTitle)
Ejemplo n.º 59
0
    def __init__(self, session, args=None):
        Screen.__init__(self, session)

        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"))
        self["yellow"] = StaticText("")
        self["blue"] = StaticText("")

        for count in range(8):
            if count < tempcount:
                id = templist[count]
                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()

            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()):
            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))
            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"], {
                "ok": self.save,
                "cancel": self.revert,
                "red": self.revert,
                "green": self.save
            }, -1)
Ejemplo n.º 60
0
class AutomaticCleanupSetup(Screen, ConfigListScreen): # config

	skin = """
		<screen name="SystemCleanup" position="center,center" size="630,315" title="Automatic System Cleanup Setup" >
			<ePixmap pixmap="skin_default/buttons/red.png" position="5,5" zPosition="0" size="140,40" transparent="1" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/green.png" position="165,5" zPosition="0" size="140,40" transparent="1" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/yellow.png" position="325,5" zPosition="0" size="140,40" transparent="1" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/blue.png" position="485,5" zPosition="0" size="140,40" transparent="1" alphatest="on" />
			
			<widget render="Label" source="key_red" position="5,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget render="Label" source="key_green" position="165,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget render="Label" source="key_yellow" position="325,5" size="140,40" zPosition="2" valign="center" halign="center" backgroundColor="red" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />

			<widget name="config" position="5,60" size="620,155" scrollbarMode="showOnDemand" />

			<ePixmap pixmap="skin_default/div-h.png" position="0,220" zPosition="1" size="630,2" />
			<widget source="help" render="Label" position="5,235" size="620,75" font="Regular;21" /> 
		</screen>"""

	def __init__(self, session):
		Screen.__init__(self, session)
		
		#Summary
		self.setup_title = _("Automatic System Cleanup Setup")

		self.onChangedEntry = []		

		self.list = [
			getConfigListEntry(_("Delete system setting backups"), config.plugins.AutomaticCleanup.deleteSettingsOlderThan,
				_("Specify, how long system setting backups shall be kept at most (even if maximum number is not yet exceeded). Latest backup will be kept anyway!")),
			getConfigListEntry(_("Maximum number of system setting backups"), config.plugins.AutomaticCleanup.keepSettings,
				_("Maximum number of system setting backups to keep, regardless of retention period.")),
			getConfigListEntry(_("Delete orphaned movie files"), config.plugins.AutomaticCleanup.deleteOrphanedMovieFiles,
				_("If enabled, orphaned movie files will be automatically deleted from movie directories.")),
			getConfigListEntry(_("Delete crashlogs"), config.plugins.AutomaticCleanup.deleteCrashlogsOlderThan,
				_('Sorry, this feature is not available due to license reasons. To get the full version, please search the web for "dreambox automaticcleanup."')),
			getConfigListEntry(_("Maximum number of crashlogs"), config.plugins.AutomaticCleanup.keepCrashlogs,
				_('Sorry, this feature is not available due to license reasons. To get the full version, please search the web for "dreambox automaticcleanup."')),
			]

		try:
			# try to import EMC module to check for its existence
			from Plugins.Extensions.EnhancedMovieCenter.EnhancedMovieCenter import EnhancedMovieCenterMenu 
			self.EMC_timer_autocln = config.EMC.timer_autocln.value
		except ImportError, ie:
			print pluginPrintname, "EMC not installed:", ie
			self.EMC_timer_autocln = False
			
		if self.EMC_timer_autocln: # Timer cleanup enabled in EMC plugin?
			self.list.append(getConfigListEntry(_("Delete timerlist entries"), config.plugins.AutomaticCleanup.deleteTimersOlderThan,
				_("Timerlist cleanup is enabled in EMC plugin! To avoid crashes, we won't delete entries whilst this option is enabled in EMC."))) # Avoid duplicate cleanup
		else:
			self.list.append(getConfigListEntry(_("Delete timerlist entries"), config.plugins.AutomaticCleanup.deleteTimersOlderThan,
				_("Specify, how long expired timer list entries shall be kept at most. Deactivated repeat timer entries won't be deleted ever.")))
			
		ConfigListScreen.__init__(self, self.list, 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.configHelp)

		# Initialize Buttons
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["key_yellow"] = StaticText(_("Help"))

		self["help"] = StaticText()		

		# Define Actions		
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
			{
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow": self.keyHelp,		
			"cancel": self.keyCancel,
			"save": self.keySave,
			"ok": self.keySave,
			}, -2)

		# Trigger change
		self.changed()

		self.onLayoutFinish.append(self.setCustomTitle)