summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r--indra/newview/llparticipantlist.cpp35
1 files changed, 24 insertions, 11 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index fb1153980a..59d26edff2 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -32,6 +32,7 @@
#include "llagent.h"
#include "llimview.h"
+#include "llpanelpeoplemenus.h"
#include "llnotificationsutil.h"
#include "llparticipantlist.h"
#include "llspeakers.h"
@@ -197,10 +198,10 @@ private:
uuid_set_t mAvalineCallers;
};
-LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source,
+LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source,
LLAvatarList* avatar_list,
bool use_context_menu/* = true*/,
- bool exclude_agent /*= true*/,
+ bool exclude_agent /*= true*/,
bool can_toggle_icons /*= true*/) :
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
@@ -233,8 +234,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source,
if (use_context_menu)
{
- mParticipantListMenu = new LLParticipantListMenu(*this);
- mAvatarList->setContextMenu(mParticipantListMenu);
+ //mParticipantListMenu = new LLParticipantListMenu(*this);
+ //mAvatarList->setContextMenu(mParticipantListMenu);
+ mAvatarList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
}
else
{
@@ -390,7 +392,10 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
{
const LLPointer<LLSpeaker>& speakerp = *it;
- update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice);
+ if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
+ {
+ update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice);
+ }
}
}
}
@@ -466,17 +471,24 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c
mValidateSpeakerCallback = cb;
}
-void LLParticipantList::updateRecentSpeakersOrder()
+void LLParticipantList::update()
{
- if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder())
+ mSpeakerMgr->update(true);
+
+ if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered())
{
- // Need to update speakers to sort list correctly
- mSpeakerMgr->update(true);
// Resort avatar list
sort();
}
}
+bool LLParticipantList::isHovered()
+{
+ S32 x, y;
+ LLUI::getMousePositionScreen(&x, &y);
+ return mAvatarList->calcScreenRect().pointInRect(x, y);
+}
+
bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
LLUUID uu_id = event->getValue().asUUID();
@@ -660,7 +672,7 @@ bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::
return mParent.onSpeakerMuteEvent(event, userdata);
}
-LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
+/*LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
{
// set up the callbacks for all of the avatar menu items
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -698,7 +710,7 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
main_menu->arrangeAndClear();
return main_menu;
-}
+}*/
void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
{
@@ -753,6 +765,7 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata,
LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id);
if (speakerp.isNull())
{
+ LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << llendl;
return;
}
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id));