fpini.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Write/Read Options to INI File
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit FPIni;
  13. interface
  14. uses
  15. FPUtils;
  16. const
  17. ININame = 'fp.ini';
  18. ConfigDir : string = '.'+DirSep;
  19. INIFileName: string = ININame;
  20. procedure InitINIFile;
  21. function ReadINIFile: boolean;
  22. function WriteINIFile: boolean;
  23. implementation
  24. uses
  25. Dos,Objects,Drivers,App,
  26. WINI,{$ifndef EDITORS}WEditor{$else}Editors{$endif},
  27. {$ifndef NODEBUG}FPDebug,{$endif}FPConst,FPVars,FPViews,
  28. FPIntf,FPTools,FPSwitch;
  29. const
  30. { INI file sections }
  31. secFiles = 'Files';
  32. secRun = 'Run';
  33. secCompile = 'Compile';
  34. secColors = 'Colors';
  35. secHelp = 'Help';
  36. secEditor = 'Editor';
  37. secBreakpoint = 'Breakpoints';
  38. secHighlight = 'Highlight';
  39. secMouse = 'Mouse';
  40. secSearch = 'Search';
  41. secTools = 'Tools';
  42. secSourcePath = 'SourcePath';
  43. secPreferences = 'Preferences';
  44. { INI file tags }
  45. ieRecentFile = 'RecentFile';
  46. ieOpenFile = 'OpenFile';
  47. ieOpenFileCount = 'OpenFileCount';
  48. ieRunParameters = 'Parameters';
  49. iePrimaryFile = 'PrimaryFile';
  50. ieCompileMode = 'CompileMode';
  51. iePalette = 'Palette';
  52. ieHelpFiles = 'Files';
  53. ieDefaultTabSize = 'DefaultTabSize';
  54. ieDefaultEditorFlags='DefaultFlags';
  55. ieDefaultSaveExt = 'DefaultSaveExt';
  56. ieOpenExts = 'OpenExts';
  57. ieHighlightExts = 'Exts';
  58. ieTabsPattern = 'NeedsTabs';
  59. ieDoubleClickDelay = 'DoubleDelay';
  60. ieReverseButtons = 'ReverseButtons';
  61. ieAltClickAction = 'AltClickAction';
  62. ieCtrlClickAction = 'CtrlClickAction';
  63. ieFindFlags = 'FindFlags';
  64. ieToolName = 'Title';
  65. ieToolProgram = 'Program';
  66. ieToolParams = 'Params';
  67. ieToolHotKey = 'HotKey';
  68. ieBreakpointTyp = 'Type';
  69. ieBreakpointCount = 'Count';
  70. ieBreakpointState = 'State';
  71. ieBreakpointName = 'Name';
  72. ieBreakpointFile = 'FileName';
  73. ieBreakpointLine = 'LineNumber';
  74. ieBreakpointCond = 'Condition';
  75. ieSourceList = 'SourceList';
  76. ieVideoMode = 'VideoMode';
  77. ieAutoSave = 'AutoSaveFlags';
  78. ieMiscOptions = 'MiscOptions';
  79. ieDesktopLocation = 'DesktopLocation';
  80. ieDesktopFlags = 'DesktopFileFlags';
  81. procedure InitINIFile;
  82. var S: string;
  83. begin
  84. S:=LocateFile(ININame);
  85. if S<>'' then
  86. INIPath:=S;
  87. INIPath:=FExpand(INIPath);
  88. end;
  89. function PaletteToStr(S: string): string;
  90. var C: string;
  91. I: integer;
  92. begin
  93. C:='';
  94. for I:=1 to length(S) do
  95. begin
  96. C:=C+'#$'+IntToHexL(ord(S[I]),2);
  97. end;
  98. PaletteToStr:=C;
  99. end;
  100. function StrToPalette(S: string): string;
  101. var I,P,X: integer;
  102. C: string;
  103. Hex: boolean;
  104. OK: boolean;
  105. begin
  106. C:=''; I:=1;
  107. OK:=S<>'';
  108. while OK and (I<=length(S)) and (S[I]='#') do
  109. begin
  110. Inc(I); Hex:=false;
  111. if S[I]='$' then begin Inc(I); Hex:=true; end;
  112. P:=Pos('#',copy(S,I,255)); if P>0 then P:=I+P-1 else P:=length(S)+1;
  113. if Hex=false then
  114. begin
  115. X:=StrToInt(copy(S,I,P-I));
  116. OK:=(LastStrToIntResult=0) and (0<=X) and (X<=255);
  117. end
  118. else
  119. begin
  120. X:=HexToInt(copy(S,I,P-I));
  121. OK:=(LastHexToIntResult=0) and (0<=X) and (X<=255);
  122. end;
  123. if OK then C:=C+chr(X);
  124. Inc(I,P-I);
  125. end;
  126. StrToPalette:=C;
  127. end;
  128. {$ifndef NODEBUG}
  129. procedure WriteOneBreakPointEntry(I : longint;INIFile : PINIFile);
  130. var PB : PBreakpoint;
  131. S : String;
  132. begin
  133. Str(I,S);
  134. PB:=BreakpointCollection^.At(I);
  135. If assigned(PB) then
  136. With PB^ do
  137. Begin
  138. INIFile^.SetEntry(secBreakpoint,ieBreakpointTyp+S,BreakpointTypeStr[typ]);
  139. INIFile^.SetEntry(secBreakpoint,ieBreakpointState+S,BreakpointStateStr[state]);
  140. if typ=bt_file_line then
  141. begin
  142. INIFile^.SetEntry(secBreakpoint,ieBreakpointFile+S,FileName^);
  143. INIFile^.SetIntEntry(secBreakpoint,ieBreakpointLine+S,Line);
  144. end
  145. else
  146. INIFile^.SetEntry(secBreakpoint,ieBreakpointName+S,Name^);
  147. if assigned(Conditions) then
  148. INIFile^.SetEntry(secBreakpoint,ieBreakpointCond+S,Conditions^);
  149. end;
  150. end;
  151. procedure ReadOneBreakPointEntry(i : longint;INIFile : PINIFile);
  152. var PB : PBreakpoint;
  153. S,S2,SC : string;
  154. Line : longint;
  155. typ : BreakpointType;
  156. state : BreakpointState;
  157. begin
  158. Str(I,S2);
  159. typ:=bt_invalid;
  160. S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointTyp+S2,BreakpointTypeStr[typ]);
  161. for typ:=low(BreakpointType) to high(BreakpointType) do
  162. If pos(BreakpointTypeStr[typ],S)>0 then break;
  163. state:=bs_deleted;
  164. S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointState+S2,BreakpointStateStr[state]);
  165. for state:=low(BreakpointState) to high(BreakpointState) do
  166. If pos(BreakpointStateStr[state],S)>0 then break;
  167. case typ of
  168. bt_invalid :;
  169. bt_file_line :
  170. begin
  171. S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointFile+S2,'');
  172. Line:=INIFile^.GetIntEntry(secBreakpoint,ieBreakpointLine+S2,0);
  173. end;
  174. else
  175. begin
  176. S:=INIFile^.GetEntry(secBreakpoint,ieBreakpointName+S2,'');
  177. end;
  178. end;
  179. SC:=INIFile^.GetEntry(secBreakpoint,ieBreakpointCond+S,'');
  180. if (typ=bt_function) and (S<>'') then
  181. new(PB,init_function(S))
  182. else if (typ=bt_file_line) and (S<>'') then
  183. new(PB,init_file_line(S,Line))
  184. else
  185. new(PB,init_type(typ,S));
  186. If assigned(PB) then
  187. begin
  188. PB^.state:=state;
  189. If SC<>'' then
  190. PB^.conditions:=NewStr(SC);
  191. BreakpointCollection^.Insert(PB);
  192. end;
  193. end;
  194. {$endif NODEBUG}
  195. function ReadINIFile: boolean;
  196. var INIFile: PINIFile;
  197. S,PS,S1,S2,S3: string;
  198. I,P: integer;
  199. X,Y : sw_integer;
  200. BreakPointCount:longint;
  201. OK: boolean;
  202. ts : TSwitchMode;
  203. W: word;
  204. R : TRect;
  205. begin
  206. OK:=ExistsFile(INIPath);
  207. if OK then
  208. begin
  209. New(INIFile, Init(INIPath));
  210. { Files }
  211. OpenExts:=INIFile^.GetEntry(secFiles,ieOpenExts,OpenExts);
  212. RecentFileCount:=High(RecentFiles);
  213. for I:=Low(RecentFiles) to High(RecentFiles) do
  214. begin
  215. S:=INIFile^.GetEntry(secFiles,ieRecentFile+IntToStr(I),'');
  216. if (S='') and (RecentFileCount>I-1) then RecentFileCount:=I-1;
  217. with RecentFiles[I] do
  218. begin
  219. P:=Pos(',',S); if P=0 then P:=length(S)+1;
  220. FileName:=copy(S,1,P-1); Delete(S,1,P);
  221. P:=Pos(',',S); if P=0 then P:=length(S)+1;
  222. LastPos.X:=Max(0,StrToInt(copy(S,1,P-1))); Delete(S,1,P);
  223. P:=Pos(',',S); if P=0 then P:=length(S)+1;
  224. LastPos.Y:=Max(0,StrToInt(copy(S,1,P-1))); Delete(S,1,P);
  225. end;
  226. end;
  227. { Run }
  228. { First read the primary file, which can also set the parameters which can
  229. be overruled with the parameter loading }
  230. SetPrimaryFile(INIFile^.GetEntry(secCompile,iePrimaryFile,PrimaryFile));
  231. SetRunParameters(INIFile^.GetEntry(secRun,ieRunParameters,GetRunParameters));
  232. { Compile }
  233. S:=INIFile^.GetEntry(secCompile,ieCompileMode,'');
  234. for ts:=low(TSwitchMode) to high(TSwitchMode) do
  235. begin
  236. if SwitchesModeStr[ts]=S then
  237. SwitchesMode:=ts;
  238. end;
  239. { Help }
  240. S:=INIFile^.GetEntry(secHelp,ieHelpFiles,'');
  241. repeat
  242. P:=Pos(';',S); if P=0 then P:=length(S)+1;
  243. PS:=copy(S,1,P-1);
  244. if PS<>'' then HelpFiles^.Insert(NewStr(PS));
  245. Delete(S,1,P);
  246. until S='';
  247. { Editor }
  248. {$ifndef EDITORS}
  249. DefaultTabSize:=INIFile^.GetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
  250. DefaultCodeEditorFlags:=INIFile^.GetIntEntry(secEditor,ieDefaultEditorFlags,DefaultCodeEditorFlags);
  251. DefaultSaveExt:=INIFile^.GetEntry(secEditor,ieDefaultSaveExt,DefaultSaveExt);
  252. {$endif}
  253. { Highlight }
  254. HighlightExts:=INIFile^.GetEntry(secHighlight,ieHighlightExts,HighlightExts);
  255. TabsPattern:=INIFile^.GetEntry(secHighlight,ieTabsPattern,TabsPattern);
  256. { SourcePath }
  257. SourceDirs:=INIFile^.GetEntry(secSourcePath,ieSourceList,SourceDirs);
  258. { Mouse }
  259. DoubleDelay:=INIFile^.GetIntEntry(secMouse,ieDoubleClickDelay,DoubleDelay);
  260. MouseReverse:=boolean(INIFile^.GetIntEntry(secMouse,ieReverseButtons,byte(MouseReverse)));
  261. AltMouseAction:=INIFile^.GetIntEntry(secMouse,ieAltClickAction,AltMouseAction);
  262. CtrlMouseAction:=INIFile^.GetIntEntry(secMouse,ieCtrlClickAction,CtrlMouseAction);
  263. { Search }
  264. FindFlags:=INIFile^.GetIntEntry(secSearch,ieFindFlags,FindFlags);
  265. { Breakpoints }
  266. {$ifndef NODEBUG}
  267. BreakpointCount:=INIFile^.GetIntEntry(secBreakpoint,ieBreakpointCount,0);
  268. for i:=1 to BreakpointCount do
  269. ReadOneBreakPointEntry(i-1,INIFile);
  270. {$endif}
  271. { Tools }
  272. for I:=1 to MaxToolCount do
  273. begin
  274. S:=IntToStr(I);
  275. S1:=INIFile^.GetEntry(secTools,ieToolName+S,'');
  276. if S1='' then Break; { !!! }
  277. S2:=INIFile^.GetEntry(secTools,ieToolProgram+S,'');
  278. S3:=INIFile^.GetEntry(secTools,ieToolParams+S,'');
  279. W:=Max(0,Min(65535,INIFile^.GetIntEntry(secTools,ieToolHotKey+S,0)));
  280. AddTool(S1,S2,S3,W);
  281. end;
  282. { Colors }
  283. S:=AppPalette;
  284. PS:=StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_1_40',PaletteToStr(copy(S,1,40))));
  285. PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_41_80',PaletteToStr(copy(S,41,40))));
  286. PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_81_120',PaletteToStr(copy(S,81,40))));
  287. PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_121_160',PaletteToStr(copy(S,121,40))));
  288. PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_161_200',PaletteToStr(copy(S,161,40))));
  289. PS:=PS+StrToPalette(INIFile^.GetEntry(secColors,iePalette+'_201_240',PaletteToStr(copy(S,201,40))));
  290. AppPalette:=PS;
  291. { Open files }
  292. for I:=INIFile^.GetIntEntry(secFiles,ieOpenFileCount,0) downto 1 do
  293. begin
  294. S:=INIFile^.GetEntry(secFiles,ieOpenFile+IntToStr(I),'');
  295. if (S='') then
  296. break;
  297. P:=Pos(',',S); if P=0 then P:=length(S)+1;
  298. S1:=copy(S,1,P-1);
  299. Delete(S,1,P);
  300. P:=Pos(',',S);
  301. if P=0 then P:=length(S)+1;
  302. X:=Max(0,StrToInt(copy(S,1,P-1)));
  303. Delete(S,1,P);
  304. P:=Pos(',',S);
  305. if P=0 then P:=length(S)+1;
  306. Y:=Max(0,StrToInt(copy(S,1,P-1)));
  307. Delete(S,1,P);
  308. P:=Pos(',',S);
  309. if P=0 then P:=length(S)+1;
  310. R.A.X:=Max(0,StrToInt(copy(S,1,P-1)));
  311. Delete(S,1,P);
  312. P:=Pos(',',S);
  313. if P=0 then P:=length(S)+1;
  314. R.A.Y:=Max(0,StrToInt(copy(S,1,P-1)));
  315. Delete(S,1,P);
  316. P:=Pos(',',S);
  317. if P=0 then P:=length(S)+1;
  318. R.B.X:=Max(0,StrToInt(copy(S,1,P-1)));
  319. Delete(S,1,P);
  320. P:=Pos(',',S);
  321. if P=0 then P:=length(S)+1;
  322. R.B.Y:=Max(0,StrToInt(copy(S,1,P-1)));
  323. if (R.A.X<R.B.X) and (R.A.Y<R.B.Y) then
  324. TryToOpenFile(@R,S1,X,Y,false)
  325. else
  326. TryToOpenFile(nil,S1,X,Y,false);
  327. { remove it because otherwise we allways keep old files }
  328. INIFile^.DeleteEntry(secFiles,ieOpenFile+IntToStr(I));
  329. end;
  330. { Desktop }
  331. DesktopFileFlags:=INIFile^.GetIntEntry(secPreferences,ieDesktopFlags,DesktopFileFlags);
  332. { Preferences }
  333. AutoSaveOptions:=INIFile^.GetIntEntry(secPreferences,ieAutoSave,AutoSaveOptions);
  334. MiscOptions:=INIFile^.GetIntEntry(secPreferences,ieMiscOptions,MiscOptions);
  335. DesktopLocation:=INIFile^.GetIntEntry(secPreferences,ieDesktopLocation,DesktopLocation);
  336. Dispose(INIFile, Done);
  337. end;
  338. ReadINIFile:=OK;
  339. end;
  340. function WriteINIFile: boolean;
  341. var INIFile: PINIFile;
  342. S: string;
  343. R : TRect;
  344. S1,S2,S3: string;
  345. W: word;
  346. BreakPointCount:longint;
  347. I,OpenFileCount: integer;
  348. OK: boolean;
  349. PW,PPW : PSourceWindow;
  350. procedure ConcatName(P: PString); {$ifndef FPC}far;{$endif}
  351. begin
  352. if (S<>'') then S:=S+';';
  353. S:=S+P^;
  354. end;
  355. begin
  356. New(INIFile, Init(INIPath));
  357. { Files }
  358. INIFile^.SetEntry(secFiles,ieOpenExts,'"'+OpenExts+'"');
  359. for I:=1 to High(RecentFiles) do
  360. begin
  361. if I<=RecentFileCount then
  362. with RecentFiles[I] do S:=FileName+','+IntToStr(LastPos.X)+','+IntToStr(LastPos.Y)
  363. else
  364. S:='';
  365. INIFile^.SetEntry(secFiles,ieRecentFile+IntToStr(I),S);
  366. end;
  367. PW:=FirstEditorWindow;
  368. PPW:=PW;
  369. I:=1;
  370. while assigned(PW) do
  371. begin
  372. If PW^.HelpCtx=hcSourceWindow then
  373. begin
  374. With PW^.editor^ do
  375. S:=FileName+','+IntToStr(CurPos.X)+','+IntToStr(CurPos.Y);
  376. PW^.GetBounds(R);
  377. S:=S+','+IntToStr(R.A.X)+','+IntToStr(R.A.Y)+','+
  378. IntToStr(R.B.X)+','+IntToStr(R.B.Y);
  379. INIFile^.SetEntry(secFiles,ieOpenFile+IntToStr(I),S);
  380. Inc(I);
  381. OpenFileCount:=I-1;
  382. end;
  383. PW:=PSourceWindow(PW^.next);
  384. While assigned(PW) and (PW<>PPW) and (PW^.HelpCtx<>hcSourceWindow) do
  385. PW:=PSourceWindow(PW^.next);
  386. If PW=PPW then
  387. break;
  388. end;
  389. INIFile^.SetIntEntry(secFiles,ieOpenFileCount,OpenFileCount);
  390. { Run }
  391. INIFile^.SetEntry(secRun,ieRunParameters,GetRunParameters);
  392. { Compile }
  393. INIFile^.SetEntry(secCompile,iePrimaryFile,PrimaryFile);
  394. INIFile^.SetEntry(secCompile,ieCompileMode,SwitchesModeStr[SwitchesMode]);
  395. { Help }
  396. S:='';
  397. HelpFiles^.ForEach(@ConcatName);
  398. INIFile^.SetEntry(secHelp,ieHelpFiles,'"'+S+'"');
  399. { Editor }
  400. {$ifndef EDITORS}
  401. INIFile^.SetIntEntry(secEditor,ieDefaultTabSize,DefaultTabSize);
  402. INIFile^.SetIntEntry(secEditor,ieDefaultEditorFlags,DefaultCodeEditorFlags);
  403. INIFile^.SetEntry(secEditor,ieDefaultSaveExt,DefaultSaveExt);
  404. {$endif}
  405. { Highlight }
  406. INIFile^.SetEntry(secHighlight,ieHighlightExts,'"'+HighlightExts+'"');
  407. INIFile^.SetEntry(secHighlight,ieTabsPattern,'"'+TabsPattern+'"');
  408. { SourcePath }
  409. INIFile^.SetEntry(secSourcePath,ieSourceList,'"'+SourceDirs+'"');
  410. { Mouse }
  411. INIFile^.SetIntEntry(secMouse,ieDoubleClickDelay,DoubleDelay);
  412. INIFile^.SetIntEntry(secMouse,ieReverseButtons,byte(MouseReverse));
  413. INIFile^.SetIntEntry(secMouse,ieAltClickAction,AltMouseAction);
  414. INIFile^.SetIntEntry(secMouse,ieCtrlClickAction,CtrlMouseAction);
  415. { Search }
  416. INIFile^.SetIntEntry(secSearch,ieFindFlags,FindFlags);
  417. { Breakpoints }
  418. {$ifndef NODEBUG}
  419. BreakPointCount:=BreakpointCollection^.Count;
  420. INIFile^.SetIntEntry(secBreakpoint,ieBreakpointCount,BreakpointCount);
  421. for i:=1 to BreakpointCount do
  422. WriteOneBreakPointEntry(I-1,INIFile);
  423. {$endif}
  424. { Tools }
  425. INIFile^.DeleteSection(secTools);
  426. for I:=1 to GetToolCount do
  427. begin
  428. S:=IntToStr(I);
  429. GetToolParams(I-1,S1,S2,S3,W);
  430. if S1<>'' then S1:='"'+S1+'"';
  431. if S2<>'' then S2:='"'+S2+'"';
  432. if S3<>'' then S3:='"'+S3+'"';
  433. INIFile^.SetEntry(secTools,ieToolName+S,S1);
  434. INIFile^.SetEntry(secTools,ieToolProgram+S,S2);
  435. INIFile^.SetEntry(secTools,ieToolParams+S,S3);
  436. INIFile^.SetIntEntry(secTools,ieToolHotKey+S,W);
  437. end;
  438. { Colors }
  439. if AppPalette<>CIDEAppColor then
  440. begin
  441. { this has a bug. if a different palette has been read on startup, and
  442. then changed back to match the default, this will not update it in the
  443. ini file, eg. the original (non-default) will be left unmodified... }
  444. S:=AppPalette;
  445. INIFile^.SetEntry(secColors,iePalette+'_1_40',PaletteToStr(copy(S,1,40)));
  446. INIFile^.SetEntry(secColors,iePalette+'_41_80',PaletteToStr(copy(S,41,40)));
  447. INIFile^.SetEntry(secColors,iePalette+'_81_120',PaletteToStr(copy(S,81,40)));
  448. INIFile^.SetEntry(secColors,iePalette+'_121_160',PaletteToStr(copy(S,121,40)));
  449. INIFile^.SetEntry(secColors,iePalette+'_161_200',PaletteToStr(copy(S,161,40)));
  450. INIFile^.SetEntry(secColors,iePalette+'_201_240',PaletteToStr(copy(S,201,40)));
  451. end;
  452. { Desktop }
  453. INIFile^.SetIntEntry(secPreferences,ieDesktopFlags,DesktopFileFlags);
  454. { Preferences }
  455. INIFile^.SetIntEntry(secPreferences,ieAutoSave,AutoSaveOptions);
  456. INIFile^.SetIntEntry(secPreferences,ieMiscOptions,MiscOptions);
  457. INIFile^.SetIntEntry(secPreferences,ieDesktopLocation,DesktopLocation);
  458. OK:=INIFile^.Update;
  459. Dispose(INIFile, Done);
  460. WriteINIFile:=OK;
  461. end;
  462. end.
  463. {
  464. $Log$
  465. Revision 1.19 1999-04-07 21:55:48 peter
  466. + object support for browser
  467. * html help fixes
  468. * more desktop saving things
  469. * NODEBUG directive to exclude debugger
  470. Revision 1.18 1999/03/23 15:11:31 peter
  471. * desktop saving things
  472. * vesa mode
  473. * preferences dialog
  474. Revision 1.17 1999/03/12 01:13:58 peter
  475. * flag if trytoopen should look for other extensions
  476. + browser tab in the tools-compiler
  477. Revision 1.16 1999/03/08 14:58:09 peter
  478. + prompt with dialogs for tools
  479. Revision 1.15 1999/03/05 17:53:02 pierre
  480. + saving and opening of open files on exit
  481. Revision 1.14 1999/03/01 15:41:55 peter
  482. + Added dummy entries for functions not yet implemented
  483. * MenuBar didn't update itself automatically on command-set changes
  484. * Fixed Debugging/Profiling options dialog
  485. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is
  486. set
  487. * efBackSpaceUnindents works correctly
  488. + 'Messages' window implemented
  489. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  490. + Added TP message-filter support (for ex. you can call GREP thru
  491. GREP2MSG and view the result in the messages window - just like in TP)
  492. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  493. so topic search didn't work...
  494. * In FPHELP.PAS there were still context-variables defined as word instead
  495. of THelpCtx
  496. * StdStatusKeys() was missing from the statusdef for help windows
  497. + Topic-title for index-table can be specified when adding a HTML-files
  498. Revision 1.13 1999/02/22 02:15:14 peter
  499. + default extension for save in the editor
  500. + Separate Text to Find for the grep dialog
  501. * fixed redir crash with tp7
  502. Revision 1.12 1999/02/19 18:43:46 peter
  503. + open dialog supports mask list
  504. Revision 1.11 1999/02/10 09:53:14 pierre
  505. * better storing of breakpoints
  506. Revision 1.10 1999/02/05 13:08:42 pierre
  507. + new breakpoint types added
  508. Revision 1.9 1999/02/05 12:11:55 pierre
  509. + SourceDir that stores directories for sources that the
  510. compiler should not know about
  511. Automatically asked for addition when a new file that
  512. needed filedialog to be found is in an unknown directory
  513. Stored and retrieved from INIFile
  514. + Breakpoints conditions added to INIFile
  515. * Breakpoints insterted and removed at debin and end of debug session
  516. Revision 1.8 1999/02/04 17:52:38 pierre
  517. * bs_invalid renamed bs_deleted
  518. Revision 1.7 1999/02/04 17:19:24 peter
  519. * linux fixes
  520. Revision 1.6 1999/02/04 13:32:04 pierre
  521. * Several things added (I cannot commit them independently !)
  522. + added TBreakpoint and TBreakpointCollection
  523. + added cmResetDebugger,cmGrep,CmToggleBreakpoint
  524. + Breakpoint list in INIFile
  525. * Select items now also depend of SwitchMode
  526. * Reading of option '-g' was not possible !
  527. + added search for -Fu args pathes in TryToOpen
  528. + added code for automatic opening of FileDialog
  529. if source not found
  530. Revision 1.5 1999/01/21 11:54:15 peter
  531. + tools menu
  532. + speedsearch in symbolbrowser
  533. * working run command
  534. Revision 1.4 1999/01/04 11:49:45 peter
  535. * 'Use tab characters' now works correctly
  536. + Syntax highlight now acts on File|Save As...
  537. + Added a new class to syntax highlight: 'hex numbers'.
  538. * There was something very wrong with the palette managment. Now fixed.
  539. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  540. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  541. process revised
  542. Revision 1.1 1998/12/28 15:47:45 peter
  543. + Added user screen support, display & window
  544. + Implemented Editor,Mouse Options dialog
  545. + Added location of .INI and .CFG file
  546. + Option (INI) file managment implemented (see bottom of Options Menu)
  547. + Switches updated
  548. + Run program
  549. }