added wxDialog::GetParentForModalDialog() and use it to try to always create modal dialogs with a parent (slightly modified patch 1702962)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-22 20:34:41 +00:00
parent a2979ead8d
commit 2229243bdf
20 changed files with 63 additions and 14 deletions

View File

@@ -190,7 +190,10 @@ void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
bool wxGenericFontDialog::DoCreate(wxWindow *parent)
{
if ( !wxDialog::Create( parent , wxID_ANY , _T("Choose Font") , wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
parent = GetParentForModalDialog(parent);
if ( !wxDialog::Create( parent , wxID_ANY , _T("Choose Font") ,
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
_T("fontdialog") ) )
{
wxFAIL_MSG( wxT("wxFontDialog creation failed") );