From 5c32565ef119fb19ac55c1f06d8c5b64b4770792 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 24 Feb 2014 06:44:49 +0000 Subject: [PATCH] add support for wxDD_DIR_MUST_EXIST, closes #16002 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dirdlg.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gtk/dirdlg.cpp b/src/gtk/dirdlg.cpp index e42d66da42..3ae28c4815 100644 --- a/src/gtk/dirdlg.cpp +++ b/src/gtk/dirdlg.cpp @@ -93,6 +93,15 @@ bool wxDirDialog::Create(wxWindow* parent, g_object_ref(m_widget); gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_ACCEPT); +#if GTK_CHECK_VERSION(2,18,0) +#ifndef __WXGTK3__ + if (gtk_check_version(2,18,0) == NULL) +#endif + { + gtk_file_chooser_set_create_folders( + GTK_FILE_CHOOSER(m_widget), (style & wxDD_DIR_MUST_EXIST) == 0); + } +#endif // gtk_widget_hide_on_delete is used here to avoid that Gtk automatically destroys // the dialog when the user press ESC on the dialog: in that case a second call to