mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 17:17:52 +02:00
IDE: Custom IDE title, remove separate task-bar-button-caption
This commit is contained in:
parent
4bd60bf2b5
commit
0327410ec6
@ -148,8 +148,8 @@ type
|
||||
FCompletionWindowHeight: Integer;
|
||||
// title
|
||||
FIDETitleStartsWithProject: boolean;
|
||||
FIDETitleShowsBuildMode: boolean;
|
||||
FIDETitleShowsProjectDir: boolean;
|
||||
FIDETitleShowsBuildMode: boolean; // deprecated: ONLY read from XML for upgrade to IDETitleBarCustomText
|
||||
FIDETitleShowsProjectDir: boolean; // deprecated: ONLY read from XML for upgrade to IDETitleBarCustomText
|
||||
FIDETitleBarCustomText: string;
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions: TIDECoolBarOptions;
|
||||
@ -188,9 +188,8 @@ type
|
||||
property CompletionWindowHeight: Integer read FCompletionWindowHeight write FCompletionWindowHeight;
|
||||
property IDETitleStartsWithProject: boolean read FIDETitleStartsWithProject
|
||||
write FIDETitleStartsWithProject;
|
||||
property IDETitleShowsBuildMode: boolean read FIDETitleShowsBuildMode;
|
||||
property IDETitleShowsProjectDir: boolean read FIDETitleShowsProjectDir
|
||||
write FIDETitleShowsProjectDir;
|
||||
property IDETitleShowsBuildMode: boolean read FIDETitleShowsBuildMode; // deprecated: ONLY read from XML for upgrade to IDETitleBarCustomText
|
||||
property IDETitleShowsProjectDir: boolean read FIDETitleShowsProjectDir; // deprecated: ONLY read from XML for upgrade to IDETitleBarCustomText
|
||||
property IDETitleBarCustomText: string read FIDETitleBarCustomText
|
||||
write FIDETitleBarCustomText;
|
||||
property IDECoolBarOptions: TIDECoolBarOptions read FIDECoolBarOptions;
|
||||
|
@ -116,19 +116,6 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
end
|
||||
object TitleShowsProjectDirCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TitleStartsWithProjectCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 163
|
||||
Width = 179
|
||||
Caption = 'TitleShowsProjectDirCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
end
|
||||
object lblShowingWindows: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
@ -145,12 +132,12 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
end
|
||||
object lblTitleBar: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TitleShowsProjectDirCheckBox
|
||||
AnchorSideTop.Control = TitleStartsWithProjectCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 185
|
||||
Width = 53
|
||||
Top = 166
|
||||
Width = 52
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'lblTitleBar'
|
||||
end
|
||||
@ -162,7 +149,7 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 202
|
||||
Top = 183
|
||||
Width = 572
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
@ -170,6 +157,6 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
ItemHeight = 15
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
TabOrder = 7
|
||||
end
|
||||
end
|
||||
|
@ -52,7 +52,6 @@ type
|
||||
HideIDEOnRunCheckBox: TCheckBox;
|
||||
SingleTaskBarButtonCheckBox: TCheckBox;
|
||||
TitleStartsWithProjectCheckBox: TCheckBox;
|
||||
TitleShowsProjectDirCheckBox: TCheckBox;
|
||||
public
|
||||
function GetTitle: String; override;
|
||||
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
|
||||
@ -84,8 +83,6 @@ begin
|
||||
HideIDEOnRunCheckBox.Hint := dlgHideIDEOnRunHint;
|
||||
TitleStartsWithProjectCheckBox.Caption:=lisIDETitleStartsWithProjectName;
|
||||
TitleStartsWithProjectCheckBox.Hint:=lisTitleInTaskbarShowsForExampleProject1LpiLazarus;
|
||||
TitleShowsProjectDirCheckBox.Caption:=lisIDETitleShowsProjectDir;
|
||||
TitleShowsProjectDirCheckBox.Hint:=lisProjectDirectoryIsShowedInIdeTitleBar;
|
||||
bvWindowTitle.Caption:=lisIDETitleOptions;
|
||||
lblTitleBar.Caption:=lisIDETitleCustom;
|
||||
EdTitleBar.Hint := lisIDECaptionCustomHint;
|
||||
@ -122,7 +119,6 @@ begin
|
||||
SingleTaskBarButtonCheckBox.Checked := SingleTaskBarButton;
|
||||
HideIDEOnRunCheckBox.Checked := HideIDEOnRun;
|
||||
TitleStartsWithProjectCheckBox.Checked := IDETitleStartsWithProject;
|
||||
TitleShowsProjectDirCheckBox.Checked := IDETitleShowsProjectDir;
|
||||
EdTitleBar.Text := IDETitleBarCustomText;
|
||||
NameForDesignedFormListCheckBox.Checked := IDENameForDesignedFormList;
|
||||
AutoAdjustIDEHeightCheckBox.Checked := AutoAdjustIDEHeight;
|
||||
@ -144,7 +140,6 @@ begin
|
||||
SingleTaskBarButton := SingleTaskBarButtonCheckBox.Checked;
|
||||
HideIDEOnRun := HideIDEOnRunCheckBox.Checked;
|
||||
IDETitleStartsWithProject := TitleStartsWithProjectCheckBox.Checked;
|
||||
IDETitleShowsProjectDir := TitleShowsProjectDirCheckBox.Checked;
|
||||
IDETitleBarCustomText := EdTitleBar.Text;
|
||||
IDENameForDesignedFormList := NameForDesignedFormListCheckBox.Checked;
|
||||
AutoAdjustIDEHeight := AutoAdjustIDEHeightCheckBox.Checked;
|
||||
|
@ -1313,11 +1313,10 @@ resourcestring
|
||||
+'button in the taskbar for the whole IDE instead of one per window. Some'
|
||||
+' Linux Window Managers like Cinnamon do not support this and always show'
|
||||
+' one button per window.';
|
||||
lisIDETitleStartsWithProjectName = 'IDE title starts with project name';
|
||||
lisIDETitleShowsProjectDir = 'IDE title shows project directory';
|
||||
lisIDETitleOptions = 'IDE main window title';
|
||||
lisIDETitleStartsWithProjectName = 'Show custom IDE title before buildin IDE title or info';
|
||||
lisIDETitleOptions = 'IDE main-window and taskbar title';
|
||||
lisIDETitleCustom = 'Custom IDE title';
|
||||
lisIDECaptionCustomHint = 'The caption of the main IDE window';
|
||||
lisIDECaptionCustomHint = 'Additional info to display in the IDE title';
|
||||
lisAutoAdjustIDEHeight = 'Automatically adjust IDE main window height';
|
||||
lisAutoAdjustIDEHeightHint = '';
|
||||
lisAutoAdjustIDEHeightFullComponentPalette = 'Show complete component palette';
|
||||
@ -1326,10 +1325,9 @@ resourcestring
|
||||
lisProjectInspectorShowProps = 'Show properties pane in Project Inspector';
|
||||
lisWindowMenuWithNameForDesignedForm = 'Window menu shows designed form''s name instead of caption';
|
||||
lisWindowMenuWithNameForDesignedFormHint = 'Useful especially if the caption is left empty.';
|
||||
lisTitleInTaskbarShowsForExampleProject1LpiLazarus = 'Title in taskbar '
|
||||
lisTitleInTaskbarShowsForExampleProject1LpiLazarus = 'Show the custom IDE title ' +
|
||||
'before the IDE''s name and other before other info shown in the title'
|
||||
+'shows for example: project1 - Lazarus';
|
||||
lisProjectDirectoryIsShowedInIdeTitleBar = 'Title in taskbar '
|
||||
+'shows also directory path of the project';
|
||||
|
||||
// Message window options
|
||||
dlgShowMessagesIcons = 'Show Messages Icons';
|
||||
|
26
ide/main.pp
26
ide/main.pp
@ -9022,7 +9022,7 @@ procedure TMainIDE.UpdateCaption;
|
||||
end;
|
||||
|
||||
var
|
||||
rev, NewCaption, NewTitle, ProjectName, DirName, CustomnCaption: String;
|
||||
rev, NewCaption, DirName, CustomnCaption: String;
|
||||
OldMarkUnhandledMacros: boolean;
|
||||
begin
|
||||
if MainIDEBar = nil then Exit;
|
||||
@ -9033,28 +9033,8 @@ begin
|
||||
[LazarusVersionStr, rev])
|
||||
else
|
||||
NewCaption := Format(lisLazarusEditorV, [LazarusVersionStr]);
|
||||
NewTitle := NewCaption;
|
||||
if MainBarSubTitle <> '' then
|
||||
NewCaption := AddToCaption(NewCaption, MainBarSubTitle)
|
||||
else
|
||||
begin
|
||||
if Project1 <> nil then
|
||||
begin
|
||||
ProjectName := Project1.GetTitleOrName;
|
||||
if ProjectName <> '' then
|
||||
begin
|
||||
if EnvironmentGuiOpts.Desktop.IDETitleShowsProjectDir then
|
||||
begin
|
||||
DirName := ExtractFileDir(Project1.ProjectInfoFile);
|
||||
if DirName <> '' then
|
||||
ProjectName := ProjectName + ' ('+DirName+')';
|
||||
end;
|
||||
end
|
||||
else
|
||||
ProjectName := lisnewProject;
|
||||
NewTitle := AddToCaption(NewTitle, ProjectName);
|
||||
end;
|
||||
end;
|
||||
NewCaption := AddToCaption(NewCaption, MainBarSubTitle);
|
||||
|
||||
if (GlobalMacroList <> nil) then begin
|
||||
CustomnCaption := EnvironmentGuiOpts.Desktop.IDETitleBarCustomText;
|
||||
@ -9081,7 +9061,7 @@ begin
|
||||
else
|
||||
end;
|
||||
MainIDEBar.Caption := NewCaption;
|
||||
Application.Title := NewTitle;
|
||||
Application.Title := NewCaption;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.HideIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user