IDE: lpk scan: call QueueEmpty if nothing done

git-svn-id: trunk@40002 -
This commit is contained in:
mattias 2013-01-28 11:32:01 +00:00
parent 326e98ee73
commit a1515ebacb
3 changed files with 13 additions and 6 deletions

View File

@ -207,10 +207,10 @@ begin
HelpButton.Caption:=lisMenuHelp;
CancelButton.Caption:=lisCancel;
LPKInfoCache.StartLPKReaderWithAllAvailable;
LPKInfoCache.AddOnQueueEmpty(@OnAllLPKParsed);
FNewInstalledPackages:=TObjectList.Create(true);
PkgInfoMemo.Clear;
LPKInfoCache.AddOnQueueEmpty(@OnAllLPKParsed);
LPKInfoCache.StartLPKReaderWithAllAvailable;
UpdateAvailablePackages;
UpdateButtonStates;
@ -374,6 +374,7 @@ end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogDestroy(Sender: TObject);
begin
LPKInfoCache.EndLPKReader;
LPKInfoCache.RemoveOnQueueEmpty(@OnAllLPKParsed);
ClearNewInstalledPackages;
FreeAndNil(FNewInstalledPackages);
end;

View File

@ -215,7 +215,10 @@ var
NeedsStart: Boolean;
Pkg: TLazPackage;
begin
if (Filenames=nil) or (Filenames.Count=0) then exit;
if (Filenames=nil) or (Filenames.Count=0) then begin
QueueEmpty;
exit;
end;
NeedsStart:=false;
EnterCritSection;
try
@ -257,7 +260,9 @@ begin
end;
if NeedsStart then
FLPKReader.Start;
FLPKReader.Start
else
QueueEmpty;
end;
procedure TLPKInfoCache.EndLPKReader;

View File

@ -150,10 +150,10 @@ begin
CloseBitBtn.Caption:=lisClose;
FilterEdit.Text:=lisCEFilter;
LPKInfoCache.StartLPKReaderWithAllAvailable;
LPKInfoCache.AddOnQueueEmpty(@OnAllLPKParsed);
ProgressBar1.Style:=pbstMarquee;
ProgressBar1.Visible:=true;
LPKInfoCache.AddOnQueueEmpty(@OnAllLPKParsed);
LPKInfoCache.StartLPKReaderWithAllAvailable;
UpdatePackageList;
end;
@ -212,6 +212,7 @@ end;
procedure TPackageLinksDialog.FormDestroy(Sender: TObject);
begin
LPKInfoCache.EndLPKReader;
LPKInfoCache.RemoveOnQueueEmpty(@OnAllLPKParsed);
ClearLinks;
FreeAndNil(fFiles);
end;