IDE: Show the project name and build mode by default in the IDE title. Name variables and properties consistently.

(cherry picked from commit 8c1e7bc4b0)
This commit is contained in:
Juha 2023-09-02 15:53:59 +03:00 committed by Maxim Ganetsky
parent 9490d8cdc6
commit ee6a3fed0c
No known key found for this signature in database
4 changed files with 78 additions and 79 deletions

View File

@ -148,8 +148,8 @@ type
FCompletionWindowHeight: Integer; FCompletionWindowHeight: Integer;
// title // title
FIDETitleStartsWithProject: boolean; FIDETitleStartsWithProject: boolean;
FIDETitleIncludesBuildMode: boolean; FIDETitleShowsBuildMode: boolean;
FIDEProjectDirectoryInIdeTitle: boolean; FIDETitleShowsProjectDir: boolean;
// IDE Coolbar // IDE Coolbar
FIDECoolBarOptions: TIDECoolBarOptions; FIDECoolBarOptions: TIDECoolBarOptions;
// Editor Toolbar // Editor Toolbar
@ -187,10 +187,10 @@ type
property CompletionWindowHeight: Integer read FCompletionWindowHeight write FCompletionWindowHeight; property CompletionWindowHeight: Integer read FCompletionWindowHeight write FCompletionWindowHeight;
property IDETitleStartsWithProject: boolean read FIDETitleStartsWithProject property IDETitleStartsWithProject: boolean read FIDETitleStartsWithProject
write FIDETitleStartsWithProject; write FIDETitleStartsWithProject;
property IDETitleIncludesBuildMode: boolean read FIDETitleIncludesBuildMode property IDETitleShowsBuildMode: boolean read FIDETitleShowsBuildMode
write FIDETitleIncludesBuildMode; write FIDETitleShowsBuildMode;
property IDEProjectDirectoryInIdeTitle: boolean read FIDEProjectDirectoryInIdeTitle property IDETitleShowsProjectDir: boolean read FIDETitleShowsProjectDir
write FIDEProjectDirectoryInIdeTitle; write FIDETitleShowsProjectDir;
property IDECoolBarOptions: TIDECoolBarOptions read FIDECoolBarOptions; property IDECoolBarOptions: TIDECoolBarOptions read FIDECoolBarOptions;
property EditorToolBarOptions: TEditorToolBarOptions read FEditorToolBarOptions; property EditorToolBarOptions: TEditorToolBarOptions read FEditorToolBarOptions;
property ComponentPaletteOptions: TCompPaletteOptions read FComponentPaletteOptions; property ComponentPaletteOptions: TCompPaletteOptions read FComponentPaletteOptions;
@ -570,9 +570,9 @@ begin
FCompletionWindowWidth := 320 * Screen.PixelsPerInch div 96; FCompletionWindowWidth := 320 * Screen.PixelsPerInch div 96;
FCompletionWindowHeight := 6; FCompletionWindowHeight := 6;
// title // title
FIDETitleStartsWithProject:=false; FIDETitleStartsWithProject:=true;
FIDETitleIncludesBuildMode:=false; FIDETitleShowsBuildMode:=true;
FIDEProjectDirectoryInIdeTitle:=false; FIDETitleShowsProjectDir:=true;
// IDE Coolbar // IDE Coolbar
FIDECoolBarOptions:=TIDECoolBarOptions.Create; FIDECoolBarOptions:=TIDECoolBarOptions.Create;
// Editor Toolbar // Editor Toolbar
@ -638,8 +638,8 @@ begin
FCompletionWindowHeight := Source.FCompletionWindowHeight; FCompletionWindowHeight := Source.FCompletionWindowHeight;
// title // title
FIDETitleStartsWithProject := Source.FIDETitleStartsWithProject; FIDETitleStartsWithProject := Source.FIDETitleStartsWithProject;
FIDETitleIncludesBuildMode := Source.FIDETitleIncludesBuildMode; FIDETitleShowsBuildMode := Source.FIDETitleShowsBuildMode;
FIDEProjectDirectoryInIdeTitle := Source.FIDEProjectDirectoryInIdeTitle; FIDETitleShowsProjectDir := Source.FIDETitleShowsProjectDir;
// IDE Coolbar // IDE Coolbar
FIDECoolBarOptions.Assign(Source.FIDECoolBarOptions); FIDECoolBarOptions.Assign(Source.FIDECoolBarOptions);
// Editor Toolbar // Editor Toolbar
@ -670,9 +670,9 @@ begin
// Window menu // Window menu
FIDENameForDesignedFormList:=FXMLCfg.GetValue(Path+'IDENameForDesignedFormList/Value',false); FIDENameForDesignedFormList:=FXMLCfg.GetValue(Path+'IDENameForDesignedFormList/Value',false);
// title // title
FIDETitleStartsWithProject:=FXMLCfg.GetValue(Path+'IDETitleStartsWithProject/Value',false); FIDETitleStartsWithProject:=FXMLCfg.GetValue(Path+'IDETitleStartsWithProject/Value',true);
FIDETitleIncludesBuildMode:=FXMLCfg.GetValue(Path+'IDETitleIncludesBuildMode/Value',false); FIDETitleShowsBuildMode:=FXMLCfg.GetValue(Path+'IDETitleShowsBuildMode/Value',true);
FIDEProjectDirectoryInIdeTitle:=FXMLCfg.GetValue(Path+'IDEProjectDirectoryInIdeTitle/Value',false); FIDETitleShowsProjectDir:=FXMLCfg.GetValue(Path+'IDETitleShowsProjectDir/Value',true);
// CompletionWindow // CompletionWindow
FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Width/Value', FCompletionWindowWidth); FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Width/Value', FCompletionWindowWidth);
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6); FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6);
@ -722,9 +722,9 @@ begin
// Window menu // Window menu
FXMLCfg.SetDeleteValue(Path+'IDENameForDesignedFormList/Value',FIDENameForDesignedFormList,false); FXMLCfg.SetDeleteValue(Path+'IDENameForDesignedFormList/Value',FIDENameForDesignedFormList,false);
// title // title
FXMLCfg.SetDeleteValue(Path+'IDETitleStartsWithProject/Value',FIDETitleStartsWithProject,false); FXMLCfg.SetDeleteValue(Path+'IDETitleStartsWithProject/Value',FIDETitleStartsWithProject,true);
FXMLCfg.SetDeleteValue(Path+'IDETitleIncludesBuildMode/Value',FIDETitleIncludesBuildMode,false); FXMLCfg.SetDeleteValue(Path+'IDETitleShowsBuildMode/Value',FIDETitleShowsBuildMode,true);
FXMLCfg.SetDeleteValue(Path+'IDEProjectDirectoryInIdeTitle/Value',FIDEProjectDirectoryInIdeTitle,false); FXMLCfg.SetDeleteValue(Path+'IDETitleShowsProjectDir/Value',FIDETitleShowsProjectDir,true);
// CompletionWindow // CompletionWindow
FXMLCfg.SetValue(Path+'CompletionWindowOptions/Width/Value',FCompletionWindowWidth); FXMLCfg.SetValue(Path+'CompletionWindowOptions/Width/Value',FCompletionWindowWidth);
FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6); FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6);

