Merged with default tip (Revision 3a521e980fbf)

--HG--
branch : RLVa
master
Kitty Barnett 2012-01-09 13:22:40 +01:00
commit 415aadc959
165 changed files with 15775 additions and 473 deletions

1
.hgpatchinfo/RLVa.dep Normal file
View File

@ -0,0 +1 @@
12aa2c8ffd4fcbea03076ee29d9a3c26d2b19c6f

View File

@ -505,3 +505,12 @@ ae2de7b0b33c03dc5bdf3a7bfa54463b512221b2 SL-3.1.0
3150219d229d628f0c15e58e8a51511cbd97e58d SL-3.2.0
a8c7030d6845186fac7c188be4323a0e887b4184 SL-3.2.1
bd6bcde2584491fd9228f1fa51c4575f4e764e19 SL-3.2.4
425f96b1e81e01644bf5e951961e7d1023bffb89 RLVa-1.2.0
fc0cbb86f5bd6e7737159e35aea2c4cf9f619b62 RLVa-1.2.1
43cb7dc1804de1a25c0b2b3f0715584af1f8b470 RLVa-1.2.2
89532c8dfd5b6c29f1cb032665b44a74a52452e1 RLVa-1.3.0
7bc5039ccf0b36eafbf6ce33a52b5e26332aa04c RLVa-1.3.1
a563f7e215c7883c1cfd20908085687a0ed96284 RLVa-1.4.0
40644beae9c4a617504163d5c9f195dc7bfff1b4 RLVa-1.4.1
8787094c309a44ca32b7472acc9217a3c37f00c3 RLVa-1.4.2
11c6c85ddd223bcbd6b3afc53f9a0f5fd349ba65 RLVa-1.4.3

View File

@ -52,6 +52,17 @@ LLControlGroup gSavedSettings("Global"); // saved at end of session
LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
#include "llavatarname.h"
// Stub for rlvGetAnonym
const std::string& rlvGetAnonym(const LLAvatarName& avName)
{
static std::string strAnonym = "A resident";
return strAnonym;
}
// [/RLVa:KB]
// We can't create LLImageGL objects because we have no window or rendering
// context. Provide enough of an LLUIImage to test the LLUI library without
// an underlying image.

View File

@ -81,6 +81,10 @@ public:
mChatType(CHAT_TYPE_NORMAL),
mAudible(CHAT_AUDIBLE_FULLY),
mMuted(FALSE),
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
mRlvLocFiltered(FALSE),
mRlvNamesFiltered(FALSE),
// [/RLVa:KB]
mTime(0.0),
mTimeStr(),
mPosAgent(),
@ -98,6 +102,10 @@ public:
EChatType mChatType;
EChatAudible mAudible;
BOOL mMuted; // pass muted chat to maintain list of chatters
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.0.0a
BOOL mRlvLocFiltered;
BOOL mRlvNamesFiltered;
// [/RLVa:KB]
F64 mTime; // viewer only, seconds from viewer start
std::string mTimeStr;
LLVector3 mPosAgent;

View File

@ -47,6 +47,11 @@ namespace LLAvatarNameCache
// supports it.
bool sUseDisplayNames = true;
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
// RLVa override for display names
bool sForceDisplayNames = false;
// [/RLVa:KB]
// Cache starts in a paused state until we can determine if the
// current region supports display names.
bool sRunning = false;
@ -709,9 +714,28 @@ void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
}
}
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
bool LLAvatarNameCache::getForceDisplayNames()
{
return sForceDisplayNames;
}
void LLAvatarNameCache::setForceDisplayNames(bool force)
{
sForceDisplayNames = force;
if ( (!sUseDisplayNames) && (force) )
{
setUseDisplayNames(true);
}
}
// [/RLVa:KB]
void LLAvatarNameCache::setUseDisplayNames(bool use)
{
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
// We need to force the use of the "display names" cache when @shownames=n restricted (and disallow toggling it)
use |= getForceDisplayNames();
// [/RLVa:KB]
if (use != sUseDisplayNames)
{
sUseDisplayNames = use;

View File

@ -80,6 +80,11 @@ namespace LLAvatarNameCache
void setUseDisplayNames(bool use);
bool useDisplayNames();
// [RLVa:KB] - Checked: 2010-12-08 (RLVa-1.4.0a) | Added: RLVa-1.2.2c
bool getForceDisplayNames();
void setForceDisplayNames(bool force);
// [/RLVa:KB]
void erase(const LLUUID& agent_id);
/// Provide some fallback for agents that return errors

View File

@ -45,6 +45,10 @@ std::set<std::string> LLFloaterReg::sAlwaysShowableList;
static LLFloaterRegListener sFloaterRegListener;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
LLFloaterReg::validate_signal_t LLFloaterReg::mValidateSignal;
// [/RLVa:KB]
//*******************************************************
//static
@ -241,9 +245,12 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str
//static
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
{
if( sBlockShowFloaters
// see EXT-7090
&& sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
// if( sBlockShowFloaters
// // see EXT-7090
// && sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
if ( (sBlockShowFloaters && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) || (!mValidateSignal(name, key)) )
// [/RLVa:KB]
return 0;//
LLFloater* instance = getInstance(name, key);
if (instance)
@ -467,8 +474,16 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
}
else if (!instance->isShown())
{
instance->openFloater(key);
instance->setVisibleAndFrontmost();
// [RLVa:KB] - Checked: 2011-12-17 (RLVa-1.4.5a) | Added: RLVa-1.4.5a
// [See LLFloaterReg::showInstance()]
if ( ((!sBlockShowFloaters) || (sAlwaysShowableList.find(name) != sAlwaysShowableList.end())) && (mValidateSignal(name, key)) )
{
instance->openFloater(key);
instance->setVisibleAndFrontmost();
}
// [/RLVa:KB]
// instance->openFloater(key);
// instance->setVisibleAndFrontmost();
}
else if (!instance->isFrontmost())
{

View File

@ -31,6 +31,10 @@
#include "llsd.h"
#include <boost/function.hpp>
// [RLVa:KB] - Checked: 2011-05-25 (RLVa-1.4.0a)
#include <boost/signals2.hpp>
#include "llboost.h"
// [/RLVa:KB]
//*******************************************************
//
@ -71,6 +75,15 @@ private:
*/
static std::set<std::string> sAlwaysShowableList;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
// Used to determine whether a floater can be shown
public:
typedef boost::signals2::signal<bool(const std::string&, const LLSD&), boost_boolean_combiner> validate_signal_t;
static boost::signals2::connection setValidateCallback(const validate_signal_t::slot_type& cb) { return mValidateSignal.connect(cb); }
private:
static validate_signal_t mValidateSignal;
// [/RLVa:KB]
public:
// Registration

View File

@ -877,6 +877,13 @@ std::string LLNotification::getLabel() const
return (mTemplatep ? label : "");
}
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
bool LLNotification::hasLabel() const
{
return !mTemplatep->mLabel.empty();
}
// [/SL:KB]
std::string LLNotification::getURL() const
{
if (!mTemplatep)

View File

@ -507,6 +507,10 @@ public:
return mTimestamp;
}
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
bool hasLabel() const;
// [/SL:KB]
std::string getType() const;
std::string getMessage() const;
std::string getLabel() const;

View File

@ -1197,6 +1197,9 @@ void LLToolBarButton::setEnabled(BOOL enabled)
mImageOverlayColor = mImageOverlayDisabledColor;
mImageOverlaySelectedColor = mImageOverlayDisabledColor;
}
// [RLVa:KB] - Checked: 2011-12-17 (RLVa-1.4.5a) | Added: RLVa-1.4.5a
LLButton::setEnabled(enabled);
// [/RLVa:KB]
}
const std::string LLToolBarButton::getToolTip() const

View File

@ -616,6 +616,27 @@ std::string LLUrlEntryAgentUserName::getName(const LLAvatarName& avatar_name)
return avatar_name.mUsername.empty() ? avatar_name.getLegacyName() : avatar_name.mUsername;
}
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
// Defined in rlvcommon.cpp - redirects to RlvStrings::getAnonym() since we can't really get to that class from here
extern const std::string& rlvGetAnonym(const LLAvatarName& avName);
//
// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
//
LLUrlEntryAgentRLVAnonymizedName::LLUrlEntryAgentRLVAnonymizedName()
{
mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/rlvanonym", boost::regex::perl|boost::regex::icase);
}
std::string LLUrlEntryAgentRLVAnonymizedName::getName(const LLAvatarName& avatar_name)
{
return rlvGetAnonym(avatar_name);
}
// [/RLVa:KB]
//
// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about

View File

@ -241,6 +241,21 @@ private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
///
/// LLUrlEntryAgentRLVAnonymizedName Describes an RLV anonymized agent name Url, e.g.,
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/rlvanonym
/// that diplays an anonym (based on the display name) for an avatar
/// such as "An individual"
class LLUrlEntryAgentRLVAnonymizedName : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentRLVAnonymizedName();
private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
};
// [/RLVa:KB]
///
/// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
/// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about

View File

@ -37,7 +37,10 @@ void LLUrlRegistryNullCallback(const std::string &url, const std::string &label,
LLUrlRegistry::LLUrlRegistry()
{
mUrlEntry.reserve(20);
// mUrlEntry.reserve(20);
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
mUrlEntry.reserve(21);
// [/RLVa:KB]
// Urls are matched in the order that they were registered
registerUrl(new LLUrlEntryNoLink());
@ -48,6 +51,9 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryAgentCompleteName());
registerUrl(new LLUrlEntryAgentDisplayName());
registerUrl(new LLUrlEntryAgentUserName());
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
registerUrl(new LLUrlEntryAgentRLVAnonymizedName());
// [/RLVa:KB]
// LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since
// LLUrlEntryAgent is a less specific (catchall for agent urls)
registerUrl(new LLUrlEntryAgent());

View File

@ -34,6 +34,15 @@
#include <string>
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
// Stub for rlvGetAnonym
const std::string& rlvGetAnonym(const LLAvatarName& avName)
{
static std::string strAnonym = "A resident";
return strAnonym;
}
// [/RLVa:KB]
// Stub for LLAvatarNameCache
bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name)
{

View File

@ -621,6 +621,14 @@ set(viewer_SOURCE_FILES
llxmlrpctransaction.cpp
noise.cpp
pipeline.cpp
rlvhandler.cpp
rlvhelper.cpp
rlvcommon.cpp
rlvlocks.cpp
rlvinventory.cpp
rlvextensions.cpp
rlvfloaters.cpp
rlvui.cpp
)
set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
@ -1168,6 +1176,15 @@ set(viewer_HEADER_FILES
macmain.h
noise.h
pipeline.h
rlvdefines.h
rlvhandler.h
rlvhelper.h
rlvcommon.h
rlvlocks.h
rlvinventory.h
rlvextensions.h
rlvfloaters.h
rlvui.h
VertexCache.h
VorbisFramework.h
)

View File

@ -7,6 +7,8 @@
tooltip_ref="Command_AboutLand_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="about_land"
is_enabled_function="RLV.EnableIfNot"
is_enabled_parameters="showloc"
is_running_function="Floater.IsOpen"
is_running_parameters="about_land"
/>
@ -37,6 +39,8 @@
tooltip_ref="Command_Build_Tooltip"
execute_function="Build.Toggle"
execute_parameters="build"
is_enabled_function="Agent.IsActionAllowed"
is_enabled_parameters="build"
is_running_function="Floater.IsOpen"
is_running_parameters="build"
/>
@ -95,6 +99,8 @@
tooltip_ref="Command_Inventory_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="inventory"
is_enabled_function="RLV.EnableIfNot"
is_enabled_parameters="showinv"
is_running_function="Floater.IsOpen"
is_running_parameters="inventory"
/>
@ -105,6 +111,8 @@
tooltip_ref="Command_Map_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="world_map"
is_enabled_function="RLV.EnableIfNot"
is_enabled_parameters="showworldmap"
is_running_function="Floater.IsOpen"
is_running_parameters="world_map"
/>
@ -122,6 +130,8 @@
tooltip_ref="Command_MiniMap_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="mini_map"
is_enabled_function="RLV.EnableIfNot"
is_enabled_parameters="showminimap"
is_running_function="Floater.IsOpen"
is_running_parameters="mini_map"
/>

View File

@ -2,6 +2,237 @@
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="llsd.xsd">
<map>
<key>RestrainedLove</key>
<map>
<key>Comment</key>
<string>Toggles the RestrainedLove features (BDSM lockable toys support). Needs a restart of the viewer.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLoveDebug</key>
<map>
<key>Comment</key>
<string>Toggles the RestrainedLove debug mode (displays the commands when in debug mode).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RestrainedLoveCanOOC</key>
<map>
<key>Comment</key>
<string>Allows sending OOC chat when send chat restricted, or seeing OOC chat when receive chat restricted</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLoveForbidGiveToRLV</key>
<map>
<key>Comment</key>
<string>When TRUE, forbids to give sub-folders to the #RLV RestrainedLove folder.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RestrainedLoveNoSetEnv</key>
<map>
<key>Comment</key>
<string>When TRUE, forbids to set the environment (time of day and Windlight settings) via RestrainedLove. Needs a restart of the viewer.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RestrainedLoveOffsetAvatarZ</key>
<map>
<key>Comment</key>
<string>Offset the avatar.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>RestrainedLoveReplaceWhenFolderBeginsWith</key>
<map>
<key>Comment</key>
<string>If a folder name begins with this string, its attach behavior will always be "replace", never "stack". Default is blank (disabled).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>RestrainedLoveShowEllipsis</key>
<map>
<key>Comment</key>
<string>When TRUE, show "..." when someone speaks, while the avatar is prevented from hearing. When FALSE, don't show anything.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RestrainedLoveStackWhenFolderBeginsWith</key>
<map>
<key>Comment</key>
<string>If a folder name begins with this string, its attach behavior will always be "stack", never "replace". Default is "+".</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>+</string>
</map>
<key>RLVaDebugHideUnsetDuplicate</key>
<map>
<key>Comment</key>
<string>Suppresses reporting "unset" or "duplicate" command restrictions when RestrainedLoveDebug is TRUE</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaEnableCompositeFolders</key>
<map>
<key>Comment</key>
<string>Enables composite folders for shared inventory</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaEnableLegacyNaming</key>
<map>
<key>Comment</key>
<string>Enables legacy naming convention for folders</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaEnableSharedWear</key>
<map>
<key>Comment</key>
<string>Attachments in the shared #RLV folder can be force-attached without needing to specify an attachment point</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaHideLockedLayers</key>
<map>
<key>Comment</key>
<string>Hides "remove outfit" restricted worn clothing layers from @getoufit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaHideLockedAttachments</key>
<map>
<key>Comment</key>
<string>Hides non-detachable worn attachments from @getattach</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaSharedInvAutoRename</key>
<map>
<key>Comment</key>
<string>Automatically renames shared inventory items when worn</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaShowAssertionFailures</key>
<map>
<key>Comment</key>
<string>Notify the user when an assertion fails</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaShowNameTags</key>
<map>
<key>Comment</key>
<string>Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RLVaTopLevelMenu</key>
<map>
<key>Comment</key>
<string>Show the RLVa specific menu as a top level menu</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RLVaWearReplaceUnlocked</key>
<map>
<key>Comment</key>
<string>Don't block wear replace when at least one attachment on the target attachment point is non-detachable</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>WarnFirstRLVGiveToRLV</key>
<map>
<key>Comment</key>
<string>Enables FirstRLVGiveToRLV warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>CrashHostUrl</key>
<map>
<key>Comment</key>
@ -3820,6 +4051,17 @@
<key>Value</key>
<integer>255</integer>
</map>
<key>ForceInitialCOFDelay</key>
<map>
<key>Comment</key>
<string>Number of seconds to delay initial processing of COF contents</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>0.0</integer>
</map>
<key>ForceShowGrid</key>
<map>
<key>Comment</key>
@ -3842,6 +4084,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>ForceMissingType</key>
<map>
<key>Comment</key>
<string>Force this wearable type to be missing from COF</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>255</integer>
</map>
<key>FreezeTime</key>
<map>
<key>Comment</key>
@ -6098,6 +6351,17 @@
<key>Value</key>
<integer>305</integer>
</map>
<key>NotificationCanEmbedInIM</key>
<map>
<key>Comment</key>
<string>Controls notification panel embedding in IMs (0 = default, 1 = focused, 2 = never)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>NotificationToastLifeTime</key>
<map>
<key>Comment</key>
@ -9795,6 +10059,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>NearbyListShowMap</key>
<map>
<key>Comment</key>
<string>Show/hide map above nearby people list</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>NearbyListShowIcons</key>
<map>
<key>Comment</key>
@ -12213,39 +12488,6 @@
<key>Value</key>
<boolean>0</boolean>
</map>
<key>VerifyInitialWearables</key>
<map>
<key>Comment</key>
<string>Compares the initial wearables to the COF contents to determine which one to use for the intial outfit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VerifyInitialWearables</key>
<map>
<key>Comment</key>
<string>Compares the initial wearables to the COF contents to determine which one to use for the intial outfit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VerifyInitialWearables</key>
<map>
<key>Comment</key>
<string>Compares the initial wearables to the COF contents to determine which one to use for the intial outfit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VertexShaderEnable</key>
<map>
<key>Comment</key>

View File

@ -1,6 +1,17 @@
<llsd>
<map>
<key>BusyResponseChanged</key>
<key>RLVaLoginLastLocation</key>
<map>
<key>Comment</key>
<string>Determines whether the next login will be forced to the last logoff location (set by the viewer)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>BusyResponseChanged</key>
<map>
<key>Comment</key>
<string>Does user's busy mode message differ from default?</string>

View File

@ -88,6 +88,11 @@
#include "llworld.h"
#include "llworldmap.h"
#include "stringize.h"
// [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a)
#include "rlvhandler.h"
#include "rlvhelper.h"
#include "rlvui.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
@ -171,7 +176,10 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
if (param == "build")
{
retval = gAgent.canEditParcel();
// retval = gAgent.canEditParcel();
// [RLVa:KB] - Checked: 2011-11-05 (RLVa-1.4.4a) | Added: RLVa-1.4.4a
retval = RlvUIEnabler::isBuildEnabled();
// [/RLVa:KB]
}
else if (param == "speak")
{
@ -243,7 +251,10 @@ LLAgent::LLAgent() :
mDoubleTapRunMode(DOUBLETAP_NONE),
mbAlwaysRun(false),
mbRunning(false),
// mbRunning(false),
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
mbTempRun(false),
// [/RLVa:KB]
mbTeleportKeepsLookAt(false),
mAgentAccess(new LLAgentAccess(gSavedSettings)),
@ -565,6 +576,9 @@ void LLAgent::movePitch(F32 mag)
// Does this parcel allow you to fly?
BOOL LLAgent::canFly()
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0d) | Modified: RLVa-1.0.0c
if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY)) return FALSE;
// [/RLVa:KB]
if (isGodlike()) return TRUE;
LLViewerRegion* regionp = getRegion();
@ -613,6 +627,13 @@ void LLAgent::setFlying(BOOL fly)
if (fly)
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0d) | Modified: RLVa-1.0.0c
if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY))
{
return;
}
// [/RLVa:KB]
BOOL was_flying = getFlying();
if (!canFly() && !was_flying)
{
@ -675,7 +696,14 @@ bool LLAgent::enableFlying()
void LLAgent::standUp()
{
setControlFlags(AGENT_CONTROL_STAND_UP);
// setControlFlags(AGENT_CONTROL_STAND_UP);
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking
if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) )
{
setControlFlags(AGENT_CONTROL_STAND_UP);
}
// [/RLVa:KB]
}
@ -764,7 +792,10 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
LLSelectMgr::getInstance()->updateSelectionCenter();
LLFloaterMove::sUpdateFlyingStatus();
// LLFloaterMove::sUpdateFlyingStatus();
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
LLFloaterMove::sUpdateMovementStatus();
// [/RLVa:KB]
if (teleport)
{
@ -971,7 +1002,14 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
void LLAgent::sitDown()
{
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
// setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
// [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
// RELEASE-RLVa: [SL-2.0.0] Check this function's callers since usually they require explicit blocking
if ( (!rlv_handler_t::isEnabled()) || ((gRlvHandler.canStand()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) )
{
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
// [/RLVa:KB]
}
@ -2268,7 +2306,15 @@ void LLAgent::onAnimStop(const LLUUID& id)
}
else if (id == ANIM_AGENT_AWAY)
{
// clearAFK();
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Added: RLVa-1.1.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
if (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE))
clearAFK();
#else
clearAFK();
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
}
else if (id == ANIM_AGENT_STANDUP)
{
@ -2704,7 +2750,36 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
sendReliableMessage();
}
void LLAgent::sendWalkRun(bool running)
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
void LLAgent::setAlwaysRun()
{
mbAlwaysRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN));
sendWalkRun();
}
void LLAgent::setTempRun()
{
mbTempRun = (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasBehaviour(RLV_BHVR_TEMPRUN));
sendWalkRun();
}
void LLAgent::clearAlwaysRun()
{
mbAlwaysRun = false;
sendWalkRun();
}
void LLAgent::clearTempRun()
{
mbTempRun = false;
sendWalkRun();
}
// [/RLVa:KB]
//void LLAgent::sendWalkRun(bool running)
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
void LLAgent::sendWalkRun()
// [/RLVa:KB]
{
LLMessageSystem* msgsys = gMessageSystem;
if (msgsys)
@ -2713,7 +2788,10 @@ void LLAgent::sendWalkRun(bool running)
msgsys->nextBlockFast(_PREHASH_AgentData);
msgsys->addUUIDFast(_PREHASH_AgentID, getID());
msgsys->addUUIDFast(_PREHASH_SessionID, getSessionID());
msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) );
// msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) );
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(getRunning()) );
// [/RLVa:KB]
sendReliableMessage();
}
}
@ -3498,6 +3576,18 @@ void LLAgent::teleportRequest(
// Landmark ID = LLUUID::null means teleport home
void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
{
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
// NOTE: we'll allow teleporting home unless both @tplm=n *and* @tploc=n restricted
if ( (rlv_handler_t::isEnabled()) &&
( ( (landmark_asset_id.notNull()) ? gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)
: gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC) ) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting())) ))
{
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
return;
}
// [/RLVa:KB]
LLViewerRegion *regionp = getRegion();
if(regionp && teleportCore())
{
@ -3562,6 +3652,25 @@ void LLAgent::teleportCancel()
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) )
{
// If we're getting teleported due to @tpto we should disregard any @tploc=n or @unsit=n restrictions from the same object
if ( (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, gRlvHandler.getCurrentObject())) ||
( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) &&
(gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) )
{
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
return;
}
if ( (gRlvHandler.getCurrentCommand()) && (RLV_BHVR_TPTO == gRlvHandler.getCurrentCommand()->getBehaviourType()) )
{
gRlvHandler.setCanCancelTp(false);
}
}
// [/RLVa:KB]
LLViewerRegion* regionp = getRegion();
U64 handle = to_region_handle(pos_global);
LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle);
@ -3604,6 +3713,16 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
// Teleport to global position, but keep facing in the same direction
void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
{
// [RLVa:KB] - Checked: 2010-10-07 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
// RELEASE-RLVa: [SL-2.2.0] Make sure this isn't used for anything except double-click teleporting
if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) &&
((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (!gRlvHandler.canStand())) )
{
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
return;
}
// [/RLVa:KB]
mbTeleportKeepsLookAt = true;
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
U64 region_handle = to_region_handle(pos_global);
@ -3792,7 +3911,11 @@ void LLAgent::sendAgentSetAppearance()
// NOTE -- when we start correcting all of the other Havok geometry
// to compensate for the COLLISION_TOLERANCE ugliness we will have
// to tweak this number again
const LLVector3 body_size = gAgentAvatarp->mBodySize;
// const LLVector3 body_size = gAgentAvatarp->mBodySize;
// [RLVa:KB] - Checked: 2010-10-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
LLVector3 body_size = gAgentAvatarp->mBodySize;
body_size.mV[VZ] += RlvSettings::getAvatarOffsetZ();
// [/RLVa:KB]
msg->addVector3Fast(_PREHASH_Size, body_size);
// To guard against out of order packets

