Ignore:
Timestamp:
Nov 13, 2007, 12:25:28 AM (18 years ago)
Author:
John Small
Message:

A "first draft" of code to address ticket 150.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ticket_150/dll/misc.c

    r860 r869  
    999999                           DIRCNRDATA * dcd, BOOL compare)
    10001000{
    1001   CHAR s[CCHMAXPATH], *eos = s;
    1002   BOOL *bool = NULL;
    1003 
    1004   *s = 0;
    1005   if (keyroot) {
    1006     strcpy(s, keyroot);
    1007     strcat(s, ".");
    1008     eos = &s[strlen(s)];
    1009   }
     1001//   CHAR s[CCHMAXPATH], *eos = s;
     1002   BOOL *bool = NULL;
     1003
     1004//   *s = 0;
     1005//   if (keyroot) {
     1006//     strcpy(s, keyroot);
     1007//     strcat(s, ".");
     1008//     eos = &s[strlen(s)];
     1009//   }
    10101010  switch (cmd) {
    10111011  case IDM_SHOWLNAMES:
    10121012    bool = dcd ? &dcd->detailslongname : &detailslongname;
    1013     strcpy(eos, "DetailsLongname");
     1013//     strcpy(eos, "DetailsLongname");
    10141014    break;
    10151015  case IDM_SHOWSUBJECT:
    10161016    bool = dcd ? &dcd->detailssubject : &detailssubject;
    1017     strcpy(eos, "DetailsSubject");
     1017//     strcpy(eos, "DetailsSubject");
    10181018    break;
    10191019  case IDM_SHOWEAS:
    10201020    bool = dcd ? &dcd->detailsea : &detailsea;
    1021     strcpy(eos, "DetailsEA");
     1021//     strcpy(eos, "DetailsEA");
    10221022    break;
    10231023  case IDM_SHOWSIZE:
    10241024    bool = dcd ? &dcd->detailssize : &detailssize;
    1025     strcpy(eos, "DetailsSize");
     1025//     strcpy(eos, "DetailsSize");
    10261026    break;
    10271027  case IDM_SHOWICON:
    10281028    bool = dcd ? &dcd->detailsicon : &detailsicon;
    1029     strcpy(eos, "DetailsIcon");
     1029//     strcpy(eos, "DetailsIcon");
    10301030    break;
    10311031  case IDM_SHOWLWDATE:
    10321032    bool = dcd ? &dcd->detailslwdate : &detailslwdate;
    1033     strcpy(eos, "DetailsLWDate");
     1033//     strcpy(eos, "DetailsLWDate");
    10341034    break;
    10351035  case IDM_SHOWLWTIME:
    10361036    bool = dcd ? &dcd->detailslwtime : &detailslwtime;
    1037     strcpy(eos, "DetailsLWTime");
     1037//     strcpy(eos, "DetailsLWTime");
    10381038    break;
    10391039  case IDM_SHOWLADATE:
    10401040    bool = dcd ? &dcd->detailsladate : &detailsladate;
    1041     strcpy(eos, "DetailsLADate");
     1041//     strcpy(eos, "DetailsLADate");
    10421042    break;
    10431043  case IDM_SHOWLATIME:
    10441044    bool = dcd ? &dcd->detailslatime : &detailslatime;
    1045     strcpy(eos, "DetailsLATime");
     1045//     strcpy(eos, "DetailsLATime");
    10461046    break;
    10471047  case IDM_SHOWCRDATE:
    10481048    bool = dcd ? &dcd->detailscrdate : &detailscrdate;
    1049     strcpy(eos, "DetailsCRDate");
     1049//     strcpy(eos, "DetailsCRDate");
    10501050    break;
    10511051  case IDM_SHOWCRTIME:
    10521052    bool = dcd ? &dcd->detailscrtime : &detailscrtime;
    1053     strcpy(eos, "DetailsCRTime");
     1053//     strcpy(eos, "DetailsCRTime");
    10541054    break;
    10551055  case IDM_SHOWATTR:
    10561056    bool = dcd ? &dcd->detailsattr : &detailsattr;
    1057     strcpy(eos, "DetailsAttr");
     1057//     strcpy(eos, "DetailsAttr");
    10581058    break;
    10591059  default:
     
    10641064  if (bool)
    10651065    *bool = *bool ? FALSE : TRUE;
    1066   if (*s && bool)
    1067     PrfWriteProfileData(fmprof, appname, s, bool, sizeof(BOOL));
     1066//   if (*s && bool)
     1067//     PrfWriteProfileData(fmprof, appname, s, bool, sizeof(BOOL));
    10681068  if (hwnd)
    10691069    AdjustCnrColsForPref(hwnd, directory, dcd, compare);
     
    12091209    strcat(s, ".");
    12101210    eos = &s[strlen(s)];
     1211  } else
     1212  {
     1213     dcd->detailslongname = detailslongname;
     1214     dcd->detailssubject = detailssubject;
     1215     dcd->detailsea = detailsea;
     1216     dcd->detailssize = detailssize;
     1217     dcd->detailsicon = detailsicon;
     1218     dcd->detailsattr = detailsattr;
     1219     dcd->detailscrdate = detailscrdate;
     1220     dcd->detailscrtime = detailscrtime;
     1221     dcd->detailslwdate = detailslwdate;
     1222     dcd->detailslwtime = detailslwtime;
     1223     dcd->detailsladate = detailsladate;
     1224     dcd->detailslatime = detailslatime;
     1225     return;
    12111226  }
    12121227  strcpy(eos, "DetailsLongname");
Note: See TracChangeset for help on using the changeset viewer.