]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
small optimization in wxConfigPathChanger: don't change the path if it is already...
[wxWidgets.git] / src / gtk / filedlg.cpp
index b28750152af75c763e54c2b2c75fef3d8b1e5708..a3fcec04f14f4bc60a8f896e5882c8b65d8b68ed 100644 (file)
@@ -7,10 +7,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "filedlg.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/filedlg.h"
 #include "wx/utils.h"
 #include "wx/intl.h"
@@ -88,7 +91,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
         wxString cwd;
         wxSplitPath(filename, &cwd, NULL, NULL);
 
-        if ( cwd != wxGetWorkingDirectory() )
+        if ( cwd != wxGetCwd() )
         {
             wxSetWorkingDirectory(cwd);
         }
@@ -130,7 +133,7 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
     m_needParent = FALSE;
 
     if (!PreCreation( parent, pos, wxDefaultSize ) ||
-        !CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, wxT("filedialog") ))
+        !CreateBase( parent, wxID_ANY, pos, wxDefaultSize, style, wxDefaultValidator, wxT("filedialog") ))
     {
         wxFAIL_MSG( wxT("wxXX creation failed") );
         return;