]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
wxUniv compilation fixes after wxComboControl patch
[wxWidgets.git] / src / gtk / filedlg.cpp
index 420c2e32c07999a76dcda8b20f2f3f81d7b83d5a..4488c5e837339dea1f365571717a6fd6025c54d5 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gtk/filedlg.cpp
+// Name:        src/gtk/filedlg.cpp
 // Purpose:     native implementation of wxFileDialog
 // Author:      Robert Roebling, Zbigniew Zagorski, Mart Raudsepp
 // Id:          $Id$
@@ -7,20 +7,17 @@
 // 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"
 
-// Include setup.h to get wxUSE flags for compilers that do not support precompilation of headers
-#include "wx/setup.h"
-
 #if wxUSE_FILEDLG
 
 #include "wx/filedlg.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+#endif
+
 #ifdef __WXGTK24__
 
 #include <gtk/gtk.h>
@@ -28,7 +25,6 @@
 
 #include <unistd.h> // chdir
 
-#include "wx/intl.h"
 #include "wx/filename.h" // wxFilename
 #include "wx/tokenzr.h" // wxStringTokenizer
 #include "wx/filefn.h" // ::wxGetCwd
@@ -161,7 +157,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         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;
@@ -181,6 +177,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
                        ok_btn_stock, GTK_RESPONSE_ACCEPT,
                        NULL);
 
+        gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_ACCEPT);
+
         if ( style & wxMULTIPLE )
             gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(m_widget), true);