Groups/agent profile floaters now update when a group visbility changes.

Apply button in group settings doesn't behave quite as badly after changing notices/chat/show in profile settings.
Groups floater now bolds visible groups, italicized if active (this may need to be something more noticeable)
This commit is contained in:
Shyotl
2011-06-21 12:03:28 -05:00
parent db2f409ef4
commit 5d8ac68d3a
4 changed files with 68 additions and 25 deletions

View File

@@ -2488,15 +2488,18 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution)
return FALSE;
}
void update_group_floaters(const LLUUID& group_id);
BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile)
{
S32 count = mGroups.count();
for(S32 i = 0; i < count; ++i)
{
if(mGroups.get(i).mID == group_id)
LLGroupData &group = mGroups.get(i);
if(group.mID == group_id)
{
mGroups.get(i).mAcceptNotices = accept_notices;
mGroups.get(i).mListInProfile = list_in_profile;
group.mAcceptNotices = accept_notices;
group.mListInProfile = list_in_profile;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("SetGroupAcceptNotices");
msg->nextBlock("AgentData");
@@ -2508,6 +2511,9 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
msg->nextBlock("NewData");
msg->addBOOL("ListInProfile", list_in_profile);
sendReliableMessage();
update_group_floaters(group.mID);
return TRUE;
}
}