mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
IDE: Make File -> "Close All" cloase also packages. Rename "Close" to "Close Editor File". Issue #12422
git-svn-id: trunk@38921 -
This commit is contained in:
parent
3fac3a3c41
commit
b4440971ec
@ -240,7 +240,8 @@ resourcestring
|
||||
lisPLDShowUserLinks = 'Show user links';
|
||||
lisPLDGlobal = 'Global';
|
||||
lisCTDefDefineTemplates = 'Define templates';
|
||||
lisMenuCloseAll = 'Close A&ll Editor Files';
|
||||
lisMenuCloseAll = 'Close A&ll';
|
||||
lisMenuCloseEditorFile = '&Close Editor File';
|
||||
lisMenuCleanDirectory = 'Clean Directory ...';
|
||||
|
||||
lisMenuIndentSelection = 'Indent Selection';
|
||||
|
@ -545,7 +545,7 @@ begin
|
||||
CreateMenuItem(ParentMI,itmFileSaveAs,'itmFileSaveAs',lisMenuSaveAs,'menu_saveas');
|
||||
CreateMenuItem(ParentMI,itmFileSaveAll,'itmFileSaveAll',lisSaveAll,'menu_save_all');
|
||||
CreateMenuItem(ParentMI,itmFileExportHtml,'itmFileExportHtml',lisExportHtml);
|
||||
CreateMenuItem(ParentMI,itmFileClose,'itmFileClose',lisClose,'menu_close',false);
|
||||
CreateMenuItem(ParentMI,itmFileClose,'itmFileClose',lisMenuCloseEditorFile,'menu_close',false);
|
||||
CreateMenuItem(ParentMI,itmFileCloseAll,'itmFileCloseAll',lisMenuCloseAll,'menu_close_all',false);
|
||||
|
||||
CreateMenuSeparatorSection(mnuFile,itmFileDirectories,'itmFileDirectories');
|
||||
|
@ -2208,6 +2208,7 @@ var
|
||||
r: TModalResult;
|
||||
Ed: TSourceEditor;
|
||||
begin
|
||||
// Close editor files
|
||||
NeedSave := 0;
|
||||
for i := 0 to SourceEditorManager.UniqueSourceEditorCount - 1 do begin
|
||||
if CheckEditorNeedsSave(SourceEditorManager.UniqueSourceEditors[i], False) then begin
|
||||
@ -2226,7 +2227,6 @@ begin
|
||||
mrNo: ; // don't save
|
||||
mrAbort: exit;
|
||||
end;
|
||||
|
||||
end
|
||||
else if NeedSave > 1 then begin
|
||||
for i := 0 to SourceEditorManager.UniqueSourceEditorCount - 1 do begin
|
||||
@ -2252,7 +2252,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
SourceEditorManager.IncUpdateLock;
|
||||
try
|
||||
while (SourceEditorManager.SourceEditorCount > 0) and
|
||||
@ -2261,6 +2260,9 @@ begin
|
||||
finally
|
||||
SourceEditorManager.DecUpdateLock;
|
||||
end;
|
||||
|
||||
// Close packages
|
||||
PkgBoss.DoCloseAllPackageEditors;
|
||||
end;
|
||||
|
||||
function TLazSourceFileManager.CreateNewCodeBuffer(Descriptor: TProjectFileDescriptor;
|
||||
|
Loading…
Reference in New Issue
Block a user