HaikuDepot: PackageInfo: Split description into short and full
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user