Changeset 1434 for trunk/dll/notebook.c


Ignore:
Timestamp:
Jun 23, 2009, 12:52:05 AM (16 years ago)
Author:
Gregg Young
Message:

Update show label or FS in tree to initialize as driveonly and fixed typo which caused rescan to fail after the value was changed. Renamed some variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/notebook.c

    r1431 r1434  
    157157BOOL fShowDriveOnly;
    158158BOOL fShowEnv;
    159 BOOL fShowLabel;
    160 BOOL fShowSysType;
     159BOOL fShowDriveLabelInTree;
     160BOOL fShowFSTypeInTree;
    161161BOOL fShowTarget;
    162162BOOL fStartMaximized;
     
    13681368    WinSetDlgItemText(hwnd, CFGT_ENVVARLIST, pszTreeEnvVarList);
    13691369    WinCheckButton(hwnd, CFGT_DRIVEONLY, fShowDriveOnly);
    1370     WinCheckButton(hwnd, CFGT_SYSTYPE, fShowSysType);
    1371     WinCheckButton(hwnd, CFGT_LABEL, fShowLabel);
     1370    WinCheckButton(hwnd, CFGT_SYSTYPE, fShowFSTypeInTree);
     1371    WinCheckButton(hwnd, CFGT_LABEL, fShowDriveLabelInTree);
    13721372    return 0;
    13731373
     
    14211421    {
    14221422
    1423       if ((fShowSysType != WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE)) ||
    1424           (fShowLabel = WinQueryButtonCheckstate(hwnd, CFGT_LABEL)))
     1423      if ((fShowFSTypeInTree != WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE)) ||
     1424          (fShowDriveLabelInTree != WinQueryButtonCheckstate(hwnd, CFGT_LABEL)))
    14251425        fShowSysTypeLabelChanged = TRUE;
    1426       fShowSysType = WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE);
    1427       fShowLabel = WinQueryButtonCheckstate(hwnd, CFGT_LABEL);
     1426      fShowFSTypeInTree = WinQueryButtonCheckstate(hwnd, CFGT_SYSTYPE);
     1427      fShowDriveLabelInTree = WinQueryButtonCheckstate(hwnd, CFGT_LABEL);
    14281428      fShowDriveOnly = WinQueryButtonCheckstate(hwnd, CFGT_DRIVEONLY);
    14291429      PrfWriteProfileData(fmprof, FM3Str, "ShowDriveOnly", &fShowDriveOnly, sizeof(BOOL));
    1430       PrfWriteProfileData(fmprof, FM3Str, "ShowSysType", &fShowSysType, sizeof(BOOL));
    1431       PrfWriteProfileData(fmprof,       FM3Str, "ShowLabel", &fShowLabel, sizeof(BOOL));
     1430      PrfWriteProfileData(fmprof, FM3Str, "ShowFSTypeInTree",
     1431                          &fShowFSTypeInTree, sizeof(BOOL));
     1432      PrfWriteProfileData(fmprof,       FM3Str, "ShowDriveLabelInTree",
     1433                          &fShowDriveLabelInTree, sizeof(BOOL));
    14321434      fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS);
    14331435      PrfWriteProfileData(fmprof, FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS,
     
    14591461      PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL));
    14601462      {
    1461         char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1, pszSrcFile, __LINE__);
     1463        char * pszTemp = xmalloc(WinQueryDlgItemTextLength(hwnd, CFGT_ENVVARLIST) + 1,
     1464                                 pszSrcFile, __LINE__);
    14621465        if (pszTemp) {
    14631466          WinQueryDlgItemText(hwnd, CFGT_ENVVARLIST, MaxComLineStrg, pszTemp);
     
    14731476                        fShowSysTypeLabelChanged)) {
    14741477          PCNRITEM pci = WinSendMsg(WinWindowFromID
    1475                   (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), CM_QUERYRECORDEMPHASIS,
     1478                                    (WinWindowFromID(hwndTree, FID_CLIENT),
     1479                                     TREE_CNR), CM_QUERYRECORDEMPHASIS,
    14761480                                    MPFROMLONG(CMA_FIRST),
    14771481                                    MPFROMSHORT(CRA_SELECTED));
    1478           PostMsg(WinWindowFromID
    1479                   (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), WM_COMMAND,
    1480                   MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
     1482          PostMsg(WinWindowFromID(WinWindowFromID(hwndTree, FID_CLIENT),
     1483                                  TREE_CNR), WM_COMMAND,
     1484                                  MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
    14811485          pszTemp = xstrdup(pci->pszFileName, pszSrcFile, __LINE__);
    14821486          if (pszTemp) {
    14831487            if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszTemp), MPVOID))
    14841488              free(pszTemp);
    1485             /* pszTemp is freed in the UM_SHOWME code */
     1489            // pszTemp is freed in the UM_SHOWME code
    14861490          }
    14871491        }
Note: See TracChangeset for help on using the changeset viewer.