Rolling back before back RLV merge

master
Arrehn 2010-11-04 10:02:01 -07:00
parent 8f47cda8de
commit d0d3e716dc
322 changed files with 1506 additions and 16184 deletions

View File

@ -1,3 +0,0 @@
d751cf52d416e73452a26184693bae8c1a8eeb2a
6481d02117a7c26a9dbab7bdab4890e69d51ac4c
411a8284a6707e77aff592ff9848a34615c35a3e

View File

@ -1 +0,0 @@
6481d02117a7c26a9dbab7bdab4890e69d51ac4c

View File

@ -1,24 +0,0 @@
[Appearance/Misc]
- fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts
- fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID
-> fix for http://jira.secondlife.com/browse/VWR-20608
- fixed : attachments sometimes detach only to instantly get reattached after logon
- fixed : Add to/Replace Outfit removes newly worn attachments on completion
-> fix for http://jira.secondlife.com/browse/VWR-18512
- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar
- fixed : attachments that attach and then instantly detach don't have their COF link removed
- fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption"
- fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn
- fixed : drag-and-drop wear behaviour of an attachment onto self isn't consistant with the drag-and-drop behaviour of wearables
-> normal-drop : replace wear
-> Ctrl-drop : add wear
- fixed : LLAppearanceMgr::registerAttachment() fails to (re)add a link for worn attachments that aren't linked to in COF at log-on
- changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly
-> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway
- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty
- changed : "RenderUnloadedAvatar" no longer affects the user's own avatar
-> side-effect of the fix above due to the change to LLVOAvatar::isFullyLoaded()
- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded
- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point
-> maps secondary attachment point range [39,68] onto [1,30]
-> only dislays "secondary attachment points" correctly for *other* avatars (by design)

View File

@ -1 +0,0 @@
6481d02117a7c26a9dbab7bdab4890e69d51ac4c

View File

