Changeset 1065 for trunk/dll/misc.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/misc.c

    r1039 r1065  
    4545  19 Jun 08 JBS Ticket 239: Fix LoadDetailsSwitches so INI file is read correctly and details
    4646                switches are set correctly.
    47   21 Jun 08 GKY Fix LoadDetailsSwitches to actually use the keyroot value passed (change strcpy to strcat)
     47  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating
     48                all the details view settings (both the global variables and those in the
     49                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
    4850
    4951***********************************************************************/
     
    368370}
    369371
    370 VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd)
     372VOID AdjustCnrColsForFSType(HWND hwndCnr, CHAR * directory, DETAILS_SETTINGS * pds)
    371373{
    372374  CHAR FileSystem[CCHMAXPATH];
     
    375377  BOOL hasAccessDT;
    376378  BOOL hasLongNames;
    377   BOOL *pBool;
    378379
    379380  if (!directory || !*directory)
     
    410411    hasLongNames = FALSE;
    411412  }
    412   pBool = dcd ? &dcd->detailsladate : &detailsladate;
    413413  AdjustCnrColVis(hwndCnr,
    414414                  GetPString(IDS_LADATE),
    415                   *pBool ? hasAccessDT : FALSE,
     415                  pds->detailsladate ? hasAccessDT : FALSE,
    416416                  FALSE);
    417   pBool = dcd ? &dcd->detailslatime : &detailslatime;
    418417  AdjustCnrColVis(hwndCnr,
    419418                  GetPString(IDS_LATIME),
    420                   *pBool ? hasAccessDT : FALSE,
     419                  pds->detailslatime ? hasAccessDT : FALSE,
    421420                  FALSE);
    422   pBool = dcd ? &dcd->detailscrdate : &detailscrdate;
    423421  AdjustCnrColVis(hwndCnr,
    424422                  GetPString(IDS_CRDATE),
    425                   *pBool ? hasCreateDT : FALSE,
     423                  pds->detailscrdate ? hasCreateDT : FALSE,
    426424                  FALSE);
    427   pBool = dcd ? &dcd->detailscrtime : &detailscrtime;
    428425  AdjustCnrColVis(hwndCnr,
    429426                  GetPString(IDS_CRTIME),
    430                   *pBool ? hasCreateDT : FALSE,
     427                  pds->detailscrtime ? hasCreateDT : FALSE,
    431428                  FALSE);
    432   pBool = dcd ? &dcd->detailslongname : &detailslongname;
    433429  AdjustCnrColVis(hwndCnr,
    434430                  GetPString(IDS_LNAME),
    435                   *pBool ? hasLongNames : FALSE,
     431                  pds->detailslongname ? hasLongNames : FALSE,
    436432                  FALSE);
    437433  WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID);
    438434}
    439435
    440 VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DIRCNRDATA * dcd,
     436VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DETAILS_SETTINGS * pds,
    441437                          BOOL compare)
    442438{
    443   BOOL *bool;
    444 
    445   bool = dcd ? &dcd->detailssubject : &detailssubject;
     439
    446440  AdjustCnrColVis(hwndCnr,
    447441                  compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ),
    448                   *bool,
     442                  pds->detailssubject,
    449443                  FALSE);
    450444
    451   bool = dcd ? &dcd->detailsattr : &detailsattr;
    452   AdjustCnrColVis(hwndCnr, GetPString(IDS_ATTR), *bool, FALSE);
    453   bool = dcd ? &dcd->detailsicon : &detailsicon;
    454   AdjustCnrColVis(hwndCnr, GetPString(IDS_ICON), *bool, FALSE);
    455   bool = dcd ? &dcd->detailslwdate : &detailslwdate;
    456   AdjustCnrColVis(hwndCnr, GetPString(IDS_LWDATE), *bool, FALSE);
    457   bool = dcd ? &dcd->detailslwtime : &detailslwtime;
    458   AdjustCnrColVis(hwndCnr, GetPString(IDS_LWTIME), *bool, FALSE);
    459   bool = dcd ? &dcd->detailsea : &detailsea;
    460   AdjustCnrColVis(hwndCnr, GetPString(IDS_EA), *bool, FALSE);
    461   bool = dcd ? &dcd->detailssize : &detailssize;
    462   AdjustCnrColVis(hwndCnr, GetPString(IDS_SIZE), *bool, FALSE);
     445  AdjustCnrColVis(hwndCnr, GetPString(IDS_ATTR), pds->detailsattr, FALSE);
     446  AdjustCnrColVis(hwndCnr, GetPString(IDS_ICON), pds->detailsicon, FALSE);
     447  AdjustCnrColVis(hwndCnr, GetPString(IDS_LWDATE), pds->detailslwdate, FALSE);
     448  AdjustCnrColVis(hwndCnr, GetPString(IDS_LWTIME), pds->detailslwtime, FALSE);
     449  AdjustCnrColVis(hwndCnr, GetPString(IDS_EA), pds->detailsea, FALSE);
     450  AdjustCnrColVis(hwndCnr, GetPString(IDS_SIZE), pds->detailssize, FALSE);
    463451
    464452  if (!directory) {
    465     bool = dcd ? &dcd->detailsladate : &detailsladate;
    466     AdjustCnrColVis(hwndCnr, GetPString(IDS_LADATE), *bool, FALSE);
    467     bool = dcd ? &dcd->detailslatime : &detailslatime;
    468     AdjustCnrColVis(hwndCnr, GetPString(IDS_LATIME), *bool, FALSE);
    469     bool = dcd ? &dcd->detailscrdate : &detailscrdate;
    470     AdjustCnrColVis(hwndCnr, GetPString(IDS_CRDATE), *bool, FALSE);
    471     bool = dcd ? &dcd->detailscrtime : &detailscrtime;
    472     AdjustCnrColVis(hwndCnr, GetPString(IDS_CRTIME), *bool, FALSE);
    473     bool = dcd ? &dcd->detailslongname : &detailslongname;
    474     AdjustCnrColVis(hwndCnr, GetPString(IDS_LNAME), *bool, FALSE);
     453    AdjustCnrColVis(hwndCnr, GetPString(IDS_LADATE), pds->detailsladate, FALSE);
     454    AdjustCnrColVis(hwndCnr, GetPString(IDS_LATIME), pds->detailslatime, FALSE);
     455    AdjustCnrColVis(hwndCnr, GetPString(IDS_CRDATE), pds->detailscrdate, FALSE);
     456    AdjustCnrColVis(hwndCnr, GetPString(IDS_CRTIME), pds->detailscrtime, FALSE);
     457    AdjustCnrColVis(hwndCnr, GetPString(IDS_LNAME), pds->detailslongname, FALSE);
    475458    WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID);
    476459  }
    477460  else
    478     AdjustCnrColsForFSType(hwndCnr, directory, dcd);
     461    AdjustCnrColsForFSType(hwndCnr, directory, pds);
    479462}
    480463
     
    533516    // Fill in column info for subjects
    534517
    535     if (fSubjectInLeftPane) {
     518    if (dsDirCnrDefault.fSubjectInLeftPane) {
    536519      pfi = pfi->pNextFieldInfo;
    537520      pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR;
     
    542525                                  GetPString(IDS_SUBJ);
    543526      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject);
    544       pfi->cxWidth = SubjectDisplayWidth;
     527      pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth;
    545528
    546529      // Store the current pfi value as that will be used to indicate the
     
    562545                                  GetPString(IDS_SUBJ);
    563546      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject);
    564       pfi->cxWidth = SubjectDisplayWidth;
     547      pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth;
    565548    }
    566549
     
    1011994}
    1012995
    1013 VOID SetDetailsSwitches(HWND hwnd, DIRCNRDATA * dcd)
    1014 {
    1015   WinCheckMenuItem(hwnd, IDM_SHOWLNAMES,
    1016                    dcd ? dcd->detailslongname : detailslongname);
    1017   WinCheckMenuItem(hwnd, IDM_SHOWSUBJECT,
    1018                    dcd ? dcd->detailssubject : detailssubject);
    1019   WinCheckMenuItem(hwnd, IDM_SHOWEAS, dcd ? dcd->detailsea : detailsea);
    1020   WinCheckMenuItem(hwnd, IDM_SHOWSIZE,
    1021                    dcd ? dcd->detailssize : detailssize);
    1022   WinCheckMenuItem(hwnd, IDM_SHOWICON,
    1023                    dcd ? dcd->detailsicon : detailsicon);
    1024   WinCheckMenuItem(hwnd, IDM_SHOWLWDATE,
    1025                    dcd ? dcd->detailslwdate : detailslwdate);
    1026   WinCheckMenuItem(hwnd, IDM_SHOWLWTIME,
    1027                    dcd ? dcd->detailslwtime : detailslwtime);
    1028   WinCheckMenuItem(hwnd, IDM_SHOWLADATE,
    1029                    dcd ? dcd->detailsladate : detailsladate);
    1030   WinCheckMenuItem(hwnd, IDM_SHOWLATIME,
    1031                    dcd ? dcd->detailslatime : detailslatime);
    1032   WinCheckMenuItem(hwnd, IDM_SHOWCRDATE,
    1033                    dcd ? dcd->detailscrdate : detailscrdate);
    1034   WinCheckMenuItem(hwnd, IDM_SHOWCRTIME,
    1035                    dcd ? dcd->detailscrtime : detailscrtime);
    1036   WinCheckMenuItem(hwnd, IDM_SHOWATTR,
    1037                    dcd ? dcd->detailsattr : detailsattr);
     996VOID SetDetailsSwitches(HWND hwnd, DETAILS_SETTINGS * pds)
     997{
     998  WinCheckMenuItem(hwnd, IDM_SHOWLNAMES, pds->detailslongname);
     999  WinCheckMenuItem(hwnd, IDM_SHOWSUBJECT, pds->detailssubject);
     1000  WinCheckMenuItem(hwnd, IDM_SHOWEAS, pds->detailsea);
     1001  WinCheckMenuItem(hwnd, IDM_SHOWSIZE, pds->detailssize);
     1002  WinCheckMenuItem(hwnd, IDM_SHOWICON, pds->detailsicon);
     1003  WinCheckMenuItem(hwnd, IDM_SHOWLWDATE, pds->detailslwdate);
     1004  WinCheckMenuItem(hwnd, IDM_SHOWLWTIME, pds->detailslwtime);
     1005  WinCheckMenuItem(hwnd, IDM_SHOWLADATE, pds->detailsladate);
     1006  WinCheckMenuItem(hwnd, IDM_SHOWLATIME, pds->detailslatime);
     1007  WinCheckMenuItem(hwnd, IDM_SHOWCRDATE, pds->detailscrdate);
     1008  WinCheckMenuItem(hwnd, IDM_SHOWCRTIME, pds->detailscrtime);
     1009  WinCheckMenuItem(hwnd, IDM_SHOWATTR, pds->detailsattr);
    10381010}
    10391011
    10401012VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd,
    10411013                           CHAR * directory, CHAR * keyroot,
    1042                            DIRCNRDATA * dcd, BOOL compare)
     1014                           DETAILS_SETTINGS * pds, BOOL compare)
    10431015{
    10441016  BOOL *bool = NULL;
     
    10461018  switch (cmd) {
    10471019  case IDM_SHOWLNAMES:
    1048     bool = dcd ? &dcd->detailslongname : &detailslongname;
     1020    bool = &pds->detailslongname;
    10491021    break;
    10501022  case IDM_SHOWSUBJECT:
    1051     bool = dcd ? &dcd->detailssubject : &detailssubject;
     1023    bool = &pds->detailssubject;
    10521024    break;
    10531025  case IDM_SHOWEAS:
    1054     bool = dcd ? &dcd->detailsea : &detailsea;
     1026    bool = &pds->detailsea;
    10551027    break;
    10561028  case IDM_SHOWSIZE:
    1057     bool = dcd ? &dcd->detailssize : &detailssize;
     1029    bool = &pds->detailssize;
    10581030    break;
    10591031  case IDM_SHOWICON:
    1060     bool = dcd ? &dcd->detailsicon : &detailsicon;
     1032    bool = &pds->detailsicon;
    10611033    break;
    10621034  case IDM_SHOWLWDATE:
    1063     bool = dcd ? &dcd->detailslwdate : &detailslwdate;
     1035    bool = &pds->detailslwdate;
    10641036    break;
    10651037  case IDM_SHOWLWTIME:
    1066     bool = dcd ? &dcd->detailslwtime : &detailslwtime;
     1038    bool = &pds->detailslwtime;
    10671039    break;
    10681040  case IDM_SHOWLADATE:
    1069     bool = dcd ? &dcd->detailsladate : &detailsladate;
     1041    bool = &pds->detailsladate;
    10701042    break;
    10711043  case IDM_SHOWLATIME:
    1072     bool = dcd ? &dcd->detailslatime : &detailslatime;
     1044    bool = &pds->detailslatime;
    10731045    break;
    10741046  case IDM_SHOWCRDATE:
    1075     bool = dcd ? &dcd->detailscrdate : &detailscrdate;
     1047    bool = &pds->detailscrdate;
    10761048    break;
    10771049  case IDM_SHOWCRTIME:
    1078     bool = dcd ? &dcd->detailscrtime : &detailscrtime;
     1050    bool = &pds->detailscrtime;
    10791051    break;
    10801052  case IDM_SHOWATTR:
    1081     bool = dcd ? &dcd->detailsattr : &detailsattr;
     1053    bool = &pds->detailsattr;
    10821054    break;
    10831055  default:
    10841056    if (hwndMenu)
    1085       SetDetailsSwitches(hwndMenu, dcd);
     1057      SetDetailsSwitches(hwndMenu, pds);
    10861058    return;
    10871059  }
     
    10891061    *bool = *bool ? FALSE : TRUE;
    10901062  if (hwnd)
    1091     AdjustCnrColsForPref(hwnd, directory, dcd, compare);
     1063    AdjustCnrColsForPref(hwnd, directory, pds, compare);
    10921064  if (hwndMenu)
    1093     SetDetailsSwitches(hwndMenu, dcd);
     1065    SetDetailsSwitches(hwndMenu, pds);
    10941066}
    10951067
     
    12281200}
    12291201
    1230 VOID LoadDetailsSwitches(CHAR * keyroot, DIRCNRDATA * dcd)
     1202VOID LoadDetailsSwitches(CHAR * keyroot, DETAILS_SETTINGS * pds)
    12311203{
    12321204  ULONG size;
    12331205  CHAR s[CCHMAXPATH], *eos = s;
    1234   BOOL *bool;
    12351206
    12361207  strcpy(s, keyroot);
    12371208  strcat(s, ".");
    12381209  eos = &s[strlen(s)];
    1239   strcat(s, "DetailsLongname");
    1240   if (dcd)
    1241     bool = &dcd->detailslongname;
    1242   else
    1243     bool = &detailslongname;
    1244   *bool = detailslongname;
     1210  strcpy(eos, "DetailsLongname");
     1211  pds->detailslongname = dsDirCnrDefault.detailslongname;
    12451212  size = sizeof(BOOL);
    1246   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1213  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailslongname, &size);
    12471214  strcpy(eos, "DetailsSubject");
    1248   if (dcd)
    1249     bool = &dcd->detailssubject;
    1250   else
    1251     bool = &detailssubject;
    1252   *bool = detailssubject;
     1215  pds->detailssubject = dsDirCnrDefault.detailssubject;
    12531216  size = sizeof(BOOL);
    1254   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1217  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailssubject, &size);
    12551218  strcpy(eos, "DetailsEA");
    1256   if (dcd)
    1257     bool = &dcd->detailsea;
    1258   else
    1259     bool = &detailsea;
    1260   *bool = detailsea;
     1219  pds->detailsea = dsDirCnrDefault.detailsea;
    12611220  size = sizeof(BOOL);
    1262   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1221  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailsea, &size);
    12631222  strcpy(eos, "DetailsSize");
    1264   if (dcd)
    1265     bool = &dcd->detailssize;
    1266   else
    1267     bool = &detailssize;
    1268   *bool = detailssize;
     1223  pds->detailssize = dsDirCnrDefault.detailssize;
    12691224  size = sizeof(BOOL);
    1270   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1225  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailssize, &size);
    12711226  strcpy(eos, "DetailsIcon");
    1272   if (dcd)
    1273     bool = &dcd->detailsicon;
    1274   else
    1275     bool = &detailsicon;
    1276   *bool = detailsicon;
     1227  pds->detailsicon = dsDirCnrDefault.detailsicon;
    12771228  size = sizeof(BOOL);
    1278   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1229  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailsicon, &size);
    12791230  strcpy(eos, "DetailsAttr");
    1280   if (dcd)
    1281     bool = &dcd->detailsattr;
    1282   else
    1283     bool = &detailsattr;
    1284   *bool = detailsattr;
     1231  pds->detailsattr = dsDirCnrDefault.detailsattr;
    12851232  size = sizeof(BOOL);
    1286   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1233  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailsattr, &size);
    12871234  strcpy(eos, "DetailsCRDate");
    1288   if (dcd)
    1289     bool = &dcd->detailscrdate;
    1290   else
    1291     bool = &detailscrdate;
    1292   *bool = detailscrdate;
     1235  pds->detailscrdate = dsDirCnrDefault.detailscrdate;
    12931236  size = sizeof(BOOL);
    1294   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1237  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailscrdate, &size);
    12951238  strcpy(eos, "DetailsCRTime");
    1296   if (dcd)
    1297     bool = &dcd->detailscrtime;
    1298   else
    1299     bool = &detailscrtime;
    1300   *bool = detailscrtime;
     1239  pds->detailscrtime = dsDirCnrDefault.detailscrtime;
    13011240  size = sizeof(BOOL);
    1302   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1241  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailscrtime, &size);
    13031242  strcpy(eos, "DetailsLWDate");
    1304   if (dcd)
    1305     bool = &dcd->detailslwdate;
    1306   else
    1307     bool = &detailslwdate;
    1308   *bool = detailslwdate;
     1243  pds->detailslwdate = dsDirCnrDefault.detailslwdate;
    13091244  size = sizeof(BOOL);
    1310   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1245  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailslwdate, &size);
    13111246  strcpy(eos, "DetailsLWTime");
    1312   if (dcd)
    1313     bool = &dcd->detailslwtime;
    1314   else
    1315     bool = &detailslwtime;
    1316   *bool = detailslwtime;
     1247  pds->detailslwtime = dsDirCnrDefault.detailslwtime;
    13171248  size = sizeof(BOOL);
    1318   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1249  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailslwtime, &size);
    13191250  strcpy(eos, "DetailsLADate");
    1320   if (dcd)
    1321     bool = &dcd->detailsladate;
    1322   else
    1323     bool = &detailsladate;
    1324   *bool = detailsladate;
     1251  pds->detailsladate = dsDirCnrDefault.detailsladate;
    13251252  size = sizeof(BOOL);
    1326   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1253  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailsladate, &size);
    13271254  strcpy(eos, "DetailsLATime");
    1328   if (dcd)
    1329     bool = &dcd->detailslatime;
    1330   else
    1331     bool = &detailslatime;
    1332   *bool = detailslatime;
     1255  pds->detailslatime = dsDirCnrDefault.detailslatime;
    13331256  size = sizeof(BOOL);
    1334   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1257  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->detailslatime, &size);
    13351258  strcpy(eos, "SubjectInLeftPane");
    1336   if (dcd)
    1337     bool = &dcd->fSubjectInLeftPane;
    1338   else
    1339     bool = &fSubjectInLeftPane;
    1340   *bool = fSubjectInLeftPane;
     1259  pds->fSubjectInLeftPane = dsDirCnrDefault.fSubjectInLeftPane;
    13411260  size = sizeof(BOOL);
    1342   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
     1261  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->fSubjectInLeftPane, &size);
    13431262  strcpy(eos, "SubjectLengthMax");
    1344   if (dcd)
    1345     bool = &dcd->fSubjectLengthMax;
    1346   else
    1347     bool = &fSubjectLengthMax;
    1348   *bool = fSubjectLengthMax;
     1263  pds->fSubjectLengthMax = dsDirCnrDefault.fSubjectLengthMax;
    13491264  size = sizeof(BOOL);
    1350   PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
    1351   if (dcd) {
    1352     if (dcd->fSubjectLengthMax)
    1353       dcd->SubjectDisplayWidth = 0;
    1354     else {
    1355       strcpy(eos, "SubjectDisplayWidth");
    1356       bool = &dcd->SubjectDisplayWidth;
    1357       *bool = SubjectDisplayWidth;
    1358       size = sizeof(ULONG);
    1359       PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
    1360       if (dcd->SubjectDisplayWidth < 50)
    1361         dcd->SubjectDisplayWidth = 0;
    1362       else if (dcd->SubjectDisplayWidth > 1000)
    1363         dcd->SubjectDisplayWidth = 1000;
    1364     }
    1365   }
     1265  PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->fSubjectLengthMax, &size);
     1266  if (pds->fSubjectLengthMax)
     1267    pds->SubjectDisplayWidth = 0;
    13661268  else {
    1367     if (fSubjectLengthMax)
    1368       SubjectDisplayWidth = 0;
    1369     else {
    1370       strcpy(eos, "SubjectDisplayWidth");
    1371       bool = &SubjectDisplayWidth;
    1372       *bool = SubjectDisplayWidth;
    1373       size = sizeof(ULONG);
    1374       PrfQueryProfileData(fmprof, appname, s, (PVOID) bool, &size);
    1375       if (SubjectDisplayWidth < 50)
    1376         SubjectDisplayWidth = 0;
    1377       else if (SubjectDisplayWidth > 1000)
    1378         SubjectDisplayWidth = 1000;
    1379     }
     1269    strcpy(eos, "SubjectDisplayWidth");
     1270    pds->SubjectDisplayWidth = dsDirCnrDefault.SubjectDisplayWidth;
     1271    size = sizeof(ULONG);
     1272    PrfQueryProfileData(fmprof, appname, s, (PVOID) &pds->SubjectDisplayWidth, &size);
     1273    if (pds->SubjectDisplayWidth < 50)
     1274      pds->SubjectDisplayWidth = 0;
     1275    else if (pds->SubjectDisplayWidth > 1000)
     1276      pds->SubjectDisplayWidth = 1000;
    13801277  }
    13811278}
Note: See TracChangeset for help on using the changeset viewer.