]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
Avoid trouble during initialisation & typo fix (patch #1523304).
[wxWidgets.git] / src / generic / dirctrlg.cpp
index ef89bce74c58953d95fbedc8107bab64c0a999d3..cf1e8c5e11e704b8d7e77798d79e471ecd5bd106 100644 (file)
     #include "wx/layout.h"
     #include "wx/sizer.h"
     #include "wx/textdlg.h"
+    #include "wx/gdicmn.h"
+    #include "wx/image.h"
 #endif
 
 #include "wx/module.h"
 #include "wx/filefn.h"
-#include "wx/gdicmn.h"
 #include "wx/imaglist.h"
 #include "wx/tokenzr.h"
 #include "wx/dir.h"
 #include "wx/artprov.h"
 #include "wx/mimetype.h"
-#include "wx/image.h"
 
 #if wxUSE_STATLINE
     #include "wx/statline.h"
@@ -121,14 +121,8 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI
         path.Printf(wxT("%c:\\"), driveBuffer[i]);
         name.Printf(wxT("%c:"), driveBuffer[i]);
 
-#if !defined(__WXWINCE__)
-        wxChar pname[52]; // FIXME: why 52 and not MAX_PATH or whatever?
-        if ( GetVolumeInformation(path, pname, WXSIZEOF(pname),
-                                  NULL, NULL, NULL, NULL, 0) )
-        {
-            name << _T(' ') << pname;
-        }
-#endif // __WXWINCE__
+        // Do not use GetVolumeInformation to further decorate the
+        // name, since it can cause severe delays on network drives.
 
         int imageId;
         int driveType = ::GetDriveType(path);