diff options
author | Lynx Linden <lynx@lindenlab.com> | 2010-01-26 13:09:26 +0000 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2010-01-26 13:09:26 +0000 |
commit | 0a38adfd8af7d95627cd43e44901b9ae4e4e2d29 (patch) | |
tree | 8d84c992a705d3e6f52579d760036c8791f16359 /indra/llui/lltextbase.h | |
parent | fbf605ea321ee29afad63a4afe47f65584d67eea (diff) |
EXT-4678: Don't hyperlink sim URLs in About window.
Added support for specifying a black list of URLs on a per-widget
basis. URLs on this black list will not be hyperlinked in the text
widget. The About dialog adds the sim hostname to this black list.
Diffstat (limited to 'indra/llui/lltextbase.h')
-rw-r--r-- | indra/llui/lltextbase.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 038b9eaa62..e1c6cc36ab 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -41,6 +41,7 @@ #include "llpanel.h" #include <string> +#include <vector> #include <set> #include <boost/signals2.hpp> @@ -186,6 +187,9 @@ public: const LLFontGL* getDefaultFont() const { return mDefaultFont; } LLStyle::Params getDefaultStyle(); + // tell the text object to suppress auto highlighting of a specific URL + void addBlackListUrl(const std::string &url); + public: // Fired when a URL link is clicked commit_signal_t mURLClickSignal; @@ -308,6 +312,7 @@ protected: void updateRects(); void needsScroll() { mScrollNeeded = TRUE; } void replaceUrlLabel(const std::string &url, const std::string &label); + bool isBlackListUrl(const std::string &url) const; protected: // text segmentation and flow @@ -359,6 +364,9 @@ protected: LLView* mDocumentView; class LLScrollContainer* mScroller; + // list of URLs to suppress from automatic hyperlinking + std::vector<std::string> mBlackListUrls; + // transient state bool mReflowNeeded; // need to reflow text because of change to text contents or display region bool mScrollNeeded; // need to change scroll region because of change to cursor position |