From: Mart Raudsepp Date: Tue, 14 Jun 2005 12:41:20 +0000 (+0000) Subject: Use the toplevel widget as the parent in gtk_file_chooser_dialog_new call. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/29a7bba6b7722d7436519cb7ab91a5a7a35716df 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 --- diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 500acf64ef..1293d32fd3 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -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 ) diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 500acf64ef..1293d32fd3 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -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 )