]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
Include wx/menu.h according to precompiled headers of wx/wx.h (with other minor clean...
[wxWidgets.git] / src / gtk / filedlg.cpp
index 57a34be327cf5f7867422834974c00cca9d35e37..547045ec5ce865a8480517a81f8e58c1abd26df5 100644 (file)
 
 #include "wx/filedlg.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/intl.h"
+#endif
+
 #ifdef __WXGTK24__
 
 #include <gtk/gtk.h>
@@ -21,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
@@ -174,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);
 
@@ -184,8 +189,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         // Currently local-only is kept as the default - true:
         // gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(m_widget), true);
 
-        g_signal_connect(G_OBJECT(m_widget), "response",
-            GTK_SIGNAL_FUNC(gtk_filedialog_response_callback), (gpointer)this);
+        g_signal_connect (m_widget, "response",
+            G_CALLBACK (gtk_filedialog_response_callback), this);
 
         SetWildcard(wildCard);