@ -1,4 +0,0 @@
[Appearance/MixedViewers]
- fixed : "Worn items in Viewer 2 and Viewer 1.x aren't synchronized" (http://jira.secondlife.com/browse/VWR-17594)
-> current fix compares *only* the wearables in COF with the wearables specified by AgentWearablesUpdate
- fixed : minor memory leak in LLInitialWearablesFetch::processWearablesMessage()

View File

@ -1 +0,0 @@
c0b06fb359858375f2e233254faaa08ed6985718

View File

@ -1 +0,0 @@
dc8ac597008aff67095b81bda6e059083f91faad

View File

@ -1,5 +0,0 @@
[Viewer/Build]
- changed : compiler options for "Release with Debug" builds
- changed : compiler and linker options for "Release" builds
- added : imported SNOW-788 - Fix boost lib detection with Visual Studio to allow multiple VS versions
- changed : removed LL's changeset tags and added new (consistent) SL-2.X.Y tags for releases

View File

@ -1,4 +1,3 @@
bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2.1.1-release
003dd9461bfa479049afcc34545ab3431b147c7c v2start
08398e650c222336bb2b6de0cd3bba944aef11b4 2-1rn1
0962101bfa7df0643a6e625786025fe7f8a6dc97 2-1-beta-2
@ -9,20 +8,16 @@ bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2.1.1-release
3469d90a115b900f8f250e137bbd9b684130f5d2 beta-4
3e4b947f79d88c385e8218cbc0731cef0e42cfc4 2-1-beta-1
46002088d9a4489e323b8d56131c680eaa21258c viewer-2-1-0-start
4f777ffb99fefdc6497c61385c22688ff149c659 SL-2.0.0
4f777ffb99fefdc6497c61385c22688ff149c659 viewer-2-0-0
52d96ad3d39be29147c5b2181b3bb46af6164f0e alpha-3
668851b2ef0f8cf8df07a0fba429e4a6c1e70abb viewer-2-0-1
668851b2ef0f8cf8df07a0fba429e4a6c1e70abb SL-2.0.1
6e3b2e13906ba8ff22d3c8490b02d518adb2c907 2-1-1-beta-2
7f16e79826d377f5f9f5b33dc721ab56d0d7dc8f alpha-4
7f16e79826d377f5f9f5b33dc721ab56d0d7dc8f fork to viewer-20qa
80bc6cff515118a36108967af49d3f8105c95bc9 viewer-2-0-2-start
b03065d018b8a2e28b7de85b293a4c992cb4c12d 2-1-release
b03065d018b8a2e28b7de85b293a4c992cb4c12d SL-2.1.0
b8419565906e4feb434426d8d9b17dd1458e24b2 alpha-6
bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2-1-1-release
bb38ff1a763738609e1b3cada6d15fa61e5e84b9 SL-2.1.1
c6969fe44e58c542bfc6f1bd6c0be2fa860929ac 2-1-beta-4
d2382d374139850efa5bb6adfb229e3e656cfc40 howard-demo
d40ac9dd949cba6dab1cc386da6a2027690c2519 alpha-5
@ -34,7 +29,3 @@ c6e6324f5be1401f077ad18a4a0f6b46451c2f7b last_sprint
b0cd7e150009809a0b5b0a9d5785cd4bb230413a 2.2.0-beta3
00a831292231faad7e44c69f76cb96f175b8dfad 2.2.0-beta4
98e0d6df638429fd2f0476667504bd5a6b298def 2.3.0-beta1
1415e6538d54fd5d568ee88343424d57c6803c2c 2.2.0-release
98e0d6df638429fd2f0476667504bd5a6b298def 2.3.0-start
a3c12342b1af0951b8aa3b828aacef17fcea8178 2.3.0-beta1
425f96b1e81e01644bf5e951961e7d1023bffb89 RLVa-1.2.0

View File

@ -3,8 +3,3 @@ First set up your system as described in the snowstorm linux wiki.
- We do non-standalone builds
Run ./build_firestorm_linux.sh
NOTE: IF you receive build failures related to libUUID, copy your system libUUID library over the download supplied by SL:
cd /your/firestorm/code/tree
cp /lib/libuuid.so.1.3.0 libraries/i686-linux/lib_release_client/libuuid.so
cp /lib/libuuid.so.1.3.0 libraries/i686-linux/lib_release_client/libuuid.so.1

View File

@ -1,48 +1,12 @@
Before you start configuring your Windows build system, be aware of our tested configurations:
Memory: You will need at least 2GB RAM
CPU: Multiple CPUs are strongly recommended. A build can take over an hour.
Tested Build Environments:
WinXPSP3, 32bit, 2GB RAM, Visual Studio Pro 2005 SP1, latest VC++ runtime installed
If you are not using something that closely matches a tested configuration, you may run into trouble,
particularly with different versions of Visual Studio.
To get started, follow the snowstorm instructions for setting up a windows build environment at this page:
Follow the snowstorm instructions for setting up a windows build environment
http://wiki.secondlife.com/wiki/Viewer_2_Microsoft_Windows_Builds
GET THE PHOENIX SOURCE
======================
Open up cygwin and run the following commands one at a time
mkdir /cygdrive/c/code
cd /cygdrive/c/code
hg clone http://hg.phoenixviewer.com/phoenix-firestorm-lpgl
Make sure to copy fmod.dll into both your indra/ folder and also libraries/i686-win32/Release and libraries/RelWithDebInfo
COMMAND LINE BUILDS
===================
Open up cygwin and navigate to your code directory. Example:
cd /cygdrive/c/my/path/to/phoenix-firestorm-lgpl
cd /cygdrive/c/my/path/to/phoenix-firestorm
Execute the command to build firestorm in the cygwin window:
run ./build_firestorm_win32.sh
./build_firestorm_win32.sh
This will do a clean compile. Rebuilds should be possible by specifying --rebuild. This build is a work in progress. Alternately, build in visual studio. By default, packaging is not enabled.
This will do a clean compile. Rebuilds should be possible by specifying --rebuild.
NOTE: It is normal to see errors about ambiguous include/library paths at this time. It will not cause the build to fail
A log for the build will be placed in logs/build_firestorm_windows.log
VISUAL STUDIO BUILDS
====================
0. Open up a regular CMD.exe command window. Navigate to your downloaded source code.
1. Run the command "develop.py -G vc80 -t Release configure -DLL_TESTS:BOOL=OFF"
1. Launch Visual Studio and open up <your downloaded phoenix code>\indra\build-vc80\Secondlife.sln
2. Set the build type to Release
3. Select the "firestorm-bin" target
4. Build.

View File

@ -228,7 +228,7 @@ do
fi
else
begin_section "Build$variant"
build "$variant" "$build_dir" >> "$build_log" 2>&1
build "$variant" "$build_dir" > "$build_log" 2>&1
begin_section Tests
grep --line-buffered "^##teamcity" "$build_log"
end_section Tests

View File

@ -16,7 +16,6 @@ WANTS_CLEAN=$TRUE
WANTS_CONFIG=$TRUE
WANTS_BUILD=$TRUE
WANTS_PACKAGE=$TRUE
WANTS_VERSION=$TRUE
###
### Helper Functions
@ -26,7 +25,6 @@ if [ "$1" == "--rebuild" ] ; then
echo "rebuilding..."
WANTS_CLEAN=$FALSE
WANTS_CONFIG=$FALSE
WANTS_VERSION=$FALSE
fi
###
@ -51,15 +49,14 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then
./develop.py -t release | tee $LOG
fi
if [ $WANTS_VERSION -eq $TRUE ] ; then
if [ $WANTS_BUILD -eq $TRUE ] ; then
echo -n "Updating build version to "
buildVer=`grep -o -e "LL_VERSION_BUILD = [0-9]\+" llcommon/llversionviewer.h | cut -f 3 -d " "`
echo $((++buildVer))
sed -e "s#LL_VERSION_BUILD = [0-9][0-9]*#LL_VERSION_BUILD = ${buildVer}#" llcommon/llversionviewer.h > llcommon/llversionviewer.h1
mv llcommon/llversionviewer.h1 llcommon/llversionviewer.h
fi
if [ $WANTS_BUILD -eq $TRUE ] ; then
echo "Building in progress... Check $LOG for verbose status"
./develop.py -t release build 2>&1 | tee $LOG | grep -e "make.*Error "
echo "Complete"

View File

@ -6,13 +6,7 @@
TRUE=0 # Map the shell's idea of truth to a variable for better documentation
FALSE=1
# If you have some other version of python installed other than 26, do not edit this file.
# Add a line like this to ~/.bashrc:
# WINPYTHON="/cygdrive/c/path_to_your_python.exe"
# And then close and restart cygwin
if [ -z $WINPYTHON ] ; then
WINPYTHON="/cygdrive/c/Python26/python.exe"
PYTHON="/cygdrive/c/Python26/python.exe"
LOG="`pwd`/logs/build_win32.log"
###
@ -39,37 +33,30 @@ fi
###
path=$WINPATH:/usr/local/bin:/usr/bin:/bin
if [ ! -f "$WINPYTHON" ] ; then
echo "ERROR: You need to edit .bashrc and set WINPYTHON at the top to point at the path of your windows python executable."
if [ ! -f "$PYTHON" ] ; then
echo "ERROR: You need to edit this file and set PYTHON at the top to point at the path of your python executable."
exit 1
fi
pushd indra
if [ $WANTS_CLEAN -eq $TRUE ] ; then
$WINPYTHON develop.py clean
cmd /c "develop.py clean"
find . -name "*.pyc" -exec rm {} \;
fi
if [ $WANTS_CONFIG -eq $TRUE ] ; then
mkdir -p ../logs > /dev/null 2>&1
$WINPYTHON develop.py -G vc80 -t Release configure -DPACKAGE:BOOL=ON -DLL_TESTS:BOOL=OFF 2>&1 | tee $LOG
mkdir -p build-vc80/sharedlibs/RelWithDebInfo
mkdir -p build-vc80/sharedlibs/Release
cp fmod.dll ./build-vc80/sharedlibs/RelWithDebInfo
cp fmod.dll ./build-vc80/sharedlibs/Release
$PYTHON develop.py -G vc80 -t Release configure -DPACKAGE:BOOL=OFF -DLL_TESTS:BOOL=OFF 2>&1 | tee $LOG
mkdir -p build_vc80/sharedlibs/RelWithDebInfo
mkdir -p build_vc80/sharedlibs/Release
cp fmod.dll ./build_vc80/sharedlibs/RelWithDebInfo
cp fmod.dll ./build_vc80/sharedlibs/Release
fi
if [ $WANTS_BUILD -eq $TRUE ] ; then
echo -n "Updating build version to "
buildVer=`grep -o -e "LL_VERSION_BUILD = [0-9]\+" llcommon/llversionviewer.h | cut -f 3 -d " "`
echo $((++buildVer))
sed -e "s#LL_VERSION_BUILD = [0-9][0-9]*#LL_VERSION_BUILD = ${buildVer}#" llcommon/llversionviewer.h > llcommon/llversionviewer.h1
mv llcommon/llversionviewer.h1 llcommon/llversionviewer.h
echo "Building in progress... Check $LOG for verbose status"
$WINPYTHON develop.py -G vc80 -t Release build 2>&1 | tee -a $LOG | grep Build
$PYTHON develop.py -G vc80 -t Release build 2>&1 | tee -a $LOG
echo "Complete"
fi
popd

View File

@ -62,25 +62,20 @@ Alejandro Rosenthal
VWR-1184
Aleric Inglewood
SNOW-522
SNOW-626
SNOW-756
SNOW-764
VWR-10001
VWR-10759
VWR-10837
VWR-12691
VWR-12984
VWR-13996
VWR-14426
SNOW-84
SNOW-477
SNOW-766
STORM-163
Ales Beaumont
VWR-9352
SNOW-240
Alexandrea Fride
STORM-255
Alissa Sabre
VWR-81
VWR-83
@ -129,7 +124,6 @@ Alissa Sabre
VWR-12617
VWR-12620
VWR-12789
SNOW-322
Angus Boyd
VWR-592
Ann Congrejo
@ -146,7 +140,6 @@ Asuka Neely
Balp Allen
VWR-4157
Be Holder
SNOW-322
SNOW-397
Benja Kepler
VWR-746
@ -180,7 +173,6 @@ Boroondas Gupte
VWR-233
VWR-20583
VWR-20891
VWR-23455
WEB-262
Bulli Schumann
CT-218
@ -210,8 +202,6 @@ Catherine Pfeffer
Celierra Darling
VWR-1274
VWR-6975
Cypren Christenson
STORM-417
Dale Glass
VWR-120
VWR-560
@ -391,8 +381,6 @@ Malwina Dollinger
CT-138
march Korda
SVC-1020
Marine Kelley
STORM-281
Matthew Dowd
VWR-1344
VWR-1651
@ -541,7 +529,6 @@ Pf Shan
CT-230
CT-231
CT-321
SNOW-422
princess niven
VWR-5733
CT-85
@ -598,8 +585,6 @@ Salahzar Stenvaag
CT-321
Sammy Frederix
VWR-6186
Satomi Ahn
STORM-501
Scrippy Scofield
VWR-3748
Seg Baphomet
@ -658,7 +643,6 @@ Strife Onizuka
VWR-183
VWR-2265
VWR-4111
SNOW-691
Tayra Dagostino
SNOW-517
SNOW-543
@ -758,9 +742,6 @@ Wilton Lundquist
VWR-7682
Zai Lynch
VWR-19505
Wolfpup Lowenhar
STORM-255
STORM-256
Zarkonnen Decosta
VWR-253
Zi Ree

View File

@ -35,7 +35,7 @@ if (WINDOWS)
# Don't build DLLs.
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MD /MP"
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP"
CACHE STRING "C++ compiler debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP"
@ -78,7 +78,6 @@ if (WINDOWS)
# configure win32 API for windows XP+ compatibility
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
endif (WINDOWS)

View File

@ -1,26 +1,64 @@
# -*- cmake -*-
set(FMOD ON CACHE BOOL "Use FMOD sound library.")
if (FMOD)
if (STANDALONE)
set(FMOD_FIND_REQUIRED ON)
include(FindFMOD)
else (STANDALONE)
if (INSTALL_PROPRIETARY)
include(Prebuilt)
use_prebuilt_binary(fmod)
endif (INSTALL_PROPRIETARY)
if (WINDOWS)
set(FMOD_LIBRARY fmod)
elseif (DARWIN)
set(FMOD_LIBRARY fmod)
elseif (LINUX)
set(FMOD_LIBRARY fmod-3.75)
endif (WINDOWS)
SET(FMOD_LIBRARIES ${FMOD_LIBRARY})
set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
endif (STANDALONE)
endif (FMOD)
# -*- cmake -*-
include(Linking)
if(INSTALL_PROPRIETARY)
include(Prebuilt)
use_prebuilt_binary(fmod)
endif(INSTALL_PROPRIETARY)
find_library(FMOD_LIBRARY_RELEASE
NAMES fmod fmodvc fmod-3.75
PATHS
${ARCH_PREBUILT_DIRS_RELEASE}
)
find_library(FMOD_LIBRARY_DEBUG
NAMES fmod fmodvc fmod-3.75
PATHS
${ARCH_PREBUILT_DIRS_DEBUG}
)
if (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG)
set(FMOD_LIBRARY
debug ${FMOD_LIBRARY_DEBUG}
optimized ${FMOD_LIBRARY_RELEASE})
elseif (FMOD_LIBRARY_RELEASE)
set(FMOD_LIBRARY ${FMOD_LIBRARY_RELEASE})
endif (FMOD_LIBRARY_RELEASE AND FMOD_LIBRARY_DEBUG)
if (NOT FMOD_LIBRARY)
set(FMOD_SDK_DIR CACHE PATH "Path to the FMOD SDK.")
if (FMOD_SDK_DIR)
find_library(FMOD_LIBRARY
NAMES fmodvc fmod-3.75 fmod
PATHS
${FMOD_SDK_DIR}/api/lib
${FMOD_SDK_DIR}/api
${FMOD_SDK_DIR}/lib
${FMOD_SDK_DIR}
)
endif (FMOD_SDK_DIR)
endif (NOT FMOD_LIBRARY)
find_path(FMOD_INCLUDE_DIR fmod.h
${LIBS_PREBUILT_DIR}/include
${FMOD_SDK_DIR}/api/inc
${FMOD_SDK_DIR}/inc
${FMOD_SDK_DIR}
)
if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
set(FMOD ON CACHE BOOL "Use closed source FMOD sound library.")
else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
set(FMOD_LIBRARY "")
set(FMOD_INCLUDE_DIR "")
if (FMOD)
message(STATUS "No support for FMOD audio (need to set FMOD_SDK_DIR?)")
endif (FMOD)
set(FMOD OFF CACHE BOOL "Use closed source FMOD sound library.")
endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
if (FMOD)
message(STATUS "Building with FMOD audio support")
endif (FMOD)

View File

@ -14,6 +14,7 @@ include(LLVFS)
include_directories(
${LLAUDIO_INCLUDE_DIRS}
${FMOD_INCLUDE_DIR}
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
@ -44,10 +45,6 @@ set(llaudio_HEADER_FILES
)
if (FMOD)
include_directories(
${FMOD_INCLUDE_DIR}
)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmod.cpp
lllistener_fmod.cpp

View File

@ -120,13 +120,6 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
+ ((U32) wav_header[5] << 8)
+ wav_header[4];
if (chunk_length > physical_file_size - file_pos - 4)
{
infile.close();
error_msg = "SoundFileInvalidChunkSize";
return(LLVORBISENC_CHUNK_SIZE_ERR);
}
// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))

View File

@ -38,7 +38,6 @@ const S32 LLVORBISENC_MULTICHANNEL_ERR = 7; // can't do stereo
const S32 LLVORBISENC_UNSUPPORTED_SAMPLE_RATE = 8; // unsupported sample rate
const S32 LLVORBISENC_UNSUPPORTED_WORD_SIZE = 9; // unsupported word size
const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too long
const S32 LLVORBISENC_CHUNK_SIZE_ERR = 11; // chunk size is wrong
const F32 LLVORBIS_CLIP_MAX_TIME = 10.0f;
const U8 LLVORBIS_CLIP_MAX_CHANNELS = 2;

View File

@ -80,10 +80,6 @@ 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(),
@ -101,10 +97,6 @@ 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

@ -51,7 +51,7 @@ public:
LLDynamicArray(S32 size=0) : std::vector<Type>(size) { if (size < BlockSize) std::vector<Type>::reserve(BlockSize); }
void reset() { std::vector<Type>::clear(); }
void reset() { std::vector<Type>::resize(0); }
// ACCESSORS
const Type& get(S32 index) const { return std::vector<Type>::operator[](index); }

View File

@ -28,14 +28,10 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
const S32 LL_VERSION_MINOR = 4;
const S32 LL_VERSION_PATCH = 0;
const S32 LL_VERSION_BUILD = 36;
const S32 LL_VERSION_MINOR = 2;
const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 15;
const char * const LL_CHANNEL = "Firestorm Developer";
#if LL_DARWIN
const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer";
#endif
#endif

View File

@ -38,8 +38,6 @@
#include "message.h"
#include "llmemtype.h"
#include <boost/regex.hpp>
// llsd serialization constants
static const std::string AGENTS("agents");
static const std::string GROUPS("groups");
@ -553,44 +551,6 @@ std::string LLCacheName::buildUsername(const std::string& full_name)
return full_name;
}
//static
std::string LLCacheName::buildLegacyName(const std::string& complete_name)
{
// regexp doesn't play nice with unicode, chop off the display name
S32 open_paren = complete_name.rfind(" (");
if (open_paren == std::string::npos)
{
return complete_name;
}
std::string username = complete_name.substr(open_paren);
boost::regex complete_name_regex("( \\()([a-z0-9]+)(.[a-z]+)*(\\))");
boost::match_results<std::string::const_iterator> name_results;
if (!boost::regex_match(username, name_results, complete_name_regex)) return complete_name;
std::string legacy_name = name_results[2];
// capitalize the first letter
std::string cap_letter = legacy_name.substr(0, 1);
LLStringUtil::toUpper(cap_letter);
legacy_name = cap_letter + legacy_name.substr(1);
if (name_results[3].matched)
{
std::string last_name = name_results[3];
std::string cap_letter = last_name.substr(1, 1);
LLStringUtil::toUpper(cap_letter);
last_name = cap_letter + last_name.substr(2);
legacy_name = legacy_name + " " + last_name;
}
else
{
legacy_name = legacy_name + " Resident";
}
return legacy_name;
}
// This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer.
// The reason it is a slot is so that the legacy get() function below can bind an old callback
// and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior

View File

@ -90,12 +90,6 @@ public:
// "Random Linden" -> "random.linden"
static std::string buildUsername(const std::string& name);
// Converts a complete display name to a legacy name
// if possible, otherwise returns the input
// "Alias (random.linden)" -> "Random Linden"
// "Something random" -> "Something random"
static std::string buildLegacyName(const std::string& name);
// If available, this method copies the group name into the string
// provided. The caller must allocate at least
// DB_GROUP_NAME_BUF_SIZE characters. If not available, this

View File

@ -610,46 +610,41 @@ void LLGLManager::shutdownGL()
void LLGLManager::initExtensions()
{
#if LL_MESA_HEADLESS
# ifdef GL_ARB_multitexture
# if GL_ARB_multitexture
mHasMultitexture = TRUE;
# else
mHasMultitexture = FALSE;
# endif
# ifdef GL_ARB_texture_env_combine
# if GL_ARB_texture_env_combine
mHasARBEnvCombine = TRUE;
# else
mHasARBEnvCombine = FALSE;
# endif
# ifdef GL_ARB_texture_compression
# if GL_ARB_texture_compression
mHasCompressedTextures = TRUE;
# else
mHasCompressedTextures = FALSE;
# endif
# ifdef GL_ARB_vertex_buffer_object
# if GL_ARB_vertex_buffer_object
mHasVertexBufferObject = TRUE;
# else
mHasVertexBufferObject = FALSE;
# endif
# ifdef GL_EXT_framebuffer_object
# if GL_EXT_framebuffer_object
mHasFramebufferObject = TRUE;
# else
mHasFramebufferObject = FALSE;
# endif
# ifdef GL_EXT_framebuffer_multisample
# if GL_EXT_framebuffer_multisample
mHasFramebufferMultisample = TRUE;
# else
mHasFramebufferMultisample = FALSE;
# endif
# ifdef GL_ARB_draw_buffers
# if GL_ARB_draw_buffers
mHasDrawBuffers = TRUE;
#else
mHasDrawBuffers = FALSE;
# endif
# if defined(GL_NV_depth_clamp) || defined(GL_ARB_depth_clamp)
mHasDepthClamp = TRUE;
#else
mHasDepthClamp = FALSE;
#endif
# if GL_EXT_blend_func_separate
mHasBlendFuncSeparate = TRUE;
#else
@ -676,7 +671,6 @@ void LLGLManager::initExtensions()
mHasCompressedTextures = glh_init_extensions("GL_ARB_texture_compression");
mHasOcclusionQuery = ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts);
mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts);
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
mHasFramebufferObject = ExtensionExists("GL_EXT_framebuffer_object", gGLHExts.mSysExts)
&& ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts);
@ -700,7 +694,6 @@ void LLGLManager::initExtensions()
if (getenv("LL_GL_NOEXT"))
{
//mHasMultitexture = FALSE; // NEEDED!
mHasDepthClamp = FALSE;
mHasARBEnvCombine = FALSE;
mHasCompressedTextures = FALSE;
mHasVertexBufferObject = FALSE;
@ -762,7 +755,6 @@ void LLGLManager::initExtensions()
if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE;
if (strchr(blacklist,'t')) mHasTextureRectangle = FALSE;
if (strchr(blacklist,'u')) mHasBlendFuncSeparate = FALSE;//S
if (strchr(blacklist,'v')) mHasDepthClamp = FALSE;
}
#endif // LL_LINUX || LL_SOLARIS
@ -2045,7 +2037,7 @@ void LLGLDepthTest::checkState()
}
}
LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P)
LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P)
{
for (U32 i = 0; i < 4; i++)
{
@ -2058,7 +2050,7 @@ LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P)
glMatrixMode(GL_MODELVIEW);
}
LLGLSquashToFarClip::~LLGLSquashToFarClip()
LLGLClampToFarClip::~LLGLClampToFarClip()
{
glMatrixMode(GL_PROJECTION);
glPopMatrix();

View File

@ -92,7 +92,6 @@ public:
BOOL mHasOcclusionQuery;
BOOL mHasPointParameters;
BOOL mHasDrawBuffers;
BOOL mHasDepthClamp;
BOOL mHasTextureRectangle;
// Other extensions.
@ -316,11 +315,11 @@ private:
leaves this class.
Does not stack.
*/
class LLGLSquashToFarClip
class LLGLClampToFarClip
{
public:
LLGLSquashToFarClip(glh::matrix4f projection);
~LLGLSquashToFarClip();
LLGLClampToFarClip(glh::matrix4f projection);
~LLGLClampToFarClip();
};
/*

View File

@ -829,15 +829,5 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
#endif // LL_MESA / LL_WINDOWS / LL_DARWIN
// Even when GL_ARB_depth_clamp is available in the driver, the (correct)
// headers, and therefore GL_DEPTH_CLAMP might not be defined.
// In that case GL_DEPTH_CLAMP_NV should be defined, but why not just
// use the known numeric.
//
// To avoid #ifdef's in the code. Just define this here.
#ifndef GL_DEPTH_CLAMP
// Probably (still) called GL_DEPTH_CLAMP_NV.
#define GL_DEPTH_CLAMP 0x864F
#endif
#endif // LL_LLGLHEADERS_H

View File

@ -45,10 +45,6 @@ std::set<std::string> LLFloaterReg::sAlwaysShowableList;
static LLFloaterRegListener sFloaterRegListener;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
LLFloaterReg::validate_signal_t LLFloaterReg::mValidateSignal;
// [/RLVa:KB]
//*******************************************************
//static
@ -218,12 +214,9 @@ 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())
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
if ( (sBlockShowFloaters && sAlwaysShowableList.find(name) == sAlwaysShowableList.end()) || (!mValidateSignal(name, key)) )
// [/RLVa:KB]
if( sBlockShowFloaters
// see EXT-7090
&& sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
return 0;//
LLFloater* instance = getInstance(name, key);
if (instance)

View File

@ -75,15 +75,6 @@ private:
*/
static std::set<std::string> sAlwaysShowableList;
// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.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

@ -29,7 +29,7 @@
#include "llmenubutton.h"
// Linden library includes
#include "lltoggleablemenu.h"
#include "llmenugl.h"
#include "llstring.h"
#include "v4color.h"
@ -44,77 +44,58 @@ LLMenuButton::Params::Params()
LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
: LLButton(p),
mIsMenuShown(false),
mMenuPosition(MP_BOTTOM_LEFT)
mMenu(NULL),
mMenuVisibleLastFrame(false)
{
std::string menu_filename = p.menu_filename;
if (!menu_filename.empty())
{
LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
if (!menu)
mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
if (!mMenu)
{
llwarns << "Error loading menu_button menu" << llendl;
return;
}
menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2));
mMenuHandle = menu->getHandle();
updateMenuOrigin();
}
}
boost::signals2::connection LLMenuButton::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
void LLMenuButton::toggleMenu()
{
return LLUICtrl::setMouseDownCallback(cb);
}
if(!mMenu)
return;
void LLMenuButton::hideMenu()
{
if(mMenuHandle.isDead()) return;
LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
if (menu)
if (mMenu->getVisible() || mMenuVisibleLastFrame)
{
menu->setVisible(FALSE);
mMenu->setVisible(FALSE);
}
else
{
LLRect rect = getRect();
//mMenu->needsArrange(); //so it recalculates the visible elements
LLMenuGL::showPopup(getParent(), mMenu, rect.mLeft, rect.mBottom);
}
}
LLToggleableMenu* LLMenuButton::getMenu()
{
return dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
void LLMenuButton::hideMenu()
{
if(!mMenu)
return;
mMenu->setVisible(FALSE);
}
void LLMenuButton::setMenu(LLToggleableMenu* menu, EMenuPosition position /*MP_TOP_LEFT*/)
{
if (!menu) return;
mMenuHandle = menu->getHandle();
mMenuPosition = position;
menu->setVisibilityChangeCallback(boost::bind(&LLMenuButton::onMenuVisibilityChange, this, _2));
}
BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
{
if (mMenuHandle.isDead()) return FALSE;
if( KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key))
{
// *HACK: We emit the mouse down signal to fire the callback bound to the
// menu emerging event before actually displaying the menu. See STORM-263.
LLUICtrl::handleMouseDown(-1, -1, MASK_NONE);
toggleMenu();
return TRUE;
}
LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
if (menu && menu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE)
if (mMenu && mMenu->getVisible() && key == KEY_ESCAPE && mask == MASK_NONE)
{
menu->setVisible(FALSE);
mMenu->setVisible(FALSE);
return TRUE;
}
@ -123,77 +104,34 @@ BOOL LLMenuButton::handleKeyHere(KEY key, MASK mask )
BOOL LLMenuButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
LLButton::handleMouseDown(x, y, mask);
if (hasTabStop() && !getIsChrome())
{
setFocus(TRUE);
}
toggleMenu();
if (getSoundFlags() & MOUSE_DOWN)
{
make_ui_sound("UISndClick");
}
return TRUE;
}
void LLMenuButton::toggleMenu()
void LLMenuButton::draw()
{
if(mMenuHandle.isDead()) return;
LLToggleableMenu* menu = dynamic_cast<LLToggleableMenu*>(mMenuHandle.get());
if (!menu) return;
// Store the button rectangle to toggle menu visibility if a mouse event
// occurred inside or outside the button rect.
menu->setButtonRect(this);
if (!menu->toggleVisibility() && mIsMenuShown)
//we save this off so next frame when we try to close it by
//button click, and it hides menus before we get to it, we know
mMenuVisibleLastFrame = mMenu && mMenu->getVisible();
if (mMenuVisibleLastFrame)
{
setForcePressedState(false);
mIsMenuShown = false;
}
else
{
menu->buildDrawLabels();
menu->arrangeAndClear();
menu->updateParent(LLMenuGL::sMenuContainer);
updateMenuOrigin();
LLMenuGL::showPopup(getParent(), menu, mX, mY);
setForcePressedState(true);
mIsMenuShown = true;
}
LLButton::draw();
setForcePressedState(false);
}
void LLMenuButton::updateMenuOrigin()
{
if (mMenuHandle.isDead()) return;
LLRect rect = getRect();
switch (mMenuPosition)
{
case MP_TOP_LEFT:
{
mX = rect.mLeft;
mY = rect.mTop + mMenuHandle.get()->getRect().getHeight();
break;
}
case MP_BOTTOM_LEFT:
{
mX = rect.mLeft;
mY = rect.mBottom;
break;
}
}
}
void LLMenuButton::onMenuVisibilityChange(const LLSD& param)
{
bool new_visibility = param["visibility"].asBoolean();
bool is_closed_by_button_click = param["closed_by_button_click"].asBoolean();
// Reset the button "pressed" state only if the menu is shown by this particular
// menu button (not any other control) and is not being closed by a click on the button.
if (!new_visibility && !is_closed_by_button_click && mIsMenuShown)
{
setForcePressedState(false);
mIsMenuShown = false;
}
}

