Changeset 1424
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/collect.c
r1409 r1424 835 835 dcd->ullTotalBytes += FillInRecordFromFSA(dcd->hwndCnr, pci, 836 836 fullname, 837 &fs4, FALSE, dcd);837 &fs4, FALSE, NULL, dcd); 838 838 memset(&ri, 0, sizeof(RECORDINSERT)); 839 839 ri.cb = sizeof(RECORDINSERT); -
trunk/dll/filldir.c
r1402 r1424 108 108 #include "common.h" // IncrThreadUsage 109 109 #include "excputil.h" // xbeginthread 110 #include "fm3dlg.h" // INFO_LABEL 110 111 111 112 VOID StubbyScanThread(VOID * arg); … … 719 720 const PSZ pszFileName, 720 721 const PFILESTATUS4L pfsa4, 721 const BOOL partial, 722 const BOOL partial, 723 CHAR *szFSType, 722 724 DIRCNRDATA *dcd) // Optional 723 725 { … … 725 727 CHAR *p; 726 728 ULONG flags; 729 CHAR szBuf[80]; 727 730 728 731 // fill in a container record from a FILESTATUS4L structure … … 730 733 pci->hwndCnr = hwndCnr; 731 734 pci->pszFileName = xstrdup(pszFileName, pszSrcFile, __LINE__); 732 //strcpy(pci->pszFileName, pszFileName);733 735 flags = driveflags[toupper(*pci->pszFileName) - 'A']; 734 // load the object's Subject, if required 735 //pci->pszSubject = NullStr; 736 if (pfsa4->cbList > 4 && 736 if ((pfsa4->cbList > 4) && 737 737 dcd && 738 738 fLoadSubject && … … 876 876 else 877 877 p = pci->pszFileName; 878 pci->pszDisplayName = p; 878 if (szFSType && (fShowSysType || fShowLabel)) { 879 strcpy(szBuf, p); 880 strcat(szBuf, " ["); 881 strcat(szBuf, szFSType); 882 strcat(szBuf, "]"); 883 pci->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__); 884 } 885 else 886 pci->pszDisplayName = p; 879 887 880 888 //comma format the file size for large file support … … 1244 1252 while (pci && (INT)pci != -1) { 1245 1253 if ((pci->attrFile & FILE_DIRECTORY)) 1246 //if (fInitialDriveScan)1254 if (!fInitialDriveScan) 1247 1255 Stubby(hwndCnr, pci); 1248 /*else {1256 else { 1249 1257 while (StubbyScanCount != 0) 1250 1258 DosSleep(50); 1251 1259 Stubby(hwndCnr, pci); 1252 } */1260 } 1253 1261 //Stubby(hwndCnr, pci); 1254 1262 pci = WinSendMsg(hwndCnr, CM_QUERYRECORD, MPFROMP(pci), … … 1302 1310 CHAR suggest[32]; 1303 1311 CHAR szDrive[] = " :\\"; 1304 CHAR szFSType[CCHMAXPATH]; 1312 CHAR szFSType[CCHMAXPATH]; 1305 1313 FILESTATUS4L fsa4; 1306 1314 APIRET rc; … … 1366 1374 ULONG flags = 0; 1367 1375 ULONG size = sizeof(ULONG); 1376 BOOL FSInfo = FALSE; 1377 struct { 1378 ULONG serial; 1379 CHAR volumelength; 1380 CHAR volumelabel[CCHMAXPATH]; 1381 } volser; 1368 1382 1369 1383 *szDrive = (CHAR)x + 'A'; // Build path spec … … 1381 1395 removable = CheckDrive(*szDrive, szFSType, &ulDriveType); 1382 1396 driveserial[x] = -1; 1383 if (removable != -1) { 1384 struct { 1385 ULONG serial; 1386 CHAR volumelength; 1387 CHAR volumelabel[CCHMAXPATH]; 1388 } volser; 1389 1390 DosError(FERR_DISABLEHARDERR); 1391 if (!DosQueryFSInfo((ULONG) x, 1392 FSIL_VOLSER, &volser, sizeof(volser))) { 1393 driveserial[x] = volser.serial; 1394 } 1397 if (removable != -1) { 1398 DosError(FERR_DISABLEHARDERR); 1399 if (!DosQueryFSInfo((ULONG) x + 1, 1400 FSIL_VOLSER, &volser, sizeof(volser))) { 1401 driveserial[x] = volser.serial; 1402 FSInfo = TRUE; 1403 } 1404 1395 1405 } 1396 1406 else … … 1398 1408 1399 1409 memset(&fsa4, 0, sizeof(FILESTATUS4L)); 1400 driveflags[x] |= removable == -1 || removable == 1 ? 1401 DRIVE_REMOVABLE : 0; 1410 driveflags[x] |= removable == -1 || removable == 1 ? DRIVE_REMOVABLE : 0; 1402 1411 if (ulDriveType & DRIVE_REMOTE) 1403 1412 driveflags[x] |= DRIVE_REMOTE; … … 1447 1456 } 1448 1457 } 1458 if (strcmp(volser.volumelabel, "") != 0 && FSInfo && fShowLabel) 1459 strcpy(szFSType, volser.volumelabel); 1449 1460 pci->rc.flRecordAttr |= CRA_RECORDREADONLY; 1450 1461 if ((ULONG)(toupper(*szDrive) - '@') == ulCurDriveNum) … … 1471 1482 *suggest = '/'; 1472 1483 suggest[1] = 0; 1473 } 1474 sprintf(suggest + strlen(suggest), "%c" , toupper(*szDrive)); 1475 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1476 pci->pszDisplayName = pci->pszFileName; 1484 } 1485 1486 sprintf(suggest + strlen(suggest), "%c" , toupper(*szDrive)); 1487 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1488 if (fShowSysType || fShowLabel) { 1489 strcat(szDrive, " ["); 1490 strcat(szDrive, szFSType); 1491 strcat(szDrive, "]"); 1492 } 1493 pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__); 1494 szDrive[3] = 0; 1477 1495 pci->rc.pszIcon = pci->pszDisplayName; 1478 1496 pci->attrFile = FILE_DIRECTORY; … … 1480 1498 driveserial[x] = -1; 1481 1499 } 1482 1483 FillInRecordFromFSA(hwndCnr, pci, szDrive, &fsa4, TRUE, NULL);1500 else 1501 FillInRecordFromFSA(hwndCnr, pci, szDrive, &fsa4, TRUE, szFSType, NULL); 1484 1502 } 1485 1503 else { 1486 // Removable volume 1487 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1488 pci->pszDisplayName = pci->pszFileName; 1504 // Removable volume 1505 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1506 if (fShowSysType || fShowLabel) { 1507 strcat(szDrive, " ["); 1508 strcat(szDrive, szFSType); 1509 strcat(szDrive, "]"); 1510 } 1511 pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__); 1512 szDrive[3] = 0; 1489 1513 pci->rc.pszIcon = pci->pszDisplayName; 1490 1514 pci->attrFile = FILE_DIRECTORY; … … 1498 1522 } 1499 1523 else { 1500 pci->rc.hptrIcon = hptrDunno; 1501 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1524 pci->rc.hptrIcon = hptrDunno; 1525 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1526 if (fShowSysType || fShowLabel) { 1527 strcat(szDrive, " ["); 1528 strcat(szDrive, szFSType); 1529 strcat(szDrive, "]"); 1530 } 1531 pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__); 1532 szDrive[3] = 0; 1502 1533 # ifdef FORTIFY 1503 1534 // Will be freed by TreeCnrWndProc WM_DESTROY 1504 1535 Fortify_SetScope(pci->pszFileName, 2); 1505 1536 # endif 1506 pci->pszDisplayName = pci->pszFileName; 1507 pci->rc.pszIcon = pci->pszFileName; 1537 pci->rc.pszIcon = pci->pszDisplayName; 1508 1538 pci->attrFile = FILE_DIRECTORY; 1509 1539 pci->pszDispAttr = FileAttrToString(pci->attrFile); … … 1513 1543 else { 1514 1544 // diskette drive (A or B) 1515 pci->rc.hptrIcon = hptrFloppy; 1516 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1517 pci->pszDisplayName = pci->pszFileName; 1545 pci->rc.hptrIcon = hptrFloppy; 1546 pci->pszFileName = xstrdup(szDrive, pszSrcFile, __LINE__); 1547 if (fShowSysType || fShowLabel) 1548 strcat(szDrive, " [Floppy]"); 1549 pci->pszDisplayName = xstrdup(szDrive, pszSrcFile, __LINE__); 1550 szDrive[3] = 0; 1518 1551 pci->rc.pszIcon = pci->pszDisplayName; 1519 1552 pci->attrFile = FILE_DIRECTORY; -
trunk/dll/filldir.h
r1402 r1424 46 46 ULONGLONG FillInRecordFromFSA(HWND hwndCnr, PCNRITEM pci, 47 47 const PSZ pszFileName, const PFILESTATUS4L pfsa4, 48 const BOOL partial, DIRCNRDATA *pdcd);48 const BOOL partial, CHAR *szFSType, DIRCNRDATA *pdcd); 49 49 VOID FreeCnrItem(HWND hwnd, PCNRITEM pci); 50 50 VOID FreeCnrItemList(HWND hwnd, PCNRITEM pciFirst); -
trunk/dll/fm3dlg.h
r1395 r1424 605 605 606 606 #define CFGT_FRAME 25050 607 #define CFGT_SWITCHTREEONFOCUS 25051607 #define CFGT_SWITCHTREEONFOCUS 25051 608 608 #define CFGT_SWITCHTREE 25052 609 #define CFGT_SWITCHTREEEXPAND 25053609 #define CFGT_SWITCHTREEEXPAND 25053 610 610 #define CFGT_COLLAPSEFIRST 25054 611 #define CFGT_DCOPENS 611 #define CFGT_DCOPENS 25055 612 612 #define CFGT_FOLLOWTREE 25056 613 613 #define CFGT_VTREEOPENSWPS 25057 614 #define CFGT_TOPDIR 25058 615 #define CFGT_SHOWENV 25059 616 #define CFGT_ENVVARLIST 25060 614 #define CFGT_TOPDIR 25058 615 #define CFGT_SHOWENV 25059 616 #define CFGT_ENVVARLIST 25060 617 #define CFGT_SYSTYPELABEL 25061 617 618 618 619 #define CFGC_FRAME 25100 -
trunk/dll/fm3res.dlg
r1405 r1424 1954 1954 WS_SAVEBITS 1955 1955 BEGIN 1956 AUTOCHECKBOX "~Follow Drive Tree", CFGT_FOLLOWTREE, 4, 128, 1 32,1956 AUTOCHECKBOX "~Follow Drive Tree", CFGT_FOLLOWTREE, 4, 128, 112, 1957 1957 10, WS_GROUP 1958 1958 AUTOCHECKBOX "~Double-click opens", CFGT_DCOPENS, 4, 116, 132, 10 … … 1970 1970 AUTOCHECKBOX "Show ~env. vars in Tree", CFGT_SHOWENV, 4, 32, 110, 1971 1971 10 1972 CONTROL "Show file system type \"x\" or drive label \"=\" in tree(~3-state)", 1973 CFGT_SYSTYPELABEL, 122, 128, 196, 10, 1974 WC_BUTTON, BS_AUTO3STATE | WS_TABSTOP | WS_VISIBLE 1972 1975 ENTRYFIELD "", CFGT_ENVVARLIST, 120, 32, 196, 8, ES_MARGIN | ES_AUTOSCROLL 1973 1976 PUSHBUTTON "~Help", IDM_HELP, 8, 4, 40, 14, BS_NOPOINTERFOCUS | -
trunk/dll/init.c
r1409 r1424 1309 1309 PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &size); 1310 1310 PrfQueryProfileString(fmprof, appname, "TreeEnvVarList", "PATH;DPATH;LIBPATH;HELP;BOOKSHELF;", 1311 pszTreeEnvVarList, MaxComLineStrg); 1311 pszTreeEnvVarList, MaxComLineStrg); 1312 size = sizeof(BOOL); 1313 PrfQueryProfileData(fmprof, FM3Str, "ShowSysType", &fShowSysType, &size); 1314 size = sizeof(BOOL); 1315 PrfQueryProfileData(fmprof, FM3Str, "ShowLabel", &fShowLabel, &size); 1312 1316 size = sizeof(BOOL); 1313 1317 PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &size); -
trunk/dll/notebook.c
r1409 r1424 155 155 BOOL fSeparateParms; 156 156 BOOL fShowEnv; 157 BOOL fShowLabel; 158 BOOL fShowSysType; 157 159 BOOL fShowTarget; 158 160 BOOL fStartMaximized; … … 1362 1364 WinCheckButton(hwnd, CFGT_SHOWENV, fShowEnv); 1363 1365 WinSetDlgItemText(hwnd, CFGT_ENVVARLIST, pszTreeEnvVarList); 1366 { 1367 long th = fShowLabel ? 2 : (fShowSysType ? 1 : 0); 1368 WinCheckButton(hwnd, CFGT_SYSTYPELABEL, th); 1369 } 1364 1370 return 0; 1365 1371 … … 1411 1417 1412 1418 case WM_CLOSE: 1413 fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS);1414 PrfWriteProfileData(fmprof, FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS,1415 sizeof(BOOL));1416 fCollapseFirst = WinQueryButtonCheckstate(hwnd, CFGT_COLLAPSEFIRST);1417 PrfWriteProfileData(fmprof, appname, "CollapseFirst", &fCollapseFirst,1418 sizeof(BOOL));1419 fSwitchTreeOnFocus = WinQueryButtonCheckstate(hwnd,1420 CFGT_SWITCHTREEONFOCUS);1421 PrfWriteProfileData(fmprof, appname, "SwitchTreeOnFocus",1422 &fSwitchTreeOnFocus, sizeof(BOOL));1423 fSwitchTreeExpand = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEEXPAND);1424 PrfWriteProfileData(fmprof, appname, "SwitchTreeExpand",1425 &fSwitchTreeExpand, sizeof(BOOL));1426 fSwitchTree = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREE);1427 PrfWriteProfileData(fmprof, appname, "SwitchTree", &fSwitchTree,1428 sizeof(BOOL));1429 fFollowTree = WinQueryButtonCheckstate(hwnd, CFGT_FOLLOWTREE);1430 PrfWriteProfileData(fmprof, appname, "FollowTree", &fFollowTree,1431 sizeof(BOOL));1432 fTopDir = WinQueryButtonCheckstate(hwnd, CFGT_TOPDIR);1433 PrfWriteProfileData(fmprof, appname, "TopDir", (PVOID) & fTopDir,1434 sizeof(BOOL));1435 fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS);1436 PrfWriteProfileData(fmprof, FM3Str, "DoubleClickOpens", &fDCOpens,1437 sizeof(BOOL));1438 fShowEnvChanged = (fShowEnv != WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV));1439 fShowEnv = WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV);1440 PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL));1441 1419 { 1442 char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1, pszSrcFile, __LINE__); 1443 if (pszTemp) { 1444 WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp); 1445 strupr(pszTemp); 1446 if (strcmp(pszTemp, pszTreeEnvVarList)) { 1447 fTreeEnvVarListChanged = TRUE; 1448 strcpy(pszTreeEnvVarList, pszTemp); 1449 PrfWriteProfileString(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList); 1450 } 1451 free(pszTemp); 1452 } 1453 if (hwndTree && (fShowEnvChanged || (fShowEnv && fTreeEnvVarListChanged))) 1420 long test; 1421 1422 test = WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPELABEL); 1423 fShowSysType = (test == 1); 1424 fShowLabel = (test == 2); 1425 PrfWriteProfileData(fmprof, FM3Str, "ShowSysType", &fShowSysType, sizeof(BOOL)); 1426 PrfWriteProfileData(fmprof, FM3Str, "ShowLabel", &fShowLabel, sizeof(BOOL)); 1427 fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS); 1428 PrfWriteProfileData(fmprof, FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS, 1429 sizeof(BOOL)); 1430 fCollapseFirst = WinQueryButtonCheckstate(hwnd, CFGT_COLLAPSEFIRST); 1431 PrfWriteProfileData(fmprof, appname, "CollapseFirst", &fCollapseFirst, 1432 sizeof(BOOL)); 1433 fSwitchTreeOnFocus = WinQueryButtonCheckstate(hwnd, 1434 CFGT_SWITCHTREEONFOCUS); 1435 PrfWriteProfileData(fmprof, appname, "SwitchTreeOnFocus", 1436 &fSwitchTreeOnFocus, sizeof(BOOL)); 1437 fSwitchTreeExpand = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEEXPAND); 1438 PrfWriteProfileData(fmprof, appname, "SwitchTreeExpand", 1439 &fSwitchTreeExpand, sizeof(BOOL)); 1440 fSwitchTree = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREE); 1441 PrfWriteProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, 1442 sizeof(BOOL)); 1443 fFollowTree = WinQueryButtonCheckstate(hwnd, CFGT_FOLLOWTREE); 1444 PrfWriteProfileData(fmprof, appname, "FollowTree", &fFollowTree, 1445 sizeof(BOOL)); 1446 fTopDir = WinQueryButtonCheckstate(hwnd, CFGT_TOPDIR); 1447 PrfWriteProfileData(fmprof, appname, "TopDir", (PVOID) & fTopDir, 1448 sizeof(BOOL)); 1449 fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS); 1450 PrfWriteProfileData(fmprof, FM3Str, "DoubleClickOpens", &fDCOpens, 1451 sizeof(BOOL)); 1452 fShowEnvChanged = (fShowEnv != WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV)); 1453 fShowEnv = WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV); 1454 PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL)); 1454 1455 { 1455 PCNRITEM pci = WinSendMsg(WinWindowFromID 1456 (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), CM_QUERYRECORDEMPHASIS, 1457 MPFROMLONG(CMA_FIRST), 1458 MPFROMSHORT(CRA_SELECTED)); 1459 PostMsg(WinWindowFromID 1460 (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), WM_COMMAND, 1461 MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1462 pszTemp = xstrdup(pci->pszFileName, pszSrcFile, __LINE__); 1463 if (pszTemp) { 1464 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTemp), MPVOID)) 1465 free(pszTemp); 1466 /* pszTemp is freed in the UM_SHOWME code */ 1467 } 1468 } 1469 } 1470 break; 1456 char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1, pszSrcFile, __LINE__); 1457 if (pszTemp) { 1458 WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp); 1459 strupr(pszTemp); 1460 if (strcmp(pszTemp, pszTreeEnvVarList)) { 1461 fTreeEnvVarListChanged = TRUE; 1462 strcpy(pszTreeEnvVarList, pszTemp); 1463 PrfWriteProfileString(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList); 1464 } 1465 free(pszTemp); 1466 } 1467 if (hwndTree && (fShowEnvChanged || (fShowEnv && fTreeEnvVarListChanged))) 1468 { 1469 PCNRITEM pci = WinSendMsg(WinWindowFromID 1470 (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), CM_QUERYRECORDEMPHASIS, 1471 MPFROMLONG(CMA_FIRST), 1472 MPFROMSHORT(CRA_SELECTED)); 1473 PostMsg(WinWindowFromID 1474 (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), WM_COMMAND, 1475 MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 1476 pszTemp = xstrdup(pci->pszFileName, pszSrcFile, __LINE__); 1477 if (pszTemp) { 1478 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTemp), MPVOID)) 1479 free(pszTemp); 1480 /* pszTemp is freed in the UM_SHOWME code */ 1481 } 1482 } 1483 } 1484 break; 1485 } 1471 1486 } 1472 1487 return WinDefDlgProc(hwnd, msg, mp1, mp2); -
trunk/dll/notebook.h
r1395 r1424 90 90 extern BOOL fSeparateParms; 91 91 extern BOOL fShowEnv; 92 extern BOOL fShowLabel; 93 extern BOOL fShowSysType; 92 94 extern BOOL fShowTarget; 93 95 extern BOOL fStartMaximized; -
trunk/dll/treecnr.c
r1411 r1424 816 816 Runtime_Error(pszSrcFile, __LINE__, NULL); 817 817 else { 818 while (StubbyScanCount != 0) 819 DosSleep(50); 818 820 RemoveCnrItems(dcd->hwndCnr, NULL, 0, CMA_FREE | CMA_INVALIDATE | CMA_ERASE); 819 821 WinSendMsg(dcd->hwndCnr, … … 822 824 CM_SCROLLWINDOW, 823 825 MPFROMSHORT(CMA_HORIZONTAL), MPFROMLONG(-1)); 824 while (StubbyScanCount != 0)825 DosSleep(50);826 826 FillTreeCnr(dcd->hwndCnr, dcd->hwndParent); 827 827 if (fOkayMinimize) {
Note:
See TracChangeset
for help on using the changeset viewer.