diff options
Diffstat (limited to 'lib/python')
| -rwxr-xr-x | lib/python/Components/Network.py | 7 | ||||
| -rw-r--r-- | lib/python/Components/NimManager.py | 5 | ||||
| -rw-r--r-- | lib/python/Plugins/DemoPlugins/TestPlugin/Makefile.am | 1 | ||||
| -rw-r--r-- | lib/python/Plugins/DemoPlugins/TestPlugin/maintainer.info | 2 | ||||
| -rw-r--r-- | lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py | 2 | ||||
| -rwxr-xr-x | lib/python/Screens/NetworkSetup.py | 21 |
6 files changed, 20 insertions, 18 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index c41469da..7cc61d84 100755 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -505,9 +505,10 @@ class Network: def deactivateInterfaceFinished(self,extra_args): callback = extra_args - if len(self.deactivateInterfaceConsole.appContainers) == 0: - if callback is not None: - callback(True) + if self.deactivateInterfaceConsole: + if len(self.deactivateInterfaceConsole.appContainers) == 0: + if callback is not None: + callback(True) def detectWlanModule(self): self.wlanmodule = None diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 32fca47f..e1d3b068 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -188,12 +188,11 @@ class SecConfigure: loValue = rotorParam.EAST else: loValue = rotorParam.WEST - inputPowerDelta=hw.get_device_name() == "dm8000" and 15 or 50 + inputPowerDelta=nim.powerThreshold.value useInputPower=False turning_speed=0 if nim.powerMeasurement.value: useInputPower=True - inputPowerDelta=nim.powerThreshold.value turn_speed_dict = { "fast": rotorParam.FAST, "slow": rotorParam.SLOW } if turn_speed_dict.has_key(nim.turningSpeed.value): turning_speed = turn_speed_dict[nim.turningSpeed.value] @@ -908,7 +907,7 @@ def InitNimManager(nimmgr): nim.latitude = ConfigFloat(default=[50,767], limits=[(0,359),(0,999)]) nim.latitudeOrientation = ConfigSelection(choices={"north": _("North"), "south": _("South")}, default="north") nim.powerMeasurement = ConfigYesNo(default=True) - nim.powerThreshold = ConfigInteger(default=50, limits=(0, 100)) + nim.powerThreshold = ConfigInteger(default=hw.get_device_name() == "dm8000" and 15 or 50, limits=(0, 100)) nim.turningSpeed = ConfigSelection(choices = [("fast", _("Fast")), ("slow", _("Slow")), ("fast epoch", _("Fast epoch")) ], default = "fast") btime = datetime(1970, 1, 1, 7, 0); nim.fastTurningBegin = ConfigDateTime(default = mktime(btime.timetuple()), formatstring = _("%H:%M"), increment = 900) diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/Makefile.am b/lib/python/Plugins/DemoPlugins/TestPlugin/Makefile.am index 8173b373..2c52330f 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/Makefile.am +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/Makefile.am @@ -4,3 +4,4 @@ install_PYTHON = \ __init__.py \ plugin.py +install_DATA = maintainer.info diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/maintainer.info b/lib/python/Plugins/DemoPlugins/TestPlugin/maintainer.info new file mode 100644 index 00000000..4f285613 --- /dev/null +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/maintainer.info @@ -0,0 +1,2 @@ +tmbinc@elitedvb.net +Demo-Plugin diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py index 1f49a9e3..a63562c8 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -50,6 +50,8 @@ class Test(Screen): def mycallback(self, answer): print "answer:", answer + if answer: + raise "test-crash" self.close() def keyLeft(self): diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index 580673e4..6bfe54ad 100755 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -90,7 +90,6 @@ class NetworkAdapterSelection(Screen,HelpableScreen): self.onClose.append(self.cleanup) def updateList(self): - iNetwork.getInterfaces() self.list = [] default_gw = None num_configured_if = len(iNetwork.getConfiguredAdapters()) @@ -290,7 +289,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): self.finished_cb = None self.oktext = _("Press OK on your remote control to continue.") self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") - + self.createConfig() self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", @@ -675,8 +674,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen): def cleanup(self): iNetwork.stopLinkStateConsole() - iNetwork.stopDeactivateInterfaceConsole() - + class AdapterSetupConfiguration(Screen, HelpableScreen): def __init__(self, session,iface): @@ -732,7 +730,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): "right": self.right, }, -2) - iNetwork.getInterfaces(self.updateStatusbar) + self.updateStatusbar() self.onLayoutFinish.append(self.layoutFinished) self.onClose.append(self.cleanup) @@ -908,11 +906,11 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): else: self.mainmenu = self.genMainMenu() self["menulist"].l.setList(self.mainmenu) - iNetwork.getInterfaces(self.updateStatusbar) + self.updateStatusbar() else: self.mainmenu = self.genMainMenu() self["menulist"].l.setList(self.mainmenu) - iNetwork.getInterfaces(self.updateStatusbar) + self.updateStatusbar() def WlanStatusClosed(self, *ret): if ret is not None and len(ret): @@ -920,7 +918,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): iStatus.stopWlanConsole() self.mainmenu = self.genMainMenu() self["menulist"].l.setList(self.mainmenu) - iNetwork.getInterfaces(self.updateStatusbar) + self.updateStatusbar() def WlanScanClosed(self,*ret): if ret[0] is not None: @@ -930,7 +928,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): iStatus.stopWlanConsole() self.mainmenu = self.genMainMenu() self["menulist"].l.setList(self.mainmenu) - iNetwork.getInterfaces(self.updateStatusbar) + self.updateStatusbar() def restartLan(self, ret = False): if (ret == True): @@ -955,9 +953,9 @@ class AdapterSetupConfiguration(Screen, HelpableScreen): pattern = re_compile("Link detected: yes") for item in result: if re_search(pattern, item): - self["statuspic"].setPixmapNum(1) - else: self["statuspic"].setPixmapNum(0) + else: + self["statuspic"].setPixmapNum(1) self["statuspic"].show() def showErrorMessage(self): @@ -988,7 +986,6 @@ class NetworkAdapterTest(Screen): Screen.__init__(self, session) self.iface = iface self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up") - iNetwork.getInterfaces() self.setLabels() self.onClose.append(self.cleanup) self.onHide.append(self.cleanup) |
