diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-14 09:48:07 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-14 09:48:07 -0800 |
commit | 1a5e2be99c7b186135fdc541e9df71f337378397 (patch) | |
tree | 7becd7cb0e3753b9e52027763d79e496fc7df05a /indra/newview/llnearbychathandler.cpp | |
parent | e1105245371e7c34c1be7a772906d3c2f6ca258d (diff) | |
parent | ab935fbeee57b32f68503395d71d9366e65db73b (diff) |
Merge from PE.
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 9e13a626b4..96442fafcc 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -180,6 +180,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) if(panel && panel->messageID() == fromID && panel->canAddText()) { + if (CHAT_STYLE_IRC == notification["chat_style"].asInteger()) + { + notification["message"] = notification["from"].asString() + notification["message"].asString(); + } + panel->addMessage(notification); toast->reshapeToPanel(); toast->resetTimer(); @@ -302,7 +307,6 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i channel->setCreatePanelCallback(callback); mChannel = LLChannelManager::getInstance()->addChannel(channel); - mChannel->setOverflowFormatString("You have %d unread nearby chat messages"); } LLNearbyChatHandler::~LLNearbyChatHandler() @@ -332,25 +336,22 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) LLChat& tmp_chat = const_cast<LLChat&>(chat_msg); - if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) - { - if(!tmp_chat.mFromName.empty()) - tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); - else - tmp_chat.mText = tmp_chat.mText.substr(3); - } - + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); { //sometimes its usefull to have no name at all... //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } - - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); nearby_chat->addMessage(chat_msg); if(nearby_chat->getVisible()) return;//no need in toast if chat is visible - + + // Handle irc styled messages for toast panel + if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) + { + tmp_chat.mText = tmp_chat.mText.substr(3); + } + // arrange a channel on a screen if(!mChannel->getVisible()) { |