def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for attrib, value in self.skinAttributes: if attrib == 'delayPic': # delay time(ms) for banner showing... self.delayPicTime = int(value) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "size": size = value.split(',') sc = AVSwitch().getFramebufferScale() self.picload.setPara((int(size[0]), int(size[1]), sc[0], sc[1], False, 1, "#ff000000")) if attrib == "type": #if value == "cover": # pass if value == "backdrop": self.extension = ".backdrop.jpg" attribs.remove((attrib, value)) if attrib == "default": image = resolveFilename(SCOPE_CURRENT_SKIN) + value if fileExists(image): self.default_image = image image = resolveFilename(SCOPE_SKIN_IMAGE) + value if fileExists(image): self.default_image = image if self.default_image is None: self.default_image = getNocover() attribs.remove((attrib, value)) # session.CurrentService if isinstance(self.source, CurrentService): self.changed((self.CHANGED_DEFAULT, )) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "NumberOfItems": self.numberOfItems = int(value) attribs.append((attrib, value)) if attrib == "noLabel": self.hideLabel = int(value) attribs.append((attrib, value)) if attrib == "numOfSpaces": self.numOfSpaces = int(value) attribs.append((attrib, value)) if attrib == "timeColor": self.timecolor = Hex2strColor(parseColor(value).argb()) attribs.append((attrib, value)) if attrib == "labelColor": self.labelcolor = Hex2strColor(parseColor(value).argb()) attribs.append((attrib, value)) if attrib == "foregroundColor": self.foregroundColor = Hex2strColor(parseColor(value).argb()) attribs.append((attrib, value)) for (attrib, value) in attribs: self.skinAttributes.remove((attrib, value)) if self.timecolor == "": # fallback to foregroundColor self.timecolor = self.foregroundColor if self.labelcolor == "": # fallback to foregroundColor self.labelcolor = self.foregroundColor return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): if parent.__class__.__name__ == 'ChannelSelection': self.is_channelselection = True if not config.usage.use_extended_pig_channelselection.value: self.decoder = 0 self.this_instance.setDecoder(self.decoder) if self.skinAttributes is not None: attribs = [] for attrib, value in self.skinAttributes: if attrib == 'OverScan': if value.lower() == 'false' or value == '0': self.instance.setOverscan(False) else: attribs.append((attrib, value)) if attrib == 'position': x = value.split(',')[0] y = value.split(',')[1] elif attrib == 'size': w = value.split(',')[0] h = value.split(',')[1] self.skinAttributes = attribs x = format(int(float(x) / self.fb_w * 720.0), 'x').zfill(8) y = format(int(float(y) / self.fb_h * 576.0), 'x').zfill(8) w = format(int(float(w) / self.fb_w * 720.0), 'x').zfill(8) h = format(int(float(h) / self.fb_h * 576.0), 'x').zfill(8) self.fb_size = [w, h, x, y] ret = Renderer.applySkin(self, desktop, parent) if ret: self.Position = self.instance.position() self.Size = self.instance.size() return ret
def applySkin(self, desktop, parent): if DBG: j00zekDEBUG('[j00zekPiconAnimation]:[applySkin] >>>') #Load attribs attribs = [] for attrib, value in self.skinAttributes: if attrib == 'pixmaps': self.pixmaps = value elif attrib == 'lockpath': if value == 'True': self.doLockPath = True elif attrib == 'pixdelay': self.pixdelay = int(value) if self.pixdelay < 40: self.pixdelay = 50 else: attribs.append((attrib, value)) self.skinAttributes = attribs #Load animation into memory try: if config.plugins.j00zekPiconAnimation.UserPathEnabled.value == True and self.doLockPath == False: if os.path.exists(config.plugins.j00zekPiconAnimation.UserPath.value): self.loadPNGsAnim(config.plugins.j00zekPiconAnimation.UserPath.value) self.loadPNGsSubFolders(config.plugins.j00zekPiconAnimation.UserPath.value) elif DBG: j00zekDEBUG('[j00zekPiconAnimation]:[applySkin] User path "%s" selected but does NOT exist' % config.plugins.j00zekPiconAnimation.UserPath.value) else: for path in searchPaths: if self.loadPNGsAnim(os.path.join(path, self.pixmaps)) == True: break self.loadPNGsSubFolders(os.path.join(path, self.pixmaps)) except Exception as e: if DBG: j00zekDEBUG('[j00zekPiconAnimation]:[applySkin] Exception %s' % str(e)) return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] from enigma import eSize def parseSize(str): x, y = str.split(',') return eSize(int(x), int(y)) for (attrib, value) in self.skinAttributes: if attrib == "size": self.instance.setSize(parseSize(value)) attribs.append((attrib, value)) elif attrib == "nocColor": self.nocColor = parseColor(value) elif attrib == "emmColor": self.emmColor = parseColor(value) elif attrib == "ecmColor": self.ecmColor = parseColor(value) elif attrib == "font": self.font = parseFont(value, ((1, 1), (1, 1))) elif attrib == "backgroundColor": self.backgroundColor = parseColor(value) self.instance.clear(self.backgroundColor) attribs.append((attrib, value)) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): # do some voodoo for the lovely ChannelSelection ... if parent.__class__.__name__ == "ChannelSelection": self.is_channelselection = True if not config.usage.use_extended_pig_channelselection.value: self.decoder = 0 self.this_instance.setDecoder(self.decoder) if self.skinAttributes is not None: attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "OverScan": if value.lower() == "false" or value == "0": self.instance.setOverscan(False) else: attribs.append((attrib, value)) if attrib == "position": x = value.split(',')[0] y = value.split(',')[1] elif attrib == "size": w = value.split(',')[0] h = value.split(',')[1] self.skinAttributes = attribs x = format(int(float(x) / self.fb_w * 720.0), 'x').zfill(8) y = format(int(float(y) / self.fb_h * 576.0), 'x').zfill(8) w = format(int(float(w) / self.fb_w * 720.0), 'x').zfill(8) h = format(int(float(h) / self.fb_h * 576.0), 'x').zfill(8) self.fb_size = [w, h, x, y] ret = Renderer.applySkin(self, desktop, parent) if ret: self.Position = self.instance.position() # fixme, scaling! self.Size = self.instance.size() return ret
def applySkin(self, desktop, parent): attribs = [] for ( attrib, value, ) in self.skinAttributes: if attrib == "path": self.path = value elif attrib == "pixdelay": self.pixdelay = int(value) elif attrib == "ftpcontrol": self.ftpcontrol = int(value) elif attrib == "control": self.control = int(value) elif attrib == "datenow": self.datenow = int(value) elif attrib == "datepast": self.datepast = int(value) elif attrib == "datetuday": self.datetuday = int(value) elif attrib == "date2": self.date2 = int(value) elif attrib == "date3": self.date3 = int(value) elif attrib == "date4": self.date4 = int(value) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "path": self.addPath(value) attribs.remove((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "size": self.piconsize = value elif attrib == 'delayPic': # delay time(ms) for emc background showing... self.delayPicTime = int(value) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "path": self.path = value else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "allVisible": self.allVisible = value == "1" attribs.remove((attrib, value)) break self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for ( attrib, value, ) in self.skinAttributes: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for attrib, value in self.skinAttributes: if attrib == 'nxtEvents': self.nxEvnt = value if attrib == 'snglEvent': self.snglEvnt = value self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for attrib, value in self.skinAttributes: if attrib == 'nextEvent': self.nxEvnt = int(value) elif attrib == 'usedImage': self.nxEvntUsed = value self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for (attrib, value,) in self.skinAttributes: if attrib == 'text': value = self.text attribs.append((attrib, value)) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "path": piconLocator.addSearchPath(value) attribs.remove((attrib, value)) self.skinAttributes = attribs rc = Renderer.applySkin(self, desktop, parent) self.changed((self.CHANGED_DEFAULT, )) return rc
def applySkin(self, desktop, parent): attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "position": self.posY = int(value.strip().split(",")[1]) attribs.append((attrib, value)) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): self.number = 0 attribs = [] for attrib, value in self.skinAttributes: if attrib == 'number': self.number = int(value) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): muyqzl = [] for ywprvi, value in self.skinAttributes: if ywprvi == 'size': self.lxktpt = value.split(',') muyqzl.append((ywprvi, value)) self.skinAttributes = muyqzl zlzvtk = Renderer.applySkin(self, desktop, parent) return zlzvtk
def applySkin(self, desktop, parent): attribs = [] for (attrib, value,) in self.skinAttributes: if attrib == 'path': self.path = value elif attrib == 'slot': self.slot = int(value) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for attrib, value in self.skinAttributes: if attrib == "size": self.sizeX = int(value.strip().split(",")[0]) attribs.append((attrib, value)) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for (attrib, what) in self.skinAttributes: if (attrib == 'foregroundColor'): self.fColor = parseColor(what) elif (attrib == 'backgroundColor'): self.bColor = parseColor(what) else: attribs.append((attrib, what)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for (attrib, value,) in self.skinAttributes: if (attrib == 'path'): self.path = value elif (attrib == 'picon_default'): self.picon_default = value else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "path": self.addPath(value) attribs.remove((attrib, value)) elif attrib == "isFrontDisplayPicon": self.showPicon = value == "0" attribs.remove((attrib, value)) self.skinAttributes = attribs self.changed((self.CHANGED_ALL, )) return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for (attrib, value) in self.skinAttributes: if attrib == "hidePip": self.hidePip = value == "1" attribs.remove((attrib, value)) self.skinAttributes = attribs ret = Renderer.applySkin(self, desktop, parent) if ret: self.Position = self.instance.position() self.Size = self.instance.size() return ret
def applySkin(self, desktop, parent): self.number = 0 attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "number": self.number = int(value) elif attrib == "lines": self.number = int(value) + 1 self.lines = True else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for attrib, value in self.skinAttributes: if attrib == 'size': self.sizeX = int(value.strip().split(',')[0]) attribs.append((attrib, value)) elif attrib == 'emptyText': self.EmptyText = value else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = [] for attrib, value in self.skinAttributes: if attrib == 'pixmaps': self.pixmaps = value.split(',') elif attrib == 'pixdelay': self.pixdelay = int(value) elif attrib == 'control': self.control = int(value) else: attribs.append((attrib, value)) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)
def applySkin(self, desktop, parent): attribs = self.skinAttributes[:] for attrib, value in self.skinAttributes: if attrib == "size": self.piconsize = value elif attrib == 'nextEvent': # 0(current), 1, 2, 3......... self.nxEvnt = int(value) elif attrib == 'usedImage': # poster, banner, backdrop self.nxEvntUsed = value elif attrib == 'delayPic': # delay time(ms) for poster-banner-backdrop showing... self.delayPicTime = int(value) self.skinAttributes = attribs return Renderer.applySkin(self, desktop, parent)