Changeset 1410 for trunk/dll/misc.c


Ignore:
Timestamp:
Mar 29, 2009, 5:43:09 PM (16 years ago)
Author:
Gregg Young
Message:

Add code to delete old style ini keys when a state is deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/misc.c

    r1409 r1410  
    5858  08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
    5959  08 Mar 09 GKY Removed variable aurguments from docopyf and unlinkf (not used)
     60  28 Mar 09 GKY Add RemoveOldCnrSwitches to remove pre 3.16 style ini keys;
     61                add State.version key for check
    6062
    6163***********************************************************************/
     
    14871489  strcpy(eos, "DetailsLATime");
    14881490  PrfWriteProfileData(fmprof, appname, s, NULL, 0);
     1491
     1492#ifdef NEVER
     1493  // activate this code if we ever allow setting of subject location/length per container GKY 3-28-09
    14891494  strcpy(eos, "SubjectInLeftPane");
    14901495  PrfWriteProfileData(fmprof, appname, s, NULL, 0);
     
    14931498  strcpy(eos, "SubjectDisplayWidth");
    14941499  PrfWriteProfileData(fmprof, appname, s, NULL, 0);
     1500#endif
     1501
    14951502  strcpy(eos, "Pos");;
    14961503  PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0);
     
    15171524  }
    15181525
     1526}
     1527
     1528/**
     1529 * Removes the pre 3.16 style ini entries when a state is deleted
     1530 */
     1531VOID RemoveOldCnrSwitches(PCSZ szPrefix, ULONG ulTemp)
     1532{
     1533  CHAR szKey[STATE_NAME_MAX_BYTES + 80];
     1534
     1535  sprintf(szKey, "%sDirCnrPos.%lu", szPrefix, ulTemp);
     1536  PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0);
     1537  sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, ulTemp);
     1538  PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0);
     1539  sprintf(szKey, "%sDirCnrFilter.%lu", szPrefix, ulTemp);
     1540  PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0);
     1541  sprintf(szKey, "%sDirCnrView.%lu", szPrefix, ulTemp);
     1542  PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0);
     1543  sprintf(szKey, "%sDirCnrDir.%lu", szPrefix, ulTemp);
     1544  PrfWriteProfileString(fmprof, FM3Str, szKey, NULL);
     1545  sprintf(szKey, "%sDirCnr.%lu.", szPrefix, ulTemp);
    15191546}
    15201547
Note: See TracChangeset for help on using the changeset viewer.