From: Stefan Neis Date: Sun, 12 Jun 2005 11:57:51 +0000 (+0000) Subject: Additional imageId values for specific drive types on OS/2. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/be283c77a035cb8aa25c005677e11c5b5aae2975 Additional imageId values for specific drive types on OS/2. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index f9d20f06a3..e66dbb5a0c 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -167,9 +167,19 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI path.Printf(wxT("%c:\\"), 'A' + i); name.Printf(wxT("%c:"), 'A' + i); + // Note: If _filesys is unsupported by some compilers, + // we can always replace it by DosQueryFSAttach + char filesysname[20]; + _filesys(name.fn_str(), filesysname, sizeof(filesysname)); + /* FAT, LAN, HPFS, CDFS, NFS */ int imageId; if (path == wxT("A:\\") || path == wxT("B:\\")) imageId = wxFileIconsTable::floppy; + else if (!strcmp(filesysname, "CDFS")) + imageId = wxFileIconsTable::cdrom; + else if (!strcmp(filesysname, "LAN") || + !strcmp(filesysname, "NFS")) + imageId = wxFileIconsTable::drive; else imageId = wxFileIconsTable::drive; paths.Add(path);