View File

@ -14,9 +14,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 15 Top = 18
Width = 181 Width = 215
Caption = 'SingleTaskBarButtonCheckBox' Caption = 'SingleTaskBarButtonCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@ -28,9 +28,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 34 Top = 40
Width = 151 Width = 180
Caption = 'HideIDEOnRunCheckBox' Caption = 'HideIDEOnRunCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@ -41,49 +41,49 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = HideIDEOnRunCheckBox AnchorSideTop.Control = HideIDEOnRunCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 53 Top = 62
Width = 186 Width = 220
Caption = 'TitleStartsWithProjectCheckBox' Caption = 'TitleStartsWithProjectCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 2 TabOrder = 2
end end
object ProjectDirInIdeTitleCheckBox: TCheckBox object TitleShowsProjectDirCheckBox: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = TitleStartsWithProjectCheckBox AnchorSideTop.Control = TitleStartsWithProjectCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 72 Top = 84
Width = 173 Width = 214
Caption = 'ProjectDirInIdeTitleCheckBox' Caption = 'TitleShowsProjectDirCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 3 TabOrder = 3
end end
object TitleIncludesBuildMode: TCheckBox object TitleShowsBuildModeCheckBox: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ProjectDirInIdeTitleCheckBox AnchorSideTop.Control = TitleShowsProjectDirCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 91 Top = 106
Width = 145 Width = 219
Caption = 'TitleIncludesBuildMode' Caption = 'TitleShowsBuildModeCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
end end
object NameForDesignedFormList: TCheckBox object NameForDesignedFormListCheckBox: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = TitleIncludesBuildMode AnchorSideTop.Control = TitleShowsBuildModeCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 110 Top = 128
Width = 164 Width = 256
Caption = 'NameForDesignedFormList' Caption = 'NameForDesignedFormListCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 5 TabOrder = 5
@ -94,7 +94,7 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 15 Height = 18
Top = 0 Top = 0
Width = 573 Width = 573
Caption = 'lblShowingWindows' Caption = 'lblShowingWindows'
@ -104,12 +104,12 @@ object WindowOptionsFrame: TWindowOptionsFrame
end end
object AutoAdjustIDEHeightCheckBox: TCheckBox object AutoAdjustIDEHeightCheckBox: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = NameForDesignedFormList AnchorSideTop.Control = NameForDesignedFormListCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 129 Top = 150
Width = 185 Width = 218
Caption = 'AutoAdjustIDEHeightCheckBox' Caption = 'AutoAdjustIDEHeightCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@ -120,10 +120,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = AutoAdjustIDEHeightCheckBox AnchorSideTop.Control = AutoAdjustIDEHeightCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 19 Height = 22
Top = 148 Top = 172
Width = 253 Width = 294
BorderSpacing.Left = 0
Caption = 'AutoAdjustIDEHeightFullCompPalCheckBox' Caption = 'AutoAdjustIDEHeightFullCompPalCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@ -134,9 +133,9 @@ object WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = AutoAdjustIDEHeightFullCompPalCheckBox AnchorSideTop.Control = AutoAdjustIDEHeightFullCompPalCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 24 Height = 22
Top = 211 Top = 194
Width = 295 Width = 257
Caption = 'ProjectInspectorShowPropsCheckBox' Caption = 'ProjectInspectorShowPropsCheckBox'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True

