From 490f6bc1cc1b7d706ade4f8821b1a8a905c95f63 Mon Sep 17 00:00:00 2001 From: Cinders Date: Wed, 21 Aug 2013 13:12:29 -0600 Subject: [PATCH] FIRE-11330 Part 1 - Don't style chat name slurls as html links --- indra/llmessage/llavatarnamecache.cpp | 6 +----- indra/llui/llstyle.cpp | 3 ++- indra/llui/llstyle.h | 1 + indra/llui/lltextbase.cpp | 4 +++- indra/newview/fschathistory.cpp | 3 +++ indra/newview/llstylemap.cpp | 5 +++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index d49210112d..4ca7c331d8 100755 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -550,10 +550,7 @@ void LLAvatarNameCache::idle() bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id) { bool isPending = false; - - // AO SL timeout is too long - //const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0; - const F64 PENDING_TIMEOUT_SECS = 60.0; + const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0; pending_queue_t::const_iterator it = sPendingQueue.find(agent_id); if (it != sPendingQueue.end()) @@ -661,7 +658,6 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag { LLAvatarName& av_name = it->second; LLSD test = av_name.asLLSD(); - LL_DEBUGS("AvNameCache") << "DN cache hit for :" << test["display_name"].asString()+" (" + test["legacy_first_name"].asString()+" "+test["legacy_last_name"].asString()+")" << llendl; if(LGGContactSets::getInstance()->hasPseudonym(agent_id)) { diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index bb731f4f7e..3d1820059c 100755 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -41,7 +41,8 @@ LLStyle::Params::Params() font("font", LLFontGL::getFontMonospace()), image("image"), link_href("href"), - is_link("is_link") + is_link("is_link"), + is_name_slurl("is_name_slurl") // FIRE-11330 {} diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 9f1eba79d8..784a3c9ba1 100755 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -48,6 +48,7 @@ public: Optional image; Optional link_href; Optional is_link; + Optional is_name_slurl; // FIRE-11330 Params(); }; LLStyle(const Params& p = Params()); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index fb3e8a54ea..3a32ec0b88 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2122,7 +2122,9 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para end = match.getEnd()+1; LLStyle::Params link_params(style_params); - link_params.overwriteFrom(match.getStyle()); + // FIRE-11330 - if it's a name, don't stylize it like a url + if (!input_params.is_name_slurl) + link_params.overwriteFrom(match.getStyle()); // output the text before the Url if (start > 0) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 1dab3fa8ff..a16713c1b3 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -1035,6 +1035,9 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { LLStyle::Params link_params(body_message_params); link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); + link_params.is_name_slurl = true; + link_params.color = name_color; + link_params.readonly_color = name_color; if (from_me && gSavedSettings.getBOOL("FSChatHistoryShowYou")) { diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index 43fe37ac77..27b41334e0 100755 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -42,8 +42,9 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source) LLStyle::Params style_params; if (source != LLUUID::null) { - style_params.color.control = "HTMLLinkColor"; - style_params.readonly_color.control = "HTMLLinkColor"; + // FIRE-11330 - Let chat history decide + //style_params.color.control = "HTMLLinkColor"; + //style_params.readonly_color.control = "HTMLLinkColor"; style_params.link_href = LLSLURL("agent", source, "inspect").getSLURLString(); } mMap[source] = style_params;