def __init__(self, session, device):
		Screen.__init__(self, session)
		self.inputDevice = device
		iInputDevices.currentDevice = self.inputDevice
		self.onChangedEntry = [ ]
		self.setup_title = _("Input device setup")
		self.isStepSlider = None
		self.enableEntry = None
		self.repeatEntry = None
		self.delayEntry = None
		self.nameEntry = None
		self.enableConfigEntry = None

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

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

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

		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
	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."))
	def __init__(self, session):
		Screen.__init__(self, session)
		
		self["red"] = Label()
		self["green"] = Label()
		
		self.list = []
		self["list"] = PluginList(self.list)
		
		self["actions"] = ActionMap(["WizardActions"],
		{
			"ok": self.save,
			"back": self.close,
		})
		self["PluginDownloadActions"] = ActionMap(["ColorActions"],
		{
			"red": self.delete,
			"green": self.download
		})
		self["SoftwareActions"] = ActionMap(["ColorActions"],
		{
			"red": self.openExtensionmanager
		})
		self["PluginDownloadActions"].setEnabled(False)
		self["SoftwareActions"].setEnabled(False)
		self.onFirstExecBegin.append(self.checkWarnings)
		self.onShown.append(self.updateList)
Exemple #4
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = HelpableActionMap(self, "InfobarActions",
			{
				"showMovies": (self.showMovies, _("Play recorded movies...")),
				"showRadio": (self.showRadio, _("Show the radio player...")),
				"showTv": (self.showTv, _("Show the tv player...")),
			}, prio=2)

		self.allowPiP = True

		for x in HelpableScreen, \
				InfoBarBase, InfoBarShowHide, \
				InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder,  DeliteBp, DeliteGp, \
				InfoBarInstantRecord, InfoBarAudioSelection, InfoBarRedButton, InfoBarTimerButton, InfoBarUnhandledKey, InfoBarVmodeButton,\
				InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, InfoBarBuffer, \
				InfoBarTimeshift, InfoBarSeek, InfoBarCueSheetSupport, InfoBarSummarySupport, InfoBarTimeshiftState, \
				InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, InfoBarPowersaver, \
				InfoBarPlugins, InfoBarServiceErrorPopupSupport, InfoBarHotkey:
			x.__init__(self)

		self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("Watch recordings..."))]))
		self.helpList.append((self["actions"], "InfobarActions", [("showRadio", _("Listen to the radio..."))]))

		self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
			{
				enigma.iPlayableService.evUpdatedEventInfo: self.__eventInfoChanged
			})

		self.current_begin_time=0
		assert InfoBar.instance is None, "class InfoBar is a singleton class and just one instance of this class is allowed!"
		InfoBar.instance = self
	def __init__(self, session):
		Screen.__init__(self, session)

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

		self["key_blue"] = Label(_("Save"))
		self["key_green"] = Label(_("Monitor"))
		self["static_ip"] = Label(_("Static IP : Please wait..."))

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

		self.static_ip=None
		self.StaticIPTimer = eTimer()
		self.StaticIPTimer.callback.append(self.iptimeout)

		self.gateway="192.168.1.1"
		self.current_cardnum ="C - 01"
		self.init()
		self.reload_list()
		self.StaticIPTimer.start(500, True)	
		self.hide()
Exemple #6
0
	def __init__(self, session, retvalue=1, timeout=-1, default_yes = False):
		self.retval = retvalue
		recordings = session.nav.getRecordings()
		jobs = len(job_manager.getPendingJobs())
		self.connected = False
		reason = ""
		next_rec_time = -1
		if not recordings:
			next_rec_time = session.nav.RecordTimer.getNextRecordingTime()
		if recordings or (next_rec_time > 0 and (next_rec_time - time()) < 360):
			reason = _("Recording(s) are in progress or coming up in few seconds!") + '\n'
		if jobs:
			if jobs == 1:
				job = job_manager.getPendingJobs()[0]
				reason += "%s: %s (%d%%)\n" % (job.getStatustext(), job.name, int(100*job.progress/float(job.end)))
			else:
				reason += (ngettext("%d job is running in the background!", "%d jobs are running in the background!", jobs) % jobs) + '\n'
		if reason:
			text = { 1: _("Really shutdown now?"),
				2: _("Really reboot now?"),
				3: _("Really restart now?"),
				4: _("Really upgrade the frontprocessor and reboot now?"),
				42: _("Really upgrade your settop box and reboot now?") }.get(retvalue)
			if text:
				MessageBox.__init__(self, session, reason+text, type = MessageBox.TYPE_YESNO, timeout = timeout, default = default_yes)
				self.skinName = "MessageBoxSimple"
				session.nav.record_event.append(self.getRecordEvent)
				self.connected = True
				self.onShow.append(self.__onShow)
				self.onHide.append(self.__onHide)
				return
		self.skin = """<screen position="0,0" size="0,0"/>"""
		Screen.__init__(self, session)
		self.close(True)
	def __init__(self, session, type):
		Screen.__init__(self, session)
		
		self.type = type
		
		self.container = eConsoleAppContainer()
		self.container.appClosed.append(self.runFinished)
		self.container.dataAvail.append(self.dataAvail)
		self.onLayoutFinish.append(self.startRun)
		self.onShown.append(self.setWindowTitle)
		
		self.list = []
		self["list"] = PluginList(self.list)
		self.pluginlist = []
		self.expanded = []
		self.installedplugins = []
		
		if self.type == self.DOWNLOAD:
			self["text"] = Label(_("Downloading plugin information. Please wait..."))
		elif self.type == self.REMOVE:
			self["text"] = Label(_("Getting plugin information. Please wait..."))
		
		self.run = 0

		self.remainingdata = ""

		self["actions"] = ActionMap(["WizardActions"], 
		{
			"ok": self.go,
			"back": self.close,
		})
Exemple #8
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.skinName = ["CommitInfo", "About"]
		self["AboutScrollLabel"] = ScrollLabel(_("Please wait"))

		self["actions"] = ActionMap(["SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown,
				"left": self.left,
				"right": self.right
			})

		self.project = 0
		self.projects = [
			("enigma2", "Enigma2"),
			("openpli-oe-core", "Openpli Oe Core"),
			("enigma2-plugins", "Enigma2 Plugins"),
			("aio-grab", "Aio Grab"),
			("gst-plugin-dvbmediasink", "Gst Plugin Dvbmediasink"),
			("openembedded", "Openembedded"),
			("plugin-xmltvimport", "Plugin Xmltvimport"),
			("plugins-enigma2", "Plugins Enigma2"),
			("skin-magic", "Skin Magic"),
			("tuxtxt", "Tuxtxt")
		]
		self.cachedProjects = {}
		self.Timer = eTimer()
		self.Timer.callback.append(self.readCommitLogs)
		self.Timer.start(50, True)
Exemple #9
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

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

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

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
Exemple #10
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("CIHelper Setup"))
		self.skinName = "CIHelper"
		self.onChangedEntry = [ ]
		self['ci0'] = Label(_("CIHelper for SLOT CI0"))
		self['ci0active'] = Pixmap()
		self['ci0inactive'] = Pixmap()
		self['ci1'] = Label(_("CIHelper for SLOT CI1"))
		self['ci1active'] = Pixmap()
		self['ci1inactive'] = Pixmap()

		self['autostart'] = Label(_("Autostart:"))
		self['labactive'] = Label(_(_("Active")))
		self['labdisabled'] = Label(_(_("Disabled")))
		self['status'] = Label(_("Current Status:"))
		self['labstop'] = Label(_("Stopped"))
		self['labrun'] = Label(_("Running"))
		self['key_red'] = Label()
		self['key_green'] = Label(_("Start"))
		self['key_yellow'] = Label(_("Autostart"))
		self['key_blue'] = Label()
		self.Console = Console()
		self.my_cihelper_active = False
		self.my_cihelper_run = False
		self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'SetupActions'], {'ok': self.setupcihelper, 'back': self.close, 'menu': self.setupcihelper, 'green': self.CIHelperStartStop, 'yellow': self.CIHelperset})
		self.onLayoutFinish.append(self.updateService)
Exemple #11
0
	def __init__(self, session):
		Screen.__init__(self, session)
		# don't remove the string out of the _(), or it can't be "translated" anymore.

		# TRANSLATORS: Add here whatever should be shown in the "translator" about screen, up to 6 lines (use \n for newline)
		info = _("TRANSLATOR_INFO")

		if info == "TRANSLATOR_INFO":
			info = "(N/A)"

		infolines = _("").split("\n")
		infomap = {}
		for x in infolines:
			l = x.split(': ')
			if len(l) != 2:
				continue
			(type, value) = l
			infomap[type] = value
		print infomap

		self["TranslationInfo"] = StaticText(info)

		translator_name = infomap.get("Language-Team", "none")
		if translator_name == "none":
			translator_name = infomap.get("Last-Translator", "")

		self["TranslatorName"] = StaticText(translator_name)

		self["actions"] = ActionMap(["SetupActions"],
			{
				"cancel": self.close,
				"ok": self.close,
			})
Exemple #12
0
	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)
Exemple #13
0
	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)
