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
This commit is contained in:
Stefan Neis
2005-06-12 11:57:51 +00:00
parent 8d38bd1d05
commit be283c77a0

View File

@@ -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);