View File

@ -29,7 +29,7 @@
#include "llbutton.h"
class LLToggleableMenu;
class LLMenuGL;
class LLMenuButton
: public LLButton
@ -42,41 +42,22 @@ public:
Optional<std::string> menu_filename;
Params();
};
typedef enum e_menu_position
{
MP_TOP_LEFT,
MP_BOTTOM_LEFT
} EMenuPosition;
};
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
void toggleMenu();
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
void hideMenu();
LLToggleableMenu* getMenu();
void setMenu(LLToggleableMenu* menu, EMenuPosition position = MP_TOP_LEFT);
void setMenuPosition(EMenuPosition position) { mMenuPosition = position; }
LLMenuGL* getMenu() { return mMenu; }
protected:
friend class LLUICtrlFactory;
LLMenuButton(const Params&);
void toggleMenu();
void updateMenuOrigin();
void onMenuVisibilityChange(const LLSD& param);
private:
LLHandle<LLView> mMenuHandle;
bool mIsMenuShown;
EMenuPosition mMenuPosition;
S32 mX;
S32 mY;
LLMenuGL* mMenu;
bool mMenuVisibleLastFrame;
};

View File

@ -1848,104 +1848,89 @@ BOOL LLMenuGL::isOpen()
}
}
bool LLMenuGL::scrollItems(EScrollingDirection direction)
void LLMenuGL::scrollItemsUp()
{
// Slowing down items scrolling when arrow button is held
// Slowing down the items scrolling when arrow button is held
if (mScrollItemsTimer.hasExpired() && NULL != mFirstVisibleItem)
{
mScrollItemsTimer.setTimerExpirySec(.033f);
}
else
{
return false;
return;
}
switch (direction)
item_list_t::iterator cur_item_iter;
item_list_t::iterator prev_item_iter;
for (cur_item_iter = mItems.begin(), prev_item_iter = mItems.begin(); cur_item_iter != mItems.end(); cur_item_iter++)
{
case SD_UP:
if( (*cur_item_iter) == mFirstVisibleItem)
{
break;
}
if ((*cur_item_iter)->getVisible())
{
prev_item_iter = cur_item_iter;
}
}
if ((*prev_item_iter)->getVisible())
{
item_list_t::iterator cur_item_iter;
item_list_t::iterator prev_item_iter;
for (cur_item_iter = mItems.begin(), prev_item_iter = mItems.begin(); cur_item_iter != mItems.end(); cur_item_iter++)
{
if( (*cur_item_iter) == mFirstVisibleItem)
{
break;
}
if ((*cur_item_iter)->getVisible())
{
prev_item_iter = cur_item_iter;
}
}
if ((*prev_item_iter)->getVisible())
{
mFirstVisibleItem = *prev_item_iter;
}
break;
mFirstVisibleItem = *prev_item_iter;
}
case SD_DOWN:
{
if (NULL == mFirstVisibleItem)
{
mFirstVisibleItem = *mItems.begin();
}
item_list_t::iterator cur_item_iter;
for (cur_item_iter = mItems.begin(); cur_item_iter != mItems.end(); cur_item_iter++)
{
if( (*cur_item_iter) == mFirstVisibleItem)
{
break;
}
}
item_list_t::iterator next_item_iter;
if (cur_item_iter != mItems.end())
{
for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++)
{
if( (*next_item_iter)->getVisible())
{
break;
}
}
if (next_item_iter != mItems.end() &&
(*next_item_iter)->getVisible())
{
mFirstVisibleItem = *next_item_iter;
}
}
break;
}
case SD_BEGIN:
{
mFirstVisibleItem = *mItems.begin();
break;
}
case SD_END:
{
item_list_t::reverse_iterator first_visible_item_iter = mItems.rend();
// Advance by mMaxScrollableItems back from the end of the list
// to make the last item visible.
std::advance(first_visible_item_iter, mMaxScrollableItems);
mFirstVisibleItem = *first_visible_item_iter;
break;
}
default:
llwarns << "Unknown scrolling direction: " << direction << llendl;
}
mNeedsArrange = TRUE;
arrangeAndClear();
}
return true;
void LLMenuGL::scrollItemsDown()
{
// Slowing down the items scrolling when arrow button is held
if (mScrollItemsTimer.hasExpired())
{
mScrollItemsTimer.setTimerExpirySec(.033f);
}
else
{
return;
}
if (NULL == mFirstVisibleItem)
{
mFirstVisibleItem = *mItems.begin();
}
item_list_t::iterator cur_item_iter;
for (cur_item_iter = mItems.begin(); cur_item_iter != mItems.end(); cur_item_iter++)
{
if( (*cur_item_iter) == mFirstVisibleItem)
{
break;
}
}
item_list_t::iterator next_item_iter;
if (cur_item_iter != mItems.end())
{
for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++)
{
if( (*next_item_iter)->getVisible())
{
break;
}
}
if (next_item_iter != mItems.end() &&
(*next_item_iter)->getVisible())
{
mFirstVisibleItem = *next_item_iter;
}
}
mNeedsArrange = TRUE;
arrangeAndClear();
}
// rearrange the child rects so they fit the shape of the menu.
@ -2177,7 +2162,7 @@ void LLMenuGL::arrange( void )
LLMenuScrollItem::Params item_params;
item_params.name(ARROW_UP);
item_params.arrow_type(LLMenuScrollItem::ARROW_UP);
item_params.scroll_callback.function(boost::bind(&LLMenuGL::scrollItems, this, SD_UP));
item_params.scroll_callback.function(boost::bind(&LLMenuGL::scrollItemsUp, this));
mArrowUpItem = LLUICtrlFactory::create<LLMenuScrollItem>(item_params);
LLUICtrl::addChild(mArrowUpItem);
@ -2188,7 +2173,7 @@ void LLMenuGL::arrange( void )
LLMenuScrollItem::Params item_params;
item_params.name(ARROW_DOWN);
item_params.arrow_type(LLMenuScrollItem::ARROW_DOWN);
item_params.scroll_callback.function(boost::bind(&LLMenuGL::scrollItems, this, SD_DOWN));
item_params.scroll_callback.function(boost::bind(&LLMenuGL::scrollItemsDown, this));
mArrowDownItem = LLUICtrlFactory::create<LLMenuScrollItem>(item_params);
LLUICtrl::addChild(mArrowDownItem);
@ -2618,8 +2603,14 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
((LLFloater*)getParent())->setFocus(TRUE);
}
// Current item position in the items list
item_list_t::iterator cur_item_iter = std::find(mItems.begin(), mItems.end(), cur_item);
item_list_t::iterator cur_item_iter;
for (cur_item_iter = mItems.begin(); cur_item_iter != mItems.end(); ++cur_item_iter)
{
if( (*cur_item_iter) == cur_item)
{
break;
}
}
item_list_t::iterator next_item_iter;
if (cur_item_iter == mItems.end())
@ -2630,37 +2621,9 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
{
next_item_iter = cur_item_iter;
next_item_iter++;
// First visible item position in the items list
item_list_t::iterator first_visible_item_iter = std::find(mItems.begin(), mItems.end(), mFirstVisibleItem);
if (next_item_iter == mItems.end())
{
next_item_iter = mItems.begin();
// If current item is the last in the list, the menu is scrolled to the beginning
// and the first item is highlighted.
if (mScrollable && !scrollItems(SD_BEGIN))
{
return NULL;
}
}
// If current item is the last visible, the menu is scrolled one item down
// and the next item is highlighted.
else if (mScrollable &&
(U32)std::abs(std::distance(first_visible_item_iter, next_item_iter)) >= mMaxScrollableItems)
{
// Call highlightNextItem() recursively only if the menu was successfully scrolled down.
// If scroll timer hasn't expired yet the menu won't be scrolled and calling
// highlightNextItem() will result in an endless recursion.
if (scrollItems(SD_DOWN))
{
return highlightNextItem(cur_item, skip_disabled);
}
else
{
return NULL;
}
}
}
@ -2718,8 +2681,14 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa
((LLFloater*)getParent())->setFocus(TRUE);
}
// Current item reverse position from the end of the list
item_list_t::reverse_iterator cur_item_iter = std::find(mItems.rbegin(), mItems.rend(), cur_item);
item_list_t::reverse_iterator cur_item_iter;
for (cur_item_iter = mItems.rbegin(); cur_item_iter != mItems.rend(); ++cur_item_iter)
{
if( (*cur_item_iter) == cur_item)
{
break;
}
}
item_list_t::reverse_iterator prev_item_iter;
if (cur_item_iter == mItems.rend())
@ -2730,37 +2699,9 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa
{
prev_item_iter = cur_item_iter;
prev_item_iter++;
// First visible item reverse position in the items list
item_list_t::reverse_iterator first_visible_item_iter = std::find(mItems.rbegin(), mItems.rend(), mFirstVisibleItem);
if (prev_item_iter == mItems.rend())
{
prev_item_iter = mItems.rbegin();
// If current item is the first in the list, the menu is scrolled to the end
// and the last item is highlighted.
if (mScrollable && !scrollItems(SD_END))
{
return NULL;
}
}
// If current item is the first visible, the menu is scrolled one item up
// and the previous item is highlighted.
else if (mScrollable &&
std::distance(first_visible_item_iter, cur_item_iter) <= 0)
{
// Call highlightNextItem() only if the menu was successfully scrolled up.
// If scroll timer hasn't expired yet the menu won't be scrolled and calling
// highlightNextItem() will result in an endless recursion.
if (scrollItems(SD_UP))
{
return highlightPrevItem(cur_item, skip_disabled);
}
else
{
return NULL;
}
}
}
@ -2931,12 +2872,12 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
if( clicks > 0 )
{
while( clicks-- )
scrollItems(SD_DOWN);
scrollItemsDown();
}
else
{
while( clicks++ )
scrollItems(SD_UP);
scrollItemsUp();
}
return TRUE;

View File

@ -397,15 +397,6 @@ public:
static const std::string ARROW_UP;
static const std::string ARROW_DOWN;
// for scrollable menus
typedef enum e_scrolling_direction
{
SD_UP = 0,
SD_DOWN = 1,
SD_BEGIN = 2,
SD_END = 3
} EScrollingDirection;
protected:
LLMenuGL(const LLMenuGL::Params& p);
friend class LLUICtrlFactory;
@ -512,7 +503,8 @@ public:
S32 getShortcutPad() { return mShortcutPad; }
bool scrollItems(EScrollingDirection direction);
void scrollItemsUp();
void scrollItemsDown();
BOOL isScrollable() const { return mScrollable; }
static class LLMenuHolderGL* sMenuContainer;

View File

@ -1622,7 +1622,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
style_params.fillFrom(getDefaultStyleParams());
S32 part = (S32)LLTextParser::WHOLE;
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
if(mParseHTML)
{
S32 start=0,end=0;
LLUrlMatch match;
@ -2214,39 +2214,19 @@ bool LLTextBase::scrolledToEnd()
return mScroller->isAtBottom();
}
bool LLTextBase::setCursor(S32 row, S32 column)
{
if (row < 0 || column < 0) return false;
S32 n_lines = mLineInfoList.size();
for (S32 line = row; line < n_lines; ++line)
if (0 <= row && row < (S32)mLineInfoList.size())
{
const line_info& li = mLineInfoList[line];
if (li.mLineNum < row)
{
continue;
}
else if (li.mLineNum > row)
{
break; // invalid column specified
}
// Found the given row.
S32 line_length = li.mDocIndexEnd - li.mDocIndexStart;;
if (column >= line_length)
{
column -= line_length;
continue;
}
// Found the given column.
S32 doc_pos = mLineInfoList[row].mDocIndexStart;
column = llclamp(column, 0, mLineInfoList[row].mDocIndexEnd - mLineInfoList[row].mDocIndexStart - 1);
doc_pos += column;
updateCursorXPos();
S32 doc_pos = li.mDocIndexStart + column;
return setCursorPos(doc_pos);
}
return false; // invalid row or column specified
return false;
}

View File

@ -35,22 +35,10 @@ static LLDefaultChildRegistry::Register<LLToggleableMenu> r("toggleable_menu");
LLToggleableMenu::LLToggleableMenu(const LLToggleableMenu::Params& p)
: LLMenuGL(p),
mButtonRect(),
mVisibilityChangeSignal(NULL),
mClosedByButtonClick(false)
{
}
LLToggleableMenu::~LLToggleableMenu()
{
delete mVisibilityChangeSignal;
}
boost::signals2::connection LLToggleableMenu::setVisibilityChangeCallback(const commit_signal_t::slot_type& cb)
{
if (!mVisibilityChangeSignal) mVisibilityChangeSignal = new commit_signal_t();
return mVisibilityChangeSignal->connect(cb);
}
// virtual
void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn)
{
@ -61,12 +49,6 @@ void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn)
{
mClosedByButtonClick = true;
}
if (mVisibilityChangeSignal)
{
(*mVisibilityChangeSignal)(this,
LLSD().with("visibility", curVisibilityIn).with("closed_by_button_click", mClosedByButtonClick));
}
}
void LLToggleableMenu::setButtonRect(const LLRect& rect, LLView* current_view)

View File

@ -41,10 +41,6 @@ protected:
LLToggleableMenu(const Params&);
friend class LLUICtrlFactory;
public:
~LLToggleableMenu();
boost::signals2::connection setVisibilityChangeCallback( const commit_signal_t::slot_type& cb );
virtual void handleVisibilityChange (BOOL curVisibilityIn);
const LLRect& getButtonRect() const { return mButtonRect; }
@ -61,7 +57,6 @@ public:
protected:
bool mClosedByButtonClick;
LLRect mButtonRect;
commit_signal_t* mVisibilityChangeSignal;
};
#endif // LL_LLTOGGLEABLEMENU_H

View File

