]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/filedlg.cpp
64 bit compilation fix
[wxWidgets.git] / src / gtk1 / filedlg.cpp
index 1293d32fd3e1ff115736fad315f41d0ce1a27894..ca8605052733f7564b111cdd6932d30a410bb85f 100644 (file)
@@ -7,10 +7,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "filedlggtk.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -50,6 +46,10 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
     int style = dialog->GetStyle();
     gchar* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
 
     int style = dialog->GetStyle();
     gchar* 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)
+#if GTK_CHECK_VERSION(2,7,3)
+    if(gtk_check_version(2,7,3) != NULL)
+#endif
     if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
     {
         if ( g_file_test(filename, G_FILE_TEST_EXISTS) )
     if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
     {
         if ( g_file_test(filename, G_FILE_TEST_EXISTS) )
@@ -157,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         if (parent)
             gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
         if (parent)
             gtk_parent = GTK_WINDOW( gtk_widget_get_toplevel(parent->m_widget) );
 
-        gchar* ok_btn_stock;
+        const gchar* ok_btn_stock;
         if ( style & wxSAVE )
         {
             gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
         if ( style & wxSAVE )
         {
             gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
@@ -200,6 +200,11 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
 
             gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
                 wxConvFileName->cWX2MB(defaultFileName));
 
             gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
                 wxConvFileName->cWX2MB(defaultFileName));
+
+#if GTK_CHECK_VERSION(2,7,3)
+            if (!gtk_check_version(2,7,3))
+                gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(m_widget), TRUE);
+#endif
         }
         else
         {
         }
         else
         {