diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.h | 2 |
2 files changed, 15 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; diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 68aae0aee5..a3a55303c0 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -74,6 +74,8 @@ class LLParticipantList LLAvatarList* mAvatarList; }; private: + void onAvatarListDoubleClicked(LLAvatarList* list); + LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; |