def __init__(self, session, args = 0):
		Screen.__init__(self, session)
		self.hardware_info = HardwareInfo()
		self.device=self.hardware_info.get_device_name()
		self.mac=getMacAddress()
		self.mac_end=self.mac[6:]
		self.dreamIRCconf = ConfigSubsection()
		self.reloadFile()
		list = []
		list.append(getConfigListEntry(_('Nickname'), self.dreamIRCconf.nick))      
		if config.usage.setup_level.index > 1: # advanced
			list.append(getConfigListEntry(_('Passwd'), self.dreamIRCconf.passwd))      
		if config.usage.setup_level.index >= 1: # intermediate+
			list.append(getConfigListEntry(_('Server1'), self.dreamIRCconf.server1))      
		if config.usage.setup_level.index > 1: # advanced
			list.append(getConfigListEntry(_('Server2'), self.dreamIRCconf.server2))      
			list.append(getConfigListEntry(_('Server3'), self.dreamIRCconf.server3))      
		if config.usage.setup_level.index >= 1: # intermediate+
			list.append(getConfigListEntry(_('Port'), self.dreamIRCconf.port))          
		list.append(getConfigListEntry(_('Channel'), self.dreamIRCconf.channel))    
		if config.usage.setup_level.index > 1: # i
			list.append(getConfigListEntry(_('Debug'), self.dreamIRCconf.debug))        

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

		ConfigListScreen.__init__(self, list)                                     
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
				{
						"green": self.saveAndExit,
						"red": self.dontSaveAndExit,
						"cancel": self.dontSaveAndExit
				}, -1)
Exemple #2
0
	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		self.skinName = "Setup"
		self.menu_path = menu_path
		self["menu_path_compressed"] = StaticText()
		self['footnote'] = Label()
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)

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

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

		self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"cancel": self.keyCancel,
			"ok": self.ok,
			"menu": self.closeRecursive,
		}, -2)
		self.onLayoutFinish.append(self.layoutFinished)
Exemple #3
0
	def __init__(self, session, menu_path="", args=None):
		Screen.__init__(self, session)
		screentitle = _("Button setup")
		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['description'] = Label(_('On your remote, click on the button you want to change'))
		self.session = session
		self.list = []
		self.ButtonSetupFunctions = getButtonSetupFunctions()
		for x in ButtonSetupKeys:
			self.list.append(ChoiceEntryComponent('',(_(x[0]), x[1])))
		self["list"] = ChoiceList(list=self.list[:config.misc.ButtonSetup.additional_keys.value and len(ButtonSetupKeys) or 10], selection = 0)
		self["choosen"] = ChoiceList(list=[])
		self.getFunctions()
		self["actions"] = ActionMap(["OkCancelActions"],
		{
			"cancel": self.close,
		}, -1)
		self["ButtonSetupButtonActions"] = ButtonSetupActionMap(["ButtonSetupActions"], dict((x[1], self.ButtonSetupGlobal) for x in ButtonSetupKeys))
		self.longkeyPressed = False
		self.onLayoutFinish.append(self.__layoutFinished)
		self.onExecBegin.append(self.getFunctions)
		self.onShown.append(self.disableKeyMap)
		self.onClose.append(self.enableKeyMap)
Exemple #4
0
	def __init__(self, session, entry):
		Screen.__init__(self, session)
		self.title = _("WeatherPlugin: Edit Entry")
		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"green": self.keySave,
			"red": self.keyCancel,
			"blue": self.keyDelete,
			"yellow": self.searchLocation,
			"cancel": self.keyCancel
		}, -2)

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

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

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

		ConfigListScreen.__init__(self, cfglist, session)
Exemple #5
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["SetupTitle"] = StaticText(_(parent.setup_title))
		self["SetupEntry"] = StaticText("")
		self["SetupValue"] = StaticText("")
		self.onShow.append(self.addWatcher)
		self.onHide.append(self.removeWatcher)
	def __init__(self, session):
		Screen.__init__(self, session)
		self.session = session
		self.setup_title = _("AutoBouquetsMaker Configure")
		Screen.setTitle(self, self.setup_title)

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

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

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

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

		self.onLayoutFinish.append(self.populate)
Exemple #7
0
	def __init__(self, session, slotid):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Tuner settings"))
		self.list = [ ]

		ServiceStopScreen.__init__(self)
		self.stopService()

		ConfigListScreen.__init__(self, self.list)

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

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

		self.slotid = slotid
		self.nim = nimmanager.nim_slots[slotid]
		self.nimConfig = self.nim.config
		self.createConfigMode()
		self.createSetup()
    def __init__(self, session, args = None):
        #self.skin = CurlyTx.skin
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        #self.skinName = [ "CurlyTx", "Setup" ]

        self["text"] = ScrollLabel("foo")

        self["key_red"]    = StaticText(_("Settings"))
        self["key_green"]  = StaticText(_("Reload"))
        self["key_yellow"] = StaticText(_("Prev"))
        self["key_blue"]   = StaticText(_("Next"))


        self["actions"] = ActionMap(
            ["WizardActions", "ColorActions", "InputActions", "InfobarEPGActions"], {
                "ok":   self.close,
                "back": self.close,
                "up":   self.pageUp,
                "down": self.pageDown,

                "red":    self.showSettings,
                "green":  self.reload,
                "yellow": self.prevPage,
                "blue":   self.nextPage,

                "showEventInfo": self.showHeader
            }, -1)

        self.loadHelp()
        self.loadButtons()
        self.onLayoutFinish.append(self.afterLayout)
	def __init__(self, session, defaultUser):
		Screen.__init__(self, session)
		self.session = session
		self.userlist = YouTubeUserList()
		self.defaultUser = defaultUser

		self["label_info"] = Label(_("To use the selected feature you have to login to YouTube. Select a user-profile to login!"))
		self["userlist"] = self.userlist
		self["key_red"] = Button(_("delete user"))
		self["key_green"] = Button(_("add user"))
		self["key_yellow"] = Button(_("edit user"))
		self["key_blue"] = Button(_("set default"))

		self["actions"] = ActionMap(["YouTubeUserListScreenActions"],
		{
			"delete": 	self.keyDelete,
			"add": 		self.keyAddUser,
			"edit": 	self.keyEditUser,
			"default":	self.keySetAsDefault,
			
			"ok":		self.ok,
			"cancel": 	self.close,
			"up": 		self.up,
			"down": 	self.down,
			"left": 	self.left,
			"right": 	self.right,
		}, -2)
		
		self.onLayoutFinish.append(self.initialUserlistUpdate)
	def __init__(self, session):
		self.skin = magicBackupPanel_Step3_Skin
		Screen.__init__(self, session)
		self['status'] = MultiPixmap()
		self['status'].setPixmapNum(0)
		self['label'] = Label('')
		self.mylist = ['Libraries', 'Firmwares', 'Binaries', 'SoftCams', 'Scripts', 'Bootlogos', 'Uninstall files', 'General Settings', 'Cron', 'Settings Channels Bouquets', 'Openvpn', 'Satellites Terrestrial', 'Plugins', 'END']
		self.mytmppath = '/media/hdd/'
		if fileExists('/etc/magic/.magicbackup_location'):
			fileExists('/etc/magic/.magicbackup_location')
			f = open('/etc/magic/.magicbackup_location', 'r')
			self.mytmppath = f.readline().strip()
			f.close()
		else:
			fileExists('/etc/magic/.magicbackup_location')
		self.mytmppath += 'magicbackup_location'
		self.activityTimer = eTimer()
		self.activityTimer.timeout.get().append(self.updatepix)
		self.onShow.append(self.startShow)
		self.onClose.append(self.delTimer)
		system('rm -rf ' + self.mytmppath)
		system('mkdir ' + self.mytmppath)
		system('mkdir ' + self.mytmppath + '/etc')
		system('mkdir ' + self.mytmppath + '/lib')
		system('mkdir ' + self.mytmppath + '/usr')
		system('mkdir ' + self.mytmppath + '/scripts')
		system('mkdir ' + self.mytmppath + '/media')
		system('mkdir ' + self.mytmppath + '/media/hdd')
		system('mkdir ' + self.mytmppath + '/media/usb')
		system('mkdir ' + self.mytmppath + '/media/usb2')
		system('mkdir ' + self.mytmppath + '/media/usb3')
		configfile.save()
    def __init__(self, session, timer):
        Screen.__init__(self, session)
        self.skinName = "TimerLog"
        self.timer = timer
        self.log_entries = self.timer.log_entries[:]

        self.fillLogList()

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

        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(_("PowerManager log"))
Exemple #12
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["key_yellow"] = StaticText()

		self.selectedFiles = config.plugins.configurationbackup.backupdirs.value
		defaultDir = '/'
		inhibitDirs = ["/bin", "/boot", "/dev", "/autofs", "/lib", "/proc", "/sbin", "/sys", "/hdd", "/tmp", "/mnt", "/media"]
		self.filelist = MultiFileSelectList(self.selectedFiles, defaultDir, inhibitDirs = inhibitDirs )
		self["checkList"] = self.filelist

		self["actions"] = ActionMap(["DirectionActions", "OkCancelActions", "ShortcutActions"],
		{
			"cancel": self.exit,
			"red": self.exit,
			"yellow": self.changeSelectionState,
			"green": self.saveSelection,
			"ok": self.okClicked,
			"left": self.left,
			"right": self.right,
			"down": self.down,
			"up": self.up
		}, -1)
		if not self.selectionChanged in self["checkList"].onSelectionChanged:
			self["checkList"].onSelectionChanged.append(self.selectionChanged)
		self.onLayoutFinish.append(self.layoutFinished)
