diff --git a/ide/envguioptions.pas b/ide/envguioptions.pas index 2eea2d974e..9e97fdc9b7 100644 --- a/ide/envguioptions.pas +++ b/ide/envguioptions.pas @@ -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; diff --git a/ide/frames/window_options.lfm b/ide/frames/window_options.lfm index 3855b2cb45..d80aeeafdd 100644 --- a/ide/frames/window_options.lfm +++ b/ide/frames/window_options.lfm @@ -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 diff --git a/ide/frames/window_options.pas b/ide/frames/window_options.pas index e9da256688..cc29237044 100644 --- a/ide/frames/window_options.pas +++ b/ide/frames/window_options.pas @@ -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; diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 8c74eeb40a..5d990e6092 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -1310,11 +1310,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'; @@ -1323,10 +1322,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'; diff --git a/ide/main.pp b/ide/main.pp index 869cf61858..dd640b3729 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -9010,7 +9010,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; @@ -9021,28 +9021,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; @@ -9069,7 +9049,7 @@ begin else end; MainIDEBar.Caption := NewCaption; - Application.Title := NewTitle; + Application.Title := NewCaption; end; procedure TMainIDE.HideIDE;