summaryrefslogtreecommitdiff
path: root/indra/newview/llpersonfolderview.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-05-06 14:22:46 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-05-06 14:22:46 -0700
commitc451672ee7e3bc8229a3e5cba544c93495147024 (patch)
treeba56f1ad1c5a0cb7d8269d0a315df186158a93e7 /indra/newview/llpersonfolderview.cpp
parentf6ad5819c15b1acca1a8b6498bc56adf1c0c3ac9 (diff)
ACME-338 Hide info button for FB only friends: Upon hover of FB only friends the info button and profile button are hidden.
Diffstat (limited to 'indra/newview/llpersonfolderview.cpp')
-rw-r--r--indra/newview/llpersonfolderview.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp
index 191c7d5bcd..c22e4f3e58 100644
--- a/indra/newview/llpersonfolderview.cpp
+++ b/indra/newview/llpersonfolderview.cpp
@@ -30,7 +30,6 @@
#include "llpersonfolderview.h"
#include "llpersontabview.h"
-#include "llpersonmodelcommon.h"
LLPersonFolderView::LLPersonFolderView(const Params &p) :
@@ -76,14 +75,14 @@ BOOL LLPersonFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
void LLPersonFolderView::createPersonTabs()
{
- createPersonTab("SL residents you may want to friend");
- createPersonTab("Invite people you know to SL");
+ createPersonTab(LLPersonTabModel::FB_SL_NON_SL_FRIEND, "SL residents you may want to friend");
+ createPersonTab(LLPersonTabModel::FB_ONLY_FRIEND, "Invite people you know to SL");
}
-void LLPersonFolderView::createPersonTab(const std::string& tab_name)
+void LLPersonFolderView::createPersonTab(LLPersonTabModel::tab_type tab_type, const std::string& tab_name)
{
//Create a person tab
- LLPersonTabModel* item = new LLPersonTabModel(tab_name, *mViewModel);
+ LLPersonTabModel* item = new LLPersonTabModel(tab_type, tab_name, *mViewModel);
LLPersonTabView::Params params;
params.name = item->getDisplayName();
params.root = this;
@@ -92,7 +91,7 @@ void LLPersonFolderView::createPersonTab(const std::string& tab_name)
LLPersonTabView * widget = LLUICtrlFactory::create<LLPersonTabView>(params);
widget->addToFolder(this);
- mIndexToFolderVec.push_back(item->getID());
+ mIndexToFolderMap[tab_type] = item->getID();
mPersonFolderModelMap[item->getID()] = item;
mPersonFolderViewMap[item->getID()] = widget;
}
@@ -138,12 +137,12 @@ LLPersonView * LLPersonFolderView::createConversationViewParticipant(LLPersonMod
return LLUICtrlFactory::create<LLPersonView>(params);
}
-LLPersonTabModel * LLPersonFolderView::getPersonTabModelByIndex(const S32 index)
+LLPersonTabModel * LLPersonFolderView::getPersonTabModelByIndex(LLPersonTabModel::tab_type tab_type)
{
- return mPersonFolderModelMap[mIndexToFolderVec[index]];
+ return mPersonFolderModelMap[mIndexToFolderMap[tab_type]];
}
-LLPersonTabView * LLPersonFolderView::getPersonTabViewByIndex(const S32 index)
+LLPersonTabView * LLPersonFolderView::getPersonTabViewByIndex(LLPersonTabModel::tab_type tab_type)
{
- return mPersonFolderViewMap[mIndexToFolderVec[index]];
+ return mPersonFolderViewMap[mIndexToFolderMap[tab_type]];
}