Lazstats: Rename Options.DefaultPath to .DefaultDataPath.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7622 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-08-20 21:38:09 +00:00
parent 3520c438d0
commit 78ae64721c
5 changed files with 15 additions and 21 deletions

View File

@ -313,7 +313,7 @@ begin
cvecext := '.CVE'; cvecext := '.CVE';
rvecext := '.RVE'; rvecext := '.RVE';
scaext := '.SCA'; scaext := '.SCA';
scripteditorfrm.FileListBox1.Directory := Options.DefaultPath; scripteditorfrm.FileListBox1.Directory := Options.DefaultDataPath;
scripteditorfrm.FileListBox1.Update; scripteditorfrm.FileListBox1.Update;
count := scripteditorfrm.FileListBox1.Items.Count; count := scripteditorfrm.FileListBox1.Items.Count;
for index := 0 to count-1 do for index := 0 to count-1 do

View File

@ -724,7 +724,7 @@ procedure TItemBankFrm.FormCreate(Sender: TObject);
begin begin
Assert(ItemBankFrm <> nil); Assert(ItemBankFrm <> nil);
DirectoryEdit1.Text := Options.DefaultPath; DirectoryEdit1.Text := Options.DefaultDataPath;
FileListBox1.Directory := DirectoryEdit1.Text; FileListBox1.Directory := DirectoryEdit1.Text;
end; end;
@ -799,7 +799,7 @@ end;
procedure TItemBankFrm.Button1Click(Sender: TObject); procedure TItemBankFrm.Button1Click(Sender: TObject);
begin begin
DirectoryEdit1.Text := Options.DefaultPath; DirectoryEdit1.Text := Options.DefaultDataPath;
FileListBox1.Directory := DirectoryEdit1.Text; FileListBox1.Directory := DirectoryEdit1.Text;
end; end;

View File

@ -18,10 +18,10 @@ object OptionsFrm: TOptionsFrm
Left = 8 Left = 8
Height = 15 Height = 15
Top = 218 Top = 218
Width = 108 Width = 135
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Default File Location' Caption = 'Default Data File Location'
ParentColor = False ParentColor = False
end end
object FractionTypeGrp: TRadioGroup object FractionTypeGrp: TRadioGroup
@ -202,7 +202,7 @@ object OptionsFrm: TOptionsFrm
end end
object Label2: TLabel object Label2: TLabel
AnchorSideLeft.Control = LHelpPathEdit AnchorSideLeft.Control = LHelpPathEdit
AnchorSideTop.Control = FilePathEdit AnchorSideTop.Control = DataFilePathEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 15 Height = 15
@ -233,7 +233,7 @@ object OptionsFrm: TOptionsFrm
MaxLength = 0 MaxLength = 0
TabOrder = 6 TabOrder = 6
end end
object FilePathEdit: TDirectoryEdit object DataFilePathEdit: TDirectoryEdit
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom

View File

@ -17,7 +17,7 @@ type
TOptionsFrm = class(TForm) TOptionsFrm = class(TForm)
Bevel1: TBevel; Bevel1: TBevel;
CancelBtn: TButton; CancelBtn: TButton;
FilePathEdit: TDirectoryEdit; DataFilePathEdit: TDirectoryEdit;
LHelpPathEdit: TFileNameEdit; LHelpPathEdit: TFileNameEdit;
HelpBtn: TButton; HelpBtn: TButton;
Label2: TLabel; Label2: TLabel;
@ -97,9 +97,9 @@ begin
// Default path // Default path
ReadLn(F, pathName); ReadLn(F, pathName);
if (pathname = '') or (not DirectoryExists(pathname)) then if (pathname = '') or (not DirectoryExists(pathname)) then
Options.DefaultPath := GetCurrentDir Options.DefaultDataPath := GetCurrentDir
else else
Options.Defaultpath := pathname; Options.DefaultDataPath := pathname;
// LHelp path // LHelp path
Readln(F, pathName); Readln(F, pathName);
@ -120,7 +120,7 @@ begin
WriteLn(F, ord(Options.FractionType)); WriteLn(F, ord(Options.FractionType));
WriteLn(F, ord(Options.DefaultMiss)); WriteLn(F, ord(Options.DefaultMiss));
WriteLn(F, ord(Options.DefaultJust)); WriteLn(F, ord(Options.DefaultJust));
WriteLn(F, Options.DefaultPath); WriteLn(F, Options.DefaultDataPath);
WriteLn(F, Options.LHelpPath); WriteLn(F, Options.LHelpPath);
CloseFile(F); CloseFile(F);
end; end;
@ -133,10 +133,7 @@ begin
AOptions.FractionType := TFractionType(FractionTypeGrp.ItemIndex); AOptions.FractionType := TFractionType(FractionTypeGrp.ItemIndex);
AOptions.DefaultMiss := TMissingValueCode(MissValsGrp.ItemIndex); AOptions.DefaultMiss := TMissingValueCode(MissValsGrp.ItemIndex);
AOptions.DefaultJust := TJustification(JustificationGrp.ItemIndex); AOptions.DefaultJust := TJustification(JustificationGrp.ItemIndex);
if FilePathEdit.Text = '' then AOptions.DefaultDataPath := DataFilePathEdit.Text;
AOptions.DefaultPath := GetCurrentDir
else
AOptions.DefaultPath := FilePathEdit.Text;
if LHelpPathEdit.FileName = Application.Location + 'lhelp' + GetExeExt then if LHelpPathEdit.FileName = Application.Location + 'lhelp' + GetExeExt then
AOptions.LHelpPath := '<default>' AOptions.LHelpPath := '<default>'
else else
@ -148,10 +145,7 @@ begin
FractionTypeGrp.ItemIndex := ord(AOptions.FractionType); FractionTypeGrp.ItemIndex := ord(AOptions.FractionType);
MissValsGrp.ItemIndex := Ord(AOptions.DefaultMiss); MissValsGrp.ItemIndex := Ord(AOptions.DefaultMiss);
JustificationGrp.ItemIndex := Ord(AOptions.DefaultJust); JustificationGrp.ItemIndex := Ord(AOptions.DefaultJust);
if AOptions.DefaultPath = '' then DataFilePathEdit.Text := AOptions.DefaultDataPath;
FilePathEdit.Text := GetCurrentDir
else
FilePathEdit.Text := AOptions.DefaultPath;
if AOptions.LHelpPath = '<default>' then if AOptions.LHelpPath = '<default>' then
LHelpPathEdit.FileName := Application.Location + 'lhelp' + GetExeExt LHelpPathEdit.FileName := Application.Location + 'lhelp' + GetExeExt
else else

View File

@ -47,7 +47,7 @@ type
TJustification = (jLeft, jCenter, jRight); TJustification = (jLeft, jCenter, jRight);
TOptions = record TOptions = record
DefaultPath: string; DefaultDataPath: string;
FractionType: TFractionType; FractionType: TFractionType;
DefaultMiss: TMissingValueCode; DefaultMiss: TMissingValueCode;
DefaultJust: TJustification; DefaultJust: TJustification;
@ -68,7 +68,7 @@ var
LoggedOn : boolean = false; LoggedOn : boolean = false;
Options: TOptions = ( Options: TOptions = (
DefaultPath: ''; DefaultDataPath: '';
FractionType: ftPoint; FractionType: ftPoint;
DefaultMiss: mvcNines; DefaultMiss: mvcNines;
DefaultJust: jLeft; DefaultJust: jLeft;