Exemple #14
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent=parent)
		self["selected"] = StaticText("ViX:" + getImageVersion())

		AboutText = _("Model: %s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			chipset = open('/proc/stb/info/chipset', 'r').read()
			AboutText += _("Chipset: BCM%s") % chipset.replace('\n', '') + "\n"

		AboutText += _("Version: %s") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers: %s") % driversdate + "\n"
		AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n', '') + mark + "C\n\n"

		self["AboutText"] = StaticText(AboutText)
Exemple #15
0
	def __init__(self, session, menu_path = ""):
		Screen.__init__(self, session)
		self.menu_path = menu_path
		self.screentitle = _("OE Changes")
		self.skinName = "SoftwareUpdateChanges"
		self.logtype = 'oe'
		self["menu_path_compressed"] = StaticText("")
		self["text"] = ScrollLabel()
		self['title_summary'] = StaticText()
		self['text_summary'] = StaticText()
		self["key_red"] = Button(_("Close"))
		self["key_green"] = Button(_("OK"))
		self["key_yellow"] = Button(_("Show E2 Log"))
		self["myactions"] = ActionMap(['ColorActions', 'OkCancelActions', 'DirectionActions'],
									  {
										  'cancel': self.closeRecursive,
										  'green': self.closeRecursive,
										  "red": self.closeRecursive,
										  "yellow": self.changelogtype,
										  "left": self.pageUp,
										  "right": self.pageDown,
										  "down": self.pageDown,
										  "up": self.pageUp
									  }, -1)
		self.onLayoutFinish.append(self.getlog)
Exemple #16
0
	def __init__(self, session, menu_path = ""):
		Screen.__init__(self, session)
		screentitle = _("Devices")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)
		self["TunerHeader"] = StaticText(_("Detected tuners:"))
		self["HDDHeader"] = StaticText(_("Detected devices:"))
		self["MountsHeader"] = StaticText(_("Network servers:"))
		self["nims"] = StaticText()
		for count in (0, 1, 2, 3):
			self["Tuner" + str(count)] = StaticText("")
		self["hdd"] = StaticText()
		self["mounts"] = StaticText()
		self.list = []
		self.activityTimer = eTimer()
		self.activityTimer.timeout.get().append(self.populate2)
		self["key_red"] = Button(_("Close"))
		self["actions"] = ActionMap(["SetupActions", "ColorActions", "TimerEditActions"],
									{
										"cancel": self.close,
										"ok": self.close,
										"red": self.close,
									})
		self.onLayoutFinish.append(self.populate)
Exemple #17
0
	def __init__(self, session, menu_path = ""):
		Screen.__init__(self, session)
		screentitle = _("Network")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)
		self.skinName = ["SystemNetworkInfo", "WlanStatus"]
		self["LabelBSSID"] = StaticText()
		self["LabelESSID"] = StaticText()
		self["LabelQuality"] = StaticText()
		self["LabelSignal"] = StaticText()
		self["LabelBitrate"] = StaticText()
		self["LabelEnc"] = StaticText()
		self["BSSID"] = StaticText()
		self["ESSID"] = StaticText()
		self["quality"] = StaticText()
		self["signal"] = StaticText()
		self["bitrate"] = StaticText()
		self["enc"] = StaticText()

		self["IFtext"] = StaticText()
		self["IF"] = StaticText()
		self["Statustext"] = StaticText()
		self["statuspic"] = MultiPixmap()
		self["statuspic"].setPixmapNum(1)
		self["statuspic"].show()
		self["devicepic"] = MultiPixmap()

		self.iface = None
		self.createscreen()
		self.iStatus = None

		if iNetwork.isWirelessInterface(self.iface):
			try:
				from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus

				self.iStatus = iStatus
			except:
				pass
			self.resetList()
			self.onClose.append(self.cleanup)

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

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"],
									{
										"cancel": self.close,
										"ok": self.close,
										"up": self["AboutScrollLabel"].pageUp,
										"down": self["AboutScrollLabel"].pageDown
									})
		self.onLayoutFinish.append(self.updateStatusbar)
Exemple #18
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")
Exemple #19
0
	def __init__(self, session, timer):
		Screen.__init__(self, session)
		self.timer = timer;
		self.log_entries = self.timer.log_entries[:]

		self.fillLogList()

		self["loglist"] = MenuList(self.list)
		self["logentry"] = Label()

		self["key_red"] = Button(_("Delete entry"))
		self["key_green"] = Button()
		self["key_yellow"] = Button("")
		self["key_blue"] = Button(_("Clear log"))

		self.onShown.append(self.updateText)

		self["actions"] = NumberActionMap(["OkCancelActions", "DirectionActions", "ColorActions"],
		{
			"ok": self.keyClose,
			"cancel": self.keyClose,
			"up": self.up,
			"down": self.down,
			"left": self.left,
			"right": self.right,
			"red": self.deleteEntry,
			"blue": self.clearLog
		}, -1)
		self.setTitle(_("Timer log"))
    def __init__(self, session):
        Screen.__init__(self, session)
        self.list = []
        self.servicelist = ParentalControlList(self.list)
        self["servicelist"] = self.servicelist
        # self.onShown.append(self.chooseLetter)
        self.currentLetter = chr(SPECIAL_CHAR)
        self.readServiceList()
        self.chooseLetterTimer = eTimer()
        self.chooseLetterTimer.callback.append(self.chooseLetter)
        self.onLayoutFinish.append(self.LayoutFinished)

        self["actions"] = NumberActionMap(
            ["DirectionActions", "ColorActions", "OkCancelActions", "NumberActions"],
            {
                "ok": self.select,
                "cancel": self.cancel,
                # "left": self.keyLeft,
                # "right": self.keyRight,
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal,
            },
            -1,
        )
    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)
Exemple #22
0
	def __init__(self, session):
		Screen.__init__(self, session)

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

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

		self.list = []
		tlist = []

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

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

			need_scan = False
			networks = self.getNetworksForNim(nim)

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

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

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

			if need_scan:
				nims_to_scan.append(nim)

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

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

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

		ConfigListScreen.__init__(self, self.list)
		self["header"] = Label(_("Automatic scan"))
		self["footer"] = Label(_("Press OK to scan"))
Exemple #23
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["key_red"] = StaticText(_("Close"))
        self["key_yellow"] = StaticText(_("Delete"))
        self["key_blue"] = StaticText(_("OK"))
        self["text"] = Label(_(""))
        self["state"] = Label(_(""))
        self["step"] = Label(_(""))

        self["actions"] = NumberActionMap(["SetupActions"], {"cancel": self.keyCancel}, -2)
        self["ColorActions"] = HelpableActionMap(
            self,
            "ColorActions",
            {
                "red": (self.close, _("exit")),
                "yellow": (self.DeleteGo, _("password set to blank")),
                "blue": (self.ChangeGo, _("making new password for telnet and ftp")),
            },
        )

        self.hideDeleteButton = False
        if self.checkPassword("root", ""):
            self.hideDeleteButton = True

        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.pw = ConfigSubsection()
        self.login = 0
        self.createConfig()
        self.createSetup()
        self.timeout = 8
        self.reset = False
Exemple #24
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Plugin Browser"))

        self.firsttime = True

        self["red"] = Label(_("Remove plugins"))
        self["green"] = Label(_("Download plugins"))

        self.list = []
        self["list"] = PluginList(self.list)
        if config.usage.sort_pluginlist.getValue():
            self["list"].list.sort()

        self["actions"] = ActionMap(
            ["SetupActions", "WizardActions"], {"ok": self.save, "back": self.close, "menu": self.menu}
        )
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {"red": self.delete, "green": self.download})

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
        if config.pluginfilter.userfeed.getValue() != "http://":
            if not os.path.exists("/etc/opkg/user-feed.conf"):
                CreateFeedConfig()
	def __init__(self, session, infobar=None):
		Screen.__init__(self, session)
        
		self["actions"] = ActionMap(["SetupActions"],
		{
			"ok": self.ok,
			"cancel": self.cancel,
		}, -2)

		self.list = []
		ConfigListScreen.__init__(self, self.list)
		if self.session.infobar is None:	
			if InfoBar.instance:
				self.infobar = InfoBar.instance
		else:
			self.infobar = self.session.infobar

		self.fillList()

		self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
			{
				iPlayableService.evUpdatedInfo: self.__updatedInfo
			})
		self.cached_subtitle_checked = False
		self.__selected_subtitle = None
	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)

		self.edittext = _("Press OK to edit the settings.")

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Select"))
		self["key_yellow"] = StaticText("")
		self["key_blue"] = StaticText("")
		self["introduction"] = StaticText(self.edittext)

		self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
		print "[InputDeviceSelection] found devices :->", len(self.devices),self.devices

		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
			"cancel": (self.close, _("Exit input device selection.")),
			"ok": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
			"red": (self.close, _("Exit input device selection.")),
			"green": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self.currentIndex = 0
		self.list = []
		self["list"] = List(self.list)
		self.updateList()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
Exemple #27
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.session = session
        self.skinName = "Setup"
        Screen.setTitle(self, _("Plugin Filter..."))
        self["HelpWindow"] = Pixmap()
        self["HelpWindow"].hide()
        self["status"] = StaticText()
        self["labelExitsave"] = Label("[Exit] = " + _("Cancel") + "              [Ok] =" + _("Save"))

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

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

        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        if not self.selectionChanged in self["config"].onSelectionChanged:
            self["config"].onSelectionChanged.append(self.selectionChanged)
        self.selectionChanged()
Exemple #28
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)
	def __init__(self, session, device):
		Screen.__init__(self, session)
		self.inputDevice = device
		iInputDevices.currentDevice = self.inputDevice
		self.onChangedEntry = [ ]
		self.setup_title = _("Input device setup")
		self.isStepSlider = None
		self.enableEntry = None
		self.repeatEntry = None
		self.delayEntry = None
		self.nameEntry = None
		self.enableConfigEntry = None

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

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

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

		# for generating strings into .po only
		devicenames = [_("STB_BOX front panel"),_("STB_BOX front panel"),_("STB_BOX remote control (native)"),_("STB_BOX advanced remote control (native)"),_("STB_BOX ir keyboard"),_("STB_BOX ir mouse")]

		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
	def __init__(self, session, menu_path = ""):
		Screen.__init__(self, session)
		screentitle = _("Streaming clients info")
		menu_path += screentitle
		if config.usage.show_menupath.value == 'large':
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)
		clients = ClientsStreaming("INFO_RESOLVE")
		text = clients.getText()

		self["ScrollLabel"] = ScrollLabel(text or _("No stream clients"))

		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
		{
			"cancel": self.close,
			"ok": self.close,
			"up": self["ScrollLabel"].pageUp,
			"down": self["ScrollLabel"].pageDown
		})
Exemple #31
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     self["entry"] = StaticText("")
     self["desc"] = StaticText("")
     self.onShow.append(self.addWatcher)
     self.onHide.append(self.removeWatcher)
