summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-09-27 15:41:06 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-09-27 15:41:06 -0700
commit0207d7e9e4e5b509b5905256a56ac2138b35cac3 (patch)
tree904c34ad82f59d0515600b7745252036404f81f1 /indra/newview/llnearbychathandler.cpp
parentcb699e3f2d64999e9817d0c4df5b7f9484e8e722 (diff)
EXP-1247 Nearby chat as part of chat floater
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 957b6d5f94..dcf444b048 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -41,6 +41,7 @@
#include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance
#include "llviewerwindow.h"//for screen channel position
+#include "llnearbychatbar.h"
//add LLNearbyChatHandler to LLNotificationsUI namespace
using namespace LLNotificationsUI;
@@ -473,8 +474,9 @@ LLNearbyChatHandler::~LLNearbyChatHandler()
void LLNearbyChatHandler::initChannel()
{
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
- LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box");
+ LLNearbyChatBar* chat_bar = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar", LLSD());
+ LLView* chat_box = chat_bar->getChatBox();
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
S32 channel_right_bound = nearby_chat->getRect().mRight;
mChannel->init(chat_box->getRect().mLeft, channel_right_bound);
}
@@ -502,7 +504,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
tmp_chat.mText = tmp_chat.mText.substr(3);
}
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
+
+ LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
+
{
//sometimes its usefull to have no name at all...
//if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null)