Changeset 1444 for trunk/dll/dircnrs.c
- Timestamp:
- Jul 23, 2009, 1:24:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1439 r1444 65 65 29 Mar 09 SHL Increase extended search timeout to 3 seconds 66 66 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. 67 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 68 22 Jul 09 SHL Cleanup of SETFOCUS code 67 69 68 70 ***********************************************************************/ … … 805 807 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 806 808 if (!pciC) { 807 if (fInitialDriveScan) 808 Stubby(dcd->hwndCnr, pci); 809 else { 810 while (StubbyScanCount != 0) 811 DosSleep(50); 812 Stubby(dcd->hwndCnr, pci); 813 } 809 Stubby(dcd->hwndCnr, pci); 814 810 } 815 811 } … … 859 855 } 860 856 RemoveCnrItems(dcd->hwndCnr, NULL, 0, CMA_FREE | CMA_INVALIDATE | CMA_ERASE); 861 AdjustCnrColsForFSType(dcd->hwndCnr, dcd->directory, &dcd->ds );857 AdjustCnrColsForFSType(dcd->hwndCnr, dcd->directory, &dcd->ds, FALSE); 862 858 dcd->ullTotalBytes = dcd->totalfiles = 863 859 dcd->selectedfiles = dcd->selectedbytes = 0; … … 1348 1344 1349 1345 case WM_SETFOCUS: 1350 /* 1351 * put name of our window (directory name) on status line1352 */1353 if (dcd && hwndStatus && mp2) {1354 1346 /* put name of our window (directory name) on status line */ 1347 if (mp2) { 1348 // Getting focus 1349 if (dcd && hwndStatus) { 1350 /* put name of our window (directory name) on status line */ 1355 1351 PCNRITEM pci = NULL; 1356 1357 1352 if (fAutoView && hwndMain) { 1358 1353 pci = WinSendMsg(hwnd, CM_QUERYRECORDEMPHASIS, MPFROMLONG(CMA_FIRST), … … 1374 1369 PostMsg(hwndMain, UM_ADVISEFOCUS, MPFROMLONG(dcd->hwndFrame), MPVOID); 1375 1370 } 1376 if (mp2) { 1371 1377 1372 LastDir = hwnd; 1378 1373 PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID); 1374 1379 1375 if (fSwitchTreeOnFocus && hwndTree && dcd && *dcd->directory) { 1380 1376 PSZ pszTempDir = xstrdup(dcd->directory, pszSrcFile, __LINE__); 1381 1382 1377 if (pszTempDir) { 1383 1378 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTempDir), MPVOID)) 1384 free(pszTempDir); 1379 free(pszTempDir); // Failed 1385 1380 } 1386 1381 } … … 1451 1446 CM_QUERYRECORDEMPHASIS, 1452 1447 MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED)); 1453 1448 if (pci && (INT) pci != -1) { 1454 1449 if (fSplitStatus && hwndStatus2) { 1455 1450 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); … … 1601 1596 WinEnableMenuItem(DirCnrMenu, IDM_FINDINTREE, (hwndTree != (HWND) 0)); 1602 1597 } 1603 PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID); 1598 if (!fInitialDriveScan) 1599 PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID); 1604 1600 } 1605 1601 else { … … 1618 1614 SayView(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 1619 1615 DIR_VIEW), dcd->flWindowAttr); 1620 //DbgMsg(pszSrcFile, __LINE__, "UM_SETUP2 %p pci %p", hwnd, dcd);1621 1616 } else 1622 1617 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 2424 2419 2425 2420 case IDM_SWITCH: 2426 2421 if (mp2) { 2427 2422 strcpy(dcd->previous, dcd->directory); 2428 2423 strcpy(dcd->directory, (CHAR *)mp2); 2429 2424 //DosEnterCritSec(); // GKY 11-27-08 2430 2425 dcd->stopflag++; 2431 2426 //DosExitCritSec(); 2432 2427 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2433 2428 strcpy(dcd->directory, dcd->previous); … … 3484 3479 break; 3485 3480 3481 case WM_TIMER: 3482 return ActionWMTimer(hwnd, mp1, mp2); 3483 3486 3484 case WM_CLOSE: 3487 3485 WinSendMsg(hwnd, WM_SAVEAPPLICATION, MPVOID, MPVOID); … … 3629 3627 /* Got match make found item current item */ 3630 3628 USHORT attrib = CRA_CURSORED; 3629 // 29 Mar 09 SHL fixme to clear other object select if not extended select 3631 3630 if (!stricmp(pci->pszDisplayName, dcd->szCommonName)) 3632 3631 attrib |= CRA_SELECTED;
Note:
See TracChangeset
for help on using the changeset viewer.