View File

@ -349,19 +349,31 @@ public:
DOUBLETAP_SLIDERIGHT
};
void setAlwaysRun() { mbAlwaysRun = true; }
void clearAlwaysRun() { mbAlwaysRun = false; }
void setRunning() { mbRunning = true; }
void clearRunning() { mbRunning = false; }
void sendWalkRun(bool running);
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
void setAlwaysRun();
void setTempRun();
void clearAlwaysRun();
void clearTempRun();
void sendWalkRun();
bool getTempRun() { return mbTempRun; }
bool getRunning() const { return (mbAlwaysRun) || (mbTempRun); }
// [/RLVa:KB]
// void setAlwaysRun() { mbAlwaysRun = true; }
// void clearAlwaysRun() { mbAlwaysRun = false; }
// void setRunning() { mbRunning = true; }
// void clearRunning() { mbRunning = false; }
// void sendWalkRun(bool running);
bool getAlwaysRun() const { return mbAlwaysRun; }
bool getRunning() const { return mbRunning; }
// bool getRunning() const { return mbRunning; }
public:
LLFrameTimer mDoubleTapRunTimer;
EDoubleTapRunMode mDoubleTapRunMode;
private:
bool mbAlwaysRun; // Should the avatar run by default rather than walk?
bool mbRunning; // Is the avatar trying to run right now?
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
bool mbTempRun;
// [/RLVa:KB]
// bool mbRunning; // Is the avatar trying to run right now?
bool mbTeleportKeepsLookAt; // Try to keep look-at after teleport is complete
//--------------------------------------------------------------------

View File

@ -48,6 +48,9 @@
#include "llvoavatarself.h"
#include "llwindow.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-05-10 (RLVa-1.2.0g)
#include "rlvhandler.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
@ -2256,6 +2259,13 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
return;
}
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
return;
}
// [/RLVa:KB]
gAgent.standUp(); // force stand up
gViewerWindow->getWindow()->resetBusyCount();

View File

@ -43,6 +43,10 @@
#include "lltoolgrab.h"
#include "llhudeffectlookat.h"
#include "llagentcamera.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "llvoavatarself.h"
// [/RLVa:KB]
LLAgentListener::LLAgentListener(LLAgent &agent)
: LLEventAPI("LLAgent",
@ -168,8 +172,28 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
object = findObjectClosestTo(target_position);
}
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.1.0j
// TODO-RLVa: [RLVa-1.2.1] Figure out how to call this?
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canSit(object)) )
{
return;
}
// [/RLVa:KB]
if (object && object->getPCode() == LL_PCODE_VOLUME)
{
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_STANDTP)) && (isAgentAvatarValid()) )
{
if (gAgentAvatarp->isSitting())
{
gAgent.standUp();
return;
}
gRlvHandler.setSitSource(gAgent.getPositionGlobal());
}
// [/RLVa:KB]
gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, mAgent.getID());
@ -189,6 +213,14 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
void LLAgentListener::requestStand(LLSD const & event_data) const
{
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// TODO-RLVa: [RLVa-1.2.1] Figure out how to call this?
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) )
{
return;
}
// [/RLVa:KB]
mAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}

View File

@ -38,6 +38,9 @@
#include "llviewerparcelmgr.h"
#include "llvoavatarself.h"
#include "llslurl.h"
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
//static
void LLAgentUI::buildFullname(std::string& name)
@ -99,6 +102,18 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
// create a default name and description for the landmark
std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
std::string region_name = region->getName();
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
// RELEASE-RLVa: [SL-2.0.0] Check ELocationFormat to make sure our switch still makes sense
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
parcel_name = RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL);
region_name = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
if (LOCATION_FORMAT_NO_MATURITY == fmt)
fmt = LOCATION_FORMAT_LANDMARK;
else if (LOCATION_FORMAT_FULL == fmt)
fmt = LOCATION_FORMAT_NO_COORDS;
}
// [/RLVa:KB]
std::string sim_access_string = region->getSimAccessString();
std::string buffer;
if( parcel_name.empty() )

View File

@ -49,6 +49,10 @@
#include "llvoavatarself.h"
#include "llwearable.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
#include <boost/scoped_ptr.hpp>
@ -763,12 +767,28 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable
llwarns << "Null wearable sent for type " << type << llendl;
return MAX_CLOTHING_PER_TYPE;
}
if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
// if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
// {
// mWearableDatas[type].push_back(wearable);
// wearableUpdated(wearable);
// checkWearableAgainstInventory(wearable);
// return mWearableDatas[type].size()-1;
// }
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (type < LLWearableType::WT_COUNT) && (mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE) )
{
mWearableDatas[type].push_back(wearable);
// Don't add the same wearable twice
U32 idxWearable = getWearableIndex(wearable);
RLV_ASSERT(MAX_CLOTHING_PER_TYPE == idxWearable); // pushWearable() on an already added wearable is a bug *somewhere*
if (MAX_CLOTHING_PER_TYPE == idxWearable)
{
mWearableDatas[type].push_back(wearable);
idxWearable = mWearableDatas[type].size() - 1;
}
wearableUpdated(wearable);
checkWearableAgainstInventory(wearable);
return mWearableDatas[type].size()-1;
return idxWearable;
// [/RLVa:KB]
}
return MAX_CLOTHING_PER_TYPE;
}
@ -926,6 +946,30 @@ const LLUUID LLAgentWearables::getWearableItemID(LLWearableType::EType type, U32
return LLUUID();
}
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
void LLAgentWearables::getWearableItemIDs(uuid_vec_t& idItems) const
{
for (wearableentry_map_t::const_iterator itWearableType = mWearableDatas.begin();
itWearableType != mWearableDatas.end(); ++itWearableType)
{
getWearableItemIDs(itWearableType->first, idItems);
}
}
void LLAgentWearables::getWearableItemIDs(LLWearableType::EType eType, uuid_vec_t& idItems) const
{
wearableentry_map_t::const_iterator itWearableType = mWearableDatas.find(eType);
if (mWearableDatas.end() != itWearableType)
{
for (wearableentry_vec_t::const_iterator itWearable = itWearableType->second.begin(), endWearable = itWearableType->second.end();
itWearable != endWearable; ++itWearable)
{
idItems.push_back((*itWearable)->getItemID());
}
}
}
// [/RLVa:KB]
const LLUUID LLAgentWearables::getWearableAssetID(LLWearableType::EType type, U32 index) const
{
const LLWearable *wearable = getWearable(type,index);
@ -1299,7 +1343,11 @@ void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_
{
LLWearable* old_wearable = getWearable(type,index);
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-11 (RLVa-1.2.0c) | Modified: RLVa-1.2.0g
// NOTE: we block actual removal in removeWearableFinal(); all we really want here is to avoid showing the save notice
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
if (old_wearable->isDirty())
{
@ -1357,20 +1405,30 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
{
LLWearable* old_wearable = getWearable(type,i);
//queryWearableCache(); // moved below
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
}
}
mWearableDatas[type].clear();
// mWearableDatas[type].clear();
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
// The line above shouldn't be needed and would cause issues if we block removing one of the wearables
RLV_VERIFY( ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.hasLockedWearable(type))) ? mWearableDatas[type].empty() : true );
// [/RLVa:KB]
}
else
{
LLWearable* old_wearable = getWearable(type, index);
//queryWearableCache(); // moved below
if (old_wearable)
// if (old_wearable)
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
if ( (old_wearable) && ((!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.isLockedWearable(old_wearable))) )
// [/RLVa:KB]
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
@ -1408,6 +1466,12 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
S32 count = wearables.count();
llassert(items.count() == count);
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
// If the user is @add/remoutfit restricted in any way then this function won't just work as-is, so instead of removing and re-adding
// we're stuck with any wearable type potentially having left-over (remove locked) clothing that we'll need to reorder in-place
S32 idxCurPerType[LLWearableType::WT_COUNT] = { 0 };
// [/RLVa:KB]
S32 i;
for (i = 0; i < count; i++)
{
@ -1427,10 +1491,51 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// exactly one wearable per body part
setWearable(type,0,new_wearable);
}
else
// else
// {
// pushWearable(type,new_wearable);
// }
// [RLVa:KB] - Checked: 2010-06-08 (RLVa-1.2.0g) | Added: RLVa-1.2.0g
else if ( (!rlv_handler_t::isEnabled()) || (!gRlvWearableLocks.hasLockedWearable(type)) || (!remove) )
{
// Sanity check: there shouldn't be any worn wearables for this type the first time we encounter it
RLV_ASSERT( (!remove) || (0 != idxCurPerType[type]) || (0 == getWearableCount(type)) );
pushWearable(type,new_wearable);
}
else
{
// Get the current index of the wearable (or add it if doesn't exist yet)
S32 idxCur = getWearableIndex(new_wearable);
if (MAX_CLOTHING_PER_TYPE == idxCur)
{
// Skip adding if @addoutfit=n restricted *unless* the wearable made it into COF [see LLAppMgr::updateAgentWearables()]
if ( (RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(type)) &&
(!gInventory.isObjectDescendentOf(new_item->getUUID(), LLAppearanceMgr::instance().getCOF())) )
{
continue;
}
idxCur = pushWearable(type,new_wearable);
}
// Since we're moving up from index 0 we just swap the two wearables and things will work out in the end (hopefully)
if (idxCurPerType[type] != idxCur)
{
wearableentry_map_t::iterator itWearable = mWearableDatas.find(type);
RLV_ASSERT(itWearable != mWearableDatas.end());
if (itWearable == mWearableDatas.end()) continue;
wearableentry_vec_t& typeWearable = itWearable->second;
RLV_ASSERT(typeWearable.size() >= 2);
if (typeWearable.size() < 2) continue;
typeWearable[idxCur] = typeWearable[idxCurPerType[type]];
typeWearable[idxCurPerType[type]] = new_wearable;
//wearableUpdated(new_wearable);
//checkWearableAgainstInventory(new_wearable);
}
}
idxCurPerType[type]++;
// [/RLVa:KB]
wearableUpdated(new_wearable);
checkWearableAgainstInventory(new_wearable);
}
@ -1477,6 +1582,16 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne
const LLWearableType::EType type = new_wearable->getType();
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0a) | Modified: RLVa-1.2.0g
// TODO-RLVa: [RLVa-1.2.1] This looks like dead code in SL-2.0.2 so we can't really check to see if it works :|
if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWear = gRlvWearableLocks.canWear(type);
if ( (RLV_WEAR_LOCKED == eWear) || ((!do_append) && (!(eWear & RLV_WEAR_REPLACE))) )
return;
}
// [/RLVa:KB]
if (!do_append)
{
// Remove old wearable, if any
@ -1680,24 +1795,24 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur
// User has picked "remove from avatar" from a menu.
// static
void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index)
{
if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
//!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
{
gAgentWearables.removeWearable(type,false,index);
}
}
//void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index)
//{
// if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
// //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
// {
// gAgentWearables.removeWearable(type,false,index);
// }
//}
//static
void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type)
{
if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
//!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
{
gAgentWearables.removeWearable(type,true,0);
}
}
//void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &type)
//{
// if (!(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES)) //&&
// //!((!gAgent.isTeen()) && (type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT)))
// {
// gAgentWearables.removeWearable(type,true,0);
// }
//}
// Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to
// get attachments into desired state with minimal number of adds/removes.
@ -1785,6 +1900,34 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
{
if (!isAgentAvatarValid()) return;
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Check our callers and verify that erasing elements from the passed vector won't break random things
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) )
{
llvo_vec_t::iterator itObj = objects_to_remove.begin();
while (itObj != objects_to_remove.end())
{
const LLViewerObject* pAttachObj = *itObj;
if (gRlvAttachmentLocks.isLockedAttachment(pAttachObj))
{
itObj = objects_to_remove.erase(itObj);
// Fall-back code: re-add the attachment if it got removed from COF somehow (compensates for possible bugs elsewhere)
LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items;
LLLinkedItemIDMatches f(pAttachObj->getAttachmentItemID());
gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), folders, items, LLInventoryModel::EXCLUDE_TRASH, f);
RLV_ASSERT( 0 != items.count() );
if (0 == items.count())
LLAppearanceMgr::instance().registerAttachment(pAttachObj->getAttachmentItemID());
}
else
{
++itObj;
}
}
}
// [/RLVa:KB]
if (objects_to_remove.empty())
return;
@ -1831,6 +1974,25 @@ void LLAgentWearables::userRemoveAllAttachments()
void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
static bool sInitialAttachmentsRequested = false;
// RELEASE-RLVa: [SL-2.5.2] Check our callers and verify that erasing elements from the passed vector won't break random things
if ( (rlv_handler_t::isEnabled()) && (sInitialAttachmentsRequested) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
// Fall-back code: everything should really already have been pruned before we get this far
for (S32 idxItem = obj_item_array.count() - 1; idxItem >= 0; idxItem--)
{
const LLInventoryItem* pItem = obj_item_array.get(idxItem).get();
if (!gRlvAttachmentLocks.canAttach(pItem))
{
obj_item_array.remove(idxItem);
RLV_ASSERT(false);
}
}
}
// [/RLVa:KB]
// Build a compound message to send all the objects that need to be rezzed.
S32 obj_count = obj_item_array.count();
@ -1868,6 +2030,12 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
if ( (rlv_handler_t::isEnabled()) && (sInitialAttachmentsRequested) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
RlvAttachmentLockWatchdog::instance().onWearAttachment(item, RLV_WEAR_ADD);
}
// [/RLVa:KB]
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
msg->addStringFast(_PREHASH_Name, item->getName());
msg->addStringFast(_PREHASH_Description, item->getDescription());
@ -1878,6 +2046,10 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->sendReliable( gAgent.getRegion()->getHost() );
}
}
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
sInitialAttachmentsRequested = true;
// [/RLVa:KB]
}
void LLAgentWearables::checkWearablesLoaded() const

