summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-06 16:08:39 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-06 16:08:39 (GMT)
commitc2d8f573eb72121325613df760df4590d7b1e375 (patch)
tree21d7d337008b6498dc9b347c8d2d2288bd1f0eeb /Tools
parentc1c7b1a699bfed4120cc9d52c60f16a67da5fa13 (diff)
downloadcpython-c2d8f573eb72121325613df760df4590d7b1e375.zip
cpython-c2d8f573eb72121325613df760df4590d7b1e375.tar.gz
cpython-c2d8f573eb72121325613df760df4590d7b1e375.tar.bz2
__togglehex(): Simplify
Diffstat (limited to 'Tools')
-rw-r--r--Tools/pynche/TypeinViewer.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/Tools/pynche/TypeinViewer.py b/Tools/pynche/TypeinViewer.py
index d3dad51d7..6e50f0f 100644
--- a/Tools/pynche/TypeinViewer.py
+++ b/Tools/pynche/TypeinViewer.py
@@ -58,18 +58,8 @@ class TypeinViewer:
self.__hex.grid(row=4, column=0, columnspan=2, sticky=W)
def __togglehex(self, event=None):
- rstr = self.__x.get()
- gstr = self.__y.get()
- bstr = self.__z.get()
- if self.__hexp.get():
- # it was decimal and is now hex
- apply(self.update_yourself, tuple(map(int, (rstr, gstr, bstr))))
- else:
- # it was hex and is now decimal
- red = string.atoi(rstr, 16)
- green = string.atoi(gstr, 16)
- blue = string.atoi(bstr, 16)
- self.update_yourself(red, green, blue)
+ red, green, blue = self.__sb.current_rgb()
+ self.update_yourself(red, green, blue)
def __normalize(self, event=None):
ew = event.widget