summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-03 00:47:07 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-03 00:47:07 (GMT)
commit0c65e2504ef7e6d80babe911d991414f963cb08f (patch)
treeee5c31abd3ee4cf3785c19009fbe64a41263de01 /Tools
parent47ae028071d49f81e776fbc425f13917c77f5b58 (diff)
downloadcpython-0c65e2504ef7e6d80babe911d991414f963cb08f.zip
cpython-0c65e2504ef7e6d80babe911d991414f963cb08f.tar.gz
cpython-0c65e2504ef7e6d80babe911d991414f963cb08f.tar.bz2
Adapted to Unix (i.e., more hardcoded constants).
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/ZoomHeight.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/Tools/idle/ZoomHeight.py b/Tools/idle/ZoomHeight.py
index eee901c..b1ba70f 100644
--- a/Tools/idle/ZoomHeight.py
+++ b/Tools/idle/ZoomHeight.py
@@ -1,6 +1,7 @@
# Sample extension: zoom a window to maximum height
import re
+import sys
class ZoomHeight:
@@ -14,7 +15,7 @@ class ZoomHeight:
'<<zoom-height>>': ['<Alt-F2>'],
}
unix_keydefs = {
- '<<zoom-height>>': ['<Control-z><Control-z>'],
+ '<<zoom-height>>': ['<Control-x><Control-z>'],
}
def __init__(self, editwin):
@@ -28,8 +29,14 @@ class ZoomHeight:
top.bell()
return
width, height, x, y = map(int, m.groups())
- height = top.winfo_screenheight() - 72
- newgeom = "%dx%d+%d+%d" % (width, height, x, 0)
+ height = top.winfo_screenheight()
+ if sys.platform == 'win32':
+ y = 0
+ height = height = 72
+ else:
+ y = 24
+ height = height - 64
+ newgeom = "%dx%d+%d+%d" % (width, height, x, y)
if geom == newgeom:
newgeom = ""
top.wm_geometry(newgeom)