From: Robert Roebling Date: Tue, 16 Mar 2004 11:54:45 +0000 (+0000) Subject: Allow non-toplevel-window to given as the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/abb492ba039cc5fcc0a5e9b1b1193995365501b3 Allow non-toplevel-window to given as the parent of a message dialog (as it is done in the controls sample). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 2dd5336e65..755a9fd5d3 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -39,6 +39,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, m_caption = caption; m_message = message; m_dialogStyle = style; + + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + m_parent = parent; } diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index 2dd5336e65..755a9fd5d3 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -39,6 +39,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, m_caption = caption; m_message = message; m_dialogStyle = style; + + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + m_parent = parent; }