From b93e2f7c84a8e14d7ca6c58c35183216a7fbf5bb Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 21 Aug 2012 20:04:13 +0300 Subject: CHUI-297 FIXED (Double clicking line item in conversation log does not start IM with User) - Added callback on double click which initiates IM session with selected conversation log list item --- indra/newview/llconversationloglistitem.cpp | 20 ++++++++++++++++++++ indra/newview/llconversationloglistitem.h | 2 ++ 2 files changed, 22 insertions(+) (limited to 'indra') 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("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(); -- cgit v1.2.3