summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-24 10:33:14 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-24 10:33:14 -0800
commit5ba0c01ae879215a703ce6e68bbf4f7bd8dd8207 (patch)
treebaf6070a52a8649706b055c360868c9ce14c1c59 /indra/newview/llchathistory.cpp
parent469af6771d757dd951daaed3e2b1d59ee2127c0e (diff)
parent6575b685e91d334198789c88dec2efab7e5a1ac9 (diff)
merge with viewer 2 (fix windows build)
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, "");