コード例 #1
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Select input device"))
		HelpableScreen.__init__(self)

		self.edittext = _("Press OK to edit the settings.")

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Select"))
		self["key_yellow"] = StaticText("")
		self["key_blue"] = StaticText("")
		self["introduction"] = StaticText(self.edittext)

		self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
		print("[InputDeviceSetup] found devices :->", len(self.devices),self.devices)

		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
			"cancel": (self.close, _("Exit input device selection.")),
			"ok": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
			"red": (self.close, _("Exit input device selection.")),
			"green": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self.currentIndex = 0
		self.list = []
		self["list"] = List(self.list)
		self.updateList()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
コード例 #2
0
 def __init__(self, session):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self.setTitle(_('Select input device'))
     self.edittext = _('Press OK to edit the settings.')
     self['key_red'] = StaticText(_('Close'))
     self['key_green'] = StaticText(_('Select'))
     self['key_yellow'] = StaticText('')
     self['key_blue'] = StaticText('')
     self['introduction'] = StaticText(self.edittext)
     self.devices = [(iInputDevices.getDeviceName(x), x)
                     for x in iInputDevices.getDeviceList()]
     print '[InputDeviceSelection] found devices :->', len(
         self.devices), self.devices
     self['OkCancelActions'] = HelpableActionMap(
         self, 'OkCancelActions', {
             'cancel': (self.close, _('Exit input device selection.')),
             'ok': (self.okbuttonClick, _('Select input device.'))
         }, -2)
     self['ColorActions'] = HelpableActionMap(
         self, 'ColorActions', {
             'red': (self.close, _('Exit input device selection.')),
             'green': (self.okbuttonClick, _('Select input device.'))
         }, -2)
     self.currentIndex = 0
     self.list = []
     self['list'] = List(self.list)
     self.updateList()
     self.onLayoutFinish.append(self.layoutFinished)
     self.onClose.append(self.cleanup)
コード例 #3
0
	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)

		self.edittext = _("Press OK to edit the settings.")

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Select"))
		self["key_yellow"] = StaticText("")
		self["key_blue"] = StaticText("")
		self["introduction"] = StaticText(self.edittext)

		self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
		print "[InputDeviceSelection] found devices :->", len(self.devices),self.devices

		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
			"cancel": (self.close, _("Exit input device selection.")),
			"ok": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
			"red": (self.close, _("Exit input device selection.")),
			"green": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self.currentIndex = 0
		self.list = []
		self["list"] = List(self.list)
		self.updateList()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)
コード例 #4
0
    def __init__(self, session, menu_path=""):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        menu_path += _("Input devices") + " / "
        screentitle = _("Select input device")
        menu_path += screentitle
        self.menu_path = menu_path + " / "
        if config.usage.show_menupath.value == 'large':
            title = menu_path
            self["menu_path_compressed"] = StaticText("")
        elif config.usage.show_menupath.value == 'small':
            title = screentitle
            self["menu_path_compressed"] = StaticText(
                menu_path +
                " >" if not menu_path.endswith(' / ') else menu_path[:-3] +
                " >" or "")
        else:
            title = screentitle
            self["menu_path_compressed"] = StaticText("")
        Screen.setTitle(self, title)

        self.edittext = _("Press OK to edit the settings.")

        self["key_red"] = StaticText(_("Close"))
        self["key_green"] = StaticText(_("Select"))
        self["key_yellow"] = StaticText("")
        self["key_blue"] = StaticText("")
        self["introduction"] = StaticText(self.edittext)

        self.devices = [(iInputDevices.getDeviceName(x), x)
                        for x in iInputDevices.getDeviceList()]
        print "[InputDeviceSetup] found devices :->", len(
            self.devices), self.devices

        self["OkCancelActions"] = HelpableActionMap(
            self, "OkCancelActions", {
                "cancel": (self.close, _("Exit input device selection.")),
                "ok": (self.okbuttonClick, _("Select input device.")),
            }, -2)

        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "red": (self.close, _("Exit input device selection.")),
                "green": (self.okbuttonClick, _("Select input device.")),
            }, -2)

        self.currentIndex = 0
        self.list = []
        self["list"] = List(self.list)
        self.updateList()
        self.onClose.append(self.cleanup)
