Exemplo n.º 1
0
	def __init__(self, source):
	    if getDesktop(0).size().width() == 1920:
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		self.l.setFont(0, gFont("Regular", 32))
		self.l.setItemHeight(36)
	    else:
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		self.l.setFont(0, gFont("Regular", 22))
		self.l.setItemHeight(24)
Exemplo n.º 2
0
	def __init__(self, eventList):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, gFont("Regular", 18))
		self.l.setBuildFunc(self.buildResultEntry)
		self.l.setItemHeight(150)
		self.onSelectionChanged = [ ]

		self.resultlist = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/resultlist.png'), desktop = getDesktop(0))
		self.favoritePixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/favorite.png'), desktop = getDesktop(0))
		self.clockPixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/epgclock.png'), desktop = getDesktop(0))
		self.clockOverlap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/clockOverlap.png'), desktop = getDesktop(0))
		self.clockNotrecord = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/clockNotrecord.png'), desktop = getDesktop(0))
		self.noConflictPixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/noConflict.png'), desktop = getDesktop(0))
		self.arrowRightPixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/right.png'), desktop = getDesktop(0))
		self.deletePixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/PrimeTimeManager/images/delete.png'), desktop = getDesktop(0))
		if AUTOTIMER and config.plugins.PrimeTimeManager.UseAutotimer.value:
			self.autotimerPixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, 'Extensions/AutoTimer/plugin.png'), desktop = getDesktop(0))

		self.l.setList(eventList)

		self.digitList = []
		i = 0
		while i <= 10:
			name = 'Extensions/PrimeTimeManager/images/digit_' + str(i) + '.png'
			digitPixmap = LoadPixmap(cached = True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, name), desktop = getDesktop(0))
			self.digitList.append(digitPixmap)
			i += 1
Exemplo n.º 3
0
	def __init__(self, root, sort_type=None, descr_state=None):
		GUIComponent.__init__(self)
		self.list = []
		self.descr_state = descr_state or self.HIDE_DESCRIPTION
		self.sort_type = sort_type or self.SORT_RECORDED
		self.firstFileEntry = 0
		self.parentDirectory = 0
		self.fontName = "Regular"
		self.fontSize = 20
		self.listHeight = None
		self.listWidth = None
		self.reloadDelayTimer = None
		self.l = eListboxPythonMultiContent()
		self.tags = set()
		self.root = None
		self._playInBackground = None
		self._char = ''

		if root is not None:
			self.reload(root)

		self.l.setBuildFunc(self.buildMovieListEntry)

		self.onSelectionChanged = [ ]
		self.iconPart = []
		for part in range(5):
			self.iconPart.append(LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_%d_4.png" % part)))
		self.iconMovieRec = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_new.png"))
		self.iconMoviePlay = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/movie_play.png"))
		self.iconMoviePlayRec = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/movie_play_rec.png"))
		self.iconUnwatched = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_unwatched.png"))
		self.iconFolder = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/folder.png"))
		self.iconTrash = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/trashcan.png"))
		self.runningTimers = {}
		self.updateRecordings()
Exemplo n.º 4
0
	def __init__(self, source):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		self.l.setFont(0, gFont("Regular", 23))
		self.l.setItemHeight(25)
Exemplo n.º 5
0
   def __init__(self):
       GUIComponent.__init__(self)
       self.l = eListboxPythonMultiContent()
       self.l.setFont(0, gFont("Regular", 24))
       self.l.setFont(1, gFont("Regular", 18))
 
       self.l.setBuildFunc(self.buildEntry)
       #self.l.setItemHeight(65)
       self.l.setItemHeight(35)
       self.onSelectionChanged = [ ]
       
       try:
           self.categoryPIX = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, self.ICON_CATEGORY))
           print("loaded")
           self.searchPIX = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, self.ICON_SEARCH))
           print("loaded")
           self.newthreadPIX = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, self.ICON_NEWTHREAD))
           print("loaded")
           self.oldthreadPIX = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, self.ICON_OLDTHREAD))
           print("loaded")
       except:
           self.categoryPIX = None
           self.searchPIX = None
           self.newthreadPIX = None
           self.oldthreadPIX = None
           print("Problem with loading markers for MyList")
Exemplo n.º 6
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()
		font, size = skin.parameters.get("EPGlistFont1", ('Regular',22))
		self.l.setFont(0, gFont(font, size))
		font, size = skin.parameters.get("EPGlistFont2", ('Regular',16))
		self.l.setFont(1, gFont(font, size))
		if type == EPG_TYPE_SINGLE:
			self.l.setBuildFunc(self.buildSingleEntry)
		elif type == EPG_TYPE_MULTI:
			self.l.setBuildFunc(self.buildMultiEntry)
		elif type == EPG_TYPE_EPGBAR:
			self.l.setBuildFunc(self.buildEPGBarEntry)
		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'))
		
		self.clock_pixmap_disabled = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_disabled.png'))
