self.set_filename(filename)
self.text.mark_set("insert", "1.0")
self.text.see("insert")
+
+ self.updaterecentfileslist(filename)
return True
def decode(self, chars):
if self.writefile(self.filename):
self.set_saved(1)
self.text.focus_set()
+
return "break"
def save_as(self, event):
self.set_filename(filename)
self.set_saved(1)
self.text.focus_set()
+
+ self.updaterecentfileslist(filename)
return "break"
def save_a_copy(self, event):
if filename:
self.writefile(filename)
self.text.focus_set()
+
+ self.updaterecentfileslist(filename)
return "break"
def writefile(self, filename):
return self.savedialog.show(initialdir=dir, initialfile=base)
+ def updaterecentfileslist(self,filename):
+ #
+ # Updates recent file list on all editor windows
+ #
+ self.editwin.UpdateRecentFilesList(filename)
+
def test():
root = Tk()
class MyEditWin: