Merged in first set of changes from Review-1.2.1 branch

--HG--
branch : RLVa
master
Kitty Barnett 2010-08-26 23:21:39 +02:00
commit d28b8427ca
14 changed files with 47 additions and 167 deletions

View File

@ -45,28 +45,6 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaCreateFoldersOnSaveOutfit</key>
<map>
<key>Comment</key>
<string>Automatically create ".(&lt;attachpt&gt;>)" folders when saving an outfit"</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaDebugUIEnablers</key>
<map>
<key>Comment</key>
<string>Display an assertion failure whenever an action is blocked but was still accessible through the viewer's UI</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaDebugHideUnsetDuplicate</key>
<map>
<key>Comment</key>
@ -155,39 +133,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>WarnFirstRLVDetach</key>
<map>
<key>Comment</key>
<string>Enables FirstRLVDetach warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>WarnFirstRLVEnableWear</key>
<map>
<key>Comment</key>
<string>Enables RLVEnableWear warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>WarnFirstRLVFartouch</key>
<map>
<key>Comment</key>
<string>Enables FirstRLVFartouch warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>WarnFirstRLVGiveToRLV</key>
<map>
<key>Comment</key>

View File

@ -1182,12 +1182,8 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds
}
// Copy contents of src_id to dst_id.
//void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
// LLPointer<LLInventoryCallback> cb)
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb, bool fRlvCreateFolders)
// [/RLVa:KB]
LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel::cat_array_t* cats;
LLInventoryModel::item_array_t* items;
@ -1202,54 +1198,14 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
{
case LLAssetType::AT_LINK:
{
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
const LLViewerInventoryItem* pItemTarget = item->getLinkedItem();
if ( (rlv_handler_t::isEnabled()) && (fRlvCreateFolders) && (pItemTarget) )
{
switch (pItemTarget->getType())
{
case LLAssetType::AT_OBJECT:
{
// Attachments fall through to default unless they're currently worn in which case we need to stuff them
// into their own .(<attachpt>) folder (unless the target already specifies an attachment point name)
if ( (isAgentAvatarValid()) && (!RlvAttachPtLookup::hasAttachPointName(pItemTarget)) )
{
std::string strAttachPt = gAgentAvatarp->getAttachedPointName(pItemTarget->getUUID());
if (!strAttachPt.empty())
{
LLStringUtil::toLower(strAttachPt);
LLUUID idAttachPtFolder = gInventory.createNewCategory(
dst_id, LLFolderType::FT_NONE, llformat(".(%s)", strAttachPt.c_str()));
//LLInventoryItem::getDescription() is used for a new description
//to propagate ordering information saved in descriptions of links
link_inventory_item(gAgent.getID(), pItemTarget->getUUID(), idAttachPtFolder,
pItemTarget->getName(), pItemTarget->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb);
break;
}
}
}
default:
//LLInventoryItem::getDescription() is used for a new description
//to propagate ordering information saved in descriptions of links
link_inventory_item(gAgent.getID(), item->getLinkedUUID(), dst_id, item->getName(),
item->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb);
break;
}
}
else
{
// [/RLVa:KB]
//LLInventoryItem::getDescription() is used for a new description
//to propagate ordering information saved in descriptions of links
link_inventory_item(gAgent.getID(),
item->getLinkedUUID(),
dst_id,
item->getName(),
item->LLInventoryItem::getDescription(),
LLAssetType::AT_LINK, cb);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0e) | Added: 2010-04-20
}
// [/RLVa:KB]
//LLInventoryItem::getDescription() is used for a new description
//to propagate ordering information saved in descriptions of links
link_inventory_item(gAgent.getID(),
item->getLinkedUUID(),
dst_id,
item->getName(),
item->LLInventoryItem::getDescription(),
LLAssetType::AT_LINK, cb);
break;
}
case LLAssetType::AT_LINK_FOLDER:

View File

@ -87,12 +87,8 @@ public:
bool getCanReplaceCOF(const LLUUID& outfit_cat_id);
// Copy all items in a category.
// void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
// LLPointer<LLInventoryCallback> cb);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb, bool fRlvCreateFolders = false);
// [/RLVa:KB]
LLPointer<LLInventoryCallback> cb);
// Find the Current Outfit folder.
const LLUUID getCOF() const;

View File

@ -45,7 +45,7 @@
#include "lluuid.h"
#include "llvoiceclient.h"
#include "llviewercontrol.h" // for gSavedSettings
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
@ -397,7 +397,7 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
// if ( mContextMenu )
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (mContextMenu) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) )
// [/RLVa:KB]
{
@ -456,13 +456,13 @@ void LLAvatarList::updateLastInteractionTimes()
void LLAvatarList::onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
// mItemDoubleClickSignal(ctrl, x, y, mask);
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
mItemDoubleClickSignal(ctrl, x, y, mask);
// [/RLVa:KB]
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void LLAvatarList::refreshNames()
{
std::vector<LLPanel*> items;

View File

@ -308,7 +308,7 @@ void LLCallFloater::updateSession()
}
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mAvatarList->setRlvCheckShowNames(is_local_chat);
// [/RLVa:KB]
}

View File

@ -195,7 +195,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
style_params_name.font.size(font_style_size);
// style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString();
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString();
// [/RLVa:KB]

View File

@ -36,7 +36,7 @@
#include "lltooldraganddrop.h" // for LLToolDragAndDrop
#include "llviewercontrol.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
@ -238,7 +238,7 @@ void LLFloaterAvatarPicker::onList()
{
childSetEnabled("ok_btn", isSelectBtnEnabled());
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if (rlv_handler_t::isEnabled())
{
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");

View File

@ -60,7 +60,7 @@
#include "llvoiceclient.h"
#include "llworld.h"
#include "llspeakers.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
@ -831,7 +831,7 @@ void LLPanelPeople::updateButtons()
bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled();
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (nearby_tab_active) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
{
item_selected = multiple_selected = false;

View File

@ -84,10 +84,6 @@
// system includes
#include <iomanip>
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Globals
//

View File

@ -3195,7 +3195,7 @@ class LLAvatarGiveCard : public view_listener_t
llinfos << "handle_give_card()" << llendl;
LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
// if(dest && dest->isAvatar())
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (dest && dest->isAvatar()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
@ -3646,7 +3646,7 @@ class LLAvatarEnableAddFriend : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
// bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) |
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
return new_value;
@ -5565,7 +5565,7 @@ class LLAvatarInviteToGroup : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
@ -5937,7 +5937,7 @@ class LLShowAgentProfile : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
// if (avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gAgent.getID() == agent_id)) )
// [/RLVa:KB]
{
@ -6024,11 +6024,11 @@ private:
attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL);
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] This will need rewriting for "ENABLE_MULTIATTACHMENTS"
// RELEASE-RLVa: [SL-2.1.2] This will need revisiting when LL deprecates the "MultipleAttachment" debug setting
if ( (rlv_handler_t::isEnabled()) &&
( ((index == 0) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point
((index > 0) && (!gRlvAttachmentLocks.canAttach(attachment_point))) || // or replace a locked attachment
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take"
( ((index == 0) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point
((index > 0) && (RLV_WEAR_LOCKED == gRlvAttachmentLocks.canAttach(attachment_point))) || // or replace a locked attachment
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take"
{
setObjectSelection(NULL); // Clear the selection or it'll get stuck
return true;
@ -6481,20 +6481,20 @@ BOOL object_selected_and_point_valid(const LLSD& sdParam)
// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
if (rlv_handler_t::isEnabled())
{
// RELEASE-RLVa: [SL-2.0.0] Look at the caller graph for this function on every new release
// - object_is_wearable() => dead code [sdParam == 0 => default attach point => OK!]
// - enabler set up in LLVOAvatarSelf::buildMenus() => Rezzed prim / Put On / "Attach To" [sdParam == idxAttachPt]
// RELEASE-RLVa: [SL-2.0.0] This will need rewriting for "ENABLE_MULTIATTACHMENTS"
if (isAgentAvatarValid())
if (!isAgentAvatarValid())
return FALSE;
// RELEASE-RLVa: [SL-2.1.1] Look at the caller graph for this function on every new release
// - object_is_wearable() => dead code [sdParam == 0 => default attach point => OK!]
// - enabler set up in LLVOAvatarSelf::buildMenus() => Rezzed prim / Put On / "Attach To" [sdParam == idxAttachPt]
// RELEASE-RLVa: [SL-2.1.2] This will need revisiting when LL deprecates the "MultipleAttachment" debug setting
const LLViewerJointAttachment* pAttachPt =
get_if_there(gAgentAvatarp->mAttachmentPoints, sdParam.asInteger(), (LLViewerJointAttachment*)NULL);
if ( ((!pAttachPt) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point
((pAttachPt) && (RLV_WEAR_LOCKED == gRlvAttachmentLocks.canAttach(pAttachPt))) || // or replace a locked attachment
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attach on rezzed object == "Take"
{
LLVOAvatar::attachment_map_t::iterator itAttachPt = gAgentAvatarp->mAttachmentPoints.find(sdParam.asInteger());
LLViewerJointAttachment* pAttachPt = (itAttachPt != gAgentAvatarp->mAttachmentPoints.end()) ? itAttachPt->second : NULL;
if ( ((!pAttachPt) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point
((pAttachPt) && (!gRlvAttachmentLocks.canAttach(pAttachPt))) || // or replace a locked attachment
(gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attach on rezzed object == "Take"
{
return FALSE;
}
return FALSE;
}
}
// [/RLVa:KB]
@ -6564,6 +6564,7 @@ class LLAttachmentPointFilled : public view_listener_t
{
// enable = found_it->second->getNumObjects() > 0;
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// Enable the option if there is at least one attachment on this attachment point that can be detached
enable = (found_it->second->getNumObjects() > 0) &&
((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(found_it->second)));
// [/RLVa:KB]
@ -6578,7 +6579,7 @@ class LLAvatarSendIM : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
@ -6594,7 +6595,7 @@ class LLAvatarCall : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0X) | Added: RLVa-1.2.0X
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{

View File

@ -52,7 +52,6 @@ public:
static BOOL getForbidGiveToRLV() { return rlvGetSettingBOOL(RLV_SETTING_FORBIDGIVETORLV, TRUE); }
static BOOL getNoSetEnv() { return fNoSetEnv; }
static BOOL getDebugUIEnablers() { return rlvGetSettingBOOL(RLV_SETTING_DEBUGUIENABLERS, FALSE); }
static BOOL getDebugHideUnsetDup() { return rlvGetSettingBOOL(RLV_SETTING_DEBUGHIDEUNSETDUP, FALSE); }
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
static BOOL getEnableComposites() { return fCompositeFolders; }

View File

@ -279,8 +279,6 @@ enum ERlvAttachGroupType
#define RLV_SETTING_NOSETENV "RestrainedLoveNoSetEnv"
#define RLV_SETTING_FORBIDGIVETORLV "RestrainedLoveForbidGiveToRLV"
#define RLV_SETTING_CREATEOUTFITFOLDERS "RLVaCreateFoldersOnSaveOutfit"
#define RLV_SETTING_DEBUGUIENABLERS "RLVaDebugUIEnablers"
#define RLV_SETTING_DEBUGHIDEUNSETDUP "RLVaDebugHideUnsetDuplicate"
#define RLV_SETTING_ENABLECOMPOSITES "RLVaEnableCompositeFolders"
#define RLV_SETTING_ENABLELEGACYNAMING "RLVaEnableLegacyNaming"

View File

@ -290,7 +290,7 @@ void RlvUIEnabler::onToggleShowMinimap()
removeGenericFloaterFilter("mini_map");
}
// Checked: 2010-06-05 (RLVa-1.2.0X) | Modified: RLVa-1.2.0X
// Checked: 2010-06-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
void RlvUIEnabler::onToggleShowNames()
{
// Refresh the nearby people list

View File

@ -2,7 +2,7 @@
<floater
can_close="false"
can_minimize="false"
height="125"
height="100"
layout="topleft"
title="Save Outfit"
name="modal container"
@ -14,7 +14,7 @@
layout="topleft"
left="20"
name="Save"
top="90"
top="70"
width="82" />
<button
height="23"
@ -55,15 +55,4 @@ as a new Outfit:
width="200">
[DESC] (new)
</line_editor>
<check_box
visible="false"
control_name="RLVaCreateFoldersOnSaveOutfit"
height="16"
label="#RLV compatible outfit"
tool_tip="Creates attachment point folders"
layout="topleft"
left_delta="0"
name="rlv_create_folders"
top_pad="4"
width="200" />
</floater>