@ -58,12 +58,10 @@ class LLUIString
public:
// These methods all perform appropriate argument substitution
// and modify mOrig where appropriate
LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {}
LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {}
LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args);
LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); }
~LLUIString() { delete mArgs; }
void assign(const std::string& instring);
LLUIString& operator=(const std::string& s) { assign(s); return *this; }
@ -83,14 +81,14 @@ public:
void clear();
void clearArgs() { if (mArgs) mArgs->clear(); }
// These utility functions are included for text editing.
// They do not affect mOrig and do not perform argument substitution
void truncate(S32 maxchars);
void erase(S32 charidx, S32 len);
void insert(S32 charidx, const LLWString& wchars);
void replace(S32 charidx, llwchar wc);
private:
// something changed, requiring reformatting of strings
void dirty();
@ -102,7 +100,7 @@ private:
void updateResult() const;
void updateWResult() const;
LLStringUtil::format_map_t& getArgs();
std::string mOrig;
mutable std::string mResult;
mutable LLWString mWResult; // for displaying

View File

@ -972,7 +972,7 @@ std::string LLUrlEntryWorldMap::getLocation(const std::string &url) const
//
LLUrlEntryNoLink::LLUrlEntryNoLink()
{
mPattern = boost::regex("<nolink>.*</nolink>",
mPattern = boost::regex("<nolink>[^<]*</nolink>",
boost::regex::perl|boost::regex::icase);
}
@ -989,8 +989,7 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC
LLStyle::Params LLUrlEntryNoLink::getStyle() const
{
// Don't render as URL (i.e. no context menu or hand cursor).
return LLStyle::Params().is_link(false);
return LLStyle::Params();
}

View File

@ -61,7 +61,6 @@ Boolean gCancelled = false;
const char *gUpdateURL;
const char *gProductName;
const char *gBundleID;
void *updatethreadproc(void*);
@ -330,10 +329,6 @@ int parse_args(int argc, char **argv)
{
gProductName = argv[j];
}
else if ((!strcmp(argv[j], "-bundleid")) && (++j < argc))
{
gBundleID = argv[j];
}
}
return 0;
@ -360,7 +355,6 @@ int main(int argc, char **argv)
//
gUpdateURL = NULL;
gProductName = NULL;
gBundleID = NULL;
parse_args(argc, argv);
if (!gUpdateURL)
{
@ -378,14 +372,6 @@ int main(int argc, char **argv)
{
gProductName = "Second Life";
}
if (gBundleID)
{
llinfos << "Bundle ID is: " << gBundleID << llendl;
}
else
{
gBundleID = "com.secondlife.indra.viewer";
}
}
llinfos << "Starting " << gProductName << " Updater" << llendl;
@ -606,8 +592,7 @@ static bool isFSRefViewerBundle(FSRef *targetRef)
CFURLRef targetURL = NULL;
CFBundleRef targetBundle = NULL;
CFStringRef targetBundleID = NULL;
CFStringRef sourceBundleID = NULL;
targetURL = CFURLCreateFromFSRef(NULL, targetRef);
if(targetURL == NULL)
@ -634,8 +619,7 @@ static bool isFSRefViewerBundle(FSRef *targetRef)
}
else
{
sourceBundleID = CFStringCreateWithCString(NULL, gBundleID, kCFStringEncodingUTF8);
if(CFStringCompare(sourceBundleID, targetBundleID, 0) == kCFCompareEqualTo)
if(CFStringCompare(targetBundleID, CFSTR("com.secondlife.indra.viewer"), 0) == kCFCompareEqualTo)
{
// This is the bundle we're looking for.
result = true;

View File

@ -575,14 +575,6 @@ 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 "firestorm-bin" CACHE STRING
@ -1112,15 +1104,6 @@ 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
)
@ -1937,11 +1920,11 @@ if (LL_TESTS)
llviewernetwork.cpp
)
# RLVa - incompatible
# LL_ADD_INTEGRATION_TEST(llslurl
# "${llslurl_test_sources}"
# "${test_libs}"
# )
LL_ADD_INTEGRATION_TEST(llslurl
"${llslurl_test_sources}"
"${test_libs}"
)
LL_ADD_INTEGRATION_TEST(llviewernetwork
llviewernetwork.cpp

View File

@ -1,171 +1,6 @@
<?xml version="1.0" ?>
<llsd>
<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>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>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>1</integer>
</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>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>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>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>
@ -2732,28 +2567,6 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableGroupChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming Group Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableIMChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming IM Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>DisplayAvatarAgentTarget</key>
<map>
<key>Comment</key>
@ -4050,7 +3863,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
<string>http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
<key>HighResSnapshot</key>
<map>
@ -4636,17 +4449,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LegacyMultiAttachmentSupport</key>
<map>
<key>Comment</key>
<string>Converts legacy "secondary attachment points" to multi-attachments for other avatars</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LimitDragDistance</key>
<map>
<key>Comment</key>
@ -12343,16 +12145,5 @@
<key>Value</key>
<real>300.0</real>
</map>
<key>GroupMembersSortOrder</key>
<map>
<key>Comment</key>
<string>The order by which group members will be sorted (name|donated|online)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>name</string>
</map>
</map>
</llsd>

View File

@ -1,17 +1,6 @@
<llsd>
<map>
<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>
<key>BusyResponseChanged</key>
<map>
<key>Comment</key>
<string>Does user's busy mode message differ from default?</string>

View File

@ -1,4 +1,4 @@
version 25
version 23
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@ -144,7 +144,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderUseFBO 1 0
RenderUseFBO 1 1
//
// Ultra graphics (REALLY PURTY!)
@ -171,7 +171,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderUseFBO 1 0
RenderUseFBO 1 1
//
// Class Unknown Hardware (unknown)

View File

@ -1,4 +1,4 @@
version 25
version 23
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@ -144,7 +144,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderUseFBO 1 0
RenderUseFBO 1 1
//
// Ultra graphics (REALLY PURTY!)
@ -171,7 +171,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderUseFBO 1 0
RenderUseFBO 1 1
//
// Class Unknown Hardware (unknown)

View File

@ -52,7 +52,7 @@ LangString LanguageCode ${LANG_JAPANESE} "ja"
LangString LanguageCode ${LANG_ITALIAN} "it"
LangString LanguageCode ${LANG_KOREAN} "ko"
LangString LanguageCode ${LANG_DUTCH} "nl"
LangString LanguageCode ${LANG_POLISH} "pl"
LangString LanguageCode ${LANG_POLISH} "da"
LangString LanguageCode ${LANG_PORTUGUESEBR} "pt"
LangString LanguageCode ${LANG_SIMPCHINESE} "zh"

View File

@ -76,10 +76,6 @@
#include "llwindow.h"
#include "llworld.h"
#include "llworldmap.h"
// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
using namespace LLVOAvatarDefines;
@ -473,9 +469,6 @@ 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();
@ -524,13 +517,6 @@ 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)
{
@ -588,14 +574,7 @@ bool LLAgent::enableFlying()
void LLAgent::standUp()
{
// 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]
setControlFlags(AGENT_CONTROL_STAND_UP);
}
@ -871,14 +850,7 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
void LLAgent::sitDown()
{
// 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]
setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
@ -2130,15 +2102,7 @@ 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)
{
@ -3358,18 +3322,6 @@ 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())) ))
{
RlvUIEnabler::notifyBlockedTeleport();
return;
}
// [/RLVa:KB]
LLViewerRegion *regionp = getRegion();
if(regionp && teleportCore())
{
@ -3434,25 +3386,6 @@ 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()))) )
{
RlvUIEnabler::notifyBlockedTeleport();
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);
@ -3495,16 +3428,6 @@ 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())) )
{
RlvUIEnabler::notifyBlockedTeleport();
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);

View File

@ -48,9 +48,6 @@
#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;
@ -299,11 +296,8 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
LLSelectMgr::getInstance()->deselectAll();
}
if (gMenuHolder != NULL)
{
// Hide all popup menus
gMenuHolder->hideMenus();
}
// Hide all popup menus
gMenuHolder->hideMenus();
}
if (change_camera && !gSavedSettings.getBOOL("FreezeTime"))
@ -2259,13 +2253,6 @@ 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

@ -37,9 +37,6 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
#include "rlvhandler.h"
// [/RLVa:KB]
LLAgentListener::LLAgentListener(LLAgent &agent)
: LLEventAPI("LLAgent",
@ -88,28 +85,8 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
// *TODO - find a permanent place to share this code properly.
LLViewerObject *object = gObjectList.findObject(event_data["obj_uuid"]);
// [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());
@ -124,14 +101,6 @@ 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,9 +38,6 @@
#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)
@ -102,18 +99,6 @@ 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,18 +49,12 @@
#include "llvoavatarself.h"
#include "llwearable.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: RLVa-1.2.0a (2010-03-04)
#include "rlvhandler.h"
// [/RLVa:KB]
#include <boost/scoped_ptr.hpp>
LLAgentWearables gAgentWearables;
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
bool LLAgentWearables::mInitialWearablesLoaded = false;
// [/SL:KB]
using namespace LLVOAvatarDefines;
@ -766,28 +760,12 @@ 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)
// {
// 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) )
if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
{
// 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;
}
mWearableDatas[type].push_back(wearable);
wearableUpdated(wearable);
checkWearableAgainstInventory(wearable);
return idxWearable;
// [/RLVa:KB]
return mWearableDatas[type].size()-1;
}
return MAX_CLOTHING_PER_TYPE;
}
@ -1321,11 +1299,7 @@ void LLAgentWearables::removeWearable(const LLWearableType::EType type, bool do_
{
LLWearable* old_wearable = getWearable(type,index);
// 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)
{
if (old_wearable->isDirty())
{
@ -1383,30 +1357,20 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo
{
LLWearable* old_wearable = getWearable(type,i);
//queryWearableCache(); // moved below
// 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]
if (old_wearable)
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
}
}
// 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]
mWearableDatas[type].clear();
}
else
{
LLWearable* old_wearable = getWearable(type, index);
//queryWearableCache(); // moved below
// 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]
if (old_wearable)
{
popWearable(old_wearable);
old_wearable->removeFromAvatar(TRUE);
@ -1444,12 +1408,6 @@ 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++)
{
@ -1469,51 +1427,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// exactly one wearable per body part
setWearable(type,0,new_wearable);
}
// 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);
}
pushWearable(type,new_wearable);
}
idxCurPerType[type]++;
// [/RLVa:KB]
wearableUpdated(new_wearable);
checkWearableAgainstInventory(new_wearable);
}
@ -1531,13 +1448,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
checkWearablesLoaded();
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a
if (!mInitialWearablesLoaded)
{
mInitialWearablesLoaded = true;
mInitialWearablesLoadedSignal();
}
// [/SL:KB]
notifyLoadingFinished();
queryWearableCache();
updateServer();
@ -1560,16 +1470,6 @@ 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
@ -1825,10 +1725,7 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed)
// Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to
// get attachments into desired state with minimal number of adds/removes.
//void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly)
// [/SL:KB]
void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// Possible cases:
// already wearing but not in request set -> take off.
@ -1893,13 +1790,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
// llinfos << "remove " << remove_count << " add " << add_count << llendl;
// Remove everything in objects_to_remove
// userRemoveMultipleAttachments(objects_to_remove);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
if (!fAttachOnly)
{
userRemoveMultipleAttachments(objects_to_remove);
}
// [/SL:KB]
userRemoveMultipleAttachments(objects_to_remove);
// Add everything in items_to_add
userAttachMultipleAttachments(items_to_add);
@ -1909,34 +1800,6 @@ 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;
@ -1983,23 +1846,6 @@ void LLAgentWearables::userRemoveAllAttachments()
void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array)
{
// [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_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();
@ -2037,12 +1883,6 @@ 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: 2010-07-28 (RLVa-1.2.0i) | Added: RLVa-1.2.0i
if ( (rlv_handler_t::isEnabled()) && (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());
@ -2260,13 +2100,6 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_
return mLoadedSignal.connect(cb);
}
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb)
{
return mInitialWearablesLoadedSignal.connect(cb);
}
// [/SL:KB]
void LLAgentWearables::notifyLoadingStarted()
{
mCOFChangeInProgress = true;

View File

@ -76,9 +76,6 @@ public:
BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
BOOL areWearablesLoaded() const;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
// [/SL:KB]
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
void updateWearablesLoaded();
void checkWearablesLoaded() const;
@ -218,11 +215,7 @@ public:
typedef std::vector<LLViewerObject*> llvo_vec_t;
// static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
// Not the best way to go about this but other attempts changed far too much LL code to be a viable solution
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false);
// [/SL:KB]
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
static void userRemoveMultipleAttachments(llvo_vec_t& llvo_array);
static void userRemoveAllAttachments();
static void userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array);
@ -241,9 +234,6 @@ public:
typedef boost::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb);
// [/SL:KB]
void notifyLoadingStarted();
void notifyLoadingFinished();
@ -251,9 +241,6 @@ public:
private:
loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed
loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded
// [/SL:KB]
//--------------------------------------------------------------------
// Member variables
@ -264,9 +251,6 @@ private:
wearableentry_map_t mWearableDatas;
static BOOL mInitialWearablesUpdateReceived;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
static bool mInitialWearablesLoaded;
// [/SL:KB]
BOOL mWearablesLoaded;
std::set<LLUUID> mItemsAwaitingWearableUpdate;

View File

