Changeset 751 for trunk/dll/flesh.c


Ignore:
Timestamp:
Aug 2, 2007, 11:05:48 PM (13 years ago)
Author:
Steven Levine
Message:

Sync rest of code with CNRITEM mods
Sync code with ARCITEM mods
Get compare dialog working
Still some issues with status display
Still some issues with directory sizes tree display
Heap check diagnostic code mostly enabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/flesh.c

    r739 r751  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005-07 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  24 May 05 SHL Rework Win_Error usage
     
    1616  19 Oct 06 SHL Stubby - correct . and .. detect
    1717  22 Mar 07 GKY Use QWL_USER
     18  01 Aug 07 SHL Sync with CNRITEM mods
    1819
    1920***********************************************************************/
     
    102103              pciL = WinSendMsg(hwndCnr,
    103104                                CM_ALLOCRECORD,
    104                                 MPFROMLONG(EXTRA_RECORD_BYTES2),
     105                                MPFROMLONG(EXTRA_RECORD_BYTES),
    105106                                MPFROMLONG(1));
    106107              if (pciL) {
    107108                pciL->pszFileName = xstrdup(fullpath, pszSrcFile, __LINE__);
    108                 pciL->rc.pszIcon = pciL->pszFileName;
     109                pciL->rc.pszIcon = pciL->pszFileName;
    109110                if (!fNoIconsDirs &&
    110111                    (!isalpha(*fullpath) ||
     
    115116                  pciL->rc.hptrIcon = hptrDir;
    116117                pciL->attrFile = FILE_DIRECTORY;
    117                 strcpy(pciL->szDispAttr, "----D-");
    118                 pciL->pszDispAttr = pciL->szDispAttr;
     118                pciL->pszDispAttr = FileAttrToString(pciL->attrFile);
    119119                memset(&ri, 0, sizeof(ri));
    120120                ri.cb = sizeof(ri);
     
    126126                if (!WinSendMsg(hwndCnr,
    127127                                CM_INSERTRECORD, MPFROMP(pciL), MPFROMP(&ri)))
    128                   WinSendMsg(hwndCnr,
    129                              CM_FREERECORD, MPFROMP(&pciL), MPFROMSHORT(1));
     128                  FreeCnrItem(hwndCnr, pciL);
    130129              }
    131130            }
     
    165164                               MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));
    166165  if (!pciL || !*pciL->pszFileName) {
    167     if (pciL && (INT) pciL != -1) {
    168       WinSendMsg(hwndCnr,
    169                  CM_REMOVERECORD, MPFROMP(&pciL), MPFROM2SHORT(1, CMA_FREE));
    170     }
     166    if (pciL && (INT) pciL != -1)
     167      RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE);
    171168    dcd = INSTDATA(hwndCnr);
    172169    if (dcd && dcd->size != sizeof(DIRCNRDATA))
     
    203200    if (pciL && (INT) pciL != -1) {
    204201      ret = TRUE;
    205       WinSendMsg(hwndCnr,
    206                  CM_REMOVERECORD, MPFROMP(&pciL), MPFROM2SHORT(1, CMA_FREE));
     202      RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE);
    207203    }
    208204    else
     
    343339    DosFindClose(hDir);
    344340    if (toupper(*pciParent->pszFileName) > 'B' &&
    345         (*(pciParent->pszFileName + 1)) == ':' &&
     341        (*(pciParent->pszFileName + 1)) == ':' &&
    346342        (*(pciParent->pszFileName + 2)) == '\\' && !(*(pciParent->pszFileName + 3))) {
    347343
     
    420416        pci = WinSendMsg(hwndCnr,
    421417                         CM_ALLOCRECORD,
    422                          MPFROMLONG(EXTRA_RECORD_BYTES2), MPFROMLONG(1L));
     418                         MPFROMLONG(EXTRA_RECORD_BYTES), MPFROMLONG(1L));
    423419        if (!pci) {
    424420          Win_Error(hwndCnr, HWND_DESKTOP, __FILE__, __LINE__,
     
    427423        else {
    428424          RECORDINSERT ri;
    429           //pci->pszFileName = pci->szFileName;
    430           pci->pszFileName = xstrdup(NullStr, pszSrcFile, __LINE__);
    431           pci->rc.pszIcon = pci->pszFileName;
    432           // 23 Jul 07 SHL fixme to ensure pszDisplay set appropriately
     425          pci->pszFileName = NullStr;
     426          pci->pszDisplayName = pci->pszFileName;
     427          pci->rc.pszIcon = pci->pszDisplayName;
    433428          memset(&ri, 0, sizeof(RECORDINSERT));
    434429          ri.cb = sizeof(RECORDINSERT);
     
    440435          if (!WinSendMsg(hwndCnr,
    441436                          CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) {
    442             DosSleep(100L);
     437            DosSleep(100);
    443438            WinSetFocus(HWND_DESKTOP, hwndCnr);
    444             if (WinIsWindow((HAB) 0, hwndCnr)) {
     439            if (WinIsWindow((HAB)0, hwndCnr)) {
    445440              if (!WinSendMsg(hwndCnr,
    446441                              CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) {
    447442                Win_Error(hwndCnr, HWND_DESKTOP, __FILE__, __LINE__,
    448443                          GetPString(IDS_RECORDINSERTFAILEDTEXT));
    449                 WinSendMsg(hwndCnr,
    450                            CM_FREERECORD, MPFROMP(&pci), MPFROMSHORT(1));
     444                FreeCnrItem(hwndCnr, pci);
    451445              }
    452446              else
Note: See TracChangeset for help on using the changeset viewer.