Changeset 796 for trunk/dll/misc.c


Ignore:
Timestamp:
Aug 22, 2007, 1:22:27 AM (18 years ago)
Author:
Gregg Young
Message:

Make subject column in dircnrs movable from one pane to the other; allow column to be sized truncating long subjects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/misc.c

    r792 r796  
    516516    // Fill in column info for subjects
    517517
    518     pfi = pfi->pNextFieldInfo;
    519     pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR;
    520     if (isCompCnr)
    521       pfi->flData |= CFA_FIREADONLY;
    522     pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY;
    523     pfi->pTitleData = isCompCnr ? GetPString(IDS_STATUS) :
     518    if (fSubjectInLeftPane) {
     519      pfi = pfi->pNextFieldInfo;
     520      pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR;
     521      if (isCompCnr)
     522        pfi->flData |= CFA_FIREADONLY;
     523      pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY;
     524      pfi->pTitleData = isCompCnr ? GetPString(IDS_STATUS) :
    524525                                  GetPString(IDS_SUBJ);
    525     pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject);
    526 
    527     // Store the current pfi value as that will be used to indicate the
    528     // last column in the lefthand container window (we have a splitbar)
    529 
    530     pfiLastLeftCol = pfi;
     526      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject);
     527      pfi->cxWidth = SubjectDisplayWidth;
     528
     529      // Store the current pfi value as that will be used to indicate the
     530      // last column in the lefthand container window (we have a splitbar)
     531
     532      pfiLastLeftCol = pfi;
     533    }
     534    else {
     535      // Store the current pfi value as that will be used to indicate the
     536      // last column in the lefthand container window (we have a splitbar)
     537
     538      pfiLastLeftCol = pfi;
     539      pfi = pfi->pNextFieldInfo;
     540      pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR;
     541      if (isCompCnr)
     542        pfi->flData |= CFA_FIREADONLY;
     543      pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY;
     544      pfi->pTitleData = isCompCnr ? GetPString(IDS_STATUS) :
     545                                  GetPString(IDS_SUBJ);
     546      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject);
     547      pfi->cxWidth = SubjectDisplayWidth;
     548    }
    531549
    532550    // Fill in column information for the file size
Note: See TracChangeset for help on using the changeset viewer.