The following commit has been merged in the master branch:
commit 89bfe1b594d0235191e9d634a34187777cb8314b
Author: Miriam Ruiz <[email protected]>
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!

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to