aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorAcid Burn <acid-burn@ACIDNET.(none)>2009-11-10 13:18:26 +0100
committerAcid Burn <acid-burn@ACIDNET.(none)>2009-11-10 13:18:26 +0100
commitdd6c331e2a83af4e911fecc70c47b74256ea3419 (patch)
tree696d25145161354ce4f034c21317e4e35702ae36 /lib/python/Components
parent5fdd7a8c7ad6c371cd1344898f68e1980e2a94b9 (diff)
downloadenigma2-dd6c331e2a83af4e911fecc70c47b74256ea3419.tar.gz
enigma2-dd6c331e2a83af4e911fecc70c47b74256ea3419.zip
Enigma2-{Wizard.py,Networksetup.py,ConfigList.py,skin_default.xml,NetworkWizard.py}: -add possibility to use the VirtualKeyboard globally with every ConfigText and ConfigPassword ConfigEntry inside ConfigListScreens and WizardScreens.
-add possibility to globally move the NumericalHelpInputWindow shown from a ConfigListScreen or a Wizard Screen to a inside the Skin defined Position This currently still needs following Skin entries defined in your Screens Skin: "<widget source="VKeyIcon" render="Pixmap" pixmap="skin_default/buttons/key_text.png" position="10,380" zPosition="10" size="35,25" transparent="1" alphatest="on" > <convert type="ConditionalShowHide" /> </widget>" used for Showing/hiding the TEXT Icon if the VirtualKeyboard is available. and: "<widget name="HelpWindow" pixmap="skin_default/vkey_icon.png" position="160,315" zPosition="1" size="1,1" transparent="1" alphatest="on" />" used to position the NumericalTextInputHelpWIndow inside your Screen as defined by your Screens Skin. also you need currently: from Components.Sources.Boolean import Boolean self["VKeyIcon"] = Boolean(False) self["HelpWindow"] = Pixmap() self["HelpWindow"].hide() inside your Screens sourcecode so we know that these items should be handled globally from Enigma2. - remove own Helpwindow/Vkey handling from NetworkSetup.py - include new VirtualKeyboardhandling inside NetworkWizard This fixes #157
Diffstat (limited to 'lib/python/Components')
-rwxr-xr-x[-rw-r--r--]lib/python/Components/ConfigList.py41
1 files changed, 38 insertions, 3 deletions
diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py
index 00949e2f..60785802 100644..100755
--- a/lib/python/Components/ConfigList.py
+++ b/lib/python/Components/ConfigList.py
@@ -1,7 +1,7 @@
from HTMLComponent import HTMLComponent
from GUIComponent import GUIComponent
-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 Components.ActionMap import NumberActionMap
+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, ConfigText, ConfigPassword
+from Components.ActionMap import NumberActionMap, ActionMap
from enigma import eListbox, eListboxPythonConfigContent, eRCInput, eTimer
from Screens.MessageBox import MessageBox
@@ -66,6 +66,7 @@ class ConfigList(HTMLComponent, GUIComponent, object):
self.current = self.getCurrent()
if self.current:
self.current[1].onSelect(self.session)
+
for x in self.onSelectionChanged:
x()
@@ -127,13 +128,47 @@ class ConfigListScreen:
"9": self.keyNumberGlobal,
"0": self.keyNumberGlobal
}, -1) # to prevent left/right overriding the listbox
+
+ self["VirtualKB"] = ActionMap(["VirtualKeyboardActions"],
+ {
+ "showVirtualKeyboard": self.KeyText,
+ }, -2)
+ self["VirtualKB"].setEnabled(False)
self["config"] = ConfigList(list, session = session)
+
if on_change is not None:
self.__changed = on_change
else:
self.__changed = lambda: None
-
+
+ if not self.handleInputHelpers in self["config"].onSelectionChanged:
+ self["config"].onSelectionChanged.append(self.handleInputHelpers)
+
+ def handleInputHelpers(self):
+ if isinstance(self["config"].getCurrent()[1], ConfigText) or isinstance(self["config"].getCurrent()[1], ConfigPassword):
+ if self.has_key("VKeyIcon"):
+ self["VirtualKB"].setEnabled(True)
+ self["VKeyIcon"].boolean = True
+ if self.has_key("HelpWindow"):
+ if self["config"].getCurrent()[1].help_window.instance is not None:
+ helpwindowpos = self["HelpWindow"].getPosition()
+ from enigma import ePoint
+ self["config"].getCurrent()[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
+ else:
+ if self.has_key("VKeyIcon"):
+ self["VirtualKB"].setEnabled(False)
+ self["VKeyIcon"].boolean = False
+
+ def KeyText(self):
+ from Screens.VirtualKeyBoard import VirtualKeyBoard
+ self.session.openWithCallback(self.VirtualKeyBoardCallback, VirtualKeyBoard, title = self["config"].getCurrent()[0], text = self["config"].getCurrent()[1].getValue())
+
+ def VirtualKeyBoardCallback(self, callback = None):
+ if callback is not None and len(callback):
+ self["config"].getCurrent()[1].setValue(callback)
+ self["config"].invalidate(self["config"].getCurrent())
+
def keyOK(self):
self["config"].handleKey(KEY_OK)