Exemple #32
0
    def __init__(self, session):
        Screen.__init__(self, session)
        logoname = "Hypercube"
        # show
        #		try:
        #			fd = open("/proc/stb/info/eeprom/customer_id",'r');
        #			costomid = fd.read(8)
        #			print costomid
        #			for cust in custidlist:
        #				if cust["custid"] == costomid:
        #					logoname = cust["custname"]
        #					break
        #		except:
        #			pass

        self["AboutTitle"] = StaticText("About " + logoname)
        #		AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText = _("Hardware: ") + logoname + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _(
            "Kernel Version: ") + about.getKernelVersionString() + "\n"

        EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + "\n"

        ImageVersion = _("Last Upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += "%s\n(%s, %d GB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free() / 1024,
                        _("free"))
                else:
                    hddinfo += "%s\n(%s, %d MB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free(), _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo
        self["AboutScrollLabel"] = ScrollLabel(AboutText)

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "green": self.showTranslationInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Exemple #33
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        AboutText = _("Model: %s %s") % (getMachineBrand(),
                                         getMachineName()) + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"
        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset: %s") % about.getChipSetString() + "\n"
        AboutText += _("CPU: %s") % about.getCPUString() + "\n"
        AboutText += _("Version: %s") % getImageVersion() + "\n"
        AboutText += _("Build: %s") % getImageBuild() + "\n"
        if path.exists('/proc/stb/info/release') and getBoxType() in (
                'et7000', 'et7500', 'et8500'):
            realdriverdate = open("/proc/stb/info/release", 'r')
            for line in realdriverdate:
                tmp = line.strip()
                AboutText += _("Drivers: %s") % tmp + "\n"
            realdriverdate.close()
        else:
            string = getDriverDate()
            year = string[0:4]
            month = string[4:6]
            day = string[6:8]
            driversdate = '-'.join((year, month, day))
            AboutText += _("Drivers: %s") % driversdate + "\n"
        EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + "\n"
        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value

        GStreamerVersion = "GStreamer: " + about.getGStreamerVersionString(
        ).replace("GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n" + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()
        AboutText += _("Skin Name: %s") % config.skin.primary_skin.value[
            0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\n"

        if path.exists('/etc/enigma2/EtRcType'):
            rfp = open('/etc/enigma2/EtRcType', "r")
            Remote = rfp.read()
            rfp.close
            AboutText += _("Remote control type") + _(": ") + Remote + "\n"
        else:
            AboutText += _("Remote control type") + _(
                ": ") + iRcTypeControl.getBoxType() + "\n"

        if path.exists('/proc/stb/ir/rc/type'):
            fp = open('/proc/stb/ir/rc/type', "r")
            RcID = fp.read()
            fp.close
            AboutText += _("Remote control ID") + _(": ") + RcID

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Troubleshoot"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Memory Info"))
        self["key_blue"] = Button(_("%s ") % getMachineName() + _("picture"))

        self["actions"] = ActionMap(
            [
                "ColorActions", "SetupActions", "DirectionActions",
                "ChannelSelectEPGActions"
            ], {
                "cancel": self.close,
                "ok": self.close,
                "info": self.showTranslationInfo,
                "red": self.showCommits,
                "green": self.showTroubleshoot,
                "yellow": self.showMemoryInfo,
                "blue": self.showModelPic,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Exemple #34
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent)
     self["text"] = StaticText("")
     self.onShow.append(self.setCallback)
Exemple #35
0
    def __init__(self,
                 session,
                 showSteps=True,
                 showStepSlider=True,
                 showList=True,
                 showConfig=True):
        Screen.__init__(self, session)

        self.isLastWizard = False  # can be used to skip a "goodbye"-screen in a wizard

        self.stepHistory = []

        self.wizard = {}
        parser = make_parser()
        if not isinstance(self.xmlfile, list):
            self.xmlfile = [self.xmlfile]
        print "Reading ", self.xmlfile
        wizardHandler = self.parseWizard(self.wizard)
        parser.setContentHandler(wizardHandler)
        for xmlfile in self.xmlfile:
            if xmlfile[0] != '/':
                parser.parse(eEnv.resolve('${datadir}/enigma2/') + xmlfile)
            else:
                parser.parse(xmlfile)

        self.showSteps = showSteps
        self.showStepSlider = showStepSlider
        self.showList = showList
        self.showConfig = showConfig

        self.numSteps = len(self.wizard)
        self.currStep = self.getStepWithID("start") + 1

        self.timeoutTimer = eTimer()
        self.timeoutTimer.callback.append(self.timeoutCounterFired)

        self["text"] = Label()

        if showConfig:
            self["config"] = ConfigList([], session=session)

        if self.showSteps:
            self["step"] = Label()

        if self.showStepSlider:
            self["stepslider"] = Slider(1, self.numSteps)

        if self.showList:
            self.list = []
            self["list"] = List(self.list, enableWrapAround=True)
            self["list"].onSelectionChanged.append(self.selChanged)
            #self["list"] = MenuList(self.list, enableWrapAround = True)

        self.onShown.append(self.updateValues)

        self.configInstance = None
        self.currentConfigIndex = None

        Wizard.instance = self

        self.lcdCallbacks = []

        self.disableKeys = False

        self["actions"] = NumberActionMap(
            [
                "WizardActions", "NumberActions", "ColorActions",
                "SetupActions", "InputAsciiActions", "KeyboardInputActions"
            ], {
                "gotAsciiCode": self.keyGotAscii,
                "ok": self.ok,
                "back": self.back,
                "left": self.left,
                "right": self.right,
                "up": self.up,
                "down": self.down,
                "red": self.red,
                "green": self.green,
                "yellow": self.yellow,
                "blue": self.blue,
                "deleteBackward": self.deleteBackward,
                "deleteForward": self.deleteForward,
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal
            }, -1)

        self["VirtualKB"] = NumberActionMap(
            ["VirtualKeyboardActions"], {
                "showVirtualKeyboard": self.KeyText,
            }, -2)

        self["VirtualKB"].setEnabled(False)
Exemple #36
0
	def __init__(self, session, textinput):
		Screen.__init__(self, session)
		for x in (1, 2, 3, 4, 5, 6, 7, 8, 9):
			self["key%d" % x] = Label(text=textinput.mapping[x].encode("utf-8"))
		self.last_marked = 0
Exemple #37
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("Plugin Browser"))
        ProtectedScreen.__init__(self)

        self.firsttime = True

        self["key_red"] = self["red"] = Label(_("Remove plugins"))
        self["key_green"] = self["green"] = Label(_("Download plugins"))
        self["key_blue"] = self["blue"] = Label(_("Hold plugins"))

        self.list = []
        self["list"] = PluginList(self.list)
        if config.usage.sort_pluginlist.getValue():
            self["list"].list.sort()

        self["actions"] = ActionMap(
            ["SetupActions", "WizardActions", "EPGSelectActions"], {
                "ok": self.save,
                "back": self.close,
                "menu": self.menu,
            })
        self["PluginDownloadActions"] = ActionMap(["ColorActions"], {
            "red": self.delete,
            "green": self.download,
            "blue": self.toogle
        })
        self["DirectionActions"] = ActionMap(["DirectionActions"], {
            "moveUp": self.moveUp,
            "moveDown": self.moveDown
        })
        self["NumberActions"] = NumberActionMap(
            ["NumberActions"], {
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal
            })
        self["HelpActions"] = ActionMap(["HelpActions"], {
            "displayHelp": self.showHelp,
        })
        self.help = False

        self.number = 0
        self.nextNumberTimer = eTimer()
        self.nextNumberTimer.callback.append(self.okbuttonClick)

        self.onFirstExecBegin.append(self.checkWarnings)
        self.onShown.append(self.updateList)
        self.onChangedEntry = []
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self.onLayoutFinish.append(self.saveListsize)
        if config.pluginfilter.userfeed.getValue() != "http://":
            if not os.path.exists("/etc/opkg/user-feed.conf"):
                CreateFeedConfig()
Exemple #38
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _("Build date: ") + about.getBuildDateString() + "\n"
        AboutText += _("Last upgrade: ") + about.getUpdateDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        EnigmaVersion = about.getEnigmaVersionString()
        EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[
                2] + "-" + EnigmaVersion[1] + ")"
        else:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"

        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _(
            "DVB driver version: ") + about.getDriverInstalledDate() + "\n"

        GStreamerVersion = _(
            "GStreamer version: ") + about.getGStreamerVersionString().replace(
                "GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value
        AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl()

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (
            config.skin.primary_skin.value[0:-9], getDesktop(0).size().width(),
            getDesktop(0).size().height())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
    def __init__(self, session, menu_path=""):
        Screen.__init__(self, session)
        screentitle = _("Memory")
        if config.usage.show_menupath.value == 'large':
            menu_path += screentitle
            title = menu_path
            self["menu_path_compressed"] = StaticText("")
        elif config.usage.show_menupath.value == 'small':
            title = screentitle
            self["menu_path_compressed"] = StaticText(
                menu_path +
                " >" if not menu_path.endswith(' / ') else menu_path[:-3] +
                " >" or "")
        else:
            title = screentitle
            self["menu_path_compressed"] = StaticText("")
        Screen.setTitle(self, title)
        self.skinName = ["SystemMemoryInfo", "About"]
        self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
        self["lab2"] = StaticText(_("By Team ViX"))
        self["lab3"] = StaticText(
            _("Support at %s") % "www.world-of-satellite.com")
        self["AboutScrollLabel"] = ScrollLabel()

        self["key_red"] = Button(_("Close"))
        self["actions"] = ActionMap(["SetupActions", "ColorActions"], {
            "cancel": self.close,
            "ok": self.close,
            "red": self.close,
        })

        out_lines = file("/proc/meminfo").readlines()
        self.AboutText = _("RAM") + '\n\n'
        RamTotal = "-"
        RamFree = "-"
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "MemTotal:" in tstLine:
                MemTotal = out_lines[lidx].split()
                self.AboutText += _(
                    "Total memory:") + "\t" + MemTotal[1] + "\n"
            if "MemFree:" in tstLine:
                MemFree = out_lines[lidx].split()
                self.AboutText += _("Free memory:") + "\t" + MemFree[1] + "\n"
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.AboutText += _("Buffers:") + "\t" + Buffers[1] + "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.AboutText += _("Cached:") + "\t" + Cached[1] + "\n"
            if "SwapTotal:" in tstLine:
                SwapTotal = out_lines[lidx].split()
                self.AboutText += _("Total swap:") + "\t" + SwapTotal[1] + "\n"
            if "SwapFree:" in tstLine:
                SwapFree = out_lines[lidx].split()
                self.AboutText += _("Free swap:") + "\t" + SwapFree[1] + "\n\n"

        self["actions"].setEnabled(False)
        self.Console = Console()
        self.Console.ePopen("df -mh / | grep -v '^Filesystem'",
                            self.Stage1Complete)
Exemple #40
0
    def __init__(self, session, retvalue=1):
        self.skin = """<screen name="QuitMainloopScreen" position="fill" flags="wfNoBorder">
				<ePixmap pixmap="skin_default/icons/input_info.png" position="c-27,c-60" size="53,53" alphatest="on" />
				<widget name="text" position="center,c+5" size="720,100" font="Regular;22" halign="center" />
			</screen>"""
        Screen.__init__(self, session)
        from Components.Label import Label
        text = {
            1:
            _("Your receiver is shutting down"),
            2:
            _("Your receiver is rebooting"),
            3:
            _("The user interface of your receiver is restarting"),
            4:
            _("Your frontprocessor will be upgraded\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            5:
            _("The user interface of your receiver is restarting\ndue to an error in mytest.py"
              ),
            # iq - [
            #			42: _("Unattended upgrade in progress\nPlease wait until your receiver reboots\nThis may take a few minutes") }.get(retvalue)
            42:
            _("Unattended upgrade in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            43:
            _("Image Restore in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            64:
            _("Full factory reset in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            65:
            _("Factory reset in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            90:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            91:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            92:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            93:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            94:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            95:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            96:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              ),
            97:
            _("S/W update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"
              )
        }.get(retvalue)
        # ]

        self["text"] = Label(text)
Exemple #41
0
    def __init__(self,
                 session,
                 service,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.ask_time = -1  #now
        self["key_red"] = Button("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        self.session = session
        if isinstance(service, str) and eventid != None:
            self.type = EPG_TYPE_SIMILAR
            self.setTitle(_("Similar EPG"))
            self["key_yellow"] = Button()
            self["key_blue"] = Button()
            self["key_red"] = Button()
            self.currentService = service
            self.eventid = eventid
            self.zapFunc = None
        elif isinstance(service, eServiceReference) or isinstance(
                service, str):
            self.setTitle(_("Single EPG"))
            self.type = EPG_TYPE_SINGLE
            self["key_yellow"] = Button()
            self["key_blue"] = Button(_("Select Channel"))
            self.currentService = ServiceReference(service)
            self.zapFunc = zapFunc
            self.sort_type = 0
            self.setSortDescription()
        else:
            self.setTitle(_("Multi EPG"))
            self.skinName = "EPGSelectionMulti"
            self.type = EPG_TYPE_MULTI
            self["key_yellow"] = Button(
                pgettext("button label, 'previous screen'", "Prev"))
            self["key_blue"] = Button(
                pgettext("button label, 'next screen'", "Next"))
            self["now_button"] = Pixmap()
            self["next_button"] = Pixmap()
            self["more_button"] = Pixmap()
            self["now_button_sel"] = Pixmap()
            self["next_button_sel"] = Pixmap()
            self["more_button_sel"] = Pixmap()
            self["now_text"] = Label()
            self["next_text"] = Label()
            self["more_text"] = Label()
            self["date"] = Label()
            self.services = service
            self.zapFunc = zapFunc
        self["key_green"] = Button(_("Add timer"))
        self.key_green_choice = self.ADD_TIMER
        self.key_red_choice = self.EMPTY
        self["list"] = EPGList(type=self.type,
                               selChangedCB=self.onSelectionChanged,
                               timer=session.nav.RecordTimer)

        self["actions"] = ActionMap(
            ["EPGSelectActions", "OkCancelActions"],
            {
                "cancel": self.closeScreen,
                "ok": self.eventSelected,
                "timerAdd": self.timerAdd,
                "yellow": self.yellowButtonPressed,
                "blue": self.blueButtonPressed,
                "info": self.infoKeyPressed,
                "red": self.zapTo,
                "menu": self.furtherOptions,
                "nextBouquet": self.nextBouquet,  # just used in multi epg yet
                "prevBouquet": self.prevBouquet,  # just used in multi epg yet
                "nextService": self.nextService,  # just used in single epg yet
                "prevService": self.prevService,  # just used in single epg yet
                "preview": self.eventPreview,
            })
        self["actions"].csel = self
        self.onLayoutFinish.append(self.onCreate)
Exemple #42
0
	def __init__(self, session, menu_path = ""):
		Screen.__init__(self, session)
		screentitle = _("Network")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)
		self.skinName = ["SystemNetworkInfo", "WlanStatus"]
		self["LabelBSSID"] = StaticText()
		self["LabelESSID"] = StaticText()
		self["LabelQuality"] = StaticText()
		self["LabelSignal"] = StaticText()
		self["LabelBitrate"] = StaticText()
		self["LabelEnc"] = StaticText()
		self["BSSID"] = StaticText()
		self["ESSID"] = StaticText()
		self["quality"] = StaticText()
		self["signal"] = StaticText()
		self["bitrate"] = StaticText()
		self["enc"] = StaticText()

		self["IFtext"] = StaticText()
		self["IF"] = StaticText()
		self["Statustext"] = StaticText()
		self["statuspic"] = MultiPixmap()
		self["statuspic"].setPixmapNum(1)
		self["statuspic"].show()
		self["devicepic"] = MultiPixmap()

		self["AboutScrollLabel"] = ScrollLabel()

		self.iface = None
		self.createscreen()
		self.iStatus = None

		if iNetwork.isWirelessInterface(self.iface):
			try:
				from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus

				self.iStatus = iStatus
			except:
				pass
			self.resetList()
			self.onClose.append(self.cleanup)

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

		self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions"],
									{
										"cancel": self.close,
										"ok": self.close,
										"up": self["AboutScrollLabel"].pageUp,
										"down": self["AboutScrollLabel"].pageDown
									})
		self.onLayoutFinish.append(self.updateStatusbar)
Exemple #43
0
    def __init__(self, session, title="", **kwargs):
        Screen.__init__(self, session)
        self.keys_list = []
        self.shiftkeys_list = []
        self.lang = language.getLanguage()
        self.nextLang = None
        self.shiftMode = False
        self.selectedKey = 0
        self.smsChar = None
        self.sms = NumericalTextInput(self.smsOK)

        self.key_bg = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_bg.png"))
        self.key_sel = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_sel.png"))
        self.key_backspace = LoadPixmap(path=resolveFilename(
            SCOPE_ACTIVE_SKIN, "buttons/vkey_backspace.png"))
        self.key_all = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_all.png"))
        self.key_clr = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_clr.png"))
        self.key_esc = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_esc.png"))
        self.key_ok = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_ok.png"))
        self.key_shift = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_shift.png"))
        self.key_shift_sel = LoadPixmap(path=resolveFilename(
            SCOPE_ACTIVE_SKIN, "buttons/vkey_shift_sel.png"))
        self.key_space = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_space.png"))
        self.key_left = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_left.png"))
        self.key_right = LoadPixmap(
            path=resolveFilename(SCOPE_ACTIVE_SKIN, "buttons/vkey_right.png"))

        self.keyImages = {
            "BACKSPACE": self.key_backspace,
            "CLEAR": self.key_clr,
            "ALL": self.key_all,
            "EXIT": self.key_esc,
            "OK": self.key_ok,
            "SHIFT": self.key_shift,
            "SPACE": self.key_space,
            "LEFT": self.key_left,
            "RIGHT": self.key_right
        }
        self.keyImagesShift = {
            "BACKSPACE": self.key_backspace,
            "CLEAR": self.key_clr,
            "ALL": self.key_all,
            "EXIT": self.key_esc,
            "OK": self.key_ok,
            "SHIFT": self.key_shift_sel,
            "SPACE": self.key_space,
            "LEFT": self.key_left,
            "RIGHT": self.key_right
        }

        self["country"] = Label(_("Keyboard language"))
        self["header"] = Label(title)
        self["text"] = Input(currPos=len(
            kwargs.get("text", "").decode("utf-8", 'ignore')),
                             allMarked=False,
                             **kwargs)
        self["list"] = VirtualKeyBoardList([])
        self["current_language"] = Label(self.lang)

        self["actions"] = NumberActionMap(
            [
                "OkCancelActions", "WizardActions", "ColorActions",
                "KeyboardInputActions", "InputBoxActions", "InputAsciiActions"
            ], {
                "gotAsciiCode": self.keyGotAscii,
                "ok": self.okClicked,
                "cancel": self.exit,
                "left": self.left,
                "right": self.right,
                "up": self.up,
                "down": self.down,
                "red": self.exit,
                "green": self.ok,
                "yellow": self.switchLang,
                "blue": self.shiftClicked,
                "deleteBackward": self.backClicked,
                "deleteForward": self.forwardClicked,
                "back": self.exit,
                "pageUp": self.cursorRight,
                "pageDown": self.cursorLeft,
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal,
            }, -2)
        self.setLang()
        self.onExecBegin.append(self.setKeyboardModeAscii)
        self.onLayoutFinish.append(self.buildVirtualKeyBoard)
        self.onClose.append(self.__onClose)
Exemple #44
0
 def __init__(self, session, title, list):
     Screen.__init__(self, session)
     self['menu'] = List(list)
     self['actions'] = ActionMap(['OkCancelActions'], {'ok': self.okbuttonClick,
      'cancel': self.close})
     self['title'] = StaticText(title)
Exemple #45
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     self["selected"] = StaticText("About")
Exemple #46
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     self['entry'] = StaticText('')
     self['desc'] = StaticText('')
     self.onShow.append(self.addWatcher)
     self.onHide.append(self.removeWatcher)
Exemple #47
0
    def __init__(self, session, selectedmovie=None):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)

        self.tags = []
        self.selected_tags = None
        self.selected_tags_ele = None

        self.movemode = False
        self.bouquet_mark_edit = False

        self.delayTimer = eTimer()
        self.delayTimer.callback.append(self.updateHDDData)

        self["waitingtext"] = Label(_("Please wait... Loading list..."))

        # create optional description border and hide immediately
        self["DescriptionBorder"] = Pixmap()
        self["DescriptionBorder"].hide()

        if not pathExists(config.movielist.last_videodir.value):
            config.movielist.last_videodir.value = resolveFilename(SCOPE_HDD)
            config.movielist.last_videodir.save()
        self.current_ref = eServiceReference(
            "2:0:1:0:0:0:0:0:0:0:" + config.movielist.last_videodir.value)

        self["list"] = MovieList(None, config.movielist.listtype.value,
                                 config.movielist.moviesort.value,
                                 config.movielist.description.value)

        self.list = self["list"]
        self.selectedmovie = selectedmovie

        # Need list for init
        SelectionEventInfo.__init__(self)

        self["key_red"] = Button(_("All"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_blue"] = Button("")

        self["freeDiskSpace"] = self.diskinfo = DiskInfo(
            config.movielist.last_videodir.value, DiskInfo.FREE, update=False)

        if config.usage.setup_level.index >= 2:  # expert+
            self["InfobarActions"] = HelpableActionMap(
                self, "InfobarActions", {
                    "showMovies":
                    (self.doPathSelect, _("select the movie path")),
                })

        self["MovieSelectionActions"] = HelpableActionMap(
            self, "MovieSelectionActions", {
                "contextMenu": (self.doContext, _("menu")),
                "showEventInfo":
                (self.showEventInformation, _("show event details")),
            })

        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "red": (self.showAll, _("show all")),
                "green": (self.showTagsFirst, _("show first selected tag")),
                "yellow": (self.showTagsSecond, _("show second selected tag")),
                "blue": (self.showTagsSelect, _("show tag menu")),
            })

        self["OkCancelActions"] = HelpableActionMap(
            self, "OkCancelActions", {
                "cancel": (self.abort, _("exit movielist")),
                "ok": (self.movieSelected, _("select movie")),
            })

        self.onShown.append(self.go)
        self.onLayoutFinish.append(self.saveListsize)
        self.inited = False
Exemple #48
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.showMessageBox()
Exemple #49
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('About'))
        hddsplit, = skin.parameters.get('AboutHddSplit', (0, ))
        bhVer = 'Black Hole'
        f = open('/etc/bhversion', 'r')
        bhVer = f.readline().strip()
        f.close()
        bhRev = ''
        f = open('/etc/bhrev', 'r')
        bhRev = f.readline().strip()
        f.close()
        driverdate = self.getDriverInstalledDate()
        if driverdate == 'unknown':
            driverdate = self.getDriverInstalledDate_proxy()
        self['DriverVersion'] = StaticText(_('DVB drivers: ') + driverdate)
        self['KernelVersion'] = StaticText(
            _('Kernel version: ') + self.getKernelVersionString())
        self['FPVersion'] = StaticText('Support: REDOUANE [email protected]')
        self['CpuInfo'] = StaticText(_('CPU: ') + self.getCPUInfoString())
        AboutText = _('Hardware: ') + about.getHardwareTypeString() + '\n'
        AboutText += _('CPU: ') + about.getCPUInfoString() + '\n'
        AboutText += _('Image: ') + about.getImageTypeString() + '\n'
        AboutText += _('Installed: ') + about.getFlashDateString() + '\n'
        AboutText += _(
            'Kernel version: ') + about.getKernelVersionString() + '\n'
        self["ImageVersion"] = StaticText("Enigma: " +
                                          about.getEnigmaVersionString())
        self["EnigmaVersion"] = StaticText("Firmware: " + bhVer + " " + bhRev)
        AboutText += _(
            'Enigma (re)starts: %d\n') % config.misc.startCounter.value
        GStreamerVersion = 'GStreamer: ' + about.getGStreamerVersionString(
        ).replace('GStreamer', '')
        self['GStreamerVersion'] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + '\n'
        AboutText += _('DVB drivers: ') + about.getDriverInstalledDate() + '\n'
        AboutText += _(
            'Python version: ') + about.getPythonVersionString() + '\n'
        self['TunerHeader'] = StaticText(_('Detected NIMs:'))
        AboutText += '\n' + _('Detected NIMs:') + '\n'
        nims = nimmanager.nimList(showFBCTuners=False)
        for count in range(len(nims)):
            if count < 4:
                self['Tuner' + str(count)] = StaticText(nims[count])
            else:
                self['Tuner' + str(count)] = StaticText('')
            AboutText += nims[count] + '\n'

        self['HDDHeader'] = StaticText(_('Detected HDD:'))
        AboutText += '\n' + _('Detected HDD:') + '\n'
        hddlist = harddiskmanager.HDDList()
        hddinfo = ''
        if hddlist:
            formatstring = hddsplit and '%s:%s, %.1f %sB %s' or '%s\n(%s, %.1f %sB %s)'
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += '\n'
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, 'G',
                                               _('free'))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), 'M', _('free'))

        else:
            hddinfo = _('none')
        self['hddA'] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self['AboutScrollLabel'] = ScrollLabel(AboutText)
        self['key_green'] = Button(_('Translations'))
        self['key_red'] = Button(_('Latest Commits'))
        self['key_blue'] = Button(_('Memory Info'))
        self['actions'] = ActionMap(
            ['ColorActions', 'SetupActions', 'DirectionActions'], {
                'cancel': self.close,
                'ok': self.close,
                'red': self.showCommits,
                'green': self.showTranslationInfo,
                'blue': self.showMemoryInfo,
                'up': self['AboutScrollLabel'].pageUp,
                'down': self['AboutScrollLabel'].pageDown
            })
Exemple #50
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString()
        self["OpenNFRVersion"] = Label(OpenNFRVersion)

        AboutText = _("Model:\t\t%s %s\n") % (getMachineBrand(),
                                              getMachineName())

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\t\t%s") % about.getChipSetString() + "\n"

        cpuMHz = ""
        if getMachineBuild() in ('u41', 'u42', 'u43'):
            cpuMHz = _("   (1.0 GHz)")
        elif getMachineBuild() in ('dags72604', 'vusolo4k', 'vuultimo4k',
                                   'vuzero4k', 'gb72604'):
            cpuMHz = "   (1,5 GHz)"
        elif getMachineBuild() in ('formuler1', 'triplex'):
            cpuMHz = "   (1,3 GHz)"
        elif getMachineBuild() in ('gbmv200', 'u51', 'u5', 'u53', 'u52', 'u54',
                                   'u55', 'u56', 'u5pvr', 'h9', 'h9combo',
                                   'cc1', 'sf8008', 'sf8008m', 'hd60', 'hd61',
                                   'i55plus', 'ustym4kpro', 'v8plus',
                                   'multibox'):
            cpuMHz = "   (1,6 GHz)"
        elif getMachineBuild() in ('vuuno4k', 'vuultimo4k', 'gb7252',
                                   'dags7252', '8100s'):
            cpuMHz = "   (1,7 GHz)"
        elif getMachineBuild() in ('alien5', 'u53'):
            cpuMHz = "   (2,0 GHz)"
        elif getMachineBuild() in ('vuduo4k', ):
            cpuMHz = _("   (2.1 GHz)")
        elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52',
                                   'hd51', 'sf4008', 'vs1500', 'h7', 'osmio4k',
                                   'osmio4kplus', 'osmini4k'):
            try:
                import binascii
                f = open(
                    '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency',
                    'rb')
                clockfrequency = f.read()
                f.close()
                cpuMHz = "   (%s MHz)" % str(
                    round(
                        int(binascii.hexlify(clockfrequency), 16) / 1000000,
                        1))
            except:
                cpuMHz = "   (1,7 GHz)"
        else:
            if path.exists('/proc/cpuinfo'):
                f = open('/proc/cpuinfo', 'r')
                temp = f.readlines()
                f.close()
                try:
                    for lines in temp:
                        lisp = lines.split(': ')
                        if lisp[0].startswith('cpu MHz'):
                            #cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
                            cpuMHz = "   (" + str(
                                int(float(lisp[1].replace('\n',
                                                          '')))) + " MHz)"
                            break
                except:
                    pass

        AboutText += _("CPU:\t\t%s") % about.getCPUString() + cpuMHz + "\n"
        AboutText += _("Cores:\t\t%s") % about.getCpuCoresString() + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature:\t%s") % tempinfo.replace(
                '\n', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/power/avs'):
            f = open('/proc/stb/power/avs', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                f = open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                         'r')
                tempinfo = f.read()
                tempinfo = tempinfo[:-4]
                f.close()
            except:
                tempinfo = ""
        elif path.exists('/proc/hisi/msp/pm_cpu'):
            try:
                for line in open('/proc/hisi/msp/pm_cpu').readlines():
                    line = [x.strip() for x in line.strip().split(":")]
                    if line[0] in ("Tsensor"):
                        temp = line[1].split("=")
                        temp = line[1].split(" ")
                        tempinfo = temp[2]
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        imagestarted = ""
        bootname = ''
        if path.exists('/boot/bootname'):
            f = open('/boot/bootname', 'r')
            bootname = f.readline().split('=')[1]
            f.close()

        if SystemInfo["canMultiBoot"]:
            slot = image = GetCurrentImage()
            bootmode = ""
            part = "eMMC slot %s" % slot
            if SystemInfo["canMode12"]:
                bootmode = "bootmode = %s" % GetCurrentImageMode()
            if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][
                    slot]['device']:
                if slot > 4:
                    image -= 4
                else:
                    image -= 1
                part = "SDcard slot %s (%s) " % (
                    image, SystemInfo["canMultiBoot"][slot]['device'])
            AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + str(
                slot) + "  " + part + " " + bootmode + "\n"
        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t\t%s") % driversdate + "\n"
        AboutText += _("Image:\t\t%s") % about.getImageVersionString() + "\n"
        AboutText += _("Build:\t\t%s") % getImageBuild() + "\n"
        AboutText += _(
            "Kernel: \t\t%s") % about.getKernelVersionString() + "\n"
        AboutText += _("Oe-Core:\t\t%s") % getOEVersion() + "\n"
        AboutText += _(
            "Enigma (re)starts:\t%d\n") % config.misc.startCounter.value
        AboutText += _("FFmpeg:\t\t%s") % about.getFFmpegVersionString() + "\n"
        AboutText += _(
            "GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n"
        AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Front Panel:\t\t%s") % fp_version
            AboutText += fp_version + "\n"
        else:
            fp_version = _("Front Panel:\t\tVersion unknown")
            AboutText += fp_version + "\n"

        if getMachineBuild() not in ('gbmv200', 'vuduo4k', 'v8plus',
                                     'ustym4kpro', 'hd60', 'hd61', 'i55plus',
                                     'osmio4k', 'osmio4kplus', 'h9', 'h9combo',
                                     'vuzero4k', 'sf5008', 'et13000',
                                     'et1x000', 'hd51', 'hd52', 'vusolo4k',
                                     'vuuno4k', 'vuuno4kse', 'vuultimo4k',
                                     'sf4008', 'dm820', 'dm7080', 'dm900',
                                     'dm920', 'gb7252', 'dags7252', 'vs1500',
                                     'h7', 'xc7439', '8100s', 'u41', 'u42',
                                     'u43', 'u5', 'u5pvr', 'u52', 'u53', 'u54',
                                     'u55', 'u56', 'u51', 'cc1', 'sf8008m',
                                     'sf8008'):
            AboutText += _(
                "Installed:\t\t%s") % about.getFlashDateString() + "\n"
        AboutText += _(
            "Last Upgrade:\t\t%s") % about.getLastUpdateString() + "\n\n"

        self["FPVersion"] = StaticText(fp_version)

        AboutText += _("WWW:\t\t%s") % about.getImageUrlString() + "\n\n"
        AboutText += _(
            "based on:\t\t%s") % "www.github.com/oe-alliance" + "\n\n"
        # don't remove the string out of the _(), or it can't be "translated" anymore.
        # TRANSLATORS: Add here whatever should be shown in the "translator" about screen, up to 6 lines (use \n for newline)
        info = _("TRANSLATOR_INFO")

        if info == _("TRANSLATOR_INFO"):
            info = ""

        infolines = _("").split("\n")
        infomap = {}
        for x in infolines:
            l = x.split(': ')
            if len(l) != 2:
                continue
            (type, value) = l
            infomap[type] = value

        translator_name = infomap.get("Language-Team", "none")
        if translator_name == "none":
            translator_name = infomap.get("Last-Translator", "")

        self["FPVersion"] = StaticText(fp_version)

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")

        self["HDDHeader"] = StaticText(_("Detected HDD:"))

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += "%s\n(%s, %d GB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free() / 1024,
                        _("free"))
                else:
                    hddinfo += "%s\n(%s, %d MB %s)" % (
                        hdd.model(), hdd.capacity(), hdd.free(), _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "green": self.showTranslationInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Exemple #51
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit = skin.parameters.get("AboutHddSplit", 0)

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        cpu = about.getCPUInfoString()
        AboutText += _("CPU: ") + cpu + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"

        if SystemInfo["HasH9SD"]:
            if "rootfstype=ext4" in open(
                    '/sys/firmware/devicetree/base/chosen/bootargs',
                    'r').read():
                part = "        - SD card in use for Image root \n"
            else:
                part = "        - eMMC slot in use for Image root \n"
            AboutText += _("%s") % part

        if SystemInfo["canMultiBoot"]:
            slot = image = GetCurrentImage()
            part = "eMMC slot %s" % slot
            bootmode = ""
            if SystemInfo["canMode12"]:
                bootmode = " bootmode = %s" % GetCurrentImageMode()
            AboutText += _("STARTUP slot: ") + str(
                GetCurrentImage()) + bootmode + "\n"
            if SystemInfo["HasHiSi"]:
                slot += 1
                if image != 0:
                    part = "SDC slot %s (%s%s) " % (
                        image, SystemInfo["canMultiBoot"][2], image * 2)
                else:
                    part = "eMMC slot %s" % slot
            AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(
                slot) + "  " + part + " " + bootmode + "\n"

        AboutText += _("Build date: ") + about.getBuildDateString() + "\n"
        AboutText += _("Last update: ") + about.getUpdateDateString() + "\n"

        # [WanWizard] Removed until we find a reliable way to determine the installation date
        # AboutText += _("Installed: ") + about.getFlashDateString() + "\n"

        EnigmaVersion = about.getEnigmaVersionString()
        EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2)
        if len(EnigmaVersion) == 3:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[
                2] + "-" + EnigmaVersion[1] + ")"
        else:
            EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")"
        EnigmaVersion = _("Enigma version: ") + EnigmaVersion
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += "\n" + EnigmaVersion + "\n"

        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        AboutText += _(
            "DVB driver version: ") + about.getDriverInstalledDate() + "\n"

        GStreamerVersion = _("GStreamer version: "
                             ) + about.getGStreamerVersionString(cpu).replace(
                                 "GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value
        AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl()

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %s") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (
            config.skin.primary_skin.value.split('/')[0],
            getDesktop(0).size().width(), getDesktop(0).size().height())

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimListCompressed()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo + "\n\n" + _("Network Info:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\n" + x[0] + ": " + x[1]

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_yellow"] = Button(_("Troubleshoot"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "yellow": self.showTroubleshoot,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })
Exemple #52
0
	def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
		Screen.__init__(self, session)
		EPGSelection.__init__(self, session, service, zapFunc, eventid, bouquetChangeCB, serviceChangeCB)
		self.skinName = "EPGSelection"
Exemple #53
0
	def __init__(self, session, StandbyCounterIncrease=True):
		Screen.__init__(self, session)
		self.skinName = "Standby"
		self.avswitch = AVSwitch()

		print "[Standby] enter standby"
		if os.path.exists("/usr/script/Standby.sh"):
			Console().ePopen("/usr/script/Standby.sh off")
		if os.path.exists("/usr/script/standby_enter.sh"):
			Console().ePopen("/usr/script/standby_enter.sh")

		self["actions"] = ActionMap( [ "StandbyActions" ],
		{
			"power": self.Power,
			"discrete_on": self.Power
		}, -1)

		globalActionMap.setEnabled(False)

		from Screens.InfoBar import InfoBar
		from Screens.SleepTimerEdit import isNextWakeupTime
		self.infoBarInstance = InfoBar.instance
		self.StandbyCounterIncrease = StandbyCounterIncrease
		self.standbyTimeoutTimer = eTimer()
		self.standbyTimeoutTimer.callback.append(self.standbyTimeout)
		self.standbyStopServiceTimer = eTimer()
		self.standbyStopServiceTimer.callback.append(self.stopService)
		self.standbyWakeupTimer = eTimer()
		self.standbyWakeupTimer.callback.append(self.standbyWakeup)
		self.timeHandler = None

		self.setMute()

		# set LCDminiTV off
		if SystemInfo["Display"] and SystemInfo["LCDMiniTV"]:
			setLCDModeMinitTV("0")

		self.paused_service = self.paused_action = False

		self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceOrGroup()
		if Components.ParentalControl.parentalControl.isProtected(self.prev_running_service):
			self.prev_running_service = eServiceReference(config.tv.lastservice.value)
		service = self.prev_running_service and self.prev_running_service.toString()
		if service:
			if service.rsplit(":", 1)[1].startswith("/"):
				self.paused_service = hasattr(self.session.current_dialog, "pauseService") and hasattr(self.session.current_dialog, "unPauseService") and self.session.current_dialog or self.infoBarInstance
				self.paused_action = hasattr(self.paused_service, "seekstate") and hasattr(self.paused_service, "SEEK_STATE_PLAY") and self.paused_service.seekstate == self.paused_service.SEEK_STATE_PLAY
				self.paused_action and self.paused_service.pauseService()
		if not self.paused_service:
			self.timeHandler =  eDVBLocalTimeHandler.getInstance()
			if self.timeHandler.ready():
				if self.session.nav.getCurrentlyPlayingServiceOrGroup():
					self.stopService()
				else:
					self.standbyStopServiceTimer.startLongTimer(5)
				self.timeHandler = None
			else:
				self.timeHandler.m_timeUpdated.get().append(self.stopService)

		if self.session.pipshown:
			self.infoBarInstance and hasattr(self.infoBarInstance, "showPiP") and self.infoBarInstance.showPiP()

		if SystemInfo["ScartSwitch"]:
			self.avswitch.setInput("SCART")
		else:
			self.avswitch.setInput("AUX")

		gotoShutdownTime = int(config.usage.standby_to_shutdown_timer.value)
		if gotoShutdownTime:
			self.standbyTimeoutTimer.startLongTimer(gotoShutdownTime)

		gotoWakeupTime = isNextWakeupTime(True)
		if gotoWakeupTime != -1:
			curtime = localtime(time())
			if curtime.tm_year > 1970:
				wakeup_time = int(gotoWakeupTime - time())
				if wakeup_time > 0:
					self.standbyWakeupTimer.startLongTimer(wakeup_time)

		self.onFirstExecBegin.append(self.__onFirstExecBegin)
		self.onClose.append(self.__onClose)
Exemple #54
0
 def __init__(self, session, Event, Ref, callback=None, similarEPGCB=None):
     Screen.__init__(self, session)
     self.skinName = "EventView"
     EventViewBase.__init__(self, Event, Ref, callback, similarEPGCB)
Exemple #55
0
    def __init__(self,
                 session,
                 showSteps=True,
                 showStepSlider=True,
                 showList=True,
                 showConfig=True):
        Screen.__init__(self, session)

        self.isLastWizard = False  # can be used to skip a "goodbye"-screen in a wizard

        self.stepHistory = []

        self.wizard = {}
        parser = make_parser()
        if not isinstance(self.xmlfile, list):
            self.xmlfile = [self.xmlfile]
        print "Reading ", self.xmlfile
        wizardHandler = self.parseWizard(self.wizard)
        parser.setContentHandler(wizardHandler)
        for xmlfile in self.xmlfile:
            if xmlfile[0] != '/':
                parser.parse(eEnv.resolve('${datadir}/enigma2/') + xmlfile)
            else:
                parser.parse(xmlfile)

        self.showSteps = showSteps
        self.showStepSlider = showStepSlider
        self.showList = showList
        self.showConfig = showConfig

        self.numSteps = len(self.wizard)
        self.currStep = self.getStepWithID("start") + 1

        self.timeoutTimer = eTimer()
        self.timeoutTimer.callback.append(self.timeoutCounterFired)

        self["text"] = Label()

        if showConfig:
            self["config"] = ConfigList([], session=session)

        if self.showSteps:
            self["step"] = Label()

        if self.showStepSlider:
            self["stepslider"] = Slider(1, self.numSteps)

        if self.showList:
            self.list = []
            self["list"] = List(self.list, enableWrapAround=True)
            self["list"].onSelectionChanged.append(self.selChanged)
            #self["list"] = MenuList(self.list, enableWrapAround = True)

        self.onShown.append(self.updateValues)

        self.configInstance = None
        self.currentConfigIndex = None

        self.lcdCallbacks = []

        self.disableKeys = False

        self["actions"] = NumberActionMap(
            [
                "WizardActions", "NumberActions", "ColorActions",
                "SetupActions", "InputAsciiActions", "KeyboardInputActions"
            ],
            {
                "gotAsciiCode": self.keyGotAscii,
                "ok": self.ok,
                "back": self.back,
                "left": self.left,
                "right": self.right,
                "up": self.up,
                "down": self.down,
                "red": self.red,
                "green": self.green,
                "yellow": self.yellow,
                "blue": self.blue,
                "deleteBackward": self.deleteBackward,
                "deleteForward": self.deleteForward,
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "0": self.keyNumberGlobal,
                # iq - [
                "prevSubservice": self.checkTestMenuKey0,
                "nextSubservice": self.checkTestMenuKey1,
                "menu": self.countMenuKey
                # ]
            },
            -1)

        self["VirtualKB"] = NumberActionMap(
            ["VirtualKeyboardActions"], {
                "showVirtualKeyboard": self.KeyText,
            }, -2)

        self["VirtualKB"].setEnabled(False)

        # iq - [
        self.testMenuKeyCount = 0

        # support only tm models
        self.devices = {
            "tm2toe": 1,
            "tmtwinoe": 2,
            "tmsingle": 4,
            "tmnanooe": 4
        }
        self.models = {1: "TM-2T", 2: "TM-TWIN", 4: "TM-SINGLE/TM-NANO-OE"}
        self.rcu = self.devices.get(HardwareInfo().get_device_name())
        self.rcuSaveFile = "/etc/.rcu"
        if os.path.exists(self.rcuSaveFile):
            fd = open(self.rcuSaveFile, "r")
            try:
                if int(fd.readline().strip()) in self.devices.values():
                    self.rcu = int(fd.readline().strip())
            except:
                pass

        self.menuKeyCount = 0

        self.resetMenuKeyCountTimer = eTimer()
        self.resetMenuKeyCountTimer.callback.append(self.resetMenuKeyCount)
Exemple #56
0
    def __init__(self, session, infobar=None, page=PAGE_AUDIO):
        Screen.__init__(self, session)

        self["streams"] = List([])
        self["key_red"] = Boolean(False)
        self["key_green"] = Boolean(False)
        self["key_yellow"] = Boolean(True)
        self["key_blue"] = Boolean(False)
        self["key_menu"] = Boolean(False)
        self["help_label"] = Label()

        ConfigListScreen.__init__(self, [])
        self.infobar = infobar or self.session.infobar

        self.__event_tracker = ServiceEventTracker(
            screen=self,
            eventmap={
                iPlayableService.evSubtitleListChanged:
                self.__subtitleListChanged,
                iPlayableService.evAudioListChanged: self.__audioListChanged,
                iPlayableService.evUpdatedInfo: self.__audioListChanged,
                iPlayableService.evUpdatedEventInfo: self.__audioListChanged
            })
        self.cached_subtitle_checked = False
        self.plugincallerdict = {}
        self["actions"] = NumberActionMap(
            [
                "ColorActions", "SetupActions", "DirectionActions",
                "MenuActions", "InfobarAudioSelectionActions"
            ], {
                "red": self.keyRed,
                "green": self.keyGreen,
                "yellow": self.keyYellow,
                "blue": self.keyBlue,
                "menu": self.keyMenu,
                "ok": self.keyOk,
                "cancel": self.cancel,
                "audioSelection": self.cancel,
                "up": self.keyUp,
                "down": self.keyDown,
                "previousSection": self.enablePrevious,
                "nextSection": self.enableNext,
                "1": self.keyNumberGlobal,
                "2": self.keyNumberGlobal,
                "3": self.keyNumberGlobal,
                "4": self.keyNumberGlobal,
                "5": self.keyNumberGlobal,
                "6": self.keyNumberGlobal,
                "7": self.keyNumberGlobal,
                "8": self.keyNumberGlobal,
                "9": self.keyNumberGlobal,
                "upUp": self.doNothing,
                "downUp": self.doNothing,
                "leftUp": self.doNothing,
                "rightUp": self.doNothing
            }, -2)

        self.settings = ConfigSubsection()
        choicelist = [(PAGE_AUDIO, _("Subtitles")),
                      (PAGE_SUBTITLES, _("audio tracks"))]
        self.settings.menupage = ConfigSelection(choices=choicelist,
                                                 default=page)
        self.onLayoutFinish.append(self.__layoutFinished)
Exemple #57
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["SetupActions"],{"cancel": self.close,"ok": self.close})
		self.setTitle(_("Contact info"))
		self["manufacturerinfo"] = StaticText(self.getManufacturerinfo())
