namespace
{
-wxWindow *wxFindSuitableParent()
-{
- wxWindow * const win = wxGetTopLevelParent(wxWindow::FindFocus());
-
- return win ? win : wxTheApp->GetTopWindow();
-}
-
wxString FindExtension(const wxString& path)
{
wxString ext;
GetUserReadableName()
),
wxTheApp->GetAppDisplayName(),
- wxYES_NO | wxCANCEL | wxICON_QUESTION | wxCENTRE,
- wxFindSuitableParent()
+ wxYES_NO | wxCANCEL | wxICON_QUESTION | wxCENTRE
) )
{
case wxNO:
int FilterIndex = -1;
- wxWindow* parent = wxFindSuitableParent();
-
wxString pathTmp = wxFileSelectorEx(_("Open File"),
GetLastDirectory(),
wxEmptyString,
&FilterIndex,
- descrBuf,
- 0,
- parent);
+ descrBuf);
wxDocTemplate *theTemplate = NULL;
if (!pathTmp.empty())
wxMessageBox(_("Sorry, could not open this file."),
msgTitle,
- wxOK | wxICON_EXCLAMATION | wxCENTRE,
- parent);
+ wxOK | wxICON_EXCLAMATION | wxCENTRE);
path = wxEmptyString;
return NULL;
// allowed templates in runtime.
wxMessageBox(_("Sorry, the format for this file is unknown."),
_("Open File"),
- wxOK | wxICON_EXCLAMATION | wxCENTRE,
- parent);
+ wxOK | wxICON_EXCLAMATION | wxCENTRE);
}
}
else
_("Select a document template"),
_("Templates"),
strings,
- (void **)data.get(),
- wxFindSuitableParent()
+ (void **)data.get()
);
}
_("Select a document view"),
_("Views"),
strings,
- (void **)data.get(),
- wxFindSuitableParent()
+ (void **)data.get()
);
}