HaikuDepot: Vote up/down icons now clickable. Nothing happens.

This commit is contained in:
Stephan Aßmus 2013-08-18 13:31:38 +02:00
parent bef5ba1ac3
commit 6eabc75c78
2 changed files with 13 additions and 2 deletions

View File

@ -660,9 +660,15 @@ public:
fPackageVersionView->SetFont(&versionFont);
fPackageVersionView->SetHighColor(kLightBlack);
fVoteUpIconView = new BitmapView("vote up icon");
// TODO: User rating IDs to identify which rating to vote up or down
BMessage* voteUpMessage = new BMessage(MSG_VOTE_UP);
voteUpMessage->AddInt32("rating id", -1);
BMessage* voteDownMessage = new BMessage(MSG_VOTE_DOWN);
voteDownMessage->AddInt32("rating id", -1);
fVoteUpIconView = new BitmapButton("vote up icon", voteUpMessage);
fUpVoteCountView = new BStringView("up vote count", "");
fVoteDownIconView = new BitmapView("vote down icon");
fVoteDownIconView = new BitmapButton("vote down icon", voteDownMessage);
fDownVoteCountView = new BStringView("up vote count", "");
fVoteUpIconView->SetBitmap(

View File

@ -15,6 +15,11 @@ class PackageActionView;
class PackageManager;
class PagesView;
enum {
MSG_VOTE_UP = 'vtup',
MSG_VOTE_DOWN = 'vtdn',
};
class PackageInfoView : public BGroupView {
public: