Changeset 1858 for trunk/dll/treecnr.c
- Timestamp:
- Aug 20, 2015, 7:31:14 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1857 r1858 326 326 327 327 // Try again expanding as needed 328 329 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec need expand"); // 2015-08-04 SHL FIXME debug 328 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec need expand, IsFleshWorkListEmpty %u", IsFleshWorkListEmpty()); // 2015-08-04 SHL FIXME debug 330 329 331 330 cDirLen = strlen(pszDir_); … … 347 346 if (!pciP || (INT)pciP == -1) { 348 347 DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(%s) returned %p", szDir, pciP); // 2015-08-04 SHL FIXME debug 349 WaitFleshWorkListEmpty( ); // 2015-08-13SHL348 WaitFleshWorkListEmpty(szDir); // 2015-08-19 SHL 350 349 DosSleep(1000); 351 350 break; // No match … … 364 363 WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciP), MPVOID); 365 364 DosSleep(100); // 2015-08-13 SHL Let PM catch up 366 // WaitFleshWorkListEmpty(); // 2015-08-13 SHL 367 } 368 369 WaitFleshWorkListEmpty(); // 2015-08-13 SHL 365 } 366 367 WaitFleshWorkListEmpty(szDir); // 2015-08-19 SHL 370 368 371 369 // Add next component to path … … 433 431 434 432 if (!quickbail) { 435 WaitFleshWorkListEmpty( ); // 2015-08-07 SHL FIXMEtry to ensure contents stable433 WaitFleshWorkListEmpty(pszDir_); // 2015-08-19 SHL try to ensure contents stable 436 434 DbgMsg(pszSrcFile, __LINE__, "WinSendMsg(CM_SETRECORDEMPHASIS, CRA_SELECTED | CRA_CURSORED) \"%s\"", pszDir_); // 2015-08-04 SHL FIXME debug 437 435 WinSendMsg(hwndCnr, … … 707 705 DIRCNRDATA *dcd; 708 706 709 #if 0 // 2015-08-04 SHL FIXME to be gone710 APIRET rc;711 #endif // 2015-08-04 SHL FIXME to be gone712 713 707 switch (msg) { 714 708 case UM_SHOWME: … … 720 714 if (dcd) { 721 715 722 #if 0 // 2015-08-04 SHL FIXME to be gone723 rc = DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT);724 if (rc)725 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");726 #endif // 2015-08-04 SHL FIXME to be gone727 728 716 /* Hold off if switching on focus change and 729 717 RestoreDirCnrState has restored one or directory directory containers 730 718 See RestoreDirCnrState() 731 719 */ 732 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME cDirectoriesRestored %u", cDirectoriesRestored , fInitialDriveScan); // 2015-08-04 SHL FIXME debug720 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME cDirectoriesRestored %u", cDirectoriesRestored); // 2015-08-04 SHL FIXME debug 733 721 DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME %s)", mp1); // 2015-08-04 SHL FIXME debug 734 722 … … 940 928 pci = FindParentRecord(dcd->hwndCnr, pci); 941 929 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 942 WaitFleshWorkListEmpty( ); // 2015-08-13SHL in case pci still in work list930 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 943 931 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 944 932 } … … 952 940 953 941 case UM_RESCAN: 954 // populate container 955 #if 0 // 2015-08-04 SHL FIXME to be gone 956 rc = DosWaitEventSem(hevTreeCnrScanComplete, SEM_INDEFINITE_WAIT); 957 if (rc) 958 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosWaitEventSem"); 959 rc = DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt); 960 if (rc) 961 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosResetEventSem"); 962 #endif // 2015-08-04 SHL FIXME to be gone 963 942 // Populate container 964 943 dcd = WinQueryWindowPtr(hwnd, QWL_USER); 965 944 if (!dcd) … … 1931 1910 volser.serial) 1932 1911 { 1933 WaitFleshWorkListEmpty( ); // 2015-08-13SHL in case pci still in work list1912 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 1934 1913 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1935 1914 } … … 1948 1927 else { 1949 1928 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 1950 WaitFleshWorkListEmpty( ); // 2015-08-13SHL in case pci still in work list1929 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 1951 1930 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1952 1931 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); … … 2026 2005 INT x; 2027 2006 2028 #if 0 // 2015-08-04 SHL FIXME to be gone2029 rc = DosRequestMutexSem(hmtxScanning, SEM_INDEFINITE_WAIT);2030 if (rc)2031 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosRequestMutexSem");2032 #endif // 2015-08-04 SHL FIXME to be gone2033 2034 #if 0 // 2015-08-04 SHL FIXME to be gone2035 rc = DosQueryEventSem(hevTreeCnrScanComplete, &ulScanPostCnt);2036 if (rc)2037 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosQueryEventSem");2038 if (ulScanPostCnt < 1)2039 return 0;2040 rc = DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt);2041 if (rc)2042 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosResetEventSem");2043 #endif // 2015-08-04 SHL FIXME to be gone2044 2045 2007 if (fFollowTree) 2046 2008 fl = 0; … … 2057 2019 if (hwndStatus) 2058 2020 WinSetWindowText(hwndStatus, (CHAR *) GetPString(IDS_RESCANSUGTEXT)); 2059 2060 #if 0 // 2015-08-04 SHL FIXME to be gone2061 rc = DosPostEventSem(hevTreeCnrScanComplete);2062 if (rc && rc != ERROR_ALREADY_POSTED)2063 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2064 #endif // 2015-08-04 SHL FIXME to be gone2065 2066 2021 return 0; 2067 2022 } … … 2083 2038 } // for 2084 2039 RemoveCnrItems(hwnd, pciP, 1, CMA_FREE | CMA_INVALIDATE); 2085 2086 #if 0 // 2015-08-04 SHL FIXME to be gone2087 rc = DosPostEventSem(hevTreeCnrScanComplete);2088 if (rc && rc != ERROR_ALREADY_POSTED)2089 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2090 #endif // 2015-08-04 SHL FIXME to be gone2091 2040 return 0; 2092 2041 } … … 2131 2080 if (!rc) { 2132 2081 if (!volser.serial || driveserial[x] != volser.serial) { 2133 #if 1 // 2015-08-04 SHL FIXME to be gone2134 2082 AddFleshWorkRequest(hwnd, pciP, eFlesh); // forceFlesh 2135 #else2136 Flesh(hwnd, pciP);2137 #endif // 2015-08-04 SHL FIXME to be gone2138 2083 driveserial[x] = volser.serial; 2139 2084 } … … 2143 2088 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 2144 2089 if (!pciL) { 2145 #if 1 // 2015-08-04 SHL FIXME to be gone2146 2090 AddFleshWorkRequest(hwnd, pciP, eFlesh); // forceFlesh 2147 #else2148 Flesh(hwnd, pciP);2149 #endif // 2015-08-04 SHL FIXME to be gone2150 2091 } 2151 2092 if ((fShowFSTypeInTree || fShowDriveLabelInTree) && … … 2165 2106 else { 2166 2107 driveserial[x] = -1; 2167 WaitFleshWorkListEmpty( ); // 2015-08-13 SHL in case pci still in work list2108 WaitFleshWorkListEmpty(NULL); // 2015-08-13 SHL in case pci still in work list 2168 2109 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2169 2110 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 2170 2111 PostMsg(hwnd, UM_SETUP2, MPFROMP(pci), MPFROMLONG(rc)); 2171 2172 #if 0 // 2015-08-04 SHL FIXME to be gone2173 rc = DosPostEventSem(hevTreeCnrScanComplete);2174 if (rc && rc != ERROR_ALREADY_POSTED)2175 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2176 #endif // 2015-08-04 SHL FIXME to be gone2177 2112 return 0; 2178 2113 } … … 2197 2132 PostMsg(hwnd, 2198 2133 WM_COMMAND, MPFROM2SHORT(IDM_SHOWALLFILES, 0), MPVOID); 2199 2200 #if 0 // 2015-08-04 SHL FIXME to be gone2201 rc = DosPostEventSem(hevTreeCnrScanComplete);2202 if (rc && rc != ERROR_ALREADY_POSTED)2203 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2204 #endif // 2015-08-04 SHL FIXME to be gone2205 2134 return 0; 2206 2135 } 2207 2136 if ((shiftstate & (KC_CTRL | KC_SHIFT)) == (KC_CTRL | KC_SHIFT)) { 2208 2137 OpenObject(pci->pszFileName, Settings, dcd->hwndFrame); 2209 2210 #if 0 // 2015-08-04 SHL FIXME to be gone2211 rc = DosPostEventSem(hevTreeCnrScanComplete);2212 if (rc && rc != ERROR_ALREADY_POSTED)2213 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2214 #endif // 2015-08-04 SHL FIXME to be gone2215 2138 return 0; 2216 2139 } … … 2218 2141 if (!ParentIsDesktop(hwnd, dcd->hwndParent)) { 2219 2142 if (FindDirCnrByName(pci->pszFileName, TRUE)) { 2220 2221 #if 0 // 2015-08-04 SHL FIXME to be gone2222 rc = DosPostEventSem(hevTreeCnrScanComplete);2223 if (rc && rc != ERROR_ALREADY_POSTED)2224 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2225 #endif // 2015-08-04 SHL FIXME to be gone2226 2143 return 0; 2227 2144 } … … 2247 2164 } 2248 2165 OpenObject(pci->pszFileName, s, dcd->hwndFrame); 2249 2250 #if 0 // 2015-08-04 SHL FIXME to be gone2251 rc = DosPostEventSem(hevTreeCnrScanComplete);2252 if (rc && rc != ERROR_ALREADY_POSTED)2253 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2254 #endif // 2015-08-04 SHL FIXME to be gone2255 2166 return 0; 2256 2167 } … … 2296 2207 if (fFollowTree) 2297 2208 WinSetFocus(HWND_DESKTOP, hwnd); 2298 2299 #if 0 // 2015-08-04 SHL FIXME to be gone2300 rc = DosPostEventSem(hevTreeCnrScanComplete);2301 if (rc && rc != ERROR_ALREADY_POSTED)2302 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");2303 #endif // 2015-08-04 SHL FIXME to be gone2304 2209 } 2305 2210 return 0; … … 2992 2897 break; 2993 2898 2994 #if 0 // 2015-08-04 SHL FIXME to be gone2995 rc = DosRequestMutexSem(hmtxScanning, SEM_INDEFINITE_WAIT);2996 if (rc)2997 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosRequestMutexSem");2998 #endif // 2015-08-04 SHL FIXME to be gone2999 3000 #if 0 // 2015-08-04 SHL FIXME to be gone3001 rc = DosResetEventSem(hevTreeCnrScanComplete, &ulScanPostCnt);3002 if (rc)3003 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosResetEventSem");3004 #endif // 2015-08-04 SHL FIXME to be gone3005 3006 // Can't wait here3007 // WaitFleshWorkListEmpty(); // 2015-08-13 SHL in case pci still in work list3008 2899 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2900 3009 2901 // Check if drive type might need update 3010 2902 if ((driveflag & (DRIVE_INVALID | DRIVE_NOPRESCAN)) || … … 3035 2927 if (~driveflag & DRIVE_INVALID) 3036 2928 AddFleshWorkRequest(hwnd, pci, eFlesh); 3037 #if 0 // 2015-08-04 SHL FIXME to be gone3038 rc = DosPostEventSem(hevTreeCnrScanComplete);3039 if (rc && rc != ERROR_ALREADY_POSTED)3040 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem");3041 #endif // 2015-08-04 SHL FIXME to be gone3042 2929 } 3043 2930 }
Note:
See TracChangeset
for help on using the changeset viewer.