View File

@ -93,6 +93,10 @@ public:
// Accessors
//--------------------------------------------------------------------
public:
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
void getWearableItemIDs(uuid_vec_t& idItems) const;
void getWearableItemIDs(LLWearableType::EType eType, uuid_vec_t& idItems) const;
// [/RLVa:KB]
const LLUUID getWearableItemID(LLWearableType::EType type, U32 index /*= 0*/) const;
const LLUUID getWearableAssetID(LLWearableType::EType type, U32 index /*= 0*/) const;
const LLWearable* getWearableFromItemID(const LLUUID& item_id) const;
@ -211,8 +215,8 @@ public:
// Static UI hooks
//--------------------------------------------------------------------
public:
static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index);
static void userRemoveWearablesOfType(const LLWearableType::EType &type);
// static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index);
// static void userRemoveWearablesOfType(const LLWearableType::EType &type);
typedef std::vector<LLViewerObject*> llvo_vec_t;

View File

@ -36,6 +36,9 @@
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2011-09-10 (Catznip-3.0.0a)
#include "llviewercontrol.h"
// [/SL:KB]
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2c)
#include "rlvhelper.h"
// [/RLVa:KB]
class LLOrderMyOutfitsOnDestroy: public LLInventoryCallback
{
@ -102,7 +105,14 @@ void LLInitialWearablesFetch::done()
// gInventory.notifyObservers. The results will be handled in the next
// idle tick instead.
gInventory.removeObserver(this);
doOnIdleOneTime(boost::bind(&LLInitialWearablesFetch::processContents,this));
// doOnIdleOneTime(boost::bind(&LLInitialWearablesFetch::processContents,this));
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
F32 nDelay = gSavedSettings.getF32("ForceInitialCOFDelay");
if (0.0f == nDelay)
doOnIdleOneTime(boost::bind(&LLInitialWearablesFetch::processContents,this));
else
rlvCallbackTimerOnce(nDelay, boost::bind(&LLInitialWearablesFetch::processContents,this));
// [/RLVa:KB]
}
void LLInitialWearablesFetch::add(InitialWearableData &data)

View File

@ -49,6 +49,11 @@
#include "llvoavatarself.h"
#include "llviewerregion.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvhelper.h"
#include "rlvlocks.h"
// [/RLVa:KB]
// RAII thingy to guarantee that a variable gets reset when the Setter
// goes out of scope. More general utility would be handy - TODO:
@ -915,6 +920,23 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
items = new_items;
}
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items)
{
std::set<LLUUID> idsAsset;
for (S32 idxItem = items.count() - 1; idxItem >= 0; idxItem--)
{
const LLViewerInventoryItem* pItem = items.get(idxItem);
if (!pItem->isWearableType())
continue;
if (idsAsset.end() == idsAsset.find(pItem->getAssetUUID()))
idsAsset.insert(pItem->getAssetUUID());
else
items.remove(idxItem);
}
}
// [/SL:KB]
const LLUUID LLAppearanceMgr::getCOF() const
{
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@ -1025,6 +1047,33 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
return false;
}
// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
if ( (rlv_handler_t::isEnabled()) &&
((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) )
{
switch (item_to_wear->getType())
{
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
{
ERlvWearMask eWear = gRlvWearableLocks.canWear(item_to_wear);
if ( (RLV_WEAR_LOCKED == eWear) || ((replace) && ((RLV_WEAR_REPLACE & eWear) == 0)) )
return false;
}
break;
case LLAssetType::AT_OBJECT:
{
ERlvWearMask eWear = gRlvAttachmentLocks.canAttach(item_to_wear);
if ( (RLV_WEAR_LOCKED == eWear) || ((replace) && ((RLV_WEAR_REPLACE & eWear) == 0)) )
return false;
}
break;
default:
return false;
}
}
// [/RLVa:KB]
switch (item_to_wear->getType())
{
case LLAssetType::AT_CLOTHING:
@ -1397,6 +1446,45 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
}
}
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void LLAppearanceMgr::syncCOF(const LLInventoryModel::item_array_t& items, LLAssetType::EType type, LLPointer<LLInventoryCallback> cb)
{
const LLUUID idCOF = getCOF();
LLInventoryModel::item_array_t cur_cof_items, new_cof_items = items;
// Grab the current COF contents
LLIsType f(type);
LLInventoryModel::cat_array_t cats;
gInventory.collectDescendentsIf(getCOF(), cats, cur_cof_items, LLInventoryModel::EXCLUDE_TRASH, f);
// Purge everything in cur_cof_items that isn't part of new_cof_items
for (S32 idxCurItem = 0, cntCurItem = cur_cof_items.count(); idxCurItem < cntCurItem; idxCurItem++)
{
const LLViewerInventoryItem* pItem = cur_cof_items.get(idxCurItem);
if (std::find_if(new_cof_items.begin(), new_cof_items.end(), RlvPredIsEqualOrLinkedItem(pItem)) == new_cof_items.end())
{
// Item doesn't exist in new_cof_items => purge (if it's a link)
if (pItem->getIsLinkType())
gInventory.purgeObject(pItem->getUUID());
}
else
{
// Item exists in new_cof_items => remove *all* occurances in new_cof_items (removes duplicate COF links to this item as well)
new_cof_items.erase(
std::remove_if(new_cof_items.begin(), new_cof_items.end(), RlvPredIsEqualOrLinkedItem(pItem)), new_cof_items.end());
}
}
// Link to whatever remains in new_cof_items
for (S32 idxNewItem = 0, cntNewItem = new_cof_items.count(); idxNewItem < cntNewItem; idxNewItem++)
{
const LLInventoryItem* pItem = new_cof_items.get(idxNewItem);
link_inventory_item(
gAgent.getID(), pItem->getLinkedUUID(), idCOF, pItem->getName(), pItem->LLInventoryItem::getDescription(), LLAssetType::AT_LINK, cb);
}
}
// [/SL:KB]
// Keep the last N wearables of each type. For viewer 2.0, N is 1 for
// both body parts and clothing items.
void LLAppearanceMgr::filterWearableItems(
@ -1449,10 +1537,31 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
}
}
//void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
LLInventoryModel::item_array_t body_items_new, wear_items_new, obj_items_new, gest_items_new;
getDescendentsOfAssetType(category, body_items_new, LLAssetType::AT_BODYPART, false);
getDescendentsOfAssetType(category, wear_items_new, LLAssetType::AT_CLOTHING, false);
getDescendentsOfAssetType(category, obj_items_new, LLAssetType::AT_OBJECT, false);
getDescendentsOfAssetType(category, gest_items_new, LLAssetType::AT_GESTURE, false);
updateCOF(body_items_new, wear_items_new, obj_items_new, gest_items_new, append, category);
}
void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
LLInventoryModel::item_array_t& wear_items_new,
LLInventoryModel::item_array_t& obj_items_new,
LLInventoryModel::item_array_t& gest_items_new,
bool append /*=false*/, const LLUUID& idOutfit /*=LLUUID::null*/)
// [/RLVa:KB]
{
// LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
// llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
// RELEASE-RLVa: [SL-2.0.0] If pcat ever gets used for anything further down the beta we'll know about it
llinfos << "starting" << llendl;
// [/RLVa:KB]
const LLUUID cof = getCOF();
@ -1473,75 +1582,146 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Collect and filter descendents to determine new COF contents.
// - Body parts: always include COF contents as a fallback in case any
// required parts are missing.
//
// - Body parts: always include COF contents as a fallback in case any required parts are missing.
//
// Preserve body parts from COF if appending.
LLInventoryModel::item_array_t body_items;
getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART, false);
getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
if (append)
reverse(body_items.begin(), body_items.end());
// getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
// Filter out any new body parts that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
body_items_new.erase(std::remove_if(body_items_new.begin(), body_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR_REPLACE)), body_items_new.end());
body_items.insert(body_items.end(), body_items_new.begin(), body_items_new.end());
// [/RLVa:KB]
// NOTE-RLVa: we don't actually want to favour COF body parts over the folder's body parts (if only because it breaks force wear)
// if (append)
// reverse(body_items.begin(), body_items.end());
// Reduce body items to max of one per type.
removeDuplicateItems(body_items);
filterWearableItems(body_items, 1);
//
// - Wearables: include COF contents only if appending.
//
LLInventoryModel::item_array_t wear_items;
if (append)
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING, false);
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
{
// Make sure that all currently locked clothing layers remain in COF when replacing
getDescendentsOfAssetType(cof, wear_items, LLAssetType::AT_CLOTHING, false);
wear_items.erase(std::remove_if(wear_items.begin(), wear_items.end(), rlvPredCanRemoveItem), wear_items.end());
}
// [/RLVa:KB]
// getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0b
// Filter out any new wearables that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) )
wear_items_new.erase(std::remove_if(wear_items_new.begin(), wear_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), wear_items_new.end());
wear_items.insert(wear_items.end(), wear_items_new.begin(), wear_items_new.end());
// [/RLVa:KB]
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
removeDuplicateWearableItemsByAssetID(wear_items);
// [/SL:KB]
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE);
//
// - Attachments: include COF contents only if appending.
//
LLInventoryModel::item_array_t obj_items;
if (append)
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT, false);
getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
else if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
// Make sure that all currently locked attachments remain in COF when replacing
getDescendentsOfAssetType(cof, obj_items, LLAssetType::AT_OBJECT, false);
obj_items.erase(std::remove_if(obj_items.begin(), obj_items.end(), rlvPredCanRemoveItem), obj_items.end());
}
// [/RLVa:KB]
// getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
// Filter out any new attachments that can't be worn before adding them
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
obj_items_new.erase(std::remove_if(obj_items_new.begin(), obj_items_new.end(), RlvPredCanNotWearItem(RLV_WEAR)), obj_items_new.end());
obj_items.insert(obj_items.end(), obj_items_new.begin(), obj_items_new.end());
// [/RLVa:KB]
removeDuplicateItems(obj_items);
//
// - Gestures: include COF contents only if appending.
//
LLInventoryModel::item_array_t gest_items;
if (append)
getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false);
getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE, false);
// getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE, false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Added: RLVa-1.2.0b
gest_items.insert(gest_items.end(), gest_items_new.begin(), gest_items_new.end());
// [/RLVa:KB]
removeDuplicateItems(gest_items);
// Remove current COF contents.
bool keep_outfit_links = append;
purgeCategory(cof, keep_outfit_links);
gInventory.notifyObservers();
// Create links to new COF contents.
llinfos << "creating LLUpdateAppearanceOnDestroy" << llendl;
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking body items" << llendl;
#endif
linkAll(cof, body_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking wear items" << llendl;
#endif
linkAll(cof, wear_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking obj items" << llendl;
#endif
linkAll(cof, obj_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking gesture items" << llendl;
#endif
linkAll(cof, gest_items, link_waiter);
// Add link to outfit if category is an outfit.
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (!append)
{
createBaseOutfitLink(category, link_waiter);
// [/SL:KB]
// Remove current COF contents.
bool keep_outfit_links = append;
purgeCategory(cof, keep_outfit_links);
gInventory.notifyObservers();
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking body items" << llendl;
#endif
linkAll(cof, body_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking wear items" << llendl;
#endif
linkAll(cof, wear_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking obj items" << llendl;
#endif
linkAll(cof, obj_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
llinfos << "Linking gesture items" << llendl;
#endif
linkAll(cof, gest_items, link_waiter);
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
}
else
{
// Synchronize COF
// -> it's possible that we don't link to any new items in which case 'link_waiter' fires when it goes out of scope below
syncCOF(body_items, LLAssetType::AT_BODYPART, link_waiter);
syncCOF(wear_items, LLAssetType::AT_CLOTHING, link_waiter);
syncCOF(obj_items, LLAssetType::AT_OBJECT, link_waiter);
syncCOF(gest_items, LLAssetType::AT_GESTURE, link_waiter);
gInventory.notifyObservers();
}
// [/SL:KB]
// Add link to outfit if category is an outfit.
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Added: RLVa-1.2.0b
if ( (!append) && (idOutfit.notNull()) )
{
createBaseOutfitLink(idOutfit, link_waiter);
}
// [/RLVa:KB]
// if (!append)
// {
// createBaseOutfitLink(category, link_waiter);
// }
llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
}
@ -1578,6 +1758,14 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
lldebugs << "updateAgentWearables()" << llendl;
LLInventoryItem::item_array_t items;
LLDynamicArray< LLWearable* > wearables;
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
uuid_vec_t idsCurrent; LLInventoryModel::item_array_t itemsNew;
if (rlv_handler_t::isEnabled())
{
// Collect the item UUIDs of all currently worn wearables
gAgentWearables.getWearableItemIDs(idsCurrent);
}
// [/RLVa:KB]
// For each wearable type, find the wearables of that type.
for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ )
@ -1592,13 +1780,60 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID);
if( item && (item->getAssetUUID() == wearable->getAssetID()) )
{
// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
// TODO-RLVa: [RLVa-1.2.1] This is fall-back code so if we don't ever trigger this code it can just be removed
// -> one way to trigger the assertion:
// 1) "Replace Outfit" on a folder with clothing and an attachment that goes @addoutfit=n
// 2) updateCOF will add/link the items into COF => no @addoutfit=n present yet => allowed
// 3) llOwnerSay("@addoutfit=n") executes
// 4) code below runs => @addoutfit=n conflicts with adding new wearables
// => if it's left as-is then the wearables won't get worn (but remain in COF which causes issues of its own)
// => if it's changed to debug-only then we make tge assumption that anything that makes it into COF is always OK
#ifdef RLV_DEBUG
// NOTE: make sure we don't accidentally block setting the initial wearables
if ( (rlv_handler_t::isEnabled()) && (RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(wearable->getType())) &&
(!gAgentWearables.getWearableFromItemID(item->getUUID())) && (gAgentWearables.areWearablesLoaded()) )
{
RLV_VERIFY(RLV_WEAR_LOCKED == gRlvWearableLocks.canWear(wearable->getType()));
continue;
}
#endif // RLV_DEBUG
// [/RLVa:KB]
items.put(item);
wearables.put(wearable);
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
if ( (rlv_handler_t::isEnabled()) && (gAgentWearables.areInitalWearablesLoaded()) )
{
// Remove the wearable from current item UUIDs if currently worn and requested, otherwise mark it as a new item
uuid_vec_t::iterator itItemID = std::find(idsCurrent.begin(), idsCurrent.end(), item->getUUID());
if (idsCurrent.end() != itItemID)
idsCurrent.erase(itItemID);
else
itemsNew.push_back(item);
}
// [/RLVa:KB]
}
}
}
}
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
if ( (rlv_handler_t::isEnabled()) && (gAgentWearables.areInitalWearablesLoaded()) )
{
// We need to report removals before additions or scripts will get confused
for (uuid_vec_t::const_iterator itItemID = idsCurrent.begin(); itItemID != idsCurrent.end(); ++itItemID)
{
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(*itItemID);
if (pWearable)
RlvBehaviourNotifyHandler::onTakeOff(pWearable->getType(), true);
}
for (S32 idxItem = 0, cntItem = itemsNew.count(); idxItem < cntItem; idxItem++)
{
RlvBehaviourNotifyHandler::onWear(itemsNew.get(idxItem)->getWearableType(), true);
}
}
// [/RLVa:KB]
if(wearables.count() > 0)
{
gAgentWearables.setWearableOutfit(items, wearables, !append);
@ -1752,6 +1987,10 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
removeDuplicateItems(gest_items);
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE);
// [/SL:KB]
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
// Wearing two wearables that share the same asset causes some issues
removeDuplicateWearableItemsByAssetID(wear_items);
// [/SL:KB]
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
@ -1813,6 +2052,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
// fetch failures (should be replaced by new defaults in
// lost&found).
U32 skip_type = gSavedSettings.getU32("ForceAssetFail");
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c
U32 missing_type = gSavedSettings.getU32("ForceMissingType");
// [/RLVa:KB]
if (item && item->getIsLinkType() && linked_item)
{
@ -1823,10 +2065,25 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID
);
if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType)
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
#ifdef LL_RELEASE_FOR_DOWNLOAD
// Don't allow forcing an invalid wearable if the initial wearables aren't set yet, or if any wearable type is currently locked
if ( (!rlv_handler_t::isEnabled()) ||
((gAgentWearables.areInitalWearablesLoaded()) && (!gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_REMOVE))) )
#endif // LL_RELEASE_FOR_DOWNLOAD
{
found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB
if (missing_type != LLWearableType::WT_INVALID && missing_type == found.mWearableType)
{
continue;
}
// [/RLVa:KB]
if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType)
{
found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB
}
// [RLVa:KB] - Checked: 2010-12-15 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
}
// [/RLVa:KB]
//pushing back, not front, to preserve order of wearables for LLAgentWearables
holder->getFoundList().push_back(found);
}
@ -2191,6 +2448,13 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
// MULTI-WEARABLES: make sure we don't go over MAX_CLOTHING_PER_TYPE
gInventory.purgeObject(inv_item->getUUID());
}
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
else if ( (vitem->getWearableType() == wearable_type) && (vitem->getAssetUUID() == inv_item->getAssetUUID()) )
{
// Only allow one wearable per unique asset
linked_already = true;
}
// [/SL:KB]
}
}
@ -2713,6 +2977,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
// LLWearableBridge::removeItemFromAvatar(item_to_remove);
// }
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d
// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
if ( (!rlv_handler_t::isEnabled()) || (gRlvWearableLocks.canRemove(item_to_remove)) )
// [/RLVa:KB]
{
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) )
@ -2724,6 +2991,10 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
LLAppearanceMgr::instance().removeCOFItemLinks(item_to_remove->getLinkedUUID(), false);
gInventory.notifyObservers();
// [RLVa:KB] - Checked: 2011-06-07 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
RlvBehaviourNotifyHandler::onTakeOff(pWearable->getType(), true);
// [/RLVa:KB]
}
}
}

View File

@ -56,6 +56,11 @@ public:
// [/SL:KB]
bool needToSaveCOF();
void updateCOF(const LLUUID& category, bool append = false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void updateCOF(LLInventoryModel::item_array_t& body_items_new, LLInventoryModel::item_array_t& wear_items_new,
LLInventoryModel::item_array_t& obj_items_new, LLInventoryModel::item_array_t& gest_items_new,
bool append = false, const LLUUID& idOutfit = LLUUID::null);
// [/RLVa:KB]
void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append);
void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append);
void wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append);
@ -211,6 +216,10 @@ private:
void setOutfitLocked(bool locked);
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
void syncCOF(const LLInventoryModel::item_array_t& items, LLAssetType::EType type, LLPointer<LLInventoryCallback> cb);
// [/SL:KB]
bool mAttachmentInvLinkEnabled;
bool mOutfitIsDirty;
bool mIsInUpdateAppearanceFromCOF; // to detect recursive calls.

View File

