Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/common.c
r1855 r1876 37 37 for tree container and collector. 38 38 07 Aug 15 SHL Clean up and comment 39 10 Oct 15 GKY Update icon and display name on CD/DVD eject in all cases. 39 40 40 41 ***********************************************************************/ … … 386 387 DosError(FERR_DISABLEHARDERR); 387 388 rc = DosDevIOCtl(-1L, 8L, 0x40L, &parm, sizeof(parm), &plen, NULL, 0L, &dlen); 388 if (cmd == IDM_EJECT && 389 (fEjectFlpyScan ? TRUE : parm[1] > 1) && 390 (fEjectCDScan ? TRUE : !(driveflags[parm[1]] & DRIVE_CDROM)) && 391 (fEjectRemovableScan ? TRUE : (parm[1] < 2 || driveflags[parm[1]] & DRIVE_CDROM))) { 392 BOOL toggleTree = FALSE; 393 394 if (!hwndTree) { 395 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 396 toggleTree = TRUE; 397 } 398 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 399 if (toggleTree) 400 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 389 if (cmd == IDM_EJECT) { 390 if ((fEjectFlpyScan ? TRUE : parm[1] > 1) && 391 (fEjectCDScan ? TRUE : !(driveflags[parm[1]] & DRIVE_CDROM)) && 392 (fEjectRemovableScan ? TRUE : (parm[1] < 2 || 393 driveflags[parm[1]] & DRIVE_CDROM))) { 394 BOOL toggleTree = FALSE; 395 396 if (!hwndTree) { 397 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 398 toggleTree = TRUE; 399 } 400 WinSendMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 401 if (toggleTree) 402 WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_VTREE, 0), MPVOID); 403 } 404 else if (driveflags[parm[1]] & DRIVE_CDROM) { 405 driveflags[parm[1]] |= DRIVE_INVALID; 406 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 407 } 401 408 } 402 409 } -
trunk/dll/flesh.c
r1874 r1876 45 45 fails more than 5 consecutive times. 46 46 27 Sep 15 GKY DosSleep times in WaitFleshWorkListEmpty set by caller 47 10 Oct 15 GKY Don't use Flesh thread for floppy drive scans fix them getting mistakenly identified 48 as directories and add nonexistent subdirectories. 47 49 48 50 ***********************************************************************/ … … 100 102 BOOL fFilesInTree; 101 103 102 BOOL Flesh(HWND hwndCnr, PCNRITEM pciParent);104 //BOOL Flesh(HWND hwndCnr, PCNRITEM pciParent); 103 105 104 106 BOOL Stubby(HWND hwndCnr, PCNRITEM pciParent); 105 107 BOOL FleshEnv(HWND hwndCnr, PCNRITEM pciParent); 106 VOID UnFlesh(HWND hwndCnr, PCNRITEM pciParent);108 //VOID UnFlesh(HWND hwndCnr, PCNRITEM pciParent); 107 109 108 110 /** … … 657 659 } 658 660 else 659 ok = TRUE;661 ok = TRUE; 660 662 } 661 663 } -
trunk/dll/flesh.h
r1874 r1876 13 13 22 Aug 15 GKY Remove recurse scan code. 14 14 27 Sep 15 GKY DosSleep times in WaitFleshWorkListEmpty set by caller 15 10 Oct 15 GKY Don't use Flesh thread for floppy drive scans fix them getting mistakenly identified 16 as directories and add nonexistent subdirectories. 15 17 16 18 ***********************************************************************/ … … 26 28 27 29 VOID SetFleshFocusPath(PCSZ pszPath); 28 30 BOOL Flesh(HWND hwndCnr, PCNRITEM pciParent); 31 VOID UnFlesh(HWND hwndCnr, PCNRITEM pciParent); 29 32 #if 0 // 2015-08-03 SHL FIXME debug 30 33 VOID WaitFleshWorkListEmpty(PCSZ pszDirName, ULONG ulSleep); -
trunk/dll/treecnr.c
r1875 r1876 120 120 to avoid them seen as directories and having random subdirectories attached to 121 121 them. 122 10 Oct 15 GKY Eliminate some unnecessary Flesh and UnFlesh calls 123 10 Oct 15 GKY Update icon and display name on CD/DVD eject in all cases. 124 10 Oct 15 GKY Don't use Flesh thread for floppy drive scans fix them getting mistakenly identified 125 as directories and add nonexistent subdirectories. 122 126 123 127 ***********************************************************************/ … … 868 872 { 869 873 PCNRITEM pci = (PCNRITEM) mp1; 870 PCNRITEM pciL;871 874 872 875 if (pci) { 873 pciL = (PCNRITEM)WinSendMsg(dcd->hwndCnr,874 CM_QUERYRECORD,875 MPFROMP(pci),876 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));877 if (pciL && (INT) pciL != -1) {878 WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list879 AddFleshWorkRequest(hwnd, pci, eUnFlesh);876 if ((INT) mp2 == 21 && pci->rc.hptrIcon == hptrCDROM) { 877 if (fEjectCDScan) 878 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 879 else { 880 driveflags[toupper(*pci->pszFileName) - 'A'] |= DRIVE_INVALID; 881 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 882 } 880 883 } 881 if ((INT) mp2 == 21 && pci->rc.hptrIcon == hptrCDROM)882 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);883 884 NotifyError(pci->pszFileName, (ULONG) mp2); 884 885 } … … 935 936 if (cnri.cRecords) { 936 937 sprintf(s, GetPString(IDS_NUMDRIVESTEXT), cnri.cRecords); 937 if (pci && (INT) pci != -1 && pci->pszFileName != NullStr) { //fixme? will try checking pci->pszFileName instead of the pointer938 if (pci && (INT) pci != -1) { 938 939 if (!(driveflags[toupper(*pci->pszFileName) - 'A'] & 939 940 DRIVE_REMOVABLE) || … … 1004 1005 } 1005 1006 else { 1006 PCNRITEM pciL;1007 1007 // find root record and strip it if needed 1008 1008 pci = FindParentRecord(dcd->hwndCnr, pci); 1009 1009 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 1010 pciL = (PCNRITEM)WinSendMsg(dcd->hwndCnr, 1011 CM_QUERYRECORD, 1012 MPFROMP(pci), 1013 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 1014 if (pciL && (INT) pciL != -1) { 1010 if (pci->fleshed) { 1015 1011 WaitFleshWorkListEmpty(pci->pszFileName, 240); // 2015-08-19 SHL in case pci still in work list 1016 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 1012 if ((toupper(*pci->pszFileName) - 'A') > 1) { 1013 DbgMsg(pszSrcFile, __LINE__,"UM_RESCAN2 UnFlesh %s", pci->pszFileName); 1014 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1015 } 1016 else 1017 UnFlesh(hwnd, pci); 1017 1018 } 1018 1019 } … … 1403 1404 } 1404 1405 } 1405 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_RESCAN PostMsg(UM_RESCAN2, %p %s)",1406 // pci, pci && pci->pszFileName ? pci->pszFileName : "(null)"); // 2015-08-04 SHL FIXME debug1407 1406 PostMsg(dcd->hwndObject, UM_RESCAN2, MPFROMP(pci), MPVOID); 1408 1407 if (hwndStatus2) … … 1410 1409 } 1411 1410 return 0; 1412 #if 0 1413 case UM_SETUP2: 1414 { 1415 PCNRITEM pci = (PCNRITEM) mp1; 1416 1417 if (pci) { 1418 WaitFleshWorkListEmpty(NULL, 10); // 2015-08-13 SHL in case pci still in work list 1419 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 1420 if ((INT) mp2 == 21) 1421 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1422 NotifyError(pci->pszFileName, (ULONG) mp2); 1423 } 1424 } 1425 return 0; 1426 #endif 1411 1427 1412 case UM_SETUP: 1428 1413 # ifdef FORTIFY … … 2020 2005 HDIR hDir = HDIR_CREATE; 2021 2006 ULONG nm = 1; 2022 // APIRET status;2023 2007 BOOL IsOk = FALSE; 2024 2008 ULONG ulDriveNum, ulDriveMap; … … 2105 2089 driveserial[x] = volser.serial; 2106 2090 } 2107 pciL = WinSendMsg(hwnd, 2108 CM_QUERYRECORD, 2109 MPFROMP(pciP), 2110 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 2111 if (!pciL) { 2091 if (!pciP->fleshed) { 2112 2092 AddFleshWorkRequest(hwnd, pciP, eFlesh); // forceFlesh 2113 2093 } … … 2453 2433 case UM_DRIVECMD: 2454 2434 if (mp1) { 2455 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_DRIVECMD ShowTreeRec(\"%s\")", mp1);2435 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc UM_DRIVECMD ShowTreeRec(\"%s\")", mp1); 2456 2436 ShowTreeRec(hwnd, (CHAR *)mp1, FALSE, TRUE); 2457 //DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc PostMsg(IDM_UPDATE)");2437 DbgMsg(pszSrcFile, __LINE__, "TreeCnrWndProc PostMsg(IDM_UPDATE)"); 2458 2438 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 2459 2439 } … … 2920 2900 if (pci->flags & RECFLAGS_UNDERENV) 2921 2901 break; 2922 2923 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2902 if (pci->fleshed) { 2903 if (x > 1) { 2904 DbgMsg(pszSrcFile, __LINE__,"UM_UPDATE UnFlesh %s", pci->pszFileName); 2905 AddFleshWorkRequest(hwnd, pci, eUnFlesh); 2906 } 2907 else 2908 UnFlesh(hwnd, pci); 2909 } 2924 2910 2925 2911 // Check if drive type might need update 2926 2912 if ((driveflag & (DRIVE_INVALID | DRIVE_NOPRESCAN)) || 2927 (~driveflag & DRIVE_NOPRESCAN && pci->rc.hptrIcon == hptrDunno) || x < 2) {2913 (~driveflag & DRIVE_NOPRESCAN && pci->rc.hptrIcon == hptrDunno)) { 2928 2914 DriveFlagsOne(x, FileSystem, &volser); 2929 2915 driveflag = driveflags[x]; 2930 if (driveflag & DRIVE_INVALID) 2931 pci->rc.hptrIcon = hptrDunno; 2916 if (driveflag & DRIVE_INVALID) 2917 if (driveflag & DRIVE_REMOVABLE) { 2918 pci->rc.hptrIcon = hptrRemovable; 2919 if (fShowFSTypeInTree || fShowDriveLabelInTree) { 2920 strcpy(szBuf, pci->pszFileName); 2921 strcat(szBuf, " ["); 2922 strcat(szBuf, "]"); 2923 pci->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__); 2924 pci->rc.pszIcon = pci->pszDisplayName; 2925 } 2926 } 2927 else 2928 pci->rc.hptrIcon = hptrDunno; 2932 2929 else if (strlen(pci->pszFileName) < 4) { 2933 2930 SelectDriveIcon(pci); … … 2947 2944 if (hwndMain) 2948 2945 PostMsg(hwndMain, UM_BUILDDRIVEBAR, MPVOID, MPVOID); 2949 } 2950 DbgMsg(pszSrcFile, __LINE__, " TreeCnrWndProc IDM_UPDATE %s", pci->pszFileName); // 2015-08-03 SHL FIXME debug 2951 if (~driveflag & DRIVE_INVALID || x < 2) 2952 AddFleshWorkRequest(hwnd, pci, eFlesh); 2946 } 2947 if (~driveflag & DRIVE_INVALID) { 2948 if (x > 1) { 2949 // Note the UnFlesh above may not have completed when this is called 2950 // We need to keep it behind the UnFlesh in line 2951 AddFleshWorkRequest(hwnd, pci, eFlesh); 2952 } 2953 else 2954 Flesh(hwnd, pci); 2955 } 2953 2956 } 2954 2957 } … … 3484 3487 volser.serial) 3485 3488 { 3486 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3487 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3489 if (pci->fleshed) { 3490 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3491 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3492 } 3488 3493 } 3489 3494 if (qmsg.msg != UM_COLLAPSETREE || … … 3501 3506 else { 3502 3507 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 3503 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3504 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3508 if (pci->fleshed) { 3509 WaitFleshWorkListEmpty(pci->pszFileName, 10); // 2015-08-19 SHL in case pci still in work list 3510 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); 3511 } 3505 3512 PostMsg(dcd->hwndCnr, UM_RESCAN, MPVOID, MPVOID); 3506 3513 if (!fAlertBeepOff) -
trunk/dll/update.c
r1856 r1876 22 22 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 23 23 07 Aug 15 SHL Sync with Flesh/Stubby mods 24 24 10 Oct 15 GKY Eliminate some unnecessary Flesh and UnFlesh calls 25 25 26 26 ***********************************************************************/ … … 245 245 if (WinSendMsg(hwndCnr, 246 246 CM_INSERTRECORD, MPFROMP(pci), MPFROMP(&ri))) { 247 AddFleshWorkRequest(hwndCnr, pci, eFlesh); 247 if (!pci->fleshed) 248 AddFleshWorkRequest(hwndCnr, pci, eFlesh); 248 249 *p = temp; 249 250 pci = FindCnrRecord(hwndCnr, … … 256 257 else { 257 258 pciParent = pciT; 258 if (!(pciT->rc.flRecordAttr & CRA_EXPANDED)) { 259 AddFleshWorkRequest(hwndCnr, pciT, eFlesh); 259 if (!(pciT->rc.flRecordAttr & CRA_EXPANDED)) { 260 if (!pciT->fleshed) 261 AddFleshWorkRequest(hwndCnr, pciT, eFlesh); 260 262 *p = temp; 261 263 pci = FindCnrRecord(hwndCnr,
Note:
See TracChangeset
for help on using the changeset viewer.
