-from config import KEY_LEFT, KEY_RIGHT, KEY_0, KEY_DELETE, KEY_OK, KEY_TIMEOUT, ConfigElement
+from config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, KEY_DELETE, KEY_BACKSPACE, KEY_OK, KEY_TOGGLEOW, KEY_ASCII, KEY_TIMEOUT, KEY_NUMBERS, ConfigElement
-from enigma import eListbox, eListboxPythonConfigContent, eTimer
+from enigma import eListbox, eListboxPythonConfigContent, eRCInput, eTimer
from Screens.MessageBox import MessageBox
class ConfigList(HTMLComponent, GUIComponent, object):
def __init__(self, list, session = None):
GUIComponent.__init__(self)
self.l = eListboxPythonConfigContent()
from Screens.MessageBox import MessageBox
class ConfigList(HTMLComponent, GUIComponent, object):
def __init__(self, list, session = None):
GUIComponent.__init__(self)
self.l = eListboxPythonConfigContent()
- self.timer.timeout.get().remove(self.timeout)
-
- def setHelpWindowSession(self, session):
- assert self.help_window is None, "you can't move a help window to another session"
- self.session = session
+ rcinput = eRCInput.getInstance()
+ rcinput.setKeyboardMode(rcinput.kmNone)
+ self.timer.callback.remove(self.timeout)
- n = self.getCurrent()
-
- if self.help_window:
- self.session.deleteDialog(self.help_window)
-
- nh = n and n[1].helpWindow()
- if nh is not None and self.session is not None:
- self.help_window = self.session.instantiateDialog(*nh)
- self.help_window.show()
-
- self.current = n
+ if self.current:
+ self.current[1].onDeselect(self.session)
+ self.current = self.getCurrent()
+ if self.current:
+ self.current[1].onSelect(self.session)
for x in self.onSelectionChanged:
x()
def postWidgetCreate(self, instance):
for x in self.onSelectionChanged:
x()
def postWidgetCreate(self, instance):
class ConfigListScreen:
def __init__(self, list, session = None, on_change = None):
class ConfigListScreen:
def __init__(self, list, session = None, on_change = None):
- self["config_actions"] = NumberActionMap(["SetupActions", "TextInputActions"],
+ self["config_actions"] = NumberActionMap(["SetupActions", "InputAsciiActions", "KeyboardInputActions"],
- "delete": self.keyDelete,
+ "home": self.keyHome,
+ "end": self.keyEnd,
+ "deleteForward": self.keyDelete,
+ "deleteBackward": self.keyBackspace,
+ "toggleOverwrite": self.keyToggleOW,
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
"3": self.keyNumberGlobal,
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
"3": self.keyNumberGlobal,
def keyNumberGlobal(self, number):
self["config"].handleKey(KEY_0 + number)
self.__changed()
def keyNumberGlobal(self, number):
self["config"].handleKey(KEY_0 + number)
self.__changed()
# keySave and keyCancel are just provided in case you need them.
# you have to call them by yourself.
def keySave(self):
# keySave and keyCancel are just provided in case you need them.
# you have to call them by yourself.
def keySave(self):