diff options
| author | thedoc <thedoc@atom.(none)> | 2009-12-23 11:24:17 +0100 |
|---|---|---|
| committer | thedoc <thedoc@atom.(none)> | 2009-12-23 11:24:17 +0100 |
| commit | bc8b453f3e2a5a142faa23efdb777165b33e788d (patch) | |
| tree | 12da09e98d3fbbfdee25d133a40015fb7665e789 /lib/python/Plugins/SystemPlugins | |
| parent | 9cfc3300e11cff63d3532d43d95bd17cba5b9cb4 (diff) | |
| parent | 5808051426cab03a0dc117c73b941b0afb05a87d (diff) | |
| download | enigma2-bc8b453f3e2a5a142faa23efdb777165b33e788d.tar.gz enigma2-bc8b453f3e2a5a142faa23efdb777165b33e788d.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Plugins/SystemPlugins')
65 files changed, 711 insertions, 452 deletions
diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am index 94be4747..d9d96bcf 100755 --- a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_cleanupwizard.xml + +EXTRA_DIST = cleanupwizard_de.jpg cleanupwizard_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg Binary files differnew file mode 100755 index 00000000..2f086fb8 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg Binary files differnew file mode 100755 index 00000000..d014cb5d --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/cleanupwizard_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml index 10ccc73c..99add3d3 100755 --- a/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml @@ -10,6 +10,7 @@ <description>The CleanupWizard informs you when your internal free memory of your dreambox has droppen under 2MB. You can use this wizard to remove some extensions. </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cleanupwizard_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -19,6 +20,7 @@ <description>Der CleanupWizard informiert Sie, wenn der interne freie Speicher Ihrer Dreambox unter 2MB fällt. Sie können dann einige Erweiterungen deinstallieren um wieder Platz zu schaffen. </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_cleanupwizard_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-cleanupwizard" /> diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg Binary files differindex 120ac827..75771f98 100644..100755 --- a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg +++ b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/ciassignment.jpg diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml index bb2bf590..9abc5986 100644..100755 --- a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml +++ b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml @@ -13,7 +13,7 @@ in your Dreambox and assign to each of them dedicated providers/services or caids.\n So it is then possible to watch a scrambled service while recording another one. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/ciassignment.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_ciassignment.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -24,7 +24,7 @@ So ist es möglich mit einem CI einen Sender aufzunehmen\n und mit einem anderen einen Sender zu schauen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/ciassignment.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_ciassignment.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-commoninterfaceassignment" /> diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am index b619c8c6..aed728db 100755 --- a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_crashlogautosubmit.xml + +EXTRA_DIST = crashlogautosubmit_de.jpg crashlogautosubmit_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg Binary files differnew file mode 100755 index 00000000..04894160 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg Binary files differnew file mode 100755 index 00000000..5e5c728b --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/crashlogautosubmit_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml index 261eb497..a118ed7f 100644..100755 --- a/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml +++ b/lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml @@ -10,6 +10,7 @@ <description>With the CrashlogAutoSubmit extension it is possible to automatically send crashlogs found on your Harddrive to Dream Multimedia </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_crashlogautosubmit_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -17,8 +18,9 @@ <packagename>enigma2-plugin-systemplugins-crashlogautosubmit</packagename> <shortdescription>Automatisches versenden von Crashlogs an Dream Multimedia</shortdescription> <description>Mit dem CrashlogAutoSubmit Plugin ist es möglich auf Ihrer Festplatte - gefundene Crashlogs automatisch an Dream Multimedia zu versenden. + gefundene Crashlogs automatisch an Dream Multimedia zu versenden. </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_crashlogautosubmit_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-crashlogautosubmit" /> diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg Binary files differindex a0fd3b1c..f4d0a1e2 100644..100755 --- a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg +++ b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/defaultservicescanner.jpg diff --git a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml index bf0ce253..41d41ed6 100644..100755 --- a/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml +++ b/lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml @@ -10,7 +10,7 @@ <shortdescription>Scans default lamedbs sorted by satellite with a connected dish positioner.</shortdescription> <description>With the DefaultServicesScanner extension you can scan default lamedbs sorted by satellite with a connected dish positioner. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/defaultservicescanner.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_defaultservicescanner.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -19,7 +19,7 @@ <shortdescription>Standard Sendersuche nach Satellit mit einem Rotor.</shortdescription> <description>Mit der DefaultServicesScanner Erweiterung können Sie eine standard Sendersuche nach Satellit mit einem angeschlossenen Rotor durchführen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/defaultservicescanner.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_defaultservicescanner.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-defaultservicesscanner" /> diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am index 8405ed7a..9b0a2ede 100755 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_diseqctester.xml -EXTRA_DIST = diseqctester.jpg +EXTRA_DIST = diseqctester_de.jpg diseqctester_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg Binary files differdeleted file mode 100644 index c872334c..00000000 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg Binary files differnew file mode 100755 index 00000000..5a6e1532 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg Binary files differnew file mode 100755 index 00000000..43dad76c --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/diseqctester_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml index 5415db08..33808b3e 100644..100755 --- a/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml +++ b/lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml @@ -10,7 +10,7 @@ <shortdescription>Test your Diseqc equipment.</shortdescription> <description>With the DiseqcTester extension you can test your satellite equipment for Diseqc compatibility and errors. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/diseqctester.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_diseqctester_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -19,7 +19,7 @@ <shortdescription>Testet Ihr Diseqc Equipment.</shortdescription> <description>Mit der DiseqcTester Erweiterung können Sie Ihr Satelliten-Equipment nach Diseqc-Kompatibilität und Fehlern überprüfen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/diseqctester.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_diseqctester_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-diseqctester" /> diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am index 686bded0..0633e7cf 100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_nfiflash.xml -EXTRA_DIST = nfiflash.jpg +EXTRA_DIST = nfiflash_de.jpg nfiflash_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg Binary files differdeleted file mode 100644 index 0a5fa469..00000000 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg Binary files differnew file mode 100755 index 00000000..fec93f4b --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg Binary files differnew file mode 100755 index 00000000..32a9967b --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/nfiflash_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml index 2de88f08..c81f4ca5 100644..100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml @@ -12,7 +12,7 @@ <description>With the NFIFlash extension it is possible to prepare a USB stick with an Dreambox image.\n It is then possible to flash your Dreambox with the image on that stick. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/nfiflash.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_nfiflash_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -22,7 +22,7 @@ <description>Mit der NFIFlash Erweiterung können Sie ein Dreambox Image auf einen USB-Stick laden.\ Mit diesem USB-Stick ist es dann möglich Ihre Dreambox zu flashen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/nfiflash.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_nfiflash_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-nfiflash" /> diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py index 40914e12..28b33305 100644..100755 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py @@ -1,20 +1,28 @@ +from Plugins.Plugin import PluginDescriptor +from Tools.HardwareInfo import HardwareInfo +from Tools.Directories import fileExists +from downloader import NFIDownload, filescan + +def NFIFlasherMain(session, tmp = None, **kwargs): + session.open(NFIDownload, "/home/root" ) + +def NFICallFnc(tmp = None): + return NFIFlasherMain + def Plugins(**kwargs): - from Plugins.Plugin import PluginDescriptor - from Tools.HardwareInfo import HardwareInfo # currently only available for DM8000 if HardwareInfo().get_device_name() != "dm8000": return [PluginDescriptor()] - from Tools.Directories import fileExists if fileExists("/usr/share/bootlogo-flasher.mvi"): import flasher # started from usb stick # don't try to be intelligent and trick this - it's not possible to rewrite the flash memory with a system currently booted from it return [PluginDescriptor(where = PluginDescriptor.WHERE_WIZARD, fnc = (9,flasher.NFIFlash))] else: # started on real enigma2 - import downloader - return [PluginDescriptor(name="NFI Image Flashing", - description = _("Download .NFI-Files for USB-Flasher"), + return [PluginDescriptor(name=_("NFI Image Flashing"), + description=_("Download .NFI-Files for USB-Flasher"), icon = "flash.png", - where = [PluginDescriptor.WHERE_PLUGINMENU], - fnc = downloader.main), PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = downloader.filescan) - ] + where = PluginDescriptor.WHERE_SOFTWAREMANAGER, + fnc={"SoftwareSupported": NFICallFnc, "menuEntryName": lambda x: _("NFI Image Flashing"), + "menuEntryDescription": lambda x: _("Download .NFI-Files for USB-Flasher")}), + PluginDescriptor(name="nfi", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py b/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py index 4d361157..75ca390b 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py @@ -2,17 +2,12 @@ from Screens.Wizard import wizardManager, WizardSummary from Screens.WizardLanguage import WizardLanguage from Screens.Rc import Rc from Screens.MessageBox import MessageBox - from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap +from Components.Sources.Boolean import Boolean from Components.config import config, ConfigBoolean, configfile, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, getConfigListEntry, ConfigSelection, ConfigPassword from Components.Network import iNetwork - -#from Components.Label import Label -#from Components.MenuList import MenuList -#from Components.PluginComponent import plugins -#from Plugins.Plugin import PluginDescriptor from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE -#import time, os, re +from enigma import eTimer config.misc.firstrun = ConfigBoolean(default = True) @@ -39,7 +34,7 @@ config.plugins.wlan.encryption.psk = NoSave(ConfigPassword(default = "mysecurewl class NetworkWizard(WizardLanguage, Rc): skin = """ <screen position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder" > - <widget name="text" position="153,40" size="340,330" font="Regular;22" /> + <widget name="text" position="153,40" size="340,300" font="Regular;22" /> <widget source="list" render="Listbox" position="53,340" size="440,180" scrollbarMode="showOnDemand" > <convert type="StringList" /> </widget> @@ -52,6 +47,10 @@ class NetworkWizard(WizardLanguage, Rc): <widget name="arrowdown2" pixmap="skin_default/arrowdown.png" position="-100,-100" zPosition="11" size="37,70" alphatest="on" /> <widget name="arrowup" pixmap="skin_default/arrowup.png" position="-100,-100" zPosition="11" size="37,70" alphatest="on" /> <widget name="arrowup2" pixmap="skin_default/arrowup.png" position="-100,-100" zPosition="11" size="37,70" alphatest="on" /> + <widget source="VKeyIcon" render="Pixmap" pixmap="skin_default/buttons/key_text.png" position="40,260" zPosition="0" size="35,25" transparent="1" alphatest="on" > + <convert type="ConditionalShowHide" /> + </widget> + <widget name="HelpWindow" pixmap="skin_default/buttons/key_text.png" position="125,170" zPosition="1" size="1,1" transparent="1" alphatest="on" /> </screen>""" def __init__(self, session): self.xmlfile = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkWizard/networkwizard.xml") @@ -59,20 +58,68 @@ class NetworkWizard(WizardLanguage, Rc): Rc.__init__(self) self.session = session self["wizard"] = Pixmap() - + self["HelpWindow"] = Pixmap() + self["HelpWindow"].hide() + self["VKeyIcon"] = Boolean(False) + + self.InstalledInterfaceCount = None + self.Adapterlist = None self.InterfaceState = None self.isInterfaceUp = None self.WlanPluginInstalled = None self.ap = None self.selectedInterface = None self.NextStep = None - self.myref = None + self.resetRef = None self.checkRef = None self.AdapterRef = None + self.APList = None + self.newAPlist = None self.WlanList = None + self.oldlist = None + self.originalAth0State = None + self.originalEth0State = None + self.originalWlan0State = None + self.originalInterfaceStateChanged = False + self.Text = None + self.rescanTimer = eTimer() + self.rescanTimer.callback.append(self.rescanTimerFired) + self.getInstalledInterfaceCount() self.isWlanPluginInstalled() + + def exitWizardQuestion(self, ret = False): + if (ret): + self.markDone() + self.close() + + def markDone(self): + self.rescanTimer.stop() + del self.rescanTimer + pass + + def getInstalledInterfaceCount(self): + self.rescanTimer.stop() + self.Adapterlist = iNetwork.getAdapterList() + self.InstalledInterfaceCount = len(self.Adapterlist) + self.originalAth0State = iNetwork.getAdapterAttribute('ath0', 'up') + self.originalEth0State = iNetwork.getAdapterAttribute('eth0', 'up') + self.originalWlan0State = iNetwork.getAdapterAttribute('wlan0', 'up') + + def checkOldInterfaceState(self): + # disable up interface if it was originally down and config is unchanged. + if self.originalAth0State is False and self.originalInterfaceStateChanged is False: + if iNetwork.checkforInterface('ath0') is True: + iNetwork.deactivateInterface('ath0') + if self.originalEth0State is False and self.originalInterfaceStateChanged is False: + if iNetwork.checkforInterface('eth0') is True: + iNetwork.deactivateInterface('eth0') + if self.originalWlan0State is False and self.originalInterfaceStateChanged is False: + if iNetwork.checkforInterface('wlan0') is True: + iNetwork.deactivateInterface('wlan0') def listInterfaces(self): + self.rescanTimer.stop() + self.checkOldInterfaceState() list = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()] list.append((_("Exit network wizard"), "end")) return list @@ -93,46 +140,30 @@ class NetworkWizard(WizardLanguage, Rc): self.InterfaceSelect(self.selection) def checkInterface(self,iface): - self.Adapterlist = iNetwork.getAdapterList() + self.rescanTimer.stop() + if self.Adapterlist is None: + self.Adapterlist = iNetwork.getAdapterList() if self.NextStep is not 'end': if len(self.Adapterlist) == 0: #Reset Network to defaults if network broken - iNetwork.resetNetworkConfig('lan', self.checkInterfaceCB) - self.myref = self.session.openWithCallback(self.resetfinishedCB, MessageBox, _("Please wait while we prepare your network interfaces..."), type = MessageBox.TYPE_INFO, enable_input = False) - if iface == 'eth0': + iNetwork.resetNetworkConfig('lan', self.resetNetworkConfigCB) + self.resetRef = self.session.openWithCallback(self.resetNetworkConfigFinished, MessageBox, _("Please wait while we prepare your network interfaces..."), type = MessageBox.TYPE_INFO, enable_input = False) + if iface in ('eth0', 'wlan0', 'ath0'): if iface in iNetwork.configuredNetworkAdapters and len(iNetwork.configuredNetworkAdapters) == 1: if iNetwork.getAdapterAttribute(iface, 'up') is True: self.isInterfaceUp = True else: self.isInterfaceUp = False - self.resetfinishedCB(False) + self.currStep = self.getStepWithID(self.NextStep) + self.afterAsyncCode() else: - iNetwork.resetNetworkConfig('lan',self.checkInterfaceCB) - self.myref = self.session.openWithCallback(self.resetfinishedCB, MessageBox, _("Please wait while we prepare your network interfaces..."), type = MessageBox.TYPE_INFO, enable_input = False) - elif iface == 'wlan0': - if iface in iNetwork.configuredNetworkAdapters and len(iNetwork.configuredNetworkAdapters) == 1: - if iNetwork.getAdapterAttribute(iface, 'up') is True: - self.isInterfaceUp = True - else: - self.isInterfaceUp = False - self.resetfinishedCB(False) - else: - iNetwork.resetNetworkConfig('wlan',self.checkInterfaceCB) - self.myref = self.session.openWithCallback(self.resetfinishedCB, MessageBox, _("Please wait while we prepare your network interfaces..."), type = MessageBox.TYPE_INFO, enable_input = False) - elif iface == 'ath0': - if iface in iNetwork.configuredNetworkAdapters and len(iNetwork.configuredNetworkAdapters) == 1: - if iNetwork.getAdapterAttribute(iface, 'up') is True: - self.isInterfaceUp = True - else: - self.isInterfaceUp = False - self.resetfinishedCB(False) - else: - iNetwork.resetNetworkConfig('wlan-mpci',self.checkInterfaceCB) - self.myref = self.session.openWithCallback(self.resetfinishedCB, MessageBox, _("Please wait while we prepare your network interfaces..."), type = MessageBox.TYPE_INFO, enable_input = False) + self.isInterfaceUp = iNetwork.checkforInterface(iface) + self.currStep = self.getStepWithID(self.NextStep) + self.afterAsyncCode() else: - self.resetfinishedCB(False) + self.resetNetworkConfigFinished(False) - def resetfinishedCB(self,data): + def resetNetworkConfigFinished(self,data): if data is True: self.currStep = self.getStepWithID(self.NextStep) self.afterAsyncCode() @@ -140,33 +171,42 @@ class NetworkWizard(WizardLanguage, Rc): self.currStep = self.getStepWithID(self.NextStep) self.afterAsyncCode() - def checkInterfaceCB(self,callback,iface): + def resetNetworkConfigCB(self,callback,iface): if callback is not None: if callback is True: - iNetwork.getInterfaces(self.getInterfacesDataAvail) + iNetwork.getInterfaces(self.getInterfacesFinished) - - def getInterfacesDataAvail(self, data): + def getInterfacesFinished(self, data): if data is True: if iNetwork.getAdapterAttribute(self.selectedInterface, 'up') is True: self.isInterfaceUp = True else: self.isInterfaceUp = False - self.myref.close(True) + self.resetRef.close(True) + else: + print "we should never come here!" def AdapterSetupEnd(self, iface): + self.originalInterfaceStateChanged = True if iNetwork.getAdapterAttribute(iface, "dhcp") is True: iNetwork.checkNetworkState(self.AdapterSetupEndFinished) self.AdapterRef = self.session.openWithCallback(self.AdapterSetupEndCB, MessageBox, _("Please wait while we test your network..."), type = MessageBox.TYPE_INFO, enable_input = False) - else: self.currStep = self.getStepWithID("confdns") self.afterAsyncCode() def AdapterSetupEndCB(self,data): if data is True: - self.currStep = self.getStepWithID("checklanstatusend") - self.afterAsyncCode() + if self.selectedInterface in ('wlan0', 'ath0'): + if self.WlanPluginInstalled == True: + from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus + iStatus.getDataForInterface(self.selectedInterface,self.checkWlanStateCB) + else: + self.currStep = self.getStepWithID("checklanstatusend") + self.afterAsyncCode() + else: + self.currStep = self.getStepWithID("checklanstatusend") + self.afterAsyncCode() def AdapterSetupEndFinished(self,data): if data <= 2: @@ -175,66 +215,139 @@ class NetworkWizard(WizardLanguage, Rc): self.InterfaceState = False self.AdapterRef.close(True) + def checkWlanStateCB(self,data,status): + if data is not None: + if data is True: + if status is not None: + text1 = _("Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\n") + text2 = _('Accesspoint:') + "\t" + status[self.selectedInterface]["acesspoint"] + "\n" + text3 = _('SSID:') + "\t" + status[self.selectedInterface]["essid"] + "\n" + text4 = _('Link Quality:') + "\t" + status[self.selectedInterface]["quality"]+"%" + "\n" + text5 = _('Signal Strength:') + "\t" + status[self.selectedInterface]["signal"] + "\n" + text6 = _('Bitrate:') + "\t" + status[self.selectedInterface]["bitrate"] + "\n" + text7 = _('Encryption:') + " " + status[self.selectedInterface]["encryption"] + "\n" + text8 = _("Please press OK to continue.") + infotext = text1 + text2 + text3 + text4 + text5 + text7 +"\n" + text8 + self.currStep = self.getStepWithID("checkWlanstatusend") + self.Text = infotext + self.afterAsyncCode() + def checkNetwork(self): - iNetwork.checkNetworkState(self.checkNetworkStateFinished) + iNetwork.checkNetworkState(self.checkNetworkStateCB) self.checkRef = self.session.openWithCallback(self.checkNetworkCB, MessageBox, _("Please wait while we test your network..."), type = MessageBox.TYPE_INFO, enable_input = False) def checkNetworkCB(self,data): if data is True: - self.currStep = self.getStepWithID("checklanstatusend") - self.afterAsyncCode() + if self.selectedInterface in ('wlan0', 'ath0'): + if self.WlanPluginInstalled == True: + from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus + iStatus.getDataForInterface(self.selectedInterface,self.checkWlanStateCB) + else: + self.currStep = self.getStepWithID("checklanstatusend") + self.afterAsyncCode() + else: + self.currStep = self.getStepWithID("checklanstatusend") + self.afterAsyncCode() - def checkNetworkStateFinished(self,data): + def checkNetworkStateCB(self,data): if data <= 2: self.InterfaceState = True else: self.InterfaceState = False self.checkRef.close(True) - def markDone(self): - pass + def rescanTimerFired(self): + self.rescanTimer.stop() + self.updateAPList() - def listModes(self): - list = [] - self.WlanList = [] + def updateAPList(self): + self.oldlist = self.APList + self.newAPlist = [] + newList = [] + newListIndex = None + currentListEntry = None + newList = self.listAccessPoints() + + for oldentry in self.oldlist: + if oldentry not in newList: + newList.append(oldentry) + + for newentry in newList: + if newentry[1] == "hidden...": + continue + self.newAPlist.append(newentry) + + if len(self.newAPlist): + if "hidden..." not in self.newAPlist: + self.newAPlist.append(( _("enter hidden network SSID"), "hidden..." )) + + if (self.wizard[self.currStep].has_key("dynamiclist")): + currentListEntry = self["list"].getCurrent() + idx = 0 + for entry in self.newAPlist: + if entry == currentListEntry: + newListIndex = idx + idx +=1 + self.wizard[self.currStep]["evaluatedlist"] = self.newAPlist + self['list'].setList(self.newAPlist) + self["list"].setIndex(newListIndex) + self["list"].updateList(self.newAPlist) + + def listAccessPoints(self): + self.APList = [] try: from Plugins.SystemPlugins.WirelessLan.Wlan import Wlan except ImportError: - list.append( ( _("No networks found"),_("unavailable") ) ) - self.WlanList.append(_("No networks found")) - return list + self.APList.append( ( _("No networks found"),_("unavailable") ) ) + return self.APList else: self.w = Wlan(self.selectedInterface) aps = self.w.getNetworkList() if aps is not None: print "[NetworkWizard.py] got Accespoints!" + tmplist = [] + complist = [] for ap in aps: a = aps[ap] if a['active']: - if a['essid'] != "": - #a['essid'] = a['bssid'] - list.append( (a['essid'], a['essid']) ) - self.WlanList.append(a['essid']) - if "hidden..." not in list: - list.append( ( _("enter hidden network SSID"),_("hidden...") ) ) - self.WlanList.append(_("hidden...")) - return list - - def modeSelectionMade(self, index): - self.modeSelect(index) - - def modeSelectionMoved(self): - self.modeSelect(self.selection) + tmplist.append( (a['bssid'], a['essid']) ) + complist.append( (a['bssid'], a['essid']) ) + + for entry in tmplist: + if entry[1] == "": + for compentry in complist: + if compentry[0] == entry[0]: + complist.remove(compentry) + for entry in complist: + self.APList.append( (entry[1], entry[1]) ) + + if "hidden..." not in self.APList: + self.APList.append(( _("enter hidden network SSID"), "hidden..." )) - def modeSelect(self, mode): - self.ap = mode - print "ModeSelected:", mode + self.rescanTimer.start(3000) + return self.APList - def restartNetwork(self): - iNetwork.restartNetwork() - self.checkNetwork() - - def isWlanPluginInstalled(self): + def AccessPointsSelectionMade(self, index): + self.ap = index + self.WlanList = [] + currList = [] + if (self.wizard[self.currStep].has_key("dynamiclist")): + currList = self['list'].list + for entry in currList: + self.WlanList.append( (entry[1], entry[0]) ) + self.AccessPointsSelect(index) + + def AccessPointsSelect(self, index): + self.NextStep = 'wlanconfig' + + def AccessPointsSelectionMoved(self): + self.AccessPointsSelect(self.selection) + + def checkWlanSelection(self): + self.rescanTimer.stop() + self.currStep = self.getStepWithID(self.NextStep) + + def isWlanPluginInstalled(self): try: from Plugins.SystemPlugins.WirelessLan.Wlan import Wlan except ImportError: @@ -242,3 +355,5 @@ class NetworkWizard(WizardLanguage, Rc): else: self.WlanPluginInstalled = True + + diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am index 98dbe80b..e8f738c6 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am @@ -1,3 +1,5 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_networkwizard.xml + +EXTRA_DIST = networkwizard_en.jpg networkwizard_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg Binary files differnew file mode 100755 index 00000000..3999a413 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg Binary files differnew file mode 100755 index 00000000..0a0434a0 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/networkwizard_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml index 660bbcd2..4d3adcbd 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml @@ -9,6 +9,7 @@ <shortdescription>Step by step network configuration</shortdescription> <description>With the NetworkWizard you can easy configure your network step by step. </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_networkwizard_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -18,6 +19,7 @@ <description>Mit dem NetzwerkWizard können Sie Ihr Netzwerk konfigurieren. Sie werden Schritt für Schritt durch die Konfiguration geleitet. </description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_networkwizard_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-networkwizard" /> diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/networkwizard.xml b/lib/python/Plugins/SystemPlugins/NetworkWizard/networkwizard.xml index 134797a7..dcd9d933 100755 --- a/lib/python/Plugins/SystemPlugins/NetworkWizard/networkwizard.xml +++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/networkwizard.xml @@ -1,172 +1,202 @@ <wizard> - <step id="welcome" nextstep="selectinterface"> - <text value="Welcome.\n\nIf you want to connect your Dreambox to the Internet, this wizard will guide you through the basic network setup of your Dreambox.\n\nPress OK to start configuring your network" /> - <displaytext value="Network Wizard" /> - <code> + <step id="welcome" nextstep="selectinterface"> + <text value="Welcome.\n\nIf you want to connect your Dreambox to the Internet, this wizard will guide you through the basic network setup of your Dreambox.\n\nPress OK to start configuring your network" /> + <displaytext value="Network Wizard" /> + <code> self.clearSelectedKeys() self.selectKey("OK") - </code> - </step> + </code> + </step> - <step id="selectinterface"> - <text value="Please select the network interface that you want to use for your internet connection.\n\nPlease press OK to continue." /> - <displaytext value="Select interface" /> - <list type="dynamic" source="listInterfaces" evaluation="InterfaceSelectionMade" onselect="InterfaceSelectionMoved" /> - <code> + <step id="selectinterface"> + <text value="Please select the network interface that you want to use for your internet connection.\n\nPlease press OK to continue." /> + <displaytext value="Select interface" /> + <list type="dynamic" source="listInterfaces" evaluation="InterfaceSelectionMade" onselect="InterfaceSelectionMoved" /> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") - </code> - <code pos="after" async="yes"> + </code> + <code pos="after" async="yes"> self.checkInterface(self.selectedInterface) - </code> - </step> - - <step id="nwconfig"> - <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." /> - <displaytext value="Configure interface" /> - <config screen="AdapterSetup" module="NetworkSetup" args="self.selectedInterface" type="ConfigList" /> - <code> + </code> + </step> + <step id="nwconfig"> + <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." /> + <displaytext value="Configure interface" /> + <config screen="AdapterSetup" module="NetworkSetup" args="self.selectedInterface" type="ConfigList" /> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") self.selectKey("LEFT") self.selectKey("RIGHT") - </code> - <code pos="after" async="yes"> + </code> + <code pos="after" async="yes"> self.AdapterSetupEnd(self.selectedInterface) - </code> - </step> - - <step id="confdns" nextstep="checklanstatusend"> - <text value="Please configure or verify your Nameservers by filling out the required values.\nWhen you are ready press OK to continue." /> - <displaytext value="Configure nameservers" /> - <config screen="NameserverSetup" module="NetworkSetup" type="ConfigList" /> - <code> + </code> + </step> + <step id="confdns" nextstep="checklanstatusend"> + <text value="Please configure or verify your Nameservers by filling out the required values.\nWhen you are ready press OK to continue." /> + <displaytext value="Configure nameservers" /> + <config screen="NameserverSetup" module="NetworkSetup" type="ConfigList" /> + <code> self.clearSelectedKeys() self.selectKey("OK") - </code> - <code pos="after" async="yes"> + </code> + <code pos="after" async="yes"> self.checkNetwork() - </code> - </step> - - <step id="checklanstatusend" nextstep="end"> + </code> + </step> + <step id="checklanstatusend" nextstep="end"> <condition> self.condition = (self.InterfaceState == True ) </condition> - <text value="Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\nPlease press OK to continue." /> - <displaytext value="Please follow the instructions on the TV" /> - <code> + <text value="Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\nPlease press OK to continue." /> + <displaytext value="Please follow the instructions on the TV" /> + <code> self.clearSelectedKeys() self.selectKey("OK") - </code> - <code pos="after"> -currStep = self.numSteps + </code> + <code pos="after"> +currStep = self.numSteps self.wizard[currStep]["nextstep"] = None self.markDone() self.close() - </code> - </step> - - <step id="checklanstatusend"> + </code> + </step> + <step id="checklanstatusend"> <condition> self.condition = (self.InterfaceState == False ) </condition> - <text value="Your internet connection is not working!\nPlease choose what you want to do next." /> - <displaytext value="Please follow the instructions on the TV" /> - <code> + <text value="Your internet connection is not working!\nPlease choose what you want to do next." /> + <displaytext value="Please follow the instructions on the TV" /> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") - </code> - <list> - <listentry caption="Configure your network again" step="selectinterface" /> - <listentry caption="Exit network wizard" step="end" /> - </list> - </step> - - <step id="scanwlan" nextstep="wlanconfig"> + </code> + <list> + <listentry caption="Configure your network again" step="selectinterface" /> + <listentry caption="Exit network wizard" step="end" /> + </list> + </step> + <step id="scanwlan"> <condition> self.condition = (self.isInterfaceUp == True and self.WlanPluginInstalled == True) - </condition> - <text value="Please select the wireless network that you want to connect to.\n\nPlease press OK to continue." /> - <displaytext value="Select wireless network" /> - <list type="dynamic" source="listModes" evaluation="modeSelectionMade" onselect="modeSelectionMoved" /> - <code> + </condition> + <text value="Please select the wireless network that you want to connect to.\n\nPlease press OK to continue." /> + <displaytext value="Select wireless network" /> + <list type="dynamic" source="listAccessPoints" evaluation="AccessPointsSelectionMade" onselect="AccessPointsSelectionMoved" /> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") self.selectKey("LEFT") self.selectKey("RIGHT") - </code> - </step> - - <step id="scanwlan"> - <condition> + </code> + <code pos="after"> +self.checkWlanSelection() + </code> + </step> + <step id="scanwlan"> + <condition> self.condition = (self.isInterfaceUp == False and self.WlanPluginInstalled == True) - </condition> - <text value="Your wireless LAN internet connection could not be started!\nHave you attached your USB WLAN Stick?\n\nPlease choose what you want to do next." /> - <displaytext value="Please follow the instructions on the TV" /> - <list> - <listentry caption="Configure your wireless LAN again" step="scanwlan" /> - <listentry caption="Configure your internal LAN" step="selectinterface" /> - <listentry caption="Exit network wizard" step="end" /> - </list> - <code> + </condition> + <text value="Your wireless LAN internet connection could not be started!\nHave you attached your USB WLAN Stick?\n\nPlease choose what you want to do next." /> + <displaytext value="Please follow the instructions on the TV" /> + <list> + <listentry caption="Configure your wireless LAN again" step="scanwlan" /> + <listentry caption="Configure your internal LAN" step="selectinterface" /> + <listentry caption="Exit network wizard" step="end" /> + </list> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") - </code> - </step> - - <step id="scanwlan"> - <condition> + </code> + </step> + <step id="scanwlan"> + <condition> self.condition = (self.isInterfaceUp == True and self.WlanPluginInstalled == False) - </condition> - <text value="The wireless LAN plugin is not installed!\nPlease install it and choose what you want to do next." /> - <displaytext value="Please follow the instructions on the TV" /> - <list> - <listentry caption="Configure your internal LAN" step="selectinterface" /> - <listentry caption="Exit network wizard" step="end" /> - </list> - <code> + </condition> + <text value="The wireless LAN plugin is not installed!\nPlease install it and choose what you want to do next." /> + <displaytext value="Please follow the instructions on the TV" /> + <list> + <listentry caption="Configure your internal LAN" step="selectinterface" /> + <listentry caption="Exit network wizard" step="end" /> + </list> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") - </code> - </step> - - <step id="wlanconfig"> - <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." /> - <displaytext value="Configure interface" /> - <config screen="AdapterSetup" module="NetworkSetup" args="(self.selectedInterface,self.ap,self.WlanList)" type="ConfigList" /> - <code> + </code> + </step> + <step id="wlanconfig"> + <text value="Please configure your internet connection by filling out the required values.\nWhen you are ready press OK to continue." /> + <displaytext value="Configure interface" /> + <config screen="AdapterSetup" module="NetworkSetup" args="(self.selectedInterface,self.ap,self.WlanList)" type="ConfigList" /> + <code> self.clearSelectedKeys() self.selectKey("OK") self.selectKey("UP") self.selectKey("DOWN") self.selectKey("LEFT") self.selectKey("RIGHT") - </code> - <code pos="after" async="yes"> + </code> + <code pos="after" async="yes"> self.AdapterSetupEnd(self.selectedInterface) - </code> - </step> + </code> + </step> + <step id="checkWlanstatusend" nextstep="end"> + <condition> +self.condition = (self.InterfaceState == True ) + </condition> + <text value="Your Dreambox is now ready to use.\n\nYour internet connection is working now.\n\nPlease press OK to continue." /> + <displaytext value="Please follow the instructions on the TV" /> + <code> +self.clearSelectedKeys() +self.selectKey("OK") +self["text"].setText(self.Text) + </code> + <code pos="after"> +currStep = self.numSteps +self.wizard[currStep]["nextstep"] = None +self.markDone() +self.close() + </code> + </step> + <step id="checkWlanstatusend"> + <condition> +self.condition = (self.InterfaceState == False ) + </condition> + <text value="Your internet connection is not working!\nPlease choose what you want to do next." /> + <displaytext value="Please follow the instructions on the TV" /> + <code> +self.clearSelectedKeys() +self.selectKey("OK") +self.selectKey("UP") +self.selectKey("DOWN") + </code> + <list> + <listentry caption="Configure your network again" step="selectinterface" /> + <listentry caption="Exit network wizard" step="end" /> + </list> + </step> - <step id="end"> - <text value="Thank you for using the wizard.\nPlease press OK to continue." /> - <code> + <step id="end"> + <text value="Thank you for using the wizard.\nPlease press OK to continue." /> + <code> self.clearSelectedKeys() self.selectKey("OK") - </code> - </step> + </code> + </step> </wizard> diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml index d20b2e68..2cb47c07 100644..100755 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml @@ -10,7 +10,7 @@ <shortdescription>PositionerSetup helps you installing a motorized dish.</shortdescription> <description>With the PositionerSetup extension it is easy to install and configure a motorized dish. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/positionersetup.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_positionersetup.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -20,7 +20,7 @@ <description>Die PositionerSetup Erweiterung unterstützt Sie beim einrichten und konfigurieren einer motorgesteuerten Satellitenantenne. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/positionersetup.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_positionersetup.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-positionersetup" /> diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg Binary files differindex 63072137..7f8d8d22 100644..100755 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/meta/positionersetup.jpg diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml index 8fa36e54..4c0c7af7 100644..100755 --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml @@ -11,7 +11,7 @@ <shortdescription>SatelliteEquipmentControl allows you to fine-tune DiSEqC-settings.</shortdescription> <description>With the SatelliteEquipmentControl extension it is possible to fine-tune DiSEqC-settings. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/satcontrol.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satcontrol.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -20,7 +20,7 @@ <shortdescription>Fein-Einstellungen für DiSEqC</shortdescription> <description>Die SatelliteEquipmentControl-Erweiterung unterstützt Sie beim Feintuning der DiSEqC Einstellungen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/satcontrol.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satcontrol.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-satelliteequipmentcontrol" /> diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg Binary files differindex b9596a69..703650e2 100644..100755 --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/satcontrol.jpg diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml b/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml index aaab7e42..e9453deb 100644..100755 --- a/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml +++ b/lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml @@ -8,10 +8,10 @@ <name>Satfinder</name> <packagename>enigma2-plugin-systemplugins-satfinder</packagename> <shortdescription>Satfinder helps you to align your dish.</shortdescription> - <description>The Satfinder extension helps you to align your dish.\ + <description>The Satfinder extension helps you to align your dish.\n It shows you informations about signal rate and errors. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/satfinder.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satfinder.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -21,7 +21,7 @@ <description>Die Satfinder-Erweiterung unterstützt Sie beim Ausrichten ihrer Satellitenanlage.\n Es zeigt Ihnen Daten wie Signalstärke und Fehlerrate an. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/satfinder.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_satfinder.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-satfinder" /> diff --git a/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg b/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg Binary files differindex c0bba0c8..44f09811 100644..100755 --- a/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg +++ b/lib/python/Plugins/SystemPlugins/Satfinder/meta/satfinder.jpg diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am index 689d97ef..d29fb002 100755 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_skinselector.xml -EXTRA_DIST = skinselector.jpg +EXTRA_DIST = skinselector_de.jpg skinselector_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml index 4ce7f1b0..717f732b 100644..100755 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml @@ -11,7 +11,7 @@ <description>The SkinSelector shows a menu with selectable skins.\n It's now easy to change the look and feel of your Dreambox. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/skinselector.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -21,7 +21,7 @@ <description>Die SkinSelector Erweiterung zeigt Ihnen ein Menu mit auswählbaren Skins.\n Sie können nun einfach das Aussehen der grafischen Oberfläche Ihrer Dreambox verändern. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/skinselector.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-skinselector" /> diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg Binary files differdeleted file mode 100644 index 74395eaa..00000000 --- a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg Binary files differnew file mode 100755 index 00000000..3b40708a --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg Binary files differnew file mode 100755 index 00000000..b9f0bd3e --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/SkinSelector/meta/skinselector_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py index 871f0a30..d9ccab57 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py @@ -66,6 +66,7 @@ class BackupScreen(Screen, ConfigListScreen): self.setTitle(_("Backup is running...")) def doBackup(self): + configfile.save() try: if (path.exists(self.backuppath) == False): makedirs(self.backuppath) diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am index 341938c5..05a87d5a 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_softwaremanager.xml -EXTRA_DIST = softmanager.jpg +EXTRA_DIST = softwaremanager_en.jpg softwaremanager_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml index fa84670e..cd425c33 100644..100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml @@ -11,7 +11,7 @@ <description>The SoftwareManager manages your Dreambox software.\n It's easy to update your receiver's software, install or remove extensions or even backup and restore your system settings. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/softmanager.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -22,7 +22,7 @@ Sie können nun einfach Ihre Dreambox-Software aktualisieren, neue Erweiterungen installieren oder entfernen, oder ihre Einstellungen sichern und wiederherstellen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/softmanager.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> <file type="package" name="enigma2-plugin-systemplugins-softwaremanager" /> diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg Binary files differdeleted file mode 100644 index a9d5a629..00000000 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softmanager.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg Binary files differnew file mode 100755 index 00000000..54e64196 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg Binary files differnew file mode 100755 index 00000000..0832f0ac --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/softwaremanager_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index 3a1f835f..c70201b3 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -23,7 +23,7 @@ from Components.About import about from Components.DreamInfoHandler import DreamInfoHandler from Components.Language import language from Components.AVSwitch import AVSwitch -from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE, SCOPE_METADIR +from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_PLUGIN, SCOPE_CURRENT_SKIN, SCOPE_METADIR from Tools.LoadPixmap import LoadPixmap from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad from cPickle import dump, load @@ -108,21 +108,47 @@ class UpdatePluginMenu(Screen): self.oktext = _("\nPress OK on your remote control to continue.") self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) if self.menu == 0: - self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext) ) - #self.list.append(("install-plugins", _("Install extensions"), _("\nInstall new Extensions or Plugins to your dreambox" ) + self.oktext) ) - self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext)) - self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext)) - self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext)) - self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local packages and install them." ) + self.oktext)) + self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None)) + #self.list.append(("install-plugins", _("Install extensions"), _("\nInstall new Extensions or Plugins to your dreambox" ) + self.oktext, None)) + self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None)) + self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext, None)) + self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None)) + self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local packages and install them." ) + self.oktext, None)) + for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): + if p.__call__.has_key("SoftwareSupported"): + callFnc = p.__call__["SoftwareSupported"](None) + if callFnc is not None: + if p.__call__.has_key("menuEntryName"): + menuEntryName = p.__call__["menuEntryName"](None) + else: + menuEntryName = _('Extended Software') + if p.__call__.has_key("menuEntryDescription"): + menuEntryDescription = p.__call__["menuEntryDescription"](None) + else: + menuEntryDescription = _('Extended Software Plugin') + self.list.append(('default-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc)) if config.usage.setup_level.index >= 2: # expert+ - self.list.append(("advanced", _("Advanced Options"), _("\nAdvanced options and settings." ) + self.oktext)) + self.list.append(("advanced", _("Advanced Options"), _("\nAdvanced options and settings." ) + self.oktext, None)) elif self.menu == 1: - self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext)) - self.list.append(("backuplocation", _("Choose backup location"), _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext )) - self.list.append(("backupfiles", _("Choose backup files"), _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext)) + self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None)) + self.list.append(("backuplocation", _("Choose backup location"), _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None)) + self.list.append(("backupfiles", _("Choose backup files"), _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None)) if config.usage.setup_level.index >= 2: # expert+ - self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext)) - self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext)) + self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext, None)) + self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None)) + for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): + if p.__call__.has_key("AdvancedSoftwareSupported"): + callFnc = p.__call__["AdvancedSoftwareSupported"](None) + if callFnc is not None: + if p.__call__.has_key("menuEntryName"): + menuEntryName = p.__call__["menuEntryName"](None) + else: + menuEntryName = _('Advanced Software') + if p.__call__.has_key("menuEntryDescription"): + menuEntryDescription = p.__call__["menuEntryDescription"](None) + else: + menuEntryDescription = _('Advanced Software Plugin') + self.list.append(('advanced-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc)) self["menu"] = List(self.list) self["key_red"] = StaticText(_("Close")) @@ -150,33 +176,36 @@ class UpdatePluginMenu(Screen): def go(self): current = self["menu"].getCurrent() if current: - current = current[0] + currentEntry = current[0] if self.menu == 0: - if (current == "software-update"): + if (currentEntry == "software-update"): self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!")) - elif (current == "software-restore"): + elif (currentEntry == "software-restore"): self.session.open(ImageWizard) - elif (current == "install-plugins"): + elif (currentEntry == "install-plugins"): self.session.open(PluginManager, self.skin_path) - elif (current == "system-backup"): + elif (currentEntry == "system-backup"): self.session.openWithCallback(self.backupDone,BackupScreen, runBackup = True) - elif (current == "system-restore"): + elif (currentEntry == "system-restore"): if os_path.exists(self.fullbackupfilename): self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore your Enigma2 backup?\nEnigma2 will restart after the restore")) else: self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO, timeout = 10) - elif (current == "ipkg-install"): + elif (currentEntry == "ipkg-install"): try: from Plugins.Extensions.MediaScanner.plugin import main main(self.session) except: self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO, timeout = 10) - elif (current == "advanced"): + elif (currentEntry == "default-plugin"): + self.extended = current[3] + self.extended(self.session, None) + elif (currentEntry == "advanced"): self.session.open(UpdatePluginMenu, 1) elif self.menu == 1: - if (current == "ipkg-manager"): + if (currentEntry == "ipkg-manager"): self.session.open(PacketManager, self.skin_path) - elif (current == "backuplocation"): + elif (currentEntry == "backuplocation"): parts = [ (r.description, r.mountpoint, self.session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)] for x in parts: if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/': @@ -186,12 +215,15 @@ class UpdatePluginMenu(Screen): parts.remove(x) if len(parts): self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts) - elif (current == "backupfiles"): + elif (currentEntry == "backupfiles"): self.session.openWithCallback(self.backupfiles_choosen,BackupSelection) - elif (current == "advancedrestore"): + elif (currentEntry == "advancedrestore"): self.session.open(RestoreMenu, self.skin_path) - elif (current == "ipkg-source"): + elif (currentEntry == "ipkg-source"): self.session.open(IPKGMenu, self.skin_path) + elif (currentEntry == "advanced-plugin"): + self.extended = current[3] + self.extended(self.session, None) def backupfiles_choosen(self, ret): self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) @@ -478,13 +510,13 @@ class PacketManager(Screen): def setStatus(self,status = None): if status: self.statuslist = [] - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if status == 'update': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Trying to download a new packetlist. Please wait..." ),'',statuspng, divpng )) self['list'].setList(self.statuslist) elif status == 'error': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) self.statuslist.append(( _("Error"), '', _("There was an error downloading the packetlist. Please try again." ),'',statuspng, divpng )) self['list'].setList(self.statuslist) @@ -600,15 +632,15 @@ class PacketManager(Screen): self.buildPacketList() def buildEntryComponent(self, name, version, description, state): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if state == 'installed': - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, version, description, state, installedpng, divpng)) elif state == 'upgradeable': - upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgradeable.png")) + upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgradeable.png")) return((name, version, description, state, upgradeablepng, divpng)) else: - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) return((name, version, description, state, installablepng, divpng)) def buildPacketList(self): @@ -779,19 +811,19 @@ class PluginManager(Screen, DreamInfoHandler): self["key_green"].setText("") self["key_blue"].setText("") self["key_yellow"].setText("") - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if status == 'update': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Trying to download a new packetlist. Please wait..." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) elif status == 'sync': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) self.statuslist.append(( _("Package list update"), '', _("Searching for new installed or removed packages. Please wait..." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) elif status == 'error': - statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) self.statuslist.append(( _("Error"), '', _("There was an error downloading the packetlist. Please try again." ),'', '', statuspng, divpng, None, '' )) self["list"].style = "default" self['list'].setList(self.statuslist) @@ -978,18 +1010,18 @@ class PluginManager(Screen, DreamInfoHandler): self.Console.ePopen(cmd, self.InstallMetaPackage_Finished) def buildEntryComponent(self, name, details, description, packagename, state, selected = False): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if state == 'installed': - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) return((name, details, description, packagename, state, installedpng, divpng, selected)) elif state == 'installable': - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) return((name, details, description, packagename, state, installablepng, divpng, selected)) elif state == 'remove': - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) return((name, details, description, packagename, state, removepng, divpng, selected)) elif state == 'install': - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) return((name, details, description, packagename, state, installpng, divpng, selected)) def buildPacketList(self, categorytag = None): @@ -1051,7 +1083,7 @@ class PluginManager(Screen, DreamInfoHandler): self.selectionChanged() def buildCategoryComponent(self, tag = None): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) if tag is not None: if tag == 'System': return(( _("System"), _("View list of available system extensions" ), tag, divpng )) @@ -1210,10 +1242,10 @@ class PluginManagerInfo(Screen): self['list'].updateList(self.list) def buildEntryComponent(self, action,info): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) - upgradepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgrade.png")) - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + upgradepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgrade.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) if action == 'install': return(( _('Installing'), info, installpng, divpng)) elif action == 'remove': @@ -1282,11 +1314,11 @@ class PluginManagerHelp(Screen): self['list'].updateList(self.list) def buildEntryComponent(self, state): - divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) - installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png")) - installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png")) - removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/remove.png")) - installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/install.png")) + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png")) + installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png")) + installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png")) + removepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/remove.png")) + installpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/install.png")) if state == 'installed': return(( _('This plugin is installed.'), _('You can remove this plugin.'), installedpng, divpng)) @@ -1432,7 +1464,7 @@ class PluginDetails(Screen, DreamInfoHandler): if not noScreenshot: filename = self.thumbnail else: - filename = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/noprev.png") + filename = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/noprev.png") sc = AVSwitch().getFramebufferScale() self.picload.setPara((self["screenshot"].instance.size().width(), self["screenshot"].instance.size().height(), sc[0], sc[1], False, 1, "#00000000")) diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am index 9e248084..2e80f306 100755 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_videoenhancement.xml -EXTRA_DIST = videoenhancement.jpg +EXTRA_DIST = videoenhancement_en.jpg videoenhancement_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml index 33b222ef..208c7e0c 100755 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml @@ -1,5 +1,8 @@ <default> <prerequisites> + <hardware type="dm8000" /> + <hardware type="dm800" /> + <hardware type="dm500hd" /> <tag type="Display" /> <tag type="System" /> </prerequisites> @@ -9,15 +12,15 @@ <packagename>enigma2-plugin-systemplugins-videoenhancement</packagename> <shortdescription>VideoEnhancement provides advanced video enhancement settings.</shortdescription> <description>The VideoEnhancement extension provides advanced video enhancement settings.</description> - <screenshot src="http://www.dreamboxupdate.com/preview/videoenhancement.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videoenhancement_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> - <name>VideoEnhancement</name> + <name>Erweiterte A/V Einstellungen</name> <packagename>enigma2-plugin-systemplugins-videoenhancement</packagename> - <shortdescription>Videomode bietet erweiterte Video Konfigurationsoptionen.</shortdescription> - <description>Die Videomode-Erweiterung bietet erweiterte Video Konfigurationsoptionen.</description> - <screenshot src="http://www.dreamboxupdate.com/preview/videoenhancement.jpg" /> + <shortdescription>Erweiterte A/V Einstellungen für Ihre Dreambox.</shortdescription> + <description>Erweiterte A/V Einstellungen für Ihre Dreambox.</description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videoenhancement_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg Binary files differdeleted file mode 100755 index 0e0ef6fc..00000000 --- a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg Binary files differnew file mode 100755 index 00000000..ecf0161d --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg Binary files differnew file mode 100755 index 00000000..a97a7a34 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/videoenhancement_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml b/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml index 75abb90e..c4609433 100644..100755 --- a/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml +++ b/lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml @@ -9,7 +9,7 @@ <packagename>enigma2-plugin-systemplugins-videotune</packagename> <shortdescription>VideoTune helps fine-tuning your tv display.</shortdescription> <description>The VideoTune helps fine-tuning your tv display.\nYou can control brightness and contrast of your tv.</description> - <screenshot src="http://www.dreamboxupdate.com/preview/videotune.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videotune.jpg" /> </info> <info language="de"> <author>Dream Multimedia - DE</author> @@ -18,7 +18,7 @@ <shortdescription>VideoTune hilft beim fein-einstellen des Fernsehers.</shortdescription> <description>VideoTune hilf beim fein-einstellen des Fernsehers.\nSie können Kontrast und Helligkeit fein-einstellen. </description> - <screenshot src="http://www.dreamboxupdate.com/preview/videotune.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videotune.jpg" /> </info> <files type="package"> <!-- ohne versionsnummer, ohne .ipkg --> <file type="package" name="enigma2-plugin-systemplugins-videotune" /> diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am index 6c012e84..ef474435 100755 --- a/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am @@ -2,4 +2,4 @@ installdir = $(datadir)/meta/ dist_install_DATA = plugin_videomode.xml -EXTRA_DIST = videomode.jpg +EXTRA_DIST = videomode_en.jpg videomode_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml b/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml index 3891e0b1..fbb6e3f4 100644..100755 --- a/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml @@ -9,7 +9,7 @@ <packagename>enigma2-plugin-systemplugins-videomode</packagename> <shortdescription>Videomode provides advanced video modes.</shortdescription> <description>The Videomode extension provides advanced video modes.</description> - <screenshot src="http://www.dreamboxupdate.com/preview/videomode.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videomode_en.jpg" /> </info> <info language="de"> <author>Dream Multimedia</author> @@ -17,7 +17,7 @@ <packagename>enigma2-plugin-systemplugins-videomode</packagename> <shortdescription>Videomode bietet erweiterte Video Einstellungen.</shortdescription> <description>Die Videomode-Erweiterung bietet erweiterte Video-Einstellungen.</description> - <screenshot src="http://www.dreamboxupdate.com/preview/videomode.jpg" /> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_videomode_de.jpg" /> </info> <files type="package"> <!-- without version, without .ipk --> diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg Binary files differdeleted file mode 100644 index adb5646b..00000000 --- a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode.jpg +++ /dev/null diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg Binary files differnew file mode 100755 index 00000000..00b7ac70 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg Binary files differnew file mode 100755 index 00000000..1f4288b9 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/Videomode/meta/videomode_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am b/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am index 365372c2..2f362379 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am @@ -1,6 +1,6 @@ installdir = $(pkglibdir)/python/Plugins/SystemPlugins/WirelessLan -#SUBDIRS = meta +SUBDIRS = meta install_PYTHON = \ __init__.py \ diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py b/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py index ba1e13d4..1c1471ce 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py @@ -1,7 +1,7 @@ -from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER -from Components.MultiContent import MultiContentEntryText -from Components.GUIComponent import GUIComponent -from Components.HTMLComponent import HTMLComponent +#from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER +#from Components.MultiContent import MultiContentEntryText +#from Components.GUIComponent import GUIComponent +#from Components.HTMLComponent import HTMLComponent from Components.config import config, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, ConfigSelection, ConfigPassword from Components.Console import Console @@ -35,13 +35,12 @@ config.plugins.wlan.encryption.psk = NoSave(ConfigPassword(default = "mysecurewl class Wlan: def __init__(self, iface): a = ''; b = '' - for i in range(0, 255): - a = a + chr(i) - if i < 32 or i > 127: - b = b + ' ' - else: - b = b + chr(i) + a = a + chr(i) + if i < 32 or i > 127: + b = b + ' ' + else: + b = b + chr(i) self.iface = iface self.wlaniface = {} @@ -245,91 +244,6 @@ class Wlan: return status - -class WlanList(HTMLComponent, GUIComponent): - def __init__(self, session, iface): - - GUIComponent.__init__(self) - self.w = Wlan(iface) - self.iface = iface - - self.length = 0 - self.aplist = None - self.list = None - self.oldlist = None - self.l = None - self.l = eListboxPythonMultiContent() - - self.l.setFont(0, gFont("Regular", 32)) - self.l.setFont(1, gFont("Regular", 18)) - self.l.setFont(2, gFont("Regular", 16)) - self.l.setBuildFunc(self.buildWlanListEntry) - - self.reload() - - def buildWlanListEntry(self, essid, bssid, encrypted, iface, maxrate, signal): - - res = [ (essid, encrypted, iface) ] - - if essid == "": - essid = bssid - - e = encrypted and _("Yes") or _("No") - res.append( MultiContentEntryText(pos=(0, 0), size=(470, 35), font=0, flags=RT_HALIGN_LEFT, text=essid) ) - res.append( MultiContentEntryText(pos=(425, 0), size=(60, 20), font=1, flags=RT_HALIGN_LEFT, text=_("Signal: "))) - res.append( MultiContentEntryText(pos=(480, 0), size=(70, 35), font=0, flags=RT_HALIGN_RIGHT, text="%s" %signal)) - res.append( MultiContentEntryText(pos=(0, 40), size=(180, 20), font=1, flags=RT_HALIGN_LEFT, text=_("Max. Bitrate: %s") %maxrate )) - res.append( MultiContentEntryText(pos=(190, 40), size=(180, 20), font=1, flags=RT_HALIGN_CENTER, text=_("Encrypted: %s") %e )) - res.append( MultiContentEntryText(pos=(345, 40), size=(190, 20), font=1, flags=RT_HALIGN_RIGHT, text=_("Interface: %s") %iface )) - return res - - - def reload(self): - aps = self.w.getNetworkList() - - self.list = [] - self.aplist = [] - if aps is not None: - print "[Wlan.py] got Accespoints!" - for ap in aps: - a = aps[ap] - if a['active']: - if a['essid'] != '': - # a['essid'] = a['bssid'] - self.list.append( (a['essid'], a['bssid'], a['encrypted'], a['iface'], a['maxrate'], a['signal']) ) - #self.aplist.append( a['essid']) - if self.oldlist is not None: - for entry in self.oldlist: - if entry not in self.list: - self.list.append(entry) - - if len(self.list): - for entry in self.list: - self.aplist.append( entry[0]) - self.length = len(self.list) - self.oldlist = self.list - self.l.setList([]) - self.l.setList(self.list) - - GUI_WIDGET = eListbox - - - def getCurrent(self): - return self.l.getCurrentSelection() - - - def postWidgetCreate(self, instance): - instance.setContent(self.l) - instance.setItemHeight(60) - - - def getLength(self): - return self.length - - def getList(self): - return self.aplist - - class wpaSupplicant: def __init__(self): pass diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am new file mode 100755 index 00000000..6bc4aab0 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am @@ -0,0 +1,5 @@ +installdir = $(datadir)/meta/ + +dist_install_DATA = plugin_wirelesslan.xml + +EXTRA_DIST = wirelesslan_de.jpg wirelesslan_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml new file mode 100755 index 00000000..1f882b32 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml @@ -0,0 +1,27 @@ +<default> + <prerequisites> + <tag type="Network" /> + <tag type="System" /> + </prerequisites> + <info language="en"> + <author>Dream Multimedia</author> + <name>WirelessLan</name> + <packagename>enigma2-plugin-systemplugins-wirelesslan</packagename> + <shortdescription>Configure your WLAN network interface</shortdescription> + <description>The WirelessLan extensions helps you configuring your WLAN network interface.</description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_wirelesslan_en.jpg" /> + </info> + <info language="de"> + <author>Dream Multimedia</author> + <name>WirelessLan</name> + <packagename>enigma2-plugin-systemplugins-wirelesslan</packagename> + <shortdescription>Konfigurieren Sie Ihr WLAN Netzwerk.</shortdescription> + <description>Die WirelessLan Erweiterung hilft Ihnen beim konfigurieren Ihres WLAN Netzwerkes..</description> + <screenshot src="http://www.dreamboxupdate.com/preview/plugin_wirelesslan_de.jpg" /> + </info> + + <files type="package"> <!-- without version, without .ipk --> + <file type="package" name="enigma2-plugin-systemplugins-wirelesslan" /> + </files> + +</default> diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg Binary files differnew file mode 100755 index 00000000..38695418 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_de.jpg diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg Binary files differnew file mode 100755 index 00000000..fe4fa97d --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/meta/wirelesslan_en.jpg diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py index b7a64b9a..c8568b98 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py @@ -4,6 +4,7 @@ from Components.ActionMap import ActionMap, NumberActionMap from Components.Pixmap import Pixmap,MultiPixmap from Components.Label import Label from Components.Sources.StaticText import StaticText +from Components.Sources.List import List from Components.MenuList import MenuList from Components.config import config, getConfigListEntry, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, ConfigSelection, ConfigPassword from Components.ConfigList import ConfigListScreen @@ -11,8 +12,9 @@ from Components.Network import Network, iNetwork from Components.Console import Console from Plugins.Plugin import PluginDescriptor from os import system, path as os_path, listdir -from Wlan import Wlan, WlanList, wpaSupplicant -from Wlan import Status, iStatus +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE +from Tools.LoadPixmap import LoadPixmap +from Wlan import Wlan, wpaSupplicant, iStatus plugin_path = "/usr/lib/enigma2/python/Plugins/SystemPlugins/WirelessLan" @@ -39,37 +41,35 @@ config.plugins.wlan.encryption.psk = NoSave(ConfigPassword(default = "mysecurewl class WlanStatus(Screen): skin = """ - <screen position="center,center" size="560,400" title="Wireless Network State" > - <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - - <widget source="LabelBSSID" render="Label" position="10,60" size="250,25" valign="left" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="LabelESSID" render="Label" position="10,100" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="LabelQuality" render="Label" position="10,140" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="LabelSignal" render="Label" position="10,180" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="LabelBitrate" render="Label" position="10,220" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="LabelEnc" render="Label" position="10,260" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - - <widget source="BSSID" render="Label" position="320,60" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="ESSID" render="Label" position="320,100" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="quality" render="Label" position="320,140" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="signal" render="Label" position="320,180" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="bitrate" render="Label" position="320,220" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - <widget source="enc" render="Label" position="320,260" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> - - <ePixmap pixmap="skin_default/div-h.png" position="0,350" zPosition="1" size="560,2" /> - <widget source="IFtext" render="Label" position="10,355" size="120,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1" /> - <widget source="IF" render="Label" position="120,355" size="400,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1" /> - <widget source="Statustext" render="Label" position="10,375" size="115,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1"/> - <widget name="statuspic" pixmaps="skin_default/buttons/button_green.png,skin_default/buttons/button_green_off.png" position="130,380" zPosition="10" size="15,16" transparent="1" alphatest="on"/> - </screen> - """ + <screen name="WlanStatus" position="center,center" size="560,400" title="Wireless Network State" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + + <widget source="LabelBSSID" render="Label" position="10,60" size="250,25" valign="left" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="LabelESSID" render="Label" position="10,100" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="LabelQuality" render="Label" position="10,140" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="LabelSignal" render="Label" position="10,180" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="LabelBitrate" render="Label" position="10,220" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="LabelEnc" render="Label" position="10,260" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + + <widget source="BSSID" render="Label" position="320,60" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="ESSID" render="Label" position="320,100" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="quality" render="Label" position="320,140" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="signal" render="Label" position="320,180" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="bitrate" render="Label" position="320,220" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + <widget source="enc" render="Label" position="320,260" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor="#FFFFFF" /> + + <ePixmap pixmap="skin_default/div-h.png" position="0,350" zPosition="1" size="560,2" /> + <widget source="IFtext" render="Label" position="10,355" size="120,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1" /> + <widget source="IF" render="Label" position="120,355" size="400,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1" /> + <widget source="Statustext" render="Label" position="10,375" size="115,21" zPosition="10" font="Regular;20" halign="left" backgroundColor="#25062748" transparent="1"/> + <widget name="statuspic" pixmaps="skin_default/buttons/button_green.png,skin_default/buttons/button_green_off.png" position="130,380" zPosition="10" size="15,16" transparent="1" alphatest="on"/> + </screen>""" def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface - self.skin = WlanStatus.skin self["LabelBSSID"] = StaticText(_('Accesspoint:')) self["LabelESSID"] = StaticText(_('SSID:')) @@ -114,7 +114,6 @@ class WlanStatus(Screen): self.setTitle(_("Wireless Network State")) def resetList(self): - print "self.iface im resetlist",self.iface iStatus.getDataForInterface(self.iface,self.getInfoCB) def getInfoCB(self,data,status): @@ -131,10 +130,9 @@ class WlanStatus(Screen): def exit(self): self.timer.stop() - self.close() + self.close(True) def updateStatusbar(self): - print "self.iface im updateStatusbar",self.iface self["BSSID"].setText(_("Please wait...")) self["ESSID"].setText(_("Please wait...")) self["quality"].setText(_("Please wait...")) @@ -155,37 +153,55 @@ class WlanStatus(Screen): class WlanScan(Screen): skin = """ - <screen position="center,center" size="560,400" title="Choose a Wireless Network" > - <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> - <widget name="list" position="5,50" size="550,280" scrollbarMode="showOnDemand" /> - <ePixmap pixmap="skin_default/div-h.png" position="0,340" zPosition="1" size="560,2" /> - <widget source="info" render="Label" position="0,350" size="560,50" font="Regular;24" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> - </screen> - """ + <screen name="WlanScan" position="center,center" size="560,400" title="Choose a Wireless Network" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="list" render="Listbox" position="5,40" size="550,300" scrollbarMode="showOnDemand"> + <convert type="TemplatedMultiContent"> + {"template": [ + MultiContentEntryText(pos = (0, 0), size = (550, 30), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the essid + MultiContentEntryText(pos = (0, 30), size = (175, 20), font=1, flags = RT_HALIGN_LEFT, text = 5), # index 5 is the interface + MultiContentEntryText(pos = (175, 30), size = (175, 20), font=1, flags = RT_HALIGN_LEFT, text = 4), # index 0 is the encryption + MultiContentEntryText(pos = (350, 0), size = (200, 20), font=1, flags = RT_HALIGN_LEFT, text = 2), # index 0 is the signal + MultiContentEntryText(pos = (350, 30), size = (200, 20), font=1, flags = RT_HALIGN_LEFT, text = 3), # index 0 is the maxrate + MultiContentEntryPixmapAlphaTest(pos = (0, 52), size = (550, 2), png = 6), # index 6 is the div pixmap + ], + "fonts": [gFont("Regular", 28),gFont("Regular", 18)], + "itemHeight": 54 + } + </convert> + </widget> + <ePixmap pixmap="skin_default/div-h.png" position="0,340" zPosition="1" size="560,2" /> + <widget source="info" render="Label" position="0,350" size="560,50" font="Regular;24" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> + </screen>""" def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface - self.skin = WlanScan.skin self.skin_path = plugin_path self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") + self.APList = None + self.newAPList = None + self.WlanList = None + self.cleanList = None + self.oldlist = None + self.listLenght = None + self.rescanTimer = eTimer() + self.rescanTimer.callback.append(self.rescanTimerFired) self["info"] = StaticText() - self.list = [] - self["list"] = WlanList(self.session, self.iface) + self.list = [] + self["list"] = List(self.list) - self.setInfo() - self["key_red"] = StaticText(_("Close")) self["key_green"] = StaticText(_("Connect")) - self["key_yellow"] = StaticText(_("Refresh")) + self["key_yellow"] = StaticText() self["actions"] = NumberActionMap(["WizardActions", "InputActions", "EPGSelectActions"], { @@ -195,63 +211,161 @@ class WlanScan(Screen): self["shortcuts"] = ActionMap(["ShortcutActions"], { - "red": self.cancel, + "red": self.cancel, "green": self.select, - "yellow": self.rescan, }) self.onLayoutFinish.append(self.layoutFinished) + self.getAccessPoints(refresh = False) def layoutFinished(self): self.setTitle(_("Choose a wireless network")) def select(self): cur = self["list"].getCurrent() - #print "CURRENT",cur if cur is not None: + self.rescanTimer.stop() + del self.rescanTimer if cur[1] is not None: - essid = cur[0] - if essid == '': - essid = cur[1] - encrypted = cur[2] - self.close(essid,self["list"].getList()) + essid = cur[1] + self.close(essid,self.getWlanList()) else: self.close(None,None) else: + self.rescanTimer.stop() + del self.rescanTimer self.close(None,None) def WlanSetupClosed(self, *ret): if ret[0] == 2: + self.rescanTimer.stop() + del self.rescanTimer self.close(None) - def rescan(self): - self["list"].reload() - self.setInfo() - def cancel(self): if self.oldInterfaceState is False: + iNetwork.setAdapterAttribute(self.iface, "up", False) iNetwork.deactivateInterface(self.iface,self.deactivateInterfaceCB) else: + self.rescanTimer.stop() + del self.rescanTimer self.close(None) def deactivateInterfaceCB(self,data): if data is not None: if data is True: - iNetwork.getInterfaces(self.cancelCB) - - def cancelCB(self,data): - if data is not None: - if data is True: + self.rescanTimer.stop() + del self.rescanTimer self.close(None) - def setInfo(self): - length = self["list"].getLength() + def rescanTimerFired(self): + self.rescanTimer.stop() + self.updateAPList() + + def buildEntryComponent(self, essid, bssid, encrypted, iface, maxrate, signal): + divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png")) + encryption = encrypted and _("Yes") or _("No") + if bssid == 'hidden...': + return((essid, bssid, None, None, None, None, divpng)) + else: + return((essid, bssid, _("Signal: ") + str(signal), _("Max. Bitrate: ") + str(maxrate), _("Encrypted: ") + encryption, _("Interface: ") + str(iface), divpng)) + + def updateAPList(self): + self.oldlist = [] + self.oldlist = self.cleanList + self.newAPList = [] + newList = [] + tmpList = [] + newListIndex = None + currentListEntry = None + currentListIndex = None + newList = self.getAccessPoints(refresh = True) + for oldentry in self.oldlist: + if oldentry not in newList: + newList.append(oldentry) + + for newentry in newList: + if newentry[1] == "hidden...": + continue + tmpList.append(newentry) + + if len(tmpList): + if "hidden..." not in tmpList: + tmpList.append( ( _("enter hidden network SSID"), "hidden...", True, self.iface, _("unavailable"), "" ) ) + + for entry in tmpList: + self.newAPList.append(self.buildEntryComponent( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] )) + + currentListEntry = self["list"].getCurrent() + idx = 0 + for entry in self.newAPList: + if entry == currentListEntry: + newListIndex = idx + idx +=1 + self['list'].setList(self.newAPList) + self["list"].setIndex(newListIndex) + self["list"].updateList(self.newAPList) + self.listLenght = len(self.newAPList) + self.buildWlanList() + self.setInfo() + + def getAccessPoints(self, refresh = False): + self.APList = [] + self.cleanList = [] + self.w = Wlan(self.iface) + aps = self.w.getNetworkList() + if aps is not None: + print "[NetworkWizard.py] got Accespoints!" + tmpList = [] + compList = [] + for ap in aps: + a = aps[ap] + if a['active']: + tmpList.append( (a['essid'], a['bssid']) ) + compList.append( (a['essid'], a['bssid'], a['encrypted'], a['iface'], a['maxrate'], a['signal']) ) + + for entry in tmpList: + if entry[0] == "": + for compentry in compList: + if compentry[1] == entry[1]: + compList.remove(compentry) + for entry in compList: + self.cleanList.append( ( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] ) ) + + if "hidden..." not in self.cleanList: + self.cleanList.append( ( _("enter hidden network SSID"), "hidden...", True, self.iface, _("unavailable"), "" ) ) + + for entry in self.cleanList: + self.APList.append(self.buildEntryComponent( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] )) + + if refresh is False: + self['list'].setList(self.APList) + self.listLenght = len(self.APList) + self.setInfo() + self.rescanTimer.start(5000) + return self.cleanList + + def setInfo(self): + length = self.getLength() if length == 0: self["info"].setText(_("No wireless networks found! Please refresh.")) elif length == 1: self["info"].setText(_("1 wireless network found!")) else: - self["info"].setText(str(length)+_(" wireless networks found!")) + self["info"].setText(str(length)+_(" wireless networks found!")) + + def buildWlanList(self): + self.WlanList = [] + currList = [] + currList = self['list'].list + for entry in currList: + self.WlanList.append( (entry[1], entry[0]) ) + + def getLength(self): + return self.listLenght + + def getWlanList(self): + return self.WlanList def WlanStatusScreenMain(session, iface): @@ -259,13 +373,11 @@ def WlanStatusScreenMain(session, iface): def callFunction(iface): - w = Wlan(iface) i = w.getWirelessInterfaces() if i: if iface in i: return WlanStatusScreenMain - return None |
