From f4058a3f9f229a812fd5a0d3e33011aacec25d05 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 22 Sep 2013 16:48:10 -0400 Subject: [PATCH] HaikuDepot: Adjust displayed publisher. - If available, show the package's copyright information for the publisher rather than the vendor, as the latter simply indicates the maintainer of the repository rather than the actual developers of the software contained in the package. --- src/apps/haiku-depot/MainWindow.cpp | 6 +++++- src/apps/haiku-depot/PackageInfoView.cpp | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apps/haiku-depot/MainWindow.cpp b/src/apps/haiku-depot/MainWindow.cpp index 8e1f4bf0ac..d791aa4740 100644 --- a/src/apps/haiku-depot/MainWindow.cpp +++ b/src/apps/haiku-depot/MainWindow.cpp @@ -405,10 +405,14 @@ MainWindow::_RefreshPackageList() BString publisherURL; if (repoPackageInfo.URLList().CountStrings() > 0) publisherURL = repoPackageInfo.URLList().StringAt(0); + const BStringList& rightsList = repoPackageInfo.CopyrightList(); + BString publisherName = repoPackageInfo.Vendor(); + if (rightsList.CountStrings() > 0) + publisherName = rightsList.StringAt(0); modelInfo.SetTo(new(std::nothrow) PackageInfo(NULL, repoPackageInfo.Name(), repoPackageInfo.Version().ToString(), - PublisherInfo(BitmapRef(), repoPackageInfo.Vendor(), + PublisherInfo(BitmapRef(), publisherName, "", publisherURL), repoPackageInfo.Summary(), repoPackageInfo.Description(), ""), true); diff --git a/src/apps/haiku-depot/PackageInfoView.cpp b/src/apps/haiku-depot/PackageInfoView.cpp index 11d24a8356..75c6a96b78 100644 --- a/src/apps/haiku-depot/PackageInfoView.cpp +++ b/src/apps/haiku-depot/PackageInfoView.cpp @@ -431,8 +431,7 @@ public: fTitleView->SetText(package.Title()); - BString publisher = B_TRANSLATE("by %Publisher%"); - publisher.ReplaceAll("%Publisher%", package.Publisher().Name()); + BString publisher = package.Publisher().Name(); fPublisherView->SetText(publisher); BString version = B_TRANSLATE("%Version%");