X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2d93e735a9f126b855a9353ca8ddeacaaf52817..0a816d95815bc4b77f860e88e8f12bf3e9adab10:/src/gtk1/dialog.cpp diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index b52338cef1..45a20f012b 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -632,7 +632,9 @@ int wxDialog::ShowModal() return GetReturnCode(); } - if ( !GetParent() ) + // use the apps top level window as parent if none given unless explicitly + // forbidden + if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) ) { wxWindow *parent = wxTheApp->GetTopWindow(); if ( parent && parent != this ) @@ -676,11 +678,6 @@ void wxDialog::EndModal( int retCode ) Show( FALSE ); } -void wxDialog::InitDialog() -{ - wxWindow::InitDialog(); -} - void wxDialog::SetIcon( const wxIcon &icon ) { m_icon = icon;