Exemplo n.º 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'))
Exemplo n.º 8
0
	def __init__(self, root, list_type=None, sort_type=None, descr_state=None):
		GUIComponent.__init__(self)
		self.list_type = list_type or self.LISTTYPE_MINIMAL
		self.descr_state = descr_state or self.HIDE_DESCRIPTION
		self.sort_type = sort_type or self.SORT_RECORDED
		self.firstFileEntry = 0
		self.fontName = "Regular"
		self.fontSizesOriginal = (22,18,16)
		self.fontSizesCompact = (20,14)
		self.fontSizesMinimal = (20,16)
		self.itemHeights = (75,37,25)
		self.reloadDelayTimer = None
		self.l = eListboxPythonMultiContent()
		self.tags = set()
		
		if root is not None:
			self.reload(root)
		
		self.l.setBuildFunc(self.buildMovieListEntry)
		
		self.onSelectionChanged = [ ]
		self.iconPart = []
		for part in range(5):
			self.iconPart.append(LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_%d_4.png" % part)))
		self.iconMovieRec = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_new.png"))
		self.iconUnwatched = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/part_unwatched.png"))
		self.iconFolder = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/folder.png"))
		self.iconTrash = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/trashcan.png"))
		self.runningTimers = {}
		self.updateRecordings()
Exemplo n.º 9
0
 def __init__(self, list):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setBuildFunc(self.buildTimerEntry)
     self.serviceNameFont = gFont("Regular", 20)
     self.font = gFont("Regular", 18)
     self.eventNameFont = gFont("Regular", 18)
     self.l.setList(list)
     self.posy = 0
     self.posy2 = 0
     self.itemHeight = 50
     self.rowSplit = 25
     self.iconMargin = 4
     self.satPosLeft = 160
     self.iconWait = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_wait.png"))
     # currently intended that all icons have the same size
     self.iconWidth = self.iconWait.size().width()
     self.iconHeight = self.iconWait.size().height()
     self.iconRecording = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_rec.png"))
     self.iconPrepared = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_prep.png"))
     self.iconDone = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_done.png"))
     self.iconRepeat = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_rep.png"))
     self.iconZapped = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_zap.png"))
     self.iconDisabled = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_off.png"))
     self.iconAutoTimer = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/timer_autotimer.png"))
Exemplo n.º 10
0
	def __init__(self, root, list_type=None, sort_type=None, show_times=None, sftitle_episode_separator = None, MovieSelectionSelf = None):
		GUIComponent.__init__(self)
#		print "[SF-Plugin] class SF:MovieList init, lstt=%x, srt=%x, sht=%s, sft=>%s<, root=%s" % ( list_type, sort_type, show_times, str(sftitle_episode_separator), str(root))
		self.list_type = list_type or self.LISTTYPE_MINIMAL
		self.show_times = show_times or self.SHOW_DURATION | self.SHOW_DIRECTORIES
		self.sort_type = sort_type or self.SORT_RECORDED
		self.sftitle_episode_separator = sftitle_episode_separator

		self.l = eListboxPythonMultiContent()

		self.tags = set()
		self.list = None
		self.sflists = None
		self.MovieSelectionSelf = MovieSelectionSelf
		self.MselTitle = ""

		if root is not None:
			self.reload(root)

		self.pdirIcon = LoadPixmap(cached=True, path=eEnv.resolve('${libdir}/enigma2/python/Plugins/Extensions/SerienFilm/icons/folder_20.png'))
		self.rdirIcon = LoadPixmap(cached=True, path=eEnv.resolve('${libdir}/enigma2/python/Plugins/Extensions/SerienFilm/icons/folder_red.png'))
		self.fupIcon = LoadPixmap(cached=True, path=eEnv.resolve('${libdir}/enigma2/python/Plugins/Extensions/SerienFilm/icons/folderup_20.png'))
		self.pdirMap = MultiContentEntryPixmapAlphaTest(pos=(0,0), size=(20,20), png=self.pdirIcon)
		self.rdirMap = MultiContentEntryPixmapAlphaTest(pos=(0,0), size=(20,20), png=self.rdirIcon)
		self.fupMap = MultiContentEntryPixmapAlphaTest(pos=(0,0), size=(20,20), png=self.fupIcon)

		self.redrawList()
		self.l.setBuildFunc(self.buildMovieListEntry)

		self.onSelectionChanged = [ ]
Exemplo n.º 11
0
 def __init__(self):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setBuildFunc(self.buildList)
     self.l.setFont(0, gFont("Regular", 22))
     self.l.setFont(1, gFont("Regular", 18))
     self.l.setItemHeight(75)
Exemplo n.º 12
0
	def changed(self, what):
		if not self.content:
			from enigma import eListboxPythonMultiContent
			self.content = eListboxPythonMultiContent()

			# also setup fonts (also given by source)
			index = 0
			for f in self.template["fonts"]:
				self.content.setFont(index, f)
				index += 1

		# if only template changed, don't reload list
		if what[0] == self.CHANGED_SPECIFIC and what[1] == "style":
			pass
		elif self.source:
			try:
				# make a simple list compatible for this converter
				tmp = []
				src = self.source.list
				for x in range(len(src)):
					if type(src[x]) != tuple and type(src[x]) != list:
						tmp.append((src[x],))
					else:
						tmp.append(src[x])
			except Exception as error:
				print '[TemplatedMultiContent] - %s' %error
				tmp = self.source.list
			self.content.setList(tmp)

		self.setTemplate()
		self.downstream_elements.changed(what)
Exemplo n.º 13
0
 def __init__(self):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setBuildFunc(self.buildMovieSelectionListEntry)
     self.l.setFont(0, gFont("Regular", 20))                             
     self.l.setItemHeight(30)
     self.onSelectionChanged = [ ]
Exemplo n.º 14
0
	def __init__(self, selChangedCB=None, timer = None, time_epoch = 120, overjump_empty=True):
		self.cur_event = None
		self.cur_service = None
		self.offs = 0
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildEntry)
		self.setOverjump_Empty(overjump_empty)
		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'))
		self.time_base = None
		self.time_epoch = time_epoch
		self.list = None
		self.event_rect = None

		self.foreColor = None
		self.foreColorSelected = None
		self.borderColor = None
		self.backColor = 0x586d88
		self.backColorSelected = 0x808080
		self.foreColorService = None
		self.backColorService = None
Exemplo n.º 15
0
    def __init__(self, selChangedCB=None, timer=None, time_epoch=120, overjump_empty=True):
        self.cur_event = None
        self.cur_service = None
        self.offs = 0
        self.timer = timer
        self.onSelChanged = []
        if selChangedCB is not None:
            self.onSelChanged.append(selChangedCB)
        GUIComponent.__init__(self)
        self.l = eListboxPythonMultiContent()
        self.l.setItemHeight(54)
        self.l.setBuildFunc(self.buildEntry)
        if overjump_empty:
            self.l.setSelectableFunc(self.isSelectable)
        self.epgcache = eEPGCache.getInstance()
        self.clock_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "750S/icons/epgclock.png"))
        self.clock_add_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "750S/icons/epgclock_add.png"))
        self.clock_pre_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "750S/icons/epgclock_pre.png"))
        self.clock_post_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "750S/icons/epgclock_post.png"))
        self.clock_prepost_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "750S/icons/epgclock_prepost.png"))
        self.time_base = None
        self.time_epoch = time_epoch
        self.list = None
        self.event_rect = None

        self.foreColor = None
        self.foreColorSelected = None
        self.borderColor = None
        self.backColor = 0x586D88
        self.backColorSelected = 0x808080
        self.foreColorService = None
        self.backColorService = None
