Exemple #1
0
	def __init__(self, list, enableWrapAround=True):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)

		if pathExists('/usr/lib/enigma2/python/Plugins/Extensions/EasyInfo/icons/'):
			self.easyInfoIconsPath = '/usr/lib/enigma2/python/Plugins/Extensions/EasyInfo/icons/'
		else:
			self.easyInfoIconsPath = '/usr/lib/enigma2/python/Plugins/Extensions/EasyInfo/'
		
		sizes = componentSizes[EasyInfoPanelList.SKIN_COMPONENT_KEY]
		self.itemHeight = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_ITEM_HEIGHT, 60)
		self.textWidth = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_TEXT_WIDTH, 300)
		self.textHeight = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_TEXT_HEIGHT, 60)
		self.textXOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_TEXT_XOFFSET, 115)
		self.textYOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_TEXT_YOFFSET, 0)		
		self.iconWidth = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_ICON_WIDTH, 100)
		self.iconHeight = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_ICON_HEIGHT, 50)
		self.iconXOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_ICON_XOFFSET, 5)
		self.iconYOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_ICON_YOFFSET, 5)
		self.keyIconWidth = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_KEYICON_WIDTH, 5)
		self.keyIconHeight = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_KEYICON_HEIGHT, 50)
		self.keyIconXOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_KEYICON_XOFFSET, 0)
		self.keyIconYOffset = sizes.get(EasyInfoPanelList.SKIN_COMPONENT_KEYICON_YOFFSET, 5)
		
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(self.itemHeight)
		self.l.setBuildFunc(self.buildEntry)
	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		ChannelsBase.__init__(self)
		
		self.session = session
		
		self.skinName = [ "SeriesPluginChannelEditor" ]
		
		from plugin import NAME, VERSION
		self.setup_title = NAME + " " + _("Channel Editor") + " " + VERSION
		
		# Buttons
		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))
		self["key_blue"] = Button(_("Remove"))
		self["key_yellow"] = Button(_("Auto match"))
		
		# Define Actions
		self["actions_1"] = HelpableActionMap(self, "SetupActions", {
			"ok"       : (self.keyAdd, _("Show popup to add Stb Channel")),
			"cancel"   : (self.keyCancel, _("Cancel and close")),
			"deleteForward"   : (self.keyResetChannelMapping, _("Reset channels")),
		}, -1)
		self["actions_2"] = HelpableActionMap(self, "DirectionActions", {
			"left"     : (self.keyLeft, _("Previeous page")),
			"right"    : (self.keyRight, _("Next page")),
			"up"       : (self.keyUp, _("One row up")),
			"down"     : (self.keyDown, _("One row down")),
		}, -1)
		self["actions_3"] = HelpableActionMap(self, "ColorActions", {
			"red"      : (self.keyCancel, _("Cancel and close")),
			"green"    : (self.keySave, _("Save and close")),
			"blue"     : (self.keyRemove, _("Remove channel")),
			"yellow"   : (self.tryToMatchChannels, _("Auto match")),
		}, -2) # higher priority
		
		self.helpList[0][2].sort()

		self["helpActions"] = ActionMap(["HelpActions",], {
			"displayHelp"      : self.showHelp
		}, 0)

		self.chooseMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		global TemplatedListFonts
		if TemplatedListFonts is not None:
			tlf = TemplatedListFonts()
			self.chooseMenuList.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
			self.chooseMenuList.l.setItemHeight(30)
		else:
			self.chooseMenuList.l.setFont(0, gFont('Regular', 20 ))
			self.chooseMenuList.l.setItemHeight(25)
		self['list'] = self.chooseMenuList
		self['list'].show()

		self.stbChlist = []
		self.webChlist = []
		self.stbToWebChlist = []
		
		self.onLayoutFinish.append(self.readChannels)
	def __init__(self, getPlaylistEntriesCB):
		MenuList.__init__(self, list, False, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(25)
		self.l.setBuildFunc(self.buildListboxEntry)
		self.getPlaylistEntriesCB = getPlaylistEntriesCB
 def __init__(self, getPlaylistEntriesCB):
     MenuList.__init__(self, list, False, eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
     self.l.setItemHeight(25)
     self.l.setBuildFunc(self.buildListboxEntry)
     self.getPlaylistEntriesCB = getPlaylistEntriesCB
	def __init__(self, list, selection = 0, enableWrapAround=True):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)

		isFHD = False
		sz_w = getDesktop(0).size().width()
		if sz_w >= 1920:
			isFHD = True
			
		sizes = componentSizes[MPanelList.SKIN_COMPONENT_KEY]
		self.itemheight = sizes.get(MPanelList.SKIN_COMPONENT_ITEM_HEIGHT, 150 if isFHD else 100)
		self.itemwidth = sizes.get(MPanelList.SKIN_COMPONENT_ITEM_WIDTH, 400 if isFHD else 300)
		self.imagewidth = sizes.get(MPanelList.SKIN_COMPONENT_IMAGE_WIDTH, 200 if isFHD else 135)
		self.imageheight = sizes.get(MPanelList.SKIN_COMPONENT_IMAGE_HEIGHT, 140 if isFHD else 90)
		self.imagexoffset = sizes.get(MPanelList.SKIN_COMPONENT_IMAGE_XOFFSET, 25)
		self.imageyoffset = sizes.get(MPanelList.SKIN_COMPONENT_IMAGE_YOFFSET, 5)
		self.iconwidth = sizes.get(MPanelList.SKIN_COMPONENT_ICON_WIDTH, 5)
		self.iconheight = sizes.get(MPanelList.SKIN_COMPONENT_ICON_HEIGHT, 140 if isFHD else 90)
		self.iconxoffset = sizes.get(MPanelList.SKIN_COMPONENT_ICON_XOFFSET, 0)
		self.iconyoffset = sizes.get(MPanelList.SKIN_COMPONENT_ICON_YOFFSET, 5)
		self.textwidth = sizes.get(MPanelList.SKIN_COMPONENT_TEXT_WIDTH, 400 if isFHD else 300)
		self.textheight = sizes.get(MPanelList.SKIN_COMPONENT_TEXT_HEIGHT, 150 if isFHD else 100)
		self.textxoffset = sizes.get(MPanelList.SKIN_COMPONENT_TEXT_XOFFSET, 300 if isFHD else 200)
		self.textyoffset = sizes.get(MPanelList.SKIN_COMPONENT_TEXT_YOFFSET, 5)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setItemHeight(self.itemheight)
		self.l.setItemWidth(self.itemwidth)
		self.l.setBuildFunc(self.buildEntry)
		self.selection = selection
 def __init__(self, list, enableWrapAround=False):
     MenuList.__init__(self, list, enableWrapAround,
                       eListboxPythonMultiContent)
     self.l.setItemHeight(
         componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 30))
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
Exemple #7
0
	def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer = None):
		self.days = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun"))
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.type=type
		self.l = eListboxPythonMultiContent()

		tlf = TemplatedListFonts()
		self._font0 = gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG))
		self._font1 = gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL))
		self.l.setFont(0, self._font0)
		self.l.setFont(1, self._font1)
		self._textRenderer = None

		sizes = componentSizes[EPGList.SKIN_COMPONENT_KEY]
		self._iconWidth = sizes.get(EPGList.SKIN_COMPONENT_ICON_WIDTH, 21)
		self._iconHeight = sizes.get(EPGList.SKIN_COMPONENT_ICON_HEIGHT, 21)
		self._iconHPos = sizes.get(EPGList.SKIN_COMPONENT_ICON_HPOS, 4)
		self._itemMargin = sizes.get(EPGList.SKIN_COMPONENT_ITEM_MARGIN, 10)

		if type in (EPG_TYPE_SINGLE, EPG_TYPE_SIMILAR):
			self.l.setBuildFunc(self.buildSingleEntry)
		else:
			assert(type == EPG_TYPE_MULTI)
			self.l.setBuildFunc(self.buildMultiEntry)

		self.epgcache = eEPGCache.getInstance()
		self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png'))
		self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png'))
		self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png'))
		self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png'))
		self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png'))
