Added an "Open Recent" command. Fixes 607810.
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index ef31486..6cac553 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -63,6 +63,7 @@
text = f.read()
f.close()
self._creator, filetype = MacOS.GetCreatorAndType(path)
+ self.addrecentfile(path)
else:
raise IOError, "file '%s' does not exist" % path
self.path = path
@@ -399,6 +400,7 @@
del linecache.cache[self.path]
import macostools
macostools.touched(self.path)
+ self.addrecentfile(self.path)
def can_save(self, menuitem):
return self.editgroup.editor.changed or self.editgroup.editor.selchanged
@@ -780,6 +782,10 @@
def selectline(self, lineno, charoffset = 0):
self.editgroup.editor.selectline(lineno - 1, charoffset)
+
+ def addrecentfile(self, filename):
+ app = W.getapplication()
+ app.addrecentfile(filename)
class _saveoptions: