mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:36:01 +02:00
IDE: Improve renaming project files to lowercase further. Issue #10370.
This commit is contained in:
parent
3d47bef87e
commit
ff3175bce6
@ -462,7 +462,7 @@ resourcestring
|
||||
lisKMViewProjectSource = 'View Project Source';
|
||||
lisMenuAddToProject = 'Add Editor File to Project';
|
||||
lisMenuRemoveFromProject = 'Remove from Project ...';
|
||||
lisMenuRenameLowerCase = 'Rename Units to LowerCase ...';
|
||||
lisMenuRenameLowerCase = 'Rename Unit Files to LowerCase ...';
|
||||
lisMenuViewProjectSource = '&View Project Source';
|
||||
lisMenuProjectOptions = 'Project Options ...';
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ begin
|
||||
ParentMI:=itmProjectAddRemoveSection;
|
||||
CreateMenuItem(ParentMI,itmProjectAddTo,'itmProjectAddTo',lisMenuAddToProject, 'menu_project_add');
|
||||
CreateMenuItem(ParentMI,itmProjectRemoveFrom,'itmProjectRemoveFrom',lisMenuRemoveFromProject, 'menu_project_remove');
|
||||
CreateMenuItem(ParentMI,itmProjectRenameLowerCase,'itmProjectRenameLowerCase',lisMenuRenameLowerCase, 'menu_search_replace');
|
||||
CreateMenuItem(ParentMI,itmProjectRenameLowerCase,'itmProjectRenameLowerCase',lisMenuRenameLowerCase, 'menu_edit_lowercase');
|
||||
CreateMenuItem(ParentMI,itmProjectViewUnits,'itmProjectViewUnits',lisMenuViewUnits, 'menu_view_units');
|
||||
CreateMenuItem(ParentMI,itmProjectViewForms,'itmProjectViewForms',lisMenuViewForms, 'menu_view_forms');
|
||||
CreateMenuItem(ParentMI,itmProjectViewSource,'itmProjectViewSource',lisMenuViewProjectSource, 'item_project_source');
|
||||
|
@ -1935,12 +1935,15 @@ begin
|
||||
AnUnitInfo:=TUnitInfo(fUnitInfos[i]);
|
||||
Assert(AnUnitInfo.IsPartOfProject, 'TRenameFilesSelector.ActionForFiles: '
|
||||
+ AnUnitInfo.Unit_Name + ' is not part of project');
|
||||
if AnUnitInfo.Source=nil then
|
||||
AnUnitInfo.ReadUnitSource(false,false);
|
||||
// Marked here means to remove old files silently.
|
||||
AnUnitInfo.Marked:=True;
|
||||
Result:=RenameUnitLowerCase(AnUnitInfo, false);
|
||||
AnUnitInfo.Marked:=False;
|
||||
if Result<>mrOK then exit;
|
||||
end;
|
||||
ShowMessage(Format('%d files were renamed to lowercase.', [fUnitInfos.Count]));
|
||||
end;
|
||||
|
||||
// ---
|
||||
|
Loading…
Reference in New Issue
Block a user