mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 10:19:26 +01:00
IDE: Allow customizing the IDE window caption by ide-macros. Issue #41092
This commit is contained in:
parent
91fe3cc4bc
commit
ab08a3c959
@ -63,7 +63,7 @@ uses
|
||||
MiscOptions, ExtTools, etFPCMsgParser, etPas2jsMsgParser, Compiler,
|
||||
FPCSrcScan, PackageDefs, PackageSystem, Project, ProjectIcon, BaseBuildManager,
|
||||
ApplicationBundle, RunParamsOpts, IdeTransferMacros, SearchPathProcs, RunParamOptions;
|
||||
|
||||
|
||||
const
|
||||
cInvalidCompiler = 'InvalidCompiler';
|
||||
|
||||
@ -108,6 +108,8 @@ type
|
||||
PlatformIndependent: boolean): string;
|
||||
function MacroFuncBuildMode(const {%H-}Param: string; const {%H-}Data: PtrInt;
|
||||
var {%H-}Abort: boolean): string;
|
||||
function MacroFuncBuildModeCaption(const {%H-}Param: string; const {%H-}Data: PtrInt;
|
||||
var {%H-}Abort: boolean): string;
|
||||
function MacroFuncEnv(const Param: string; const {%H-}Data: PtrInt;
|
||||
var {%H-}Abort: boolean): string;
|
||||
function MacroFuncCompPath(const {%H-}s:string; const {%H-}Data: PtrInt;
|
||||
@ -272,7 +274,7 @@ type
|
||||
property FPCSrcScans: TFPCSrcScans read FFPCSrcScans;
|
||||
property BuildTarget: TProject read FBuildTarget; // TProject or nil
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
MainBuildBoss: TBuildManager = nil;
|
||||
TheCompiler: TCompiler = nil;
|
||||
@ -387,6 +389,15 @@ begin
|
||||
Result:=GetActiveBuildModeName;
|
||||
end;
|
||||
|
||||
function TBuildManager.MacroFuncBuildModeCaption(const Param: string; const Data: PtrInt;
|
||||
var Abort: boolean): string;
|
||||
begin
|
||||
if (Project1 <> nil) and (Project1.BuildModes.Count > 1) then
|
||||
Result := Project1.ActiveBuildMode.GetCaption
|
||||
else
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
constructor TBuildManager.Create(AOwner: TComponent);
|
||||
begin
|
||||
EnvironmentOptions := TEnvironmentOptions.Create;
|
||||
@ -450,6 +461,8 @@ begin
|
||||
lisProjectMacroProperties,@MacroFuncProject,[]));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('BuildMode','',
|
||||
lisNameOfActiveBuildMode, @MacroFuncBuildMode, []));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('BuildModeCaption','',
|
||||
lisCaptionOfActiveBuildMode, @MacroFuncBuildModeCaption, []));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('LCLWidgetType','',
|
||||
lisLCLWidgetType,@MacroFuncLCLWidgetType,[]));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('TargetCPU','',
|
||||
@ -1047,7 +1060,7 @@ begin
|
||||
end;
|
||||
if ResetBuildTarget then
|
||||
SetBuildTarget('','','','',smsfsSkip,true);
|
||||
|
||||
|
||||
// start the compiler and ask for his settings
|
||||
// provide an english message file
|
||||
UpdateEnglishErrorMsgFilename;
|
||||
@ -2132,7 +2145,7 @@ begin
|
||||
if Project1.MainUnitID>=0 then
|
||||
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
|
||||
AnUnitInfo := Project1.FirstPartOfProject;
|
||||
while AnUnitInfo<>nil do
|
||||
while AnUnitInfo<>nil do
|
||||
begin
|
||||
if AnUnitInfo.HasResources then begin
|
||||
case GetResourceType(AnUnitInfo) of
|
||||
@ -2228,6 +2241,15 @@ begin
|
||||
Result:=Project1.CompilerOptions.GetUnitPath(false)
|
||||
else if SysUtils.CompareText(Param,'InfoFile')=0 then
|
||||
Result:=Project1.ProjectInfoFile
|
||||
else if SysUtils.CompareText(Param,'InfoDir')=0 then
|
||||
Result:=ExtractFileDir(Project1.ProjectInfoFile)
|
||||
else if SysUtils.CompareText(Param,'Title')=0 then
|
||||
Result:=Project1.GetTitleOrName
|
||||
else if SysUtils.CompareText(Param,'TitleNew')=0 then begin
|
||||
Result:=Project1.GetTitleOrName;
|
||||
if Result = '' then
|
||||
Result := lisnewProject;
|
||||
end
|
||||
else if SysUtils.CompareText(Param,'OutputDir')=0 then
|
||||
Result:=Project1.CompilerOptions.GetUnitOutPath(false)
|
||||
else begin
|
||||
|
||||
@ -150,6 +150,7 @@ type
|
||||
FIDETitleStartsWithProject: boolean;
|
||||
FIDETitleShowsBuildMode: boolean;
|
||||
FIDETitleShowsProjectDir: boolean;
|
||||
FIDETitleBarCustomText: string;
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions: TIDECoolBarOptions;
|
||||
// Editor Toolbar
|
||||
@ -187,10 +188,11 @@ type
|
||||
property CompletionWindowHeight: Integer read FCompletionWindowHeight write FCompletionWindowHeight;
|
||||
property IDETitleStartsWithProject: boolean read FIDETitleStartsWithProject
|
||||
write FIDETitleStartsWithProject;
|
||||
property IDETitleShowsBuildMode: boolean read FIDETitleShowsBuildMode
|
||||
write FIDETitleShowsBuildMode;
|
||||
property IDETitleShowsBuildMode: boolean read FIDETitleShowsBuildMode;
|
||||
property IDETitleShowsProjectDir: boolean read FIDETitleShowsProjectDir
|
||||
write FIDETitleShowsProjectDir;
|
||||
property IDETitleBarCustomText: string read FIDETitleBarCustomText
|
||||
write FIDETitleBarCustomText;
|
||||
property IDECoolBarOptions: TIDECoolBarOptions read FIDECoolBarOptions;
|
||||
property EditorToolBarOptions: TEditorToolBarOptions read FEditorToolBarOptions;
|
||||
property ComponentPaletteOptions: TCompPaletteOptions read FComponentPaletteOptions;
|
||||
@ -571,6 +573,7 @@ begin
|
||||
FIDETitleStartsWithProject:=true;
|
||||
FIDETitleShowsBuildMode:=true;
|
||||
FIDETitleShowsProjectDir:=true;
|
||||
FIDETitleBarCustomText:='';
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions:=TIDECoolBarOptions.Create;
|
||||
// Editor Toolbar
|
||||
@ -638,6 +641,7 @@ begin
|
||||
FIDETitleStartsWithProject := Source.FIDETitleStartsWithProject;
|
||||
FIDETitleShowsBuildMode := Source.FIDETitleShowsBuildMode;
|
||||
FIDETitleShowsProjectDir := Source.FIDETitleShowsProjectDir;
|
||||
FIDETitleBarCustomText:= Source.FIDETitleBarCustomText;
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions.Assign(Source.FIDECoolBarOptions);
|
||||
// Editor Toolbar
|
||||
@ -671,6 +675,15 @@ begin
|
||||
FIDETitleStartsWithProject:=FXMLCfg.GetValue(Path+'IDETitleStartsWithProject/Value',true);
|
||||
FIDETitleShowsBuildMode:=FXMLCfg.GetValue(Path+'IDETitleShowsBuildMode/Value',true);
|
||||
FIDETitleShowsProjectDir:=FXMLCfg.GetValue(Path+'IDETitleShowsProjectDir/Value',true);
|
||||
FIDETitleBarCustomText:=FXMLCfg.GetValue(Path+'IDETitleBarCustomText/Value','');
|
||||
if (EnvironmentOptions.FileVersion < 112) and (FIDETitleBarCustomText = '')
|
||||
then begin
|
||||
FIDETitleBarCustomText := '$project(TitleNew)';
|
||||
if FIDETitleShowsProjectDir then
|
||||
FIDETitleBarCustomText := FIDETitleBarCustomText + ' $EncloseBracket($project(infodir))';
|
||||
if FIDETitleShowsBuildMode then
|
||||
FIDETitleBarCustomText := FIDETitleBarCustomText + ' $(BuildModeCaption)';
|
||||
end;
|
||||
// CompletionWindow
|
||||
FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Width/Value', FCompletionWindowWidth);
|
||||
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6);
|
||||
@ -723,6 +736,7 @@ begin
|
||||
FXMLCfg.SetDeleteValue(Path+'IDETitleStartsWithProject/Value',FIDETitleStartsWithProject,true);
|
||||
FXMLCfg.SetDeleteValue(Path+'IDETitleShowsBuildMode/Value',FIDETitleShowsBuildMode,true);
|
||||
FXMLCfg.SetDeleteValue(Path+'IDETitleShowsProjectDir/Value',FIDETitleShowsProjectDir,true);
|
||||
FXMLCfg.SetDeleteValue(Path+'IDETitleBarCustomText/Value',FIDETitleBarCustomText,'');
|
||||
// CompletionWindow
|
||||
FXMLCfg.SetValue(Path+'CompletionWindowOptions/Width/Value',FCompletionWindowWidth);
|
||||
FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6);
|
||||
|
||||
@ -14,9 +14,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 18
|
||||
Width = 215
|
||||
Height = 19
|
||||
Top = 15
|
||||
Width = 179
|
||||
Caption = 'SingleTaskBarButtonCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -28,9 +28,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 40
|
||||
Width = 180
|
||||
Height = 19
|
||||
Top = 34
|
||||
Width = 150
|
||||
Caption = 'HideIDEOnRunCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -41,9 +41,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideTop.Control = HideIDEOnRunCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 62
|
||||
Width = 220
|
||||
Height = 19
|
||||
Top = 53
|
||||
Width = 184
|
||||
Caption = 'TitleStartsWithProjectCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -54,39 +54,26 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideTop.Control = TitleStartsWithProjectCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 84
|
||||
Width = 214
|
||||
Height = 19
|
||||
Top = 72
|
||||
Width = 179
|
||||
Caption = 'TitleShowsProjectDirCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object TitleShowsBuildModeCheckBox: TCheckBox
|
||||
object NameForDesignedFormListCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TitleShowsProjectDirCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 106
|
||||
Width = 219
|
||||
Caption = 'TitleShowsBuildModeCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 4
|
||||
end
|
||||
object NameForDesignedFormListCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TitleShowsBuildModeCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 128
|
||||
Width = 256
|
||||
Height = 19
|
||||
Top = 91
|
||||
Width = 215
|
||||
Caption = 'NameForDesignedFormListCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
TabOrder = 4
|
||||
end
|
||||
object lblShowingWindows: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -94,7 +81,7 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 18
|
||||
Height = 15
|
||||
Top = 0
|
||||
Width = 573
|
||||
Caption = 'lblShowingWindows'
|
||||
@ -107,38 +94,66 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideTop.Control = NameForDesignedFormListCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 150
|
||||
Width = 218
|
||||
Height = 19
|
||||
Top = 110
|
||||
Width = 184
|
||||
Caption = 'AutoAdjustIDEHeightCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
TabOrder = 5
|
||||
end
|
||||
object AutoAdjustIDEHeightFullCompPalCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = AutoAdjustIDEHeightCheckBox
|
||||
AnchorSideTop.Control = AutoAdjustIDEHeightCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 172
|
||||
Width = 294
|
||||
Height = 19
|
||||
Top = 129
|
||||
Width = 252
|
||||
Caption = 'AutoAdjustIDEHeightFullCompPalCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
TabOrder = 6
|
||||
end
|
||||
object ProjectInspectorShowPropsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = AutoAdjustIDEHeightFullCompPalCheckBox
|
||||
AnchorSideTop.Control = AutoAdjustIDEHeightFullCompPalCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 194
|
||||
Width = 257
|
||||
Height = 19
|
||||
Top = 148
|
||||
Width = 216
|
||||
Caption = 'ProjectInspectorShowPropsCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
end
|
||||
object lblTitleBar: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = EdTitleBar
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 173
|
||||
Width = 52
|
||||
Caption = 'lblTitleBar'
|
||||
end
|
||||
object EdTitleBar: TComboBox
|
||||
AnchorSideLeft.Control = lblTitleBar
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ProjectInspectorShowPropsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 57
|
||||
Height = 23
|
||||
Top = 169
|
||||
Width = 515
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 5
|
||||
BorderSpacing.Top = 2
|
||||
BorderSpacing.Right = 1
|
||||
ItemHeight = 15
|
||||
TabOrder = 8
|
||||
end
|
||||
end
|
||||
|
||||
@ -42,11 +42,12 @@ type
|
||||
|
||||
TWindowOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox: TCheckBox;
|
||||
EdTitleBar: TComboBox;
|
||||
lblTitleBar: TLabel;
|
||||
ProjectInspectorShowPropsCheckBox: TCheckBox;
|
||||
lblShowingWindows: TDividerBevel;
|
||||
NameForDesignedFormListCheckBox: TCheckBox;
|
||||
AutoAdjustIDEHeightCheckBox: TCheckBox;
|
||||
TitleShowsBuildModeCheckBox: TCheckBox;
|
||||
HideIDEOnRunCheckBox: TCheckBox;
|
||||
SingleTaskBarButtonCheckBox: TCheckBox;
|
||||
TitleStartsWithProjectCheckBox: TCheckBox;
|
||||
@ -82,10 +83,9 @@ begin
|
||||
HideIDEOnRunCheckBox.Hint := dlgHideIDEOnRunHint;
|
||||
TitleStartsWithProjectCheckBox.Caption:=lisIDETitleStartsWithProjectName;
|
||||
TitleStartsWithProjectCheckBox.Hint:=lisTitleInTaskbarShowsForExampleProject1LpiLazarus;
|
||||
TitleShowsBuildModeCheckBox.Caption:=lisIDETitleShowsBuildMode;
|
||||
TitleShowsBuildModeCheckBox.Hint:=lisBuildModeInTitleInExample;
|
||||
TitleShowsProjectDirCheckBox.Caption:=lisIDETitleShowsProjectDir;
|
||||
TitleShowsProjectDirCheckBox.Hint:=lisProjectDirectoryIsShowedInIdeTitleBar;
|
||||
lblTitleBar.Caption:=lisIDETitleCustum;
|
||||
NameForDesignedFormListCheckBox.Caption:=lisWindowMenuWithNameForDesignedForm;
|
||||
NameForDesignedFormListCheckBox.Hint:=lisWindowMenuWithNameForDesignedFormHint;
|
||||
AutoAdjustIDEHeightCheckBox.Caption:=lisAutoAdjustIDEHeight;
|
||||
@ -93,6 +93,17 @@ begin
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox.Caption:=lisAutoAdjustIDEHeightFullComponentPalette;
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox.Hint:=lisAutoAdjustIDEHeightFullComponentPaletteHint;
|
||||
ProjectInspectorShowPropsCheckBox.Caption:=lisProjectInspectorShowProps;
|
||||
|
||||
EdTitleBar.AddItem('$project(TitleNew)', nil);
|
||||
EdTitleBar.AddItem('$project(TitleNew) $EncloseBracket($project(infodir))', nil);
|
||||
EdTitleBar.AddItem('$(BuildModeCaption)', nil);
|
||||
EdTitleBar.AddItem('$project(TitleNew) $EncloseBracket($project(infodir)) $(BuildModeCaption)', nil);
|
||||
EdTitleBar.AddItem('$(FPCTarget)', nil);
|
||||
EdTitleBar.AddItem('$TargetCPU(Param)-$TargetOS(Param)-$SubTarget(Param)', nil);
|
||||
EdTitleBar.AddItem('$(LCLWidgetType)', nil);
|
||||
EdTitleBar.AddItem('$(FPCVer)', nil);
|
||||
EdTitleBar.AddItem('$project(TitleNew) $EncloseBracket($project(infodir)) $(BuildModeCaption) $(LCLWidgetType) $(FPCTarget)', nil);
|
||||
EdTitleBar.AddItem('$(EdFile)', nil);
|
||||
end;
|
||||
|
||||
procedure TWindowOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -108,8 +119,8 @@ begin
|
||||
SingleTaskBarButtonCheckBox.Checked := SingleTaskBarButton;
|
||||
HideIDEOnRunCheckBox.Checked := HideIDEOnRun;
|
||||
TitleStartsWithProjectCheckBox.Checked := IDETitleStartsWithProject;
|
||||
TitleShowsBuildModeCheckBox.Checked := IDETitleShowsBuildMode;
|
||||
TitleShowsProjectDirCheckBox.Checked := IDETitleShowsProjectDir;
|
||||
EdTitleBar.Text := IDETitleBarCustomText;
|
||||
NameForDesignedFormListCheckBox.Checked := IDENameForDesignedFormList;
|
||||
AutoAdjustIDEHeightCheckBox.Checked := AutoAdjustIDEHeight;
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox.Checked := AutoAdjustIDEHeightFullCompPal;
|
||||
@ -130,8 +141,8 @@ begin
|
||||
SingleTaskBarButton := SingleTaskBarButtonCheckBox.Checked;
|
||||
HideIDEOnRun := HideIDEOnRunCheckBox.Checked;
|
||||
IDETitleStartsWithProject := TitleStartsWithProjectCheckBox.Checked;
|
||||
IDETitleShowsBuildMode := TitleShowsBuildModeCheckBox.Checked;
|
||||
IDETitleShowsProjectDir := TitleShowsProjectDirCheckBox.Checked;
|
||||
IDETitleBarCustomText := EdTitleBar.Text;
|
||||
IDENameForDesignedFormList := NameForDesignedFormListCheckBox.Checked;
|
||||
AutoAdjustIDEHeight := AutoAdjustIDEHeightCheckBox.Checked;
|
||||
AutoAdjustIDEHeightFullCompPal := AutoAdjustIDEHeightFullCompPalCheckBox.Checked;
|
||||
|
||||
@ -1313,7 +1313,7 @@ resourcestring
|
||||
+' one button per window.';
|
||||
lisIDETitleStartsWithProjectName = 'IDE title starts with project name';
|
||||
lisIDETitleShowsProjectDir = 'IDE title shows project directory';
|
||||
lisIDETitleShowsBuildMode = 'IDE title shows selected build mode';
|
||||
lisIDETitleCustum = 'Customize IDE window title';
|
||||
lisAutoAdjustIDEHeight = 'Automatically adjust IDE main window height';
|
||||
lisAutoAdjustIDEHeightHint = '';
|
||||
lisAutoAdjustIDEHeightFullComponentPalette = 'Show complete component palette';
|
||||
@ -1324,8 +1324,6 @@ resourcestring
|
||||
lisWindowMenuWithNameForDesignedFormHint = 'Useful especially if the caption is left empty.';
|
||||
lisTitleInTaskbarShowsForExampleProject1LpiLazarus = 'Title in taskbar '
|
||||
+'shows for example: project1 - Lazarus';
|
||||
lisBuildModeInTitleInExample = 'Title in taskbar '
|
||||
+'shows for example: project1 - Release - Lazarus';
|
||||
lisProjectDirectoryIsShowedInIdeTitleBar = 'Title in taskbar '
|
||||
+'shows also directory path of the project';
|
||||
|
||||
@ -1447,6 +1445,7 @@ resourcestring
|
||||
dlgReferenceColor = 'Reference';
|
||||
lisAllBuildModes = '<All build modes>';
|
||||
lisNameOfActiveBuildMode = 'Name of active build mode';
|
||||
lisCaptionOfActiveBuildMode = 'Caption of active build mode';
|
||||
dlfReadOnlyColor = 'Read Only';
|
||||
dlgHighlightColor = 'Highlight Color';
|
||||
dlgHighlightFontColor = 'Highlight Font Color';
|
||||
|
||||
21
ide/main.pp
21
ide/main.pp
@ -9012,7 +9012,7 @@ procedure TMainIDE.UpdateCaption;
|
||||
end;
|
||||
|
||||
var
|
||||
rev, NewCaption, NewTitle, ProjectName, DirName: String;
|
||||
rev, NewCaption, NewTitle, ProjectName, DirName, CustomnCaption: String;
|
||||
begin
|
||||
if MainIDEBar = nil then Exit;
|
||||
if ToolStatus = itExiting then Exit;
|
||||
@ -9041,13 +9041,21 @@ begin
|
||||
end
|
||||
else
|
||||
ProjectName := lisnewProject;
|
||||
NewTitle := AddToCaption(NewCaption, ProjectName);
|
||||
if EnvironmentGuiOpts.Desktop.IDETitleShowsBuildMode
|
||||
and (Project1.BuildModes.Count > 1) then
|
||||
ProjectName:= ProjectName + ' - ' +Project1.ActiveBuildMode.GetCaption;
|
||||
NewCaption := AddToCaption(NewCaption, ProjectName);
|
||||
NewTitle := AddToCaption(NewTitle, ProjectName);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (GlobalMacroList <> nil) then begin
|
||||
CustomnCaption := EnvironmentGuiOpts.Desktop.IDETitleBarCustomText;
|
||||
if CustomnCaption <> '' then begin
|
||||
if not GlobalMacroList.SubstituteStr(CustomnCaption) then
|
||||
CustomnCaption := EnvironmentGuiOpts.Desktop.IDETitleBarCustomText;
|
||||
if CustomnCaption <> '' then begin
|
||||
NewCaption := AddToCaption(NewCaption, CustomnCaption);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
case ToolStatus of
|
||||
itBuilder: NewCaption := Format(liscompiling, [NewCaption]);
|
||||
itDebugger:
|
||||
@ -11499,6 +11507,7 @@ procedure TMainIDE.SrcNotebookEditorChanged(Sender: TObject);
|
||||
begin
|
||||
if SourceEditorManager.SourceEditorCount = 0 then Exit;
|
||||
UpdateSaveMenuItemsAndButtons(false);
|
||||
UpdateCaption;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.SrcNotebookUpdateProjectFile(Sender: TObject;
|
||||
|
||||
@ -50,13 +50,14 @@ uses
|
||||
ModeMatrixOpts;
|
||||
|
||||
const
|
||||
EnvOptsVersion: integer = 110;
|
||||
EnvOptsVersion: integer = 112;
|
||||
// 107 added Lazarus version.
|
||||
// 108 added LastCalledByLazarusFullPath.
|
||||
// 109 changed paths for desktop settings, supporting multiple desktops.
|
||||
// 110 changed BackupType to string instead of integer.
|
||||
// 111 refactored code dealing with options, split into many units,
|
||||
// removed LCL dependency from EnvironmentOpts.
|
||||
// 112 Changed Window (sub) options: Added IDETitleBarCustomText
|
||||
{$IFDEF Windows}
|
||||
DefaultMakefilename = '$Path($(CompPath))make.exe';
|
||||
{$ELSE}
|
||||
@ -381,6 +382,7 @@ type
|
||||
property Filename: string read FFilename write SetFilename;
|
||||
function GetDefaultConfigFilename: string;
|
||||
procedure CreateConfig;
|
||||
property FileVersion: integer read FFileVersion;
|
||||
property OldLazarusVersion: string read FOldLazarusVersion;
|
||||
|
||||
function GetParsedLazarusDirectory: string; override;
|
||||
|
||||
@ -21,6 +21,7 @@ resourcestring
|
||||
lisTMFunctionExtractFileNameOnly = 'Function: extract file name only';
|
||||
lisTMFunctionAppendPathDelimiter = 'Function: append path delimiter';
|
||||
lisTMFunctionChompPathDelimiter = 'Function: remove trailing path delimiter';
|
||||
lisTMFunctionEncloseBrackets = 'Function: Enclose in ()';
|
||||
lisTMunknownMacro = '(unknown macro: %s)';
|
||||
lisEndlessLoopInMacros = 'Endless loop in macros';
|
||||
// Component Name Validity
|
||||
|
||||
@ -97,6 +97,10 @@ msgstr "Funció: afegir el delimitador de la trajectòria"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funció: eliminar el delimitador de la trajectòria"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funció: extreure l'extensió del fitxer"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funkce: připojit oddělovač cesty"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funkce: odstranit oddělovač cesty na konci"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funkce: vytáhnout příponu souboru"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funktion: Pfadtrenner anhängen"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funktion: Pfadtrenner entfernen"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funktion: Dateiendung extrahieren"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Función: añadir delimitador de ruta"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Función: remover delimitador de ruta final"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Función: extraer extensión de archivo"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funktio: lisää polkuerotin"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funktio: poista polkuerotin lopusta"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funktio: erota tiedoston pääte"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Fonction : ajouter un délimiteur de chemin"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Fonction : enlever le délimiteur de fin de chemin"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Fonction : extraire l'extension du fichier"
|
||||
|
||||
@ -98,6 +98,10 @@ msgstr "פונקציה: הוסף את תוחם הנתיב"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "פונקציה: חתוך את תוחם הנתיב"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "פונקציה: חלץ את סיומת הקובץ"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Művelet: útvonal-elválasztó hozzáfűzése"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Művelet: bevezető útvonal-elválasztó törlése"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Művelet: fájlkiterjesztés kibontása"
|
||||
|
||||
@ -97,6 +97,10 @@ msgstr "Fungsi: tambah delimiter path"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Fungsi: chomp delimiter path"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Fungsi: ekstrak ekstensi file"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funzione: aggiunge in fondo il delimitatore di percorso"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funzione: elimina i delimitatori di percorso"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funzione: estrae estensione file"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "機能:パスの区切り記号を添える"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "機能:終端のパスの区切り記号を削除"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "機能:ファイルの拡張子を抽出"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funkcija: kelio gale pridėti kelio skirtuką"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funkcija: pašalinti kelio gale esantį skirtuką"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funkcija: ištraukti tik failo plėtinį"
|
||||
|
||||
@ -97,6 +97,10 @@ msgstr "Functie: toevoegen pad scheidingsteken"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Functie: afhakken pad scheidingsteken"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Functie: destilleer bestandsextensie"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Funkcja: dołącz rozgranicznik ścieżki"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funkcja: wytnij końcowy rozgranicznik ścieżki"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funkcja: wyodrębnij rozszerzenie pliku"
|
||||
|
||||
@ -90,6 +90,10 @@ msgstr ""
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr ""
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Função: adicionar o delimitador de caminho"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Função: retirar o delimitador de caminho do final"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Função: extrair extensão do arquivo"
|
||||
|
||||
@ -100,6 +100,10 @@ msgstr "Функция: добавление разделителя пути"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Функция: удаление завершающего разделителя пути"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Функция: извлечение расширения файла"
|
||||
|
||||
@ -97,6 +97,10 @@ msgstr "Funkcia: pripojiť oddeľovač cesty"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Funkcia: odstrániť oddeľovač cesty"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Funkcia: vybrať príponu súboru"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Fonksiyon: yol sınırlayıcı ekleme"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Fonksiyon: sondaki yol sınırlayıcı kaldır"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Fonksiyon: dosya uzantısını ayıklayın"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "Функція: додати розподілювач шляхів"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "Функція: прибрати кінцевий роздільник шляху"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "Функція: витягнути розширення файлу"
|
||||
|
||||
@ -94,6 +94,10 @@ msgstr "功能: 附加路径分隔符"
|
||||
msgid "Function: remove trailing path delimiter"
|
||||
msgstr "函数:移除追踪(trailing)路径分隔符"
|
||||
|
||||
#: ideconfstrconsts.listmfunctionenclosebrackets
|
||||
msgid "Function: Enclose in ()"
|
||||
msgstr ""
|
||||
|
||||
#: ideconfstrconsts.listmfunctionextractfileextension
|
||||
msgid "Function: extract file extension"
|
||||
msgstr "函数: 提取文件扩展名"
|
||||
|
||||
@ -69,6 +69,7 @@ type
|
||||
function MF_NameOnly(const Filename:string; const {%H-}Data: PtrInt; var {%H-}Abort: boolean):string; virtual;
|
||||
function MF_MakeDir(const Filename:string; const {%H-}Data: PtrInt; var {%H-}Abort: boolean):string; virtual;
|
||||
function MF_MakeFile(const Filename:string; const {%H-}Data: PtrInt; var {%H-}Abort: boolean):string; virtual;
|
||||
function MF_EncloseBracket(const Text:string; const {%H-}Data: PtrInt; var {%H-}Abort: boolean):string; virtual;
|
||||
function MF_Trim(const Filename:string; const {%H-}Data: PtrInt; var {%H-}Abort: boolean):string; virtual;
|
||||
procedure DoSubstitution(TheMacro: TTransferMacro; const MacroName: string;
|
||||
var s:string; const Data: PtrInt; var Handled, Abort: boolean;
|
||||
@ -168,6 +169,7 @@ begin
|
||||
Add(TTransferMacro.Create('NameOnly', '', lisTMFunctionExtractFileNameOnly, @MF_NameOnly,[]));
|
||||
Add(TTransferMacro.Create('MakeDir', '', lisTMFunctionAppendPathDelimiter, @MF_MakeDir,[]));
|
||||
Add(TTransferMacro.Create('MakeFile', '', lisTMFunctionChompPathDelimiter, @MF_MakeFile,[]));
|
||||
Add(TTransferMacro.Create('EncloseBracket', '', lisTMFunctionChompPathDelimiter, @MF_EncloseBracket,[]));
|
||||
end;
|
||||
|
||||
destructor TTransferMacroList.Destroy;
|
||||
@ -483,6 +485,14 @@ begin
|
||||
Result:=TrimFilename(Result);
|
||||
end;
|
||||
|
||||
function TTransferMacroList.MF_EncloseBracket(const Text: string; const Data: PtrInt;
|
||||
var Abort: boolean): string;
|
||||
begin
|
||||
Result := Text;
|
||||
if Result <> '' then
|
||||
Result := '(' + Result + ')';
|
||||
end;
|
||||
|
||||
function TTransferMacroList.MF_Trim(const Filename: string; const Data: PtrInt;
|
||||
var Abort: boolean): string;
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user