summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-05-25 20:44:37 (GMT)
committerJust van Rossum <just@letterror.com>2003-05-25 20:44:37 (GMT)
commit8d97b9bd36ad3437c2594deecf8b778e5508b8c1 (patch)
tree1ab6708d33a766f082cc69ea603a81f4927da83e /Mac
parent8fb665a51aec51020e9e40ba1c29e6d86587eb4f (diff)
downloadcpython-8d97b9bd36ad3437c2594deecf8b778e5508b8c1.zip
cpython-8d97b9bd36ad3437c2594deecf8b778e5508b8c1.tar.gz
cpython-8d97b9bd36ad3437c2594deecf8b778e5508b8c1.tar.bz2
fixed some DeprecationWarnings
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/IDE/Wbase.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/Mac/Tools/IDE/Wbase.py b/Mac/Tools/IDE/Wbase.py
index 2e85ce6..4c78b88 100644
--- a/Mac/Tools/IDE/Wbase.py
+++ b/Mac/Tools/IDE/Wbase.py
@@ -8,6 +8,10 @@ class WidgetsError(Exception): pass
DEBUG = 0
+def _intRect((l, t, r, b)):
+ return (int(l), int(t), int(r), int(b))
+
+
class Widget:
"""Base class for all widgets."""
@@ -115,7 +119,7 @@ class Widget:
# the bounds relative to our parent widget.
width = pr - pl
height = pb - pt
- self._bounds = Qd.OffsetRect(self._possize(width, height), pl, pt)
+ self._bounds = Qd.OffsetRect(_intRect(self._possize(width, height)), pl, pt)
else:
# _possize must be a 4-tuple. This is where the algorithm by Peter Kriens and
# Petr van Blokland kicks in. (*** Parts of this algorithm are applied for
@@ -571,7 +575,7 @@ class HorizontalPanes(Widget):
# track mouse --- XXX move to separate method?
Qd.PenMode(QuickDraw.srcXor)
Qd.PenPat(Qd.GetQDGlobalsGray())
- Qd.PaintRect(rect)
+ Qd.PaintRect(_intRect(rect))
lastpos = None
while Evt.Button():
pos = orgpos - orgmouse + Evt.GetMouse()[self._direction]
@@ -580,17 +584,17 @@ class HorizontalPanes(Widget):
if pos == lastpos:
continue
Qd.PenPat(Qd.GetQDGlobalsGray())
- Qd.PaintRect(rect)
+ Qd.PaintRect(_intRect(rect))
if self._direction:
rect = l, pos - 1, r, pos
else:
rect = pos - 1, t, pos, b
Qd.PenPat(Qd.GetQDGlobalsGray())
- Qd.PaintRect(rect)
+ Qd.PaintRect(_intRect(rect))
lastpos = pos
self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None)
Evt.WaitNextEvent(0, 3)
- Qd.PaintRect(rect)
+ Qd.PaintRect(_intRect(rect))
Qd.PenNormal()
SetCursor("watch")