@ -87,6 +87,10 @@
#include "lllogininstance.h"
#include "llprogressview.h"
#include "llvocache.h"
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llweb.h"
#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
@ -433,7 +437,15 @@ void idle_afk_check()
{
// check idle timers
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
// Enforce an idle time of 30 minutes if @allowidle=n restricted
F32 afk_timeout = (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? gSavedSettings.getS32("AFKTimeout") : 60 * 30;
#else
F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
{
LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;

View File

@ -33,7 +33,10 @@
#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "message.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
LLAttachmentsMgr::LLAttachmentsMgr()
{
@ -45,12 +48,35 @@ LLAttachmentsMgr::~LLAttachmentsMgr()
void LLAttachmentsMgr::addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
const BOOL add)
// const BOOL add)
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
const BOOL add, const BOOL fRlvForce /*=FALSE*/)
// [/RLVa:KB]
{
AttachmentsInfo attachment;
attachment.mItemID = item_id;
attachment.mAttachmentPt = attachment_pt;
attachment.mAdd = add;
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1d) | Modified: RLVa-1.2.1d
if ( (rlv_handler_t::isEnabled()) && (!fRlvForce) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
const LLInventoryItem* pItem = gInventory.getItem(item_id);
if (!pItem)
return;
LLViewerJointAttachment* pAttachPt = NULL;
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(pItem, &pAttachPt);
if ( ((add) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((!add) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) )
return;
if ( (0 == attachment_pt) && (NULL != pAttachPt) )
attachment.mAttachmentPt = RlvAttachPtLookup::getAttachPointIndex(pAttachPt);
RlvAttachmentLockWatchdog::instance().onWearAttachment(pItem, (add) ? RLV_WEAR_ADD : RLV_WEAR_REPLACE);
attachment.mAdd = true;
}
// [/RLVa:KB]
mPendingAttachments.push_back(attachment);
}

View File

@ -54,7 +54,10 @@ public:
void addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
const BOOL add);
// const BOOL add);
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
const BOOL add, const BOOL fRlvForce = FALSE);
// [/RLVa:KB]
static void onIdle(void *);
protected:
void onIdle();

View File

@ -71,6 +71,9 @@
#include "llcallingcard.h"
#include "llslurl.h" // IDEVO
#include "llsidepanelinventory.h"
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
#include "rlvhandler.h"
// [/RLVa:KB]
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
@ -194,6 +197,19 @@ void LLAvatarActions::startIM(const LLUUID& id)
if (id.isNull())
return;
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(id)) )
{
LLUUID idSession = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
if ( (idSession.notNull()) && (!gIMMgr->hasSession(idSession)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
return;
}
}
// [/RLVa:KB]
LLAvatarNameCache::get(id,
boost::bind(&on_avatar_name_cache_start_im, _1, _2));
}
@ -230,6 +246,20 @@ void LLAvatarActions::startCall(const LLUUID& id)
{
return;
}
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(id)) )
{
LLUUID idSession = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
if ( (idSession.notNull()) && (!gIMMgr->hasSession(idSession)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
return;
}
}
// [/RLVa:KB]
LLAvatarNameCache::get(id,
boost::bind(&on_avatar_name_cache_start_call, _1, _2));
}
@ -246,7 +276,17 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids)
LLDynamicArray<LLUUID> id_array;
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
const LLUUID& idAgent = *it;
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(idAgent)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF, LLSD().with("RECIPIENT", LLSLURL("agent", idAgent, "completename").getSLURLString()));
return;
}
id_array.push_back(idAgent);
// [/RLVa:KB]
// id_array.push_back(*it);
}
// create the new ad hoc voice session
@ -291,7 +331,17 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
LLDynamicArray<LLUUID> id_array;
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
id_array.push_back(*it);
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
const LLUUID& idAgent = *it;
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(idAgent)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF, LLSD().with("RECIPIENT", LLSLURL("agent", idAgent, "completename").getSLURLString()));
return;
}
id_array.push_back(idAgent);
// [/RLVa:KB]
// id_array.push_back(*it);
}
const std::string title = LLTrans::getString("conference-title");
LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array);

View File

@ -305,3 +305,13 @@ void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarN
}
}
}
// [SL:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
BOOL LLAvatarIconCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
// Don't show our tooltip if we were asked not to
if (!mDrawTooltip)
return FALSE;
return LLIconCtrl::handleToolTip(x, y, mask);
}
// [/SL:KB]

View File

@ -81,6 +81,10 @@ protected:
public:
virtual ~LLAvatarIconCtrl();
// [SL:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
// [/SL:KB]
virtual void setValue(const LLSD& value);
// LLAvatarPropertiesProcessor observer trigger

View File

@ -46,6 +46,9 @@
#include "lluuid.h"
#include "llvoiceclient.h"
#include "llviewercontrol.h" // for gSavedSettings
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
@ -139,6 +142,9 @@ LLAvatarList::LLAvatarList(const Params& p)
, mShowProfileBtn(p.show_profile_btn)
, mShowSpeakingIndicator(p.show_speaking_indicator)
, mShowPermissions(p.show_permissions_granted)
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
, mRlvCheckShowNames(false)
// [/RLVa:KB]
{
setCommitOnSelectionChange(true);
@ -432,6 +438,9 @@ S32 LLAvatarList::notifyParent(const LLSD& info)
void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
item->setRlvCheckShowNames(mRlvCheckShowNames);
// [/RLVa:KB]
// This sets the name as a side effect
item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus);
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
@ -452,7 +461,10 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
if ( mContextMenu && !isAvalineItemSelected())
// if ( mContextMenu && !isAvalineItemSelected())
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
if ( (mContextMenu && !isAvalineItemSelected()) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) )
// [/RLVa:KB]
{
uuid_vec_t selected_uuids;
getSelectedUUIDs(selected_uuids);
@ -523,7 +535,11 @@ void LLAvatarList::updateLastInteractionTimes()
void LLAvatarList::onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
mItemDoubleClickSignal(ctrl, x, y, mask);
// mItemDoubleClickSignal(ctrl, x, y, mask);
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
if ( (!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
mItemDoubleClickSignal(ctrl, x, y, mask);
// [/RLVa:KB]
}
bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const

View File

@ -88,6 +88,12 @@ public:
// Return true if filter has at least one match.
bool filterHasMatches();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
// We need this to be public since we call it from RlvUIEnabler::onToggleShowNames()
void updateAvatarNames();
// [/RLVa:KB]
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
@ -108,7 +114,7 @@ protected:
void updateLastInteractionTimes();
void rebuildNames();
void onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
void updateAvatarNames();
// void updateAvatarNames();
private:
@ -123,6 +129,9 @@ private:
bool mShowProfileBtn;
bool mShowSpeakingIndicator;
bool mShowPermissions;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
LLTimer* mLITUpdateTimer; // last interaction time update timer
std::string mIconParamName;

View File

@ -38,6 +38,9 @@
#include "llavatarnamecache.h"
#include "llavatariconctrl.h"
#include "lloutputmonitorctrl.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
bool LLAvatarListItem::sStaticInitialized = false;
S32 LLAvatarListItem::sLeftPadding = 0;
@ -72,6 +75,9 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
mOnlineStatus(E_UNKNOWN),
mShowInfoBtn(true),
mShowProfileBtn(true),
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
mRlvCheckShowNames(false),
// [/RLVa:KB]
mShowPermissions(false),
mHovered(false)
{
@ -142,8 +148,12 @@ S32 LLAvatarListItem::notifyParent(const LLSD& info)
void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
getChildView("hovered_icon")->setVisible( true);
mInfoBtn->setVisible(mShowInfoBtn);
mProfileBtn->setVisible(mShowProfileBtn);
// mInfoBtn->setVisible(mShowInfoBtn);
// mProfileBtn->setVisible(mShowProfileBtn);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
mProfileBtn->setVisible( (mShowProfileBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
// [/RLVa:KB]
mHovered = true;
LLPanel::onMouseEnter(x, y, mask);
@ -321,12 +331,18 @@ void LLAvatarListItem::onProfileBtnClick()
BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if(mInfoBtn->getRect().pointInRect(x, y))
// if(mInfoBtn->getRect().pointInRect(x, y))
// [SL:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
if ( (mInfoBtn->getVisible()) && (mInfoBtn->getEnabled()) && (mInfoBtn->getRect().pointInRect(x, y)) )
// [/SL:KB]
{
onInfoBtnClick();
return TRUE;
}
if(mProfileBtn->getRect().pointInRect(x, y))
// if(mProfileBtn->getRect().pointInRect(x, y))
// [SL:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
if ( (mProfileBtn->getVisible()) && (mProfileBtn->getEnabled()) && (mProfileBtn->getRect().pointInRect(x, y)) )
// [/SL:KB]
{
onProfileBtnClick();
return TRUE;
@ -371,8 +387,15 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
{
setAvatarName(av_name.mDisplayName);
setAvatarToolTip(av_name.mUsername);
// setAvatarName(av_name.mDisplayName);
// setAvatarToolTip(av_name.mUsername);
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
setAvatarName( (!fRlvFilter) ? av_name.mDisplayName : RlvStrings::getAnonym(av_name) );
setAvatarToolTip( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) );
// TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
mAvatarIcon->setDrawTooltip(!fRlvFilter);
// [/RLVa:KB]
//requesting the list to resort
notifyParent(LLSD().with("sort", LLSD()));

View File

@ -103,6 +103,9 @@ public:
void setShowPermissions(bool show) { mShowPermissions = show; };
void showLastInteractionTime(bool show);
void setAvatarIconVisible(bool visible);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
// [/RLVa:KB]
const LLUUID& getAvatarId() const;
std::string getAvatarName() const;
@ -208,6 +211,9 @@ private:
//Speaker indicator and avatar name coords are translated accordingly
bool mShowInfoBtn;
bool mShowProfileBtn;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
/// indicates whether to show icons representing permissions granted
bool mShowPermissions;

View File

@ -315,6 +315,10 @@ void LLCallFloater::updateSession()
setVisible(true);
}
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mAvatarList->setRlvCheckShowNames(is_local_chat);
// [/RLVa:KB]
}
void LLCallFloater::refreshParticipantList()

View File

@ -75,6 +75,10 @@ public:
static void sOnCurrentChannelChanged(const LLUUID& session_id);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
LLAvatarList* getAvatarCallerList() { return mAvatarList; }
// [/RLVa:KB]
private:
typedef enum e_voice_controls_type
{

View File

@ -60,6 +60,9 @@
#include "llui.h"
#include "llviewermenu.h"
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Globals
@ -79,7 +82,10 @@ private:
};
extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
//extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
extern void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
// [/RLVa:KB]
//
// Functions
@ -472,7 +478,11 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
S32 length = raw_text.length();
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) )
// [/RLVa:KB]
{
gAgent.startTyping();
}
@ -584,6 +594,22 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
// RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional?
if ( (0 == channel) && (rlv_handler_t::isEnabled()) )
{
// Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
}
// [/RLVa:KB]
// Don't animate for chats people can't hear (chat to scripts)
if (animate && (channel == 0))
{

View File

@ -56,8 +56,10 @@
#include "llworld.h"
#include "lluiconstants.h"
#include "llstring.h"
#include "llviewercontrol.h"
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f)
#include "rlvcommon.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
@ -89,6 +91,10 @@ public:
LLSD payload;
payload["object_id"] = object_id;
payload["owner_id"] = query_map["owner"];
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
if (query_map.has("rlv_shownames"))
payload["rlv_shownames"] = query_map["rlv_shownames"];
// [/RLVa:KB]
payload["name"] = query_map["name"];
payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
payload["group_owned"] = query_map["groupowned"];
@ -103,6 +109,10 @@ class LLChatHistoryHeader: public LLPanel
public:
LLChatHistoryHeader()
: LLPanel(),
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
mShowContextMenu(true),
mShowInfoCtrl(true),
// [/RLVa:KB]
mPopupMenuHandleAvatar(),
mPopupMenuHandleObject(),
mAvatarID(),
@ -221,7 +231,11 @@ public:
void showInspector()
{
if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
// if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
// Don't double-click show the inspector if we're not showing the info control
if ( (!mShowInfoCtrl) || (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) ) return;
// [/RLVa:KB]
if (mSourceType == CHAT_SOURCE_OBJECT)
{
@ -281,9 +295,26 @@ public:
// Start with blank so sample data from XUI XML doesn't
// flash on the screen
user_name->setValue( LLSD() );
LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
// user_name->setValue( LLSD() );
// LLAvatarNameCache::get(mAvatarID,
// boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
if (!chat.mRlvNamesFiltered)
{
user_name->setValue( LLSD() );
LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
}
else
{
// If the agent's chat was subject to @shownames=n we should display their anonimized name
mFrom = chat.mFromName;
user_name->setValue(mFrom);
user_name->setToolTip(mFrom);
setToolTip(mFrom);
updateMinUserNameWidth();
}
// [/RLVa:KB]
}
else if (chat.mChatStyle == CHAT_STYLE_HISTORY ||
mSourceType == CHAT_SOURCE_AGENT)
@ -335,6 +366,15 @@ public:
if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull())
icon->setDrawTooltip(false);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
// Don't show the context menu, info control or avatar icon tooltip if this chat was subject to @shownames=n
if ( (chat.mRlvNamesFiltered) && ((CHAT_SOURCE_AGENT == mSourceType) || (CHAT_SOURCE_OBJECT == mSourceType)) )
{
mShowInfoCtrl = mShowContextMenu = false;
icon->setDrawTooltip(false);
}
// [/RLVa:KB]
switch (mSourceType)
{
case CHAT_SOURCE_AGENT:
@ -445,6 +485,10 @@ protected:
void showContextMenu(S32 x,S32 y)
{
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
if (!mShowContextMenu)
return;
// [/RLVa:KB]
if(mSourceType == CHAT_SOURCE_SYSTEM)
showSystemContextMenu(x,y);
if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_AGENT)
@ -495,7 +539,10 @@ protected:
void showInfoCtrl()
{
if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
// if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
if ( (!mShowInfoCtrl) || (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) ) return;
// [/RLVa:KB]
if (!sInfoCtrl)
{
@ -565,6 +612,10 @@ protected:
EChatSourceType mSourceType;
std::string mFrom;
LLUUID mSessionID;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
bool mShowContextMenu;
bool mShowInfoCtrl;
// [/RLVa:KB]
S32 mMinUserNameWidth;
const LLFontGL* mUserNameFont;
@ -791,8 +842,18 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull())
{
// for object IMs, create a secondlife:///app/objectim SLapp
std::string url = LLViewerChat::getSenderSLURL(chat, args);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// NOTE-RLVa: we don't need to do any @shownames or @showloc filtering here because we'll already have an existing URL
std::string url = chat.mURL;
RLV_ASSERT( (url.empty()) || (std::string::npos != url.find("objectim")) );
if ( (url.empty()) || (std::string::npos == url.find("objectim")) )
{
// [/RLVa:KB]
// for object IMs, create a secondlife:///app/objectim SLapp
/*std::string*/ url = LLViewerChat::getSenderSLURL(chat, args);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
}
// [/RLVa:KB]
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
@ -806,7 +867,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
// else if (chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
else if (chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log && !chat.mRlvNamesFiltered)
// [/RLVa:KB]
{
LLStyle::Params link_params(style_params);
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));

View File

@ -42,6 +42,10 @@
#include "llslurl.h"
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
static const S32 msg_left_offset = 10;
static const S32 msg_right_offset = 10;
static const S32 msg_height_pad = 5;
@ -177,7 +181,11 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
std::string fromName = notification["from"].asString(); // agent or object name
mFromID = notification["from_id"].asUUID(); // agent id or object id
mFromName = fromName;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mShowIconTooltip = notification.has("show_icon_tooltip") ? notification["show_icon_tooltip"].asBoolean() : true;
// [/RLVa:KB]
int sType = notification["source"].asInteger();
mSourceType = (EChatSourceType)sType;
@ -360,7 +368,10 @@ void LLNearbyChatToastPanel::draw()
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon", false);
if(icon)
{
icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
// icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
icon->setDrawTooltip( (mShowIconTooltip) && (mSourceType == CHAT_SOURCE_AGENT) );
// [/RLVa:KB]
if(mSourceType == CHAT_SOURCE_OBJECT)
icon->setValue(LLSD("OBJECT_Icon"));
else if(mSourceType == CHAT_SOURCE_SYSTEM)

View File

@ -46,6 +46,9 @@ protected:
LLNearbyChatToastPanel()
:
mIsDirty(false),
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mShowIconTooltip(true),
// [/RLVa:KB]
mSourceType(CHAT_SOURCE_OBJECT)
{};
public:
@ -89,6 +92,9 @@ private:
bool mIsDirty;
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
bool mShowIconTooltip;
// [/RLVa:KB]
};

View File

@ -30,6 +30,10 @@
#include "lldiriterator.h"
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
#include <boost/algorithm/string.hpp>
// [/RLVa:KB]
void LLDayCycleManager::getPresetNames(preset_name_list_t& names) const
{
names.clear();
@ -60,6 +64,18 @@ void LLDayCycleManager::getPresetNames(preset_name_list_t& user, preset_name_lis
}
}
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
const std::string& LLDayCycleManager::findPreset(const std::string& strPresetName)
{
for (dc_map_t::const_iterator itCycle = mDayCycleMap.begin(); itCycle != mDayCycleMap.end(); ++itCycle)
{
if (boost::iequals(itCycle->first, strPresetName))
return itCycle->first;
}
return LLStringUtil::null;
}
// [/RLVa:KB]
void LLDayCycleManager::getUserPresetNames(preset_name_list_t& user) const
{
preset_name_list_t sys; // unused

View File

@ -51,6 +51,9 @@ public:
void getPresetNames(preset_name_list_t& names) const;
void getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const;
void getUserPresetNames(preset_name_list_t& user) const;
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
const std::string& findPreset(const std::string& strPresetName);
// [/RLVa:KB]
bool getPreset(const std::string name, LLWLDayCycle& day_cycle) const;
bool getPreset(const std::string name, LLSD& day_cycle) const;

View File

@ -35,6 +35,10 @@
#include "llwaterparammanager.h"
#include "llwlhandlers.h"
#include "llwlparammanager.h"
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
#include <boost/algorithm/string.hpp>
#include "rlvhandler.h"
// [/RLVa:KB]
std::string LLEnvPrefs::getWaterPresetName() const
{
@ -484,7 +488,10 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
LLWLParamManager::instance().refreshRegionPresets();
// If using server settings, update managers.
if (getUseRegionSettings())
// if (getUseRegionSettings())
// [RLVa:KB] - Checked: 2011-08-29 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
if ( (getUseRegionSettings()) && (LLWLParamManager::getInstance()->mAnimator.getIsRunning()) )
// [/RLVa:KB]
{
updateManagersFromPrefs(mInterpNextChangeMessage);
}
@ -594,6 +601,13 @@ void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate)
void LLEnvManagerNew::updateManagersFromPrefs(bool interpolate)
{
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV))
{
return;
}
// [/RLVa:KB]
// Apply water settings.
updateWaterFromPrefs(interpolate);

View File

@ -43,6 +43,9 @@
#include "llviewerregion.h"
#include "llversioninfo.h"
#include "llweb.h"
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden library includes
#include "llaudioengine.h"
@ -274,6 +277,9 @@ LLSD LLFloaterAbout::getInfo()
}
#endif
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0a) | Added: RLVa-1.2.0e
info["RLV_VERSION"] = (rlv_handler_t::isEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)";
// [/RLVa:KB]
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
info["LIBCURL_VERSION"] = LLCurl::getVersionString();
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();

View File

@ -37,6 +37,9 @@
#include "llviewercontrol.h"
#include "llviewerregion.h" // getCapability()
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden libraries
#include "llavatarnamecache.h" // IDEVO
@ -255,6 +258,22 @@ void LLFloaterAvatarPicker::onRangeAdjust()
void LLFloaterAvatarPicker::onList()
{
getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
if (rlv_handler_t::isEnabled())
{
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
RLV_ASSERT( (pTabs) && (pNearMePanel) );
if ( (pTabs) && (pNearMePanel) )
{
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
pTabs->selectTabByName("SearchPanel");
}
}
// [/RLVa:KB]
}
void LLFloaterAvatarPicker::populateNearMe()
@ -510,7 +529,10 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
std::string avatar_name = selection->getColumn(0)->getValue().asString();
if (dest_agent_id.notNull() && dest_agent_id != gAgentID)
{
if (drop)
// if (drop)
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
if ( (drop) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStartIM(dest_agent_id)) ) )
// [/RLVa:KB]
{
// Start up IM before give the item
session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id);

View File

@ -41,6 +41,10 @@
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "llagent.h"
// [/RLVa:KB]
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
@ -113,7 +117,16 @@ void LLFloaterInspect::onClickCreatorProfile()
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
LLAvatarActions::showProfile(node->mPermissions->getCreator());
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
const LLUUID& idCreator = node->mPermissions->getCreator();
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
{
return;
}
LLAvatarActions::showProfile(idCreator);
// [/RLVa:KB]
}
}
}
@ -139,6 +152,10 @@ void LLFloaterInspect::onClickOwnerProfile()
if(node)
{
const LLUUID& owner_id = node->mPermissions->getOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(owner_id);
}
}
@ -148,8 +165,13 @@ void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
getChildView("button owner")->setEnabled(true);
// getChildView("button owner")->setEnabled(true);
// getChildView("button creator")->setEnabled(true);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
getChildView("button creator")->setEnabled(true);
// [/RLVa:KB]
}
}
@ -224,7 +246,12 @@ void LLFloaterInspect::refresh()
// actual name and set a placeholder.
if (LLAvatarNameCache::get(idOwner, &av_name))
{
owner_name = av_name.getCompleteName();
// owner_name = av_name.getCompleteName();
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idOwner != gAgent.getID()) &&
(!obj->mPermissions->isGroupOwned());
owner_name = (!fRlvFilterOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
}
else
{
@ -234,14 +261,21 @@ void LLFloaterInspect::refresh()
if (LLAvatarNameCache::get(idCreator, &av_name))
{
creator_name = av_name.getCompleteName();
// creator_name = av_name.getCompleteName();
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
const LLUUID& idCreator = obj->mPermissions->getCreator();
LLAvatarNameCache::get(idCreator, &av_name);
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idCreator != gAgent.getID()) &&
( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) );
creator_name = (!fRlvFilterCreator) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
}
else
{
creator_name = LLTrans::getString("RetrievingData");
LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
}
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
row["columns"][0]["type"] = "text";

