summaryrefslogtreecommitdiffstats
path: root/Mac/Demo/waste/wed.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Demo/waste/wed.py')
-rw-r--r--Mac/Demo/waste/wed.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Mac/Demo/waste/wed.py b/Mac/Demo/waste/wed.py
index 199201b..7161ae5 100644
--- a/Mac/Demo/waste/wed.py
+++ b/Mac/Demo/waste/wed.py
@@ -12,7 +12,7 @@ import waste
import WASTEconst
from Carbon import Scrap
import os
-import macfs
+import EasyDialogs
UNDOLABELS = [ # Indexed by WEGetUndoInfo() value
None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style"]
@@ -181,9 +181,9 @@ class WasteWindow(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()
@@ -329,10 +329,9 @@ class Wed(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