From: thedoc Date: Fri, 11 Dec 2009 11:39:26 +0000 (+0100) Subject: add color buttons to TempFanControl X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=a5b6110e64df2cfe9ded031dbaa5816b9cdd1cb7 add color buttons to TempFanControl --- diff --git a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py index b576252..2233262 100644 --- a/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py @@ -12,8 +12,17 @@ from Components.FanControl import fancontrol class TempFanControl(Screen, ConfigListScreen): skin = """ - - + + + + + + + + + + + @@ -80,7 +89,6 @@ class TempFanControl(Screen, ConfigListScreen): - """ def __init__(self, session, args = None): @@ -91,6 +99,11 @@ class TempFanControl(Screen, ConfigListScreen): fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM) fancount = len(fanlist) + self["red"] = StaticText(_("Cancel")) + self["green"] = StaticText(_("OK")) + self["yellow"] = StaticText("") + self["blue"] = StaticText("") + for count in range(8): if count < tempcount: id = templist[count] @@ -116,10 +129,12 @@ class TempFanControl(Screen, ConfigListScreen): #self["config"].list = self.list #self["config"].setList(self.list) - self["actions"] = ActionMap(["OkCancelActions"], + self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "ok": self.save, - "cancel": self.revert + "cancel": self.revert, + "red": self.revert, + "green": self.save }, -1) def save(self):