summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-23 19:27:02 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-23 19:27:02 -0700
commitc837f5eccbb298378ec84907da63fa35f91681c3 (patch)
tree18738d466aabddbec4a363d39b1999fdeda9ec30 /indra/newview/llviewerwindow.cpp
parent105b15436d37149f6df71866125871448ee4fbcb (diff)
parent2ecf4fb30779796909702c8cf4b250bc74af1ded (diff)
EXP-1027 : pull from viewer-experience-fui
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c651e86606..947f0ec184 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2462,7 +2462,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Traverses up the hierarchy
if( keyboard_focus )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChatBar>("chat_bar");
+
+ if (nearby_chat)
+ {
+ LLLineEditor* chat_editor = nearby_chat->getChatBox();
+
// arrow keys move avatar while chatting hack
if (chat_editor && chat_editor->hasFocus())
{
@@ -2493,7 +2498,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
}
}
-
+ }
if (keyboard_focus->handleKey(key, mask, FALSE))
{
return TRUE;
@@ -2524,11 +2529,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar")->getChatBox();
if (chat_editor)
{
// passing NULL here, character will be added later when it is handled by character handler.
- LLBottomTray::getInstance()->getNearbyChatBar()->startChat(NULL);
+ LLNearbyChatBar::getInstance()->startChat(NULL);
return TRUE;
}
}