summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-11-06 18:13:38 -0800
committerSteve Bennetts <steve@lindenlab.com>2009-11-06 18:13:38 -0800
commit86314438477815eeac17de17799a5e0c0b7d874e (patch)
tree139f80ec0c6f12538b115677be890a816b60c98e /indra/newview/llimfloater.cpp
parent5e85642650d4ffa822b749c5a4a211531545d660 (diff)
parent9c55ff93903d19b22dec63a6db26e9ec3436fbf5 (diff)
merge changes from product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 85863ed85b..a634a1b0fd 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -115,7 +115,7 @@ void LLIMFloater::onClose(bool app_quitting)
/* static */
void LLIMFloater::newIMCallback(const LLSD& data){
- if (data["num_unread"].asInteger() > 0)
+ if (data["num_unread"].asInteger() > 0 || data["from_id"].asUUID().isNull())
{
LLUUID session_id = data["session_id"].asUUID();
@@ -235,7 +235,7 @@ BOOL LLIMFloater::postBuild()
std::string session_name(LLIMModel::instance().getName(mSessionID));
- mInputEditor->setLabel(mInputEditor->getLabel() + " " + session_name);
+ mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + session_name);
LLStringUtil::toUpper(session_name);
setTitle(session_name);
@@ -498,7 +498,8 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void*
// Allow enabling the LLIMFloater input editor only if session can accept text
LLIMModel::LLIMSession* im_session =
LLIMModel::instance().findIMSession(self->mSessionID);
- if( im_session && im_session->mTextIMPossible )
+ //TODO: While disabled lllineeditor can receive focus we need to check if it is enabled (EK)
+ if( im_session && im_session->mTextIMPossible && !self->mInputEditor->getEnabled())
{
//in disconnected state IM input editor should be disabled
self->mInputEditor->setEnabled(!gDisconnected);
@@ -588,6 +589,32 @@ void LLIMFloater::processIMTyping(const LLIMInfo* im_info, BOOL typing)
}
}
+void LLIMFloater::processAgentListUpdates(const LLSD& body)
+{
+ if ( !body.isMap() ) return;
+
+ if ( body.has("agent_updates") && body["agent_updates"].isMap() )
+ {
+ LLSD agent_data = body["agent_updates"].get(gAgentID.asString());
+ if (agent_data.isMap() && agent_data.has("info"))
+ {
+ LLSD agent_info = agent_data["info"];
+
+ if (agent_info.has("mutes"))
+ {
+ BOOL moderator_muted_text = agent_info["mutes"]["text"].asBoolean();
+ mInputEditor->setEnabled(!moderator_muted_text);
+ std::string label;
+ if (moderator_muted_text)
+ label = LLTrans::getString("IM_muted_text_label");
+ else
+ label = LLTrans::getString("IM_to_label") + " " + LLIMModel::instance().getName(mSessionID);
+ mInputEditor->setLabel(label);
+ }
+ }
+ }
+}
+
void LLIMFloater::processSessionUpdate(const LLSD& session_update)
{
// *TODO : verify following code when moderated mode will be implemented