Example #1
0
	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
Example #3
0
	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)
Example #4
0
	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))
Example #5
0
 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"))
Example #6
0
 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)
Example #7
0
 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()
Example #8
0
 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()
Example #9
0
 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()
Example #10
0
	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()
Example #11
0
 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'))
Example #12
0
 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"))
Example #13
0
	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()
Example #14
0
    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)
Example #15
0
    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)
Example #16
0
    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)
Example #17
0
 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'))