X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..09d68ec1c35deb4fe3bd5b3ad61d7adcbd260bb3:/src/gtk/dialog.cpp?ds=sidebyside diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 25f2982814..45a20f012b 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -231,6 +231,7 @@ void wxDialog::Init() m_returnCode = 0; m_sizeSet = FALSE; m_modalShowing = FALSE; + m_themeEnabled = TRUE; } wxDialog::wxDialog( wxWindow *parent, @@ -631,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 ) @@ -675,11 +678,6 @@ void wxDialog::EndModal( int retCode ) Show( FALSE ); } -void wxDialog::InitDialog() -{ - wxWindow::InitDialog(); -} - void wxDialog::SetIcon( const wxIcon &icon ) { m_icon = icon;