]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
added support for leaving out <embedded objects> that are created during their parent...
[wxWidgets.git] / src / generic / dirctrlg.cpp
index 686261f27fabbb8627db92fcf805d7cef22b21c9..45e2d8f4cef83d1d3191f86d74af94037210722e 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "dirctrlg.h"
 #endif
 
@@ -190,7 +190,7 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI
                 continue;
             }
             // add path separator at end if necessary
-            wxString path( thePath ) ;
+            wxString path( thePath , wxConvLocal) ;
             if (path.Last() != wxFILE_SEP_PATH) {
                 path += wxFILE_SEP_PATH;
             }
@@ -218,7 +218,7 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI
                 CFRelease( cstr );
                 continue;
             }
-            wxString name( cstr );
+            wxString name( cstr , wxConvLocal );
             DisposePtr( cstr );
             CFRelease( cfstr );
 
@@ -430,6 +430,13 @@ bool wxDirItemData::HasFiles(const wxString& WXUNUSED(spec)) const
 
 IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrl, wxControl)
 
+/*
+TODO PROPERTIES
+       defaultfolder string
+       filter string
+       (long) defaultfilter)
+*/
+
 BEGIN_EVENT_TABLE(wxGenericDirCtrl, wxControl)
   EVT_TREE_ITEM_EXPANDING     (-1, wxGenericDirCtrl::OnExpandItem)
   EVT_TREE_ITEM_COLLAPSED     (-1, wxGenericDirCtrl::OnCollapseItem)
@@ -651,7 +658,7 @@ void wxGenericDirCtrl::CollapseDir(wxTreeItemId parentId)
         return;
 
     data->m_isExpanded = FALSE;
-    long cookie;
+    wxTreeItemIdValue cookie;
     /* Workaround because DeleteChildren has disapeared (why?) and
      * CollapseAndReset doesn't work as advertised (deletes parent too) */
     child = m_treeCtrl->GetFirstChild(parentId, cookie);
@@ -828,7 +835,7 @@ wxTreeItemId wxGenericDirCtrl::FindChild(wxTreeItemId parentId, const wxString&
     path2.MakeLower();
 #endif
 
-    long cookie;
+    wxTreeItemIdValue cookie;
     wxTreeItemId childId = m_treeCtrl->GetFirstChild(parentId, cookie);
     while (childId.IsOk())
     {
@@ -890,7 +897,7 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
         if ((GetWindowStyle() & wxDIRCTRL_SELECT_FIRST) && data->m_isDir)
         {
             // Find the first file in this directory
-            long cookie;
+            wxTreeItemIdValue cookie;
             wxTreeItemId childId = m_treeCtrl->GetFirstChild(lastId, cookie);
             bool selectedChild = FALSE;
             while (childId.IsOk())