Changeset 1509
- Timestamp:
- Apr 12, 2010, 6:24:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cfgmgr.cmd
r1504 r1509 30 30 Change log: 31 31 16 Mar 09 JBS Added code to copy discontinued directory container state ini keys to new names 32 12 Apr 10 JBS Ticket 429: Speed up the deletion of obsolete state-related FM3.INI keys. 33 12 Apr 10 JBS Ticket 429: Add code to delete obsolete "LastToolBox" key(s). 32 34 33 35 */ … … 595 597 call SysIni cfg.inifile, 'FM/3', 'LastToolbar', LastToolbar 596 598 end 599 if LastToolbox \= 'ERROR:' then 600 call SysIni cfg.inifile, 'FM/3', 'LastToolBox', 'DELETE:' 597 601 if SysIni(cfg.inifile, 'FM/3', 'FM2Shutdown.Toolbar') = 'ERROR:' then 598 602 call SysIni cfg.inifile, 'FM/3', 'FM2Shutdown.Toolbar', LastToolbar 599 603 if SysIni(cfg.inifile, 'FM/4', 'LastToolbar') = 'ERROR:' then 600 call SysIni cfg.inifile, 'FM/4', 'LastToolbar', LastToolbar 604 call SysIni cfg.inifile, 'FM/4', 'LastToolbar', LastToolbar 605 if SysIni(cfg.inifile, 'FM/4', 'LastToolbox') \= 'ERROR:' then 606 call SysIni cfg.inifile, 'FM/4', 'LastToolBox', 'DELETE:' 601 607 do /* Copy old details keys to new names */ 602 /* Check for old/new version numbers first? */ 608 /* Check to see if this has already been done */ 609 DetailsKeysConverted = SysIni(cfg.inifile, 'FM/3', 'DetailsKeysConverted') 603 610 StateNames = SysIni(cfg.inifile, 'FM/3', 'LastSetups') 604 611 KeyFragments = 'Dir Filter Pos Sort View' … … 610 617 if pos('FM2Shutdown' || null, StateNames) = 0 then 611 618 StateNames = StateNames || 'FM2Shutdown' || null 619 call charout , 'One-time conversion of states to new format...' 612 620 do while StateNames \= '' 613 621 parse var StateNames StateName (null) StateNames … … 617 625 NumDirCnrs = c2d(reverse(NumDirCnrs)) - 1 /* for 0 to num-1 loop */ 618 626 do d = 0 to NumDirCnrs 627 d2 = NumDirCnrs + 1 - d /* Work from the last to the first */ 619 628 do f = 1 to NumKeyFragments 629 call charout , '.' 620 630 frag = word(KeyFragments, f) 621 OldKey = StateName || '.DirCnr' || frag || '.' || d 631 OldKey = StateName || '.DirCnr' || frag || '.' || d2 622 632 OldKeyValue = SysIni(cfg.inifile, 'FM/3', OldKey) 623 NewKey = StateName || '.DirCnr.' || d || '.' || frag 624 NewKeyValue = SysIni(cfg.inifile, 'FM/3', NewKey) 625 if (OldKeyValue \= 'ERROR:' & NewKeyValue = 'ERROR:') then 626 rcx = SysIni(cfg.inifile, 'FM/3', NewKey, OldKeyValue) 633 if OldKeyValue = 'ERROR:' then 634 do 635 f = NumKeyFragments /* Force end of loop for this container */ 636 d = NumDirCnrs /* Force end of loop for dir cnrs for this state */ 637 end 638 else 639 do 640 call SysIni cfg.inifile, 'FM/3', OldKey, 'DELETE:' 641 NewKey = StateName || '.DirCnr.' || d || '.' || frag 642 call SysIni cfg.inifile, 'FM/3', NewKey, OldKeyValue 643 end 627 644 end 628 645 end 646 say 629 647 end 630 648 end
Note:
See TracChangeset
for help on using the changeset viewer.