Converter: add a message about time used for the conversion

git-svn-id: trunk@39690 -
This commit is contained in:
juha 2012-12-29 22:32:35 +00:00
parent 62517a1978
commit 47303e1f22
2 changed files with 8 additions and 0 deletions

View File

@ -935,6 +935,8 @@ function TConvertDelphiProjPack.Convert: TModalResult;
var
// The initial unit name cache is done in a thread so that GUI shows at once.
CacheUnitsThread: TCacheUnitsThread;
StartTime, EndTime: TDateTime;
s: string;
begin
if CompareFileExt(fOrigFilename,'.dproj',false)=0 then begin
fErrorMsg:=
@ -950,6 +952,7 @@ begin
try
Result:=fSettings.RunForm(CacheUnitsThread); // Get settings from user.
if Result=mrOK then begin
StartTime:=Now;
// create/open lazarus project or package file
fLazPFilename:=fSettings.DelphiToLazFilename(fOrigFilename, fLazPSuffix, false);
@ -964,6 +967,10 @@ begin
// Actual conversion.
Result:=ConvertSub;
EndTime:=Now;
s:=FormatDateTime('hh:nn:ss', EndTime-StartTime);
if s<>'00:00:00' then
IDEMessagesWindow.AddMsg(Format(lisConvDelphiConversionTook, [s]), '', -1)
end;
except
on e: EDelphiConverterError do begin

View File

@ -5345,6 +5345,7 @@ resourcestring
lisConvDelphiReplacedUnitInUsesSection = 'Replaced unit "%s" with "%s" in uses section.';
lisConvDelphiRemovedUnitInUsesSection = 'Removed unit "%s" in uses section.';
lisConvDelphiUnitsToReplaceIn = 'Units to replace in %s';
lisConvDelphiConversionTook = 'Conversion took: %s';
lisConvDelphiConversionReady = 'Conversion Ready.';
lisConvDelphiConversionAborted = 'Conversion Aborted.';
lisConvDelphiBeginCodeToolsFailed = 'BeginCodeTools failed!';