ide: forgot to set function result

git-svn-id: trunk@17020 -
This commit is contained in:
paul 2008-10-16 08:58:44 +00:00
parent 8d35dd12c1
commit 9766cd7613

View File

@ -460,14 +460,14 @@ begin
begin begin
Result := False; Result := False;
Messages.Add('Could not remove "{$R '+ oldRcFileName +'"} from main source!'); Messages.Add('Could not remove "{$R '+ oldRcFileName +'"} from main source!');
debugln(['TProjectResources.UpdateMainSourceFile failed: removing resource directive']); debugln(['TProjectResources.RenameDirectives failed: removing resource directive']);
end; end;
if not CodeToolBoss.AddResourceDirective(CodeBuf, if not CodeToolBoss.AddResourceDirective(CodeBuf,
newRcFileName, false, '{$IFDEF WINDOWS}{$R '+ newRcFileName +'}{$ENDIF}') then newRcFileName, false, '{$IFDEF WINDOWS}{$R '+ newRcFileName +'}{$ENDIF}') then
begin begin
Result := False; Result := False;
Messages.Add('Could not add "{$R '+ newRcFileName +'"} to main source!'); Messages.Add('Could not add "{$R '+ newRcFileName +'"} to main source!');
debugln(['TProjectResources.UpdateMainSourceFile failed: adding resource directive']); debugln(['TProjectResources.RenameDirectives failed: adding resource directive']);
end; end;
end; end;
@ -481,22 +481,23 @@ begin
begin begin
Result := False; Result := False;
Messages.Add('Could not remove "{$I '+ oldLrsFileName +'"} from main source!'); Messages.Add('Could not remove "{$I '+ oldLrsFileName +'"} from main source!');
debugln(['TProjectResources.UpdateMainSourceFile removing include directive from main source failed']); debugln(['TProjectResources.RenameDirectives removing include directive from main source failed']);
Exit; Exit;
end; end;
if not CodeToolBoss.AddIncludeDirective(CodeBuf, newLrsFileName, '') then if not CodeToolBoss.AddIncludeDirective(CodeBuf, newLrsFileName, '') then
begin begin
Result := False; Result := False;
Messages.Add('Could not add "{$I '+ newLrsFileName +'"} to main source!'); Messages.Add('Could not add "{$I '+ newLrsFileName +'"} to main source!');
debugln(['TProjectResources.UpdateMainSourceFile adding include directive to main source failed']); debugln(['TProjectResources.RenameDirectives adding include directive to main source failed']);
Exit; Exit;
end; end;
end end;
end; end;
end; end;
function TProjectResources.Save(const MainFileName: String): Boolean; function TProjectResources.Save(const MainFileName: String): Boolean;
begin begin
Result := False;
if (MainFileName = '') or not FilenameIsAbsolute(MainFileName) then if (MainFileName = '') or not FilenameIsAbsolute(MainFileName) then
Exit; Exit;
@ -507,6 +508,7 @@ begin
if (lrsCodeBuf <> nil) and (SaveCodeBufferToFile(lrsCodeBuf, lrsFileName) = mrAbort) then if (lrsCodeBuf <> nil) and (SaveCodeBufferToFile(lrsCodeBuf, lrsFileName) = mrAbort) then
Exit; Exit;
Result := True;
end; end;
end. end.