summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE/PyEdit.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-25 15:08:02 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-25 15:08:02 (GMT)
commitc00b6d7a0a72a481de3064e0bd11e7b30f5b2610 (patch)
treeccd778cd1144df1cc98831bf7783e521e0f56e4d /Mac/Tools/IDE/PyEdit.py
parentf4a9ac25e9cf27914ad4235d0745980d56212c1d (diff)
downloadcpython-c00b6d7a0a72a481de3064e0bd11e7b30f5b2610.zip
cpython-c00b6d7a0a72a481de3064e0bd11e7b30f5b2610.tar.gz
cpython-c00b6d7a0a72a481de3064e0bd11e7b30f5b2610.tar.bz2
Added an "Open Recent" command. Fixes 607810.
Diffstat (limited to 'Mac/Tools/IDE/PyEdit.py')
-rw-r--r--Mac/Tools/IDE/PyEdit.py6
1 files changed, 6 insertions, 0 deletions
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 @@ class Editor(W.Window):
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 @@ class Editor(W.Window):
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 @@ class Editor(W.Window):
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: