summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-21 13:56:34 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-21 13:56:34 (GMT)
commit08a7a0d60becee3eaf5faa2340cc40f1820043b3 (patch)
tree70f5a62c6598c5aee0bd6fe902840bf9a08eabd9
parentf2c84d0fa7e4dcb5ab62b9fb6d504c941ccddc29 (diff)
downloadcpython-08a7a0d60becee3eaf5faa2340cc40f1820043b3.zip
cpython-08a7a0d60becee3eaf5faa2340cc40f1820043b3.tar.gz
cpython-08a7a0d60becee3eaf5faa2340cc40f1820043b3.tar.bz2
Use new file dialogs in GetArgv()
-rw-r--r--Lib/plat-mac/EasyDialogs.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
index 25a791a..8d33a09 100644
--- a/Lib/plat-mac/EasyDialogs.py
+++ b/Lib/plat-mac/EasyDialogs.py
@@ -28,7 +28,6 @@ import MacOS
import string
from Carbon.ControlAccessor import * # Also import Controls constants
import Carbon.File
-import macfs
import macresource
import os
@@ -494,17 +493,17 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
else:
MacOS.SysBeep()
elif n == ARGV_ADD_OLDFILE:
- fss, ok = macfs.StandardGetFile()
- if ok:
- stringstoadd = [fss.as_pathname()]
+ pathname = AskFileForOpen()
+ if pathname:
+ stringstoadd = [pathname]
elif n == ARGV_ADD_NEWFILE:
- fss, ok = macfs.StandardPutFile('')
- if ok:
- stringstoadd = [fss.as_pathname()]
+ pathname = AskFileForSave()
+ if pathname:
+ stringstoadd = [pathname]
elif n == ARGV_ADD_FOLDER:
- fss, ok = macfs.GetDirectory()
- if ok:
- stringstoadd = [fss.as_pathname()]
+ pathname = AskFolder()
+ if pathname:
+ stringstoadd = [pathname]
elif n == ARGV_CMDLINE_DATA:
pass # Nothing to do
else:
@@ -694,7 +693,7 @@ def AskFolder(**args):
def test():
- import time, sys
+ import time, sys, macfs
Message("Testing EasyDialogs.")
optionlist = (('v', 'Verbose'), ('verbose', 'Verbose as long option'),