Various bug fixes to OGL; wxStripExtension prototype added to filefn.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-08-05 07:13:08 +00:00
parent 7a4b9130e3
commit 2bb0cd285a
19 changed files with 539 additions and 426 deletions

View File

@@ -196,16 +196,28 @@ bool wxDocument::SaveAs(void)
char *tmp = wxFileSelector("Save as", docTemplate->GetDirectory(), GetFilename(),
docTemplate->GetDefaultExtension(), docTemplate->GetFileFilter(),
0, GetDocumentWindow());
wxSAVE|wxOVERWRITE_PROMPT, GetDocumentWindow());
if (!tmp)
return FALSE;
else
{
SetFilename(tmp);
SetTitle(wxFileNameFromPath(tmp));
wxString fileName(tmp);
wxString path("");
wxString name("");
wxString ext("");
wxSplitPath(fileName, & path, & name, & ext);
if (ext.IsEmpty() || ext == "")
{
fileName += ".";
fileName += docTemplate->GetDefaultExtension();
}
SetFilename(fileName);
SetTitle(wxFileNameFromPath(fileName));
GetDocumentManager()->AddFileToHistory(tmp);
GetDocumentManager()->AddFileToHistory(fileName);
// Notify the views that the filename has changed
wxNode *node = m_documentViews.First();