From 0a38adfd8af7d95627cd43e44901b9ae4e4e2d29 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 26 Jan 2010 13:09:26 +0000 Subject: 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. --- indra/llui/lltextbase.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llui/lltextbase.h') 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 +#include #include #include @@ -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 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 -- cgit v1.2.3