Changeset 1455 for trunk/dll/dircnrs.c
- Timestamp:
- Sep 15, 2009, 4:43:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1451 r1455 67 67 22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning 68 68 22 Jul 09 SHL Cleanup of SETFOCUS code 69 14 Sep 09 SHL Drop experimental code 69 70 70 71 ***********************************************************************/ … … 144 145 #include "fortify.h" 145 146 #include "excputil.h" // 06 May 08 SHL added 146 #include "pathutil.h" 147 #include "pathutil.h" // AddBackslashToPath 147 148 148 149 // Data definitions … … 368 369 369 370 if (WinQueryWindowUShort(hwnd, QWS_ID) != DIR_FOLDERICON) { 370 371 372 373 371 memset(&nr, 0, sizeof(NOTIFYRECORDENTER)); 372 nr.hwndCnr = WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), DIR_CNR); 373 WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), 374 WM_CONTROL, MPFROM2SHORT(DIR_CNR, CN_ENTER), MPFROMP(&nr)); 374 375 } 375 376 } … … 808 809 MPFROMP(pci), 809 810 MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)); 810 811 811 if (!pciC) { 812 Stubby(dcd->hwndCnr, pci); 812 813 } 813 814 } … … 1151 1152 wk->li = (LISTINFO *) mp1; 1152 1153 strcpy(wk->directory, dcd->directory); 1154 1153 1155 if (xbeginthread(Action, 1154 1156 122880, … … 1351 1353 if (dcd && hwndStatus) { 1352 1354 /* put name of our window (directory name) on status line */ 1353 PCNRITEM pci = NULL; 1354 if (fAutoView && hwndMain) { 1355 pci = WinSendMsg(hwnd, CM_QUERYRECORDEMPHASIS, MPFROMLONG(CMA_FIRST), 1356 MPFROMSHORT(CRA_CURSORED)); 1357 if (pci && (INT) pci != -1 && 1358 (!(driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_SLOW))) 1359 WinSendMsg(hwndMain, UM_LOADFILE, MPFROMP(pci->pszFileName), MPVOID); 1360 else 1361 WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID); 1362 } 1363 if (*dcd->directory) { 1364 if (hwndMain) 1365 WinSendMsg(hwndMain, 1366 UM_SETUSERLISTNAME, MPFROMP(dcd->directory), MPVOID); 1367 else 1368 add_udir(FALSE, dcd->directory); 1369 } 1355 PCNRITEM pci = NULL; 1356 if (fAutoView && hwndMain) { 1357 pci = WinSendMsg(hwnd, CM_QUERYRECORDEMPHASIS, MPFROMLONG(CMA_FIRST), 1358 MPFROMSHORT(CRA_CURSORED)); 1359 if (pci && (INT) pci != -1 && 1360 (!(driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_SLOW))) 1361 WinSendMsg(hwndMain, UM_LOADFILE, MPFROMP(pci->pszFileName), MPVOID); 1362 else 1363 WinSendMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID); 1364 } 1365 if (*dcd->directory) { 1366 if (hwndMain) 1367 WinSendMsg(hwndMain, 1368 UM_SETUSERLISTNAME, MPFROMP(dcd->directory), MPVOID); 1369 else 1370 add_udir(FALSE, dcd->directory); 1371 } 1372 1370 1373 if (hwndMain) 1371 1374 PostMsg(hwndMain, UM_ADVISEFOCUS, MPFROMLONG(dcd->hwndFrame), MPVOID); … … 1448 1451 CM_QUERYRECORDEMPHASIS, 1449 1452 MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED)); 1450 1453 if (pci && (INT) pci != -1) { 1451 1454 if (fSplitStatus && hwndStatus2) { 1452 1455 CommaFmtULL(tb, sizeof(tb), pci->cbFile + pci->easize, ' '); … … 1599 1602 } 1600 1603 if (!fInitialDriveScan) 1601 1604 PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID); 1602 1605 } 1603 1606 else { … … 1615 1618 DIR_SORT), dcd->sortFlags, FALSE); 1616 1619 SayView(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 1617 1620 DIR_VIEW), dcd->flWindowAttr); 1618 1621 } else 1619 1622 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); … … 1821 1824 PCNRITEM pci; 1822 1825 1823 1824 1826 strcpy(newfile, dcd->directory); 1827 AddBackslashToPath(newfile); 1825 1828 //if (newfile[strlen(newfile) - 1] != '\\') 1826 1829 // strcat(newfile, "\\"); … … 2421 2424 2422 2425 case IDM_SWITCH: 2423 2426 if (mp2) { 2424 2427 strcpy(dcd->previous, dcd->directory); 2425 2428 strcpy(dcd->directory, (CHAR *)mp2); 2426 2429 //DosEnterCritSec(); // GKY 11-27-08 2427 2430 dcd->stopflag++; 2428 2431 //DosExitCritSec(); 2429 2432 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2430 2433 strcpy(dcd->directory, dcd->previous); … … 2447 2450 CHAR tempname1[CCHMAXPATH], tempname2[CCHMAXPATH]; 2448 2451 2449 2450 2452 strcpy(tempname1, dcd->directory); 2453 AddBackslashToPath(tempname1); 2451 2454 //if (tempname1[strlen(tempname1) - 1] != '\\') 2452 2455 // strcat(tempname1, "\\"); … … 2801 2804 if (Flesh(hwnd, pci) && 2802 2805 SHORT2FROMMP(mp1) == CN_EXPANDTREE && 2803 2804 2805 2806 2806 !dcd->suspendview && fTopDir) { 2807 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 2808 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); 2809 } 2807 2810 } 2808 2811 driveserial[toupper(*pci->pszFileName) - 'A'] = volser.serial; … … 2810 2813 } 2811 2814 else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) { 2812 2815 if (Flesh(hwnd, pci) && !dcd->suspendview && fTopDir) { 2813 2816 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 2814 2815 2816 } 2817 2817 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); 2818 } 2819 } 2820 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && !dcd->suspendview) { 2818 2821 WinSendMsg(hwnd, UM_FILTER, MPVOID, MPVOID); 2819 2820 2822 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); 2823 } 2821 2824 } 2822 2825 } … … 3481 3484 break; 3482 3485 3483 case WM_TIMER:3484 return ActionWMTimer(hwnd, mp1, mp2);3485 3486 3486 case WM_CLOSE: 3487 3487 WinSendMsg(hwnd, WM_SAVEAPPLICATION, MPVOID, MPVOID);
Note:
See TracChangeset
for help on using the changeset viewer.