Exemple #13
0
	def __init__(self, session, plugin_path):
		Screen.__init__(self, session)
		self.skin_path = plugin_path

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Restore"))
		self["key_yellow"] = StaticText(_("Delete"))

		self.sel = []
		self.val = []
		self.entry = False
		self.exe = False

		self.path = ""

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

		self["shortcuts"] = ActionMap(["ShortcutActions"],
		{
			"red": self.keyCancel,
			"green": self.KeyOk,
			"yellow": self.deleteFile,
		})
		self.flist = []
		self["filelist"] = MenuList(self.flist)
		self.fill_list()
		self.onLayoutFinish.append(self.layoutFinished)
Exemple #14
0
	def __init__(self, session, timerinstance):
		self.session = session
		self.list = []
		self.timerinstance = timerinstance
		self.remotetimer_old = config.ipboxclient.remotetimers.value
		
		Screen.__init__(self, session)
		ConfigListScreen.__init__(self, self.list)
		
		self.setTitle(_('IPTV Client'))
		
		self["VKeyIcon"] = Boolean(False)
		self["text"] = StaticText(_('NOTE: the remote HDD feature require samba installed on server box.'))
		self["key_red"] = Button(_('Cancel'))
		self["key_green"] = Button(_('Save'))
		self["key_yellow"] = Button(_('Scan'))
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"cancel": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow": self.keyScan
		}, -2)
		
		self.populateMenu()
		
		if not config.ipboxclient.firstconf.value:
			self.timer = eTimer()
			self.timer.callback.append(self.scanAsk)
			self.timer.start(100)
Exemple #15
0
	def __init__(self, session, project = None):
		Screen.__init__(self, session)
		self.project = project
		
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("OK"))
		self["key_yellow"] = StaticText(_("Load"))
		if config.usage.setup_level.index >= 2: # expert+
			self["key_blue"] = StaticText(_("Save"))
		else:
			self["key_blue"] = StaticText()
		
		if config.usage.setup_level.index >= 2: # expert+
			infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
		else:
			infotext = ""
		self["info"] = StaticText(infotext)

		self.keydict = {}
		self.settings = project.settings
		ConfigListScreen.__init__(self, [])
		self.initConfigList()
		
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
		    "green": self.exit,
		    "red": self.cancel,
		    "blue": self.saveProject,
		    "yellow": self.loadProject,
		    "cancel": self.cancel,
		    "ok": self.ok,
		}, -2)
		self.onLayoutFinish.append(self.layoutFinished)
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setup_title = _("Blind scan for dreambox DVB-S2 tuners")
		Screen.setTitle(self, _(self.setup_title))
		self.updateSatList()
		self.service = session.nav.getCurrentService()
		self.feinfo = None
		frontendData = None
		if self.service is not None:
			self.feinfo = self.service.frontendInfo()
			frontendData = self.feinfo and self.feinfo.getAll(True)
		self.createConfig(frontendData)
		del self.feinfo
		del self.service
		try:
			self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceOrGroup()
		except:
			self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceReference()

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

		self.list = []
		ConfigListScreen.__init__(self, self.list)
		if not self.scan_nims.value == "":
			self.createSetup()
			self["introduction"] = Label(_("Press OK to start the scan"))
		else:
			self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
	def __init__(self, session, fe_num, text):
		Screen.__init__(self, session)
		self.setup_title = _("Blind scan state")
		Screen.setTitle(self, _(self.setup_title))
		self["list"]=List()
		self["text"]=Label()
		self["text"].setText(text)
		self["post_action"]=Label()
		self["progress"]=Label()
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"ok": self.keyOk,
			"cancel": self.keyCancel,
			"green": self.keyGreen,
		}, -2)
		self.fe_num = fe_num
		self["constellation"] = CanvasSource()
		self.onLayoutFinish.append(self.updateConstellation)
		self.tmr = eTimer()
		self.tmr.callback.append(self.updateConstellation)
		self.constellation_supported = None
		if fe_num != -1:
			self.post_action=1
			self.finished=0
			self.keyGreen()
		else:
			self.post_action=-1
Exemple #18
0
    def __init__(self, session, ref):
        Screen.__init__(self, session)
        self.session = session
        self["actions"] = HelpableActionMap(
            self, "MoviePlayerActions", {"leavePlayer": (self.leavePlayer, _("leave movie player..."))}
        )

        if config.plugins.yttrailer.close_player_with_exit.value:
            self["closeactions"] = HelpableActionMap(
                self, "WizardActions", {"back": (self.close, _("leave movie player..."))}
            )

        self.allowPiP = False
        for x in (
            InfoBarShowHide,
            InfoBarBase,
            InfoBarSeek,
            InfoBarAudioSelection,
            InfoBarNotifications,
            InfoBarServiceNotifications,
            InfoBarPVRState,
            InfoBarMoviePlayerSummarySupport,
        ):
            x.__init__(self)

        self.returning = False
        self.skinName = "MoviePlayer"
        self.lastservice = session.nav.getCurrentlyPlayingServiceReference()
        self.session.nav.playService(ref)
        self.onClose.append(self.__onClose)
Exemple #19
0
	def __init__(self, session, list, selected_caids):

		Screen.__init__(self, session)

		self.list = SelectionList()
		self["list"] = self.list

		for listindex in range(len(list)):
			if find_in_list(selected_caids,list[listindex][0],0):
				self.list.addSelection(list[listindex][0], list[listindex][1], listindex, True)
			else:
				self.list.addSelection(list[listindex][0], list[listindex][1], listindex, False)

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Save"))
		self["introduction"] = StaticText(_("Press OK to select/deselect a CAId."))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
		{
			"ok": self.list.toggleSelection, 
			"cancel": self.cancel, 
			"green": self.greenPressed,
			"red": self.cancel
		}, -1)
		self.onShown.append(self.setWindowTitle)
	def __init__(self, session, userSatlist=""):
		Screen.__init__(self, session)
		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Save"))
		self["key_yellow"] = Button(_("Sort by"))
		self["key_blue"] = Button(_("Select all"))
		self["hint"] = Label(_("Press OK to toggle the selection"))
		SatList = []
		if not isinstance(userSatlist, str):
			userSatlist = ""
		else:
			userSatlist = userSatlist.replace("]", "").replace("[", "")
		for sat in nimmanager.getSatList():
			selected = False
			sat_str = str(sat[0])
			if userSatlist and ("," not in userSatlist and sat_str == userSatlist) or ((', ' + sat_str + ',' in userSatlist) or (userSatlist.startswith(sat_str + ',')) or (userSatlist.endswith(', ' + sat_str))):
				selected = True
			SatList.append((sat[0], sat[1], sat[2], selected))
		sat_list = [SelectionEntryComponent(x[1], x[0], x[2], x[3]) for x in SatList]
		self["list"] = SelectionList(sat_list, enableWrapAround=True)
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"yellow": self.sortBy,
			"blue": self["list"].toggleAllSelection,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self["list"].toggleSelection,
		}, -2)
		self.setTitle(_("Select satellites"))
Exemple #21
0
	def __init__(self, session):
		Screen.__init__(self, session)
		# for the skin: first try VideoSetup, then Setup, this allows individual skinning
		self.skinName = ["VideoSetup", "Setup" ]
		self.setup_title = _("Video settings")
		self["HelpWindow"] = Pixmap()
		self["HelpWindow"].hide()
		self["VKeyIcon"] = Boolean(False)
		self['footnote'] = Label()

		self.hw = iAVSwitch
		self.onChangedEntry = [ ]

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

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

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

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

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

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

		ConfigListScreen.__init__(self, self.list)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Ok"))
		self["key_yellow"] = Button(_("Run"))
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"yellow": self.run,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self.save,
		}, -2)
	def __init__(self, session, plugin_path):
		self.skin_path = plugin_path
		Screen.__init__(self, session)

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

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

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

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

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

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

		self.onLayoutFinish.append(self.layoutFinished)
	def __init__(self, session):
		Screen.__init__(self, session)

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

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

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

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

		# Trigger change
		self.changed()

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

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

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

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

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

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

		self.onLayoutFinish.append(self.layoutFinished)
Exemple #26
0
	def __init__(self, session):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Plugin Browser"))

		self.firsttime = True

		self["key_red"] = Button(_("Remove plugins"))
		self["key_green"] = Button(_("Download plugins"))

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

		self["actions"] = ActionMap(["WizardActions", "MenuActions"],
		{
			"ok": self.save,
			"back": self.close,
			"menu": self.openSetup,
		})
		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)
