]> git.saurik.com Git - wxWidgets.git/commitdiff
Use the toplevel widget as the parent in gtk_file_chooser_dialog_new call.
authorMart Raudsepp <leio@gentoo.org>
Tue, 14 Jun 2005 12:41:20 +0000 (12:41 +0000)
committerMart Raudsepp <leio@gentoo.org>
Tue, 14 Jun 2005 12:41:20 +0000 (12:41 +0000)
If hierarchy is bad, base classes would assert.
Fixes bug #1206516

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/filedlg.cpp
src/gtk1/filedlg.cpp

index 500acf64ef8f7d4c96944784968ab1d930872bfa..1293d32fd3e1ff115736fad315f41d0ce1a27894 100644 (file)
@@ -155,7 +155,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         GtkFileChooserAction gtk_action;
         GtkWindow* gtk_parent = NULL;
         if (parent)
-            gtk_parent = GTK_WINDOW(parent->m_widget);
+            gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
         gchar* ok_btn_stock;
         if ( style & wxSAVE )
index 500acf64ef8f7d4c96944784968ab1d930872bfa..1293d32fd3e1ff115736fad315f41d0ce1a27894 100644 (file)
@@ -155,7 +155,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         GtkFileChooserAction gtk_action;
         GtkWindow* gtk_parent = NULL;
         if (parent)
-            gtk_parent = GTK_WINDOW(parent->m_widget);
+            gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
         gchar* ok_btn_stock;
         if ( style & wxSAVE )