View File

@ -44,13 +44,13 @@ type
AutoAdjustIDEHeightFullCompPalCheckBox: TCheckBox; AutoAdjustIDEHeightFullCompPalCheckBox: TCheckBox;
ProjectInspectorShowPropsCheckBox: TCheckBox; ProjectInspectorShowPropsCheckBox: TCheckBox;
lblShowingWindows: TDividerBevel; lblShowingWindows: TDividerBevel;
NameForDesignedFormList: TCheckBox; NameForDesignedFormListCheckBox: TCheckBox;
AutoAdjustIDEHeightCheckBox: TCheckBox; AutoAdjustIDEHeightCheckBox: TCheckBox;
TitleIncludesBuildMode: TCheckBox; TitleShowsBuildModeCheckBox: TCheckBox;
HideIDEOnRunCheckBox: TCheckBox; HideIDEOnRunCheckBox: TCheckBox;
SingleTaskBarButtonCheckBox: TCheckBox; SingleTaskBarButtonCheckBox: TCheckBox;
TitleStartsWithProjectCheckBox: TCheckBox; TitleStartsWithProjectCheckBox: TCheckBox;
ProjectDirInIdeTitleCheckBox: TCheckBox; TitleShowsProjectDirCheckBox: TCheckBox;
public public
function GetTitle: String; override; function GetTitle: String; override;
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override; procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
@ -82,16 +82,16 @@ begin
HideIDEOnRunCheckBox.Hint := dlgHideIDEOnRunHint; HideIDEOnRunCheckBox.Hint := dlgHideIDEOnRunHint;
TitleStartsWithProjectCheckBox.Caption:=lisIDETitleStartsWithProjectName; TitleStartsWithProjectCheckBox.Caption:=lisIDETitleStartsWithProjectName;
TitleStartsWithProjectCheckBox.Hint:=lisTitleInTaskbarShowsForExampleProject1LpiLazarus; TitleStartsWithProjectCheckBox.Hint:=lisTitleInTaskbarShowsForExampleProject1LpiLazarus;
TitleIncludesBuildMode.Caption:=lisIDETitleShowsBuildMode; TitleShowsBuildModeCheckBox.Caption:=lisIDETitleShowsBuildMode;
TitleIncludesBuildMode.Hint:=lisBuildModeInTitleInExample; TitleShowsBuildModeCheckBox.Hint:=lisBuildModeInTitleInExample;
NameForDesignedFormList.Caption:=lisWindowMenuWithNameForDesignedForm; TitleShowsProjectDirCheckBox.Caption:=lisIDETitleShowsProjectDir;
NameForDesignedFormList.Hint:=lisWindowMenuWithNameForDesignedFormHint; TitleShowsProjectDirCheckBox.Hint:=lisProjectDirectoryIsShowedInIdeTitleBar;
NameForDesignedFormListCheckBox.Caption:=lisWindowMenuWithNameForDesignedForm;
NameForDesignedFormListCheckBox.Hint:=lisWindowMenuWithNameForDesignedFormHint;
AutoAdjustIDEHeightCheckBox.Caption:=lisAutoAdjustIDEHeight; AutoAdjustIDEHeightCheckBox.Caption:=lisAutoAdjustIDEHeight;
AutoAdjustIDEHeightCheckBox.Hint:=lisAutoAdjustIDEHeightHint; AutoAdjustIDEHeightCheckBox.Hint:=lisAutoAdjustIDEHeightHint;
AutoAdjustIDEHeightFullCompPalCheckBox.Caption:=lisAutoAdjustIDEHeightFullComponentPalette; AutoAdjustIDEHeightFullCompPalCheckBox.Caption:=lisAutoAdjustIDEHeightFullComponentPalette;
AutoAdjustIDEHeightFullCompPalCheckBox.Hint:=lisAutoAdjustIDEHeightFullComponentPaletteHint; AutoAdjustIDEHeightFullCompPalCheckBox.Hint:=lisAutoAdjustIDEHeightFullComponentPaletteHint;
ProjectDirInIdeTitleCheckBox.Caption:=lisIDETitleShowsProjectDir;
ProjectDirInIdeTitleCheckBox.Hint:=lisProjectDirectoryIsShowedInIdeTitleBar;
ProjectInspectorShowPropsCheckBox.Caption:=lisProjectInspectorShowProps; ProjectInspectorShowPropsCheckBox.Caption:=lisProjectInspectorShowProps;
end; end;
@ -107,13 +107,13 @@ begin
// window minimizing and hiding // window minimizing and hiding
SingleTaskBarButtonCheckBox.Checked := SingleTaskBarButton; SingleTaskBarButtonCheckBox.Checked := SingleTaskBarButton;
HideIDEOnRunCheckBox.Checked := HideIDEOnRun; HideIDEOnRunCheckBox.Checked := HideIDEOnRun;
TitleStartsWithProjectCheckBox.Checked:=IDETitleStartsWithProject; TitleStartsWithProjectCheckBox.Checked := IDETitleStartsWithProject;
TitleIncludesBuildMode.Checked:=IDETitleIncludesBuildMode; TitleShowsBuildModeCheckBox.Checked := IDETitleShowsBuildMode;
NameForDesignedFormList.Checked:=IDENameForDesignedFormList; TitleShowsProjectDirCheckBox.Checked := IDETitleShowsProjectDir;
AutoAdjustIDEHeightCheckBox.Checked:=AutoAdjustIDEHeight; NameForDesignedFormListCheckBox.Checked := IDENameForDesignedFormList;
AutoAdjustIDEHeightFullCompPalCheckBox.Checked:=AutoAdjustIDEHeightFullCompPal; AutoAdjustIDEHeightCheckBox.Checked := AutoAdjustIDEHeight;
ProjectDirInIdeTitleCheckBox.Checked:=IDEProjectDirectoryInIdeTitle; AutoAdjustIDEHeightFullCompPalCheckBox.Checked := AutoAdjustIDEHeightFullCompPal;
ProjectInspectorShowPropsCheckBox.Checked:=ProjectInspectorShowProps; ProjectInspectorShowPropsCheckBox.Checked := ProjectInspectorShowProps;
end; end;
end; end;
@ -128,14 +128,14 @@ begin
begin begin
// window minimizing // window minimizing
SingleTaskBarButton := SingleTaskBarButtonCheckBox.Checked; SingleTaskBarButton := SingleTaskBarButtonCheckBox.Checked;
HideIDEOnRun:=HideIDEOnRunCheckBox.Checked; HideIDEOnRun := HideIDEOnRunCheckBox.Checked;
IDETitleStartsWithProject:=TitleStartsWithProjectCheckBox.Checked; IDETitleStartsWithProject := TitleStartsWithProjectCheckBox.Checked;
IDETitleIncludesBuildMode := TitleIncludesBuildMode.Checked; IDETitleShowsBuildMode := TitleShowsBuildModeCheckBox.Checked;
IDENameForDesignedFormList := NameForDesignedFormList.Checked; IDETitleShowsProjectDir := TitleShowsProjectDirCheckBox.Checked;
IDENameForDesignedFormList := NameForDesignedFormListCheckBox.Checked;
AutoAdjustIDEHeight := AutoAdjustIDEHeightCheckBox.Checked; AutoAdjustIDEHeight := AutoAdjustIDEHeightCheckBox.Checked;
AutoAdjustIDEHeightFullCompPal := AutoAdjustIDEHeightFullCompPalCheckBox.Checked; AutoAdjustIDEHeightFullCompPal := AutoAdjustIDEHeightFullCompPalCheckBox.Checked;
IDEProjectDirectoryInIdeTitle:=ProjectDirInIdeTitleCheckBox.Checked; ProjectInspectorShowProps := ProjectInspectorShowPropsCheckBox.Checked;
ProjectInspectorShowProps:=ProjectInspectorShowPropsCheckBox.Checked;
end; end;
end; end;

