Merged with RLVa-1.4.0 tip

--HG--
branch : RLVa
meow-7.2.2
Kitty Barnett 2011-09-04 23:21:20 +02:00
commit efabeae587
4 changed files with 12 additions and 15 deletions

View File

@ -222,7 +222,7 @@ void LLGroupActions::leave(const LLUUID& group_id)
{
// if (group_id.isNull())
// return;
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
if ( (group_id.isNull()) || ((gAgent.getGroupID() == group_id) && (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))) )
return;
// [/RLVa:KB]
@ -247,7 +247,7 @@ void LLGroupActions::leave(const LLUUID& group_id)
// static
void LLGroupActions::activate(const LLUUID& group_id)
{
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
if (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))
return;
// [/RLVa:KB]

View File

@ -268,11 +268,11 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata)
// each group including "none" can be activated
// if (userdata.asString() == "activate")
// return gAgent.getGroupID() != selected_group_id;
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
if (userdata.asString() == "activate")
return (gAgent.getGroupID() != selected_group_id) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP));
else if (userdata.asString() == "leave")
return (gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP));
return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)));
// [/RLVa:KB]
if (userdata.asString() == "call")

View File

@ -883,7 +883,7 @@ void LLPanelPeople::updateButtons()
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
// groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
groups_panel->getChildView("activate_btn")->setEnabled(
item_selected && !cur_group_active && !gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)); // "none" or a non-active group selected
// [/RLVa:KB]

View File

@ -407,7 +407,7 @@ ERlvCmdRet RlvHandler::processClearCommand(const RlvCommand& rlvCmd)
// Externally invoked event handlers
//
// Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
// Checked: 2011-05-22 (RLVa-1.4.1a) | Added: RLVa-1.3.1b
bool RlvHandler::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& sdUserdata)
{
// If the user managed to change their active group (= newly joined or created group) we need to reactivate the previous one
@ -1251,7 +1251,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
RlvBehaviourNotifyHandler::getInstance()->removeNotify(rlvCmd.getObjectID(), nChannel, strFilter);
}
break;
case RLV_BHVR_SETGROUP: // @setgroup=n|y - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
case RLV_BHVR_SETGROUP: // @setgroup=n|y - Checked: 2011-05-22 (RLVa-1.4.1a) | Added: RLVa-1.3.1b
{
VERIFY_OPTION_REF(strOption.empty());
@ -1617,7 +1617,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
eRet = onForceRemOutfit(rlvCmd);
}
break;
case RLV_BHVR_SETGROUP: // @setgroup:<uuid|name>=force - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
case RLV_BHVR_SETGROUP: // @setgroup:<uuid|name>=force - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
eRet = onForceGroup(rlvCmd);
break;
case RLV_BHVR_UNSIT: // @unsit=force - Checked: 2010-03-18 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g
@ -1754,18 +1754,15 @@ ERlvCmdRet RlvHandler::onForceRemOutfit(const RlvCommand& rlvCmd) const
return RLV_RET_SUCCESS;
}
// Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
// Checked: 2011-07-23 (RLVa-1.4.1a) | Modified: RLVa-1.4.1a
ERlvCmdRet RlvHandler::onForceGroup(const RlvCommand& rlvCmd) const
{
RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption());
LLUUID idGroup; bool fValid = false;
if (rlvCmdOption.isUUID())
if (idGroup.set(rlvCmd.getOption()))
{
idGroup = rlvCmdOption.getUUID();
fValid = (idGroup.isNull()) || (gAgent.isInGroup(idGroup, true));
}
else if (rlvCmdOption.isString())
else
{
for (S32 idxGroup = 0, cntGroup = gAgent.mGroups.count(); (idxGroup < cntGroup) && (idGroup.isNull()); idxGroup++)
if (boost::iequals(gAgent.mGroups.get(idxGroup).mName, rlvCmd.getOption()))
@ -1902,7 +1899,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
case RLV_BHVR_GETINVWORN: // @getinvworn[:<path>]=<channel>
eRet = onGetInvWorn(rlvCmd, strReply);
break;
case RLV_BHVR_GETGROUP: // @getgroup=<channel> - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
case RLV_BHVR_GETGROUP: // @getgroup=<channel> - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
strReply = (gAgent.getGroupID().notNull()) ? gAgent.getGroupName() : "none";
break;
case RLV_BHVR_GETSITID: // @getsitid=<channel> - Checked: 2010-03-09 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a