EXT-4678: Revert URL black list support from LLTextBase.

The new <nolink>URL</nolink> provides a more flexible solution that
can be specified in XUI (as we now do to disabled hyperlinking for the
sim hostname in the About floater).
master
Lynx Linden 2010-01-29 14:56:39 +00:00
parent 4d6c9e3e17
commit 2ec69d6d71
4 changed files with 1 additions and 33 deletions

View File

@ -1512,25 +1512,6 @@ void LLTextBase::setText(const LLStringExplicit &utf8str, const LLStyle::Params&
onValueChange(0, getLength());
}
void LLTextBase::addBlackListUrl(const std::string &url)
{
mBlackListUrls.push_back(url);
}
bool LLTextBase::isBlackListUrl(const std::string &url) const
{
std::vector<std::string>::const_iterator it;
for (it = mBlackListUrls.begin(); it != mBlackListUrls.end(); ++it)
{
const std::string &blacklist_url = *it;
if (url.find(blacklist_url) != std::string::npos)
{
return true;
}
}
return false;
}
//virtual
std::string LLTextBase::getText() const
{

View File

@ -187,9 +187,6 @@ 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;
@ -312,7 +309,6 @@ 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
@ -364,9 +360,6 @@ 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

View File

@ -187,12 +187,6 @@ BOOL LLFloaterAbout::postBuild()
support << '\n' << getString("AboutTraffic", args);
}
// don't make the sim hostname be a hyperlink
if (info.has("HOSTNAME"))
{
support_widget->addBlackListUrl(info["HOSTNAME"].asString());
}
support_widget->appendText(support.str(),
FALSE,
LLStyle::Params()

View File

@ -21,7 +21,7 @@ Built with [COMPILER] version [COMPILER_VERSION]
</floater.string>
<floater.string
name="AboutPosition">
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at [HOSTNAME] ([HOSTIP])
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at &lt;nolink&gt;[HOSTNAME]&lt;/nolink&gt; ([HOSTIP])
[SERVER_VERSION]
[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]