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.cpp13
1 files changed, 13 insertions, 0 deletions
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;