mirror of https://gitlab.com/basile.b/dexed.git
libman, register from code.dlang, show package description as hint
This commit is contained in:
parent
82bc48a16a
commit
f5c0bf81eb
|
@ -24,6 +24,7 @@ type
|
|||
procedure getList(sender: TObject);
|
||||
procedure fillList;
|
||||
procedure btnTagCLick(sender: TObject);
|
||||
procedure updateHint(sender: TObject);
|
||||
public
|
||||
class function showAndWait(out pName, pVersion: string): TModalResult; static;
|
||||
class destructor classDtor;
|
||||
|
@ -214,6 +215,9 @@ begin
|
|||
cbb.Align := alClient;
|
||||
cbb.BorderSpacing.Around := 6;
|
||||
cbb.Sorted:= true;
|
||||
cbb.ShowHint:=true;
|
||||
cbb.OnSelect:= @updateHint;
|
||||
cbb.OnCloseUp:=@updateHint;;
|
||||
|
||||
bsv := TSpeedButton.Create(self);
|
||||
bsv.Parent := self;
|
||||
|
@ -339,6 +343,19 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TDubPackageQueryForm.updateHint(sender: TObject);
|
||||
var
|
||||
jsn: TJSONData;
|
||||
begin
|
||||
if (cbb.ItemIndex <> -1) and cbb.Items.Objects[cbb.ItemIndex].isNotNil then
|
||||
try
|
||||
jsn := TJSONData(cbb.Items.Objects[cbb.ItemIndex]);
|
||||
jsn := jsn.FindPath('description');
|
||||
cbb.Hint:= jsn.AsString;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TDubPackageQueryForm.showAndWait(out pName, pVersion: string): TModalResult;
|
||||
var
|
||||
frm: TDubPackageQueryForm;
|
||||
|
|
Loading…
Reference in New Issue