summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavatarlist.cpp6
-rw-r--r--indra/newview/llcallfloater.cpp2
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp3
-rw-r--r--indra/newview/llparticipantlist.cpp8
-rw-r--r--indra/newview/llparticipantlist.h2
-rw-r--r--indra/newview/llspeakers.cpp2
6 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 71b23e1383..5865df3e26 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -33,7 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llavatarlist.h"
-#include "llagent.h" // for comparator
+#include "llagentdata.h" // for comparator
// newview
#include "llcallingcard.h" // for LLAvatarTracker
@@ -425,11 +425,11 @@ bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_
{
//keep agent on top, if first is agent,
//then we need to return true to elevate this id, otherwise false.
- if(avatar_item1->getAvatarId() == gAgent.getID())
+ if(avatar_item1->getAvatarId() == gAgentID)
{
return true;
}
- else if (avatar_item2->getAvatarId() == gAgent.getID())
+ else if (avatar_item2->getAvatarId() == gAgentID)
{
return false;
}
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 20739d2401..7ca49928da 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -280,7 +280,7 @@ void LLCallFloater::refreshPartisipantList()
if (!non_avatar_caller)
{
- mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList);
+ mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT);
if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager)
{
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 70e4798079..ae1c28c7ab 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -282,8 +282,9 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id)
mGroupID = LLIMModel::getInstance()->getOtherParticipantID(session_id);
+ // for group and Ad-hoc chat we need to include agent into list
if(!mParticipantList)
- mParticipantList = new LLParticipantList(mSpeakerManager, getChild<LLAvatarList>("speakers_list"));
+ mParticipantList = new LLParticipantList(mSpeakerManager, getChild<LLAvatarList>("speakers_list"), true,false);
}
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index afb9892d12..e8aa1e9831 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -51,12 +51,13 @@
static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR;
-LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/):
+LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/,
+ bool exclude_agent /*= true*/):
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
mSortOrder(E_SORT_BY_NAME)
, mParticipantListMenu(NULL)
-, mExcludeAgent(true)
+, mExcludeAgent(exclude_agent)
{
mSpeakerAddListener = new SpeakerAddListener(*this);
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
@@ -101,7 +102,6 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
}
}
// we need to exclude agent id for non group chat
- mExcludeAgent = !gAgent.isInGroup(mSpeakerMgr->getSessionID());
mAvatarList->setDirty(true);
sort();
}
@@ -555,7 +555,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co
bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
- if (item == "can_mute_text")
+ if (item == "can_mute_text" || "can_block" == item)
{
return mUUIDs.front() != gAgentID;
}
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 72c413d188..b85d4c9bc4 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -43,7 +43,7 @@ class LLParticipantList
{
LOG_CLASS(LLParticipantList);
public:
- LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true);
+ LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true);
~LLParticipantList();
void setSpeakingIndicatorsVisible(BOOL visible);
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 3861a96355..91b417c61f 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -630,8 +630,6 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
{
- if (gAgentID == avatar_id) return; // do not process myself
-
LLPointer<LLSpeaker> speakerp = findSpeaker(avatar_id);
if (!speakerp) return;