]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/filedlgg.cpp
New HTML help system. The old controller class has been split in
[wxWidgets.git] / src / generic / filedlgg.cpp
index b4c5e885fe19d12ce79db5ea9b7355b878d949f2..6dfcb6a23445d731da06050980cc39e3b5a8c2d2 100644 (file)
     #include "wx/tooltip.h"
 #endif
 
-#include "sys/types.h"
-#include "sys/stat.h"
-#include "dirent.h"
-#include "pwd.h"
-#include "grp.h"
-#include "time.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <pwd.h>
+#include <grp.h>
+#include <time.h>
+#include <unistd.h>
 
 #include "wx/generic/home.xpm"
 #include "wx/generic/listview.xpm"
@@ -522,14 +523,15 @@ void wxFileCtrl::OnListEndLabelEdit( wxListEvent &event )
 // wxFileDialog
 //-----------------------------------------------------------------------------
 
-#define  ID_LIST_MODE     5000
-#define  ID_REPORT_MODE   5001
-#define  ID_UP_DIR        5005
-#define  ID_PARENT_DIR    5006
-#define  ID_NEW_DIR       5007
-#define  ID_CHOICE        5008
-#define  ID_TEXT          5009
-#define  ID_LIST_CTRL     5010
+#define  ID_LIST_MODE     wxID_FILEDLGG
+#define  ID_REPORT_MODE   wxID_FILEDLGG + 1
+#define  ID_UP_DIR        wxID_FILEDLGG + 5
+#define  ID_PARENT_DIR    wxID_FILEDLGG + 6
+#define  ID_NEW_DIR       wxID_FILEDLGG + 7
+#define  ID_CHOICE        wxID_FILEDLGG + 8
+#define  ID_TEXT          wxID_FILEDLGG + 9
+#define  ID_LIST_CTRL     wxID_FILEDLGG + 10
+#define  ID_ACTIVATED     wxID_FILEDLGG + 11
 
 IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog)
 
@@ -560,7 +562,11 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
     m_message = message;
     m_dialogStyle = style;
     m_dir = defaultDir;
-    if (m_dir.IsEmpty()) m_dir = wxGetUserHome();
+    if (m_dir.IsEmpty())
+    {
+        char buf[200];
+       m_dir = getcwd( buf, sizeof(buf) );
+    }
     m_path = defaultDir;
     m_path += _T("/");
     m_path += defaultFile;