Exemple #8
0
	def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer = None):
		self.days = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun"))
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.type=type
		self.l = eListboxPythonMultiContent()

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))

		if type == EPG_TYPE_SINGLE:
			self.l.setBuildFunc(self.buildSingleEntry)
		elif type == EPG_TYPE_MULTI:
			self.l.setBuildFunc(self.buildMultiEntry)
		else:
			assert(type == EPG_TYPE_SIMILAR)
			self.l.setBuildFunc(self.buildSimilarEntry)
		self.epgcache = eEPGCache.getInstance()
		self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png'))
		self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png'))
		self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png'))
		self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png'))
		self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png'))
Exemple #9
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self["Canvas"] = CanvasSource()

		self.basic_colors = [RGB(255, 255, 255), RGB(255, 255, 0), RGB(0, 255, 255), RGB(0, 255, 0), RGB(255, 0, 255), RGB(255, 0, 0), RGB(0, 0, 255), RGB(0, 0, 0)]
		tlf = TemplatedListFonts()
		self._textFont = gFont(tlf.face(tlf.BIGGER), tlf.size(tlf.BIGGER))

		self._headerSize = tlf.size(tlf.BIGGER) * 2
		self._headerFont = gFont(tlf.face(tlf.BIGGER), self._headerSize)
		self._headerSize = int(self._headerSize * 1.5)

		self["actions"] = ActionMap(["InputActions", "OkCancelActions"],
		{
			"1": self.testpic_brightness,
			"2": self.testpic_contrast,
#			"3": self.testpic_colors,
			"3": self.testpic_filter,
			"4": self.testpic_gamma,
			"5": self.testpic_fubk,
			"ok": self.callNext,
			"cancel": self.close,
		})

		self._size = None
		self.next = None
		self._clear()
		self.onLayoutFinish.append(self._onLayoutFinish)
Exemple #10
0
	def __init__(self, enableWrapAround = False):
		MenuList.__init__(self, [], enableWrapAround, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 23))
		self.currPlaying = -1
		self.oldCurrPlaying = -1
		self.serviceHandler = eServiceCenter.getInstance()
Exemple #11
0
	def __init__(self, list, selection = 0, enableWrapAround=False):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.CHOICELIST, 30)
		self.l.setItemHeight(itemHeight)
		self.selection = selection
