Complete fix for FIRE-5002: Pressing "/" now always starts chat
parent
a029582b54
commit
deae6d3a89
|
|
@ -487,3 +487,22 @@ BOOL LLNearbyChat::chatIsEmpty() const
|
|||
// return FALSE for unfocused chat editor, so other UI elements can claim arrow keys
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LLNearbyChat::startChatInDefaultChatBar(const char* line)
|
||||
{
|
||||
showDefaultChatBar(TRUE);
|
||||
setFocusedInputEditor(mDefaultChatBar, TRUE);
|
||||
|
||||
if (line)
|
||||
{
|
||||
std::string line_string(line);
|
||||
mFocusedInputEditor->setText(line_string);
|
||||
}
|
||||
|
||||
mFocusedInputEditor->setCursorToEnd();
|
||||
}
|
||||
|
||||
std::string LLNearbyChat::getCurrentChatInDefaultCharBar()
|
||||
{
|
||||
return mDefaultChatBar ? mDefaultChatBar->getText() : LLStringUtil::null;
|
||||
}
|
||||
|
|
@ -62,6 +62,9 @@ public:
|
|||
|
||||
BOOL chatIsEmpty() const;
|
||||
|
||||
void startChatInDefaultChatBar(const char* line);
|
||||
std::string getCurrentChatInDefaultCharBar();
|
||||
|
||||
LLNearbyChatControl* mFocusedInputEditor;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -577,19 +577,29 @@ void start_gesture( EKeystate s )
|
|||
if (KEYSTATE_UP == s &&
|
||||
! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))
|
||||
{
|
||||
// <FS:Zi> Remove floating chat bar
|
||||
// TODO: This needs the new bottom chat bar to work at all
|
||||
/* if (LLNearbyChat::getInstance()->getCurrentChat().empty())
|
||||
// <FS:Ansariel> Changed for new chatbar
|
||||
//if (LLNearbyChat::getInstance()->getCurrentChat().empty())
|
||||
//{
|
||||
// // No existing chat in chat editor, insert '/'
|
||||
// LLNearbyChat::startChat("/");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// // Don't overwrite existing text in chat editor
|
||||
// LLNearbyChat::startChat(NULL);
|
||||
//}
|
||||
|
||||
if (LLNearbyChat::instance().getCurrentChatInDefaultCharBar().empty())
|
||||
{
|
||||
// No existing chat in chat editor, insert '/'
|
||||
LLNearbyChat::startChat("/");
|
||||
LLNearbyChat::instance().startChatInDefaultChatBar("/");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Don't overwrite existing text in chat editor
|
||||
LLNearbyChat::startChat(NULL);
|
||||
}*/
|
||||
// </FS:Zi>
|
||||
LLNearbyChat::instance().startChatInDefaultChatBar(NULL);
|
||||
}
|
||||
// </FS:Ansarieö>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue