Changeset 1871
- Timestamp:
 - Sep 21, 2015, 12:57:02 AM (10 years ago)
 - Location:
 - trunk/dll
 - Files:
 - 
      
- 15 edited
 
- 
          
  dircnrs.h (modified) (4 diffs)
 - 
          
  dirsize.c (modified) (5 diffs)
 - 
          
  filldir.c (modified) (18 diffs)
 - 
          
  filldir.h (modified) (4 diffs)
 - 
          
  findrec.c (modified) (4 diffs)
 - 
          
  flesh.c (modified) (28 diffs)
 - 
          
  fm3dll2.h (modified) (1 diff)
 - 
          
  fm3res.rc (modified) (3 diffs)
 - 
          
  fm3str.h (modified) (1 diff)
 - 
          
  init.c (modified) (4 diffs)
 - 
          
  objcnr.c (modified) (3 diffs)
 - 
          
  select.c (modified) (4 diffs)
 - 
          
  select.h (modified) (2 diffs)
 - 
          
  treecnr.c (modified) (24 diffs)
 - 
          
  treecnr.h (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/dll/dircnrs.h
r1682 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 20 08Steven H. Levine9 Copyright (c) 2001, 2015 Steven H. Levine 10 10 11 11 05 Jan 08 SHL Move dircnrs.c definitions here … … 14 14 all the details view settings (both the global variables and those in the 15 15 DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 16 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 16 17 Jan 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *. 17 20 Sep 15 GKY Add a flag to indicate when a directory needed to be Fleshed and a PCNRITEM 18 previous to try to keep the pci chain intact on renames, delete etc to PCNRITEM 17 19 18 20 ***********************************************************************/ … … 40 42 41 43 typedef struct _CNRITEM 42 { /* CONTAINER RECORD STRUCTURE */44 { /* CONTAINER RECORD STRUCTURE must be first*/ 43 45 MINIRECORDCORE rc; /* Base information */ 44 46 HWND hwndCnr; /* The container holding this record */ … … 59 61 ULONG attrFile; /* Attributes of this file */ 60 62 ULONG flags; 63 BOOL fleshed; 64 struct _CNRITEM *pciPrevious; // Address of pci we are linked to 61 65 } 62 66 CNRITEM, *PCNRITEM;  - 
      
trunk/dll/dirsize.c
r1673 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 201 0Steven H. Levine9 Copyright (c) 2001, 2015 Steven H. Levine 10 10 11 11 16 Oct 02 SHL Handle large partitions … … 56 56 by temp file creation failures. 57 57 12 Jun 11 GKY Added SleepIfNeeded in the container fill loop 58 20 Sep 15 GKY Move directory expansion to a thread. Split ExpandAll into ExpandAll and CollapseAll 59 to try to speed proccessing else where. 58 60 59 61 ***********************************************************************/ … … 109 111 typedef struct 110 112 { 113 HWND hwndCnr; 114 PCNRITEM pci; 115 } EXPANDSIZE; 116 117 typedef struct 118 { 111 119 CHAR szDirName[CCHMAXPATH]; 112 120 CHAR chStopFlag; … … 497 505 PostMsg(WinQueryWindow(hwndCnr, QW_PARENT), 498 506 UM_CONTAINER_FILLED, MPVOID, MPVOID); 507 # ifdef FORTIFY 508 Fortify_LeaveScope(); 509 # endif 510 } 511 512 static VOID ExpandCnrThread(VOID *args) 513 { 514 HAB hab; 515 HMQ hmq; 516 INT x = 0; 517 EXPANDSIZE *expandsize = (EXPANDSIZE *)args; 518 519 if (!expandsize) { 520 Runtime_Error(pszSrcFile, __LINE__, NULL); 521 return; 522 } 523 # ifdef FORTIFY 524 Fortify_EnterScope(); 525 Fortify_BecomeOwner(expandsize); // We free dirsize 526 # endif 527 528 DosError(FERR_DISABLEHARDERR); 529 530 priority_idle(); 531 hab = WinInitialize(0); 532 if (hab) { 533 hmq = WinCreateMsgQueue(hab, 0); 534 if (hmq) { 535 WinCancelShutdown(hmq, TRUE); 536 ExpandAll(expandsize->hwndCnr, x, expandsize->pci); 537 WinDestroyMsgQueue(hmq); 538 } 539 WinTerminate(hab); 540 } 541 542 xfree(expandsize, pszSrcFile, __LINE__); 499 543 # ifdef FORTIFY 500 544 Fortify_LeaveScope(); … … 1010 1054 WinEnableWindow(WinWindowFromID(hwnd, DSZ_PRINT), FALSE); 1011 1055 WinEnableWindow(WinWindowFromID(hwnd, DID_CANCEL), FALSE); 1012 // fixme to use thread - too slow on large trees 1013 ExpandAll(WinWindowFromID(hwnd, DSZ_CNR), 1014 (SHORT1FROMMP(mp1) == DSZ_EXPAND), pci); 1056 if (SHORT1FROMMP(mp1) == DSZ_EXPAND) { 1057 EXPANDSIZE *expandsize; 1058 1059 expandsize = xmalloc(sizeof(EXPANDSIZE), pszSrcFile, __LINE__); 1060 if (expandsize) { 1061 1062 expandsize->pci = pci; 1063 expandsize->hwndCnr = WinWindowFromID(hwnd, DSZ_CNR); 1064 if (xbeginthread(ExpandCnrThread, 1065 122880 * 5, 1066 expandsize, 1067 pszSrcFile, 1068 __LINE__) == -1) 1069 xfree(expandsize, pszSrcFile, __LINE__); 1070 } 1071 } 1072 else 1073 CollapseAll(WinWindowFromID(hwnd, DSZ_CNR), pci); 1015 1074 WinEnableWindow(WinWindowFromID(hwnd, DID_OK), TRUE); 1016 1075 WinEnableWindow(WinWindowFromID(hwnd, IDM_HELP), TRUE);  - 
      
trunk/dll/filldir.c
r1868 r1871 119 119 22 Aug 15 GKY Minimize the occurence of an A:\ Drive not ready error by moving the cursor 120 120 to the default drive. 121 24 AUG 15 GKY Remove fDummy code 121 24 Aug 15 GKY Remove fDummy code 122 20 Sep 15 GKY Add code for Flesh to skip the directory entry added by Stubby (eliminate 123 use of NULL/Nullstr pszFileNames by Stubby). Add code to relink pci chain 124 following rename, delete, etc. Add "Expanding" window text. 122 125 123 126 ***********************************************************************/ … … 242 245 } 243 246 244 staticHPOINTER IDFile(PSZ p)247 HPOINTER IDFile(PSZ p) 245 248 { 246 249 HPOINTER hptr; … … 304 307 } 305 308 306 staticBOOL IsDefaultIcon(HPOINTER hptr)309 BOOL IsDefaultIcon(HPOINTER hptr) 307 310 { 308 311 HPOINTER hptr2; … … 827 830 const BOOL recurse, 828 831 const BOOL partial, 829 CHAR *stopflag,832 CHAR *stopflag, 830 833 DIRCNRDATA *dcd, // Optional 831 834 ULONG *pulTotalFiles, // Optional 832 PULONGLONG pullTotalBytes) // Optional 835 PULONGLONG pullTotalBytes, // Optional 836 CHAR *LoadedFirstChild) // Optional 833 837 { 834 838 /** … … 856 860 PCNRITEM pci; 857 861 PCNRITEM pciFirst; 862 PCNRITEM pciNext; 858 863 RECORDINSERT ri; 859 864 BOOL ok = TRUE; … … 914 919 pffbFile = paffbFound; 915 920 ulSelCnt = 0; 916 for (;;) {921 for (;;) { 917 922 if (!*pffbFile->achName || 918 923 (!filestoo && ~pffbFile->attrFile & FILE_DIRECTORY) || … … 920 925 !pffbFile->achName[0] || pffbFile->achName[0] == '.' && 921 926 (!pffbFile->achName[1] || 922 (pffbFile->achName[1] == '.' && !pffbFile->achName[2])))) { 927 (pffbFile->achName[1] == '.' && !pffbFile->achName[2])) || 928 (LoadedFirstChild && !stricmp(LoadedFirstChild, pffbFile->achName)))) { 923 929 // ulFindCnt--; // Got . or .. or file to be skipped 924 930 } … … 959 965 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 960 966 pffbFile, partial, dcd); 961 pci = (PCNRITEM) pci->rc.preccNextRecord; 967 pciNext = pci; 968 pci = (PCNRITEM) pci->rc.preccNextRecord; 969 if (pci && (INT) pci != -1) 970 pci->pciPrevious = pciNext; 962 971 ullTotalBytes += ullBytes; 963 972 } // for … … 1051 1060 ULONG ulRecsToInsert; 1052 1061 1053 if (pci == NULL) {1062 if (pci == NULL) { 1054 1063 if (!WinIsWindow(WinQueryAnchorBlock(hwndCnr), hwndCnr)) { 1055 1064 ok = FALSE; … … 1072 1081 else { 1073 1082 // 04 Jan 08 SHL FIXME like comp.c to handle less than ulSelCnt records 1074 if (hwndStatus && dcd && 1075 dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) { 1076 WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_PLEASEWAITCOUNTINGTEXT)); 1083 if (hwndStatus && dcd && dcd->hwndFrame == 1084 WinQueryActiveWindow(dcd->hwndParent)) { 1085 WinSetWindowText(hwndStatus, (CHAR *) GetPString(LoadedFirstChild ? 1086 IDS_PLEASEWAITEXPANDINGTEXT : 1087 IDS_PLEASEWAITCOUNTINGTEXT)); 1077 1088 } 1078 1089 pci = pciFirst; … … 1080 1091 } 1081 1092 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1082 pffbFile, partial, dcd); 1083 pci = (PCNRITEM) pci->rc.preccNextRecord; 1093 pffbFile, partial, dcd); 1094 pciNext = pci; 1095 pci = (PCNRITEM) pci->rc.preccNextRecord; 1096 if (pci && (INT) pci != -1) 1097 pci->pciPrevious = pciNext; 1084 1098 ullTotalBytes += ullBytes; 1085 1099 // 15 Sep 09 SHL allow timed updates to see … … 1190 1204 if (!pci->pszFileName || !strcmp(pci->pszFileName, NullStr)) { 1191 1205 // 2015-08-23 SHL FIXME debug 1192 DbgMsg(pszSrcFile, __LINE__, "ProcessDirectory pci %p pci->pszFileName %p %s",1193 pci, pci->pszFileName,1194 pci->pszFileName == NullStr ? "NullStr" : "NULL");1206 //DbgMsg(pszSrcFile, __LINE__, "ProcessDirectory pci %p pci->pszFileName %p %s", 1207 // pci, pci->pszFileName, 1208 // pci->pszFileName == NullStr ? "NullStr" : "NULL"); 1195 1209 Runtime_Error(pszSrcFile, __LINE__, "pci->pszFileName NULL for %p", pci); 1196 1210 return; 1197 1211 } 1198 1212 if ((pci->attrFile & FILE_DIRECTORY)) 1199 AddFleshWorkRequest(hwndCnr, pci, eStubby);1213 AddFleshWorkRequest(hwndCnr, pci, eStubby); 1200 1214 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 1201 1215 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); … … 1226 1240 dcd, 1227 1241 NULL, // total files 1228 pullTotalBytes); 1242 pullTotalBytes, 1243 0); 1229 1244 DosPostEventSem(CompactSem); 1230 1245 … … 1268 1283 static ULONG ulLastDriveMap; 1269 1284 1270 DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr hwndCnr %x hwndParent %x", hwndCnr, hwndParent); // 2015-08-03 SHL FIXME debug1285 //DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr hwndCnr %x hwndParent %x", hwndCnr, hwndParent); // 2015-08-03 SHL FIXME debug 1271 1286 1272 1287 *szSuggest = 0; … … 1675 1690 1676 1691 fInitialDriveScan = FALSE; 1677 DbgMsg(pszSrcFile, __LINE__, "fInitialDriveScan now FALSE"); // 2015-08-03 SHL FIXME debug1692 //DbgMsg(pszSrcFile, __LINE__, "fInitialDriveScan now FALSE"); // 2015-08-03 SHL FIXME debug 1678 1693 DosPostEventSem(CompactSem); 1679 1694 … … 1755 1770 didonce = TRUE; 1756 1771 1757 DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr finished"); // 2015-08-03 SHL FIXME debug1772 //DbgMsg(pszSrcFile, __LINE__, "FillTreeCnr finished"); // 2015-08-03 SHL FIXME debug 1758 1773 1759 1774 } // FillTreeCnr … … 1973 1988 // USHORT usTimerCheckCountdown = RCI_ITEMS_PER_TIMER_CHECK; 1974 1989 PCNRITEM pci; 1990 PCNRITEM pciPrevious; 1975 1991 ITIMER_DESC itdSleep = { 0 }; // 30 May 11 GKY 1976 1992 … … 1995 2011 InitITimer(&itdSleep, 500); 1996 2012 while (pci) { 1997 FreeCnrItemData(pci); 1998 pci = (PCNRITEM)pci->rc.preccNextRecord; 2013 FreeCnrItemData(pci); 2014 if (usCnt > 0) 2015 pciPrevious = pci; 2016 pci = (PCNRITEM)pci->rc.preccNextRecord; 1999 2017 if (!pci) 2000 break; 2018 break; 2019 if (usCnt > 0 && pciPrevious && pciPrevious->pciPrevious) { 2020 pciPrevious->pciPrevious->rc.preccNextRecord = (MINIRECORDCORE *) pci; 2021 pci->pciPrevious = pciPrevious->pciPrevious; 2022 pciPrevious->pciPrevious = NULL; 2023 pciPrevious->rc.preccNextRecord = NULL; 2024 } 2001 2025 if (remaining && --remaining == 0) 2002 2026 break;  - 
      
trunk/dll/filldir.h
r1550 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 20 08Steven H. Levine9 Copyright (c) 2001, 2015 Steven H. Levine 10 10 11 11 05 Jan 08 SHL Split from fm3dll.h … … 14 14 06 Jun 09 GKY Add option to show file system type or drive label in tree 15 15 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 16 20 Sep 15 GKY Add code for Flesh to skip the directory entry added by Stubby (eliminate 17 use of NULL/Nullstr pszFileNames by Stubby). Add code to relink pci chain 18 following rename, delete, etc. Add "Expanding" window text. 16 19 17 20 ***********************************************************************/ … … 41 44 const BOOL recurse, const BOOL partial, 42 45 CHAR *stopflag, DIRCNRDATA *pdcd, 43 PULONG pullTotalFiles, PULONGLONG pullTotalBytes); 46 PULONG pullTotalFiles, PULONGLONG pullTotalBytes, 47 CHAR *LoadedFirstChild); 44 48 ULONGLONG FillInRecordFromFFB(HWND hwndCnr, PCNRITEM pci, 45 49 const PSZ pszDirectory, … … 54 58 INT RemoveCnrItems(HWND hwnd, PCNRITEM pci, USHORT usCnt, USHORT usFlags); 55 59 VOID ProcessDirectoryThread(VOID * arg); 60 HPOINTER IDFile(PSZ p); 61 BOOL IsDefaultIcon(HPOINTER hptr); 56 62 57 63 // Data declarations  - 
      
trunk/dll/findrec.c
r1865 r1871 14 14 06 Aug 15 SHL Clean up and comment 15 15 23 Aug 15 SHL Protect FindCnrRecord filename arg 16 20 Sep 15 GKY Add a correction factor so directories don't get placed above the top of the 17 tree container when a large drive has been expanded. 16 18 17 19 ***********************************************************************/ … … 63 65 pciParent = (PCNRITEM) CMA_FIRST; 64 66 pci = WinSendMsg(hwndCnr, 65 CM_SEARCHSTRING, MPFROMP(&srch), MPFROMP(pciParent)); 67 CM_SEARCHSTRING, MPFROMP(&srch), MPFROMP(pciParent)); 68 //DbgMsg(pszSrcFile, __LINE__,"FindCnrItem pciParent %p pci %p file %s", pciParent, 69 // pci, file); 66 70 while (pci && (INT) pci != -1) { 67 71 if (!noenv || (pci->flags & (RECFLAGS_ENV | RECFLAGS_UNDERENV)) == 0) { … … 123 127 RECTL rcl; 124 128 RECTL rclViewport; 129 RECTL rclFirst; 130 RECTL rclLast; 131 PMINIRECORDCORE pmiFirst; 132 PMINIRECORDCORE pmiLast; 133 INT correction; 125 134 135 pmiFirst = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(NULL), 136 MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 137 pmiLast = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(NULL), 138 MPFROM2SHORT(CMA_LAST, CMA_ITEMORDER)); 139 WinSendMsg(hwndCnr, 140 CM_QUERYVIEWPORTRECT, 141 MPFROMP(&rclViewport), MPFROM2SHORT(CMA_WINDOW , TRUE)); 126 142 memset(&qrecrct, 0, sizeof(QUERYRECORDRECT)); 127 143 qrecrct.cb = sizeof(QUERYRECORDRECT); … … 133 149 WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, MPFROMP(&rcl), MPFROMP(&qrecrct)); 134 150 } 151 qrecrct.pRecord = (PRECORDCORE) pmiFirst; 152 WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, MPFROMP(&rclFirst), MPFROMP(&qrecrct)); 153 qrecrct.pRecord = (PRECORDCORE) pmiLast; 154 WinSendMsg(hwndCnr, CM_QUERYRECORDRECT, MPFROMP(&rclLast), MPFROMP(&qrecrct)); 155 correction = 5 + ((abs(rclFirst.yTop) + abs(rclLast.yTop)) / 22500); 135 156 WinSendMsg(hwndCnr, 136 CM_QUERYVIEWPORTRECT, 137 MPFROMP(&rclViewport), MPFROM2SHORT(CMA_WINDOW, TRUE)); 138 //DbgMsg(pszSrcFile, __LINE__, "TOPPORT %i TOPRCL %i", rclViewport.yTop , rcl.yTop); 157 CM_SCROLLWINDOW, 158 MPFROMSHORT(CMA_VERTICAL), 159 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - correction))); 160 #if 0 161 DbgMsg(pszSrcFile, __LINE__, "RECTLFIRST %i RECTLLAST %i %p", 162 rclFirst.yTop, rclLast.yTop, pmiLast); 163 DbgMsg(pszSrcFile, __LINE__, "TOPPORT %i TOPRCL %i RIGHTRCL %i", 164 rclViewport.yTop , rcl.yTop, rcl.xRight); 165 #endif 139 166 WinSendMsg(hwndCnr, 140 167 CM_SCROLLWINDOW, 141 168 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(rcl.xRight - rclViewport.xRight)); 142 WinSendMsg(hwndCnr, 143 CM_SCROLLWINDOW, 144 MPFROMSHORT(CMA_VERTICAL), 145 MPFROMLONG((rclViewport.yTop - (rcl.yTop) - 4))); 169 146 170 } 147 171  - 
      
trunk/dll/flesh.c
r1867 r1871 37 37 19 Aug 15 SHL Allow WaitFleshWorkListEmpty to wait for dependent items 38 38 23 Aug 15 GKY Fixed code to notify on drive with no subdirectories in first 64 entries 39 20 Sep 15 GKY Add code for Flesh to skip the directory entry added by Stubby (eliminate 40 use of NULL/Nullstr pszFileNames by Stubby). Add code in Stubby to insert a 41 complete container item. Add a flag to indicate when a directory needed to be 42 Fleshed 39 43 40 44 ***********************************************************************/ … … 69 73 #include "listutil.h" // List... 70 74 #include "common.h" // IncrThreadUsage DecrThreadUsage 71 75 #include "pathutil.h" 72 76 #if 0 73 77 #define __PMPRINTF__ … … 84 88 85 89 static PCSZ pszFleshFocusPath; // 2015-08-20 SHL 86 90 #if 0 87 91 BOOL fNoFleshDbgMsg; // 2015-08-09 SHL FIXME to be gone 88 92 #endif 89 93 #pragma data_seg(GLOBAL1) 90 94 ULONG NoBrokenNotify; … … 189 193 ri.cRecordsInsert = 1; 190 194 ri.fInvalidateRecord = FALSE; 191 // 2015-08-03 SHL FIXME debug195 #if 0 // 2015-08-03 SHL FIXME debug 192 196 if (pciL->pszFileName == NullStr) 193 197 DbgMsg(pszSrcFile, __LINE__, "Stubby CM_INSERTRECORD pci %p pszFileName \"%s\"", pciL, pciL->pszFileName); // 2015-08-03 SHL FIXME debug 194 if (!WinSendMsg(hwndCnr, 198 #endif 199 if (!WinSendMsg(hwndCnr, 195 200 CM_INSERTRECORD, MPFROMP(pciL), MPFROMP(&ri))) 196 201 FreeCnrItem(hwndCnr, pciL); … … 238 243 return FALSE; 239 244 240 // 2015-08-03 SHL FIXME debug245 #if 0 // 2015-08-03 SHL FIXME debug 241 246 if (!fNoFleshDbgMsg) { 242 247 DbgMsg(pszSrcFile, __LINE__, "Flesh %s pciParent %p pszFileName %p", … … 246 251 pciParent && (INT)pciParent != -1 ? pciParent->pszFileName : (PVOID)-1); // 2015-08-03 SHL FIXME debug 247 252 } 248 249 pciL = (PCNRITEM)WinSendMsg(hwndCnr, 250 CM_QUERYRECORD, 251 MPFROMP(pciParent), 252 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 253 253 #endif 254 254 // 2015-08-06 SHL allow pciL -1 255 255 // 2015-08-06 SHL FIXME to not need pszFileName check 256 if (!pciL || (INT)pciL == -1 || !*pciL->pszFileName || !strcmp(pciL->pszFileName, NullStr)) { 257 256 if (!pciParent->fleshed) { 257 pciL = (PCNRITEM)WinSendMsg(hwndCnr, 258 CM_QUERYRECORD, 259 MPFROMP(pciParent), 260 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 258 261 // No children or filename null 259 262 if (pciL && (INT)pciL != -1) { 263 AddFleshWorkRequest(hwndCnr, pciL, eStubby); 260 264 // 2015-08-06 SHL FIXME to ensure this an not happen 261 // if (!*pciL->pszFileName)262 //Runtime_Error(pszSrcFile, __LINE__, "Flesh called with pci %p pszFileName (null)", pciL);263 265 if (!*pciL->pszFileName || !strcmp(pciL->pszFileName, NullStr)) 266 Runtime_Error(pszSrcFile, __LINE__, "Flesh called with pci %p pszFileName (null)", pciL); 267 #if 0 264 268 if (!fNoFleshDbgMsg) 265 269 DbgMsg(pszSrcFile, __LINE__, "Flesh RemoveCnrItems() pciL %p \"%s\"", … … 267 271 pciL->pszFileName ? pciL->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug 268 272 // Assume refernces to pciL already removed from work list 269 RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE); 270 } 271 273 #endif 274 } 272 275 dcd = INSTDATA(hwndCnr); 273 276 if (dcd && dcd->size != sizeof(DIRCNRDATA)) … … 287 290 dcd, 288 291 NULL, // total files 289 NULL); // total bytes 292 NULL, // total bytes 293 (pciL && (INT)pciL != -1) ? pciL->pszDisplayName : 0); 294 pciParent->fleshed = TRUE; 290 295 return TRUE; 291 296 } … … 306 311 if (!pciParent || !hwndCnr) 307 312 return; 308 313 #if 0 309 314 if (!fNoFleshDbgMsg) 310 315 DbgMsg(pszSrcFile, __LINE__, "UnFlesh pciParent %p pszFileName \"%s\"", pciParent, pciParent->pszFileName ? pciParent->pszFileName : "(null)"); // 2015-08-03 SHL FIXME debug 311 316 #endif 312 317 for (;;) { 313 318 pciL = (PCNRITEM)WinSendMsg(hwndCnr, … … 317 322 if (!pciL || (INT)pciL == -1) 318 323 break; // Done 319 324 #if 0 320 325 if (!fNoFleshDbgMsg) 321 326 DbgMsg(pszSrcFile, __LINE__, "UnFlesh RemoveCnrItems() pciL %p \"%s\"", pciL, pciL->pszFileName ? pciL->pszFileName : "(null)"); // 2015-08-03 SHL FIXME debug 327 #endif 322 328 RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE); 323 329 removed = TRUE; … … 328 334 CM_INVALIDATERECORD, 329 335 MPFROMP(&pciParent), 330 MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION)); 336 MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION)); 337 pciParent->fleshed = FALSE; 338 DosSleep(1); // Let container items go away 331 339 } 332 340 return; … … 368 376 static BOOL brokenlan = FALSE, isbroken = FALSE; 369 377 378 //DbgMsg(pszSrcFile, __LINE__,"Stubby pciParent %p", pciParent); 370 379 if (!pciParent || (INT)pciParent == -1 || !*pciParent->pszFileName 371 380 || pciParent->pszFileName == NullStr || !hwndCnr) 372 381 return FALSE; 373 382 #if 0 374 383 if (!fNoFleshDbgMsg) 375 384 DbgMsg(pszSrcFile, __LINE__, "Stubby pciParent %p pszFileName %s", pciParent, pciParent->pszFileName); // 2015-08-03 SHL FIXME debug 376 385 #endif 377 386 // Build wildcard 378 387 len = strlen(pciParent->pszFileName); … … 386 395 if (!isalpha(*wildcard) || wildcard[1] != ':' || wildcard[2] != '\\') { 387 396 MakeFullName(wildcard); 388 DbgMsg(pszSrcFile, __LINE__, "Stubby MakeFullName returned %s", wildcard); // 2015-08-19 SHL FIXME debug 389 } 390 397 //DbgMsg(pszSrcFile, __LINE__, "Stubby MakeFullName returned %s", wildcard); // 2015-08-19 SHL FIXME debug 398 } 391 399 drvNum = toupper(*pciParent->pszFileName) - 'A'; 392 400 flags = driveflags[drvNum]; … … 421 429 fl = includefiles ? FILE_DIRECTORY : MUST_HAVE_DIRECTORY; 422 430 423 DbgMsg(pszSrcFile, __LINE__, "Stubby DosFindFirst(%s)", wildcard); // 2015-08-19 SHL FIXME debug431 //DbgMsg(pszSrcFile, __LINE__, "Stubby DosFindFirst(%s)", wildcard); // 2015-08-19 SHL FIXME debug 424 432 425 433 rc = DosFindFirst(wildcard, … … 495 503 goto None; // Done 496 504 } 497 498 499 505 if (!rc) { 500 506 DosFindClose(hDir); … … 539 545 (pffb->achName[1] != '.' || pffb->achName[2])))) 540 546 { 541 // Got directory other than . or .. (or a file)547 // Got directory other than . or .. (or a file) 542 548 isadir = TRUE; 543 549 break; … … 562 568 } 563 569 else { 564 RECORDINSERT ri; 565 // 2015-08-19 SHL FIXME to use BldFullPathName(wildcard, ...) 566 pci->pszFileName = NullStr; // 2015-08-19 SHL FIXME to doc why 567 pci->pszDisplayName = NullStr; 568 pci->rc.pszIcon = pci->pszDisplayName; 570 RECORDINSERT ri; 571 CHAR szBuffer[CCHMAXPATH + 14]; 572 CHAR *p; 573 HPOINTER hptr; 574 575 p = strchr(wildcard, '*'); 576 *p = 0;; 577 BldFullPathName(szBuffer, wildcard, pffb->achName); 578 pci->pszFileName = xstrdup(szBuffer, pszSrcFile, __LINE__); //NullStr; // 2015-08-19 SHL FIXME to doc why 579 p = strrchr(pci->pszFileName, '\\'); 580 p++; 581 pci->pszDisplayName = p; //NullStr; 582 pci->rc.pszIcon = pci->pszDisplayName; 583 if (fForceUpper) 584 strupr(pci->pszFileName); 585 else if (fForceLower) 586 strlwr(pci->pszFileName); 587 588 flags = driveflags[toupper(*pci->pszFileName) - 'A']; 589 590 // get an icon to use with it 591 if (pffb->attrFile & FILE_DIRECTORY) { 592 // is directory 593 if (fNoIconsDirs || 594 (flags & DRIVE_NOLOADICONS) || 595 !isalpha(*pci->pszFileName)) { 596 hptr = (HPOINTER) 0; 597 } 598 else 599 hptr = WinLoadFileIcon(pci->pszFileName, FALSE); 600 } 601 else { 602 // is file 603 if (fNoIconsFiles || 604 (flags & DRIVE_NOLOADICONS) || 605 !isalpha(*pci->pszFileName)) { 606 hptr = (HPOINTER) 0; 607 } 608 else 609 hptr = WinLoadFileIcon(pci->pszFileName, FALSE); 610 611 if (!hptr || IsDefaultIcon(hptr)) 612 hptr = IDFile(pci->pszFileName); 613 } 614 615 if (!hptr) { 616 hptr = pffb->attrFile & FILE_DIRECTORY ? 617 hptrDir : pffb->attrFile & FILE_SYSTEM ? 618 hptrSystem : pffb->attrFile & FILE_HIDDEN ? 619 hptrHidden : pffb->attrFile & FILE_READONLY ? 620 hptrReadonly : hptrFile; 621 } 622 pci->rc.hptrIcon = hptr; 569 623 memset(&ri, 0, sizeof(RECORDINSERT)); 570 624 ri.cb = sizeof(RECORDINSERT); … … 574 628 ri.cRecordsInsert = 1; 575 629 ri.fInvalidateRecord = TRUE; 576 // 2015-08-03 SHL FIXME debug630 #if 0 // 2015-08-03 SHL FIXME debug 577 631 if (pci->pszFileName == NullStr) 578 632 DbgMsg(pszSrcFile, __LINE__, "Stubby CM_INSERTRECORD %p \"%s\" %.255s", pci, pci->pszFileName, pffb->achName); 579 if (!WinSendMsg(hwndCnr, 633 #endif 634 if (!WinSendMsg(hwndCnr, 580 635 CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) { 581 636 // Assume busy and try again 582 637 DosSleep(50); //05 Aug 07 GKY 100 583 638 WinSetFocus(HWND_DESKTOP, hwndCnr); 584 if (WinIsWindow((HAB)0, hwndCnr)) { 639 if (WinIsWindow((HAB)0, hwndCnr)) { 640 #if 0 585 641 if (!fNoFleshDbgMsg) { 586 // 2015-08-03 SHL FIXME debug 587 if (pci->pszFileName == NullStr) 588 DbgMsg(pszSrcFile, __LINE__, "Stubby CM_INSERTRECORD pci %p pszFileName \"%s\"", pci, pci->pszFileName); // 2015-08-03 SHL FIXME debug 589 } 642 // 2015-08-03 SHL FIXME debug 643 //if (pci->pszFileName == NullStr) 644 // DbgMsg(pszSrcFile, __LINE__, "Stubby CM_INSERTRECORD pci %p pszFileName \"%s\"", pci, pci->pszFileName); // 2015-08-03 SHL FIXME debug 645 } 646 #endif 590 647 if (!WinSendMsg(hwndCnr, 591 648 CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) { … … 594 651 FreeCnrItem(hwndCnr, pci); 595 652 } 596 else653 else 597 654 ok = TRUE; 598 655 } … … 670 727 if (!item) 671 728 break; 672 DbgMsg(pszSrcFile, __LINE__, "DeleteStaleFleshWorkListItems deleting %p %s", pci, pci->pszFileName ? pci->pszFileName : "(null)"); // 2015-08-03 SHL FIXME debug729 //DbgMsg(pszSrcFile, __LINE__, "DeleteStaleFleshWorkListItems deleting %p %s", pci, pci->pszFileName ? pci->pszFileName : "(null)"); // 2015-08-03 SHL FIXME debug 673 730 List2Delete(&FleshWorkList, item); 674 731 xfree(item, pszSrcFile, __LINE__); … … 815 872 return; // Avoid hang 816 873 } 874 #if 0 817 875 else if (IsFleshWorkListEmpty()) { 818 876 # ifdef WaitFleshWorkListEmpty … … 822 880 # endif 823 881 } 882 #endif 824 883 825 884 // Can not wait if call from thread 1 or FleshWorkListThread … … 859 918 if (!item) { 860 919 if (waited) 861 DosSleep( 250); // Let PM do some work920 DosSleep(100); // Let PM do some work 862 921 break; // Dependents gone from work list 863 922 } … … 889 948 if (pszOld) 890 949 xfree((PVOID)pszOld, pszSrcFile, __LINE__); 891 DbgMsg(pszSrcFile, __LINE__, "SetFleshFocusPath focus path set to %s", pszFleshFocusPath); // 2015-08-03 SHL FIXME debug950 //DbgMsg(pszSrcFile, __LINE__, "SetFleshFocusPath focus path set to %s", pszFleshFocusPath); // 2015-08-03 SHL FIXME debug 892 951 893 952 } … … 948 1007 // Wait for new items to be added to list 949 1008 if (!item) { 950 ULONG ul; 1009 ULONG ul; 1010 #if 0 951 1011 if (!fNoFleshDbgMsg) 952 1012 DbgMsg(pszSrcFile, __LINE__, "FleshWorkThread work list empty - waiting"); // 2015-08-03 SHL FIXME debug 953 xDosWaitEventSem(hevFleshWorkListChanged, SEM_INDEFINITE_WAIT); 954 xDosResetEventSem(hevFleshWorkListChanged, &ul); 1013 #endif 1014 xDosWaitEventSem(hevFleshWorkListChanged, SEM_INDEFINITE_WAIT); 1015 xDosResetEventSem(hevFleshWorkListChanged, &ul); 1016 #if 0 955 1017 if (!fNoFleshDbgMsg) 956 1018 DbgMsg(pszSrcFile, __LINE__, "FleshWorkThread work hev posted"); // 2015-08-03 SHL FIXME debug 957 continue; 1019 #endif 1020 continue; 958 1021 } 959 1022 960 if (WinIsWindow((HAB)0, item->hwndCnr)) { 961 #if 0 // 2015-08-07 SHL FIXME debug 962 // 2015-08-03 SHL FIXME debug 1023 if (WinIsWindow((HAB)0, item->hwndCnr)) { 1024 #if 0 // 2015-08-07 SHL FIXME debug 963 1025 { 964 1026 static PSZ itemNames[] = { … … 979 1041 980 1042 switch (item->action) { 981 case eUnFlesh:982 UnFlesh(item->hwndCnr, item->pci);1043 case eUnFlesh: 1044 UnFlesh(item->hwndCnr, item->pci); 983 1045 break; 984 1046 case eFleshEnv: … … 987 1049 case eStubby: 988 1050 // DbgMsg(pszSrcFile, __LINE__, "FleshWorkThread pci %p pszFileName %s", stubbyArgs->pci, stubbyArgs->pci->pszFileName); // 2015-08-03 SHL FIXME debug 989 Stubby(item->hwndCnr, item->pci); 1051 priority_bumped(); 1052 Stubby(item->hwndCnr, item->pci); 1053 priority_normal(); 990 1054 break; 991 1055 case eFlesh: … … 1041 1105 if (rc) 1042 1106 return FALSE; // Give up 1043 1044 /*DbgMsg is time consuming1107 #if 0 1108 /*DbgMsg is time consuming 1045 1109 define FM2_NO_FLESH_DBGMSG to suppress 1046 1110 2015-08-09 SHL FIXME to be gone 1047 */1111 */ 1048 1112 1049 1113 fNoFleshDbgMsg = getenv("FM2_NO_FLESH_DBGMSG") != NULL; 1050 1114 #endif 1051 1115 tidFleshWorkListThread = xbeginthread(FleshWorkThread, 1052 1116 65536,  - 
      
trunk/dll/fm3dll2.h
r1803 r1871 803 803 #define UM_SETUP (WM_USER + 85) 804 804 #define UM_SETDIR (WM_USER + 86) 805 #define UM_COLLAPSETREE (WM_USER + 87) 806 #define UM_EXPANDTREE (WM_USER + 88) 805 807 // WM_USER + 1000 used in FTPAPI.H (IBM Toolkit) 806 808  - 
      
trunk/dll/fm3res.rc
r1805 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 201 4Steven H. Levine9 Copyright (c) 2003, 2015 Steven H. Levine 10 10 11 11 08 Feb 03 SHL Enable SYS_FRAME … … 79 79 menu item on a jar file. 80 80 23 May 15 GKY Option to restart desktop to prevent icon loss from JAVA object 81 20 Sep 15 GKY Add "Expanding" window text. 81 82 82 83 ***********************************************************************/ … … 3417 3418 IDS_RESTARTDESKTOP "Restart Desktop?" 3418 3419 IDS_SETTINGLOSEICON "If you don't restart the desktop before opening in settings view the icon will be lost" 3419 3420 IDS_PLEASEWAITEXPANDINGTEXT "Please wait--expanding can take 10+ min on huge drives" 3420 3421 3421 3422 // Add strings that need to be combined by GetPString here  - 
      
trunk/dll/fm3str.h
r1805 r1871 1057 1057 #define IDS_ARCMISSINGEXE 1025 1058 1058 #define IDS_ARCMISSINGEXEVERBOSE 1026 1059 1059 #define IDS_PLEASEWAITEXPANDINGTEXT 1027 1060 1060 // The following strings were cut up form the string of the root name (ie IDS_SUGGEST1TEXT) 1061 1061 // This was done as part of the conversion to a StringTable where strings are limited to 255  - 
      
trunk/dll/init.c
r1868 r1871 139 139 22 Aug 15 GKY Remove recurse scan code. 140 140 24 Aug 15 GKY Remove obsolete code fDontAsk?zip 141 20 Sep 15 GKY Move tree expand to a thread. 141 142 142 143 ***********************************************************************/ … … 262 263 BOOL fReminimize; 263 264 BOOL fWantFirstTimeInit; 264 BOOL fUseShellEnv; ;265 BOOL fUseShellEnv; 265 266 HPOINTER hptrApp; 266 267 HPOINTER hptrArc; … … 897 898 return FALSE; 898 899 900 if (!StartExpandTreeThread()) 901 return FALSE; 902 899 903 // timer messages are sent from a separate thread -- start it 900 904 if (!StartTimer()) { … … 1646 1650 1647 1651 // 2015-08-11 SHL FIXME debug 1648 DbgMsg(pszSrcFile, __LINE__, "ShowEnv %u SwitchTree %u SwitchTreeExpand %u SwitchTreeOnFocus %u CollapseFirst %u", fShowEnv, fSwitchTreeOnDirChg, fSwitchTreeExpand, fSwitchTreeOnFocus, fCollapseFirst);1652 //DbgMsg(pszSrcFile, __LINE__, "ShowEnv %u SwitchTree %u SwitchTreeExpand %u SwitchTreeOnFocus %u CollapseFirst %u", fShowEnv, fSwitchTreeOnDirChg, fSwitchTreeExpand, fSwitchTreeOnFocus, fCollapseFirst); 1649 1653 1650 1654 LoadDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault, FALSE);  - 
      
trunk/dll/objcnr.c
r1673 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2005, 20 09Steven H. Levine9 Copyright (c) 2005, 2015 Steven H. Levine 10 10 11 11 24 May 05 SHL Rework for CNRITEM.szSubject … … 25 25 08 Mar 09 GKY Additional strings move to PCSZs 26 26 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. 27 20 Sep 15 GKY Update for modified ExpandAll 27 28 28 29 ***********************************************************************/ … … 365 366 CMA_ITEMORDER)); 366 367 if (pci && (INT) pci != -1) { 367 ExpandAll(WinWindowFromID(hwnd, OBJCNR_CNR), TRUE, pci);368 ExpandAll(WinWindowFromID(hwnd, OBJCNR_CNR), 0, pci); 368 369 if (id == QTREE_FRAME) 369 370 pci = (PCNRITEM) WinSendDlgItemMsg(hwnd, OBJCNR_CNR,  - 
      
trunk/dll/select.c
r1838 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004, 201 1Steven H. Levine9 Copyright (c) 2004, 2015 Steven H. Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 34 34 02 Aug 15 GKY Remove unneed SubbyScan code and improve suppression of blank lines and 35 35 duplicate subdirectory name caused by running Stubby in worker threads. 36 20 Sep 15 GKY Create CollapseAll and modify ExpandAll to reduce code overhead 37 both to try and speed drive expansion. Change ExpandAll to allow it to loop 38 in UM_EXPAND until until drive is completely expanded. Changes were need to 39 work with Flesh, Stubby and UnFlesh being moved to a thread 36 40 37 41 ***********************************************************************/ … … 65 69 #include "stristr.h" // findstring 66 70 #include "fortify.h" 71 #include "flesh.h" 67 72 #if 0 68 73 #define __PMPRINTF__ … … 564 569 } 565 570 566 VOID ExpandAll(HWND hwndCnr, BOOL expand, PCNRITEM pciParent) 567 { 568 PCNRITEM pci; 569 571 BOOL ExpandAll(HWND hwndCnr, INT count, PCNRITEM pciParent) 572 { 573 PCNRITEM pci; 574 static BOOL fExpanding = FALSE; 575 static INT counter = 1; 576 577 if (count != counter && count != 0) { 578 if (count > counter) { 579 fExpanding = FALSE; 580 counter++; 581 } 582 else if (count < counter) { 583 fExpanding = FALSE; 584 counter = 1; 585 } 586 } 570 587 if (!pciParent) 571 588 pciParent = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(NULL), 572 589 MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 573 590 if (pciParent) { 574 if (expand && ~pciParent->rc.flRecordAttr & CRA_EXPANDED) 591 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pciParent), 592 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 593 // Only expand items that have childern 594 if (pci && ~pciParent->rc.flRecordAttr & CRA_EXPANDED) { 575 595 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciParent), MPVOID); 576 else if (!expand && (pciParent->rc.flRecordAttr & CRA_EXPANDED)) 596 if (count != 0) { 597 fExpanding = TRUE; 598 if (!IsFleshWorkListEmpty()) { 599 WaitFleshWorkListEmpty(NULL); // Let it expand 600 } 601 } 602 } 603 while (pci && (INT)pci != -1) { 604 ExpandAll(hwndCnr, count, pci); 605 if (!IsFleshWorkListEmpty()) 606 WaitFleshWorkListEmpty(NULL); // Wait for container to catch up 607 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 608 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); 609 } 610 } 611 //DosSleep(0); 612 return fExpanding; 613 } 614 615 VOID CollapseAll(HWND hwndCnr, PCNRITEM pciParent) 616 { 617 PCNRITEM pci; 618 619 if (!pciParent) 620 pciParent = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(NULL), 621 MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)); 622 if (pciParent) { 623 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pciParent), 624 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 625 if ((pciParent->rc.flRecordAttr & CRA_EXPANDED)) 577 626 WinSendMsg(hwndCnr, CM_COLLAPSETREE, MPFROMP(pciParent), MPVOID); 578 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pciParent), 579 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 580 while (pci && (INT)pci != -1) { 581 ExpandAll(hwndCnr, expand, pci); 627 while (pci && (INT)pci != -1) { 628 CollapseAll(hwndCnr, pci); 582 629 pci = (PCNRITEM) WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), 583 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER));630 MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)); 584 631 } 585 632 }  - 
      
trunk/dll/select.h
r1227 r1871 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H. Levine9 Copyright (c) 2008, 2015 Steven H. Levine 10 10 11 11 Change log 12 20 Sep 15 GKY Create CollapseAll and modify ExpandAll to reduce code overhead 13 both to try and speed drive expansion. Change ExpandAll to allow it to loop 14 in UM_EXPAND until until drive is completely expanded. Changes were need to 15 work with Flesh, Stubby and UnFlesh being moved to a thread 12 16 13 17 ***********************************************************************/ … … 21 25 VOID DeselectAll(HWND hwndCnr, BOOL files, BOOL dirs, CHAR * mask, 22 26 CHAR * text, BOOL arc); 23 VOID ExpandAll(HWND hwndCnr, BOOL expand, PCNRITEM pciParent); 27 BOOL ExpandAll(HWND hwndCnr, INT count, PCNRITEM pciParent); 28 VOID CollapseAll(HWND hwndCnr, PCNRITEM pciParent); 24 29 VOID HideAll(HWND hwndCnr); 25 30 VOID InvertAll(HWND hwndCnr);  - 
      
trunk/dll/treecnr.c
r1868 r1871 104 104 22 Aug 15 GKY Improve ability of maketop to get directory position in tree correct on first 105 105 open of states with large and/or deep tree structures 106 24 AUG 15 GKY Remove fDummy code 106 24 Aug 15 GKY Remove fDummy code 107 20 Sep 15 GKY Get expand and switch code to work with Flesh, UnFlesh and Stubby running on 108 a thread. Loop and idle ExpandAll; Add CollapseAll; Move tree expand to a 109 thread; Have ShowTreeRec wait for the Flesh thread. 107 110 108 111 ***********************************************************************/ … … 199 202 static PSZ pszSrcFile = __FILE__; 200 203 static BOOL fOkayMinimize; 204 static HMQ hmqExpandTree; 205 static BOOL fExpandAll; 201 206 202 207 APIRET16 APIENTRY16 Dos16MemAvail(PULONG pulAvailMem); … … 300 305 CHAR chSaved; 301 306 302 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec called for pszDir_ \"%s\"", pszDir_); // 2015-08-04 SHL FIXME debug307 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec called for pszDir_ \"%s\"", pszDir_); // 2015-08-04 SHL FIXME debug 303 308 304 309 strcpy(szDirArg, pszDir_); // Cache here in case arg content changed by some other thread … … 313 318 goto MakeTop; 314 319 } 315 316 320 // 2015-08-23 SHL FIXME to be gone - problem must be elsewhere 317 321 // 2015-08-22 GKY Without this FM2 has NULL pci->pszFileName errors and switch failures … … 338 342 339 343 // Walk down directory tree, expanding as needed 340 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec needs expand, szDirArg \"%s\", IsFleshWorkListEmpty %u", szDirArg, IsFleshWorkListEmpty()); // 2015-08-04 SHL FIXME debug344 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec needs expand, szDirArg \"%s\", IsFleshWorkListEmpty %u", szDirArg, IsFleshWorkListEmpty()); // 2015-08-04 SHL FIXME debug 341 345 342 346 strcpy(szDir, szDirArg); … … 354 358 TRUE); // noenv 355 359 if (!pciP || (INT)pciP == -1) { 356 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned pciP %p", szDir, pciP); // 2015-08-04 SHL FIXME debug360 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned pciP %p", szDir, pciP); // 2015-08-04 SHL FIXME debug 357 361 WaitFleshWorkListEmpty(szDirArg); // 2015-08-23 SHL 358 362 break; // No match 359 363 } 360 364 361 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned %p \"%s\"", szDir, pciP, pciP->pszFileName); // 2015-08-04 SHL FIXME debug365 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned %p \"%s\"", szDir, pciP, pciP->pszFileName); // 2015-08-04 SHL FIXME debug 362 366 363 367 if (!stricmp(szDirArg, pciP->pszFileName)) { … … 370 374 371 375 if (~pciP->rc.flRecordAttr & CRA_EXPANDED) { 372 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec expanding \"%s\"", pciP->pszFileName); // 2015-08-04 SHL FIXME debug376 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec expanding \"%s\"", pciP->pszFileName); // 2015-08-04 SHL FIXME debug 373 377 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID); 374 378 } … … 394 398 } // for 395 399 396 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec retries %u pci %p pci->pszFileName \"%s\"",retries, pci, pci && (INT)pci != -1 ? pci->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug400 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec retries %u pci %p pci->pszFileName \"%s\"",retries, pci, pci && (INT)pci != -1 ? pci->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug 397 401 398 402 if (found) { … … 439 443 if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED) { 440 444 // 2015-08-23 SHL FIXME debug 441 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_EXPANDTREE, %p)", pciToSelect); // 2015-08-04 SHL FIXME debug445 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_EXPANDTREE, %p)", pciToSelect); // 2015-08-04 SHL FIXME debug 442 446 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID); 443 447 } 444 if (fTopDir || maketop) { 448 if (maketop || fTopDir) { 449 if (fCollapseFirst) 450 WaitFleshWorkListEmpty(NULL); //Let the root expand first otherwise it makes top 445 451 // 2015-08-23 SHL FIXME debug 446 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) fTopDir %i maketop %i", pciToSelect, fTopDir, maketop); // 2015-08-04 SHL FIXME debug452 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) fTopDir %i maketop %i", pciToSelect, fTopDir, maketop); // 2015-08-04 SHL FIXME debug 447 453 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect); 448 454 } … … 450 456 if (!quickbail) { 451 457 WaitFleshWorkListEmpty(szDirArg); // 2015-08-19 SHL try to ensure contents stable 452 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_SETRECORDEMPHASIS, CRA_SELECTED | CRA_CURSORED) szDirArg \"%s\"", szDirArg); // 2015-08-04 SHL FIXME debug458 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_SETRECORDEMPHASIS, CRA_SELECTED | CRA_CURSORED) szDirArg \"%s\"", szDirArg); // 2015-08-04 SHL FIXME debug 453 459 WinSendMsg(hwndCnr, 454 460 CM_SETRECORDEMPHASIS, … … 734 740 See RestoreDirCnrState() 735 741 */ 736 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME cDirectoriesRestored %u", cDirectoriesRestored); // 2015-08-04 SHL FIXME debug737 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME \"%s\")", mp1); // 2015-08-04 SHL FIXME debug742 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME cDirectoriesRestored %u", cDirectoriesRestored); // 2015-08-04 SHL FIXME debug 743 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME \"%s\")", mp1); // 2015-08-04 SHL FIXME debug 738 744 739 745 if (cDirectoriesRestored > 0) … … 743 749 BOOL tempsusp = dcd->suspendview; 744 750 BOOL tempfollow = fFollowTree; 745 BOOL temptop;751 //BOOL temptop; 746 752 dcd->suspendview = TRUE; 747 753 fFollowTree = FALSE; 748 if (mp2) { 754 #if 0 // 2015-09-20 GKY This doesn't appear to be needed since maketop is always TRUE 755 if (mp2) { 749 756 temptop = fTopDir; 750 757 fTopDir = TRUE; 751 758 } 752 753 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling ShowTreeRec(\"%s\")", mp1); // 2015-08-04 SHL FIXME debug759 #endif 760 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling ShowTreeRec(\"%s\")", mp1); // 2015-08-04 SHL FIXME debug 754 761 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 755 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug762 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug 756 763 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 757 764 758 765 dcd->suspendview = (USHORT)tempsusp; // Restore 759 fFollowTree = tempfollow; // Restore 766 fFollowTree = tempfollow; // Restore 767 #if 0 760 768 if (mp2) 761 fTopDir = temptop; // Restore 769 fTopDir = temptop; // Restore 770 #endif 762 771 } 763 772 } … … 797 806 else { 798 807 BOOL tempsusp = dcd->suspendview; 808 INT x = 0; 809 BOOL fExpanding = TRUE; 799 810 800 811 dcd->suspendview = TRUE; 801 ExpandAll(dcd->hwndCnr, 802 (SHORT1FROMMP(mp1) == IDM_EXPAND), (PCNRITEM) mp2); 812 priority_idle(); 813 if (SHORT1FROMMP(mp1) == IDM_EXPAND) { 814 //DbgMsg(pszSrcFile, __LINE__,"UM_EXPAND Start"); 815 fExpandAll = TRUE; 816 while (fExpanding) { // Not serialized not practical to wait on very large directories 817 x++; 818 if (!IsFleshWorkListEmpty()) { 819 WaitFleshWorkListEmpty(NULL); // Let it expand 820 } 821 fExpanding = ExpandAll(dcd->hwndCnr, x, (PCNRITEM) mp2); 822 DosSleep(240); 823 //DbgMsg(pszSrcFile, __LINE__,"UM_EXPAND fExpanding %i count %i", fExpanding, x); 824 } 825 fExpandAll = FALSE; 826 } 827 else 828 CollapseAll(dcd->hwndCnr, (PCNRITEM) mp2); 829 priority_normal(); 803 830 DosSleep(1); // Fixes tree epansion (dir text and icons all placed on 804 831 // the same line as the drive) failure on startup using RWS … … 967 994 CM_SCROLLWINDOW, 968 995 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(-1)); 969 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc FillTreeCnr()"); // 2015-08-04 SHL FIXME debug996 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc FillTreeCnr()"); // 2015-08-04 SHL FIXME debug 970 997 FillTreeCnr(dcd->hwndCnr, dcd->hwndParent); 971 998 if (fOkayMinimize) { … … 976 1003 CM_INVALIDATERECORD, 977 1004 MPVOID, MPFROM2SHORT(0, CMA_ERASE | CMA_REPOSITION)); 978 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc PostMsg(UM_RESCAN)"); // 2015-08-04 SHL FIXME debug1005 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc PostMsg(UM_RESCAN)"); // 2015-08-04 SHL FIXME debug 979 1006 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); 980 1007 } … … 1333 1360 } 1334 1361 } 1335 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_RESCAN PostMsg(UM_RESCAN2, %p %s)",1336 pci, pci && pci->pszFileName ? pci->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug1362 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_RESCAN PostMsg(UM_RESCAN2, %p %s)", 1363 // pci, pci && pci->pszFileName ? pci->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug 1337 1364 PostMsg(dcd->hwndObject, UM_RESCAN2, MPFROMP(pci), MPVOID); 1338 1365 if (hwndStatus2) … … 1901 1928 case CN_COLLAPSETREE: 1902 1929 case CN_EXPANDTREE: 1903 { 1904 PCNRITEM pci = (PCNRITEM) mp2; 1905 1906 if (pci && (INT) pci != -1 && !(pci->flags & RECFLAGS_ENV)) { 1907 if (driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_REMOVABLE) { 1908 1909 struct 1910 { 1911 ULONG serial; 1912 CHAR volumelength; 1913 CHAR volumelabel[CCHMAXPATH]; 1914 } 1915 volser; 1916 1917 memset(&volser, 0, sizeof(volser)); 1918 DosError(FERR_DISABLEHARDERR); 1919 if (!DosQueryFSInfo(toupper(*pci->pszFileName) - '@', 1920 FSIL_VOLSER, &volser, 1921 (ULONG) sizeof(volser))) { 1922 if (SHORT2FROMMP(mp1) == CN_COLLAPSETREE && 1923 !volser.serial || 1924 driveserial[toupper(*pci->pszFileName) - 'A'] != 1925 volser.serial) 1926 { 1927 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 1928 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1929 } 1930 if (SHORT2FROMMP(mp1) != CN_COLLAPSETREE || 1931 (!volser.serial || 1932 driveserial[toupper(*pci->pszFileName) - 'A'] != 1933 volser.serial)) { 1934 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && AddFleshWorkRequest(hwnd, pci, eFlesh) 1935 &&!dcd->suspendview && fTopDir) { 1936 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 1937 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); 1938 } 1939 } 1940 driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial; 1941 } 1942 else { 1943 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 1944 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 1945 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1946 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 1947 if (!fAlertBeepOff) 1948 DosBeep(250, 100); 1949 } 1950 } 1951 else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) { 1952 // 2015-08-04 SHL 1953 #if 1 1954 AddFleshWorkRequest(hwnd, pci, eFlesh); // forceFlesh 1955 if (!dcd->suspendview && fTopDir) { 1956 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_TOPDIR %p pci %p", hwnd, pci); // 2015-08-04 SHL FIXME debug 1957 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 1958 } 1959 #else 1960 if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) { 1961 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_TOPDIR %p pci %p", hwnd, pci); // 2015-08-04 SHL FIXME debug 1962 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 1963 } 1964 #endif 1965 } 1966 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview){ 1967 DbgMsg(pszSrcFile, __LINE__, "UM_FILTER %p pci %p", hwnd, pci); 1968 WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID); 1969 } 1970 } 1971 } 1930 WinPostQueueMsg(hmqExpandTree, CN_EXPANDTREE ? UM_EXPANDTREE :UM_COLLAPSETREE, 1931 mp2, MPFROMP(dcd)); 1972 1932 break; 1973 1933 } // switch WM_CONTROL … … 1992 1952 1993 1953 if (dir) { 1994 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_SHOWME PostMsg(UM_SHOWME, %s)", dir); // 2015-08-13 SHL FIXME debug1954 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_SHOWME PostMsg(UM_SHOWME, %s)", dir); // 2015-08-13 SHL FIXME debug 1995 1955 if (!PostMsg(dcd->hwndObject, UM_SHOWME, MPFROMP(dir), MPVOID)) 1996 1956 free(dir); … … 2286 2246 CHAR szDrv[CCHMAXPATH]; 2287 2247 2288 strcpy(szDrv, pci->pszFileName);2248 strcpy(szDrv, pci->pszFileName); 2289 2249 chDrvU = *pci->pszFileName; 2290 chDrvU = toupper(chDrvU); 2250 chDrvU = toupper(chDrvU); 2251 //DbgMsg(pszSrcFile, __LINE__,"IDM_FILESMENU prevalid drive %s file %s", 2252 // szDrv, pci->pszFileName); 2291 2253 MakeValidDir(szDrv); 2292 2254 rdy = *szDrv == chDrvU; // Drive not ready if MakeValidDir changes drive letter … … 2297 2259 local = rdy && (!(driveflags[chDrvU - 'A'] & (DRIVE_REMOTE | DRIVE_VIRTUAL))); 2298 2260 underenv = (pci->flags & RECFLAGS_UNDERENV) != 0; 2299 2261 //DbgMsg(pszSrcFile, __LINE__,"IDM_FILESMENU postvalid drive %s rdy %i removable %i writeable %i local %i underenv %i", 2262 // szDrv, rdy, removable, writeable, local, underenv); 2300 2263 CopyPresParams((HWND) mp2, hwndMainMenu); 2301 2264 WinEnableMenuItem((HWND) mp2, IDM_INFO, rdy); … … 2444 2407 case UM_DRIVECMD: 2445 2408 if (mp1) { 2446 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_DRIVECMD ShowTreeRec(\"%s\")", mp1);2409 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_DRIVECMD ShowTreeRec(\"%s\")", mp1); 2447 2410 ShowTreeRec(hwnd, (CHAR *)mp1, FALSE, TRUE); 2448 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc PostMsg(IDM_UPDATE)");2411 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc PostMsg(IDM_UPDATE)"); 2449 2412 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 2450 2413 } … … 2939 2902 PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID); 2940 2903 } 2941 DbgMsg(pszSrcFile, __LINE__, " TreeCnrWndProc IDM_UPDATE %s", pci->pszFileName); // 2015-08-03 SHL FIXME debug2904 //DbgMsg(pszSrcFile, __LINE__, " TreeCnrWndProc IDM_UPDATE %s", pci->pszFileName); // 2015-08-03 SHL FIXME debug 2942 2905 if (~driveflag & DRIVE_INVALID) 2943 2906 AddFleshWorkRequest(hwnd, pci, eFlesh); … … 3260 3223 break; // WM_DESTROY 3261 3224 } // switch 3225 //DbgMsg(pszSrcFile, __LINE__,"return oldproc msg %i mp1 %p mp2 %p", msg, mp1, mp2); 3262 3226 if (dcd && dcd->oldproc){ 3263 3227 return dcd->oldproc(hwnd, msg, mp1, mp2); … … 3435 3399 } 3436 3400 3401 static VOID ExpandTreeThread(VOID *args) 3402 { 3403 QMSG qmsg; 3404 DIRCNRDATA *dcd; 3405 HAB hab = WinInitialize(0); 3406 # ifdef FORTIFY 3407 Fortify_EnterScope(); 3408 # endif 3409 if (hab) { 3410 hmqExpandTree = WinCreateMsgQueue(hab, 0); 3411 if (hmqExpandTree) { 3412 while (WinGetMsg(hab, &qmsg, (HWND) 0, UM_COLLAPSETREE, UM_EXPANDTREE)) { 3413 dcd = (DIRCNRDATA *) qmsg.mp2; 3414 if (!dcd) 3415 Runtime_Error(pszSrcFile, __LINE__, NULL); 3416 else { 3417 PCNRITEM pci = (PCNRITEM) qmsg.mp1; 3418 3419 if (pci && (INT) pci != -1 && !(pci->flags & RECFLAGS_ENV)) { 3420 if (driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_REMOVABLE) { 3421 3422 struct 3423 { 3424 ULONG serial; 3425 CHAR volumelength; 3426 CHAR volumelabel[CCHMAXPATH]; 3427 } 3428 volser; 3429 3430 memset(&volser, 0, sizeof(volser)); 3431 DosError(FERR_DISABLEHARDERR); 3432 if (!DosQueryFSInfo(toupper(*pci->pszFileName) - '@', 3433 FSIL_VOLSER, &volser, 3434 (ULONG) sizeof(volser))) { 3435 if (qmsg.msg == UM_COLLAPSETREE && 3436 !volser.serial || 3437 driveserial[toupper(*pci->pszFileName) - 'A'] != 3438 volser.serial) 3439 { // 2015-08-28 GKY fixme? I think this code runs on the UI thread 3440 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3441 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3442 } 3443 if (qmsg.msg != UM_COLLAPSETREE || 3444 (!volser.serial || 3445 driveserial[toupper(*pci->pszFileName) - 'A'] != 3446 volser.serial)) { 3447 if (qmsg.msg == UM_EXPANDTREE && AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh) 3448 && !dcd->suspendview && fTopDir) { 3449 DosSleep(1); 3450 WaitFleshWorkListEmpty(pci->pszFileName); 3451 PostMsg(dcd->hwndCnr, UM_TOPDIR, MPFROMP(pci), MPVOID); 3452 } 3453 } 3454 driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial; 3455 } 3456 else { 3457 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 3458 // 2015-08-28 GKY fixme? I think this code runs on the UI thread 3459 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3460 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3461 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); 3462 if (!fAlertBeepOff) 3463 DosBeep(250, 100); 3464 } 3465 } 3466 else if (qmsg.msg == UM_EXPANDTREE) { 3467 // 2015-08-04 SHL 3468 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc qmsg.msg == UM_EXPANDTREE %p pci %p %s", 3469 // qmsg.hwnd, pci, pci->pszFileName); 3470 if (fExpandAll) 3471 DosSleep(1); 3472 else { 3473 while (!IsFleshWorkListEmpty()) 3474 DosSleep(10); //Yield to Flesh thread 3475 } 3476 AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh); // forceFlesh 3477 if (!dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) { 3478 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_TOPDIR %p pci %p %s", 3479 // qmsg.hwnd, pci, pci->pszFileName); // 2015-08-04 SHL FIXME debug 3480 PostMsg(dcd->hwndCnr, UM_TOPDIR, MPFROMP(pci), MPVOID); 3481 } 3482 } 3483 if (qmsg.msg == UM_EXPANDTREE && !dcd->suspendview) { 3484 //DbgMsg(pszSrcFile, __LINE__, "UM_FILTER %p pci %p %s", 3485 // dcd->hwndCnr, pci, pci->pszFileName); 3486 WinSendMsg(dcd->hwndCnr, UM_FILTER, MPVOID, MPVOID); 3487 } 3488 } 3489 } 3490 } 3491 } 3492 WinDestroyMsgQueue(hmqExpandTree); 3493 } 3494 WinTerminate(hab); 3495 # ifdef FORTIFY 3496 Fortify_LeaveScope(); 3497 # endif 3498 } 3499 3500 BOOL StartExpandTreeThread() 3501 { 3502 TID tid; 3503 tid = xbeginthread(ExpandTreeThread, 3504 65536, 3505 NULL, 3506 pszSrcFile, __LINE__); 3507 return tid != -1; 3508 3509 } 3510 3437 3511 #pragma alloc_text(TREECNR,TreeCnrWndProc,TreeObjWndProc,TreeClientWndProc) 3438 3512 #pragma alloc_text(TREECNR,TreeFrameWndProc,TreeTitleWndProc,ShowTreeRec)  - 
      
trunk/dll/treecnr.h
r1868 r1871 15 15 23 Aug 15 SHL Protect ShowTreeRec dirname arg 16 16 24 AUG 15 GKY Remove fDummy code 17 20 Sep 15 GKY Move tree expand to a thread. 17 18 18 19 ***********************************************************************/ … … 28 29 MRESULT EXPENTRY TreeObjWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); 29 30 MRESULT EXPENTRY TreeStatProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); 31 BOOL StartExpandTreeThread(); 30 32 31 33 // Data declarations  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  