Exemple #12
0
 def __init__(self, list, enableWrapAround=False):
     MenuList.__init__(self, list, enableWrapAround,
                       eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
     itemHeight = componentSizes.itemHeight(
         componentSizes.PARENTAL_CONTROL_LIST, 32)
     self.l.setItemHeight(itemHeight)
Exemple #13
0
	def postWidgetCreate(self, instance):
		instance.setWrapAround(True)
		self.selectionChanged_conn = instance.selectionChanged.connect(self.serviceChanged)
		instance.setContent(self.l)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.l.setSelectionClip(eRect(0,0,0,0), False)
Exemple #14
0
 def __init__(self):
     GUIComponent.__init__(self)
     sizes = componentSizes[componentSizes.TIMELINE_TEXT]
     height = sizes.get(componentSizes.ITEM_HEIGHT, 25)
     self.l = eListboxPythonMultiContent()
     self.l.setSelectionClip(eRect(0, 0, 0, 0))
     self.l.setItemHeight(height)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
Exemple #15
0
	def __init__(self):
		GUIComponent.__init__(self)
		sizes = componentSizes[componentSizes.TIMELINE_TEXT]
		height = sizes.get(componentSizes.ITEM_HEIGHT, 25)
		self.l = eListboxPythonMultiContent()
		self.l.setSelectionClip(eRect(0, 0, 0, 0))
		self.l.setItemHeight(height);
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
	def __init__(self, getFilesAndDirsCB, baseDir, matchingPattern):
		MenuList.__init__(self, list, False, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(25)
		self.l.setBuildFunc(self.buildListboxEntry)
		self.currentDirectory = baseDir
		self.getFilesAndDirsCB = getFilesAndDirsCB
		self.changeRegex(matchingPattern)
	def __init__(self, entries):
		MenuList.__init__(self, entries, False, content = eListboxPythonMultiContent)

		self.l.setFont(0, gFont("Regular", 22))
		self.l.setBuildFunc(self.buildListboxEntry)
		self.l.setItemHeight(30)
		self.colorDisabled = 12368828
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
	def __init__(self, entries):
		MenuList.__init__(self, entries, False, content = eListboxPythonMultiContent)

		self.l.setFont(0, gFont("Regular", 22))
		self.l.setBuildFunc(self.buildListboxEntry)
		self.l.setItemHeight(25)
		self.colorDisabled = 12368828
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
Exemple #19
0
 def __init__(self, list=None, enableWrapAround=False):
     MenuList.__init__(self,
                       list or [],
                       enableWrapAround,
                       content=eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
     itemHeight = componentSizes.itemHeight(componentSizes.SELECTION_LIST,
                                            30)
     self.l.setItemHeight(itemHeight)
Exemple #20
0
 def __init__(self, enableWrapAround=False):
     MenuList.__init__(self, [], enableWrapAround,
                       eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
     self.l.setItemHeight(
         componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 23))
     self.currPlaying = -1
     self.oldCurrPlaying = -1
     self.serviceHandler = eServiceCenter.getInstance()
Exemple #21
0
	def __init__(self, source):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.SERVICE_INFO_LIST, 30)
		self.l.setItemHeight(itemHeight)
		self.serviceHandler = eServiceCenter.getInstance()
Exemple #22
0
	def __init__(self, helplist, callback):
		GUIComponent.__init__(self)
		self.onSelChanged = [ ]
		self.l = eListboxPythonMultiContent()
		self.callback = callback
		self.extendedHelp = False

		l = [ ]
		sizes = componentSizes[componentSizes.HELP_MENU_LIST]
		textX = sizes.get("textX", 5)
		textY = sizes.get("textY", 35)
		textWidth = sizes.get("textWidth", 1000)
		textHeight = sizes.get("textHeight", 35)
		for (actionmap, context, actions) in helplist:
			if not actionmap.enabled:
				continue
			for (action, help) in actions:
				buttons = queryKeyBinding(context, action)

				# do not display entries which are not accessible from keys
				if not len(buttons):
					continue

				name = None
				flags = 0

				for n in buttons:
					(name, flags) = (getKeyDescription(n[0]), n[1])
					if name is not None:
						break

				if flags & 8: # for long keypresses, prepend l_ into the key name.
					name = (name[0], "long")
					
				entry = [ (actionmap, context, action, name ) ]

				if isinstance(help, list):
					self.extendedHelp = True
					print "extendedHelpEntry found"
					entry.extend((
						(eListboxPythonMultiContent.TYPE_TEXT, 0, 0, textWidth, textHeight, 0, RT_VALIGN_CENTER, help[0]),
						(eListboxPythonMultiContent.TYPE_TEXT, 0, textY, textWidth, textHeight, 1, RT_VALIGN_CENTER, help[1])
					))
				else:
					entry.append( (eListboxPythonMultiContent.TYPE_TEXT, textX, 0, textWidth, textHeight, 0, RT_VALIGN_CENTER, help) )
					
				l.append(entry)

		self.l.setList(l)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(sizes.get(componentSizes.ITEM_HEIGHT, 30))
Exemple #23
0
    def __init__(self, source):
        GUIComponent.__init__(self)
        self.l = eListboxPythonMultiContent()
        self.list = source
        self.l.setList(self.list)

        tlf = TemplatedListFonts()
        self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
        itemHeight = componentSizes.itemHeight(
            componentSizes.SERVICE_INFO_LIST, 30)
        self.l.setItemHeight(itemHeight)
        self.serviceHandler = eServiceCenter.getInstance()
Exemple #24
0
	def __init__(self, preselectedFiles, directory, showMountpoints = False, matchingPattern = None, showDirectories = True, showFiles = True,  useServiceRef = False, inhibitDirs = False, inhibitMounts = False, isTop = False, enableWrapAround = False, additionalExtensions = None):
		self.selectedFiles = preselectedFiles
		if self.selectedFiles is None:
			self.selectedFiles = []
		FileList.__init__(self, directory, showMountpoints = showMountpoints, matchingPattern = matchingPattern, showDirectories = showDirectories, showFiles = showFiles,  useServiceRef = useServiceRef, inhibitDirs = inhibitDirs, inhibitMounts = inhibitMounts, isTop = isTop, enableWrapAround = enableWrapAround, additionalExtensions = additionalExtensions)
		self.changeDir(directory)

		itemHeight = componentSizes.itemHeight(componentSizes.MULTI_FILE_SELECT_LIST, 25)
		self.l.setItemHeight(itemHeight)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.onSelectionChanged = [ ]
Exemple #25
0
	def __init__(self, preselectedFiles, directory, showMountpoints = False, matchingPattern = None, showDirectories = True, showFiles = True,  useServiceRef = False, inhibitDirs = False, inhibitMounts = False, isTop = False, enableWrapAround = False, additionalExtensions = None):
		self.selectedFiles = preselectedFiles
		if self.selectedFiles is None:
			self.selectedFiles = []
		FileList.__init__(self, directory, showMountpoints = showMountpoints, matchingPattern = matchingPattern, showDirectories = showDirectories, showFiles = showFiles,  useServiceRef = useServiceRef, inhibitDirs = inhibitDirs, inhibitMounts = inhibitMounts, isTop = isTop, enableWrapAround = enableWrapAround, additionalExtensions = additionalExtensions)
		self.changeDir(directory)

		itemHeight = componentSizes.itemHeight(componentSizes.MULTI_FILE_SELECT_LIST, 25)
		self.l.setItemHeight(itemHeight)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.onSelectionChanged = [ ]
Exemple #26
0
	def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer = None):
		EPGList.__init__(self, type, selChangedCB, timer)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.PTpicture = LoadPixmap(cached=True, path="/usr/lib/enigma2/python/Plugins/Extensions/MerlinEPG/primetime.png")
		self.evCnt = 0

		sizes = componentSizes[MerlinEPGList.SKIN_COMPONENT_KEY]
		self._textHeight = sizes.get(MerlinEPGList.SKIN_COMPONENT_TEXT_HEIGHT, 40)
		self._iconWidth = sizes.get(MerlinEPGList.SKIN_COMPONENT_ICON_WIDTH, 21)
		self._iconHeight = sizes.get(MerlinEPGList.SKIN_COMPONENT_ICON_HEIGHT, 21)
		self._itemMargin = sizes.get(MerlinEPGList.SKIN_COMPONENT_ITEM_MARGIN, 100)
Exemple #27
0
	def __init__(self, type=EPG_TYPE_MULTI, selChangedCB=None, timer = None, hasChannelInfo=True):
		EPGList.__init__(self, type, selChangedCB, timer)
		
		sizes = componentSizes[EasyInfoEventList.SKIN_COMPONENT_KEY]
		self.channelWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_CHANNEL_WIDTH, 120)
		self.timeWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_TIME_WIDTH, 70)
		self.timeIndicatorWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_TIME_FUTURE_INDICATOR_WIDTH, 10)
		self.eventNameWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_EVENTNAME_WIDTH, 460)
		self.eventNameYOffset = sizes.get(EasyInfoEventList.SKIN_COMPONENT_EVENTNAME_OFFSET, 1)
		self.timeYOffset = sizes.get(EasyInfoEventList.SKIN_COMPONENT_TIME_OFFSET, 3)
		self.itemHeight = sizes.get(EasyInfoEventList.SKIN_COMPONENT_ITEM_HEIGHT, 50)
		self.recOffset = sizes.get(EasyInfoEventList.SKIN_COMPONENT_REC_OFFSET, 25)
		self.channelOffset = sizes.get(EasyInfoEventList.SKIN_COMPONENT_CHANNEL_OFFSET, 120)
		self.progressBarWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_PROGRESSBAR_WIDTH, 40)
		self.progressBarHeight = sizes.get(EasyInfoEventList.SKIN_COMPONENT_PROGRESSBAR_HEIGHT, 8)
		self.remainingTimeWidth = sizes.get(EasyInfoEventList.SKIN_COMPONENT_REMAINING_TIME_WIDTH, 70)
		self.recIconSize = sizes.get(EasyInfoEventList.SKIN_COMPONENT_REC_ICON_SIZE, 16)
		self.piconWidth = 0
		self.piconHeight = 0

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.l.setFont(2, gFont(tlf.face(tlf.SMALLER), tlf.size(tlf.SMALLER)))
		
		self.l.setItemHeight(self.itemHeight)
		self.l.setBuildFunc(self.buildMultiEntry)
		
		self.hasChannelInfo = hasChannelInfo
		self.nameCache = { }
Exemple #28
0
	def __init__(self, type):
		MenuList.__init__(self, [], True, eListboxPythonMultiContent)
		MediaBrowserList.__init__(self, type)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		itemHeight = componentSizes.itemHeight(componentSizes.FILE_LIST, 30)
		self.l.setItemHeight(itemHeight)
		self.l.setBuildFunc(self._buildListEntry)

		self._browser = UPnPBrowser()
		self._browser.onMediaServerDetected.append(self._onMediaServerListChanged)
		self._browser.onMediaServerRemoved.append(self._onMediaServerListChanged)
		self._browser.onListReady.append(self._onListReady)
		self._browser.onBrowseError.append(self._onBrowseError)
    def __init__(self, list, enableWrapAround=True):
        MenuList.__init__(self, list, enableWrapAround,
                          eListboxPythonMultiContent)

        sizes = componentSizes[MerlinSkinThemesHelpList.SKIN_COMPONENT_KEY]
        self.componentItemHeight = sizes.get(
            MerlinSkinThemesHelpList.SKIN_COMPONENT_ITEM_HEIGHT, 40)
        self.keyWidth = sizes.get(
            MerlinSkinThemesHelpList.SKIN_COMPONENT_KEY_WIDTH, 250)
        self.descrWidth = sizes.get(
            MerlinSkinThemesHelpList.SKIN_COMPONENT_DESCR_WIDTH, 750)

        tlf = TemplatedListFonts()
        self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
        self.l.setItemHeight(self.componentItemHeight)
        self.l.setBuildFunc(self.buildEntry)
