コード例 #1
0
 def checkNetworkStateFinished(self, result, retval, extra_args=None):
     if result.find("bad address") != -1:
         self.session.openWithCallback(
             self.InstallPackageFailed,
             MessageBox,
             _("Your %s %s is not connected to the internet, please check your network settings and try again.")
             % (getMachineBrand(), getMachineName()),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True,
         )
     elif (
         result.find("wget returned 1") != -1
         or result.find("wget returned 255") != -1
         or result.find("404 Not Found") != -1
     ):
         self.session.openWithCallback(
             self.InstallPackageFailed,
             MessageBox,
             _("Sorry feeds are down for maintenance, please try again later."),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True,
         )
     else:
         self.session.openWithCallback(
             self.InstallPackage,
             MessageBox,
             _("Your %s %s will be restarted after the installation of service\nReady to install %s ?")
             % (getMachineBrand(), getMachineName(), self.service_name),
             MessageBox.TYPE_YESNO,
         )
コード例 #2
0
ファイル: Flash_online.py プロジェクト: Nobody28/enigma2
	def box(self):
		box = getBoxType()
		machinename = getMachineName()
		if box == 'odinm6':
			box = getMachineName().lower()
		elif box == "inihde" and machinename.lower() == "xpeedlx":
			box = "xpeedlx"
		return box
コード例 #3
0
    def startActualUpgrade(self, answer):
        if not answer or not answer[1]:
            self.close()
            return

        if answer[1] == "menu":
            if config.softwareupdate.updateisunstable.getValue() == '1':
                message = _("The current update maybe unstable") + "\n" + _(
                    "Are you sure you want to update your %s %s ?") % (
                        getMachineBrand(), getMachineName()
                    ) + "\n(%s " % self.total_packages + _("Packages") + ")"
            elif config.softwareupdate.updateisunstable.getValue() == '0':
                message = _("Do you want to update your %s %s ?") % (
                    getMachineBrand(), getMachineName()
                ) + "\n(%s " % self.total_packages + _("Packages") + ")"
            choices = [(_("View the changes"), "changes"),
                       (_("Upgrade and reboot system"), "cold")]
            if not self.SettingsBackupDone and not config.softwareupdate.autosettingsbackup.getValue(
            ) and config.backupmanager.backuplocation.getValue():
                choices.append((_(
                    "Perform a setting backup, making a backup before updating is strongly advised."
                ), "backup"))
            if not self.ImageBackupDone and not config.softwareupdate.autoimagebackup.getValue(
            ) and config.imagemanager.backuplocation.getValue():
                choices.append(
                    (_("Perform a full image backup"), "imagebackup"))
            choices.append((_("Update channel list only"), "channels"))
            choices.append((_("Cancel"), ""))
            upgrademessage = self.session.openWithCallback(
                self.startActualUpgrade,
                ChoiceBox,
                title=message,
                list=choices,
                skin_name="SoftwareUpdateChoices")
            upgrademessage.setTitle(_('Software update'))
        elif answer[1] == "changes":
            self.session.openWithCallback(self.startActualUpgrade,
                                          SoftwareUpdateChanges)
        elif answer[1] == "backup":
            self.doSettingsBackup()
        elif answer[1] == "imagebackup":
            self.doImageBackup()
        elif answer[1] == "channels":
            self.channellist_only = 1
            self.slider.setValue(1)
            self.ipkg.startCmd(IpkgComponent.CMD_LIST,
                               args={'installed_only': True})
        elif answer[1] == "cold":
            if (config.softwareupdate.autosettingsbackup.getValue()
                    and config.backupmanager.backuplocation.getValue()) or (
                        config.softwareupdate.autoimagebackup.getValue()
                        and config.imagemanager.backuplocation.getValue()):
                self.doAutoBackup()
            else:
                self.session.open(TryQuitMainloop, retvalue=42)
                self.close()
コード例 #4
0
    def createSetup(self):
        self.list = []
        self.list.append(
            getConfigListEntry(_("Enabled"), config.hdmicec.enabled))
        if config.hdmicec.enabled.getValue():
            self.list.append(
                getConfigListEntry(_("Put TV in standby"),
                                   config.hdmicec.control_tv_standby))
            self.list.append(
                getConfigListEntry(_("Wakeup TV from standby"),
                                   config.hdmicec.control_tv_wakeup))
            self.list.append(
                getConfigListEntry(_("Regard deep standby as standby"),
                                   config.hdmicec.handle_deepstandby_events))
            self.list.append(
                getConfigListEntry(_("Switch TV to correct input"),
                                   config.hdmicec.report_active_source))
            self.list.append(
                getConfigListEntry(_("Use TV remote control"),
                                   config.hdmicec.report_active_menu))
            self.list.append(
                getConfigListEntry(_("Handle standby from TV"),
                                   config.hdmicec.handle_tv_standby))
            self.list.append(
                getConfigListEntry(_("Handle wakeup from TV"),
                                   config.hdmicec.handle_tv_wakeup))
            self.list.append(
                getConfigListEntry(_("Wakeup signal from TV"),
                                   config.hdmicec.tv_wakeup_detection))
            self.list.append(
                getConfigListEntry(_("Forward volume keys"),
                                   config.hdmicec.volume_forwarding))
            self.list.append(
                getConfigListEntry(
                    _("Put your %s %s in standby") %
                    (getMachineBrand(), getMachineName()),
                    config.hdmicec.control_receiver_standby))
            self.list.append(
                getConfigListEntry(
                    _("Wakeup your %s %s from standby") %
                    (getMachineBrand(), getMachineName()),
                    config.hdmicec.control_receiver_wakeup))
            self.list.append(
                getConfigListEntry(_("Minimum send interval"),
                                   config.hdmicec.minimum_send_interval))
            if fileExists("/proc/stb/hdmi/preemphasis"):
                self.list.append(
                    getConfigListEntry(_("Use HDMI-preemphasis"),
                                       config.hdmicec.preemphasis))
        self["config"].list = self.list
        self["config"].l.setList(self.list)

        self.updateAddress()
コード例 #5
0
ファイル: Flash_online.py プロジェクト: menelix/enigma2
	def box(self):
		box = getBoxType()
		machinename = getMachineName()
		if box == 'odinm6':
			box = getMachineName().lower()
		elif box == "inihde" and machinename.lower() == "xpeedlx":
			box = "xpeedlx"
		elif box == "inihde" and machinename.lower() == "hd-1000":
			box = "sezam-1000hd"
		elif box == "ventonhdx" and machinename.lower() == "hd-5000":
			box = "sezam-5000hd"
		elif box == "ventonhdx" and machinename.lower() == "premium twin":
			box = "miraclebox-twin"
		return box
コード例 #6
0
ファイル: Standby.py プロジェクト: magic-merlin/dvbapp2-gui
	def __init__(self, session, retvalue=1, timeout=-1, default_yes = True):
		self.retval = retvalue
		self.ptsmainloopvalue = retvalue
		recordings = session.nav.getRecordings()
		jobs = len(job_manager.getPendingJobs())
		inTimeshift = Screens.InfoBar.InfoBar and Screens.InfoBar.InfoBar.instance and Screens.InfoBar.InfoBar.ptsGetTimeshiftStatus(Screens.InfoBar.InfoBar.instance)
		self.connected = False
		reason = ""
		next_rec_time = -1
		if not recordings:
			next_rec_time = session.nav.RecordTimer.getNextRecordingTime()
