diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-01-26 21:40:00 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-01-26 21:40:00 (GMT) |
commit | b340acf9fd893140efd65a56134a814a8d9bac73 (patch) | |
tree | c991a32a9d7b34262675c1cd97969c352c43f74e /Mac/Demo/textedit/ped.py | |
parent | d9db3a67138deec981184c173c290025e9760f1d (diff) | |
download | cpython-b340acf9fd893140efd65a56134a814a8d9bac73.zip cpython-b340acf9fd893140efd65a56134a814a8d9bac73.tar.gz cpython-b340acf9fd893140efd65a56134a814a8d9bac73.tar.bz2 |
Use new file dialogs.
Diffstat (limited to 'Mac/Demo/textedit/ped.py')
-rw-r--r-- | Mac/Demo/textedit/ped.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Mac/Demo/textedit/ped.py b/Mac/Demo/textedit/ped.py index 6666158..80cf7e5 100644 --- a/Mac/Demo/textedit/ped.py +++ b/Mac/Demo/textedit/ped.py @@ -131,9 +131,9 @@ class TEWindow(ScrolledWindow): self.changed = 0 def menu_save_as(self): - fss, ok = macfs.StandardPutFile('Save as:') - if not ok: return - self.path = fss.as_pathname() + path = EasyDialogs.AskFileForSave(message='Save as:') + if not path: return + self.path = path self.name = os.path.split(self.path)[-1] self.wid.SetWTitle(self.name) self.menu_save() @@ -265,10 +265,9 @@ class Ped(Application): def _open(self, askfile): if askfile: - fss, ok = macfs.StandardGetFile('TEXT') - if not ok: + path = EasyDialogs.AskFileForOpen(typeList=('TEXT',)) + if not path: return - path = fss.as_pathname() name = os.path.split(path)[-1] try: fp = open(path, 'rb') # NOTE binary, we need cr as end-of-line |