summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychat.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-11-08 12:38:09 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-11-08 12:38:09 -0800
commita312498260c05cedd6fc6ecb60f5f74d6b72be46 (patch)
tree48f9de6ec835162fc9fe664647d1dfb96e6ca122 /indra/newview/llnearbychat.cpp
parentc4eaaa3d6a08330863119d550d365315ba7526bb (diff)
parentb8a229032efe7c170bfd32e0d31b8b29aac82eec (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r--indra/newview/llnearbychat.cpp40
1 files changed, 27 insertions, 13 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index d1c7c6bfd7..dbdf460785 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -195,8 +195,13 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask)
//background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change.
if(mChatHistory)
+ {
mChatHistory->setFocus(TRUE);
- return LLPanel::handleMouseDown(x, y, mask);
+ }
+
+ BOOL handled = LLPanel::handleMouseDown(x, y, mask);
+ setFocus(handled);
+ return handled;
}
void LLNearbyChat::reloadMessages()
@@ -270,17 +275,6 @@ void LLNearbyChat::removeScreenChat()
}
}
-void LLNearbyChat::setFocus(BOOL focusFlag)
-{
- LLTransientDockableFloater::setFocus(focusFlag);
-
- //Redirect focus to input editor
- if (focusFlag)
- {
- mInputEditor->setFocus(TRUE);
- }
-
-}
void LLNearbyChat::setVisible(BOOL visible)
{
@@ -293,7 +287,7 @@ void LLNearbyChat::setVisible(BOOL visible)
setFocus(visible);
}
-
+// virtual
void LLNearbyChat::onTearOffClicked()
{
LLIMConversation::onTearOffClicked();
@@ -311,6 +305,26 @@ void LLNearbyChat::onOpen(const LLSD& key)
showTranslationCheckbox(LLTranslate::isTranslationConfigured());
}
+// virtual
+void LLNearbyChat::onClose(bool app_quitting)
+{
+ // Override LLIMConversation::onClose() so that Nearby Chat is not removed from the conversation floater
+}
+
+// virtual
+void LLNearbyChat::onClickCloseBtn()
+{
+ if (!isTornOff())
+ return;
+ onTearOffClicked();
+
+ LLIMFloaterContainer *im_box = LLIMFloaterContainer::findInstance();
+ if (im_box)
+ {
+ im_box->onNearbyChatClosed();
+ }
+}
+
void LLNearbyChat::onChatFontChange(LLFontGL* fontp)
{
// Update things with the new font whohoo