Changeset 1444 for trunk/dll/misc.c
- Timestamp:
- Jul 23, 2009, 1:24:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/misc.c
r1439 r1444 61 61 add State.version key for check 62 62 12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory 63 22 Jul 09 GKY Check if drives support EAs add driveflag for this 64 22 Jul 09 GKY Allow .LONGNAME to be displayed for FAT drives. 63 65 64 66 ***********************************************************************/ … … 480 482 } 481 483 482 VOID AdjustCnrColsForFSType(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS * pds)484 VOID AdjustCnrColsForFSType(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS *pds, BOOL compare) 483 485 { 484 486 CHAR FileSystem[CCHMAXPATH]; … … 487 489 BOOL hasAccessDT; 488 490 BOOL hasLongNames; 491 BOOL hasSubjects; 489 492 490 493 if (!directory || !*directory) … … 492 495 x = CheckDrive(toupper(*directory), FileSystem, NULL); 493 496 if (x != -1) { 497 x = toupper(*directory) - 'A'; 494 498 if (!stricmp(FileSystem, HPFS) || 495 499 !stricmp(FileSystem, JFS) || … … 501 505 hasCreateDT = TRUE; 502 506 hasAccessDT = TRUE; 503 hasLongNames = TRUE; 507 if (driveflags[x] & DRIVE_NOEASUPPORT) { 508 hasSubjects = FALSE; 509 hasLongNames = FALSE; 510 } 511 else { 512 hasSubjects = TRUE; 513 hasLongNames = TRUE; 514 } 504 515 } 505 516 else if (!strcmp(FileSystem, CDFS) || !strcmp(FileSystem, ISOFS)) { 506 517 hasCreateDT = TRUE; 507 518 hasAccessDT = FALSE; 508 hasLongNames = FALSE; 519 if (driveflags[x] & DRIVE_NOEASUPPORT) { 520 hasSubjects = FALSE; 521 hasLongNames = FALSE; 522 } 523 else { 524 hasSubjects = TRUE; 525 hasLongNames = TRUE; 526 } 509 527 } 510 528 else { … … 512 530 hasCreateDT = FALSE; 513 531 hasAccessDT = FALSE; 514 hasLongNames = FALSE; 532 if (driveflags[x] & DRIVE_NOEASUPPORT) { 533 hasSubjects = FALSE; 534 hasLongNames = FALSE; 535 } 536 else { 537 hasSubjects = TRUE; 538 hasLongNames = TRUE; 539 } 515 540 } 516 541 } … … 519 544 hasCreateDT = FALSE; 520 545 hasAccessDT = FALSE; 521 hasLongNames = FALSE; 546 if (driveflags[x] & DRIVE_NOEASUPPORT) { 547 hasSubjects = FALSE; 548 hasLongNames = FALSE; 549 } 550 else { 551 hasSubjects = TRUE; 552 hasLongNames = TRUE; 553 } 522 554 } 523 555 AdjustCnrColVis(hwndCnr, … … 536 568 GetPString(IDS_CRTIME), 537 569 pds->detailscrtime ? hasCreateDT : FALSE, 538 FALSE); 570 FALSE); 571 if (pds->detailslongname && !pds->detailssubject && hasSubjects) { 572 AdjustCnrColVis(hwndCnr, 573 compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ), 574 TRUE, 575 FALSE); 576 AdjustCnrColVis(hwndCnr, 577 GetPString(IDS_LNAME), 578 pds->detailslongname ? hasLongNames : FALSE, 579 FALSE); 580 WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID); 581 } 582 else 583 AdjustCnrColVis(hwndCnr, 584 GetPString(IDS_LNAME), 585 pds->detailslongname ? hasLongNames : FALSE, 586 FALSE); 539 587 AdjustCnrColVis(hwndCnr, 540 GetPString(IDS_LNAME),541 pds->detailslongname ? hasLongNames : FALSE,542 588 compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ), 589 pds->detailssubject ? hasSubjects : FALSE, 590 FALSE); 543 591 WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID); 544 592 } 545 593 546 VOID AdjustCnrColsForPref(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS * 594 VOID AdjustCnrColsForPref(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS *pds, 547 595 BOOL compare) 548 596 { 549 550 AdjustCnrColVis(hwndCnr,551 compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ),552 pds->detailssubject,553 FALSE);554 555 597 AdjustCnrColVis(hwndCnr, GetPString(IDS_ATTR), pds->detailsattr, FALSE); 556 598 AdjustCnrColVis(hwndCnr, GetPString(IDS_ICON), pds->detailsicon, FALSE); … … 561 603 562 604 if (!directory) { 605 AdjustCnrColVis(hwndCnr, 606 compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ), 607 pds->detailssubject, 608 FALSE); 563 609 AdjustCnrColVis(hwndCnr, GetPString(IDS_LADATE), pds->detailsladate, FALSE); 564 610 AdjustCnrColVis(hwndCnr, GetPString(IDS_LATIME), pds->detailslatime, FALSE); … … 568 614 WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID); 569 615 } 570 else 571 AdjustCnrColsForFSType(hwndCnr, directory, pds); 616 else { 617 AdjustCnrColsForFSType(hwndCnr, directory, pds, compare); 618 } 572 619 } 573 620 … … 619 666 620 667 pfi = pfi->pNextFieldInfo; 621 pfi->flData = CFA_STRING | CFA_LEFT ;668 pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 622 669 pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 623 670 pfi->pTitleData = (PSZ)GetPString(IDS_LNAME); 624 671 pfi->offStruct = FIELDOFFSET(CNRITEM, pszLongName); 672 pfiLastLeftCol = pfi; 673 674 // Store the current pfi value as that will be used to indicate the 675 // last column in the lefthand container window (we have a splitbar) 676 if (!dsDirCnrDefault.fSubjectInLeftPane) 677 pfiLastLeftCol = pfi; 678 else 679 pfiLastLeftCol = pfi->pNextFieldInfo; 625 680 626 681 // Fill in column info for subjects 627 628 if (dsDirCnrDefault.fSubjectInLeftPane) { 629 pfi = pfi->pNextFieldInfo; 630 pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 631 if (isCompCnr) 632 pfi->flData |= CFA_FIREADONLY; 633 pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 634 pfi->pTitleData = isCompCnr ? (PSZ)GetPString(IDS_STATUS) : 635 (PSZ)GetPString(IDS_SUBJ); 636 pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject); 637 pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth; 638 639 // Store the current pfi value as that will be used to indicate the 640 // last column in the lefthand container window (we have a splitbar) 641 642 pfiLastLeftCol = pfi; 643 } 644 else { 645 // Store the current pfi value as that will be used to indicate the 646 // last column in the lefthand container window (we have a splitbar) 647 648 pfiLastLeftCol = pfi; 649 pfi = pfi->pNextFieldInfo; 650 pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 651 if (isCompCnr) 652 pfi->flData |= CFA_FIREADONLY; 653 pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 654 pfi->pTitleData = isCompCnr ? (PSZ)GetPString(IDS_STATUS) : 655 (PSZ)GetPString(IDS_SUBJ); 656 pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject); 657 pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth; 658 } 682 pfi = pfi->pNextFieldInfo; 683 pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 684 if (isCompCnr) 685 pfi->flData |= CFA_FIREADONLY; 686 pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 687 pfi->pTitleData = isCompCnr ? (PSZ)GetPString(IDS_STATUS) : 688 (PSZ)GetPString(IDS_SUBJ); 689 pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject); 690 pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth; 659 691 660 692 // Fill in column information for the file size 661 662 693 663 694 pfi = pfi->pNextFieldInfo;
Note:
See TracChangeset
for help on using the changeset viewer.