diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:11 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:11 +0300 |
commit | 93f0023efad59c6f86ee8003e3a22f1102ad28e8 (patch) | |
tree | ffb06811136a43a737aacfa844974e206f9f5537 /indra/newview/llpanelpeople.cpp | |
parent | 922793e4898ec272576f32b79cc31b1c299e1e21 (diff) | |
parent | 34322f8f37380df868703051230f2a4109602b3f (diff) |
Merged in lindenlab/viewer-release
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 1cbff37287..617ca05281 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -67,6 +67,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" @@ -613,12 +614,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)); @@ -1165,8 +1177,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); } |