summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-05 11:13:26 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-05 11:13:26 +0000
commitf1a4dc710d3978a96bb05482643df0960f6e8fd4 (patch)
treebd6dc85cc4c06329c09510e318b58cc8dfa1df5d /indra/llui/llurlentry.cpp
parent6ecec59fda7d248d2640cb0a4fd95276604755a9 (diff)
parenta5c202dcfd1eb8240e1f03d3a9d42a360b41bab2 (diff)
merge from viewer-2-0
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rw-r--r--indra/llui/llurlentry.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 20c939874b..35428e4227 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"
@@ -308,6 +310,7 @@ LLUrlEntryAgent::LLUrlEntryAgent()
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_agent.xml";
mIcon = "Generic_Person";
+ mTooltip = LLTrans::getString("TooltipAgentUrl");
mColor = LLUIColorTable::instance().getColor("AgentLinkColor");
}
@@ -602,6 +605,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
//