コード例 #5
0
ファイル: InputDeviceSetup.py プロジェクト: Huevos/enigma2
	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		menu_path += _("Input devices") + " / "
		screentitle = _("Select input device")
		menu_path += screentitle
		self.menu_path = menu_path + " / "
		if config.usage.show_menupath.value == 'large':
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)

		self.edittext = _("Press OK to edit the settings.")

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Select"))
		self["key_yellow"] = StaticText("")
		self["key_blue"] = StaticText("")
		self["introduction"] = StaticText(self.edittext)

		self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
		print "[InputDeviceSetup] found devices :->", len(self.devices),self.devices

		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
			"cancel": (self.close, _("Exit input device selection.")),
			"ok": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
			"red": (self.close, _("Exit input device selection.")),
			"green": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self.currentIndex = 0
		self.list = []
		self["list"] = List(self.list)
		self.updateList()
		self.onClose.append(self.cleanup)
コード例 #6
0
ファイル: plugin.py プロジェクト: allucio/oe-alliance-plugins
    def createConfig(self):
        self.name_list = []
        self.mouse_list = None
        self.keyboard_list = None

        self.devices = [
            (
                x,
                iInputDevices.getDeviceName(x)
                .replace("dreambox advanced remote control (native)", "Remote Control")
                .replace("dreambox front panel", "Front Panel")
                + "("
                + x
                + ")",
            )
            for x in iInputDevices.getDeviceList()
        ]

        if self.conf_mouse == "":
            self.conf_mouse = "event1"
        self.mouse = ConfigSelection(default=self.conf_mouse, choices=self.devices)
        self.list.append(getConfigListEntry(_("Mouse"), _(self.mouse)))

        if self.conf_keyboard == "":
            self.conf_keyboard = "event1"
        self.keyboard = ConfigSelection(default=self.conf_keyboard, choices=self.devices)
        self.list.append(getConfigListEntry(_("Keyboard"), _(self.keyboard)))

        if self.conf_alpha == "":
            self.conf_alpha = "255"
        self.alpha = ConfigSlider(default=int(self.conf_alpha), increment=10, limits=(0, 255))
        self.list.append(getConfigListEntry(_("Alpha Value"), self.alpha))

        if self.conf_keymap == "":
            self.conf_keymap = self.getLanguage()
        self.lang_list = [("en", "English"), ("de", "German")]
        self.langs = ConfigSelection(default=self.conf_keymap, choices=self.lang_list)
        self.list.append(getConfigListEntry(_("Language"), self.langs))

        self["config"].list = self.list
        self["config"].l.setList(self.list)
コード例 #7
0
    def __init__(self, session):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)

        self.edittext = _("Press OK to edit the settings.")

        self["key_red"] = StaticText()
        self["key_green"] = StaticText(_("Keyboard"))
        txt = ""
        if InputDeviceManagement:
            txt = _("Connect")
        self["key_yellow"] = StaticText(txt)
        self["key_blue"] = StaticText(_("Advanced"))
        self["introduction"] = StaticText(self.edittext)

        self.devices = [(iInputDevices.getDeviceName(x), x)
                        for x in iInputDevices.getDeviceList()]
        print("[InputDeviceSelection] found devices :->", len(self.devices),
              self.devices)

        self["OkCancelActions"] = HelpableActionMap(
            self, "OkCancelActions", {
                "cancel": (self.close, _("Exit input device selection.")),
                "ok": (self.okbuttonClick, _("Select input device.")),
            }, -2)

        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "green": (self._keyboardSetup, _("Set up your keyboard.")),
                "yellow":
                (self._openManager, _("Open Device Connection Manager")),
                "blue": (self._advanced, _("Setup Advanced Features")),
            }, -2)

        self.currentIndex = 0
        self.list = []
        self["list"] = List(self.list)
        self.updateList()
        self.onLayoutFinish.append(self.layoutFinished)
        self.onClose.append(self.cleanup)
