summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-02-25 17:40:40 +0200
committerIgor Borovkov <iborovkov@productengine.com>2010-02-25 17:40:40 +0200
commit55f1a96dbf59b0bf1d0d87f358392f31b24741bf (patch)
tree2d10fd3405115258800d98fa5254f07b2d90d9ad /indra/newview
parentbf25f3fd00c836a1ac3e6d160aa3d97634da084f (diff)
fixed EXT-5731 Viewer 2: New chat format doesn't recognise scripted object name changes
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp1
-rw-r--r--indra/newview/llchatitemscontainerctrl.h3
-rw-r--r--indra/newview/llnearbychathandler.cpp3
3 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index e164aa8fc4..81edb55f93 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -144,6 +144,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
std::string messageText = notification["message"].asString(); // UTF-8 line of text
std::string fromName = notification["from"].asString(); // agent or object name
mFromID = notification["from_id"].asUUID(); // agent id or object id
+ mFromName = fromName;
int sType = notification["source"].asInteger();
mSourceType = (EChatSourceType)sType;
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index 4d730573d9..b28c9dbc4b 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -60,6 +60,7 @@ public:
static LLNearbyChatToastPanel* createInstance();
const LLUUID& getFromID() const { return mFromID;}
+ const std::string& getFromName() const { return mFromName; }
//void addText (const std::string& message , const LLStyle::Params& input_params = LLStyle::Params());
//void setMessage (const LLChat& msg);
@@ -84,9 +85,11 @@ public:
virtual void draw();
+ //*TODO REMOVE, why a dup of getFromID?
const LLUUID& messageID() const { return mFromID;}
private:
LLUUID mFromID; // agent id or object id
+ std::string mFromName;
EChatSourceType mSourceType;
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index a211adc79d..08ae93c3a6 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -176,10 +176,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
if(m_active_toasts.size())
{
LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id
+ std::string from = notification["from"].asString();
LLToast* toast = m_active_toasts[0];
LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel());
- if(panel && panel->messageID() == fromID && panel->canAddText())
+ if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText())
{
panel->addMessage(notification);
toast->reshapeToPanel();