@ -119,42 +119,8 @@ void LLInitialWearablesFetch::processContents()
gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array,
LLInventoryModel::EXCLUDE_TRASH, is_wearable);
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-18 (Catznip-2.2.0a) | Modified: Catznip-2.0.0h
// NOTE: don't use the current COF contents if 'wearable_array' is empty (ie first logon with 2.0 or some other problem)
bool fUpdateFromCOF = !wearable_array.empty();
if (fUpdateFromCOF)
{
LLAppearanceMgr::wearables_by_type_t items_by_type(LLWearableType::WT_COUNT);
LLAppearanceMgr::sortItemsByActualDescription(wearable_array);
LLAppearanceMgr::divvyWearablesByType(wearable_array, items_by_type);
// Compare the COF wearables against the initial wearables
for (initial_wearable_data_vec_t::const_iterator itWearableData = mAgentInitialWearables.begin();
(itWearableData != mAgentInitialWearables.end()) && (fUpdateFromCOF); ++itWearableData)
{
const LLUUID& idItem = itWearableData->mItemID; bool fFound = false;
// TODO-Catznip: [SL-2.2.0] Bit of a hack until LL supports changing the descriptions of links
for (S32 idxItem = 0, cntItem = items_by_type[itWearableData->mType].size(); idxItem < cntItem; idxItem++)
{
const LLViewerInventoryItem* pCOFItem = items_by_type[itWearableData->mType].get(idxItem);
if (idItem == pCOFItem->getLinkedUUID())
{
fFound = true;
break;
}
}
if (!fFound)
fUpdateFromCOF = false;
}
}
// [/SL:KB]
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
// if (wearable_array.count() > 0)
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-28 (Catznip-2.2.0a) | Modified: Catznip-2.0.0e
if (fUpdateFromCOF)
// [/SL:KB]
if (wearable_array.count() > 0)
{
gAgentWearables.notifyLoadingStarted();
LLAppearanceMgr::instance().updateAppearanceFromCOF();
@ -181,7 +147,7 @@ public:
virtual void done()
{
gInventory.removeObserver(this);
/*
// Link to all fetched items in COF.
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
for (uuid_vec_t::iterator it = mIDs.begin();
@ -204,33 +170,7 @@ public:
LLAssetType::AT_LINK,
link_waiter);
}
*/
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
doOnIdleOneTime(boost::bind(&LLFetchAndLinkObserver::doneIdle, this));
// [/SL:KB]
}
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
void doneIdle()
{
// NOTE: the code above makes the assumption that COF is empty which won't be the case the way it's used now
LLInventoryModel::item_array_t initial_items;
for (uuid_vec_t::iterator itItem = mIDs.begin(); itItem != mIDs.end(); ++itItem)
{
LLViewerInventoryItem* pItem = gInventory.getItem(*itItem);
if (!pItem)
{
llwarns << "fetch failed!" << llendl;
continue;
}
initial_items.push_back(pItem);
}
LLAppearanceMgr::instance().updateAppearanceFromInitialWearables(initial_items);
delete this;
}
// [/SL:KB]
};
void LLInitialWearablesFetch::processWearablesMessage()
@ -242,11 +182,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
for (U8 i = 0; i < mAgentInitialWearables.size(); ++i)
{
// Populate the current outfit folder with links to the wearables passed in the message
// InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback.
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-02 (Catznip-2.2.0a) | Added: Catznip-2.0.0f
// Fixes minor leak: since COF is used onInitialWearableAssetArrived() will never get called and "wearable_data" leaks
InitialWearableData* wearable_data = &mAgentInitialWearables[i];
// [/SL:KB]
InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback.
if (wearable_data->mAssetID.notNull())
{
@ -256,7 +192,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
{
llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID "
<< wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl;
// delete wearable_data;
delete wearable_data;
}
}

View File

@ -49,9 +49,6 @@
#include "llvoavatarself.h"
#include "llviewerregion.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0b)
#include "rlvhandler.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:
@ -283,15 +280,11 @@ public:
void onWearableAssetFetch(LLWearable *wearable);
void onAllComplete();
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
bool pollStopped();
// [/SL:KB]
typedef std::list<LLFoundData> found_list_t;
found_list_t& getFoundList();
void eraseTypeToLink(LLWearableType::EType type);
void eraseTypeToRecover(LLWearableType::EType type);
// void setObjItems(const LLInventoryModel::item_array_t& items);
void setObjItems(const LLInventoryModel::item_array_t& items);
void setGestItems(const LLInventoryModel::item_array_t& items);
bool isMostRecent();
void handleLateArrivals();
@ -299,7 +292,7 @@ public:
private:
found_list_t mFoundList;
// LLInventoryModel::item_array_t mObjItems;
LLInventoryModel::item_array_t mObjItems;
LLInventoryModel::item_array_t mGestItems;
typedef std::set<S32> type_set_t;
type_set_t mTypesToRecover;
@ -365,15 +358,10 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type)
mTypesToRecover.erase(type);
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
// Fix for http://jira.secondlife.com/browse/VWR-18512
/*
void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
{
mObjItems = items;
}
*/
// [/SL:KB]
void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items)
{
@ -470,17 +458,12 @@ void LLWearableHoldingPattern::onAllComplete()
llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
LLAppearanceMgr::instance().updateAgentWearables(this, false);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
// Fix for http://jira.secondlife.com/browse/VWR-18512
/*
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
LLAgentWearables::userUpdateAttachments(mObjItems);
}
*/
// [/SL:KB]
if (isFetchCompleted() && isMissingCompleted())
{
@ -510,12 +493,6 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
if (!isMostRecent())
{
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
return true;
// [/SL:KB]
}
bool completed = isFetchCompleted();
@ -607,11 +584,6 @@ public:
if (!mHolder->isMostRecent())
{
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
return;
// [/SL:KB]
}
llinfos << "Recovered item for type " << mType << llendl;
@ -686,30 +658,11 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
}
}
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
bool LLWearableHoldingPattern::pollStopped()
{
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
if ( (isFetchCompleted()) && (isMissingCompleted()) )
{
delete this;
return true;
}
return false;
}
// [/SL:KB]
bool LLWearableHoldingPattern::pollMissingWearables()
{
if (!isMostRecent())
{
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
return true;
// [/SL:KB]
}
bool timed_out = isTimedOut();
@ -1030,33 +983,6 @@ 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:
@ -1369,10 +1295,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
}
// Check whether it's the base outfit.
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.2.0a) | Added: Catznip-2.1.2d
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
// [/SL:KB]
if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
{
return false;
}
@ -1421,45 +1344,6 @@ 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(
@ -1476,11 +1360,7 @@ void LLAppearanceMgr::filterWearableItems(
S32 size = items_by_type[i].size();
if (size <= 0)
continue;
// S32 start_index = llmax(0,size-max_per_type);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.2.0a) | Added: Catznip-2.0.0h
S32 start_index =
llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type));
// [/SL:KB[
S32 start_index = llmax(0,size-max_per_type);
for (S32 j = start_index; j<size; j++)
{
items.push_back(items_by_type[i][j]);
@ -1512,31 +1392,10 @@ 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)
{
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]
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
const LLUUID cof = getCOF();
@ -1557,143 +1416,75 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
// 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);
// [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(), rlvPredIsNotWearableItem), 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());
getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
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);
// [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(), rlvPredIsRemovableItem), 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(), rlvPredIsNotWearableItem), wear_items_new.end());
wear_items.insert(wear_items.end(), wear_items_new.begin(), wear_items_new.end());
// [/RLVa:KB]
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
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);
// [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(), rlvPredIsRemovableItem), 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(), rlvPredIsNotWearableItem), obj_items_new.end());
obj_items.insert(obj_items.end(), obj_items_new.begin(), obj_items_new.end());
// [/RLVa:KB]
getDescendentsOfAssetType(category, obj_items, LLAssetType::AT_OBJECT, false);
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);
// [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]
getDescendentsOfAssetType(category, gest_items, LLAssetType::AT_GESTURE, false);
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);
// [SL:KB] - Checked: 2010-04-24 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (!append)
{
// [/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 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 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 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]
#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.
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Added: RLVa-1.2.0b
if ( (!append) && (idOutfit.notNull()) )
if (!append)
{
createBaseOutfitLink(idOutfit, link_waiter);
createBaseOutfitLink(category, link_waiter);
}
// [/RLVa:KB]
// if (!append)
// {
// createBaseOutfitLink(category, link_waiter);
// }
llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
}
@ -1744,25 +1535,6 @@ 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);
}
@ -1920,34 +1692,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
// Include attachments which should be in COF but don't have their link created yet
uuid_vec_t::iterator itPendingAttachLink = mPendingAttachLinks.begin();
while (itPendingAttachLink != mPendingAttachLinks.end())
{
const LLUUID& idItem = *itPendingAttachLink;
if ( (!gAgentAvatarp->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) )
{
itPendingAttachLink = mPendingAttachLinks.erase(itPendingAttachLink);
continue;
}
LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
if (pItem)
obj_items.push_back(pItem);
++itPendingAttachLink;
}
// Don't remove attachments until avatar is fully loaded (should reduce random attaching/detaching/reattaching at log-on)
llinfos << "Updating " << obj_items.count() << " attachments" << llendl;
LLAgentWearables::userUpdateAttachments(obj_items, !gAgentAvatarp->isFullyLoaded());
}
// [/SL:KB]
if(!wear_items.count())
{
LLNotificationsUtil::add("CouldNotPutOnOutfit");
@ -1960,7 +1704,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
LLWearableHoldingPattern* holder = new LLWearableHoldingPattern;
// holder->setObjItems(obj_items);
holder->setObjItems(obj_items);
holder->setGestItems(gest_items);
// Note: can't do normal iteration, because if all the
@ -2030,21 +1774,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
}
}
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
void LLAppearanceMgr::updateAppearanceFromInitialWearables(LLInventoryModel::item_array_t& initial_items)
{
const LLUUID& idCOF = getCOF();
// Remove current COF contents
purgeCategory(idCOF, false);
gInventory.notifyObservers();
// Create links to new COF contents
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy();
linkAll(idCOF, initial_items, link_waiter);
}
// [/SL:KB]
void LLAppearanceMgr::getDescendentsOfAssetType(const LLUUID& category,
LLInventoryModel::item_array_t& items,
LLAssetType::EType type,
@ -2475,11 +2204,12 @@ void LLAppearanceMgr::updateIsDirty()
base_outfit = catp->getUUID();
}
// Set dirty to "false" if no base outfit found to disable "Save"
// and leave only "Save As" enabled in My Outfits.
mOutfitIsDirty = false;
if (base_outfit.notNull())
if(base_outfit.isNull())
{
// no outfit link found, display "unsaved outfit"
mOutfitIsDirty = true;
}
else
{
LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK);
@ -2518,6 +2248,8 @@ void LLAppearanceMgr::updateIsDirty()
return;
}
}
mOutfitIsDirty = false;
}
}
@ -2776,30 +2508,11 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
switch (item_to_remove->getType())
{
case LLAssetType::AT_CLOTHING:
// if (get_is_item_worn(id_to_remove))
// {
// //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
// LLWearableBridge::removeItemFromAvatar(item_to_remove);
// }
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.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]
if (get_is_item_worn(id_to_remove))
{
/*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) )
{
U32 idxWearable = gAgentWearables.getWearableIndex(pWearable);
if (idxWearable < LLAgentWearables::MAX_CLOTHING_PER_TYPE)
{
gAgentWearables.removeWearable(pWearable->getType(), false, idxWearable);
LLAppearanceMgr::instance().removeCOFItemLinks(item_to_remove->getLinkedUUID(), false);
gInventory.notifyObservers();
}
}
//*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
LLWearableBridge::removeItemFromAvatar(item_to_remove);
}
// [/SL:KB]
break;
case LLAssetType::AT_OBJECT:
LLVOAvatarSelf::detachAttachmentIntoInventory(item_to_remove->getLinkedUUID());
@ -2922,7 +2635,6 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
LLAppearanceMgr::LLAppearanceMgr():
mAttachmentInvLinkEnabled(false),
mOutfitIsDirty(false),
mOutfitLocked(false),
mIsInUpdateAppearanceFromCOF(false)
{
LLOutfitObserver& outfit_observer = LLOutfitObserver::instance();
@ -2945,12 +2657,6 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val)
{
llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl;
mAttachmentInvLinkEnabled = val;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
if (mAttachmentInvLinkEnabled)
{
linkPendingAttachments();
}
// [/SL:KB]
}
void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
@ -2973,24 +2679,13 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
if (isLinkInCOF(item_id))
{
return;
}
mPendingAttachLinks.push_back(item_id);
// [/SL:KB]
if (mAttachmentInvLinkEnabled)
{
// we have to pass do_update = true to call LLAppearanceMgr::updateAppearanceFromCOF.
// it will trigger gAgentWariables.notifyLoadingFinished()
// But it is not acceptable solution. See EXT-7777
// LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item.
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a
LLPointer<LLInventoryCallback> cb = new LLRegisterAttachmentCallback();
LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item.
// [/SL:KB]
LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item.
}
else
{
@ -3001,13 +2696,6 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a
uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id);
if (itPendingAttachLink != mPendingAttachLinks.end())
{
mPendingAttachLinks.erase(itPendingAttachLink);
}
// [/SL:KB]
if (mAttachmentInvLinkEnabled)
{
@ -3019,38 +2707,6 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
}
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a
void LLAppearanceMgr::linkPendingAttachments()
{
LLPointer<LLInventoryCallback> cb = NULL;
for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin();
itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink)
{
const LLUUID& idAttachItem = *itPendingAttachLink;
if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) )
{
if (!cb)
cb = new LLRegisterAttachmentCallback();
LLAppearanceMgr::addCOFItemLink(idAttachItem, false, cb);
}
}
}
void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem)
{
const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem);
// Remove the attachment from the pending list
uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItemBase);
if (itPendingAttachLink != mPendingAttachLinks.end())
mPendingAttachLinks.erase(itPendingAttachLink);
// It may have been detached already in which case we should remove the COF link
if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) )
removeCOFItemLinks(idItemBase, false);
}
// [/SL:KB]
BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
{
return gInventory.isObjectDescendentOf(obj_id, getCOF());

View File

@ -51,16 +51,8 @@ public:
typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t;
void updateAppearanceFromCOF(bool update_base_outfit_ordering = false);
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.2.0a) | Added: Catznip-2.0.0a
void updateAppearanceFromInitialWearables(LLInventoryModel::item_array_t& initial_items);
// [/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);
@ -213,10 +205,6 @@ 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.
@ -229,14 +217,6 @@ private:
std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.1.2e
public:
void linkPendingAttachments();
void onRegisterAttachmentComplete(const LLUUID& idItem);
private:
uuid_vec_t mPendingAttachLinks;
// [/SL:KB]
//////////////////////////////////////////////////////////////////////////////////
// Item-specific convenience functions
public:
@ -263,19 +243,6 @@ private:
bool mUpdateBaseOrder;
};
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
class LLRegisterAttachmentCallback : public LLInventoryCallback
{
public:
LLRegisterAttachmentCallback() {}
/*virtual*/ ~LLRegisterAttachmentCallback() {}
/*virtual*/ void fire(const LLUUID& idItem)
{
LLAppearanceMgr::instance().onRegisterAttachmentComplete(idItem);
}
};
// [/SL:KB]
#define SUPPORT_ENSEMBLES 0

View File

