summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloaterimnearbychat.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index b287950c21..ebc6579546 100644..100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -264,7 +264,7 @@ void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD&
if(!isTornOff() && matchesKey(key))
{
- LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false);
+ LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, take_focus);
}
}
@@ -283,6 +283,11 @@ void LLFloaterIMNearbyChat::onTearOffClicked()
void LLFloaterIMNearbyChat::onOpen(const LLSD& key)
{
LLFloaterIMSessionTab::onOpen(key);
+ if(!isMessagePaneExpanded())
+ {
+ restoreFloater();
+ onCollapseToLine(this);
+ }
showTranslationCheckbox(LLTranslate::isTranslationConfigured());
}
@@ -322,11 +327,8 @@ void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp)
void LLFloaterIMNearbyChat::show()
{
- if (isChatMultiTab())
- {
openFloater(getKey());
}
-}
bool LLFloaterIMNearbyChat::isChatVisible() const
{
@@ -480,11 +482,14 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke()
if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str))
{
std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
- mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
+ if (!rest_of_match.empty())
+ {
+ mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
- // Select to end of line, starting from the character
- // after the last one the user typed.
- mInputEditor->selectNext(rest_of_match, false);
+ // Select to end of line, starting from the character
+ // after the last one the user typed.
+ mInputEditor->selectNext(rest_of_match, false);
+ }
}
else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str))
{
@@ -577,7 +582,7 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
if (!utf8_revised_text.empty())
{
// Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
+ sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
}
}
@@ -741,15 +746,14 @@ void LLFloaterIMNearbyChat::startChat(const char* line)
{
if(!nearby_chat->isTornOff())
{
- nearby_chat->show();
+ LLFloaterIMContainer::getInstance()->selectConversation(LLUUID(NULL));
}
if(nearby_chat->isMinimized())
{
nearby_chat->setMinimized(false);
}
- nearby_chat->setVisible(TRUE);
+ nearby_chat->show();
nearby_chat->setFocus(TRUE);
- nearby_chat->mInputEditor->setFocus(TRUE);
if (line)
{