remove unneeded wxFindSuitableParent()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-09 12:57:00 +00:00
parent e4d531ee8d
commit b6e96faf3e

View File

@@ -105,13 +105,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
namespace namespace
{ {
wxWindow *wxFindSuitableParent()
{
wxWindow * const win = wxGetTopLevelParent(wxWindow::FindFocus());
return win ? win : wxTheApp->GetTopWindow();
}
wxString FindExtension(const wxString& path) wxString FindExtension(const wxString& path)
{ {
wxString ext; wxString ext;
@@ -489,8 +482,7 @@ bool wxDocument::OnSaveModified()
GetUserReadableName() GetUserReadableName()
), ),
wxTheApp->GetAppDisplayName(), wxTheApp->GetAppDisplayName(),
wxYES_NO | wxCANCEL | wxICON_QUESTION | wxCENTRE, wxYES_NO | wxCANCEL | wxICON_QUESTION | wxCENTRE
wxFindSuitableParent()
) ) ) )
{ {
case wxNO: case wxNO:
@@ -1566,15 +1558,11 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
int FilterIndex = -1; int FilterIndex = -1;
wxWindow* parent = wxFindSuitableParent();
wxString pathTmp = wxFileSelectorEx(_("Open File"), wxString pathTmp = wxFileSelectorEx(_("Open File"),
GetLastDirectory(), GetLastDirectory(),
wxEmptyString, wxEmptyString,
&FilterIndex, &FilterIndex,
descrBuf, descrBuf);
0,
parent);
wxDocTemplate *theTemplate = NULL; wxDocTemplate *theTemplate = NULL;
if (!pathTmp.empty()) if (!pathTmp.empty())
@@ -1589,8 +1577,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
wxMessageBox(_("Sorry, could not open this file."), wxMessageBox(_("Sorry, could not open this file."),
msgTitle, msgTitle,
wxOK | wxICON_EXCLAMATION | wxCENTRE, wxOK | wxICON_EXCLAMATION | wxCENTRE);
parent);
path = wxEmptyString; path = wxEmptyString;
return NULL; return NULL;
@@ -1613,8 +1600,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
// allowed templates in runtime. // allowed templates in runtime.
wxMessageBox(_("Sorry, the format for this file is unknown."), wxMessageBox(_("Sorry, the format for this file is unknown."),
_("Open File"), _("Open File"),
wxOK | wxICON_EXCLAMATION | wxCENTRE, wxOK | wxICON_EXCLAMATION | wxCENTRE);
parent);
} }
} }
else else
@@ -1696,8 +1682,7 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
_("Select a document template"), _("Select a document template"),
_("Templates"), _("Templates"),
strings, strings,
(void **)data.get(), (void **)data.get()
wxFindSuitableParent()
); );
} }
@@ -1771,8 +1756,7 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
_("Select a document view"), _("Select a document view"),
_("Views"), _("Views"),
strings, strings,
(void **)data.get(), (void **)data.get()
wxFindSuitableParent()
); );
} }