From: thedoc Date: Fri, 11 Dec 2009 11:39:26 +0000 (+0100) Subject: add color buttons to TempFanControl X-Git-Tag: 2.8.0~82^2~3 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/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 b5762529..22332620 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):