]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
Cache HDC used for painting for the entire duration of WM_PAINT processing.
[wxWidgets.git] / src / gtk / filedlg.cpp
index ad0ac78a83f177569c92c6d11d773480525e4ccb..c86a7e37e21e4ae1858ee5e5108e3d1408a5cff5 100644 (file)
@@ -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();