mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 22:58:14 +02:00
Packager: Improve a message, make sure a variable is initialized, remove obsolete code
git-svn-id: trunk@32631 -
This commit is contained in:
parent
a924d60190
commit
48cbedc75e
@ -3844,12 +3844,12 @@ resourcestring
|
||||
+'exists in this package.';
|
||||
lisA2PTheUnitnameAlreadyExistsInThePackage = 'The unitname %s%s%s already '
|
||||
+'exists in the package:%s%s';
|
||||
lisA2PFileAlreadyExistsInThePackage = 'File %s%s%s already exists in the package.';
|
||||
lisA2PAmbiguousUnitName = 'Ambiguous Unit Name';
|
||||
lisA2PTheUnitNameIsTheSameAsAnRegisteredComponent = 'The unit name %s%s%s '
|
||||
+'is the same as an registered component.%sUsing this can cause strange '
|
||||
+'error messages.';
|
||||
lisA2PFileAlreadyExistsInThePackage = 'File %s%s%s already exists in the package.';
|
||||
lisA2PExistingFile = '%sExisting file: %s%s%s';
|
||||
lisA2PExistingFile2 = 'Existing file: %s%s%s';
|
||||
lisA2PFileAlreadyExists = 'File already exists';
|
||||
lisA2PFileIsUsed = 'File is used';
|
||||
lisA2PTheFileIsPartOfTheCurrentProjectItIsABadIdea = 'The file %s%s%s is '
|
||||
|
@ -247,6 +247,7 @@ var
|
||||
IDEFileFlags: TIDEFileStateFlags;
|
||||
begin
|
||||
Result:=false;
|
||||
PkgFile:=Nil;
|
||||
|
||||
// check if package is readonly
|
||||
if LazPackage.ReadOnly then begin
|
||||
@ -289,7 +290,7 @@ begin
|
||||
if PkgFile<>nil then begin
|
||||
Msg:=Format(lisA2PFileAlreadyExistsInThePackage, ['"',AFilename,'"']);
|
||||
if PkgFile.Filename<>AFilename then
|
||||
Msg:=Format(lisA2PExistingFile, [#13, '"', PkgFile.Filename, '"']);
|
||||
Msg:=Msg+LineEnding+Format(lisA2PExistingFile2, ['"',PkgFile.Filename,'"']);
|
||||
MessageDlg(lisA2PFileAlreadyExists, Msg, mtError, [mbCancel], 0);
|
||||
exit;
|
||||
end;
|
||||
@ -357,8 +358,6 @@ begin
|
||||
then
|
||||
exit;
|
||||
end;
|
||||
end else begin
|
||||
AnUnitName:='';
|
||||
end;
|
||||
|
||||
// ok
|
||||
|
Loading…
Reference in New Issue
Block a user