+ def OnTitleIsModified(self):
+ """
+ Add/remove to the frame's title an indication that the document is dirty.
+ If the document is dirty, an '*' is appended to the title
+ This method has been added to wxPython and is not in wxWindows.
+ """
+ title = self.GetTitle()
+ if title:
+ if self.GetDocument().IsModified():
+ if title.endswith("*"):
+ return
+ else:
+ title = title + "*"
+ self.SetTitle(title)
+ else:
+ if title.endswith("*"):
+ title = title[:-1]
+ self.SetTitle(title)
+ else:
+ return
+
+