From 7df0a4ddd0c48358e7152733aaba01464f2620be Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 14 Nov 2019 15:01:50 +0000 Subject: SL-10499, SL-10497 - use LLAgentBenefits info --- indra/newview/llpanelpeople.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index be174475e1..d138433ed8 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -612,6 +612,7 @@ void LLPanelPeople::removePicker() BOOL LLPanelPeople::postBuild() { + // FIXME PREMIUM - need to get premium vs. basic info via BaaS S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; if (gAgent.getRegion()) { -- cgit v1.2.3 From 65550520ed00699098b221a1166e4c1763333d58 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 15 Nov 2019 15:13:11 +0000 Subject: SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits. --- indra/newview/llpanelpeople.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') 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("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(gMaxAgentGroups < max_premium) + if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) { getChild("groupcount")->setText(getString("GroupCountWithInfo")); getChild("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("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); - groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining)); + groups_panel->getChild("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; -- cgit v1.2.3 From 4300b204f0fc519d3e2dabc7e1296284e5908611 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Nov 2019 14:03:57 +0000 Subject: SL-10499 - handle package info from benefits service --- indra/newview/llpanelpeople.cpp | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0a41018293..2e991e425d 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -86,10 +86,6 @@ 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; - /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -612,24 +608,14 @@ void LLPanelPeople::removePicker() BOOL LLPanelPeople::postBuild() { - // FIXME PREMIUM - need to get premium vs. basic info via BaaS - S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("MaxAgentGroupsPremium")) - { - max_premium = features["MaxAgentGroupsPremium"].asInteger(); - } - } + S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); getChild("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) + if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium) { getChild("groupcount")->setText(getString("GroupCountWithInfo")); getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -877,7 +863,7 @@ void LLPanelPeople::updateButtons() groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected U32 groups_count = gAgent.mGroups.size(); - S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + S32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit(); U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0; groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining)); @@ -1093,26 +1079,13 @@ 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; - S32 max_basic = BASE_MAX_AGENT_GROUPS; - S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("MaxAgentGroupsBasic")) - { - max_basic = features["MaxAgentGroupsBasic"].asInteger(); - } - if (features.has("MaxAgentGroupsPremium")) - { - max_premium = features["MaxAgentGroupsPremium"].asInteger(); - } - } + S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit(); + S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); + args["MAX_BASIC"] = max_basic; args["MAX_PREMIUM"] = max_premium; -- cgit v1.2.3 From 4acfc99fa608269d06a5a3e45a4c3fdc5e3d06ee Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 22 Nov 2019 18:26:56 +0200 Subject: SL-12317 UI Changes to Group limits --- indra/newview/llpanelpeople.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2e991e425d..3126edc205 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1086,10 +1086,19 @@ void LLPanelPeople::onGroupLimitInfo() S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit(); S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); - args["MAX_BASIC"] = max_basic; - args["MAX_PREMIUM"] = max_premium; + args["MAX_BASIC"] = max_basic; + args["MAX_PREMIUM"] = max_premium; - LLNotificationsUtil::add("GroupLimitInfo", args); + if (LLAgentBenefitsMgr::has("PremiumPlus")) + { + S32 max_premium_plus = LLAgentBenefitsMgr::get("PremiumPlus").getGroupMembershipLimit(); + args["MAX_PREMIUM"] = max_premium_plus; + LLNotificationsUtil::add("GroupLimitInfoPlus", args); + } + else + { + LLNotificationsUtil::add("GroupLimitInfo", args); + } } void LLPanelPeople::onTabSelected(const LLSD& param) -- cgit v1.2.3 From d0abb6e1e091e89186df1d1fe6c8256f0bac497c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 26 Nov 2019 17:15:42 +0000 Subject: SL-12100, SL-12317 - benefits handling fixes --- indra/newview/llpanelpeople.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanelpeople.cpp') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 3126edc205..e5142f2b5f 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -617,8 +617,8 @@ BOOL LLPanelPeople::postBuild() if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium) { - getChild("groupcount")->setText(getString("GroupCountWithInfo")); - getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); + getChild("groupcount")->setText(getString("GroupCountWithInfo")); + getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); } mTabContainer = getChild("tabs"); @@ -1089,10 +1089,10 @@ void LLPanelPeople::onGroupLimitInfo() args["MAX_BASIC"] = max_basic; args["MAX_PREMIUM"] = max_premium; - if (LLAgentBenefitsMgr::has("PremiumPlus")) + if (LLAgentBenefitsMgr::has("Premium Plus")) { - S32 max_premium_plus = LLAgentBenefitsMgr::get("PremiumPlus").getGroupMembershipLimit(); - args["MAX_PREMIUM"] = max_premium_plus; + S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium Plus").getGroupMembershipLimit(); + args["MAX_PREMIUM_PLUS"] = max_premium_plus; LLNotificationsUtil::add("GroupLimitInfoPlus", args); } else -- cgit v1.2.3