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

View File

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

View File

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

View File

@ -69,6 +69,7 @@ type
property Visible: boolean read FVisible write FVisible;
property IsValid: boolean read FIsValid write FIsValid;
property EffectiveFilename: string read FEffectiveFilename write FEffectiveFilename;
property OPMFileDate;
end;
{ TPackageLinksDialog }
@ -400,7 +401,7 @@ begin
PkgStringGrid.Cells[5,i]:=Link.EffectiveFilename;
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
begin
if Link.LastUsed=0 then
@ -519,6 +520,7 @@ begin
LPKFileDateValid:=Link.LPKFileDateValid;
LPKFileDate:=Link.LPKFileDate;
LastUsed:=Link.LastUsed;
OPMFileDate:=Link.OPMFileDate;
end;
end else
inherited Assign(Source);