View File

@ -106,6 +106,9 @@
#include "llpluginclassmedia.h"
#include "llteleporthistorystorage.h"
#include "llproxy.h"
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lllogininstance.h" // to check if logged in yet
#include "llsdserialize.h"
@ -1000,6 +1003,11 @@ void LLFloaterPreference::refreshEnabledState()
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
if (rlv_handler_t::isEnabled())
childSetEnabled("busy_response", !gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM));
// [/RLVa:KB]
// Reflections
BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable")
&& gGLManager.mHasCubeMap
@ -1043,8 +1051,14 @@ void LLFloaterPreference::refreshEnabledState()
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
// "Basic Shaders" can't be disabled - but can be enabled - under @setenv=n
bool fCtrlShaderEnable = LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable");
ctrl_shader_enable->setEnabled(
fCtrlShaderEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("VertexShaderEnable"))) );
// [/RLVa:KB]
BOOL shaders = ctrl_shader_enable->get();
if (shaders)
{
@ -1061,7 +1075,13 @@ void LLFloaterPreference::refreshEnabledState()
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
// ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
// "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
bool fCtrlWindLightEnable = fCtrlShaderEnable && shaders;
ctrl_wind_light->setEnabled(
fCtrlWindLightEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders"))) );
// [/RLVa:KB]
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");

View File

@ -58,6 +58,9 @@
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPropertiesObserver
@ -278,6 +281,16 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
getChildView("BtnCreator")->setEnabled(TRUE);
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
// If the object creator matches the object owner we need to anonymize the creator field as well
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
{
childSetEnabled("BtnCreator", FALSE);
name = RlvStrings::getAnonym(name);
}
// [/RLVa:KB]
getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
}
else
@ -301,8 +314,15 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
else
{
gCacheName->getFullName(perm.getOwner(), name);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
name = RlvStrings::getAnonym(name);
// [/RLVa:KB]
}
getChildView("BtnOwner")->setEnabled(TRUE);
// getChildView("BtnOwner")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(TRUE);
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
@ -539,6 +559,17 @@ void LLFloaterProperties::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
const LLPermissions& perm = item->getPermissions();
if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
{
return;
}
}
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
@ -554,6 +585,10 @@ void LLFloaterProperties::onClickOwner()
}
else
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
}
}

View File

@ -254,6 +254,14 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
if (regionp)
{
getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
{
childSetText("sim_field", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
}
*/
// [/RLVa:KB]
LLVector3d global_pos;
global_pos.setVec(objectp->getPositionRegion());
setPosBox(global_pos);

View File

@ -209,6 +209,20 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
if (controlp)
{
// [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
// If "HideFromEditor" was toggled while the floater is open then we need to manually disable access to the control
// NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault()
bool fEnable = !controlp->isHiddenFromSettingsEditor();
spinner1->setEnabled(fEnable);
spinner2->setEnabled(fEnable);
spinner3->setEnabled(fEnable);
spinner4->setEnabled(fEnable);
color_swatch->setEnabled(fEnable);
childSetEnabled("val_text", fEnable);
childSetEnabled("boolean_combo", fEnable);
childSetEnabled("default_btn", fEnable);
// [/RLVa:KB]
eControlType type = controlp->type();
//hide combo box only for non booleans, otherwise this will result in the combo box closing every frame

View File

@ -75,6 +75,10 @@
#include "llwindow.h" // copyTextToClipboard()
#include <algorithm>
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
//---------------------------------------------------------------------------
// Constants
//---------------------------------------------------------------------------
@ -492,6 +496,10 @@ void LLFloaterWorldMap::draw()
// getChildView("Clear")->setEnabled((BOOL)tracking_status);
getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
childSetEnabled("Go Home",
(!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
// [/RLVa:KB]
setMouseOpaque(TRUE);
getDragHandle()->setMouseOpaque(TRUE);
@ -774,6 +782,16 @@ void LLFloaterWorldMap::updateLocation()
{ // Empty SLURL will disable the "Copy SLURL to clipboard" button
mSLURL = LLSLURL();
}
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
mSLURL.clear();
}
*/
// [/RLVa:KB]
}
}

View File

@ -46,6 +46,11 @@
#include "llrecentpeople.h"
#include "llviewerobjectlist.h"
#include "llvoavatarself.h"
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.2a)
#include "llavatarnamecache.h"
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
@ -300,6 +305,20 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
{
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
}
// [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) &&
(!RlvUIEnabler::hasOpenProfile(to_agent)) )
{
// Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient
std::string strMsgName = "inventory_item_offered-im"; LLSD args; LLAvatarName avName;
if (LLAvatarNameCache::get(to_agent, &avName))
{
args["NAME"] = RlvStrings::getAnonym(avName);
strMsgName = "inventory_item_offered_rlv";
}
gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args);
}
// [/RLVa:KB]
// If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat.
else if (LLIMModel::getInstance()->findIMSession(session_id))
{
@ -400,7 +419,15 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
logInventoryOffer(to_agent, im_session_id);
// add buddy to recent people list
LLRecentPeople::instance().add(to_agent);
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
(RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
// [/RLVa:KB]
}
// static
@ -455,7 +482,15 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
<< cat->getUUID() << llendl;
// add buddy to recent people list
LLRecentPeople::instance().add(to_agent);
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
(RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
// [/RLVa:KB]
// Test out how many items are being given.
LLViewerInventoryCategory::cat_array_t cats;

View File

@ -62,6 +62,9 @@
#include "llresmgr.h"
#include "pipeline.h"
#include "llspatialpartition.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
// Height of the yellow selection highlight posts for land
const F32 PARCEL_POST_HEIGHT = 0.666f;
@ -69,6 +72,18 @@ const F32 PARCEL_POST_HEIGHT = 0.666f;
// Returns true if you got at least one object
void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
{
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
// Block rectangle selection if:
// - prevented from editing and no exceptions are set (see below for the case where exceptions are set)
// - prevented from interacting at all
if ( (rlv_handler_t::isEnabled()) &&
( ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasException(RLV_BHVR_EDIT))) ||
(gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) ) )
{
return;
}
// [/RLVa:KB]
LLVector3 av_pos = gAgent.getPositionAgent();
F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance");
select_dist_squared = select_dist_squared * select_dist_squared;
@ -133,6 +148,27 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
LLViewerCamera::getInstance()->setFar(new_far);
LLViewerCamera::getInstance()->setNear(new_near);
}
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0g
if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
{
// We'll allow drag selection under fartouch, but only within the fartouch range
// (just copy/paste the code above us to make that work, thank you Lindens!)
LLVector3 relative_av_pos = av_pos;
relative_av_pos -= LLViewerCamera::getInstance()->getOrigin();
F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f;
F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f;
new_near = llmax(new_near, 0.1f);
LLViewerCamera::getInstance()->setFar(new_far);
LLViewerCamera::getInstance()->setNear(new_near);
// Usurp these two
limit_select_distance = TRUE;
select_dist_squared = 1.5f * 1.5f;
}
// [/RLVa:KB]
LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
center_x-width/2, center_y-height/2, width, height,
limit_select_distance);
@ -207,6 +243,13 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
continue;
}
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canEdit(vobjp)) )
{
continue;
}
// [/RLVa:KB]
S32 result = LLViewerCamera::getInstance()->sphereInFrustum(drawable->getPositionAgent(), drawable->getRadius());
if (result)
{

View File

@ -41,6 +41,10 @@
#include "llstatusbar.h" // can_afford_transaction()
#include "llimfloater.h"
#include "groupchatlistener.h"
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f)
#include "llslurl.h"
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Globals
@ -134,6 +138,15 @@ void LLGroupActions::startCall(const LLUUID& group_id)
return;
}
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(group_id)) && (!gIMMgr->hasSession(group_id)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
return;
}
// [/RLVa:KB]
LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
if (session_id == LLUUID::null)
{
@ -207,8 +220,12 @@ bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
// static
void LLGroupActions::leave(const LLUUID& group_id)
{
if (group_id.isNull())
// if (group_id.isNull())
// return;
// [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]
S32 count = gAgent.mGroups.count();
S32 i;
@ -230,6 +247,11 @@ void LLGroupActions::leave(const LLUUID& group_id)
// static
void LLGroupActions::activate(const LLUUID& group_id)
{
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
if (gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP))
return;
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ActivateGroup);
msg->nextBlockFast(_PREHASH_AgentData);
@ -326,6 +348,15 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id)
{
if (group_id.isNull()) return LLUUID::null;
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStartIM(group_id)) && (!gIMMgr->hasSession(group_id)) )
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
return LLUUID::null;
}
// [/RLVa:KB]
LLGroupData group_data;
if (gAgent.getGroupData(group_id, group_data))
{

View File

@ -43,6 +43,9 @@
#include "llviewercontrol.h" // for gSavedSettings
#include "llviewermenu.h" // for gMenuHolder
#include "llvoiceclient.h"
// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
S32 LLGroupListItem::sIconWidth = 0;
@ -263,8 +266,14 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata)
bool real_group_selected = selected_group_id.notNull(); // a "real" (not "none") group is selected
// 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.4.1a) | Added: RLVa-1.3.0f
if (userdata.asString() == "activate")
return gAgent.getGroupID() != selected_group_id;
return (gAgent.getGroupID() != selected_group_id) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP));
else if (userdata.asString() == "leave")
return (real_group_selected) && ((gAgent.getGroupID() != selected_group_id) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SETGROUP)));
// [/RLVa:KB]
if (userdata.asString() == "call")
return real_group_selected && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();

View File

@ -46,9 +46,11 @@
#include "llstatusbar.h"
#include "llmenugl.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include <boost/tokenizer.hpp>
const F32 SPRING_STRENGTH = 0.7f;
const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f;
const F32 HORIZONTAL_PADDING = 15.f;
@ -255,7 +257,30 @@ void LLHUDText::renderText()
void LLHUDText::setString(const std::string &text_utf8)
{
mTextSegments.clear();
addLine(text_utf8, mColor);
// addLine(text_utf8, mColor);
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.4.0a) | Modified: RLVa-1.0.0f
// NOTE: setString() is called for debug and map beacons as well
if (rlv_handler_t::isEnabled())
{
std::string text(text_utf8);
if (gRlvHandler.canShowHoverText(mSourceObject))
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
RlvUtil::filterLocation(text);
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
RlvUtil::filterNames(text);
}
else
{
text = "";
}
addLine(text, mColor);
}
else
{
addLine(text_utf8, mColor);
}
// [/RLVa:KB]
}
void LLHUDText::clearString()
@ -637,3 +662,15 @@ F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font)
return width;
}
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.0f
void LLHUDText::refreshAllObjectText()
{
for (TextObjectIterator itText = sTextObjects.begin(); itText != sTextObjects.end(); ++itText)
{
LLHUDText* pText = *itText;
if ( (pText) && (!pText->mObjText.empty()) && (pText->mSourceObject) && (LL_PCODE_VOLUME == pText->mSourceObject->getPCode()) )
pText->setString(pText->mObjText);
}
}
// [/RLVa:KB]

View File

@ -124,6 +124,11 @@ public:
static void reshape();
static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.0f
const std::string& getObjectText() const { return mObjText; }
void setObjectText(const std::string &utf8string) { mObjText = utf8string; }
static void refreshAllObjectText();
// [/RLVa:KB]
protected:
LLHUDText(const U8 type);
@ -161,6 +166,9 @@ private:
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
BOOL mHidden;
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.0f
std::string mObjText;
// [/RLVa:KB]
static BOOL sDisplayText ;
static std::set<LLPointer<LLHUDText> > sTextObjects;

View File

@ -57,6 +57,9 @@
#include "llspeakers.h"
#include "llviewerchat.h"
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
LLIMFloater::LLIMFloater(const LLUUID& session_id)
: LLTransientDockableFloater(NULL, true, session_id),
@ -206,6 +209,56 @@ void LLIMFloater::sendMsg()
std::string utf8_text = wstring_to_utf8str(text);
utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) )
{
LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(mSessionID);
RLV_ASSERT(pIMSession);
bool fRlvFilter = !pIMSession;
if (pIMSession)
{
switch (pIMSession->mSessionType)
{
case LLIMModel::LLIMSession::P2P_SESSION: // One-on-one IM
fRlvFilter = !gRlvHandler.canSendIM(mOtherParticipantUUID);
break;
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat
fRlvFilter = !gRlvHandler.canSendIM(mSessionID);
break;
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if all participants can be sent an IM
{
if (!pIMSession->mSpeakers)
{
fRlvFilter = true;
break;
}
LLSpeakerMgr::speaker_list_t speakers;
pIMSession->mSpeakers->getSpeakerList(&speakers, TRUE);
for (LLSpeakerMgr::speaker_list_t::const_iterator itSpeaker = speakers.begin();
itSpeaker != speakers.end(); ++itSpeaker)
{
const LLSpeaker* pSpeaker = *itSpeaker;
if ( (gAgent.getID() != pSpeaker->mID) && (!gRlvHandler.canSendIM(pSpeaker->mID)) )
{
fRlvFilter = true;
break;
}
}
}
break;
default:
fRlvFilter = true;
break;
}
}
if (fRlvFilter)
utf8_text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM);
}
// [/RLVa:KB]
if (mSessionInitialized)
{
LLIMModel::sendMessage(utf8_text, mSessionID,

View File

@ -63,7 +63,9 @@
#include "lltoolbarview.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@ -3252,6 +3254,20 @@ public:
{
return;
}
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIMFROM)) )
{
if (gAgent.isInGroup(session_id)) // Group chat: don't accept the invite if not an exception
{
if (!gRlvHandler.canReceiveIM(session_id))
return;
}
else if (!gRlvHandler.canReceiveIM(from_id)) // Conference chat: don't block; censor if not an exception
{
message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
}
}
// [/RLVa:KB]
// standard message, not from system
std::string saved;

View File

