summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-05 15:40:05 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-05 15:40:05 (GMT)
commitd424836f3ac5dad044f131ea77edb1a84ba1a56e (patch)
tree7cda1495e04307b5aa127a535d8511cf34b4c9a1
parent9181c94e05250b8f69615a96634d55afe532e406 (diff)
downloadcpython-d424836f3ac5dad044f131ea77edb1a84ba1a56e.zip
cpython-d424836f3ac5dad044f131ea77edb1a84ba1a56e.tar.gz
cpython-d424836f3ac5dad044f131ea77edb1a84ba1a56e.tar.bz2
Cast various floats to ints so we don't get warnings.
-rw-r--r--Mac/Tools/IDE/Wbase.py2
-rw-r--r--Mac/Tools/IDE/Wtext.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/Mac/Tools/IDE/Wbase.py b/Mac/Tools/IDE/Wbase.py
index f988ce7..2e85ce6 100644
--- a/Mac/Tools/IDE/Wbase.py
+++ b/Mac/Tools/IDE/Wbase.py
@@ -401,7 +401,7 @@ class Frame(Widget):
Qd.SetPenState(penstate)
def _darkencolor((r, g, b)):
- return 0.75 * r, 0.75 * g, 0.75 * b
+ return int(0.75 * r), int(0.75 * g), int(0.75 * b)
class BevelBox(Widget):
diff --git a/Mac/Tools/IDE/Wtext.py b/Mac/Tools/IDE/Wtext.py
index d611c73..3894e16 100644
--- a/Mac/Tools/IDE/Wtext.py
+++ b/Mac/Tools/IDE/Wtext.py
@@ -529,6 +529,7 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
delta = vr[1] - dr[1] - value
delta = min(maxdelta, delta)
delta = max(mindelta, delta)
+ delta = int(delta)
self.ted.WEScroll(0, delta)
self.updatescrollbars()
@@ -556,6 +557,7 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
# delta = viewoffset
delta = min(maxdelta, delta)
delta = max(mindelta, delta)
+ delta = int(delta)
self.ted.WEScroll(delta, 0)
self.updatescrollbars()