diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-03 11:57:59 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-03 11:57:59 -0700 |
commit | 1b6d6b7e794ad4401faa91a79774922a5baec968 (patch) | |
tree | 2a5ae9354c55d3dd096147286c1868a03d599a53 /indra/newview | |
parent | 701facaac4bd4dde76427fac014da6d1e1641c2a (diff) |
ACME-323 Create a tab for 'Invite people you know to SL': FBC Test Two tabs are now named to match UX spec. Also created a function called createPersonTabs() which simplifies tab creation. The LLPersonFolderView is being turned into the tab manager.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llpersonfolderview.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llpersonfolderview.h | 4 |
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); |