FIRE-12229: Limited to 42 groups on an opensim grid; Patch by Cinder Roxley
parent
0cab498dd2
commit
72c4a8f71e
|
|
@ -56,6 +56,8 @@ static const std::string LL_SCOUT = "Scout";
|
|||
static const std::string LL_TESTER = "Tester";
|
||||
|
||||
|
||||
extern S32 gMaxAgentGroups;
|
||||
|
||||
S32 FSCommon::sObjectAddMsg = 0;
|
||||
|
||||
void reportToNearbyChat(const std::string& message)
|
||||
|
|
@ -338,3 +340,13 @@ bool FSCommon::checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionAct
|
|||
return false;
|
||||
}
|
||||
|
||||
LLSD FSCommon::populateGroupCount()
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
S32 groupcount = gAgent.mGroups.count();
|
||||
args["[COUNT]"] = llformat("%d", groupcount);
|
||||
args["[REMAINING]"] = llformat("%d", gMaxAgentGroups - groupcount);
|
||||
LLUIString groupcountstring = LLTrans::getString((gMaxAgentGroups ? "groupcountstring" : "groupcountunlimitedstring"), args);
|
||||
return LLSD(groupcountstring);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ namespace FSCommon
|
|||
extern S32 sObjectAddMsg;
|
||||
|
||||
bool checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionActionType);
|
||||
LLSD populateGroupCount();
|
||||
};
|
||||
|
||||
#endif // FS_COMMON_H
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "fscommon.h"
|
||||
|
||||
//Maximum number of people you can select to do an operation on at once.
|
||||
const U32 MAX_FRIEND_SELECT = 20;
|
||||
|
|
@ -171,15 +172,13 @@ void FSFloaterContacts::updateGroupButtons()
|
|||
LLUUID groupId = getCurrentItemID();
|
||||
bool isGroup = groupId.notNull();
|
||||
|
||||
LLUICtrl* groupcount = mGroupsTab->getChild<LLUICtrl>("groupcount");
|
||||
groupcount->setTextArg("[COUNT]", llformat("%d", gAgent.mGroups.count()));
|
||||
groupcount->setTextArg("[MAX]", llformat("%d", gMaxAgentGroups));
|
||||
mGroupsTab->getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
|
||||
|
||||
getChildView("chat_btn")->setEnabled(isGroup && gAgent.hasPowerInGroup(groupId, GP_SESSION_JOIN));
|
||||
getChildView("info_btn")->setEnabled(isGroup);
|
||||
getChildView("activate_btn")->setEnabled(groupId != gAgent.getGroupID());
|
||||
getChildView("leave_btn")->setEnabled(isGroup);
|
||||
getChildView("create_btn")->setEnabled(gAgent.mGroups.count() < gMaxAgentGroups);
|
||||
getChildView("create_btn")->setEnabled((!gMaxAgentGroups) || (gAgent.mGroups.count() < gMaxAgentGroups));
|
||||
getChildView("invite_btn")->setEnabled(isGroup && gAgent.hasPowerInGroup(groupId, GP_MEMBER_INVITE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3404,7 +3404,10 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
|
|||
|
||||
BOOL LLAgent::canJoinGroups() const
|
||||
{
|
||||
return mGroups.count() < gMaxAgentGroups;
|
||||
// [CR] FIRE-12229
|
||||
//return mGroups.count() < gMaxAgentGroups;
|
||||
return ((!gMaxAgentGroups) || (mGroups.count() < gMaxAgentGroups));
|
||||
// [/CR]
|
||||
}
|
||||
|
||||
LLQuaternion LLAgent::getHeadRotation()
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@
|
|||
#include "lluictrlfactory.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "fscommon.h"
|
||||
|
||||
using namespace LLOldEvents;
|
||||
|
||||
// helper functions
|
||||
|
|
@ -171,8 +173,11 @@ void LLPanelGroups::reset()
|
|||
{
|
||||
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||
}
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
// [CR] FIRE-12229
|
||||
//getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
|
||||
// [/CR]
|
||||
|
||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
|
||||
enableButtons();
|
||||
|
|
@ -182,8 +187,11 @@ BOOL LLPanelGroups::postBuild()
|
|||
{
|
||||
childSetCommitCallback("group list", onGroupList, this);
|
||||
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
// [CR] FIRE-12229
|
||||
//getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
//getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups));
|
||||
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
|
||||
// [/CR]
|
||||
|
||||
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list");
|
||||
if (list)
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
#include "llevents.h" // for LLEventPumps
|
||||
|
||||
// Firestorm includes
|
||||
#include "fscommon.h"
|
||||
#include "fspanelradar.h"
|
||||
#include "lggcontactsets.h"
|
||||
#include "llcombobox.h"
|
||||
|
|
@ -97,8 +98,8 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
|
|||
static const std::string CONTACT_SETS_TAB_NAME = "contact_sets_panel"; // [FS:CR] Contact sets
|
||||
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
|
||||
|
||||
|
||||
extern S32 gMaxAgentGroups;
|
||||
// [FS] FIRE-12229
|
||||
//extern S32 gMaxAgentGroups;
|
||||
|
||||
/** Comparator for comparing avatar items by last interaction date */
|
||||
class LLAvatarItemRecentComparator : public LLAvatarItemComparator
|
||||
|
|
@ -996,8 +997,11 @@ void LLPanelPeople::updateButtons()
|
|||
|
||||
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
|
||||
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
|
||||
// [CR] FIRE-12229
|
||||
//groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||
//groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
|
||||
getChild<LLUICtrl>("groupcount")->setValue(FSCommon::populateGroupCount());
|
||||
// [/CR]
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4093,9 +4093,16 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y
|
|||
}
|
||||
else
|
||||
{
|
||||
// [CR] FIRE-12229
|
||||
#ifdef OPENSIM
|
||||
gMaxAgentGroups = 0;
|
||||
LL_INFOS("LLStartup") << "did not receive max-agent-groups. unlimited groups activated" << LL_ENDL;
|
||||
#else
|
||||
gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
|
||||
LL_INFOS("LLStartup") << "using gMaxAgentGroups default: "
|
||||
<< gMaxAgentGroups << LL_ENDL;
|
||||
#endif
|
||||
// [CR] FIRE-12229
|
||||
}
|
||||
|
||||
// <FS:AW opensim currency support>
|
||||
|
|
|
|||
|
|
@ -716,7 +716,10 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
|
|||
S32 max_groups = gMaxAgentGroups;
|
||||
if(gAgent.isInGroup(group_id)) ++max_groups;
|
||||
|
||||
if(gAgent.mGroups.count() < max_groups)
|
||||
// [CR] FIRE-12229
|
||||
//if(gAgent.mGroups.count() < max_groups)
|
||||
if(!max_groups || gAgent.mGroups.count() < max_groups)
|
||||
// [/CR] FIRE-12229
|
||||
{
|
||||
accept_invite = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,17 +23,16 @@
|
|||
color="ScrollBgWriteableColor"
|
||||
top="-1"
|
||||
width="260" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
bottom="296"
|
||||
follows="left|bottom"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
right="-10"
|
||||
name="groupcount">
|
||||
You belong to [COUNT] out of [MAX] groups.
|
||||
</text>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
bottom="296"
|
||||
follows="left|bottom"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
right="-10"
|
||||
name="groupcount">
|
||||
</text>
|
||||
<button
|
||||
top="-1"
|
||||
follows="top|right"
|
||||
|
|
|
|||
|
|
@ -2674,4 +2674,8 @@ Try enclosing path to the editor with double quotes.
|
|||
<string name="Inbox_Folderview_New">New</string>
|
||||
|
||||
<string name="Mouselook_Unknown_Avatar">Unknown agent</string>
|
||||
|
||||
<string name="groupcountstring">You belong to [COUNT] groups ([REMAINING] remaining).</string>
|
||||
<string name="groupcountunlimitedstring">You belong to [COUNT] groups.</string>
|
||||
|
||||
</strings>
|
||||
|
|
|
|||
Loading…
Reference in New Issue