summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-01-29 15:32:00 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-01-29 15:32:00 (GMT)
commit01a2d9e281a3b9ce7762c1ee192ae1f38d037fe7 (patch)
treea82d21b09c0d3a22ddb789e78b8d0229ade3766a /Mac/Lib
parentbf21bef2543e5045f3569cd9227d6b7921dda59c (diff)
downloadcpython-01a2d9e281a3b9ce7762c1ee192ae1f38d037fe7.zip
cpython-01a2d9e281a3b9ce7762c1ee192ae1f38d037fe7.tar.gz
cpython-01a2d9e281a3b9ce7762c1ee192ae1f38d037fe7.tar.bz2
Use FSpCreateResFile() in stead of CreateResFile().
Don't call OpenDeskAcc() and AppendResMenu() on Carbon.
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/FrameWork.py5
-rw-r--r--Mac/Lib/buildtools.py2
-rw-r--r--Mac/Lib/lib-toolbox/Menus.py2
-rw-r--r--Mac/Lib/lib-toolbox/MiniAEFrame.py5
-rw-r--r--Mac/Lib/lib-toolbox/QuickDraw.py4
-rw-r--r--Mac/Lib/test/AEservertest.py4
-rw-r--r--Mac/Lib/test/echo.py4
7 files changed, 10 insertions, 16 deletions
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py
index 75381fc..dc762cf 100644
--- a/Mac/Lib/FrameWork.py
+++ b/Mac/Lib/FrameWork.py
@@ -674,12 +674,13 @@ class AppleMenu(Menu):
Menu.__init__(self, bar, "\024")
self.additem(abouttext, None, aboutcallback)
self.addseparator()
- self.menu.AppendResMenu('DRVR')
+ if MacOS.runtimemodel == 'ppc':
+ self.menu.AppendResMenu('DRVR')
def dispatch(self, id, item, window, event):
if item == 1:
Menu.dispatch(self, id, item, window, event)
- else:
+ elif MacOS.runtimemodel == 'ppc':
name = self.menu.GetMenuItemText(item)
OpenDeskAcc(name)
diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py
index e8c6eb0..2a8fd03 100644
--- a/Mac/Lib/buildtools.py
+++ b/Mac/Lib/buildtools.py
@@ -140,7 +140,7 @@ def process_common(template, progress, code, rsrcname, destname, is_update, copy
try:
output = Res.FSpOpenResFile(dest_fss, WRITE)
except MacOS.Error:
- Res.CreateResFile(destname)
+ Res.FSpCreateResFile(destname, '????', 'APPL', MACFS.smAllScripts)
output = Res.FSpOpenResFile(dest_fss, WRITE)
# Copy the resources from the target specific resource template, if any
diff --git a/Mac/Lib/lib-toolbox/Menus.py b/Mac/Lib/lib-toolbox/Menus.py
index 5f7eff2..b70b5d0 100644
--- a/Mac/Lib/lib-toolbox/Menus.py
+++ b/Mac/Lib/lib-toolbox/Menus.py
@@ -1,4 +1,4 @@
-# Generated from 'Macintosh HD:SWDev:Metrowerks Codewarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Menus.h'
+# Generated from "Sap:Programma's:Metrowerks CodeWarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:Menus.h"
def FOUR_CHAR_CODE(x): return x
noMark = 0
diff --git a/Mac/Lib/lib-toolbox/MiniAEFrame.py b/Mac/Lib/lib-toolbox/MiniAEFrame.py
index 5f1f33e..fbb6f1b 100644
--- a/Mac/Lib/lib-toolbox/MiniAEFrame.py
+++ b/Mac/Lib/lib-toolbox/MiniAEFrame.py
@@ -36,7 +36,8 @@ class MiniApplication:
Menu.ClearMenuBar()
self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024")
applemenu.AppendMenu("%s;(-" % self.getaboutmenutext())
- applemenu.AppendResMenu('DRVR')
+ if MacOS.runtimemodel == 'ppc':
+ applemenu.AppendResMenu('DRVR')
applemenu.InsertMenu(0)
self.quitmenu = Menu.NewMenu(self.quitid, "File")
self.quitmenu.AppendMenu("Quit")
@@ -93,7 +94,7 @@ class MiniApplication:
if id == self.appleid:
if item == 1:
EasyDialogs.Message(self.getabouttext())
- elif item > 1:
+ elif item > 1 and hasattr(Menu, 'OpenDeskAcc'):
name = self.applemenu.GetMenuItemText(item)
Menu.OpenDeskAcc(name)
elif id == self.quitid and item == 1:
diff --git a/Mac/Lib/lib-toolbox/QuickDraw.py b/Mac/Lib/lib-toolbox/QuickDraw.py
index 2cd5a54..b9656f7 100644
--- a/Mac/Lib/lib-toolbox/QuickDraw.py
+++ b/Mac/Lib/lib-toolbox/QuickDraw.py
@@ -1,4 +1,4 @@
-# Generated from 'Macintosh HD:SWDev:Metrowerks Codewarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDraw.h'
+# Generated from "Sap:Programma's:Metrowerks CodeWarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDraw.h"
def FOUR_CHAR_CODE(x): return x
@@ -173,7 +173,7 @@ kCursorComponentErase = 0x0007
kCursorComponentMove = 0x0008
kCursorComponentAnimate = 0x0009
kCursorComponentLastReserved = 0x0050
-# Generated from 'Macintosh HD:SWDev:Metrowerks Codewarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDrawText.h'
+# Generated from "Sap:Programma's:Metrowerks CodeWarrior 6.0:Metrowerks CodeWarrior:MacOS Support:Universal:Interfaces:CIncludes:QuickDrawText.h"
def FOUR_CHAR_CODE(x): return x
diff --git a/Mac/Lib/test/AEservertest.py b/Mac/Lib/test/AEservertest.py
index 1e3e508..631889d 100644
--- a/Mac/Lib/test/AEservertest.py
+++ b/Mac/Lib/test/AEservertest.py
@@ -75,7 +75,6 @@ class EchoServer:
Menu.ClearMenuBar()
self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024")
applemenu.AppendMenu("All about echo...;(-")
- applemenu.AppendResMenu('DRVR')
applemenu.InsertMenu(0)
self.filemenu = Menu.NewMenu(self.fileid, 'File')
@@ -146,9 +145,6 @@ class EchoServer:
if id == self.appleid:
if item == 1:
mymessage("Echo -- echo AppleEvents")
- elif item > 1:
- name = self.applemenu.GetItem(item)
- Qd.OpenDeskAcc(name)
elif id == self.fileid:
if item == 1:
raise Quit
diff --git a/Mac/Lib/test/echo.py b/Mac/Lib/test/echo.py
index 1bad3e1..46c84c2 100644
--- a/Mac/Lib/test/echo.py
+++ b/Mac/Lib/test/echo.py
@@ -56,7 +56,6 @@ class EchoServer:
Menu.ClearMenuBar()
self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024")
applemenu.AppendMenu("All about echo...;(-")
- applemenu.AppendResMenu('DRVR')
applemenu.InsertMenu(0)
Menu.DrawMenuBar()
@@ -105,9 +104,6 @@ class EchoServer:
if id == self.appleid:
if item == 1:
mymessage("Echo -- echo AppleEvents")
- elif item > 1:
- name = self.applemenu.GetItem(item)
- Qd.OpenDeskAcc(name)
elif what <> autoKey:
print "Event:", (eventname(what), message, when, (h, v), modifiers)
## MacOS.HandleEvent(event)