diff options
author | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-03 14:35:00 +0200 |
---|---|---|
committer | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-03 14:35:00 +0200 |
commit | 37742cbbf242abcd9f70a8a179ec740e6867e121 (patch) | |
tree | 2ba7f13b2ef82f113082ef5447301f1036de0095 /indra | |
parent | 330a3a460b37f5efa507aa52cddfa2a75d93f319 (diff) |
Added double click avatar list item callback showing new IM session
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-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; |