summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloater.cpp31
-rw-r--r--indra/newview/llimfloater.h1
-rw-r--r--indra/newview/llimview.cpp38
-rw-r--r--indra/newview/llimview.h1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
5 files changed, 57 insertions, 16 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 85863ed85b..720cea8b1a 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -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_default_text_label"));
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_default_text_label");
+ mInputEditor->setLabel(label);
+ }
+ }
+ }
+}
+
void LLIMFloater::processSessionUpdate(const LLSD& session_update)
{
// *TODO : verify following code when moderated mode will be implemented
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index f5edb3188a..065441b188 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -90,6 +90,7 @@ public:
void onVisibilityChange(const LLSD& new_visibility);
void processIMTyping(const LLIMInfo* im_info, BOOL typing);
+ void processAgentListUpdates(const LLSD& body);
void processSessionUpdate(const LLSD& session_update);
BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 7e8701bf21..095a18f322 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1848,6 +1848,29 @@ void LLIMMgr::clearPendingInvitation(const LLUUID& session_id)
}
}
+void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body)
+{
+ LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
+ if ( im_floater )
+ {
+ im_floater->processAgentListUpdates(body);
+ }
+ LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id);
+ if (speaker_mgr)
+ {
+ speaker_mgr->updateSpeakers(body);
+ }
+ else
+ {
+ //we don't have a speaker manager yet..something went wrong
+ //we are probably receiving an update here before
+ //a start or an acceptance of an invitation. Race condition.
+ gIMMgr->addPendingAgentListUpdates(
+ session_id,
+ body);
+ }
+}
+
LLSD LLIMMgr::getPendingAgentListUpdates(const LLUUID& session_id)
{
if ( mPendingAgentListUpdates.has(session_id.asString()) )
@@ -2232,20 +2255,7 @@ public:
const LLSD& input) const
{
const LLUUID& session_id = input["body"]["session_id"].asUUID();
- LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id);
- if (speaker_mgr)
- {
- speaker_mgr->updateSpeakers(input["body"]);
- }
- else
- {
- //we don't have a speaker manager yet..something went wrong
- //we are probably receiving an update here before
- //a start or an acceptance of an invitation. Race condition.
- gIMMgr->addPendingAgentListUpdates(
- input["body"]["session_id"].asUUID(),
- input["body"]);
- }
+ gIMMgr->processAgentListUpdates(session_id, input["body"]);
}
};
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index f986d9dcdb..769d49f388 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -315,6 +315,7 @@ public:
void clearPendingInvitation(const LLUUID& session_id);
+ void processAgentListUpdates(const LLUUID& session_id, const LLSD& body);
LLSD getPendingAgentListUpdates(const LLUUID& session_id);
void addPendingAgentListUpdates(
const LLUUID& sessioN_id,
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index ec2673644f..101426ee28 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2845,6 +2845,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Unnamed">(Unnamed)</string>
<string name="IM_moderated_chat_label">(Moderated: Voices off by default)</string>
<string name="IM_unavailable_text_label">Text chat is not available for this call.</string>
+ <string name="IM_muted_text_label">Your text chat has been disabled by a Group Moderator.</string>
+ <string name="IM_default_text_label">Click here to instant message.</string>
<string name="ringing-im">