summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-10-21 19:51:41 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-10-21 19:51:41 +0000
commit012b102ad1baf9f24601cbec6365fe43aad2d521 (patch)
tree20bce32919f20aa7535cdded2ca70bc88b9ab212 /cmdline/apt-cache.cc
parent487d7faaa8d789507b901cead8d7803c98af2bd3 (diff)
* ABI/API change: add "VerIterator::TranslatedDescription()" method to make the life of the api user easier
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 810dbe7b0..cb1aeb514 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1237,13 +1237,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
// Show the right description
pkgRecords Recs(*GCache);
- pkgCache::DescIterator DescDefault = V.DescriptionList();
- pkgCache::DescIterator Desc = DescDefault;
- for (; Desc.end() == false; Desc++)
- if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
- break;
- if (Desc.end() == true) Desc = DescDefault;
-
+ pkgCache::DescIterator Desc = V.TranslatedDescription();
pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
cout << "Description" << ( (strcmp(Desc.LanguageCode(),"") != 0) ? "-" : "" ) << Desc.LanguageCode() << ": " << P.LongDesc();