From: kos Date: Thu, 18 Jul 2013 02:11:51 +0000 (+0900) Subject: [wolsetup] replace the choicebox with the messagebox. and remove ethtool command. X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=8d6204fa8ce5d67ebc0d5dbae5c77cce481b503d [wolsetup] replace the choicebox with the messagebox. and remove ethtool command. --- diff --git a/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py b/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py index 1276b1e..bf29218 100644 --- a/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py @@ -118,8 +118,7 @@ class WOLSetup(ConfigListScreen, Screen): config.plugins.wolconfig.location.value = self.backup["location"] def OnKeyGreenCB(self, answer): - answer = answer and answer[1] - if answer == "n": + if not answer: self.Restore() return self.Save() @@ -136,7 +135,7 @@ class WOLSetup(ConfigListScreen, Screen): self.close() return message = _("If WOL is enabled, power consumption will be around 2W.\nErP Standby Power Regulation (<0.5W at standby) cannot be met.\nProceed?") - self.session.openWithCallback(self.OnKeyGreenCB, ChoiceBox, title=message, list=((_("Yes"), "y"), (_("No"), "n"),)) + self.session.openWithCallback(self.OnKeyGreenCB, MessageBox, message, MessageBox.TYPE_YESNO, default = True) def OnKeyCancel(self): self.Restore() @@ -166,7 +165,6 @@ class WOLSetup(ConfigListScreen, Screen): return if writeDevice: os.system('echo "%s" > %s' % (enable and "enable" or "disble",_deviseWOL)) - os.system("ethtool -s %s wol %s" % (_ethDevice, enable and "g" or "d")) @staticmethod def DeepStandbyNotifierCB(self=None): @@ -201,4 +199,3 @@ def Plugins(**kwargs): l.append(PluginDescriptor(where=PluginDescriptor.WHERE_SESSIONSTART, fnc=SessionStartMain)) l.append(PluginDescriptor(where=PluginDescriptor.WHERE_MENU, fnc=MenuSelected)) return l -