Exemple #27
0
	def __init__(self, session):
		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions"],
		{
			"cancel": self.KeyExit,
			"red": self.KeyExit,
			"green": self.KeyGreen,
			"yellow": self.KeyYellow,
			"blue": self.KeyBlue,
			"ok": self.KeyOk
		}, -1)

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Thumbnails"))
		self["key_yellow"] = StaticText("")
		self["key_blue"] = StaticText(_("Setup"))
		self["label"] = StaticText("")
		self["thn"] = Pixmap()

		currDir = config.pic.lastDir.value
		if not pathExists(currDir):
			currDir = "/"

		self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(jpeg|jpg|jpe|png|bmp|gif)")
		self["filelist"] = self.filelist
		self["filelist"].onSelectionChanged.append(self.selectionChanged)

		self.ThumbTimer = eTimer()
		self.ThumbTimer.callback.append(self.showThumb)

		self.picload = ePicLoad()
		self.picload.PictureData.get().append(self.showPic)

		self.onLayoutFinish.append(self.setConf)
	def __init__(self, session, args = 0):
		self.session = session
		Screen.__init__(self, session)

		self.list = []

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

		ConfigListScreen.__init__(self, self.list)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("Ok"))
		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"red": self.cancel,
			"green": self.save,
			"save": self.save,
			"cancel": self.cancel,
			"ok": self.save,
		}, -2)
Exemple #29
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self['connect'] = MultiPixmap()
     self['connect'].setPixmapNum(0)
     self['lab1'] = Label('')
     self.mylist = ['Libraries',
      'Binaries',
      'Cams',
      'Scripts',
      'Bootlogos',
      'Uninstall files',
      'General Settings',
      'Cron',
      'Settings Channels Bouquets',
      'Openvpn',
      'Satellites Terrestrial',
      'Plugins',
      'END']
     self.mytmppath = '/media/hdd/'
     if fileExists('/etc/bhpersonalbackup'):
         f = open('/etc/bhpersonalbackup', 'r')
         self.mytmppath = f.readline().strip()
         f.close()
     self.mytmppath += 'bhbackuptmp'
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.updatepix)
     self.onShow.append(self.startShow)
     self.onClose.append(self.delTimer)
     system('rm -rf ' + self.mytmppath)
     system('mkdir ' + self.mytmppath)
     system('mkdir ' + self.mytmppath + '/etc')
     system('mkdir ' + self.mytmppath + '/usr')
     configfile.save()
	def __init__(self, session, slotid):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Tuner settings"))
		self.list = [ ]
		ServiceStopScreen.__init__(self)
		self.stopService()
		ConfigListScreen.__init__(self, self.list)

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

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

		self.slotid = slotid
		self.nim = nimmanager.nim_slots[slotid]
		self.nimConfig = self.nim.config
		self.createConfigMode()
		self.createSetup()
		self.onLayoutFinish.append(self.layoutFinished)
Exemple #31
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", "DirectionActions", "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 #32
0
 def close(self):
     Screen.close(self)
Exemple #33
0
    def __init__(self,
                 session,
                 text='',
                 filename='',
                 currDir=None,
                 bookmarks=None,
                 userMode=False,
                 windowTitle=_('Select location'),
                 minFree=None,
                 autoAdd=False,
                 editDir=False,
                 inhibitDirs=None,
                 inhibitMounts=None):
        if not inhibitDirs:
            inhibitDirs = []
        if not inhibitMounts:
            inhibitMounts = []
        Screen.__init__(self, session)
        NumericalTextInput.__init__(self, handleTimeout=False)
        HelpableScreen.__init__(self)
        self.setUseableChars(u'1234567890abcdefghijklmnopqrstuvwxyz')
        self.qs_timer = eTimer()
        self.qs_timer.callback.append(self.timeout)
        self.qs_timer_type = 0
        self.curr_pos = -1
        self.quickselect = ''
        self['text'] = Label(text)
        self['textbook'] = Label(_('Bookmarks'))
        self.text = text
        self.filename = filename
        self.minFree = minFree
        self.realBookmarks = bookmarks
        self.bookmarks = bookmarks and bookmarks.value[:] or []
        self.userMode = userMode
        self.autoAdd = autoAdd
        self.editDir = editDir
        self.inhibitDirs = inhibitDirs
        self['filelist'] = FileList(currDir,
                                    showDirectories=True,
                                    showFiles=False,
                                    inhibitMounts=inhibitMounts,
                                    inhibitDirs=inhibitDirs)
        self['booklist'] = MenuList(self.bookmarks)
        self['key_green'] = Button(_('OK'))
        self['key_yellow'] = Button(_('Rename'))
        self['key_blue'] = Button(_('Remove bookmark'))
        self['key_red'] = Button(_('Cancel'))
        self['green'] = Pixmap()
        self['yellow'] = Pixmap()
        self['blue'] = Pixmap()
        self['red'] = Pixmap()
        self['target'] = Label()
        self['targetfreespace'] = Label()
        if self.userMode:
            self.usermodeOn()

        class LocationBoxActionMap(HelpableActionMap):
            def __init__(self, parent, context, actions=None, prio=0):
                if not actions:
                    actions = {}
                HelpableActionMap.__init__(self, parent, context, actions,
                                           prio)
                self.box = parent

            def action(self, contexts, action):
                self.box.timeout(force=True)
                return HelpableActionMap.action(self, contexts, action)

        self['WizardActions'] = LocationBoxActionMap(self, 'WizardActions', {
            'ok': (self.ok, _('select')),
            'back': (self.cancel, _('Cancel'))
        }, -2)
        self['DirectionActions'] = LocationBoxActionMap(
            self, 'DirectionActions', {
                'left': self.left,
                'right': self.right,
                'up': self.up,
                'down': self.down
            }, -2)
        self['ColorActions'] = LocationBoxActionMap(
            self, 'ColorActions', {
                'red': self.cancel,
                'green': self.select,
                'yellow': self.changeName,
                'blue': self.addRemoveBookmark
            }, -2)
        self['EPGSelectActions'] = LocationBoxActionMap(
            self, 'EPGSelectActions', {
                'prevService':
                (self.switchToBookList, _('switch to bookmarks')),
                'nextService': (self.switchToFileList, _('switch to filelist'))
            }, -2)
        self['MenuActions'] = LocationBoxActionMap(
            self, 'MenuActions', {'menu': (self.showMenu, _('menu'))}, -2)
        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.onShown.extend((boundFunction(self.setTitle,
                                           _('Select Location')),
                             self.updateTarget, self.showHideRename))
        self.onLayoutFinish.append(self.switchToFileListOnStart)
        self.onClose.append(self.disableTimer)
Exemple #34
0
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent)

        self.skinName = ["DreamPlexPlayerSummary"]
    def __init__(self, session, params={}):
        # params: vk_title, movie_title
        printDBG("IPTVSubDownloaderWidget.__init__ desktop IPTV_VERSION[%s]\n" % (IPTVSubDownloaderWidget.IPTV_VERSION))
        self.session = session
        path = GetSkinsDir(config.plugins.iptvplayer.skin.value) + "/subplaylist.xml"
        if os_path.exists(path):
            try:
                with open(path, "r") as f:
                    self.skin = f.read()
                    f.close()
            except Exception:
                printExc("Skin read error: " + path)

        Screen.__init__(self, session)

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

        self["list"] = IPTVMainNavigatorList()
        self["list"].connectSelChanged(self.onSelectionChanged)
        self["statustext"] = Label("Loading...")
        self["actions"] = ActionMap(["IPTVPlayerListActions", "WizardActions", "DirectionActions", "ColorActions", "NumberActions"],
        {
            "red": self.red_pressed,
            "green": self.green_pressed,
            "yellow": self.yellow_pressed,
            "blue": self.blue_pressed,
            "ok": self.ok_pressed,
            "back": self.back_pressed,
        }, -1)

        self["headertext"] = Label()
        self["console"] = Label()
        self["sequencer"] = Label()

        try:
            for idx in range(5):
                spinnerName = "spinner"
                if idx:
                    spinnerName += '_%d' % idx
                self[spinnerName] = Cover3()
        except Exception:
            printExc()

        self.spinnerPixmap = [LoadPixmap(GetIconDir('radio_button_on.png')), LoadPixmap(GetIconDir('radio_button_off.png'))]
        self.showHostsErrorMessage = True

        self.onClose.append(self.__onClose)
        #self.onLayoutFinish.append(self.onStart)
        self.onShow.append(self.onStart)

        #Defs
        self.params = dict(params)
        self.params['discover_info'] = self.discoverInfoFromTitle()
        self.params['movie_url'] = strwithmeta(self.params.get('movie_url', ''))
        self.params['url_params'] = self.params['movie_url'].meta
        self.movieTitle = self.params['discover_info']['movie_title']

        self.workThread = None
        self.host = None
        self.hostName = ''

        self.nextSelIndex = 0
        self.currSelIndex = 0

        self.prevSelList = []
        self.categoryList = []

        self.currList = []
        self.currItem = CDisplayListItem()

        self.visible = True

        #################################################################
        #                      Inits for Proxy Queue
        #################################################################

        # register function in main Queue
        if None == asynccall.gMainFunctionsQueueTab[1]:
            asynccall.gMainFunctionsQueueTab[1] = asynccall.CFunctionProxyQueue(self.session)
        asynccall.gMainFunctionsQueueTab[1].clearQueue()
        asynccall.gMainFunctionsQueueTab[1].setProcFun(self.doProcessProxyQueueItem)

        #main Queue
        self.mainTimer = eTimer()
        self.mainTimer_conn = eConnectCallback(self.mainTimer.timeout, self.processProxyQueue)
        # every 100ms Proxy Queue will be checked
        self.mainTimer_interval = 100
        self.mainTimer.start(self.mainTimer_interval, True)

        # spinner timer
        self.spinnerTimer = eTimer()
        self.spinnerTimer_conn = eConnectCallback(self.spinnerTimer.timeout, self.updateSpinner)
        self.spinnerTimer_interval = 200
        self.spinnerEnabled = False

        #################################################################

        self.downloadedSubItems = []
