Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r1409 r1410 84 84 08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code 85 85 19 Mar 09 GKY Moved DeletePresParams to presparam.c 86 28 Mar 09 GKY Add RemoveOldCnrSwitches to remove pre 3.16 style ini keys; 87 add State.version key for check 86 88 87 89 ***********************************************************************/ … … 2945 2947 sprintf(szKey, "%sTargetDir", szPrefix); 2946 2948 PrfWriteProfileString(fmprof, FM3Str, szKey, targetdir); 2949 sprintf(szKey, "%sVersion", szPrefix); 2950 PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16"); 2947 2951 } 2948 2952 … … 3011 3015 3012 3016 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3013 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) 3017 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &previous_numsaves, &ulTemp)) { 3018 ULONG size = 0; 3019 3020 sprintf(szKey, "%sVersion", szPrefix); 3021 PrfQueryProfileSize(fmprof, FM3Str, szKey, &size); 3022 if (!size && fSaveState) { 3023 for (ulTemp = 0; ulTemp < previous_numsaves; ulTemp++) 3024 RemoveOldCnrSwitches(szPrefix, ulTemp); 3025 sprintf(szKey, "%sVersion", szPrefix); 3026 PrfWriteProfileString(fmprof, FM3Str, szKey, "3.16"); 3027 } 3014 3028 for (ulTemp = numsaves; ulTemp < previous_numsaves; ulTemp++) { 3015 3029 sprintf(szKeyBase, "%sDirCnr.%lu", szPrefix, ulTemp); 3016 3030 RemoveCnrSwitches(szKeyBase, NULL); 3017 3031 } 3032 } 3018 3033 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3019 3034 if (numsaves) { … … 3199 3214 driveflags[toupper(*szDir) - 'A'] & DRIVE_NOPRESCAN) { 3200 3215 RemoveCnrSwitches(szKeyBase, NULL); 3216 RemoveOldCnrSwitches(szPrefix, x); 3201 3217 continue; 3202 3218 } … … 4625 4641 sprintf(szKeyBase, "%s.DirCnr.%lu", szStateName, x); 4626 4642 RemoveCnrSwitches(szKeyBase, szStateName); 4643 size = 0; 4644 sprintf(szKey, "%sVersion", szStateName); 4645 if (PrfQueryProfileSize(fmprof, FM3Str, szKey, &size) && size) 4646 RemoveOldCnrSwitches(szStateName, x); 4627 4647 } 4628 4648 } -
trunk/dll/misc.c
r1409 r1410 58 58 08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code 59 59 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 60 62 61 63 ***********************************************************************/ … … 1487 1489 strcpy(eos, "DetailsLATime"); 1488 1490 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 1489 1494 strcpy(eos, "SubjectInLeftPane"); 1490 1495 PrfWriteProfileData(fmprof, appname, s, NULL, 0); … … 1493 1498 strcpy(eos, "SubjectDisplayWidth"); 1494 1499 PrfWriteProfileData(fmprof, appname, s, NULL, 0); 1500 #endif 1501 1495 1502 strcpy(eos, "Pos");; 1496 1503 PrfWriteProfileData(fmprof, FM3Str, s, NULL, 0); … … 1517 1524 } 1518 1525 1526 } 1527 1528 /** 1529 * Removes the pre 3.16 style ini entries when a state is deleted 1530 */ 1531 VOID 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); 1519 1546 } 1520 1547 -
trunk/dll/misc.h
r1409 r1410 55 55 VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds, BOOL state); 56 56 VOID RemoveCnrSwitches(PCSZ keyroot, PCSZ statename); 57 VOID RemoveOldCnrSwitches(PCSZ szPrefix, ULONG ulTemp); 57 58 VOID LoadLibPath(PSZ str, LONG len); 58 59 VOID OpenEdit(HWND hwnd);
Note:
See TracChangeset
for help on using the changeset viewer.