Changeset 997


Ignore:
Timestamp:
Mar 8, 2008, 9:27:18 PM (18 years ago)
Author:
John Small
Message:

Ticket 230: Make all INI keys for default directory container settings use the
"DirCnr." prefix.

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r989 r997  
    13441344  PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", &fFM2Deletes, &size);
    13451345
    1346   size = sizeof(BOOL);
    1347   PrfQueryProfileData(fmprof, appname, "DetailsLWDate", &detailslwdate, &size);
    1348   size = sizeof(BOOL);
    1349   PrfQueryProfileData(fmprof, appname, "DetailsLWTime", &detailslwtime, &size);
    1350   size = sizeof(BOOL);
    1351   PrfQueryProfileData(fmprof, appname, "DetailsLADate", &detailsladate, &size);
    1352   size = sizeof(BOOL);
    1353   PrfQueryProfileData(fmprof, appname, "DetailsLATime", &detailslatime, &size);
    1354   size = sizeof(BOOL);
    1355   PrfQueryProfileData(fmprof, appname, "DetailsCRDate", &detailscrdate, &size);
    1356   size = sizeof(BOOL);
    1357   PrfQueryProfileData(fmprof, appname, "DetailsCRTime", &detailscrtime, &size);
    1358   size = sizeof(BOOL);
    1359   PrfQueryProfileData(fmprof, appname, "DetailsLongname", &detailslongname, &size);
    1360   size = sizeof(BOOL);
    1361   PrfQueryProfileData(fmprof, appname, "DetailsEA", &detailsea, &size);
    1362   size = sizeof(BOOL);
    1363   PrfQueryProfileData(fmprof, appname, "DetailsSize", &detailssize, &size);
    1364   size = sizeof(BOOL);
    1365   PrfQueryProfileData(fmprof, appname, "DetailsSubject", &detailssubject, &size);
    1366   size = sizeof(BOOL);
    1367   PrfQueryProfileData(fmprof, appname, "DetailsAttr", &detailsattr, &size);
    1368   size = sizeof(BOOL);
    1369   PrfQueryProfileData(fmprof, appname, "DetailsIcon", &detailsicon, &size);
    1370   size = sizeof(BOOL);
    1371   PrfQueryProfileData(fmprof, appname, "SubjectInLeftPane", &fSubjectInLeftPane,
    1372                       &size);
    1373   size = sizeof(BOOL);
    1374   PrfQueryProfileData(fmprof, appname, "SubjectLengthMax", &fSubjectLengthMax,
    1375                       &size);
    1376   if (fSubjectLengthMax)
    1377     SubjectDisplayWidth = 0;
    1378   else {
    1379     PrfQueryProfileData(fmprof, appname, "SubjectDisplayWidth",
    1380                         &SubjectDisplayWidth, &size);
    1381     if (SubjectDisplayWidth < 50)
    1382       SubjectDisplayWidth = 0;
    1383     else if (SubjectDisplayWidth > 1000)
    1384       SubjectDisplayWidth = 1000;
    1385   }
     1346  LoadDetailsSwitches("DirCnr", NULL);
     1347//   size = sizeof(BOOL);
     1348//   PrfQueryProfileData(fmprof, appname, "DetailsLWDate", &detailslwdate, &size);
     1349//   size = sizeof(BOOL);
     1350//   PrfQueryProfileData(fmprof, appname, "DetailsLWTime", &detailslwtime, &size);
     1351//   size = sizeof(BOOL);
     1352//   PrfQueryProfileData(fmprof, appname, "DetailsLADate", &detailsladate, &size);
     1353//   size = sizeof(BOOL);
     1354//   PrfQueryProfileData(fmprof, appname, "DetailsLATime", &detailslatime, &size);
     1355//   size = sizeof(BOOL);
     1356//   PrfQueryProfileData(fmprof, appname, "DetailsCRDate", &detailscrdate, &size);
     1357//   size = sizeof(BOOL);
     1358//   PrfQueryProfileData(fmprof, appname, "DetailsCRTime", &detailscrtime, &size);
     1359//   size = sizeof(BOOL);
     1360//   PrfQueryProfileData(fmprof, appname, "DetailsLongname", &detailslongname, &size);
     1361//   size = sizeof(BOOL);
     1362//   PrfQueryProfileData(fmprof, appname, "DetailsEA", &detailsea, &size);
     1363//   size = sizeof(BOOL);
     1364//   PrfQueryProfileData(fmprof, appname, "DetailsSize", &detailssize, &size);
     1365//   size = sizeof(BOOL);
     1366//   PrfQueryProfileData(fmprof, appname, "DetailsSubject", &detailssubject, &size);
     1367//   size = sizeof(BOOL);
     1368//   PrfQueryProfileData(fmprof, appname, "DetailsAttr", &detailsattr, &size);
     1369//   size = sizeof(BOOL);
     1370//   PrfQueryProfileData(fmprof, appname, "DetailsIcon", &detailsicon, &size);
     1371//   size = sizeof(BOOL);
     1372//   PrfQueryProfileData(fmprof, appname, "SubjectInLeftPane", &fSubjectInLeftPane,
     1373//                    &size);
     1374//   size = sizeof(BOOL);
     1375//   PrfQueryProfileData(fmprof, appname, "SubjectLengthMax", &fSubjectLengthMax,
     1376//                    &size);
     1377//   if (fSubjectLengthMax)
     1378//     SubjectDisplayWidth = 0;
     1379//   else {
     1380//     PrfQueryProfileData(fmprof, appname, "SubjectDisplayWidth",
     1381//                      &SubjectDisplayWidth, &size);
     1382//     if (SubjectDisplayWidth < 50)
     1383//       SubjectDisplayWidth = 0;
     1384//     else if (SubjectDisplayWidth > 1000)
     1385//       SubjectDisplayWidth = 1000;
     1386//   }
    13861387
    13871388  /* load pointers and icons we use */
  • trunk/dll/misc.c

    r989 r997  
    10361036                           DIRCNRDATA * dcd, BOOL compare)
    10371037{
    1038 // JBS  CHAR s[CCHMAXPATH], *eos = s;
    10391038  BOOL *bool = NULL;
    10401039
    1041 // JBS  *s = 0;
    1042 // JBS  if (keyroot) {
    1043 // JBS    strcpy(s, keyroot);
    1044 // JBS    strcat(s, ".");
    1045 // JBS    eos = &s[strlen(s)];
    1046 // JBS  }
    10471040  switch (cmd) {
    10481041  case IDM_SHOWLNAMES:
    10491042    bool = dcd ? &dcd->detailslongname : &detailslongname;
    1050 // JBS    strcpy(eos, "DetailsLongname");
    10511043    break;
    10521044  case IDM_SHOWSUBJECT:
    10531045    bool = dcd ? &dcd->detailssubject : &detailssubject;
    1054 // JBS    strcpy(eos, "DetailsSubject");
    10551046    break;
    10561047  case IDM_SHOWEAS:
    10571048    bool = dcd ? &dcd->detailsea : &detailsea;
    1058 // JBS    strcpy(eos, "DetailsEA");
    10591049    break;
    10601050  case IDM_SHOWSIZE:
    10611051    bool = dcd ? &dcd->detailssize : &detailssize;
    1062 // JBS    strcpy(eos, "DetailsSize");
    10631052    break;
    10641053  case IDM_SHOWICON:
    10651054    bool = dcd ? &dcd->detailsicon : &detailsicon;
    1066 // JBS    strcpy(eos, "DetailsIcon");
    10671055    break;
    10681056  case IDM_SHOWLWDATE:
    10691057    bool = dcd ? &dcd->detailslwdate : &detailslwdate;
    1070 // JBS    strcpy(eos, "DetailsLWDate");
    10711058    break;
    10721059  case IDM_SHOWLWTIME:
    10731060    bool = dcd ? &dcd->detailslwtime : &detailslwtime;
    1074 // JBS    strcpy(eos, "DetailsLWTime");
    10751061    break;
    10761062  case IDM_SHOWLADATE:
    10771063    bool = dcd ? &dcd->detailsladate : &detailsladate;
    1078 // JBS    strcpy(eos, "DetailsLADate");
    10791064    break;
    10801065  case IDM_SHOWLATIME:
    10811066    bool = dcd ? &dcd->detailslatime : &detailslatime;
    1082 // JBS    strcpy(eos, "DetailsLATime");
    10831067    break;
    10841068  case IDM_SHOWCRDATE:
    10851069    bool = dcd ? &dcd->detailscrdate : &detailscrdate;
    1086 // JBS    strcpy(eos, "DetailsCRDate");
    10871070    break;
    10881071  case IDM_SHOWCRTIME:
    10891072    bool = dcd ? &dcd->detailscrtime : &detailscrtime;
    1090 // JBS    strcpy(eos, "DetailsCRTime");
    10911073    break;
    10921074  case IDM_SHOWATTR:
    10931075    bool = dcd ? &dcd->detailsattr : &detailsattr;
    1094 // JBS    strcpy(eos, "DetailsAttr");
    10951076    break;
    10961077  default:
     
    11011082  if (bool)
    11021083    *bool = *bool ? FALSE : TRUE;
    1103 // JBS  if (*s && bool)
    1104 // JBS    PrfWriteProfileData(fmprof, appname, s, bool, sizeof(BOOL));
    11051084  if (hwnd)
    11061085    AdjustCnrColsForPref(hwnd, directory, dcd, compare);
     
    12491228  BOOL *bool;
    12501229
    1251 // JBS - No calls to LoadDetailsSwitches have a NULL keyroot.
    1252 //  *s = 0;
    1253 //  if (keyroot) {
    1254     strcpy(s, keyroot);
    1255     strcat(s, ".");
    1256     eos = &s[strlen(s)];
    1257 //  }
     1230  strcpy(s, keyroot);
     1231  strcat(s, ".");
     1232  eos = &s[strlen(s)];
    12581233  strcpy(eos, "DetailsLongname");
    12591234  if (dcd)
  • trunk/dll/notebook.c

    r985 r997  
    18121812    }
    18131813    detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES);
    1814     PrfWriteProfileData(fmprof, appname, "DetailsLongname",
     1814    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
    18151815                        &detailslongname, sizeof(BOOL));
    18161816    detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
    1817     PrfWriteProfileData(fmprof, appname, "DetailsSubject",
     1817    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
    18181818                        &detailssubject, sizeof(BOOL));
    1819     PrfWriteProfileData(fmprof, appname, "DetailsEA",
     1819    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
    18201820                        &detailsea, sizeof(BOOL));
    18211821    detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE);
    1822     PrfWriteProfileData(fmprof, appname, "DetailsSize",
     1822    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
    18231823                        &detailssize, sizeof(BOOL));
    18241824    detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON);
    1825     PrfWriteProfileData(fmprof, appname, "DetailsIcon",
     1825    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
    18261826                        &detailsicon, sizeof(BOOL));
    18271827    detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE);
    1828     PrfWriteProfileData(fmprof, appname, "DetailsLWDate",
     1828    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
    18291829                        &detailslwdate, sizeof(BOOL));
    18301830    detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME);
    1831     PrfWriteProfileData(fmprof, appname, "DetailsLWTime",
     1831    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
    18321832                        &detailslwtime, sizeof(BOOL));
    18331833    detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE);
    1834     PrfWriteProfileData(fmprof, appname, "DetailsLADate",
     1834    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
    18351835                        &detailsladate, sizeof(BOOL));
    18361836    detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME);
    1837     PrfWriteProfileData(fmprof, appname, "DetailsLATime",
     1837    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
    18381838                        &detailslatime, sizeof(BOOL));
    18391839    detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE);
    1840     PrfWriteProfileData(fmprof, appname, "DetailsCRDate",
     1840    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
    18411841                        &detailscrdate, sizeof(BOOL));
    18421842    detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME);
    1843     PrfWriteProfileData(fmprof, appname, "DetailsCRTime",
     1843    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
    18441844                        &detailscrtime, sizeof(BOOL));
    18451845    detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR);
    1846     PrfWriteProfileData(fmprof, appname, "DetailsAttr",
     1846    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
    18471847                        &detailsattr, sizeof(BOOL));
    18481848    fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE);
    1849     PrfWriteProfileData(fmprof, appname, "SubjectInLeftPane",
     1849    PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectInLeftPane",
    18501850                        &fSubjectInLeftPane, sizeof(BOOL));
    18511851    fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX);
    1852     PrfWriteProfileData(fmprof, appname, "SubjectLengthMax",
     1852    PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectLengthMax",
    18531853                        &fSubjectLengthMax, sizeof(BOOL));
    18541854    *mask.prompt = 0;
     
    18661866          SubjectDisplayWidth = 0;
    18671867        PrfWriteProfileData(fmprof,
    1868                             appname, "SubjectDisplayWidth",
     1868                            appname, "DirCnr.SubjectDisplayWidth",
    18691869                            &SubjectDisplayWidth, sizeof(ULONG));
    18701870    }
     
    29562956    }
    29572957    // Save new details settings and refresh windows
    2958     PrfWriteProfileData(fmprof, appname, "DetailsLongname",
     2958    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
    29592959                        &detailslongname, sizeof(BOOL));
    2960     PrfWriteProfileData(fmprof, appname, "DetailsSubject",
     2960    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
    29612961                        &detailssubject, sizeof(BOOL));
    2962     PrfWriteProfileData(fmprof, appname, "DetailsEA",
     2962    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
    29632963                        &detailsea, sizeof(BOOL));
    2964     PrfWriteProfileData(fmprof, appname, "DetailsSize",
     2964    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
    29652965                        &detailssize, sizeof(BOOL));
    2966     PrfWriteProfileData(fmprof, appname, "DetailsIcon",
     2966    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
    29672967                        &detailsicon, sizeof(BOOL));
    2968     PrfWriteProfileData(fmprof, appname, "DetailsLWDate",
     2968    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
    29692969                        &detailslwdate, sizeof(BOOL));
    2970     PrfWriteProfileData(fmprof, appname, "DetailsLWTime",
     2970    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
    29712971                        &detailslwtime, sizeof(BOOL));
    2972     PrfWriteProfileData(fmprof, appname, "DetailsLADate",
     2972    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
    29732973                        &detailsladate, sizeof(BOOL));
    2974     PrfWriteProfileData(fmprof, appname, "DetailsLATime",
     2974    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
    29752975                        &detailslatime, sizeof(BOOL));
    2976     PrfWriteProfileData(fmprof, appname, "DetailsCRDate",
     2976    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
    29772977                        &detailscrdate, sizeof(BOOL));
    2978     PrfWriteProfileData(fmprof, appname, "DetailsCRTime",
     2978    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
    29792979                        &detailscrtime, sizeof(BOOL));
    2980     PrfWriteProfileData(fmprof, appname, "DetailsAttr",
     2980    PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
    29812981                        &detailsattr, sizeof(BOOL));
    29822982    if (hwndMain) {
     
    29862986        PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2));
    29872987        // Restore saved state
    2988 //      PostMsg(hwndMain, UM_RESTORE, MPVOID, MPVOID);
    29892988        PostMsg(MainObjectHwnd, UM_RESTORE, GetPString(IDS_FM2TEMPTEXT), MPVOID);
    29902989      }
Note: See TracChangeset for help on using the changeset viewer.