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:
parent
467f4d3a74
commit
29a7bba6b7
@ -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 )
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user