diff options
author | Daniel Burrows <dburrows@debian.org> | 2007-10-24 10:27:19 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2007-10-24 10:27:19 -0700 |
commit | f6df027405b7667cb8ef0f5cc12a496d844294a4 (patch) | |
tree | b3fee4e7f924b9887e85b4d10f7c34f803789690 /src/pkg_view.cc | |
parent | d93d8c604a4f331f8c320138e045085c01885794 (diff) | |
download | aptitude-f6df027405b7667cb8ef0f5cc12a496d844294a4.tar.gz |
Add hypothetical support for homepages, once apt-pkg learns about them. (Closes: #445244)
Once the support is in apt-pkg, I might want to revisit this and add code to,
e.g., run epiphany on the homepage of a package.
Diffstat (limited to 'src/pkg_view.cc')
-rw-r--r-- | src/pkg_view.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg_view.cc b/src/pkg_view.cc index 391316d7..653ce678 100644 --- a/src/pkg_view.cc +++ b/src/pkg_view.cc @@ -226,12 +226,24 @@ public: void set_package(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &ver) { +#ifdef APT_HAS_HOMEPAGE + pkgRecords::Parser &rec=apt_package_records->Lookup(ver.FileList()); +#endif + // Check against pkg.end() to hack around #339533; if ver is a // default iterator, pkg.end() is true. wstring newdesc(pkg.end() ? L"" : get_long_description(ver)); fragment *frag=make_desc_fragment(newdesc); +#ifdef APT_HAS_HOMEPAGE + fragment *homepage = + rec.Homepage() == "" + ? fragf("") + : dropbox(fragf("%B%s%b", _("Homepage")), + hardwrapbox(text_fragment(rec.Homepage()))); +#endif + fragment *tags=make_tags_fragment(pkg); if(tags != NULL) tags = fragf("%n%n%F", tags); |