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
master
Paul ProductEngine 2012-08-21 20:04:13 +03:00
parent f809409de5
commit b93e2f7c84
2 changed files with 22 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -62,6 +62,8 @@ public:
void highlightNameDate(const std::string& highlited_text);
void onDoubleClick();
private:
void initIcons();