Exemplo n.º 16
0
	def __init__(self, selChangedCB = None, timer = None, time_epoch = 120, overjump_empty = True):
		GUIComponent.__init__(self)
		self.cur_event = None
		self.cur_service = None
		self.offs = 0
		self.timer = timer
		self.last_time = time()
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildEntry)
		self.setOverjump_Empty(overjump_empty)
		self.epgcache = eEPGCache.getInstance()
		self.clocks =  [ LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png')),
				 LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png')),
				 LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png')),
				 LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png')),
				 LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png')) ]
		self.time_base = None
		self.time_epoch = time_epoch
		self.list = None
		self.select_rect = None
		self.event_rect = None
		self.service_rect = None
		self.picon_size = None
		self.currentlyPlaying = None
		self.showPicon = False
		self.showServiceTitle = True
		self.picload = ePicLoad()
		self.nowEvPix = None
		self.othEvPix = None
		self.selEvPix = None
		self.recEvPix = None
		self.curSerPix = None

		self.foreColor = 0xffffff
		self.foreColorSelected = 0xffc000
		self.borderColor = 0x464445
		self.backColor = 0x595959
		self.backColorSelected = 0x808080
		self.foreColorService = 0xffffff
		self.foreColorServiceSelected = 0xffffff
		self.backColorService = 0x000000
		self.backColorServiceSelected = 0x508050
		self.borderColorService = 0x000000
		self.foreColorNow = 0xffffff
		self.backColorNow = 0x505080
		self.foreColorRec = 0xffffff
		self.backColorRec = 0x805050
		self.serviceFont = gFont("Regular", 20)
		self.entryFontName = "Regular"
		self.entryFontSize = 18

		self.listHeight = None
		self.listWidth = None
		self.serviceBorderWidth = 1
		self.serviceNamePadding = 0
		self.eventBorderWidth = 1
		self.eventNamePadding = 0
Exemplo n.º 17
0
	def __init__(self, list, videoMode, piconLoader, piconSize, listStyle):
		self.videoMode = videoMode
		self.piconLoader = piconLoader
		self.piconSize = piconSize
		self.baseHeight = self.piconSize.height()
		self.listStyle = listStyle
		
		GUIComponent.__init__(self)
		
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildTimerEntry)
		self.onSelectionChanged = [ ]
		
		if self.videoMode == MODE_SD or self.videoMode == MODE_XD:
			self.overallFontHeight = 36
		elif self.videoMode == MODE_HD:
			self.overallFontHeight = 44
		elif self.videoMode == MODE_FHD:
			self.overallFontHeight = 66
			
		self.l.setList(list)
		config.plugins.merlinEpgCenter.listItemHeight.addNotifier(self.changeHeight, initial_call = True)
		config.plugins.merlinEpgCenter.adjustFontSize.addNotifier(self.setFontSizes, initial_call = True)
		
		self.autoTimerPixmap = LoadPixmap(cached=False, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/AutoTimerSmall.png"))
Exemplo n.º 18
0
	def __init__(self, entries):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, gFont("Regular", 22))
		self.l.setFont(1, gFont("Regular", 18))
		self.list = [self.buildListboxEntry(x) for x in entries]
		self.l.setList(self.list)
	def __init__(self, enableWrapAround = True):
		GUIComponent.__init__(self)

		self.screenwidth = getDesktop(0).size().width()
		if self.screenwidth and self.screenwidth == 1920:
			self.posFont = parseFont("Regular;30", ((1,1),(1,1)))
			self.nameFont = parseFont("Regular;30", ((1,1),(1,1)))
			self.itemHeight = 40
		else:
			self.posFont = parseFont("Regular;20", ((1,1),(1,1)))
			self.nameFont = parseFont("Regular;20", ((1,1),(1,1)))
			self.itemHeight = 30

		self.posColor = 0xFFFFFF
		self.posColorSel = 0xFFFFFF
		self.nameColor = 0xFFFFFF
		self.nameColorSel = 0xFFFFFF

		self.posWidth = -1
		self.nameWidth = -1

		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, self.posFont)
		self.l.setFont(1, self.nameFont)

		self.onSelectionChanged = []
Exemplo n.º 20
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()
		self.l.setFont(0, gFont("Regular", 22))
		self.l.setFont(1, gFont("Regular", 16))
		self.dy = 0
		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.clocks = [ LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zapclock_add.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zapclock_pre.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zapclock.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zapclock_prepost.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zapclock_post.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zaprecclock_add.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zaprecclock_pre.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zaprecclock.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zaprecclock_prepost.png')),
				LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/zaprecclock_post.png')) ]
Exemplo n.º 21
0
	def __init__(self, entries):
		GUIComponent.__init__(self)

		self.list = entries
		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, gFont("Regular", 22))
		self.l.setBuildFunc(self.buildListboxEntry)
		self.l.setList(self.list)
Exemplo n.º 22
0
	def __init__(self, source):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
                self.fontName, self.fontSize = skin.parameters.get("ServiceInfoFont", ('Regular', 23))
                self.l.setFont(0, gFont(self.fontName, self.fontSize))
		self.ItemHeight = 25
Exemplo n.º 23
0
	def __init__(self, list):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildTimerEntry)
		self.l.setFont(0, gFont("Regular", 20))
		self.l.setFont(1, gFont("Regular", 18))
		self.l.setItemHeight(70)
		self.l.setList(list)
Exemplo n.º 24
0
	def __init__(self, source):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		self.fontName = "Regular"
		self.fontSize = 23
		self.ItemHeight = 25
Exemplo n.º 25
0
 def __init__(self, source):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.list = source
     self.l.setList(self.list)
     font = skin.fonts.get("ServiceInfo", ("Regular", 23, 25))
     self.l.setFont(0, gFont(font[0], font[1]))
     self.l.setItemHeight(font[2])
Exemplo n.º 26
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))
Exemplo n.º 27
0
	def __init__(self, mode):
		GUIComponent.__init__(self)
		self.mode = mode
		self.l = eListboxPythonMultiContent()
