IDE: Pkglinks dialog: Display repository date in the "Last modified" column for online links. Repository date represents the date when the online package was last modified.

git-svn-id: trunk@56719 -
This commit is contained in:
balazs 2017-12-14 11:15:15 +00:00
parent 10869f2af7
commit d997abd3df
4 changed files with 9 additions and 2 deletions

View File

@ -63,6 +63,8 @@ type
FPackageType: TLazPackageType; FPackageType: TLazPackageType;
FOrigin: TPkgLinkOrigin; FOrigin: TPkgLinkOrigin;
FLastUsed: TDateTime; FLastUsed: TDateTime;
FOPMFileName: String;
FOPMFileDate: TDateTime;
public public
constructor Create; override; constructor Create; override;
destructor Destroy; override; destructor Destroy; override;
@ -81,6 +83,8 @@ type
property PackageType: TLazPackageType read FPackageType; property PackageType: TLazPackageType read FPackageType;
property Origin: TPkgLinkOrigin read FOrigin write FOrigin; property Origin: TPkgLinkOrigin read FOrigin write FOrigin;
property LastUsed: TDateTime read FLastUsed write FLastUsed; property LastUsed: TDateTime read FLastUsed write FLastUsed;
property OPMFileName: string read FOPMFileName write FOPMFileName;
property OPMFileDate: TDateTime read FOPMFileDate write FOPMFileDate;
end; end;
{ TPackageLinks } { TPackageLinks }

View File

@ -188,7 +188,7 @@ begin
if PackageLink <> nil then if PackageLink <> nil then
begin begin
PackageLink.Version.Assign(LazPackage.Version); PackageLink.Version.Assign(LazPackage.Version);
PackageLink.LPKFileDate := MetaPackage.RepositoryDate; PackageLink.OPMFileDate := MetaPackage.RepositoryDate;
FPackageLinks.Add(PackageLink); FPackageLinks.Add(PackageLink);
end; end;
end; end;

View File

@ -1201,6 +1201,7 @@ begin
Result.Name := PkgName; Result.Name := PkgName;
Result.LPKUrl := PkgURL; Result.LPKUrl := PkgURL;
Result.Origin := ploOnline; Result.Origin := ploOnline;
Result.OPMFileName := PkgFilename;
FOnlineLinks.Add(Result); FOnlineLinks.Add(Result);
end end
else begin else begin

View File

@ -69,6 +69,7 @@ type
property Visible: boolean read FVisible write FVisible; property Visible: boolean read FVisible write FVisible;
property IsValid: boolean read FIsValid write FIsValid; property IsValid: boolean read FIsValid write FIsValid;
property EffectiveFilename: string read FEffectiveFilename write FEffectiveFilename; property EffectiveFilename: string read FEffectiveFilename write FEffectiveFilename;
property OPMFileDate;
end; end;
{ TPackageLinksDialog } { TPackageLinksDialog }
@ -400,7 +401,7 @@ begin
PkgStringGrid.Cells[5,i]:=Link.EffectiveFilename; PkgStringGrid.Cells[5,i]:=Link.EffectiveFilename;
if Link.Origin = ploOnline then if Link.Origin = ploOnline then
PkgStringGrid.Cells[6,i]:= FormatDateTime('YYYY/MM/DD hh:mm:ss', Link.LPKFileDate) PkgStringGrid.Cells[6,i]:= FormatDateTime('YYYY/MM/DD hh:mm:ss', Link.OPMFileDate)
else else
begin begin
if Link.LastUsed=0 then if Link.LastUsed=0 then
@ -519,6 +520,7 @@ begin
LPKFileDateValid:=Link.LPKFileDateValid; LPKFileDateValid:=Link.LPKFileDateValid;
LPKFileDate:=Link.LPKFileDate; LPKFileDate:=Link.LPKFileDate;
LastUsed:=Link.LastUsed; LastUsed:=Link.LastUsed;
OPMFileDate:=Link.OPMFileDate;
end; end;
end else end else
inherited Assign(Source); inherited Assign(Source);