mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Progress for wcx plugins
This commit is contained in:
parent
6122abeb7b
commit
4b6a2b60df
2 changed files with 13 additions and 22 deletions
|
|
@ -138,24 +138,15 @@ begin
|
|||
end
|
||||
else // For plugins which unpack in CloseArchive
|
||||
begin
|
||||
if (Size >= -100) and (Size <= -1) then // first percent bar
|
||||
begin
|
||||
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size) div 100;
|
||||
CurrentFileTotalBytes := 100;
|
||||
|
||||
{ if Size = -100 then // File finished
|
||||
DoneBytes := DoneBytes + WcxCopyOutOperation.FCurrentFileSize;}
|
||||
//DCDebug('Working ' + FileName + ' Percent1 = ' + IntToStr(FFileOpDlg.iProgress1Pos));
|
||||
end
|
||||
else if (Size >= -1100) and (Size <= -1000) then // second percent bar
|
||||
begin
|
||||
DoneBytes := TotalBytes * Int64(-Size - 1000) div 100;
|
||||
//DCDebug('Working ' + FileName + ' Percent2 = ' + IntToStr(FFileOpDlg.iProgress2Pos));
|
||||
end
|
||||
else
|
||||
begin
|
||||
// DoneBytes := DoneBytes + WcxCopyOutOperation.FCurrentFileSize;
|
||||
end;
|
||||
if (Size >= -100) and (Size <= -1) then // total percent bar
|
||||
begin
|
||||
DoneBytes := TotalBytes * Int64(-Size) div 100;
|
||||
end
|
||||
else if (Size >= -1100) and (Size <= -1000) then // current percent bar
|
||||
begin
|
||||
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size - 1000) div 100;
|
||||
CurrentFileTotalBytes := 100;
|
||||
end;
|
||||
end;
|
||||
|
||||
WcxCopyInOperation.UpdateStatistics(WcxCopyInOperation.FStatistics);
|
||||
|
|
|
|||
|
|
@ -167,13 +167,13 @@ begin
|
|||
end
|
||||
else // For plugins which unpack in CloseArchive
|
||||
begin
|
||||
if (Size >= -100) and (Size <= -1) then // first percent bar
|
||||
if (Size >= -100) and (Size <= -1) then // total percent bar
|
||||
begin
|
||||
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size) div 100;
|
||||
DoneBytes := TotalBytes * Int64(-Size) div 100;
|
||||
end
|
||||
else if (Size >= -1100) and (Size <= -1000) then // second percent bar
|
||||
else if (Size >= -1100) and (Size <= -1000) then // current percent bar
|
||||
begin
|
||||
DoneBytes := TotalBytes * Int64(-Size - 1000) div 100;
|
||||
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size - 1000) div 100;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue