mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:59:13 +02:00
Revert "IDE: Build mode dialog revamp". Commit by mistake
git-svn-id: trunk@39303 -
This commit is contained in:
parent
9f051d112c
commit
d38f2da57d
@ -19,16 +19,16 @@ object BuildModesForm: TBuildModesForm
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BuildModesGroupBox'
|
||||
ClientHeight = 286
|
||||
ClientWidth = 592
|
||||
ClientHeight = 288
|
||||
ClientWidth = 596
|
||||
TabOrder = 0
|
||||
object BuildModesStringGrid: TStringGrid
|
||||
AnchorSideTop.Control = BuildModeAddSpeedButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 264
|
||||
Height = 266
|
||||
Top = 22
|
||||
Width = 592
|
||||
Width = 596
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoFillColumns = True
|
||||
@ -38,19 +38,19 @@ object BuildModesForm: TBuildModesForm
|
||||
ButtonStyle = cbsCheckboxColumn
|
||||
MaxSize = 50
|
||||
Title.Caption = 'Active'
|
||||
Width = 196
|
||||
Width = 197
|
||||
end
|
||||
item
|
||||
ButtonStyle = cbsCheckboxColumn
|
||||
MaxSize = 50
|
||||
Title.Caption = 'InSession'
|
||||
Width = 196
|
||||
Width = 197
|
||||
end
|
||||
item
|
||||
MaxSize = 500
|
||||
SizePriority = 100
|
||||
Title.Caption = 'Title'
|
||||
Width = 196
|
||||
Width = 198
|
||||
end>
|
||||
FixedCols = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
|
||||
@ -59,9 +59,9 @@ object BuildModesForm: TBuildModesForm
|
||||
OnSelection = BuildModesStringGridSelection
|
||||
OnValidateEntry = BuildModesStringGridValidateEntry
|
||||
ColWidths = (
|
||||
196
|
||||
196
|
||||
196
|
||||
197
|
||||
197
|
||||
198
|
||||
)
|
||||
end
|
||||
object BuildModeAddSpeedButton: TSpeedButton
|
||||
@ -127,19 +127,17 @@ object BuildModesForm: TBuildModesForm
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 41
|
||||
Top = 319
|
||||
Height = 38
|
||||
Top = 322
|
||||
Width = 600
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
OKButton.OnClick = OKButtonClick
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
CancelButton.OnClick = CancelButtonClick
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
end
|
||||
|
@ -26,7 +26,6 @@ type
|
||||
BuildModesPopupMenu: TPopupMenu;
|
||||
BuildModesStringGrid: TStringGrid;
|
||||
ButtonPanel1: TButtonPanel;
|
||||
procedure CancelButtonClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure BuildModeDiffSpeedButtonClick(Sender: TObject);
|
||||
@ -41,11 +40,9 @@ type
|
||||
procedure BuildModesStringGridValidateEntry(Sender: TObject;
|
||||
aCol, aRow: Integer; const OldValue: string; var NewValue: String);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
private
|
||||
// FOnLoadOptionsHook: TOnLoadIDEOptions;
|
||||
// FOnSaveOptionsHook: TOnSaveIDEOptions;
|
||||
fBuildModes: TProjectBuildModes;
|
||||
FOnLoadOptionsHook: TOnLoadIDEOptions;
|
||||
FOnSaveOptionsHook: TOnSaveIDEOptions;
|
||||
FLoadShowSessionFromProject: boolean;
|
||||
FProject: TProject;
|
||||
FShowSession: boolean;
|
||||
@ -67,33 +64,17 @@ type
|
||||
write FLoadShowSessionFromProject;
|
||||
function GetSelectedBuildMode: TProjectBuildMode;
|
||||
public
|
||||
// property OnLoadIDEOptionsHook: TOnLoadIDEOptions read FOnLoadOptionsHook write FOnLoadOptionsHook;
|
||||
// property OnSaveIDEOptionsHook: TOnSaveIDEOptions read FOnSaveOptionsHook write FOnSaveOptionsHook;
|
||||
property OnLoadIDEOptionsHook: TOnLoadIDEOptions read FOnLoadOptionsHook write FOnLoadOptionsHook;
|
||||
property OnSaveIDEOptionsHook: TOnSaveIDEOptions read FOnSaveOptionsHook write FOnSaveOptionsHook;
|
||||
end;
|
||||
|
||||
function ShowBuildModesDlg(ABuildModes: TProjectBuildModes): TModalResult;
|
||||
|
||||
var
|
||||
BuildModesForm: TBuildModesForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
function ShowBuildModesDlg(ABuildModes: TProjectBuildModes): TModalResult;
|
||||
var
|
||||
BuildModesForm: TBuildModesForm;
|
||||
begin
|
||||
Result := mrCancel;
|
||||
BuildModesForm := TBuildModesForm.Create(nil);
|
||||
try
|
||||
BuildModesForm.fBuildModes.Assign(ABuildModes); // Copy to dialog.
|
||||
Result := BuildModesForm.ShowModal;
|
||||
if Result = mrOk then
|
||||
ABuildModes.Assign(BuildModesForm.fBuildModes); // Copy back from dialog.
|
||||
finally
|
||||
BuildModesForm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TBuildModesForm }
|
||||
|
||||
procedure TBuildModesForm.FormCreate(Sender: TObject);
|
||||
@ -131,12 +112,12 @@ begin
|
||||
FSwitchingMode:=true;
|
||||
try
|
||||
// save changes
|
||||
// OnSaveIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
OnSaveIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
// show diff dialog
|
||||
ShowBuildModeDiffDialog(GetSelectedBuildMode);
|
||||
IncreaseBuildMacroChangeStamp;
|
||||
// load options
|
||||
// OnLoadIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
OnLoadIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
finally
|
||||
FSwitchingMode:=false;
|
||||
end;
|
||||
@ -395,12 +376,12 @@ begin
|
||||
FSwitchingMode:=true;
|
||||
try
|
||||
// save changes
|
||||
// OnSaveIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
OnSaveIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
// switch
|
||||
FProject.ActiveBuildMode:=aMode;
|
||||
IncreaseBuildMacroChangeStamp;
|
||||
// load options
|
||||
// OnLoadIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
OnLoadIDEOptionsHook(Self,FProject.CompilerOptions);
|
||||
finally
|
||||
FSwitchingMode:=false;
|
||||
end;
|
||||
@ -481,15 +462,5 @@ begin
|
||||
Result:=FProject.BuildModes[i];
|
||||
end;
|
||||
|
||||
procedure TBuildModesForm.OKButtonClick(Sender: TObject);
|
||||
begin
|
||||
;
|
||||
end;
|
||||
|
||||
procedure TBuildModesForm.CancelButtonClick(Sender: TObject);
|
||||
begin
|
||||
;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -39,7 +39,7 @@ uses
|
||||
{$ELSE}
|
||||
BuildModesEditor,
|
||||
{$ENDIF}
|
||||
Project;
|
||||
ProjectIntf;
|
||||
|
||||
type
|
||||
TIDEOptsDlgAction = (
|
||||
@ -216,11 +216,11 @@ var
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF NewBuildModeWindow}
|
||||
{ BuildModesForm := TBuildModesForm.Create(nil);
|
||||
BuildModesForm := TBuildModesForm.Create(nil);
|
||||
try
|
||||
BuildModesForm.OnLoadIDEOptionsHook := @LoadIDEOptions;
|
||||
BuildModesForm.OnSaveIDEOptionsHook := @SaveIDEOptions;
|
||||
Does not really work (?)
|
||||
{ Does not really work (?)
|
||||
ProjectSaveOptions:=Nil;
|
||||
Rec := IDEEditorGroups.GetByIndex(GroupProject);
|
||||
if Rec <> nil then
|
||||
@ -237,16 +237,15 @@ begin
|
||||
BuildModesForm.LoadShowSessionFromProject:=false;
|
||||
BuildModesForm.ShowSession:=ProjectSaveOptions.GetSessionLocation in [pssInIDEConfig,pssInProjectDir];
|
||||
end;
|
||||
}
|
||||
BuildModesForm.LoadShowSessionFromProject:=false;
|
||||
BuildModesForm.ShowSession:=True;
|
||||
if BuildModesForm.ShowModal = mrOK then begin end;
|
||||
if BuildModesForm.ShowModal = mrOK then begin
|
||||
;
|
||||
end;
|
||||
finally
|
||||
BuildModesForm.Free;
|
||||
end;
|
||||
}
|
||||
if ShowBuildModesDlg(Project1.BuildModes) = mrOK then begin
|
||||
;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user