summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
commit362c7cd07bd32f94e80e5ca954834cfbc1709953 (patch)
tree8f929854033e856a2bf29d9167da8c98f754a416 /Mac/Lib
parent202355a333b98213449b30dcbfa620be86c96085 (diff)
downloadcpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.zip
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.gz
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.bz2
Lots of minor tweaks for the pep252 checkins, mainly because Qd
attributes are no longer supported.
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/EasyDialogs.py2
-rw-r--r--Mac/Lib/FrameWork.py14
-rw-r--r--Mac/Lib/PixMapWrapper.py2
-rw-r--r--Mac/Lib/bgenlocations.py2
4 files changed, 10 insertions, 10 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 8b81063..8e1e056 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -222,7 +222,7 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
-screenbounds = Qd.qd.screenBits.bounds
+screenbounds = Qd.GetQDGlobalsScreenBits().bounds
screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
screenbounds[2]-4, screenbounds[3]-4
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py
index f2f6fe2..24acd41 100644
--- a/Mac/Lib/FrameWork.py
+++ b/Mac/Lib/FrameWork.py
@@ -68,7 +68,7 @@ partname[8] = 'inZoomOut'
#
# The useable portion of the screen
# ## but what happens with multiple screens? jvr
-screenbounds = qd.screenBits.bounds
+screenbounds = GetQDGlobalsScreenBits().bounds
screenbounds = screenbounds[0]+4, screenbounds[1]+4, \
screenbounds[2]-4, screenbounds[3]-4
@@ -97,7 +97,7 @@ def setwatchcursor():
SetCursor(_watch)
def setarrowcursor():
- SetCursor(qd.arrow)
+ SetCursor(GetQDGlobalsArrow())
class Application:
@@ -808,7 +808,7 @@ class Window:
growlimit = (50, 50, screenbounds[2] - screenbounds[0], screenbounds[3] - screenbounds[1]) # jvr
def do_resize(self, width, height, window):
- l, t, r, b = self.wid.GetWindowPort().portRect # jvr, forGrowIcon
+ l, t, r, b = self.wid.GetWindowPort().GetPortBounds() # jvr, forGrowIcon
self.SetPort() # jvr
self.wid.InvalWindowRect((r - SCROLLBARWIDTH + 1, b - SCROLLBARWIDTH + 1, r, b)) # jvr
window.SizeWindow(width, height, 1) # changed updateFlag to true jvr
@@ -816,7 +816,7 @@ class Window:
def do_postresize(self, width, height, window):
SetPort(window)
- self.wid.InvalWindowRect(window.GetWindowPort().portRect)
+ self.wid.InvalWindowRect(window.GetWindowPort().GetPortBounds())
def do_inContent(self, partcode, window, event):
#
@@ -849,7 +849,7 @@ class Window:
for i in range(8):
time.sleep(0.1)
InvertRgn(window.GetWindowPort().visRgn)
- FillRgn(window.GetWindowPort().visRgn, qd.gray)
+ FillRgn(window.GetWindowPort().visRgn, GetQDGlobalsGray())
else:
EraseRgn(window.GetWindowPort().visRgn)
@@ -902,7 +902,7 @@ class ScrolledWindow(ControlsWindow):
SetPort(self.wid)
self.barx = self.bary = None
self.barx_enabled = self.bary_enabled = 1
- x0, y0, x1, y1 = self.wid.GetWindowPort().portRect
+ x0, y0, x1, y1 = self.wid.GetWindowPort().GetPortBounds()
vx, vy = self.getscrollbarvalues()
if vx == None: self.barx_enabled, vx = 0, 0
if vy == None: self.bary_enabled, vy = 0, 0
@@ -938,7 +938,7 @@ class ScrolledWindow(ControlsWindow):
self.wid.DrawGrowIcon() # jvr
def do_postresize(self, width, height, window):
- l, t, r, b = self.wid.GetWindowPort().portRect
+ l, t, r, b = self.wid.GetWindowPort().GetPortBounds()
self.SetPort()
if self.barx:
self.barx.HideControl() # jvr
diff --git a/Mac/Lib/PixMapWrapper.py b/Mac/Lib/PixMapWrapper.py
index b167cc2..bcd3e07 100644
--- a/Mac/Lib/PixMapWrapper.py
+++ b/Mac/Lib/PixMapWrapper.py
@@ -151,7 +151,7 @@ class PixMapWrapper:
if y2 == None:
dest[3] = y1 + src[3]-src[1]
if not port: port = Qd.GetPort()
- Qd.CopyBits(self.PixMap(), port.portBits, src, tuple(dest),
+ Qd.CopyBits(self.PixMap(), port.GetPortBitMapForCopyBits(), src, tuple(dest),
QuickDraw.srcCopy, None)
def fromstring(self,s,width,height,format=imgformat.macrgb):
diff --git a/Mac/Lib/bgenlocations.py b/Mac/Lib/bgenlocations.py
index 28792ba..84f3587 100644
--- a/Mac/Lib/bgenlocations.py
+++ b/Mac/Lib/bgenlocations.py
@@ -28,7 +28,7 @@ else:
if sys.platform == 'mac':
_MWERKSDIR="Macintosh HD:Applications (Mac OS 9):Metrowerks CodeWarrior 7.0:Metrowerks CodeWarrior"
else:
- _MWERKSDIR="/Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/"
+ _MWERKSDIR="/Volumes/Moes/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/"
INCLUDEDIR=os.path.join(_MWERKSDIR, "MacOS Support", "Universal", "Interfaces", "CIncludes")
#