#		if jobs:
#			reason = (ngettext("%d job is running in the background!", "%d jobs are running in the background!", jobs) % jobs) + '\n'
#			if jobs == 1:
#				job = job_manager.getPendingJobs()[0]
#				if job.name == "VFD Checker":		
#					reason = ""
#				else:
#					reason += "%s: %s (%d%%)\n" % (job.getStatustext(), job.name, int(100*job.progress/float(job.end)))
#			else:
#				reason += (_("%d jobs are running in the background!") % jobs) + '\n'
		if inTimeshift:
			reason = _("You seem to be in timeshift!") + '\n'
		if recordings or (next_rec_time > 0 and (next_rec_time - time()) < 360):
			default_yes = False
			reason = _("Recording(s) are in progress or coming up in few seconds!") + '\n'

		if reason and inStandby:
			session.nav.record_event.append(self.getRecordEvent)
			self.skinName = ""
		elif reason and not inStandby:
			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 %s %s and reboot now?") % (getMachineBrand(), getMachineName()),
				43: _("Really reflash your %s %s and reboot now?") % (getMachineBrand(), getMachineName()),				
				44: _("Really upgrade the front panel and reboot now?"),
				45: _("Really WOL 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="1310,0" size="0,0"/>"""
		Screen.__init__(self, session)
		self.close(True)
コード例 #7
0
ファイル: InputDeviceSetup.py プロジェクト: HasBahCa/enigma2
	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 = [_("%s %s front panel") % (getMachineBrand(), getMachineName()),_("%s %s front panel") % (getMachineBrand(), getMachineName()),_("%s %s remote control (native)") % (getMachineBrand(), getMachineName()),_("%s %s advanced remote control (native)") % (getMachineBrand(), getMachineName()),_("%s %s ir keyboard") % (getMachineBrand(), getMachineName()),_("%s %s ir mouse") % (getMachineBrand(), getMachineName())]

		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
コード例 #8
0
	def __init__(self, session):
		MessageBox.__init__(self, session, _("When you do a factory reset, you will lose ALL your configuration data\n"
			"(including bouquets, services, satellite data ...)\n"
			"After completion of factory reset, your %s %s will restart automatically!\n\n"
			"Really do a factory reset?") % (getMachineBrand(), getMachineName()), MessageBox.TYPE_YESNO, default = False)
		self.setTitle(_("Factory reset"))
		self.skinName = "MessageBox"
コード例 #9
0
ファイル: ImageBackup.py プロジェクト: skywatcher111/enigma2
    def __init__(self, session, args=0):
        Screen.__init__(self, session)
        self.session = session
        self.MODEL = getBoxType()
        self.MACHINENAME = getMachineName()
        self.MACHINEBRAND = getMachineBrand()
        print "[FULL BACKUP] BOX MACHINENAME = >%s<" % self.MACHINENAME
        print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" % self.MACHINEBRAND
        print "[FULL BACKUP] BOX MODEL = >%s<" % self.MODEL

        self["key_green"] = Button("USB")
        self["key_red"] = Button("HDD")
        self["key_blue"] = Button(_("Exit"))
        self["key_yellow"] = Button("")
        self["info-usb"] = Label(
            _("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB."
              ))
        self["info-hdd"] = Label(
            _("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic."
              ))
        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"], {
                "blue": self.quit,
                "yellow": self.yellow,
                "green": self.green,
                "red": self.red,
                "cancel": self.quit,
            }, -2)
コード例 #10
0
ファイル: InputDeviceSetup.py プロジェクト: mcron/stb-gui
	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 = [_("%s %s front panel") % (getMachineBrand(), getMachineName()),_("%s %s front panel") % (getMachineBrand(), getMachineName()),_("%s %s remote control (native)") % (getMachineBrand(), getMachineName()),_("%s %s advanced remote control (native)") % (getMachineBrand(), getMachineName()),_("%s %s ir keyboard") % (getMachineBrand(), getMachineName()),_("%s %s ir mouse") % (getMachineBrand(), getMachineName())]

		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
コード例 #11
0
ファイル: CronTimer.py プロジェクト: skywatcher111/enigma2
 def checkNetworkStateFinished(self, result, retval, extra_args=None):
     if result.find('bad address') != -1:
         self.session.openWithCallback(
             self.InstallPackageFailed,
             MessageBox,
             _("Your %s %s is not connected to the internet, please check your network settings and try again."
               ) % (getMachineBrand(), getMachineName()),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     elif result.find('wget returned 1') != -1 or result.find(
             'wget returned 255') != -1 or result.find(
                 '404 Not Found') != -1:
         self.session.openWithCallback(
             self.InstallPackageFailed,
             MessageBox,
             _("Sorry feeds are down for maintenance, please try again later."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     else:
         self.session.openWithCallback(
             self.InstallPackage, MessageBox,
             _('Ready to install "%s" ?') % self.service_name,
             MessageBox.TYPE_YESNO)
コード例 #12
0
ファイル: About.py プロジェクト: regin92/enigma2
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["selected"] = StaticText("openATV:" + getImageVersionString())

		AboutText = _("Model:\t%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") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		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)
コード例 #13
0
 def checkWlanStateCB(self, data, status):
     if data is not None:
         if data is True:
             if status is not None:
                 text1 = _(
                     "Your %s %s is now ready to be used.\n\nYour internet connection is working now.\n\n"
                 ) % (getMachineBrand(), getMachineName())
                 text2 = _('Accesspoint:') + "\t" + str(
                     status[self.selectedInterface]["accesspoint"]) + "\n"
                 text3 = _('SSID:') + "\t" + str(
                     status[self.selectedInterface]["essid"]) + "\n"
                 text4 = _('Link quality:') + "\t" + str(
                     status[self.selectedInterface]["quality"]) + "\n"
                 text5 = _('Signal strength:') + "\t" + str(
                     status[self.selectedInterface]["signal"]) + "\n"
                 text6 = _('Bitrate:') + "\t" + str(
                     status[self.selectedInterface]["bitrate"]) + "\n"
                 text7 = _('Encryption:') + " " + str(
                     status[self.selectedInterface]["encryption"]) + "\n"
                 text8 = _("Please press OK to continue.")
                 infotext = text1 + text2 + text3 + text4 + text5 + text7 + "\n" + text8
                 self.currStep = self.getStepWithID("checkWlanstatusend")
                 self.Text = infotext
                 if str(status[self.selectedInterface]
                        ["accesspoint"]) == "Not-Associated":
                     self.InterfaceState = False
                 self.afterAsyncCode()
コード例 #14
0
 def checkNetworkStateFinished(self, result, retval, extra_args=None):
     if result.find('bad address') != -1:
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Your %s %s is not connected to the internet, please check your network settings and try again."
               ) % (getMachineBrand(), getMachineName()),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     elif result.find('wget returned 1') != -1 or result.find(
             'wget returned 255') != -1 or result.find(
                 '404 Not Found') != -1:
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Sorry feeds are down for maintenance, please try again later."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     elif result.find('Collected errors') != -1:
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("A background update check is is progress, please wait a few minutes and try again."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=10,
             close_on_any_key=True)
     else:
         self.startCheck()
コード例 #15
0
ファイル: Standby.py プロジェクト: menelix/enigma2
	def __init__(self, session, retvalue=1):
		self.skin = """<screen name="QuitMainloopScreen" position="fill" flags="wfNoBorder">
			<ePixmap pixmap="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 %s %s is shutting down") % (getMachineBrand(), getMachineName()),
			2: _("Your %s %s is rebooting") % (getMachineBrand(), getMachineName()),
			3: _("The user interface of your %s %s is restarting") % (getMachineBrand(), getMachineName()),
			4: _("Your frontprocessor will be upgraded\nPlease wait until your %s %s reboots\nThis may take a few minutes") % (getMachineBrand(), getMachineName()),
			5: _("The user interface of your %s %s is restarting\ndue to an error in mytest.py") % (getMachineBrand(), getMachineName()),
			42: _("Upgrade in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes") % (getMachineBrand(), getMachineName()),
			43: _("Reflash in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes") % (getMachineBrand(), getMachineName()),
			44: _("Your front panel will be upgraded\nThis may take a few minutes")}.get(retvalue)
		self["text"] = Label(text)
コード例 #16
0
ファイル: Flash_online.py プロジェクト: mcron/stb-gui
 def box(self):
     box = getBoxType()
     machinename = getMachineName()
     if box == 'odinm6':
         box = getMachineName().lower()
     elif box == "inihde" and machinename.lower() == "xpeedlx":
         box = "xpeedlx"
     elif box == "inihde" and machinename.lower() == "hd-1000":
         box = "sezam-1000hd"
     elif box == "ventonhdx" and machinename.lower() == "hd-5000":
         box = "sezam-5000hd"
     elif box == "ventonhdx" and machinename.lower() == "premium twin":
         box = "miraclebox-twin"
     elif box == "xp1000" and machinename.lower() == "sf8 hd":
         box = "sf8"
     return box
コード例 #17
0
ファイル: About.py プロジェクト: fcjohn/enigma2
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent=parent)
        self["selected"] = StaticText("openATV:" + getImageVersionString())

        AboutText = _("Model:\t%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") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        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)
コード例 #18
0
 def __init__(self):
     self.titles = []
     self.target = None
     self.settings = ConfigSubsection()
     self.settings.name = ConfigText(fixed_size=False, visible_width=40)
     self.settings.authormode = ConfigSelection(
         choices=[("menu_linked", _("Linked titles with a DVD menu")),
                  ("just_linked",
                   _("Direct playback of linked titles without menu")),
                  ("menu_seperate", _("Seperate titles with a main menu")),
                  ("data_ts", _("%s %s format data DVD (HDTV compatible)") %
                   (getMachineBrand(), getMachineName()))])
     self.settings.titlesetmode = ConfigSelection(choices=[
         ("single",
          _("Simple titleset (compatibility for legacy players)")),
         ("multi", _("Complex (allows mixing audio tracks and aspects)"))
     ],
                                                  default="multi")
     self.settings.output = ConfigSelection(
         choices=[("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
     self.settings.isopath = ConfigText(fixed_size=False, visible_width=40)
     self.settings.dataformat = ConfigSelection(choices=[("iso9660_1", (
         "ISO9660 Level 1")), ("iso9660_4",
                               ("ISO9660 version 2")), ("udf", ("UDF"))])
     self.settings.menutemplate = ConfigFilename()
     self.settings.vmgm = ConfigFilename()
     self.filekeys = ["vmgm", "isopath", "menutemplate"]
     self.menutemplate = MenuTemplate()
     self.error = ""
     self.session = None
コード例 #19
0
ファイル: PowerLost.py プロジェクト: HasBahCa/enigma2
	def showMessageBox(self):
		if config.usage.boot_action.getValue() == 'normal':
			message = _("Your %s %s was not shutdown properly.\n\n"
					"Do you want to put it in %s?") % (getMachineBrand(), getMachineName(), config.usage.shutdownNOK_action.getValue())
			self.session.openWithCallback(self.MsgBoxClosed, MessageBox, message, MessageBox.TYPE_YESNO, timeout = 60, default = True)
		else:
			self.MsgBoxClosed(True)
コード例 #20
0
 def statusCallback(self, status, progress):
     print "statusCallback:", status, progress
     if status == DreamInfoHandler.STATUS_DONE:
         self["text"].setText(
             _("The installation of the default settings is finished. You can now continue configuring your %s %s by pressing the OK button on the remote control."
               ) % (getMachineBrand(), getMachineName()))
         self.markDone()
         self.disableKeys = False
コード例 #21
0
ファイル: downloader.py プロジェクト: skywatcher111/enigma2
 def showHint(self, ret=None):
     self.session.open(
         MessageBox,
         _("To update your %s %s firmware, please follow these steps:\n1) Turn off your box with the rear power switch and make sure the bootable USB stick is plugged in.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."
           ) % (getMachineBrand(), getMachineName()),
         type=MessageBox.TYPE_INFO)
     self.umountCallback = self.keyRed
     self.umount()
コード例 #22
0
    def __init__(self, session, retvalue=1):
        self.skin = """<screen name="QuitMainloopScreen" position="fill" flags="wfNoBorder">
			<ePixmap pixmap="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 %s %s is shutting down") %
            (getMachineBrand(), getMachineName()),
            2:
            _("Your %s %s is rebooting") %
            (getMachineBrand(), getMachineName()),
            3:
            _("The user interface of your %s %s is restarting") %
            (getMachineBrand(), getMachineName()),
            4:
            _("Your frontprocessor will be upgraded\nPlease wait until your %s %s reboots\nThis may take a few minutes"
              ) % (getMachineBrand(), getMachineName()),
            5:
            _("The user interface of your %s %s is restarting\ndue to an error in mytest.py"
              ) % (getMachineBrand(), getMachineName()),
            42:
            _("Upgrade in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes"
              ) % (getMachineBrand(), getMachineName()),
            43:
            _("Reflash in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes"
              ) % (getMachineBrand(), getMachineName()),
            44:
            _("Your front panel will be upgraded\nThis may take a few minutes")
        }.get(retvalue)
        self["text"] = Label(text)
コード例 #23
0
 def __init__(self, url, outfile, headers=None):
     client.HTTPDownloader.__init__(self,
                                    url,
                                    outfile,
                                    headers=headers,
                                    agent="%s %s HTTP Downloader" %
                                    (getMachineBrand(), getMachineName()))
     self.status = None
     self.progress_callback = None
     self.deferred = defer.Deferred()
コード例 #24
0
ファイル: plugin.py プロジェクト: pappaalfio/enigma2
 def __evVideoDecodeError(self):
     currPlay = self.session.nav.getCurrentService()
     sTagVideoCodec = currPlay.info().getInfoString(iServiceInformation.sTagVideoCodec)
     print "[__evVideoDecodeError] video-codec %s can't be decoded by hardware" % (sTagVideoCodec)
     self.session.open(
         MessageBox,
         _("This %s %s cannot decode %s streams!") % (getMachineBrand(), getMachineName(), sTagVideoCodec),
         type=MessageBox.TYPE_INFO,
         timeout=20,
     )
コード例 #25
0
ファイル: plugin.py プロジェクト: skywatcher111/enigma2
 def InstalldataAvail(self, str, retval, extra_args):
     if not str:
         restartbox = self.session.openWithCallback(
             self.InstallPackage, MessageBox,
             _('Your %s %s will be restarted after the installation of service.\n\nDo you want to install now ?'
               ) % (getMachineBrand(), getMachineName()),
             MessageBox.TYPE_YESNO)
         restartbox.setTitle(
             _('Ready to install "%s" ?') % self.service_name)
     else:
         self.updateService()
コード例 #26
0
    def addItems(self, list, parentNode):
        for x in parentNode:
            if not x.tag:
                continue
            if x.tag == 'item':
                item_level = int(x.get("level", 0))

                if not self.levelChanged in config.usage.setup_level.notifiers:
                    config.usage.setup_level.notifiers.append(
                        self.levelChanged)
                    self.onClose.append(self.removeNotifier)

                if item_level > config.usage.setup_level.index:
                    continue

                requires = x.get("requires")
                if requires and requires.startswith('config.'):
                    item = eval(requires or "")
                    if item.getValue() and not item.getValue() == "0":
                        SystemInfo[requires] = True
                    else:
                        SystemInfo[requires] = False

                if requires and not SystemInfo.get(requires, False):
                    continue

                item_text = _(x.get("text", "??").encode("UTF-8"))
                item_text = item_text.replace(
                    "%s %s", "%s %s" % (getMachineBrand(), getMachineName()))
                item_description = _(x.get("description", " ").encode("UTF-8"))
                item_description = item_description.replace(
                    "%s %s", "%s %s" % (getMachineBrand(), getMachineName()))
                b = eval(x.text or "")
                if b == "":
                    continue
                #add to configlist
                item = b
                # the first b is the item itself, ignored by the configList.
                # the second one is converted to string.
                if not isinstance(item, ConfigNothing):
                    list.append((item_text, item, item_description))
コード例 #27
0
ファイル: plugin.py プロジェクト: fcjohn/enigma2
 def __evVideoDecodeError(self):
     currPlay = self.session.nav.getCurrentService()
     sTagVideoCodec = currPlay.info().getInfoString(
         iServiceInformation.sTagVideoCodec)
     print "[__evVideoDecodeError] video-codec %s can't be decoded by hardware" % (
         sTagVideoCodec)
     self.session.open(
         MessageBox,
         _("This %s %s cannot decode %s streams!") %
         (getMachineBrand(), getMachineName(), sTagVideoCodec),
         type=MessageBox.TYPE_INFO,
         timeout=20)
コード例 #28
0
 def getLanStatusMsg(self):
     eth0 = about.getIfConfig('eth0')
     if eth0.has_key('addr'):
         text11 = _("Your IP:") + "\t" + eth0['addr'] + "\n\n"
         if eth0.has_key('netmask'):
             text11 += _("Netmask:") + "\t" + eth0['netmask'] + "\n"
         if eth0.has_key('brdaddr'):
             text11 += _("Gateway:") + "\t" + eth0['brdaddr'] + "\n"
         if eth0.has_key('hwaddr'):
             text11 += _("MAC:") + "\t" + eth0['hwaddr'] + "\n"
     try:
         text1 = _(
             "Your %s %s is now ready to be used.\n\nYour internet connection is working now.\n\n"
         ) % (getMachineBrand(), getMachineName())
         text2 = _("Please press OK to continue.")
         return text1 + text11 + "\n" + text2
     except:
         text1 = _(
             "Your %s %s is now ready to be used.\n\nYour internet connection is not working now.\n\n"
         ) % (getMachineBrand(), getMachineName())
         text2 = _("Please press OK to continue.")
         return text1 + "\n" + text2
コード例 #29
0
 def exit(self):
     if not self.ipkg.isRunning():
         if self.packages != 0 and self.error == 0 and self.channellist_only == 0:
             self.session.openWithCallback(
                 self.exitAnswer, MessageBox,
                 _("Upgrade finished.") + " " +
                 _("Do you want to reboot your %s %s") %
                 (getMachineBrand(), getMachineName()))
         else:
             self.close()
     else:
         if not self.updating:
             self.close()
コード例 #30
0
ファイル: plugin.py プロジェクト: skywatcher111/enigma2
	def greenPressed(self):
		cur = self["CiList"].getCurrent()
		if cur and len(cur) > 2:
			action = cur[2]
			slot = cur[3]
			if action == 1:
				print "[CI_Wizzard] there is no CI Slot in your %s %s" % (getMachineBrand(), getMachineName())
			else:
				print "[CI_Wizzard] selected CI Slot : %d" % slot
				if config.usage.setup_level.index > 1: # advanced
					self.session.open(CIconfigMenu, slot)
				else:
					self.session.open(easyCIconfigMenu, slot)
コード例 #31
0
ファイル: plugin.py プロジェクト: Nobody28/enigma2
	def greenPressed(self):
		cur = self["CiList"].getCurrent()
		if cur and len(cur) > 2:
			action = cur[2]
			slot = cur[3]
			if action == 1:
				print "[CI_Wizzard] there is no CI Slot in your %s %s" % (getMachineBrand(), getMachineName())
			else:
				print "[CI_Wizzard] selected CI Slot : %d" % slot
				if config.usage.setup_level.index > 1: # advanced
					self.session.open(CIconfigMenu, slot)
				else:
					self.session.open(easyCIconfigMenu, slot)
