// Since text windows have their own method for saving to/loading from files,
// we override OnSave/OpenDocument instead of Save/LoadObject
-bool TextEditDocument::OnSaveDocument(const wxString& filename)
+bool TextEditDocument::DoSaveDocument(const wxString& filename)
{
TextEditView* view = GetFirstView();
if (!view->m_textsw->SaveFile(filename))
return false;
- Modify(false);
-#ifdef __WXMAC__
- wxFileName fn(filename) ;
- fn.MacSetDefaultTypeAndCreator() ;
-#endif
+
return true;
}
-bool TextEditDocument::OnOpenDocument(const wxString& filename)
+bool TextEditDocument::DoOpenDocument(const wxString& filename)
{
TextEditView* view = GetFirstView();
if (!view->m_textsw->LoadFile(filename))
return false;
- SetFilename(filename, true);
- Modify(false);
- UpdateAllViews();
return true;
}
*/
TextEditView* GetFirstView() const;
- virtual bool OnSaveDocument(const wxString& filename);
- virtual bool OnOpenDocument(const wxString& filename);
+ virtual bool DoSaveDocument(const wxString& filename);
+ virtual bool DoOpenDocument(const wxString& filename);
virtual bool IsModified(void) const;
virtual void Modify(bool mod);
};