From 146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 1 Feb 2010 17:06:18 -0800 Subject: Support returning full_name (and SLID) for LLCacheName::get() calls Changed callback signature to full_name instead of first_name,last_name Eliminated all calls to legacy (non-signal/non-boost-bind) lookup mechanism Change Pay dialog names to SLURL links Tweaked layout of Pay Resident and Pay via Object floaters to make SLURLs fit Consolidate name first + " " + last concatenation in LLCacheName::buildFullName() Reviewed with Kelly --- indra/newview/llchathistory.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a46cd84b60..12c8d58976 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -103,11 +103,7 @@ public: } else if (level == "add") { - std::string name; - name.assign(getFirstName()); - name.append(" "); - name.append(getLastName()); - + std::string name = getFullName(); LLAvatarActions::requestFriendshipDialog(getAvatarId(), name); } else if (level == "remove") @@ -177,14 +173,13 @@ public: } const LLUUID& getAvatarId () const { return mAvatarID;} - const std::string& getFirstName() const { return mFirstName; } - const std::string& getLastName () const { return mLastName; } + const std::string& getFullName() const { return mFullName; } void setup(const LLChat& chat,const LLStyle::Params& style_params) { mAvatarID = chat.mFromID; mSourceType = chat.mSourceType; - gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4)); + gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); if(chat.mFromID.isNull()) { mSourceType = CHAT_SOURCE_SYSTEM; @@ -256,12 +251,11 @@ public: LLPanel::draw(); } - void nameUpdatedCallback(const LLUUID& id,const std::string& first,const std::string& last,BOOL is_group) + void nameUpdatedCallback(const LLUUID& id,const std::string& full_name, bool is_group) { if (id != mAvatarID) return; - mFirstName = first; - mLastName = last; + mFullName = full_name; } protected: static const S32 PADDING = 20; @@ -341,8 +335,7 @@ protected: LLUUID mAvatarID; EChatSourceType mSourceType; - std::string mFirstName; - std::string mLastName; + std::string mFullName; std::string mFrom; S32 mMinUserNameWidth; -- cgit v1.2.3 From 2a2c51f278a5ee4dbfc21dfb25fe3eaee94082d7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 7 May 2010 15:00:36 -0700 Subject: DEV-49780 Chat/IM history shows SLID in tooltip Reviewed with Callum --- indra/newview/llchathistory.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2934dc1010..6fe23f872c 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -32,10 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llchathistory.h" + +#include "llavatarnamecache.h" #include "llinstantmessage.h" #include "llimview.h" -#include "llchathistory.h" #include "llcommandhandler.h" #include "llpanel.h" #include "lluictrlfactory.h" @@ -240,7 +242,12 @@ public: mAvatarID = chat.mFromID; mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; - gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); + //gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); + if (mAvatarID.notNull()) + { + LLAvatarNameCache::get(mAvatarID, + boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); + } //*TODO overly defensive thing, source type should be maintained out there if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM) @@ -323,6 +330,17 @@ public: return; mFrom = full_name; } + + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) + { + if (agent_id != mAvatarID) return; + + // HACK: just update tooltip + setToolTip( av_name.mSLID ); + LLTextBox* user_name = getChild("user_name"); + user_name->setToolTip( av_name.mSLID ); + } + protected: static const S32 PADDING = 20; -- cgit v1.2.3 From d36cffcb7b6b7eaed4e110dd1c92d0e397e7cfe6 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 12 May 2010 14:01:22 -0700 Subject: DEV-50013 IM inline text uses display names Reviewed with Leyla --- indra/newview/llchathistory.cpp | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0fc5e92324..b3f9bb1dc1 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -242,12 +242,6 @@ public: mAvatarID = chat.mFromID; mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; - //gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); - if (mAvatarID.notNull()) - { - LLAvatarNameCache::get(mAvatarID, - boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); - } //*TODO overly defensive thing, source type should be maintained out there if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM) @@ -260,14 +254,19 @@ public: userName->setReadOnlyColor(style_params.readonly_color()); userName->setColor(style_params.color()); - userName->setValue(chat.mFromName); - mFrom = chat.mFromName; - if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType) + if (chat.mFromName.empty() + || mSourceType == CHAT_SOURCE_SYSTEM + || mAvatarID.isNull()) { mFrom = LLTrans::getString("SECOND_LIFE"); userName->setValue(mFrom); } - + else + { + // ...from a normal user, lookup the name and fill in later + LLAvatarNameCache::get(mAvatarID, + boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); + } mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING; @@ -324,21 +323,15 @@ public: LLPanel::draw(); } - void nameUpdatedCallback(const LLUUID& id,const std::string& full_name, bool is_group) - { - if (id != mAvatarID) - return; - mFrom = full_name; - } - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { - if (agent_id != mAvatarID) return; + mFrom = av_name.mDisplayName; - // HACK: just update tooltip - setToolTip( av_name.mSLID ); LLTextBox* user_name = getChild("user_name"); + user_name->setValue( LLSD(av_name.mDisplayName ) ); + user_name->setToolTip( av_name.mSLID ); + setToolTip( av_name.mSLID ); } protected: -- cgit v1.2.3 From f4148502e484d516b42c4a88603eee6889d45697 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 18 May 2010 16:00:45 -0700 Subject: Rename mSLID to mUsername to match the name of the field in the UI Product made a late-breaking request to change the name of this field. The wire protocol for People API has not yet changed. --- indra/newview/llchathistory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5bf3d7b913..6d98afbc58 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -330,8 +330,8 @@ public: LLTextBox* user_name = getChild("user_name"); user_name->setValue( LLSD(av_name.mDisplayName ) ); - user_name->setToolTip( av_name.mSLID ); - setToolTip( av_name.mSLID ); + user_name->setToolTip( av_name.mUsername ); + setToolTip( av_name.mUsername ); } protected: -- cgit v1.2.3 From 061d38d331f25ceab5d48f5bfb2dbc595134f6ab Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 19 May 2010 12:34:13 -0700 Subject: DEV-50204 "Ericag Vader" shows when starting IM and local chat Start with blank header to hide sample text from XUI XML. Also fixed problem with computation of minimum chat header name width when the name wasn't in cache. --- indra/newview/llchathistory.cpp | 44 ++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6d98afbc58..a196b4c750 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -106,6 +106,18 @@ LLObjectIMHandler gObjectIMHandler; class LLChatHistoryHeader: public LLPanel { public: + LLChatHistoryHeader() + : LLPanel(), + mPopupMenuHandleAvatar(), + mPopupMenuHandleObject(), + mAvatarID(), + mSourceType(CHAT_SOURCE_UNKNOWN), + mFrom(), + mSessionID(), + mMinUserNameWidth(0), + mUserNameFont(NULL) + {} + static LLChatHistoryHeader* createInstance(const std::string& file_name) { LLChatHistoryHeader* pInstance = new LLChatHistoryHeader; @@ -249,27 +261,29 @@ public: mSourceType = CHAT_SOURCE_SYSTEM; } - LLTextBox* userName = getChild("user_name"); - - userName->setReadOnlyColor(style_params.readonly_color()); - userName->setColor(style_params.color()); + mUserNameFont = style_params.font(); + LLTextBox* user_name = getChild("user_name"); + user_name->setReadOnlyColor(style_params.readonly_color()); + user_name->setColor(style_params.color()); if (chat.mFromName.empty() || mSourceType == CHAT_SOURCE_SYSTEM || mAvatarID.isNull()) { mFrom = LLTrans::getString("SECOND_LIFE"); - userName->setValue(mFrom); + user_name->setValue(mFrom); + updateMinUserNameWidth(); } else { - // ...from a normal user, lookup the name and fill in later + // ...from a normal user, lookup the name and fill in later, + // but start with blank so sample data from XUI XML doesn't + // flash on the screen + user_name->setValue( LLSD() ); LLAvatarNameCache::get(mAvatarID, boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); } - mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING; - setTimeField(chat); LLAvatarIconCtrl* icon = getChild("avatar_icon"); @@ -323,15 +337,26 @@ public: LLPanel::draw(); } + void updateMinUserNameWidth() + { + if (mUserNameFont) + { + LLTextBox* user_name = getChild("user_name"); + const LLWString& text = user_name->getWText(); + mMinUserNameWidth = mUserNameFont->getWidth(text.c_str()) + PADDING; + } + } + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { mFrom = av_name.mDisplayName; LLTextBox* user_name = getChild("user_name"); user_name->setValue( LLSD(av_name.mDisplayName ) ); - user_name->setToolTip( av_name.mUsername ); setToolTip( av_name.mUsername ); + // name might have changed, update width + updateMinUserNameWidth(); } protected: @@ -450,6 +475,7 @@ protected: LLUUID mSessionID; S32 mMinUserNameWidth; + const LLFontGL* mUserNameFont; }; LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL; -- cgit v1.2.3 From 3e4a9614dc6ece19a87f47ec3519dbef01b08d07 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 28 May 2010 05:56:56 -0700 Subject: DEV-50451 FIX ??? shown in local chat for chat from objects Simple - was always doing name lookup even if ID was for an object --- indra/newview/llchathistory.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d3686ab99c..5323ecce72 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -274,7 +274,7 @@ public: user_name->setValue(mFrom); updateMinUserNameWidth(); } - else + else if (mSourceType == CHAT_SOURCE_AGENT) { // ...from a normal user, lookup the name and fill in later, // but start with blank so sample data from XUI XML doesn't @@ -283,6 +283,13 @@ public: LLAvatarNameCache::get(mAvatarID, boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); } + else { + // ...from an object, just use name as given + mFrom = chat.mFromName; + user_name->setValue(mFrom); + updateMinUserNameWidth(); + } + setTimeField(chat); -- cgit v1.2.3 From 6863c9eb3d0b50dcf31ae8a8b4a2bab50e481296 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 1 Jun 2010 06:20:07 -0700 Subject: Avoid name lookups when loading chat history on startup Also fixes DEV-50451, ??? for object names in chat history log on login. --- indra/newview/llchathistory.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5323ecce72..c52e8daf43 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -274,10 +274,14 @@ public: user_name->setValue(mFrom); updateMinUserNameWidth(); } - else if (mSourceType == CHAT_SOURCE_AGENT) + else if (mSourceType == CHAT_SOURCE_AGENT + && chat.mChatStyle != CHAT_STYLE_HISTORY) { - // ...from a normal user, lookup the name and fill in later, - // but start with blank so sample data from XUI XML doesn't + // ...from a normal user, lookup the name and fill in later. + // *NOTE: Do not do this for chat history logs, otherwise the viewer + // will flood the People API with lookup requests on startup + + // Start with blank so sample data from XUI XML doesn't // flash on the screen user_name->setValue( LLSD() ); LLAvatarNameCache::get(mAvatarID, -- cgit v1.2.3 From 7c47576f02e2e5f1300e786b8868a0697554f69a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 5 Oct 2010 15:38:45 -0700 Subject: DN-130 As a resident I want to show usernames in local chat if username preference is set so that I can follow the conversation when people are changing their display name --- indra/newview/llchathistory.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 162c846202..f28e02c66e 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -55,6 +55,7 @@ #include "llworld.h" #include "lluiconstants.h" +#include "llviewercontrol.h" #include "llsidetray.h"//for blocked objects panel @@ -365,6 +366,17 @@ public: LLTextBox* user_name = getChild("user_name"); user_name->setValue( LLSD(av_name.mDisplayName ) ); user_name->setToolTip( av_name.mUsername ); + + if (gSavedSettings.getBOOL("NameTagShowUsernames")) + { + LLStyle::Params style_params_name; + LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + style_params_name.color(userNameColor); + style_params_name.font.name("SansSerifSmall"); + style_params_name.font.style("NORMAL"); + style_params_name.readonly_color(userNameColor); + user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name); + } setToolTip( av_name.mUsername ); // name might have changed, update width updateMinUserNameWidth(); -- cgit v1.2.3 From 1d08fa4cd72c17dfbe7906fa8f5e2bc44d0fb7cd Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Mon, 11 Oct 2010 14:01:30 -0700 Subject: DN-162 Green - shown in local chat after name if View Display Names setting is off with Show User Names setting on. --- indra/newview/llchathistory.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index f28e02c66e..378c4358b3 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -367,15 +367,15 @@ public: user_name->setValue( LLSD(av_name.mDisplayName ) ); user_name->setToolTip( av_name.mUsername ); - if (gSavedSettings.getBOOL("NameTagShowUsernames")) - { - LLStyle::Params style_params_name; - LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); - style_params_name.color(userNameColor); - style_params_name.font.name("SansSerifSmall"); - style_params_name.font.style("NORMAL"); - style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name); + if (gSavedSettings.getBOOL("NameTagShowUsernames") && LLAvatarNameCache::useDisplayNames()) + { + LLStyle::Params style_params_name; + LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + style_params_name.color(userNameColor); + style_params_name.font.name("SansSerifSmall"); + style_params_name.font.style("NORMAL"); + style_params_name.readonly_color(userNameColor); + user_name->appendText(" - " + av_name.mUsername, FALSE, style_params_name); } setToolTip( av_name.mUsername ); // name might have changed, update width -- cgit v1.2.3 From cb5d8d1a9295076327f23e5f6d6c91fd0d4580ea Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 22 Oct 2010 17:41:06 -0700 Subject: DN-181 Chat & IM logs saved in unreadable .llsd instead of .txt --- indra/newview/llchathistory.cpp | 47 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 378c4358b3..cb5cf4a61d 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -54,6 +54,7 @@ #include "llviewertexteditor.h" #include "llworld.h" #include "lluiconstants.h" +#include "llstring.h" #include "llviewercontrol.h" @@ -260,7 +261,7 @@ public: if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull()) { mSourceType = CHAT_SOURCE_SYSTEM; - } + } mUserNameFont = style_params.font(); LLTextBox* user_name = getChild("user_name"); @@ -268,14 +269,14 @@ public: user_name->setColor(style_params.color()); if (chat.mFromName.empty() - || mSourceType == CHAT_SOURCE_SYSTEM - || mAvatarID.isNull()) + || mSourceType == CHAT_SOURCE_SYSTEM) { mFrom = LLTrans::getString("SECOND_LIFE"); user_name->setValue(mFrom); updateMinUserNameWidth(); } else if (mSourceType == CHAT_SOURCE_AGENT + && !mAvatarID.isNull() && chat.mChatStyle != CHAT_STYLE_HISTORY) { // ...from a normal user, lookup the name and fill in later. @@ -288,7 +289,41 @@ public: LLAvatarNameCache::get(mAvatarID, boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); } - else { + else if (chat.mChatStyle == CHAT_STYLE_HISTORY || + mSourceType == CHAT_SOURCE_AGENT) + { + //if it's an avatar name with a username add formatting + S32 username_start = chat.mFromName.rfind(" ("); + S32 username_end = chat.mFromName.rfind(')'); + + if (username_start != std::string::npos && + username_end == (chat.mFromName.length() - 1)) + { + mFrom = chat.mFromName.substr(0, username_start); + user_name->setValue(mFrom); + + if (gSavedSettings.getBOOL("NameTagShowUsernames")) + { + std::string username = chat.mFromName.substr(username_start + 2); + username = username.substr(0, username.length() - 1); + LLStyle::Params style_params_name; + LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + style_params_name.color(userNameColor); + style_params_name.font.name("SansSerifSmall"); + style_params_name.font.style("NORMAL"); + style_params_name.readonly_color(userNameColor); + user_name->appendText(" - " + username, FALSE, style_params_name); + } + } + else + { + mFrom = chat.mFromName; + user_name->setValue(mFrom); + updateMinUserNameWidth(); + } + } + else + { // ...from an object, just use name as given mFrom = chat.mFromName; user_name->setValue(mFrom); @@ -367,7 +402,9 @@ public: user_name->setValue( LLSD(av_name.mDisplayName ) ); user_name->setToolTip( av_name.mUsername ); - if (gSavedSettings.getBOOL("NameTagShowUsernames") && LLAvatarNameCache::useDisplayNames()) + if (gSavedSettings.getBOOL("NameTagShowUsernames") && + LLAvatarNameCache::useDisplayNames() && + !av_name.mIsDisplayNameDefault) { LLStyle::Params style_params_name; LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); -- cgit v1.2.3 From d42b1c3b215e8e30975c287de935830efd1e4d0d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 28 Oct 2010 17:57:32 +0300 Subject: STORM-488 FIXED Place profile was opened instead of Object profile if used clicked an object SLURL in the plain text nearby chat log. The reason is the same as in STORM-390: a bug in LLTextBase which leads to ignoring link href specified for a link segment if the segment contains an URL (and the ... clause is treated as such). The workaround is to explicitly disallow parsing URLs in a link segment by setting its "is_link" parameter to "true". --- indra/newview/llchathistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cb5cf4a61d..87297852c3 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -790,8 +790,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // (don't let object names with hyperlinks override our objectim Url) LLStyle::Params link_params(style_params); link_params.color.control = "HTMLLinkColor"; + link_params.is_link = true; link_params.link_href = url; - mEditor->appendText("" + chat.mFromName + "" + delimiter, + mEditor->appendText(chat.mFromName + delimiter, false, link_params); } else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log) -- cgit v1.2.3 From f3d4643b5907dec71183e4f0927c0e5a6fc48c70 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 28 Oct 2010 23:03:09 +0300 Subject: STORM-489 FIXED 'ed text rendered as URL Changes: * Suppressed URLs in object (sender) names of nearby chat messages loaded from history. * Fixed text between ... text being rendered as URL (hand cursor on hover, context menu, context menu, opening Places SP on click). --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 87297852c3..3dc6e786d3 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -805,7 +805,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } else { - mEditor->appendText(chat.mFromName + delimiter, false, style_params); + mEditor->appendText("" + chat.mFromName + "" + delimiter, false, style_params); } } } -- cgit v1.2.3 From 25c5f8aeb338803ce5a1386595877d15e6ce0aed Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 4 Nov 2010 11:51:02 -0700 Subject: DN-189 ??? Showing in tooltip over profile image in IM history --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cb5cf4a61d..9153f7325f 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -335,7 +335,7 @@ public: LLAvatarIconCtrl* icon = getChild("avatar_icon"); - if(mSourceType != CHAT_SOURCE_AGENT) + if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull()) icon->setDrawTooltip(false); switch (mSourceType) -- cgit v1.2.3 From ef46e7037ca59224dfcdf3745e165ee97b086a69 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 12 Nov 2010 17:28:44 +0200 Subject: STORM-579 FIXED resident SLURL font color to match Chat preferences for plain text Nearby Chat log --- indra/newview/llchathistory.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0f7e9313a9..271ee0c4a4 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -798,9 +798,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log) { LLStyle::Params link_params(style_params); - link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); + + // Setting is_link = true for agent SLURL to avoid applying default style to it. + // See LLTextBase::appendTextImpl(). + link_params.is_link = true; + link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString(); + // Add link to avatar's inspector and delimiter to message. - mEditor->appendText(link_params.link_href, false, style_params); + mEditor->appendText(chat.mFromName, false, link_params); mEditor->appendText(delimiter, false, style_params); } else -- cgit v1.2.3 From 7ed0938226d377e4945e9eea65ef4e4856716fbd Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 3 Dec 2010 20:45:53 +0200 Subject: STORM-579 FIXED SLURLs color for residents and objects names in plain text chat match the user setting for "URLs" in the Color tab in Prefs. Avatar names SLURLs now use the user color setting for "URLs" everywhere across the viewer. --- indra/newview/llchathistory.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 271ee0c4a4..6e778de2d8 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -789,24 +789,22 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // set the link for the object name to be the objectim SLapp // (don't let object names with hyperlinks override our objectim Url) LLStyle::Params link_params(style_params); - link_params.color.control = "HTMLLinkColor"; + LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); + link_params.color = link_color; + link_params.readonly_color = link_color; link_params.is_link = true; link_params.link_href = url; + mEditor->appendText(chat.mFromName + delimiter, false, link_params); } else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log) { LLStyle::Params link_params(style_params); - - // Setting is_link = true for agent SLURL to avoid applying default style to it. - // See LLTextBase::appendTextImpl(). - link_params.is_link = true; - link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString(); + link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); // Add link to avatar's inspector and delimiter to message. - mEditor->appendText(chat.mFromName, false, link_params); - mEditor->appendText(delimiter, false, style_params); + mEditor->appendText(std::string(link_params.link_href) + delimiter, false, link_params); } else { -- cgit v1.2.3