Exemple #58
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('About'))
        hddsplit = skin.parameters.get('AboutHddSplit', 0)
        AboutText = _('Hardware: ') + about.getHardwareTypeString() + '\n'
        AboutText += _('CPU: ') + about.getCPUInfoString() + '\n'
        AboutText += _('Image: ') + about.getImageTypeString() + '\n'
        AboutText += _(
            'Kernel version: ') + about.getKernelVersionString() + '\n'
        EnigmaVersion = 'Enigma: ' + about.getEnigmaVersionString()
        self['EnigmaVersion'] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + '\n'
        AboutText += _(
            'Enigma (re)starts: %d\n') % config.misc.startCounter.value
        GStreamerVersion = 'GStreamer: ' + about.getGStreamerVersionString(
        ).replace('GStreamer', '')
        self['GStreamerVersion'] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + '\n'
        ImageVersion = _('Last upgrade: ') + about.getImageVersionString()
        self['ImageVersion'] = StaticText(ImageVersion)
        AboutText += ImageVersion + '\n'
        AboutText += _('DVB drivers: ') + about.getDriverInstalledDate() + '\n'
        AboutText += _(
            'Python version: ') + about.getPythonVersionString() + '\n'
        AboutText += _('Moderator: Redouane') + '\n'
        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ''
        else:
            fp_version = _('Frontprocessor version: %s') % fp_version
            AboutText += fp_version + '\n'
        self['FPVersion'] = StaticText(fp_version)
        self['TunerHeader'] = StaticText(_('Detected NIMs:'))
        AboutText += '\n' + _('Detected NIMs:') + '\n'
        nims = nimmanager.nimList(showFBCTuners=False)
        for count in range(len(nims)):
            if count < 4:
                self['Tuner' + str(count)] = StaticText(nims[count])
            else:
                self['Tuner' + str(count)] = StaticText('')
            AboutText += nims[count] + '\n'

        self['HDDHeader'] = StaticText(_('Detected HDD:'))
        AboutText += '\n' + _('Detected HDD:') + '\n'
        hddlist = harddiskmanager.HDDList()
        hddinfo = ''
        if hddlist:
            formatstring = hddsplit and '%s:%s, %.1f %sB %s' or '%s\n(%s, %.1f %sB %s)'
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += '\n'
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, 'G',
                                               _('free'))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), 'M', _('free'))

        else:
            hddinfo = _('none')
        self['hddA'] = StaticText(hddinfo)
        AboutText += hddinfo + '\n\n' + _('Network Info:')
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += '\n' + x[0] + ': ' + x[1]

        self['AboutScrollLabel'] = ScrollLabel(AboutText)
        self['key_green'] = Button(_('Translations'))
        self['key_red'] = Button(_('Latest Commits'))
        self['key_yellow'] = Button(_('Troubleshoot'))
        self['key_blue'] = Button(_('Memory Info'))
        self['actions'] = ActionMap(
            ['ColorActions', 'SetupActions', 'DirectionActions'], {
                'cancel': self.close,
                'ok': self.close,
                'red': self.showCommits,
                'green': self.showTranslationInfo,
                'blue': self.showMemoryInfo,
                'yellow': self.showTroubleshoot,
                'up': self['AboutScrollLabel'].pageUp,
                'down': self['AboutScrollLabel'].pageDown
            })
