mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 07:56:36 +02:00
IDE: Rename dialog CustomDefines -> DefinesGui.
git-svn-id: trunk@49156 -
This commit is contained in:
parent
ca887263f1
commit
0be07e4e24
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -5603,10 +5603,10 @@ ide/componentpalette.pas svneol=native#text/pascal
|
||||
ide/compoptsmodes.pas svneol=native#text/plain
|
||||
ide/comppagespopup.lfm svneol=native#text/plain
|
||||
ide/comppagespopup.pas svneol=native#text/pascal
|
||||
ide/customdefines.lfm svneol=native#text/plain
|
||||
ide/customdefines.pas svneol=native#text/pascal
|
||||
ide/customformeditor.pp svneol=native#text/pascal
|
||||
ide/debugmanager.pas svneol=native#text/pascal
|
||||
ide/definesgui.lfm svneol=native#text/plain
|
||||
ide/definesgui.pas svneol=native#text/pascal
|
||||
ide/dialogprocs.pas svneol=native#text/pascal
|
||||
ide/diffdialog.lfm svneol=native#text/plain
|
||||
ide/diffdialog.pas svneol=native#text/pascal
|
||||
|
@ -1,35 +1,35 @@
|
||||
object CustomDefinesForm: TCustomDefinesForm
|
||||
object DefinesGuiForm: TDefinesGuiForm
|
||||
Left = 305
|
||||
Height = 326
|
||||
Top = 265
|
||||
Width = 341
|
||||
BorderIcons = [biSystemMenu]
|
||||
Caption = 'Conditional Defines'
|
||||
Caption = 'Defines'
|
||||
ClientHeight = 326
|
||||
ClientWidth = 341
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.5'
|
||||
object gbNewDefine: TGroupBox
|
||||
Left = 6
|
||||
Height = 79
|
||||
Height = 73
|
||||
Top = 6
|
||||
Width = 329
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'gbNewDefine'
|
||||
ClientHeight = 60
|
||||
ClientWidth = 325
|
||||
ClientHeight = 57
|
||||
ClientWidth = 327
|
||||
TabOrder = 0
|
||||
object AddBtn: TBitBtn
|
||||
AnchorSideTop.Control = RemoveBtn
|
||||
AnchorSideRight.Control = RemoveBtn
|
||||
Left = 163
|
||||
Height = 26
|
||||
Top = 31
|
||||
Left = 165
|
||||
Height = 27
|
||||
Top = 27
|
||||
Width = 75
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
@ -46,9 +46,9 @@ object CustomDefinesForm: TCustomDefinesForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = edDefine
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 244
|
||||
Height = 26
|
||||
Top = 31
|
||||
Left = 246
|
||||
Height = 27
|
||||
Top = 27
|
||||
Width = 75
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
@ -63,9 +63,9 @@ object CustomDefinesForm: TCustomDefinesForm
|
||||
object edDefine: TEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 25
|
||||
Height = 21
|
||||
Top = 0
|
||||
Width = 313
|
||||
Width = 315
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
@ -76,8 +76,8 @@ object CustomDefinesForm: TCustomDefinesForm
|
||||
end
|
||||
object DefinesCheckList: TCheckListBox
|
||||
Left = 6
|
||||
Height = 182
|
||||
Top = 91
|
||||
Height = 187
|
||||
Top = 85
|
||||
Width = 329
|
||||
Align = alClient
|
||||
Anchors = [akTop, akBottom]
|
||||
@ -87,11 +87,12 @@ object CustomDefinesForm: TCustomDefinesForm
|
||||
OnDblClick = DefinesCheckListDblClick
|
||||
OnKeyDown = DefinesCheckListKeyDown
|
||||
TabOrder = 1
|
||||
TopIndex = -1
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 41
|
||||
Top = 279
|
||||
Height = 42
|
||||
Top = 278
|
||||
Width = 329
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
@ -18,7 +18,7 @@
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit CustomDefines;
|
||||
unit DefinesGui;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -30,9 +30,9 @@ uses
|
||||
|
||||
type
|
||||
|
||||
{ TCustomDefinesForm }
|
||||
{ TDefinesGuiForm }
|
||||
|
||||
TCustomDefinesForm = class(TForm)
|
||||
TDefinesGuiForm = class(TForm)
|
||||
AddBtn: TBitBtn;
|
||||
ButtonPanel: TButtonPanel;
|
||||
DefinesCheckList: TCheckListBox;
|
||||
@ -75,9 +75,9 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TCustomDefinesForm }
|
||||
{ TDefinesGuiForm }
|
||||
|
||||
procedure TCustomDefinesForm.FormCreate(Sender: TObject);
|
||||
procedure TDefinesGuiForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption := lisLazBuildDefines;
|
||||
gbNewDefine.Caption := lisCodeToolsDefsDefine;
|
||||
@ -87,36 +87,36 @@ begin
|
||||
RemoveBtn.LoadGlyphFromResourceName(HInstance, 'laz_delete');
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.FormShow(Sender: TObject);
|
||||
procedure TDefinesGuiForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
DefinesCheckListClick(Nil);
|
||||
ActiveControl := DefinesCheckList;
|
||||
IdleConnected := True;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.FormDestroy(Sender: TObject);
|
||||
procedure TDefinesGuiForm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.AddBtnClick(Sender: TObject);
|
||||
procedure TDefinesGuiForm.AddBtnClick(Sender: TObject);
|
||||
begin
|
||||
DefinesCheckList.Items.Add(edDefine.Text);
|
||||
DefinesCheckList.ItemIndex := DefinesCheckList.Items.Count-1;
|
||||
UpdateButtons;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.EditChange(Sender: TObject);
|
||||
procedure TDefinesGuiForm.EditChange(Sender: TObject);
|
||||
begin
|
||||
UpdateButtons;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.HelpButtonClick(Sender: TObject);
|
||||
procedure TDefinesGuiForm.HelpButtonClick(Sender: TObject);
|
||||
begin
|
||||
LazarusHelp.ShowHelpForIDEControl(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.DefinesCheckListClick(Sender: TObject);
|
||||
procedure TDefinesGuiForm.DefinesCheckListClick(Sender: TObject);
|
||||
begin
|
||||
with DefinesCheckList do
|
||||
if ItemIndex > -1 then
|
||||
@ -124,17 +124,17 @@ begin
|
||||
UpdateButtons;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.DefinesCheckListDblClick(Sender: TObject);
|
||||
procedure TDefinesGuiForm.DefinesCheckListDblClick(Sender: TObject);
|
||||
begin
|
||||
//ModalResult := mrOK;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.RemoveBtnClick(Sender: TObject);
|
||||
procedure TDefinesGuiForm.RemoveBtnClick(Sender: TObject);
|
||||
begin
|
||||
DeleteSelected;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.DefinesCheckListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure TDefinesGuiForm.DefinesCheckListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if Key = VK_DELETE then
|
||||
begin
|
||||
@ -143,7 +143,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.SetIdleConnected(AValue: Boolean);
|
||||
procedure TDefinesGuiForm.SetIdleConnected(AValue: Boolean);
|
||||
begin
|
||||
if FIdleConnected = AValue then exit;
|
||||
FIdleConnected := AValue;
|
||||
@ -153,7 +153,7 @@ begin
|
||||
Application.RemoveOnIdleHandler(@OnIdle);
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure TDefinesGuiForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
var
|
||||
s: String;
|
||||
i, ListInd: Integer;
|
||||
@ -181,7 +181,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.DeleteSelected;
|
||||
procedure TDefinesGuiForm.DeleteSelected;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -194,14 +194,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomDefinesForm.UpdateButtons;
|
||||
procedure TDefinesGuiForm.UpdateButtons;
|
||||
begin
|
||||
AddBtn.Enabled := (edDefine.Text <> '')
|
||||
and (DefinesCheckList.Items.IndexOf(edDefine.Text) = -1);
|
||||
RemoveBtn.Enabled := DefinesCheckList.SelCount > 0;
|
||||
end;
|
||||
|
||||
function TCustomDefinesForm.ToCustomOptions(aStrings: TStrings): TModalResult;
|
||||
function TDefinesGuiForm.ToCustomOptions(aStrings: TStrings): TModalResult;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
@ -18,15 +18,15 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
Align = alClient
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Caption = 'grpConditionals'
|
||||
ClientHeight = 141
|
||||
ClientWidth = 517
|
||||
ClientHeight = 150
|
||||
ClientWidth = 519
|
||||
TabOrder = 0
|
||||
inline CondSynEdit: TSynEdit
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 113
|
||||
Height = 133
|
||||
Top = 0
|
||||
Width = 517
|
||||
Width = 519
|
||||
Align = alClient
|
||||
Font.Height = 9
|
||||
Font.Name = '-misc-dejavu sans mono-*-*-*-*-*-*-*-*-*-*-iso10646-1'
|
||||
@ -552,7 +552,6 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
'CondSynEdit'
|
||||
)
|
||||
VisibleSpecialChars = [vscSpace, vscTabAtLast]
|
||||
SelectedColor.FrameEdges = sfeAround
|
||||
SelectedColor.BackPriority = 50
|
||||
SelectedColor.ForePriority = 50
|
||||
SelectedColor.FramePriority = 50
|
||||
@ -560,23 +559,17 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
SelectedColor.ItalicPriority = 50
|
||||
SelectedColor.UnderlinePriority = 50
|
||||
SelectedColor.StrikeOutPriority = 50
|
||||
IncrementColor.FrameEdges = sfeAround
|
||||
HighlightAllColor.FrameEdges = sfeAround
|
||||
BracketHighlightStyle = sbhsBoth
|
||||
BracketMatchColor.Background = clNone
|
||||
BracketMatchColor.Foreground = clNone
|
||||
BracketMatchColor.FrameEdges = sfeAround
|
||||
BracketMatchColor.Style = [fsBold]
|
||||
FoldedCodeColor.Background = clNone
|
||||
FoldedCodeColor.Foreground = clGray
|
||||
FoldedCodeColor.FrameColor = clGray
|
||||
FoldedCodeColor.FrameEdges = sfeAround
|
||||
MouseLinkColor.Background = clNone
|
||||
MouseLinkColor.Foreground = clBlue
|
||||
MouseLinkColor.FrameEdges = sfeAround
|
||||
LineHighlightColor.Background = clNone
|
||||
LineHighlightColor.Foreground = clNone
|
||||
LineHighlightColor.FrameEdges = sfeAround
|
||||
OnChange = CondSynEditChange
|
||||
OnProcessUserCommand = CondSynEditProcessUserCommand
|
||||
inline SynLeftGutterPartList1: TSynGutterPartList
|
||||
@ -589,7 +582,6 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clBtnFace
|
||||
MarkupInfo.Foreground = clNone
|
||||
MarkupInfo.FrameEdges = sfeAround
|
||||
DigitCount = 2
|
||||
ShowOnlyLineNumbersMultiplesOf = 1
|
||||
ZeroStart = False
|
||||
@ -606,7 +598,6 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clWhite
|
||||
MarkupInfo.Foreground = clGray
|
||||
MarkupInfo.FrameEdges = sfeAround
|
||||
end
|
||||
object SynGutterCodeFolding1: TSynGutterCodeFolding
|
||||
MouseActions = <
|
||||
@ -637,7 +628,6 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
end>
|
||||
MarkupInfo.Background = clNone
|
||||
MarkupInfo.Foreground = clGray
|
||||
MarkupInfo.FrameEdges = sfeAround
|
||||
MouseActionsExpanded = <
|
||||
item
|
||||
ClickCount = ccAny
|
||||
@ -664,9 +654,9 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
end
|
||||
object CondStatusbar: TStatusBar
|
||||
Left = 0
|
||||
Height = 28
|
||||
Top = 113
|
||||
Width = 517
|
||||
Height = 17
|
||||
Top = 133
|
||||
Width = 519
|
||||
Panels = <
|
||||
item
|
||||
Width = 80
|
||||
@ -697,17 +687,17 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
Width = 521
|
||||
Align = alBottom
|
||||
Caption = 'grpCustomOptions'
|
||||
ClientHeight = 177
|
||||
ClientWidth = 517
|
||||
ClientHeight = 186
|
||||
ClientWidth = 519
|
||||
TabOrder = 2
|
||||
object memoCustomOptions: TMemo
|
||||
AnchorSideLeft.Control = grpCustomOptions
|
||||
AnchorSideBottom.Control = grpCustomOptions
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 173
|
||||
Height = 182
|
||||
Top = 4
|
||||
Width = 361
|
||||
Width = 363
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 6
|
||||
ParentShowHint = False
|
||||
@ -721,8 +711,8 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = btnDefines
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 367
|
||||
Height = 30
|
||||
Left = 369
|
||||
Height = 27
|
||||
Top = 4
|
||||
Width = 150
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -736,9 +726,9 @@ object CompilerOtherOptionsFrame: TCompilerOtherOptionsFrame
|
||||
AnchorSideTop.Control = btnAllOptions
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 367
|
||||
Height = 30
|
||||
Top = 40
|
||||
Left = 369
|
||||
Height = 27
|
||||
Top = 37
|
||||
Width = 150
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
|
@ -32,7 +32,7 @@ uses
|
||||
Dialogs, StdCtrls, ComCtrls, ExtCtrls, Buttons, LCLType, LazUTF8,
|
||||
CodeToolsCfgScript, KeywordFuncLists, LazarusIDEStrConsts,
|
||||
IDEOptionsIntf, CompOptsIntf, IDECommands, LazIDEIntf, Project, PackageDefs,
|
||||
CompilerOptions, Compiler, AllCompilerOptions, CustomDefines,
|
||||
CompilerOptions, Compiler, AllCompilerOptions, DefinesGui,
|
||||
EditorOptions, SynEdit, SynEditKeyCmds, SynCompletion, SourceSynEditor;
|
||||
|
||||
type
|
||||
@ -147,19 +147,19 @@ end;
|
||||
|
||||
procedure TCompilerOtherOptionsFrame.btnDefinesClick(Sender: TObject);
|
||||
var
|
||||
EditForm: TCustomDefinesForm;
|
||||
EditForm: TDefinesGuiForm;
|
||||
begin
|
||||
EditForm := TCustomDefinesForm.Create(Nil);
|
||||
EditForm := TDefinesGuiForm.Create(Nil);
|
||||
try
|
||||
try
|
||||
EditForm.OptionsReader := FOptionsReader;
|
||||
EditForm.OptionsThread := FOptionsThread;
|
||||
EditForm.CustomOptions := memoCustomOptions.Lines;
|
||||
EditForm.DefinesCheckList.Items.Assign(Project1.CustomDefines);
|
||||
EditForm.DefinesCheckList.Items.Assign(Project1.OtherDefines);
|
||||
EditForm.UseComments := FUseComments;
|
||||
if EditForm.ShowModal = mrOK then
|
||||
begin
|
||||
Project1.CustomDefines.Assign(EditForm.DefinesCheckList.Items);
|
||||
Project1.OtherDefines.Assign(EditForm.DefinesCheckList.Items);
|
||||
// Synchronize with custom options memo
|
||||
EditForm.ToCustomOptions(memoCustomOptions.Lines);
|
||||
memoCustomOptions.Invalidate;
|
||||
|
@ -434,6 +434,7 @@
|
||||
<ComponentName Value="CompilerOtherOptionsFrame"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="Compiler_Other_Options"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="frames/compiler_compilation_options.pas"/>
|
||||
@ -604,6 +605,7 @@
|
||||
<ComponentName Value="EditorOptionsForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="EditorOptions"/>
|
||||
</Unit88>
|
||||
<Unit89>
|
||||
<Filename Value="../packager/cleanpkgdeps.pas"/>
|
||||
@ -633,6 +635,7 @@
|
||||
<Unit93>
|
||||
<Filename Value="../converter/convertdelphi.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ConvertDelphi"/>
|
||||
</Unit93>
|
||||
<Unit94>
|
||||
<Filename Value="etfpcmsgparser.pas"/>
|
||||
@ -778,6 +781,7 @@
|
||||
<Unit123>
|
||||
<Filename Value="lazarusidestrconsts.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="LazarusIDEStrConsts"/>
|
||||
</Unit123>
|
||||
<Unit124>
|
||||
<Filename Value="codetemplatesdlg.pas"/>
|
||||
@ -1269,66 +1273,69 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit228>
|
||||
<Unit229>
|
||||
<Filename Value="customdefines.pas"/>
|
||||
<Filename Value="examplemanager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
</Unit229>
|
||||
<Unit230>
|
||||
<Filename Value="examplemanager.pas"/>
|
||||
<Filename Value="formeditor.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
</Unit230>
|
||||
<Unit231>
|
||||
<Filename Value="formeditor.pp"/>
|
||||
<Filename Value="revision.inc"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit231>
|
||||
<Unit232>
|
||||
<Filename Value="revision.inc"/>
|
||||
<Filename Value="objectlists.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit232>
|
||||
<Unit233>
|
||||
<Filename Value="objectlists.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit233>
|
||||
<Unit234>
|
||||
<Filename Value="mouseactiondialog.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
</Unit234>
|
||||
<Unit235>
|
||||
</Unit233>
|
||||
<Unit234>
|
||||
<Filename Value="basedebugmanager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit235>
|
||||
<Unit236>
|
||||
</Unit234>
|
||||
<Unit235>
|
||||
<Filename Value="imexportcompileropts.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="ImExportCompOptsDlg"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit236>
|
||||
<Unit237>
|
||||
</Unit235>
|
||||
<Unit236>
|
||||
<Filename Value="initialsetupproc.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit237>
|
||||
<Unit238>
|
||||
</Unit236>
|
||||
<Unit237>
|
||||
<Filename Value="qfinitlocalvardlg.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="QFInitLocalVarDialog"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit238>
|
||||
<Unit239>
|
||||
</Unit237>
|
||||
<Unit238>
|
||||
<Filename Value="../packager/interpkgconflictfiles.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
</Unit239>
|
||||
<Unit240>
|
||||
</Unit238>
|
||||
<Unit239>
|
||||
<Filename Value="encloseifdef.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="EncloseIfDefForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="EncloseIfDef"/>
|
||||
</Unit239>
|
||||
<Unit240>
|
||||
<Filename Value="definesgui.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="DefinesGuiForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="DefinesGui"/>
|
||||
</Unit240>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
|
@ -770,7 +770,7 @@ type
|
||||
FStateFlags: TLazProjectStateFlags;
|
||||
FStorePathDelim: TPathDelimSwitch;
|
||||
FUnitList: TFPList; // list of _all_ units (TUnitInfo)
|
||||
FCustomDefines: TStrings; // list of user selectable defines for custom options
|
||||
FOtherDefines: TStrings; // list of user selectable defines for custom options
|
||||
FUpdateLock: integer;
|
||||
FUseAsDefault: Boolean;
|
||||
// Variables used by ReadProject / WriteProject
|
||||
@ -836,7 +836,7 @@ type
|
||||
// Methods for ReadProject
|
||||
function LoadOldProjectType(const Path: string): TOldProjectType;
|
||||
procedure LoadFlags(const Path: string);
|
||||
procedure LoadCustomDefines(const Path: string);
|
||||
procedure LoadOtherDefines(const Path: string);
|
||||
procedure LoadSessionInfo(const Path: string; Merge: boolean);
|
||||
procedure LoadFromLPI;
|
||||
procedure LoadFromSession;
|
||||
@ -845,7 +845,7 @@ type
|
||||
// Methods for WriteProject
|
||||
procedure SaveFlags(const Path: string);
|
||||
procedure SaveUnits(const Path: string; SaveSession: boolean);
|
||||
procedure SaveCustomDefines(const Path: string);
|
||||
procedure SaveOtherDefines(const Path: string);
|
||||
procedure SaveSessionInfo(const Path: string);
|
||||
procedure SaveToLPI;
|
||||
procedure SaveToSession;
|
||||
@ -1111,7 +1111,7 @@ type
|
||||
property StorePathDelim: TPathDelimSwitch read FStorePathDelim write SetStorePathDelim;
|
||||
property TargetFilename: string read GetTargetFilename write SetTargetFilename;
|
||||
property Units[Index: integer]: TUnitInfo read GetUnits;
|
||||
property CustomDefines: TStrings read FCustomDefines;
|
||||
property OtherDefines: TStrings read FOtherDefines;
|
||||
property UpdateLock: integer read FUpdateLock;
|
||||
property UseAsDefault: Boolean read FUseAsDefault write FUseAsDefault; // for dialog only (used to store options once)
|
||||
end;
|
||||
@ -2680,7 +2680,7 @@ begin
|
||||
FRunParameters:=TRunParamsOptions.Create;
|
||||
Title := '';
|
||||
FUnitList := TFPList.Create; // list of TUnitInfo
|
||||
FCustomDefines := TStringList.Create;
|
||||
FOtherDefines := TStringList.Create;
|
||||
|
||||
FResources := TProjectResources.Create(Self);
|
||||
ProjResources.OnModified := @EmbeddedObjectModified;
|
||||
@ -2703,7 +2703,7 @@ begin
|
||||
FreeAndNil(FAllEditorsInfoList);
|
||||
FreeThenNil(FResources);
|
||||
FreeThenNil(FBookmarks);
|
||||
FreeThenNil(FCustomDefines);
|
||||
FreeThenNil(FOtherDefines);
|
||||
FreeThenNil(FUnitList);
|
||||
FreeThenNil(FJumpHistory);
|
||||
FreeThenNil(FSourceDirectories);
|
||||
@ -2764,17 +2764,20 @@ begin
|
||||
Flags:=Flags-[pfUseDefaultCompilerOptions];
|
||||
end;
|
||||
|
||||
procedure TProject.LoadCustomDefines(const Path: string);
|
||||
procedure TProject.LoadOtherDefines(const Path: string);
|
||||
var
|
||||
Cnt, i: Integer;
|
||||
s: String;
|
||||
SubPath, s: String;
|
||||
begin
|
||||
Cnt := FXMLConfig.GetValue(Path+'CustomDefines/Count', 0);
|
||||
SubPath := 'OtherDefines/';
|
||||
if not FXMLConfig.HasPath(Path+SubPath, False) then
|
||||
SubPath := 'CustomDefines/'; // Load from the old path name.
|
||||
Cnt := FXMLConfig.GetValue(Path+SubPath+'Count', 0);
|
||||
for i := 0 to Cnt-1 do
|
||||
begin
|
||||
s := FXMLConfig.GetValue(Path+'CustomDefines/Define'+IntToStr(i)+'/Value', '');
|
||||
s := FXMLConfig.GetValue(Path+SubPath+'Define'+IntToStr(i)+'/Value', '');
|
||||
if s <> '' then
|
||||
CustomDefines.Add(s);
|
||||
OtherDefines.Add(s);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2894,8 +2897,8 @@ begin
|
||||
RunParameterOptions.Load(FXMLConfig,Path,fPathDelimChanged);
|
||||
// load the Publish Options
|
||||
PublishOptions.LoadFromXMLConfig(FXMLConfig,Path+'PublishOptions/',fPathDelimChanged);
|
||||
// load custom defines
|
||||
LoadCustomDefines(Path);
|
||||
// load defines used for custom options
|
||||
LoadOtherDefines(Path);
|
||||
// load session info
|
||||
LoadSessionInfo(Path,false);
|
||||
// call hooks to read their info (e.g. DebugBoss)
|
||||
@ -2919,8 +2922,8 @@ begin
|
||||
// load MacroValues and compiler options
|
||||
BuildModes.LoadSessionFromXMLConfig(FXMLConfig, Path, FLoadParts);
|
||||
|
||||
// load custom defines
|
||||
LoadCustomDefines(Path);
|
||||
// load defines used for custom options
|
||||
LoadOtherDefines(Path);
|
||||
// load session info
|
||||
LoadSessionInfo(Path,true);
|
||||
|
||||
@ -3096,15 +3099,14 @@ begin
|
||||
FXMLConfig.SetDeleteValue(Path+'Units/Count',SaveUnitCount,0);
|
||||
end;
|
||||
|
||||
procedure TProject.SaveCustomDefines(const Path: string);
|
||||
procedure TProject.SaveOtherDefines(const Path: string);
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
for i:=0 to FCustomDefines.Count-1 do begin
|
||||
FXMLConfig.SetDeleteValue(Path+'CustomDefines/Define'+IntToStr(i)+'/Value',
|
||||
FCustomDefines[i],'');
|
||||
end;
|
||||
FXMLConfig.SetDeleteValue(Path+'CustomDefines/Count',FCustomDefines.Count,0);
|
||||
for i:=0 to FOtherDefines.Count-1 do
|
||||
FXMLConfig.SetDeleteValue(Path+'OtherDefines/Define'+IntToStr(i)+'/Value',
|
||||
FOtherDefines[i],'');
|
||||
FXMLConfig.SetDeleteValue(Path+'OtherDefines/Count',FOtherDefines.Count,0);
|
||||
end;
|
||||
|
||||
procedure TProject.SaveSessionInfo(const Path: string);
|
||||
@ -3185,8 +3187,8 @@ begin
|
||||
SaveUnits(Path,FSaveSessionInLPI);
|
||||
|
||||
if FSaveSessionInLPI then begin
|
||||
// save custom defines
|
||||
SaveCustomDefines(Path);
|
||||
// save defines used for custom options
|
||||
SaveOtherDefines(Path);
|
||||
// save session info
|
||||
SaveSessionInfo(Path);
|
||||
end;
|
||||
@ -3221,8 +3223,8 @@ begin
|
||||
BuildModes.SaveSessionData(Path);
|
||||
// save all units
|
||||
SaveUnits(Path,true);
|
||||
// save custom defines
|
||||
SaveCustomDefines(Path);
|
||||
// save defines used for custom options
|
||||
SaveOtherDefines(Path);
|
||||
// save session info
|
||||
SaveSessionInfo(Path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user