diff --git a/src/apps/haiku-depot/PackageInfoView.cpp b/src/apps/haiku-depot/PackageInfoView.cpp index 64bd2fb69f..85c9eaab20 100644 --- a/src/apps/haiku-depot/PackageInfoView.cpp +++ b/src/apps/haiku-depot/PackageInfoView.cpp @@ -24,6 +24,8 @@ #include #include +#include + #include "BitmapButton.h" #include "BitmapView.h" #include "MarkupParser.h" @@ -654,6 +656,27 @@ public: Clear(); } + virtual void AttachedToWindow() + { + fWebsiteLinkView->SetTarget(this); + } + + virtual void MessageReceived(BMessage* message) + { + switch(message->what) { + case MSG_VISIT_PUBLISHER_WEBSITE: + { + BPrivate::Support::BUrl url(fWebsiteLinkView->Text()); + url.OpenWithPreferredApplication(); + break; + } + + default: + BView::MessageReceived(message); + break; + } + } + void SetPackage(const PackageInfo& package) { fDescriptionView->SetText(package.ShortDescription(), @@ -696,7 +719,7 @@ private: SharedBitmap fWebsiteIcon; BitmapView* fWebsiteIconView; - BStringView* fWebsiteLinkView; + LinkView* fWebsiteLinkView; };