#		self.l.setFont(0, gFont('Regular', 22))
		font, size = skin.parameters.get("TMDbListFont", ('Regular', 23))
		self.l.setFont(0, gFont(font, size))
		self.l.setItemHeight(30)
		self.l.setBuildFunc(self.buildList)
Exemplo n.º 28
0
	def __init__(self):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, gFont("Regular", 20))
		self.l.setFont(1, gFont("Regular", 18))
		self.l.setBuildFunc(self.buildEntry)
		self.l.setItemHeight(22)
		self.onSelectionChanged = [ ]
		self.mode = 0
Exemplo n.º 29
0
 def __init__(self, ip_address):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()        
     self.l.setFont(0, gFont("Regular", 22))
     self.l.setFont(1, gFont("Regular", 18))
     self.l.setItemHeight(100)
     self.l.setBuildFunc(self.buildMovieListEntry)
     self.onSelectionChanged = [ ]
     self.staticIP = ip_address
Exemplo n.º 30
0
	def __init__(self, helplist, callback):
		GUIComponent.__init__(self)
		self.onSelChanged = [ ]
		self.l = eListboxPythonMultiContent()
		self.callback = callback
		self.extendedHelp = False

		l = [ ]
		for (actionmap, context, actions) in helplist:
			for (action, help) in actions:
				if hasattr(help, '__call__'):
					help = help()
				if not help:
					continue
				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

				# only show entries with keys that are available on the used rc
				if name is None:
					continue

				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, 600, 26, 0, 0, help[0]),
						(eListboxPythonMultiContent.TYPE_TEXT, 0, 28, 600, 20, 1, 0, help[1])
					))
				else:
					entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 600, 28, 0, 0, help) )

				l.append(entry)

		self.l.setList(l)
		if self.extendedHelp is True:
			self.l.setFont(0, gFont("Regular", 24))
			self.l.setFont(1, gFont("Regular", 18))
			self.l.setItemHeight(50)
		else:
			self.l.setFont(0, gFont("Regular", 24))
			self.l.setItemHeight(38)
Exemplo n.º 31
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()
        self.eventItemFont = gFont("Regular", 22)
        self.eventTimeFont = gFont("Regular", 16)
        self.iconSize = 21
        self.iconDistance = 2
        self.colGap = 10
        self.skinColumns = False
        self.tw = 120
        self.dy = 0

        if type is EPG_TYPE_SINGLE:
            self.l.setBuildFunc(self.buildSingleEntry)
        elif type is EPG_TYPE_MULTI:
            self.l.setBuildFunc(self.buildMultiEntry)
        else:
            assert (type is EPG_TYPE_SIMILAR)
            self.l.setBuildFunc(self.buildSimilarEntry)
        self.epgcache = eEPGCache.getInstance()
        self.clocks = [
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/epgclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/epgclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/epgclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/epgclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/epgclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zapclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zapclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zapclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zapclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zapclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zaprecclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zaprecclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zaprecclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zaprecclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/zaprecclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repepgclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repepgclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repepgclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repepgclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repepgclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzapclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzapclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzapclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzapclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzapclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzaprecclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzaprecclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzaprecclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(
                           SCOPE_CURRENT_SKIN,
                           'icons/repzaprecclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/repzaprecclock_post.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/pipclock_add.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/pipclock_pre.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/pipclock.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/pipclock_prepost.png')),
            LoadPixmap(cached=True,
                       path=resolveFilename(SCOPE_CURRENT_SKIN,
                                            'icons/pipclock_post.png'))
        ]
Exemplo n.º 32
0
 def __init__(self, list):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setBuildFunc(self.buildTimerEntry)
     self.screenwidth = getDesktop(0).size().width()
     if self.screenwidth and self.screenwidth == 1920:
         self.serviceNameFont = gFont("Regular", 28)
         self.font = gFont("Regular", 24)
         self.eventNameFont = gFont("Regular", 28)
         self.l.setList(list)
         self.itemHeight = 70
         self.rowSplit = 40
         self.iconMargin = 20
         self.satPosLeft = 160
         self.iconWait = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_wait.png"))
         #currently intended that all icons have the same size
         self.iconWidth = self.iconWait.size().width()
         self.iconHeight = self.iconWait.size().height()
         self.iconRecording = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_rec.png"))
         self.iconPrepared = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_prep.png"))
         self.iconDone = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_done.png"))
         self.iconRepeat = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_rep.png"))
         self.iconZapped = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_zap.png"))
         self.iconDisabled = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_off.png"))
         self.iconFailed = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_failed.png"))
         self.iconAutoTimer = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN,
                             "icons/timer_autotimer.png"))
     else:
         self.serviceNameFont = gFont("Regular", 20)
         self.font = gFont("Regular", 18)
         self.eventNameFont = gFont("Regular", 18)
         self.l.setList(list)
         self.itemHeight = 50
         self.rowSplit = 25
         self.iconMargin = 4
         self.satPosLeft = 160
         self.iconWait = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_wait.png"))
         #currently intended that all icons have the same size
         self.iconWidth = self.iconWait.size().width()
         self.iconHeight = self.iconWait.size().height()
         self.iconRecording = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_rec.png"))
         self.iconPrepared = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_prep.png"))
         self.iconDone = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_done.png"))
         self.iconRepeat = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_rep.png"))
         self.iconZapped = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_zap.png"))
         self.iconDisabled = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_off.png"))
         self.iconFailed = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN, "icons/timer_failed.png"))
         self.iconAutoTimer = LoadPixmap(
             resolveFilename(SCOPE_ACTIVE_SKIN,
                             "icons/timer_autotimer.png"))
