Integrate group limit with Hippo Grid Manager

This commit is contained in:
Siana Gearz
2011-01-31 21:04:06 +01:00
parent 2550e2b6f2
commit 86acf69bab
4 changed files with 12 additions and 8 deletions

View File

@@ -58,7 +58,8 @@
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
#include "llimview.h"
#include "llstartup.h"
#include "hippolimits.h"
// static
std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
@@ -203,7 +204,8 @@ void LLPanelGroups::reset()
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gMaxAgentGroups));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
@@ -215,7 +217,7 @@ BOOL LLPanelGroups::postBuild()
childSetCommitCallback("group list", onGroupList, this);
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gMaxAgentGroups));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
@@ -275,7 +277,7 @@ void LLPanelGroups::enableButtons()
childDisable("IM");
childDisable("Leave");
}
if(gAgent.mGroups.count() < gMaxAgentGroups)
if(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups())
{
childEnable("Create");
}