@ -38,6 +38,10 @@
#include "llviewermedia.h"
#include "llviewermediafocus.h"
#include "llviewerobjectlist.h" // to select the requested object
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c)
#include "rlvhandler.h"
#include "lltoolpie.h"
// [/RLVa:KB]
// Linden libraries
#include "llbutton.h" // setLabel(), not virtual!
@ -349,6 +353,10 @@ void LLInspectObject::updateButtons(LLSelectNode* nodep)
|| (parent && parent->flagHandleTouch()))
{
getChild<LLUICtrl>("touch_btn")->setVisible(true);
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.1g) | Added: RLVa-1.2.1g
if (rlv_handler_t::isEnabled())
getChild<LLUICtrl>("touch_btn")->setEnabled(gRlvHandler.canTouch(object));
// [/RLVa:KB]
updateTouchLabel(nodep);
}
else if ( enable_object_open() )
@ -378,6 +386,15 @@ void LLInspectObject::updateSitLabel(LLSelectNode* nodep)
{
sit_btn->setLabel( getString("Sit") );
}
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
// RELEASE-RLVa: [SL-2.0.0] Make sure we're examining the same object that handle_sit_or_stand() will request a sit for
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
sit_btn->setEnabled( (pick.mObjectID.notNull()) && (gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) );
}
// [/RLVa:KB]
}
void LLInspectObject::updateTouchLabel(LLSelectNode* nodep)
@ -473,10 +490,17 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
// a clickable link
// Objects cannot be created by a group, so use agent URL format
LLUUID creator_id = nodep->mPermissions->getCreator();
std::string creator_url =
LLSLURL("agent", creator_id, "about").getSLURLString();
// std::string creator_url =
// LLSLURL("agent", creator_id, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
// Only anonymize the creator if they're also the owner or if they're a nearby avie
bool fRlvHideCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id)));
std::string creator_url =
LLSLURL("agent", creator_id, (!fRlvHideCreator) ? "about" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
args["[CREATOR]"] = creator_url;
// created by one user but owned by another
std::string owner_url;
LLUUID owner_id;
@ -489,7 +513,11 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
else
{
owner_id = nodep->mPermissions->getOwner();
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
// owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvHideOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
owner_url = LLSLURL("agent", owner_id, (!fRlvHideOwner) ? "about" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
}
args["[OWNER]"] = owner_url;

View File

@ -35,6 +35,9 @@
#include "llui.h"
#include "lluictrl.h"
#include "llurlaction.h"
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
//////////////////////////////////////////////////////////////////////////////
// LLInspectRemoteObject
@ -68,6 +71,9 @@ private:
std::string mOwnerLegacyName;
std::string mSLurl;
std::string mName;
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
bool mRlvHideNames;
// [/RLVa:KB]
bool mGroupOwned;
};
@ -78,6 +84,9 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) :
mOwnerLegacyName(),
mSLurl(""),
mName(""),
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
mRlvHideNames(false),
// [/RLVa:KB]
mGroupOwned(false)
{
}
@ -110,6 +119,10 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
mOwnerID = data["owner_id"].asUUID();
mGroupOwned = data["group_owned"].asBoolean();
mSLurl = data["slurl"].asString();
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
if (data.has("rlv_shownames"))
mRlvHideNames = data["rlv_shownames"].asBoolean();
// [/RLVa:KB]
// work out the owner's name
mOwnerLegacyName = "";
@ -178,7 +191,10 @@ void LLInspectRemoteObject::update()
}
else
{
owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
// owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
owner = LLSLURL("agent", mOwnerID, (!mRlvHideNames) ? "about" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
}
}
else
@ -200,6 +216,14 @@ void LLInspectRemoteObject::update()
// disable the Block button if we don't have the owner ID
getChild<LLUICtrl>("block_btn")->setEnabled(! mOwnerID.isNull());
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if ( (rlv_handler_t::isEnabled()) && (RlvStrings::getString(RLV_STRING_HIDDEN_REGION) == mSLurl) )
{
getChild<LLUICtrl>("object_slurl")->setValue(mSLurl);
getChild<LLUICtrl>("map_btn")->setEnabled(false);
}
// [/RLVa:KB]
}
//////////////////////////////////////////////////////////////////////////////

View File

@ -69,6 +69,10 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
// Marketplace outbox current disabled
#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_PANEL
@ -670,6 +674,20 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
if (rlv_handler_t::isEnabled())
{
const LLInventoryObject* pItem = getInventoryObject();
if ( (pItem) &&
( ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE))) ||
((LLAssetType::AT_LSL_TEXT == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT))) ||
((LLAssetType::AT_TEXTURE == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) )
{
disabled_items.push_back(std::string("Open"));
}
}
// [/RLVa:KB]
getClipboardEntries(true, items, disabled_items, flags);
}
hide_context_entries(menu, items, disabled_items);
@ -1441,6 +1459,13 @@ BOOL LLItemBridge::isItemRenameable() const
return FALSE;
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) )
{
return FALSE;
}
// [/RLVa:KB]
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
return FALSE;
@ -1961,6 +1986,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
if ( (is_movable) && (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) )
{
is_movable = RlvFolderLocks::instance().canMoveFolder(cat_id, mUUID);
}
// [/RLVa:KB]
//
//--------------------------------------------------------------------------------
@ -3359,6 +3391,24 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
is_movable = FALSE;
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( (rlv_handler_t::isEnabled()) && (is_movable) )
{
if (move_is_into_current_outfit)
{
// RELEASE-RLVa: [RLVa-1.3.0] Keep sync'ed with code below => LLAppearanceMgr::wearItemOnAvatar() with "replace == true"
const LLViewerInventoryItem* pItem = dynamic_cast<const LLViewerInventoryItem*>(inv_item);
is_movable = rlvPredCanWearItem(pItem, RLV_WEAR_REPLACE);
}
if (is_movable)
{
is_movable = (!RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) ||
(RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
}
}
// [/RLVa:KB]
if (move_is_into_trash)
{
is_movable &= inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID());
@ -3959,11 +4009,14 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
{
callingcard_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
}
LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
if (session_id != LLUUID::null)
{
LLIMFloater::show(session_id);
}
// LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
// if (session_id != LLUUID::null)
// {
// LLIMFloater::show(session_id);
// }
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
LLAvatarActions::startIM(item->getCreatorUUID());
// [/RLVa:KB]
}
}
else if ("lure" == action)
@ -4524,6 +4577,14 @@ std::string LLObjectBridge::getLabelSuffix() const
void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace)
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
// If no attachment point was specified, try looking it up from the item name
if ( (rlv_handler_t::isEnabled()) && (!attachment) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{
attachment = RlvAttachPtLookup::getAttachPoint(item);
}
// [/RLVa:KB]
const LLUUID& item_id = item->getLinkedUUID();
// Check for duplicate request.
@ -4558,10 +4619,20 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
if (replace &&
(attachment && attachment->getNumObjects() > 0))
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
// Block if we can't "replace wear" what's currently there
if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) )
return;
// [/RLVa:KB]
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_attachment_rez);
}
else
{
// [RLVa:KB] - Checked: 2010-08-07 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i
// Block wearing anything on a non-attachable attachment point
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachmentPoint(attach_pt, RLV_LOCK_ADD)) )
return;
// [/RLVa:KB]
LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/);
}
}
@ -4587,7 +4658,17 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response)
/*
{
U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
// [RLVa:KB] - Checked: 2010-08-06 (RLVa-1.2.0i) | Added: RLVa-1.2.0i
// NOTE: we're letting our callers decide whether or not to use ATTACHMENT_ADD
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) &&
((!notification["payload"].has("rlv_force")) || (!notification["payload"]["rlv_force"].asBoolean())) )
{
ERlvWearMask eWearAction = (attachment_pt & ATTACHMENT_ADD) ? RLV_WEAR_ADD : RLV_WEAR_REPLACE;
RlvAttachmentLockWatchdog::instance().onWearAttachment(itemp, eWearAction);;
attachment_pt |= ATTACHMENT_ADD;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv);
msg->nextBlockFast(_PREHASH_AgentData);
@ -4655,6 +4736,10 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
items.push_back(std::string("Wearable And Object Separator"));
items.push_back(std::string("Detach From Yourself"));
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!gRlvAttachmentLocks.canDetach(item)) )
disabled_items.push_back(std::string("Detach From Yourself"));
// [/RLVa:KB]
}
else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing() && !isCOFFolder())
{
@ -4673,6 +4758,17 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Attach To"));
disabled_items.push_back(std::string("Attach To HUD"));
}
// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
else if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(item);
if ((eWearMask & RLV_WEAR_REPLACE) == 0)
disabled_items.push_back(std::string("Wearable And Object Wear"));
if ((eWearMask & RLV_WEAR_ADD) == 0)
disabled_items.push_back(std::string("Wearable Add"));
}
// [/RLVa:KB]
LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE);
LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE);
if (attach_menu
@ -4856,6 +4952,10 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
continue;
if (get_is_item_worn(item->getUUID()))
{
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0c) | Modified: RLVa-0.2.2a
// if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
// continue;
// [/RLVa:KB]
// LLWearableList::instance().getAsset(item->getAssetUUID(),
// item->getName(),
// item->getType(),
@ -5035,18 +5135,37 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Wearable And Object Wear"));
disabled_items.push_back(std::string("Wearable Add"));
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0c) | Added: RLVa-1.2.0c
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
disabled_items.push_back(std::string("Take Off"));
// [/RLVa:KB]
}
else
{
items.push_back(std::string("Wearable And Object Wear"));
disabled_items.push_back(std::string("Take Off"));
disabled_items.push_back(std::string("Wearable Edit"));
// [RLVa:KB] - Checked: 2010-06-09 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
if (rlv_handler_t::isEnabled())
{
ERlvWearMask eWearMask = gRlvWearableLocks.canWear(item);
if ((eWearMask & RLV_WEAR_REPLACE) == 0)
disabled_items.push_back(std::string("Wearable And Object Wear"));
if ((eWearMask & RLV_WEAR_ADD) == 0)
disabled_items.push_back(std::string("Wearable Add"));
}
// [/RLVa:KB]
}
if (LLWearableType::getAllowMultiwear(mWearableType))
{
items.push_back(std::string("Wearable Add"));
if (gAgentWearables.getWearableCount(mWearableType) >= LLAgentWearables::MAX_CLOTHING_PER_TYPE)
// if (gAgentWearables.getWearableCount(mWearableType) >= LLAgentWearables::MAX_CLOTHING_PER_TYPE)
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
if ( (gAgentWearables.getWearableCount(mWearableType) >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) ||
(gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) )
// [/SL:KB]
{
disabled_items.push_back(std::string("Wearable Add"));
}
@ -5218,6 +5337,13 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
//{
// OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
// const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
// if ( (rlv_handler_t::isEnabled()) && ((!wearable) || (!gRlvWearableLocks.canRemove(gInventory.getItem(item_id)))) )
// {
// delete on_remove_struct;
// return;
// }
// [/RLVa:KB]
// if(wearable)
// {
// if( get_is_item_worn( item_id ) )
@ -5258,6 +5384,10 @@ void LLWearableBridge::removeAllClothesFromAvatar()
// Take them off by removing from COF.
for (LLInventoryModel::item_array_t::const_iterator it = clothing_items.begin(); it != clothing_items.end(); ++it)
{
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(*it)) )
continue;
// [/RLVa:KB]
LLAppearanceMgr::instance().removeItemFromAvatar((*it)->getUUID());
}
}

View File

@ -81,6 +81,10 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
BOOL LLInventoryState::sWearNewClothing = FALSE;
LLUUID LLInventoryState::sWearNewClothingTransactionID;
@ -385,6 +389,14 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
}
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( (rlv_handler_t::isEnabled()) &&
(RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(id)) )
{
return FALSE;
}
// [/RLVa:KB]
const LLInventoryObject *obj = model->getItem(id);
if (obj && obj->getIsLinkType())
{
@ -413,6 +425,14 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
return FALSE;
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( ((rlv_handler_t::isEnabled()) &&
(RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveFolder(id))) )
{
return FALSE;
}
// [/RLVa:KB]
if (!isAgentAvatarValid()) return FALSE;
const LLInventoryCategory* category = model->getCategory(id);
@ -448,6 +468,13 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
return FALSE;
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( (rlv_handler_t::isEnabled()) && (model == &gInventory) && (!RlvFolderLocks::instance().canRenameFolder(id)) )
{
return FALSE;
}
// [/RLVa:KB]
LLViewerInventoryCategory* cat = model->getCategory(id);
if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&

View File

@ -46,6 +46,10 @@
#include "llviewerregion.h"
#include "llcallbacklist.h"
#include "llvoavatarself.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
//#define DIFF_INVENTORY_FILES
#ifdef DIFF_INVENTORY_FILES
@ -492,6 +496,28 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
LLViewerInventoryItem* item = NULL;
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id);
// Move onto items
if(item_array)
{
S32 count = item_array->count();
for(S32 i = 0; i < count; ++i)
{
item = item_array->get(i);
if(add(NULL, item))
{
items.put(item);
}
}
}
// [RLVa:KB] - Checked: 2010-09-30 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
// The problem is that we want some way for the functor to know that it's being asked to decide on a folder link
// but it won't know that until after it has encountered the folder link item (which doesn't happen until *after*
// it has already collected all items from it the way the code was originally laid out)
// This breaks the "finish collecting all folders before collecting items (top to bottom and then bottom to top)"
// assumption but no functor is (currently) relying on it (and likely never should since it's an implementation detail?)
// [Only LLAppearanceMgr actually ever passes in 'follow_folder_links == TRUE']
// [/RLVa:KB]
// Follow folder links recursively. Currently never goes more
// than one level deep (for current outfit support)
// Note: if making it fully recursive, need more checking against infinite loops.
@ -521,20 +547,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
}
// Move onto items
if(item_array)
{
S32 count = item_array->count();
for(S32 i = 0; i < count; ++i)
{
item = item_array->get(i);
if(add(NULL, item))
{
items.put(item);
}
}
}
}
void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
@ -2489,6 +2501,14 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
llinfos << "LLInventoryModel::processSaveAssetIntoInventory item"
" not found: " << item_id << llendl;
}
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-0.2.0e
if (rlv_handler_t::isEnabled())
{
RlvAttachmentLockWatchdog::instance().onSavedAssetIntoInventory(item_id);
}
// [/RLVa:KB]
if(gViewerWindow)
{
gViewerWindow->getWindow()->decBusyCount();
@ -2539,6 +2559,20 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
if(tfolder->getParentUUID() == folderp->getParentUUID())
{
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
// NOTE-RLVa: not sure if this is a hack or a bug-fix :o
// -> if we rename the folder on the first BulkUpdateInventory message subsequent messages will still contain
// the old folder name and gInventory.updateCategory() below will "undo" the folder name change but on the
// viewer-side *only* so the folder name actually becomes out of sync with what's on the inventory server
// -> so instead we keep the name of the existing folder and only do it for #RLV/~ in case this causes issues
// -> a better solution would be to only do the rename *after* the transaction completes but there doesn't seem
// to be any way to accomplish that either *sighs*
if ( (rlv_handler_t::isEnabled()) && (!folderp->getName().empty()) && (tfolder->getName() != folderp->getName()) &&
((tfolder->getName().find(RLV_PUTINV_PREFIX) == 0)) )
{
tfolder->rename(folderp->getName());
}
// [/RLVa:KB]
update[tfolder->getParentUUID()];
}
else

View File

@ -961,8 +961,11 @@ bool LLInventoryPanel::beginIMSession()
std::string name;
static int session_num = 1;
LLDynamicArray<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
// LLDynamicArray<LLUUID> members;
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
uuid_vec_t members;
// [/RLVa:KB]
// EInstantMessage type = IM_SESSION_CONFERENCE_START;
std::set<LLUUID>::const_iterator iter;
for (iter = selected_items.begin(); iter != selected_items.end(); iter++)
@ -1004,7 +1007,10 @@ bool LLInventoryPanel::beginIMSession()
id = item_array.get(i)->getCreatorUUID();
if(at.isBuddyOnline(id))
{
members.put(id);
// members.put(id);
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
members.push_back(id);
// [/RLVa:KB]
}
}
}
@ -1026,7 +1032,10 @@ bool LLInventoryPanel::beginIMSession()
if(at.isBuddyOnline(id))
{
members.put(id);
// members.put(id);
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
members.push_back(id);
// [/RLVa:KB]
}
}
} //if IT_CALLINGCARD
@ -1042,11 +1051,14 @@ bool LLInventoryPanel::beginIMSession()
name = llformat("Session %d", session_num++);
}
LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
if (session_id != LLUUID::null)
{
LLIMFloater::show(session_id);
}
// LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
// if (session_id != LLUUID::null)
// {
// LLIMFloater::show(session_id);
// }
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
LLAvatarActions::startConference(members);
// [/RLVa:KB]
return true;
}

View File

@ -59,6 +59,9 @@
#include "llviewermenu.h"
#include "llurllineeditorctrl.h"
#include "llagentui.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
//============================================================================
/*
@ -600,16 +603,31 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent
void LLLocationInputCtrl::onInfoButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
}
void LLLocationInputCtrl::onForSaleButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
handle_buy_land();
}
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
return;
// [/RLVa:KB]
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
// Landmark exists, open it for preview and edit
if(landmark && landmark->getUUID().notNull())
@ -726,6 +744,10 @@ void LLLocationInputCtrl::onTextEditorRightClicked(S32 x, S32 y, MASK mask)
void LLLocationInputCtrl::refresh()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mInfoBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
refreshLocation(); // update location string
refreshParcelIcons();
updateAddLandmarkButton(); // indicate whether current parcel has been landmarked
@ -999,6 +1021,9 @@ void LLLocationInputCtrl::enableAddLandmarkButton(bool val)
// depending on whether current parcel has been landmarked.
void LLLocationInputCtrl::updateAddLandmarkButton()
{
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mAddLandmarkBtn->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
enableAddLandmarkButton(LLLandmarkActions::hasParcelLandmark());
}
void LLLocationInputCtrl::updateAddLandmarkTooltip()
@ -1028,6 +1053,9 @@ void LLLocationInputCtrl::updateContextMenu(){
{
landmarkItem->setLabel(LLTrans::getString("EditLandmarkNavBarMenu"));
}
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
landmarkItem->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
// [/RLVa:KB]
}
}
void LLLocationInputCtrl::updateWidgetlayout()
@ -1083,17 +1111,23 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
}
else if (item == "landmark")
{
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
if(!landmark)
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
// [/RLVa:KB]
LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos();
if(!landmark)
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
}
// [/RLVa:KB]
}
else if (item == "cut")
{

View File

@ -60,6 +60,9 @@
#include "llworld.h"
#include "llui.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
const S32 NUM_AXES = 3;
const S32 MOUSE_DRAG_SLOP = 2; // pixels

View File

@ -50,6 +50,9 @@
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "lltooltip.h"
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Constants
@ -140,7 +143,10 @@ BOOL LLFloaterMove::postBuild()
initMovementMode();
LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
// LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(LLFloaterMove::sUpdateMovementStatus);
// [/RLVa:KB]
return TRUE;
}
@ -317,23 +323,32 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
{
case MM_RUN:
gAgent.setAlwaysRun();
gAgent.setRunning();
// gAgent.setRunning();
break;
case MM_WALK:
gAgent.clearAlwaysRun();
gAgent.clearRunning();
// gAgent.clearRunning();
break;
default:
//do nothing for other modes (MM_FLY)
break;
}
// tell the simulator.
gAgent.sendWalkRun(gAgent.getAlwaysRun());
updateButtonsWithMovementMode(mode);
// gAgent.sendWalkRun(gAgent.getAlwaysRun());
//
// updateButtonsWithMovementMode(mode);
//
// bool bHideModeButtons = MM_FLY == mode
// || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
// Running may have been restricted so update walk-vs-run from the agent's actual running state
if ( (MM_WALK == mode) || (MM_RUN == mode) )
mCurrentMode = (gAgent.getRunning()) ? MM_RUN : MM_WALK;
bool bHideModeButtons = MM_FLY == mode
|| (isAgentAvatarValid() && gAgentAvatarp->isSitting());
updateButtonsWithMovementMode(mCurrentMode);
bool bHideModeButtons = (MM_FLY == mCurrentMode) || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
// [/RLVa:KB]
showModeButtons(!bHideModeButtons);
@ -436,12 +451,23 @@ void LLFloaterMove::setModeTitle(const EMovementMode mode)
}
//static
void LLFloaterMove::sUpdateFlyingStatus()
//void LLFloaterMove::sUpdateFlyingStatus()
//{
// LLFloaterMove *floater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
// if (floater) floater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
//
//}
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
void LLFloaterMove::sUpdateMovementStatus()
{
LLFloaterMove *floater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
if (floater) floater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
LLFloaterMove* pFloater = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
if (pFloater)
{
pFloater->mModeControlButtonMap[MM_RUN]->setEnabled(gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN));
pFloater->mModeControlButtonMap[MM_FLY]->setEnabled(gAgent.canFly());
}
}
// [/RLVa:KB]
void LLFloaterMove::showModeButtons(BOOL bShow)
{
@ -481,7 +507,10 @@ void LLFloaterMove::onOpen(const LLSD& key)
showModeButtons(FALSE);
}
sUpdateFlyingStatus();
// sUpdateFlyingStatus();
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
sUpdateMovementStatus();
// [/RLVa:KB]
}
void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
@ -672,10 +701,17 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
void LLPanelStandStopFlying::onStandButtonClick()
{
LLFirstUse::sit(false);
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) )
{
LLFirstUse::sit(false);
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}
// [/RLVa:KB]
// LLSelectMgr::getInstance()->deselectAllForStandingUp();
// gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
setFocus(FALSE); // EXT-482
mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once.

View File

@ -59,7 +59,10 @@ public:
static void enableInstance(BOOL bEnable);
/*virtual*/ void onOpen(const LLSD& key);
static void sUpdateFlyingStatus();
// static void sUpdateFlyingStatus();
// [RLVa:KB] - Checked: 2011-05-27 (RLVa-1.4.0a) | Added: RLVa-1.4.0a
static void sUpdateMovementStatus();
// [/RLVa:KB]
protected:
void turnLeft();