Exemplo n.º 33
0
    def __init__(self, root, sort_type=None, descr_state=None):
        GUIComponent.__init__(self)
        self.list = []
        self.descr_state = descr_state or self.HIDE_DESCRIPTION
        self.sort_type = sort_type or self.SORT_GROUPWISE
        self.firstFileEntry = 0
        self.parentDirectory = 0
        self.fontName = "Regular"
        self.fontSize = 20
        self.listHeight = None
        self.listWidth = None
        self.pbarShift = 5
        self.pbarHeight = 16
        self.pbarLargeWidth = 48
        self.pbarColour = 0x206333
        self.pbarColourSeen = 0xffc71d
        self.pbarColourRec = 0xff001d
        self.partIconeShift = 5
        self.spaceRight = 2
        self.spaceIconeText = 2
        self.iconsWidth = 22
        self.durationWidth = 160
        self.dateWidth = 160
        if config.usage.time.wide.value:
            self.dateWidth = int(self.dateWidth * 1.15)
        self.reloadDelayTimer = None
        self.l = eListboxPythonMultiContent()
        self.tags = set()
        self.root = None
        self._playInBackground = None
        self._playInForeground = None
        self._char = ''

        if root is not None:
            self.reload(root)

        self.l.setBuildFunc(self.buildMovieListEntry)

        self.onSelectionChanged = []
        self.iconPart = []
        for part in range(5):
            self.iconPart.append(
                LoadPixmap(
                    resolveFilename(SCOPE_CURRENT_SKIN,
                                    "icons/part_%d_4.png" % part)))
        self.iconMovieRec = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/part_new.png"))
        self.iconMoviePlay = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/movie_play.png"))
        self.iconMoviePlayRec = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/movie_play_rec.png"))
        self.iconUnwatched = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/part_unwatched.png"))
        self.iconFolder = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/folder.png"))
        self.iconTrash = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/trashcan.png"))
        self.iconCutting = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN, "icons/cutting.png"))
        self.runningTimers = {}
        self.updateRecordings()
Exemplo n.º 34
0
	def __init__(self, blinkTimer, listType, videoMode, piconLoader, bouquetList, currentIndex, piconSize, listStyle, epgList):
		self.blinkTimer = blinkTimer
		self.listType = listType
		self.videoMode = videoMode
		self.piconLoader = piconLoader
		self.piconSize = piconSize
		self.baseHeight = self.piconSize.height()
		self.listStyle = listStyle
		self.epgList = epgList
		
		GUIComponent.__init__(self)
		
		from Screens.InfoBar import InfoBar
		EpgCenterList.infoBarInstance = InfoBar.instance
		EpgCenterList.eServiceCenterInstance = eServiceCenter.getInstance()
		
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildEpgEntry)
		self.onSelectionChanged = [ ]
		
		if self.videoMode == MODE_SD or self.videoMode == MODE_XD:
			self.overallFontHeight = 36
		elif self.videoMode == MODE_HD:
			self.overallFontHeight = 44
			
		#initialize
		self.list = []
		self.mode = None
		self.similarShown = False
		
		config.plugins.merlinEpgCenter.listItemHeight.addNotifier(self.changeHeight, initial_call = True)
		config.plugins.merlinEpgCenter.adjustFontSize.addNotifier(self.setFontSizes, initial_call = True)
		
		if listType == LIST_TYPE_EPG:
			EpgCenterList.bouquetList = bouquetList
			EpgCenterList.currentBouquetIndex = currentIndex
			EpgCenterList.updateBouquetServices()
			EpgCenterList.recordTimer = NavigationInstance.instance.RecordTimer
			
		# zap timer pixmaps
		self.zap_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap.png"))
		self.zap_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap_pre.png"))
		self.zap_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap_post.png"))
		self.zap_event_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap_event.png"))
		self.zap_repeated_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap_repeated.png"))
		self.zap_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/zap_add.png"))
		
		# record timer pixmaps
		self.timer_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer.png"))
		self.timer_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer_pre.png"))
		self.timer_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer_post.png"))
		self.timer_event_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer_event.png"))
		self.timer_repeated_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer_repeated.png"))
		self.timer_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/timer_add.png"))
		
		# progress pixmaps
		self.progressPixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress.png"))
		self.progressPixmap_0 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress_0.png"))
		self.progressPixmap_1 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress_1.png"))
		self.progressPixmap_2 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress_2.png"))
		self.progressPixmap_3 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress_3.png"))
		self.progressPixmap_4 = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "Extensions/MerlinEPGCenter/images/Progress_4.png"))
		self.progressPixmapWidth = self.progressPixmap.size().width()
		
		self.epgcache = eEPGCache.getInstance()
		
		self.blinkTimer.callbacks.append(self.invalidateList)
Exemplo n.º 35
0
	def __init__(self):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setFont(0, gFont('Regular', 22))
		self.l.setItemHeight(30)
		self.l.setBuildFunc(self.buildList)
Exemplo n.º 36
0
 def __init__(self):
     printDBG("IPTVListComponent.__init__ ----------------------------------------------------")
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setBuildFunc(self.buildEntry)
     self.onSelectionChanged = []
