mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 09:30:37 +02:00
Opkman: Link OPM to VTV from the component folder.
git-svn-id: trunk@56966 -
This commit is contained in:
parent
581a4a19d4
commit
65d289f941
@ -17,7 +17,9 @@
|
||||
<CustomOptions Value="$(IDEBuildOptions)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Online package manger"/>
|
||||
<Description Value="Online Package Manager is a tool that automates the process of installing, upgrading, configuring Lazarus packages. The packages are stored in the main repository(see repository column) as zip files, along with a JSON file. The JSON contains all necessary information about the packages. On request the packages are downloaded/extracted/compiled/installed into the IDE. If available, it's also possible to update a previously installed package from the maintainer webpage.
|
||||
|
||||
For more info please visit: http://wiki.freepascal.org/Online_Package_Manager"/>
|
||||
<License Value="GPL"/>
|
||||
<Version Major="1" Release="1" Build="2"/>
|
||||
<Files Count="29">
|
||||
@ -148,13 +150,16 @@
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
</i18n>
|
||||
<RequiredPkgs Count="2">
|
||||
<RequiredPkgs Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
<PackageName Value="virtualtreeview_package"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item3>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
|
@ -30,9 +30,9 @@ interface
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, ExtCtrls, StdCtrls, ButtonPanel,
|
||||
Forms, Controls, Graphics, ExtCtrls, StdCtrls, ButtonPanel, VirtualTrees,
|
||||
// OpkMan
|
||||
opkman_const, opkman_common, opkman_VirtualTrees, opkman_options;
|
||||
opkman_const, opkman_common, opkman_options;
|
||||
|
||||
type
|
||||
|
||||
@ -284,7 +284,7 @@ begin
|
||||
else
|
||||
Data^.FType := 0;
|
||||
end;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVST.SortTree(0, VirtualTrees.sdAscending);
|
||||
|
||||
SL := TStringList.Create;
|
||||
try
|
||||
|
@ -28,12 +28,12 @@ unit opkman_createjsonforupdatesfrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpjson,
|
||||
Classes, SysUtils, fpjson, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, LCLIntf,
|
||||
// OpkMan
|
||||
opkman_serializablepackages, opkman_const, opkman_common, opkman_updates,
|
||||
opkman_VirtualTrees, opkman_options;
|
||||
opkman_options;
|
||||
|
||||
type
|
||||
|
||||
@ -59,7 +59,7 @@ type
|
||||
FVST: TVirtualStringTree;
|
||||
FMetaPackage: TMetaPackage;
|
||||
FSortCol: Integer;
|
||||
FSortDir: opkman_VirtualTrees.TSortDirection;
|
||||
FSortDir: VirtualTrees.TSortDirection;
|
||||
procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String);
|
||||
procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -68,8 +68,7 @@ type
|
||||
procedure VSTCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
public
|
||||
procedure PopluateTree;
|
||||
end;
|
||||
@ -309,26 +308,25 @@ begin
|
||||
Finalize(Data^)
|
||||
end;
|
||||
|
||||
procedure TCreateJSONForUpdatesFrm.VSTHeaderClick(Sender: TVTHeader;
|
||||
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TCreateJSONForUpdatesFrm.VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
if Column > 1 then
|
||||
if HitInfo.Column > 1 then
|
||||
Exit;
|
||||
if Button = mbLeft then
|
||||
if HitInfo.Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortColumn := HitInfo.Column;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if SortDirection = opkman_VirtualTrees.sdAscending then
|
||||
SortDirection := opkman_VirtualTrees.sdDescending
|
||||
if SortDirection = VirtualTrees.sdAscending then
|
||||
SortDirection := VirtualTrees.sdDescending
|
||||
else
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
FSortDir := SortDirection;
|
||||
end;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
|
@ -28,7 +28,7 @@ unit opkman_createrepositoryfrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, fpjson,
|
||||
Classes, SysUtils, FileUtil, fpjson, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
StdCtrls, Buttons, Menus,
|
||||
@ -37,7 +37,7 @@ uses
|
||||
// LazUtils
|
||||
LazFileUtils, LazUTF8,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_serializablepackages;
|
||||
opkman_serializablepackages;
|
||||
|
||||
type
|
||||
|
||||
@ -100,8 +100,7 @@ type
|
||||
procedure VSTPackagesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
{%H-}Kind: TVTImageKind; {%H-}Column: TColumnIndex; var {%H-}Ghosted: Boolean;
|
||||
var ImageIndex: Integer);
|
||||
procedure VSTPackagesHeaderClick(Sender: TVTHeader; {%H-}Column: TColumnIndex;
|
||||
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
|
||||
procedure VSTPackagesHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VSTPackagesCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure VSTPackagesFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -808,24 +807,23 @@ begin
|
||||
ImageIndex := Data^.FDataType;
|
||||
end;
|
||||
|
||||
procedure TCreateRepositoryFrm.VSTPackagesHeaderClick(Sender: TVTHeader;
|
||||
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TCreateRepositoryFrm.VSTPackagesHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
if Button = mbLeft then
|
||||
if HitInfo.Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortColumn := HitInfo.Column;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if SortDirection = opkman_VirtualTrees.sdAscending then
|
||||
SortDirection := opkman_VirtualTrees.sdDescending
|
||||
if SortDirection = VirtualTrees.sdAscending then
|
||||
SortDirection := VirtualTrees.sdDescending
|
||||
else
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
FSortDirection := SortDirection;
|
||||
|
@ -28,7 +28,7 @@ unit opkman_createrepositorypackagefrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, md5, fpjson,
|
||||
Classes, SysUtils, md5, fpjson, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, ExtCtrls, StdCtrls, Dialogs, Graphics, Buttons, EditBtn,
|
||||
// IDEIntf
|
||||
@ -36,7 +36,7 @@ uses
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, Laz2_XMLCfg,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_serializablepackages, opkman_zipper, opkman_uploader;
|
||||
opkman_serializablepackages, opkman_zipper, opkman_uploader;
|
||||
|
||||
type
|
||||
TPackageOperation = (poCreate, poSubmit);
|
||||
@ -486,7 +486,7 @@ begin
|
||||
FVSTPackages.Selected[RootNode] := True;
|
||||
CanGo := True;
|
||||
end;
|
||||
FVSTPackages.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVSTPackages.SortTree(0, VirtualTrees.sdAscending);
|
||||
end
|
||||
else
|
||||
MessageDlgEx(rsCreateRepositoryPackageFrm_NoPackage, mtInformation, [mbOk], Self);
|
||||
|
@ -5,14 +5,14 @@ unit opkman_intf_packagelistfrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes,
|
||||
SysUtils, Classes, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Buttons, Graphics, ExtCtrls, StdCtrls, LCLType, ButtonPanel,
|
||||
Menus,
|
||||
//IDEIntf
|
||||
PackageIntf,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_const, opkman_serializablepackages, opkman_options,
|
||||
opkman_const, opkman_serializablepackages, opkman_options,
|
||||
opkman_Common;
|
||||
|
||||
type
|
||||
@ -33,7 +33,7 @@ type
|
||||
private
|
||||
FVST: TVirtualStringTree;
|
||||
FSortCol: Integer;
|
||||
FSortDir: opkman_VirtualTrees.TSortDirection;
|
||||
FSortDir: VirtualTrees.TSortDirection;
|
||||
procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String);
|
||||
procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -41,8 +41,7 @@ type
|
||||
var ImageIndex: Integer);
|
||||
procedure VSTCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VSTGetHint(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
|
||||
var LineBreakStyle: TVTTooltipLineBreakStyle; var HintText: String);
|
||||
procedure VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
@ -200,26 +199,25 @@ begin
|
||||
Result := CompareText(Data1^.LazarusPackageName, Data2^.LazarusPackageName);
|
||||
end;
|
||||
|
||||
procedure TIntfPackageListFrm.VSTHeaderClick(Sender: TVTHeader;
|
||||
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TIntfPackageListFrm.VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
if (Column <> 0) and (Column <> 1) and (Column <> 3) then
|
||||
if (HitInfo.Column <> 0) and (HitInfo.Column <> 1) and (HitInfo.Column <> 3) then
|
||||
Exit;
|
||||
if Button = mbLeft then
|
||||
if HitInfo.Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortColumn := HitInfo.Column;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if SortDirection = opkman_VirtualTrees.sdAscending then
|
||||
SortDirection := opkman_VirtualTrees.sdDescending
|
||||
if SortDirection = VirtualTrees.sdAscending then
|
||||
SortDirection := VirtualTrees.sdDescending
|
||||
else
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
FSortDir := SortDirection;
|
||||
end;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
|
@ -29,7 +29,7 @@ unit opkman_mainfrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, fpjson, md5, Graphics,
|
||||
Classes, SysUtils, fpjson, md5, Graphics, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Buttons, Menus, ComCtrls, Clipbrd,
|
||||
LCLIntf, LCLVersion, LCLProc,
|
||||
@ -38,7 +38,7 @@ uses
|
||||
// IdeIntf
|
||||
IDECommands, PackageIntf,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_downloader, opkman_installer,
|
||||
opkman_downloader, opkman_installer,
|
||||
opkman_serializablepackages, opkman_visualtree, opkman_const, opkman_common,
|
||||
opkman_progressfrm, opkman_zipper, opkman_packagelistfrm, opkman_options,
|
||||
opkman_optionsfrm, opkman_createrepositorypackagefrm, opkman_updates,
|
||||
|
@ -28,9 +28,9 @@ interface
|
||||
uses
|
||||
SysUtils,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, ExtCtrls, StdCtrls,
|
||||
Forms, Controls, Graphics, ExtCtrls, StdCtrls, VirtualTrees,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_const, opkman_serializablepackages, opkman_options;
|
||||
opkman_const, opkman_serializablepackages, opkman_options;
|
||||
|
||||
type
|
||||
|
||||
@ -194,7 +194,7 @@ begin
|
||||
bOk.Visible := True;
|
||||
lbMessage.Caption := rsMainFrm_PackageUpdate1;
|
||||
end;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVST.SortTree(0, sdAscending);
|
||||
end;
|
||||
|
||||
procedure TPackageListFrm.FormClose(Sender: TObject;
|
||||
|
@ -27,12 +27,12 @@ unit opkman_progressfrm;
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes,
|
||||
SysUtils, Classes, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, ExtCtrls, ButtonPanel,
|
||||
// OpkMan
|
||||
opkman_installer, opkman_common, opkman_const, opkman_downloader, opkman_zipper,
|
||||
opkman_VirtualTrees, opkman_options;
|
||||
opkman_options;
|
||||
|
||||
type
|
||||
|
||||
|
@ -28,11 +28,11 @@ unit opkman_repositories;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
Classes, SysUtils, VirtualTrees,
|
||||
// LCL
|
||||
Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, ButtonPanel,
|
||||
// OpkMan
|
||||
opkman_const, opkman_common, opkman_options, opkman_VirtualTrees;
|
||||
opkman_const, opkman_common, opkman_options;
|
||||
|
||||
type
|
||||
|
||||
@ -52,7 +52,7 @@ type
|
||||
private
|
||||
FVST: TVirtualStringTree;
|
||||
FSortCol: Integer;
|
||||
FSortDir: opkman_VirtualTrees.TSortDirection;
|
||||
FSortDir: VirtualTrees.TSortDirection;
|
||||
procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String);
|
||||
procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -63,8 +63,7 @@ type
|
||||
procedure VSTFocuseChanged(Sender: TBaseVirtualTree; {%H-}Node: PVirtualNode; {%H-}Column: TColumnIndex);
|
||||
procedure VSTPaintText(Sender: TBaseVirtualTree; const TargetCanvas: TCanvas;
|
||||
Node: PVirtualNode; {%H-}Column: TColumnIndex; {%H-}TextType: TVSTTextType);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure PopulateTree;
|
||||
procedure EnableDisableButtons;
|
||||
@ -229,7 +228,7 @@ var
|
||||
begin
|
||||
Options.RemoteRepositoryTmp.Clear;
|
||||
FVST.BeginUpdate;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVST.SortTree(0, VirtualTrees.sdAscending);
|
||||
Node := FVST.GetFirst;
|
||||
while Assigned(Node) do
|
||||
begin
|
||||
@ -304,26 +303,25 @@ begin
|
||||
TargetCanvas.Font.Style := TargetCanvas.Font.Style - [fsBold]
|
||||
end;
|
||||
|
||||
procedure TRepositoriesFrm.VSTHeaderClick(Sender: TVTHeader;
|
||||
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TRepositoriesFrm.VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
if (Column <> 0) and (Column <> 1) and (Column <> 3) then
|
||||
if (HitInfo.Column <> 0) and (HitInfo.Column <> 1) and (HitInfo.Column <> 3) then
|
||||
Exit;
|
||||
if Button = mbLeft then
|
||||
if HitInfo.Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortColumn := HitInfo.Column;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if SortDirection = opkman_VirtualTrees.sdAscending then
|
||||
SortDirection := opkman_VirtualTrees.sdDescending
|
||||
if SortDirection = VirtualTrees.sdAscending then
|
||||
SortDirection := VirtualTrees.sdDescending
|
||||
else
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
FSortDir := SortDirection;
|
||||
end;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
@ -403,7 +401,7 @@ begin
|
||||
Data^.FUniqueID := UniqueID;
|
||||
end;
|
||||
end;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVST.SortTree(0, VirtualTrees.sdAscending);
|
||||
Node := FVST.GetFirst;
|
||||
if Node <> nil then
|
||||
begin
|
||||
|
@ -35,7 +35,7 @@ uses
|
||||
//Interface
|
||||
LCLIntf,
|
||||
//OpkMan
|
||||
opkman_virtualtrees;
|
||||
virtualtrees;
|
||||
|
||||
type
|
||||
|
||||
|
@ -30,13 +30,13 @@ unit opkman_visualtree;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, contnrs, Math, dateutils,
|
||||
Classes, SysUtils, contnrs, Math, dateutils, VirtualTrees,
|
||||
// LCL
|
||||
Controls, Graphics, Menus, Dialogs, Forms, LCLType, Buttons,
|
||||
// IDEIntf
|
||||
LCLIntf, PackageIntf,
|
||||
// OpkMan
|
||||
opkman_VirtualTrees, opkman_common, opkman_serializablepackages, opkman_const,
|
||||
opkman_common, opkman_serializablepackages, opkman_const,
|
||||
opkman_options, opkman_packagedetailsfrm, opkman_showhint;
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ type
|
||||
FLink: String;
|
||||
FLinkClicked: Boolean;
|
||||
FSortCol: Integer;
|
||||
FSortDir: opkman_VirtualTrees.TSortDirection;
|
||||
FSortDir: VirtualTrees.TSortDirection;
|
||||
FCheckingNodes: Boolean;
|
||||
FLeaving: Boolean;
|
||||
FOnChecking: TOnChecking;
|
||||
@ -116,8 +116,7 @@ type
|
||||
var ImageIndex: Integer);
|
||||
procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
|
||||
procedure VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VSTPaintText(Sender: TBaseVirtualTree;
|
||||
const TargetCanvas: TCanvas; Node: PVirtualNode; {%H-}Column: TColumnIndex;
|
||||
{%H-}TextType: TVSTTextType);
|
||||
@ -475,7 +474,7 @@ begin
|
||||
GrandChildData^.SVNURL := SerializablePackages.Items[I].SVNURL;
|
||||
GrandChildData^.DataType := 19;}
|
||||
end;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
FVST.SortTree(0, VirtualTrees.sdAscending);
|
||||
ExpandEx;
|
||||
CollapseEx;
|
||||
RootNode := VST.GetFirst;
|
||||
@ -1539,26 +1538,25 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVisualTree.VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TVisualTree.VSTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
if (Column <> 0) and (Column <> 1) and (Column <> 3) then
|
||||
if (HitInfo.Column <> 0) and (HitInfo.Column <> 1) and (HitInfo.Column <> 3) then
|
||||
Exit;
|
||||
if Button = mbLeft then
|
||||
if HitInfo.Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
if (SortColumn = NoColumn) or (SortColumn <> HitInfo.Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortColumn := HitInfo.Column;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if SortDirection = opkman_VirtualTrees.sdAscending then
|
||||
SortDirection := opkman_VirtualTrees.sdDescending
|
||||
if SortDirection = VirtualTrees.sdAscending then
|
||||
SortDirection := VirtualTrees.sdDescending
|
||||
else
|
||||
SortDirection := opkman_VirtualTrees.sdAscending;
|
||||
SortDirection := VirtualTrees.sdAscending;
|
||||
FSortDir := SortDirection;
|
||||
end;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
|
Loading…
Reference in New Issue
Block a user