From 6575b685e91d334198789c88dec2efab7e5a1ac9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 24 Feb 2010 17:18:05 +0200 Subject: fixed EXT-5526 Objects are shown as persons in the chat history from previous sessions - new chat source type CHAT_SOURCE_UNKNOWN for avatar names not in cache and object names consisting of two words (avatar names like) - new icon (unknown_icon.png) for message headers () of nearby chat messagses coming from CHAT_SOURCE_UNKNOWN - context menu no longer displayed for object names from chat history (no UUIDs) - double click on message headers in nearby chat no longer opens Inspector (no UUIDs) - object names (loaded from chat history) in nearby chat are no longer SLURLed (no UUIDs for them) --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5e8d5a63d0..45c2d26fde 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -209,6 +209,8 @@ public: void showInspector() { + if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return; + if (mSourceType == CHAT_SOURCE_OBJECT) { LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", mAvatarID)); @@ -279,6 +281,9 @@ public: break; case CHAT_SOURCE_SYSTEM: icon->setValue(LLSD("SL_Logo")); + break; + case CHAT_SOURCE_UNKNOWN: + icon->setValue(LLSD("Unknown_Icon")); } } @@ -325,9 +330,9 @@ protected: { if(mSourceType == CHAT_SOURCE_SYSTEM) showSystemContextMenu(x,y); - if(mSourceType == CHAT_SOURCE_AGENT) + if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_AGENT) showAvatarContextMenu(x,y); - if(mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom) + if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom) showObjectContextMenu(x,y); } @@ -632,7 +637,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (utf8str_trim(chat.mFromName).size() != 0) { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. - if ( chat.mSourceType == CHAT_SOURCE_OBJECT ) + if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); -- cgit v1.2.3