mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:29:12 +02:00
added browse buttons for compiler and unit output dir
git-svn-id: trunk@4189 -
This commit is contained in:
parent
e220b423c5
commit
80db57a836
@ -450,9 +450,11 @@ type
|
|||||||
|
|
||||||
grpCompiler: TGroupBox;
|
grpCompiler: TGroupBox;
|
||||||
edtCompiler: TEdit;
|
edtCompiler: TEdit;
|
||||||
|
btnCompiler: TButton;
|
||||||
|
|
||||||
grpUnitOutputDir: TGroupBox;
|
grpUnitOutputDir: TGroupBox;
|
||||||
edtUnitOutputDir: TEdit;
|
edtUnitOutputDir: TEdit;
|
||||||
|
btnUnitOutputDir: TButton;
|
||||||
|
|
||||||
LCLWidgetTypeRadioGroup: TRadioGroup;
|
LCLWidgetTypeRadioGroup: TRadioGroup;
|
||||||
|
|
||||||
@ -577,6 +579,7 @@ type
|
|||||||
procedure ButtonCancelClicked(Sender: TObject);
|
procedure ButtonCancelClicked(Sender: TObject);
|
||||||
procedure ButtonApplyClicked(Sender: TObject);
|
procedure ButtonApplyClicked(Sender: TObject);
|
||||||
procedure ButtonTestClicked(Sender: TObject);
|
procedure ButtonTestClicked(Sender: TObject);
|
||||||
|
procedure FileBrowseBtnClick(Sender: TObject);
|
||||||
procedure InhTreeViewSelectionChanged(Sender: TObject);
|
procedure InhTreeViewSelectionChanged(Sender: TObject);
|
||||||
procedure InheritedPageResize(Sender: TObject);
|
procedure InheritedPageResize(Sender: TObject);
|
||||||
procedure chkAdditionalConfigFileClick(Sender: TObject);
|
procedure chkAdditionalConfigFileClick(Sender: TObject);
|
||||||
@ -2382,6 +2385,38 @@ begin
|
|||||||
[mbOk],0);
|
[mbOk],0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCompilerOptions.FileBrowseBtnClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
OpenDialog: TOpenDialog;
|
||||||
|
DefaultFilename: String;
|
||||||
|
begin
|
||||||
|
OpenDialog:=TOpenDialog.Create(Self);
|
||||||
|
try
|
||||||
|
if Sender=btnCompiler then begin
|
||||||
|
OpenDialog.Title:='Browse for Compiler (ppc386)';
|
||||||
|
DefaultFilename:=FindDefaultCompilerPath;
|
||||||
|
OpenDialog.Options:=OpenDialog.Options+[ofFileMustExist];
|
||||||
|
end else if Sender=btnUnitOutputDir then begin
|
||||||
|
OpenDialog.Title:='Unit Output directory';
|
||||||
|
DefaultFilename:='';
|
||||||
|
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist];
|
||||||
|
end else
|
||||||
|
exit;
|
||||||
|
OpenDialog.Filename:=ExtractFilename(DefaultFilename);
|
||||||
|
if DefaultFilename<>'' then
|
||||||
|
OpenDialog.InitialDir:=ExtractFilePath(DefaultFilename);
|
||||||
|
if OpenDialog.Execute then begin
|
||||||
|
if Sender=btnCompiler then begin
|
||||||
|
edtCompiler.Text:=OpenDialog.Filename;
|
||||||
|
end else if Sender=btnUnitOutputDir then begin
|
||||||
|
edtUnitOutputDir.Text:=OpenDialog.Filename;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
OpenDialog.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmCompilerOptions.InhTreeViewSelectionChanged(Sender: TObject);
|
procedure TfrmCompilerOptions.InhTreeViewSelectionChanged(Sender: TObject);
|
||||||
var
|
var
|
||||||
ANode: TTreeNode;
|
ANode: TTreeNode;
|
||||||
@ -3959,10 +3994,22 @@ begin
|
|||||||
Parent := grpCompiler;
|
Parent := grpCompiler;
|
||||||
Left := edtOtherUnits.Left;
|
Left := edtOtherUnits.Left;
|
||||||
Top := edtOtherUnits.Top;
|
Top := edtOtherUnits.Top;
|
||||||
Width := Parent.ClientWidth-2*Left;
|
Width := Parent.ClientWidth-Left-37;
|
||||||
Text := '';
|
Text := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
btnCompiler:=TButton.Create(Self);
|
||||||
|
with btnCompiler do begin
|
||||||
|
Name:='btnCompiler';
|
||||||
|
Parent:=grpCompiler;
|
||||||
|
Left:=edtCompiler.Left+edtCompiler.Width+3;
|
||||||
|
Top:=edtCompiler.Top;
|
||||||
|
Width:=25;
|
||||||
|
Height:=edtCompiler.Height;
|
||||||
|
Caption:='...';
|
||||||
|
OnClick:=@FileBrowseBtnClick;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------}
|
{------------------------------------------------------------}
|
||||||
|
|
||||||
grpUnitOutputDir := TGroupBox.Create(Self);
|
grpUnitOutputDir := TGroupBox.Create(Self);
|
||||||
@ -3982,12 +4029,24 @@ begin
|
|||||||
Parent := grpUnitOutputDir;
|
Parent := grpUnitOutputDir;
|
||||||
Left := edtOtherUnits.Left;
|
Left := edtOtherUnits.Left;
|
||||||
Top := edtOtherUnits.Top;
|
Top := edtOtherUnits.Top;
|
||||||
Width := Parent.ClientWidth-2*Left;
|
Width := Parent.ClientWidth-Left-37;
|
||||||
Text := '';
|
Text := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
btnUnitOutputDir:=TButton.Create(Self);
|
||||||
|
with btnUnitOutputDir do begin
|
||||||
|
Name:='btnUnitOutputDir';
|
||||||
|
Parent:=grpUnitOutputDir;
|
||||||
|
Left:=edtUnitOutputDir.Left+edtUnitOutputDir.Width+3;
|
||||||
|
Top:=edtUnitOutputDir.Top;
|
||||||
|
Width:=25;
|
||||||
|
Height:=edtUnitOutputDir.Height;
|
||||||
|
Caption:='...';
|
||||||
|
OnClick:=@FileBrowseBtnClick;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------}
|
{------------------------------------------------------------}
|
||||||
|
|
||||||
LCLWidgetTypeRadioGroup:=TRadioGroup.Create(Self);
|
LCLWidgetTypeRadioGroup:=TRadioGroup.Create(Self);
|
||||||
with LCLWidgetTypeRadioGroup do begin
|
with LCLWidgetTypeRadioGroup do begin
|
||||||
Name:='LCLWidgetTypeRadioGroup';
|
Name:='LCLWidgetTypeRadioGroup';
|
||||||
@ -3996,7 +4055,7 @@ begin
|
|||||||
Top:=grpUnitOutputDir.Top+grpUnitOutputDir.Height+5;
|
Top:=grpUnitOutputDir.Top+grpUnitOutputDir.Height+5;
|
||||||
Width:=300;
|
Width:=300;
|
||||||
Height:=45;
|
Height:=45;
|
||||||
Caption:=dlgLCLWidgetType ;
|
Caption:=dlgLCLWidgetType;
|
||||||
with Items do begin
|
with Items do begin
|
||||||
Add('gnome');
|
Add('gnome');
|
||||||
Add('gtk');
|
Add('gtk');
|
||||||
|
Loading…
Reference in New Issue
Block a user