HaikuDepot: PackageInfo: Split description into short and full
This commit is contained in:
@@ -156,6 +156,9 @@ MainWindow::_InitDummyModel()
|
|||||||
"WonderBrush",
|
"WonderBrush",
|
||||||
"2.1.2",
|
"2.1.2",
|
||||||
"A vector based graphics editor.",
|
"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.");
|
"2.1.2 - Initial Haiku release.");
|
||||||
wonderbrush.AddUserRating(
|
wonderbrush.AddUserRating(
|
||||||
UserRating(UserInfo("humdinger"), 4.5f,
|
UserRating(UserInfo("humdinger"), 4.5f,
|
||||||
@@ -171,6 +174,10 @@ MainWindow::_InitDummyModel()
|
|||||||
"Paladin",
|
"Paladin",
|
||||||
"1.2.0",
|
"1.2.0",
|
||||||
"A C/C++ IDE based on Pe.",
|
"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(
|
paladin.AddUserRating(
|
||||||
UserRating(UserInfo("stippi"), 3.5f,
|
UserRating(UserInfo("stippi"), 3.5f,
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ PackageInfo::PackageInfo()
|
|||||||
:
|
:
|
||||||
fTitle(),
|
fTitle(),
|
||||||
fVersion(),
|
fVersion(),
|
||||||
fDescription(),
|
fShortDescription(),
|
||||||
|
fFullDescription(),
|
||||||
fChangelog(),
|
fChangelog(),
|
||||||
fUserRatings()
|
fUserRatings()
|
||||||
{
|
{
|
||||||
@@ -138,11 +139,13 @@ PackageInfo::PackageInfo()
|
|||||||
|
|
||||||
|
|
||||||
PackageInfo::PackageInfo(const BString& title, const BString& version,
|
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),
|
fTitle(title),
|
||||||
fVersion(version),
|
fVersion(version),
|
||||||
fDescription(description),
|
fShortDescription(shortDescription),
|
||||||
|
fFullDescription(fullDescription),
|
||||||
fChangelog(changelog),
|
fChangelog(changelog),
|
||||||
fUserRatings()
|
fUserRatings()
|
||||||
{
|
{
|
||||||
@@ -153,7 +156,8 @@ PackageInfo::PackageInfo(const PackageInfo& other)
|
|||||||
:
|
:
|
||||||
fTitle(other.fTitle),
|
fTitle(other.fTitle),
|
||||||
fVersion(other.fVersion),
|
fVersion(other.fVersion),
|
||||||
fDescription(other.fDescription),
|
fShortDescription(other.fShortDescription),
|
||||||
|
fFullDescription(other.fFullDescription),
|
||||||
fChangelog(other.fChangelog),
|
fChangelog(other.fChangelog),
|
||||||
fUserRatings(other.fUserRatings)
|
fUserRatings(other.fUserRatings)
|
||||||
{
|
{
|
||||||
@@ -165,7 +169,8 @@ PackageInfo::operator=(const PackageInfo& other)
|
|||||||
{
|
{
|
||||||
fTitle = other.fTitle;
|
fTitle = other.fTitle;
|
||||||
fVersion = other.fVersion;
|
fVersion = other.fVersion;
|
||||||
fDescription = other.fDescription;
|
fShortDescription = other.fShortDescription;
|
||||||
|
fFullDescription = other.fFullDescription;
|
||||||
fChangelog = other.fChangelog;
|
fChangelog = other.fChangelog;
|
||||||
fUserRatings = other.fUserRatings;
|
fUserRatings = other.fUserRatings;
|
||||||
return *this;
|
return *this;
|
||||||
@@ -177,7 +182,8 @@ PackageInfo::operator==(const PackageInfo& other) const
|
|||||||
{
|
{
|
||||||
return fTitle == other.fTitle
|
return fTitle == other.fTitle
|
||||||
&& fVersion == other.fVersion
|
&& fVersion == other.fVersion
|
||||||
&& fDescription == other.fDescription
|
&& fShortDescription == other.fShortDescription
|
||||||
|
&& fFullDescription == other.fFullDescription
|
||||||
&& fChangelog == other.fChangelog
|
&& fChangelog == other.fChangelog
|
||||||
&& fUserRatings == other.fUserRatings;
|
&& fUserRatings == other.fUserRatings;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public:
|
|||||||
{ return fUserInfo; }
|
{ return fUserInfo; }
|
||||||
const BString& Comment() const
|
const BString& Comment() const
|
||||||
{ return fComment; }
|
{ return fComment; }
|
||||||
|
const BString& Language() const
|
||||||
|
{ return fLanguage; }
|
||||||
const float Rating() const
|
const float Rating() const
|
||||||
{ return fRating; }
|
{ return fRating; }
|
||||||
const BString& PackageVersion() const
|
const BString& PackageVersion() const
|
||||||
@@ -68,7 +70,8 @@ public:
|
|||||||
PackageInfo();
|
PackageInfo();
|
||||||
PackageInfo(const BString& title,
|
PackageInfo(const BString& title,
|
||||||
const BString& version,
|
const BString& version,
|
||||||
const BString& description,
|
const BString& shortDescription,
|
||||||
|
const BString& fullDescription,
|
||||||
const BString& changelog);
|
const BString& changelog);
|
||||||
PackageInfo(const PackageInfo& other);
|
PackageInfo(const PackageInfo& other);
|
||||||
|
|
||||||
@@ -80,8 +83,10 @@ public:
|
|||||||
{ return fTitle; }
|
{ return fTitle; }
|
||||||
const BString& Version() const
|
const BString& Version() const
|
||||||
{ return fVersion; }
|
{ return fVersion; }
|
||||||
const BString& Description() const
|
const BString& ShortDescription() const
|
||||||
{ return fDescription; }
|
{ return fShortDescription; }
|
||||||
|
const BString& FullDescription() const
|
||||||
|
{ return fFullDescription; }
|
||||||
const BString& Changelog() const
|
const BString& Changelog() const
|
||||||
{ return fChangelog; }
|
{ return fChangelog; }
|
||||||
|
|
||||||
@@ -90,7 +95,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
BString fTitle;
|
BString fTitle;
|
||||||
BString fVersion;
|
BString fVersion;
|
||||||
BString fDescription;
|
BString fShortDescription;
|
||||||
|
BString fFullDescription;
|
||||||
BString fChangelog;
|
BString fChangelog;
|
||||||
UserRatingList fUserRatings;
|
UserRatingList fUserRatings;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ public:
|
|||||||
|
|
||||||
fDescriptionView = new BTextView("description view");
|
fDescriptionView = new BTextView("description view");
|
||||||
fDescriptionView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
fDescriptionView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
fDescriptionView->MakeEditable(false);
|
||||||
|
|
||||||
BLayoutBuilder::Group<>(fLayout)
|
BLayoutBuilder::Group<>(fLayout)
|
||||||
.Add(fDescriptionView)
|
.Add(fDescriptionView)
|
||||||
@@ -172,7 +173,7 @@ public:
|
|||||||
|
|
||||||
void SetPackage(const PackageInfo& package)
|
void SetPackage(const PackageInfo& package)
|
||||||
{
|
{
|
||||||
fDescriptionView->SetText(package.Description());
|
fDescriptionView->SetText(package.FullDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user