Exemple #36
0
    def __init__(self, session, menu_path=""):
        Screen.__init__(self, session)
        screentitle = _("OSD position")
        if config.usage.show_menupath.value == 'large':
            menu_path += screentitle
            title = menu_path
            self.setup_title = title
            self["menu_path_compressed"] = StaticText("")
        elif config.usage.show_menupath.value == 'small':
            title = screentitle
            self.setup_title = screentitle
            self["menu_path_compressed"] = StaticText(
                menu_path +
                " >" if not menu_path.endswith(' / ') else menu_path[:-3] +
                " >" or "")
        else:
            title = screentitle
            self.setup_title = title
            self["menu_path_compressed"] = StaticText("")
        self.Console = Console()
        self["status"] = StaticText()
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("Defaults"))

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

        self.onChangedEntry = []
        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)
        if SystemInfo["CanChangeOsdAlpha"]:
            self.list.append(
                getConfigListEntry(
                    _("User interface visibility"), config.osd.alpha,
                    _("This option lets you adjust the transparency of the user interface"
                      )))
        if SystemInfo["CanChangeOsdPosition"]:
            self.list.append(
                getConfigListEntry(
                    _("Move Left/Right"), config.osd.dst_left,
                    _("Use the LEFT/RIGHT buttons on your remote to move the user interface left/right."
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Width"), config.osd.dst_width,
                    _("Use the LEFT/RIGHT buttons on your remote to adjust the width of the user interface. LEFT button decreases the size, RIGHT increases the size."
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Move Up/Down"), config.osd.dst_top,
                    _("Use the LEFT/RIGHT buttons on your remote to move the user interface up/down."
                      )))
            self.list.append(
                getConfigListEntry(
                    _("Height"), config.osd.dst_height,
                    _("Use the LEFT/RIGHT buttons on your remote to adjust the height of the user interface. LEFT button decreases the size, RIGHT increases the size."
                      )))
        self["config"].list = self.list
        self["config"].l.setList(self.list)

        self.serviceRef = None
        self.onLayoutFinish.append(self.layoutFinished)
        if self.welcomeWarning not in self.onShow:
            self.onShow.append(self.welcomeWarning)
        if self.selectionChanged not in self["config"].onSelectionChanged:
            self["config"].onSelectionChanged.append(self.selectionChanged)
        self.selectionChanged()
    def __init__(self,
                 session,
                 service,
                 zapFunc=None,
                 eventid=None,
                 bouquetChangeCB=None,
                 serviceChangeCB=None,
                 parent=None):
        Screen.__init__(self, session)
        self.bouquetChangeCB = bouquetChangeCB
        self.serviceChangeCB = serviceChangeCB
        self.ask_time = -1  #now
        self["key_red"] = StaticText("")
        self.closeRecursive = False
        self.saved_title = None
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        self.session = session
        self.Console = Console()
        if isinstance(service, str) and eventid is not None:
            self.type = EPG_TYPE_SIMILAR
            self.setTitle(_("Similar EPG"))
            self["key_yellow"] = StaticText()
            self["key_blue"] = StaticText()
            self["key_red"] = StaticText()
            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"] = StaticText()
            self["key_blue"] = StaticText(_("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
            if self.bouquetChangeCB == StaticText:
                self["key_yellow"] = StaticText(
                    pgettext("button label, 'previous screen'", "Prev"))
                self["key_blue"] = StaticText(
                    pgettext("button label, 'next screen'", "Next"))
            else:
                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.parent = parent
        if self.bouquetChangeCB == StaticText:
            self["key_green"] = StaticText(_("Add timer"))
        else:
            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,
                "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['colouractions'] = HelpableActionMap(
            self, ["ColorActions"],
            {"red": (self.GoToTmbd, _("Search event in TMBD"))})

        self.isTMBD = fileExists(
            resolveFilename(SCOPE_PLUGINS, "Extensions/TMBD/plugin.pyo"))
        if self.isTMBD:
            self["key_red"] = Button(_("Search TMBD"))
            self.select = True
        if not self.isTMBD:
            self["key_red"] = Button(_("TMBD Not Installed"))
            self.select = False
        try:
            from Plugins.Extensions.YTTrailer.plugin import baseEPGSelection__init__
            description = _("Search yt-trailer for event")
        except ImportError as ie:
            pass
        else:
            if baseEPGSelection__init__ is not None:
                self["trailerActions"] = ActionMap(
                    ["InfobarActions", "InfobarTeletextActions"], {
                        "showTv": self.showTrailer,
                        "showRadio": self.showTrailerList,
                        "startTeletext": self.showConfig
                    })
        self["actions"].csel = self
        if parent and hasattr(parent, "fallbackTimer"):
            self.fallbackTimer = parent.fallbackTimer
            self.onLayoutFinish.append(self.onCreate)
        else:
            self.fallbackTimer = FallbackTimerList(self, self.onCreate)
Exemple #38
0
    def __init__(self,
                 session,
                 epgConfig,
                 startBouquet=None,
                 startRef=None,
                 bouquets=None):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)

        self.epgConfig = epgConfig
        self.bouquets = bouquets
        self.startBouquet = startBouquet
        self.startRef = startRef
        self.popupDialog = None
        self.closeRecursive = False
        self.eventviewDialog = None
        self.eventviewWasShown = False
        self.session.pipshown = False
        self.pipServiceRelation = getRelationDict(
        ) if plugin_PiPServiceRelation_installed else {}
        self["Service"] = ServiceEvent()
        self["Event"] = Event()
        self["lab1"] = Label(_("Please wait while gathering EPG data..."))
        self["lab1"].hide()
        self["key_red"] = Button(_("IMDb Search"))
        self["key_green"] = Button(_("Add Timer"))
        self["key_yellow"] = Button(_("EPG Search"))
        self["key_blue"] = Button(_("Add AutoTimer"))

        helpDescription = _("EPG Commands")

        self["okactions"] = HelpableActionMap(
            self,
            "OkCancelActions", {
                "cancel": (self.closeScreen, _("Exit EPG")),
                "OK": (self.helpKeyAction("ok")),
                "OKLong": (self.helpKeyAction("oklong"))
            },
            prio=-1,
            description=helpDescription)

        self["colouractions"] = HelpableActionMap(
            self,
            "ColorActions", {
                "red": self.helpKeyAction("red"),
                "redlong": self.helpKeyAction("redlong"),
                "green": self.helpKeyAction("green"),
                "greenlong": self.helpKeyAction("greenlong"),
                "yellow": self.helpKeyAction("yellow"),
                "yellowlong": self.helpKeyAction("yellowlong"),
                "blue": self.helpKeyAction("blue"),
                "bluelong": self.helpKeyAction("bluelong")
            },
            prio=-1,
            description="EPG Commands")
        self._updateButtonText()

        self["recordingactions"] = HelpableActionMap(
            self,
            "InfobarInstantRecord", {
                "ShortRecord": self.helpKeyAction("rec"),
                "LongRecord": self.helpKeyAction("reclong")
            },
            prio=-1,
            description=helpDescription)
        self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {},
                                               -1)

        self.noAutotimer = _(
            "The AutoTimer plugin is not installed!\nPlease install it.")
        self.noEPGSearch = _(
            "The EPGSearch plugin is not installed!\nPlease install it.")
        self.noIMDb = _(
            "The IMDb plugin is not installed!\nPlease install it.")
        self.refreshTimer = eTimer()
        self.refreshTimer.timeout.get().append(self.refreshList)
        self.onLayoutFinish.append(self.onCreate)
Exemple #39
0
 def show(self):
     self["actions"].execBegin()
     self["cancelaction"].execBegin()
     Screen.show(self)
Exemple #40
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent)
     self["text"] = StaticText("")
     self.onShow.append(self.setCallback)