Exemple #30
0
	def __init__(self, tuplelist):
		entries = []
		for (obj, text) in tuplelist:
			entries.append(self.buildEntry(obj, text))
		MenuList.__init__(self, entries, enableWrapAround=False, content=eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.SELECTION_LIST, 30)
		self.l.setItemHeight(itemHeight)
		self.markedForeground = 0xffffff
		self.markedBackground = 0xff0000
		colors = TemplatedColors().colors
		if "ListboxMarkedForeground" in colors:
			self.markedForeground = colors["ListboxMarkedForeground"]
		if "ListboxMarkedBackground" in colors:
			self.markedBackground = colors["ListboxMarkedBackground"]
		self.entry_marked = False
	def __init__(self): 
		MenuList.__init__(self, [], enableWrapAround=True, content=eListboxPythonMultiContent) 

		self.listFont = None
		self.itemHeight = 30
		self.iconPosX = 8
		self.iconPosY = 8
		self.iconSize = 16
		self.colWidthStb = 300
		self.colWidthWeb = 250
		self.margin = 5
		
		self.l.setBuildFunc(self.buildListboxEntry) 
		
		global TemplatedListFonts
		if TemplatedListFonts is not None:
			tlf = TemplatedListFonts()
			self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		else:
			self.l.setFont(0, gFont('Regular', 20 ))
Exemple #32
0
	def __init__(self):
		MenuList.__init__(self, [], enableWrapAround=True, content=eListboxPythonMultiContent)

		self.listFont = None
		self.itemHeight = 30
		self.iconPosX = 8
		self.iconPosY = 8
		self.iconSize = 16
		self.colWidthStb = 300
		self.colWidthWeb = 250
		self.margin = 5

		self.l.setBuildFunc(self.buildListboxEntry)

		global TemplatedListFonts
		if TemplatedListFonts is not None:
			tlf = TemplatedListFonts()
			self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		else:
			self.l.setFont(0, gFont('Regular', 20))
Exemple #33
0
 def __init__(self, tuplelist):
     entries = []
     for (obj, text) in tuplelist:
         entries.append(self.buildEntry(obj, text))
     MenuList.__init__(self,
                       entries,
                       enableWrapAround=False,
                       content=eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
     itemHeight = componentSizes.itemHeight(componentSizes.SELECTION_LIST,
                                            30)
     self.l.setItemHeight(itemHeight)
     self.markedForeground = 0xffffff
     self.markedBackground = 0xff0000
     colors = TemplatedColors().colors
     if "ListboxMarkedForeground" in colors:
         self.markedForeground = colors["ListboxMarkedForeground"]
     if "ListboxMarkedBackground" in colors:
         self.markedBackground = colors["ListboxMarkedBackground"]
     self.entry_marked = False
Exemple #34
0
	def __init__(self, session):
		TwitchStreamGrid.__init__(self, session, windowTitle=_("Top Games"))
		self.skinName = "TwitchGameGrid"
		sizes = componentSizes[TwitchGamesGrid.SKIN_COMPONENT_KEY]
		self._itemWidth = sizes.get(ComponentSizes.ITEM_WIDTH, 185)
		self._itemHeight = sizes.get(ComponentSizes.ITEM_HEIGHT, 258)
		self._bannerHeight = sizes.get(TwitchGamesGrid.SKIN_COMPONENT_HEADER_HEIGHT, 30)
		self._footerHeight = sizes.get(TwitchGamesGrid.SKIN_COMPONENT_FOOTER_HEIGHT, 60)
		self._itemPadding = sizes.get(TwitchGamesGrid.SKIN_COMPONENT_ITEM_PADDING, 5)
		#one-off calculations
		pad = self._itemPadding * 2
		self._contentWidth = self._itemWidth - pad
		self._contentHeight = self._itemHeight - pad
		self._footerOffset = self._itemHeight - self._itemPadding - self._footerHeight

		self._items = []
		self._list = MenuList(self._items, mode=eListbox.layoutGrid, content=eListboxPythonMultiContent, itemWidth=self._itemWidth, itemHeight=self._itemHeight)
		self["list"] = self._list

		tlf = TemplatedListFonts()
		self._list.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self._list.l.setFont(1, gFont(tlf.face(tlf.SMALLER), tlf.size(tlf.SMALL)))
		self._list.l.setBuildFunc(self._buildFunc, True)

		self._picload.setPara((self._itemWidth, self._itemHeight, self._itemWidth, self._itemHeight, False, 0, '#000000'))
Exemple #35
0
    def __init__(self, rcUsed, boundKeys):
        GUIComponent.__init__(self)
        self.onSelectionChanged = []
        self.l = eListboxPythonMultiContent()
        self._rcUsed = rcUsed

        sizes = componentSizes[componentSizes.HELP_MENU_LIST]
        textX = sizes.get("textX", 5)
        textWidth = sizes.get("textWidth", 1000)
        textHeight = sizes.get("textHeight", 35)

        l = []
        for key in self.KEY_ORDER:
            if key not in boundKeys:
                continue
            try:
                keyID = keyDescriptions[self._rcUsed][KEYIDS[key]][0]
                description = self.KEY_NAMES.get(key, keyID)
                entry = [(keyID, key)]
                entry.append(
                    (eListboxPythonMultiContent.TYPE_TEXT, textX, 0, textWidth,
                     textHeight, 0, RT_VALIGN_CENTER, description))
                l.append(entry)
            except:
                Log.w("Key %s is unknown and skipped!" % (key, ))
        self.l.setList(l)

        tlf = TemplatedListFonts()
        self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
        self.l.setFont(1, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
        self.l.setItemHeight(sizes.get(componentSizes.ITEM_HEIGHT, 30))
Exemple #36
0
	def __init__(self, list, enableWrapAround = True):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		
		isFHD = False
		sz_w = getDesktop(0).size().width()
		if sz_w >= 1920:
			isFHD = True
			
		sizes = componentSizes[TagMenuList.SKIN_COMPONENT_KEY]
		self.componentItemHeight = sizes.get(TagMenuList.SKIN_COMPONENT_KEY_ITEM_HEIGHT, 40 if isFHD else 25)
		self.componentItemWidth = sizes.get(TagMenuList.SKIN_COMPONENT_KEY_ITEM_WIDTH, 490 if isFHD else 290)
		self.xOffset = sizes.get(TagMenuList.SKIN_COMPONENT_KEY_XOFFSET, 10 if isFHD else 5)
		self.xIndicatorWidth = sizes.get(TagMenuList.SKIN_COMPONENT_KEY_XINDICATOR_WIDTH, 40 if isFHD else 20)
		self.xIndicatorOffset = sizes.get(TagMenuList.SKIN_COMPONENT_KEY_XINDICATOR_OFFSET, 370 if isFHD else 230)
		try: self.usedTagColor = parseColor("usedTagColor").argb()
		except: self.usedTagColor = 0x00ffff00
		try: self.userTagColor = parseColor("userTagColor").argb()
		except: self.userTagColor = 0x00FF0000
		try: self.preTagColor = parseColor("preTagColor").argb()
		except: self.preTagColor = 0x0000FF00
		
		
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setFont(1, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setItemHeight(self.componentItemHeight)
		self.l.setBuildFunc(self.buildTagMenuListEntry)
Exemple #37
0
	def __init__(self):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildList)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 77))
