Skip to content
Snippets Groups Projects
Commit e35becd0 authored by Cho's avatar Cho
Browse files

merge

parents 436bccf5 2ab6a73c
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,10 @@ sDestroyImmediate
#include "llsociallist.h"
#include "llavataractions.h"
#include "llfloaterreg.h"
#include "llavatariconctrl.h"
#include "llavatarnamecache.h"
#include "lloutputmonitorctrl.h"
#include "lltextutil.h"
......@@ -60,7 +63,16 @@ void LLSocialList::refresh()
void LLSocialList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLSocialListItem * item = new LLSocialListItem();
item->setName(name, mNameFilter);
LLAvatarName avatar_name;
bool has_avatar_name = id.notNull() && LLAvatarNameCache::get(id, &avatar_name);
item->mAvatarId = id;
if(id.notNull())
{
item->mIcon->setValue(id);
}
item->setName(has_avatar_name ? avatar_name.mDisplayName + " (" + name + ")" : name, mNameFilter);
addItem(item, id, pos);
}
......@@ -97,6 +109,9 @@ BOOL LLSocialListItem::postBuild()
mInfoBtn->setVisible(false);
mProfileBtn->setVisible(false);
mInfoBtn->setClickedCallback(boost::bind(&LLSocialListItem::onInfoBtnClick, this));
mProfileBtn->setClickedCallback(boost::bind(&LLSocialListItem::onProfileBtnClick, this));
return TRUE;
}
......@@ -128,3 +143,13 @@ void LLSocialListItem::onMouseLeave(S32 x, S32 y, MASK mask)
LLPanel::onMouseLeave(x, y, mask);
}
void LLSocialListItem::onInfoBtnClick()
{
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarId));
}
void LLSocialListItem::onProfileBtnClick()
{
LLAvatarActions::showProfile(mAvatarId);
}
......@@ -77,6 +77,10 @@ class LLSocialListItem : public LLPanel
void setValue(const LLSD& value);
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
void onInfoBtnClick();
void onProfileBtnClick();
LLUUID mAvatarId;
LLTextBox * mLabelTextBox;
std::string mLabel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment