]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow non-toplevel-window to given as the
authorRobert Roebling <robert@roebling.de>
Tue, 16 Mar 2004 11:54:45 +0000 (11:54 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 16 Mar 2004 11:54:45 +0000 (11:54 +0000)
   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

src/gtk/msgdlg.cpp
src/gtk1/msgdlg.cpp

index 2dd5336e657193c47d39cb5e4d2af271a1bdd2d5..755a9fd5d362fd2a1ba42aa3cb81986561127e91 100644 (file)
@@ -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;
 }
 
index 2dd5336e657193c47d39cb5e4d2af271a1bdd2d5..755a9fd5d362fd2a1ba42aa3cb81986561127e91 100644 (file)
@@ -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;
 }