Changeset 796 for trunk/dll/notebook.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/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.