@ -30,7 +30,6 @@
// Viewer includes
#include "llversioninfo.h"
#include "llversionviewer.h"
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
@ -81,10 +80,6 @@
#include "llurlmatch.h"
#include "lltextutil.h"
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g)
#include "rlvhandler.h"
// [/RLVa:KB]
#include "llweb.h"
#include "llsecondlifeurls.h"
@ -340,16 +335,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()
{
// check idle timers
// if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > 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
S32 nAFKTimeout = (gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? gSavedSettings.getS32("AFKTimeout") : 60 * 30;
if ( (nAFKTimeout) && (gAwayTriggerTimer.getElapsedTimeF32() > nAFKTimeout) )
#else
if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout")))
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
{
gAgent.setAFK();
}
@ -4527,8 +4513,6 @@ void LLAppViewer::launchUpdater()
LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString();
LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \"";
LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle();
LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -bundleid \"";
LLAppViewer::sUpdaterInfo->mUpdateExePath += LL_VERSION_BUNDLE_ID;
LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &";
LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL;

View File

@ -33,9 +33,7 @@
#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "message.h"
// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c)
#include "rlvhandler.h"
// [/RLVa:KB]
LLAttachmentsMgr::LLAttachmentsMgr()
{
@ -47,35 +45,12 @@ LLAttachmentsMgr::~LLAttachmentsMgr()
void LLAttachmentsMgr::addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
// 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]
const BOOL add)
{
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,10 +54,7 @@ public:
void addAttachment(const LLUUID& item_id,
const U8 attachment_pt,
// 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]
const BOOL add);
static void onIdle(void *);
protected:
void onIdle();

View File

@ -46,9 +46,6 @@
#include "lluuid.h"
#include "llvoiceclient.h"
#include "llviewercontrol.h" // for gSavedSettings
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
@ -142,9 +139,6 @@ 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.0d) | Added: RLVa-1.2.0d
, mRlvCheckShowNames(false)
// [/RLVa:KB]
{
setCommitOnSelectionChange(true);
@ -426,9 +420,6 @@ 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.0d) | 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);
@ -449,10 +440,7 @@ 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 )
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if ( (mContextMenu) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) )
// [/RLVa:KB]
if ( mContextMenu )
{
uuid_vec_t selected_uuids;
getSelectedUUIDs(selected_uuids);
@ -508,32 +496,9 @@ void LLAvatarList::updateLastInteractionTimes()
void LLAvatarList::onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
// mItemDoubleClickSignal(ctrl, x, y, mask);
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
if ( (!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
mItemDoubleClickSignal(ctrl, x, y, mask);
// [/RLVa:KB]
mItemDoubleClickSignal(ctrl, x, y, mask);
}
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void LLAvatarList::refreshNames()
{
std::vector<LLPanel*> items;
getItems(items);
std::string strFullName;
for (std::vector<LLPanel*>::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem)
{
LLAvatarListItem* pItem = static_cast<LLAvatarListItem*>(*itItem);
if (gCacheName->getFullName(pItem->getAvatarId(), strFullName))
pItem->setName(strFullName);
}
if (&NAME_COMPARATOR == mItemComparator)
sort();
}
// [/RLVa:KB]
bool LLAvatarItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
{
const LLAvatarListItem* avatar_item1 = dynamic_cast<const LLAvatarListItem*>(item1);

View File

@ -88,11 +88,6 @@ public:
// Return true if filter has at least one match.
bool filterHasMatches();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
void refreshNames();
// [/RLVa:KB]
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb);
@ -126,9 +121,6 @@ private:
bool mShowProfileBtn;
bool mShowSpeakingIndicator;
bool mShowPermissions;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
LLTimer* mLITUpdateTimer; // last interaction time update timer
std::string mIconParamName;

View File

@ -38,13 +38,10 @@
#include "llavatarnamecache.h"
#include "llavatariconctrl.h"
#include "lloutputmonitorctrl.h"
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
bool LLAvatarListItem::sStaticInitialized = false;
S32 LLAvatarListItem::sLeftPadding = 0;
S32 LLAvatarListItem::sNameRightPadding = 0;
S32 LLAvatarListItem::sRightNamePadding = 0;
S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT];
static LLWidgetNameRegistry::StaticRegistrar sRegisterAvatarListItemParams(&typeid(LLAvatarListItem::Params), "avatar_list_item");
@ -55,8 +52,7 @@ LLAvatarListItem::Params::Params()
voice_call_joined_style("voice_call_joined_style"),
voice_call_left_style("voice_call_left_style"),
online_style("online_style"),
offline_style("offline_style"),
name_right_pad("name_right_pad", 0)
offline_style("offline_style")
{};
@ -75,11 +71,8 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
mOnlineStatus(E_UNKNOWN),
mShowInfoBtn(true),
mShowProfileBtn(true),
mHovered(false),
// mShowPermissions(false)
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
mRlvCheckShowNames(false)
// [/RLVa:KB]
mShowPermissions(false),
mHovered(false)
{
if (not_from_ui_factory)
{
@ -126,9 +119,6 @@ BOOL LLAvatarListItem::postBuild()
// so that we can hide and show them again later.
initChildrenWidths(this);
// Right padding between avatar name text box and nearest visible child.
sNameRightPadding = LLUICtrlFactory::getDefaultParams<LLAvatarListItem>().name_right_pad;
sStaticInitialized = true;
}
@ -148,12 +138,8 @@ 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);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | 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]
mInfoBtn->setVisible(mShowInfoBtn);
mProfileBtn->setVisible(mShowProfileBtn);
mHovered = true;
LLPanel::onMouseEnter(x, y, mask);
@ -203,11 +189,7 @@ void LLAvatarListItem::setOnline(bool online)
void LLAvatarListItem::setAvatarName(const std::string& name)
{
// setNameInternal(name, mHighlihtSubstring);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
setNameInternal( (!fRlvFilter) ? name : RlvStrings::getAnonym(name), mHighlihtSubstring);
// [/RLVa:KB]
setNameInternal(name, mHighlihtSubstring);
}
void LLAvatarListItem::setAvatarToolTip(const std::string& tooltip)
@ -504,6 +486,7 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item)
S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft;
sLeftPadding = avatar_item->mAvatarIcon->getRect().mLeft;
sRightNamePadding = avatar_item->mLastInteractionTime->getRect().mLeft - avatar_item->mAvatarName->getRect().mRight;
S32 index = ALIC_COUNT;
sChildrenWidths[--index] = icon_width;
@ -582,7 +565,7 @@ void LLAvatarListItem::updateChildren()
// apply paddings
name_new_width -= sLeftPadding;
name_new_width -= sNameRightPadding;
name_new_width -= sRightNamePadding;
name_view_rect.setLeftTopAndSize(
name_new_left,

View File

@ -51,8 +51,6 @@ public:
online_style,
offline_style;
Optional<S32> name_right_pad;
Params();
};
@ -103,9 +101,6 @@ public:
void setShowPermissions(bool show) { mShowPermissions = show; };
void showLastInteractionTime(bool show);
void setAvatarIconVisible(bool visible);
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
// [/RLVa:KB]
const LLUUID& getAvatarId() const;
std::string getAvatarName() const;
@ -211,9 +206,6 @@ private:
//Speaker indicator and avatar name coords are translated accordingly
bool mShowInfoBtn;
bool mShowProfileBtn;
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
bool mRlvCheckShowNames;
// [/RLVa:KB]
/// indicates whether to show icons representing permissions granted
bool mShowPermissions;
@ -223,7 +215,7 @@ private:
static bool sStaticInitialized; // this variable is introduced to improve code readability
static S32 sLeftPadding; // padding to first left visible child (icon or name)
static S32 sNameRightPadding; // right padding from name to next visible child
static S32 sRightNamePadding; // right padding from name to next visible child
/**
* Contains widths of each child specified by EAvatarListItemChildIndex

View File

@ -53,11 +53,6 @@
#include "llviewerwindow.h"
#include "llsdserialize.h"
// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d)
#include "rlvhandler.h"
#include "rlvui.h"
// [/RLVa:KB]
// Distance from mouse down on which drag'n'drop should be started.
#define DRAG_START_DISTANCE 3
@ -99,10 +94,7 @@ BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask)
static void update_build_button_enable_state()
{
// bool can_edit = LLToolMgr::getInstance()->canEdit();
// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
bool can_edit = RlvUIEnabler::isBuildEnabled();
// [/RLVa:KB]
bool can_edit = LLToolMgr::getInstance()->canEdit();
LLBottomTray::getInstance()->getChildView("build_btn")->setEnabled(can_edit);
}

View File

@ -315,10 +315,6 @@ 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

@ -74,10 +74,6 @@ 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

@ -61,9 +61,6 @@
#include "llviewermenu.h"
#include "lluictrlfactory.h"
#include "llbottomtray.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Globals
@ -83,10 +80,7 @@ private:
};
//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]
extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
//
// Functions
@ -479,11 +473,7 @@ 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
// [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]
if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
{
gAgent.startTyping();
}
@ -595,22 +585,6 @@ 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

@ -54,17 +54,15 @@
#include "llviewertexteditor.h"
#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]
#include "llsidetray.h"//for blocked objects panel
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
const static std::string NEW_LINE(rawstr_to_utf8("\n"));
const static std::string SLURL_APP_AGENT = "secondlife:///app/agent/";
const static std::string SLURL_ABOUT = "/about";
@ -91,10 +89,6 @@ public:
LLSD payload;
payload["object_id"] = object_id;
payload["owner_id"] = query_map["owner"];
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if (query_map.has("owner_name"))
payload["owner_name"] = query_map["owner_name"];
// [/RLVa:KB]
payload["name"] = query_map["name"];
payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
payload["group_owned"] = query_map["groupowned"];
@ -106,11 +100,6 @@ LLObjectIMHandler gObjectIMHandler;
class LLChatHistoryHeader: public LLPanel
{
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
// FIXME - AO
// LLChatHistoryHeader() : mShowContextMenu(true), mShowInfoCtrl(true) {}
// [/RLVa:KB]
public:
LLChatHistoryHeader()
: LLPanel(),
@ -235,11 +224,7 @@ public:
void showInspector()
{
// if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | 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 (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return;
if (mSourceType == CHAT_SOURCE_OBJECT)
{
@ -275,7 +260,7 @@ public:
if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull())
{
mSourceType = CHAT_SOURCE_SYSTEM;
}
}
mUserNameFont = style_params.font();
LLTextBox* user_name = getChild<LLTextBox>("user_name");
@ -283,14 +268,14 @@ public:
user_name->setColor(style_params.color());
if (chat.mFromName.empty()
|| mSourceType == CHAT_SOURCE_SYSTEM)
|| mSourceType == CHAT_SOURCE_SYSTEM
|| mAvatarID.isNull())
{
mFrom = LLTrans::getString("SECOND_LIFE");
user_name->setValue(mFrom);
updateMinUserNameWidth();
}
else if (mSourceType == CHAT_SOURCE_AGENT
&& !mAvatarID.isNull()
&& chat.mChatStyle != CHAT_STYLE_HISTORY)
{
// ...from a normal user, lookup the name and fill in later.
@ -303,41 +288,7 @@ public:
LLAvatarNameCache::get(mAvatarID,
boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2));
}
else if (chat.mChatStyle == CHAT_STYLE_HISTORY ||
mSourceType == CHAT_SOURCE_AGENT)
{
//if it's an avatar name with a username add formatting
S32 username_start = chat.mFromName.rfind(" (");
S32 username_end = chat.mFromName.rfind(')');
if (username_start != std::string::npos &&
username_end == (chat.mFromName.length() - 1))
{
mFrom = chat.mFromName.substr(0, username_start);
user_name->setValue(mFrom);
if (gSavedSettings.getBOOL("NameTagShowUsernames"))
{
std::string username = chat.mFromName.substr(username_start + 2);
username = username.substr(0, username.length() - 1);
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
style_params_name.color(userNameColor);
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
style_params_name.readonly_color(userNameColor);
user_name->appendText(" - " + username, FALSE, style_params_name);
}
}
else
{
mFrom = chat.mFromName;
user_name->setValue(mFrom);
updateMinUserNameWidth();
}
}
else
{
else {
// ...from an object, just use name as given
mFrom = chat.mFromName;
user_name->setValue(mFrom);
@ -352,15 +303,6 @@ public:
if(mSourceType != CHAT_SOURCE_AGENT)
icon->setDrawTooltip(false);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | 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:
@ -425,9 +367,7 @@ public:
user_name->setValue( LLSD(av_name.mDisplayName ) );
user_name->setToolTip( av_name.mUsername );
if (gSavedSettings.getBOOL("NameTagShowUsernames") &&
LLAvatarNameCache::useDisplayNames() &&
!av_name.mIsDisplayNameDefault)
if (gSavedSettings.getBOOL("NameTagShowUsernames") && LLAvatarNameCache::useDisplayNames())
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
@ -447,10 +387,6 @@ protected:
void showContextMenu(S32 x,S32 y)
{
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | 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)
@ -501,10 +437,7 @@ protected:
void showInfoCtrl()
{
// if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
if ( (!mShowInfoCtrl) || (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) ) return;
// [/RLVa:KB]
if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
if (!sInfoCtrl)
{
@ -573,10 +506,6 @@ protected:
EChatSourceType mSourceType;
std::string mFrom;
LLUUID mSessionID;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
bool mShowContextMenu;
bool mShowInfoCtrl;
// [/RLVa:KB]
S32 mMinUserNameWidth;
const LLFontGL* mUserNameFont;
@ -803,46 +732,32 @@ 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())
{
// [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 = LLSLURL("objectim", chat.mFromID, "").getSLURLString();
url += "?name=" + chat.mFromName;
url += "&owner=" + chat.mOwnerID.asString();
// for object IMs, create a secondlife:///app/objectim SLapp
std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString();
url += "?name=" + chat.mFromName;
url += "&owner=" + chat.mOwnerID.asString();
std::string slurl = args["slurl"].asString();
if (slurl.empty())
{
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
if(region)
{
LLSLURL region_slurl(region->getName(), chat.mPosAgent);
slurl = region_slurl.getLocationString();
}
}
url += "&slurl=" + LLURI::escape(slurl);
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
std::string slurl = args["slurl"].asString();
if (slurl.empty())
{
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
if(region)
{
LLSLURL region_slurl(region->getName(), chat.mPosAgent);
slurl = region_slurl.getLocationString();
}
}
// [/RLVa:KB]
url += "&slurl=" + LLURI::escape(slurl);
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
link_params.is_link = true;
link_params.link_href = url;
mEditor->appendText(chat.mFromName + delimiter,
mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
false, link_params);
}
// 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]
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
@ -852,7 +767,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
}
else
{
mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, false, style_params);
mEditor->appendText(chat.mFromName + delimiter, false, style_params);
}
}
}

View File

@ -31,7 +31,6 @@
#include "llchatmsgbox.h"
#include "llavatariconctrl.h"
#include "llcommandhandler.h"
#include "llfloaterreg.h"
#include "lllocalcliprect.h"
#include "lltrans.h"
@ -41,48 +40,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;
//*******************************************************************************************************************
// LLObjectHandler
//*******************************************************************************************************************
// handle secondlife:///app/object/<ID>/inspect SLURLs
class LLObjectHandler : public LLCommandHandler
{
public:
LLObjectHandler() : LLCommandHandler("object", UNTRUSTED_BLOCK) { }
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
if (params.size() < 2) return false;
LLUUID object_id;
if (!object_id.set(params[0], FALSE))
{
return false;
}
const std::string verb = params[1].asString();
if (verb == "inspect")
{
LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id));
return true;
}
return false;
}
};
LLObjectHandler gObjectHandler;
//*******************************************************************************************************************
//LLNearbyChatToastPanel
//*******************************************************************************************************************
@ -180,11 +141,7 @@ 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;
@ -212,30 +169,17 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
{
std::string str_sender;
str_sender = fromName;
str_sender = "<nolink>"; // disable parsing URLs in object names (STORM-358)
str_sender += fromName;
str_sender += "</nolink>";
str_sender+=" ";
//append sender name
if (mSourceType == CHAT_SOURCE_AGENT || mSourceType == CHAT_SOURCE_OBJECT)
//append user name
{
LLStyle::Params style_params_name;
LLColor4 userNameColor = LLUIColorTable::instance().getColor("ChatToastAgentNameColor");
std::string href;
if (mSourceType == CHAT_SOURCE_AGENT)
{
//href = LLSLURL("agent", mFromID, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d | Adjusted 11/3/2010 AO
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
href = LLSLURL("agent",mFromID,"about").getSLURLString();
// [/RLVa:KB]
}
else
{
href = LLSLURL("object", mFromID, "inspect").getSLURLString();
}
style_params_name.color(userNameColor);
@ -244,16 +188,11 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
style_params_name.font.name(font_name);
style_params_name.font.size(font_style_size);
style_params_name.link_href = href;
style_params_name.is_link = true;
style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString();
msg_text->appendText(str_sender, FALSE, style_params_name);
}
else
{
msg_text->appendText(str_sender, false);
}
}
//append text
@ -382,10 +321,7 @@ void LLNearbyChatToastPanel::draw()
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon", false);
if(icon)
{
// 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]
icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
if(mSourceType == CHAT_SOURCE_OBJECT)
icon->setValue(LLSD("OBJECT_Icon"));
else if(mSourceType == CHAT_SOURCE_SYSTEM)

View File

@ -46,9 +46,6 @@ 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:
@ -92,9 +89,6 @@ private:
bool mIsDirty;
// [RLVa:KB] - Checked: 2010-04-200 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
bool mShowIconTooltip;
// [/RLVa:KB]
};

View File

@ -267,11 +267,7 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp)
{
clp.options(gOptionsDesc);
clp.positional(gPositionalOptions);
// SNOW-626: Boost 1.42 erroneously added allow_guessing to the default style
// (see http://groups.google.com/group/boost-list/browse_thread/thread/545d7bf98ff9bb16?fwc=2&pli=1)
// Remove allow_guessing from the default style, because that is not allowed
// when we have options that are a prefix of other options (aka, --help and --helperuri).
clp.style((po::command_line_style::default_style & ~po::command_line_style::allow_guessing)
clp.style(po::command_line_style::default_style
| po::command_line_style::allow_long_disguise);
if(mExtraParser)
{

View File

@ -358,7 +358,6 @@ void LLDrawable::makeActive()
{
U32 pcode = mVObjp->getPCode();
if (pcode == LLViewerObject::LL_VO_WATER ||
pcode == LLViewerObject::LL_VO_VOID_WATER ||
pcode == LLViewerObject::LL_VO_SURFACE_PATCH ||
pcode == LLViewerObject::LL_VO_PART_GROUP ||
pcode == LLViewerObject::LL_VO_HUD_PART_GROUP ||

View File

@ -89,7 +89,6 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
case POOL_SKY:
poolp = new LLDrawPoolSky();
break;
case POOL_VOIDWATER:
case POOL_WATER:
poolp = new LLDrawPoolWater();
break;

View File

@ -57,7 +57,6 @@ public:
POOL_BUMP,
POOL_INVISIBLE, // see below *
POOL_AVATAR,
POOL_VOIDWATER,
POOL_WATER,
POOL_GLOW,
POOL_ALPHA,

View File

@ -68,7 +68,7 @@ void LLDrawPoolGround::render(S32 pass)
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
LLGLSquashToFarClip far_clip(glh_get_current_projection());
LLGLClampToFarClip far_clip(glh_get_current_projection());
F32 water_height = gAgent.getRegion()->getWaterHeight();
glPushMatrix();

View File

@ -97,7 +97,7 @@ void LLDrawPoolSky::render(S32 pass)
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
LLGLSquashToFarClip far_clip(glh_get_current_projection());
LLGLClampToFarClip far_clip(glh_get_current_projection());
LLGLEnable fog_enable( (mVertexShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0);

View File

@ -532,7 +532,6 @@ void LLDrawPoolWater::shade()
glColor4fv(water_color.mV);
{
LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
LLGLDisable cullface(GL_CULL_FACE);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@ -549,19 +548,30 @@ void LLDrawPoolWater::shade()
sNeedsReflectionUpdate = TRUE;
if (water->getUseTexture() || !water->getIsEdgePatch())
if (water->getUseTexture())
{
sNeedsDistortionUpdate = TRUE;
face->renderIndexed();
}
else if (gGLManager.mHasDepthClamp || deferred_render)
{
face->renderIndexed();
}
else
{
LLGLSquashToFarClip far_clip(glh_get_current_projection());
face->renderIndexed();
{ //smash background faces to far clip plane
if (water->getIsEdgePatch())
{
if (deferred_render)
{
face->renderIndexed();
}
else
{
LLGLClampToFarClip far_clip(glh_get_current_projection());
face->renderIndexed();
}
}
else
{
sNeedsDistortionUpdate = TRUE;
face->renderIndexed();
}
}
}
}

View File

@ -260,7 +260,7 @@ void LLDrawPoolWLSky::render(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable clip(GL_CLIP_PLANE0);
LLGLSquashToFarClip far_clip(glh_get_current_projection());
LLGLClampToFarClip far_clip(glh_get_current_projection());
renderSkyHaze(camHeightLocal);

View File

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

View File

@ -37,9 +37,6 @@
#include "llviewercontrol.h"
#include "llviewerregion.h" // getCapability()
#include "llworld.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d)
#include "rlvhandler.h"
// [/RLVa:KB]
// Linden libraries
#include "llavatarnamecache.h" // IDEVO
@ -258,21 +255,6 @@ void LLFloaterAvatarPicker::onRangeAdjust()
void LLFloaterAvatarPicker::onList()
{
getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
if (rlv_handler_t::isEnabled())
{
LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
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()

View File

@ -209,6 +209,13 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
llassert(msg);
if (!msg) return;
LLHost host = msg->getSender();
if (host != gAgent.getRegionHost())
{
// update is for a different region than the one we're in
return;
}
//const S32 SIM_NAME_BUF = 256;
U32 region_flags;
U8 sim_access;
@ -226,8 +233,6 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
S32 redirect_grid_y;
LLUUID cache_id;
LLHost host = msg->getSender();
msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, sim_name);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_EstateID, estate_id);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id);
@ -237,15 +242,6 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, object_bonus_factor);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, billable_factor);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
if (host != gAgent.getRegionHost())
{
// Update is for a different region than the one we're in.
// Just check for a waterheight change.
LLWorld::getInstance()->waterHeightRegionInfo(sim_name, water_height);
return;
}
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit);
msg->getS32Fast(_PREHASH_RegionInfo, _PREHASH_PricePerMeter, price_per_meter);

View File

@ -40,9 +40,6 @@
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
@ -115,16 +112,7 @@ void LLFloaterInspect::onClickCreatorProfile()
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | 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]
LLAvatarActions::showProfile(node->mPermissions->getCreator());
}
}
}
@ -150,10 +138,6 @@ void LLFloaterInspect::onClickOwnerProfile()
if(node)
{
const LLUUID& owner_id = node->mPermissions->getOwner();
// [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(owner_id);
}
}
@ -163,13 +147,8 @@ void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
// getChildView("button owner")->setEnabled(true);
// getChildView("button creator")->setEnabled(true);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | 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 owner")->setEnabled(true);
getChildView("button creator")->setEnabled(true);
// [/RLVa:KB]
}
}
@ -231,19 +210,7 @@ void LLFloaterInspect::refresh()
owner_name = av_name.getCompleteName();
LLAvatarNameCache::get(obj->mPermissions->getCreator(), &av_name);
creator_name = av_name.getCompleteName();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if (!obj->mPermissions->isGroupOwned())
owner_name = RlvStrings::getAnonym(owner_name);
const LLUUID& idCreator = obj->mPermissions->getCreator();
if ( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) )
creator_name = RlvStrings::getAnonym(creator_name);
}
// [/RLVa:KB]
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
row["columns"][0]["type"] = "text";

View File

@ -43,8 +43,6 @@
#include "lldraghandle.h"
#include "lltextbox.h"
#include "llviewermenu.h"
#include "llfloaterworldmap.h"
#include "llagent.h"
//
// Constants
@ -124,36 +122,11 @@ BOOL LLFloaterMap::postBuild()
return TRUE;
}
BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
BOOL LLFloaterMap::handleDoubleClick( S32 x, S32 y, MASK mask )
{
// If floater is minimized, minimap should be shown on doubleclick (STORM-299)
if (isMinimized())
{
setMinimized(FALSE);
return TRUE;
}
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
// If we're not tracking a beacon already, double-click will set one
if (!LLTracker::isTracking(NULL))
{
LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
if (world_map)
{
world_map->trackLocation(pos_global);
}
}
if (gSavedSettings.getBOOL("DoubleClickTeleport"))
{
// If DoubleClickTeleport is on, double clicking the minimap will teleport there
gAgent.teleportViaLocationLookAt(pos_global);
}
else
{
LLFloaterReg::showInstance("world_map");
}
std::string floater_to_show = this->isMinimized() ? "mini_map" : "world_map";
LLFloaterReg::showInstance(floater_to_show);
return TRUE;
}

View File

@ -103,9 +103,6 @@
#include "llviewermedia.h"
#include "llpluginclassmedia.h"
#include "llteleporthistorystorage.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
@ -847,11 +844,6 @@ 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
@ -889,14 +881,8 @@ 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"));
// [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]
ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
BOOL shaders = ctrl_shader_enable->get();
if (shaders)
{
@ -913,13 +899,7 @@ 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);
// [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]
ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");

View File

@ -58,9 +58,6 @@
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPropertiesObserver
@ -281,16 +278,6 @@ 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 anonimize 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
@ -314,15 +301,8 @@ 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);
// [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("BtnOwner")->setEnabled(TRUE);
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(TRUE);
getChild<LLUICtrl>("LabelOwnerName")->setValue(name);
@ -559,17 +539,6 @@ 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());
}
}
@ -585,10 +554,6 @@ 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,14 +254,6 @@ 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

@ -34,10 +34,6 @@
#include "llcolorswatch.h"
#include "llviewercontrol.h"
#include "lltexteditor.h"
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
#include "rlvhandler.h"
#include "rlvextensions.h"
// [/RLVa:KB]
LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
@ -213,33 +209,6 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
if (controlp)
{
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0e) | Modified: RLVa-0.2.1d
// TODO-RLVa: [RLVa-1.2.1] Look into rewriting the whole debug setting blocking code
if (rlv_handler_t::isEnabled())
{
// Don't allow changing DBG_WRITE debug settings under @setdebug=n
bool fEnable = !( (gRlvHandler.hasBehaviour(RLV_BHVR_SETDEBUG)) &&
(RlvExtGetSet::getDebugSettingFlags(controlp->getName()) & RlvExtGetSet::DBG_WRITE) );
// Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n
fEnable &= !((gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) &&
(("VertexShaderEnable" == controlp->getName()) || ("WindLightUseAtmosShaders" == controlp->getName())));
#ifdef RLV_EXTENSION_STARTLOCATION
// Don't allow toggling RestrainedLoveLoginLastLocation
fEnable &= !(RLV_SETTING_LOGINLASTLOCATION == controlp->getName());
#endif // RLV_EXTENSION_STARTLOCATION
// NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault()
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

@ -269,17 +269,6 @@ void LLFloaterWindLight::syncMenu()
LLWLParamSet& currentParams = param_mgr->mCurParams;
//std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
/*
// Fixes LL "bug" (preset name isn't kept synchronized)
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
if (comboBox->getSelectedItemLabel() != currentParams.mName)
{
comboBox->setSimple(currentParams.mName);
}
*/
// [/RLVa:KB]
// blue horizon
param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
getChild<LLUICtrl>("WLBlueHorizonR")->setValue(param_mgr->mBlueHorizon.r / 2.0);

View File

@ -75,10 +75,6 @@
#include "llwindow.h" // copyTextToClipboard()
// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
//---------------------------------------------------------------------------
// Constants
//---------------------------------------------------------------------------
@ -437,10 +433,6 @@ 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);
@ -643,7 +635,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
// convert global specified position to a local one
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, (F64)REGION_HEIGHT_METERS );
F32 region_local_z = (F32)fmod( pos.mdV[VZ], (F64)REGION_WIDTH_METERS );
// write in the values
childSetValue("teleport_coordinate_x", region_local_x );
@ -723,16 +715,6 @@ 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,10 +46,6 @@
#include "llrecentpeople.h"
#include "llviewerobjectlist.h"
#include "llvoavatarself.h"
// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a)
#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
@ -132,7 +128,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
if (get_is_item_worn(item->getUUID()))
if (gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
acceptable = false;
}
@ -143,7 +139,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
BOOL copyable = false;
if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
if (!copyable && get_is_item_worn(item->getUUID()))
if (!copyable && gAgentWearables.isWearingItem(item->getUUID()))
{
acceptable = false;
}
@ -304,20 +300,6 @@ 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.0h) | 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 strName, strMsgName = "inventory_item_offered-im"; LLSD args;
if (gCacheName->getFullName(to_agent, strName))
{
args["NAME"] = RlvStrings::getAnonym(strName);
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))
{
@ -415,15 +397,7 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
logInventoryOffer(to_agent, im_session_id);
// add buddy to recent people list
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f) | 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]
LLRecentPeople::instance().add(to_agent);
}
// static
@ -478,15 +452,7 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
<< cat->getUUID() << llendl;
// add buddy to recent people list
// LLRecentPeople::instance().add(to_agent);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | 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]
LLRecentPeople::instance().add(to_agent);
// Test out how many items are being given.
LLViewerInventoryCategory::cat_array_t cats;

View File

@ -62,9 +62,6 @@
#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;
@ -72,13 +69,6 @@ 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-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(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;
@ -143,27 +133,6 @@ 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);

View File

@ -109,14 +109,7 @@ public:
/*virtual*/ BOOL postBuild();
void onClickClose()
{
if (!mHidden)
{
hide();
LLNotifications::instance().cancel(mNotification);
}
}
void onClickClose() { hide(); LLNotifications::instance().cancel(mNotification); }
void draw();
void hide() { if(!mHidden) {mHidden = true; mFadeTimer.reset();} }

View File

@ -46,11 +46,9 @@
#include "llstatusbar.h"
#include "llmenugl.h"
#include "pipeline.h"
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b)
#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;
@ -275,32 +273,9 @@ void LLHUDText::renderText(BOOL for_select)
void LLHUDText::setString(const std::string &text_utf8)
{
mTextSegments.clear();
std::string text(text_utf8);
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0a) | Modified: RLVa-1.0.0f
// NOTE: setString() is only called for debug beacons and the floating name tags (which we don't want to censor
// because you'd see "(Region hidden) LastName" if you happen to go to a sim who's name is your first name :p
if (rlv_handler_t::isEnabled())
{
if (gRlvHandler.canShowHoverText(mSourceObject))
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
RlvUtil::filterLocation(text);
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
RlvUtil::filterNames(text);
}
else
{
text = "";
}
}
// [/RLVa:KB]
addLine(text, mColor);
addLine(text_utf8, mColor);
}
void LLHUDText::clearString()
{
mTextSegments.clear();
@ -680,18 +655,3 @@ F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font)
return width;
}
}
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | 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->mObjText) ) &&
(pText->mSourceObject) && (LL_PCODE_VOLUME == pText->mSourceObject->getPCode()) )
{
pText->setString(pText->mObjText);
}
}
}
// [/RLVa:KB]

View File

@ -124,13 +124,6 @@ public:
static void reshape();
static void setDisplayText(BOOL flag) { sDisplayText = flag ; }
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
// Note: these probably need to be rethought with new hudtext mechanisms - AO
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);
@ -169,9 +162,6 @@ private:
ETextAlignment mTextAlignment;
EVertAlignment mVertAlignment;
BOOL mHidden;
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f
std::string mObjText;
// [/RLVa:KB]
static BOOL sDisplayText ;
static std::set<LLPointer<LLHUDText> > sTextObjects;

View File

