move TempFanControl plugin into system menu
authorthedoc <thedoc@atom.(none)>
Fri, 11 Dec 2009 12:24:23 +0000 (13:24 +0100)
committerthedoc <thedoc@atom.(none)>
Fri, 11 Dec 2009 12:24:23 +0000 (13:24 +0100)
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py

index 5dfacd8a78d3b9833f552e47ceea25545b82988e..01c276a49900553e51117240e31593c9dc7a7f87 100644 (file)
@@ -146,10 +146,16 @@ class TempFanControl(Screen, ConfigListScreen):
                fancontrol.getConfig(0).vlt.load()
                fancontrol.getConfig(0).pwm.load()
                self.close()
-
+               
 def main(session, **kwargs):
        session.open(TempFanControl)
 
+def startMenu(menuid):
+       if menuid != "system":
+               return []
+       
+       return [(_("Temperature and Fan control"), main, "tempfancontrol", 80)]
+
 def Plugins(**kwargs):
-       return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main)
+       return PluginDescriptor(name = "Temperature and Fan control", description = _("Temperature and Fan control"), where = PluginDescriptor.WHERE_MENU, fnc = startMenu)
        
\ No newline at end of file