summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelpeople.cpp25
-rw-r--r--indra/newview/llpersonfolderview.cpp24
-rw-r--r--indra/newview/llpersonfolderview.h4
3 files changed, 28 insertions, 25 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 03135ce580..22b79a9380 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -750,31 +750,6 @@ BOOL LLPanelPeople::postBuild()
scroller->setFollowsAll();
mPersonFolderView->setScrollContainer(scroller);
mPersonFolderView->setFollowsAll();
-
- //Create a person tab
- LLPersonTabModel* item = new LLPersonTabModel("Facebook Friends", mPersonFolderViewModel);
- LLPersonTabView::Params params;
- params.name = item->getDisplayName();
- params.root = mPersonFolderView;
- params.listener = item;
- params.tool_tip = params.name;
- LLPersonTabView * widget = LLUICtrlFactory::create<LLPersonTabView>(params);
- widget->addToFolder(mPersonFolderView);
-
- mPersonFolderView->mPersonFolderModelMap[item->getID()] = item;
- mPersonFolderView->mPersonFolderViewMap[item->getID()] = widget;
-
- //Create a person tab
- item = new LLPersonTabModel("Facebook Friends Tab Two", mPersonFolderViewModel);
- params.name = item->getDisplayName();
- params.root = mPersonFolderView;
- params.listener = item;
- params.tool_tip = params.name;
- widget = LLUICtrlFactory::create<LLPersonTabView>(params);
- widget->addToFolder(mPersonFolderView);
-
- mPersonFolderView->mPersonFolderModelMap[item->getID()] = item;
- mPersonFolderView->mPersonFolderViewMap[item->getID()] = widget;
gIdleCallbacks.addFunction(idle, this);
diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp
index ba1e9d20eb..21578e986b 100644
--- a/indra/newview/llpersonfolderview.cpp
+++ b/indra/newview/llpersonfolderview.cpp
@@ -38,6 +38,8 @@ LLFolderView(p),
mConversationsEventStream("ConversationsEventsTwo")
{
mConversationsEventStream.listen("ConversationsRefresh", boost::bind(&LLPersonFolderView::onConversationModelEvent, this, _1));
+
+ createPersonTabs();
}
LLPersonFolderView::~LLPersonFolderView()
@@ -45,6 +47,28 @@ LLPersonFolderView::~LLPersonFolderView()
mConversationsEventStream.stopListening("ConversationsRefresh");
}
+void LLPersonFolderView::createPersonTabs()
+{
+ createPersonTab("SL residents you may want to friend");
+ createPersonTab("Invite people you know to SL");
+}
+
+void LLPersonFolderView::createPersonTab(const std::string& tab_name)
+{
+ //Create a person tab
+ LLPersonTabModel* item = new LLPersonTabModel(tab_name, *mViewModel);
+ LLPersonTabView::Params params;
+ params.name = item->getDisplayName();
+ params.root = this;
+ params.listener = item;
+ params.tool_tip = params.name;
+ LLPersonTabView * widget = LLUICtrlFactory::create<LLPersonTabView>(params);
+ widget->addToFolder(this);
+
+ mPersonFolderModelMap[item->getID()] = item;
+ mPersonFolderViewMap[item->getID()] = widget;
+}
+
BOOL LLPersonFolderView::handleMouseDown( S32 x, S32 y, MASK mask )
{
LLFolderViewItem * item = getCurSelectedItem();
diff --git a/indra/newview/llpersonfolderview.h b/indra/newview/llpersonfolderview.h
index 74e9142a7c..1cf597b8c9 100644
--- a/indra/newview/llpersonfolderview.h
+++ b/indra/newview/llpersonfolderview.h
@@ -50,6 +50,10 @@ public:
LLPersonFolderView(const Params &p);
~LLPersonFolderView();
+
+ void createPersonTabs();
+ void createPersonTab(const std::string& tab_name);
+
bool onConversationModelEvent(const LLSD &event);
LLPersonView * createConversationViewParticipant(LLPersonModel * item);