diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-06-01 09:50:56 +0300 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-06-01 09:50:56 +0300 |
commit | 4a4cdd3775114346c6bc7c7a368d412fd78911d5 (patch) | |
tree | 9665c3a9aaedb13dbd38659470a5e8d88482246c | |
parent | 66ddb437f1eb8327ff74a26943400b9911289a15 (diff) |
EXT-7268 FIXED Disabled local chat edit field for offline mode.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/454
--HG--
branch : product-engine
-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(); |