Changeset 796


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

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r791 r796  
    1010 o Rework states logic to allow longer state names, tickets #109, #31 (Steven)
    1111 o Report delta time in debug messages (Steven)
     12 o Improved container load times by increasing the number of files processed in each
     13   pass; "FileBuf" is now settable most places (See readme since most will need to
     14   reset this manually). (Gregg)
     15 o Added BldFullPathName cleaned up comp dirs code fix right left misalignment(Steven)
     16 o Added BldQuotedFileName and BldQuotedFullPathName to streamline code. (Steven, Gregg)
     17 o Increased limit on Subject EA to 1024 from 40. (Gregg)
     18 o Corrected dir sizes accel key to ctrl + z. (Gregg)
     19 o Fixed addition of ff in Hex notation by archiver editor. (John)
     20 o Updated build instructions on FM/2 Wiki. (David)
     21 o Dir sizes correct some sizing and positioning issues. (Steve)
     22 o Removed error message in eas.c which caused seek and scan for text including eas to fail on
     23   read only files. (Gregg)
     24 o Fixed unnecessary menu item removal when FM/2 is run as the WPS.(Gregg)
    1225 o Fixed the restore of the settings under "Include in details view" on the "DirView"
    1326   tab of the configuration notebook, Ticket 118/71 (John)
     27 o Subject column can be moved to left side of split bar in directory container
     28   and/or sized which will truncate long subjects (Gregg)
    1429
    15303.06
     
    12861301
    12871302$Id$
     1303
  • trunk/dll/fm3dlg.h

    r549 r796  
    1717  02 Jan 07 GKY Add always paths opt to extract
    1818  07 Jan 07 GKY Add remember search flags to seek and scan
     19  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
    1920
    2021***********************************************************************/
     
    713714#define CFG5_FILTER                                                                             25519
    714715#define CFG5_EXTERNALCOLLECTOR                                  25520
     716#define CFG5_SUBJECTLENGTHMAX                                                           25521
     717#define CFG5_SUBJECTDISPLAYWIDTH                                                        25522
     718#define CFG5_SUBJECTINLEFTPANE                                                          25523
    715719
    716720#define CFGTS_FRAME                     25599
  • trunk/dll/fm3dll.h

    r789 r796  
    6060  19 Aug 07 SHL Move FILESTOGET_MIN/MAX here
    6161  19 Aug 07 SHL Update SaveDirCnrState return
     62  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
    6263
    6364***********************************************************************/
     
    13801381  fSwitchTreeExpand, fCollapseFirst, fFilesInTree, fNoDead,
    13811382  fThreadNotes, fOkayMinimize, fRunning, fDullMin, fBlueLED,
    1382   fViewChild, fShowEnv, fLeaveTree,  fNoFoldMenu,
     1383  fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu, fSubjectInLeftPane,
    13831384  fCustomFileDlg, fSaveMiniCmds, fSaveBigCmds, fNoTileUpdate,
    13841385  fFM2Deletes, fAutoAddAllDirs, fConfirmTarget, fChangeTarget,
    1385   fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM;
     1386  fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM,
     1387  fSubjectLengthMax;
    13861388DATADEF BOOL detailsladate, detailslatime, detailscrdate, detailscrtime,
    13871389  detailslongname, detailsea, detailssize, detailssubject,
     
    14271429#define FILESTOGET_MAX  4096
    14281430
    1429 DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL;
     1431DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL, SubjectDisplayWidth;
    14301432DATADEF long prnwidth, prnlength, prntmargin, prnbmargin, prnlmargin,
    14311433  prnrmargin, prnspacing, prntabspaces;
  • trunk/dll/fm3res.dlg

    r783 r796  
    2929  03 Aug 07 GKY Enlarged and made setable everywhere Findbuf (speed file loading)
    3030  13 Aug 07 SHL Tweak scanning page
     31  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
    3132
    3233***********************************************************************/
     
    16191620        GROUPBOX        "Include in detail view:", -1, 4, 16, 236, 72, NOT
    16201621                        WS_GROUP
     1622        GROUPBOX        "Subject Column Settings:", -1, 120, 90, 110, 48, NOT WS_GROUP
    16211623        AUTORADIOBUTTON "Icon", CFG5_ICON, 12, 118, 42, 10,
    16221624                        BS_NOCURSORSELECT | WS_GROUP | WS_TABSTOP
     
    16281630                        BS_NOCURSORSELECT | WS_TABSTOP
    16291631        AUTOCHECKBOX    "MiniIcons", CFG5_MINIICONS, 12, 94, 58, 10
     1632        AUTOCHECKBOX    "Subject Left", CFG5_SUBJECTINLEFTPANE, 128, 118, 66, 10
     1633        AUTOCHECKBOX    "Subject Max Width", CFG5_SUBJECTLENGTHMAX, 128, 106, 66, 10
    16301634        AUTOCHECKBOX    "Field Titles", CFG5_SHOWTITLES, 12, 68, 66, 10,
    16311635                        WS_GROUP
     
    16421646        AUTOCHECKBOX    "CR Dates", CFG5_SHOWCRDATE, 164, 56, 66, 10
    16431647        AUTOCHECKBOX    "CR Times", CFG5_SHOWCRTIME, 164, 44, 66, 10
     1648        LTEXT           "Subject Width", -1, 128, 92, 45, 12, NOT WS_GROUP
     1649        CONTROL         "", CFG5_SUBJECTDISPLAYWIDTH, 175, 96, 45, 12, WC_SPINBUTTON,
     1650                        SPBS_ALLCHARACTERS  | SPBS_MASTER |
     1651                        SPBS_JUSTCENTER | WS_TABSTOP | SPBS_FASTSPIN |
     1652                        WS_VISIBLE
    16441653        ENTRYFIELD      "", CFG5_FILTER, 45, 4, 192, 8, ES_MARGIN |
    16451654                        ES_READONLY | WS_GROUP
    1646         PUSHBUTTON      "~Help", IDM_HELP, 168, 98, 40, 14, BS_NOPOINTERFOCUS |
    1647                         WS_GROUP
    1648         PUSHBUTTON      "~Undo", IDM_UNDO, 168, 116, 40, 14, BS_NOPOINTERFOCUS
     1655        PUSHBUTTON      "~Help", IDM_HELP, 250, 68, 40, 14, BS_NOPOINTERFOCUS |
     1656                        WS_GROUP
     1657        PUSHBUTTON      "~Undo", IDM_UNDO, 250, 85, 40, 14, BS_NOPOINTERFOCUS
    16491658    END
    16501659END
  • trunk/dll/init.c

    r789 r796  
    3131  18 Aug 07 JBS Added code to read Details* keys from the INI file (Ticket 118)
    3232  19 Aug 07 SHL Ensure FilesToGet in valid range
     33  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
    3334
    3435***********************************************************************/
     
    12721273                      &size);
    12731274  size = sizeof(ULONG);
    1274   PrfQueryProfileData(fmprof, appname, "FilesToGet", (PVOID)&FilesToGet,
     1275  PrfQueryProfileData(fmprof, appname, "FilesToGet", (PVOID) &FilesToGet,
    12751276                      &size);
    12761277  if (FilesToGet < FILESTOGET_MIN)
     
    13191320  size = sizeof(BOOL);
    13201321  PrfQueryProfileData(fmprof, appname, "DetailsIcon", (PVOID) &detailsicon,
    1321                       &size);
     1322                      &size);
     1323  size = sizeof(BOOL);
     1324  PrfQueryProfileData(fmprof, appname, "SubjectInLeftPane", (PVOID) &fSubjectInLeftPane,
     1325                      &size);
     1326  size = sizeof(ULONG);
     1327  PrfQueryProfileData(fmprof, appname, "SubjectDisplayWidth", (PVOID) &SubjectDisplayWidth,
     1328                      &size);
     1329  if (SubjectDisplayWidth < 50)
     1330    SubjectDisplayWidth = 0;
     1331  else if (SubjectDisplayWidth > 1000)
     1332    SubjectDisplayWidth = 1000;
     1333  size = sizeof(BOOL);
     1334  PrfQueryProfileData(fmprof, appname, "SubjectLengthMax", (PVOID) &fSubjectLengthMax,
     1335                      &size);
    13221336
    13231337  /* load pointers and icons we use */
  • trunk/dll/ipf/notebook.ipf

    r787 r796  
    153153full size or in miniature in views that show icons.
    154154:p.
     155The :hp6.Subject Column Settings:ehp6. section allows you to set the width of
     156of the subject column which can be quite wide if you have any long subjects
     157in a directory. The :hp6.Subject Width:ehp6. spin button will show 0 if the
     158:hp6.Subject Max Width:ehp6. button (which sets the column to the width of
     159the longest subject in the directory) is selected. In addition you can move the
     160subject column to the left side of the slide bar by selecting :hp6.Subject
     161Left:ehp6.
     162
     163:p.
    155164The :hp6.Field Titles:ehp6. group (analogous to the Views->Details Setup
    156165submenu) allows you to control what is shown in a Details view. Each
     
    323332all expanded branches in the tree before switching because of one of the
    324333two above switch events.
    325 This option is will significantly slow down switching
     334This option will significantly slow down switching
    326335if you a large number of directories in the Drive Tree.
    327336:p.
  • 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
  • trunk/dll/notebook.c

    r789 r796  
    1919  13 Aug 07 SHL Rework FilesToGet min/max to match how DosFindFirst/Next works
    2020  19 Aug 07 SHL Sync with SaveDirCnrState mods
     21  21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
    2122
    2223***********************************************************************/
     
    594595        WinCheckButton(hwnd, CFG6_SORTNAME, TRUE);
    595596      if (TreesortFlags & SORT_REVERSE)
    596         WinCheckButton(hwnd, CFG6_SORTREVERSE, TRUE);
     597        WinCheckButton(hwnd, CFG6_SORTREVERSE, TRUE);
    597598    }
    598599    return 0;
     
    13411342  switch (msg) {
    13421343  case WM_INITDLG:
     1344    WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_SETTEXTLIMIT,
     1345                      MPFROMSHORT(8), MPVOID);
     1346    WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_OVERRIDESETLIMITS,
     1347                      MPFROMLONG(1000), MPFROMLONG(50));
    13431348    WinSendDlgItemMsg(hwnd,
    13441349                      CFG5_FILTER,
     
    13941399      strcpy(mask.prompt, GetPString(IDS_DEFDIRFILTERTITLETEXT));
    13951400      WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
     1401      WinCheckButton(hwnd, CFG5_SUBJECTINLEFTPANE, fSubjectInLeftPane);
     1402      WinCheckButton(hwnd, CFG5_SUBJECTLENGTHMAX, fSubjectLengthMax);
     1403      WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_SETCURRENTVALUE,
     1404                      MPFROMLONG(SubjectDisplayWidth), MPVOID);
    13961405    }
    13971406    return 0;
     
    15191528                        &detailsattr, sizeof(BOOL));
    15201529    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
    1521                         &detailsattr, sizeof(BOOL));
     1530                        &detailsattr, sizeof(BOOL));
     1531    fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE);
     1532    PrfWriteProfileData(fmprof, appname, "SubjectInLeftPane",
     1533                        &fSubjectInLeftPane, sizeof(BOOL));
     1534    PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectInLeftPane",
     1535                        &fSubjectInLeftPane, sizeof(BOOL));
     1536    fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX);
     1537    PrfWriteProfileData(fmprof, appname, "SubjectLengthMax",
     1538                        &fSubjectInLeftPane, sizeof(BOOL));
     1539    PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectLengthMax",
     1540                        &fSubjectInLeftPane, sizeof(BOOL));
    15221541    *mask.prompt = 0;
    15231542    PrfWriteProfileData(fmprof, appname, "DirFilter", &mask, sizeof(MASK));
     1543    {
     1544        if (!WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX)) {
     1545        WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_QUERYVALUE,
     1546                        MPFROMP(&SubjectDisplayWidth), MPFROM2SHORT(0, SPBQ_DONOTUPDATE));
     1547        if (SubjectDisplayWidth < 50)
     1548          SubjectDisplayWidth  = 0;
     1549        else if (SubjectDisplayWidth > 1000)
     1550          SubjectDisplayWidth = 1000;
     1551        }
     1552        else
     1553          SubjectDisplayWidth  = 0;
     1554        PrfWriteProfileData(fmprof,
     1555                            appname, "SubjectDisplayWidth",
     1556                            &SubjectDisplayWidth, sizeof(ULONG));
     1557        PrfWriteProfileData(fmprof,
     1558                            appname, "DirCnr.SubjectDisplayWidth",
     1559                            &SubjectDisplayWidth, sizeof(ULONG));
     1560    }
    15241561    break;
    15251562  }
Note: See TracChangeset for help on using the changeset viewer.