Fix for issue r1737832

This commit is contained in:
Ronald Oussoren 2009-01-02 14:52:09 +00:00
parent 7f8cbf0e73
commit 919697cefe
2 changed files with 11 additions and 5 deletions

View File

@ -573,7 +573,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
del d
def _process_Nav_args(dftflags, **args):
import aepack
import Carbon.AppleEvents
import Carbon.AE
import Carbon.File
for k in args.keys():
@ -585,11 +585,14 @@ def _process_Nav_args(dftflags, **args):
if args.has_key('defaultLocation') and \
not isinstance(args['defaultLocation'], Carbon.AE.AEDesc):
defaultLocation = args['defaultLocation']
if isinstance(defaultLocation, (Carbon.File.FSSpec, Carbon.File.FSRef)):
args['defaultLocation'] = aepack.pack(defaultLocation)
if isinstance(defaultLocation, Carbon.File.FSSpec):
args['defaultLocation'] = Carbon.AE.AECreateDesc(
Carbon.AppleEvents.typeFSS, defaultLocation.data)
else:
defaultLocation = Carbon.File.FSRef(defaultLocation)
args['defaultLocation'] = aepack.pack(defaultLocation)
if not isinstance(defaultLocation, Carbon.File.FSRef):
defaultLocation = Carbon.File.FSRef(defaultLocation)
args['defaultLocation'] = Carbon.AE.AECreateDesc(
Carbon.AppleEvents.typeFSRef, defaultLocation.data)
if args.has_key('typeList') and not isinstance(args['typeList'], Carbon.Res.ResourceType):
typeList = args['typeList'][:]
# Workaround for OSX typeless files:

View File

@ -232,6 +232,9 @@ Library
- Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr
- Issue #1737832 : plat-mac/EasyDialog.py no longer uses the broken aepack
module.
Tools/Demos
-----------