Exemplo n.º 37
0
	def __init__(self, root, sort_type=None, descr_state=None):
		GUIComponent.__init__(self)
		self.list = []
		self.descr_state = descr_state or self.HIDE_DESCRIPTION
		self.sort_type = sort_type or self.SORT_GROUPWISE
		self.firstFileEntry = 0
		self.parentDirectory = 0
		self.numUserDirs = 0  # does not include parent or Trashcan
		self.numUserFiles = 0
		self.fontName, self.fontSize, height, width = skin.fonts.get("MovieSelectionFont", ("Regular", 20, 25, 18))
		self.listHeight = None
		self.listWidth = None
		# pbarShift, trashShift, dirShift, markShift, dateWidth, lenWidth
		# and sizeWidth are properties that return their
		# calculated size if set to None
		self.pbarShift = None  # Defaults to being calculated from bar height
		self.pbarHeight = 16
		self.pbarLargeWidth = 48
		self.pbarColour = 0x206333
		self.pbarColourSeen = 0xffc71d
		self.pbarColourRec = 0xff001d
		self.pbarColourSel = 0x20a333
		self.pbarColourSeenSel = 0xffc71d
		self.pbarColourRecSel = 0xff001d
		# Unlike pbarShift and trashShift, etc below,
		# partIconeShift is an ordinary attribute, because
		# its "None" value is calculated per row in the list
		self.partIconeShift = None  # Defaults to being calculated from icon height
		self.spaceRight = 2
		self.spaceIconeText = 2
		self.listPos = 50
		self.markWidth = 16
		self.iconsWidth = 22

		self.trashShift = None  # Defaults to being calculated from trash icon height
		self.dirShift = None  # Defaults to being calculated from directory icon height
		self.markShift = None  # Defaults to being calculated from selected icon height
		self.dateWidth = None  # Defaults to being calculated from font size
		self.dateWidthScale = 9.0  # Over-ridden by self.dateWidth if set
		self.lenWidth = None  # Defaults to being calculated from font size
		self.lenWidthScale = 4.0  # Over-ridden by self.lenWidth if set
		self.sizeWidth = None  # Defaults to being calculated from font size
		self.sizeWidthScale = 5.0  # Over-ridden by self.sizeWidth if set
		self.reloadDelayTimer = None
		self.l = eListboxPythonMultiContent()
		self.tags = set()
		self.root = None
		self._playInBackground = None
		self._playInForeground = None
		self._char = ''

		self.markList = []

		if root is not None:
			self.reload(root)

		self.l.setBuildFunc(self.buildMovieListEntry)

		self.onSelectionChanged = []
		self.iconPart = []
		for part in range(5):
			self.iconPart.append(LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/part_%d_4.png" % part)))
		self.iconMovieRec = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/part_new.png"))
		self.iconMoviePlay = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/movie_play.png"))
		self.iconMoviePlayRec = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/movie_play_rec.png"))
		self.iconUnwatched = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/part_unwatched.png"))
		self.iconFolder = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/folder.png"))
		self.iconTrash = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/trashcan.png"))
		self.runningTimers = {}
		self.updateRecordings()
		self.updatePlayPosCache()

		self.iconMarked = [LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/mark_off.png")),
						   LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/mark_on.png"))]
    def __init__(self,
                 selChangedCB=None,
                 timer=None,
                 time_epoch=120,
                 overjump_empty=True):
        GUIComponent.__init__(self)
        self.cur_event = None
        self.cur_service = None
        self.offs = 0
        self.timer = timer
        self.onSelChanged = []
        if selChangedCB is not None:
            self.onSelChanged.append(selChangedCB)
        self.l = eListboxPythonMultiContent()
        self.l.setBuildFunc(self.buildEntry)
        self.setOverjump_Empty(overjump_empty)
        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'))
        self.time_base = None
        self.time_epoch = time_epoch
        self.list = None
        self.event_rect = None
        self.service_rect = None
        self.currentlyPlaying = None
        self.showPicon = False
        self.showServiceTitle = True
        self.piconSize = None
        self.picload = ePicLoad()

        self.foreColor = 0xffffff
        self.foreColorSelected = 0xffc000
        self.borderColor = 0x464445
        self.backColor = 0x595959
        self.backColorSelected = 0x808080
        self.foreColorService = 0xffffff
        self.foreColorServiceSelected = 0x000000
        self.backColorService = 0x000000
        self.backColorServiceSelected = 0xffffff
        self.borderColorService = 0x000000
        self.foreColorNow = 0xffc000
        self.backColorNow = 0x508050
        self.serviceFont = gFont("Regular", 20)
        self.entryFontName = "Regular"
        self.entryFontSize = 18

        self.listHeight = None
        self.listWidth = None
        self.serviceBorderWidth = 1
        self.serviceNamePadding = 0
        self.eventBorderWidth = 1
        self.eventNamePadding = 0
Exemplo n.º 39
0
	def __init__(self, type = EPG_TYPE_SINGLE, selChangedCB = None, timer = None, time_epoch = 120, overjump_empty = False):
		self.cur_event = None
		self.cur_service = None
		self.offs = 0
		self.time_base = None
		self.time_epoch = time_epoch
		self.select_rect = None
		self.event_rect = None
		self.service_rect = None
		self.currentlyPlaying = None
		self.showPicon = False
		self.showServiceTitle = True
		self.picload = ePicLoad()

		self.overjump_empty = overjump_empty
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.type = type
		self.l = eListboxPythonMultiContent()

		if type == EPG_TYPE_SINGLE or type == EPG_TYPE_ENHANCED or type == EPG_TYPE_INFOBAR:
			self.l.setBuildFunc(self.buildSingleEntry)
		elif type == EPG_TYPE_MULTI:
			self.l.setBuildFunc(self.buildMultiEntry)
		elif type == EPG_TYPE_GRAPH:
			self.l.setBuildFunc(self.buildGraphEntry)
		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'))

		self.nowEvPix = None
		self.nowSelEvPix = None
		self.othEvPix = None
		self.selEvPix = None
		self.nowServPix = None
		self.recEvPix = None
		self.recSelEvPix = None
		self.zapEvPix = None
		self.zapSelEvPix = None

		self.borderColor = 0xC0C0C0
		self.borderColorService = 0xC0C0C0

		self.foreColor = 0xffffff
		self.foreColorSelected = 0xffffff
		self.backColor = 0x2D455E
		self.backColorSelected = 0xd69600
		self.foreColorService = 0xffffff
		self.backColorService = 0x2D455E
		self.foreColorNow = 0xffffff
		self.foreColorNowSelected = 0xffffff
		self.backColorNow = 0x00825F
		self.backColorNowSelected = 0xd69600
		self.foreColorServiceNow = 0xffffff
		self.backColorServiceNow = 0x00825F

		self.foreColorRecord = 0xffffff
		self.backColorRecord = 0xd13333
		self.foreColorRecordSelected = 0xffffff
		self.backColorRecordSelected = 0x9e2626
		self.foreColorZap = 0xffffff
		self.backColorZap = 0x669466
		self.foreColorZapSelected = 0xffffff
		self.backColorZapSelected = 0x436143

		self.serviceFontNameGraph = "Regular"
		self.serviceFontSizeGraph = 20
		self.eventFontNameGraph = "Regular"
		self.eventFontSizeGraph = 18
		self.eventFontNameSingle = "Regular"
		self.eventFontSizeSingle = 22
		self.eventFontNameMulti = "Regular"
		self.eventFontSizeMulti = 22
		self.eventFontNameInfobar = "Regular"
		self.eventFontSizeInfobar = 22

		self.listHeight = None
		self.listWidth = None
		self.serviceBorderWidth = 1
		self.serviceNamePadding = 3
		self.eventBorderWidth = 1
		self.eventNamePadding = 3
		self.eventNameAlign = 'left'
Exemplo n.º 40
0
 def __init__(self, list):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.l.setList(list)
     self.l.setFont(0, gFont("Regular", 20))
     self.l.setFont(1, gFont("Regular", 18))
Exemplo n.º 41
0
    def __init__(self, eventList):
        GUIComponent.__init__(self)
        self.l = eListboxPythonMultiContent()
        self.l.setFont(0, gFont("Regular", 18))
        self.l.setBuildFunc(self.buildResultEntry)
        self.l.setItemHeight(150)
        self.onSelectionChanged = []

        self.resultlist = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/resultlist.png'),
            desktop=getDesktop(0))
        self.favoritePixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/favorite.png'),
            desktop=getDesktop(0))
        self.clockPixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/epgclock.png'),
            desktop=getDesktop(0))
        self.clockOverlap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/clockOverlap.png'),
            desktop=getDesktop(0))
        self.clockNotrecord = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/clockNotrecord.png'),
            desktop=getDesktop(0))
        self.noConflictPixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/noConflict.png'),
            desktop=getDesktop(0))
        self.arrowRightPixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/right.png'),
            desktop=getDesktop(0))
        self.deletePixmap = LoadPixmap(
            cached=True,
            path=resolveFilename(
                SCOPE_CURRENT_PLUGIN,
                'Extensions/PrimeTimeManager/images/delete.png'),
            desktop=getDesktop(0))
        if AUTOTIMER and config.plugins.PrimeTimeManager.UseAutotimer.value:
            self.autotimerPixmap = LoadPixmap(
                cached=True,
                path=resolveFilename(SCOPE_CURRENT_PLUGIN,
                                     'Extensions/AutoTimer/plugin.png'),
                desktop=getDesktop(0))

        self.l.setList(eventList)

        self.digitList = []
        i = 0
        while i <= 10:
            name = 'Extensions/PrimeTimeManager/images/digit_' + str(
                i) + '.png'
            digitPixmap = LoadPixmap(cached=True,
                                     path=resolveFilename(
                                         SCOPE_CURRENT_PLUGIN, name),
                                     desktop=getDesktop(0))
            self.digitList.append(digitPixmap)
            i += 1