Exemple #38
0
	def __init__(self, session, windowTitle=_("TwitchTV")):
		Screen.__init__(self, session, windowTitle=windowTitle)
		self.skinName = "TwitchStreamGrid"
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
		{
			"ok": self._onOk,
			"cancel": self.close,
			"red": self._onRed,
			"green": self._onGreen,
			"yellow" : self._onYellow,
			"blue": self._onBlue,
		}, -1)

		self["key_red"] = StaticText()
		self["key_green"] = StaticText()
		self["key_blue"] = StaticText()
		self["key_yellow"] = StaticText()
		self._setupButtons()

		sizes = componentSizes[TwitchStreamGrid.SKIN_COMPONENT_KEY]
		self._itemWidth = sizes.get(ComponentSizes.ITEM_WIDTH, 280)
		self._itemHeight = sizes.get(ComponentSizes.ITEM_HEIGHT, 162)
		self._bannerHeight = sizes.get(TwitchStreamGrid.SKIN_COMPONENT_HEADER_HEIGHT, 30)
		self._footerHeight = sizes.get(TwitchStreamGrid.SKIN_COMPONENT_FOOTER_HEIGHT, 60)
		self._itemPadding = sizes.get(TwitchStreamGrid.SKIN_COMPONENT_ITEM_PADDING, 5)
		#one-off calculations
		pad = self._itemPadding * 2
		self._contentWidth = self._itemWidth - pad
		self._contentHeight = self._itemHeight - pad
		self._footerOffset = self._itemHeight - self._itemPadding - self._footerHeight

		self._items = []
		self._list = MenuList(self._items, mode=eListbox.layoutGrid, content=eListboxPythonMultiContent, itemWidth=self._itemWidth, itemHeight=self._itemHeight)
		self["list"] = self._list

		tlf = TemplatedListFonts()
		self._list.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self._list.l.setFont(1, gFont(tlf.face(tlf.SMALLER), tlf.size(tlf.SMALL)))
		self._list.l.setBuildFunc(self._buildFunc, True)

		self.twitch = Twitch()
		self.twitchMiddleware = TwitchMiddleware.instance

		self._picload = ePicLoad()
		self._picload.setPara((self._itemWidth, self._itemHeight, self._itemWidth, self._itemHeight, False, 0, '#000000'))
		self._picload_conn = self._picload.PictureData.connect(self._onDefaultPixmapReady)

		agent = Agent(reactor, contextFactory=TLSSNIContextFactory(), pool=HTTPConnectionPool(reactor))
		self._agent = BrowserLikeRedirectAgent(agent)
		self._cachingDeferred = None

		self._loadDefaultPixmap()

		self._pixmapCache = {}
		self._currentEntry = 0
		self._endEntry = 0
		self.onLayoutFinish.append(self._onLayoutFinish)
		self.onClose.append(self.__onClose)
Exemple #39
0
    def __init__(self, helplist, callback):
        GUIComponent.__init__(self)
        self.onSelChanged = []
        self.l = eListboxPythonMultiContent()
        self.callback = callback
        self.extendedHelp = False

        l = []
        sizes = componentSizes[componentSizes.HELP_MENU_LIST]
        textX = sizes.get("textX", 5)
        textY = sizes.get("textY", 35)
        textWidth = sizes.get("textWidth", 1000)
        textHeight = sizes.get("textHeight", 35)
        for (actionmap, context, actions) in helplist:
            if not actionmap.enabled:
                continue
            for (action, help) in actions:
                buttons = queryKeyBinding(context, action)

                # do not display entries which are not accessible from keys
                if not len(buttons):
                    continue

                name = None
                flags = 0

                for n in buttons:
                    (name, flags) = (getKeyDescription(n[0]), n[1])
                    if name is not None:
                        break

                if flags & 8:  # for long keypresses, prepend l_ into the key name.
                    name = (name[0], "long")

                entry = [(actionmap, context, action, name)]

                if isinstance(help, list):
                    self.extendedHelp = True
                    print "extendedHelpEntry found"
                    entry.extend(
                        ((eListboxPythonMultiContent.TYPE_TEXT, 0, 0,
                          textWidth, textHeight, 0, RT_VALIGN_CENTER, help[0]),
                         (eListboxPythonMultiContent.TYPE_TEXT, 0, textY,
                          textWidth, textHeight, 1, RT_VALIGN_CENTER,
                          help[1])))
                else:
                    entry.append(
                        (eListboxPythonMultiContent.TYPE_TEXT, textX, 0,
                         textWidth, textHeight, 0, RT_VALIGN_CENTER, help))

                l.append(entry)

        self.l.setList(l)

        tlf = TemplatedListFonts()
        self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
        self.l.setFont(1, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
        self.l.setItemHeight(sizes.get(componentSizes.ITEM_HEIGHT, 30))
Exemple #40
0
 def postWidgetCreate(self, instance):
     instance.setWrapAround(True)
     self.selectionChanged_conn = instance.selectionChanged.connect(
         self.serviceChanged)
     instance.setContent(self.l)
     tlf = TemplatedListFonts()
     self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
     self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
     self.l.setSelectionClip(eRect(0, 0, 0, 0), False)
 def __init__(self, list, enableWrapAround=False):
     MenuList.__init__(self, list, enableWrapAround,
                       eListboxPythonMultiContent)
     tlf = TemplatedListFonts()
     self.l.setFont(
         0,
         gFont(tlf.face(tlf.KEYBOARD, default=tlf.face(tlf.BIG)),
               tlf.size(tlf.KEYBOARD, default=tlf.size(tlf.BIG))))
     self.l.setItemHeight(VirtualKeyBoardList.itemHeight())
Exemple #42
0
	def __init__(self, directory, showDirectories = True, showFiles = True, showMountpoints = True, matchingPattern = None, useServiceRef = False, inhibitDirs = False, inhibitMounts = False, isTop = False, enableWrapAround = False, additionalExtensions = None):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		self.additional_extensions = additionalExtensions
		self.mountpoints = []
		self.current_directory = None
		self.current_mountpoint = None
		self.useServiceRef = useServiceRef
		self.showDirectories = showDirectories
		self.showMountpoints = showMountpoints
		self.showFiles = showFiles
		self.isTop = isTop
		# example: matching .nfi and .ts files: "^.*\.(nfi|ts)"
		self.matchingPattern = matchingPattern
		self.inhibitDirs = inhibitDirs or []
		self.inhibitMounts = inhibitMounts or []

		self.refreshMountpoints()
		self.changeDir(directory)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		itemHeight = componentSizes.itemHeight(componentSizes.FILE_LIST, 25)
		self.l.setItemHeight(itemHeight)
		self.serviceHandler = eServiceCenter.getInstance()
Exemple #43
0
	def __init__(self, directory, showDirectories = True, showFiles = True, showMountpoints = True, matchingPattern = None, useServiceRef = False, inhibitDirs = False, inhibitMounts = False, isTop = False, enableWrapAround = False, additionalExtensions = None):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		self.additional_extensions = additionalExtensions
		self.mountpoints = []
		self.current_directory = None
		self.current_mountpoint = None
		self.useServiceRef = useServiceRef
		self.showDirectories = showDirectories
		self.showMountpoints = showMountpoints
		self.showFiles = showFiles
		self.isTop = isTop
		# example: matching .nfi and .ts files: "^.*\.(nfi|ts)"
		self.matchingPattern = matchingPattern
		self.inhibitDirs = inhibitDirs or []
		self.inhibitMounts = inhibitMounts or []

		self.refreshMountpoints()
		self.changeDir(directory)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		itemHeight = componentSizes.itemHeight(componentSizes.FILE_LIST, 25)
		self.l.setItemHeight(itemHeight)
		self.serviceHandler = eServiceCenter.getInstance()
Exemple #44
0
    def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer=None):
        self.days = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"),
                     _("Sat"), _("Sun"))
        self.timer = timer
        self.onSelChanged = []
        if selChangedCB is not None:
            self.onSelChanged.append(selChangedCB)
        GUIComponent.__init__(self)
        self.type = type
        self.l = eListboxPythonMultiContent()

        tlf = TemplatedListFonts()
        self._font0 = gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG))
        self._font1 = gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL))
        self.l.setFont(0, self._font0)
        self.l.setFont(1, self._font1)
        self._textRenderer = None

        sizes = componentSizes[EPGList.SKIN_COMPONENT_KEY]
        self._iconWidth = sizes.get(EPGList.SKIN_COMPONENT_ICON_WIDTH, 21)
        self._iconHeight = sizes.get(EPGList.SKIN_COMPONENT_ICON_HEIGHT, 21)
        self._iconHPos = sizes.get(EPGList.SKIN_COMPONENT_ICON_HPOS, 4)
        self._itemMargin = sizes.get(EPGList.SKIN_COMPONENT_ITEM_MARGIN, 10)

        if type in (EPG_TYPE_SINGLE, EPG_TYPE_SIMILAR):
            self.l.setBuildFunc(self.buildSingleEntry)
        else:
            assert (type == EPG_TYPE_MULTI)
            self.l.setBuildFunc(self.buildMultiEntry)

        self.epgcache = eEPGCache.getInstance()
        self.clock_pixmap = LoadPixmap(cached=True,
                                       path=resolveFilename(
                                           SCOPE_CURRENT_SKIN,
                                           'skin_default/icons/epgclock.png'))
        self.clock_add_pixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(SCOPE_CURRENT_SKIN,
                                 'skin_default/icons/epgclock_add.png'))
        self.clock_pre_pixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(SCOPE_CURRENT_SKIN,
                                 'skin_default/icons/epgclock_pre.png'))
        self.clock_post_pixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(SCOPE_CURRENT_SKIN,
                                 'skin_default/icons/epgclock_post.png'))
        self.clock_prepost_pixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(SCOPE_CURRENT_SKIN,
                                 'skin_default/icons/epgclock_prepost.png'))
