From 46d5f6b433249beb03341ca707c50d7e189776f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 30 Jul 2013 22:27:31 +0200 Subject: [PATCH] HaikuDepot: PackageInfo: Split description into short and full --- src/apps/haiku-depot/MainWindow.cpp | 7 +++++++ src/apps/haiku-depot/PackageInfo.cpp | 18 ++++++++++++------ src/apps/haiku-depot/PackageInfo.h | 14 ++++++++++---- src/apps/haiku-depot/PackageInfoView.cpp | 3 ++- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/apps/haiku-depot/MainWindow.cpp b/src/apps/haiku-depot/MainWindow.cpp index cfec1a68a3..1a140cbbca 100644 --- a/src/apps/haiku-depot/MainWindow.cpp +++ b/src/apps/haiku-depot/MainWindow.cpp @@ -156,6 +156,9 @@ MainWindow::_InitDummyModel() "WonderBrush", "2.1.2", "A vector based graphics editor.", + "WonderBrush is YellowBites' software for doing graphics design " + "on Haiku. It combines many great under-the-hood features with " + "powerful tools and an efficient and intuitive interface.", "2.1.2 - Initial Haiku release."); wonderbrush.AddUserRating( UserRating(UserInfo("humdinger"), 4.5f, @@ -171,6 +174,10 @@ MainWindow::_InitDummyModel() "Paladin", "1.2.0", "A C/C++ IDE based on Pe.", + "If you like BeIDE, you'll like Paladin even better. " + "The interface is streamlined, it has some features sorely " + "missing from BeIDE, like running a project in the Terminal, " + "and has a bundled text editor based upon Pe.", ""); paladin.AddUserRating( UserRating(UserInfo("stippi"), 3.5f, diff --git a/src/apps/haiku-depot/PackageInfo.cpp b/src/apps/haiku-depot/PackageInfo.cpp index 10a6724c04..a90c4716e5 100644 --- a/src/apps/haiku-depot/PackageInfo.cpp +++ b/src/apps/haiku-depot/PackageInfo.cpp @@ -130,7 +130,8 @@ PackageInfo::PackageInfo() : fTitle(), fVersion(), - fDescription(), + fShortDescription(), + fFullDescription(), fChangelog(), fUserRatings() { @@ -138,11 +139,13 @@ PackageInfo::PackageInfo() PackageInfo::PackageInfo(const BString& title, const BString& version, - const BString& description, const BString& changelog) + const BString& shortDescription, const BString& fullDescription, + const BString& changelog) : fTitle(title), fVersion(version), - fDescription(description), + fShortDescription(shortDescription), + fFullDescription(fullDescription), fChangelog(changelog), fUserRatings() { @@ -153,7 +156,8 @@ PackageInfo::PackageInfo(const PackageInfo& other) : fTitle(other.fTitle), fVersion(other.fVersion), - fDescription(other.fDescription), + fShortDescription(other.fShortDescription), + fFullDescription(other.fFullDescription), fChangelog(other.fChangelog), fUserRatings(other.fUserRatings) { @@ -165,7 +169,8 @@ PackageInfo::operator=(const PackageInfo& other) { fTitle = other.fTitle; fVersion = other.fVersion; - fDescription = other.fDescription; + fShortDescription = other.fShortDescription; + fFullDescription = other.fFullDescription; fChangelog = other.fChangelog; fUserRatings = other.fUserRatings; return *this; @@ -177,7 +182,8 @@ PackageInfo::operator==(const PackageInfo& other) const { return fTitle == other.fTitle && fVersion == other.fVersion - && fDescription == other.fDescription + && fShortDescription == other.fShortDescription + && fFullDescription == other.fFullDescription && fChangelog == other.fChangelog && fUserRatings == other.fUserRatings; } diff --git a/src/apps/haiku-depot/PackageInfo.h b/src/apps/haiku-depot/PackageInfo.h index 10e3419ef7..d0a4b31866 100644 --- a/src/apps/haiku-depot/PackageInfo.h +++ b/src/apps/haiku-depot/PackageInfo.h @@ -46,6 +46,8 @@ public: { return fUserInfo; } const BString& Comment() const { return fComment; } + const BString& Language() const + { return fLanguage; } const float Rating() const { return fRating; } const BString& PackageVersion() const @@ -68,7 +70,8 @@ public: PackageInfo(); PackageInfo(const BString& title, const BString& version, - const BString& description, + const BString& shortDescription, + const BString& fullDescription, const BString& changelog); PackageInfo(const PackageInfo& other); @@ -80,8 +83,10 @@ public: { return fTitle; } const BString& Version() const { return fVersion; } - const BString& Description() const - { return fDescription; } + const BString& ShortDescription() const + { return fShortDescription; } + const BString& FullDescription() const + { return fFullDescription; } const BString& Changelog() const { return fChangelog; } @@ -90,7 +95,8 @@ public: private: BString fTitle; BString fVersion; - BString fDescription; + BString fShortDescription; + BString fFullDescription; BString fChangelog; UserRatingList fUserRatings; }; diff --git a/src/apps/haiku-depot/PackageInfoView.cpp b/src/apps/haiku-depot/PackageInfoView.cpp index a753a2d1c3..9b60ec1d72 100644 --- a/src/apps/haiku-depot/PackageInfoView.cpp +++ b/src/apps/haiku-depot/PackageInfoView.cpp @@ -155,6 +155,7 @@ public: fDescriptionView = new BTextView("description view"); fDescriptionView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + fDescriptionView->MakeEditable(false); BLayoutBuilder::Group<>(fLayout) .Add(fDescriptionView) @@ -172,7 +173,7 @@ public: void SetPackage(const PackageInfo& package) { - fDescriptionView->SetText(package.Description()); + fDescriptionView->SetText(package.FullDescription()); } void Clear()