コード例 #8
0
ファイル: InputDeviceSetup.py プロジェクト: kingvuplus/boom
 def __init__(self, session):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self.setTitle(_('Select input device'))
     self.edittext = _('Press OK to edit the settings.')
     self['key_red'] = StaticText(_('Close'))
     self['key_green'] = StaticText(_('Select'))
     self['key_yellow'] = StaticText('')
     self['key_blue'] = StaticText('')
     self['introduction'] = StaticText(self.edittext)
     self.devices = [ (iInputDevices.getDeviceName(x), x) for x in iInputDevices.getDeviceList() ]
     print '[InputDeviceSelection] found devices :->', len(self.devices), self.devices
     self['OkCancelActions'] = HelpableActionMap(self, 'OkCancelActions', {'cancel': (self.close, _('Exit input device selection.')),
      'ok': (self.okbuttonClick, _('Select input device.'))}, -2)
     self['ColorActions'] = HelpableActionMap(self, 'ColorActions', {'red': (self.close, _('Exit input device selection.')),
      'green': (self.okbuttonClick, _('Select input device.'))}, -2)
     self.currentIndex = 0
     self.list = []
     self['list'] = List(self.list)
     self.updateList()
     self.onLayoutFinish.append(self.layoutFinished)
     self.onClose.append(self.cleanup)
コード例 #9
0
    def createConfig(self):
        self.name_list = []
        self.mouse_list = None
        self.keyboard_list = None

        self.devices = [(x, iInputDevices.getDeviceName(x).replace(
            "dreambox advanced remote control (native)",
            "Remote Control").replace("dreambox front panel", "Front Panel") +
                         "(" + x + ")") for x in iInputDevices.getDeviceList()]

        if self.conf_mouse == "":
            self.conf_mouse = "event1"
        self.mouse = ConfigSelection(default=self.conf_mouse,
                                     choices=self.devices)
        self.list.append(getConfigListEntry(_('Mouse'), _(self.mouse)))

        if self.conf_keyboard == "":
            self.conf_keyboard = "event1"
        self.keyboard = ConfigSelection(default=self.conf_keyboard,
                                        choices=self.devices)
        self.list.append(getConfigListEntry(_('Keyboard'), _(self.keyboard)))

        if self.conf_alpha == "":
            self.conf_alpha = "255"
        self.alpha = ConfigSlider(default=int(self.conf_alpha),
                                  increment=10,
                                  limits=(0, 255))
        self.list.append(getConfigListEntry(_("Alpha Value"), self.alpha))

        if self.conf_keymap == "":
            self.conf_keymap = self.getLanguage()
        self.lang_list = [("en", "English"), ("de", "German")]
        self.langs = ConfigSelection(default=self.conf_keymap,
                                     choices=self.lang_list)
        self.list.append(getConfigListEntry(_("Language"), self.langs))

        self["config"].list = self.list
        self["config"].l.setList(self.list)
コード例 #10
0
ファイル: InputDeviceSetup.py プロジェクト: aitchala/enigma2
	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		
		self.edittext = _("Press OK to edit the settings.")
		
		self["key_red"] = StaticText()
		self["key_green"] = StaticText(_("Keyboard"))
		txt = ""
		if InputDeviceManagement:
			txt = _("Connect")
			self["key_yellow"] = StaticText(txt)
		self["key_blue"] = StaticText(_("Avanced"))
		self["introduction"] = StaticText(self.edittext)
		
		self.devices = [(iInputDevices.getDeviceName(x),x) for x in iInputDevices.getDeviceList()]
		print "[InputDeviceSelection] found devices :->", len(self.devices),self.devices
			
		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
			"cancel": (self.close, _("Exit input device selection.")),
			"ok": (self.okbuttonClick, _("Select input device.")),
			}, -2)

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
			"green": (self._keyboardSetup, _("Set up your keyboard.")),
			"yellow" : (self._openManager, _("Open Device Connection Manager")),
			"blue" : (self._advanced, _("Setup Advanced Features")),
			}, -2)

		self.currentIndex = 0
		self.list = []
		self["list"] = List(self.list)
		self.updateList()
		self.onLayoutFinish.append(self.layoutFinished)
		self.onClose.append(self.cleanup)