Exemple #41
0
    def __init__(self, session, items, service=None):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution(
            "AdvancedMovieSelectionDownload")
        self.onShow.append(self.selectionChanged)
        self.service = service
        self["logo"] = Pixmap()
        self["info"] = Label()
        self["title"] = Label()
        self["poster"] = Pixmap()
        self["poster"].hide()
        self["description"] = ScrollLabel()
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_yellow"] = Label(_("Manual search"))
        if self.service is not None:
            self["key_green"] = Label(_("Save infos/cover"))
        else:
            self["key_green"] = Label(_("Background"))
            self["key_yellow"].hide()

        self["ActionsMap"] = ActionMap(
            ["SetupActions", "ColorActions"], {
                "ok": self.titleSelected,
                "green": self.titleSelected,
                "red": self.__cancel,
                "yellow": self.editTitle,
                "cancel": self.__cancel,
                "left": self.scrollLabelPageUp,
                "right": self.scrollLabelPageDown
            }, -1)
        self.onShown.append(self.setWindowTitle)

        self.l = []
        self["list"] = MenuList(self.l)
        self["list"].onSelectionChanged.append(self.selectionChanged)

        self.picload = ePicLoad()
        self.picload.PictureData.get().append(self.paintPosterPixmap)
        self.refreshTimer = eTimer()
        self.refreshTimer.callback.append(self.refresh)

        self.tmdb3 = tmdb.init_tmdb3()

        if self.service is not None:
            global movie_title
            movie_title = ServiceCenter.getInstance().info(
                self.service).getName(
                    self.service).encode("utf-8").split(" - ")[0].strip()
            self.refreshTimer.start(1, True)
            return

        global fetchingMovies, this_session, is_hidden
        if fetchingMovies is None:
            fetchingMovies = FetchingMovies(items)
        else:
            fetchingMovies.cancel = False
        self.progressTimer = eTimer()
        self.progressTimer.callback.append(self.updateProgress)
        self.progressTimer.start(250, False)
        this_session = session
        is_hidden = False
Exemple #42
0
 def hide(self):
     self["actions"].execEnd()
     self["cancelaction"].execEnd()
     Screen.hide(self)
Exemple #43
0
	def layoutFinished(self):
		self.setup_title = _("Mounts editor")
		Screen.setTitle(self, _(self.setup_title))
		self["VKeyIcon"].boolean = False
		self["VirtualKB"].setEnabled(False)
		self["HelpWindow"].hide()
Exemple #44
0
	def __init__(self, session, nimList):
		Screen.__init__(self, session)
		self.prevservice = self.session.nav.getCurrentlyPlayingServiceReference()
		self.setTitle(_("Fast Scan"))
		
		self.providers = {}
		
		#hacky way
		self.providers['Astra_19_AustriaSat'] = (0, 900, True)	
		self.providers['DigiTV'] = (0, 900, True)                	
		self.providers['FocusSat'] = (0, 900, True)
		self.providers['Freesat_Czech_Republic'] = (0, 900, True)
		self.providers['Freesat_Hungary'] = (0, 900, True)
		self.providers['Freesat_Moldavia'] = (0, 900, True)
		self.providers['Freesat_Romania'] = (0, 900, True)		
		self.providers['Freesat_Slovenske'] = (0, 900, True)
		self.providers['HDPlus'] = (0, 900, True)
		self.providers['Own_Scan'] = (0, 900, True)		
		self.providers['Sky_de_Full'] = (0, 900, True)
		self.providers['Sky_de_Bundesliga'] = (0, 900, True)
                self.providers['Sky_de_Cinema'] = (0, 900, True)
                self.providers['Sky_de_Entertainment'] = (0, 900, True)
		self.providers['Sky_de_Sport'] = (0, 900, True)		
		self.providers['Sky_de_Starter'] = (0, 900, True)		
		self.providers['UPC'] = (0, 900, True)                		
		
		#orgin
		self.providers['CanalDigitaal'] = (1, 900, True)
		self.providers['Canal Digitaal Astra 1'] = (0, 900, True)
		self.providers['TV Vlaanderen'] = (1, 910, True)
		self.providers['TV Vlaanderen  Astra 1'] = (0, 910, True)
		self.providers['TéléSAT'] = (0, 920, True)
		self.providers['TéléSAT Astra3'] = (1, 920, True)
		self.providers['HD Austria'] = (0, 950, False)
		self.providers['Fast Scan Deutschland'] = (0, 960, False)
		self.providers['Fast Scan Deutschland Astra3'] = (1, 960, False) 
		self.providers['Skylink Czech Republic'] = (1, 30, False)
		self.providers['Skylink Slovak Republic'] = (1, 31, False)
		self.providers['AustriaSat Magyarország Eutelsat 9E'] = (2, 951, False)
		self.providers['AustriaSat Magyarország Astra 3'] = (1, 951, False)
		
				
		

		
		self.transponders = ((12515000, 22000000, eDVBFrontendParametersSatellite.FEC_5_6, 192,
			eDVBFrontendParametersSatellite.Polarisation_Horizontal, eDVBFrontendParametersSatellite.Inversion_Unknown,
			eDVBFrontendParametersSatellite.System_DVB_S, eDVBFrontendParametersSatellite.Modulation_QPSK,
			eDVBFrontendParametersSatellite.RollOff_alpha_0_35, eDVBFrontendParametersSatellite.Pilot_Off),
			(12070000, 27500000, eDVBFrontendParametersSatellite.FEC_3_4, 235,
			eDVBFrontendParametersSatellite.Polarisation_Horizontal, eDVBFrontendParametersSatellite.Inversion_Unknown,
			eDVBFrontendParametersSatellite.System_DVB_S, eDVBFrontendParametersSatellite.Modulation_QPSK,
			eDVBFrontendParametersSatellite.RollOff_alpha_0_35, eDVBFrontendParametersSatellite.Pilot_Off))
			
                self.session.postScanService = session.nav.getCurrentlyPlayingServiceOrGroup()
                
		self["actions"] = ActionMap(["SetupActions", "MenuActions"],
		{
			"ok": self.keyGo,
			"save": self.keyGo,
			"cancel": self.keyCancel,
			"menu": self.closeRecursive,
		}, -2)

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

		lastConfiguration = eval(config.misc.fastscan.last_configuration.value)
		if not lastConfiguration:
			lastConfiguration = (nimList[0][0], providerList[0], True, True, False, config.usage.alternative_number_mode.value)
		self.scan_nims = ConfigSelection(default = lastConfiguration[0], choices = nimList)
		self.scan_provider = ConfigSelection(default = lastConfiguration[1], choices = providerList)
		self.scan_hd = ConfigYesNo(default = lastConfiguration[2])
		self.scan_keepnumbering = ConfigYesNo(default = lastConfiguration[3])
		self.scan_keepsettings = ConfigYesNo(default = lastConfiguration[4])
		self.scan_alternative_number_mode = ConfigYesNo(default = lastConfiguration[5])

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

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

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

		self.list.append(getConfigListEntry(_("Use fastscan channel numbering"), self.scan_keepnumbering))
                self.list.append(getConfigListEntry(_("Use fastscan channel names"), self.scan_keepsettings))
		self.list.append(getConfigListEntry(_("Use alternate bouquets numbering"), self.scan_alternative_number_mode))

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

		self.finished_cb = None

		self["introduction"] = Label(_("Select your provider, and press OK to start the scan"))
Exemple #45
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent)
		self["headline"] = Label(_("IMDb Plugin"))
 def __init__(self, session):
     self.session = session
     if HD.width() > 1280:
         skin = '%s/Skin/Main_fhd.xml' % os.path.dirname(
             sys.modules[__name__].__file__)
     else:
         skin = '%s/Skin/Main_hd.xml' % os.path.dirname(
             sys.modules[__name__].__file__)
     f = open(skin, 'r')
     self.skin = f.read()
     f.close()
     Screen.__init__(self, session)
     self["actions"] = ActionMap(
         [
             "OkCancelActions", "ShortcutActions", "WizardActions",
             "ColorActions", "SetupActions", "NumberActions", "MenuActions",
             "HelpActions", "EPGSelectActions"
         ], {
             "ok": self.keyOK,
             "up": self.keyUp,
             "down": self.keyDown,
             "blue": self.Auto,
             "green": self.Lcn,
             "yellow": self.Select,
             "cancel": self.exitplug,
             "left": self.keyRightLeft,
             "right": self.keyRightLeft,
             "red": self.exitplug
         }, -1)
     self['autotimer'] = Label("")
     self['namesat'] = Label("")
     self['text'] = Label("")
     self['dataDow'] = Label("")
     self['Green'] = Pixmap()
     self['Blue'] = Pixmap()
     self['Yellow'] = Pixmap()
     self['Green'].hide()
     self['Yellow'].show()
     self['Blue'].show()
     self["Key_Lcn"] = Label('')
     self.LcnOn = False
     if os.path.exists(
             '/usr/lib/enigma2/python/Plugins/Extensions/NGsetting/Moduli/NGsetting/Date'
     ) and os.path.exists('/etc/enigma2/lcndb'):
         self['Key_Lcn'].setText(_("Lcn"))
         self.LcnOn = True
         self["Green"].show()
     self["Key_Red"] = Label(_("Exit"))
     self["Key_Green"] = Label(_("Setting Installed:"))
     self["Key_Personal"] = Label("")
     AutoTimer, NameSat, Data, Type, Personal, DowDate = Load()
     self['A'] = MenuListiSettingE2A([])
     self['B'] = MenuListiSettingE2([])
     self["B"].selectionEnabled(1)
     self["A"].selectionEnabled(1)
     self.currentlist = 'B'
     self.ServerOn = True
     self.DubleClick = True
     self.MenuA()
     self.List = DownloadSetting()
     self.MenuB()
     self.iTimer = eTimer()
     self.iTimer.callback.append(self.keyRightLeft)
     self.iTimer.start(1000, True)
     self.iTimer1 = eTimer()
     self.iTimer1.callback.append(self.StartSetting)
     self.Message = eTimer()
     self.Message.callback.append(self.MessagePlugin)
     self.OnWriteAuto = eTimer()
     self.OnWriteAuto.callback.append(self.WriteAuto)
     self.StopAutoWrite = False
     self.ExitPlugin = eTimer()
     self.ExitPlugin.callback.append(self.PluginClose)
     self.Reload = eTimer()
     self.Reload.callback.append(self.ReloadGui)
     self.onShown.append(self.ReturnSelect)
     self.onShown.append(self.Info)
     self.VersPlugin = Plugin()
     if self.VersPlugin:
         if self.VersPlugin[0][1] != Version:
             self.Message.start(2000, True)
