Changeset 1135
- Timestamp:
- Sep 1, 2008, 7:34:37 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/cfgmgr.cmd (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/cfgmgr.cmd
r1130 r1135 1 1 /* 2 $Id: $3 2 :: $Id: $ 3 4 4 CFGMGR.CMD - manage installation, maintenance and deinstallation 5 of FM/2 configuration files5 of FM/2 configuration files 6 6 7 7 Optional Parameters: … … 138 138 Init: procedure expose (globals) 139 139 140 button.= ''141 142 button.CMDS.helptext = 'Commands toolbar'143 button.CMDS.text = 'Cmds'144 button.CMDS.id = 4900145 146 button.UTILS.helptext = 'Utility toolbar'147 button.UTILS.text = 'Utils'148 button.UTILS.id = 4901149 150 button.SORT.helptext = 'Sort toolbar'151 button.SORT.text = 'Sort'152 button.SORT.id = 4902153 154 button.SELECT.helptext = 'Select toolbar'155 button.SELECT.text = 'Select'156 button.SELECT.id = 4903157 158 button.CONFIG.helptext = 'Configuration toolbar'159 button.CONFIG.text = 'Cmds'160 button.CONFIG.id = 4904161 162 button.FILES.helptext = 'Files toolbar'163 button.FILES.text = 'Files'164 button.FILES.id = 4905165 166 button.VIEWS.helptext = 'Views toolbar'167 button.VIEWS.text = 'Views'168 button.VIEWS.id = 4906169 140 button. = '' 141 142 button.CMDS.helptext = 'Commands toolbar' 143 button.CMDS.text = 'Cmds' 144 button.CMDS.id = 4900 145 146 button.UTILS.helptext = 'Utility toolbar' 147 button.UTILS.text = 'Utils' 148 button.UTILS.id = 4901 149 150 button.SORT.helptext = 'Sort toolbar' 151 button.SORT.text = 'Sort' 152 button.SORT.id = 4902 153 154 button.SELECT.helptext = 'Select toolbar' 155 button.SELECT.text = 'Select' 156 button.SELECT.id = 4903 157 158 button.CONFIG.helptext = 'Configuration toolbar' 159 button.CONFIG.text = 'Cmds' 160 button.CONFIG.id = 4904 161 162 button.FILES.helptext = 'Files toolbar' 163 button.FILES.text = 'Files' 164 button.FILES.id = 4905 165 166 button.VIEWS.helptext = 'Views toolbar' 167 button.VIEWS.text = 'Views' 168 button.VIEWS.id = 4906 169 170 170 cfg. = '' 171 171 cfg.errorcode = 0 … … 576 576 LastToolbar = 'CMDS.TLS' 577 577 else 578 LastToolbar = LastToolbox579 call SysIni inifile, 'FM/3', 'LastToolbar', LastToolbar578 LastToolbar = LastToolbox 579 call SysIni inifile, 'FM/3', 'LastToolbar', LastToolbar 580 580 end 581 581 if SysIni(inifile, 'FM/3', 'FM2Shutdown.Toolbar') = 'ERROR:' then 582 call SysIni inifile, 'FM/3', 'FM2Shutdown.Toolbar', LastToolbar582 call SysIni inifile, 'FM/3', 'FM2Shutdown.Toolbar', LastToolbar 583 583 if SysIni(inifile, 'FM/4', 'LastToolbar') = 'ERROR:' then 584 call SysIni inifile, 'FM/4', 'LastToolbar', LastToolbar584 call SysIni inifile, 'FM/4', 'LastToolbar', LastToolbar 585 585 return 586 586 587 587 Ticket267Fix: procedure expose (globals) 588 parse arg infile589 fix_string = 'Fixed: Ticket 267'590 abort_fix = 0591 outfile = SysTempFilename('cfgmgr??.fix')592 call lineout outfile, ';' fix_string593 /* Read file, if comment has "already repaired" message then stop */594 do while lines(infile) > 0595 line = linein(infile)596 if left(line, 1) = ';' then597 if pos(fix_string, line) > 0 then598 do599 abort_fix = 1600 leave601 end602 else603 call lineout outfile, line604 else if word(line, 1) = ':spacer' then605 call lineout outfile, ';' || substr(line, 2)606 else607 do608 tool.1 = line609 tool.2 = linein(infile)610 tool.3 = linein(infile)611 tool.4 = linein(infile)612 button_name = translate(tool.2)613 if (button.button_name.text \= '') & (tool.4 >= 4900) & (tool.4 < 4950) then614 do615 call lineout outfile, button.button_name.helptext616 call lineout outfile, button.button_name.text617 call lineout outfile, tool.3618 call lineout outfile, button.button_name.id619 end620 else621 do622 call lineout outfile, tool.1623 call lineout outfile, tool.2624 call lineout outfile, tool.3625 call lineout outfile, tool.4626 end627 end 628 end629 call stream infile, 'c', 'close'630 call stream outfile, 'c', 'close'631 if abort_fix = 0 then632 do588 parse arg infile 589 fix_string = 'Fixed: Ticket 267' 590 abort_fix = 0 591 outfile = SysTempFilename('cfgmgr??.fix') 592 call lineout outfile, ';' fix_string 593 /* Read file, if comment has "already repaired" message then stop */ 594 do while lines(infile) > 0 595 line = linein(infile) 596 if left(line, 1) = ';' then 597 if pos(fix_string, line) > 0 then 598 do 599 abort_fix = 1 600 leave 601 end 602 else 603 call lineout outfile, line 604 else if word(line, 1) = ':spacer' then 605 call lineout outfile, ';' || substr(line, 2) 606 else 607 do 608 tool.1 = line 609 tool.2 = linein(infile) 610 tool.3 = linein(infile) 611 tool.4 = linein(infile) 612 button_name = translate(tool.2) 613 if (button.button_name.text \= '') & (tool.4 >= 4900) & (tool.4 < 4950) then 614 do 615 call lineout outfile, button.button_name.helptext 616 call lineout outfile, button.button_name.text 617 call lineout outfile, tool.3 618 call lineout outfile, button.button_name.id 619 end 620 else 621 do 622 call lineout outfile, tool.1 623 call lineout outfile, tool.2 624 call lineout outfile, tool.3 625 call lineout outfile, tool.4 626 end 627 end 628 end 629 call stream infile, 'c', 'close' 630 call stream outfile, 'c', 'close' 631 if abort_fix = 0 then 632 do 633 633 'copy' infile cfg.backupdir /* backup tls file */ 634 'copy' outfile infile/* "install" new tls file */635 cfg.action_taken = 1636 end637 call SysFileDelete outfile634 'copy' outfile infile /* "install" new tls file */ 635 cfg.action_taken = 1 636 end 637 call SysFileDelete outfile 638 638 return 639 639
Note:
See TracChangeset
for help on using the changeset viewer.
