X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b7067a05dd2373eb4d6b1a2d6d5699232eaa333..ddc8faa9e1f9d7dc99ef11e2294ad33915092024:/src/gtk/filedlg.cpp diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index ad0ac78a83..c86a7e37e2 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -29,6 +29,7 @@ #include "wx/filename.h" // wxFilename #include "wx/tokenzr.h" // wxStringTokenizer #include "wx/filefn.h" // ::wxGetCwd +#include "wx/testing.h" //----------------------------------------------------------------------------- // "clicked" for OK-button @@ -41,6 +42,7 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog) wxGtkString filename(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget))); // gtk version numbers must be identical with the one in ctor (that calls set_do_overwrite_confirmation) +#ifndef __WXGTK3__ #if GTK_CHECK_VERSION(2,7,3) if (gtk_check_version(2, 7, 3) != NULL) #endif @@ -62,6 +64,7 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog) } } } +#endif if (style & wxFD_FILE_MUST_EXIST) { @@ -290,8 +293,14 @@ bool wxFileDialog::Create(wxWindow *parent, const wxString& message, } #if GTK_CHECK_VERSION(2,7,3) - if ((style & wxFD_OVERWRITE_PROMPT) && !gtk_check_version(2,7,3)) + if ((style & wxFD_OVERWRITE_PROMPT) +#ifndef __WXGTK3__ + && gtk_check_version(2,7,3) == NULL +#endif + ) + { gtk_file_chooser_set_do_overwrite_confirmation(file_chooser, true); + } #endif } else // wxFD_OPEN @@ -334,6 +343,8 @@ void wxFileDialog::OnFakeOk(wxCommandEvent& WXUNUSED(event)) int wxFileDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + CreateExtraControl(); return wxDialog::ShowModal();