View File

@ -48,6 +48,9 @@
#include "llrootview.h"
#include "llviewerchat.h"
#include "llnearbychat.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llresizehandle.h"
@ -58,7 +61,10 @@ const S32 COLLAPSED_HEIGHT = 60;
const S32 EXPANDED_MIN_HEIGHT = 150;
// legacy callback glue
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
// [/RLVa:KB]
struct LLChatTypeTrigger {
std::string name;
@ -222,7 +228,10 @@ void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata)
S32 length = raw_text.length();
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d
if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) )
// [/RLVa:KB]
{
gAgent.startTyping();
}
@ -473,6 +482,21 @@ void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type,
utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
if ( (0 == channel) && (rlv_handler_t::isEnabled()) )
{
// Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE );
}
// [/RLVa:KB]
// Don't animate for chats people can't hear (chat to scripts)
if (animate && (channel == 0))
{
@ -594,8 +618,57 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe
}
}
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel)
// [/RLVa:KB]
{
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0a
// Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc)
if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) )
{
if (0 == channel)
{
// (We already did this before, but LLChatHandler::handle() calls this directly)
if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) )
type = CHAT_TYPE_WHISPER;
else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) )
type = CHAT_TYPE_NORMAL;
else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) )
type = CHAT_TYPE_NORMAL;
// Redirect chat if needed
if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) &&
(gRlvHandler.redirectChatOrEmote(utf8_out_text)) ) )
{
return;
}
// Filter public chat if sendchat restricted
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT))
gRlvHandler.filterChat(utf8_out_text, true);
}
else
{
// Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception)
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) )
return;
// Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers)
if (CHAT_CHANNEL_DEBUG == channel)
{
bool fIsEmote = RlvUtil::isEmote(utf8_out_text);
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) ||
((!fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))) ||
((fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE))) )
{
return;
}
}
}
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);

View File

@ -44,6 +44,10 @@
#include "llrootview.h"
#include "lllayoutstack.h"
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
//add LLNearbyChatHandler to LLNotificationsUI namespace
using namespace LLNotificationsUI;
@ -483,10 +487,27 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
if(chat_msg.mText.empty())
return;//don't process empty messages
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
if (rlv_handler_t::isEnabled())
{
// NOTE-RLVa: we can only filter the *message* here since most everything else will already be part of "args" as well
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterLocation(tmp_chat.mText);
tmp_chat.mRlvLocFiltered = TRUE;
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterNames(tmp_chat.mText);
tmp_chat.mRlvNamesFiltered = TRUE;
}
}
// [/RLVa:KB]
LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
// Build notification data
LLSD notification;
notification["message"] = chat_msg.mText;
@ -602,6 +623,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
LLUUID id;
id.generate();
notification["id"] = id;
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (rlv_handler_t::isEnabled())
notification["show_icon_tooltip"] = !chat_msg.mRlvNamesFiltered;
// [/RLVa:KB]
std::string r_color_name = "White";
F32 r_color_alpha = 1.0f;
LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);

View File

@ -60,6 +60,9 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llworldmapview.h" // shared draw code
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
@ -372,7 +375,11 @@ void LLNetMap::draw()
if( i < regionp->mMapAvatarIDs.count())
{
uuid = regionp->mMapAvatarIDs.get(i);
show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
// show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL) &&
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
}
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
@ -619,11 +626,29 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
// If the cursor is near an avatar on the minimap, a mini-inspector will be
// shown for the avatar, instead of the normal map tooltip.
if (handleToolTipAgent(mClosestAgentToCursor))
// if (handleToolTipAgent(mClosestAgentToCursor))
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (handleToolTipAgent(mClosestAgentToCursor)) )
// [/RLVa:KB]
{
return TRUE;
}
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
LLStringUtil::format_map_t args;
LLAvatarName avName;
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
(mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) )
{
args["[AGENT]"] = RlvStrings::getAnonym(avName) + "\n";
}
else
{
args["[AGENT]"] = "";
}
// [/RLVa:KB]
LLRect sticky_rect;
std::string region_name;
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) );
@ -635,14 +660,17 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
sticky_rect.mRight = sticky_rect.mLeft + 2 * SLOP;
sticky_rect.mTop = sticky_rect.mBottom + 2 * SLOP;
region_name = region->getName();
// region_name = region->getName();
// [RLVa:KB] - Checked: 2010-10-19 (RLVa-1.2.2b) | Modified: RLVa-1.2.2b
region_name = ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
// [/RLVa:KB]
if (!region_name.empty())
{
region_name += "\n";
}
}
LLStringUtil::format_map_t args;
// LLStringUtil::format_map_t args;
args["[REGION]"] = region_name;
std::string msg = mToolTipMsg;
LLStringUtil::format(msg, args);

View File

@ -405,6 +405,13 @@ private:
*/
static LLIMFloater* findIMFloater(const LLNotificationPtr& notification);
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
/**
* Checks whether the user has opted to embed (certain) notifications in IM sessions
*/
static bool canEmbedNotificationInIM(const LLNotificationPtr& notification);
// [/SL:KB]
};
}

View File

@ -38,6 +38,9 @@
#include "llimview.h"
#include "llnearbychat.h"
#include "llnotificationhandler.h"
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
#include "rlvhandler.h"
// [/RLVa:KB]
using namespace LLNotificationsUI;
@ -167,25 +170,67 @@ bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification)
// static
bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification)
{
return OFFER_FRIENDSHIP == notification->getName()
|| USER_GIVE_ITEM == notification->getName()
|| TELEPORT_OFFERED == notification->getName();
// return OFFER_FRIENDSHIP == notification->getName()
// || USER_GIVE_ITEM == notification->getName()
// || TELEPORT_OFFERED == notification->getName();
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
// return
// (canEmbedNotificationInIM(notification)) &&
// ( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) ||
// (TELEPORT_OFFERED == notification->getName()) );
// [/SL:KB]
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
return
(canEmbedNotificationInIM(notification)) &&
( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStartIM(notification->getPayload()["from_id"].asUUID())) ) &&
( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) ||
(TELEPORT_OFFERED == notification->getName()) );
// [/RLVa:KB]
}
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
// static
bool LLHandlerUtil::canEmbedNotificationInIM(const LLNotificationPtr& notification)
{
switch (gSavedSettings.getS32("NotificationCanEmbedInIM"))
{
case 1: // Focused
return isIMFloaterFocused(notification);
case 2: // Never
return false;
case 0: // Always (Viewer 2 default)
default:
return true;
}
}
// [/SL:KB]
// static
bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification)
{
return OFFER_FRIENDSHIP == notification->getName()
|| USER_GIVE_ITEM == notification->getName()
|| TELEPORT_OFFERED == notification->getName();
// return OFFER_FRIENDSHIP == notification->getName()
// || USER_GIVE_ITEM == notification->getName()
// || TELEPORT_OFFERED == notification->getName();
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
return
(canEmbedNotificationInIM(notification)) &&
( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) ||
(TELEPORT_OFFERED == notification->getName()) );
// [/SL:KB]
}
// static
bool LLHandlerUtil::isNotificationReusable(const LLNotificationPtr& notification)
{
return OFFER_FRIENDSHIP == notification->getName()
|| USER_GIVE_ITEM == notification->getName()
|| TELEPORT_OFFERED == notification->getName();
// return OFFER_FRIENDSHIP == notification->getName()
// || USER_GIVE_ITEM == notification->getName()
// || TELEPORT_OFFERED == notification->getName();
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
return
(canEmbedNotificationInIM(notification)) &&
( (OFFER_FRIENDSHIP == notification->getName()) || (USER_GIVE_ITEM == notification->getName()) ||
(TELEPORT_OFFERED == notification->getName()) );
// [/SL:KB]
}
// static
@ -215,7 +260,11 @@ bool LLHandlerUtil::canSpawnToast(const LLNotificationPtr& notification)
|| TELEPORT_OFFERED == notification->getName())
{
// When ANY offer arrives, show toast, unless IM window is already open - EXT-5904
return ! isIMFloaterOpened(notification);
// return ! isIMFloaterOpened(notification);
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Added: Catznip-2.5.0a
// Force a toast if the user opted not to embed notifications panels in IMs
return (!canEmbedNotificationInIM(notification)) || (!isIMFloaterOpened(notification));
// [/SL:KB]
}
return true;

View File

@ -100,7 +100,15 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
notification->setReusable(LLHandlerUtil::isNotificationReusable(notification));
LLUUID session_id;
if (LLHandlerUtil::canSpawnIMSession(notification))
// if (LLHandlerUtil::canSpawnIMSession(notification))
// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0h) | Modified: RLVa-1.3.0h
// Don't spawn a new IM session for inventory offers if this notification was subject to @shownames=n
bool spawn_session = (LLHandlerUtil::canSpawnIMSession(notification)) && (!notification->getPayload().has("rlv_shownames"));
// [/RLVa:KB]
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
// bool spawn_session = LLHandlerUtil::canSpawnIMSession(notification);
if (spawn_session)
// [/SL:KB]
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
@ -110,7 +118,12 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
bool show_toast = LLHandlerUtil::canSpawnToast(notification);
bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification);
// bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification);
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
// NOTE: add_notid_to_im needs to be FALSE if we suppressed spawning an IM because in that case the notification needs to
// be routed to the "syswell" or the inventory offer floater will dissapear and the user won't be able to accept it
bool add_notid_to_im = (spawn_session) && (LLHandlerUtil::canAddNotifPanelToIM(notification));
// [/SL:KB]
if (add_notid_to_im)
{
LLHandlerUtil::addNotifPanelToIM(notification);
@ -149,7 +162,15 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if (LLHandlerUtil::canLogToIM(notification))
{
// log only to file if notif panel can be embedded to IM and IM is opened
if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
if (notification->getPayload().has("rlv_shownames"))
{
// Log to chat history if this notification was subject to @shownames=n
LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
}
else if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
// [/RLVa:KB]
// if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification))
{
LLHandlerUtil::logToIMP2P(notification, true);
}
@ -170,8 +191,17 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
if (LLHandlerUtil::canAddNotifPanelToIM(notification)
&& !LLHandlerUtil::isIMFloaterOpened(notification))
// if (LLHandlerUtil::canAddNotifPanelToIM(notification)
// && !LLHandlerUtil::isIMFloaterOpened(notification))
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
// LLHandlerUtil::canAddNotifPanelToIM() won't necessarily tell us whether the notification went into an IM or to the syswell
// -> the one and only time we need to decrease the unread IM count is when we've clicked any of the buttons on the *toast*
// -> since LLIMFloater::updateMessages() hides the toast when we open the IM (which resets the unread count to 0) we should
// *only* decrease the unread IM count if there's a visible toast since the unread count will be at 0 otherwise anyway
LLScreenChannel* pChannel = dynamic_cast<LLScreenChannel*>(mChannel);
LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
if ( (pToast) && (!pToast->getCanBeStored()) )
// [/SL:KB]
{
LLHandlerUtil::decIMMesageCounter(notification);
}
@ -186,7 +216,10 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
void LLOfferHandler::onDeleteToast(LLToast* toast)
{
if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification()))
// if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification()))
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
if (toast->getCanBeStored())
// [/SL:KB]
{
// send a signal to the counter manager
mDelNotificationSignal();
@ -202,12 +235,25 @@ void LLOfferHandler::onRejectToast(LLUUID& id)
{
LLNotificationPtr notification = LLNotifications::instance().find(id);
if (notification
&& LLNotificationManager::getInstance()->getHandlerForNotification(
notification->getType()) == this
// don't delete notification since it may be used by IM floater
&& !LLHandlerUtil::canAddNotifPanelToIM(notification))
// if (notification
// && LLNotificationManager::getInstance()->getHandlerForNotification(
// notification->getType()) == this
// // don't delete notification since it may be used by IM floater
// && !LLHandlerUtil::canAddNotifPanelToIM(notification))
// {
// LLNotifications::instance().cancel(notification);
// }
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
// NOTE: this will be fired from LLScreenChannel::killToastByNotificationID() which treats visible and stored toasts differently
if ( (notification) && (!notification->isCancelled()) &&
(LLNotificationManager::getInstance()->getHandlerForNotification(notification->getType()) == this) )
{
LLNotifications::instance().cancel(notification);
LLScreenChannel* pChannel = dynamic_cast<LLScreenChannel*>(mChannel);
LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
if ( (!pToast) || (pToast->getCanBeStored()) )
{
LLNotifications::instance().cancel(notification);
}
}
// [/SL:KB]
}

View File

@ -59,6 +59,10 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llworld.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
//
// Imported globals
@ -120,6 +124,25 @@ void LLPanelContents::getState(LLViewerObject *objectp )
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (editable) )
{
// Don't allow creation of new scripts if it's non-detachable
if (objectp->isAttachment())
editable = !gRlvAttachmentLocks.isLockedAttachment(objectp->getRootEdit());
// Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection
if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
// Only check the first (non-)root object because nothing else would result in enabling the button (see below)
LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE);
editable =
(pObj) && (isAgentAvatarValid()) && ((!gAgentAvatarp->isSitting()) || (gAgentAvatarp->getRoot() != pObj->getRootEdit()));
}
}
// [/RLVa:KB]
// Edit script button - ok if object is editable and there's an unambiguous destination for the object.
getChildView("button new script")->setEnabled(
editable &&
@ -154,6 +177,21 @@ void LLPanelContents::onClickNewScript(void *userdata)
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
if(object)
{
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()]
{
if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit()))
{
return; // Disallow creating new scripts in a locked attachment
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) )
return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n
}
}
// [/RLVa:KB]
LLPermissions perm;
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
perm.initMasks(

View File

@ -44,6 +44,10 @@
#include "lluictrlfactory.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
LLPanelLandSelectObserver* LLPanelLandInfo::sObserver = NULL;
LLPanelLandInfo* LLPanelLandInfo::sInstance = NULL;
@ -224,6 +228,14 @@ void LLPanelLandInfo::refresh()
//static
void LLPanelLandInfo::onClickClaim()
{
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
return;
}
*/
// [/RLVa:KB]
LLViewerParcelMgr::getInstance()->startBuyLand();
}

View File

@ -66,6 +66,10 @@
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
//#include "llfirstuse.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "llvoavatarself.h"
// [/RLVa:KB]
#include "lldrawpool.h"
@ -357,6 +361,14 @@ void LLPanelObject::getState( )
enable_rotate = FALSE;
}
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == objectp->getRootEdit()) )
enable_move = enable_scale = enable_rotate = FALSE;
}
// [/RLVa:KB]
LLVector3 vec;
if (enable_move)
{

View File

@ -65,7 +65,10 @@
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
///----------------------------------------------------------------------------
/// Class LLTaskInvFVBridge
@ -359,8 +362,16 @@ void LLTaskInvFVBridge::previewItem()
BOOL LLTaskInvFVBridge::isItemRenameable() const
{
if(gAgent.isGodlike()) return TRUE;
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if ( (rlv_handler_t::isEnabled()) && (object) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
if(gAgent.isGodlike()) return TRUE;
// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID));
@ -375,7 +386,15 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const
BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if ( (rlv_handler_t::isEnabled()) && (object) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
if(object)
{
LLViewerInventoryItem* item = NULL;
@ -402,12 +421,45 @@ BOOL LLTaskInvFVBridge::isItemMovable() const
// return TRUE;
//}
//return FALSE;
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if (rlv_handler_t::isEnabled())
{
const LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID());
if (pObj)
{
if (gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))
{
return FALSE;
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObj->getRootEdit()) )
return FALSE;
}
}
}
// [/RLVa:KB]
return TRUE;
}
BOOL LLTaskInvFVBridge::isItemRemovable() const
{
const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
if ( (object) && (rlv_handler_t::isEnabled()) )
{
if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit()))
{
return FALSE;
}
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) )
{
if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) )
return FALSE;
}
}
// [/RLVa:KB]
if(object
&& (object->permModify() || object->permYouOwner()))
{
@ -555,6 +607,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
const LLPermissions& perm = inv->getPermissions();
bool can_copy = gAgent.allowOperation(PERM_COPY, perm,
GP_OBJECT_MANIPULATE);
// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
// Kind of redundant due to the note below, but in case that ever gets fixed
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
return FALSE;
}
// [/RLVa:KB]
if (object->isAttachment() && !can_copy)
{
//RN: no copy contents of attachments cannot be dragged out
@ -674,16 +733,41 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Task Open"));
}
// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
else if (rlv_handler_t::isEnabled())
{
LLViewerObject* pAttachObj = gObjectList.findObject(mPanel->getTaskUUID());
bool fLocked = (pAttachObj) ? gRlvAttachmentLocks.isLockedAttachment(pAttachObj->getRootEdit()) : false;
if ( ((LLAssetType::AT_NOTECARD == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (fLocked))) ||
((LLAssetType::AT_LSL_TEXT == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (fLocked))) ||
((LLAssetType::AT_TEXTURE == item->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) )
{
disabled_items.push_back(std::string("Task Open"));
}
}
// [/RLVa:KB]
}
items.push_back(std::string("Task Properties"));
if(isItemRenameable())
// if(isItemRenameable())
// {
// items.push_back(std::string("Task Rename"));
// }
// if(isItemRemovable())
// {
// items.push_back(std::string("Task Remove"));
// }
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
items.push_back(std::string("Task Rename"));
items.push_back(std::string("Task Remove"));
if (!isItemRenameable())
{
items.push_back(std::string("Task Rename"));
disabled_items.push_back(std::string("Task Rename"));
}
if(isItemRemovable())
if (!isItemRemovable())
{
items.push_back(std::string("Task Remove"));
disabled_items.push_back(std::string("Task Remove"));
}
// [/RLVa:KB]
hide_context_entries(menu, items, disabled_items);
}
@ -1089,6 +1173,13 @@ void LLTaskLSLBridge::openItem()
{
return;
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUtil::notifyBlockedViewXXX(LLAssetType::AT_SCRIPT);
return;
}
// [/RLVa:KB]
if (object->permModify() || gAgent.isGodlike())
{
LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES);
@ -1147,6 +1238,13 @@ void LLTaskNotecardBridge::openItem()
{
return;
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUtil::notifyBlockedViewXXX(LLAssetType::AT_NOTECARD);
return;
}
// [/RLVa:KB]
if(object->permModify() || gAgent.isGodlike())
{
LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES);

