summaryrefslogtreecommitdiff
path: root/uidesigner
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-03-08 14:02:53 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-03-08 14:02:53 +0200
commit8356415ec22c4621addf0d6e81d8b8e7a8f12d93 (patch)
tree4f83bf1cade127da457ed47cd15d53d283a79216 /uidesigner
parent2ffd047ac5f8019fa0db2954d4bd8d4dcbd3a9ca (diff)
downloadfpGUI-8356415ec22c4621addf0d6e81d8b8e7a8f12d93.tar.xz
Enabled saving and reading the One-Click-Move setting.
Changes will only take affect on newly created forms or when loading a unit.
Diffstat (limited to 'uidesigner')
-rw-r--r--uidesigner/vfdforms.pas8
-rw-r--r--uidesigner/vfdmain.pas6
2 files changed, 10 insertions, 4 deletions
diff --git a/uidesigner/vfdforms.pas b/uidesigner/vfdforms.pas
index 661a1491..00bb3e38 100644
--- a/uidesigner/vfdforms.pas
+++ b/uidesigner/vfdforms.pas
@@ -432,9 +432,10 @@ procedure TfrmVFDSetup.LoadSettings;
begin
chlGrid.FocusItem := gINI.ReadInteger('Options', 'GridResolution', 2);
tbMRUFileCount.Position := gINI.ReadInteger('Options', 'MRUFileCount', 4);
- chkFullPath.Checked := gINI.ReadBool('Options', 'ShowFullPath', True);
- edtDefaultExt.Text := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
- chkUndoOnExit.Checked := gINI.ReadBool('Options', 'UndoOnExit', UndoOnPropExit);
+ chkFullPath.Checked := gINI.ReadBool('Options', 'ShowFullPath', True);
+ edtDefaultExt.Text := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
+ chkUndoOnExit.Checked := gINI.ReadBool('Options', 'UndoOnExit', UndoOnPropExit);
+ chkOneClick.Checked := gINI.ReadBool('Options', 'OneClickMove', True);
end;
procedure TfrmVFDSetup.SaveSettings;
@@ -444,6 +445,7 @@ begin
gINI.WriteBool('Options', 'ShowFullPath', chkFullPath.Checked);
gINI.WriteString('Options', 'DefaultFileExt', edtDefaultExt.Text);
gINI.WriteBool('Options', 'UndoOnExit', chkUndoOnExit.Checked);
+ gINI.WriteBool('Options', 'OneClickMove', chkOneClick.Checked);
end;
procedure TfrmVFDSetup.btnOKClick(Sender: TObject);
diff --git a/uidesigner/vfdmain.pas b/uidesigner/vfdmain.pas
index a53e412f..06112ad6 100644
--- a/uidesigner/vfdmain.pas
+++ b/uidesigner/vfdmain.pas
@@ -87,8 +87,9 @@ uses
fpg_utils,
fpg_main;
-Var
+var
DefaultPasExt : String = '.pas';
+ OneClickMove: Boolean;
{ TMainDesigner }
@@ -283,6 +284,7 @@ begin
fd := TFormDesigner.Create;
fd.Form.Name := nfrm.edName.Text;
fd.Form.WindowTitle := nfrm.edName.Text;
+ fd.OneClickMove := OneClickMove;
FDesigners.Add(fd);
fd.Show;
end;
@@ -373,6 +375,7 @@ var
begin
fp := TVFDFormParser.Create(FormName, FormHead, FormBody);
fd := fp.ParseForm;
+ fd.OneClickMove := OneClickMove;
fp.Free;
FDesigners.Add(fd);
@@ -440,6 +443,7 @@ begin
end;
DefaultPasExt := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
UndoOnPropExit := gINI.ReadBool('Options', 'UndoOnExit', DefUndoOnPropExit);
+ OneClickMove := gINI.ReadBool('Options', 'OneClickMove', True);
fpgApplication.HintPause := 1000;
end;