コード例 #32
0
ファイル: About.py プロジェクト: fcjohn/enigma2
    def populate(self):
        self["lab1"] = StaticText(_("openATV"))
        self["lab2"] = StaticText(_("By openATV Image Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

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

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

        AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
        AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

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

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\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()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s") % tempinfo.replace(
                '\n', '') + mark + "C\n\n"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #33
0
 def showMessageBox(self):
     if config.usage.boot_action.getValue() == 'normal':
         message = _("Your %s %s was not shutdown properly.\n\n"
                     "Do you want to put it in %s?") % (
                         getMachineBrand(), getMachineName(),
                         config.usage.shutdownNOK_action.getValue())
         self.session.openWithCallback(self.MsgBoxClosed,
                                       MessageBox,
                                       message,
                                       MessageBox.TYPE_YESNO,
                                       timeout=60,
                                       default=True)
     else:
         self.MsgBoxClosed(True)
コード例 #34
0
ファイル: About.py プロジェクト: regin92/enigma2
	def populate(self):
		self["lab1"] = StaticText(_("openATV"))
		self["lab2"] = StaticText(_("By openATV Image Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

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


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

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

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

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\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()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
コード例 #35
0
ファイル: TaskView.py プロジェクト: skywatcher111/enigma2
 def performAfterEvent(self):
     self["config"].hide()
     if self.settings.afterEvent.getValue() == "nothing":
         return
     elif self.settings.afterEvent.getValue(
     ) == "close" and self.job.status == self.job.FINISHED:
         self.close(False)
     from Screens.MessageBox import MessageBox
     if self.settings.afterEvent.getValue() == "deepstandby":
         if not Screens.Standby.inTryQuitMainloop:
             Notifications.AddNotificationWithCallback(
                 self.sendTryQuitMainloopNotification,
                 MessageBox,
                 _("A sleep timer wants to shut down\nyour %s %s. Shutdown now?"
                   ) % (getMachineBrand(), getMachineName()),
                 timeout=20)
     elif self.settings.afterEvent.getValue() == "standby":
         if not Screens.Standby.inStandby:
             Notifications.AddNotificationWithCallback(
                 self.sendStandbyNotification,
                 MessageBox,
                 _("A sleep timer wants to set your\n%s %s to standby. Do that now?"
                   ) % (getMachineBrand(), getMachineName()),
                 timeout=20)
コード例 #36
0
ファイル: downloader.py プロジェクト: skywatcher111/enigma2
    def askStartWizard(self):
        self.branch = STICK_WIZARD
        message = _(
            """This plugin creates a USB stick which can be used to update the firmware of your %s %s without the need for a network or WLAN connection.
First, a USB stick needs to be prepared so that it becomes bootable.
In the next step, an NFI image file can be downloaded from the update server and saved on the USB stick.
If you already have a prepared bootable USB stick, please insert it now. Otherwise plug in a USB stick with a minimum size of 64 MB!"""
        ) % (getMachineBrand(), getMachineName())
        self.session.openWithCallback(self.wizardDeviceBrowserClosed,
                                      DeviceBrowser,
                                      None,
                                      message,
                                      showDirectories=True,
                                      showMountpoints=True,
                                      inhibitMounts=[
                                          "/", "/autofs/sr0/", "/autofs/sda1/",
                                          "/media/hdd/", "/media/net/",
                                          self.usbmountpoint, "/media/dvd/"
                                      ])
コード例 #37
0
 def checkWlanStateCB(self, data, status):
     if data is not None:
         if data is True:
             if status is not None:
                 wlan0 = about.getIfConfig('wlan0')
                 if wlan0.has_key('addr'):
                     text11 = _("Your IP:") + "\t" + wlan0['addr'] + "\n\n"
                     if wlan0.has_key('netmask'):
                         text11 += _(
                             "Netmask:") + "\t" + wlan0['netmask'] + "\n"
                     if wlan0.has_key('brdaddr'):
                         text11 += _(
                             "Gateway:") + "\t" + wlan0['brdaddr'] + "\n"
                     if wlan0.has_key('hwaddr'):
                         text11 += _(
                             "MAC:") + "\t" + wlan0['hwaddr'] + "\n\n"
                 text1 = _(
                     "Your %s %s is now ready to be used.\n\nYour internet connection is working now.\n\n"
                 ) % (getMachineBrand(), getMachineName())
                 text2 = _('Accesspoint:') + "\t" + str(
                     status[self.selectedInterface]["accesspoint"]) + "\n"
                 text3 = _('SSID:') + "\t" + str(
                     status[self.selectedInterface]["essid"]) + "\n"
                 text4 = _('Link quality:') + "\t" + str(
                     status[self.selectedInterface]["quality"]) + "\n"
                 text5 = _('Signal strength:') + "\t" + str(
                     status[self.selectedInterface]["signal"]) + "\n"
                 text6 = _('Bitrate:') + "\t" + str(
                     status[self.selectedInterface]["bitrate"]) + " Mbps\n"
                 text7 = _('Encryption:') + "\t" + str(
                     status[self.selectedInterface]["encryption"]) + "\n"
                 text8 = _("Please press OK to continue.")
                 try:
                     infotext = text1 + text11 + text2 + text3 + text4 + text6 + text7 + "\n" + text8
                 except:
                     infotext = text1 + text2 + text3 + text4 + text6 + text7 + "\n" + text8
                 self.currStep = self.getStepWithID("checkWlanstatusend")
                 self.Text = infotext
                 if str(status[self.selectedInterface]
                        ["accesspoint"]) == "Not-Associated":
                     self.InterfaceState = False
                 self.afterAsyncCode()
コード例 #38
0
ファイル: Setup.py プロジェクト: HasBahCa/enigma2
	def addItems(self, list, parentNode):
		for x in parentNode:
			if not x.tag:
				continue
			if x.tag == 'item':
				item_level = int(x.get("level", 0))

				if not self.onNotifiers:
					self.onNotifiers.append(self.levelChanged)
					self.onClose.append(self.removeNotifier)

				if item_level > self.onNotifiers.index:
					continue

				requires = x.get("requires")
				if requires and requires.startswith('config.'):
					item = eval(requires or "")
					if item.getValue() and not item.getValue() == "0":
						SystemInfo[requires] = True
					else:
						SystemInfo[requires] = False

				if requires and not SystemInfo.get(requires, False):
					continue

				item_text = _(x.get("text", "??").encode("UTF-8"))
				item_text = item_text.replace("%s %s","%s %s" % (getMachineBrand(), getMachineName()))
				item_description = _(x.get("description", " ").encode("UTF-8"))
				item_description = item_description.replace("%s %s","%s %s" % (getMachineBrand(), getMachineName()))
				b = eval(x.text or "")
				if b == "":
					continue
				#add to configlist
				item = b
				# the first b is the item itself, ignored by the configList.
				# the second one is converted to string.
				if not isinstance(item, ConfigNothing):
					list.append((item_text, item, item_description))
コード例 #39
0
ファイル: SoftwareUpdate.py プロジェクト: pappaalfio/enigma2
	def startActualUpgrade(self, answer):
		if not answer or not answer[1]:
			self.close()
			return

		if answer[1] == "menu":
			if config.softwareupdate.updateisunstable.getValue() == '1':
				message = _("The current update maybe unstable") + "\n" + _("Are you sure you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(%s " % self.total_packages + _("Packages") + ")"
			elif config.softwareupdate.updateisunstable.getValue() == '0':
				message = _("Do you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(%s " % self.total_packages + _("Packages") + ")"
			choices = [(_("View the changes"), "changes"),
				(_("Upgrade and reboot system"), "cold")]
			if not self.SettingsBackupDone and not config.softwareupdate.autosettingsbackup.getValue() and config.backupmanager.backuplocation.getValue():
				choices.append((_("Perform a setting backup, making a backup before updating is strongly advised."), "backup"))
			if not self.ImageBackupDone and not config.softwareupdate.autoimagebackup.getValue() and config.imagemanager.backuplocation.getValue():
				choices.append((_("Perform a full image backup"), "imagebackup"))
			choices.append((_("Update channel list only"), "channels"))
			choices.append((_("Cancel"), ""))
			upgrademessage = self.session.openWithCallback(self.startActualUpgrade, ChoiceBox, title=message, list=choices, skin_name = "SoftwareUpdateChoices")
			upgrademessage.setTitle(_('Software update'))
		elif answer[1] == "changes":
			self.session.openWithCallback(self.startActualUpgrade,SoftwareUpdateChanges)
		elif answer[1] == "backup":
			self.doSettingsBackup()
		elif answer[1] == "imagebackup":
			self.doImageBackup()
		elif answer[1] == "channels":
			self.channellist_only = 1
			self.slider.setValue(1)
			self.ipkg.startCmd(IpkgComponent.CMD_LIST, args = {'installed_only': True})
		elif answer[1] == "cold":
			if (config.softwareupdate.autosettingsbackup.getValue() and config.backupmanager.backuplocation.getValue()) or (config.softwareupdate.autoimagebackup.getValue() and config.imagemanager.backuplocation.getValue()):
				self.doAutoBackup()
			else:
				self.session.open(TryQuitMainloop,retvalue=42)
				self.close()
コード例 #40
0
ファイル: InfoBar.py プロジェクト: IanSav/enigma2-Beyonwiz
 def showPiP(self):
     try:
         service = self.session.nav.getCurrentService()
         info = service and service.info()
         xres = str(info.getInfo(enigma.iServiceInformation.sVideoWidth))
         slist = self.servicelist
         if self.session.pipshown:
             if slist and slist.dopipzap:
                 slist.togglePipzap()
             if self.session.pipshown:
                 del self.session.pip
                 self.session.pipshown = False
         else:
             if int(xres) <= 720 or about.getCPUString(
             ) == 'BCM7346B2' or about.getCPUString() == 'BCM7425B2':
                 from Screens.PictureInPicture import PictureInPicture
                 self.session.pip = self.session.instantiateDialog(
                     PictureInPicture)
                 self.session.pip.show()
                 if self.session.pip.playService(
                         slist.getCurrentSelection()):
                     self.session.pipshown = True
                     self.session.pip.servicePath = slist.getCurrentServicePath(
                     )
                 else:
                     self.session.pipshown = False
                     del self.session.pip
             else:
                 self.session.open(
                     MessageBox,
                     _("Your %s %s does not support PiP HD") %
                     (enigma.getMachineBrand(), enigma.getMachineName()),
                     type=MessageBox.TYPE_INFO,
                     timeout=5)
     except:
         pass
コード例 #41
0
ファイル: ImageBackup.py プロジェクト: pappaalfio/enigma2
	def __init__(self, session, args = 0):
		Screen.__init__(self, session)
		self.session = session
		self.MODEL = getBoxType()
		self.MACHINENAME = getMachineName()
		self.MACHINEBRAND = getMachineBrand()
		print "[FULL BACKUP] BOX MACHINENAME = >%s<" %self.MACHINENAME
		print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" %self.MACHINEBRAND
		print "[FULL BACKUP] BOX MODEL = >%s<" %self.MODEL
		
		self["key_green"] = Button("USB")
		self["key_red"] = Button("HDD")
		self["key_blue"] = Button(_("Exit"))
		self["key_yellow"] = Button("")
		self["info-usb"] = Label(_("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB."))
		self["info-hdd"] = Label(_("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic."))
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], 
		{
			"blue": self.quit,
			"yellow": self.yellow,
			"green": self.green,
			"red": self.red,
			"cancel": self.quit,
		}, -2)
コード例 #42
0
ファイル: SoftwareUpdate.py プロジェクト: almwad3/dvbapp2-gui
	def checkNetworkStateFinished(self, result, retval,extra_args=None):
		if 'bad address' in result:
			self.session.openWithCallback(self.close, MessageBox, _("Your %s %s is not connected to the internet, please check your network settings and try again.") % (getMachineBrand(), getMachineName()), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		elif ('wget returned 1' or 'wget returned 255' or '404 Not Found') in result:
			self.session.openWithCallback(self.close, MessageBox, _("Sorry feeds are down for maintenance, please try again later."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		elif 'Collected errors' in result:
			self.session.openWithCallback(self.close, MessageBox, _("A background update check is in progress, please wait a few minutes and try again."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		else:
			self.startCheck()
コード例 #43
0
ファイル: SoftwareUpdate.py プロジェクト: almwad3/dvbapp2-gui
	def exit(self):
		if not self.ipkg.isRunning():
			if self.packages != 0 and self.error == 0 and self.channellist_only == 0:
				self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your %s %s") % (getMachineBrand(), getMachineName()))
			else:
				self.close()
		else:
			if not self.updating:
				self.close()
コード例 #44
0
ファイル: SoftwareUpdate.py プロジェクト: almwad3/dvbapp2-gui
	def ipkgCallback(self, event, param):
		if event == IpkgComponent.EVENT_DOWNLOAD:
			self.status.setText(_("Downloading"))
		elif event == IpkgComponent.EVENT_UPGRADE:
			if self.sliderPackages.has_key(param):
				self.slider.setValue(self.sliderPackages[param])
			self.package.setText(param)
			self.status.setText(_("Upgrading") + ": %s/%s" % (self.packages, self.total_packages))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_INSTALL:
			self.package.setText(param)
			self.status.setText(_("Installing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_REMOVE:
			self.package.setText(param)
			self.status.setText(_("Removing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_CONFIGURING:
			self.package.setText(param)
			self.status.setText(_("Configuring"))
		elif event == IpkgComponent.EVENT_MODIFIED:
			if config.plugins.softwaremanager.overwriteConfigFiles.value in ("N", "Y"):
				self.ipkg.write(True and config.plugins.softwaremanager.overwriteConfigFiles.value)
			else:
				self.session.openWithCallback(
					self.modificationCallback,
					MessageBox,
					_("A configuration file (%s) has been modified since it was installed.\nDo you want to keep your modifications?") % (param)
				)
		elif event == IpkgComponent.EVENT_ERROR:
			self.error += 1
		elif event == IpkgComponent.EVENT_DONE:
			if self.updating:
				self.updating = False
				self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
			elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
				self.total_packages = len(self.ipkg.getFetchedList())
				if self.total_packages:
					message = _("Do you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(" + (ngettext("%s updated package available", "%s updated packages available", self.total_packages) % self.total_packages) + ")"
					choices = [(_("Update and reboot (recommended)"), "cold"),
						(_("Update and ask to reboot"), "hot"),
						(_("Update channel list only"), "channels"),
						(_("Cancel"), "")]
					self.session.openWithCallback(self.startActualUpgrade, ChoiceBox, title=message, list=choices)
				else:
					self.session.openWithCallback(self.close, MessageBox, _("No updates available"), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
			elif self.channellist_only > 0:
				if self.channellist_only == 1:
					self.setEndMessage(_("Could not find installed channel list."))
				elif self.channellist_only == 2:
					self.slider.setValue(2)
					self.ipkg.startCmd(IpkgComponent.CMD_REMOVE, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 3:
					self.slider.setValue(3)
					self.ipkg.startCmd(IpkgComponent.CMD_INSTALL, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 4:
					self.showUpdateCompletedMessage()
					eDVBDB.getInstance().reloadBouquets()
					eDVBDB.getInstance().reloadServicelist()
			elif self.error == 0:
				self.showUpdateCompletedMessage()
			else:
				self.activityTimer.stop()
				self.activityslider.setValue(0)
				error = _("Your %s %s might be unusable now. Please consult the manual for further assistance before rebooting your %s %s.") % (getMachineBrand(), getMachineName(), getMachineBrand(), getMachineName())
				if self.packages == 0:
					error = _("No updates available. Please try again later.")
				if self.updating:
					error = _("Update failed. Your %s %s does not have a working internet connection.") % (getMachineBrand(), getMachineName())
				self.status.setText(_("Error") +  " - " + error)
		elif event == IpkgComponent.EVENT_LISTITEM:
			if 'enigma2-plugin-settings-' in param[0] and self.channellist_only > 0:
				self.channellist_name = param[0]
				self.channellist_only = 2
		#print event, "-", param
		pass
コード例 #45
0
ファイル: ImageBackup.py プロジェクト: skywatcher111/enigma2
    def imageInfo(self):
        AboutText = _("Full Image Backup ")
        AboutText += _("By openATV Image Team") + "\n"
        AboutText += _("Support at") + " www.opena.tv\n\n"
        AboutText += _("[Image Info]\n")
        AboutText += _("Model: %s %s\n") % (getMachineBrand(),
                                            getMachineName())
        AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d",
                                                       localtime(self.START))

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

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

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

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

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        AboutText += _("[Enigma2 Settings]\n")
        AboutText += commands.getoutput("cat /etc/enigma2/settings")
        AboutText += _("\n\n[User - bouquets (TV)]\n")
        try:
            f = open("/etc/enigma2/bouquets.tv", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.tv"

        AboutText += _("\n[User - bouquets (RADIO)]\n")
        try:
            f = open("/etc/enigma2/bouquets.radio", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.radio"

        AboutText += _("\n[Installed Plugins]\n")
        AboutText += commands.getoutput(
            "opkg list_installed | grep enigma2-plugin-")

        return AboutText
コード例 #46
0
ファイル: RcModel.py プロジェクト: pappaalfio/enigma2
	def readRcTypeFromProc(self):
		if os.path.exists('/proc/stb/info/azmodel'):
			f = open("/proc/stb/info/model",'r')
			model = f.readline().strip()
			f.close()
			if model == "premium" or model == "premium+":
				self.currentRcType = self.RCTYPE_AZBOXHD
			elif model == "elite" or model == "ultra":
				self.currentRcType = self.RCTYPE_AZBOXELITE
			elif model == "me" or model == "minime":
				self.currentRcType = self.RCTYPE_AZBOXME
		elif os.path.exists('/proc/stb/info/hwmodel'):
			model = self.readFile('/proc/stb/info/hwmodel')
			if model == 'tmtwinoe' or model == 'tm2toe' or model == 'tmsingle' or model == 'tmnanooe':
				self.currentRcType = self.RCTYPE_TM
			elif model == 'ios100hd' or model == 'ios200hd' or model == 'ios300hd' or model == 'force1':
				self.currentRcType = self.RCTYPE_IQON
			elif model == "mediabox":
				self.currentRcType = self.RCTYPE_MEDIABOX
			elif model == "optimussos1" or model == 'optimussos2':
				self.currentRcType = self.RCTYPE_OPTIMUSS
		elif getBoxType() == 'dm8000':
				self.currentRcType = self.RCTYPE_DMM
		elif getBoxType() == 'dm7020hd' or getBoxType() == 'dm7020hdv2' or getBoxType() == 'dm800sev2' or getBoxType() == 'dm500hdv2':
				self.currentRcType = self.RCTYPE_DMM2
		elif getBoxType() == 'dm800' or getBoxType() == 'dm800se' or getBoxType() == 'dm500hd':
				self.currentRcType = self.RCTYPE_DMM1
		elif os.path.exists('/proc/stb/info/boxtype'):
			model = self.readFile('/proc/stb/info/boxtype')
			if model.startswith('et') or model.startswith('xp'):
				rc = self.readFile('/proc/stb/ir/rc/type')
				if rc == '3':
					self.currentRcType = self.RCTYPE_ODINM9
				if rc == '4':
					self.currentRcType = self.RCTYPE_DMM
				elif rc == '5':
					self.currentRcType = self.RCTYPE_ET9X00
				elif rc == '6':
					self.currentRcType = self.RCTYPE_DMM
				elif rc == '7':
					self.currentRcType = self.RCTYPE_ET6X00
				elif rc == '8':
					self.currentRcType = self.RCTYPE_VU
				elif rc == '9' and model == 'et9500':
					self.currentRcType = self.RCTYPE_ET9500
				elif rc == '9' and model == 'et6500':
					self.currentRcType = self.RCTYPE_ET6500
				elif rc == '11' and model == 'et9200':
					self.currentRcType = self.RCTYPE_ET9500
				elif rc == '11' and model == 'et9000':
					self.currentRcType = self.RCTYPE_ET9x00
				elif rc == '13' and model == 'et4000':
					self.currentRcType = self.RCTYPE_ET4X00
				elif rc == '14':
					self.currentRcType = self.RCTYPE_XP1000
			elif model == 'ebox5000' or model == 'ebox5100' or model == 'ebox7358':
				self.currentRcType = self.RCTYPE_EBOX5000
			elif model == 'gigablue':
				self.currentRcType = self.RCTYPE_GB
			elif model == 'cube':
				self.currentRcType = self.RCTYPE_CUBE
			elif model == 'ini-3000':
				fp_version = str(getFPVersion())
				if fp_version.startswith('1'):
					self.currentRcType = self.RCTYPE_INI0
				else:
					self.currentRcType = self.RCTYPE_INI2
			elif model == 'ini-5000' or model == 'ini-7000' or model == 'ini-7012' or model == 'ini-9000':
				self.currentRcType = self.RCTYPE_INI1
			elif model == 'ini-1000' or model == 'ini-1000ru' or model == 'ini-5000ru' or model == 'ini-9000ru':
				self.currentRcType = self.RCTYPE_INI2
			elif model == 'ini-1000sv' or model == 'ini-5000sv' or model == 'ini-9000sv':
				self.currentRcType = self.RCTYPE_INI3
			elif model == 'ini-1000de' or model == 'ini-9000de':
				self.currentRcType = self.RCTYPE_INI4				
			elif getBoxType() == 'odinm6' or getMachineName() == 'AX-Odin':
				self.currentRcType = self.RCTYPE_ODINM6
			elif model == 'e3hd':
				self.currentRcType = self.RCTYPE_E3HD
			elif model == 'odinm9':
				self.currentRcType = self.RCTYPE_ODINM9
			elif model == 'odinm7':
				self.currentRcType = self.RCTYPE_ODINM7
			elif model.startswith('Ixuss'):
				if getBoxType() == 'ixussone':
					self.currentRcType = self.RCTYPE_IXUSSONE
				elif getBoxType() == 'ixusszero':
					self.currentRcType = self.RCTYPE_IXUSSZERO
			elif model == 'sogno-8800hd':
				self.currentRcType = self.RCTYPE_SOGNO	
		elif os.path.exists('/proc/stb/info/vumodel'):
			model = self.readFile('/proc/stb/info/vumodel')
			if model == 'ultimo':
				self.currentRcType = self.RCTYPE_VU2
			elif model == 'duo2':
				self.currentRcType = self.RCTYPE_VU3
			else:
				self.currentRcType = self.RCTYPE_VU
コード例 #47
0
ファイル: RecordTimer.py プロジェクト: mcron/stb-gui
            if not self.justplay:
                if self.record_service:
                    NavigationInstance.instance.stopRecordService(
                        self.record_service)
                    self.record_service = None

            NavigationInstance.instance.RecordTimer.saveTimer()
            if self.afterEvent == AFTEREVENT.STANDBY or (
                    not wasRecTimerWakeup and self.autostate
                    and self.afterEvent == AFTEREVENT.AUTO):
                if not Screens.Standby.inStandby:  # not already in standby
                    Notifications.AddNotificationWithCallback(
                        self.sendStandbyNotification,
                        MessageBox,
                        _("A finished record timer wants to set your\n%s %s to standby. Do that now?"
                          ) % (getMachineBrand(), getMachineName()),
                        timeout=180)
            elif self.afterEvent == AFTEREVENT.DEEPSTANDBY or (
                    wasRecTimerWakeup and self.afterEvent == AFTEREVENT.AUTO):
                if (
                        abs(NavigationInstance.instance.RecordTimer.
                            getNextRecordingTime() - time()) <= 900
                        or abs(NavigationInstance.instance.RecordTimer.
                               getNextZapTime() - time()) <= 900
                ) or NavigationInstance.instance.RecordTimer.getStillRecording(
                ):
                    print '[Timer] Recording or Recording due is next 15 mins, not return to deepstandby'
                    return True
                if not Screens.Standby.inTryQuitMainloop:  # not a shutdown messagebox is open
                    if Screens.Standby.inStandby:  # in standby
                        quitMainloop(1)
コード例 #48
0
ファイル: TitleList.py プロジェクト: HasBahCa/enigma2
	def titleEditDone(self, cutlist):
		t = self.current_edit_title
		t.titleEditDone(cutlist)
		if t.VideoType != 0:
			self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a %s %s format data DVD (which will not play in stand-alone DVD players) instead?") % (getMachineBrand(), getMachineName()), type = MessageBox.TYPE_YESNO)
		else:
			self.updateTitleList()
コード例 #49
0
ファイル: Wizard.py プロジェクト: regin92/enigma2
	def getTranslation(self, text):
		return _(text).replace("%s %s","%s %s" % (getMachineBrand(), getMachineName()))
コード例 #50
0
ファイル: NetworkWizard.py プロジェクト: SIFTeam/enigma2-old
	def checkWlanStateCB(self,data,status):
		if data is not None:
			if data is True:
				if status is not None:
					text1 = _("Your %s %s is now ready to be used.\n\nYour internet connection is working now.\n\n") % (getMachineBrand(), getMachineName())
					text2 = _('Accesspoint:') + "\t" + str(status[self.selectedInterface]["accesspoint"]) + "\n"
					text3 = _('SSID:') + "\t" + str(status[self.selectedInterface]["essid"]) + "\n"
					text4 = _('Link quality:') + "\t" + str(status[self.selectedInterface]["quality"])+ "\n"
					text5 = _('Signal strength:') + "\t" + str(status[self.selectedInterface]["signal"]) + "\n"
					text6 = _('Bitrate:') + "\t" + str(status[self.selectedInterface]["bitrate"]) + "\n"
					text7 = _('Encryption:') + " " + str(status[self.selectedInterface]["encryption"]) + "\n"
					text8 = _("Please press OK to continue.")
					infotext = text1 + text2 + text3 + text4 + text5 + text7 +"\n" + text8
					self.currStep = self.getStepWithID("checkWlanstatusend")
					self.Text = infotext
					if str(status[self.selectedInterface]["accesspoint"]) == "Not-Associated":
						self.InterfaceState = False
					self.afterAsyncCode()
コード例 #51
0
ファイル: VideoWizard.py プロジェクト: almwad3/dvbapp2-gui
from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_ACTIVE_SKIN
from Tools.HardwareInfo import HardwareInfo

config.misc.showtestcard = ConfigBoolean(default = False)

try:
	file = open("/proc/stb/info/boxtype", "r")
	model = file.readline().strip()
	file.close()
except:
	model = "unknown"	

has_rca = False
has_dvi = False
hw_type = HardwareInfo().get_device_name()
if getBoxType() == 'gbquad' or getBoxType() == 'gbquadplus' or getBoxType() == 'et5x00' or model == 'et6000' or getBoxType() == 'e3hd' or getBoxType() == 'odinm6' or getMachineName() == 'AX-Odin' or getBoxType() == 'ebox7358' or getBoxType() == 'tmnano' or hw_type == 'ultra' or hw_type == "me" or hw_type == "minime" or getBoxType() == 'optimussos1' or getBoxType() == 'optimussos2' or getBoxType() == 'gb800seplus' or getBoxType() == 'gb800ueplus' or model == 'ini-1000ru' or model == 'ini-1000sv' or getBoxType() == 'ixussone' or getBoxType() == 'ixusszero':	
	has_rca = True
if getBoxType() == 'dm8000' or getBoxType() == 'dm800':
	has_dvi = True

class VideoWizardSummary(WizardSummary):
	skin = (
	"""<screen name="VideoWizardSummary" position="0,0" size="132,64" id="1">
		<widget name="text" position="6,4" size="120,40" font="Regular;12" transparent="1" />
		<widget source="parent.list" render="Label" position="6,40" size="120,21" font="Regular;14">
			<convert type="StringListSelection" />
		</widget>
		<!--widget name="pic" pixmap="%s" position="6,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/-->
	</screen>""",
	"""<screen name="VideoWizardSummary" position="0,0" size="96,64" id="2">
		<widget name="text" position="0,4" size="96,40" font="Regular;12" transparent="1" />
コード例 #52
0
ファイル: QuickMenu.py プロジェクト: pappaalfio/enigma2
	def okSubList(self):
		item = self["sublist"].getCurrent()

######## Select Network Menu ##############################
		if item[0] == _("Network Wizard"):
			self.session.open(NetworkWizard)
		elif item[0] == _("Network Adapter Selection"):
			self.session.open(NetworkAdapterSelection)
		elif item[0] == _("Network Interface"):
			self.session.open(AdapterSetup,self.activeInterface)
		elif item[0] == _("Network Restart"):
			self.session.open(RestartNetwork)
		elif item[0] == _("Network Services"):
			self.Qnetworkservices()
			self["sublist"].moveToIndex(0)
		elif item[0] == _("Samba"):
			self.session.open(NetworkSamba)
		elif item[0] == _("NFS"):
			self.session.open(NetworkNfs)
		elif item[0] == _("FTP"):
			self.session.open(NetworkFtp)
		elif item[0] == _("AFP"):
			self.session.open(NetworkAfp)
		elif item[0] == _("OpenVPN"):
			self.session.open(NetworkOpenvpn)
		elif item[0] == _("MiniDLNA"):
			self.session.open(NetworkMiniDLNA)
		elif item[0] == _("Inadyn"):
			self.session.open(NetworkInadyn)
		elif item[0] == _("SABnzbd"):
			self.session.open(NetworkSABnzbd)
		elif item[0] == _("uShare"):
			self.session.open(NetworkuShare)
		elif item[0] == _("Telnet"):
			self.session.open(NetworkTelnet)
######## Select System Setup Menu ##############################
		elif item[0] == _("Customise"):
			self.openSetup("usage")
		elif item[0] == _("Button Setup"):
			self.openSetup("remotesetup")
		elif item[0] == _("Display Settings"):
			self.openSetup("display")
		elif item[0] == _("LCD Skin Setup"):
			self.session.open(LcdSkinSelector)
		elif item[0] == _("OSD settings"):
			self.openSetup("userinterface")
		elif item[0] == _("Channel selection"):
			self.openSetup("channelselection")
		elif item[0] == _("Recording settings"):
			self.openSetup("recording")
		elif item[0] == _("EPG settings"):
			self.openSetup("epgsettings")
######## Select Mounts Menu ##############################
		elif item[0] == _("Mount Manager"):
			self.session.open(AutoMountManager, None, plugin_path_networkbrowser)
		elif item[0] == _("Network Browser"):
			self.session.open(NetworkBrowser, None, plugin_path_networkbrowser)
		elif item[0] == _("Device Manager"):
			self.session.open(HddMount)
######## Select Softcam Menu ##############################
		elif item[0] == _("Softcam Panel"):
			self.session.open(SoftcamPanel)
		elif item[0] == _("Download Softcams"):
			self.session.open(ShowSoftcamPackages)
######## Select AV Setup Menu ##############################
		elif item[0] == _("AV Settings"):
			self.session.open(VideoSetup)
		elif item[0] == _("Auto Language"):
			self.openSetup("autolanguagesetup")
		elif item[0] == _("Audio Sync"):
			self.session.open(AC3LipSyncSetup, plugin_path_audiosync)
		elif item[0] == _("VideoEnhancement"):
			self.session.open(VideoEnhancementSetup)
######## Select TUNER Setup Menu ##############################
		elif item[0] == _("Tuner Configuration"):
			self.session.open(NimSelection)
		elif item[0] == _("Positioner Setup"):
			self.PositionerMain()
		elif item[0] == _("Automatic Scan"):
			self.session.open(ScanSimple)
		elif item[0] == _("Manual Scan"):
			self.session.open(ScanSetup)
		elif item[0] == _("Sat Finder"):
			self.SatfinderMain()
######## Select Software Manager Menu ##############################
		elif item[0] == _("Software Update"):
			self.session.open(SoftwarePanel)
		elif item[0] == _("Flash Online"):
			self.session.open(FlashOnline)
		elif item[0] == _("Complete Backup"):
			if DFLASH == True:
				self.session.open(dFlash)
			else:
				self.session.open(ImageBackup)
		elif item[0] == _("Backup Settings"):
			self.session.openWithCallback(self.backupDone,BackupScreen, runBackup = True)
		elif item[0] == _("Restore Settings"):
			self.backuppath = getBackupPath()
			if not path.isdir(self.backuppath):
				self.backuppath = getOldBackupPath()
			self.backupfile = getBackupFilename()
			self.fullbackupfilename = self.backuppath + "/" + self.backupfile
			if os_path.exists(self.fullbackupfilename):
				self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore your %s %s backup?\nSTB will restart after the restore") % (getMachineBrand(), getMachineName()))
			else:
				self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO, timeout = 10)
		elif item[0] == _("Select Backup files"):
			self.session.openWithCallback(self.backupfiles_choosen,BackupSelection)
		elif item[0] == _("Software Manager Setup"):
			self.session.open(SoftwareManagerSetup)
######## Select PluginDownloadBrowser Menu ##############################
		elif item[0] == _("Plugin Browser"):
			self.session.open(PluginBrowser)
		elif item[0] == _("Download Plugins"):
			self.session.open(PluginDownloadBrowser, 0)
		elif item[0] == _("Remove Plugins"):
			self.session.open(PluginDownloadBrowser, 1)
		elif item[0] == _("Plugin Filter"):
			self.session.open(PluginFilter)
		elif item[0] == _("IPK Installer"):
			try:
				from Plugins.Extensions.MediaScanner.plugin import main
				main(self.session)
			except:
				self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO, timeout = 10)
######## Select Harddisk Menu ############################################
		elif item[0] == _("Harddisk Setup"):
			self.openSetup("harddisk")
		elif item[0] == _("Initialization"):
			self.session.open(HarddiskSelection)
		elif item[0] == _("Filesystem Check"):
			self.session.open(HarddiskFsckSelection)
		elif item[0] == _("Convert ext3 to ext4"):
			self.session.open(HarddiskConvertExt4Selection)
コード例 #53
0
ファイル: PowerTimer.py プロジェクト: skywatcher111/enigma2
	def activate(self):
		next_state = self.state + 1
		self.log(5, "activating state %d" % next_state)

		if next_state == 1 and (self.timerType == TIMERTYPE.AUTOSTANDBY or self.timerType == TIMERTYPE.AUTODEEPSTANDBY):
			eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self.keyPressed)
			self.begin = time() + int(self.autosleepdelay)*60
			if self.end <= self.begin:
				self.end = self.begin

		if next_state == self.StatePrepared:
			self.log(6, "prepare ok, waiting for begin")
			self.next_activation = self.begin
			self.backoff = 0
			return True

		elif next_state == self.StateRunning:
			self.wasPowerTimerWakeup = False
			if os.path.exists("/tmp/was_timer_wakeup"):
				self.wasPowerTimerWakeup = int(open("/tmp/was_powertimer_wakeup", "r").read()) and True or False
				os.remove("/tmp/was_powertimer_wakeup")
			# if this timer has been cancelled, just go to "end" state.
			if self.cancelled:
				return True

			if self.failed:
				return True

			if self.timerType == TIMERTYPE.WAKEUP:
				if Screens.Standby.inStandby:
					Screens.Standby.inStandby.Power()
				return True

			elif self.timerType == TIMERTYPE.WAKEUPTOSTANDBY:
				return True

			elif self.timerType == TIMERTYPE.STANDBY:
				if not Screens.Standby.inStandby: # not already in standby
					Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished powertimer wants to set your\n%s %s to standby. Do that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
				return True

			elif self.timerType == TIMERTYPE.AUTOSTANDBY:
				if not Screens.Standby.inStandby: # not already in standby
					Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished powertimer wants to set your\n%s %s to standby. Do that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
					if self.autosleeprepeat == "once":
						eActionMap.getInstance().unbindAction('', self.keyPressed)
						return True
					else:
						self.begin = time() + int(self.autosleepdelay)*60
						if self.end <= self.begin:
							self.end = self.begin
				else:
					self.begin = time() + int(self.autosleepdelay)*60
					if self.end <= self.begin:
						self.end = self.begin

			elif self.timerType == TIMERTYPE.AUTODEEPSTANDBY:
				if (NavigationInstance.instance.RecordTimer.isRecording() or abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900) or (self.autosleepinstandbyonly == 'yes' and not Screens.Standby.inStandby):
					self.do_backoff()
					# retry
					self.begin = time() + self.backoff
					if self.end <= self.begin:
						self.end = self.begin
					return False
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(1)
						return True
					else:
						Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished powertimer wants to shutdown your %s %s.\nDo that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
						if self.autosleeprepeat == "once":
							eActionMap.getInstance().unbindAction('', self.keyPressed)
							return True
						else:
							self.begin = time() + int(self.autosleepdelay)*60
							if self.end <= self.begin:
								self.end = self.begin

			elif self.timerType == TIMERTYPE.DEEPSTANDBY and self.wasPowerTimerWakeup:
				return True

			elif self.timerType == TIMERTYPE.DEEPSTANDBY and not self.wasPowerTimerWakeup:
				if NavigationInstance.instance.RecordTimer.isRecording() or abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900:
					self.do_backoff()
					# retry
					self.begin = time() + self.backoff
					if self.end <= self.begin:
						self.end = self.begin
					return False
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(1)
					else:
						Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished powertimer wants to shutdown your %s %s.\nDo that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
				return True

			elif self.timerType == TIMERTYPE.REBOOT:
				if NavigationInstance.instance.RecordTimer.isRecording() or abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900:
					self.do_backoff()
					# retry
					self.begin = time() + self.backoff
					if self.end <= self.begin:
						self.end = self.begin
					return False
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(2)
					else:
						Notifications.AddNotificationWithCallback(self.sendTryToRebootNotification, MessageBox, _("A finished powertimer wants to reboot your %s %s.\nDo that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
				return True

			elif self.timerType == TIMERTYPE.RESTART:
				if NavigationInstance.instance.RecordTimer.isRecording() or abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900:
					self.do_backoff()
					# retry
					self.begin = time() + self.backoff
					if self.end <= self.begin:
						self.end = self.begin
					return False
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(3)
					else:
						Notifications.AddNotificationWithCallback(self.sendTryToRestartNotification, MessageBox, _("A finished powertimer wants to restart the user interface.\nDo that now?"), timeout = 180)
				return True

		elif next_state == self.StateEnded:
			old_end = self.end
			NavigationInstance.instance.PowerTimer.saveTimer()
			if self.afterEvent == AFTEREVENT.STANDBY:
				if not Screens.Standby.inStandby: # not already in standby
					Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished powertimer wants to set your\n%s %s to standby. Do that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
			elif self.afterEvent == AFTEREVENT.DEEPSTANDBY:
				if NavigationInstance.instance.RecordTimer.isRecording() or abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900:
					self.do_backoff()
					# retry
					self.begin = time() + self.backoff
					if self.end <= self.begin:
						self.end = self.begin
					return False
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(1)
					else:
						Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished power timer wants to shut down\nyour %s %s. Shutdown now?") % (getMachineBrand(), getMachineName()), timeout = 180)
			return True
コード例 #54
0
ファイル: MountManager.py プロジェクト: HasBahCa/enigma2
	def delay(self, val):
		message = _("Changes need a system restart to take effect.\nRestart your %s %s now?") % (getMachineBrand(), getMachineName())
		ybox = self.session.openWithCallback(self.restartBox, MessageBox, message, MessageBox.TYPE_YESNO)
		ybox.setTitle(_("Restart %s %s.") % (getMachineBrand(), getMachineName()))
コード例 #55
0
ファイル: TitleList.py プロジェクト: HasBahCa/enigma2
	def selectedSource(self, source = None):
		if source is None:
			return None
		if not source.getPath().endswith(".ts"):
			self.session.open(MessageBox,text = _("You can only burn %s %s recordings!") % (getMachineBrand(), getMachineName()), type = MessageBox.TYPE_ERROR)
			return None
		t = self.project.addService(source)
		try:
			editor = source.edit
		except AttributeError:
			editor = True
		self.editTitle(t, editor)
コード例 #56
0
ファイル: MountManager.py プロジェクト: HasBahCa/enigma2
	def __init__(self, session):
		Screen.__init__(self, session)
		self.list = []
		ConfigListScreen.__init__(self, self.list)
		Screen.setTitle(self, _("Choose where to mount your devices to:"))
		self['key_green'] = Label(_("Save"))
		self['key_red'] = Label(_("Cancel"))
		self['Linconn'] = Label(_("Wait please while scanning your %s %s devices...") % (getMachineBrand(), getMachineName()))
		self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'green': self.saveMypoints, 'red': self.close, 'back': self.close})
		self.updateList()
コード例 #57
0
ファイル: RecordTimer.py プロジェクト: HasBahCa/enigma2
			old_end = self.end
			if self.setAutoincreaseEnd():
				self.log(12, "autoincrase recording %d minute(s)" % int((self.end - old_end)/60))
				self.state -= 1
				return True
			self.log(12, "stop recording")
			if not self.justplay:
				if self.record_service:
					NavigationInstance.instance.stopRecordService(self.record_service)
					self.record_service = None

			NavigationInstance.instance.RecordTimer.saveTimer()
			if self.afterEvent == AFTEREVENT.STANDBY or (not wasRecTimerWakeup and self.autostate and self.afterEvent == AFTEREVENT.AUTO) or self.wasInStandby:
				self.keypress() #this unbinds the keypress detection
				if not Screens.Standby.inStandby: # not already in standby
					Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\n%s %s to standby. Do that now?") % (getMachineBrand(), getMachineName()), timeout = 180)
			elif self.afterEvent == AFTEREVENT.DEEPSTANDBY:
				if (abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900) or NavigationInstance.instance.RecordTimer.getStillRecording():
					print '[Timer] Recording or Recording due is next 15 mins, not return to deepstandby'
					return True
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
						quitMainloop(1)
					else:
						Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour %s %s. Shutdown now?") % (getMachineBrand(), getMachineName()), default = True, timeout = 180)
			elif wasRecTimerWakeup and self.afterEvent == AFTEREVENT.AUTO:
				if (abs(NavigationInstance.instance.RecordTimer.getNextRecordingTime() - time()) <= 900 or abs(NavigationInstance.instance.RecordTimer.getNextZapTime() - time()) <= 900) or NavigationInstance.instance.RecordTimer.getStillRecording():
					print '[Timer] Recording or Recording due is next 15 mins, not return to deepstandby'
					return True
				if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
					if Screens.Standby.inStandby: # in standby
コード例 #58
0
ファイル: InfoBar.py プロジェクト: almwad3/dvbapp2-gui
	def showPiP(self):
		try:
			service = self.session.nav.getCurrentService()
			info = service and service.info()
			xres = str(info.getInfo(enigma.iServiceInformation.sVideoWidth))
			slist = self.servicelist
			if self.session.pipshown:
				if slist and slist.dopipzap:
					slist.togglePipzap()
				if self.session.pipshown:
					del self.session.pip
					self.session.pipshown = False
			else:
				if int(xres) <= 720 or about.getCPUString() == 'BCM7346B2' or about.getCPUString() == 'BCM7425B2':
					from Screens.PictureInPicture import PictureInPicture
					self.session.pip = self.session.instantiateDialog(PictureInPicture)
					self.session.pip.show()
					self.session.pipshown = True
					self.session.pip.playService(slist.getCurrentSelection())
					self.session.pip.servicePath = slist.getCurrentServicePath()
				else:
					self.session.open(MessageBox, _("Your %s %s does not support PiP HD") % (enigma.getMachineBrand(), enigma.getMachineName()), type = MessageBox.TYPE_INFO,timeout = 5 )
		except:
			pass