Exemplo n.º 42
0
 def __init__(self):
     GUIComponent.__init__(self)
     self.l = eListboxPythonMultiContent()
     self.onSelectionChanged = []
     self.selectionChanged_conn = None
Exemplo n.º 43
0
	def __init__(self):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setSelectionClip(eRect(0, 0, 0, 0))
		self.l.setItemHeight(24);
		self.l.setFont(0, gFont("Regular", 20))
Exemplo n.º 44
0
    def __init__(self, root, list_type=None, sort_type=None, descr_state=None):
        GUIComponent.__init__(self)
        self.list = []
        self.list_type = list_type or self.LISTTYPE_MINIMAL
        self.descr_state = descr_state or self.HIDE_DESCRIPTION
        self.sort_type = sort_type or self.SORT_GROUPWISE
        self.firstFileEntry = 0
        self.parentDirectory = 0
        self.fontName = "Regular"
        self.fontSizesOriginal = (22, 18, 16)
        self.fontSizesCompact = (20, 14)
        self.fontSizesMinimal = (20, 16)
        self.itemHeights = (75, 37, 25)
        self.pbarShift = 5
        self.pbarHeight = 16
        self.pbarLargeWidth = 48
        self.partIconeShiftMinimal = 5
        self.partIconeShiftCompact = 4
        self.partIconeShiftOriginal = 5
        self.spaceRight = 2
        self.spaceIconeText = 2
        self.iconsWidth = 22
        self.trashShift = 1
        self.dirShift = 1
        self.columnsOriginal = (180, 200)
        self.columnsCompactDescription = (120, 140, 154)
        self.compactColumn = 200
        self.treeDescription = 165
        self.reloadDelayTimer = None
        self.l = eListboxPythonMultiContent()
        self.tags = set()
        self.root = None
        self._playInBackground = None
        self._char = ''

        if root is not None:
            self.reload(root)

        self.l.setBuildFunc(self.buildMovieListEntry)

        self.onSelectionChanged = []
        self.iconPart = []
        for part in range(5):
            self.iconPart.append(
                LoadPixmap(
                    resolveFilename(SCOPE_CURRENT_SKIN,
                                    "skin_default/icons/part_%d_4.png" %
                                    part)))
        self.iconMovieRec = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/part_new.png"))
        self.iconMoviePlay = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/movie_play.png"))
        self.iconMoviePlayRec = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/movie_play_rec.png"))
        self.iconUnwatched = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/part_unwatched.png"))
        self.iconFolder = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/folder.png"))
        self.iconTrash = LoadPixmap(
            resolveFilename(SCOPE_CURRENT_SKIN,
                            "skin_default/icons/trashcan.png"))
        self.runningTimers = {}
        self.updateRecordings()
Exemplo n.º 45
0
	def __init__(self):
		GUIComponent.__init__(self)
		self.picload = ePicLoad()
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildEntry)
		self.onSelChanged = []
Exemplo n.º 46
0
	def __init__(self, helplist, callback):
		GUIComponent.__init__(self)
		self.onSelChanged = []
		self.l = eListboxPythonMultiContent()
		self.callback = callback
		self.extendedHelp = False

		l = []
		for (actionmap, context, actions) in helplist:
			for (action, help) in actions:
				if hasattr(help, '__call__'):
					help = help()
				if not help:
					continue
				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])

					# only show entries with keys that are available on the used rc
					if name is None:
						continue

					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"
						x, y, w, h = parameters.get("HelpMenuListExtHlp0", applySkinFactor(0, 0, 600, 26))
						x1, y1, w1, h1 = parameters.get("HelpMenuListExtHlp1", applySkinFactor(0, 28, 600, 20))
						entry.extend((
							(eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, 0, help[0]),
							(eListboxPythonMultiContent.TYPE_TEXT, x1, y1, w1, h1, 1, 0, help[1])
						))
					else:
						x, y, w, h = parameters.get("HelpMenuListHlp", applySkinFactor(0, 0, 600, 28))
						entry.append((eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, 0, help))

					l.append(entry)

		self.l.setList(l)
		if self.extendedHelp is True:
			font = fonts.get("HelpMenuListExt0", applySkinFactor("Regular", 24, 50))
			self.l.setFont(0, gFont(font[0], font[1]))
			self.l.setItemHeight(font[2])
			font = fonts.get("HelpMenuListExt1", applySkinFactor("Regular", 18))
			self.l.setFont(1, gFont(font[0], font[1]))
		else:
			font = fonts.get("HelpMenuList", applySkinFactor("Regular", 24, 38))
			self.l.setFont(0, gFont(font[0], font[1]))
			self.l.setItemHeight(font[2])