Exemple #59
0
	def __init__(self, session):
		Screen.__init__(self, session)
		hddsplit = skin.parameters.get("AboutHddSplit", 0)

		#AboutHddSplit = 0
		#try:
		#	hddsplit = skin.parameters.get("AboutHddSplit",(0))[0]
		#except:
		#	hddsplit = AboutHddSplit

		if boxtype == 'gb800solo':
			BoxName = "GigaBlue HD 800SOLO"
		elif boxtype == 'gb800se':
			BoxName = "GigaBlue HD 800SE"
		elif boxtype == 'gb800ue':
			BoxName = "GigaBlue HD 800UE"
		elif boxtype == 'gbquad':
			BoxName = "GigaBlue Quad"
		elif boxtype == 'gbquad4k':
			BoxName = "GigaBlue Quad 4k"
		elif boxtype == 'gbue4k':
			BoxName = "GigaBlue UE 4k"
		elif boxtype == 'gbx34k':
			BoxName = "GigaBlue X3 4k"
		elif boxtype == 'gbtrio4k':
			BoxName = "GigaBlue TRIO 4k"
		elif boxtype == 'gbip4k':
			BoxName = "GigaBlue IP 4k"
		elif boxtype == 'gbquadplus':
			BoxName = "GigaBlue HD Quadplus"
		elif boxtype == 'gb800seplus':
			BoxName = "GigaBlue HD 800SEplus"
		elif boxtype == 'gb800ueplus':
			BoxName = "GigaBlue HD 800UEplus"
		elif boxtype == 'gbipbox':
			BoxName = "GigaBlue IP Box"
		elif boxtype == 'gbultra':
			BoxName = "GigaBlue HD Ultra"
		elif boxtype == 'gbultraue':
			BoxName = "GigaBlue HD Ultra UE"
		elif boxtype == 'gbultraueh':
			BoxName = "GigaBlue HD Ultra UEh"
		elif boxtype == 'gbultrase':
			BoxName = "GigaBlue HD Ultra SE"
		elif boxtype == 'gbx1':
			BoxName = "GigaBlue X1"
		elif boxtype == 'gbx2':
			BoxName = "GigaBlue X2"
		elif boxtype == 'gbx3':
			BoxName = "GigaBlue X3"
		elif boxtype == 'gbx3h':
			BoxName = "GigaBlue X3h"
		elif boxtype == 'spycat':
			BoxName = "XCORE Spycat"
		elif boxtype == 'quadbox2400':
			BoxName = "AX Quadbox HD2400"
		else:
			BoxName = about.getHardwareTypeString()

		self.setTitle(_("About") + " " + BoxName)

		ImageType = about.getImageTypeString()
		self["ImageType"] = StaticText(ImageType)

		Boxserial = popen('cat /proc/stb/info/sn').read().strip()
		serial = ""
		if Boxserial != "":
			serial = ":Serial : " + Boxserial

		AboutHeader = _("About") + " " + BoxName 
		self["AboutHeader"] = StaticText(AboutHeader)

		AboutText = BoxName + " - " + ImageType + serial + "\n"

		#AboutText += _("Hardware: ") + about.getHardwareTypeString() + "\n"
		#AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
		#AboutText += _("Installed: ") + about.getFlashDateString() + "\n"
		#AboutText += _("Image: ") + about.getImageTypeString() + "\n"

		cpu = about.getCPUInfoString()
		CPUinfo = _("CPU: ") + cpu
		self["CPUinfo"] = StaticText(CPUinfo)
		AboutText += CPUinfo + "\n"

		CPUspeed = _("Speed: ") + about.getCPUSpeedString()
		self["CPUspeed"] = StaticText(CPUspeed)
		#AboutText += "(" + about.getCPUSpeedString() + ")\n"

		ChipsetInfo = _("Chipset: ") + about.getChipSetString()
		self["ChipsetInfo"] = StaticText(ChipsetInfo)
		AboutText += ChipsetInfo + "\n"

		if boxtype == 'gbquad4k' or boxtype == 'gbue4k' or boxtype == 'gbx34k':
			def strip_non_ascii(boltversion):
				''' Returns the string without non ASCII characters'''
				stripped = (c for c in boltversion if 0 < ord(c) < 127)
				return ''.join(stripped)
			boltversion = str(popen('cat /sys/firmware/devicetree/base/bolt/tag').read().strip())
			boltversion = strip_non_ascii(boltversion)
			AboutText += _("Bolt") + ":" + boltversion + "\n"
			self["BoltVersion"] = StaticText(boltversion)

		AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		else:
			fp_version = _("Frontprocessor version: %s") % fp_version
			#AboutText += fp_version +"\n"
		self["FPVersion"] = StaticText(fp_version) 

		AboutText += "\n"

		KernelVersion = _("Kernel version: ") + about.getKernelVersionString()
		self["KernelVersion"] = StaticText(KernelVersion)
		AboutText += KernelVersion + "\n"

		if getMachineBuild() in ('gb7252', 'gb72604'):
			b = popen('cat /proc/stb/info/version').read().strip()
			driverdate=str(b[0:4] + '-' + b[4:6] + '-' + b[6:8] + ' ' + b[8:10]  + ':' + b[10:12] + ':' + b[12:14])
			AboutText += _("DVB drivers: ") + driverdate + "\n"
		else:
			AboutText += _("DVB drivers: ") + self.realDriverDate() + "\n"
			#AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n"

		ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
		self["ImageVersion"] = StaticText(ImageVersion)
		AboutText += ImageVersion + "\n"

		EnigmaVersion = _("GUI Build: ") + about.getEnigmaVersionString() + "\n"
		self["EnigmaVersion"] = StaticText(EnigmaVersion)
		#AboutText += EnigmaVersion

		#AboutText += _("Enigma (re)starts: %d\n") % config.misc.startCounter.value

		FlashDate = _("Flashed: ") + about.getFlashDateString()
		self["FlashDate"] = StaticText(FlashDate)
		AboutText += FlashDate + "\n"

		EnigmaSkin = _('Skin & Resolution: %s (%sx%s)') % (config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height())
		self["EnigmaSkin"] = StaticText(EnigmaSkin)
		AboutText += EnigmaSkin + "\n"

		AboutText += _("Python version: ") + about.getPythonVersionString() + "\n"

		GStreamerVersion = _("GStreamer: ") + about.getGStreamerVersionString(cpu).replace("GStreamer","")
		self["GStreamerVersion"] = StaticText(GStreamerVersion)
		AboutText += GStreamerVersion + "\n"

		twisted = popen('opkg list-installed  |grep -i python-twisted-core').read().strip().split(' - ')[1]
		AboutText += "Python-Twisted: " + str(twisted) + "\n"

		AboutText += "\n"
		self["TunerHeader"] = StaticText(_("Detected NIMs:"))
		#AboutText += _("Detected NIMs:") + "\n"

		nims = nimmanager.nimList()
		for count in range(len(nims)):
			if count < 4:
				self["Tuner" + str(count)] = StaticText(nims[count])
			else:
				self["Tuner" + str(count)] = StaticText("")
			AboutText += nims[count] + "\n"

		self["HDDHeader"] = StaticText(_("Detected HDD:"))

		AboutText += "\n"
		#AboutText +=  _("Detected HDD:") + "\n"
		hddlist = harddiskmanager.HDDList()
		hddinfo = ""
		if hddlist:
			formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s:(%s, %.1f %sB %s)"
			for count in range(len(hddlist)):
				if hddinfo:
					hddinfo += "\n"
				hdd = hddlist[count][1]
				if int(hdd.free()) > 1024:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free()/1024.0, "G", _("free"))
				else:
					hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free(), "M", _("free"))
		else:
			hddinfo = _("none")
		self["hddA"] = StaticText(hddinfo)
		AboutText += hddinfo 
		
		#AboutText += "\n\n" + _("Network Info") 
		#for x in about.GetIPsFromNetworkInterfaces():
		#	AboutText += "\n" + iNetwork.getFriendlyAdapterDescription(x[0]) + " :" + "/dev/" + x[0] + " " + x[1]

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
		self["key_green"] = Button(_("Translations"))
		self["key_red"] = Button(_("Latest Commits"))
		self["key_yellow"] = Button(_("Troubleshoot"))
		self["key_blue"] = Button(_("Memory Info"))
		self["key_info"] = StaticText(_("Contact Info"))
		self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"],
			{
				"cancel": self.close,
				"ok": self.close,
				"red": self.showCommits,
				"green": self.showTranslationInfo,
				"blue": self.showMemoryInfo,
				"info": self.showContactInfo,
				"yellow": self.showTroubleshoot,
				"up": self["AboutScrollLabel"].pageUp,
				"down": self["AboutScrollLabel"].pageDown
			})
