diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-11-15 15:13:11 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-11-15 15:13:11 +0000 |
commit | 65550520ed00699098b221a1166e4c1763333d58 (patch) | |
tree | bcd62aa2b6897b0dc424f8ecfadc2550d417ec4a /indra/newview/llpanelpeople.cpp | |
parent | 7df0a4ddd0c48358e7152733aaba01464f2620be (diff) |
SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits.
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d138433ed8..0a41018293 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -47,6 +47,7 @@ #include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llavataractions.h" #include "llavatarlist.h" #include "llavatarlistitem.h" @@ -85,11 +86,10 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +// FIXME PREMIUM - these should come from package info, once viewer is receiving it all. const S32 BASE_MAX_AGENT_GROUPS = 42; const S32 PREMIUM_MAX_AGENT_GROUPS = 60; -extern S32 gMaxAgentGroups; - /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -629,7 +629,7 @@ BOOL LLPanelPeople::postBuild() getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(gMaxAgentGroups < max_premium) + if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) { getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo")); getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -877,9 +877,10 @@ void LLPanelPeople::updateButtons() groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected U32 groups_count = gAgent.mGroups.size(); - U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0; + S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0; groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); - groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining)); + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining)); } else { @@ -1092,6 +1093,7 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) } } +// FIXME PREMIUM this should be coming from LLAgentBenefits info about the various packages. void LLPanelPeople::onGroupLimitInfo() { LLSD args; |