summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
commita65188d85f75e848d224bd335a00ed8aa51f945e (patch)
treef43b390cba45d047fc0fa31659f6969f62b925d1 /indra/newview/llparticipantlist.cpp
parent1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (diff)
parent5ca943cd0279d35ffdf584fa0de3b795645f276c (diff)
Merge from viewer2. Minor conflict resolved.
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r--indra/newview/llparticipantlist.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b6f78d08f1..b049f914ad 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -70,7 +70,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator");
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
- mAvatarListDoubleClickConnection = mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
+ mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1));
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2));
// Set onAvatarListDoubleClicked as default on_return action.
mAvatarListReturnConnection = mAvatarList->setReturnCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
@@ -132,10 +132,15 @@ void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
mAvatarList->setSpeakingIndicatorsVisible(visible);
};
-void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list)
+void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
- // NOTE(EM): Should we check if there is multiple selection and start conference if it is so?
- LLUUID clicked_id = list->getSelectedUUID();
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
+ if(!item)
+ {
+ return;
+ }
+
+ LLUUID clicked_id = item->getAvatarId();
if (clicked_id.isNull() || clicked_id == gAgent.getID())
return;
@@ -577,7 +582,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co
bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
- if (item == "can_mute_text" || "can_block" == item)
+ if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item)
{
return mUUIDs.front() != gAgentID;
}