Exemple #60
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_("About"))
        hddsplit, = skin.parameters.get("AboutHddSplit", (0, ))

        AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
        AboutText += _("CPU: ") + about.getCPUInfoString() + "\n"
        AboutText += _("Image: ") + about.getImageTypeString() + "\n"
        AboutText += _("Installed: ") + about.getFlashDateString() + "\n"
        AboutText += _(
            "Kernel version: ") + about.getKernelVersionString() + "\n"

        EnigmaVersion = "Enigma: " + about.getEnigmaVersionString()
        self["EnigmaVersion"] = StaticText(EnigmaVersion)
        AboutText += EnigmaVersion + "\n"
        AboutText += _(
            "Enigma (re)starts: %d\n") % config.misc.startCounter.value

        GStreamerVersion = "GStreamer: " + about.getGStreamerVersionString(
        ).replace("GStreamer", "")
        self["GStreamerVersion"] = StaticText(GStreamerVersion)
        AboutText += GStreamerVersion + "\n"

        ImageVersion = _("Last upgrade: ") + about.getImageVersionString()
        self["ImageVersion"] = StaticText(ImageVersion)
        AboutText += ImageVersion + "\n"

        AboutText += _("DVB drivers: ") + about.getDriverInstalledDate() + "\n"

        AboutText += _(
            "Python version: ") + about.getPythonVersionString() + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        else:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        self["FPVersion"] = StaticText(fp_version)

        self["TunerHeader"] = StaticText(_("Detected NIMs:"))
        AboutText += "\n" + _("Detected NIMs:") + "\n"

        nims = nimmanager.nimList()
        for count in range(len(nims)):
            if count < 4:
                self["Tuner" + str(count)] = StaticText(nims[count])
            else:
                self["Tuner" + str(count)] = StaticText("")
            AboutText += nims[count] + "\n"

        self["HDDHeader"] = StaticText(_("Detected HDD:"))
        AboutText += "\n" + _("Detected HDD:") + "\n"

        hddlist = harddiskmanager.HDDList()
        hddinfo = ""
        if hddlist:
            formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)"
            for count in range(len(hddlist)):
                if hddinfo:
                    hddinfo += "\n"
                hdd = hddlist[count][1]
                if int(hdd.free()) > 1024:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free() / 1024.0, "G",
                                               _("free"))
                else:
                    hddinfo += formatstring % (hdd.model(), hdd.capacity(),
                                               hdd.free(), "M", _("free"))
        else:
            hddinfo = _("none")
        self["hddA"] = StaticText(hddinfo)
        AboutText += hddinfo
        self["AboutScrollLabel"] = ScrollLabel(AboutText)
        self["key_green"] = Button(_("Translations"))
        self["key_red"] = Button(_("Latest Commits"))
        self["key_blue"] = Button(_("Memory Info"))

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions", "DirectionActions"], {
                "cancel": self.close,
                "ok": self.close,
                "red": self.showCommits,
                "green": self.showTranslationInfo,
                "blue": self.showMemoryInfo,
                "up": self["AboutScrollLabel"].pageUp,
                "down": self["AboutScrollLabel"].pageDown
            })