summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-10-19 20:04:47 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-10-19 20:04:47 +0200
commite8c0adaf0972f064526f7e2d655d2087a07c112c (patch)
tree7ae0c7e40e526970392703465e80f36b77d7ba6f
parent65387f80979f1d47ec53345847109728e9abac3e (diff)
downloadfpGUI-e8c0adaf0972f064526f7e2d655d2087a07c112c.tar.xz
Started adding save/restore of settings in GUI.
Signed-off-by: Graeme Geldenhuys <graemeg@gmail.com>
-rw-r--r--src/frm_main.pas9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/frm_main.pas b/src/frm_main.pas
index 66d26f37..eb772526 100644
--- a/src/frm_main.pas
+++ b/src/frm_main.pas
@@ -184,16 +184,20 @@ begin
Settings.FixedFont := fpgStyle.FixedFont;
Settings.SearchDirectories := TStringList.Create;
+ LogEvent(LogSettings, 'Loading settings');
+ LoadSettings;
+
end;
procedure TMainForm.MainFormDestroy(Sender: TObject);
begin
-writeln('DEBUG: TMainForm.MainFormDestroy >>>>');
// save splitter position
gINI.WriteInteger('Options', 'SplitterLeft', PageControl1.Width);
// save form size and position
gINI.WriteFormState(self);
-writeln('DEBUG: TMainForm.MainFormDestroy <<<<');
+ LogEvent(LogSettings, 'Save settings');
+ SaveSettings;
+ LogEvent(LogSettings, 'Save settings done');
end;
procedure TMainForm.miFileQuitClicked(Sender: TObject);
@@ -746,6 +750,7 @@ begin
for FileIndex := 0 to LoadingFilenameList.Count - 1 do
begin
Filename := LoadingFilenameList[ FileIndex ];
+ mru.AddItem(FileName);
LogEvent(LogStartup, ' Loading: ' + Filename );
try
LoadingFileIndex := FileIndex;