From 37742cbbf242abcd9f70a8a179ec740e6867e121 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Tue, 3 Nov 2009 14:35:00 +0200 Subject: Added double click avatar list item callback showing new IM session --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llparticipantlist.cpp') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 918c7989ed..133f13aab8 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -34,6 +34,8 @@ // common includes #include "lltrans.h" +#include "llavataractions.h" +#include "llagent.h" #include "llparticipantlist.h" #include "llavatarlist.h" @@ -53,6 +55,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mSpeakerMgr->addListener(mSpeakerClearListener, "clear"); mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); //Lets fill avatarList with existing speakers LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); @@ -67,6 +70,16 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->sortByName(); } +void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list) +{ + LLUUID clicked_id = list->getSelectedUUID(); + + if (clicked_id.isNull() || clicked_id == gAgent.getID()) + return; + + LLAvatarActions::startIM(clicked_id); +} + LLParticipantList::~LLParticipantList() { delete mSpeakerAddListener; -- cgit v1.2.3