Exemple #47
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self['outlabel'] = Label('')
     self.mystate = 0
    def __init__(self, session, service, cbServiceCommand, chName, chURL,
                 chIcon):
        Screen.__init__(self, session)
        InfoBarNotifications.__init__(self)

        isEmpty = lambda x: x is None or len(x) == 0 or x == 'None'
        if isEmpty(chName):
            chName = 'Unknown'
        if isEmpty(chURL):
            chURL = 'Unknown'
        if isEmpty(chIcon):
            chIcon = 'default.png'
        chIcon = '%s/icons/%s' % (PLUGIN_PATH, chIcon)
        self.session = session
        self.service = service
        self.cbServiceCommand = cbServiceCommand
        self["actions"] = ActionMap(
            [
                "OkCancelActions", "InfobarSeekActions", "MediaPlayerActions",
                "MovieSelectionActions"
            ], {
                "ok": self.doInfoAction,
                "cancel": self.doExit,
                "stop": self.doExit,
                "playpauseService": self.playpauseService,
            }, -2)

        self.__event_tracker = ServiceEventTracker(
            screen=self,
            eventmap={
                iPlayableService.evSeekableStatusChanged:
                self.__seekableStatusChanged,
                iPlayableService.evStart: self.__serviceStarted,
                iPlayableService.evEOF: self.__evEOF,
            })

        self.hidetimer = eTimer()
        self.hidetimer.timeout.get().append(self.doInfoAction)

        self.state = self.PLAYER_PLAYING
        self.lastseekstate = self.PLAYER_PLAYING
        self.__seekableStatusChanged()

        self.onClose.append(self.__onClose)
        self.doPlay()

        self['channel_icon'] = Pixmap()
        self['channel_name'] = Label(chName)
        self['channel_uri'] = Label(chURL)

        self.picload = ePicLoad()
        self.scale = AVSwitch().getFramebufferScale()
        self.picload.PictureData.get().append(self.cbDrawChannelIcon)
        print self.scale[0]
        print self.scale[1]
        self.picload.setPara(
            (35, 35, self.scale[0], self.scale[1], False, 0, "#00000000"))
        self.picload.startDecode(chIcon)

        self.bypassExit = False
        self.cbServiceCommand(('docommand', self.doCommand))
	def ok(self):
		Screen.close(self, self.STD_FEED + self["menu"].getCurrent()[1])
Exemple #50
0
	def __init__(self, session, eventName, callbackNeeded=False):
		Screen.__init__(self, session)
		self.skinName = "IMDBv2"

		for tag in config.plugins.imdb.ignore_tags.getValue().split(','):
			eventName = eventName.replace(tag,'')

		self.eventName = eventName

		self.callbackNeeded = callbackNeeded
		self.callbackData = ""
		self.callbackGenre = ""

		self.fetchurl = None

		self.dictionary_init()

		self["poster"] = Pixmap()
		self.picload = ePicLoad()
		self.picload_conn = self.picload.PictureData.connect(self.paintPosterPixmapCB)

		self["stars"] = ProgressBar()
		self["starsbg"] = Pixmap()
		self["stars"].hide()
		self["starsbg"].hide()
		self.ratingstars = -1

		self.setTitle(_("IMDb - Internet Movie Database"))
		self["titlelabel"] = Label("")
		self["titlelcd"] = StaticText("")
		self["detailslabel"] = ScrollLabel("")
		self["castlabel"] = ScrollLabel("")
		self["storylinelabel"] = ScrollLabel("")
		self["extralabel"] = ScrollLabel("")
		self["statusbar"] = Label("")
		self["ratinglabel"] = Label("")
		self.resultlist = []
		self["menu"] = MenuList(self.resultlist)
		self["menu"].hide()

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

		# 0 = multiple query selection menu page
		# 1 = movie info page
		# 2 = extra infos page
		self.Page = 0

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MovieSelectionActions", "DirectionActions"],
		{
			"ok": self.showDetails,
			"cancel": self.exit,
			"down": self.pageDown,
			"up": self.pageUp,
			"right": self.keyRight,
			"left": self.keyLeft,
			"red": self.exit,
			"green": self.showMenu,
			"yellow": self.showDetails,
			"blue": self.showExtras,
			"contextMenu": self.contextMenuPressed,
			"showEventInfo": self.showDetails
		}, -1)

		self.getIMDB()
Exemple #51
0
 def close(self, loginState=LOGIN_CANCEL):
     youTubeUserConfig.setAsDefault(self.defaultUser)
     Screen.close(self, loginState)
	def close(self):
		Screen.close(self, None)
Exemple #53
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["key_green"] = Label(_("Save"))
		ConfigListScreen.__init__(self, [])
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], {"green": self.save, "cancel": self.exit}, -1)
		self.onLayoutFinish.append(self.createConfig)
    def __init__(self, session, server):
        Screen.__init__(self, session)
        self.session = session
        self.server = server
        self.filelistlabel = "Filelist:" + self.server.getBasedir()
        self.playlistlabel = "Playlist"

        self.defaultFilter = "(?i)\.(avi|mpeg|mpg|divx|flac|ogg|xvid|mp3|mp4|mov|ts|vob|wmv|mkv|iso|bin|m3u|pls|dat|xspf)$"

        #self.filelist = VlcFileList(server, self.defaultFilter)
        self.filelist = VlcFileList(self.getFilesAndDirsCB,
                                    server.getBasedir(), self.defaultFilter)

        self["filelist"] = self.filelist
        self["playlist"] = VlcPlayList(self.getPlaylistEntriesCB)
        self["listlabel"] = Label("")
        self["key_red"] = Button("Favorites")
        self["key_green"] = Button("Preview")
        self["key_yellow"] = Button("Refresh")
        self["key_blue"] = Button("Filter Off")

        self["currentdir"] = Label("Folder:")
        self["currentmedia"] = Label("")

        self["currentserver"] = Label("Server:")
        self["filterstatus"] = Label("Filter: On")

        self.curfavfolder = -1

        self.__event_tracker = ServiceEventTracker(
            screen=self,
            eventmap={
                #iPlayableService.evStart: self.doEofInternal,
                iPlayableService.evEnd:
                self.StopPlayback,
                iPlayableService.evEOF:
                self.StopPlayback,
                iPlayableService.evStopped:
                self.StopPlayback
            })

        self["actions"] = ActionMap(
            [
                "WizardActions", "InfobarActions", "MovieSelectionActions",
                "MenuActions", "ShortcutActions", "MoviePlayerActions",
                "EPGSelectActions"
            ], {
                "back": self.Exit,
                "red": self.JumpToFavs,
                "green": self.showPreview,
                "yellow": self.update,
                "blue": self.keyFilter,
                "up": self.up,
                "down": self.down,
                "left": self.left,
                "right": self.right,
                "ok": self.ok,
                "menu": self.KeyMenu,
                "nextBouquet": self.NextFavFolder,
                "prevBouquet": self.PrevFavFolder,
                "showMovies": self.visibility,
                "leavePlayer": self.StopPlayback
            }, -1)

        self.currentList = None
        self.playlistIds = []

        self.isVisible = True

        self.switchToFileList()

        self.onClose.append(self.__onClose)
        self.onShown.append(self.__onShown)
