From be283c77a035cb8aa25c005677e11c5b5aae2975 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sun, 12 Jun 2005 11:57:51 +0000 Subject: [PATCH] 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 --- src/generic/dirctrlg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.45.2