Use the toplevel widget as the parent in gtk_file_chooser_dialog_new call.

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
This commit is contained in:
Mart Raudsepp 2005-06-14 12:41:20 +00:00
parent 467f4d3a74
commit 29a7bba6b7
2 changed files with 2 additions and 2 deletions

View 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 )

View 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 )