IDE: install packages: set ttreenode imageindex

git-svn-id: trunk@41988 -
This commit is contained in:
mattias 2013-07-03 22:37:07 +00:00
parent 36349a5eaa
commit 0244e3f874
2 changed files with 42 additions and 30 deletions

View File

@ -21,8 +21,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
AnchorSideRight.Control = lblMiddle
AnchorSideBottom.Control = PkgInfoGroupBox
Left = 6
Height = 359
Top = 29
Height = 362
Top = 27
Width = 284
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6
@ -30,13 +30,13 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
BorderSpacing.Right = 3
BorderSpacing.Bottom = 6
Caption = 'InstallPkgGroupBox'
ClientHeight = 340
ClientHeight = 345
ClientWidth = 280
TabOrder = 0
object ImportButton: TButton
Left = 6
Height = 25
Top = 278
Top = 283
Width = 268
Align = alBottom
BorderSpacing.Around = 6
@ -47,7 +47,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object ExportButton: TButton
Left = 6
Height = 25
Top = 309
Top = 314
Width = 268
Align = alBottom
BorderSpacing.Around = 6
@ -57,11 +57,12 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end
object InstallTreeView: TTreeView
Left = 6
Height = 235
Height = 240
Top = 6
Width = 268
Align = alClient
BorderSpacing.Around = 6
DefaultItemHeight = 18
MultiSelect = True
ReadOnly = True
ShowButtons = False
@ -76,7 +77,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object UninstallButton: TBitBtn
Left = 6
Height = 25
Top = 247
Top = 252
Width = 268
Align = alBottom
BorderSpacing.Around = 6
@ -93,8 +94,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = PkgInfoGroupBox
Left = 296
Height = 359
Top = 29
Height = 362
Top = 27
Width = 285
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 3
@ -102,20 +103,21 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = 'AvailablePkgGroupBox'
ClientHeight = 340
ClientHeight = 345
ClientWidth = 281
TabOrder = 1
object AvailableTreeView: TTreeView
AnchorSideTop.Control = AvailableFilterEdit
AnchorSideTop.Side = asrBottom
Left = 6
Height = 269
Top = 34
Height = 276
Top = 32
Width = 269
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
DefaultItemHeight = 18
MultiSelect = True
ReadOnly = True
ShowButtons = False
@ -131,7 +133,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object AddToInstallButton: TBitBtn
Left = 6
Height = 25
Top = 309
Top = 314
Width = 269
Align = alBottom
BorderSpacing.Around = 6
@ -141,7 +143,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end
object AvailableFilterEdit: TTreeFilterEdit
Left = 6
Height = 27
Height = 25
Top = 7
Width = 247
UseFormActivate = True
@ -153,22 +155,23 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
ParentFont = False
TabOrder = 0
FilteredTreeview = AvailableTreeView
OnGetImageIndex = AvailableFilterEditGetImageIndex
end
end
object PkgInfoGroupBox: TGroupBox
AnchorSideBottom.Control = BtnPanel
Left = 0
Height = 127
Top = 394
Top = 395
Width = 587
Align = alBottom
Caption = 'PkgInfoGroupBox'
ClientHeight = 108
ClientHeight = 110
ClientWidth = 583
TabOrder = 2
object PkgInfoMemo: TMemo
Left = 6
Height = 96
Height = 98
Top = 6
Width = 571
Align = alClient
@ -180,18 +183,18 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end
object BtnPanel: TPanel
Left = 0
Height = 41
Top = 521
Height = 40
Top = 522
Width = 587
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 41
ClientHeight = 40
ClientWidth = 587
TabOrder = 3
object HelpButton: TBitBtn
Left = 6
Height = 29
Height = 28
Top = 6
Width = 75
Align = alLeft
@ -204,8 +207,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 0
end
object CancelButton: TBitBtn
Left = 147
Height = 29
Left = 196
Height = 28
Top = 6
Width = 75
Align = alRight
@ -219,10 +222,10 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 1
end
object SaveAndExitButton: TBitBtn
Left = 420
Height = 29
Left = 442
Height = 28
Top = 6
Width = 161
Width = 139
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
@ -268,10 +271,10 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 2
end
object SaveAndRebuildButton: TBitBtn
Left = 228
Height = 29
Left = 277
Height = 28
Top = 6
Width = 186
Width = 159
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
@ -319,7 +322,7 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end
object NoteLabel: TLabel
Left = 6
Height = 17
Height = 15
Top = 6
Width = 575
Align = alTop

View File

@ -71,6 +71,8 @@ type
SaveAndRebuildButton: TBitBtn;
UninstallButton: TBitBtn;
procedure AddToInstallButtonClick(Sender: TObject);
function AvailableFilterEditGetImageIndex(Str: String; Data: TObject;
var AIsEnabled: Boolean): Integer;
procedure LPKParsingTimerTimer(Sender: TObject);
procedure OnAllLPKParsed(Sender: TObject);
procedure TreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
@ -290,6 +292,12 @@ begin
AddToInstall;
end;
function TInstallPkgSetDialog.AvailableFilterEditGetImageIndex(Str: String;
Data: TObject; var AIsEnabled: Boolean): Integer;
begin
Result:=0;
end;
procedure TInstallPkgSetDialog.LPKParsingTimerTimer(Sender: TObject);
begin
UpdateAvailablePackages(false);
@ -358,6 +366,7 @@ begin
if Unknown then
Images.Draw(CurCanvas,x,y,ImgIndexOverlayUnknown);
end;
PaintImages:=false;
end;
procedure TInstallPkgSetDialog.AvailableTreeViewDblClick(Sender: TObject);