Changeset 1434 for trunk/dll/treecnr.c


Ignore:
Timestamp:
Jun 23, 2009, 12:52:05 AM (16 years ago)
Author:
Gregg Young
Message:

Update show label or FS in tree to initialize as driveonly and fixed typo which caused rescan to fail after the value was changed. Renamed some variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/treecnr.c

    r1431 r1434  
    274274        if (!stricmp(dirname, pciP->pszFileName))
    275275          break;                        // Found it
    276         if (~pciP->rc.flRecordAttr & CRA_EXPANDED)
    277           WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     276        if (~pciP->rc.flRecordAttr & CRA_EXPANDED) {
     277          if (!(driveflags[toupper(*pciP->pszFileName) - 'A'] & DRIVE_RSCANNED)) {
     278            WinSendMsg(hwndCnr, UM_RESCAN, MPFROMP(pciP), MPVOID);
     279            WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     280          }
     281          else
     282            WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     283        }
    278284        strcpy(szDir, dirname);
    279285        if (p - szDir >= strlen(szDir))
     
    330336                          MPFROM2SHORT(CMA_PARENT, CMA_ITEMORDER));
    331337        if (pciP && (INT) pciP != -1) {
    332           if (!(pciP->rc.flRecordAttr & CRA_EXPANDED))
    333             WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     338          if (!(pciP->rc.flRecordAttr & CRA_EXPANDED)) {
     339            if (!(driveflags[toupper(*pciP->pszFileName) - 'A'] & DRIVE_RSCANNED)) {
     340              WinSendMsg(hwndCnr, UM_RESCAN, MPFROMP(pciP), MPVOID);
     341              WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     342            }
     343            else
     344              WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID);
     345          }
    334346          pciToSelect = pciP;
    335347        }
     
    363375  }
    364376  WinEnableWindowUpdate(hwndCnr, TRUE);
    365   // DosSleep(1);                       // Let GUI update
     377  //DosSleep(1);                        // Let GUI update
    366378}
    367379
     
    786798              driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial;
    787799              if (CheckDrive(toupper(*pci->pszFileName), FileSystem, &type) == -1 ||
    788                   fShowSysType)
     800                  fShowFSTypeInTree)
    789801                strcpy(FileSystem, "");
    790               if (fShowLabel)
     802              if (fShowDriveLabelInTree)
    791803                strcpy(szTmpLabel, "");
    792804              else
     
    798810                strcat(temp, "]");
    799811                sprintf(s,
    800                         GetPString(fShowSysType ? IDS_TREESTATUSSTART1TEXT : fShowLabel
     812                        GetPString(fShowFSTypeInTree ? IDS_TREESTATUSSTART1TEXT :
     813                                   fShowDriveLabelInTree
    801814                                   ? IDS_TREESTATUSSTART2TEXT : IDS_TREESTATUSSTARTTEXT),
    802815                        toupper(*pci->pszFileName), FileSystem,
     
    807820                strcat(s, " [");
    808821                sprintf(&s[strlen(s)],
    809                         GetPString(fShowSysType ? IDS_TREESTATUSSTART1TEXT : fShowLabel
     822                        GetPString(fShowFSTypeInTree ? IDS_TREESTATUSSTART1TEXT :
     823                                   fShowDriveLabelInTree
    810824                                   ? IDS_TREESTATUSSTART2TEXT : IDS_TREESTATUSSTARTTEXT),
    811825                        toupper(*pci->pszFileName), FileSystem,
Note: See TracChangeset for help on using the changeset viewer.