Changeset 557 for trunk/dll/treecnr.c
- Timestamp:
- Mar 9, 2007, 7:38:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r555 r557 23 23 29 Dec 06 GKY Enabled edit of drive flags on "not ready" drives 24 24 18 Feb 07 GKY More drive type and icon support 25 08 Mar 07 SHL Ensure drive icon updates after drive flags change 26 09 Mar 07 GKY Use SelectDriveIcon 25 27 26 28 ***********************************************************************/ … … 1807 1809 strcmp(FileSystem, HPFS386)) { 1808 1810 driveflags[x] |= DRIVE_NOLONGNAMES; 1809 } 1810 if (driveflags[x] & DRIVE_CDROM) 1811 pciP->rc.hptrIcon = hptrCDROM; 1812 1813 else 1814 pciP->rc.hptrIcon = (driveflags[x] & DRIVE_REMOVABLE) ? 1815 hptrRemovable : 1816 (driveflags[x] & DRIVE_REMOTE) ? 1817 hptrRemote : 1818 (driveflags[x] & DRIVE_VIRTUAL) ? 1819 hptrVirtual : 1820 (driveflags[x] & DRIVE_RAMDISK) ? 1821 hptrRamdisk : 1822 (driveflags[x] & DRIVE_ZIPSTREAM) ? 1823 hptrZipstrm : hptrDrive; 1811 } 1812 SelectDriveIcon(pciP); 1824 1813 WinSendMsg(hwnd, 1825 1814 CM_INVALIDATERECORD, … … 2549 2538 case IDM_UPDATE: 2550 2539 { 2551 PCNRITEM pci = NULL; 2552 2553 pci = (PCNRITEM) CurrentRecord(hwnd); 2554 if (pci && (INT) pci != -1) { 2540 PCNRITEM pci = (PCNRITEM)CurrentRecord(hwnd); 2541 if (pci && (INT)pci != -1) { 2542 UINT driveflag = driveflags[toupper(*pci->szFileName) - 'A']; 2555 2543 if (pci->attrFile & FILE_DIRECTORY) { 2556 2544 if (pci->flags & RECFLAGS_UNDERENV) 2557 2545 break; 2558 2546 UnFlesh(hwnd, pci); 2559 if (driveflags[toupper(*pci->szFileName) - 'A'] & 2560 (DRIVE_INVALID | DRIVE_NOPRESCAN)) { 2547 // Check if drive type might need update 2548 if ((driveflag & (DRIVE_INVALID | DRIVE_NOPRESCAN)) || 2549 (~driveflag & DRIVE_NOPRESCAN && pci->rc.hptrIcon == hptrDunno)) 2550 { 2561 2551 driveflags[toupper(*pci->szFileName) - 'A'] &= 2562 2552 (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS | 2563 2553 DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | DRIVE_NOSTATS); 2564 2554 DriveFlagsOne(toupper(*pci->szFileName) - 'A'); 2565 if (driveflags[toupper(*pci->szFileName) - 'A'] &2566 2555 driveflag = driveflags[toupper(*pci->szFileName) - 'A']; 2556 if (driveflag & DRIVE_INVALID) 2567 2557 pci->rc.hptrIcon = hptrDunno; 2568 2558 else { 2569 if (driveflags[toupper(*pci->szFileName) - 'A'] & 2570 DRIVE_CDROM) 2571 pci->rc.hptrIcon = hptrCDROM; 2572 else 2573 pci->rc.hptrIcon = 2574 (driveflags[toupper(*pci->szFileName) - 'A'] & 2575 DRIVE_REMOVABLE) ? hptrRemovable 2576 : (driveflags[toupper(*pci->szFileName) - 'A'] & 2577 DRIVE_REMOTE) ? hptrRemote 2578 : (driveflags[toupper(*pci->szFileName) - 'A'] & 2579 DRIVE_VIRTUAL) ? hptrVirtual 2580 : (driveflags[toupper(*pci->szFileName) - 'A'] & 2581 DRIVE_RAMDISK) ? hptrRamdisk 2582 : (driveflags[toupper(*pci->szFileName) - 'A'] & 2583 DRIVE_ZIPSTREAM) ? hptrZipstrm : hptrDrive; 2559 SelectDriveIcon(pci); 2584 2560 } 2585 2561 WinSendMsg(hwnd, … … 2590 2566 PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID); 2591 2567 } 2592 if (! 2593 (driveflags[toupper(*pci->szFileName) - 'A'] & 2594 DRIVE_INVALID)) 2568 if (~driveflag & DRIVE_INVALID) 2595 2569 Flesh(hwnd, pci); 2596 }2597 else {2598 2599 2570 } 2600 2571 }
Note:
See TracChangeset
for help on using the changeset viewer.