Changeset 1877 for trunk/dll/treecnr.c
- Timestamp:
- Oct 11, 2015, 11:43:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1876 r1877 348 348 349 349 // Walk down directory tree, expanding as needed 350 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec needs expand, szDirArg \"%s\", IsFleshWorkListEmpty %u", szDirArg, IsFleshWorkListEmpty()); // 2015-08-04 SHL FIXME debug351 352 350 strcpy(szDir, szDirArg); 353 351 p = szDir + 3; // Point after root backslash … … 364 362 TRUE); // noenv 365 363 if (!pciP || (INT)pciP == -1) { 366 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned pciP %p", szDir, pciP); // 2015-08-04 SHL FIXME debug367 364 WaitFleshWorkListEmpty(szDirArg, 240); // 2015-08-23 SHL 368 365 break; // No match 369 366 } 370 371 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(\"%s\") returned %p \"%s\"", szDir, pciP, pciP->pszFileName); // 2015-08-04 SHL FIXME debug372 373 367 if (!stricmp(szDirArg, pciP->pszFileName)) { 374 368 pci = pciP; … … 380 374 381 375 if (~pciP->rc.flRecordAttr & CRA_EXPANDED) { 382 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec expanding \"%s\"", pciP->pszFileName); // 2015-08-04 SHL FIXME debug383 376 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID); 384 377 } … … 401 394 402 395 } // for 403 404 //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 debug405 406 396 if (found) { 407 397 // Found it … … 447 437 if (pciToSelect && (INT) pciToSelect != -1) { 448 438 if (fSwitchTreeExpand && ~pciToSelect->rc.flRecordAttr & CRA_EXPANDED) { 449 // 2015-08-23 SHL FIXME debug450 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_EXPANDTREE, %p)", pciToSelect); // 2015-08-04 SHL FIXME debug451 439 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID); 452 440 } … … 455 443 WaitFleshWorkListEmpty(NULL, 240); //Let the root expand first otherwise it makes top 456 444 } 457 // 2015-08-23 SHL FIXME debug458 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) filename %s", pciToSelect, pciToSelect->pszFileName); // 2015-08-04 SHL FIXME debug459 445 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect); 460 446 } … … 462 448 if (!quickbail) { 463 449 WaitFleshWorkListEmpty(szDirArg, 240); // 2015-08-19 SHL try to ensure contents stable 464 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec WinSendMsg(CM_SETRECORDEMPHASIS, CRA_SELECTED | CRA_CURSORED) szDirArg \"%s\"", szDirArg); // 2015-08-04 SHL FIXME debug465 450 WinSendMsg(hwndCnr, 466 451 CM_SETRECORDEMPHASIS, … … 746 731 See RestoreDirCnrState() 747 732 */ 748 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME cDirectoriesRestored %u", cDirectoriesRestored); // 2015-08-04 SHL FIXME debug749 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME \"%s\")", mp1); // 2015-08-04 SHL FIXME debug750 751 733 if (cDirectoriesRestored > 0) 752 734 cDirectoriesRestored--; … … 755 737 BOOL tempsusp = dcd->suspendview; 756 738 BOOL tempfollow = fFollowTree; 757 //BOOL temptop;758 739 dcd->suspendview = TRUE; 759 740 fFollowTree = FALSE; 760 #if 0 // 2015-09-20 GKY This doesn't appear to be needed since maketop is always TRUE761 if (mp2) {762 temptop = fTopDir;763 fTopDir = TRUE;764 }765 #endif766 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling ShowTreeRec(\"%s\")", mp1); // 2015-08-04 SHL FIXME debug767 741 priority_idle(); // 2015-09-26 GKY Majority of work done by Flesh and UI threads 768 742 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 769 743 priority_normal(); 770 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug771 744 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 772 745 773 746 dcd->suspendview = (USHORT)tempsusp; // Restore 774 747 fFollowTree = tempfollow; // Restore 775 #if 0776 if (mp2)777 fTopDir = temptop; // Restore778 #endif779 748 } 780 749 } … … 831 800 priority_idle(); 832 801 if (SHORT1FROMMP(mp1) == IDM_EXPAND) { 833 //DbgMsg(pszSrcFile, __LINE__,"UM_EXPAND Start");834 802 fExpandAll = TRUE; 835 803 while (fExpanding) { // Not serialized not practical to wait on very large directories … … 840 808 fExpanding = ExpandAll(dcd->hwndCnr, x, (PCNRITEM) mp2); 841 809 DosSleep(240); 842 //DbgMsg(pszSrcFile, __LINE__,"UM_EXPAND fExpanding %i count %i", fExpanding, x);843 810 } 844 811 fExpandAll = FALSE; … … 1011 978 WaitFleshWorkListEmpty(pci->pszFileName, 240); // 2015-08-19 SHL in case pci still in work list 1012 979 if ((toupper(*pci->pszFileName) - 'A') > 1) { 1013 DbgMsg(pszSrcFile, __LINE__,"UM_RESCAN2 UnFlesh %s", pci->pszFileName);1014 980 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1015 981 } … … 1038 1004 CM_SCROLLWINDOW, 1039 1005 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(-1)); 1040 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc FillTreeCnr()"); // 2015-08-04 SHL FIXME debug1041 1006 FillTreeCnr(dcd->hwndCnr, dcd->hwndParent); 1042 1007 if (fOkayMinimize) { … … 1047 1012 CM_INVALIDATERECORD, 1048 1013 MPVOID, MPFROM2SHORT(0, CMA_ERASE | CMA_REPOSITION)); 1049 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc PostMsg(UM_RESCAN)"); // 2015-08-04 SHL FIXME debug1050 1014 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); 1051 1015 } … … 1985 1949 1986 1950 if (dir) { 1987 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_SHOWME PostMsg(UM_SHOWME, %s)", dir); // 2015-08-13 SHL FIXME debug1988 1951 if (!PostMsg(dcd->hwndObject, UM_SHOWME, MPFROMP(dir), MPVOID)) 1989 1952 free(dir); … … 2275 2238 chDrvU = *pci->pszFileName; 2276 2239 chDrvU = toupper(chDrvU); 2277 //DbgMsg(pszSrcFile, __LINE__,"IDM_FILESMENU prevalid drive %s file %s",2278 // szDrv, pci->pszFileName);2279 2240 MakeValidDir(szDrv); 2280 2241 rdy = *szDrv == chDrvU; // Drive not ready if MakeValidDir changes drive letter … … 2285 2246 local = rdy && (!(driveflags[chDrvU - 'A'] & (DRIVE_REMOTE | DRIVE_VIRTUAL))); 2286 2247 underenv = (pci->flags & RECFLAGS_UNDERENV) != 0; 2287 //DbgMsg(pszSrcFile, __LINE__,"IDM_FILESMENU postvalid drive %s rdy %i removable %i writeable %i local %i underenv %i",2288 // szDrv, rdy, removable, writeable, local, underenv);2289 2248 CopyPresParams((HWND) mp2, hwndMainMenu); 2290 2249 WinEnableMenuItem((HWND) mp2, IDM_INFO, rdy); … … 2433 2392 case UM_DRIVECMD: 2434 2393 if (mp1) { 2435 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_DRIVECMD ShowTreeRec(\"%s\")", mp1);2436 2394 ShowTreeRec(hwnd, (CHAR *)mp1, FALSE, TRUE); 2437 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc PostMsg(IDM_UPDATE)");2438 2395 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 2439 2396 } … … 2902 2859 if (pci->fleshed) { 2903 2860 if (x > 1) { 2904 DbgMsg(pszSrcFile, __LINE__,"UM_UPDATE UnFlesh %s", pci->pszFileName);2905 2861 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2906 2862 } … … 3272 3228 break; // WM_DESTROY 3273 3229 } // switch 3274 //DbgMsg(pszSrcFile, __LINE__,"return oldproc msg %i mp1 %p mp2 %p", msg, mp1, mp2);3275 3230 if (dcd && dcd->oldproc){ 3276 3231 return dcd->oldproc(hwnd, msg, mp1, mp2); … … 3516 3471 } 3517 3472 else if (qmsg.msg == UM_EXPANDTREE) { 3518 // 2015-08-04 SHL3519 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc qmsg.msg == UM_EXPANDTREE %p pci %p %s",3520 // qmsg.hwnd, pci, pci->pszFileName);3521 3473 if (fExpandAll) 3522 3474 DosSleep(1); … … 3526 3478 AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh); // forceFlesh 3527 3479 if (!dcd->suspendview && fTopDir) { 3528 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_TOPDIR %p pci %p %s",3529 // qmsg.hwnd, pci, pci->pszFileName); // 2015-08-04 SHL FIXME debug3530 3480 PostMsg(dcd->hwndCnr, UM_TOPDIR, MPFROMP(pci), MPVOID); 3531 3481 } 3532 3482 } 3533 3483 if (qmsg.msg == UM_EXPANDTREE && !dcd->suspendview) { 3534 //DbgMsg(pszSrcFile, __LINE__, "UM_FILTER %p pci %p %s",3535 // dcd->hwndCnr, pci, pci->pszFileName);3536 3484 WinSendMsg(dcd->hwndCnr, UM_FILTER, MPVOID, MPVOID); 3537 3485 }
Note:
See TracChangeset
for help on using the changeset viewer.