Exemple #45
0
	def __init__(self, session, services, files):
		Screen.__init__(self, session)
		self.session = session
		self.services = services
		self.files = files
		
		self["menuList"] = MenuList([], content=eListboxPythonMultiContent)
		self["menuList"].l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 85))
		tlf = TemplatedListFonts()
		self["menuList"].l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self["menuList"].l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		
		self["actions"] = ActionMap(["OkCancelActions"],
			{
			 "ok": self._ok,
			 "cancel": self._exit,
			 }, -1)
		
		self.onLayoutFinish.append(self.buildMenu)
		self.onLayoutFinish.append(self.layoutFinished)
Exemple #46
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self["Canvas"] = CanvasSource()

        self.basic_colors = [
            RGB(255, 255, 255),
            RGB(255, 255, 0),
            RGB(0, 255, 255),
            RGB(0, 255, 0),
            RGB(255, 0, 255),
            RGB(255, 0, 0),
            RGB(0, 0, 255),
            RGB(0, 0, 0)
        ]
        tlf = TemplatedListFonts()
        self._textFont = gFont(tlf.face(tlf.BIGGER), tlf.size(tlf.BIGGER))

        self._headerSize = tlf.size(tlf.BIGGER) * 2
        self._headerFont = gFont(tlf.face(tlf.BIGGER), self._headerSize)
        self._headerSize = int(self._headerSize * 1.5)

        self["actions"] = ActionMap(
            ["InputActions", "OkCancelActions"],
            {
                "1": self.testpic_brightness,
                "2": self.testpic_contrast,
                #			"3": self.testpic_colors,
                "3": self.testpic_filter,
                "4": self.testpic_gamma,
                "5": self.testpic_fubk,
                "ok": self.callNext,
                "cancel": self.close,
            })

        self._size = None
        self.next = None
        self._clear()
        self.onLayoutFinish.append(self._onLayoutFinish)
Exemple #47
0
	def __init__(self, list, enableWrapAround=False):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		self.l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 50))
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
Exemple #48
0
	def __init__(self, type):
		MenuList.__init__(self, [], True, eListboxPythonMultiContent)
		MediaBrowserList.__init__(self, type)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		itemHeight = componentSizes.itemHeight(componentSizes.FILE_LIST, 30)
		self.l.setItemHeight(itemHeight)
		self.l.setBuildFunc(self._buildListEntry)

		self._db = eMediaDatabase.getInstance()
		self._rootHandle = RootNavigationHandle(self._navRoot)

		if type == MediaCore.TYPE_AUDIO:
			#Artist -> Album -> Titles
			self._artistHandle = NavigationHandle(self.__getArtists, [eMediaDatabase.FIELD_ARTIST])
			self._artistAlbumHandle = NavigationHandle(self.__getAlbumsByArtist, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_ALBUM])
			self._artistAllHandle = NavigationHandle(self.__filterByArtist, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_ALBUM, eMediaDatabase.FIELD_TITLE])
			self._artistAlbumTitleHandle = NavigationHandle(self.__filterByArtistAlbum, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_TITLE])

			self._artistHandle.link(desc=self._artistAlbumHandle, asc=self._rootHandle)
			self._artistAlbumHandle.link(desc=self._artistAlbumTitleHandle, asc=self._artistHandle, all=self._artistAllHandle)
			self._artistAllHandle.link(asc=self._artistAlbumHandle)
			self._artistAlbumTitleHandle.link(asc=self._artistAlbumHandle)

			#Album -> Titles
			self._albumHandle = NavigationHandle(self.__getAllAlbums, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_ALBUM])
			self._albumTitleHandle = NavigationHandle(self.__filterByArtistAlbum, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_TITLE])
			self._albumHandle.link(desc=self._albumTitleHandle, asc=self._rootHandle)
			self._albumTitleHandle.link(asc=self._albumHandle)

			#AlbumArtist -> Album -> Titles
			self._albumArtistHandle = NavigationHandle(self.__getAlbumArtists, [eMediaDatabase.FIELD_ARTIST])
			self._albumArtistAlbumHandle = NavigationHandle(self.__getAlbumsByAlbumArtist, [eMediaDatabase.FIELD_ALBUM_ARTIST, eMediaDatabase.FIELD_ALBUM])
			self._albumArtistAllHandle = NavigationHandle(self.__filterByAlbumArtist, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_ALBUM, eMediaDatabase.FIELD_TITLE])
			self._albumArtistAlbumTitleHandle = NavigationHandle(self.__filterByAlbumArtistAlbum, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_TITLE])

			self._albumArtistHandle.link(desc=self._albumArtistAlbumHandle, asc=self._rootHandle)
			self._albumArtistAlbumHandle.link(desc=self._albumArtistAlbumTitleHandle, asc=self._albumArtistHandle, all=self._albumArtistAllHandle)
			self._albumArtistAllHandle.link(asc=self._albumArtistAlbumHandle)
			self._albumArtistAlbumTitleHandle.link(asc=self._albumArtistAlbumHandle)

			#All
			self._allHandle = NavigationHandle(self.__getAll, [eMediaDatabase.FIELD_ARTIST, eMediaDatabase.FIELD_ALBUM, eMediaDatabase.FIELD_TITLE])
			self._allHandle.link(asc=self._rootHandle)

			#set navigation handle items
			self._navitems = [{
					ITEM_KEY_TITLE : _("Artists"),
					ITEM_KEY_HANDLE: self._artistHandle,
				},
				{
					ITEM_KEY_TITLE : _("Albums"),
					ITEM_KEY_HANDLE: self._albumHandle,
				},
				{
					ITEM_KEY_TITLE : _("Album Artists"),
					ITEM_KEY_HANDLE: self._albumArtistHandle,
				},
				{
					ITEM_KEY_TITLE : _("All"),
					ITEM_KEY_HANDLE: self._allHandle,
				}]
		elif type == MediaCore.TYPE_VIDEO:
			self._recordingHandle = NavigationHandle(self.__getAllRecordings, [eMediaDatabase.FIELD_TITLE])
			self._allVideoHandle = NavigationHandle(self.__getAllVideos, [eMediaDatabase.FIELD_TITLE])
			self._unseenVideoHandle = NavigationHandle(self.__getUnseenVideos, [eMediaDatabase.FIELD_TITLE])
			self._hdVideoHandle = NavigationHandle(self.__getHDVideos, [eMediaDatabase.FIELD_TITLE])
			self._sdVideoHandle = NavigationHandle(self.__getSDVideos, [eMediaDatabase.FIELD_TITLE])

			self._recordingHandle.link(asc=self._rootHandle)
			self._allVideoHandle.link(asc=self._rootHandle)
			self._unseenVideoHandle.link(asc=self._rootHandle)
			self._hdVideoHandle.link(asc=self._rootHandle)
			self._sdVideoHandle.link(asc=self._rootHandle)

			self._navitems = [{
					ITEM_KEY_TITLE : _("Unseen"),
					ITEM_KEY_HANDLE: self._unseenVideoHandle,
				},
				{
					ITEM_KEY_TITLE : _("Recordings"),
					ITEM_KEY_HANDLE: self._recordingHandle,
				},
				{
					ITEM_KEY_TITLE : _("All Videos"),
					ITEM_KEY_HANDLE: self._allVideoHandle,
				},
				{
					ITEM_KEY_TITLE : _("Only HD"),
					ITEM_KEY_HANDLE: self._hdVideoHandle,
				},
				{
					ITEM_KEY_TITLE : _("Only SD"),
					ITEM_KEY_HANDLE: self._sdVideoHandle,
				},]

		self.__currentNavHandle = self._rootHandle
		self.__prevNavHandle = None
		self._currentHandleItem = None
		self.__getFolderContent = None
