diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-04-30 14:03:04 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-04-30 14:03:04 -0700 |
commit | 03239c14e82f4d400cefa8c4b418a6192cc08654 (patch) | |
tree | cfdbb4b0dcb764d8ebc255cd297c8466199d66af | |
parent | 8189c27cfad6f498966dc99dd483df8466330ccd (diff) |
ACME-252 Create AvatarFolderItemView: Now clicking the profile button and info button will show a facebook user's SL profile or info respectively.
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpersonmodelcommon.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llpersonmodelcommon.h | 6 | ||||
-rw-r--r-- | indra/newview/llpersontabview.cpp | 10 |
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(); } |