summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-08-21 20:04:13 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-08-21 20:04:13 +0300
commitb93e2f7c84a8e14d7ca6c58c35183216a7fbf5bb (patch)
tree54de16f29c0d4a10287e4821596d91f707955638 /indra/newview
parentf809409de5df3f5ddef24433a4310b18caf3cd8a (diff)
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
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationloglistitem.cpp20
-rw-r--r--indra/newview/llconversationloglistitem.h2
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();