diff options
-rw-r--r-- | indra/newview/llnearbychatbar.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llnearbychatbar.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 680ed35fa2..46f531fdd9 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -34,6 +34,7 @@ #include "message.h" +#include "llappviewer.h" #include "llfloaterreg.h" #include "lltrans.h" @@ -388,6 +389,7 @@ BOOL LLNearbyChatBar::postBuild() mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); + mChatBox->setFocusReceivedCallback(boost::bind(&LLNearbyChatBar::onChatBoxFocusReceived, this)); mChatBox->setIgnoreArrowKeys( FALSE ); mChatBox->setCommitOnFocusLost( FALSE ); @@ -545,6 +547,11 @@ void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userd gAgent.stopTyping(); } +void LLNearbyChatBar::onChatBoxFocusReceived() +{ + mChatBox->setEnabled(!gDisconnected); +} + EChatType LLNearbyChatBar::processChatTypeTriggers(EChatType type, std::string &str) { U32 length = str.length(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 5af3152662..83c174fd10 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -122,6 +122,7 @@ protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata); + void onChatBoxFocusReceived(); void sendChat( EChatType type ); void onChatBoxCommit(); |