implemented filename case check before adding to project

git-svn-id: trunk@4243 -
This commit is contained in:
mattias 2003-06-08 11:05:45 +00:00
parent 063492dc1c
commit 0da8d34560
2 changed files with 18 additions and 1 deletions

View File

@ -257,6 +257,7 @@ resourcestring
lisThereAreOtherFilesInTheDirectoryWithTheSameName = 'There are other files '
+'in the directory with the same name,%swhich only differ in case:%s%s%'
+'sDelete them?';
lisDeleteOldFile = 'Delete old file %s%s%s?';
lisDeletingOfFileFailed = 'Deleting of file %s%s%s failed.';
lisStreamingError = 'Streaming error';
lisUnableToStreamT = 'Unable to stream %s:T%s.';
@ -371,6 +372,11 @@ resourcestring
lisUnableToRenameFileTo = 'Unable to rename file %s%s%s to %s%s%s!';
lisBackupFileFailed = 'Backup file failed';
lisUnableToBackupFileTo = 'Unable to backup file %s%s%s to %s%s%s!';
lisFileNotLowercase = 'File not lowercase';
lisTheUnitIsNotLowercaseTheFreePascalCompiler10XNeeds = 'The unit %s%s%s is '
+'not lowercase.%sThe FreePascal compiler 1.0.x needs lowercase '
+'filenames. If you do not use the fpc 1.0.x to compile this unit, you '
+'can ignore this message.%s%sRename file?';
lisDeleteAmbigiousFile = 'Delete ambigious file?';
lisAmbigiousFileFoundThisFileCanBeMistakenWithDelete = 'Ambigious file '
+'found: %s%s%s%sThis file can be mistaken with %s%s%s%s%sDelete the '

View File

@ -150,12 +150,13 @@ type
function WriteUnitSourceToFile(const AFileName: string): TModalResult;
procedure Clear;
procedure CreateStartCode(NewUnitType: TNewUnitType;
const NewUnitName: string);
const NewUnitName: string);
procedure DecreaseAutoRevertLock;
procedure IgnoreCurrentFileDateOnDisk;
procedure IncreaseAutoRevertLock;
procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string);
procedure ReadUnitNameFromSource;
function CreateUnitName: string;
procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string);
procedure UpdateUsageCount(Min, IfBelowThis, IncIfBelow: extended);
procedure UpdateUsageCount(TheUsage: TUnitUsage; Factor: extended);
@ -666,6 +667,13 @@ begin
fUnitName:=CodeToolBoss.GetSourceName(fSource,false);
end;
function TUnitInfo.CreateUnitName: string;
begin
Result:=UnitName;
if (Result='') and FilenameIsPascalUnit(Filename) then
Result:=ExtractFilenameOnly(Filename);
end;
{------------------------------------------------------------------------------
TUnitInfo Clear
------------------------------------------------------------------------------}
@ -2639,6 +2647,9 @@ end.
{
$Log$
Revision 1.128 2003/06/08 11:05:45 mattias
implemented filename case check before adding to project
Revision 1.127 2003/06/03 16:12:14 mattias
fixed loading bookmarks for editor index 0