Packager: Add OnShow handler in Install/uninstall packages dlg to update (filter)-text. Issue #26433

git-svn-id: trunk@45840 -
This commit is contained in:
juha 2014-07-12 11:30:15 +00:00
parent 04505d5dcb
commit b2f5fb591e
2 changed files with 17 additions and 10 deletions

View File

@ -13,6 +13,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
OnCreate = InstallPkgSetDialogCreate
OnDestroy = InstallPkgSetDialogDestroy
OnResize = InstallPkgSetDialogResize
OnShow = InstallPkgSetDialogShow
Position = poScreenCenter
LCLVersion = '1.3'
object InstallPkgGroupBox: TGroupBox
@ -167,7 +168,6 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
Height = 25
Top = 3
Width = 255
UseFormActivate = True
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]

View File

@ -92,6 +92,7 @@ type
procedure InstallTreeViewDblClick(Sender: TObject);
procedure InstallPkgSetDialogCreate(Sender: TObject);
procedure InstallPkgSetDialogDestroy(Sender: TObject);
procedure InstallPkgSetDialogShow(Sender: TObject);
procedure InstallPkgSetDialogResize(Sender: TObject);
procedure InstallTreeViewSelectionChanged(Sender: TObject);
procedure SaveAndExitButtonClick(Sender: TObject);
@ -225,6 +226,21 @@ begin
UpdateButtonStates;
end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogDestroy(Sender: TObject);
begin
LPKInfoCache.EndLPKReader;
LPKInfoCache.RemoveOnQueueEmpty(@OnAllLPKParsed);
ClearNewInstalledPackages;
FreeAndNil(FNewInstalledPackages);
IdleConnected:=false;
end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogShow(Sender: TObject);
begin
InstalledFilterEdit.Filter:=''; // (filter) - text is shown after this.
AvailableFilterEdit.Filter:='';
end;
procedure TInstallPkgSetDialog.SaveAndRebuildButtonClick(Sender: TObject);
begin
if not CheckSelection then exit;
@ -398,15 +414,6 @@ begin
AddToInstall;
end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogDestroy(Sender: TObject);
begin
LPKInfoCache.EndLPKReader;
LPKInfoCache.RemoveOnQueueEmpty(@OnAllLPKParsed);
ClearNewInstalledPackages;
FreeAndNil(FNewInstalledPackages);
IdleConnected:=false;
end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogResize(Sender: TObject);
var
w: Integer;