View File

@ -8863,7 +8863,7 @@ begin
ProjectName := Project1.GetTitleOrName; ProjectName := Project1.GetTitleOrName;
if ProjectName <> '' then if ProjectName <> '' then
begin begin
if EnvironmentGuiOpts.Desktop.IDEProjectDirectoryInIdeTitle then if EnvironmentGuiOpts.Desktop.IDETitleShowsProjectDir then
begin begin
DirName := ExtractFileDir(Project1.ProjectInfoFile); DirName := ExtractFileDir(Project1.ProjectInfoFile);
if DirName <> '' then if DirName <> '' then
@ -8873,7 +8873,7 @@ begin
else else
ProjectName := lisnewProject; ProjectName := lisnewProject;
NewTitle := AddToCaption(NewCaption, ProjectName); NewTitle := AddToCaption(NewCaption, ProjectName);
if EnvironmentGuiOpts.Desktop.IDETitleIncludesBuildMode if EnvironmentGuiOpts.Desktop.IDETitleShowsBuildMode
and (Project1.BuildModes.Count > 1) then and (Project1.BuildModes.Count > 1) then
ProjectName:= ProjectName + ' - ' +Project1.ActiveBuildMode.GetCaption; ProjectName:= ProjectName + ' - ' +Project1.ActiveBuildMode.GetCaption;
NewCaption := AddToCaption(NewCaption, ProjectName); NewCaption := AddToCaption(NewCaption, ProjectName);