[SCM] Development for GoFind! branch, master, updated. 94e5470b123fb7bec2fb143dce8cf5a50be36ca0
Miriam Ruiz
miriam at debian.org
Wed May 6 01:03:29 UTC 2009
The following commit has been merged in the master branch:
commit 89bfe1b594d0235191e9d634a34187777cb8314b
Author: Miriam Ruiz <miriam at debian.org>
Date: Wed May 6 02:22:50 2009 +0200
Get proper strings from package description
diff --git a/apthelper.cpp b/apthelper.cpp
index 76fac27..388ca20 100644
--- a/apthelper.cpp
+++ b/apthelper.cpp
@@ -174,7 +174,8 @@ bool AptHelper::GetPackageInfo(const char *package_name, AptHelper::PackageInfo
pkgRecords Recs(*GCache);
pkgCache::DescIterator Desc = V.TranslatedDescription();
pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
- info->LongDescription = P.LongDesc();
+ info->ShortDescription = P.ShortDesc();
+ info->LongDescription = P.LongDesc().substr(P.LongDesc().find("\n")+1);
info->LanguageCode = Desc.LanguageCode();
info->Name = package_name;
break;
@@ -190,7 +191,8 @@ bool AptHelper::GetPackageInfo(const char *package_name, AptHelper::PackageInfo
pkgRecords Recs(*GCache);
pkgCache::DescIterator Desc = V.TranslatedDescription();
pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
- info->LongDescription = P.LongDesc();
+ info->ShortDescription = P.ShortDesc();
+ info->LongDescription = P.LongDesc().substr(P.LongDesc().find("\n")+1);
info->LanguageCode = Desc.LanguageCode();
info->Name = package_name;
}
@@ -207,7 +209,7 @@ bool AptHelper::ShowPackage(const char *package)
return false;
cout << "Description"
<< ( (strcmp(info.LanguageCode.c_str(),"") != 0) ? "-" : "" ) << info.LanguageCode
- << ": " << info.LongDescription << std::endl;
+ << ": " << info.ShortDescription << std::endl << info.LongDescription << std::endl;
return true;
}
--
Development for GoFind!
More information about the Pkg-games-commits
mailing list