[sldev] Slightly more involved patch - Added Invite to Group to avatar pie menu

Matthew Dowd matthew.dowd at hotmail.co.uk
Sat Jul 14 13:24:57 PDT 2007


Mmmm, I've just realised that there may be a mistake in my code which throws up a mistake in the LLFloaterGroups code.

 Basically the description for show says

// Call this with an agent id and AGENT_GROUPS for an agent's
// groups, otherwise, call with an object id and SET_OBJECT_GROUP
// when modifying an object.
// static
LLFloaterGroups* LLFloaterGroups::show(const LLUUID& id, EGroupDialog type, U64 powers_mask)

Now in my code where I've realise I'm calling it with id set to the id at the agent you've just selected - now from the above description you'd expect it to display the groups of the agent with UUID id, however it actually gives your own groups due to code later down.

void LLFloaterGroups::initAgentGroups(const LLUUID& highlight_id)
{
	S32 count = gAgent.mGroups.count();

So although technically, I'm passing the wrong parameter, it didn't show up in my testing as LLFloaterGroups will only display your own groups never anyone elses.

Looking through the rest of the codebase LLFloaterGroups::show is only ever called with gAgent.getId() so the problem has never occured.

What's the best way forward - raise a jira issue with a patch? Assuming that is that my understanding of LLFloaterGroups::show is correct?

Matthew




----------------------------------------
> From: matthew.dowd at hotmail.co.uk
> To: sldev at lists.secondlife.com
> Subject: RE: [sldev] Slightly more involved patch - Added Invite to Group to	avatar pie menu
> Date: Sat, 14 Jul 2007 18:03:52 +0000
> 
> 
> P.S. this was much more involved than the other patches I've submitted which was good in that it helped my knowledge of the source code. On the other hand, in reusing various dialogs, I may have introduced new issues, so peer review would be welcome!!
> 
> Matthew
> 
> 
> 
> 
> ----------------------------------------
> > From: matthew.dowd at hotmail.co.uk
> > To: sldev at lists.secondlife.com
> > Date: Sat, 14 Jul 2007 18:01:45 +0000
> > Subject: [sldev] Slightly more involved patch - Added Invite to Group to avatar pie menu
> > 
> > 
> > OK, I've posted a somewhat more involved patch than the one earlier today at http://jira.secondlife.com/browse/VWR-1736
> > 
> > This adds a new option to the avatar pie menu of invite to group.
> > 
> > Also added a few new internal features which may be useful elsehwhere:
> > 
> > LLFloaterGroups::show - now take a third optional parameter allowing you to list only groups with specified permissions
> > 
> > LLFloaterGroupInvite::showForGroup - now takes a vector of avatar_ids which get automatically added to the invitee list.
> > 
> > There's also a quirk in that llFloaterGroupInvite/LLPanelGroupInvite assume that the Group Information dialog has already cached the group information. This has the effect in the current browser that if you are quick enough (or if the group is large and/or SL is running slowly), if you press the Invite button in the Members and Group tab in Group Information, the roles dropdown list can remain blank (until you close and reopen the invite dialog). 
> > 
> > This is because an attempt to populate the dropdown list is only made when the dialog is first opened. The patch modifies LLPanelGroupInvite so that it keeps retrying to see if the data has been cached until it can populate the drop down list. (I've jira'd this seperately at http://jira.secondlife.com/browse/VWR-1737 but won't try to seperate this out as a seperate patch file unless requested - it isn't difficult to do from the hints I've given in jira anyway).
> > 
> > Matthew
> > 
> > 
> > _________________________________________________________________
> > Feel like a local wherever you go with BackOfMyHand.com
> > http://www.backofmyhand.com_______________________________________________
> > Click here to unsubscribe or manage your list subscription:
> > /index.html
> 
> _________________________________________________________________
> Celeb spotting – Play CelebMashup and win cool prizes
> https://www.celebmashup.com/index2.html_______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html

_________________________________________________________________
Feel like a local wherever you go with BackOfMyHand.com
http://www.backofmyhand.com


More information about the SLDev mailing list