Changeset 557 for trunk/dll/treecnr.c


Ignore:
Timestamp:
Mar 9, 2007, 7:38:41 PM (18 years ago)
Author:
Gregg Young
Message:

Changes for 3.05 beta mostly drive flag/tree related

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/treecnr.c

    r555 r557  
    2323  29 Dec 06 GKY Enabled edit of drive flags on "not ready" drives
    2424  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
    2527
    2628***********************************************************************/
     
    18071809                  strcmp(FileSystem, HPFS386)) {
    18081810                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);
    18241813              WinSendMsg(hwnd,
    18251814                         CM_INVALIDATERECORD,
     
    25492538      case IDM_UPDATE:
    25502539        {
    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'];
    25552543            if (pci->attrFile & FILE_DIRECTORY) {
    25562544              if (pci->flags & RECFLAGS_UNDERENV)
    25572545                break;
    25582546              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              {
    25612551                driveflags[toupper(*pci->szFileName) - 'A'] &=
    25622552                  (DRIVE_IGNORE | DRIVE_NOPRESCAN | DRIVE_NOLOADICONS |
    25632553                   DRIVE_NOLOADSUBJS | DRIVE_NOLOADLONGS | DRIVE_NOSTATS);
    25642554                DriveFlagsOne(toupper(*pci->szFileName) - 'A');
    2565                 if (driveflags[toupper(*pci->szFileName) - 'A'] &
    2566                     DRIVE_INVALID)
     2555                driveflag = driveflags[toupper(*pci->szFileName) - 'A'];
     2556                if (driveflag & DRIVE_INVALID)
    25672557                  pci->rc.hptrIcon = hptrDunno;
    25682558                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);
    25842560                }
    25852561                WinSendMsg(hwnd,
     
    25902566                  PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID);
    25912567              }
    2592               if (!
    2593                   (driveflags[toupper(*pci->szFileName) - 'A'] &
    2594                    DRIVE_INVALID))
     2568              if (~driveflag & DRIVE_INVALID)
    25952569                Flesh(hwnd, pci);
    2596             }
    2597             else {
    2598 
    25992570            }
    26002571          }
Note: See TracChangeset for help on using the changeset viewer.