Changeset 1065

Show
Ignore:
Timestamp:
07/11/08 18:50:19 (2 months ago)
Author:
jbs
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.

Location:
trunk/dll
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/dll/collect.c

    r1063 r1065  
    4949  29 Feb 08 GKY Use xfree where appropriate 
    5050  06 Jul 08 GKY Update delete/undelete to include move to and open XWP trashcan 
     51  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     52                all the details view settings (both the global variables and those in the 
     53                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    5154 
    5255***********************************************************************/ 
     
    139142              if (dcd) { 
    140143                SetViewMenu(hwndButtonPopup, dcd->flWindowAttr); 
    141                 SetDetailsSwitches(hwndButtonPopup, dcd); 
     144                SetDetailsSwitches(hwndButtonPopup, &dcd->ds); 
    142145                CopyPresParams(hwndButtonPopup, hwnd); 
    143146              } 
     
    223226                                                COLLECTOR_CNR), QWL_USER); 
    224227        if (dcd) 
    225           SetDetailsSwitches(hwndButtonPopup, dcd); 
     228          SetDetailsSwitches(hwndButtonPopup, &dcd->ds); 
    226229      } 
    227230      return mr; 
     
    13171320 
    13181321        RestorePresParams(hwnd, "Collector"); 
    1319         LoadDetailsSwitches("Collector", dcd); 
     1322        LoadDetailsSwitches("Collector", &dcd->ds); 
    13201323 
    13211324        dcd->amextracted = FALSE;       // Say not busy 
     
    13591362                              CMA_CXTREEINDENT | CMA_PSORTRECORD)); 
    13601363        SetCnrCols(hwnd, FALSE); 
    1361         AdjustCnrColsForPref(hwnd, NULL, dcd, FALSE); 
     1364        AdjustCnrColsForPref(hwnd, NULL, &dcd->ds, FALSE); 
    13621365 
    13631366        /* fix splitbar for collector container */ 
     
    14481451 
    14491452      case IDM_DETAILSSETUP: 
    1450         SetDetailsSwitches((HWND) mp2, dcd); 
     1453        SetDetailsSwitches((HWND) mp2, &dcd->ds); 
    14511454        break; 
    14521455 
     
    19521955        AdjustDetailsSwitches(hwnd, dcd->hwndLastMenu, 
    19531956                              SHORT1FROMMP(mp1), NULL, 
    1954                               "Collector", dcd, FALSE); 
     1957                              "Collector", &dcd->ds, FALSE); 
    19551958        break; 
    19561959 
     
    22132216            if (dcd->hwndLastMenu == CollectorCnrMenu) { 
    22142217              SetViewMenu(dcd->hwndLastMenu, dcd->flWindowAttr); 
    2215               SetDetailsSwitches(dcd->hwndLastMenu, dcd); 
     2218              SetDetailsSwitches(dcd->hwndLastMenu, &dcd->ds); 
    22162219              CopyPresParams(dcd->hwndLastMenu, hwnd); 
    22172220              if (dcd->flWindowAttr & CV_MINI) 
  • 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; 
  • trunk/dll/dircnrs.c

    r1063 r1065  
    4141  22 Jun 08 GKY Included free_... functions for fortify checking 
    4242  06 Jul 08 GKY Update delete/undelete to include move to and open XWP trashcan 
     43  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     44                all the details view settings (both the global variables and those in the 
     45                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    4346 
    4447***********************************************************************/ 
     
    105108                                                DIR_CNR), QWL_USER); 
    106109        if (dcd) 
    107           SetDetailsSwitches(hwndButtonPopup, dcd); 
     110          SetDetailsSwitches(hwndButtonPopup, &dcd->ds); 
    108111      } 
    109112      return mr; 
     
    168171              if (dcd) { 
    169172                SetViewMenu(hwndButtonPopup, dcd->flWindowAttr); 
    170                 SetDetailsSwitches(hwndButtonPopup, dcd); 
     173                SetDetailsSwitches(hwndButtonPopup, &dcd->ds); 
    171174              } 
    172175            } 
     
    755758      } 
    756759      RemoveCnrItems(dcd->hwndCnr, NULL, 0, CMA_FREE | CMA_INVALIDATE | CMA_ERASE); 
    757       AdjustCnrColsForFSType(dcd->hwndCnr, dcd->directory, dcd); 
     760      AdjustCnrColsForFSType(dcd->hwndCnr, dcd->directory, &dcd->ds); 
    758761      dcd->ullTotalBytes = dcd->totalfiles = 
    759762        dcd->selectedfiles = dcd->selectedbytes = 0; 
     
    15261529  case UM_SETUP2: 
    15271530    if (dcd) { 
    1528       AdjustCnrColsForPref(hwnd, NULL, dcd, FALSE); 
     1531      AdjustCnrColsForPref(hwnd, NULL, &dcd->ds, FALSE); 
    15291532      SayFilter(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 
    15301533                DIR_FILTER), &dcd->mask, FALSE); 
     
    16351638 
    16361639      case IDM_DETAILSSETUP: 
    1637         SetDetailsSwitches((HWND) mp2, dcd); 
     1640        SetDetailsSwitches((HWND) mp2, &dcd->ds); 
    16381641        break; 
    16391642 
     
    22052208                              dcd->hwndLastMenu, 
    22062209                              SHORT1FROMMP(mp1), 
    2207                               dcd->directory, NULL, dcd, FALSE); 
     2210                              dcd->directory, NULL, &dcd->ds, FALSE); 
    22082211        break; 
    22092212 
     
    34823485        dcd->hwndRestore = hwndRestore; 
    34833486        dcd->dontclose = ((flags & 1) != 0); 
    3484         dcd->detailslongname = detailslongname; 
    3485         dcd->detailssubject = detailssubject; 
    3486         dcd->detailsea = detailsea; 
    3487         dcd->detailssize = detailssize; 
    3488         dcd->detailsicon = detailsicon; 
    3489         dcd->detailsattr = detailsattr; 
    3490         dcd->detailscrdate = detailscrdate; 
    3491         dcd->detailscrtime = detailscrtime; 
    3492         dcd->detailslwdate = detailslwdate; 
    3493         dcd->detailslwtime = detailslwtime; 
    3494         dcd->detailsladate = detailsladate; 
    3495         dcd->detailslatime = detailslatime; 
     3487        dcd->ds.detailslongname = dsDirCnrDefault.detailslongname; 
     3488        dcd->ds.detailssubject = dsDirCnrDefault.detailssubject; 
     3489        dcd->ds.detailsea = dsDirCnrDefault.detailsea; 
     3490        dcd->ds.detailssize = dsDirCnrDefault.detailssize; 
     3491        dcd->ds.detailsicon = dsDirCnrDefault.detailsicon; 
     3492        dcd->ds.detailsattr = dsDirCnrDefault.detailsattr; 
     3493        dcd->ds.detailscrdate = dsDirCnrDefault.detailscrdate; 
     3494        dcd->ds.detailscrtime = dsDirCnrDefault.detailscrtime; 
     3495        dcd->ds.detailslwdate = dsDirCnrDefault.detailslwdate; 
     3496        dcd->ds.detailslwtime = dsDirCnrDefault.detailslwtime; 
     3497        dcd->ds.detailsladate = dsDirCnrDefault.detailsladate; 
     3498        dcd->ds.detailslatime = dsDirCnrDefault.detailslatime; 
    34963499        strcpy(dcd->directory, directory); 
    34973500        add_udir(FALSE, directory); 
  • trunk/dll/dircnrs.h

    r940 r1065  
    1111  05 Jan 08 SHL Move dircnrs.c definitions here 
    1212  13 Jan 08 GKY Add variables to DIRCNRDATA struct for Subjectwidth/Subjectleft. 
     13  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     14                all the details view settings (both the global variables and those in the 
     15                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    1316 
    1417***********************************************************************/ 
     
    8689MASK; 
    8790 
     91typedef struct DETAILS_SETTINGS 
     92{ 
     93  BOOL detailsladate, detailslatime, detailscrdate, detailscrtime, 
     94    detailslongname, detailsea, detailssize, detailssubject, 
     95    detailslwdate, detailslwtime, detailsattr, detailsicon, 
     96    fSubjectInLeftPane, fSubjectLengthMax; 
     97  ULONG SubjectDisplayWidth; 
     98} 
     99DETAILS_SETTINGS; 
     100 
    88101typedef struct DIRCNRDATA 
    89102{ 
     
    124137  INT lasthelp; 
    125138  INT sortFlags; 
    126   BOOL detailsladate, detailslatime, detailscrdate, detailscrtime, 
    127     detailslongname, detailsea, detailssize, detailssubject, 
    128     detailslwdate, detailslwtime, detailsattr, detailsicon, 
    129     fSubjectInLeftPane, fSubjectLengthMax, SubjectDisplayWidth; 
     139  DETAILS_SETTINGS ds; 
    130140  CHAR **lastselection; 
    131141  USHORT shiftstate; 
  • trunk/dll/fm3dll.h

    r1043 r1065  
    8080  29 Feb 08 GKY Refactor global command line variables to notebook.h 
    8181  22 Jun 08 GKY Changed some variable types to fix compiler warnings 
     82  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     83                all the details view settings (both the global variables and those in the 
     84                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    8285 
    8386***********************************************************************/ 
     
    501504BOOL AdjustCnrColVis(HWND hwndCnr, CHAR * title, BOOL visible, BOOL toggle); 
    502505BOOL AdjustCnrColRO(HWND hwndCnr, CHAR * title, BOOL readonly, BOOL toggle); 
    503 VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd); 
    504 VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd, 
     506VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DETAILS_SETTINGS * pds); 
     507VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DETAILS_SETTINGS * pds, 
    505508                          BOOL compare); 
    506509BOOL SetCnrCols(HWND hwndCnr, BOOL compare); 
     
    512515VOID CloseHelp(VOID); 
    513516INT ExecFile(HWND hwnd, CHAR * filename); 
    514 VOID SetDetailsSwitches(HWND hwnd, DIRCNRDATA * dcd); 
     517VOID SetDetailsSwitches(HWND hwnd, DETAILS_SETTINGS * pds); 
    515518VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd, 
    516                            CHAR * directory, CHAR * keyroot, DIRCNRDATA * dcd, 
     519                           CHAR * directory, CHAR * keyroot, DETAILS_SETTINGS * pds, 
    517520                           BOOL compare); 
    518521VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def); 
    519522VOID SetSortChecks(HWND hwndMenu, INT sortflags); 
    520523VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr); 
    521 VOID LoadDetailsSwitches(CHAR * keyroot, DIRCNRDATA * dcd); 
     524VOID LoadDetailsSwitches(CHAR * keyroot, DETAILS_SETTINGS * pds); 
    522525HWND FindDirCnr(HWND hwndParent); 
    523526VOID HeapThread(VOID * dummy); 
     
    11361139  fSwitchTreeExpand, fCollapseFirst, fFilesInTree, fNoDead, 
    11371140  fThreadNotes, fOkayMinimize, fRunning, fDullMin, fBlueLED, 
    1138   fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu, fSubjectInLeftPane, 
     1141  fViewChild, fShowEnv, fLeaveTree, fNoFoldMenu, 
    11391142  fCustomFileDlg, fSaveMiniCmds, fSaveBigCmds, fNoTileUpdate, 
    11401143  fFM2Deletes, fAutoAddAllDirs, fConfirmTarget, fChangeTarget, 
    11411144  fFirstTime, fShowTarget, fNoFinger, fDrivebarHelp, fCheckMM, 
    1142   fSubjectLengthMax, fNoLargeFileSupport, fNoMailtoMailRun, 
     1145  fNoLargeFileSupport, fNoMailtoMailRun, 
    11431146  fHttpRunWPSDefault, fFtpRunWPSDefault, fLibPathStrictMailRun, 
    11441147  fLibPathStrictHttpRun, fLibPathStrictFtpRun, fCancelAction, fTrashCan; 
    1145 DATADEF BOOL detailsladate, detailslatime, detailscrdate, detailscrtime, 
    1146   detailslongname, detailsea, detailssize, detailssubject, 
    1147   detailslwdate, detailslwtime, detailsattr, detailsicon; 
     1148DATADEF DETAILS_SETTINGS dsDirCnrDefault; 
    11481149DATADEF PID mypid; 
    11491150DATADEF INT driveflags[26], driveserial[26]; 
     
    11831184#define FILESTOGET_MAX  4096 
    11841185 
    1185 DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL, SubjectDisplayWidth; 
     1186DATADEF ULONG ulCnrType, FilesToGet, AutoviewHeight, TreeWidth, FM3UL; 
    11861187DATADEF long prnwidth, prnlength, prntmargin, prnbmargin, prnlmargin, 
    11871188  prnrmargin, prnspacing, prntabspaces; 
  • trunk/dll/init.c

    r1063 r1065  
    4646                keys using a "DirCnr." prefix 
    4747  20 Apr 08 GKY Change default cmd line length to 1024 Ask once if user wants to reset it. 
     48  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     49                all the details view settings (both the global variables and those in the 
     50                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    4851 
    4952***********************************************************************/ 
     
    958961   * to 0) 
    959962   */ 
    960   detailssize = detailsea = detailslwdate = detailslwtime = detailsattr = 
    961     detailsicon = fAutoTile = fConfirmDelete = fLoadSubject = fUnHilite = 
     963  dsDirCnrDefault.detailssize = dsDirCnrDefault.detailsea = dsDirCnrDefault.detailslwdate = 
     964    dsDirCnrDefault.detailslwtime = dsDirCnrDefault.detailsattr = dsDirCnrDefault.detailsicon = 
     965    fAutoTile = fConfirmDelete = fLoadSubject = fUnHilite = 
    962966    fLoadLongnames = fToolbar = fSaveState = fGuessType = fToolbarHelp = 
    963967    fAutoAddDirs = fUseNewViewer = fDataToFore = fDataShowDrives = 
     
    13651369  PrfQueryProfileData(fmprof, FM3Str, "TrashCan", &fTrashCan, &size); 
    13661370 
    1367   LoadDetailsSwitches("DirCnr", NULL); 
     1371  LoadDetailsSwitches("DirCnr", &dsDirCnrDefault); 
    13681372 
    13691373  /* load pointers and icons we use */ 
  • trunk/dll/mainwnd.c

    r1063 r1065  
    5959  30 Jun 08 JBS Ticket 103: Fix restore of previous shutdown state when opening FM/2 
    6060  07 Jul 08 JBS Ticket 242: Delete obsolete INI keys when re-saving a state 
     61  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
     62                all the details view settings (both the global variables and those in the 
     63                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    6164 
    6265***********************************************************************/ 
     
    28632866                                  sizeof(ULONG)); 
    28642867              sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, numsaves); 
    2865               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailslongname, 
     2868              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslongname, 
    28662869                                  sizeof(BOOL)); 
    28672870              sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, numsaves); 
    2868               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailssubject, 
     2871              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailssubject, 
    28692872                                  sizeof(BOOL)); 
    28702873              sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, numsaves); 
    2871               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailssize, 
     2874              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailssize, 
    28722875                                  sizeof(BOOL)); 
    28732876              sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, numsaves); 
    2874               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailsea, 
     2877              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsea, 
    28752878                                  sizeof(BOOL)); 
    28762879              sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, numsaves); 
    2877               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailsattr, 
     2880              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsattr, 
    28782881                                  sizeof(BOOL)); 
    28792882              sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, numsaves); 
    2880               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailsicon, 
     2883              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsicon, 
    28812884                                  sizeof(BOOL)); 
    28822885              sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, numsaves); 
    2883               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailslwdate, 
     2886              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslwdate, 
    28842887                                  sizeof(BOOL)); 
    28852888              sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, numsaves); 
    2886               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailslwtime, 
     2889              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslwtime, 
    28872890                                  sizeof(BOOL)); 
    28882891              sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, numsaves); 
    2889               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailsladate, 
     2892              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailsladate, 
    28902893                                  sizeof(BOOL)); 
    28912894              sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, numsaves); 
    2892               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailslatime, 
     2895              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailslatime, 
    28932896                                  sizeof(BOOL)); 
    28942897              sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, numsaves); 
    2895               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailscrdate, 
     2898              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailscrdate, 
    28962899                                  sizeof(BOOL)); 
    28972900              sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, numsaves); 
    2898               PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->detailscrtime, 
     2901              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->ds.detailscrtime, 
    28992902                                  sizeof(BOOL)); 
    29002903              sprintf(szKey, "%sDirCnr.%lu", szPrefix, numsaves); 
     
    31153118          if (fDeleteState) 
    31163119            PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    3117           localdcd.detailslongname = detailslongname;  // Set default 
     3120          localdcd.ds.detailslongname = dsDirCnrDefault.detailslongname;  // Set default 
    31183121          size = sizeof(BOOL); 
    31193122          sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, x); 
     
    31213124                                  FM3Str, 
    31223125                                  szKey, 
    3123                                   (PVOID)&localdcd.detailslongname, 
     3126                                  (PVOID)&localdcd.ds.detailslongname, 
    31243127                                  &size) && 
    31253128              size == sizeof(BOOL)) 
     
    31283131              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31293132          } 
    3130           localdcd.detailssubject = detailssubject;  // Set default 
     3133          localdcd.ds.detailssubject = dsDirCnrDefault.detailssubject;  // Set default 
    31313134          size = sizeof(BOOL); 
    31323135          sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, x); 
     
    31343137                                  FM3Str, 
    31353138                                  szKey, 
    3136                                   (PVOID)&localdcd.detailssubject, 
     3139                                  (PVOID)&localdcd.ds.detailssubject, 
    31373140                                  &size) && 
    31383141              size == sizeof(BOOL)) 
     
    31413144              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31423145          } 
    3143           localdcd.detailsea = detailsea;  // Set default 
     3146          localdcd.ds.detailsea = dsDirCnrDefault.detailsea;  // Set default 
    31443147          size = sizeof(BOOL); 
    31453148          sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, x); 
     
    31473150                                  FM3Str, 
    31483151                                  szKey, 
    3149                                   (PVOID) & localdcd.detailsea, 
     3152                                  (PVOID) & localdcd.ds.detailsea, 
    31503153                                  &size) && 
    31513154              size == sizeof(BOOL)) 
     
    31543157              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31553158          } 
    3156           localdcd.detailssize = detailssize;  // Set default 
     3159          localdcd.ds.detailssize = dsDirCnrDefault.detailssize;  // Set default 
    31573160          size = sizeof(BOOL); 
    31583161          sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, x); 
     
    31603163                                  FM3Str, 
    31613164                                  szKey, 
    3162                                   (PVOID) & localdcd.detailssize, 
     3165                                  (PVOID) & localdcd.ds.detailssize, 
    31633166                                  &size) && 
    31643167              size == sizeof(BOOL)) 
     
    31673170              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31683171          } 
    3169           localdcd.detailsicon = detailsicon;  // Set default 
     3172          localdcd.ds.detailsicon = dsDirCnrDefault.detailsicon;  // Set default 
    31703173          size = sizeof(BOOL); 
    31713174          sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, x); 
     
    31733176                                  FM3Str, 
    31743177                                  szKey, 
    3175                                   (PVOID) & localdcd.detailsicon, 
     3178                                  (PVOID) & localdcd.ds.detailsicon, 
    31763179                                  &size) && 
    31773180              size == sizeof(BOOL)) 
     
    31803183              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31813184          } 
    3182           localdcd.detailsattr = detailsattr;  // Set default 
     3185          localdcd.ds.detailsattr = dsDirCnrDefault.detailsattr;  // Set default 
    31833186          size = sizeof(BOOL); 
    31843187          sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, x); 
     
    31863189                                  FM3Str, 
    31873190                                  szKey, 
    3188                                   (PVOID)&localdcd.detailsattr, 
     3191                                  (PVOID)&localdcd.ds.detailsattr, 
    31893192                                  &size) && 
    31903193              size == sizeof(BOOL)) 
     
    31933196              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    31943197          } 
    3195           localdcd.detailscrdate = detailscrdate;  // Set default 
     3198          localdcd.ds.detailscrdate = dsDirCnrDefault.detailscrdate;  // Set default 
    31963199          size = sizeof(BOOL); 
    31973200          sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, x); 
     
    31993202                                  FM3Str, 
    32003203                                  szKey, 
    3201                                   (PVOID) & localdcd.detailscrdate, 
     3204                                  (PVOID) & localdcd.ds.detailscrdate, 
    32023205              &size) && size == sizeof(BOOL)) 
    32033206          { 
     
    32053208              PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 
    32063209  &