summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-02-24 17:18:05 +0200
committerIgor Borovkov <iborovkov@productengine.com>2010-02-24 17:18:05 +0200
commit6575b685e91d334198789c88dec2efab7e5a1ac9 (patch)
treee2e2532ebb95682dca1c061421d24360941da2a3 /indra/newview/llchathistory.cpp
parentdf29381dc0027fd1e33cc68b2c0b22e85ad622ad (diff)
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
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp11
1 files changed, 8 insertions, 3 deletions
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, "");