aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/NetworkSetup.py
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/Screens/NetworkSetup.py
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/Screens/NetworkSetup.py')
-rwxr-xr-xlib/python/Screens/NetworkSetup.py52
1 files changed, 4 insertions, 48 deletions
diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py
index ec2bafe5..401e0cf6 100755
--- a/lib/python/Screens/NetworkSetup.py
+++ b/lib/python/Screens/NetworkSetup.py
@@ -6,6 +6,7 @@ from Screens.VirtualKeyBoard import VirtualKeyBoard
from Screens.HelpMenu import HelpableScreen
from Components.Network import iNetwork
from Components.Sources.StaticText import StaticText
+from Components.Sources.Boolean import Boolean
from Components.Label import Label,MultiColorLabel
from Components.Pixmap import Pixmap,MultiPixmap
from Components.MenuList import MenuList
@@ -319,11 +320,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
"blue": (self.KeyBlue, _("open nameserver configuration")),
})
- self["VirtualKB"] = HelpableActionMap(self, "VirtualKeyboardActions",
- {
- "showVirtualKeyboard": (self.KeyText, [_("open virtual keyboard input help"),_("* Only available when entering hidden SSID or network key")] ),
- })
-
self["actions"] = NumberActionMap(["SetupActions"],
{
"ok": self.ok,
@@ -355,9 +351,10 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
self["key_red"] = StaticText(_("Cancel"))
self["key_blue"] = StaticText(_("Edit DNS"))
- self["VKeyIcon"] = Pixmap()
+ self["VKeyIcon"] = Boolean(False)
self["HelpWindow"] = Pixmap()
-
+ self["HelpWindow"].hide()
+
def layoutFinished(self):
self["DNS1"].setText(self.primaryDNS.getText())
self["DNS2"].setText(self.secondaryDNS.getText())
@@ -386,9 +383,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
self["Gateway"].setText("")
self["Gatewaytext"].setText("")
self["Adapter"].setText(iNetwork.getFriendlyAdapterName(self.iface))
- self["VKeyIcon"].hide()
- self["VirtualKB"].setEnabled(False)
- self["HelpWindow"].hide()
def createConfig(self):
self.InterfaceEntry = None
@@ -518,30 +512,10 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
self["config"].list = self.list
self["config"].l.setList(self.list)
- if not self.selectionChanged in self["config"].onSelectionChanged:
- self["config"].onSelectionChanged.append(self.selectionChanged)
def KeyBlue(self):
self.session.openWithCallback(self.NameserverSetupClosed, NameserverSetup)
- def KeyText(self):
- if self.iface == "wlan0" or self.iface == "ath0" :
- if self["config"].getCurrent() == self.hiddenSSID:
- if config.plugins.wlan.essid.value == 'hidden...':
- self.session.openWithCallback(self.VirtualKeyBoardSSIDCallback, VirtualKeyBoard, title = (_("Enter WLAN network name/SSID:")), text = config.plugins.wlan.essid.value)
- if self["config"].getCurrent() == self.encryptionKey:
- self.session.openWithCallback(self.VirtualKeyBoardKeyCallback, VirtualKeyBoard, title = (_("Enter WLAN passphrase/key:")), text = config.plugins.wlan.encryption.psk.value)
-
- def VirtualKeyBoardSSIDCallback(self, callback = None):
- if callback is not None and len(callback):
- config.plugins.wlan.hiddenessid.setValue(callback)
- self["config"].invalidate(self.hiddenSSID)
-
- def VirtualKeyBoardKeyCallback(self, callback = None):
- if callback is not None and len(callback):
- config.plugins.wlan.encryption.psk.setValue(callback)
- self["config"].invalidate(self.encryptionKey)
-
def newConfig(self):
if self["config"].getCurrent() == self.InterfaceEntry:
self.createSetup()
@@ -565,24 +539,6 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
ConfigListScreen.keyRight(self)
self.newConfig()
- def selectionChanged(self):
- current = self["config"].getCurrent()
- if current == self.hiddenSSID and config.plugins.wlan.essid.value == 'hidden...':
- helpwindowpos = self["HelpWindow"].getPosition()
- if current[1].help_window.instance is not None:
- current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
- self["VKeyIcon"].show()
- self["VirtualKB"].setEnabled(True)
- elif current == self.encryptionKey and config.plugins.wlan.encryption.enabled.value:
- helpwindowpos = self["HelpWindow"].getPosition()
- if current[1].help_window.instance is not None:
- current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
- self["VKeyIcon"].show()
- self["VirtualKB"].setEnabled(True)
- else:
- self["VKeyIcon"].hide()
- self["VirtualKB"].setEnabled(False)
-
def ok(self):
current = self["config"].getCurrent()
if current == self.hiddenSSID and config.plugins.wlan.essid.value == 'hidden...':