Exemple #55
0
    def __init__(self,
                 session,
                 text,
                 type=TYPE_YESNO,
                 timeout=-1,
                 close_on_any_key=False,
                 default=True,
                 enable_input=True,
                 msgBoxID=None,
                 picon=True,
                 simple=False,
                 wizard=False,
                 list=None,
                 skin_name=None,
                 timeout_default=None):
        if not list: list = []
        if not skin_name: skin_name = []
        self.type = type
        Screen.__init__(self, session)
        self.skinName = ["MessageBox"]
        if wizard:
            from Components.config import config
            from Components.Pixmap import MultiPixmap
            self["rc"] = MultiPixmap()
            self["rc"].setPixmapNum(config.misc.rcused.value)
            self.skinName = ["MessageBoxWizard"]

        if simple:
            self.skinName = ["MessageBoxSimple"]

        if isinstance(skin_name, str):
            self.skinName = [skin_name] + self.skinName

        self.msgBoxID = msgBoxID

        self["text"] = Label(_(text))
        self["Text"] = StaticText(_(text))
        self["selectedChoice"] = StaticText()

        self.text = _(text)
        self.close_on_any_key = close_on_any_key
        self.timeout_default = timeout_default

        self["ErrorPixmap"] = Pixmap()
        self["ErrorPixmap"].hide()
        self["QuestionPixmap"] = Pixmap()
        self["QuestionPixmap"].hide()
        self["InfoPixmap"] = Pixmap()
        self["InfoPixmap"].hide()

        self.timerRunning = False
        self.initTimeout(timeout)

        if picon:
            picon = type
            if picon == self.TYPE_ERROR:
                self["ErrorPixmap"].show()
            elif picon == self.TYPE_YESNO:
                self["QuestionPixmap"].show()
            elif picon == self.TYPE_INFO:
                self["InfoPixmap"].show()

        self.setTitle(
            self.type < self.TYPE_MESSAGE
            and [_("Question"),
                 _("Information"),
                 _("Warning"),
                 _("Error")][self.type] or "Message")
        if type == self.TYPE_YESNO:
            if list:
                self.list = list
            elif default:
                self.list = [(_("yes"), True), (_("no"), False)]
            else:
                self.list = [(_("no"), False), (_("yes"), True)]
        else:
            self.list = []

        self["list"] = MenuList(self.list)
        if self.list:
            self["selectedChoice"].setText(self.list[0][0])
        else:
            self["list"].hide()

        if enable_input:
            self["actions"] = ActionMap(
                ["MsgBoxActions", "DirectionActions"], {
                    "cancel": self.cancel,
                    "ok": self.ok,
                    "alwaysOK": self.alwaysOK,
                    "up": self.up,
                    "down": self.down,
                    "left": self.left,
                    "right": self.right,
                    "upRepeated": self.up,
                    "downRepeated": self.down,
                    "leftRepeated": self.left,
                    "rightRepeated": self.right
                }, -1)
	def __init__(self, session, playlist, playall=None, lastservice=None):
		
		# The CutList must be initialized very first  
		CutList.__init__(self)
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		InfoBarSupport.__init__(self)
		
		# Skin
		self.skinName = "EMCMediaCenter"
		skin = None
		CoolWide = getDesktop(0).size().width()
		if CoolWide == 720:
			skin = "/usr/lib/enigma2/python/Plugins/Extensions/EnhancedMovieCenter/CoolSkin/EMCMediaCenter_720.xml"
		elif CoolWide == 1024:
			skin = "/usr/lib/enigma2/python/Plugins/Extensions/EnhancedMovieCenter/CoolSkin/EMCMediaCenter_1024.xml"
		elif CoolWide == 1280:
			skin = "/usr/lib/enigma2/python/Plugins/Extensions/EnhancedMovieCenter/CoolSkin/EMCMediaCenter_1280.xml"
		if skin:
			Cool = open(skin)
			self.skin = Cool.read()
			Cool.close()

		self.serviceHandler = ServiceCenter.getInstance()

		# EMC Source
		self["Service"] = EMCCurrentService(session.nav, self)
		
		# Events
		self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
			{
		# Disabled for tests
		# If we enable them, the sound will be delayed for about 2 seconds ?
				iPlayableService.evStart: self.__serviceStarted,
				iPlayableService.evStopped: self.__serviceStopped,
				#iPlayableService.evEnd: self.__evEnd,
				#iPlayableService.evEOF: self.__evEOF,
				#iPlayableService.evUser: self.__timeUpdated,
				#iPlayableService.evUser+1: self.__statePlay,
				#iPlayableService.evUser+2: self.__statePause,
				iPlayableService.evUser+3: self.__osdFFwdInfoAvail,
				iPlayableService.evUser+4: self.__osdFBwdInfoAvail,
				#iPlayableService.evUser+5: self.__osdStringAvail,
				iPlayableService.evUser+6: self.__osdAudioInfoAvail,
				iPlayableService.evUser+7: self.__osdSubtitleInfoAvail,
				iPlayableService.evUser+8: self.__chapterUpdated,
				iPlayableService.evUser+9: self.__titleUpdated,
				iPlayableService.evUser+11: self.__menuOpened,
				iPlayableService.evUser+12: self.__menuClosed,
				iPlayableService.evUser+13: self.__osdAngleInfoAvail
			})
			
			# Keymap
	#		self["SeekActions"] = HelpableActionMap(self, "InfobarSeekActions", 							-1 higher priority
	#		self["MovieListActions"] = HelpableActionMap(self, "InfobarMovieListActions", 		0
	#		self["ShowHideActions"] = ActionMap( ["InfobarShowHideActions"] ,  								0
	#		self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",									0
	#		self["CueSheetActions"] = HelpableActionMap(self, actionmap,											1 lower priority
	#		self["InstantExtensionsActions"] = HelpableActionMap(self, "InfobarExtensions", 	1 lower priority
	#		self["NumberActions"] = NumberActionMap( [ "NumberActions"],											0 Set by EMC to 2 very lower priority 
	#		self["TeletextActions"] = HelpableActionMap(self, "InfobarTeletextActions",				0 Set by EMC to 2 very lower priority 
	#		self["MenuActions"] = HelpableActionMap(self, "InfobarMenuActions",  							0 Set by EMC to 2 very lower priority 
		if config.EMC.movie_exit.value:
			self["actions"] = HelpableActionMap(self, "CoolPlayerActions",
				{
					"leavePlayer":	(self.leavePlayer, 		_("Stop playback")),
				}) # default priority
		else:
			self["actions"] = HelpableActionMap(self, "CoolPlayerActions2",
				{
					"leavePlayer":	(self.leavePlayer, 		_("Stop playback")),
				}) # default priority
		
		self["DVDPlayerPlaybackActions"] = HelpableActionMap(self, "EMCDVDPlayerActions",
			{
				"dvdMenu": (self.enterDVDMenu, _("show DVD main menu")),
				#"showInfo": (self.showInfo, _("toggle time, chapter, audio, subtitle info")),
				"nextChapter": (self.nextChapter, _("forward to the next chapter")),
				"prevChapter": (self.prevChapter, _("rewind to the previous chapter")),
				"nextTitle": (self.nextTitle, _("jump forward to the next title")),
				"prevTitle": (self.prevTitle, _("jump back to the previous title")),
				"dvdAudioMenu": (self.enterDVDAudioMenu, _("(show optional DVD audio menu)")),
				"nextAudioTrack": (self.nextAudioTrack, _("switch to the next audio track")),
				"nextSubtitleTrack": (self.nextSubtitleTrack, _("switch to the next subtitle language")),
				"nextAngle": (self.nextAngle, _("switch to the next angle")),
			}, 1) # lower priority
		# Only enabled if playing a dvd
		self["DVDPlayerPlaybackActions"].setEnabled(False)
		
		self["DVDMenuActions"] = ActionMap(["WizardActions"],
			{
				"left": self.keyLeft,
				"right": self.keyRight,
				"up": self.keyUp,
				"down": self.keyDown,
				"ok": self.keyOk,
				"back": self.keyBack,
			}, 2) # lower priority
		# Only enabled during DVD Menu
		self["DVDMenuActions"].setEnabled(False)
		
		self["GeneralPlayerPlaybackActions"] = HelpableActionMap(self, "EMCGeneralPlayerActions",
			{
				"showExtensions": (self.openExtensions, _("view extensions...")),
				"EMCGreen":	(self.CoolAVSwitch,			_("Format AVSwitch")),
				"seekFwd": (self.seekFwd, _("Seek forward")),
				"seekBack": (self.seekBack, _("Seek backward")),
				"movieInfo": (self.infoMovie, _("Movie information")),
			}, 2) # lower priority
		
		self["MenuActions"].prio = 2
		if "TeletextActions" in self:
			self["TeletextActions"].prio = 2
		self["NumberActions"].prio = 2
		
		# Cover Anzeige
		self["Cover"] = Pixmap()
		
		# DVD Player
		self["audioLabel"] = Label("")
		self["subtitleLabel"] = Label("")
		self["angleLabel"] = Label("")
		self["chapterLabel"] = Label("")
		self["anglePix"] = Pixmap()
		self["anglePix"].hide()
		self.last_audioTuple = None
		self.last_subtitleTuple = None
		self.last_angleTuple = None
		self.totalChapters = 0
		self.currentChapter = 0
		self.totalTitles = 0
		self.currentTitle = 0
		self.in_menu = None
		self.dvdScreen = None
		
		# Further initialization
		self.firstStart = True
		self.stopped = False
		self.closedByDelete = False
		self.closeAll = False
		
		self.lastservice = lastservice or self.session.nav.getCurrentlyPlayingServiceReference()
		self.playlist = playlist
		self.playall = playall
		self.playcount = -1
		self.service = None
		
		self.picload = ePicLoad()
		self.picload.PictureData.get().append(self.showCoverCallback)
		
		# Record events
		try:
			NavigationInstance.instance.RecordTimer.on_state_change.append(self.recEvent)
		except Exception, e:
			emcDebugOut("[EMCMediaCenter] Record observer add exception:\n" + str(e))