View File

@ -73,6 +73,9 @@
#include "llwearableitemslist.h"
#include "llwearabletype.h"
#include "llweb.h"
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");
@ -601,6 +604,10 @@ void LLPanelOutfitEdit::toggleAddWearablesPanel()
void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
{
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
show_add_wearables = (show_add_wearables) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
// [/RLVa:KB]
mAddWearablesPanel->setVisible(show_add_wearables);
getChild<LLUICtrl>("show_add_wearables_btn")->setValue(show_add_wearables);

View File

@ -56,6 +56,12 @@ public:
static LLSidepanelAppearance* getAppearanceSP();
// [RLVa:KB] - Checked: 2010-08-24 (RLVa-1.4.0a) | Added: RLVa-1.2.1a
LLTabContainer* getAppearanceTabs() { return mAppearanceTabs; }
LLOutfitsList* getMyOutfitsPanel() { return mMyOutfitsPanel; }
LLPanelWearing* getCurrentOutfitPanel() { return mCurrentOutfitPanel; }
// [/RLVa:KB]
static LLPanelOutfitsInventory* findInstance();
protected:

View File

@ -64,6 +64,9 @@
#include "llvoiceclient.h"
#include "llworld.h"
#include "llspeakers.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
#define FRIEND_LIST_UPDATE_TIMEOUT 0.5
#define NEARBY_LIST_UPDATE_INTERVAL 1
@ -578,6 +581,9 @@ BOOL LLPanelPeople::postBuild()
mNearbyList->setNoItemsMsg(getString("no_one_near"));
mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near"));
mNearbyList->setShowIcons("NearbyListShowIcons");
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
mNearbyList->setRlvCheckShowNames(true);
// [/RLVa:KB]
mMiniMap = (LLNetMap*)getChildView("Net Map",true);
mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ?
getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg"));
@ -876,7 +882,11 @@ 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
// 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.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]
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull());
}
else
@ -893,7 +903,11 @@ void LLPanelPeople::updateButtons()
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
if (cur_panel)
{
cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend);
// cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend);
// [RLVa:KB] - Checked: 2010-07-20 (RLVa-1.2.2a) | Added: RLVa-1.2.0h
cur_panel->getChildView("add_friend_btn")->setEnabled(
!is_friend && ((!nearby_tab_active) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))));
// [/RLBa:KB]
if (friends_tab_active)
{
cur_panel->getChildView("del_btn")->setEnabled(multiple_selected);
@ -903,6 +917,13 @@ void LLPanelPeople::updateButtons()
bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled();
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
if ( (nearby_tab_active) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
{
item_selected = multiple_selected = false;
}
// [/RLBa:KB]
buttonSetEnabled("view_profile_btn",item_selected);
buttonSetEnabled("share_btn", item_selected);
buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection

View File

@ -55,6 +55,10 @@ public:
// when voice is available
/*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
LLAvatarList* getNearbyList() { return mNearbyList; }
// [/RLVa:KB]
// internals
class Updater;

View File

@ -62,7 +62,10 @@
#include "llspinctrl.h"
#include "roles_constants.h"
#include "llgroupactions.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
#include "llslurl.h"
#include "rlvhandler.h"
// [/RLVa:KB]
U8 string_value_to_click_action(std::string p_value);
std::string click_action_to_string_value( U8 action);
@ -329,8 +332,9 @@ void LLPanelPermissions::refresh()
creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID,
creator_name);
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
// getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
// getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// Update owner text field
getChildView("Owner:")->setEnabled(TRUE);
@ -358,8 +362,28 @@ void LLPanelPermissions::refresh()
}
}
}
// getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
creator_name = LLSLURL("agent", mCreatorID, "rlvanonym").getSLURLString();
// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
owner_name = LLSLURL("agent", mOwnerID, "rlvanonym").getSLURLString();
}
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
getChildView("Owner Name")->setEnabled(TRUE);
// [/RLVa:KB]
// update group text field
getChildView("Group:")->setEnabled(TRUE);

View File

@ -52,6 +52,9 @@
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLRegisterPanelClassWrapper<LLPanelPlaceProfile> t_place_profile("panel_place_profile");
@ -594,7 +597,10 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mLastSelectedRegionID = region->getRegionID();
LLPanelPlaceInfo::processParcelInfo(parcel_data);
mYouAreHerePanel->setVisible(is_current_parcel);
// mYouAreHerePanel->setVisible(is_current_parcel);
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
mYouAreHerePanel->setVisible(is_current_parcel && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)));
// [/RLVa:KB]
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);
}
@ -661,6 +667,9 @@ void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata)
BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID &&
LLAgentUI::checkAgentDistance(self->mPosRegion, radius);
self->mYouAreHerePanel->setVisible(display_banner);
// self->mYouAreHerePanel->setVisible(display_banner);
// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
self->mYouAreHerePanel->setVisible(display_banner && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)));
// [/RLVa:KB]
}
}

View File

@ -52,13 +52,17 @@ public:
S32 notifyParent(const LLSD& info);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RVLa-1.2.0f
const LLUUID& getAvatarId() const { return mAvatarId; }
// [/RLVa:KB]
protected:
LLPanelProfile();
virtual void onTabSelected(const LLSD& param);
const LLUUID& getAvatarId() { return mAvatarId; }
// const LLUUID& getAvatarId() { return mAvatarId; }
void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }

View File

@ -85,6 +85,10 @@
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llappviewer.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
const std::string HELLO_LSL =
"default\n"
@ -1862,6 +1866,14 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
//self->mRunningCheckbox->get();
if( object )
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUtil::notifyBlockedGeneric();
return;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_SetScriptRunning);
msg->nextBlockFast(_PREHASH_AgentData);
@ -1887,6 +1899,14 @@ void LLLiveLSLEditor::onReset(void *userdata)
LLViewerObject* object = gObjectList.findObject( self->mObjectUUID );
if(object)
{
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUtil::notifyBlockedGeneric();
return;
}
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ScriptReset);
msg->nextBlockFast(_PREHASH_AgentData);
@ -2004,6 +2024,14 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
return;
}
// [RLVa:KB] - Checked: 2010-11-25 (RLVa-1.2.2b) | Modified: RLVa-1.2.2b
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
RlvUtil::notifyBlockedGeneric();
return;
}
// [/RLVa:KB]
// get the latest info about it. We used to be losing the script
// name on save, because the viewer object version of the item,
// and the editor version would get out of synch. Here's a good
@ -2278,6 +2306,7 @@ void LLLiveLSLEditor::onLoad(void* userdata)
void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save)
{
LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
self->mCloseAfterSave = close_after_save;
self->saveIfNeeded();
}

View File

@ -965,8 +965,17 @@ LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id)
std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(),
mStoredToastList.end(), id);
// if (it == mStoredToastList.end())
// return NULL;
// [SL:KB] - Patch: UI-Notifications | Checked: 2011-04-11 (Catznip-2.5.0a) | Modified: Catznip-2.5.0a
if (it == mStoredToastList.end())
return NULL;
{
// If we can't find it among the stored toasts then widen it to "all visible toasts"
it = find(mToastList.begin(), mToastList.end(), id);
if (it == mToastList.end())
return NULL;
}
// [/SL:KB]
return it->toast;
}

View File

@ -90,6 +90,9 @@
#include "llvovolume.h"
#include "pipeline.h"
#include "llviewershadermgr.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llglheaders.h"
@ -645,6 +648,16 @@ bool LLSelectMgr::enableLinkObjects()
new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
}
}
// [RLVa:KB] - Checked: 2011-03-19 (RLVa-1.3.0f) | Modified: RLVa-0.2.0g
if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) )
{
// Allow only if the avie isn't sitting on any of the selected objects
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectIsSittingOn f(gAgentAvatarp);
if (hSel->getFirstRootNode(&f, TRUE) != NULL)
new_value = false;
}
// [/RLVa:KB]
return new_value;
}
@ -655,7 +668,16 @@ bool LLSelectMgr::enableUnlinkObjects()
bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
first_editable_object &&
!first_editable_object->isAttachment();
// [RLVa:KB] - Checked: 2011-03-19 (RLVa-1.3.0f) | Modified: RLVa-0.2.0g
if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) )
{
// Allow only if the avie isn't sitting on any of the selected objects
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
RlvSelectIsSittingOn f(gAgentAvatarp);
if (hSel->getFirstRootNode(&f, TRUE) != NULL)
new_value = false;
}
// [/RLVa:KB]
return new_value;
}
@ -2937,6 +2959,16 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm)
void LLSelectMgr::selectDelete()
{
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) )
{
make_ui_sound("UISndInvalidOp");
if (!gFloaterTools->getVisible())
deselectAll();
return;
}
// [/RLVa:KB]
S32 deleteable_count = 0;
BOOL locked_but_deleteable_object = FALSE;
@ -3249,7 +3281,10 @@ struct LLDuplicateData
void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy)
{
if (mSelectedObjects->isAttachment())
// if (mSelectedObjects->isAttachment())
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
if ( (mSelectedObjects->isAttachment()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) )
// [/RLVa:KB]
{
//RN: do not duplicate attachments
make_ui_sound("UISndInvalidOp");
@ -3703,11 +3738,39 @@ void LLSelectMgr::convertTransient()
void LLSelectMgr::deselectAllIfTooFar()
{
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) )
{
struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor
{
bool apply(LLSelectNode* pNode)
{
const LLViewerObject* pObj = pNode->getObject();
return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) &&
(pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID());
}
} f;
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
deselectAll();
}
// [/RLVa:KB]
if (mSelectedObjects->isEmpty() || mSelectedObjects->mSelectType == SELECT_TYPE_HUD)
{
return;
}
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0l
#ifdef RLV_EXTENSION_CMD_INTERACT
// [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact=n restricted
if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))
{
deselectAll();
return;
}
#endif // RLV_EXTENSION_CMD_INTERACT
// [/RLVa:KB]
// HACK: Don't deselect when we're navigating to rate an object's
// owner or creator. JC
if (gMenuObject->getVisible())
@ -3716,13 +3779,20 @@ void LLSelectMgr::deselectAllIfTooFar()
}
LLVector3d selectionCenter = getSelectionCenterGlobal();
if (gSavedSettings.getBOOL("LimitSelectDistance")
// if (gSavedSettings.getBOOL("LimitSelectDistance")
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible();
if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) )
// [/RLVa:KB]
&& (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar())
&& (mSelectedObjects->getPrimaryObject() != LLViewerMediaFocus::getInstance()->getFocusedObject())
&& !mSelectedObjects->isAttachment()
&& !selectionCenter.isExactlyZero())
{
F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f;
// [/RLVa:KB]
F32 deselect_dist_sq = deselect_dist * deselect_dist;
LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter;
@ -6150,7 +6220,10 @@ BOOL LLSelectMgr::canDoDelete() const
can_delete = true;
}
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
can_delete &= (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn());
// [/RLVa:KB]
return can_delete;
}
@ -6182,7 +6255,12 @@ void LLSelectMgr::deselect()
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::canDuplicate() const
{
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG
// return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG
// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
return
(const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL) &&
( (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn()) );
// [/RLVa:KB]
}
//-----------------------------------------------------------------------------
// duplicate()

View File

@ -550,3 +550,15 @@ void LLSidepanelAppearance::updateScrollingPanelList()
mEditWearable->updateScrollingPanelList();
}
}
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
bool LLSidepanelAppearance::isOutfitEditPanelVisible() const
{
return (mOutfitEdit) && (mOutfitEdit->getVisible());
}
bool LLSidepanelAppearance::isWearableEditPanelVisible() const
{
return (mEditWearable) && (mEditWearable->getVisible());
}
// [/RLVa:KB]

View File

@ -65,6 +65,14 @@ public:
void updateScrollingPanelList();
void updateToVisibility( const LLSD& new_visibility );
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a
bool isOutfitEditPanelVisible() const;
bool isWearableEditPanelVisible() const;
LLPanelOutfitEdit* getOutfitEditPanel() { return mOutfitEdit; }
LLPanelEditWearable* getWearableEditPanel() { return mEditWearable; }
// [/RLVa:KB]
private:
void onFilterEdit(const std::string& search_string);
void onVisibilityChange ( const LLSD& new_visibility );

View File

@ -43,7 +43,9 @@
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
#include "rlvhandler.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLItemPropertiesObserver
@ -340,9 +342,17 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
if (item->getCreatorUUID().notNull())
{
LLUUID creator_id = item->getCreatorUUID();
std::string name =
LLSLURL("agent", creator_id, "completename").getSLURLString();
getChildView("BtnCreator")->setEnabled(TRUE);
// std::string name =
// LLSLURL("agent", creator_id, "completename").getSLURLString();
// getChildView("BtnCreator")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
// If the object creator matches the object owner we need to anonymize the creator field as well
bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == creator_id) && (perm.getOwner() != gAgent.getID())) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) );
std::string name = LLSLURL("agent", creator_id, (!fRlvFilterCreator) ? "completename" : "rlvanonym").getSLURLString();
getChildView("BtnCreator")->setEnabled(!fRlvFilterCreator);
// [/RLVa:KB]
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(FALSE);
getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
@ -368,9 +378,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
else
{
LLUUID owner_id = perm.getOwner();
name = LLSLURL("agent", owner_id, "completename").getSLURLString();
// name = LLSLURL("agent", owner_id, "completename").getSLURLString();
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (owner_id != gAgent.getID());
name = LLSLURL("agent", owner_id, (!fRlvFilterOwner) ? "completename" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
}
getChildView("BtnOwner")->setEnabled(TRUE);
// getChildView("BtnOwner")->setEnabled(TRUE);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Added: RLVa-1.0.0e
getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(FALSE);
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
@ -699,6 +716,17 @@ void LLSidepanelItemInfo::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
const LLPermissions& perm = item->getPermissions();
if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) && (perm.getOwner() != gAgent.getID())) ||
(RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
{
return;
}
}
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
@ -714,6 +742,10 @@ void LLSidepanelItemInfo::onClickOwner()
}
else
{
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (item->getPermissions().getOwner() != gAgent.getID()) )
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
}
}

View File

@ -61,6 +61,10 @@
#include "llspinctrl.h"
#include "roles_constants.h"
#include "llgroupactions.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
#include "llslurl.h"
#include "rlvhandler.h"
// [/RLVa:KB]
///----------------------------------------------------------------------------
/// Class llsidepaneltaskinfo
@ -330,8 +334,9 @@ void LLSidepanelTaskInfo::refresh()
creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID,
creator_name);
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
// getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
// getChildView("Creator Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// Update owner text field
getChildView("Owner:")->setEnabled(TRUE);
@ -359,8 +364,28 @@ void LLSidepanelTaskInfo::refresh()
}
}
}
// getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
creator_name = LLSLURL("agent", mCreatorID, "rlvanonym").getSLURLString();
// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
owner_name = LLSLURL("agent", mOwnerID, "rlvanonym").getSLURLString();
}
getChild<LLUICtrl>("Creator Name")->setValue(creator_name);
getChildView("Creator Name")->setEnabled(TRUE);
getChild<LLUICtrl>("Owner Name")->setValue(owner_name);
getChildView("Owner Name")->setEnabled(TRUE);
// [/RLVa:KB]
// update group text field
getChildView("Group:")->setEnabled(TRUE);

View File

@ -34,6 +34,9 @@
#include "llviewernetwork.h"
#include "llfiltersd2xmlrpc.h"
#include "curl/curl.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
const char* LLSLURL::SLURL_HTTP_SCHEME = "http";
const char* LLSLURL::SLURL_HTTPS_SCHEME = "https";
const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
@ -381,8 +384,13 @@ std::string LLSLURL::getSLURLString() const
S32 x = llround( (F32)mPosition[VX] );
S32 y = llround( (F32)mPosition[VY] );
S32 z = llround( (F32)mPosition[VZ] );
return LLGridManager::getInstance()->getSLURLBase(mGrid) +
LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
// return LLGridManager::getInstance()->getSLURLBase(mGrid) +
// LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
return LLGridManager::getInstance()->getSLURLBase(mGrid) +
( ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) || (!RlvUtil::isNearbyRegion(mRegion)))
? (LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z)) : RlvStrings::getString(RLV_STRING_HIDDEN_REGION) );
// [/RLVa:KB]
}
case APP:
{

View File

@ -187,6 +187,10 @@
#include "llavatariconctrl.h"
#include "llvoicechannel.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lllogin.h"
#include "llevents.h"
#include "llstartuplistener.h"
@ -370,6 +374,13 @@ bool idle_startup()
std::string lastGPU = gSavedSettings.getString("LastGPUString");
std::string thisGPU = LLFeatureManager::getInstance()->getGPUString();
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-0.2.1d
if ( (gSavedSettings.controlExists(RLV_SETTING_MAIN)) && (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) )
{
rlv_handler_t::setEnabled(TRUE);
}
// [/RLVa:KB]
if (LLFeatureManager::getInstance()->isSafe())
{
LLNotificationsUtil::add("DisplaySetToSafe");
@ -956,6 +967,18 @@ bool idle_startup()
// their last location, or some URL "-url //sim/x/y[/z]"
// All accounts have both a home and a last location, and we don't support
// more locations than that. Choose the appropriate one. JC
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
#ifndef RLV_EXTENSION_STARTLOCATION
if (rlv_handler_t::isEnabled())
#else
if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) )
#endif // RLV_EXTENSION_STARTLOCATION
{
// Force login at the last location
LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
}
// [/RLVa:KB]
switch (LLStartUp::getStartSLURL().getType())
{
case LLSLURL::LOCATION:
@ -1774,6 +1797,14 @@ bool idle_startup()
llinfos << "Creating Inventory Views" << llendl;
LLFloaterReg::getInstance("inventory");
display_startup();
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.1.0f
if (rlv_handler_t::isEnabled())
{
// Regularly process a select subset of retained commands during logon
gIdleCallbacks.addFunction(RlvHandler::onIdleStartup, new LLTimer());
}
// [/RLVa:KB]
LLStartUp::setStartupState( STATE_MISC );
display_startup();
return FALSE;

Some files were not shown because too many files have changed in this diff Show More