def buildInterfaceList(self, device, description, type, isinputdevice = True): divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "div-h.png")) activepng = None devicepng = None enabled = iInputDevices.getDeviceAttribute(device, 'enabled') if type == 'remote': if config.misc.rcused.value == 0: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_rcnew-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_rcnew.png")) else: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_rcold-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_rcold.png")) elif type == 'keyboard': if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_keyboard-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_keyboard.png")) elif type == 'mouse': if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_mouse-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_mouse.png")) elif isinputdevice: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/input_rcnew.png")) return ((device, description, devicepng, divpng))
def buildInterfaceList(self, device, description, type, isinputdevice=True): divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_ACTIVE_SKIN, "div-h.png")) activepng = None devicepng = None enabled = iInputDevices.getDeviceAttribute(device, "enabled") if type == "remote": if config.misc.rcused.value == 0: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_rcnew-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_rcnew.png")) else: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_rcold-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_rcold.png")) elif type == "keyboard": if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_keyboard-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_keyboard.png")) elif type == "mouse": if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_mouse-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_mouse.png")) elif isinputdevice: devicepng = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/input_rcnew.png")) return device, description, devicepng, divpng
def updateList(self): self.list = [] for x in self.devices: dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') self.list.append(self.buildInterfaceList(x[1],_(x[0]), dev_type )) self["list"].setList(self.list) self["list"].setIndex(self.currentIndex)
def buildInterfaceList(self,device,description,type ): divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) activepng = None devicepng = None enabled = iInputDevices.getDeviceAttribute(device, 'enabled') if type == 'remote': if config.misc.rcused.value == 0: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew.png")) else: if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcold-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcold.png")) elif type == 'keyboard': if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_keyboard-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_keyboard.png")) elif type == 'mouse': if enabled: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_mouse-configured.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_mouse.png")) else: devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew.png")) return((device, description, devicepng, divpng))
def selectionChanged(self): if self["config"].getCurrent() == self.enableEntry: self["introduction"].setText( _("Current device: ") + str(iInputDevices.getDeviceAttribute(self.inputDevice, "name")) ) else: self["introduction"].setText(_("Current value: ") + self.getCurrentValue() + _(" ms"))
def updateList(self): self.list = [] for x in self.devices: dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') self.list.append(self.buildInterfaceList(x[1], _(x[0]), dev_type)) self["list"].setList(self.list) self["list"].setIndex(self.currentIndex)
def confirm(self, confirmed): if not confirmed: print 'not confirmed' return self.nameEntry[1].setValue(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) cmd = 'config.inputDevices.' + self.inputDevice + '.name.save()' exec cmd self.keySave()
def confirm(self, confirmed): if not confirmed: print 'not confirmed' return self.nameEntry[1].setValue(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) cmd = 'config.inputDevices.' + self.inputDevice + '.name.save()' exec cmd self.keySave()
def confirm(self, confirmed): if not confirmed: print("[InputDeviceSetup] not confirmed") return else: self.nameEntry[1].setValue( iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) getattr(config.inputDevices, self.inputDevice).name.save() self.keySave()
def confirm(self, confirmed): if not confirmed: print("[InputDeviceSetup] not confirmed") return else: self.nameEntry[1].setValue(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) cmd = "config.inputDevices." + self.inputDevice + ".name.save()" exec(cmd) self.keySave()
def selectionChanged(self): if self['config'].getCurrent() == self.enableEntry: self['introduction'].setText( _('Current device: ') + str(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) ) else: self['introduction'].setText( _('Current value: ') + self.getCurrentValue() + ' ' + _('ms'))
def selectionChanged(self): if self["config"].getCurrent() == self.enableEntry: self["introduction"].setText( _("Current device: ") + str(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) ) else: self["introduction"].setText( _("Current value: ") + self.getCurrentValue() + _(" ms"))
def confirm(self, confirmed): if not confirmed: print "not confirmed" return else: self.nameEntry[1].setValue(iInputDevices.getDeviceAttribute(self.inputDevice, 'name')) cmd = "config.inputDevices." + self.inputDevice + ".name.save()" exec (cmd) self.keySave()
def updateList(self): self.list = [] if iRcTypeControl.multipleRcSupported(): self.list.append(self.buildInterfaceList('rctype', _('Configure remote control type'), None, False)) for x in self.devices: dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') self.list.append(self.buildInterfaceList(x[1], _(x[0]), dev_type)) self['list'].setList(self.list) self['list'].setIndex(self.currentIndex)
def updateList(self): self.list = [] if iRcTypeControl.multipleRcSupported(): self.list.append(self.buildInterfaceList('rctype', _('Configure remote control type'), None, False)) for x in self.devices: dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') self.list.append(self.buildInterfaceList(x[1], _(x[0]), dev_type)) self['list'].setList(self.list) self['list'].setIndex(self.currentIndex)
def updateList(self): self.list = [] # print("[InputDevice] iRcTypeControl.multipleRcSupported = {}".format(iRcTypeControl.multipleRcSupported())) if iRcTypeControl.multipleRcSupported(): self.list.append( self.buildInterfaceList( 'rctype', _('Select to configure remote control type'), None, False)) for x in self.devices: dev_type = iInputDevices.getDeviceAttribute(x[1], 'type') self.list.append(self.buildInterfaceList(x[1], _(x[0]), dev_type)) # print("[InputDevice] list = {}, self.currentIndex = {}".format(self.list, self.currentIndex)) self["list"].setList(self.list) self["list"].setIndex(self.currentIndex)
def selectionChanged(self): if self['config'].getCurrent() == self.enableEntry: self['introduction'].setText(_('Current device: ') + str(iInputDevices.getDeviceAttribute(self.inputDevice, 'name'))) else: self['introduction'].setText(_('Current value: ') + self.getCurrentValue() + ' ' + _('ms'))