X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/724b119a15d857c97d1a9e4604692ac55d8b58b9..2e0d1932aa72e3ca2b754597f428c75c75a801d2:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 34cbdbadaf..6c364c1438 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -66,11 +66,13 @@ #if wxUSE_STD_IOSTREAM #include "wx/ioswrap.h" + #include "wx/beforestd.h" #if wxUSE_IOSTREAMH #include #else #include #endif + #include "wx/afterstd.h" #else #include "wx/wfstream.h" #endif @@ -296,7 +298,7 @@ bool wxDocument::SaveAs() #else wxString filter = docTemplate->GetFileFilter() ; #endif - wxString tmp = wxFileSelector(_("Save as"), + wxString tmp = wxFileSelector(_("Save As"), docTemplate->GetDirectory(), wxFileNameFromPath(GetFilename()), docTemplate->GetDefaultExtension(), @@ -466,8 +468,8 @@ bool wxDocument::OnSaveModified() wxString title = GetUserReadableName(); wxString msgTitle; - if (!wxTheApp->GetAppName().empty()) - msgTitle = wxTheApp->GetAppName(); + if (!wxTheApp->GetAppDisplayName().empty()) + msgTitle = wxTheApp->GetAppDisplayName(); else msgTitle = wxString(_("Warning")); @@ -575,8 +577,8 @@ void wxDocument::SetFilename(const wxString& filename, bool notifyViews) bool wxDocument::DoSaveDocument(const wxString& file) { wxString msgTitle; - if (!wxTheApp->GetAppName().empty()) - msgTitle = wxTheApp->GetAppName(); + if (!wxTheApp->GetAppDisplayName().empty()) + msgTitle = wxTheApp->GetAppDisplayName(); else msgTitle = wxString(_("File error")); @@ -1448,7 +1450,7 @@ wxString wxDocManager::MakeNewDocumentName() // If docName is empty, a document is not currently active. wxString wxDocManager::MakeFrameTitle(wxDocument* doc) { - wxString appName = wxTheApp->GetAppName(); + wxString appName = wxTheApp->GetAppDisplayName(); wxString title; if (!doc) title = appName; @@ -1615,7 +1617,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, wxWindow* parent = wxFindSuitableParent(); - wxString pathTmp = wxFileSelectorEx(_("Select a file"), + wxString pathTmp = wxFileSelectorEx(_("Open File"), m_lastDirectory, wxEmptyString, &FilterIndex, @@ -1629,8 +1631,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, if (!wxFileExists(pathTmp)) { wxString msgTitle; - if (!wxTheApp->GetAppName().empty()) - msgTitle = wxTheApp->GetAppName(); + if (!wxTheApp->GetAppDisplayName().empty()) + msgTitle = wxTheApp->GetAppDisplayName(); else msgTitle = wxString(_("File error")); @@ -2214,7 +2216,7 @@ void wxFileHistory::RemoveFileFromHistory(size_t i) wxCHECK_RET( i < m_fileHistory.GetCount(), wxT("invalid index in wxFileHistory::RemoveFileFromHistory") ); - // delete the element from the array + // delete the element from the array m_fileHistory.RemoveAt(i); wxList::compatibility_iterator node = m_fileMenus.GetFirst(); @@ -2277,7 +2279,7 @@ void wxFileHistory::Load(wxConfigBase& config) buf.Printf(wxT("file%d"), 1); wxString historyFile; - while ((m_fileHistory.GetCount() < m_fileMaxFiles) && + while ((m_fileHistory.GetCount() < m_fileMaxFiles) && config.Read(buf, &historyFile) && !historyFile.empty()) { m_fileHistory.Add(historyFile);