]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected type for text document (non standard save handler)
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Jan 2003 17:57:05 +0000 (17:57 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 10 Jan 2003 17:57:05 +0000 (17:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/docview/doc.cpp

index 9cbea87d86cf853574cabbe863aab24550469ef4..7ce1d828e6419b166a25733b41492cbc431f437c 100644 (file)
@@ -24,6 +24,9 @@
 #include "wx/wx.h"
 #endif
 #include "wx/txtstrm.h"
+#ifdef __WXMAC__
+#include "wx/filename.h"
+#endif
 
 #if !wxUSE_DOC_VIEW_ARCHITECTURE
 #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!
@@ -31,7 +34,6 @@
 
 #include "doc.h"
 #include "view.h"
-
 IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument)
 
 DrawingDocument::DrawingDocument(void)
@@ -342,6 +344,10 @@ bool TextEditDocument::OnSaveDocument(const wxString& filename)
     if (!view->textsw->SaveFile(filename))
         return FALSE;
     Modify(FALSE);
+#ifdef __WXMAC__
+    wxFileName fn(filename) ;
+    fn.MacSetDefaultTypeAndCreator() ;
+#endif
     return TRUE;
 }