diff options
-rw-r--r-- | indra/newview/llconversationloglistitem.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llconversationloglistitem.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index fc2e757864..9f7c588989 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -31,9 +31,11 @@ #include "lltextutil.h" // newview +#include "llavataractions.h" #include "llavatariconctrl.h" #include "llconversationlog.h" #include "llconversationloglistitem.h" +#include "llgroupactions.h" #include "llgroupiconctrl.h" #include "llinventoryicon.h" @@ -74,6 +76,7 @@ BOOL LLConversationLogListItem::postBuild() mConversationDate->setValue(mConversation->getTimestamp()); getChild<LLButton>("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this)); + setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this)); return TRUE; } @@ -155,3 +158,20 @@ void LLConversationLogListItem::highlightNameDate(const std::string& highlited_t LLTextUtil::textboxSetHighlightedVal(mConversationName, params, mConversation->getConversationName(), highlited_text); LLTextUtil::textboxSetHighlightedVal(mConversationDate, params, mConversation->getTimestamp(), highlited_text); } + +void LLConversationLogListItem::onDoubleClick() +{ + switch (mConversation->getConversationType()) + { + case LLIMModel::LLIMSession::P2P_SESSION: + LLAvatarActions::startIM(mConversation->getParticipantID()); + break; + + case LLIMModel::LLIMSession::GROUP_SESSION: + LLGroupActions::startIM(mConversation->getParticipantID()); + break; + + default: + break; + } +} diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h index deba7d4563..8943e11604 100644 --- a/indra/newview/llconversationloglistitem.h +++ b/indra/newview/llconversationloglistitem.h @@ -62,6 +62,8 @@ public: void highlightNameDate(const std::string& highlited_text); + void onDoubleClick(); + private: void initIcons(); |