Exemple #57
0
    def __init__(self, session, args=0):
        skin = """<screen position="93,70" size="550,450" title="Webcams provided by webcams.travel">

			<widget source="list" render="Listbox" position="0,0" size="550,350" zPosition="1" scrollbarMode="showOnDemand" transparent="1"  >
				<convert type="TemplatedMultiContent">
				{"templates":
					{"default": (77,[
							MultiContentEntryPixmapAlphaTest(pos = (0, 0), size = (100, 75), png = 4), # index 4 is the thumbnail
							MultiContentEntryText(pos = (100, 1), size = (500, 22), font=0, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 1), # index 1 is the Title
							MultiContentEntryText(pos = (100, 24), size = (300, 18), font=1, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 5), # index 5 is the Published Date
							MultiContentEntryText(pos = (100, 43), size = (300, 18), font=1, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 6), # index 6 is the Views Count
							MultiContentEntryText(pos = (400, 24), size = (200, 18), font=1, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 7), # index 7 is the duration
							MultiContentEntryText(pos = (400, 43), size = (200, 18), font=1, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 8), # index 8 is the ratingcount
						]),
					"status": (77,[
							MultiContentEntryText(pos = (10, 1), size = (500, 28), font=2, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 0), # index 0 is the name
							MultiContentEntryText(pos = (10, 22), size = (500, 46), font=3, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 1), # index 2 is the description
						])
					},
					"fonts": [gFont("Regular", 22),gFont("Regular", 18),gFont("Regular", 26),gFont("Regular", 20)],
					"itemHeight": 77
				}
				</convert>
			</widget>
			<widget name="thumbnail" position="0,0" size="100,75" alphatest="on"/> # fake entry for dynamic thumbnail resizing, currently there is no other way doing this.

			<widget name="count" position="5,360" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget name="page" position="150,360" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget name="currentnumbers" position="295,360" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />

			<ePixmap position="5,410" zPosition="0" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
			<ePixmap position="150,410" zPosition="1" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
			<ePixmap position="295,410" zPosition="2" size="140,40" pixmap="skin_default/buttons/yellow.png" transparent="1" alphatest="on" />
			<!-- #not used now# ePixmap position="445,410" zPosition="3" size="140,40" pixmap="skin_default/buttons/blue.png" transparent="1" alphatest="on" //-->
			<widget name="key_red" position="5,410" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget name="key_green" position="150,410" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget name="key_yellow" position="295,410" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
			<widget name="key_blue" position="445,410" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />

		</screen>"""
        self.skin = skin
        Screen.__init__(self, session)
        self.picloads = {}
        self.thumbnails = {}

        self["list"] = List([])
        self["thumbnail"] = Pixmap()
        self["thumbnail"].hide()

        self["count"] = Label(_("Cams: "))
        self["page"] = Label(_("Page: "))
        self["currentnumbers"] = Label(_("current: "))

        self["key_red"] = Button()
        self["key_green"] = Button()
        self["key_yellow"] = Button()
        self["key_blue"] = Button()
        self.onLayoutFinish.append(self._setButtonTexts)

        self["actions"] = ActionMap(
            [
                "WizardActions", "MenuActions", "DirectionActions",
                "ShortcutActions"
            ], {
                "ok": self.onOK,
                "red": self.onRed,
                "green": self.onGreen,
                "yellow": self.onYellow,
                "back": self.close
            }, -1)
        self.finish_loading = True
        self.timer_default = eTimer()
        self.timer_default.timeout.callback.append(self.buildCamList)

        self.timer_status = eTimer()
        self.timer_status.timeout.callback.append(self.buildStatusList)

        self.timer_labels = eTimer()
        self.timer_labels.timeout.callback.append(self.refreshLabels)

        self.onLayoutFinish.append(self.loadData)
Exemple #58
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = ['Setup']
     Screen.setTitle(self, _('Infobar Setup'))
     self.list = []
     ConfigListScreen.__init__(self, self.list)
     self['description'] = Label(_('* = Restart Required'))
     self['key_red'] = Label(_('Exit'))
     self['key_green'] = Label(_('Save'))
     self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {
         'green': self.keySave,
         'back': self.keyCancel,
         'red': self.keyCancel
     }, -2)
     self.list.append(
         getConfigListEntry(_('1st infobar timeout'),
                            config.usage.infobar_timeout))
     self.list.append(
         getConfigListEntry(_('Show 2nd infobar'),
                            config.usage.show_second_infobar))
     self.list.append(
         getConfigListEntry(_('Enable OK for channel selection'),
                            config.usage.okbutton_mode))
     self.list.append(
         getConfigListEntry(
             _('Enable volume control with LEFT/RIGHT arrow buttons'),
             config.usage.volume_instead_of_channelselection))
     self.list.append(
         getConfigListEntry(_('Enable zapping with UP/DOWN arrow buttons'),
                            config.usage.zap_with_arrow_buttons))
     self.list.append(
         getConfigListEntry(_('Infobar frontend data source'),
                            config.usage.infobar_frontend_source))
     self.list.append(
         getConfigListEntry(
             _('Show PVR status in Movie Player'),
             config.usage.show_event_progress_in_servicelist))
     self.list.append(
         getConfigListEntry(_('Show channel number in infobar'),
                            config.usage.show_infobar_channel_number))
     self.list.append(
         getConfigListEntry(_('Show infobar on channel change'),
                            config.usage.show_infobar_on_zap))
     self.list.append(
         getConfigListEntry(_('Show infobar on skip forward/backward'),
                            config.usage.show_infobar_on_skip))
     self.list.append(
         getConfigListEntry(_('Show infobar on event change'),
                            config.usage.movieplayer_pvrstate))
     self.list.append(
         getConfigListEntry(_('Show infobar picons'),
                            config.usage.showpicon))
     self.list.append(
         getConfigListEntry(_('Show Source Info'), config.infobar.Ecn))
     self.list.append(
         getConfigListEntry(_('Show SoftCam name'), config.infobar.CamName))
     self.list.append(
         getConfigListEntry(_('Show Netcard Info'), config.infobar.NetInfo))
     self.list.append(
         getConfigListEntry(_('Show ECM-Info'), config.infobar.EcmInfo))
     self.list.append(
         getConfigListEntry(_('Show Crypto-Bar'), config.infobar.CryptoBar))
     self.list.append(
         getConfigListEntry(_('Show EIT now/next in infobar'),
                            config.usage.show_eit_nownext))
     self['config'].list = self.list
     self['config'].l.setList(self.list)
 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)
    def __init__(self,
                 session,
                 title=None,
                 width=None,
                 height=None,
                 message=None,
                 message_height=None,
                 accep_label=None,
                 accep_height=None,
                 col_num=4,
                 images=[],
                 image_width=160,
                 image_height=160,
                 max_sel_items=None):
        self.iptv_title = title
        self.iptv_width = width
        self.iptv_height = height
        self.iptv_message = message
        self.iptv_message_height = message_height

        self.iptv_accep_label = accep_label
        self.iptv_accep_height = accep_height

        self.iptv_col_num = col_num
        self.iptv_row_num = len(images) / col_num
        if len(images) % col_num > 0:
            self.iptv_row_num += 1

        self.iptv_images = images
        self.iptv_image_width = image_width
        self.iptv_image_height = image_width
        self.iptv_max_sel_items = max_sel_items
        self.iptv_num_sel_items = 0
        self.iptv_images_data = None

        self.iptv_grid = []
        for x in range(self.iptv_col_num):
            self.iptv_grid.append([])
            for y in range(self.iptv_row_num):
                self.iptv_grid[x].append(None)

        self.skin = self.__prepareSkin()
        Screen.__init__(self, session)
        #self.skinName = "IPTVMultipleImageSelectorWidget"

        self.onShown.append(self.onStart)
        self.onClose.append(self.__onClose)

        # create controls
        self["title"] = Label(self.iptv_title)
        if self.iptv_message != None:
            self["message"] = Label(str(self.iptv_message))

        for idx in range(self.iptv_col_num):
            self["col_%d" %
                 idx] = IPTVImagesSelectionList(self.iptv_image_height + 20)

        if self.iptv_accep_label:
            self["accept_button"] = Label(self.iptv_accep_label)

        self["actions"] = ActionMap(
            [
                "SetupActions", "ColorActions", "WizardActions",
                "ListboxActions", "IPTVPlayerListActions"
            ], {
                "cancel": self.key_cancel,
                "ok": self.key_ok,
                "green": self.key_green,
                "read": self.key_read,
                "up": self.key_up,
                "down": self.key_down,
                "moveUp": self.key_up,
                "moveDown": self.key_down,
                "moveTop": self.key_home,
                "moveEnd": self.key_end,
                "home": self.key_home,
                "end": self.key_end,
                "pageUp": self.key_page_up,
                "pageDown": self.key_page_down,
                "left": self.key_left,
                "right": self.key_right,
            }, -2)

        self.column_index = 0
        self.row_index = 0
        self.picload = ePicLoad()
        self.picload.setPara((self.iptv_image_width, self.iptv_image_height, 1,
                              1, False, 1, "#00000000"))
        self.picload_conn = None