diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-03 16:40:38 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-03 16:40:38 +0200 |
| commit | f75f19be93417081f45438e3c2106bedf201fa8d (patch) | |
| tree | 9a4d09bf1bee073508a9d3ddb4d6d38419a7eb18 /indra/llui/llurlentry.cpp | |
| parent | 76587bc1d66491a302236bd6fdf1bbf09b73e68b (diff) | |
Fixed bug EXT-4574 ([BSI] Unhelpful tooltip for Partner and Group links in Profile).
For wiki-style links ([<URL> <label>]) we now show the tooltip corresponding to the URL type.
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llurlentry.cpp')
| -rw-r--r-- | indra/llui/llurlentry.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 20c939874b..2d0a156654 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -34,6 +34,8 @@ #include "linden_common.h" #include "llurlentry.h" #include "lluri.h" +#include "llurlmatch.h" +#include "llurlregistry.h" #include "llcachename.h" #include "lltrans.h" @@ -602,6 +604,20 @@ std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const return getUrlFromWikiLink(string); } +std::string LLUrlEntrySLLabel::getTooltip(const std::string &string) const +{ + // return a tooltip corresponding to the URL type instead of the generic one (EXT-4574) + std::string url = getUrl(string); + LLUrlMatch match; + if (LLUrlRegistry::instance().findUrl(url, match)) + { + return match.getTooltip(); + } + + // unrecognized URL? should not happen + return LLUrlEntryBase::getTooltip(string); +} + // // LLUrlEntryWorldMap Describes secondlife:///<location> URLs // |
