diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index cc9b895a37..d07e51756f 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -467,7 +467,8 @@ resourcestring lisEditorWindowManager = 'Editor Window Manager'; lisSearchProjectsFrom = 'Search projects from'; - lisMEOther = 'Other'; + lisMEOther = 'Other tabs'; + lisTabsFor = 'Tabs for %s'; lisIncludeExamples = 'Include Examples'; lisIncludeTestcases = 'Include Testcases'; lisMEProjects = 'Projects'; @@ -1108,7 +1109,7 @@ resourcestring dlgAutoSave = 'Auto Save'; lisAskBeforeSavingProjectSSession = 'Ask before saving project''s session'; dlgEdFiles = 'Editor Files'; - dlgEnvProject = 'Project'; + dlgEnvProject = 'Tabs for project'; lisNumberOfFilesToConvert = 'Number of files to convert: %s'; lisConvertEncoding = 'Convert Encoding'; lisConvertProjectOrPackage = 'Convert project or package'; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 39a84c5fd0..a01998e885 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -5441,8 +5441,10 @@ begin SrcEditMenuMoveEditorFirst.MenuItem.Enabled:= (PageCount>1) and (PageIndex>0); SrcEditMenuMoveEditorLast.MenuItem.Enabled:= (PageCount>1) and (PageIndex<(PageCount-1)); - if SourceEditorManager<>nil then begin - SrcEditMenuSectionEditors.Clear; + SrcEditMenuSectionEditors.Clear; + if Manager <> nil then begin + RegisterIDESubMenu(SrcEditMenuSectionEditors, dlgEnvProject, dlgEnvProject).Visible := False; + RegisterIDESubMenu(SrcEditMenuSectionEditors, lisMEOther, lisMEOther).Visible := False; //first add all pages in the correct order since the editor order can be different from the tab order for i := 0 to EditorCount - 1 do @@ -5454,13 +5456,14 @@ begin else begin Manager.OnPackageForSourceEditor(P, EditorCur); if P <> nil then - s := p.Name; + s := Format(lisTabsFor, [p.Name]); end; if SrcEditMenuSectionEditors.FindByName(S) is TIDEMenuSection then M := TIDEMenuSection(SrcEditMenuSectionEditors.FindByName(S)) else M := RegisterIDESubMenu(SrcEditMenuSectionEditors, S, S); + M.Visible := True; S := ExtractFileName(EditorCur.FileName); // check for modification