Exemplo n.º 47
0
	def __init__(self, session):
		self.skin = ServicesEditor.skin
		Screen.__init__(self, session)

		self.usk = None
		self.cur_service = None
		self.mainTitle = "ServicesEditor %s" %self.version
		self["actions"] = ActionMap(["ServicesEditorActions"],
			{
				"nextPage": self.nextPage,
				"nextPageUp": self.selectionKeyUp,
				"nextPageRepeated": self.nextPageRepeated,
				"prevPage": self.prevPage,
				"prevPageUp": self.selectionKeyUp,
				"prevPageRepeated": self.prevPageRepeated,
				"displayHelp": self.showHelp,
				"displayMenu": self.openMenu,
				"displayInfo": self.showServiceInfo,
				"select": self.editService,
				"exit": self.Exit,
				"left": self.left,
				"leftUp": self.doNothing,
				"leftRepeated": self.doNothing,
				"right": self.right,
				"rightUp": self.doNothing,
				"rightRepeated": self.doNothing,
				"upUp": self.selectionKeyUp,
				"up": self.up,
				"upRepeated": self.upRepeated,
				"down": self.down,
				"downUp": self.selectionKeyUp,
				"downRepeated": self.downRepeated,
				"redUp": self.hideService,
				"redLong": self.hideServiceMenu,
				"green": self.editService,
				"yellow": self.addService,
				"blue": self.sortColumn,
			}, -1)

		self["key_red"] = Button(_("hide/unhide"))
		self["key_green"] = Button(_("edit"))
		self["key_yellow"] = Button(_(" "))
		self["key_blue"] = Button(_("sort"))

		self["infolist"] = MenuList([])
		self["infolist"].l = eListboxPythonMultiContent()
		self["infolist"].l.setSelectionClip(eRect(0, 0, 0, 0))
		self["infolist"].l.setItemHeight(24);
		self["infolist"].l.setFont(0, gFont("Regular", 20))
		
		self["newscaster"] = Newscaster()
		self["head"] = Head()
		self["list"] = ServiceList()
		self.onLayoutFinish.append(self.layoutFinished)
		self.currentSelectedColumn = 1

		self.row = [
			["name", _("Services"), False],
			["provider", _("Providers"), False],
			["position", _("Pos"), False],
			]
		self.typesort = False
		
		self.myTimer = eTimer()
		db = eDVBDB.getInstance()
		db.saveServicelist()
		self.lamedb = Lamedb()
		self.database = self.lamedb.database
		self._initFlag = False
		self.gpsr = session.nav.getCurrentlyPlayingServiceReference().toString().lower()
		print_cy(self.gpsr)
		tmp = self.gpsr.split(":")
		if tmp[0]=="1" and tmp[1]=="0" and tmp[10]=="":
			self.usk = tmp[6].zfill(8)+tmp[4].zfill(4)+tmp[5].zfill(4)+tmp[3].zfill(4)
		print_cy(self.usk)
Exemplo n.º 48
0
    def __init__(self, helplist, callback):
        GUIComponent.__init__(self)
        self.onSelChanged = []
        self.l = eListboxPythonMultiContent()
        self.callback = callback
        self.extendedHelp = False

        l = []

        sortlist = []
        for (actionmap, context, actions) in helplist:
            for (action, help) in actions:
                if hasattr(help, '__call__'):
                    help = help()
                if not help:
                    continue
                sortlist.append((actionmap, context, action, help))
        # Sort by description text (main and extended), then by action (this puts numeric actions in ascending order).
        sortlist.sort(key=lambda helpItem: (map(
            str.lower, helpItem[3] if isinstance(helpItem[3], (tuple, list))
            else [helpItem[3]]), helpItem[2]))

        for (actionmap, context, action, help) in sortlist:
            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

            # only show entries with keys that are available on the used rc
            if name is None:
                continue

            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"
                x, y, w, h = skin.parameters.get(
                    "HelpMenuListExtHlp0",
                    (skin.applySkinFactor(5), 0, skin.applySkinFactor(595),
                     skin.applySkinFactor(28)))
                x1, y1, w1, h1 = skin.parameters.get(
                    "HelpMenuListExtHlp1",
                    (skin.applySkinFactor(5), skin.applySkinFactor(34),
                     skin.applySkinFactor(595), skin.applySkinFactor(22)))
                entry.extend(
                    ((eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h, 0, 0,
                      help[0]), (eListboxPythonMultiContent.TYPE_TEXT, x1, y1,
                                 w1, h1, 1, 0, help[1])))
            else:
                x, y, w, h = skin.parameters.get(
                    "HelpMenuListHlp",
                    (skin.applySkinFactor(5), 0, skin.applySkinFactor(595),
                     skin.applySkinFactor(28)))
                entry.append((eListboxPythonMultiContent.TYPE_TEXT, x, y, w, h,
                              0, 0, help))

            l.append(entry)

        self.l.setList(l)
        if self.extendedHelp is True:
            font = skin.fonts.get("HelpMenuListExt0",
                                  ("Regular", skin.applySkinFactor(24),
                                   skin.applySkinFactor(56)))
            self.l.setFont(0, gFont(font[0], font[1]))
            self.l.setItemHeight(font[2])
            font = skin.fonts.get("HelpMenuListExt1",
                                  ("Regular", skin.applySkinFactor(18)))
            self.l.setFont(1, gFont(font[0], font[1]))
        else:
            font = skin.fonts.get("HelpMenuList",
                                  ("Regular", skin.applySkinFactor(24),
                                   skin.applySkinFactor(28)))
            self.l.setFont(0, gFont(font[0], font[1]))
            self.l.setItemHeight(font[2])