Doc typos corrected, added wxDIALOG_UNIT_COMPATIBILITY test, made file open

error result in a message box (docview.cpp)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-07-08 10:29:17 +00:00
parent 92eaf25bd0
commit 3a035fb95f
5 changed files with 28 additions and 8 deletions

View File

@@ -1349,8 +1349,22 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
0,
wxTheApp->GetTopWindow());
if (!pathTmp.IsEmpty() && wxFileExists(pathTmp))
if (!pathTmp.IsEmpty())
{
if (!wxFileExists(pathTmp))
{
wxString msgTitle;
if (!wxTheApp->GetAppName().IsEmpty())
msgTitle = wxTheApp->GetAppName();
else
msgTitle = wxString(_("File error"));
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
wxTheApp->GetTopWindow());
path = wxT("");
return (wxDocTemplate *) NULL;
}
m_lastDirectory = wxPathOnly(pathTmp);
path = pathTmp;