From 0f5990b2eb207bfee4fc78b2119a68457564cb95 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 30 May 2015 21:32:55 +0200 Subject: [PATCH] Configtool: don't color heater/sensor list items. Validation is no longer required, as we now validate in the creation dialog already. And coloring one item in a two-item list almost looks like this item were highlighted. --- configtool/heaterlist.py | 14 -------------- configtool/sensorlist.py | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/configtool/heaterlist.py b/configtool/heaterlist.py index e2306d9..2b709a3 100644 --- a/configtool/heaterlist.py +++ b/configtool/heaterlist.py @@ -24,11 +24,6 @@ class HeaterList(wx.ListCtrl): self.SetItemCount(0) - self.attr2 = wx.ListItemAttr() - self.attr2.SetBackgroundColour("light blue") - self.attr3 = wx.ListItemAttr() - self.attr3.SetBackgroundColour("pink") - self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected) self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected) @@ -82,12 +77,3 @@ class HeaterList(wx.ListCtrl): return "True" else: return "False" - - def OnGetItemAttr(self, item): - if not self.valid[item]: - return self.attr3 - - if item % 2 == 1: - return self.attr2 - else: - return None diff --git a/configtool/sensorlist.py b/configtool/sensorlist.py index 7363cc3..d09360c 100644 --- a/configtool/sensorlist.py +++ b/configtool/sensorlist.py @@ -27,11 +27,6 @@ class SensorList(wx.ListCtrl): self.SetItemCount(0) - self.attr2 = wx.ListItemAttr() - self.attr2.SetBackgroundColour("light blue") - self.attr3 = wx.ListItemAttr() - self.attr3.SetBackgroundColour("pink") - self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected) self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected) @@ -89,12 +84,3 @@ class SensorList(wx.ListCtrl): return "" else: return "[%s]" % (", ".join(s[3])) - - def OnGetItemAttr(self, item): - if not self.valid[item]: - return self.attr3 - - if item % 2 == 1: - return self.attr2 - else: - return None