diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-26 21:11:16 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-26 21:11:16 +0300 |
commit | b78b5da79a74deb8efe5486b251b2db8361e1485 (patch) | |
tree | e7ff18fa04a38b077cb9592da539b810da315f5e /indra/newview/llpanelpeople.cpp | |
parent | e5339156ca6c406ca57ca2d21aea92f9b1795733 (diff) | |
parent | 5e5c5ca09c0add728f366ada48243b82f6aed38c (diff) |
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 82feadd4ed..be174475e1 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -66,6 +66,7 @@ #include "llrecentpeople.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder +#include "llviewerregion.h" #include "llvoiceclient.h" #include "llworld.h" #include "llspeakers.h" @@ -611,12 +612,23 @@ void LLPanelPeople::removePicker() BOOL LLPanelPeople::postBuild() { + 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(); + } + } + getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); 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 <= BASE_MAX_AGENT_GROUPS) + if(gMaxAgentGroups < max_premium) { getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo")); getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -1082,8 +1094,25 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) void LLPanelPeople::onGroupLimitInfo() { LLSD args; - args["MAX_BASIC"] = BASE_MAX_AGENT_GROUPS; - args["MAX_PREMIUM"] = PREMIUM_MAX_AGENT_GROUPS; + + 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(); + } + } + args["MAX_BASIC"] = max_basic; + args["MAX_PREMIUM"] = max_premium; + LLNotificationsUtil::add("GroupLimitInfo", args); } |