summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychatbar.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-06-01 09:50:56 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-06-01 09:50:56 +0300
commit4a4cdd3775114346c6bc7c7a368d412fd78911d5 (patch)
tree9665c3a9aaedb13dbd38659470a5e8d88482246c /indra/newview/llnearbychatbar.cpp
parent66ddb437f1eb8327ff74a26943400b9911289a15 (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
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r--indra/newview/llnearbychatbar.cpp7
1 files changed, 7 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();