summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index b287950c21..49f36a2f32 100644
--- 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,10 +327,7 @@ 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))
{
@@ -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)
{