Exemple #49
0
	def ListEntry(self, entry):
		desktopSize = getDesktop(0).size()
		if desktopSize.width() == 3840:
			sizefactor = 7
			zoomfactor = 2.7
		elif desktopSize.width() == 1920:
			sizefactor = 3
			zoomfactor = 1.3
		else:
			sizefactor = 1
			zoomfactor = 1

		listWidth = self['downloadList'].instance.size().width()
		itemHeight = self['downloadList'].l.getItemSize().height()
		textHeight = itemHeight/2
		self.ml.l.setItemHeight(itemHeight)
		if isDreamOS:
			sizes = componentSizes[MediaInfo.SKIN_COMPONENT_KEY]
			progressHeight = sizes.get(MediaInfo.SKIN_COMPONENT_PROGRESS_HEIGHT, 16*zoomfactor)
			progressHPos = (textHeight-progressHeight)/2
			progressWidth = sizes.get(MediaInfo.SKIN_COMPONENT_PROGRESS_WIDTH, 136*zoomfactor)
			statusWidth = sizes.get(MediaInfo.SKIN_COMPONENT_STATUS_WIDTH, 160*zoomfactor)
			mbinfoWidth = sizes.get(MediaInfo.SKIN_COMPONENT_MBINFO_WIDTH, 208*zoomfactor)
			dlinfoWidth = sizes.get(MediaInfo.SKIN_COMPONENT_DLINFO_WIDTH, 160*zoomfactor)
			progressinfoWidth = sizes.get(MediaInfo.SKIN_COMPONENT_PROGRESSINFO_WIDTH, 64*zoomfactor)
			spacerWidth = sizes.get(MediaInfo.SKIN_COMPONENT_SPACER_WIDTH, 8*zoomfactor)
			tlf = TemplatedListFonts()
			self.ml.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		else:
			progressHeight = 16*zoomfactor
			progressHPos = (textHeight-progressHeight)/2
			progressWidth = 136*zoomfactor
			statusWidth = 160*zoomfactor
			mbinfoWidth = 208*zoomfactor
			dlinfoWidth = 160*zoomfactor
			progressinfoWidth = 64*zoomfactor
			spacerWidth = 8*zoomfactor
			self.ml.l.setFont(0, gFont('Regular', textHeight - 2 * sizefactor))

		(filename, status, progress, dlspeed, currentSizeMB, totalMB) = entry
		if status == _("Download"):
			mbinfo = "%s MB/%s MB" % (str(currentSizeMB), str(totalMB))
			dlinfo = "%s" % dlspeed
			prog = int(progress)
			proginfo = str(progress)+"%"
		elif status == _("Completed"):
			mbinfo = ""
			dlinfo = ""
			prog = 100
			proginfo = "100%"
		else:
			mbinfo = ""
			dlinfo = ""
			prog = 0
			proginfo = "0%"

		return [entry,
		(eListboxPythonMultiContent.TYPE_TEXT, 0, 0, listWidth-progressWidth-progressinfoWidth-statusWidth-3*spacerWidth, itemHeight, 0, RT_HALIGN_LEFT | RT_WRAP, filename),
		(eListboxPythonMultiContent.TYPE_PROGRESS, listWidth-progressWidth-progressinfoWidth-statusWidth-2*spacerWidth, progressHPos, progressWidth, progressHeight, prog),
		(eListboxPythonMultiContent.TYPE_TEXT, listWidth-progressinfoWidth-statusWidth-spacerWidth, 0, progressinfoWidth, textHeight, 0, RT_HALIGN_RIGHT | RT_VALIGN_CENTER, proginfo),
		(eListboxPythonMultiContent.TYPE_TEXT, listWidth-statusWidth, 0, statusWidth, textHeight, 0, RT_HALIGN_CENTER | RT_VALIGN_CENTER, status),
		(eListboxPythonMultiContent.TYPE_TEXT, listWidth-progressWidth-progressinfoWidth-statusWidth-2*spacerWidth, textHeight, mbinfoWidth, textHeight, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, mbinfo),
		(eListboxPythonMultiContent.TYPE_TEXT, listWidth-dlinfoWidth, textHeight, dlinfoWidth, textHeight, 0, RT_HALIGN_CENTER | RT_VALIGN_CENTER, dlinfo),
		]
Exemple #50
0
	def __init__(self, list, enableWrapAround = True):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
