summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpersonmodelcommon.cpp13
-rw-r--r--indra/newview/llpersonmodelcommon.h6
-rw-r--r--indra/newview/llpersontabview.cpp10
4 files changed, 25 insertions, 6 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 609284cdd5..4c044c2471 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1698,7 +1698,7 @@ void LLPanelPeople::addParticipantToModel(LLPersonTabModel * person_folder_model
{
LLPersonModel* person_model = NULL;
- person_model = new LLPersonModel(name, mPersonFolderViewModel);
+ person_model = new LLPersonModel(agent_id, name, mPersonFolderViewModel);
person_folder_model->addParticipant(person_model);
}
diff --git a/indra/newview/llpersonmodelcommon.cpp b/indra/newview/llpersonmodelcommon.cpp
index 4e54562f18..91c3f6a92a 100644
--- a/indra/newview/llpersonmodelcommon.cpp
+++ b/indra/newview/llpersonmodelcommon.cpp
@@ -148,14 +148,21 @@ LLPersonModel* LLPersonTabModel::findParticipant(const LLUUID& person_id)
// LLPersonModel
//
-LLPersonModel::LLPersonModel(std::string display_name, LLFolderViewModelInterface& root_view_model) :
-LLPersonModelCommon(display_name,root_view_model)
+LLPersonModel::LLPersonModel(const LLUUID& agent_id, const std::string display_name, LLFolderViewModelInterface& root_view_model) :
+LLPersonModelCommon(display_name,root_view_model),
+mAgentID(agent_id)
{
}
LLPersonModel::LLPersonModel(LLFolderViewModelInterface& root_view_model) :
-LLPersonModelCommon(root_view_model)
+LLPersonModelCommon(root_view_model),
+mAgentID(LLUUID(NULL))
+{
+}
+
+LLUUID LLPersonModel::getAgentID()
{
+ return mAgentID;
}
//
diff --git a/indra/newview/llpersonmodelcommon.h b/indra/newview/llpersonmodelcommon.h
index bdbee002e6..4030cd11df 100644
--- a/indra/newview/llpersonmodelcommon.h
+++ b/indra/newview/llpersonmodelcommon.h
@@ -120,11 +120,13 @@ private:
class LLPersonModel : public LLPersonModelCommon
{
public:
- LLPersonModel(std::string display_name, LLFolderViewModelInterface& root_view_model);
+ LLPersonModel(const LLUUID& agent_id, const std::string display_name, LLFolderViewModelInterface& root_view_model);
LLPersonModel(LLFolderViewModelInterface& root_view_model);
-private:
+ LLUUID getAgentID();
+private:
+ LLUUID mAgentID;
};
// Filtering functional object
diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp
index 2bc436226d..a0d6b40d08 100644
--- a/indra/newview/llpersontabview.cpp
+++ b/indra/newview/llpersontabview.cpp
@@ -29,6 +29,10 @@
#include "llpersontabview.h"
+#include "llavataractions.h"
+#include "llfloaterreg.h"
+#include "llpersonmodelcommon.h"
+
static LLDefaultChildRegistry::Register<LLPersonTabView> r_person_tab_view("person_tab_view");
const LLColor4U DEFAULT_WHITE(255, 255, 255);
@@ -174,6 +178,12 @@ BOOL LLPersonView::postBuild()
initChildVec();
updateChildren();
+
+ LLPersonModel * person_model = static_cast<LLPersonModel *>(getViewModelItem());
+
+ mInfoBtn->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", person_model->getAgentID()), FALSE));
+ mProfileBtn->setClickedCallback(boost::bind(&LLAvatarActions::showProfile, person_model->getAgentID()));
+
return LLFolderViewItem::postBuild();
}