Added support for using email address style named URLs ("... <...>") for

package licenses and URLs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34723 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-12-20 16:04:41 +00:00
parent 5674af6f76
commit 613cdfa696
3 changed files with 34 additions and 4 deletions
+12 -4
View File
@@ -566,20 +566,28 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
if (i > 0)
fCreditsView->Insert(", ");
BString licenseName;
BString licenseURL;
parse_named_url(license, licenseName, licenseURL);
BPath licensePath;
if (_GetLicensePath(license, licensePath) == B_OK) {
fCreditsView->InsertHyperText(license,
if (_GetLicensePath(licenseURL, licensePath) == B_OK) {
fCreditsView->InsertHyperText(licenseName,
new OpenFileAction(licensePath.Path()));
} else
fCreditsView->Insert(license);
fCreditsView->Insert(licenseName);
}
fCreditsView->Insert("\n");
}
if (url) {
BString urlName;
BString urlAddress;
parse_named_url(url, urlName, urlAddress);
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kLinkBlue);
fCreditsView->InsertHyperText(url, new URLAction(url));
fCreditsView->InsertHyperText(urlName, new URLAction(urlAddress));
fCreditsView->Insert("\n");
}
fCreditsView->Insert("\n");