Exemple #51
0
	def __init__(self, session, piclist, lastindex, path):

		self.textcolor = config.pic.textcolor.value
		self.color = config.pic.bgcolor.value

		tlf = TemplatedListFonts()
		self._labelFontSize = tlf.size(tlf.SMALLER)
		self._labelFontFace = tlf.face(tlf.SMALLER)

		sizes = componentSizes[Pic_Thumb.SKIN_COMPONENT_KEY]
		self._descSize = sizes.get(Pic_Thumb.SKIN_COMPONENT_DESCRIPTION_SIZE, 35)
		self._margin = sizes.get(Pic_Thumb.SKIN_COMPONENT_MARGIN, 10)
		self._spaceX = sizes.get(Pic_Thumb.SKIN_COMPONENT_SPACE_X, 55)
		self._spaceY = sizes.get(Pic_Thumb.SKIN_COMPONENT_SPACE_Y, 30)
		self._thumbX = sizes.get(Pic_Thumb.SKIN_COMPONENT_THUMP_X, 190)
		self._thumbY = sizes.get(Pic_Thumb.SKIN_COMPONENT_THUMP_Y, 200)

		size_w = getDesktop(0).size().width()
		size_h = getDesktop(0).size().height()
		self.thumbsX = size_w / (self._spaceX + self._thumbX) # thumbnails in X
		self.thumbsY = size_h / (self._spaceY + self._thumbY) # thumbnails in Y
		self.thumbsC = self.thumbsX * self.thumbsY # all thumbnails

		self.positionlist = []
		skincontent = ""

		posX = -1
		for x in range(self.thumbsC):
			posY = x / self.thumbsX
			posX += 1
			if posX >= self.thumbsX:
				posX = 0

			absX = self._spaceX + (posX * (self._spaceX + self._thumbX))
			absY = self._spaceY + (posY * (self._spaceY + self._thumbY))
			self.positionlist.append((absX, absY))
			absX += self._margin
			absY += self._margin
			skincontent += '<widget source="label%s" render="Label" position="%s,%s" size="%s,%s" font="%s;%s" valign="top" halign="center" zPosition="2" transparent="1" foregroundColor="%s"/>' % (x, absX, absY + self._thumbY - self._descSize, self._thumbX, self._descSize, self._labelFontFace, self._labelFontSize, self.textcolor)
			skincontent += '<widget name="thumb%s" position="%s,%s" size="%s,%s" zPosition="2" transparent="1" />' % (x, absX, absY, self._thumbX, self._thumbY - self._descSize - self._margin)

		# Screen, backgroundlabel and MovingPixmap
		doubleMargin = self._margin * 2
		self.skin = """<screen position="0,0" size="{0},{1}" flags="wfNoBorder" >
			<eLabel position="0,0" zPosition="0" size="{0},{1}" backgroundColor="{2}" /> \
			<widget name="frame" position="35,30" size="{3},{4}" pixmap="pic_frame.png" zPosition="1" alphatest="on" />{5}</screen>""".format(size_w, size_h, self.color, self._thumbX + doubleMargin, self._thumbY + doubleMargin, skincontent)

		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "MovieSelectionActions"],
		{
			"cancel": self.Exit,
			"ok": self.KeyOk,
			"left": self.key_left,
			"right": self.key_right,
			"up": self.key_up,
			"down": self.key_down,
			"showEventInfo": self.StartExif,
		}, -1)

		self["frame"] = MovingPixmap()
		for x in range(self.thumbsC):
			self["label"+str(x)] = StaticText()
			self["thumb"+str(x)] = Pixmap()

		self.Thumbnaillist = []
		self.filelist = []
		self.currPage = -1
		self.dirlistcount = 0
		self.path = path

		index = 0
		framePos = 0
		Page = 0
		for x in piclist:
			if x[0][1] == False:
				self.filelist.append((index, framePos, Page, x[0][0],  path + x[0][0]))
				index += 1
				framePos += 1
				if framePos > (self.thumbsC -1):
					framePos = 0
					Page += 1
			else:
				self.dirlistcount += 1

		self.maxentry = len(self.filelist)-1
		self.index = lastindex - self.dirlistcount
		if self.index < 0:
			self.index = 0

		self.picload = ePicLoad()
		self.picload_conn = self.picload.PictureData.connect(self.showPic)

		self.onLayoutFinish.append(self.setPicloadConf)

		self.ThumbTimer = eTimer()
		self.ThumbTimer_conn = self.ThumbTimer.timeout.connect(self.showPic)
Exemple #52
0
	def __init__(self, list, enableWrapAround=False):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setItemHeight(VirtualKeyBoardList.itemHeight())
Exemple #53
0
	def __init__(self, session = None):
		GUIComponent.__init__(self)

		self._componentSizes = componentSizes[componentSizes.SERVICE_LIST]
		Log.i(self._componentSizes)
		tlf = TemplatedListFonts()

		upper_service_name_limit = self.getDesktopWith() / 3
		config.usage.configselection_servicenamecolwidth.limits = [(100, upper_service_name_limit),]
		self.session = session
		self.mode = self.MODE_NORMAL

		self.picFolder = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/folder.png"))
		self.picMarker = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/marker.png"))
		self.picDVB_S = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_s-fs8.png"))
		self.picDVB_C = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_c-fs8.png"))
		self.picDVB_T = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_t-fs8.png"))
		self.picServiceGroup = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_service_group-fs8.png"))
		self.markedForeground = 0xffffff
		self.markedBackground = 0xff0000
		self.markedForegroundSelected = 0xffffff
		self.markedBackgroundSelected = 0x800000

		colors = TemplatedColors().colors
		if "ListboxMarkedForeground" in colors:
			self.markedForeground = colors["ListboxMarkedForeground"]
		if "ListboxMarkedBackground" in colors:
			self.markedBackground = colors["ListboxMarkedBackground"]
		if "ListboxMarkedAndSelectedForeground" in colors:
			self.markedForegroundSelected = colors["ListboxMarkedAndSelectedForeground"]
		if "ListboxMarkedAndSelectedBackground" in colors:
			self.markedBackgroundSelected = colors["ListboxMarkedAndSelectedBackground"]

		self.serviceNotAvail = 0xbbbbbb
		self.serviceEventProgressbarColor = None
		self.serviceEventProgressbarColorSelected = None
		self.serviceEventProgressbarBackColor = None
		self.serviceEventProgressbarBackColorSelected = None
		self.serviceEventProgressbarBorderColor = None
		self.serviceEventProgressbarBorderColorSelected = None
		self.serviceDescriptionColor = 0xe7b53f
		self.serviceDescriptionColorSelected = 0xe7b53f
		self.recordingColor = 0xff4A3C
		self.recordingColorSelected = 0xff4A3C
		self.additionalInfoColor =  None
		self.additionalInfoColorSelected =  None
		self.picServiceEventProgressbar = None
		self.selectionPixmapStandard = None
		self.selectionPixmapBig = None
		self.l = eListboxServiceContent()
		self.l.setBuildFunc(self.buildOptionEntry, True)
		self.l.setFont(0, gFont(tlf.face(TemplatedListFonts.SMALL), tlf.size(TemplatedListFonts.SMALL))) # AdditionalInfoFont
		self.l.setFont(1, gFont(tlf.face(TemplatedListFonts.MEDIUM), tlf.size(TemplatedListFonts.MEDIUM))) # ServiceNumberFont
		self.l.setFont(2, gFont(tlf.face(TemplatedListFonts.BIG), tlf.size(TemplatedListFonts.BIG))) # ServiceNameFont
		self.l.setFont(3, gFont(tlf.face(TemplatedListFonts.SMALL), tlf.size(TemplatedListFonts.SMALL))) # ServiceInfoFont
		self.serviceNameFont = gFont(tlf.face(TemplatedListFonts.BIG), tlf.size(TemplatedListFonts.BIG))
		self.serviceInfoFontHeight = tlf.size(TemplatedListFonts.SMALL)
		self.serviceInfoHeight = self.serviceInfoFontHeight + self._componentSizes.get(self.KEY_SERVICE_INFO_HEIGHT_ADD, 6)
		self.additionalInfoFont = gFont(tlf.face(TemplatedListFonts.SMALL), tlf.size(TemplatedListFonts.SMALL))
		self.list = []
		self.size = 0
		self.service_center = eServiceCenter.getInstance()
		self.numberoffset = 0
		self.is_playable_ignore = eServiceReference()
		self.root = None

		self.itemHeight = self._componentSizes.get(self.KEY_SERVICE_ITEM_HEIGHT, 28)
		self.itemHeightHigh = self._componentSizes.get(self.KEY_SERVICE_ITEM_HEIGHT_LARGE, 60)
		self.l.setItemHeight(self.itemHeight)
		self.onSelectionChanged = [ ]
		self.recordingList = {}
		self.piconLoader = PiconLoader()
		if self.session:
			self.session.nav.RecordTimer.on_state_change.append(self.onTimerEntryStateChange)
		config.usage.configselection_showrecordings.addNotifier(self.getRecordingList, initial_call = True)
		config.usage.configselection_bigpicons.addNotifier(self.setItemHeight, initial_call = True)
		config.usage.configselection_secondlineinfo.addNotifier(self.setItemHeight, initial_call = False)
		self._reloadTimer = eTimer()
		self.__reloadTimerConn = self._reloadTimer.timeout.connect(self._reload)
Exemple #54
0
	def __init__(self, list):
		MenuList.__init__(self, list, False, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
Exemple #55
0
	def __init__(self, list = None, enableWrapAround = False):
		MenuList.__init__(self, list or [], enableWrapAround, content = eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.SELECTION_LIST, 30)
		self.l.setItemHeight(itemHeight)