@ -57,9 +57,6 @@
#include "llspeakers.h"
#include "llsidetray.h"
// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e)
#include "rlvhandler.h"
// [/RLVa:KB]
static const S32 RECT_PADDING_NOT_INIT = -1;
static const S32 RECT_PADDING_NEED_RECALC = -2;
@ -214,56 +211,6 @@ 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-04-09 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM))
{
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: allow if recipient is a sendim exception
fRlvFilter = !gRlvHandler.isException(RLV_BHVR_SENDIM, mOtherParticipantUUID);
break;
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat: allow if group is a sendim exception
fRlvFilter = !gRlvHandler.isException(RLV_BHVR_SENDIM, mSessionID);
break;
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if all participants are sendim exceptions
{
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.isException(RLV_BHVR_SENDIM, 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,9 +63,7 @@
#include "lltextbox.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");
@ -133,20 +131,6 @@ void toast_callback(const LLSD& msg){
return;
}
// *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(
msg["session_id"]);
if (!gSavedSettings.getBOOL("EnableGroupChatPopups")
&& session->isGroupSessionType())
{
return;
}
if (!gSavedSettings.getBOOL("EnableIMChatPopups")
&& !session->isGroupSessionType())
{
return;
}
// Skip toasting if we have open window of IM with this session id
LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
if (open_im_floater && open_im_floater->getVisible())
@ -273,17 +257,21 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
// history files have consistent (English) names in different locales.
if (isAdHocSessionType() && IM_SESSION_INVITE == type)
{
LLAvatarNameCache::get(mOtherParticipantID,
boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,
this, _2));
}
}
// Name here has a form of "<Avatar's name> Conference"
// Lets update it to localize the "Conference" word. See EXT-8429.
S32 separator_index = mName.rfind(" ");
std::string name = mName.substr(0, separator_index);
++separator_index;
std::string conference_word = mName.substr(separator_index, mName.length());
void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name)
{
// additional check that session name is what we expected
if ("Conference" == conference_word)
{
LLStringUtil::format_map_t args;
args["[AGENT_NAME]"] = av_name.getCompleteName();
args["[AGENT_NAME]"] = name;
LLTrans::findString(mName, "conference-title-incoming", args);
}
}
}
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
@ -442,9 +430,8 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& histo
}
else
{
// convert it to a legacy name if we have a complete name
std::string legacy_name = gCacheName->buildLegacyName(from);
gCacheName->getUUID(legacy_name, from_id);
// Legacy chat logs only wrote the legacy name, not the agent_id
gCacheName->getUUID(from, from_id);
}
std::string timestamp = msg[IM_TIME];
@ -539,16 +526,8 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline()
void LLIMModel::LLIMSession::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
if (av_name.mLegacyFirstName.empty())
{
// if mLegacyFirstName is empty it means display names is off and the
// data came from the gCacheName, mDisplayName will be the legacy name
mHistoryFileName = LLCacheName::cleanFullName(av_name.mDisplayName);
}
else
{
mHistoryFileName = LLCacheName::cleanFullName(av_name.getLegacyName());
}
// if username is empty, display names isn't enabled, use the display name
mHistoryFileName = av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername;
}
void LLIMModel::LLIMSession::buildHistoryFileName()
@ -758,18 +737,8 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
{
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
{
std::string from_name = from;
LLAvatarName av_name;
if (!from_id.isNull() &&
LLAvatarNameCache::get(from_id, &av_name) &&
!av_name.mIsDisplayNameDefault)
{
from_name = av_name.getCompleteName();
}
LLLogChat::saveHistory(file_name, from_name, from_id, utf8_text);
{
LLLogChat::saveHistory(file_name, from, from_id, utf8_text);
return true;
}
else
@ -1080,27 +1049,17 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
if( session == 0)//??? shouldn't really happen
{
LLRecentPeople::instance().add(other_participant_id);
return;
}
// IM_SESSION_INVITE means that this is an Ad-hoc incoming chat
// (it can be also Group chat but it is checked above)
// In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added
// to Recent People to prevent showing of an item with (???)(???). See EXT-8246.
// Concrete participants will be added into this list once they sent message in chat.
if (IM_SESSION_INVITE == dialog) return;
if (IM_SESSION_CONFERENCE_START == dialog) // outgoing ad-hoc session
else
{
// Add only online members of conference to recent list (EXT-8658)
addSpeakersToRecent(im_session_id);
}
else // outgoing P2P session
{
// Add the recepient of the session.
if (!session->mInitialTargetIDs.empty())
{
LLRecentPeople::instance().add(*(session->mInitialTargetIDs.begin()));
}
// IM_SESSION_INVITE means that this is an Ad-hoc incoming chat
// (it can be also Group chat but it is checked above)
// In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added
// to Recent People to prevent showing of an item with (???)(???). See EXT-8246.
// Concrete participants will be added into this list once they sent message in chat.
if (IM_SESSION_INVITE == dialog) return;
// Add only online members to recent (EXT-8658)
addSpeakersToRecent(im_session_id);
}
}
}
@ -3184,20 +3143,6 @@ public:
{
return;
}
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a
if (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM))
{
if (gAgent.isInGroup(session_id)) // Group chat: don't accept the invite if not an exception
{
if (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id))
return;
}
else if (!gRlvHandler.isException(RLV_BHVR_RECVIM, 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

@ -100,8 +100,6 @@ public:
void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name);
void onAdHocNameCache(const LLAvatarName& av_name);
//*TODO make private
static std::string generateHash(const std::set<LLUUID>& sorted_uuids);

View File

@ -53,7 +53,6 @@
#include "llfloaterreg.h"
#include "llmenubutton.h"
#include "lltextbox.h"
#include "lltoggleablemenu.h"
#include "lltooltip.h" // positionViewNearMouse()
#include "lltrans.h"
#include "lluictrl.h"
@ -403,8 +402,8 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data)
// if neither the gear menu or self gear menu are open
void LLInspectAvatar::onMouseLeave(S32 x, S32 y, MASK mask)
{
LLToggleableMenu* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
LLToggleableMenu* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu();
LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
LLMenuGL* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu();
if ( gear_menu && gear_menu->getVisible() &&
gear_menu_self && gear_menu_self->getVisible() )
{

View File

@ -37,10 +37,6 @@
#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!
@ -51,7 +47,6 @@
#include "llsafehandle.h"
#include "llsidetray.h"
#include "lltextbox.h" // for description truncation
#include "lltoggleablemenu.h"
#include "lltrans.h"
#include "llui.h" // positionViewNearMouse()
#include "lluictrl.h"
@ -382,15 +377,6 @@ 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)
@ -486,26 +472,10 @@ 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();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
// Only anonimize the creator if they're also the owner or if they're a nearby avie
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id))) )
{
// TODO-RLVa: [RLVa-1.2.2] We need to put a callback here in case the name hasn't previously resolved
std::string strFullName;
args["[CREATOR]"] = (gCacheName->getFullName(creator_id, strFullName)) ? RlvStrings::getAnonym(strFullName)
: LLTrans::getString("Unknown");
}
else
{
// [/RLVa:KB]
std::string creator_url =
LLSLURL("agent", creator_id, "about").getSLURLString();
args["[CREATOR]"] = creator_url;
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
}
// [/RLVa:KB]
std::string creator_url =
LLSLURL("agent", creator_id, "about").getSLURLString();
args["[CREATOR]"] = creator_url;
// created by one user but owned by another
std::string owner_url;
LLUUID owner_id;
@ -518,21 +488,7 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
else
{
owner_id = nodep->mPermissions->getOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
// TODO-RLVa: [RLVa-1.2.2] We need to put a callback here in case the name hasn't previously resolved
std::string strFullName;
owner_url = (gCacheName->getFullName(owner_id, strFullName)) ? RlvStrings::getAnonym(strFullName)
: LLTrans::getString("Unknown");
}
else
{
// [/RLVa:KB]
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
}
// [/RLVa:KB]
owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
}
args["[OWNER]"] = owner_url;
@ -612,7 +568,7 @@ void LLInspectObject::updateSecureBrowsing()
// if the gear menu is not open
void LLInspectObject::onMouseLeave(S32 x, S32 y, MASK mask)
{
LLToggleableMenu* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
if ( gear_menu && gear_menu->getVisible() )
{
return;

View File

@ -35,9 +35,6 @@
#include "llui.h"
#include "lluictrl.h"
#include "llurlaction.h"
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f)
#include "rlvhandler.h"
// [/RLVa:KB]
//////////////////////////////////////////////////////////////////////////////
// LLInspectRemoteObject
@ -115,12 +112,8 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
mSLurl = data["slurl"].asString();
// work out the owner's name
// mOwnerLegacyName = "";
// if (gCacheName)
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
mOwnerLegacyName = (data.has("owner_name")) ? data["owner_name"].asString() : "";
if ( (gCacheName) && (mOwnerID.notNull()) )
// [/RLVa:KB]
mOwnerLegacyName = "";
if (gCacheName)
{
gCacheName->get(mOwnerID, mGroupOwned, // muting
boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3));
@ -188,10 +181,7 @@ void LLInspectRemoteObject::update()
owner = LLSLURL("agent", mOwnerID, "about").getSLURLString();
}
}
// else
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
else if (owner.empty()) // If "objectim" was subject to @shownames then we passed an anonimized owner name so use that if available
// [/RLVa:KB]
else
{
owner = LLTrans::getString("Unknown");
}
@ -210,14 +200,6 @@ 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

@ -68,9 +68,6 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
// [/RLVa:KB]
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
typedef std::list<two_uuids_t> two_uuids_list_t;
@ -623,20 +620,6 @@ 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);
@ -1660,19 +1643,16 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
const BOOL is_agent_inventory = (model->getCategory(inv_cat->getUUID()) != NULL)
&& (LLToolDragAndDrop::SOURCE_AGENT == source);
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
BOOL accept = FALSE;
if (is_agent_inventory)
{
const LLUUID &cat_id = inv_cat->getUUID();
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
const BOOL move_is_into_outfit = getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
//--------------------------------------------------------------------------------
// Determine if folder can be moved.
@ -1710,21 +1690,6 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
}
if (move_is_into_landmarks)
{
for (S32 i=0; i < descendent_items.count(); ++i)
{
LLViewerInventoryItem* item = descendent_items[i];
// Don't move anything except landmarks and categories into Landmarks folder.
// We use getType() instead of getActua;Type() to allow links to landmarks and folders.
if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType())
{
is_movable = FALSE;
break; // It's generally movable, but not into Landmarks.
}
}
}
//
//--------------------------------------------------------------------------------
@ -1812,17 +1777,6 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
LLUUID category_id = mUUID;
accept = move_inv_category_world_to_agent(object_id, category_id, drop);
}
else if (LLToolDragAndDrop::SOURCE_LIBRARY == source)
{
// Accept folders that contain complete outfits.
accept = move_is_into_current_outfit && LLAppearanceMgr::instance().getCanMakeFolderIntoOutfit(inv_cat->getUUID());
if (accept && drop)
{
LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, true, false);
}
}
return accept;
}
@ -2707,8 +2661,6 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data)
{
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
//llinfos << "LLFolderBridge::dragOrDrop()" << llendl;
BOOL accept = FALSE;
switch(cargo_type)
@ -2724,24 +2676,9 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
accept = dragItemIntoFolder(inv_item, drop);
break;
case DAD_LINK:
// DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER.
// If we have an item of AT_LINK_FOLDER type we should process the linked
// category being dragged or dropped into folder.
if (inv_item && LLAssetType::AT_LINK_FOLDER == inv_item->getActualType())
{
LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
if (linked_category)
{
accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop);
}
}
else
{
accept = dragItemIntoFolder(inv_item, drop);
}
accept = dragItemIntoFolder((LLInventoryItem*)cargo_data,
drop);
break;
case DAD_CATEGORY:
if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID))
@ -2925,7 +2862,6 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr
{
if ((inv_item->getInventoryType() != LLInventoryType::IT_WEARABLE) &&
(inv_item->getInventoryType() != LLInventoryType::IT_GESTURE) &&
(inv_item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) &&
(inv_item->getInventoryType() != LLInventoryType::IT_OBJECT))
{
return FALSE;
@ -2939,24 +2875,6 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr
return TRUE;
}
// Returns TRUE if item is a landmark or a link to a landmark
// and can be moved to Favorites or Landmarks folder.
static BOOL can_move_to_landmarks(LLInventoryItem* inv_item)
{
// Need to get the linked item to know its type because LLInventoryItem::getType()
// returns actual type AT_LINK for links, not the asset type of a linked item.
if (LLAssetType::AT_LINK == inv_item->getType())
{
LLInventoryItem* linked_item = gInventory.getItem(inv_item->getLinkedUUID());
if (linked_item)
{
return LLAssetType::AT_LANDMARK == linked_item->getType();
}
}
return LLAssetType::AT_LANDMARK == inv_item->getType();
}
void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item)
{
// use callback to rearrange favorite landmarks after adding
@ -3013,12 +2931,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false);
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
const BOOL move_is_into_favorites = (mUUID == favorites_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
BOOL accept = FALSE;
@ -3029,6 +2944,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID());
const BOOL folder_allows_reorder = (mUUID == favorites_id);
//--------------------------------------------------------------------------------
// Determine if item can be moved.
@ -3049,15 +2965,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
is_movable = FALSE;
}
// [RLVa:KB] - Checked: 2010-05-27 (RLVa-1.2.0h) | Added: RLVa-1.2.0h
if ( (rlv_handler_t::isEnabled()) && (move_is_into_current_outfit) )
{
const LLViewerInventoryItem* pItem = dynamic_cast<const LLViewerInventoryItem*>(inv_item);
is_movable = rlvPredIsWearableItem(pItem);
}
// [/RLVa:KB]
if (move_is_into_trash)
{
is_movable &= inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID());
@ -3083,16 +2990,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (!is_movable)
accept = FALSE;
if ((mUUID == inv_item->getParentUUID()) && !move_is_into_favorites)
if ((mUUID == inv_item->getParentUUID()) && !folder_allows_reorder)
accept = FALSE;
if (move_is_into_current_outfit || move_is_into_outfit)
{
accept = can_move_to_outfit(inv_item, move_is_into_current_outfit);
}
else if (move_is_into_favorites || move_is_into_landmarks)
{
accept = can_move_to_landmarks(inv_item);
}
if(accept && drop)
{
@ -3118,8 +3021,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
//
// REORDER
// (only reorder the item in Favorites folder)
if ((mUUID == inv_item->getParentUUID()) && move_is_into_favorites)
// (only reorder the item)
if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
{
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
@ -3133,7 +3036,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// FAVORITES folder
// (copy the item)
else if (move_is_into_favorites)
else if (favorites_id == mUUID)
{
dropToFavorites(inv_item);
}
@ -3198,13 +3101,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
accept = FALSE;
}
// Don't allow to move a single item to Favorites or Landmarks
// if it is not a landmark or a link to a landmark.
else if ((move_is_into_favorites || move_is_into_landmarks)
&& !can_move_to_landmarks(inv_item))
{
accept = FALSE;
}
if(drop && accept)
{
@ -3250,18 +3146,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
accept = can_move_to_outfit(inv_item, move_is_into_current_outfit);
}
// Don't allow to move a single item to Favorites or Landmarks
// if it is not a landmark or a link to a landmark.
else if (move_is_into_favorites || move_is_into_landmarks)
{
accept = can_move_to_landmarks(inv_item);
}
if (accept && drop)
{
// FAVORITES folder
// (copy the item)
if (move_is_into_favorites)
if (favorites_id == mUUID)
{
dropToFavorites(inv_item);
}
@ -4169,14 +4059,6 @@ 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.
@ -4211,20 +4093,10 @@ 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*/);
}
}
@ -4250,17 +4122,7 @@ 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);
@ -4324,10 +4186,6 @@ 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())
{
@ -4346,17 +4204,6 @@ 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
@ -4540,20 +4387,11 @@ 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(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(item->getLinkedUUID()));
*/
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
// [/SL:KB]
}
}
}
@ -4721,10 +4559,6 @@ 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
{
@ -4732,17 +4566,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Wearable Add"));
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]
}
break;
default:
@ -4799,7 +4622,6 @@ void LLWearableBridge::wearAddOnAvatar()
}
// static
/*
void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata )
{
LLUUID* item_id = (LLUUID*) userdata;
@ -4823,11 +4645,9 @@ void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userda
}
delete item_id;
}
*/
// static
// BAP remove the "add" code path once everything is fully COF-ified.
/*
void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata )
{
LLUUID* item_id = (LLUUID*) userdata;
@ -4852,7 +4672,6 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* use
}
delete item_id;
}
*/
// static
BOOL LLWearableBridge::canEditOnAvatar(void* user_data)
@ -4890,7 +4709,6 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
}
// static
/*
void LLWearableBridge::onRemoveFromAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
@ -4909,24 +4727,13 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data)
}
}
}
*/
// static
/*
void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
void* userdata)
{
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 ) )
@ -4949,7 +4756,6 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
delete on_remove_struct;
}
*/
// static
void LLWearableBridge::removeAllClothesFromAvatar()
@ -4960,10 +4766,7 @@ void LLWearableBridge::removeAllClothesFromAvatar()
if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES)
continue;
// for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index)
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index)
// [/SL:KB]
for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index)
{
LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index));
@ -4973,11 +4776,6 @@ void LLWearableBridge::removeAllClothesFromAvatar()
const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
if (!wearable)
continue;
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
continue;
// [/RLVa:KB]
// Find and remove this item from the COF.
LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
@ -4986,10 +4784,7 @@ void LLWearableBridge::removeAllClothesFromAvatar()
gInventory.notifyObservers();
// Remove wearables from gAgentWearables
// LLAgentWearables::userRemoveAllClothes();
// [RLVa:KB] - Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
LLAppearanceMgr::instance().updateAppearanceFromCOF();
// [/RLVa:KB]
LLAgentWearables::userRemoveAllClothes();
}
// static
@ -4997,16 +4792,11 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item)
{
if (item)
{
/*
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(item->getUUID()));
*/
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
// [/SL:KB]
}
}

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