Changeset 1065 for trunk/dll/comp.c


Ignore:
Timestamp:
Jul 11, 2008, 6:50:19 PM (17 years ago)
Author:
John Small
Message:

Ticket 230: Simplified code and eliminated some local variables by incorporating
all the details view settings (both the global variables and those in the
DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r1063 r1065  
    5454  29 Feb 08 GKY Refactor global command line variables to notebook.h
    5555  16 Mar 08 GKY Prevent trap caused by files that exceed maxpath length
     56  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating
     57                all the details view settings (both the global variables and those in the
     58                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
    5659
    5760***********************************************************************/
     
    22632266        cmp->dcd.mask.attrFile = (FILE_DIRECTORY | FILE_ARCHIVED |
    22642267                                  FILE_READONLY | FILE_SYSTEM | FILE_HIDDEN);
    2265         LoadDetailsSwitches("DirCmp", &cmp->dcd);
    2266         cmp->dcd.detailslongname = FALSE;
    2267         cmp->dcd.detailsicon = FALSE;   // TRUE;
     2268        LoadDetailsSwitches("DirCmp", &cmp->dcd.ds);
     2269        cmp->dcd.ds.detailslongname = FALSE;
     2270        cmp->dcd.ds.detailsicon = FALSE;        // TRUE;
    22682271      }
    22692272      memset(&cnri, 0, sizeof(CNRINFO));
     
    22872290      AdjustCnrColRO(hwndRight, GetPString(IDS_FILENAMECOLTEXT), TRUE, FALSE);
    22882291      AdjustCnrColRO(hwndRight, GetPString(IDS_LONGNAMECOLTEXT), TRUE, FALSE);
    2289       AdjustCnrColsForPref(hwndLeft, cmp->leftdir, &cmp->dcd, TRUE);
    2290       tempsubj = cmp->dcd.detailssubject;
    2291       cmp->dcd.detailssubject = FALSE;
    2292       AdjustCnrColsForPref(hwndRight, cmp->rightdir, &cmp->dcd, TRUE);
     2292      AdjustCnrColsForPref(hwndLeft, cmp->leftdir, &cmp->dcd.ds, TRUE);
     2293      tempsubj = cmp->dcd.ds.detailssubject;
     2294      cmp->dcd.ds.detailssubject = FALSE;
     2295      AdjustCnrColsForPref(hwndRight, cmp->rightdir, &cmp->dcd.ds, TRUE);
    22932296      if (*cmp->rightlist) {
    22942297        AdjustCnrColVis(hwndRight, GetPString(IDS_LADATECOLTEXT), FALSE,
     
    23012304                        FALSE);
    23022305      }
    2303       cmp->dcd.detailssubject = tempsubj;
     2306      cmp->dcd.ds.detailssubject = tempsubj;
    23042307    }
    23052308    return 0;
     
    25302533                WinSendMsg(cmp->dcd.hwndLastMenu, MM_DELETEITEM,
    25312534                           MPFROM2SHORT(IDM_SHOWSUBJECT, FALSE), MPVOID);
    2532               SetDetailsSwitches(cmp->dcd.hwndLastMenu, &cmp->dcd);
     2535              SetDetailsSwitches(cmp->dcd.hwndLastMenu, &cmp->dcd.ds);
    25332536              if (SHORT1FROMMP(mp1) == COMP_LEFTDIR)
    25342537                WinSendMsg(cmp->dcd.hwndLastMenu, MM_DELETEITEM,
     
    29022905        AdjustDetailsSwitches(hwndLeft,
    29032906                              (HWND)0, SHORT1FROMMP(mp1),
    2904                               cmp->leftdir, "DirCmp", &cmp->dcd, TRUE);
    2905         tempsubj = cmp->dcd.detailssubject;
     2907                              cmp->leftdir, "DirCmp", &cmp->dcd.ds, TRUE);
     2908        tempsubj = cmp->dcd.ds.detailssubject;
    29062909        cmp->dcd = dcd1;
    2907         cmp->dcd.detailssubject = FALSE;
     2910        cmp->dcd.ds.detailssubject = FALSE;
    29082911        AdjustDetailsSwitches(hwndRight,
    29092912                              cmp->dcd.hwndLastMenu, SHORT1FROMMP(mp1),
    2910                               cmp->rightdir, "DirCmp", &cmp->dcd, TRUE);
    2911         cmp->dcd.detailssubject = tempsubj;
     2913                              cmp->rightdir, "DirCmp", &cmp->dcd.ds, TRUE);
     2914        cmp->dcd.ds.detailssubject = tempsubj;
    29122915      }
    29132916      break;
Note: See TracChangeset for help on using the changeset viewer.