]> git.saurik.com Git - wxWidgets.git/commitdiff
Additional imageId values for specific drive types on OS/2.
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 12 Jun 2005 11:57:51 +0000 (11:57 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 12 Jun 2005 11:57:51 +0000 (11:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dirctrlg.cpp

index f9d20f06a39517876885ae23ad8c0c0fd18c35f3..e66dbb5a0cad194ed8bfbc276d901639786ca275 100644 (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);