diff --git a/.hgpatchinfo/.RLVa.dep b/.hgpatchinfo/.RLVa.dep deleted file mode 100644 index 84c7cef168..0000000000 --- a/.hgpatchinfo/.RLVa.dep +++ /dev/null @@ -1,3 +0,0 @@ -d751cf52d416e73452a26184693bae8c1a8eeb2a -6481d02117a7c26a9dbab7bdab4890e69d51ac4c -411a8284a6707e77aff592ff9848a34615c35a3e \ No newline at end of file diff --git a/.hgpatchinfo/Appearance-Misc.dep b/.hgpatchinfo/Appearance-Misc.dep deleted file mode 100644 index 496b8e0b69..0000000000 --- a/.hgpatchinfo/Appearance-Misc.dep +++ /dev/null @@ -1 +0,0 @@ -6481d02117a7c26a9dbab7bdab4890e69d51ac4c \ No newline at end of file diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc deleted file mode 100644 index 49491dd1f4..0000000000 --- a/.hgpatchinfo/Appearance-Misc.desc +++ /dev/null @@ -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) diff --git a/.hgpatchinfo/Appearance-MixedViewers.dep b/.hgpatchinfo/Appearance-MixedViewers.dep deleted file mode 100644 index 496b8e0b69..0000000000 --- a/.hgpatchinfo/Appearance-MixedViewers.dep +++ /dev/null @@ -1 +0,0 @@ -6481d02117a7c26a9dbab7bdab4890e69d51ac4c \ No newline at end of file diff --git a/.hgpatchinfo/Appearance-MixedViewers.desc b/.hgpatchinfo/Appearance-MixedViewers.desc deleted file mode 100644 index be6e017a7d..0000000000 --- a/.hgpatchinfo/Appearance-MixedViewers.desc +++ /dev/null @@ -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() diff --git a/.hgpatchinfo/RLVa.dep b/.hgpatchinfo/RLVa.dep deleted file mode 100644 index 679aaf28ed..0000000000 --- a/.hgpatchinfo/RLVa.dep +++ /dev/null @@ -1 +0,0 @@ -c0b06fb359858375f2e233254faaa08ed6985718 \ No newline at end of file diff --git a/.hgpatchinfo/Viewer-Build.dep b/.hgpatchinfo/Viewer-Build.dep deleted file mode 100644 index 878d129fc7..0000000000 --- a/.hgpatchinfo/Viewer-Build.dep +++ /dev/null @@ -1 +0,0 @@ -dc8ac597008aff67095b81bda6e059083f91faad \ No newline at end of file diff --git a/.hgpatchinfo/Viewer-Build.desc b/.hgpatchinfo/Viewer-Build.desc deleted file mode 100644 index 6877c971df..0000000000 --- a/.hgpatchinfo/Viewer-Build.desc +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.hgtags b/.hgtags index 4a9505f790..37aa25b31d 100644 --- a/.hgtags +++ b/.hgtags @@ -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 diff --git a/README_BUILD_FIRESTORM_LINUX.txt b/README_BUILD_FIRESTORM_LINUX.txt index b72d52771d..408968b4ff 100644 --- a/README_BUILD_FIRESTORM_LINUX.txt +++ b/README_BUILD_FIRESTORM_LINUX.txt @@ -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 diff --git a/README_BUILD_FIRESTORM_WIN32.txt b/README_BUILD_FIRESTORM_WIN32.txt index 6f3f9e92d3..d485498a2c 100644 --- a/README_BUILD_FIRESTORM_WIN32.txt +++ b/README_BUILD_FIRESTORM_WIN32.txt @@ -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 \indra\build-vc80\Secondlife.sln -2. Set the build type to Release -3. Select the "firestorm-bin" target -4. Build. diff --git a/build.sh b/build.sh index f9c6beefed..b372168f98 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/build_firestorm_linux.sh b/build_firestorm_linux.sh index a793ffb2c2..ffda622578 100755 --- a/build_firestorm_linux.sh +++ b/build_firestorm_linux.sh @@ -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" diff --git a/build_firestorm_win32.sh b/build_firestorm_win32.sh index dbb975b62d..c66541af8f 100644 --- a/build_firestorm_win32.sh +++ b/build_firestorm_win32.sh @@ -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 diff --git a/doc/contributions.txt b/doc/contributions.txt index c82f930b55..bcf714b29a 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -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 diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index a4d63d91c9..d09b54827c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -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) diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake index dcf44cd642..dbd78c9de2 100644 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -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) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 21ec622819..e869b9717c 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -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 diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 0e0c80a456..9f479189d7 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -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))) diff --git a/indra/llaudio/llvorbisencode.h b/indra/llaudio/llvorbisencode.h index 6b22a2cb59..d33aacf1ea 100644 --- a/indra/llaudio/llvorbisencode.h +++ b/indra/llaudio/llvorbisencode.h @@ -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; diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index a3cad38b94..87c2d6775b 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -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; diff --git a/indra/llcommon/lldarray.h b/indra/llcommon/lldarray.h index 131b819c99..a8cd03b42a 100644 --- a/indra/llcommon/lldarray.h +++ b/indra/llcommon/lldarray.h @@ -51,7 +51,7 @@ public: LLDynamicArray(S32 size=0) : std::vector(size) { if (size < BlockSize) std::vector::reserve(BlockSize); } - void reset() { std::vector::clear(); } + void reset() { std::vector::resize(0); } // ACCESSORS const Type& get(S32 index) const { return std::vector::operator[](index); } diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index f3194dc3f0..bffded1132 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -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 diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index a8f53a38c3..4a66a31c35 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -38,8 +38,6 @@ #include "message.h" #include "llmemtype.h" -#include - // 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 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 diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index b108e37157..b469803060 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -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 diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 096e8e07ab..c0edd92bc1 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -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(); diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index b0decc1499..5e8965c06a 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -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(); }; /* diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 576969b81a..5a34b46d0c 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -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 diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 96061c2030..4677d535db 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -45,10 +45,6 @@ std::set 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) diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index c2c82de70c..94387fb41a 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -75,15 +75,6 @@ private: */ static std::set 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 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 diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index ac568a83e4..3df05f4d3f 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -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(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); - if (!menu) + mMenu = LLUICtrlFactory::getInstance()->createFromFile(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(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(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(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(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; - } -} diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index 9e91b9e99d..81ca0e047c 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -29,7 +29,7 @@ #include "llbutton.h" -class LLToggleableMenu; +class LLMenuGL; class LLMenuButton : public LLButton @@ -42,41 +42,22 @@ public: Optional 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 mMenuHandle; - bool mIsMenuShown; - EMenuPosition mMenuPosition; - S32 mX; - S32 mY; + LLMenuGL* mMenu; + bool mMenuVisibleLastFrame; }; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index a6cf86d9b8..6d590cf54e 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -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(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(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; diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 35544402f4..19b738312e 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -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; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5721df6b36..9adeddca99 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -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; } diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp index d29260750f..0eb2dc1387 100644 --- a/indra/llui/lltoggleablemenu.cpp +++ b/indra/llui/lltoggleablemenu.cpp @@ -35,22 +35,10 @@ static LLDefaultChildRegistry::Register 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) diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h index 2094bd776f..f036cdfffb 100644 --- a/indra/llui/lltoggleablemenu.h +++ b/indra/llui/lltoggleablemenu.h @@ -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 diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 4faa0e070e..eff2467bf0 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -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 diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 84678ef4db..f58c07754f 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -972,7 +972,7 @@ std::string LLUrlEntryWorldMap::getLocation(const std::string &url) const // LLUrlEntryNoLink::LLUrlEntryNoLink() { - mPattern = boost::regex(".*", + mPattern = boost::regex("[^<]*", 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(); } diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp index 23980ffac2..e4d100d1ec 100644 --- a/indra/mac_updater/mac_updater.cpp +++ b/indra/mac_updater/mac_updater.cpp @@ -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; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d5ddb330c4..f9a87b8a0a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -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 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0223153d3e..33f5482e50 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1,171 +1,6 @@ - RestrainedLove - - Comment - Toggles the RestrainedLove features (BDSM lockable toys support). Needs a restart of the viewer. - Persist - 1 - Type - Boolean - Value - 1 - - RestrainedLoveDebug - - Comment - Toggles the RestrainedLove debug mode (displays the commands when in debug mode). - Persist - 1 - Type - Boolean - Value - 0 - - RestrainedLoveNoSetEnv - - Comment - When TRUE, forbids to set the environment (time of day and Windlight settings) via RestrainedLove. Needs a restart of the viewer. - Persist - 1 - Type - Boolean - Value - 0 - - RestrainedLoveForbidGiveToRLV - - Comment - When TRUE, forbids to give sub-folders to the #RLV RestrainedLove folder. - Persist - 1 - Type - Boolean - Value - 1 - - RestrainedLoveReplaceWhenFolderBeginsWith - - Comment - If a folder name begins with this string, its attach behavior will always be "replace", never "stack". Default is blank (disabled). - Persist - 1 - Type - String - Value - - - RestrainedLoveStackWhenFolderBeginsWith - - Comment - If a folder name begins with this string, its attach behavior will always be "stack", never "replace". Default is "+". - Persist - 1 - Type - String - Value - + - - RLVaDebugHideUnsetDuplicate - - Comment - Suppresses reporting "unset" or "duplicate" command restrictions when RestrainedLoveDebug is TRUE - Persist - 1 - Type - Boolean - Value - 0 - - RLVaEnableCompositeFolders - - Comment - Enables composite folders for shared inventory - Persist - 1 - Type - Boolean - Value - 0 - - RLVaEnableLegacyNaming - - Comment - Enables legacy naming convention for folders - Persist - 1 - Type - Boolean - Value - 1 - - RLVaEnableSharedWear - - Comment - Attachments in the shared #RLV folder can be force-attached without needing to specify an attachment point - Persist - 1 - Type - Boolean - Value - 0 - - RLVaHideLockedLayers - - Comment - Hides "remove outfit" restricted worn clothing layers from @getoufit - Persist - 1 - Type - Boolean - Value - 0 - - RLVaHideLockedAttachments - - Comment - Hides non-detachable worn attachments from @getattach - Persist - 1 - Type - Boolean - Value - 0 - - RLVaSharedInvAutoRename - - Comment - Automatically renames shared inventory items when worn - Persist - 1 - Type - Boolean - Value - 1 - - RLVaShowNameTags - - Comment - Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted - Persist - 1 - Type - Boolean - Value - 0 - - WarnFirstRLVGiveToRLV - - Comment - Enables FirstRLVGiveToRLV warning dialog - Persist - 1 - Type - Boolean - Value - 1 - CrashHostUrl Comment @@ -2732,28 +2567,6 @@ Value 1 - EnableGroupChatPopups - - Comment - Enable Incoming Group Chat Popups - Persist - 1 - Type - Boolean - Value - 1 - - EnableIMChatPopups - - Comment - Enable Incoming IM Chat Popups - Persist - 1 - Type - Boolean - Value - 1 - DisplayAvatarAgentTarget Comment @@ -4050,7 +3863,7 @@ Type String Value - http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] + http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] HighResSnapshot @@ -4636,17 +4449,6 @@ Value 0 - LegacyMultiAttachmentSupport - - Comment - Converts legacy "secondary attachment points" to multi-attachments for other avatars - Persist - 1 - Type - Boolean - Value - 0 - LimitDragDistance Comment @@ -12343,16 +12145,5 @@ Value 300.0 - GroupMembersSortOrder - - Comment - The order by which group members will be sorted (name|donated|online) - Persist - 1 - Type - String - Value - name - diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 0b18994aff..dc76a4e518 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,17 +1,6 @@ - RLVaLoginLastLocation - - Comment - Determines whether the next login will be forced to the last logoff location (set by the viewer) - Persist - 1 - Type - Boolean - Value - 1 - - BusyResponseChanged + BusyResponseChanged Comment Does user's busy mode message differ from default? diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index d69842d5f1..b09dd699ba 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -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) diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index dae7705971..1e83bc73a5 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -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) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index d5712f80cf..d1cd335783 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -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" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 20237b1af2..c9bd7851ed 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -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); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index aff20a9399..68e408d3e4 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -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(); diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 66f3853e79..d520debc31 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -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); } diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 01fb2e5427..b9ec304b7e 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -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() ) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e69ba434df..055be4cae2 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -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 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; diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 80531f62db..d7e77a5a5b 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -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 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 loaded_callback_t; typedef boost::signals2::signal 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 mItemsAwaitingWearableUpdate; diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 2dc9b9d796..1edc96e165 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -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 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; } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index f1363b2f4e..ed5e8ceee3 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -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 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 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 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; jgetName() : "[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 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 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& atts, const std::string& msg) @@ -2973,24 +2679,13 @@ void dumpAttachmentSet(const std::set& 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 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 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()); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 80088f4a28..c65d9dc9ee 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -51,16 +51,8 @@ public: typedef std::vector 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 cb); -// [/SL:KB] - bool mAttachmentInvLinkEnabled; bool mOutfitIsDirty; bool mIsInUpdateAppearanceFromCOF; // to detect recursive calls. @@ -229,14 +217,6 @@ private: std::auto_ptr 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 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b572f9de1f..93cf20fcec 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -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; diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 56490162b1..c9543988a6 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -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); } diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 997db59d22..1d8ab74dfd 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -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(); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 0c3fa0344a..ff7dfccc0a 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -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 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 items; - getItems(items); - - std::string strFullName; - for (std::vector::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem) - { - LLAvatarListItem* pItem = static_cast(*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(item1); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index bcf2482170..cacbcf7244 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -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; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index ab946e116a..a56dc129d4 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -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().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, diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 005904e21d..a069838ac3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -51,8 +51,6 @@ public: online_style, offline_style; - Optional 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 diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 5f52553782..29c2b7565e 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -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); } diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c613711b2c..078bd73379 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -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() diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index ca542018f5..3bc7043353 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -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 { diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index f2ab4c284c..6e58be8174 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -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)) { diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d62109d5cd..378c4358b3 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -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 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("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("" + chat.mFromName + "" + 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("" + chat.mFromName + "" + delimiter, false, style_params); + mEditor->appendText(chat.mFromName + delimiter, false, style_params); } } } diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 7e33756568..ababa71348 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -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//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 = ""; // disable parsing URLs in object names (STORM-358) + str_sender += fromName; + str_sender += ""; 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("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) diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index f1ae1fe283..1d700dcede 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -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] }; diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index f31ff14df6..ee8646aad0 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -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) { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 8106fada11..583bb54160 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -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 || diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index ba576ff97f..cb651f9d3a 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -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; diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index e394aeaaf1..221f81ec25 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -57,7 +57,6 @@ public: POOL_BUMP, POOL_INVISIBLE, // see below * POOL_AVATAR, - POOL_VOIDWATER, POOL_WATER, POOL_GLOW, POOL_ALPHA, diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp index b4dc0c26a6..e950fbfa82 100644 --- a/indra/newview/lldrawpoolground.cpp +++ b/indra/newview/lldrawpoolground.cpp @@ -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(); diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp index 9eb45a952c..d811ab8c54 100644 --- a/indra/newview/lldrawpoolsky.cpp +++ b/indra/newview/lldrawpoolsky.cpp @@ -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); diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 6126908231..ce1b899d55 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -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::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(); + } } } } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index eaa6aa7e37..41a299151e 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -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); diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index b2d4d45d0a..135137069c 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -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(); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 064db86729..aa66fcf9b8 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -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("ResidentChooserTabs"); - LLPanel* pNearMePanel = getChild("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() diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index a34e0353ec..662e1c4f42 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -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); diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 4698ff53d4..a09b9ea235 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -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"; diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 351b9ac5da..a1d291fea6 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -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; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c63231e821..2bea3d37ff 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -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("Reflections"); LLRadioGroup* radio_reflection_detail = getChild("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("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("UseLightShaders"); diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 0f7a13cdcf..dd12fa64d3 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -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("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("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()); } } diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 4aad5257ce..c08848b1ea 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -254,14 +254,6 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) if (regionp) { getChild("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); diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 500c9940ca..71882fbb83 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -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 diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index a44dcd364d..ae98b2cf99 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -269,17 +269,6 @@ void LLFloaterWindLight::syncMenu() LLWLParamSet& currentParams = param_mgr->mCurParams; //std::map & 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("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("WLBlueHorizonR")->setValue(param_mgr->mBlueHorizon.r / 2.0); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 372bd8ae9e..7236894542 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -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] } } diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 011c1dee0a..260e15c714 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -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; diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 07ee9aba44..d43b3a5d6e 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -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); diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index 3f0deb98cd..7f6df627e0 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -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();} } diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index c8cf5ab240..6a423e529a 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -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 + 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] diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 2393fd3224..f05ee4d594 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -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 > sTextObjects; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 621985a848..e000abda2a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -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, diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fa0bfc3974..c865dcf9a3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -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 " 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& 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; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 650d329e18..3da4465862 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -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& sorted_uuids); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 91ede6d221..29dcb2c4d3 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -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("gear_btn")->getMenu(); - LLToggleableMenu* gear_menu_self = getChild("gear_self_btn")->getMenu(); + LLMenuGL* gear_menu = getChild("gear_btn")->getMenu(); + LLMenuGL* gear_menu_self = getChild("gear_self_btn")->getMenu(); if ( gear_menu && gear_menu->getVisible() && gear_menu_self && gear_menu_self->getVisible() ) { diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 8c98a56c0c..532ffca4be 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -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("gear_btn")->getMenu(); + LLMenuGL* gear_menu = getChild("gear_btn")->getMenu(); if ( gear_menu && gear_menu->getVisible() ) { return; diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 821f57b0fc..bf6cf52298 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -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("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("object_slurl")->setValue(mSLurl); - getChild("map_btn")->setEnabled(false); - } -// [/RLVa:KB] } ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fb27f4acd6..b15dcd993a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -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 two_uuids_t; typedef std::list 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 ¤t_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 ¤t_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 ¤t_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(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(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( 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] } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index ffc3592e27..5ac328dcef 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -472,10 +472,10 @@ public: static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu static BOOL canWearOnAvatar( void* userdata ); -// static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); + static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearOnAvatar(); -// static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); + static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearAddOnAvatar(); static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu @@ -483,8 +483,8 @@ public: void editOnAvatar(); static BOOL canRemoveFromAvatar( void* userdata ); -// static void onRemoveFromAvatar( void* userdata ); -// static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); + static void onRemoveFromAvatar( void* userdata ); + static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index dbc76f53d4..f3d9639dee 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -217,11 +217,10 @@ BOOL get_is_item_worn(const LLUUID& id) return FALSE; // Consider the item as worn if it has links in COF. -// [SL:KB] - The code below causes problems across the board so it really just needs to go -// if (LLAppearanceMgr::instance().isLinkInCOF(id)) -// { -// return TRUE; -// } + if (LLAppearanceMgr::instance().isLinkInCOF(id)) + { + return TRUE; + } switch(item->getType()) { @@ -488,9 +487,12 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte return false; break; case LLAssetType::AT_OBJECT: + if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID())) + return true; + break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: - if (!get_is_item_worn(item->getUUID())) + if(!gAgentWearables.isWearingItem(item->getUUID())) return true; break; default: diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 3f4f33e88d..7216d61e7f 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -50,7 +50,7 @@ public: LLIconDictionary::LLIconDictionary() { addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture")); - addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Sound")); + addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Texture")); addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard")); addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard")); addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark")); @@ -83,7 +83,7 @@ LLIconDictionary::LLIconDictionary() addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture")); addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem")); - addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkFolder")); + addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkItem")); addEntry(LLInventoryIcon::ICONNAME_INVALID, new IconEntry("Inv_Invalid")); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 430d5a103e..53835f0166 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -46,9 +46,6 @@ #include "llviewerregion.h" #include "llcallbacklist.h" #include "llvoavatarself.h" -// [RLVa:KB] - Checked: RLVa-1.2.0a (2010-03-05) -#include "rlvhandler.h" -// [/RLVa:KB] //#define DIFF_INVENTORY_FILES #ifdef DIFF_INVENTORY_FILES @@ -495,28 +492,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, LLViewerInventoryItem* item = NULL; item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id); - // Move onto items - if(item_array) - { - S32 count = item_array->count(); - for(S32 i = 0; i < count; ++i) - { - item = item_array->get(i); - if(add(NULL, item)) - { - items.put(item); - } - } - } - -// [RLVa:KB] - Checked: 2010-09-30 (RLVa-1.2.1d) | Added: RLVa-1.2.1d - // The problem is that we want some way for the functor to know that it's being asked to decide on a folder link - // but it won't know that until after it has encountered the folder link item (which doesn't happen until *after* - // it has already collected all items from it the way the code was originally laid out) - // This breaks the "finish collecting all folders before collecting items (top to bottom and then bottom to top)" - // assumption but no functor is (currently) relying on it (and likely never should since it's an implementation detail?) - // [Only LLAppearanceMgr actually ever passes in 'follow_folder_links == TRUE'] -// [/RLVa:KB] // Follow folder links recursively. Currently never goes more // than one level deep (for current outfit support) // Note: if making it fully recursive, need more checking against infinite loops. @@ -546,6 +521,20 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, } } } + + // Move onto items + if(item_array) + { + S32 count = item_array->count(); + for(S32 i = 0; i < count; ++i) + { + item = item_array->get(i); + if(add(NULL, item)) + { + items.put(item); + } + } + } } void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask) @@ -2453,14 +2442,6 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg, llinfos << "LLInventoryModel::processSaveAssetIntoInventory item" " not found: " << item_id << llendl; } - -// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-0.2.0e - if (rlv_handler_t::isEnabled()) - { - RlvAttachmentLockWatchdog::instance().onSavedAssetIntoInventory(item_id); - } -// [/RLVa:KB] - if(gViewerWindow) { gViewerWindow->getWindow()->decBusyCount(); @@ -2511,20 +2492,6 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { if(tfolder->getParentUUID() == folderp->getParentUUID()) { -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - // NOTE-RLVa: not sure if this is a hack or a bug-fix :o - // -> if we rename the folder on the first BulkUpdateInventory message subsequent messages will still contain - // the old folder name and gInventory.updateCategory() below will "undo" the folder name change but on the - // viewer-side *only* so the folder name actually becomes out of sync with what's on the inventory server - // -> so instead we keep the name of the existing folder and only do it for #RLV/~ in case this causes issues - // -> a better solution would be to only do the rename *after* the transaction completes but there doesn't seem - // to be any way to accomplish that either *sighs* - if ( (rlv_handler_t::isEnabled()) && (!folderp->getName().empty()) && (tfolder->getName() != folderp->getName()) && - ((tfolder->getName().find(RLV_PUTINV_PREFIX) == 0)) ) - { - tfolder->rename(folderp->getName()); - } -// [/RLVa:KB] update[tfolder->getParentUUID()]; } else diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 0870b5b8dd..50adae09c0 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -290,10 +290,7 @@ void LLInventoryPanel::modelChanged(U32 mask) const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id); - - // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item - // to folder is the fast way to get a folder without searching through folders tree. - LLFolderViewFolder* view_folder = dynamic_cast(view_item); + LLFolderViewFolder* view_folder = mFolderRoot->getFolderByID(item_id); ////////////////////////////// // LABEL Operation diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 91ed974a6b..1527f8f4c9 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -59,9 +59,6 @@ #include "llviewermenu.h" #include "llurllineeditorctrl.h" #include "llagentui.h" -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) -#include "rlvhandler.h" -// [/RLVa:KB] //============================================================================ /* @@ -592,31 +589,16 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent void LLLocationInputCtrl::onInfoButtonClicked() { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - return; -// [/RLVa:KB] - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); } void LLLocationInputCtrl::onForSaleButtonClicked() { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - return; -// [/RLVa:KB] - handle_buy_land(); } void LLLocationInputCtrl::onAddLandmarkButtonClicked() { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - return; -// [/RLVa:KB] - LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); // Landmark exists, open it for preview and edit if(landmark && landmark->getUUID().notNull()) @@ -733,10 +715,6 @@ void LLLocationInputCtrl::onTextEditorRightClicked(S32 x, S32 y, MASK mask) void LLLocationInputCtrl::refresh() { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - mInfoBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); -// [/RLVa:KB] - refreshLocation(); // update location string refreshParcelIcons(); updateAddLandmarkButton(); // indicate whether current parcel has been landmarked @@ -1008,9 +986,6 @@ void LLLocationInputCtrl::enableAddLandmarkButton(bool val) // depending on whether current parcel has been landmarked. void LLLocationInputCtrl::updateAddLandmarkButton() { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - mAddLandmarkBtn->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); -// [/RLVa:KB] enableAddLandmarkButton(LLLandmarkActions::hasParcelLandmark()); } void LLLocationInputCtrl::updateAddLandmarkTooltip() @@ -1040,9 +1015,6 @@ void LLLocationInputCtrl::updateContextMenu(){ { landmarkItem->setLabel(LLTrans::getString("EditLandmarkNavBarMenu")); } -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - landmarkItem->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); -// [/RLVa:KB] } } void LLLocationInputCtrl::updateWidgetlayout() @@ -1098,24 +1070,17 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata) } else if (item == "landmark") { -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); + + if(!landmark) { -// [/RLVa:KB] - LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); - - if(!landmark) - { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); - } - else - { - LLSideTray::getInstance()->showPanel("panel_places", - LLSD().with("type", "landmark").with("id",landmark->getUUID())); - } -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + } + else + { + LLSideTray::getInstance()->showPanel("panel_places", + LLSD().with("type", "landmark").with("id",landmark->getUUID())); } -// [/RLVa:KB] } else if (item == "cut") { diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 8c70b1e973..c8fd1e1d9a 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -26,13 +26,18 @@ #include "llviewerprecompiledheaders.h" +#include "lllogchat.h" + +// viewer includes #include "llagent.h" #include "llagentui.h" -#include "lllogchat.h" #include "lltrans.h" #include "llviewercontrol.h" +// library includes +#include "llchat.h" #include "llinstantmessage.h" +#include "llsdserialize.h" #include "llsingleton.h" // for LLSingleton #include @@ -60,6 +65,7 @@ const std::string IM_TIME("time"); const std::string IM_TEXT("message"); const std::string IM_FROM("from"); const std::string IM_FROM_ID("from_id"); +const std::string IM_SOURCE_TYPE("source_type"); const static std::string IM_SEPARATOR(": "); const static std::string NEW_LINE("\n"); @@ -87,7 +93,7 @@ const static boost::regex TIMESTAMP_AND_STUFF("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+ * Regular expression suitable to match names like * "You", "Second Life", "Igor ProductEngine", "Object", "Mega House" */ -const static boost::regex NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)"); +const static boost::regex NAME_AND_TEXT("(You:|Second Life:|[^\\s:]+\\s*[:]{1}|\\S+\\s+[^\\s:]+[:]{1})?(\\s*)(.*)"); //is used to parse complex object names like "Xstreet SL Terminal v2.2.5 st" const static std::string NAME_TEXT_DIVIDER(": "); @@ -184,7 +190,8 @@ std::string LLLogChat::makeLogFileName(std::string filename) { filename = cleanFileName(filename); filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename); - filename += ".txt"; + // new files are llsd notation format + filename += ".llsd"; return filename; } @@ -233,6 +240,18 @@ void LLLogChat::saveHistory(const std::string& filename, const std::string& from, const LLUUID& from_id, const std::string& line) +{ + LLChat chat; + chat.mText = line; + chat.mFromName = from; + chat.mFromID = from_id; + // default to being from an agent + chat.mSourceType = CHAT_SOURCE_AGENT; + saveHistory(filename, chat); +} + +//static +void LLLogChat::saveHistory(const std::string& filename, const LLChat& chat) { std::string tmp_filename = filename; LLStringUtil::trim(tmp_filename); @@ -254,89 +273,27 @@ void LLLogChat::saveHistory(const std::string& filename, LLSD item; if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) - item["time"] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")); + item[IM_TIME] = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")); - item["from_id"] = from_id; - item["message"] = line; + item[IM_FROM_ID] = chat.mFromID; + item[IM_TEXT] = chat.mText; + item[IM_SOURCE_TYPE] = chat.mSourceType; //adding "Second Life:" for all system messages to make chat log history parsing more reliable - if (from.empty() && from_id.isNull()) + if (chat.mFromName.empty() && chat.mFromID.isNull()) { - item["from"] = SYSTEM_FROM; + item[IM_FROM] = SYSTEM_FROM; } else { - item["from"] = from; + item[IM_FROM] = chat.mFromName; } - file << LLChatLogFormatter(item) << std::endl; + file << LLSDOStreamer(item) << std::endl; file.close(); } -void LLLogChat::loadHistory(const std::string& filename, void (*callback)(ELogLineType, const LLSD&, void*), void* userdata) -{ - if(!filename.size()) - { - llwarns << "Filename is Empty!" << llendl; - return ; - } - - LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ - if (!fptr) - { - callback(LOG_EMPTY, LLSD(), userdata); - return; //No previous conversation with this name. - } - else - { - char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ - char *bptr; - S32 len; - bool firstline=TRUE; - - if ( fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END) ) - { //File is smaller than recall size. Get it all. - firstline = FALSE; - if ( fseek(fptr, 0, SEEK_SET) ) - { - fclose(fptr); - return; - } - } - - while ( fgets(buffer, LOG_RECALL_SIZE, fptr) && !feof(fptr) ) - { - len = strlen(buffer) - 1; /*Flawfinder: ignore*/ - for ( bptr = (buffer + len); (*bptr == '\n' || *bptr == '\r') && bptr>buffer; bptr--) *bptr='\0'; - - if (!firstline) - { - LLSD item; - std::string line(buffer); - std::istringstream iss(line); - - if (!LLChatLogParser::parse(line, item)) - { - item["message"] = line; - callback(LOG_LINE, item, userdata); - } - else - { - callback(LOG_LLSD, item, userdata); - } - } - else - { - firstline = FALSE; - } - } - callback(LOG_END, LLSD(), userdata); - - fclose(fptr); - } -} - void append_to_last_message(std::list& messages, const std::string& line) { if (!messages.size()) return; @@ -410,53 +367,25 @@ void LLLogChat::loadAllHistory(const std::string& file_name, std::list& me fclose(fptr); } -//*TODO mark object's names in a special way so that they will be distinguishable form avatar name -//which are more strict by its nature (only firstname and secondname) -//Example, an object's name can be writen like "Object " -void LLChatLogFormatter::format(const LLSD& im, std::ostream& ostr) const -{ - if (!im.isMap()) - { - llwarning("invalid LLSD type of an instant message", 0); - return; - } - - if (im[IM_TIME].isDefined()) -{ - std::string timestamp = im[IM_TIME].asString(); - boost::trim(timestamp); - ostr << '[' << timestamp << ']' << TWO_SPACES; - } - - //*TODO mark object's names in a special way so that they will be distinguishable form avatar name - //which are more strict by its nature (only firstname and secondname) - //Example, an object's name can be writen like "Object " - if (im[IM_FROM].isDefined()) - { - std::string from = im[IM_FROM].asString(); - boost::trim(from); - if (from.size()) - { - ostr << from << IM_SEPARATOR; - } - } - - if (im[IM_TEXT].isDefined()) - { - std::string im_text = im[IM_TEXT].asString(); - - //multilined text will be saved with prepended spaces - boost::replace_all(im_text, NEW_LINE, NEW_LINE_SPACE_PREFIX); - ostr << im_text; - } - } - -bool LLChatLogParser::parse(std::string& raw, LLSD& im) +// static +bool LLChatLogParser::parse(const std::string& raw, LLSD& im) { if (!raw.length()) return false; im = LLSD::emptyMap(); + // In Viewer 2.1 we added UUID to chat/IM logging so we can look up + // display names + if (raw[0] == '{') + { + // ...this is a viewer 2.1, new-style LLSD notation format log + std::istringstream raw_stream(raw); + LLPointer parser = new LLSDNotationParser(); + S32 count = parser->parse(raw_stream, im, raw.length()); + // expect several map items per parsed line + return (count != LLSDParser::PARSE_FAILURE); + } + //matching a timestamp boost::match_results matches; if (!boost::regex_match(raw, matches, TIMESTAMP_AND_STUFF)) return false; diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 6958d56311..8b1cc3484f 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -41,48 +41,21 @@ public: }; static std::string timestamp(bool withdate = false); static std::string makeLogFileName(std::string(filename)); + + // Log a single line item to the appropriate chat file + static void saveHistory(const std::string& filename, const LLChat& chat); + + // Prefer the above version - it saves more metadata about the item static void saveHistory(const std::string& filename, const std::string& from, const LLUUID& from_id, const std::string& line); - /** @deprecated @see loadAllHistory() */ - static void loadHistory(const std::string& filename, - void (*callback)(ELogLineType, const LLSD&, void*), - void* userdata); - static void loadAllHistory(const std::string& file_name, std::list& messages); private: static std::string cleanFileName(std::string filename); }; -/** - * Formatter for the plain text chat log files - */ -class LLChatLogFormatter -{ -public: - LLChatLogFormatter(const LLSD& im) : mIM(im) {} - virtual ~LLChatLogFormatter() {}; - - friend std::ostream& operator<<(std::ostream& str, const LLChatLogFormatter& formatter) - { - formatter.format(formatter.mIM, str); - return str; - } - -protected: - - /** - * Format an instant message to a stream - * Timestamps and sender names are required - * New lines of multilined messages are prepended with a space - */ - void format(const LLSD& im, std::ostream& ostr) const; - - LLSD mIM; -}; - /** * Parser for the plain text chat log files */ @@ -101,7 +74,7 @@ public: * * @return false if failed to parse mandatory data - message text */ - static bool parse(std::string& raw, LLSD& im); + static bool parse(const std::string& raw, LLSD& im); protected: LLChatLogParser(); @@ -113,5 +86,6 @@ extern const std::string IM_TIME; //("time"); extern const std::string IM_TEXT; //("message"); extern const std::string IM_FROM; //("from"); extern const std::string IM_FROM_ID; //("from_id"); +extern const std::string IM_SOURCE_TYPE; //("source_type"); #endif diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 4dd90f0794..5eb3b789f2 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -60,9 +60,6 @@ #include "llworld.h" #include "llui.h" #include "pipeline.h" -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index da3318c91a..6658e1d7e8 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -50,9 +50,6 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "lltooltip.h" -// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] // // Constants @@ -713,14 +710,10 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() void LLPanelStandStopFlying::onStandButtonClick() { -// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Added: RLVa-1.2.0a - if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) ) - { - LLFirstUse::sit(false); - LLSelectMgr::getInstance()->deselectAllForStandingUp(); - gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - } -// [/RLVa:KB] + LLFirstUse::sit(false); + + LLSelectMgr::getInstance()->deselectAllForStandingUp(); + gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once. diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 180695e40b..f16cc4cef4 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -46,8 +46,6 @@ #include "llchathistory.h" #include "llstylemap.h" -#include "llavatarnamecache.h" - #include "lldraghandle.h" #include "llbottomtray.h" @@ -181,21 +179,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) if (gSavedPerAccountSettings.getBOOL("LogNearbyChat")) { - std::string from_name = chat.mFromName; - - if (chat.mSourceType == CHAT_SOURCE_AGENT) - { - // if the chat is coming from an agent, log the complete name - LLAvatarName av_name; - LLAvatarNameCache::get(chat.mFromID, &av_name); - - if (!av_name.mIsDisplayNameDefault) - { - from_name = av_name.getCompleteName(); - } - } - - LLLogChat::saveHistory("chat", from_name, chat.mFromID, chat.mText); + LLLogChat::saveHistory("chat", chat); } } @@ -264,23 +248,11 @@ void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) nearby_chat->updateChatHistoryStyle(); } -bool isWordsName(const std::string& name) +bool isTwoWordsName(const std::string& name) { - // checking to see if it's display name plus username in parentheses - S32 open_paren = name.find(" (", 0); - S32 close_paren = name.find(')', 0); - - if (open_paren != std::string::npos && - close_paren == name.length()-1) - { - return true; - } - else - { - //checking for a single space - S32 pos = name.find(' ', 0); - return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; - } + //checking for a single space + S32 pos = name.find(' ', 0); + return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; } void LLNearbyChat::loadHistory() @@ -303,10 +275,9 @@ void LLNearbyChat::loadHistory() from_id = msg[IM_FROM_ID].asUUID(); } else - { - std::string legacy_name = gCacheName->buildLegacyName(from); - gCacheName->getUUID(legacy_name, from_id); - } + { + gCacheName->getUUID(from, from_id); + } LLChat chat; chat.mFromName = from; @@ -315,15 +286,18 @@ void LLNearbyChat::loadHistory() chat.mTimeStr = msg[IM_TIME].asString(); chat.mChatStyle = CHAT_STYLE_HISTORY; - chat.mSourceType = CHAT_SOURCE_AGENT; - if (from_id.isNull() && SYSTEM_FROM == from) + if (msg.has(IM_SOURCE_TYPE)) + { + S32 source_type = msg[IM_SOURCE_TYPE].asInteger(); + chat.mSourceType = (EChatSourceType)source_type; + } + else if (from_id.isNull() && SYSTEM_FROM == from) { chat.mSourceType = CHAT_SOURCE_SYSTEM; - } else if (from_id.isNull()) { - chat.mSourceType = isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + chat.mSourceType = isTwoWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; } addMessage(chat, true, do_not_log); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 7908a1424c..932ad75f29 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -47,17 +47,11 @@ #include "llwindow.h" #include "llviewerwindow.h" #include "llrootview.h" -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) -#include "rlvhandler.h" -// [/RLVa:KB] S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; // legacy callback glue -//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a -void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); -// [/RLVa:KB] +void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); static LLDefaultChildRegistry::Register r("gesture_combo_list"); @@ -502,10 +496,7 @@ void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata) S32 length = raw_text.length(); -// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences -// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d - if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) ) -// [/RLVa:KB] + if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences { gAgent.startTyping(); } @@ -718,21 +709,6 @@ void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); } -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b - if ( (0 == channel) && (rlv_handler_t::isEnabled()) ) - { - // Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation) - if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) ) - type = CHAT_TYPE_WHISPER; - else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) ) - type = CHAT_TYPE_NORMAL; - else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) ) - type = CHAT_TYPE_NORMAL; - - animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE ); - } -// [/RLVa:KB] - // Don't animate for chats people can't hear (chat to scripts) if (animate && (channel == 0)) { @@ -863,57 +839,8 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe } } -//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a -void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel) -// [/RLVa:KB] +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-1.2.0a - // Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc) - if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) ) - { - if (0 == channel) - { - // (We already did this before, but LLChatHandler::handle() calls this directly) - if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) ) - type = CHAT_TYPE_WHISPER; - else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) ) - type = CHAT_TYPE_NORMAL; - else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) ) - type = CHAT_TYPE_NORMAL; - - // Redirect chat if needed - if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) && - (gRlvHandler.redirectChatOrEmote(utf8_out_text)) ) ) - { - return; - } - - // Filter public chat if sendchat restricted - if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) - gRlvHandler.filterChat(utf8_out_text, true); - } - else - { - // Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) ) - return; - - // Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers) - if (CHAT_CHANNEL_DEBUG == channel) - { - bool fIsEmote = RlvUtil::isEmote(utf8_out_text); - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) || - ((!fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))) || - ((fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE))) ) - { - return; - } - } - } - } -// [/RLVa:KB] - LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ChatFromViewer); msg->nextBlockFast(_PREHASH_AgentData); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 10bf4bd852..47d32e57fb 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -42,10 +42,6 @@ #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position -// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f) -#include "rlvhandler.h" -// [/RLVa:KB] - //add LLNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; @@ -68,18 +64,6 @@ public: LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) { mStopProcessing = false; - - LLControlVariable* ctrl = gSavedSettings.getControl("NearbyToastLifeTime").get(); - if (ctrl) - { - ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastsLifetime, this)); - } - - ctrl = gSavedSettings.getControl("NearbyToastFadingTime").get(); - if (ctrl) - { - ctrl->getSignal()->connect(boost::bind(&LLNearbyChatScreenChannel::updateToastFadingTime, this)); - } } void addNotification (LLSD& notification); @@ -125,26 +109,13 @@ protected: if (!toast) return; LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl; toast->setVisible(FALSE); - toast->stopFading(); + toast->stopTimer(); toast->setIsHidden(true); - - // Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that - // they can be used next time, this is done for performance. But if the toast lifetime was changed - // (from preferences floater (STORY-36)) while it was shown (at this moment toast isn't in the pool yet) - // changes don't take affect. - // So toast's lifetime should be updated each time it's added to the pool. Otherwise viewer would have - // to be restarted so that changes take effect. - toast->setLifetime(gSavedSettings.getS32("NearbyToastLifeTime")); - toast->setFadingTime(gSavedSettings.getS32("NearbyToastFadingTime")); m_toast_pool.push_back(toast->getHandle()); } void createOverflowToast(S32 bottom, F32 timer); - void updateToastsLifetime(); - - void updateToastFadingTime(); - create_toast_panel_callback_t m_create_toast_panel_callback_t; bool createPoolToast(); @@ -234,27 +205,6 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast) arrangeToasts(); } -void LLNearbyChatScreenChannel::updateToastsLifetime() -{ - S32 seconds = gSavedSettings.getS32("NearbyToastLifeTime"); - toast_list_t::iterator it; - - for(it = m_toast_pool.begin(); it != m_toast_pool.end(); ++it) - { - (*it).get()->setLifetime(seconds); - } -} - -void LLNearbyChatScreenChannel::updateToastFadingTime() -{ - S32 seconds = gSavedSettings.getS32("NearbyToastFadingTime"); - toast_list_t::iterator it; - - for(it = m_toast_pool.begin(); it != m_toast_pool.end(); ++it) - { - (*it).get()->setFadingTime(seconds); - } -} bool LLNearbyChatScreenChannel::createPoolToast() { @@ -300,7 +250,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) { panel->addMessage(notification); toast->reshapeToPanel(); - toast->startFading(); + toast->resetTimer(); arrangeToasts(); return; @@ -345,7 +295,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) panel->init(notification); toast->reshapeToPanel(); - toast->startFading(); + toast->resetTimer(); m_active_toasts.push_back(toast->getHandle()); @@ -375,9 +325,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() int sort_toasts_predicate(LLHandle first, LLHandle second) { - F32 v1 = first.get()->getTimeLeftToLive(); - F32 v2 = second.get()->getTimeLeftToLive(); - return v1 > v2; + F32 v1 = first.get()->getTimer()->getEventTimer().getElapsedTimeF32(); + F32 v2 = second.get()->getTimer()->getEventTimer().getElapsedTimeF32(); + return v1 < v2; } void LLNearbyChatScreenChannel::showToastsBottom() @@ -481,31 +431,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) LLChat& tmp_chat = const_cast(chat_msg); -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - if (rlv_handler_t::isEnabled()) - { - // NOTE-RLVa: we can only filter the *message* here since most everything else will already be part of "args" as well - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) ) - { - RlvUtil::filterLocation(tmp_chat.mText); - tmp_chat.mRlvLocFiltered = TRUE; - } - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) ) - { - RlvUtil::filterNames(tmp_chat.mText); - tmp_chat.mRlvNamesFiltered = TRUE; - } - } - - // if(chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull()) - // [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - if ( (chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) - LLRecentPeople::instance().add(chat_msg.mFromID); - // [/RLVa:KB] - - -// [/RLVa:KB] - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); { //sometimes its usefull to have no name at all... @@ -592,10 +517,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) notification["source"] = (S32)chat_msg.mSourceType; notification["chat_type"] = (S32)chat_msg.mChatType; notification["chat_style"] = (S32)chat_msg.mChatStyle; -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - if (rlv_handler_t::isEnabled()) - notification["show_icon_tooltip"] = !chat_msg.mRlvNamesFiltered; -// [/RLVa:KB] std::string r_color_name = "White"; F32 r_color_alpha = 1.0f; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 62086f0d27..f084002385 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -59,9 +59,6 @@ #include "llviewerwindow.h" #include "llworld.h" #include "llworldmapview.h" // shared draw code -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) -#include "rlvhandler.h" -// [/RLVa:KB] static LLDefaultChildRegistry::Register r1("net_map"); @@ -358,11 +355,7 @@ void LLNetMap::draw() BOOL show_as_friend = FALSE; if( i < regionp->mMapAvatarIDs.count()) { -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL) && - (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); -// [/RLVa:KB] -// show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL); + show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(regionp->mMapAvatarIDs.get(i)) != NULL); } LLWorldMapView::drawAvatar( pos_map.mV[VX], pos_map.mV[VY], @@ -575,20 +568,14 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) { return FALSE; } - - // - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - return FALSE; - } - // - + // If the cursor is near an avatar on the minimap, a mini-inspector will be // shown for the avatar, instead of the normal map tooltip. if (handleToolTipAgent(mClosestAgentToCursor)) { return TRUE; } + LLRect sticky_rect; std::string region_name; LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) ); @@ -599,24 +586,24 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) localPointToScreen(x - SLOP, y - SLOP, &(sticky_rect.mLeft), &(sticky_rect.mBottom)); sticky_rect.mRight = sticky_rect.mLeft + 2 * SLOP; sticky_rect.mTop = sticky_rect.mBottom + 2 * SLOP; - + region_name = region->getName(); if (!region_name.empty()) { region_name += "\n"; } } - + LLStringUtil::format_map_t args; args["[REGION]"] = region_name; std::string msg = mToolTipMsg; LLStringUtil::format(msg, args); - + LLToolTipMgr::instance().show(LLToolTip::Params() - .message(msg) - .sticky_rect(sticky_rect)); - - return TRUE; + .message(msg) + .sticky_rect(sticky_rect)); + + return TRUE; } BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id) diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index e053b1c177..650bce0da4 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -38,7 +38,6 @@ class LLColor4U; class LLCoordGL; class LLImageRaw; class LLViewerTexture; -class LLFloaterMap; class LLNetMap : public LLUICtrl { @@ -56,7 +55,6 @@ public: protected: LLNetMap (const Params & p); friend class LLUICtrlFactory; - friend class LLFloaterMap; public: virtual ~LLNetMap(); diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index bbd7a6484a..68fd65be0f 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -100,13 +100,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) notification->setReusable(LLHandlerUtil::isNotificationReusable(notification)); LLUUID session_id; -// if (LLHandlerUtil::canSpawnIMSession(notification)) -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // Don't spawn a new IM session for inventory offers if this notification was subject to @shownames=n - // RELEASE-RLVa: [SL-2.0.1] Test on every new release to make sure the notification gets routed the way we want it to be - bool fSpawnIM = (LLHandlerUtil::canSpawnIMSession(notification)) && (!notification->getPayload().has("rlv_shownames")); - if (fSpawnIM) -// [/RLVa:KB] + if (LLHandlerUtil::canSpawnIMSession(notification)) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); @@ -116,12 +110,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } bool show_toast = LLHandlerUtil::canSpawnToast(notification); -// bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification); -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // NOTE: add_notid_to_im needs to be FALSE if we suppressed spawning an IM because in that case the notification needs to - // be routed to the "syswell" or the inventory offer floater will dissapear and the user won't be able to accept it - bool add_notid_to_im = (fSpawnIM) && (LLHandlerUtil::canAddNotifPanelToIM(notification)); -// [/RLVa:KB] + bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification); if (add_notid_to_im) { LLHandlerUtil::addNotifPanelToIM(notification); @@ -160,15 +149,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if (LLHandlerUtil::canLogToIM(notification)) { // log only to file if notif panel can be embedded to IM and IM is opened -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - if (notification->getPayload().has("rlv_shownames")) - { - // Log to chat history if this notification was subject to @shownames=n - LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); - } - else if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification)) -// [/RLVa:KB] -// if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification)) + if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification)) { LLHandlerUtil::logToIMP2P(notification, true); } @@ -189,25 +170,8 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { -// if (LLHandlerUtil::canAddNotifPanelToIM(notification) -// && !LLHandlerUtil::isIMFloaterOpened(notification)) -// [SL:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // Repro: - // 1) have someone drop you 2 inventory items (new IM session will be spawned) - // 2) accept/decline the inventory offers as they come in - // -> unread IM counter shows 0 - // 3) toggle "Enable plain text chat history" while the IM session with the inventory offers isn't the active session - // -> unread IM counter shows -2 - // -> LLHandlerUtil::decIMMesageCounter() really should be fixed to check for "0" before decreasing the count but - // there are enough bugfixes in RLVa as it is already :( - // Fix: - // - the one and only time we need to decrease the unread IM count is when we've clicked any of the buttons on the *toast* - // - since LLIMFloater::updateMessages() hides the toast when we open the IM (which resets the unread count to 0) we should - // *only* decrease the unread IM count if there's a visible toast since the unread count will be at 0 otherwise anyway - LLScreenChannel* pChannel = dynamic_cast(mChannel); - LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL; - if ( (pToast) && (!pToast->getCanBeStored()) ) -// [/SL:KB] + if (LLHandlerUtil::canAddNotifPanelToIM(notification) + && !LLHandlerUtil::isIMFloaterOpened(notification)) { LLHandlerUtil::decIMMesageCounter(notification); } @@ -222,11 +186,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) void LLOfferHandler::onDeleteToast(LLToast* toast) { -// if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification())) -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // BUGFIX: LLHandlerUtil::canAddNotifPanelToIM() won't necessarily tell us whether the notification went into an IM or to the syswell - if (toast->getCanBeStored()) -// [/RLVa:KB] + if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification())) { // send a signal to the counter manager mDelNotificationSignal(); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 6435126fc0..db9d386b6b 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -38,11 +38,9 @@ #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "lllistcontextmenu.h" -#include "llmenubutton.h" #include "llnotificationsutil.h" #include "lloutfitobserver.h" #include "llsidetray.h" -#include "lltoggleablemenu.h" #include "lltransutil.h" #include "llviewermenu.h" #include "llvoavatar.h" @@ -115,7 +113,7 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); - registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList)); + registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); @@ -123,11 +121,23 @@ public: enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenu::onEnable, this, _2)); enable_registrar.add("Gear.OnVisible", boost::bind(&LLOutfitListGearMenu::onVisible, this, _2)); - mMenu = LLUICtrlFactory::getInstance()->createFromFile( + mMenu = LLUICtrlFactory::getInstance()->createFromFile( "menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); llassert(mMenu); } + void show(LLView* spawning_view) + { + if (!mMenu) return; + + updateItemsVisibility(); + mMenu->buildDrawLabels(); + mMenu->updateParent(LLMenuGL::sMenuContainer); + S32 menu_x = 0; + S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight(); + LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y); + } + void updateItemsVisibility() { if (!mMenu) return; @@ -138,8 +148,6 @@ public: mMenu->arrangeAndClear(); // update menu height } - LLToggleableMenu* getMenu() { return mMenu; } - private: const LLUUID& getSelectedOutfitID() { @@ -197,6 +205,15 @@ private: } } + void onDelete() + { + const LLUUID& selected_outfit_id = getSelectedOutfitID(); + if (selected_outfit_id.notNull()) + { + remove_category(&gInventory, selected_outfit_id); + } + } + void onCreate(const LLSD& data) { LLWearableType::EType type = LLWearableType::typeNameToType(data.asString()); @@ -243,20 +260,14 @@ private: return true; } - LLOutfitsList* mOutfitList; - LLToggleableMenu* mMenu; + LLOutfitsList* mOutfitList; + LLMenuGL* mMenu; }; ////////////////////////////////////////////////////////////////////////// class LLOutfitContextMenu : public LLListContextMenu { -public: - - LLOutfitContextMenu(LLOutfitsList* outfit_list) - : LLListContextMenu(), - mOutfitList(outfit_list) - {} protected: /* virtual */ LLContextMenu* createMenu() { @@ -272,7 +283,7 @@ protected: boost::bind(&LLAppearanceMgr::takeOffOutfit, &LLAppearanceMgr::instance(), selected_id)); registrar.add("Outfit.Edit", boost::bind(editOutfit)); registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id)); - registrar.add("Outfit.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList)); + registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id)); enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2)); enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2)); @@ -335,8 +346,10 @@ protected: LLAppearanceMgr::instance().renameOutfit(outfit_cat_id); } -private: - LLOutfitsList* mOutfitList; + static void deleteOutfit(const LLUUID& outfit_cat_id) + { + remove_category(&gInventory, outfit_cat_id); + } }; ////////////////////////////////////////////////////////////////////////// @@ -353,7 +366,7 @@ LLOutfitsList::LLOutfitsList() mCategoriesObserver = new LLInventoryCategoriesObserver(); mGearMenu = new LLOutfitListGearMenu(this); - mOutfitMenu = new LLOutfitContextMenu(this); + mOutfitMenu = new LLOutfitContextMenu(); } LLOutfitsList::~LLOutfitsList() @@ -373,11 +386,6 @@ BOOL LLOutfitsList::postBuild() mAccordion = getChild("outfits_accordion"); mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); - LLMenuButton* menu_gear_btn = getChild("options_gear_btn"); - - menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenu::updateItemsVisibility, mGearMenu)); - menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; } @@ -630,14 +638,6 @@ void LLOutfitsList::performAction(std::string action) void LLOutfitsList::removeSelected() { - LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLOutfitsList::onOutfitsRemovalConfirmation, this, _1, _2)); -} - -void LLOutfitsList::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) return; // canceled - if (mSelectedOutfitUUID.notNull()) { remove_category(&gInventory, mSelectedOutfitUUID); @@ -727,6 +727,13 @@ bool LLOutfitsList::isActionEnabled(const LLSD& userdata) return false; } +// virtual +void LLOutfitsList::showGearMenu(LLView* spawning_view) +{ + if (!mGearMenu) return; + mGearMenu->show(spawning_view); +} + void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const { // Collect selected items from all selected lists. diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index a0598737f1..f73ae5bef2 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -94,6 +94,8 @@ public: /*virtual*/ bool isActionEnabled(const LLSD& userdata); + /*virtual*/ void showGearMenu(LLView* spawning_view); + const LLUUID& getSelectedOutfitUUID() const { return mSelectedOutfitUUID; } /*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; @@ -110,8 +112,6 @@ public: private: - void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); - /** * Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference */ diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index f79ec6432d..c2bbec0470 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -297,13 +297,6 @@ void LLOverlayBar::onClickMouselook(void*) //static void LLOverlayBar::onClickStandUp(void*) { -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) - { - return; - } -// [/RLVa:KB] - LLSelectMgr::getInstance()->deselectAllForStandingUp(); gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); } diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h index 2ed6b00497..81366c5db4 100644 --- a/indra/newview/llpanelappearancetab.h +++ b/indra/newview/llpanelappearancetab.h @@ -39,6 +39,8 @@ public: virtual bool isActionEnabled(const LLSD& userdata) = 0; + virtual void showGearMenu(LLView* spawning_view) = 0; + virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {} static const std::string& getFilterSubString() { return sFilterSubString; } diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 290d76333a..bf3bf38863 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -59,9 +59,6 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llworld.h" -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] // // Imported globals @@ -123,25 +120,6 @@ void LLPanelContents::getState(LLViewerObject *objectp ) && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a - if ( (rlv_handler_t::isEnabled()) && (editable) ) - { - // Don't allow creation of new scripts if it's non-detachable - if (objectp->isAttachment()) - editable = !gRlvAttachmentLocks.isLockedAttachment(objectp->getRootEdit()); - - // Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection - if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) - { - // Only check the first (non-)root object because nothing else would result in enabling the button (see below) - LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE); - - editable = - (pObj) && (isAgentAvatarValid()) && ((!gAgentAvatarp->isSitting()) || (gAgentAvatarp->getRoot() != pObj->getRootEdit())); - } - } -// [/RLVa:KB] - // Edit script button - ok if object is editable and there's an unambiguous destination for the object. getChildView("button new script")->setEnabled( editable && @@ -176,21 +154,6 @@ void LLPanelContents::onClickNewScript(void *userdata) LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); if(object) { -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a - if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()] - { - if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) - { - return; // Disallow creating new scripts in a locked attachment - } - else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) - { - if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) ) - return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n - } - } -// [/RLVa:KB] - LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); perm.initMasks( diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index ec340dc258..80df420a4e 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -692,8 +692,7 @@ void LLPanelGroupGeneral::updateMembers() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!mListVisibleMembers || !gdatap - || !gdatap->isMemberDataComplete() - || gdatap->mMembers.empty()) + || !gdatap->isMemberDataComplete()) { return; } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index d1362d7922..35f898bfa6 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -49,7 +49,6 @@ #include "llviewertexturelist.h" #include "llviewerwindow.h" #include "llfocusmgr.h" -#include "llviewercontrol.h" #include "roles_constants.h" @@ -743,12 +742,10 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mHasMatch(FALSE), mNumOwnerAdditions(0) { - mUdpateSessionID = LLUUID::null; } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); } BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) @@ -775,17 +772,6 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) // Show the member's profile on double click. mMembersList->setDoubleClickCallback(onMemberDoubleClick, this); mMembersList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); - - LLSD row; - row["columns"][0]["column"] = "name"; - row["columns"][1]["column"] = "donated"; - row["columns"][2]["column"] = "online"; - mMembersList->addElement(row); - std::string order_by = gSavedSettings.getString("GroupMembersSortOrder"); - if(!order_by.empty()) - { - mMembersList->sortByColumn(order_by, TRUE); - } LLButton* button = parent->getChild("member_invite", recurse); if ( button ) @@ -1543,10 +1529,6 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) mMemberProgress = gdatap->mMembers.begin(); mPendingMemberUpdate = TRUE; mHasMatch = FALSE; - // Generate unique ID for current updateMembers()- see onNameCache for details. - // Using unique UUID is perhaps an overkill but this way we are perfectly safe - // from coincidences. - mUdpateSessionID.generate(); } else { @@ -1574,63 +1556,6 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) } } -void LLPanelGroupMembersSubTab::addMemberToList(LLUUID id, LLGroupMemberData* data) -{ - if (!data) return; - LLUIString donated = getString("donation_area"); - donated.setArg("[AREA]", llformat("%d", data->getContribution())); - - LLSD row; - row["id"] = id; - - row["columns"][0]["column"] = "name"; - // value is filled in by name list control - - row["columns"][1]["column"] = "donated"; - row["columns"][1]["value"] = donated.getString(); - - row["columns"][2]["column"] = "online"; - row["columns"][2]["value"] = data->getOnlineStatus(); - row["columns"][2]["font"] = "SANSSERIF_SMALL"; - - mMembersList->addElement(row); - - mHasMatch = TRUE; -} - -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, const LLUUID& id) -{ - // Update ID is used to determine whether member whose id is passed - // into onNameCache() was passed after current or previous user-initiated update. - // This is needed to avoid probable duplication of members in list after changing filter - // or adding of members of another group if gets for their names were called on - // previous update. If this id is from get() called from older update, - // we do nothing. - if (mUdpateSessionID != update_id) return; - - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); - if (!gdatap) - { - llwarns << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << llendl; - return; - } - - std::string fullname; - gCacheName->getFullName(id, fullname); - - LLGroupMemberData* data; - // trying to avoid unnecessary hash lookups - if (matchesSearchFilter(fullname) && ((data = gdatap->mMembers[id]) != NULL)) - { - addMemberToList(id, data); - if(!mMembersList->getEnabled()) - { - mMembersList->setEnabled(TRUE); - } - } - -} - void LLPanelGroupMembersSubTab::updateMembers() { mPendingMemberUpdate = FALSE; @@ -1655,13 +1580,12 @@ void LLPanelGroupMembersSubTab::updateMembers() //cleanup list only for first iretation if(mMemberProgress == gdatap->mMembers.begin()) - { mMembersList->deleteAllItems(); - } LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end(); - + LLUIString donated = getString("donation_area"); + S32 i = 0; for( ; mMemberProgress != end && isecond) continue; // Do filtering on name if it is already in the cache. + bool add_member = true; + std::string fullname; if (gCacheName->getFullName(mMemberProgress->first, fullname)) { - if (matchesSearchFilter(fullname)) + if ( !matchesSearchFilter(fullname) ) { - addMemberToList(mMemberProgress->first, mMemberProgress->second); + add_member = false; } } - else + + if (add_member) { - // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - gCacheName->get(mMemberProgress->first, FALSE, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, - this, mUdpateSessionID, _1)); + donated.setArg("[AREA]", llformat("%d", mMemberProgress->second->getContribution())); + + LLSD row; + row["id"] = (*mMemberProgress).first; + + row["columns"][0]["column"] = "name"; + // value is filled in by name list control + + row["columns"][1]["column"] = "donated"; + row["columns"][1]["value"] = donated.getString(); + + row["columns"][2]["column"] = "online"; + row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus(); + row["columns"][2]["font"] = "SANSSERIF_SMALL"; + + LLScrollListItem* member = mMembersList->addElement(row); + + LLUUID id = member->getUUID(); + mHasMatch = TRUE; } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 270259c16f..6a773f1ebb 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -187,9 +187,6 @@ public: virtual void setGroupID(const LLUUID& id); - void addMemberToList(LLUUID id, LLGroupMemberData* data); - void onNameCache(const LLUUID& update_id, const LLUUID& id); - protected: typedef std::map role_change_data_map_t; typedef std::map member_role_changes_map_t; @@ -210,9 +207,6 @@ protected: BOOL mPendingMemberUpdate; BOOL mHasMatch; - // This id is generated after each user initiated member list update(opening Roles or changing filter) - LLUUID mUdpateSessionID; - member_role_changes_map_t mMemberRoleChangeData; U32 mNumOwnerAdditions; diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index 70ea290500..04c1a86f69 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -44,10 +44,6 @@ #include "lluictrlfactory.h" -// [RLVa:KB] -#include "rlvhandler.h" -// [/RLVa:KB] - LLPanelLandSelectObserver* LLPanelLandInfo::sObserver = NULL; LLPanelLandInfo* LLPanelLandInfo::sInstance = NULL; @@ -228,14 +224,6 @@ void LLPanelLandInfo::refresh() //static void LLPanelLandInfo::onClickClaim() { -// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) -/* - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { - return; - } -*/ -// [/RLVa:KB] LLViewerParcelMgr::getInstance()->startBuyLand(); } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index d25b8e0e02..c4a484d368 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -47,11 +47,9 @@ #include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "lllandmarkactions.h" -#include "llmenubutton.h" #include "llplacesinventorybridge.h" #include "llplacesinventorypanel.h" #include "llsidetray.h" -#include "lltoggleablemenu.h" #include "llviewermenu.h" #include "llviewerregion.h" @@ -193,7 +191,6 @@ LLLandmarksPanel::LLLandmarksPanel() , mLibraryInventoryPanel(NULL) , mCurrentSelectedList(NULL) , mListCommands(NULL) - , mGearButton(NULL) , mGearFolderMenu(NULL) , mGearLandmarkMenu(NULL) { @@ -688,9 +685,7 @@ void LLLandmarksPanel::initListCommandsHandlers() { mListCommands = getChild("bottom_panel"); - mGearButton = getChild(OPTIONS_BUTTON_NAME); - mGearButton->setMouseDownCallback(boost::bind(&LLLandmarksPanel::onActionsButtonClick, this)); - + mListCommands->childSetAction(OPTIONS_BUTTON_NAME, boost::bind(&LLLandmarksPanel::onActionsButtonClick, this)); mListCommands->childSetAction(TRASH_BUTTON_NAME, boost::bind(&LLLandmarksPanel::onTrashButtonClick, this)); LLDragAndDropButton* trash_btn = mListCommands->getChild(TRASH_BUTTON_NAME); @@ -707,8 +702,8 @@ void LLLandmarksPanel::initListCommandsHandlers() mCommitCallbackRegistrar.add("Places.LandmarksGear.Folding.Action", boost::bind(&LLLandmarksPanel::onFoldingAction, this, _2)); mEnableCallbackRegistrar.add("Places.LandmarksGear.Check", boost::bind(&LLLandmarksPanel::isActionChecked, this, _2)); mEnableCallbackRegistrar.add("Places.LandmarksGear.Enable", boost::bind(&LLLandmarksPanel::isActionEnabled, this, _2)); - mGearLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_places_gear_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mGearLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_places_gear_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_place_add_button.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mListCommands->childSetAction(ADD_BUTTON_NAME, boost::bind(&LLLandmarksPanel::showActionMenu, this, mMenuAdd, ADD_BUTTON_NAME)); @@ -727,7 +722,7 @@ void LLLandmarksPanel::updateListCommands() void LLLandmarksPanel::onActionsButtonClick() { - LLToggleableMenu* menu = mGearFolderMenu; + LLMenuGL* menu = mGearFolderMenu; LLFolderViewItem* cur_item = NULL; if(mCurrentSelectedList) @@ -746,7 +741,7 @@ void LLLandmarksPanel::onActionsButtonClick() } } - mGearButton->setMenu(menu); + showActionMenu(menu,OPTIONS_BUTTON_NAME); } void LLLandmarksPanel::showActionMenu(LLMenuGL* menu, std::string spawning_view_name) @@ -755,10 +750,7 @@ void LLLandmarksPanel::showActionMenu(LLMenuGL* menu, std::string spawning_view_ { menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); - menu->arrangeAndClear(); - - LLView* spawning_view = getChild(spawning_view_name); - + LLView* spawning_view = getChild (spawning_view_name); S32 menu_x, menu_y; //show menu in co-ordinates of panel spawning_view->localPointToOtherView(0, spawning_view->getRect().getHeight(), &menu_x, &menu_y, this); diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 8dcbca0440..0d4402d8cb 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -39,9 +39,7 @@ class LLAccordionCtrlTab; class LLFolderViewItem; -class LLMenuButton; class LLMenuGL; -class LLToggleableMenu; class LLInventoryPanel; class LLPlacesInventoryPanel; @@ -157,9 +155,8 @@ private: LLPlacesInventoryPanel* mLandmarksInventoryPanel; LLPlacesInventoryPanel* mMyInventoryPanel; LLPlacesInventoryPanel* mLibraryInventoryPanel; - LLMenuButton* mGearButton; - LLToggleableMenu* mGearLandmarkMenu; - LLToggleableMenu* mGearFolderMenu; + LLMenuGL* mGearLandmarkMenu; + LLMenuGL* mGearFolderMenu; LLMenuGL* mMenuAdd; LLPlacesInventoryPanel* mCurrentSelectedList; LLInventoryObserver* mInventoryObserver; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 904e3dabcc..5b07e4863b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -39,14 +39,12 @@ #include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" -#include "llmenubutton.h" #include "lloutfitobserver.h" #include "llpreviewtexture.h" #include "llresmgr.h" #include "llscrollcontainer.h" #include "llsdserialize.h" #include "llspinctrl.h" -#include "lltoggleablemenu.h" #include "lltooldraganddrop.h" #include "llviewermenu.h" #include "llviewertexturelist.h" @@ -194,8 +192,6 @@ BOOL LLPanelMainInventory::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterEdit, this, _2)); } - mGearMenuButton = getChild("options_gear_btn"); - initListCommandsHandlers(); // *TODO:Get the cost info from the server @@ -904,6 +900,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) void LLPanelMainInventory::initListCommandsHandlers() { + childSetAction("options_gear_btn", boost::bind(&LLPanelMainInventory::onGearButtonClick, this)); childSetAction("trash_btn", boost::bind(&LLPanelMainInventory::onTrashButtonClick, this)); childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this)); @@ -916,8 +913,7 @@ void LLPanelMainInventory::initListCommandsHandlers() mCommitCallbackRegistrar.add("Inventory.GearDefault.Custom.Action", boost::bind(&LLPanelMainInventory::onCustomAction, this, _2)); mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); - mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGearMenuButton->setMenu(mMenuGearDefault); + mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); // Update the trash button when selected item(s) get worn or taken off. @@ -931,6 +927,11 @@ void LLPanelMainInventory::updateListCommands() mTrashButton->setEnabled(trash_enabled); } +void LLPanelMainInventory::onGearButtonClick() +{ + showActionMenu(mMenuGearDefault,"options_gear_btn"); +} + void LLPanelMainInventory::onAddButtonClick() { setUploadCostIfNeeded(); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index d136e2d32e..cf2cc14531 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -40,9 +40,7 @@ class LLSaveFolderState; class LLFilterEditor; class LLTabContainer; class LLFloaterInventoryFinder; -class LLMenuButton; class LLMenuGL; -class LLToggleableMenu; class LLFloater; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -131,6 +129,7 @@ private: protected: void initListCommandsHandlers(); void updateListCommands(); + void onGearButtonClick(); void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onTrashButtonClick(); @@ -144,9 +143,8 @@ protected: void setUploadCostIfNeeded(); private: LLDragAndDropButton* mTrashButton; - LLToggleableMenu* mMenuGearDefault; + LLMenuGL* mMenuGearDefault; LLMenuGL* mMenuAdd; - LLMenuButton* mGearMenuButton; bool mNeedUploadCost; // List Commands // diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 5d80f9fcc8..d756a1b931 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -68,9 +68,6 @@ #include "llviewercontrol.h" #include "lluictrlfactory.h" //#include "llfirstuse.h" -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] #include "lldrawpool.h" @@ -386,14 +383,6 @@ void LLPanelObject::getState( ) enable_rotate = FALSE; } -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) - { - if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == objectp->getRootEdit()) ) - enable_move = enable_scale = enable_rotate = FALSE; - } -// [/RLVa:KB] - LLVector3 vec; if (enable_move) { diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index efa15300fd..211b9cf4b1 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -63,10 +63,7 @@ #include "llviewerregion.h" #include "llviewerobjectlist.h" #include "llviewermessage.h" -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) -#include "rlvhandler.h" -#include "rlvui.h" -// [/RLVa:KB] + ///---------------------------------------------------------------------------- /// Class LLTaskInvFVBridge @@ -358,16 +355,8 @@ void LLTaskInvFVBridge::previewItem() BOOL LLTaskInvFVBridge::isItemRenameable() const { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - return FALSE; - } -// [/RLVa:KB] - if(gAgent.isGodlike()) return TRUE; -// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); + LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID)); @@ -382,15 +371,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - return FALSE; - } -// [/RLVa:KB] - -// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { LLViewerInventoryItem* item = NULL; @@ -417,45 +398,12 @@ BOOL LLTaskInvFVBridge::isItemMovable() const // return TRUE; //} //return FALSE; -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a - if (rlv_handler_t::isEnabled()) - { - const LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); - if (pObj) - { - if (gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit())) - { - return FALSE; - } - else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) - { - if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObj->getRootEdit()) ) - return FALSE; - } - } - } -// [/RLVa:KB] return TRUE; } BOOL LLTaskInvFVBridge::isItemRemovable() const { const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a - if ( (object) && (rlv_handler_t::isEnabled()) ) - { - if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) - { - return FALSE; - } - else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) - { - if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) ) - return FALSE; - } - } -// [/RLVa:KB] - if(object && (object->permModify() || object->permYouOwner())) { @@ -603,13 +551,6 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const const LLPermissions& perm = inv->getPermissions(); bool can_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); -// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - // Kind of redundant due to the note below, but in case that ever gets fixed - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - return FALSE; - } -// [/RLVa:KB] if (object->isAttachment() && !can_copy) { //RN: no copy contents of attachments cannot be dragged out @@ -728,41 +669,16 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { disabled_items.push_back(std::string("Task Open")); } -// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a - else if (rlv_handler_t::isEnabled()) - { - LLViewerObject* pAttachObj = gObjectList.findObject(mPanel->getTaskUUID()); - bool fLocked = (pAttachObj) ? gRlvAttachmentLocks.isLockedAttachment(pAttachObj->getRootEdit()) : false; - if ( ((LLAssetType::AT_NOTECARD == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (fLocked))) || - ((LLAssetType::AT_LSL_TEXT == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (fLocked))) || - ((LLAssetType::AT_TEXTURE == item->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) - { - disabled_items.push_back(std::string("Task Open")); - } - } -// [/RLVa:KB] } items.push_back(std::string("Task Properties")); -// if(isItemRenameable()) -// { -// items.push_back(std::string("Task Rename")); -// } -// if(isItemRemovable()) -// { -// items.push_back(std::string("Task Remove")); -// } -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f - items.push_back(std::string("Task Rename")); - items.push_back(std::string("Task Remove")); - if (!isItemRenameable()) + if(isItemRenameable()) { - disabled_items.push_back(std::string("Task Rename")); + items.push_back(std::string("Task Rename")); } - if (!isItemRemovable()) + if(isItemRemovable()) { - disabled_items.push_back(std::string("Task Remove")); + items.push_back(std::string("Task Remove")); } -// [/RLVa:KB] hide_context_entries(menu, items, disabled_items); } @@ -1154,13 +1070,6 @@ void LLTaskLSLBridge::openItem() { return; } -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - RlvUIEnabler::notifyBlockedViewXXX(LLAssetType::AT_SCRIPT); - return; - } -// [/RLVa:KB] if (object->permModify() || gAgent.isGodlike()) { LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES); @@ -1219,13 +1128,6 @@ void LLTaskNotecardBridge::openItem() { return; } -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - RlvUIEnabler::notifyBlockedViewXXX(LLAssetType::AT_NOTECARD); - return; - } -// [/RLVa:KB] if(object->permModify() || gAgent.isGodlike()) { LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 3a28881473..494db01f77 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -56,13 +56,11 @@ #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llloadingindicator.h" -#include "llmenubutton.h" #include "llpaneloutfitsinventory.h" #include "lluiconstants.h" #include "llsaveoutfitcombobtn.h" #include "llscrolllistctrl.h" #include "lltextbox.h" -#include "lltoggleablemenu.h" #include "lltrans.h" #include "lluictrlfactory.h" #include "llsdutil.h" @@ -73,9 +71,6 @@ #include "llwearableitemslist.h" #include "llwearabletype.h" #include "llweb.h" -// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) -#include "rlvhandler.h" -// [/RLVa:KB] static LLRegisterPanelClassWrapper t_outfit_edit("panel_outfit_edit"); @@ -156,13 +151,13 @@ std::string LLShopURLDispatcher::resolveURL(LLAssetType::EType asset_type, ESex class LLPanelOutfitEditGearMenu { public: - static LLToggleableMenu* create() + static LLMenuGL* create() { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Wearable.Create", boost::bind(onCreate, _2)); - LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile( + LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile( "menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); llassert(menu); if (menu) @@ -223,7 +218,7 @@ private: class LLAddWearablesGearMenu : public LLInitClass { public: - static LLToggleableMenu* create(LLWearableItemsList* flat_list, LLInventoryPanel* inventory_panel) + static LLMenuGL* create(LLWearableItemsList* flat_list, LLInventoryPanel* inventory_panel) { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; @@ -238,7 +233,7 @@ public: enable_registrar.add("AddWearable.Gear.Check", boost::bind(onCheck, flat_list_handle, inventory_panel_handle, _2)); enable_registrar.add("AddWearable.Gear.Visible", boost::bind(onVisible, inventory_panel_handle, _2)); - LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile( + LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile( "menu_add_wearable_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -408,10 +403,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mAddWearablesPanel(NULL), mFolderViewFilterCmbBox(NULL), mListViewFilterCmbBox(NULL), - mWearableListManager(NULL), - mPlusBtn(NULL), - mWearablesGearMenuBtn(NULL), - mGearMenuBtn(NULL) + mPlusBtn(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -436,7 +428,6 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() LLPanelOutfitEdit::~LLPanelOutfitEdit() { - delete mWearableListManager; delete mSavedFolderState; delete mCOFDragAndDropObserver; @@ -487,14 +478,13 @@ BOOL LLPanelOutfitEdit::postBuild() childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::saveListSelection, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::saveListSelection, this), NULL); + childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); + childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL); childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2)); - mWearablesGearMenuBtn = getChild("wearables_gear_menu_btn"); - mGearMenuBtn = getChild("gear_menu_btn"); - mCOFWearables = findChild("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); @@ -567,13 +557,6 @@ BOOL LLPanelOutfitEdit::postBuild() mWearableItemsList->setComparator(mWearableListViewItemsComparator); - // Creating "Add Wearables" panel gear menu after initialization of mWearableItemsList and mInventoryItemsPanel. - mAddWearablesGearMenu = LLAddWearablesGearMenu::create(mWearableItemsList, mInventoryItemsPanel); - mWearablesGearMenuBtn->setMenu(mAddWearablesGearMenu); - - mGearMenu = LLPanelOutfitEditGearMenu::create(); - mGearMenuBtn->setMenu(mGearMenu); - mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; } @@ -609,10 +592,6 @@ void LLPanelOutfitEdit::toggleAddWearablesPanel() void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) { -// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - show_add_wearables = (show_add_wearables) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV)); -// [/RLVa:KB] - mAddWearablesPanel->setVisible(show_add_wearables); getChild("show_add_wearables_btn")->setValue(show_add_wearables); @@ -1277,6 +1256,37 @@ void LLPanelOutfitEdit::resetAccordionState() } } +void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button) +{ + LLMenuGL* menu = NULL; + + if (mAddWearablesPanel->getVisible()) + { + if (!mAddWearablesGearMenu) + { + mAddWearablesGearMenu = LLAddWearablesGearMenu::create(mWearableItemsList, mInventoryItemsPanel); + } + + menu = mAddWearablesGearMenu; + } + else + { + if (!mGearMenu) + { + mGearMenu = LLPanelOutfitEditGearMenu::create(); + } + + menu = mGearMenu; + } + + if (!menu) return; + + menu->arrangeAndClear(); // update menu height + S32 menu_y = menu->getRect().getHeight() + clicked_button->getRect().getHeight(); + menu->buildDrawLabels(); + LLMenuGL::showPopup(clicked_button, menu, 0, menu_y); +} + void LLPanelOutfitEdit::onAddMoreButtonClicked() { toggleAddWearablesPanel(); diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index fd366e9cbc..2dca986e33 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -54,7 +54,6 @@ class LLScrollListCtrl; class LLToggleableMenu; class LLFilterEditor; class LLFilteredWearableListManager; -class LLMenuButton; class LLMenuGL; class LLFindNonLinksByMask; class LLFindWearablesOfType; @@ -187,6 +186,8 @@ public: std::string& tooltip_msg); private: + + void onGearButtonClick(LLUICtrl* clicked_button); void onAddMoreButtonClicked(); void showFilteredWearablesListView(LLWearableType::EType type); void onOutfitChanging(bool started); @@ -233,12 +234,12 @@ private: std::vector mListViewItemTypes; LLCOFWearables* mCOFWearables; - LLToggleableMenu* mGearMenu; - LLToggleableMenu* mAddWearablesGearMenu; + LLMenuGL* mGearMenu; + LLMenuGL* mAddWearablesGearMenu; bool mInitialized; std::auto_ptr mSaveComboBtn; - LLMenuButton* mWearablesGearMenuBtn; - LLMenuButton* mGearMenuBtn; + + }; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index a90f864ae2..d6d8a38ebe 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -232,7 +232,9 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() { mListCommands = getChild("bottom_panel"); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); + mMyOutfitsPanel->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::showGearMenu, this)); mMyOutfitsPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); + mCurrentOutfitPanel->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::showGearMenu, this)); } void LLPanelOutfitsInventory::updateListCommands() @@ -256,9 +258,27 @@ void LLPanelOutfitsInventory::updateListCommands() } } +void LLPanelOutfitsInventory::showGearMenu() +{ + if (!mActivePanel) return; + + LLView* spawning_view = getChild("options_gear_btn"); + mActivePanel->showGearMenu(spawning_view); +} + void LLPanelOutfitsInventory::onTrashButtonClick() { + LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLPanelOutfitsInventory::onOutfitsRemovalConfirmation, this, _1, _2)); +} + +void LLPanelOutfitsInventory::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; // canceled + mMyOutfitsPanel->removeSelected(); + updateListCommands(); + updateVerbs(); } bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index ff9f212df8..f1ca1dbfeb 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -56,12 +56,6 @@ public: static LLSidepanelAppearance* getAppearanceSP(); -// [RLVa:KB] - Checked: 2010-08-24 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - LLTabContainer* getAppearanceTabs() { return mAppearanceTabs; } - LLOutfitsList* getMyOutfitsPanel() { return mMyOutfitsPanel; } - LLPanelWearing* getCurrentOutfitPanel() { return mCurrentOutfitPanel; } -// [/RLVa:KB] - static LLPanelOutfitsInventory* findInstance(); protected: @@ -95,6 +89,7 @@ protected: void onWearButtonClick(); void showGearMenu(); void onTrashButtonClick(); + void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); bool isActionEnabled(const LLSD& userdata); void setWearablesLoading(bool val); void onWearablesLoaded(); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index dec8bcf00b..040b5319b9 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -29,13 +29,11 @@ // libs #include "llavatarname.h" #include "llfloaterreg.h" -#include "llmenubutton.h" #include "llmenugl.h" #include "llnotificationsutil.h" #include "lleventtimer.h" #include "llfiltereditor.h" #include "lltabcontainer.h" -#include "lltoggleablemenu.h" #include "lluictrlfactory.h" #include "llpanelpeople.h" @@ -63,9 +61,6 @@ #include "llvoiceclient.h" #include "llworld.h" #include "llspeakers.h" -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) -#include "rlvhandler.h" -// [/RLVa:KB] #define FRIEND_LIST_UPDATE_TIMEOUT 0.5 #define NEARBY_LIST_UPDATE_INTERVAL 1 @@ -469,11 +464,7 @@ LLPanelPeople::LLPanelPeople() mAllFriendList(NULL), mNearbyList(NULL), mRecentList(NULL), - mGroupList(NULL), - mNearbyGearButton(NULL), - mFriendsGearButton(NULL), - mGroupsGearButton(NULL), - mRecentGearButton(NULL) + mGroupList(NULL) { mFriendListUpdater = new LLFriendListUpdater(boost::bind(&LLPanelPeople::updateFriendList, this)); mNearbyListUpdater = new LLNearbyListUpdater(boost::bind(&LLPanelPeople::updateNearbyList, this)); @@ -544,9 +535,6 @@ BOOL LLPanelPeople::postBuild() mNearbyList->setNoItemsMsg(getString("no_one_near")); mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near")); mNearbyList->setShowIcons("NearbyListShowIcons"); -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - mNearbyList->setRlvCheckShowNames(true); -// [/RLVa:KB] mRecentList = getChild(RECENT_TAB_NAME)->getChild("avatar_list"); mRecentList->setNoItemsCommentText(getString("no_recent_people")); @@ -612,6 +600,11 @@ BOOL LLPanelPeople::postBuild() buttonSetAction("teleport_btn", boost::bind(&LLPanelPeople::onTeleportButtonClicked, this)); buttonSetAction("share_btn", boost::bind(&LLPanelPeople::onShareButtonClicked, this)); + getChild(NEARBY_TAB_NAME)->childSetAction("nearby_view_sort_btn",boost::bind(&LLPanelPeople::onNearbyViewSortButtonClicked, this)); + getChild(RECENT_TAB_NAME)->childSetAction("recent_viewsort_btn",boost::bind(&LLPanelPeople::onRecentViewSortButtonClicked, this)); + getChild(FRIENDS_TAB_NAME)->childSetAction("friends_viewsort_btn",boost::bind(&LLPanelPeople::onFriendsViewSortButtonClicked, this)); + getChild(GROUP_TAB_NAME)->childSetAction("groups_viewsort_btn",boost::bind(&LLPanelPeople::onGroupsViewSortButtonClicked, this)); + // Must go after setting commit callback and initializing all pointers to children. mTabContainer->selectTabByName(NEARBY_TAB_NAME); @@ -631,41 +624,24 @@ BOOL LLPanelPeople::postBuild() enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); - mNearbyGearButton = getChild("nearby_view_sort_btn"); - mFriendsGearButton = getChild("friends_viewsort_btn"); - mGroupsGearButton = getChild("groups_viewsort_btn"); - mRecentGearButton = getChild("recent_viewsort_btn"); - LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mGroupPlusMenuHandle = plus_menu->getHandle(); - LLToggleableMenu* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* nearby_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_nearby_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(nearby_view_sort) - { mNearbyViewSortMenuHandle = nearby_view_sort->getHandle(); - mNearbyGearButton->setMenu(nearby_view_sort); - } - LLToggleableMenu* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* friend_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_friends_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(friend_view_sort) - { mFriendsViewSortMenuHandle = friend_view_sort->getHandle(); - mFriendsGearButton->setMenu(friend_view_sort); - } - LLToggleableMenu* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* group_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_groups_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(group_view_sort) - { mGroupsViewSortMenuHandle = group_view_sort->getHandle(); - mGroupsGearButton->setMenu(group_view_sort); - } - LLToggleableMenu* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* recent_view_sort = LLUICtrlFactory::getInstance()->createFromFile("menu_people_recent_view_sort.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(recent_view_sort) - { mRecentViewSortMenuHandle = recent_view_sort->getHandle(); - mRecentGearButton->setMenu(recent_view_sort); - } LLVoiceClient::getInstance()->addObserver(this); @@ -854,11 +830,7 @@ void LLPanelPeople::updateButtons() LLPanel* cur_panel = mTabContainer->getCurrentPanel(); if (cur_panel) { -// cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend); -// [RLVa:KB] - Checked: 2010-07-20 (RLVa-1.2.0h) | Added: RLVa-1.2.0h - cur_panel->getChildView("add_friend_btn")->setEnabled( - !is_friend && ((!nearby_tab_active) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)))); -// [/RLBa:KB] + cur_panel->getChildView("add_friend_btn")->setEnabled(!is_friend); if (friends_tab_active) { cur_panel->getChildView("del_btn")->setEnabled(multiple_selected); @@ -868,13 +840,6 @@ void LLPanelPeople::updateButtons() bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled(); -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d - if ( (nearby_tab_active) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) - { - item_selected = multiple_selected = false; - } -// [/RLBa:KB] - buttonSetEnabled("view_profile_btn",item_selected); buttonSetEnabled("share_btn", item_selected); buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection @@ -946,7 +911,7 @@ void LLPanelPeople::showGroupMenu(LLMenuGL* menu) // Calculate its coordinates. // (assumes that groups panel is the current tab) - LLPanel* bottom_panel = mTabContainer->getCurrentPanel()->getChild("bottom_panel"); + LLPanel* bottom_panel = mTabContainer->getCurrentPanel()->getChild("bottom_panel"); LLPanel* parent_panel = mTabContainer->getCurrentPanel(); menu->arrangeAndClear(); S32 menu_height = menu->getRect().getHeight(); @@ -1381,6 +1346,38 @@ void LLPanelPeople::onMoreButtonClicked() // *TODO: not implemented yet } +void LLPanelPeople::onFriendsViewSortButtonClicked() +{ + LLMenuGL* menu = (LLMenuGL*)mFriendsViewSortMenuHandle.get(); + if (!menu) + return; + showGroupMenu(menu); +} + +void LLPanelPeople::onGroupsViewSortButtonClicked() +{ + LLMenuGL* menu = (LLMenuGL*)mGroupsViewSortMenuHandle.get(); + if (!menu) + return; + showGroupMenu(menu); +} + +void LLPanelPeople::onRecentViewSortButtonClicked() +{ + LLMenuGL* menu = (LLMenuGL*)mRecentViewSortMenuHandle.get(); + if (!menu) + return; + showGroupMenu(menu); +} + +void LLPanelPeople::onNearbyViewSortButtonClicked() +{ + LLMenuGL* menu = (LLMenuGL*)mNearbyViewSortMenuHandle.get(); + if (!menu) + return; + showGroupMenu(menu); +} + void LLPanelPeople::onOpen(const LLSD& key) { std::string tab_name = key["people_panel_tab_name"]; diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 672304c16c..f5ff09b038 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -36,7 +36,6 @@ class LLAvatarList; class LLAvatarName; class LLFilterEditor; class LLGroupList; -class LLMenuButton; class LLTabContainer; class LLPanelPeople @@ -55,10 +54,6 @@ public: // when voice is available /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - LLAvatarList* getNearbyList() { return mNearbyList; } -// [/RLVa:KB] - // internals class Updater; @@ -106,6 +101,10 @@ private: void onShareButtonClicked(); void onMoreButtonClicked(); void onActivateButtonClicked(); + void onRecentViewSortButtonClicked(); + void onNearbyViewSortButtonClicked(); + void onFriendsViewSortButtonClicked(); + void onGroupsViewSortButtonClicked(); void onAvatarListDoubleClicked(LLUICtrl* ctrl); void onAvatarListCommitted(LLAvatarList* list); void onGroupPlusButtonClicked(); @@ -157,11 +156,6 @@ private: Updater* mNearbyListUpdater; Updater* mRecentListUpdater; - LLMenuButton* mNearbyGearButton; - LLMenuButton* mFriendsGearButton; - LLMenuButton* mGroupsGearButton; - LLMenuButton* mRecentGearButton; - std::string mFilterSubString; std::string mFilterSubStringOrig; }; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 4ee939c8a6..59130236f2 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -62,9 +62,7 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] + U8 string_value_to_click_action(std::string p_value); std::string click_action_to_string_value( U8 action); @@ -331,9 +329,8 @@ void LLPanelPermissions::refresh() creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); -// getChild("Creator Name")->setValue(creator_name); -// getChildView("Creator Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row + getChild("Creator Name")->setValue(creator_name); + getChildView("Creator Name")->setEnabled(TRUE); // Update owner text field getChildView("Owner:")->setEnabled(TRUE); @@ -361,28 +358,8 @@ void LLPanelPermissions::refresh() } } } -// getChild("Owner Name")->setValue(owner_name); -// getChildView("Owner Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row - -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.2.1b - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - // Only anonimize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie - if ( (creators_identical) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) ) - creator_name = RlvStrings::getAnonym(creator_name); - - // Only anonimize the owner name if all of the selection is owned by the same avie and isn't group owned - if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) ) - owner_name = RlvStrings::getAnonym(owner_name); - } - - getChild("Creator Name")->setValue(creator_name); - getChildView("Creator Name")->setEnabled(TRUE); - getChild("Owner Name")->setValue(owner_name); getChildView("Owner Name")->setEnabled(TRUE); -// [/RLVa:KB] // update group text field getChildView("Group:")->setEnabled(TRUE); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index dca727355f..68ecb0165c 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -51,9 +51,6 @@ #include "llviewercontrol.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" -// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] static LLRegisterPanelClassWrapper t_place_profile("panel_place_profile"); @@ -549,10 +546,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mLastSelectedRegionID = region->getRegionID(); LLPanelPlaceInfo::processParcelInfo(parcel_data); -// mYouAreHerePanel->setVisible(is_current_parcel); -// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - mYouAreHerePanel->setVisible(is_current_parcel && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))); -// [/RLVa:KB] + mYouAreHerePanel->setVisible(is_current_parcel); getChild("sales_tab")->setVisible(for_sale); } @@ -619,9 +613,6 @@ void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata) BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && LLAgentUI::checkAgentDistance(self->mPosRegion, radius); -// self->mYouAreHerePanel->setVisible(display_banner); -// [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - self->mYouAreHerePanel->setVisible(display_banner && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))); -// [/RLVa:KB] + self->mYouAreHerePanel->setVisible(display_banner); } } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 7d7ac0dc99..d2bcee8076 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -52,10 +52,6 @@ public: S32 notifyParent(const LLSD& info); -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RVLa-1.2.0f - const LLUUID& getAvatarId() const { return mAvatarId; } -// [/RLVa:KB] - protected: LLPanelProfile(); @@ -66,7 +62,7 @@ protected: LLTabContainer* getTabCtrl() { return mTabCtrl; } -// const LLUUID& getAvatarId() { return mAvatarId; } + const LLUUID& getAvatarId() { return mAvatarId; } void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index fff8ccb912..9b8167b15a 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llfloaterreg.h" -#include "llmenubutton.h" #include "llfloaterworldmap.h" #include "llpanelteleporthistory.h" @@ -41,7 +40,6 @@ #include "llflatlistview.h" #include "llnotificationsutil.h" #include "lltextbox.h" -#include "lltoggleablemenu.h" #include "llviewermenu.h" #include "lllandmarkactions.h" #include "llclipboard.h" @@ -377,8 +375,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() mHistoryAccordion(NULL), mAccordionTabMenu(NULL), mLastSelectedFlatlList(NULL), - mLastSelectedItemIndex(-1), - mMenuGearButton(NULL) + mLastSelectedItemIndex(-1) { buildFromFile( "panel_teleport_history.xml"); } @@ -442,6 +439,8 @@ BOOL LLTeleportHistoryPanel::postBuild() } } + getChild("bottom_panel")->childSetAction("gear_btn",boost::bind(&LLTeleportHistoryPanel::onGearButtonClicked, this)); + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("TeleportHistory.ExpandAllFolders", boost::bind(&LLTeleportHistoryPanel::onExpandAllFolders, this)); @@ -449,14 +448,9 @@ BOOL LLTeleportHistoryPanel::postBuild() registrar.add("TeleportHistory.ClearTeleportHistory", boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistory, this)); mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2)); - mMenuGearButton = getChild("gear_btn"); - - LLToggleableMenu* gear_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());; + LLMenuGL* gear_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if(gear_menu) - { mGearMenuHandle = gear_menu->getHandle(); - mMenuGearButton->setMenu(gear_menu); - } return TRUE; } @@ -991,6 +985,27 @@ LLFlatListView* LLTeleportHistoryPanel::getFlatListViewFromTab(LLAccordionCtrlTa return NULL; } +void LLTeleportHistoryPanel::onGearButtonClicked() +{ + LLMenuGL* menu = (LLMenuGL*)mGearMenuHandle.get(); + if (!menu) + return; + + // Shows the menu at the top of the button bar. + + // Calculate its coordinates. + LLPanel* bottom_panel = getChild("bottom_panel"); + menu->arrangeAndClear(); + S32 menu_height = menu->getRect().getHeight(); + S32 menu_x = -2; // *HACK: compensates HPAD in showPopup() + S32 menu_y = bottom_panel->getRect().mTop + menu_height; + + // Actually show the menu. + menu->buildDrawLabels(); + menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, menu, menu_x, menu_y); +} + bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const { S32 tabs_cnt = mItemContainers.size(); diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 3d29454d15..b5a025b39b 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -38,7 +38,6 @@ class LLTeleportHistoryStorage; class LLAccordionCtrl; class LLAccordionCtrlTab; class LLFlatListView; -class LLMenuButton; class LLTeleportHistoryPanel : public LLPanelPlacesTab { @@ -95,6 +94,7 @@ private: void showTeleportHistory(); void handleItemSelect(LLFlatListView* ); LLFlatListView* getFlatListViewFromTab(LLAccordionCtrlTab *); + void onGearButtonClicked(); bool isActionEnabled(const LLSD& userdata) const; void setAccordionCollapsedByUser(LLUICtrl* acc_tab, bool collapsed); @@ -118,7 +118,6 @@ private: ContextMenu mContextMenu; LLContextMenu* mAccordionTabMenu; LLHandle mGearMenuHandle; - LLMenuButton* mMenuGearButton; }; diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 911a9e5dda..860470cd73 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -28,13 +28,10 @@ #include "llpanelwearing.h" -#include "lltoggleablemenu.h" - #include "llappearancemgr.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" -#include "llmenubutton.h" #include "llsidetray.h" #include "llviewermenu.h" #include "llwearableitemslist.h" @@ -61,12 +58,21 @@ public: enable_registrar.add("Gear.OnEnable", boost::bind(&LLPanelWearing::isActionEnabled, mPanelWearing, _2)); - mMenu = LLUICtrlFactory::getInstance()->createFromFile( + mMenu = LLUICtrlFactory::getInstance()->createFromFile( "menu_wearing_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); llassert(mMenu); } - LLToggleableMenu* getMenu() { return mMenu; } + void show(LLView* spawning_view) + { + if (!mMenu) return; + + mMenu->buildDrawLabels(); + mMenu->updateParent(LLMenuGL::sMenuContainer); + S32 menu_x = 0; + S32 menu_y = spawning_view->getRect().getHeight() + mMenu->getRect().getHeight(); + LLMenuGL::showPopup(spawning_view, mMenu, menu_x, menu_y); + } private: @@ -81,8 +87,8 @@ private: } } - LLToggleableMenu* mMenu; - LLPanelWearing* mPanelWearing; + LLMenuGL* mMenu; + LLPanelWearing* mPanelWearing; }; ////////////////////////////////////////////////////////////////////////// @@ -183,10 +189,6 @@ BOOL LLPanelWearing::postBuild() mCOFItemsList = getChild("cof_items_list"); mCOFItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onWearableItemsListRightClick, this, _1, _2, _3)); - LLMenuButton* menu_gear_btn = getChild("options_gear_btn"); - - menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; } @@ -251,6 +253,13 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata) return false; } +// virtual +void LLPanelWearing::showGearMenu(LLView* spawning_view) +{ + if (!mGearMenu) return; + mGearMenu->show(spawning_view); +} + boost::signals2::connection LLPanelWearing::setSelectionChangeCallback(commit_callback_t cb) { if (!mCOFItemsList) return boost::signals2::connection(); diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h index 157b2c4c5f..1fa97735b1 100644 --- a/indra/newview/llpanelwearing.h +++ b/indra/newview/llpanelwearing.h @@ -58,6 +58,8 @@ public: /*virtual*/ bool isActionEnabled(const LLSD& userdata); + /*virtual*/ void showGearMenu(LLView* spawning_view); + /*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; boost::signals2::connection setSelectionChangeCallback(commit_callback_t cb); diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 29e262199e..408270a1a0 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -205,6 +205,24 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) return LLFolderView::handleRightMouseDown(x, y, mask); } +BOOL LLPlacesFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + // Don't accept anything except landmarks and folders to be dropped + // in places folder view. See STORM-296. + if (cargo_type != DAD_LANDMARK && cargo_type != DAD_CATEGORY) + { + *accept = ACCEPT_NO; + return FALSE; + } + + return LLFolderView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, + accept, tooltip_msg); +} + void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle menu_handle) { mMenuHandlesByInventoryType[asset_type] = menu_handle; diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index 6641871a0b..a44776d18b 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -70,6 +70,12 @@ public: */ /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); + /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle menu_handle); void setParentLandmarksPanel(LLLandmarksPanel* panel) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 40e6d7d96d..cf2ea38288 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -83,9 +83,6 @@ #include "lltrans.h" #include "llviewercontrol.h" #include "llappviewer.h" -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) -#include "rlvhandler.h" -// [/RLVa:KB] const std::string HELLO_LSL = "default\n" @@ -1704,13 +1701,6 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) //self->mRunningCheckbox->get(); if( object ) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - return; - } -// [/RLVa:KB] - LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_SetScriptRunning); msg->nextBlockFast(_PREHASH_AgentData); @@ -1736,13 +1726,6 @@ void LLLiveLSLEditor::onReset(void *userdata) LLViewerObject* object = gObjectList.findObject( self->mObjectUUID ); if(object) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) - { - return; - } -// [/RLVa:KB] - LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ScriptReset); msg->nextBlockFast(_PREHASH_AgentData); @@ -2151,15 +2134,6 @@ void LLLiveLSLEditor::onLoad(void* userdata) void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) { LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; - -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - const LLViewerObject* pObject = gObjectList.findObject(self->mObjectUUID); - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(pObject->getRootEdit())) ) - { - return; - } -// [/RLVa:KB] - self->mCloseAfterSave = close_after_save; self->saveIfNeeded(); } diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index e7bfe7acc7..18c9ac28c1 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -369,7 +369,7 @@ void LLScreenChannel::loadStoredToastsToChannel() for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it) { (*it).toast->setIsHidden(false); - (*it).toast->startFading(); + (*it).toast->resetTimer(); mToastList.push_back((*it)); } @@ -394,7 +394,7 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) } toast->setIsHidden(false); - toast->startFading(); + toast->resetTimer(); mToastList.push_back((*it)); redrawToasts(); @@ -477,7 +477,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) toast->removeChild(old_panel); delete old_panel; toast->insertPanel(panel); - toast->startFading(); + toast->resetTimer(); redrawToasts(); } } @@ -588,7 +588,7 @@ void LLScreenChannel::showToastsBottom() mHiddenToastsNum = 0; for(; it != mToastList.rend(); it++) { - (*it).toast->stopFading(); + (*it).toast->stopTimer(); (*it).toast->setVisible(FALSE); mHiddenToastsNum++; } @@ -866,18 +866,8 @@ LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id) std::vector::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), id); -// if (it == mStoredToastList.end()) -// return NULL; -// [SL:KB] - Checked: 2010-04-21 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // BUGFIX-SL: we need to get the visible toast in LLOfferHandler::processNotification() whether it's "stored" or not if (it == mStoredToastList.end()) - { - // If we can't find it among the stored toasts then widen it to "all visible toasts" - it = find(mToastList.begin(), mToastList.end(), id); - if (it == mToastList.end()) - return NULL; - } -// [/SL:KB] + return NULL; return it->toast; } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a0ff13dad..da891d1c51 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -87,9 +87,6 @@ #include "llvoavatarself.h" #include "llvovolume.h" #include "pipeline.h" -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] #include "llglheaders.h" @@ -2740,16 +2737,6 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm) void LLSelectMgr::selectDelete() { -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a - if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) - { - make_ui_sound("UISndInvalidOp"); - if (!gFloaterTools->getVisible()) - deselectAll(); - return; - } -// [/RLVa:KB] - S32 deleteable_count = 0; BOOL locked_but_deleteable_object = FALSE; @@ -3062,10 +3049,7 @@ struct LLDuplicateData void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy) { -// if (mSelectedObjects->isAttachment()) -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a - if ( (mSelectedObjects->isAttachment()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) ) -// [/RLVa:KB] + if (mSelectedObjects->isAttachment()) { //RN: do not duplicate attachments make_ui_sound("UISndInvalidOp"); @@ -3519,38 +3503,11 @@ void LLSelectMgr::convertTransient() void LLSelectMgr::deselectAllIfTooFar() { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!mSelectedObjects->isEmpty()) ) - { - struct NotTransientOrFocusedMedia : public LLSelectedNodeFunctor - { - bool apply(LLSelectNode* node) - { - return (node) && (node->getObject()) && - ( (!node->isTransient()) && (node->getObject()->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()) ); - } - } f; - if (mSelectedObjects->getFirstRootNode(&f, TRUE)) - deselectAll(); - } -// [/RLVa:KB] - if (mSelectedObjects->isEmpty() || mSelectedObjects->mSelectType == SELECT_TYPE_HUD) { return; } -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0l -#ifdef RLV_EXTENSION_CMD_INTERACT - // [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact=n restricted - if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) - { - deselectAll(); - return; - } -#endif // RLV_EXTENSION_CMD_INTERACT -// [/RLVa:KB] - // HACK: Don't deselect when we're navigating to rate an object's // owner or creator. JC if (gMenuObject->getVisible()) @@ -3559,20 +3516,13 @@ void LLSelectMgr::deselectAllIfTooFar() } LLVector3d selectionCenter = getSelectionCenterGlobal(); -// if (gSavedSettings.getBOOL("LimitSelectDistance") -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f - BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible(); - if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) ) -// [/RLVa:KB] + if (gSavedSettings.getBOOL("LimitSelectDistance") && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) && (mSelectedObjects->getPrimaryObject() != LLViewerMediaFocus::getInstance()->getFocusedObject()) && !mSelectedObjects->isAttachment() && !selectionCenter.isExactlyZero()) { -// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f - F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f; -// [/RLVa:KB] + F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); F32 deselect_dist_sq = deselect_dist * deselect_dist; LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter; @@ -5843,10 +5793,7 @@ BOOL LLSelectMgr::canDoDelete() const can_delete = true; } } -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Added: RLVa-1.2.0a - can_delete &= (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn()); -// [/RLVa:KB] - + return can_delete; } @@ -5878,12 +5825,7 @@ void LLSelectMgr::deselect() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDuplicate() const { -// return const_cast(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a - return - (const_cast(this)->mSelectedObjects->getFirstCopyableObject() != NULL) && - ( (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn()) ); -// [/RLVa:KB] + return const_cast(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG } //----------------------------------------------------------------------------- // duplicate() diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 5accf30b6e..1999f14828 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -528,15 +528,3 @@ void LLSidepanelAppearance::updateScrollingPanelList() mEditWearable->updateScrollingPanelList(); } } - -// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a -bool LLSidepanelAppearance::isOutfitEditPanelVisible() const -{ - return (mOutfitEdit) && (mOutfitEdit->getVisible()); -} - -bool LLSidepanelAppearance::isWearableEditPanelVisible() const -{ - return (mEditWearable) && (mEditWearable->getVisible()); -} -// [/RLVa:KB] diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 55be97753f..2a83dfbc9d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -65,14 +65,6 @@ public: void updateScrollingPanelList(); void updateToVisibility( const LLSD& new_visibility ); -// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - bool isOutfitEditPanelVisible() const; - bool isWearableEditPanelVisible() const; - - LLPanelOutfitEdit* getOutfitEditPanel() { return mOutfitEdit; } - LLPanelEditWearable* getWearableEditPanel() { return mEditWearable; } -// [/RLVa:KB] - private: void onFilterEdit(const std::string& search_string); void onVisibilityChange ( const LLSD& new_visibility ); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 577c27086f..f9c0fd398e 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -42,9 +42,7 @@ #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerobjectlist.h" -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLItemPropertiesObserver @@ -70,22 +68,10 @@ private: void LLItemPropertiesObserver::changed(U32 mask) { - const std::set& mChangedItemIDs = gInventory.getChangedIDs(); - std::set::const_iterator it; - - const LLUUID& object_id = mFloater->getObjectID(); - - for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++) + // if there's a change we're interested in. + if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0) { - // set dirty for 'item profile panel' only if changed item is the item for which 'item profile panel' is shown (STORM-288) - if (*it == object_id) - { - // if there's a change we're interested in. - if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0) - { - mFloater->dirty(); - } - } + mFloater->dirty(); } } @@ -193,11 +179,6 @@ void LLSidepanelItemInfo::setItemID(const LLUUID& item_id) mItemID = item_id; } -const LLUUID& LLSidepanelItemInfo::getObjectID() const -{ - return mObjectID; -} - void LLSidepanelItemInfo::reset() { LLSidepanelInventorySubpanel::reset(); @@ -339,17 +320,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLSLURL("agent", creator_id, "completename").getSLURLString(); 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] + getChildView("LabelCreatorName")->setEnabled(FALSE); getChild("LabelCreatorName")->setValue(name); } else @@ -374,15 +345,8 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { LLUUID owner_id = perm.getOwner(); name = LLSLURL("agent", owner_id, "completename").getSLURLString(); -// [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(FALSE); getChild("LabelOwnerName")->setValue(name); @@ -711,17 +675,6 @@ void LLSidepanelItemInfo::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()); } } @@ -737,10 +690,6 @@ void LLSidepanelItemInfo::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()); } } diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 6416e2cfe4..10e93dd7de 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -54,8 +54,6 @@ public: void setItemID(const LLUUID& item_id); void setEditMode(BOOL edit); - const LLUUID& getObjectID() const; - protected: /*virtual*/ void refresh(); /*virtual*/ void save(); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 8cf90b500f..47d904dfcc 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -61,9 +61,6 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] ///---------------------------------------------------------------------------- /// Class llsidepaneltaskinfo @@ -298,9 +295,8 @@ void LLSidepanelTaskInfo::refresh() creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); -// getChild("Creator Name")->setValue(creator_name); -// getChildView("Creator Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row + getChild("Creator Name")->setValue(creator_name); + getChildView("Creator Name")->setEnabled(TRUE); // Update owner text field getChildView("Owner:")->setEnabled(TRUE); @@ -328,28 +324,8 @@ void LLSidepanelTaskInfo::refresh() } } } -// getChild("Owner Name")->setValue(owner_name); -// getChildView("Owner Name")->setEnabled(TRUE); -// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row - -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - { - // Only anonimize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie - if ( (creators_identical) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) ) - creator_name = RlvStrings::getAnonym(creator_name); - - // Only anonimize the owner name if all of the selection is owned by the same avie and isn't group owned - if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) ) - owner_name = RlvStrings::getAnonym(owner_name); - } - - getChild("Creator Name")->setValue(creator_name); - getChildView("Creator Name")->setEnabled(TRUE); - getChild("Owner Name")->setValue(owner_name); getChildView("Owner Name")->setEnabled(TRUE); -// [/RLVa:KB] // update group text field getChildView("Group:")->setEnabled(TRUE); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index aa7cad2893..81b2fc0ae0 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -584,32 +584,6 @@ bool LLSideTray::isTabAttached(const std::string& name) return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end(); } -// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Added: RLVa-1.2.1a -void LLSideTray::toggleTabDocked(const std::string& strTabName) -{ - if (!isTabAttached(strTabName)) - { - for (child_vector_iter_t itTab = mDetachedTabs.begin(); itTab != mDetachedTabs.end(); ++itTab) - { - LLSideTrayTab* pTab = *itTab; - if (strTabName == pTab->getName()) - { - pTab->toggleTabDocked(); - return; - } - } - } - else - { - LLSideTrayTab* pTab = getTab(strTabName); - if (pTab) - { - pTab->toggleTabDocked(); - } - } -} -// [/RLVa:KB] - bool LLSideTray::hasTabs() { // The open/close tab doesn't count. @@ -639,12 +613,6 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel std::string tab_name = tab->getName(); -// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a - // NOTE: - "panel_name" is a name of a panel *inside* of the tab, not the name of the tab that's being switched to - if ( (mValidateSignal) && (!(*mValidateSignal)(tab, LLSD(tab_name))) ) - return NULL; -// [/RLVa:KB] - // Select tab and expand Side Tray only when a tab is attached. if (isTabAttached(tab_name)) { @@ -705,11 +673,6 @@ bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible if (new_tab == mActiveTab) return false; -// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a - if ( (mValidateSignal) && (!(*mValidateSignal)(new_tab, LLSD(name))) ) - return false; -// [/RLVa:KB] - //deselect old tab if (mActiveTab) { @@ -1300,9 +1263,3 @@ void LLSideTray::updateSidetrayVisibility() } } -// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -const LLPanel* LLSideTray::getActiveTab() const -{ - return mActiveTab; -} -// [/RLVa:KB] diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index ade76d9be1..4c23a1920b 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -128,11 +128,7 @@ public: /* * get currently active tab */ -// const LLSideTrayTab* getActiveTab() const { return mActiveTab; } -// [RLVa:KB] - Checked: 2010-03-01 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - // *sighs* LLSideTrayTab is defined in llsidetray.cpp... we can make do with an LLPanel* though - const LLPanel* getActiveTab() const; -// [/RLVa:KB] + const LLSideTrayTab* getActiveTab() const { return mActiveTab; } /* * collapse SideBar, hiding visible tab and moving tab buttons @@ -159,13 +155,6 @@ public: } LLPanel* getButtonsPanel() { return mButtonsPanel; } -// [RLVa:KB] - Checked: 2010-02-28 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - LLButton* getButtonFromName(const std::string& strName) - { - std::map::const_iterator itBtn = mTabButtons.find(strName); - return (mTabButtons.end() != itBtn) ? itBtn->second : NULL; - } -// [/RLVa:KB] bool getCollapsed() { return mCollapsed; } @@ -197,10 +186,6 @@ public: bool isTabAttached (const std::string& name); -// [RLVa:KB] - Checked: 2010-09-07 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - void toggleTabDocked(const std::string& strTabName); -// [/RLVa:KB] - protected: bool hasTabs (); diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 4ac2e7ef6e..4cf1df1655 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -34,9 +34,6 @@ #include "llviewernetwork.h" #include "llfiltersd2xmlrpc.h" #include "curl/curl.h" -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) -#include "rlvhandler.h" -// [/RLVa:KB] const char* LLSLURL::SLURL_HTTP_SCHEME = "http"; const char* LLSLURL::SLURL_HTTPS_SCHEME = "https"; const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife"; @@ -384,13 +381,8 @@ std::string LLSLURL::getSLURLString() const S32 x = llround( (F32)mPosition[VX] ); S32 y = llround( (F32)mPosition[VY] ); S32 z = llround( (F32)mPosition[VZ] ); -// return LLGridManager::getInstance()->getSLURLBase(mGrid) + -// LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - return LLGridManager::getInstance()->getSLURLBase(mGrid) + - ( ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) || (!RlvUtil::isNearbyRegion(mRegion))) - ? (LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z)) : RlvStrings::getString(RLV_STRING_HIDDEN_REGION) ); -// [/RLVa:KB] + return LLGridManager::getInstance()->getSLURLBase(mGrid) + + LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); } case APP: { diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 960e72ee42..fb984a7c62 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1555,9 +1555,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) { if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1) { - // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension - if ((mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER && !gGLManager.mHasDepthClamp) || - earlyFail(camera, this)) + if (earlyFail(camera, this)) { setOcclusionState(LLSpatialGroup::DISCARD_QUERY); assert_states_valid(this); @@ -1578,18 +1576,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) { buildOcclusion(); } - - // Depth clamp all water to avoid it being culled as a result of being - // behind the far clip plane, and in the case of edge water to avoid - // it being culled while still visible. - bool const use_depth_clamp = gGLManager.mHasDepthClamp && - (mSpatialPartition->mDrawableType == LLDrawPool::POOL_WATER || - mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER); - if (use_depth_clamp) - { - glEnable(GL_DEPTH_CLAMP); - } - + glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mOcclusionQuery[LLViewerCamera::sCurCameraID]); glVertexPointer(3, GL_FLOAT, 0, mOcclusionVerts); if (camera->getOrigin().isExactlyZero()) @@ -1605,11 +1592,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) GL_UNSIGNED_BYTE, get_box_fan_indices(camera, mBounds[0])); } glEndQueryARB(GL_SAMPLES_PASSED_ARB); - - if (use_depth_clamp) - { - glDisable(GL_DEPTH_CLAMP); - } } setOcclusionState(LLSpatialGroup::QUERY_PENDING); @@ -2609,10 +2591,9 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) gGL.color4f(0.5f,0.5f,0.5f,1.0f); break; case LLViewerObject::LL_VO_PART_GROUP: - case LLViewerObject::LL_VO_HUD_PART_GROUP: + case LLViewerObject::LL_VO_HUD_PART_GROUP: gGL.color4f(0,0,1,1); break; - case LLViewerObject::LL_VO_VOID_WATER: case LLViewerObject::LL_VO_WATER: gGL.color4f(0,0.5f,1,1); break; diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 2b9cf6c630..1a25f3f85d 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -551,13 +551,6 @@ public: virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } }; -//spatial partition for hole and edge water (implemented in LLVOWater.cpp) -class LLVoidWaterPartition : public LLWaterPartition -{ -public: - LLVoidWaterPartition(); -}; - //spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp) class LLTerrainPartition : public LLSpatialPartition { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c54da5390a..5ee4599200 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -186,10 +186,6 @@ #include "llavatariconctrl.h" #include "llvoicechannel.h" -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] - #include "lllogin.h" #include "llevents.h" #include "llstartuplistener.h" @@ -370,13 +366,6 @@ bool idle_startup() // Initialize stuff that doesn't need data from simulators // -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-0.2.1d - if ( (gSavedSettings.controlExists(RLV_SETTING_MAIN)) && (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) ) - { - rlv_handler_t::setEnabled(TRUE); - } -// [/RLVa:KB] - if (LLFeatureManager::getInstance()->isSafe()) { LLNotificationsUtil::add("DisplaySetToSafe"); @@ -912,18 +901,6 @@ bool idle_startup() // their last location, or some URL "-url //sim/x/y[/z]" // All accounts have both a home and a last location, and we don't support // more locations than that. Choose the appropriate one. JC -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d -#ifndef RLV_EXTENSION_STARTLOCATION - if (rlv_handler_t::isEnabled()) -#else - if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) ) -#endif // RLV_EXTENSION_STARTLOCATION - { - // Force login at the last location - LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); - } -// [/RLVa:KB] - switch (LLStartUp::getStartSLURL().getType()) { case LLSLURL::LOCATION: @@ -1663,14 +1640,6 @@ bool idle_startup() llinfos << "Creating Inventory Views" << llendl; LLFloaterReg::getInstance("inventory"); -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.1.0f - if (rlv_handler_t::isEnabled()) - { - // Regularly process a select subset of retained commands during logon - gIdleCallbacks.addFunction(RlvHandler::onIdleStartup, new LLTimer()); - } -// [/RLVa:KB] - LLStartUp::setStartupState( STATE_MISC ); return FALSE; } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index d83cb370ea..e9fc25404a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -86,6 +86,7 @@ // system includes #include + // // Globals // diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 6fc8153b77..af4d9fa7b9 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -1162,13 +1162,8 @@ void LLSurface::setWaterHeight(F32 height) if (!mWaterObjp.isNull()) { LLVector3 water_pos_region = mWaterObjp->getPositionRegion(); - bool changed = water_pos_region.mV[VZ] != height; water_pos_region.mV[VZ] = height; mWaterObjp->setPositionRegion(water_pos_region); - if (changed) - { - LLWorld::getInstance()->updateWaterObjects(); - } } else { diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 5bff2cb38f..0d8b45db1f 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -39,9 +39,6 @@ #include "llviewerregion.h" #include "llworldmap.h" #include "llagentui.h" -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] ////////////////////////////////////////////////////////////////////////////// // LLTeleportHistoryItem @@ -147,16 +144,8 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) mItems.erase (mItems.begin() + mCurrentItem + 1, mItems.end()); // Append an empty item to the history and make it current. -// mItems.push_back(LLTeleportHistoryItem("", LLVector3d())); -// mCurrentItem++; -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - // Only append a new item if the list is currently empty or if not @showloc=n restricted and the last entry wasn't zero'ed out - if ( (mItems.size() == 0) || ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!mItems.back().mGlobalPos.isExactlyZero())) ) - { - mItems.push_back(LLTeleportHistoryItem("", LLVector3d())); - mCurrentItem++; - } -// [RLVa:KB] + mItems.push_back(LLTeleportHistoryItem("", LLVector3d())); + mCurrentItem++; } // Update current history item. @@ -166,23 +155,11 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) llassert(!"Invalid current teleport histiry item"); return; } - -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { -// [/RLVa:KB] - LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos); - mItems[mCurrentItem].mFullTitle = getCurrentLocationTitle(true, new_pos_local); - mItems[mCurrentItem].mTitle = getCurrentLocationTitle(false, new_pos_local); - mItems[mCurrentItem].mGlobalPos = new_pos; - mItems[mCurrentItem].mRegionID = gAgent.getRegion()->getRegionID(); -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - } - else - { - mItems[mCurrentItem] = LLTeleportHistoryItem(RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL), LLVector3d::zero); - } -// [/RLVa:KB] + LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos); + mItems[mCurrentItem].mFullTitle = getCurrentLocationTitle(true, new_pos_local); + mItems[mCurrentItem].mTitle = getCurrentLocationTitle(false, new_pos_local); + mItems[mCurrentItem].mGlobalPos = new_pos; + mItems[mCurrentItem].mRegionID = gAgent.getRegion()->getRegionID(); } dump(); diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h index 11b273f94e..e45dc28f9b 100644 --- a/indra/newview/llteleporthistory.h +++ b/indra/newview/llteleporthistory.h @@ -231,10 +231,6 @@ private: * Using this connection we get notified when a teleport fails. */ boost::signals2::connection mTeleportFailedConn; - -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - friend class RlvUIEnabler; -// [/RLVa:KB] }; #endif diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index 7961f8fba7..0ba455e7d5 100644 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -33,9 +33,6 @@ #include "lldir.h" #include "llteleporthistory.h" #include "llagent.h" -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) -#include "rlvhandler.h" -// [/RLVa:KB] // Max offset for two global positions to consider them as equal const F64 MAX_GLOBAL_POS_OFFSET = 5.0f; @@ -94,13 +91,6 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange() } const LLTeleportHistoryItem &item = th->getItems()[th->getCurrentItemIndex()]; -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - // Make sure we don't attempt to save zero'ed out teleport history items - if (item.mGlobalPos.isExactlyZero()) - { - return; - } -// [/RLVa:KB] addItem(item.mTitle, item.mGlobalPos); save(); @@ -125,13 +115,6 @@ bool LLTeleportHistoryStorage::compareByTitleAndGlobalPos(const LLTeleportHistor void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d& global_pos, const LLDate& date) { -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { - return; - } -// [/RLVa:KB] - LLTeleportHistoryPersistentItem item(title, global_pos, date); slurl_list_t::iterator item_iter = std::find_if(mItems.begin(), mItems.end(), diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h index b0e435c138..6cae0a3454 100644 --- a/indra/newview/llteleporthistorystorage.h +++ b/indra/newview/llteleporthistorystorage.h @@ -111,11 +111,7 @@ public: */ void goToItem(S32 idx); -//private: -// [RLVa:KB] - Checked: 2010-09-03 (RLVa-1.2.1b) | Added: RLVa-1.2.1b -protected: - friend class RlvUIEnabler; -// [/RLVa:KB] +private: void onTeleportHistoryChange(); bool compareByTitleAndGlobalPos(const LLTeleportHistoryPersistentItem& a, const LLTeleportHistoryPersistentItem& b); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 8176b8c1f9..c3090cb1fc 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -35,13 +35,6 @@ using namespace LLNotificationsUI; -//-------------------------------------------------------------------------- -LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period) - : mToast(toast), - LLEventTimer(period) -{ -} - /*virtual*/ BOOL LLToastLifeTimer::tick() { @@ -52,38 +45,6 @@ BOOL LLToastLifeTimer::tick() return FALSE; } -void LLToastLifeTimer::stop() -{ - mEventTimer.stop(); -} - -void LLToastLifeTimer::start() -{ - mEventTimer.start(); -} - -void LLToastLifeTimer::restart() -{ - mEventTimer.reset(); -} - -BOOL LLToastLifeTimer::getStarted() -{ - return mEventTimer.getStarted(); -} - -void LLToastLifeTimer::setPeriod(F32 period) -{ - mPeriod = period; -} - -F32 LLToastLifeTimer::getRemainingTimeF32() -{ - F32 et = mEventTimer.getElapsedTimeF32(); - if (!getStarted() || et > mPeriod) return 0.0f; - return mPeriod - et; -} - //-------------------------------------------------------------------------- LLToast::Params::Params() : can_fade("can_fade", true), @@ -112,8 +73,7 @@ LLToast::LLToast(const LLToast::Params& p) mIsHidden(false), mHideBtnPressed(false), mIsTip(p.is_tip), - mWrapperPanel(NULL), - mIsTransparent(false) + mWrapperPanel(NULL) { mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); @@ -183,7 +143,6 @@ LLToast::~LLToast() void LLToast::hide() { setVisible(FALSE); - setTransparentState(false); mTimer->stop(); mIsHidden = true; mOnFadeSignal(this); @@ -207,16 +166,6 @@ void LLToast::onFocusReceived() } } -void LLToast::setLifetime(S32 seconds) -{ - mToastLifetime = seconds; -} - -void LLToast::setFadingTime(S32 seconds) -{ - mToastFadingTime = seconds; -} - S32 LLToast::getTopPad() { if(mWrapperPanel) @@ -246,46 +195,13 @@ void LLToast::setCanFade(bool can_fade) //-------------------------------------------------------------------------- void LLToast::expire() { - if (mCanFade) + // if toast has fade property - hide it + if(mCanFade) { - if (mIsTransparent) - { - hide(); - } - else - { - setTransparentState(true); - mTimer->restart(); - } + hide(); } } -void LLToast::setTransparentState(bool transparent) -{ - setBackgroundOpaque(!transparent); - mIsTransparent = transparent; - - if (transparent) - { - mTimer->setPeriod(mToastFadingTime); - } - else - { - mTimer->setPeriod(mToastLifetime); - } -} - -F32 LLToast::getTimeLeftToLive() -{ - F32 time_to_live = mTimer->getRemainingTimeF32(); - - if (!mIsTransparent) - { - time_to_live += mToastFadingTime; - } - - return time_to_live; -} //-------------------------------------------------------------------------- void LLToast::reshapeToPanel() @@ -329,6 +245,13 @@ void LLToast::draw() drawChild(mHideBtn); } } + + // if timer started and remaining time <= fading time + if (mTimer->getStarted() && (mToastLifetime + - mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime) + { + setBackgroundOpaque(FALSE); + } } //-------------------------------------------------------------------------- @@ -344,11 +267,6 @@ void LLToast::setVisible(BOOL show) return; } - if (show && getVisible()) - { - return; - } - if(show) { setBackgroundOpaque(TRUE); @@ -454,8 +372,7 @@ void LLNotificationsUI::LLToast::stopFading() { if(mCanFade) { - setTransparentState(false); - mTimer->stop(); + stopTimer(); } } @@ -463,8 +380,7 @@ void LLNotificationsUI::LLToast::startFading() { if(mCanFade) { - setTransparentState(false); - mTimer->start(); + resetTimer(); } } diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index fb534561c9..0a96c092a0 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -49,16 +49,14 @@ class LLToast; class LLToastLifeTimer: public LLEventTimer { public: - LLToastLifeTimer(LLToast* toast, F32 period); + LLToastLifeTimer(LLToast* toast, F32 period) : mToast(toast), LLEventTimer(period){} /*virtual*/ BOOL tick(); - void stop(); - void start(); - void restart(); - BOOL getStarted(); - void setPeriod(F32 period); - F32 getRemainingTimeF32(); + void stop() { mEventTimer.stop(); } + void start() { mEventTimer.start(); } + void restart() {mEventTimer.reset(); } + BOOL getStarted() { return mEventTimer.getStarted(); } LLTimer& getEventTimer() { return mEventTimer;} private : @@ -82,14 +80,8 @@ public: Optional notif_id, //notification ID session_id; //im session ID Optional notification; - - //NOTE: Life time of a toast (i.e. period of time from the moment toast was shown - //till the moment when toast was hidden) is the sum of lifetime_secs and fading_time_secs. - - Optional lifetime_secs, // Number of seconds while a toast is non-transparent - fading_time_secs; // Number of seconds while a toast is transparent - - + Optional lifetime_secs, + fading_time_secs; // Number of seconds while a toast is fading Optional on_delete_toast, on_mouse_enter; Optional can_fade, @@ -133,8 +125,10 @@ public: LLPanel* getPanel() { return mPanel; } // enable/disable Toast's Hide button void setHideButtonEnabled(bool enabled); + // + void resetTimer() { mTimer->start(); } // - F32 getTimeLeftToLive(); + void stopTimer() { mTimer->stop(); } // LLToastLifeTimer* getTimer() { return mTimer.get();} // @@ -150,10 +144,6 @@ public: /*virtual*/ void onFocusReceived(); - void setLifetime(S32 seconds); - - void setFadingTime(S32 seconds); - /** * Returns padding between floater top and wrapper_panel top. * This padding should be taken into account when positioning or reshaping toasts @@ -206,9 +196,7 @@ private: void onToastMouseLeave(); - void expire(); - - void setTransparentState(bool transparent); + void expire(); LLUUID mNotificationID; LLUUID mSessionID; @@ -234,7 +222,6 @@ private: bool mHideBtnPressed; bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849) bool mIsTip; - bool mIsTransparent; commit_signal_t mToastMouseEnterSignal; commit_signal_t mToastMouseLeaveSignal; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 0737714b04..1c745906aa 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -58,9 +58,6 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" -// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] // syntactic sugar #define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember)) @@ -1138,15 +1135,6 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, return; } - -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a - // Fallback in case there's a new code path that leads here (see behaviour notes) - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) ) - { - return; - } -// [/RLVa:KB] - //llinfos << "Rezzing object" << llendl; make_ui_sound("UISndObjectRezIn"); LLViewerInventoryItem* item; @@ -1412,23 +1400,6 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); BOOL attached = obj->isAttachment(); BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; - -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0c - if (rlv_handler_t::isEnabled()) - { - const LLViewerObject* pObjRoot = obj->getRootEdit(); - if (gRlvAttachmentLocks.isLockedAttachment(pObjRoot)) - { - return ACCEPT_NO_LOCKED; // Disallow inventory drops on a locked attachment - } - else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) - { - if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == pObjRoot) ) - return ACCEPT_NO_LOCKED; // ... or on a linkset the avie is sitting on under @unsit=n/@sittp=n - } - } -// [/RLVa:KB] - if (attached && !unrestricted) { return ACCEPT_NO_LOCKED; @@ -1647,24 +1618,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( return ACCEPT_NO; } -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) - { - ERlvWearMask eWearMask = gRlvAttachmentLocks.canAttach(item); bool fReplace = !(mask & MASK_CONTROL); - if ( ((!fReplace) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((fReplace) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) ) - return ACCEPT_NO_LOCKED; - } -// [/RLVa:KB] - if (drop) { if (mSource == SOURCE_LIBRARY) { -// LLPointer cb = new RezAttachmentCallback(0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - // Make this behave consistent with dad3dWearItem - LLPointer cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL)); -// [/SL:KB] + LLPointer cb = new RezAttachmentCallback(0); copy_inventory_item( gAgent.getID(), item->getPermissions().getOwner(), @@ -1675,11 +1633,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( } else { -// rez_attachment(item, 0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - // Make this behave consistent with dad3dWearItem - rez_attachment(item, 0, !(mask & MASK_CONTROL)); -// [/SL:KB] + rez_attachment(item, 0); } } return ACCEPT_YES_SINGLE; @@ -1689,14 +1643,6 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // RELEASE-RLVa: [SL-2.2.0] Make sure the code below is the only code path to LLToolDragAndDrop::dad3dRezFromObjectOnLand() - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) ) - { - return ACCEPT_NO_LOCKED; - } -// [/RLVa:KB] - if (mSource == SOURCE_WORLD) { return dad3dRezFromObjectOnLand(obj, face, mask, drop); @@ -1758,18 +1704,6 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // NOTE: if (mask & MASK_CONTROL) then it's a drop rather than a rez, so we let that pass through when @rez=n restricted - // (but not when @interact=n restricted unless the drop target is a HUD attachment) - // RELEASE-RLVa: [SL-2.2.0] Make sure the code below is the only code path to LLToolDragAndDrop::dad3dRezFromObjectOnObject() - if ( (rlv_handler_t::isEnabled()) && - ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && ((mask & MASK_CONTROL) == 0) ) || - ( (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (((mask & MASK_CONTROL) == 0) || (!obj->isHUDAttachment())) ) ) ) - { - return ACCEPT_NO_LOCKED; - } -// [/RLVa:KB] - // handle objects coming from object inventory if (mSource == SOURCE_WORLD) { @@ -1973,15 +1907,6 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( return ACCEPT_NO; } -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY)) ) - { - ERlvWearMask eWearMask = gRlvWearableLocks.canWear(item); bool fReplace = !(mask & MASK_CONTROL); - if ( ((!fReplace) && ((RLV_WEAR_ADD & eWearMask) == 0)) || ((fReplace) && ((RLV_WEAR_REPLACE & eWearMask) == 0)) ) - return ACCEPT_NO_LOCKED; - } -// [/RLVa:KB] - if (drop) { // TODO: investigate wearables may not be loaded at this point EXT-8231 diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp index 20fffb3012..a00ac10698 100644 --- a/indra/newview/lltoolface.cpp +++ b/indra/newview/lltoolface.cpp @@ -39,9 +39,6 @@ #include "llviewerobject.h" #include "llviewerwindow.h" #include "llfloatertools.h" -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) -#include "rlvhandler.h" -// [/RLVa:KB] // // Member functions @@ -93,15 +90,6 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info) return; } -// [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_FARTOUCH)) && (!gRlvHandler.canTouch(hit_obj, pick_info.mObjectOffset))) ) ) - { - return; - } -// [/RLVa:KB] - // ...clicked on a world object, try to pick the appropriate face if (pick_info.mKeyMask & MASK_SHIFT) diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 477a3d572b..b6c0f662e5 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -57,9 +57,6 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) -#include "rlvhandler.h" -// [/RLVa:KB] const S32 SLOP_DIST_SQ = 4; @@ -161,11 +158,7 @@ void LLToolGrab::pickCallback(const LLPickInfo& pick_info) } // if not over object, do nothing -// if (!objectp) -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.1.0l - // Block initiating a drag operation on an object that can't be touched - if ( (!objectp) || ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(objectp, pick_info.mObjectOffset))) ) -// [/RLVa:KB] + if (!objectp) { LLToolGrab::getInstance()->setMouseCapture(TRUE); LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT; @@ -435,22 +428,6 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask) return TRUE; } -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // Block dragging an object beyond touch range when @fartouch=n restricted - if ( (rlv_handler_t::isEnabled()) && (GRAB_INACTIVE != mMode) && (GRAB_NOOBJECT != mMode) && (hasMouseCapture()) && - (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(mGrabPick.getObject(), mGrabPick.mObjectOffset)) ) - { - if (gGrabTransientTool) - { - // Prevent the grab tool from popping up as soon as we kill the drag operation - gBasicToolset->selectTool(gGrabTransientTool); - gGrabTransientTool = NULL; - } - setMouseCapture(FALSE); - return TRUE; - } -// [/RLVa:KB] - // Do the right hover based on mode switch( mMode ) { diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index f9b413410d..51c0e2eeed 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -55,10 +55,7 @@ #include "llviewerjoystick.h" #include "llviewermenu.h" #include "llviewerparcelmgr.h" -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) -#include "rlvhandler.h" -#include "rlvui.h" -// [/RLVa:KB] + // Used when app not active to avoid processing hover. LLTool* gToolNull = NULL; @@ -83,10 +80,7 @@ LLToolMgr::LLToolMgr() { // Not a panel, register these callbacks globally. LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this)); -// LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this)); -// [RLVa:KB] - Checked: 2010-09-11 (RLVa-1.2.1d) | Added: RLVa-1.2.1d - LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&RlvUIEnabler::isBuildEnabled)); -// [/RLVa:KB] + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this)); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this)); gToolNull = new LLTool(LLStringUtil::null); // Does nothing @@ -297,14 +291,7 @@ void LLToolMgr::toggleBuildMode() } } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - // TODO-RLVa: [RLVa-1.2.1] Does this code actually still ever trigger? - if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) - { - LLSelectMgr::getInstance()->deselectAll(); - } -// [/RLVa:KB] - + setCurrentToolset(gBasicToolset); getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 46d2348ebe..d992d808c7 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -69,9 +69,6 @@ #include "llui.h" #include "llweb.h" #include "pipeline.h" // setHighlightObject -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] extern BOOL gDebugClicks; @@ -188,15 +185,6 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // If it's a left-click, and we have a special action, do it. if (useClickAction(mask, object, parent)) { -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // Block left-click special actions when fartouch restricted - if ( (rlv_handler_t::isEnabled()) && - (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) ) - { - return TRUE; - } -// [/RLVa:KB] - mClickAction = 0; if (object && object->getClickAction()) { @@ -306,14 +294,6 @@ BOOL LLToolPie::pickLeftMouseDownCallback() ((object->usePhysics() || (parent && !parent->isAvatar() && parent->usePhysics())) || touchable) ) { -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // Triggered by left-clicking on a touchable object - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) ) - { - return LLTool::handleMouseDown(x, y, mask); - } -// [/RLVa:KB] - gGrabTransientTool = this; LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() ); return LLToolGrab::getInstance()->handleObjectHit( mPick ); @@ -426,11 +406,7 @@ ECursorType cursor_from_object(LLViewerObject* object) { case CLICK_ACTION_SIT: { -// if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting? -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0g - if ( (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) && - ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, LLToolPie::getInstance()->getHoverPick().mObjectOffset))) ) -// [/RLVa:KB] + if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting? { cursor = UI_CURSOR_TOOLSIT; } @@ -525,19 +501,6 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // Block all special click action cursors when: - // - @fartouch=n restricted and the object is out of range - // - @interact=n restricted and the object isn't a HUD attachment - if ( (object) && (rlv_handler_t::isEnabled()) && - ( ((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && (!gRlvHandler.canTouch(object, mHoverPick.mObjectOffset)) || - ((gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (!object->isHUDAttachment())) ) ) - { - gViewerWindow->setCursor(UI_CURSOR_ARROW); - return TRUE; - } -// [/RLVa:KB] - if (object) { parent = object->getRootEdit(); @@ -559,13 +522,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->setCursor(cursor); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.1.0l - else if ( (object) && (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object)) ) - { - // Block showing the "grab" or "touch" cursor if we can't touch the object (@fartouch=n is handled above) - gViewerWindow->setCursor(UI_CURSOR_ARROW); - } -// [/RLVa:KB] + else if ((object && !object->isAvatar() && object->usePhysics()) || (parent && !parent->isAvatar() && parent->usePhysics())) { @@ -923,16 +880,12 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l std::string full_name; if (!gCacheName->getFullName(hover_object->getID(), full_name)) { - LLNameValue* firstname = hover_object->getNVPair("FirstName"); - LLNameValue* lastname = hover_object->getNVPair("LastName"); - if (firstname && lastname) - { + LLNameValue* firstname = hover_object->getNVPair("FirstName"); + LLNameValue* lastname = hover_object->getNVPair("LastName"); + if (firstname && lastname) + { full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString()); - // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) - full_name = RlvStrings::getAnonym(full_name); - // [/RLVa:KB] } else { @@ -944,44 +897,26 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l if (LLAvatarNameCache::useDisplayNames() && LLAvatarNameCache::get(hover_object->getID(), &av_name)) { - // RLVa - if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) - final_name = full_name; - else - final_name = av_name.getCompleteName(); - // RLVa + final_name = av_name.getCompleteName(); } else { final_name = full_name; } - // *HACK: We may select this object, so pretend it was clicked mPick = mHoverPick; -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if ( (!rlv_handler_t::isEnabled()) || - ( (gRlvHandler.canTouch(hover_object, mHoverPick.mObjectOffset)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) ) - { -// [/RLVa:KB] - LLInspector::Params p; - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - p.message(final_name); - p.image.name("Inspector_I"); - p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); - p.visible_time_near(6.f); - p.visible_time_far(3.f); - p.delay_time(0.35f); - p.wrap(false); - - LLToolTipMgr::instance().show(p); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - } - else - { - LLToolTipMgr::instance().show(final_name); - } -// [/RLVa:KB] + LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + p.message(final_name); + p.image.name("Inspector_I"); + p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.delay_time(0.35f); + p.wrap(false); + + LLToolTipMgr::instance().show(p); } } else @@ -1084,33 +1019,22 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l { // We may select this object, so pretend it was clicked mPick = mHoverPick; -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canTouch(hover_object, mHoverPick.mObjectOffset)) ) - { -// [/RLVa:KB] - LLInspector::Params p; - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - p.message(tooltip_msg); - p.image.name("Inspector_I"); - p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); - p.time_based_media(is_time_based_media); - p.web_based_media(is_web_based_media); - p.media_playing(is_media_playing); - p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)); - p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)); - p.visible_time_near(6.f); - p.visible_time_far(3.f); - p.delay_time(0.35f); - p.wrap(false); - - LLToolTipMgr::instance().show(p); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - } - else - { - LLToolTipMgr::instance().show(tooltip_msg); - } -// [/RLVa:KB] + LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + p.message(tooltip_msg); + p.image.name("Inspector_I"); + p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); + p.time_based_media(is_time_based_media); + p.web_based_media(is_web_based_media); + p.media_playing(is_media_playing); + p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)); + p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.delay_time(0.35f); + p.wrap(false); + + LLToolTipMgr::instance().show(p); } } } @@ -1122,11 +1046,6 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) { if (!LLUI::sSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE; if (!mHoverPick.isValid()) return TRUE; -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -#ifdef RLV_EXTENSION_CMD_INTERACT - if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) return TRUE; -#endif // RLV_EXTENSION_CMD_INTERACT -// [/RLVa:KB] LLViewerObject* hover_object = mHoverPick.getObject(); @@ -1638,29 +1557,16 @@ BOOL LLToolPie::pickRightMouseDownCallback() mute_msg = LLTrans::getString("MuteAvatar"); } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // Don't show the context menu on empty selection when fartouch restricted [see LLToolSelect::handleObjectSelection()] - if ( (!rlv_handler_t::isEnabled()) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) || - (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) ) + if (is_other_attachment) { -// [/RLVa:KB] - if (is_other_attachment) - { - gMenuAttachmentOther->getChild("Avatar Mute")->setValue(mute_msg); - gMenuAttachmentOther->show(x, y); - } - else - { - gMenuAvatarOther->getChild("Avatar Mute")->setValue(mute_msg); - gMenuAvatarOther->show(x, y); - } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l + gMenuAttachmentOther->getChild("Avatar Mute")->setValue(mute_msg); + gMenuAttachmentOther->show(x, y); } else { - make_ui_sound("UISndInvalidOp"); + gMenuAvatarOther->getChild("Avatar Mute")->setValue(mute_msg); + gMenuAvatarOther->show(x, y); } -// [/RLVa:KB] } else if (object->isAttachment()) { @@ -1685,24 +1591,10 @@ BOOL LLToolPie::pickRightMouseDownCallback() mute_msg = LLTrans::getString("MuteObject2"); } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.el) | Modified: RLVa-1.1.0l - // Don't show the pie menu on empty selection when fartouch/interaction restricted - // (not entirely accurate in case of Tools / Select Only XXX [see LLToolSelect::handleObjectSelection()] - if ( (!rlv_handler_t::isEnabled()) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) || - (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) ) - { -// [/RLVa:KB] - gMenuHolder->getChild("Object Mute")->setValue(mute_msg); - gMenuObject->show(x, y); + gMenuHolder->getChild("Object Mute")->setValue(mute_msg); + gMenuObject->show(x, y); - showVisualContextMenuEffect(); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.el) | Modified: RLVa-1.1.0l - } - else - { - make_ui_sound("UISndInvalidOp"); - } -// [/RLVa:KB] + showVisualContextMenuEffect(); } } diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 1d3453ba0b..65cb3e36a7 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -60,9 +60,6 @@ public: virtual LLTool* getOverrideTool(MASK mask); LLPickInfo& getPick() { return mPick; } -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.2.0a - LLPickInfo& getHoverPick() { return mHoverPick; } -// [/RLVa:KB] U8 getClickAction() { return mClickAction; } LLViewerObject* getClickActionObject() { return mClickActionObject; } LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; } diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 5f2ab5fe51..93ba3b2558 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -43,9 +43,6 @@ #include "llviewerwindow.h" #include "llworld.h" #include "llui.h" -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] //Headers added for functions moved from viewer.cpp #include "llvograss.h" @@ -126,14 +123,6 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, return FALSE; } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f - // NOTE: don't use surface_pos_global since for prims it will be the center of the prim while we need center + offset - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > 1.5f * 1.5f) ) - { - return FALSE; - } -// [/RLVa:KB] - // Find the sim where the surface lives. LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global); if (!regionp) @@ -251,10 +240,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) { flags |= FLAGS_USE_PHYSICS; } -// if (create_selected) -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.0.0b - if ( (create_selected) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) -// [/RLVa:KB] + if (create_selected) { flags |= FLAGS_CREATE_SELECTED; } @@ -512,13 +498,6 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) { BOOL added = TRUE; -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) ) - { - return TRUE; // Callers seem to expect a "did you handle it?" so we return TRUE rather than FALSE - } -// [/RLVa:KB] - if (gSavedSettings.getBOOL("CreateToolCopySelection")) { added = addDuplicate(x, y); diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 3ff7b5cf48..7c604a04bf 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -45,10 +45,6 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) -#include "rlvhandler.h" -#include "llfloaterreg.h" -// [/RLVa:KB] // Globals //extern BOOL gAllowSelectAvatar; @@ -82,35 +78,6 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi { object = object->getRootEdit(); } - -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - if (rlv_handler_t::isEnabled()) - { - if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) - { - if (!temp_select) - return LLSelectMgr::getInstance()->getSelection(); - else if (LLToolMgr::instance().inBuildMode()) - LLToolMgr::instance().toggleBuildMode(); - } - - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (object) && ((!object->isAttachment()) || (!object->permYouOwner())) && - (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) ) - { - // NOTE: see behaviour notes for a rather lengthy explanation of why we're doing things this way - //if (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion() + pick.mObjectOffset) > 1.5f * 1.5f) - if (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) - { - if ( (LLFloaterReg::floaterInstanceVisible("build")) && (pick.mKeyMask != MASK_SHIFT) && (pick.mKeyMask != MASK_CONTROL) ) - LLSelectMgr::getInstance()->deselectAll(); - return LLSelectMgr::getInstance()->getSelection(); - } - else if (LLToolMgr::instance().inBuildMode()) - LLToolMgr::instance().toggleBuildMode(); - } - } -// [/RLVa:KB] - BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index b665ddc185..c3dd17def9 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -61,10 +61,6 @@ #include "llworldmapview.h" #include "llviewercontrol.h" -// [RLVa:KB] -#include "rlvhandler.h" -// [/RLVa:KB] - const F32 DESTINATION_REACHED_RADIUS = 3.0f; const F32 DESTINATION_VISITED_RADIUS = 6.0f; diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index f124d717c3..cbb1d25f78 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -40,9 +40,6 @@ #include "llworld.h" #include "lltoolmgr.h" #include "llviewerjoystick.h" -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) -#include "rlvhandler.h" -// [/RLVa:KB] // Linden library includes #include "lldrawable.h" @@ -348,10 +345,7 @@ void LLViewerCamera::setPerspective(BOOL for_selection, if (limit_select_distance) { // ...select distance from control -// z_far = gSavedSettings.getF32("MaxSelectDistance"); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - z_far = (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5; -// [/RLVa:KB] + z_far = gSavedSettings.getF32("MaxSelectDistance"); } else { diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 9ace4829fa..6640e32cd2 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -77,9 +77,6 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) -#include "rlvhandler.h" -// [/RLVa:KB] extern LLPointer gStartTexture; @@ -576,8 +573,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) S32 water_clip = 0; if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT) > 1) && - (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER) || - gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOIDWATER))) + gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_WATER)) { if (LLViewerCamera::getInstance()->cameraUnderWater()) { @@ -925,11 +921,7 @@ void render_hud_attachments() glh::matrix4f current_mod = glh_get_current_modelview(); // clamp target zoom level to reasonable values -// gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f); -// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c - gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, (!gRlvAttachmentLocks.hasLockedHUD()) ? 0.1f : 0.85f, 1.f); -// [/RLVa:KB] - + gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f); // smoothly interpolate current zoom level gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f)); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 4b4945176a..b3f14b441d 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -121,9 +121,7 @@ #include "llsyswellwindow.h" #include "llscriptfloater.h" // *NOTE: Please add files in alphabetical order to keep merges easy. -// [RLVa:KB] - Checked: 2010-03-11 -#include "rlvfloaters.h" -// [/RLVa:KB] + void LLViewerFloaterReg::registerFloaters() { @@ -230,10 +228,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("reporter", "floater_report_abuse.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("region_info", "floater_region_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0a - LLFloaterReg::add("rlv_behaviours", "floater_rlv_behaviours.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("rlv_locks", "floater_rlv_locks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -// [/RLVa:KB] LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 4432136a1f..7dbaa4cf92 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -941,13 +941,9 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) } } -//RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a -RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace) - : mAttach(attachmentp), mReplace(replace) -// [/SL:KB] +RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) { -// mAttach = attachmentp; + mAttach = attachmentp; } RezAttachmentCallback::~RezAttachmentCallback() { @@ -961,10 +957,7 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (item) { -// rez_attachment(item, mAttach); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - rez_attachment(item, mAttach, mReplace); -// [/SL:KB] + rez_attachment(item, mAttach); } } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 7833cbafd2..1af06a1be8 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -262,10 +262,7 @@ class LLViewerJointAttachment; class RezAttachmentCallback : public LLInventoryCallback { public: -// RezAttachmentCallback(LLViewerJointAttachment *attachmentp); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false); -// [/SL:KB] + RezAttachmentCallback(LLViewerJointAttachment *attachmentp); void fire(const LLUUID& inv_item); protected: @@ -273,9 +270,6 @@ protected: private: LLViewerJointAttachment* mAttach; -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - bool mReplace; -// [/SL:KB] }; class ActivateGestureCallback : public LLInventoryCallback diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0f7e2de516..ccf3df827d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -106,10 +106,6 @@ #include "lleconomy.h" #include "boost/unordered_map.hpp" -// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] - using namespace LLVOAvatarDefines; static boost::unordered_map sDefaultItemLabels; @@ -225,6 +221,8 @@ BOOL check_show_xui_names(void *); // Debug UI void handle_buy_currency_test(void*); +void handle_save_to_xml(void*); +void handle_load_from_xml(void*); void handle_god_mode(void*); @@ -1080,10 +1078,7 @@ class LLAdvancedToggleWireframe : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// gUseWireframe = !(gUseWireframe); -// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - gUseWireframe = (!gUseWireframe) && (!gRlvAttachmentLocks.hasLockedHUD()); -// [/RLVa:KB] + gUseWireframe = !(gUseWireframe); LLPipeline::updateRenderDeferred(); gPipeline.resetVertexBuffers(); return true; @@ -1389,6 +1384,37 @@ class LLAdvancedCheckDebugWindowProc : public view_listener_t // ------------------------------XUI MENU --------------------------- +////////////////////// +// LOAD UI FROM XML // +////////////////////// + + +class LLAdvancedLoadUIFromXML : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + handle_load_from_xml(NULL); + return true; +} +}; + + + +//////////////////// +// SAVE UI TO XML // +//////////////////// + + +class LLAdvancedSaveUIToXML : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + handle_save_to_xml(NULL); + return true; +} +}; + + class LLAdvancedSendTestIms : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -2341,15 +2367,6 @@ void handle_object_touch() LLPickInfo pick = LLToolPie::getInstance()->getPick(); -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - // NOTE: fallback code since we really shouldn't be getting an active selection if we can't touch this - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, pick.mObjectOffset)) ) - { - RLV_ASSERT(false); - return; - } -// [/RLVa:KB] - LLMessageSystem *msg = gMessageSystem; msg->newMessageFast(_PREHASH_ObjectGrab); @@ -2453,11 +2470,7 @@ bool enable_object_touch(LLUICtrl* ctrl) void handle_object_open() { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if (enable_object_open()) - LLFloaterReg::showInstance("openobject"); -// [/RLVa:KB] -// LLFloaterReg::showInstance("openobject"); + LLFloaterReg::showInstance("openobject"); } bool enable_object_open() @@ -2684,10 +2697,7 @@ bool enable_object_edit() } else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { -// enable = true; -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - enable = !gRlvHandler.hasBehaviour(RLV_BHVR_EDIT); -// [/RLVa:KB] + enable = true; } return enable; @@ -2720,10 +2730,7 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; -// if (attachment->getNumObjects() > 0) -// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - if ( (attachment->getNumObjects() > 0) && ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(attachment))) ) -// [/RLVa:KB] + if (attachment->getNumObjects() > 0) { new_value = true; break; @@ -2766,10 +2773,7 @@ bool enable_object_mute() bool is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); bool is_self = avatar->isSelf(); -// return !is_linden && !is_self; -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - return !is_linden && !is_self && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); -// [/RLVa:KB] + return !is_linden && !is_self; } else { @@ -2792,10 +2796,6 @@ class LLObjectMute : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(object); if (avatar) { -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) - return true; -// [/RLVa:KB] id = avatar->getID(); LLNameValue *firstname = avatar->getNVPair("FirstName"); @@ -2949,10 +2949,7 @@ void handle_avatar_freeze(const LLSD& avatar_id) if (!fullname.empty()) { LLSD args; -// args["AVATAR_NAME"] = fullname; -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e - args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); -// [/RLVa:KB] + args["AVATAR_NAME"] = fullname; LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, @@ -3081,10 +3078,7 @@ void handle_avatar_eject(const LLSD& avatar_id) if (!fullname.empty()) { LLSD args; -// args["AVATAR_NAME"] = fullname; -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e - args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); -// [/RLVa:KB] + args["AVATAR_NAME"] = fullname; LLNotificationsUtil::add("EjectAvatarFullname", args, payload, @@ -3104,10 +3098,7 @@ void handle_avatar_eject(const LLSD& avatar_id) if (!fullname.empty()) { LLSD args; -// args["AVATAR_NAME"] = fullname; -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e - args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname); -// [/RLVa:KB] + args["AVATAR_NAME"] = fullname; LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, @@ -3159,62 +3150,6 @@ bool enable_freeze_eject(const LLSD& avatar_id) } -class LLAvatarGiveCard : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - llinfos << "handle_give_card()" << llendl; - LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); -// if(dest && dest->isAvatar()) -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d - if ( (dest && dest->isAvatar()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] - { - bool found_name = false; - LLSD args; - LLSD old_args; - LLNameValue* nvfirst = dest->getNVPair("FirstName"); - LLNameValue* nvlast = dest->getNVPair("LastName"); - if(nvfirst && nvlast) - { - args["FIRST"] = nvfirst->getString(); - args["LAST"] = nvlast->getString(); - old_args["FIRST"] = nvfirst->getString(); - old_args["LAST"] = nvlast->getString(); - found_name = true; - } - LLViewerRegion* region = dest->getRegion(); - LLHost dest_host; - if(region) - { - dest_host = region->getHost(); - } - if(found_name && dest_host.isOk()) - { - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("OfferCallingCard"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_AgentBlock); - msg->addUUIDFast(_PREHASH_DestID, dest->getID()); - LLUUID transaction_id; - transaction_id.generate(); - msg->addUUIDFast(_PREHASH_TransactionID, transaction_id); - msg->sendReliable(dest_host); - LLNotificationsUtil::add("OfferedCard", args); - } - else - { - LLNotificationsUtil::add("CantOfferCallingCard", old_args); - } - } - return true; - } -}; - - - void login_done(S32 which, void *user) { llinfos << "Login done " << which << llendl; @@ -3397,10 +3332,7 @@ class LLSelfStandUp : public view_listener_t bool enable_standup_self() { -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - return isAgentAvatarValid() && gAgentAvatarp->isSitting() && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT); -// [/RLVa:KB] -// return isAgentAvatarValid() && gAgentAvatarp->isSitting(); + return isAgentAvatarValid() && gAgentAvatarp->isSitting(); } class LLSelfSitDown : public view_listener_t @@ -3414,10 +3346,7 @@ class LLSelfSitDown : public view_listener_t bool enable_sitdown_self() { -// [RLVa:KB] - Checked: 2010-08-28 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT); -// [/RLVa:KB] -// return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); + return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } // Used from the login screen to aid in UI work on side tray @@ -3632,10 +3561,7 @@ class LLAvatarEnableAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); -// bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()); -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); -// [/RLVa:KB] + bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()); return new_value; } }; @@ -3669,10 +3595,7 @@ class LLEditEnableCustomizeAvatar : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// bool new_value = gAgentWearables.areWearablesLoaded(); -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - bool new_value = gAgentWearables.areWearablesLoaded() && ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand())); -// [/RLVa:KB] + bool new_value = gAgentWearables.areWearablesLoaded(); return new_value; } }; @@ -3687,16 +3610,6 @@ class LLEnableEditShape : public view_listener_t bool is_object_sittable() { -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Added: RLVa-1.1.0j - // RELEASE-RLVa: [SL-2.2.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(); - if ( (pick.mObjectID.notNull()) && (!gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) ) - return false; - } -// [/RLVa:KB] - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (object && object->getPCode() == LL_PCODE_VOLUME) @@ -3728,23 +3641,8 @@ void handle_object_sit_or_stand() // get object selection offset -// if (object && object->getPCode() == LL_PCODE_VOLUME) -// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c - if ( (object && object->getPCode() == LL_PCODE_VOLUME) && - ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, pick.mObjectOffset))) ) -// [/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); @@ -3774,11 +3672,6 @@ class LLLandSit : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if ( (rlv_handler_t::isEnabled()) && ((!gRlvHandler.canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) - return true; -// [/RLVa:KB] - gAgent.standUp(); LLViewerParcelMgr::getInstance()->deselectLand(); @@ -4225,17 +4118,6 @@ void handle_take_copy() { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; -// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) - { - // Allow only if the avie isn't sitting on any of the selected objects - LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); - RlvSelectIsSittingOn f(gAgentAvatarp->getRoot()); - if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE) != NULL) ) - return; - } -// [/RLVa:KB] - const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); } @@ -4246,10 +4128,7 @@ class LLObjectReturn : public view_listener_t bool handleEvent(const LLSD& userdata) { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) return true; -// [/RLVa:KB] - + mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2)); @@ -4281,11 +4160,6 @@ class LLObjectEnableReturn : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) - { - // Do not enable if nothing selected - return false; - } #ifdef HACKED_GODLIKE_VIEWER bool new_value = true; #else @@ -4321,9 +4195,6 @@ class LLObjectEnableReturn : public view_listener_t } } #endif -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - new_value &= (!rlv_handler_t::isEnabled()) || (rlvCanDeleteOrReturn()); -// [/RLVa:KB] return new_value; } }; @@ -4339,14 +4210,11 @@ void handle_take() { // we want to use the folder this was derezzed from if it's // available. Otherwise, derez to the normal place. -// if(LLSelectMgr::getInstance()->getSelection()->isEmpty()) -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - if ( (LLSelectMgr::getInstance()->getSelection()->isEmpty()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) ) -// [/RLVa:KB] + if(LLSelectMgr::getInstance()->getSelection()->isEmpty()) { return; } - + BOOL you_own_everything = TRUE; BOOL locked_but_takeable_object = FALSE; LLUUID category_id; @@ -4459,10 +4327,7 @@ bool confirm_take(const LLSD& notification, const LLSD& response) // one item selected can be copied to inventory. BOOL enable_take() { -// if (sitting_on_selection()) -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - if ( (sitting_on_selection()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) ) -// [/RLVa:KB] + if (sitting_on_selection()) { return FALSE; } @@ -4962,16 +4827,6 @@ class LLToolsEnableUnlink : public view_listener_t bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && first_editable_object && !first_editable_object->isAttachment(); -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g - if ( (new_value) && ((rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand())) ) - { - // Allow only if the avie isn't sitting on any of the selected objects - LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); - RlvSelectIsSittingOn f(gAgentAvatarp->getRoot()); - if (handleSel->getFirstRootNode(&f, TRUE) != NULL) - new_value = false; - } -// [/RLVa:KB] return new_value; } }; @@ -4980,17 +4835,6 @@ class LLToolsUnlink : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g - if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) - { - // Allow only if the avie isn't sitting on any of the selected objects - LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); - RlvSelectIsSittingOn f(gAgentAvatarp->getRoot()); - if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE)) ) - return true; - } -// [/RLVa:KB] - LLSelectMgr::getInstance()->sendDelink(); return true; } @@ -5010,12 +4854,8 @@ class LLToolsReleaseKeys : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) - return true; -// [/RLVa:KB] - gAgent.forceReleaseControls(); + return true; } }; @@ -5024,11 +4864,7 @@ class LLToolsEnableReleaseKeys : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a - return (gAgent.anyControlGrabbed()) && - ( (!rlv_handler_t::isEnabled()) || (!gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ); -// [/RLVa:KB] -// return gAgent.anyControlGrabbed(); + return gAgent.anyControlGrabbed(); } }; @@ -5304,16 +5140,6 @@ void show_debug_menus() gMenuBarView->setItemVisible("Advanced", debug); // gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden - -// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - // NOTE: this is supposed to execute whether RLVa is enabled or not - LLMenuGL* pAdvancedMenu = gMenuBarView->findChildMenuByName("Advanced", FALSE); - if (pAdvancedMenu) - { - pAdvancedMenu->setItemVisible("RLVa", rlv_handler_t::isEnabled()); - pAdvancedMenu->setItemEnabled("RLVa", rlv_handler_t::isEnabled()); - } -// [/RLVa:KB] gMenuBarView->setItemVisible("Debug", qamode); gMenuBarView->setItemEnabled("Debug", qamode); @@ -5476,11 +5302,6 @@ class LLWorldCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.0.0a - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - return true; -// [/RLVa:KB] - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); return true; @@ -5566,10 +5387,7 @@ class LLAvatarInviteToGroup : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); -// if(avatar) -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if(avatar) { LLAvatarActions::inviteToGroup(avatar->getID()); } @@ -5582,10 +5400,7 @@ class LLAvatarAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); -// if(avatar && !LLAvatarActions::isFriend(avatar->getID())) -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if(avatar && !LLAvatarActions::isFriend(avatar->getID())) { request_friendship(avatar->getID()); } @@ -5598,10 +5413,7 @@ class LLAvatarAddContact : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); -// if(avatar) -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if(avatar) { create_inventory_callingcard(avatar->getID()); } @@ -5665,10 +5477,7 @@ bool enable_pay_avatar() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); LLVOAvatar* avatar = find_avatar_from_object(obj); -// return (avatar != NULL); -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - return (avatar != NULL) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); -// [/RLVa:KB] + return (avatar != NULL); } bool enable_pay_object() @@ -5688,10 +5497,7 @@ bool enable_pay_object() bool enable_object_stand_up() { // 'Object Stand Up' menu item is enabled when agent is sitting on selection -// return sitting_on_selection(); -// [RLVa:KB] - Checked: 2010-07-24 (RLVa-1.2.0g) | Added: RLVa-1.2.0g - return sitting_on_selection() && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.canStand()) ); -// [/RLVa:KB] + return sitting_on_selection(); } bool enable_object_sit(LLUICtrl* ctrl) @@ -5716,17 +5522,6 @@ bool enable_object_sit(LLUICtrl* ctrl) gMenuHolder->childSetText(item_name, get_default_item_label(item_name)); } } - -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c - // RELEASE-RLVA: [SL-2.2.0] Make this match what happens in handle_object_sit_or_stand() - if (rlv_handler_t::isEnabled()) - { - const LLPickInfo& pick = LLToolPie::getInstance()->getPick(); - if (pick.mObjectID.notNull()) - sitting_on_sel = !gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset); - } -// [/RLVa:KB] - return !sitting_on_sel && is_object_sittable(); } @@ -5941,10 +5736,7 @@ class LLShowAgentProfile : public view_listener_t } LLVOAvatar* avatar = find_avatar_from_object(agent_id); -// if (avatar) -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d - if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gAgent.getID() == agent_id)) ) -// [/RLVa:KB] + if (avatar) { LLAvatarActions::showProfile(avatar->getID()); } @@ -6028,19 +5820,6 @@ private: LLViewerJointAttachment* attachment_point = NULL; if (index > 0) attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); - -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - // RELEASE-RLVa: [SL-2.2.0] If 'index != 0' then the object will be "add attached" [see LLSelectMgr::sendAttach()] - if ( (rlv_handler_t::isEnabled()) && - ( ((!index) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default - ((index) && ((RLV_WEAR_ADD & gRlvAttachmentLocks.canAttach(attachment_point)) == 0)) || // or non-attachable attachpt - (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on object == "Take" - { - setObjectSelection(NULL); // Clear the selection or it'll get stuck - return true; - } -// [/RLVa:KB] - confirmReplaceAttachment(0, attachment_point); } return true; @@ -6185,24 +5964,6 @@ class LLAttachmentDrop : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0e) | Modified: RLVa-1.0.5 - if (rlv_handler_t::isEnabled()) - { - if (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) - { - // NOTE: copy/paste of the code in enable_detach() - LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); - RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) - return true; - } - if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) - { - return true; - } - } -// [/RLVa:KB] - LLSD payload; LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -6227,10 +5988,7 @@ class LLAttachmentDetachFromPoint : public view_listener_t bool handleEvent(const LLSD& user_data) { const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL); -// if (attachment->getNumObjects() > 0) -// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - if ( (attachment->getNumObjects() > 0) && ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(attachment))) ) -// [/RLVa:KB] + if (attachment->getNumObjects() > 0) { gMessageSystem->newMessage("ObjectDetach"); gMessageSystem->nextBlockFast(_PREHASH_AgentData); @@ -6242,10 +6000,6 @@ class LLAttachmentDetachFromPoint : public view_listener_t iter++) { LLViewerObject *attached_object = (*iter); -// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(attached_object)) ) - continue; -// [/RLVa:KB] gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID()); } @@ -6257,10 +6011,6 @@ class LLAttachmentDetachFromPoint : public view_listener_t static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data) { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - // RELEASE-RLVa: [SL-2.2.0] When attaching to a specific point the object will be "add attached" [see LLSelectMgr::sendAttach()] - bool fRlvEnable = true; -// [/RLVa:KB] std::string label; LLMenuItemGL* menu = dynamic_cast(ctrl); if (menu) @@ -6285,18 +6035,9 @@ static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data) } } } - -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if (rlv_handler_t::isEnabled()) - fRlvEnable = (!gRlvAttachmentLocks.isLockedAttachmentPoint(attachment, RLV_LOCK_ADD)); -// [/RLVa:KB] - menu->setLabel(label); } -// return true; -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - return fRlvEnable; -// [/RLVa:KB] + return true; } class LLAttachmentDetach : public view_listener_t @@ -6335,17 +6076,6 @@ class LLAttachmentDetach : public view_listener_t return true; } -// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0a) | Modified: RLVa-1.0.5 - // NOTE: copy/paste of the code in enable_detach() - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) - { - LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); - RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) - return true; - } -// [/RLVa:KB] - // The sendDetach() method works on the list of selected // objects. Thus we need to clear the list, make sure it only // contains the object the user clicked, send the message, @@ -6431,10 +6161,7 @@ class LLAttachmentEnableDrop : public view_listener_t } //now check to make sure that the item is actually in the inventory before we enable dropping it -// bool new_value = enable_detach() && can_build && item; -// [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b - bool new_value = enable_detach() && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); -// [/RLVa:KB] + bool new_value = enable_detach() && can_build && item; return new_value; } @@ -6459,20 +6186,6 @@ BOOL enable_detach(const LLSD&) // ...if it's you, good to detach if (avatar->getID() == gAgent.getID()) { -// [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0a) | Modified: RLVa-1.0.5 - // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() - // so any changes here should be reflected there as well - - // RELEASE-RLVa: [SL-2.2.0] LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with - // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) - { - LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); - RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) - return FALSE; - } -// [/RLVa:KB] return TRUE; } @@ -6492,33 +6205,8 @@ class LLAttachmentEnableDetach : public view_listener_t }; // Used to tell if the selected object can be attached to your avatar. -//BOOL object_selected_and_point_valid() -// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -BOOL object_selected_and_point_valid(const LLSD& sdParam) -// [/RLVa:KB] +BOOL object_selected_and_point_valid() { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - if (rlv_handler_t::isEnabled()) - { - if (!isAgentAvatarValid()) - return FALSE; - - // RELEASE-RLVa: [SL-2.2.0] Look at the caller graph for this function on every new release - // - object_is_wearable() => dead code [sdParam == 0 => default attach point => OK!] - // - enabler set up in LLVOAvatarSelf::buildMenus() => Rezzed prim / Put On / "Attach To" [sdParam == idxAttachPt] - // - "Object.EnableWear" enable => Rezzed prim / Put On / "Wear" or "Add" [sdParam blank] - // RELEASE-RLVa: [SL-2.2.0] If 'idxAttachPt != 0' then the object will be "add attached" [see LLSelectMgr::sendAttach()] - const LLViewerJointAttachment* pAttachPt = - get_if_there(gAgentAvatarp->mAttachmentPoints, sdParam.asInteger(), (LLViewerJointAttachment*)NULL); - if ( ((!pAttachPt) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY))) || // Can't wear on default attach point - ((pAttachPt) && ((RLV_WEAR_ADD & gRlvAttachmentLocks.canAttach(pAttachPt)) == 0)) || // or non-attachable attach point - (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attach on object == "Take" - { - return FALSE; - } - } -// [/RLVa:KB] - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); for (LLObjectSelection::root_iterator iter = selection->root_begin(); iter != selection->root_end(); iter++) @@ -6546,12 +6234,9 @@ BOOL object_selected_and_point_valid(const LLSD& sdParam) } -// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -/* BOOL object_is_wearable() { -// if (!object_selected_and_point_valid()) - if (!object_selected_and_point_valid(LLSD(0))) + if (!object_selected_and_point_valid()) { return FALSE; } @@ -6571,8 +6256,7 @@ BOOL object_is_wearable() } return FALSE; } -*/ -// [/RLVa:KB] + class LLAttachmentPointFilled : public view_listener_t { @@ -6582,12 +6266,7 @@ class LLAttachmentPointFilled : public view_listener_t LLVOAvatar::attachment_map_t::iterator found_it = gAgentAvatarp->mAttachmentPoints.find(user_data.asInteger()); if (found_it != gAgentAvatarp->mAttachmentPoints.end()) { -// enable = found_it->second->getNumObjects() > 0; -// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - // Enable the option if there is at least one attachment on this attachment point that can be detached - enable = (found_it->second->getNumObjects() > 0) && - ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(found_it->second))); -// [/RLVa:KB] + enable = found_it->second->getNumObjects() > 0; } return enable; } @@ -6598,10 +6277,7 @@ class LLAvatarSendIM : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); -// if(avatar) -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if(avatar) { LLAvatarActions::startIM(avatar->getID()); } @@ -6614,10 +6290,7 @@ class LLAvatarCall : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); -// if(avatar) -// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d - if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) -// [/RLVa:KB] + if(avatar) { LLAvatarActions::startCall(avatar->getID()); } @@ -6625,13 +6298,6 @@ class LLAvatarCall : public view_listener_t } }; -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b -bool enable_avatar_call() -{ - return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (LLAvatarActions::canCall()); -} -// [/RLVa:KB] - namespace { struct QueueObjects : public LLSelectedObjectFunctor @@ -6694,17 +6360,6 @@ class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a - // We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) - { - LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); - RlvSelectHasLockedAttach f; - if ( (hSel->isAttachment()) && (hSel->getFirstNode(&f) != NULL) ) - return true; - } -// [/RLVa:KB] - std::string action = userdata.asString(); bool mono = false; std::string msg, name; @@ -6805,30 +6460,12 @@ void handle_selected_texture_info(void*) void handle_test_male(void*) { -// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a - // TODO-RLVa: [RLVa-1.2.1] Is there any reason to still block this? - if ( (rlv_handler_t::isEnabled()) && - ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) ) - { - return; - } -// [/RLVa:KB] - LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); //gGestureList.requestResetFromServer( TRUE ); } void handle_test_female(void*) { -// [RLVa:KB] - Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a - // TODO-RLVa: [RLVa-1.2.1] Is there any reason to still block this? - if ( (rlv_handler_t::isEnabled()) && - ((gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) || (gRlvWearableLocks.hasLockedWearableType(RLV_LOCK_ANY))) ) - { - return; - } -// [/RLVa:KB] - LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); //gGestureList.requestResetFromServer( FALSE ); } @@ -6996,22 +6633,6 @@ class LLSomethingSelectedNoHUD : public view_listener_t static bool is_editable_selected() { -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.5a - // RELEASE-RLVa: [SL-2.2.0] Check that this still isn't called by anything but script actions in the Build menu - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) - { - LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection(); - - // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only - // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss) - RlvSelectHasLockedAttach f; - if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&f)) ) - { - return false; - } - } -// [/RLVa:KB] - return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); } @@ -7056,11 +6677,7 @@ bool enable_object_take_copy() { virtual bool apply(LLViewerObject* obj) { -// return (!obj->permCopy() || obj->isAttachment()); -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g - return (!obj->permCopy() || obj->isAttachment()) || - ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->getRoot() == obj) ); -// [/RLVa:KB] + return (!obj->permCopy() || obj->isAttachment()); } } func; const bool firstonly = true; @@ -7193,10 +6810,7 @@ class LLWorldEnableCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// return !LLLandmarkActions::landmarkAlreadyExists(); -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f - return (!LLLandmarkActions::landmarkAlreadyExists()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); -// [/RLVa:KB] + return !LLLandmarkActions::landmarkAlreadyExists(); } }; @@ -7217,10 +6831,6 @@ class LLWorldEnableTeleportHome : public view_listener_t LLViewerRegion* regionp = gAgent.getRegion(); bool agent_on_prelude = (regionp && regionp->isPrelude()); bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude; -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - enable_teleport_home &= - (!rlv_handler_t::isEnabled()) || ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLM)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC))); -// [/RLVa:KB] return enable_teleport_home; } }; @@ -7573,6 +7183,44 @@ const LLRect LLViewerMenuHolderGL::getMenuRect() const return LLRect(0, getRect().getHeight() - MENU_BAR_HEIGHT, getRect().getWidth(), STATUS_BAR_HEIGHT); } +void handle_save_to_xml(void*) +{ + LLFloater* frontmost = gFloaterView->getFrontmost(); + if (!frontmost) + { + LLNotificationsUtil::add("NoFrontmostFloater"); + return; + } + + std::string default_name = "floater_"; + default_name += frontmost->getTitle(); + default_name += ".xml"; + + LLStringUtil::toLower(default_name); + LLStringUtil::replaceChar(default_name, ' ', '_'); + LLStringUtil::replaceChar(default_name, '/', '_'); + LLStringUtil::replaceChar(default_name, ':', '_'); + LLStringUtil::replaceChar(default_name, '"', '_'); + + LLFilePicker& picker = LLFilePicker::instance(); + if (picker.getSaveFile(LLFilePicker::FFSAVE_XML, default_name)) + { + std::string filename = picker.getFirstFile(); + LLUICtrlFactory::getInstance()->saveToXML(frontmost, filename); + } +} + +void handle_load_from_xml(void*) +{ + LLFilePicker& picker = LLFilePicker::instance(); + if (picker.getOpenFile(LLFilePicker::FFLOAD_XML)) + { + std::string filename = picker.getFirstFile(); + LLFloater* floater = new LLFloater(LLSD()); + floater->buildFromFile(filename); + } +} + void handle_web_browser_test(const LLSD& param) { std::string url = param.asString(); @@ -7644,11 +7292,6 @@ class LLViewHighlightTransparent : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!LLDrawPoolAlpha::sShowDebugAlpha)) - return true; -// [/RLVa:KB] - LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; return true; } @@ -7835,11 +7478,6 @@ class LLViewShowHUDAttachments : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c - if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedHUD()) && (LLPipeline::sShowHUDAttachments) ) - return true; -// [/RLVa:KB] - LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; return true; } @@ -7860,15 +7498,8 @@ class LLEditEnableTakeOff : public view_listener_t { std::string clothing = userdata.asString(); LLWearableType::EType type = LLWearableType::typeNameToType(clothing); -// if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) -// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a - // NOTE: see below - enable if there is at least one wearable on this type that can be removed - if ( (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) && - ((!rlv_handler_t::isEnabled()) || (gRlvWearableLocks.canRemove(type))) ) -// [/RLVa:KB] - { + if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) return LLAgentWearables::selfHasWearable(type); - } return false; } }; @@ -7889,22 +7520,6 @@ class LLEditTakeOff : public view_listener_t { // MULTI-WEARABLES: assuming user wanted to remove top shirt. U32 wearable_index = gAgentWearables.getWearableCount(type) - 1; - -// [RLVa:KB] - Checked: 2010-06-09 (RLVa-1.2.0g) | Added: RLVa-1.2.0g - if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearable(type)) ) - { - // We'll use the first wearable we come across that can be removed (moving from top to bottom) - for (; wearable_index >= 0; wearable_index--) - { - const LLWearable* pWearable = gAgentWearables.getWearable(type, wearable_index); - if (!gRlvWearableLocks.isLockedWearable(pWearable)) - break; - } - if (wearable_index < 0) - return true; // No wearable found that can be removed - } -// [/RLVa:KB] - LLViewerInventoryItem *item = dynamic_cast(gAgentWearables.getWearableInventoryItem(type,wearable_index)); LLWearableBridge::removeItemFromAvatar(item); } @@ -7948,11 +7563,6 @@ class LLWorldEnvSettings : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g - if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) - return true; -// [/RLVa:KB] - std::string tod = userdata.asString(); LLVector3 sun_direction; @@ -8396,6 +8006,8 @@ void initialize_menus() // Advanced > XUI commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); + view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); + view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames"); view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames"); view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs"); @@ -8503,10 +8115,7 @@ void initialize_menus() commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); -// enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); -// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b - enable.add("Avatar.EnableCall", boost::bind(&enable_avatar_call)); -// [/RLVa:KB] + enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); @@ -8534,10 +8143,7 @@ void initialize_menus() enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); -// enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); -// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid, _2)); -// [/RLVa:KB] + enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); enable.add("Object.EnableStandUp", boost::bind(&enable_object_stand_up)); enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1)); @@ -8591,14 +8197,6 @@ void initialize_menus() view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected"); view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono"); - view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); -// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Added: RLVa-1.2.0 - commit.add("RLV.ToggleEnabled", boost::bind(&rlvMenuToggleEnabled)); - enable.add("RLV.CheckEnabled", boost::bind(&rlvMenuCheckEnabled)); - if (rlv_handler_t::isEnabled()) - { - enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2)); - } -// [/RLVa:KB] + view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints"); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1e152e3a09..9b1f2e67c6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -105,11 +105,6 @@ #include "llagentui.h" #include "llpanelblockedlist.h" #include "llpanelplaceprofile.h" -// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a) -#include "rlvhandler.h" -#include "rlvinventory.h" -#include "rlvui.h" -// [/RLVa:KB] #include // #include @@ -1397,14 +1392,7 @@ void LLOfferInfo::send_auto_receive_response(void) if(IM_INVENTORY_OFFERED == mIM) { // add buddy to recent people list -// LLRecentPeople::instance().add(mFromID); -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // RELEASE-RLVa: [RLVa-1.2.0] Make sure this stays in sync with the condition in inventory_offer_handler() - if ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (!RlvUtil::isNearbyAgent(mFromID)) || (RlvUIEnabler::hasOpenIM(mFromID))) - { - LLRecentPeople::instance().add(mFromID); - } -// [/RLVa:KB] + LLRecentPeople::instance().add(mFromID); } } @@ -1475,21 +1463,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // This is an offer from an agent. In this case, the back // end has already copied the items into your inventory, // so we can fetch it out of our inventory. -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e -#ifdef RLV_EXTENSION_GIVETORLV_A2A - if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && (LLAssetType::AT_CATEGORY == mType) && - (RlvInventory::instance().getSharedRoot()) && (mDesc.find(RLV_PUTINV_PREFIX) == 0) ) - { - RlvGiveToRLVAgentOffer* pOfferObserver = new RlvGiveToRLVAgentOffer(mObjectID); - pOfferObserver->startFetch(); - if (pOfferObserver->isFinished()) - pOfferObserver->done(); - else - gInventory.addObserver(pOfferObserver); - } -#endif // RLV_EXTENSION_GIVETORLV_A2A -// [/RLVa:KB] - LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string); open_agent_offer->startFetch(); if(catp || (itemp && itemp->isFinished())) @@ -1538,12 +1511,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // MUTE falls through to decline case IOR_DECLINE: { - { - LLStringUtil::format_map_t log_message_args; - log_message_args["DESC"] = mDesc; - log_message_args["NAME"] = mFromName; - log_message = LLTrans::getString("InvOfferDecline", log_message_args); - } + log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; chat.mText = log_message; if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 { @@ -1662,13 +1630,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const std::string full_name; if (gCacheName->getFullName(mFromID, full_name)) { -// [RLVa:KB] - Checked: 2010-04-022 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - // RELEASE-RLVa: [RLVa-1.2.0] Make sure this stays in sync with the condition in inventory_offer_handler() - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(mFromID)) && - (!RlvUIEnabler::hasOpenIM(mFromID)) ) - { - full_name = RlvStrings::getAnonym(full_name); - } from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + full_name; chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + full_name; @@ -1688,40 +1649,12 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const bool busy=FALSE; -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e - bool fRlvNotifyAccepted = false; -// [/RLVa:KB] switch(button) { case IOR_ACCEPT: // ACCEPT. The math for the dialog works, because the accept // for inventory_offered, task_inventory_offer or // group_notice_inventory is 1 greater than the offer integer value. - -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Modified: RLVa-1.2.1e - // Only change the inventory offer's destination folder to the shared root if: - // - the user has enabled the feature - // - the inventory offer came from a script (and specifies a folder) - // - the name starts with the prefix - mDesc format: '[OBJECTNAME]' ( http://slurl.com/... ) - if ( (rlv_handler_t::isEnabled()) && - (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) - { - fRlvNotifyAccepted = true; - if (!RlvSettings::getForbidGiveToRLV()) - { - const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot(); - if (pRlvRoot) - { - fRlvNotifyAccepted = false; // "accepted_in_rlv" is sent from RlvGiveToRLVTaskOffer *after* we have the folder - mFolderID = pRlvRoot->getUUID(); - - RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(mTransactionID); - gInventory.addObserver(pOfferObserver); - } - } - } -// [/RLVa:KB] - // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); @@ -1730,15 +1663,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e - if (fRlvNotifyAccepted) - { - std::string::size_type idxToken = mDesc.find("' ( http://"); - if (std::string::npos != idxToken) - RlvBehaviourNotifyHandler::instance().sendNotification("accepted_in_inv inv_offer " + mDesc.substr(1, idxToken - 1)); - } -// [/RLVa:KB] - //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { @@ -1786,21 +1710,8 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); // send the message msg->sendReliable(mHost); - { -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e - if ( (rlv_handler_t::isEnabled()) && - (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) - { - std::string::size_type idxToken = mDesc.find("' ( http://"); - if (std::string::npos != idxToken) - RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1)); - } -// [/RLVa:KB] - LLStringUtil::format_map_t log_message_args; - log_message_args["DESC"] = mDesc; - log_message_args["NAME"] = mFromName; - log_message = LLTrans::getString("InvOfferDecline", log_message_args); - } + + log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; LLSD args; args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessage", args); @@ -1941,15 +1852,6 @@ void inventory_offer_handler(LLOfferInfo* info) // Object -> Agent Inventory Offer if (info->mFromObject) { -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // Only filter if the object owner is a nearby agent - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) ) - { - payload["rlv_shownames"] = TRUE; - args["NAME"] = args["NAME_SLURL"] = RlvStrings::getAnonym(info->mFromName); - } -// [/RLVa:KB] - // Inventory Slurls don't currently work for non agent transfers, so only display the object name. args["ITEM_SLURL"] = msg; // Note: sets inventory_task_offer_callback as the callback @@ -1961,16 +1863,6 @@ void inventory_offer_handler(LLOfferInfo* info) } else // Agent -> Agent Inventory Offer { -// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - // Only filter if the offer is from a nearby agent and if there's no open IM session (doesn't necessarily have to be focused) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) && - (!RlvUIEnabler::hasOpenIM(info->mFromID)) ) - { - payload["rlv_shownames"] = TRUE; - args["NAME"] = args["NAME_SLURL"] = RlvStrings::getAnonym(info->mFromName); - } -// [/RLVa:KB] - p.responder = info; // Note: sets inventory_offer_callback as the callback // *TODO fix memory leak @@ -2355,18 +2247,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // do nothing -- don't distract newbies in // Prelude with global IMs } -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b - else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) ) - { - // TODO-RLVa: [RLVa-1.2.1] Should we send our version string if the other party is muted? - RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(), session_id); - } -// [/RLVa:KB] -// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g - else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && - ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) ) -// [/RLVa:KB] + else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) { // return a standard "busy" message, but only do it to online IM // (i.e. not other auto responses and not store-and-forward IM) @@ -2425,23 +2306,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { // standard message, not from system - bool mute_im = is_muted; - if(accept_im_from_only_friend&&!is_friend) - { - mute_im = true; - } - -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a - // Don't block offline IMs, or IMs from Lindens - if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!is_linden) && - (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) - { - if (!mute_im) - RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id); - message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM); - } -// [/RLVa:KB] - std::string saved; if(offline == IM_OFFLINE) { @@ -2453,13 +2317,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; -/* bool mute_im = is_muted; if(accept_im_from_only_friend&&!is_friend) { mute_im = true; } -*/ if (!mute_im || is_linden) { gIMMgr->addMessage( @@ -2685,15 +2547,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; info->mType = (LLAssetType::EType) bucketp->asset_type; info->mObjectID = bucketp->object_id; - -// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) -/* - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(from_id)) ) - { - name = RlvStrings::getAnonym(name); - } -*/ -// [/RLVa:KB] } else { @@ -2744,13 +2597,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_INVENTORY_ACCEPTED: { -// args["NAME"] = name; -// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - // Only filter the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open - bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) && - (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id)); - args["NAME"] = (!fRlvFilterName) ? LLSLURL("agent", from_id, "completename").getSLURLString() : RlvStrings::getAnonym(LLSLURL("agent", from_id, "completename").getSLURLString()); -// [/RLVa:KB] + args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();; LLSD payload; payload["from_id"] = from_id; LLNotificationsUtil::add("InventoryAccepted", args, payload); @@ -2758,13 +2605,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } case IM_INVENTORY_DECLINED: { -// args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString(); -// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - // Only filter the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open - bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) && - (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id)); - args["NAME"] = (!fRlvFilterName) ? LLSLURL("agent", from_id, "completename").getSLURLString() : RlvStrings::getAnonym(LLSLURL("agent", from_id, "completename").getSLURLString()); -// [/RLVa:KB] + args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();; LLSD payload; payload["from_id"] = from_id; LLNotificationsUtil::add("InventoryDeclined", args, payload); @@ -2792,37 +2633,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Only show messages if we have a session open (which // should happen after you get an "invitation" -/* if ( !gIMMgr->hasSession(session_id) ) { return; } -*/ -// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.2.0a - LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(session_id); - if (!pIMSession) - { - return; - } - - if (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) - { - switch (pIMSession->mSessionType) - { - case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat: allow if group is a sendim exception - if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id)) ) - return; - break; - case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat: allow if the sender is a sendim exception - if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) - message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM); - break; - default: - RLV_ASSERT(false); - return; - } - } -// [/RLVa:KB] // standard message, not from system std::string saved; @@ -2888,30 +2702,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD query_string; query_string["owner"] = from_id; -// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - if (rlv_handler_t::isEnabled()) - { - // NOTE: the chat message itself will be filtered in LLNearbyChatHandler::processChat() - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) ) - { - std::string strOwnerName; - if (gCacheName->getFullName(from_id, strOwnerName)) - { - query_string["owner"] = LLUUID::null; - query_string["owner_name"] = RlvStrings::getAnonym(strOwnerName); - } - - RlvUtil::filterNames(name); - chat.mFromName = name; - } - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { - std::string::size_type idxPos = location.find('/'); - if ( (std::string::npos != idxPos) && (RlvUtil::isNearbyRegion(location.substr(0, idxPos))) ) - location = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); - } - } -// [/RLVa:KB] query_string["slurl"] = location; query_string["name"] = name; if (from_group) @@ -3012,26 +2802,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_access_icn = LLViewerRegion::getAccessIcon(region_access); } -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0d - if (rlv_handler_t::isEnabled()) - { - // Block if: 1) @tplure=n restricted (and sender isn't an exception), or 2) @unsit=n restricted and currently sitting - if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) && (!gRlvHandler.isException(RLV_BHVR_TPLURE, from_id)) ) || - ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) ) ) - { - RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLURE_REMOTE)); - return; - } - - // Censor lure message if: 1) @revcim=n restricted (and sender isn't an exception), or 2) @showloc=n restricted - if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) || - (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) - { - message = RlvStrings::getString(RLV_STRING_HIDDEN); - } - } -// [/RLVa:KB] - LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString(); @@ -3043,23 +2813,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["lure_id"] = session_id; payload["godlike"] = FALSE; - LLNotification::Params params("TeleportOffered"); - params.substitutions = args; - params.payload = payload; - -// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-0.2.0b - if ( (rlv_handler_t::isEnabled()) && - ((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id))) ) - { - gRlvHandler.setCanCancelTp(false); - LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); - } - else - { - LLPostponedNotification::add( params, from_id, false); - } -// [/RLVa:KB] -// LLPostponedNotification::add( params, from_id, false); + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add( params, from_id, false); } } break; @@ -3411,14 +3168,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mPosAgent = chatter->getPositionAgent(); // Make swirly things only for talking objects. (not script debug messages, though) -// if (chat.mSourceType == CHAT_SOURCE_OBJECT -// && chat.mChatType != CHAT_TYPE_DEBUG_MSG -// && gSavedSettings.getBOOL("EffectScriptChatParticles") ) -// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g - if ( ((chat.mSourceType == CHAT_SOURCE_OBJECT) && (chat.mChatType != CHAT_TYPE_DEBUG_MSG)) && - (gSavedSettings.getBOOL("EffectScriptChatParticles")) && - ((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) ) -// [/RLVa:KB] + if (chat.mSourceType == CHAT_SOURCE_OBJECT + && chat.mChatType != CHAT_TYPE_DEBUG_MSG + && gSavedSettings.getBOOL("EffectScriptChatParticles") ) { LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); psc->setSourceObject(chatter); @@ -3451,75 +3203,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) color.setVec(1.f,1.f,1.f,1.f); msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); -// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - if ( (rlv_handler_t::isEnabled()) && (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) ) - { - // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) - BOOL is_attachment = (chatter) ? chatter->isAttachment() : FALSE; - - // Filtering "rules": - // avatar => filter all avie text (unless it's this avie or they're an exemption) - // objects => filter everything except attachments this avie owns (never filter llOwnerSay chat) - if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) || - ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) && - (CHAT_TYPE_OWNER != chat.mChatType) ) ) - { - if (!RlvUtil::isEmote(mesg)) - { - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHAT)) && (!gRlvHandler.isException(RLV_BHVR_RECVCHAT, from_id)) ) - gRlvHandler.filterChat(mesg, false); - } - else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTE)) && (!gRlvHandler.isException(RLV_BHVR_RECVEMOTE, from_id)) ) - { - mesg = "/me ..."; - } - } - - // Filtering "rules": - // avatar => filter only their name (unless it's this avie) - // other => filter everything except attachments this avie owns but then we still do filter their text - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && - ((CHAT_SOURCE_AGENT != chat.mSourceType) || (chat.mFromID != gAgent.getID())) ) - { - if (CHAT_SOURCE_AGENT == chat.mSourceType) - { - chat.mFromName = RlvStrings::getAnonym(from_name); - chat.mRlvNamesFiltered = TRUE; - } - else if ( (!is_owned_by_me) || (!is_attachment) ) - { - RlvUtil::filterNames(chat.mFromName); - } - } - - // Create an "objectim" URL for objects if we're either @shownames or @showloc restricted - // (we need to do this now because we won't be have enough information to do it later on) - if ( (CHAT_SOURCE_OBJECT == chat.mSourceType) && - ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) ) - { - LLSD sdQuery; std::string strOwnerName, strQuery; - sdQuery["name"] = chat.mFromName; - - sdQuery["owner"] = owner_id; - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && - (!is_owned_by_me) && (gCacheName->getFullName(owner_id, strOwnerName)) ) - { - sdQuery["owner"] = LLUUID::null; - sdQuery["owner_name"] = RlvStrings::getAnonym(strOwnerName); - } - - const LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if (pRegion) - { - sdQuery["slurl"] = LLSLURL(pRegion->getName(), LLVector3d(chat.mPosAgent)).getSLURLString(); - } - - strQuery = LLURI::mapToQueryString(sdQuery); - chat.mURL = LLSLURL("objectim", from_id, strQuery).getSLURLString(); - } - } -// [/RLVa:KB] - BOOL ircstyle = FALSE; // Look for IRC-style emotes here so chatbubbles work @@ -3569,99 +3252,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) case CHAT_TYPE_WHISPER: verb = LLTrans::getString("whisper") + " "; break; - case CHAT_TYPE_OWNER: -// [RLVa:KB] - Checked: 2010-02-XX (RLVa-1.2.0a) | Modified: RLVa-1.1.0f - // TODO-RLVa: [RLVa-1.2.0] consider rewriting this before a RLVa-1.2.0 release - if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) && (CHAT_TYPE_OWNER == chat.mChatType) ) - { - mesg.erase(0, 1); - LLStringUtil::toLower(mesg); - - std::string strExecuted, strFailed, strRetained, *pstr; - - boost_tokenizer tokens(mesg, boost::char_separator(",", "", boost::drop_empty_tokens)); - for (boost_tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) - { - std::string strCmd = *itToken; - - ERlvCmdRet eRet = gRlvHandler.processCommand(from_id, strCmd, true); - if ( (RlvSettings::getDebug()) && - ( (!RlvSettings::getDebugHideUnsetDup()) || - ((RLV_RET_SUCCESS_UNSET != eRet) && (RLV_RET_SUCCESS_DUPLICATE != eRet)) ) ) - { - if ( RLV_RET_SUCCESS == (eRet & RLV_RET_SUCCESS) ) - pstr = &strExecuted; - else if ( RLV_RET_FAILED == (eRet & RLV_RET_FAILED) ) - pstr = &strFailed; - else if (RLV_RET_RETAINED == eRet) - pstr = &strRetained; - else - { - RLV_ASSERT(false); - pstr = &strFailed; - } - - const char* pstrSuffix = RlvStrings::getStringFromReturnCode(eRet); - if (pstrSuffix) - strCmd.append(" (").append(pstrSuffix).append(")"); - - if (!pstr->empty()) - pstr->push_back(','); - pstr->append(strCmd); - } - } - - if (RlvForceWear::instanceExists()) - RlvForceWear::instance().done(); - - if ( (!RlvSettings::getDebug()) || ((strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty())) ) - return; - - // Silly people want comprehensive debug messages, blah :p - if ( (!strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty()) ) - { - verb = " executes: @"; - mesg = strExecuted; - } - else if ( (strExecuted.empty()) && (!strFailed.empty()) && (strRetained.empty()) ) - { - verb = " failed: @"; - mesg = strFailed; - } - else if ( (strExecuted.empty()) && (strFailed.empty()) && (!strRetained.empty()) ) - { - verb = " retained: @"; - mesg = strRetained; - } - else - { - verb = ": @"; - if (!strExecuted.empty()) - mesg += "\n - executed: @" + strExecuted; - if (!strFailed.empty()) - mesg += "\n - failed: @" + strFailed; - if (!strRetained.empty()) - mesg += "\n - retained: @" + strRetained; - } - - break; - } -// [/RLVa:KB] -// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0b) | Modified: RLVa-1.0.0g - // Copy/paste from above - if ( (rlv_handler_t::isEnabled()) && (chatter) && (chat.mSourceType == CHAT_SOURCE_OBJECT) && - (gSavedSettings.getBOOL("EffectScriptChatParticles")) ) - { - LLPointer psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); - psc->setSourceObject(chatter); - psc->setColor(color); - //We set the particles to be owned by the object's owner, - //just in case they should be muted by the mute list - psc->setOwnerUUID(owner_id); - LLViewerPartSim::getInstance()->addPartSource(psc); - } -// [/RLVa:KB] case CHAT_TYPE_DEBUG_MSG: + case CHAT_TYPE_OWNER: case CHAT_TYPE_NORMAL: verb = ""; break; @@ -3759,10 +3351,7 @@ void process_teleport_start(LLMessageSystem *msg, void**) LL_DEBUGS("Messaging") << "Got TeleportStart with TeleportFlags=" << teleport_flags << ". gTeleportDisplay: " << gTeleportDisplay << ", gAgent.mTeleportState: " << gAgent.getTeleportState() << LL_ENDL; -// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) -// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b - if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) ) -// [/RLVa:KB] + if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) { gViewerWindow->setProgressCancelButtonVisible(FALSE); } @@ -3798,10 +3387,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**) } U32 teleport_flags = 0x0; msg->getU32("Info", "TeleportFlags", teleport_flags); -// if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) -// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Added: RLVa-0.2.0b - if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) ) -// [/RLVa:KB] + if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) { gViewerWindow->setProgressCancelButtonVisible(FALSE); } @@ -6111,7 +5697,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp if (viewregion) { // got the region, so include the region and 3d coordinates of the object - notice.setArg("[REGIONNAME]", viewregion->getName()); + notice.setArg("[REGIONNAME]", viewregion->getName()); std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); notice.setArg("[REGIONPOS]", formatpos); @@ -6119,15 +5705,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp } } -// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.0.0a - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { - notice.setArg("[REGIONNAME]", RlvStrings::getString(RLV_STRING_HIDDEN_REGION)); - notice.setArg("[REGIONPOS]", RlvStrings::getString(RLV_STRING_HIDDEN)); - } - else if (!foundpos) -// [/RLVa:KB] -// if (!foundpos) + if (!foundpos) { // unable to determine location of the object notice.setArg("[REGIONNAME]", "(unknown region)"); @@ -6332,32 +5910,8 @@ void process_script_question(LLMessageSystem *msg, void **user_data) payload["object_name"] = object_name; payload["owner_name"] = owner_name; -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0e - S32 rlvQuestionsOther = questions; - - if (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTPERMISSION)) - { - const LLViewerObject* pObj = gObjectList.findObject(taskid); - if (pObj) - { -// if (pObj->permYouOwner()) -// { - // PERMISSION_TAKE_CONTROLS and PERMISSION_ATTACH are only auto-granted to objects this avie owns - rlvQuestionsOther &= ~(LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS] | - LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]); -// } - } - } - - if ( (!caution) && (!rlvQuestionsOther) ) - { - LLNotifications::instance().forceResponse( - LLNotification::Params("ScriptQuestion").substitutions(args).payload(payload), 0/*YES*/); - } - else if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) -// [/RLVa:KB] // check whether cautions are even enabled or not -// if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) + if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) { // display the caution permissions prompt LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); @@ -6718,22 +6272,6 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) if(0 == option) { -// [RLVa:KB] - Checked: 2010-04-09 (RLVa-1.2.0e) | Modified: RLVa-0.2.0b - if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) - { - // Filter the teleport offer text unless everyone is a sendim exception - for (LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray(); - it != notification["payload"]["ids"].endArray(); ++it) - { - if (!gRlvHandler.isException(RLV_BHVR_SENDIM, it->asUUID())) - { - text = RlvStrings::getString(RLV_STRING_HIDDEN); - break; - } - } - } -// [/RLVa:KB] - LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_StartLure); msg->nextBlockFast(_PREHASH_AgentData); @@ -6787,29 +6325,13 @@ void handle_lure(const uuid_vec_t& ids) if (!gAgent.getRegion()) return; LLSD edit_args; -// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a - edit_args["REGION"] = - (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN); -// [/RLVa:KB] -// edit_args["REGION"] = gAgent.getRegion()->getName(); + edit_args["REGION"] = gAgent.getRegion()->getName(); LLSD payload; for (LLDynamicArray::const_iterator it = ids.begin(); it != ids.end(); ++it) { -// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a - // Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n - if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) - { - const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it); - if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it, RLV_CHECK_PERMISSIVE)) && - ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) - { - return; - } - } -// [/RLVa:KB] payload["ids"].append(*it); } if (gAgent.isGodlike()) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index eb7ca353e2..a58b0d68de 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,9 +100,6 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) -#include "rlvhandler.h" -// [/RLVa:KB] //#define DEBUG_UPDATE_TYPE @@ -171,10 +168,8 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco res = new LLVOSurfacePatch(id, pcode, regionp); break; case LL_VO_SKY: res = new LLVOSky(id, pcode, regionp); break; - case LL_VO_VOID_WATER: - res = new LLVOVoidWater(id, pcode, regionp); break; case LL_VO_WATER: - res = new LLVOWater(id, pcode, regionp); break; + res = new LLVOWater(id, pcode, regionp); break; case LL_VO_GROUND: res = new LLVOGround(id, pcode, regionp); break; case LL_VO_PART_GROUP: @@ -1099,13 +1094,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, coloru.mV[3] = 255 - coloru.mV[3]; mText->setColor(LLColor4(coloru)); mText->setString(temp_string); - -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f - if (rlv_handler_t::isEnabled()) - { - mText->setObjectText(temp_string); - } -// [/RLVa:KB] if (mDrawable.notNull()) { @@ -1498,12 +1486,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, coloru.mV[3] = 255 - coloru.mV[3]; mText->setColor(LLColor4(coloru)); mText->setString(temp_string); -// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.0.0f - if (rlv_handler_t::isEnabled()) - { - mText->setObjectText(temp_string); - } -// [/RLVa:KB] setChanged(TEXTURE); } @@ -1674,25 +1656,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, gObjectList.killObject(this); return retval; } -// [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.1.0k) | Added: RLVa-1.1.0k - if ( (rlv_handler_t::isEnabled()) && (sent_parentp->isAvatar()) && (sent_parentp->getID() == gAgent.getID()) ) - { - // Rezzed object that's being worn as an attachment (we're assuming this will be due to llAttachToAvatar()) - S32 idxAttachPt = ATTACHMENT_ID_FROM_STATE(getState()); - if (gRlvAttachmentLocks.isLockedAttachmentPoint(idxAttachPt, RLV_LOCK_ADD)) - { - // If this will end up on an "add locked" attachment point then treat the attach as a user action - LLNameValue* nvItem = getNVPair("AttachItemID"); - if (nvItem) - { - LLUUID idItem(nvItem->getString()); - // URGENT-RLVa: [RLVa-1.2.0] At the moment llAttachToAvatar always seems to *add* - if (idItem.notNull()) - RlvAttachmentLockWatchdog::instance().onWearAttachment(idItem, RLV_WEAR_ADD); - } - } - } -// [/RLVa:KB] sent_parentp->addChild(this); // make sure this object gets a non-damped update if (sent_parentp->mDrawable.notNull()) @@ -4942,10 +4905,7 @@ BOOL LLViewerObject::permTransfer() const // given you modify rights to. JC BOOL LLViewerObject::allowOpen() const { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - return !flagInventoryEmpty() && (permYouOwner() || permModify()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)); -// [/RLVa:KB] -// return !flagInventoryEmpty() && (permYouOwner() || permModify()); + return !flagInventoryEmpty() && (permYouOwner() || permModify()); } LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo() diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 51e5082b91..7d697a4a5f 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -131,7 +131,7 @@ public: typedef const child_list_t const_child_list_t; - LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE); + LLViewerObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp, BOOL is_global = FALSE); MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT); virtual void markDead(); // Mark this object as dead, and clean up its references @@ -328,10 +328,7 @@ public: void sendShapeUpdate(); -// U8 getState() { return mState; } -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - U8 getState() const { return mState; } -// [/RLVa:KB] + U8 getState() { return mState; } F32 getAppAngle() const { return mAppAngle; } F32 getPixelArea() const { return mPixelArea; } @@ -521,14 +518,14 @@ public: { LL_VO_CLOUDS = LL_PCODE_APP | 0x20, LL_VO_SURFACE_PATCH = LL_PCODE_APP | 0x30, - LL_VO_WL_SKY = LL_PCODE_APP | 0x40, + //LL_VO_STARS = LL_PCODE_APP | 0x40, LL_VO_SQUARE_TORUS = LL_PCODE_APP | 0x50, LL_VO_SKY = LL_PCODE_APP | 0x60, - LL_VO_VOID_WATER = LL_PCODE_APP | 0x70, - LL_VO_WATER = LL_PCODE_APP | 0x80, - LL_VO_GROUND = LL_PCODE_APP | 0x90, - LL_VO_PART_GROUP = LL_PCODE_APP | 0xa0, - LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xb0, + LL_VO_WATER = LL_PCODE_APP | 0x70, + LL_VO_GROUND = LL_PCODE_APP | 0x80, + LL_VO_PART_GROUP = LL_PCODE_APP | 0x90, + LL_VO_TRIANGLE_TORUS = LL_PCODE_APP | 0xa0, + LL_VO_WL_SKY = LL_PCODE_APP | 0xb0, // should this be moved to 0x40? LL_VO_HUD_PART_GROUP = LL_PCODE_APP | 0xc0, } EVOType; @@ -720,8 +717,8 @@ public: class LLAlphaObject : public LLViewerObject { public: - LLAlphaObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) - : LLViewerObject(id,pcode,regionp) + LLAlphaObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp) + : LLViewerObject(id,type,regionp) { mDepth = 0.f; } virtual F32 getPartSize(S32 idx); @@ -738,8 +735,8 @@ public: class LLStaticViewerObject : public LLViewerObject { public: - LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, BOOL is_global = FALSE) - : LLViewerObject(id,pcode,regionp, is_global) + LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp, BOOL is_global = FALSE) + : LLViewerObject(id,type,regionp, is_global) { } virtual void updateDrawable(BOOL force_damped); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b684206960..7fb259e012 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -266,7 +266,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, //MUST MATCH declaration of eObjectPartitions mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN - mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 8b71998f60..1ba025312b 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -73,7 +73,6 @@ public: { PARTITION_HUD=0, PARTITION_TERRAIN, - PARTITION_VOIDWATER, PARTITION_WATER, PARTITION_TREE, PARTITION_PARTICLE, diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index c1abead36e..d078c15316 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -335,8 +335,8 @@ void LLViewerShaderMgr::setShaders() } else { - LLPipeline::sRenderGlow = FALSE; - LLPipeline::sWaterReflections = FALSE; + LLPipeline::sRenderGlow = + LLPipeline::sWaterReflections = FALSE; } //hack to reset buffers that change behavior with shaders diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 85c891dbf3..a0a3380441 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -200,10 +200,6 @@ #include "llviewerwindowlistener.h" #include "llpaneltopinfobar.h" -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] - #if LL_WINDOWS #include // For Unicode conversion methods #endif @@ -1408,11 +1404,6 @@ LLViewerWindow::LLViewerWindow( gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE); } - if (!gGLManager.mHasDepthClamp) - { - LL_INFOS("RenderInit") << "Missing feature GL_ARB_depth_clamp. Void water might disappear in rare cases." << LL_ENDL; - } - // If we crashed while initializng GL stuff last time, disable certain features if (gSavedSettings.getBOOL("RenderInitError")) { @@ -3218,15 +3209,6 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, { moveable_object_selected = TRUE; this_object_movable = TRUE; - -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-0.2.0g - if ( (rlv_handler_t::isEnabled()) && - ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) - { - if ((isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit())) - moveable_object_selected = this_object_movable = FALSE; - } -// [/RLVa:KB] } all_selected_objects_move = all_selected_objects_move && this_object_movable; all_selected_objects_modify = all_selected_objects_modify && object->permModify(); @@ -3494,42 +3476,17 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // check ALL objects - { + { found = gPipeline.lineSegmentIntersectInHUD(mouse_hud_start, mouse_hud_end, pick_transparent, face_hit, intersection, uv, normal, binormal); -// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c - if ( (rlv_handler_t::isEnabled()) && (found) && - (LLToolCamera::getInstance()->hasMouseCapture()) && (gKeyboard->currentMask(TRUE) & MASK_ALT) ) - { - found = NULL; - } -// [/RLVa:KB] - if (!found) // if not found in HUD, look in world: - { + + { found = gPipeline.lineSegmentIntersectInWorld(mouse_world_start, mouse_world_end, pick_transparent, face_hit, intersection, uv, normal, binormal); - -// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Added: RLVa-1.1.0l -#ifdef RLV_EXTENSION_CMD_INTERACT - if ( (rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) ) - { - // Allow picking if: - // - the drag-and-drop tool is active (allows inventory offers) - // - the camera tool is active - // - the pie tool is active *and* we picked our own avie (allows "mouse steering" and the self pie menu) - LLTool* pCurTool = LLToolMgr::getInstance()->getCurrentTool(); - if ( (LLToolDragAndDrop::getInstance() != pCurTool) && - (!LLToolCamera::getInstance()->hasMouseCapture()) && - ((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) ) - { - found = NULL; - } } -#endif // RLV_EXTENSION_CMD_INTERACT -// [/RLVa:KB] - } + } return found; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e69e1d3a9e..8738ad7687 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -90,9 +90,6 @@ #include "llanimstatelabels.h" #include "lltrans.h" #include "llappearancemgr.h" -// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) -#include "rlvhandler.h" -// [/RLVa:KB] #include "llgesturemgr.h" //needed to trigger the voice gesticulations #include "llvoiceclient.h" @@ -2766,18 +2763,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) const F32 time_visible = mTimeVisible.getElapsedTimeF32(); const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds -// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) | Added: RLVa-0.2.0b - bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); -// [/RLVa:KB] BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping); BOOL render_name = visible_chat || - (visible_avatar && -// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) | Added: RLVa-1.0.0h - ( (!fRlvShowNames) || (RlvSettings::getShowNameTags()) ) && -// [/RLVa:KB] - ((sRenderName == RENDER_NAME_ALWAYS) || - (sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME))); + (visible_avatar && + ((sRenderName == RENDER_NAME_ALWAYS) || + (sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME))); // If it's your own avatar, don't draw in mouselook, and don't // draw if we're specifically hiding our own name. if (isSelf()) @@ -2807,18 +2798,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) new_name = TRUE; } -// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) | Added: RLVa-0.2.0b - if (fRlvShowNames) - { - if (mRenderGroupTitles) - { - mRenderGroupTitles = FALSE; - new_name = TRUE; - } - } - else if (sRenderGroupTitles != mRenderGroupTitles) -// [/RLVa] -// if (sRenderGroupTitles != mRenderGroupTitles) + if (sRenderGroupTitles != mRenderGroupTitles) { mRenderGroupTitles = sRenderGroupTitles; new_name = TRUE; @@ -2934,23 +2914,20 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) || is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute - || is_appearance != mNameAppearance + || is_appearance != mNameAppearance || is_friend != mNameFriend - || is_cloud != mNameCloud - ) - { - LLColor4 name_tag_color = getNameTagColor(is_friend); - std::string line; - clearNameTag(); - - - - if (is_away || is_muted || is_busy || is_appearance) - { - - if (is_away) + || is_cloud != mNameCloud) { - line += LLTrans::getString("AvatarAway"); + LLColor4 name_tag_color = getNameTagColor(is_friend); + + clearNameTag(); + + if (is_away || is_muted || is_busy || is_appearance) + { + std::string line; + if (is_away) + { + line += LLTrans::getString("AvatarAway"); line += ", "; } if (is_busy) @@ -2991,18 +2968,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) static LLUICachedControl show_display_names("NameTagShowDisplayNames"); static LLUICachedControl show_usernames("NameTagShowUsernames"); - // - bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); - if (!fRlvShowNames) - { - const LLFontGL* font = LLFontGL::getFontSansSerif(); - std::string full_name = - RlvStrings::getAnonym(line.assign(firstname->getString()).append(" ").append(lastname->getString())); - name_tag_color = getNameTagColor(false); - addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font); - } - // - else if (LLAvatarNameCache::useDisplayNames()) + if (LLAvatarNameCache::useDisplayNames()) { LLAvatarName av_name; if (!LLAvatarNameCache::get(getID(), &av_name)) @@ -3011,42 +2977,42 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // and force a rebuild LLAvatarNameCache::get(getID(), boost::bind(&LLVOAvatar::clearNameTag, this)); - } + } // Might be blank if name not available yet, that's OK if (show_display_names) { addNameTagLine(av_name.mDisplayName, name_tag_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerif()); - } - + } // Suppress SLID display if display name matches exactly (ugh) if (show_usernames && !av_name.mIsDisplayNameDefault) - { + { // *HACK: Desaturate the color LLColor4 username_color = name_tag_color * 0.83f; addNameTagLine(av_name.mUsername, username_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); } - } + } else - { + { const LLFontGL* font = LLFontGL::getFontSansSerif(); std::string full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font); - } + } mNameAway = is_away; mNameBusy = is_busy; mNameMute = is_muted; mNameAppearance = is_appearance; - mNameFriend = is_friend; + mNameFriend = is_friend; mNameCloud = is_cloud; mTitle = title ? title->getString() : ""; LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR); new_name = TRUE; - } + } + if (mVisibleChat) { mNameText->setFont(LLFontGL::getFontSansSerif()); @@ -5747,13 +5713,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { llwarns << "Object attachment point invalid: " << attachmentID << llendl; -// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.2.0a) | Added: Catznip2.1.2a - S32 idxAttachPt = 1; - if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) - idxAttachPt = attachmentID - 38; - attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); -// [/SL:KB] + attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) } return attachment; @@ -5889,13 +5849,6 @@ void LLVOAvatar::sitDown(BOOL bSitting) { // Update Movement Controls according to own Sitting mode LLFloaterMove::setSittingMode(bSitting); - -// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c - if (rlv_handler_t::isEnabled()) - { - gRlvHandler.onSitOrStand(bSitting); - } -// [/RLVa:KB] } } @@ -6213,17 +6166,10 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { -// if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) -// return TRUE; -// else -// return mFullyLoaded; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp - if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) ) + if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) return TRUE; else return mFullyLoaded; -// [/SL:KB] } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index a779a1735c..f4f1235d55 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -33,8 +33,6 @@ #include #include -#include - #include "imageids.h" // IMG_INVISIBLE #include "llchat.h" #include "lldrawpoolalpha.h" @@ -73,8 +71,7 @@ class LLVOAvatarSkeletonInfo; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatar : public LLViewerObject, - public LLCharacter, - public boost::signals2::trackable + public LLCharacter { public: friend class LLVOAvatarSelf; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4376fb1648..e5cbf65682 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -56,9 +56,6 @@ #include "llviewerstats.h" #include "llviewerregion.h" #include "llappearancemgr.h" -// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) -#include "rlvhandler.h" -// [/RLVa:KB] #if LL_MSVC // disable boost::lexical_cast warning @@ -328,7 +325,6 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.name =(item_params.label ); item_params.on_click.function_name = "Object.AttachToAvatar"; item_params.on_click.parameter = iter->first; - // [RLVa:KB] - No changes, but we do need the parameter to always be idxAttachPt for object_selected_and_point_valid() item_params.on_enable.function_name = "Object.EnableWear"; item_params.on_enable.parameter = iter->first; LLMenuItemCallGL* item = LLUICtrlFactory::create(item_params); @@ -403,7 +399,6 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.name =(item_params.label ); item_params.on_click.function_name = "Object.AttachToAvatar"; item_params.on_click.parameter = iter->first; - // [RLVa:KB] - No changes, but we do need the parameter to always be idxAttachPt for object_selected_and_point_valid() item_params.on_enable.function_name = "Object.EnableWear"; item_params.on_enable.parameter = iter->first; LLMenuItemCallGL* item = LLUICtrlFactory::create(item_params); @@ -447,7 +442,6 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.name =(item_params.label ); item_params.on_click.function_name = "Object.AttachToAvatar"; item_params.on_click.parameter = iter->first; - // [RLVa:KB] - No changes, but we do need the parameter to always be idxAttachPt for object_selected_and_point_valid() item_params.on_enable.function_name = "Object.EnableWear"; item_params.on_enable.parameter = iter->first; //* TODO: Skinning: @@ -514,7 +508,6 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.label = LLTrans::getString(attachment->getName()); item_params.on_click.function_name = "Object.AttachToAvatar"; item_params.on_click.parameter = attach_index; - // [RLVa:KB] - No changes, but we do need the parameter to always be idxAttachPt for object_selected_and_point_valid() item_params.on_enable.function_name = "Object.EnableWear"; item_params.on_enable.parameter = attach_index; @@ -1074,20 +1067,6 @@ LLViewerObject* LLVOAvatarSelf::getWornAttachment(const LLUUID& inv_item_id) return NULL; } -// [RLVa:KB] - Checked: 2010-03-14 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a -LLViewerJointAttachment* LLVOAvatarSelf::getWornAttachmentPoint(const LLUUID& idItem) const -{ - const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); - for (attachment_map_t::const_iterator itAttachPt = mAttachmentPoints.begin(); itAttachPt != mAttachmentPoints.end(); ++itAttachPt) - { - LLViewerJointAttachment* pAttachPt = itAttachPt->second; - if (pAttachPt->getAttachedObject(idItemBase)) - return pAttachPt; - } - return NULL; -} -// [/RLVa:KB] - const std::string LLVOAvatarSelf::getAttachedPointName(const LLUUID& inv_item_id) const { const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id); @@ -1125,18 +1104,6 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view LLAppearanceMgr::instance().registerAttachment(attachment_id); // Clear any pending requests once the attachment arrives. removeAttachmentRequest(attachment_id); - -// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a - // NOTE: RLVa event handlers should be invoked *after* LLVOAvatar::attachObject() calls LLViewerJointAttachment::addObject() - if (rlv_handler_t::isEnabled()) - { - RlvAttachmentLockWatchdog::instance().onAttach(viewer_object, attachment); - gRlvHandler.onAttach(viewer_object, attachment); - - if ( (attachment->getIsHUDAttachment()) && (!gRlvAttachmentLocks.hasLockedHUD()) ) - gRlvAttachmentLocks.updateLockedHUD(); - } -// [/RLVa:KB] } return attachment; @@ -1146,23 +1113,6 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) { const LLUUID attachment_id = viewer_object->getAttachmentItemID(); - -// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a - // NOTE: RLVa event handlers should be invoked *before* LLVOAvatar::detachObject() calls LLViewerJointAttachment::removeObject() - if (rlv_handler_t::isEnabled()) - { - for (attachment_map_t::const_iterator itAttachPt = mAttachmentPoints.begin(); itAttachPt != mAttachmentPoints.end(); ++itAttachPt) - { - const LLViewerJointAttachment* pAttachPt = itAttachPt->second; - if (pAttachPt->isObjectAttached(viewer_object)) - { - RlvAttachmentLockWatchdog::instance().onDetach(viewer_object, pAttachPt); - gRlvHandler.onDetach(viewer_object, pAttachPt); - } - } - } -// [/RLVa:KB] - if (LLVOAvatar::detachObject(viewer_object)) { // the simulator should automatically handle permission revocation @@ -1195,11 +1145,6 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) LLAppearanceMgr::instance().unregisterAttachment(attachment_id); } -// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - if ( (rlv_handler_t::isEnabled()) && (viewer_object->isHUDAttachment()) && (gRlvAttachmentLocks.hasLockedHUD()) ) - gRlvAttachmentLocks.updateLockedHUD(); -// [/RLVa:KB] - return TRUE; } return FALSE; @@ -1209,10 +1154,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) { LLInventoryItem* item = gInventory.getItem(item_id); -// if (item) -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1c) | Added: RLVa-1.2.1c - if ( (item) && ((!rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(item))) ) -// [/RLVa:KB] + if (item) { gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index f90e35cd4d..23a799ea3a 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -290,9 +290,6 @@ public: void addAttachmentRequest(const LLUUID& inv_item_id); void removeAttachmentRequest(const LLUUID& inv_item_id); LLViewerObject* getWornAttachment(const LLUUID& inv_item_id); -// [RLVa:KB] - Checked: 2009-12-18 (RLVa-1.1.0i) | Added: RLVa-1.1.0i - LLViewerJointAttachment* getWornAttachmentPoint(const LLUUID& inv_item_id) const; -// [/RLVa:KB] const std::string getAttachedPointName(const LLUUID& inv_item_id) const; /*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object); /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 2eb4398488..eba600b50a 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -80,7 +80,7 @@ public: //============================================================================ LLVOSurfacePatch::LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) - : LLStaticViewerObject(id, pcode, regionp), + : LLStaticViewerObject(id, LL_VO_SURFACE_PATCH, regionp), mDirtiedPatch(FALSE), mPool(NULL), mBaseComp(0), diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d3efb8d680..761e12020b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -63,9 +63,6 @@ #include "llmediadataclient.h" #include "llagent.h" #include "llviewermediafocus.h" -// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) -#include "rlvhandler.h" -// [/RLVa:KB] const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; @@ -3225,12 +3222,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, { LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); -// if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - const LLViewerObject* pObj = facep->getViewerObject(); - if ( (pObj->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) && - ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) ) -// [/RVLa:KB] + if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) { return; } diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 9280eb8fa4..598938b710 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -61,8 +61,7 @@ const F32 WAVE_STEP_INV = (1. / WAVE_STEP); LLVOWater::LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) -: LLStaticViewerObject(id, pcode, regionp), - mRenderType(LLPipeline::RENDER_TYPE_WATER) +: LLStaticViewerObject(id, LL_VO_WATER, regionp) { // Terrain must draw during selection passes so it can block objects behind it. mbCanSelect = FALSE; @@ -115,7 +114,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); mDrawable->setLit(FALSE); - mDrawable->setRenderType(mRenderType); + mDrawable->setRenderType(LLPipeline::RENDER_TYPE_WATER); LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); @@ -269,11 +268,6 @@ U32 LLVOWater::getPartitionType() const return LLViewerRegion::PARTITION_WATER; } -U32 LLVOVoidWater::getPartitionType() const -{ - return LLViewerRegion::PARTITION_VOIDWATER; -} - LLWaterPartition::LLWaterPartition() : LLSpatialPartition(0, FALSE, 0) { @@ -281,9 +275,3 @@ LLWaterPartition::LLWaterPartition() mDrawableType = LLPipeline::RENDER_TYPE_WATER; mPartitionType = LLViewerRegion::PARTITION_WATER; } - -LLVoidWaterPartition::LLVoidWaterPartition() -{ - mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER; - mPartitionType = LLViewerRegion::PARTITION_VOIDWATER; -} diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h index cb9584cabf..beefc3f17f 100644 --- a/indra/newview/llvowater.h +++ b/indra/newview/llvowater.h @@ -29,7 +29,6 @@ #include "llviewerobject.h" #include "llviewertexture.h" -#include "pipeline.h" #include "v2math.h" const U32 N_RES = 16; //32 // number of subdivisions of wave tile @@ -78,19 +77,6 @@ public: protected: BOOL mUseTexture; BOOL mIsEdgePatch; - S32 mRenderType; }; -class LLVOVoidWater : public LLVOWater -{ -public: - LLVOVoidWater(LLUUID const& id, LLPCode pcode, LLViewerRegion* regionp) : LLVOWater(id, pcode, regionp) - { - mRenderType = LLPipeline::RENDER_TYPE_VOIDWATER; - } - - /*virtual*/ U32 getPartitionType() const; -}; - - #endif // LL_VOSURFACEPATCH_H diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 793771c5ad..a49dc1b59d 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -37,9 +37,6 @@ #include "lltransutil.h" #include "llviewerattachmenu.h" #include "llvoavatarself.h" -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) -#include "rlvhandler.h" -// [/RLVa:KB] class LLFindOutfitItems : public LLInventoryCollectFunctor { @@ -836,13 +833,6 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu bool can_be_worn = true; -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - // We'll enable a menu option if at least one item in the selection is wearable/removable - bool rlvCanWearReplace = !rlv_handler_t::isEnabled(); - bool rlvCanWearAdd = !rlv_handler_t::isEnabled(); - bool rlvCanRemove = !rlv_handler_t::isEnabled(); -// [/RLVa:KB] - for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLUUID id = *it; @@ -883,29 +873,6 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu { can_be_worn = get_can_item_be_worn(item->getLinkedUUID()); } - -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - if (rlv_handler_t::isEnabled()) - { - ERlvWearMask eWearMask = RLV_WEAR_LOCKED; - switch (item->getType()) - { - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - eWearMask = gRlvWearableLocks.canWear(item); - rlvCanRemove |= (is_worn) ? gRlvWearableLocks.canRemove(item) : false; - break; - case LLAssetType::AT_OBJECT: - eWearMask = gRlvAttachmentLocks.canAttach(item); - rlvCanRemove |= (is_worn) ? gRlvAttachmentLocks.canDetach(item) : false; - break; - default: - break; - } - rlvCanWearReplace |= ((eWearMask & RLV_WEAR_REPLACE) == RLV_WEAR_REPLACE); - rlvCanWearAdd |= ((eWearMask & RLV_WEAR_ADD) == RLV_WEAR_ADD); - } -// [/RLVa:KB] } // for bool standalone = mParent ? mParent->isStandalone() : false; @@ -913,15 +880,10 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu // *TODO: eliminate multiple traversals over the menu items setMenuItemVisible(menu, "wear_wear", n_already_worn == 0 && n_worn == 0 && can_be_worn); -// setMenuItemEnabled(menu, "wear_wear", n_already_worn == 0 && n_worn == 0); + setMenuItemEnabled(menu, "wear_wear", n_already_worn == 0 && n_worn == 0); setMenuItemVisible(menu, "wear_add", wear_add_visible); -// setMenuItemEnabled(menu, "wear_add", canAddWearables(ids)); + setMenuItemEnabled(menu, "wear_add", canAddWearables(ids)); setMenuItemVisible(menu, "wear_replace", n_worn == 0 && n_already_worn != 0 && can_be_worn); -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - setMenuItemEnabled(menu, "wear_wear", n_already_worn == 0 && n_worn == 0 && rlvCanWearReplace); - setMenuItemEnabled(menu, "wear_add", canAddWearables(ids) && rlvCanWearAdd); - setMenuItemEnabled(menu, "wear_replace", rlvCanWearReplace); -// [/RLVa:KB] //visible only when one item selected and this item is worn setMenuItemVisible(menu, "edit", !standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1); setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1 && n_items == 1); @@ -931,12 +893,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && n_worn == n_items); setMenuItemVisible(menu, "detach", mask == MASK_ATTACHMENT && n_worn == n_items); setMenuItemVisible(menu, "take_off_or_detach", mask == (MASK_ATTACHMENT|MASK_CLOTHING)); -// setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items); -// [RLVa:KB] - Checked: 2010-09-04 (RLVa-1.2.1a) | Added: RLVa-1.2.1a - setMenuItemEnabled(menu, "take_off", rlvCanRemove); - setMenuItemEnabled(menu, "detach", rlvCanRemove); - setMenuItemEnabled(menu, "take_off_or_detach", (n_worn == n_items) && (rlvCanRemove)); -// [/RLVa:KB] + setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items); setMenuItemVisible(menu, "object_profile", !standalone); setMenuItemEnabled(menu, "object_profile", n_items == 1); setMenuItemVisible(menu, "--no options--", FALSE); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddf5cd4b70..ddbcdfc3f7 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -95,18 +95,8 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID { BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; -// LLWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d - LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); - if (wearable) - { - if(data->mCallback) - data->mCallback(wearable, data->mUserdata); - delete data; - return; - } -// [/SL:KB] - + LLWearable* wearable = NULL; // NULL indicates failure + if( !filename ) { LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL; diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index cf67bdf19c..0d707d65bf 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -58,12 +58,6 @@ class LLWearableDictionary : public LLSingleton, { public: LLWearableDictionary(); - -// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -protected: - // The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType - virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; } -// [/RLVa:KB] }; LLWearableDictionary::LLWearableDictionary() diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8731c9e1a7..5760d04a08 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -55,11 +55,6 @@ #include "pipeline.h" #include "llappviewer.h" // for do_disconnect() -#include -#include -#include -#include - // // Globals // @@ -839,69 +834,10 @@ F32 LLWorld::getLandFarClip() const void LLWorld::setLandFarClip(const F32 far_clip) { - static S32 const rwidth = (S32)REGION_WIDTH_U32; - S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth; - S32 const n2 = (llceil(far_clip) - 1) / rwidth; - bool need_water_objects_update = n1 != n2; - mLandFarClip = far_clip; - - if (need_water_objects_update) - { - updateWaterObjects(); - } } -// Some region that we're connected to, but not the one we're in, gave us -// a (possibly) new water height. Update it in our local copy. -void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height) -{ - for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) - { - if ((*iter)->getName() == sim_name) - { - (*iter)->setWaterHeight(water_height); - break; - } - } -} -// There are three types of water objects: -// Region water objects: the water in a region. -// Hole water objects: water in the void but within current draw distance. -// Edge water objects: the water outside the draw distance, up till the horizon. -// -// For example: -// -// -----------------------horizon------------------------- -// | | | | -// | Edge Water | | | -// | | | | -// | | | | -// | | | | -// | | | | -// | | rwidth | | -// | | <-----> | | -// ------------------------------------------------------- -// | |Hole |other| | | -// | |Water|reg. | | | -// | |-----------------| | -// | |other|cur. |<--> | | -// | |reg. | reg.| \__|_ draw distance | -// | |-----------------| | -// | | | |<--->| | -// | | | | \__|_ range | -// ------------------------------------------------------- -// | |<----width------>|<--horizon ext.->| -// | | | | -// | | | | -// | | | | -// | | | | -// | | | | -// | | | | -// | | | | -// ------------------------------------------------------- -// void LLWorld::updateWaterObjects() { if (!gAgent.getRegion()) @@ -914,265 +850,128 @@ void LLWorld::updateWaterObjects() return; } - // Region width in meters. - S32 const rwidth = (S32)REGION_WIDTH_U32; - - // The distance we might see into the void - // when standing on the edge of a region, in meters. - S32 const draw_distance = llceil(mLandFarClip); - - // We can only have "holes" in the water (where there no region) if we - // can have existing regions around it. Taking into account that this - // code is only executed when we enter a region, and not when we walk - // around in it, we (only) need to take into account regions that fall - // within the draw_distance. - // - // Set 'range' to draw_distance, rounded up to the nearest multiple of rwidth. - S32 const nsims = (draw_distance + rwidth - 1) / rwidth; - S32 const range = nsims * rwidth; - - // Get South-West corner of current region. - LLViewerRegion const* regionp = gAgent.getRegion(); + // First, determine the min and max "box" of water objects + S32 min_x = 0; + S32 min_y = 0; + S32 max_x = 0; + S32 max_y = 0; U32 region_x, region_y; + + S32 rwidth = 256; + + // We only want to fill in water for stuff that's near us, say, within 256 or 512m + S32 range = LLViewerCamera::getInstance()->getFar() > 256.f ? 512 : 256; + + LLViewerRegion* regionp = gAgent.getRegion(); from_region_handle(regionp->getHandle(), ®ion_x, ®ion_y); - // The min. and max. coordinates of the South-West corners of the Hole water objects. - S32 const min_x = (S32)region_x - range; - S32 const min_y = (S32)region_y - range; - S32 const max_x = (S32)region_x + range; - S32 const max_y = (S32)region_y + range; + min_x = (S32)region_x - range; + min_y = (S32)region_y - range; + max_x = (S32)region_x + range; + max_y = (S32)region_y + range; - // Attempt to determine a sensible water height for all the - // Hole Water objects. - // - // It make little sense to try to guess what the best water - // height should be when that isn't completely obvious: if it's - // impossible to satisfy every region's water height without - // getting a jump in the water height. - // - // In order to keep the reasoning simple, we assume something - // logical as a group of connected regions, where the coastline - // is at the outer edge. Anything more complex that would "break" - // under such an assumption would probably break anyway (would - // depend on terrain editing and existing mega prims, say, if - // anything would make sense at all). - // - // So, what we do is find all connected regions within the - // draw distance that border void, and then pick the lowest - // water height of those (coast) regions. - S32 const n = 2 * nsims + 1; - S32 const origin = nsims + nsims * n; - std::vector water_heights(n * n); - std::vector checked(n * n, 0); // index = nx + ny * n + origin; - U8 const region_bit = 1; - U8 const hole_bit = 2; - U8 const bordering_hole_bit = 4; - U8 const bordering_edge_bit = 8; - // Use the legacy waterheight for the Edge water in the case - // that we don't find any Hole water at all. - F32 water_height = DEFAULT_WATER_HEIGHT; - int max_count = 0; - LL_DEBUGS("WaterHeight") << "Current region: " << regionp->getName() << "; water height: " << regionp->getWaterHeight() << " m." << LL_ENDL; - std::map water_height_counts; - typedef std::queue, std::deque > > nxny_pairs_type; - nxny_pairs_type nxny_pairs; - nxny_pairs.push(nxny_pairs_type::value_type(0, 0)); - water_heights[origin] = regionp->getWaterHeight(); - checked[origin] = region_bit; - // For debugging purposes. - int number_of_connected_regions = 1; - int uninitialized_regions = 0; - int bordering_hole = 0; - int bordering_edge = 0; - while(!nxny_pairs.empty()) - { - S32 const nx = nxny_pairs.front().first; - S32 const ny = nxny_pairs.front().second; - LL_DEBUGS("WaterHeight") << "nx,ny = " << nx << "," << ny << LL_ENDL; - S32 const index = nx + ny * n + origin; - nxny_pairs.pop(); - for (S32 dir = 0; dir < 4; ++dir) - { - S32 const cnx = nx + gDirAxes[dir][0]; - S32 const cny = ny + gDirAxes[dir][1]; - LL_DEBUGS("WaterHeight") << "dir = " << dir << "; cnx,cny = " << cnx << "," << cny << LL_ENDL; - S32 const cindex = cnx + cny * n + origin; - bool is_hole = false; - bool is_edge = false; - LLViewerRegion* new_region_found = NULL; - if (cnx < -nsims || cnx > nsims || - cny < -nsims || cny > nsims) - { - LL_DEBUGS("WaterHeight") << " Edge Water!" << LL_ENDL; - // Bumped into Edge water object. - is_edge = true; - } - else if (checked[cindex]) - { - LL_DEBUGS("WaterHeight") << " Already checked before!" << LL_ENDL; - // Already checked. - is_hole = (checked[cindex] & hole_bit); - } - else - { - S32 x = (S32)region_x + cnx * rwidth; - S32 y = (S32)region_y + cny * rwidth; - U64 region_handle = to_region_handle(x, y); - new_region_found = getRegionFromHandle(region_handle); - is_hole = !new_region_found; - checked[cindex] = is_hole ? hole_bit : region_bit; - } - if (is_hole) - { - // This was a region that borders at least one 'hole'. - // Count the found coastline. - F32 new_water_height = water_heights[index]; - LL_DEBUGS("WaterHeight") << " This is void; counting coastline with water height of " << new_water_height << LL_ENDL; - S32 new_water_height_cm = llround(new_water_height * 100); - int count = (water_height_counts[new_water_height_cm] += 1); - // Just use the lowest water height: this is mainly about the horizon water, - // and whatever we do, we don't want it to be possible to look under the water - // when looking in the distance: it is better to make a step downwards in water - // height when going away from the avie than a step upwards. However, since - // everyone is used to DEFAULT_WATER_HEIGHT, don't allow a single region - // to drag the water level below DEFAULT_WATER_HEIGHT on it's own. - if (bordering_hole == 0 || // First time we get here. - (new_water_height >= DEFAULT_WATER_HEIGHT && - new_water_height < water_height) || - (new_water_height < DEFAULT_WATER_HEIGHT && - count > max_count) - ) - { - water_height = new_water_height; - } - if (count > max_count) - { - max_count = count; - } - if (!(checked[index] & bordering_hole_bit)) - { - checked[index] |= bordering_hole_bit; - ++bordering_hole; - } - } - else if (is_edge && !(checked[index] & bordering_edge_bit)) - { - checked[index] |= bordering_edge_bit; - ++bordering_edge; - } - if (!new_region_found) - { - // Dead end, there is no region here. - continue; - } - // Found a new connected region. - ++number_of_connected_regions; - if (new_region_found->getName().empty()) - { - // Uninitialized LLViewerRegion, don't use it's water height. - LL_DEBUGS("WaterHeight") << " Uninitialized region." << LL_ENDL; - ++uninitialized_regions; - continue; - } - nxny_pairs.push(nxny_pairs_type::value_type(cnx, cny)); - water_heights[cindex] = new_region_found->getWaterHeight(); - LL_DEBUGS("WaterHeight") << " Found a new region (name: " << new_region_found->getName() << "; water height: " << water_heights[cindex] << " m)!" << LL_ENDL; - } - } - llinfos << "Number of connected regions: " << number_of_connected_regions << " (" << uninitialized_regions << - " uninitialized); number of regions bordering Hole water: " << bordering_hole << - "; number of regions bordering Edge water: " << bordering_edge << llendl; - llinfos << "Coastline count (height, count): "; - bool first = true; - for (std::map::iterator iter = water_height_counts.begin(); iter != water_height_counts.end(); ++iter) - { - if (!first) llcont << ", "; - llcont << "(" << (iter->first / 100.f) << ", " << iter->second << ")"; - first = false; - } - llcont << llendl; - llinfos << "Water height used for Hole and Edge water objects: " << water_height << llendl; - - // Update all Region water objects. - for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) + F32 height = 0.f; + + for (region_list_t::iterator iter = mRegionList.begin(); + iter != mRegionList.end(); ++iter) { LLViewerRegion* regionp = *iter; LLVOWater* waterp = regionp->getLand().getWaterObj(); + height += regionp->getWaterHeight(); if (waterp) { gObjectList.updateActive(waterp); } } - // Clean up all existing Hole water objects. for (std::list::iterator iter = mHoleWaterObjects.begin(); - iter != mHoleWaterObjects.end(); ++iter) + iter != mHoleWaterObjects.end(); ++ iter) { LLVOWater* waterp = *iter; gObjectList.killObject(waterp); } mHoleWaterObjects.clear(); - // Let the Edge and Hole water boxes be 1024 meter high so that they - // are never too small to be drawn (A LL_VO_*_WATER box has water - // rendered on it's bottom surface only), and put their bottom at - // the current regions water height. - F32 const box_height = 1024; - F32 const water_center_z = water_height + box_height / 2; - - // Create new Hole water objects within 'range' where there is no region. - for (S32 x = min_x; x <= max_x; x += rwidth) + // Now, get a list of the holes + S32 x, y; + for (x = min_x; x <= max_x; x += rwidth) { - for (S32 y = min_y; y <= max_y; y += rwidth) + for (y = min_y; y <= max_y; y += rwidth) { U64 region_handle = to_region_handle(x, y); if (!getRegionFromHandle(region_handle)) { - LLVOWater* waterp = (LLVOWater*)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion()); + LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion()); waterp->setUseTexture(FALSE); - waterp->setPositionGlobal(LLVector3d(x + rwidth / 2, y + rwidth / 2, water_center_z)); - waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, box_height)); + waterp->setPositionGlobal(LLVector3d(x + rwidth/2, + y + rwidth/2, + 256.f+DEFAULT_WATER_HEIGHT)); + waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f)); gPipeline.createObject(waterp); mHoleWaterObjects.push_back(waterp); } } } - // Center of the region. - S32 const center_x = region_x + rwidth / 2; - S32 const center_y = region_y + rwidth / 2; - // Width of the area with Hole water objects. - S32 const width = rwidth + 2 * range; - S32 const horizon_extend = 2048 + 512 - range; // Legacy value. - // The overlap is needed to get rid of sky pixels being visible between the - // Edge and Hole water object at greater distances (due to floating point - // round off errors). - S32 const edge_hole_overlap = 1; // Twice the actual overlap. - - for (S32 dir = 0; dir < 8; ++dir) - { - // Size of the Edge water objects. - S32 const dim_x = (gDirAxes[dir][0] == 0) ? width : (horizon_extend + edge_hole_overlap); - S32 const dim_y = (gDirAxes[dir][1] == 0) ? width : (horizon_extend + edge_hole_overlap); - // And their position. - S32 const water_center_x = center_x + (width + horizon_extend) / 2 * gDirAxes[dir][0]; - S32 const water_center_y = center_y + (width + horizon_extend) / 2 * gDirAxes[dir][1]; + // Update edge water objects + S32 wx, wy; + S32 center_x, center_y; + wx = (max_x - min_x) + rwidth; + wy = (max_y - min_y) + rwidth; + center_x = min_x + (wx >> 1); + center_y = min_y + (wy >> 1); + S32 add_boundary[4] = { + 512 - (max_x - region_x), + 512 - (max_y - region_y), + 512 - (region_x - min_x), + 512 - (region_y - min_y) }; + + S32 dir; + for (dir = 0; dir < 8; dir++) + { + S32 dim[2] = { 0 }; + switch (gDirAxes[dir][0]) + { + case -1: dim[0] = add_boundary[2]; break; + case 0: dim[0] = wx; break; + default: dim[0] = add_boundary[0]; break; + } + switch (gDirAxes[dir][1]) + { + case -1: dim[1] = add_boundary[3]; break; + case 0: dim[1] = wy; break; + default: dim[1] = add_boundary[1]; break; + } + + // Resize and reshape the water objects + const S32 water_center_x = center_x + llround((wx + dim[0]) * 0.5f * gDirAxes[dir][0]); + const S32 water_center_y = center_y + llround((wy + dim[1]) * 0.5f * gDirAxes[dir][1]); + LLVOWater* waterp = mEdgeWaterObjects[dir]; if (!waterp || waterp->isDead()) { // The edge water objects can be dead because they're attached to the region that the // agent was in when they were originally created. - mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion()); + mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, + gAgent.getRegion()); waterp = mEdgeWaterObjects[dir]; waterp->setUseTexture(FALSE); - waterp->setIsEdgePatch(TRUE); // Mark that this is edge water and not hole water. + waterp->setIsEdgePatch(TRUE); gPipeline.createObject(waterp); } waterp->setRegion(gAgent.getRegion()); - LLVector3d water_pos(water_center_x, water_center_y, water_center_z); - LLVector3 water_scale((F32) dim_x, (F32) dim_y, box_height); + LLVector3d water_pos(water_center_x, water_center_y, + DEFAULT_WATER_HEIGHT+256.f); + LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f); + + //stretch out to horizon + water_scale.mV[0] += fabsf(2048.f * gDirAxes[dir][0]); + water_scale.mV[1] += fabsf(2048.f * gDirAxes[dir][1]); + + water_pos.mdV[0] += 1024.f * gDirAxes[dir][0]; + water_pos.mdV[1] += 1024.f * gDirAxes[dir][1]; waterp->setPositionGlobal(water_pos); waterp->setScale(water_scale); diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index c60dc8dc29..4465fde210 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -137,7 +137,6 @@ public: LLViewerTexture *getDefaultWaterTexture(); void updateWaterObjects(); - void waterHeightRegionInfo(std::string const& sim_name, F32 water_height); void shiftRegions(const LLVector3& offset); void setSpaceTimeUSec(const U64 space_time_usec); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 95f033cec2..0c17b5e297 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -55,9 +55,6 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "lltrans.h" -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) -#include "rlvhandler.h" -// [/RLVa:KB] #include "llglheaders.h" @@ -883,10 +880,8 @@ void LLWorldMapView::drawFrustum() F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 ); F32 half_width_pixels = half_width_meters * meters_to_pixels; - // Compute the frustum coordinates. Take the UI scale into account. - F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor"); - F32 ctr_x = (getLocalRect().getWidth() * 0.5f + sPanX) * ui_scale_factor; - F32 ctr_y = (getLocalRect().getHeight() * 0.5f + sPanY) * ui_scale_factor; + F32 ctr_x = getLocalRect().getWidth() * 0.5f + sPanX; + F32 ctr_y = getLocalRect().getHeight() * 0.5f + sPanY; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -997,13 +992,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); -// if (label != "") -// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a if (label != "") -/* - if ( (label != "") && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) -*/ -// [/RLVa:KB] { font->renderUTF8( label, 0, @@ -1063,12 +1052,7 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) { LLViewerRegion *region = gAgent.getRegion(); -// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f - std::string message = llformat("%s (%s)", - (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? info->getName().c_str() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION).c_str(), - info->getAccessString().c_str()); -// [/RLVa:KB] -// std::string message = llformat("%s (%s)", info->getName().c_str(), info->getAccessString().c_str()); + std::string message = llformat("%s (%s)", info->getName().c_str(), info->getAccessString().c_str()); if (!info->isDown()) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bffbcfd16b..0c5735cdfc 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -100,9 +100,7 @@ #include "llspatialpartition.h" #include "llmutelist.h" #include "lltoolpie.h" -// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d) -#include "rlvhandler.h" -// [/RLVa:KB] + #ifdef _DEBUG // Debug indices is disabled for now for debug performance - djs 4/24/02 @@ -632,14 +630,14 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) //static void LLPipeline::updateRenderDeferred() { - BOOL deferred = ((gSavedSettings.getBOOL("RenderDeferred") && - LLRenderTarget::sUseFBO && - LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - gSavedSettings.getBOOL("VertexShaderEnable") && - gSavedSettings.getBOOL("RenderAvatarVP") && - gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) && - !gUseWireframe; - + BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") && + LLRenderTarget::sUseFBO && + LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + gSavedSettings.getBOOL("VertexShaderEnable") && + gSavedSettings.getBOOL("RenderAvatarVP") && + (gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) && + !gUseWireframe; + sRenderDeferred = deferred; } @@ -1641,14 +1639,20 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl camera.disableUserClipPlane(); - if (hasRenderType(LLPipeline::RENDER_TYPE_SKY) && - gSky.mVOSkyp.notNull() && - gSky.mVOSkyp->mDrawable.notNull()) + if (gSky.mVOSkyp.notNull() && gSky.mVOSkyp->mDrawable.notNull()) { - gSky.mVOSkyp->mDrawable->setVisible(camera); - sCull->pushDrawable(gSky.mVOSkyp->mDrawable); - gSky.updateCull(); - stop_glerror(); + // Hack for sky - always visible. + if (hasRenderType(LLPipeline::RENDER_TYPE_SKY)) + { + gSky.mVOSkyp->mDrawable->setVisible(camera); + sCull->pushDrawable(gSky.mVOSkyp->mDrawable); + gSky.updateCull(); + stop_glerror(); + } + } + else + { + llinfos << "No sky drawable!" << llendl; } if (hasRenderType(LLPipeline::RENDER_TYPE_GROUND) && @@ -2218,7 +2222,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) LLPipeline::RENDER_TYPE_TERRAIN, LLPipeline::RENDER_TYPE_TREE, LLPipeline::RENDER_TYPE_SKY, - LLPipeline::RENDER_TYPE_VOIDWATER, LLPipeline::RENDER_TYPE_WATER, LLPipeline::END_RENDER_TYPES)) { @@ -2335,13 +2338,8 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) if (LLSelectMgr::getInstance()->mHideSelectedObjects) { -// if (drawablep->getVObj().notNull() && -// drawablep->getVObj()->isSelected()) -// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f - const LLViewerObject* pObj = drawablep->getVObj(); - if ( (pObj) && (pObj->isSelected()) && - ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) ) -// [/RVLa:KB] + if (drawablep->getVObj().notNull() && + drawablep->getVObj()->isSelected()) { return; } @@ -5015,10 +5013,6 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light) void LLPipeline::toggleRenderType(U32 type) { gPipeline.mRenderTypeEnabled[type] = !gPipeline.mRenderTypeEnabled[type]; - if (type == LLPipeline::RENDER_TYPE_WATER) - { - gPipeline.mRenderTypeEnabled[LLPipeline::RENDER_TYPE_VOIDWATER] = !gPipeline.mRenderTypeEnabled[LLPipeline::RENDER_TYPE_VOIDWATER]; - } } //static @@ -7346,7 +7340,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gPipeline.pushRenderTypeMask(); clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, - LLPipeline::RENDER_TYPE_VOIDWATER, LLPipeline::RENDER_TYPE_GROUND, LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_CLOUDS, @@ -7399,7 +7392,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { camera.setFar(camera_in.getFar()); clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, - LLPipeline::RENDER_TYPE_VOIDWATER, LLPipeline::RENDER_TYPE_GROUND, END_RENDER_TYPES); stop_glerror(); @@ -7916,7 +7908,6 @@ void LLPipeline::generateGI(LLCamera& camera, LLVector3& lightDir, std::vector(RLV_SETTING_ENABLECOMPOSITES, false); - if (gSavedSettings.controlExists(RLV_SETTING_ENABLECOMPOSITES)) - gSavedSettings.getControl(RLV_SETTING_ENABLECOMPOSITES)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fCompositeFolders)); - #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS - - fLegacyNaming = rlvGetSetting(RLV_SETTING_ENABLELEGACYNAMING, true); - if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) - gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fLegacyNaming)); - - fNoSetEnv = rlvGetSetting(RLV_SETTING_NOSETENV, false); - - fShowNameTags = rlvGetSetting(RLV_SETTING_SHOWNAMETAGS, false); - if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS)) - gSavedSettings.getControl(RLV_SETTING_SHOWNAMETAGS)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fShowNameTags)); - - fInitialized = true; - } -} - -#ifdef RLV_EXTENSION_STARTLOCATION - // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d - void RlvSettings::updateLoginLastLocation() - { - if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) - { - BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!gRlvHandler.canStand()); - if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) - { - gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); - } - } - } -#endif // RLV_EXTENSION_STARTLOCATION - -// Checked: 2010-02-27 (RLVa-1.2.0a) | Added: RLVa-1.1.0i -bool RlvSettings::onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting) -{ - if (pfSetting) - *pfSetting = sdValue.asBoolean(); - return true; -} - -// ============================================================================ -// RlvStrings -// - -std::vector RlvStrings::m_Anonyms; -std::map RlvStrings::m_StringMap; -#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR -std::map RlvStrings::m_BhvrAddMap; -std::map RlvStrings::m_BhvrRemMap; -#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR - -// Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.1.0h -void RlvStrings::initClass() -{ - static bool fInitialized = false; - if (!fInitialized) - { - LLXMLNodePtr xmlRoot; - if ( (!LLUICtrlFactory::getLayeredXMLNode("rlva_strings.xml", xmlRoot)) || (xmlRoot.isNull()) || (!xmlRoot->hasName("rlva_strings")) ) - { - RLV_ERRS << "Problem reading RLVa string XML file" << RLV_ENDL; - return; - } - - for (LLXMLNode* pNode = xmlRoot->getFirstChild(); pNode != NULL; pNode = pNode->getNextSibling()) - { - if (pNode->hasName("strings")) - { - std::string strName; - for (LLXMLNode* pStringNode = pNode->getFirstChild(); pStringNode != NULL; pStringNode = pStringNode->getNextSibling()) - { - if ( (!pStringNode->hasName("string")) || (!pStringNode->getAttributeString("name", strName)) ) - continue; - m_StringMap[strName] = pStringNode->getTextContents(); - } - } - else if (pNode->hasName("anonyms")) - { - for (LLXMLNode* pAnonymNode = pNode->getFirstChild(); pAnonymNode != NULL; pAnonymNode = pAnonymNode->getNextSibling()) - { - if (!pAnonymNode->hasName("anonym")) - continue; - m_Anonyms.push_back(pAnonymNode->getTextContents()); - } - } - #ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR - else if (pNode->hasName("behaviour-notifications")) - { - std::string strBhvr, strType; ERlvBehaviour eBhvr; - for (LLXMLNode* pNotifyNode = pNode->getFirstChild(); pNotifyNode != NULL; pNotifyNode = pNotifyNode->getNextSibling()) - { - if ( (!pNotifyNode->hasName("notification")) || (!pNotifyNode->getAttributeString("type", strType)) || - (!pNotifyNode->getAttributeString("behaviour", strBhvr)) || - ((eBhvr = RlvCommand::getBehaviourFromString(strBhvr)) == RLV_BHVR_UNKNOWN) ) - { - continue; - } - if ("add" == strType) - m_BhvrAddMap.insert(std::pair(eBhvr, pNotifyNode->getTextContents())); - else if ("rem" == strType) - m_BhvrRemMap.insert(std::pair(eBhvr, pNotifyNode->getTextContents())); - } - } - #endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR - } - - if ( (m_StringMap.empty()) || (m_Anonyms.empty()) ) - { - RLV_ERRS << "Problem parsing RLVa string XML file" << RLV_ENDL; - return; - } - - fInitialized = true; - } -} - -// Checked: 2009-11-11 (RLVa-1.1.0a) | Modified: RLVa-1.1.0a -const std::string& RlvStrings::getAnonym(const std::string& strName) -{ - const char* pszName = strName.c_str(); U32 nHash = 0; - - // Test with 11,264 SL names showed a 3.33% - 3.82% occurance for each so we *should* get a very even spread - for (int idx = 0, cnt = strName.length(); idx < cnt; idx++) - nHash += pszName[idx]; - - return m_Anonyms[nHash % m_Anonyms.size()]; -} - -#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR -// Checked: 2009-12-05 (RLVa-1.1.0h) | Added: RLVa-1.1.0h -const std::string& RlvStrings::getBehaviourNotificationString(ERlvBehaviour eBhvr, ERlvParamType eType) -{ - if (RLV_TYPE_ADD == eType) - { - std::map::const_iterator itString = m_BhvrAddMap.find(eBhvr); - return (itString != m_BhvrAddMap.end()) ? itString->second : LLStringUtil::null; - } - else if (RLV_TYPE_REMOVE == eType) - { - std::map::const_iterator itString = m_BhvrRemMap.find(eBhvr); - return (itString != m_BhvrRemMap.end()) ? itString->second : LLStringUtil::null; - } - return LLStringUtil::null; -} -#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR - -// Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a -const std::string& RlvStrings::getString(const std::string& strStringName) -{ - static const std::string strMissing = "(Missing RLVa string)"; - std::map::const_iterator itString = m_StringMap.find(strStringName); - return (itString != m_StringMap.end()) ? itString->second : strMissing; -} - -// Checked: 2009-11-25 (RLVa-1.1.0f) | Added: RLVa-1.1.0f -const char* RlvStrings::getStringFromReturnCode(ERlvCmdRet eRet) -{ - // TODO-RLVa: [2009-11-25] clean this up along with the calling code in process_chat_from_simulator() once we're happy with the output - switch (eRet) - { - case RLV_RET_SUCCESS_UNSET: - return "unset"; - case RLV_RET_SUCCESS_DUPLICATE: - return "duplicate"; - case RLV_RET_FAILED_SYNTAX: - return "syntax error"; - case RLV_RET_FAILED_OPTION: - return "invalid option"; - case RLV_RET_FAILED_PARAM: - return "invalid param"; - case RLV_RET_FAILED_LOCK: - return "locked command"; - case RLV_RET_FAILED_DISABLED: - return "disabled command"; - case RLV_RET_FAILED_UNKNOWN: - return "unknown command"; - case RLV_RET_FAILED_NOSHAREDROOT: - return "missing #RLV"; - // The following are identified by the chat verb - case RLV_RET_RETAINED: - case RLV_RET_SUCCESS: - case RLV_RET_FAILED: - break; - // The following shouldn't occur - case RLV_RET_UNKNOWN: - default: - RLV_ASSERT(false); - break; - }; - return NULL; -} - -// Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b -std::string RlvStrings::getVersion(bool fLegacy /*=false*/) -{ - return llformat("%s viewer v%d.%d.%d (%s %d.%d.%d.%d - RLVa %d.%d.%d)", - ( (!fLegacy) ? "RestrainedLove" : "RestrainedLife" ), - RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, - LLAppViewer::instance()->getSecondLifeTitle().c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD, - RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH); -} - -// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e -std::string RlvStrings::getVersionAbout() -{ - return llformat("RLV v%d.%d.%d / RLVa v%d.%d.%d%c" , - RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, - RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH, 'a' + RLVa_VERSION_BUILD); -} - - -// Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.1.0a -std::string RlvStrings::getVersionNum() -{ - return llformat("%d%02d%02d%02d", RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, RLV_VERSION_BUILD); -} - -// Checked: 2010-05-26 (RLVa-1.2.0h) | Added: RLVa-1.2.0g -bool RlvStrings::hasString(const std::string& strStringName) -{ - return m_StringMap.find(strStringName) != m_StringMap.end(); -} - -// ============================================================================ -// RlvUtil -// - -bool RlvUtil::m_fForceTp = false; - -// Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a -void RlvUtil::filterLocation(std::string& strUTF8Text) -{ - // TODO-RLVa: if either the region or parcel name is a simple word such as "a" or "the" then confusion will ensue? - // -> not sure how you would go about preventing this though :|... - - // Filter any mention of the surrounding region names - LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList(); - const std::string& strHiddenRegion = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); - for (LLWorld::region_list_t::const_iterator itRegion = regions.begin(); itRegion != regions.end(); ++itRegion) - rlvStringReplace(strUTF8Text, (*itRegion)->getName(), strHiddenRegion); - - // Filter any mention of the parcel name - LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstance(); - if (pParcelMgr) - rlvStringReplace(strUTF8Text, pParcelMgr->getAgentParcelName(), RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL)); -} - -// Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f -void RlvUtil::filterNames(std::string& strUTF8Text) -{ - std::vector idAgents; - LLWorld::getInstance()->getAvatars(&idAgents, NULL); - - std::string strFullName; - for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) - { - // LLCacheName::getFullName() will add the UUID to the lookup queue if we don't know it yet - if (gCacheName->getFullName(idAgents[idxAgent], strFullName)) - rlvStringReplace(strUTF8Text, strFullName, RlvStrings::getAnonym(strFullName)); - } -} - -// Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c -void RlvUtil::forceTp(const LLVector3d& posDest) -{ - m_fForceTp = true; - gAgent.teleportViaLocationLookAt(posDest); - m_fForceTp = false; -} - -// Checked: 2010-04-22 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f -bool RlvUtil::isNearbyAgent(const LLUUID& idAgent) -{ - // Sanity check since we call this with notification payloads as well and those strings tend to change from one release to another - RLV_ASSERT(idAgent.notNull()); - if ( (idAgent.notNull()) && (gAgent.getID() != idAgent) ) - { - std::vector idAgents; - LLWorld::getInstance()->getAvatars(&idAgents, NULL); - - for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) - if (idAgents[idxAgent] == idAgent) - return true; - } - return false; -} - -// Checked: 2010-04-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d -bool RlvUtil::isNearbyRegion(const std::string& strRegion) -{ - LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList(); - for (LLWorld::region_list_t::const_iterator itRegion = regions.begin(); itRegion != regions.end(); ++itRegion) - if ((*itRegion)->getName() == strRegion) - return true; - return false; -} - -// Checked: 2010-04-08 (RLVa-1.2.0d) | Added: RLVa-1.2.0d -void RlvUtil::notifyFailedAssertion(const char* pstrAssert, const char* pstrFile, int nLine) -{ - LLSD argsNotify; - argsNotify["MESSAGE"] = llformat("RLVa assertion failure: %s (%s - %d)", pstrAssert, pstrFile, nLine); - LLNotificationsUtil::add("SystemMessageTip", argsNotify); -} - -// Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b -void RlvUtil::sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession) -{ - // [See process_improved_im()] - std::string strFullName; - LLAgentUI::buildFullname(strFullName); - - pack_instant_message(gMessageSystem, gAgent.getID(), FALSE, gAgent.getSessionID(), idTo, strFullName, - strMsg, IM_ONLINE, IM_BUSY_AUTO_RESPONSE, idSession); - gAgent.sendReliableMessage(); -} - -// Checked: 2010-03-09 (RLVa-1.2.0a) | Modified: RLVa-1.0.1e -bool RlvUtil::sendChatReply(S32 nChannel, const std::string& strUTF8Text) -{ - if (!isValidReplyChannel(nChannel)) - return false; - - // Copy/paste from send_chat_from_viewer() - gMessageSystem->newMessageFast(_PREHASH_ChatFromViewer); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->nextBlockFast(_PREHASH_ChatData); - gMessageSystem->addStringFast(_PREHASH_Message, strUTF8Text); - gMessageSystem->addU8Fast(_PREHASH_Type, CHAT_TYPE_SHOUT); - gMessageSystem->addS32("Channel", nChannel); - gAgent.sendReliableMessage(); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); - - return true; -} - -// ============================================================================ -// Generic menu enablers -// - -// Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -bool rlvMenuCheckEnabled() -{ - return rlv_handler_t::isEnabled(); -} - -// Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -bool rlvMenuToggleEnabled() -{ - gSavedSettings.setBOOL(RLV_SETTING_MAIN, !rlv_handler_t::isEnabled()); - - LLSD args; - args["MESSAGE"] = - llformat("RestrainedLove Support will be %s after you restart", (rlv_handler_t::isEnabled()) ? "disabled" : "enabled" ); - LLNotificationsUtil::add("GenericAlert", args); - - return true; -} - -// Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -bool rlvMenuEnableIfNot(const LLSD& sdParam) -{ - bool fEnable = true; - if (rlv_handler_t::isEnabled()) - { - ERlvBehaviour eBhvr = RlvCommand::getBehaviourFromString(sdParam.asString()); - fEnable = (eBhvr != RLV_BHVR_UNKNOWN) ? !gRlvHandler.hasBehaviour(eBhvr) : true; - } - return fEnable; -} - -// ============================================================================ -// Selection functors -// - -// Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-0.2.0f -bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) -{ - return (pNode->getObject()) ? gRlvAttachmentLocks.isLockedAttachment(pNode->getObject()->getRootEdit()) : false; -} - -// Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f -bool RlvSelectIsOwnedByOrGroupOwned::apply(LLSelectNode* pNode) -{ - return (pNode->mPermissions->isGroupOwned()) || (pNode->mPermissions->getOwner() == m_idAgent); -} - -// Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.0f -bool RlvSelectIsSittingOn::apply(LLSelectNode* pNode) -{ - return (pNode->getObject()) && (pNode->getObject()->getRootEdit() == m_pObject); -} - -// ============================================================================ -// Predicates -// - -// Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -bool rlvPredIsWearableItem(const LLViewerInventoryItem* pItem) -{ - // RELEASE-RLVa: [SL-2.0.0] This will need rewriting for "ENABLE_MULTIATTACHMENTS" - if (pItem) - { - if (RlvForceWear::isWearingItem(pItem)) - return true; // Special exception for currently worn items - switch (pItem->getType()) - { - case LLAssetType::AT_BODYPART: - // NOTE: only one body part of each type is allowed so the only way to wear one is if we can replace the current one - return (gRlvWearableLocks.canWear(pItem) & RLV_WEAR_REPLACE); - case LLAssetType::AT_CLOTHING: - return (RLV_WEAR_LOCKED != gRlvWearableLocks.canWear(pItem)); - case LLAssetType::AT_OBJECT: - return gRlvAttachmentLocks.canAttach(pItem); - case LLAssetType::AT_GESTURE: - return true; - default: - RLV_ASSERT(false); - } - } - return false; -} - -// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool rlvPredIsNotWearableItem(const LLViewerInventoryItem* pItem) -{ - return !rlvPredIsWearableItem(pItem); -} - -// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool rlvPredIsRemovableItem(const LLViewerInventoryItem* pItem) -{ - if (pItem) - { - switch (pItem->getType()) - { - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - return gRlvWearableLocks.canRemove(pItem); - case LLAssetType::AT_OBJECT: - return gRlvAttachmentLocks.canDetach(pItem); - case LLAssetType::AT_GESTURE: - return true; - default: - RLV_ASSERT(false); - } - } - return false; -} - -// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool rlvPredIsNotRemovableItem(const LLViewerInventoryItem* pItem) -{ - return !rlvPredIsRemovableItem(pItem); -} - -// ============================================================================ -// Various public helper functions -// - -// Checked: 2009-11-15 (RLVa-1.1.0c) | Added: RLVa-1.1.0c -/* -BOOL rlvEnableSharedWearEnabler(void* pParam) -{ - return false; - // Visually disable the "Enable Shared Wear" option when at least one attachment is non-detachable - return (!gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)); -} -*/ - -// ============================================================================ diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h deleted file mode 100644 index 6d73dac0ab..0000000000 --- a/indra/newview/rlvcommon.h +++ /dev/null @@ -1,242 +0,0 @@ -/** - * - * Copyright (c) 2009-2010, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the - * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt - * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * - * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to - * abide by those obligations. - * - */ - -#ifndef RLV_COMMON_H -#define RLV_COMMON_H - -#include "llinventorymodel.h" -#include "llselectmgr.h" -#include "llviewercontrol.h" -#include "llviewerinventory.h" - -#include "rlvdefines.h" - -// ============================================================================ -// Forward declarations -// - -class RlvCommand; - -typedef std::vector llvo_vec_t; -typedef std::vector c_llvo_vec_t; - -// ============================================================================ -// RlvSettings -// - -template inline T rlvGetSetting(const std::string& strSetting, const T& defaultValue) -{ - RLV_ASSERT_DBG(gSavedSettings.controlExists(strSetting)); - return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.get(strSetting) : defaultValue; -} - -template inline T rlvGetPerUserSettings(const std::string& strSetting, const T& defaultValue) -{ - RLV_ASSERT_DBG(gSavedPerAccountSettings.controlExists(strSetting)); - return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.get(strSetting) : defaultValue; -} - -class RlvSettings -{ -public: - static bool getDebug() { return rlvGetSetting(RLV_SETTING_DEBUG, false); } - static bool getForbidGiveToRLV() { return rlvGetSetting(RLV_SETTING_FORBIDGIVETORLV, true); } - static bool getNoSetEnv() { return fNoSetEnv; } - - static std::string getWearAddPrefix() { return rlvGetSetting(RLV_SETTING_WEARADDPREFIX, LLStringUtil::null); } - static std::string getWearReplacePrefix() { return rlvGetSetting(RLV_SETTING_WEARREPLACEPREFIX, LLStringUtil::null); } - - static bool getDebugHideUnsetDup() { return rlvGetSetting(RLV_SETTING_DEBUGHIDEUNSETDUP, false); } - #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static BOOL getEnableComposites() { return fCompositeFolders; } - #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static bool getEnableLegacyNaming() { return fLegacyNaming; } - static bool getEnableSharedWear() { return rlvGetSetting(RLV_SETTING_ENABLESHAREDWEAR, false); } - static bool getHideLockedLayers() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDLAYER, false); } - static bool getHideLockedAttach() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDATTACH, false); } - static bool getHideLockedInventory() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDINVENTORY, false); } - static bool getSharedInvAutoRename() { return rlvGetSetting(RLV_SETTING_SHAREDINVAUTORENAME, true); } - static bool getShowNameTags() { return fShowNameTags; } - - #ifdef RLV_EXTENSION_STARTLOCATION - static bool getLoginLastLocation() { return rlvGetPerUserSettings(RLV_SETTING_LOGINLASTLOCATION, true); } - static void updateLoginLastLocation(); - #endif // RLV_EXTENSION_STARTLOCATION - - static void initClass(); -protected: - static bool onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting); - - #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static BOOL fCompositeFolders; - #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static bool fLegacyNaming; - static bool fNoSetEnv; - static bool fShowNameTags; -}; - -// ============================================================================ -// RlvStrings -// - -class RlvStrings -{ -public: - static void initClass(); - - static const std::string& getAnonym(const std::string& strName); // @shownames - static const std::string& getBehaviourNotificationString(ERlvBehaviour eBhvr, ERlvParamType eType); - static const std::string& getString(const std::string& strStringName); - static const char* getStringFromReturnCode(ERlvCmdRet eRet); - static std::string getVersion(bool fLegacy = false); // @version - static std::string getVersionAbout(); // Shown in Help / About - static std::string getVersionNum(); // @versionnum - static bool hasString(const std::string& strStringName); - -protected: - static std::vector m_Anonyms; - static std::map m_StringMap; - #ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR - static std::map m_BhvrAddMap; - static std::map m_BhvrRemMap; - #endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR -}; - -// ============================================================================ -// RlvUtil - Collection of (static) helper functions -// - -class RlvUtil -{ -public: - static bool isEmote(const std::string& strUTF8Text); - static bool isNearbyAgent(const LLUUID& idAgent); // @shownames - static bool isNearbyRegion(const std::string& strRegion); // @showloc - - static void filterLocation(std::string& strUTF8Text); // @showloc - static void filterNames(std::string& strUTF8Text); // @shownames - - static bool isForceTp() { return m_fForceTp; } - static void forceTp(const LLVector3d& posDest); // Ignores restrictions that might otherwise prevent tp'ing - - static void notifyFailedAssertion(const char* pstrAssert, const char* pstrFile, int nLine); - - static void sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null); - static bool isValidReplyChannel(S32 nChannel); - static bool sendChatReply(S32 nChannel, const std::string& strUTF8Text); - static bool sendChatReply(const std::string& strChannel, const std::string& strUTF8Text); - -protected: - static bool m_fForceTp; // @standtp -}; - -// ============================================================================ -// Extensibility classes -// - -class RlvCommandHandler -{ -public: - virtual ~RlvCommandHandler() {} - virtual bool onAddRemCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; } - virtual bool onClearCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; } - virtual bool onReplyCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; } - virtual bool onForceCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; } -}; -typedef bool (RlvCommandHandler::*rlvCommandHandler)(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet); - -// ============================================================================ -// Generic menu enablers -// - -bool rlvMenuCheckEnabled(); -bool rlvMenuToggleEnabled(); -bool rlvMenuEnableIfNot(const LLSD& sdParam); - -// ============================================================================ -// Selection functors -// - -struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor -{ - RlvSelectHasLockedAttach() {} - virtual bool apply(LLSelectNode* pNode); -}; - -struct RlvSelectIsOwnedByOrGroupOwned : public LLSelectedNodeFunctor -{ - RlvSelectIsOwnedByOrGroupOwned(const LLUUID& uuid) : m_idAgent(uuid) {} - virtual bool apply(LLSelectNode* pNode); -protected: - LLUUID m_idAgent; -}; - -struct RlvSelectIsSittingOn : public LLSelectedNodeFunctor -{ - RlvSelectIsSittingOn(LLXform* pObject) : m_pObject(pObject) {} - virtual bool apply(LLSelectNode* pNode); -protected: - LLXform* m_pObject; -}; - -// ============================================================================ -// Predicates -// - -bool rlvPredIsWearableItem(const LLViewerInventoryItem* pItem); -bool rlvPredIsNotWearableItem(const LLViewerInventoryItem* pItem); -bool rlvPredIsRemovableItem(const LLViewerInventoryItem* pItem); -bool rlvPredIsNotRemovableItem(const LLViewerInventoryItem* pItem); - -struct RlvPredIsEqualOrLinkedItem -{ - RlvPredIsEqualOrLinkedItem(const LLViewerInventoryItem* pItem) : m_pItem(pItem) {} - RlvPredIsEqualOrLinkedItem(const LLUUID& idItem) { m_pItem = gInventory.getItem(idItem); } - - bool operator()(const LLViewerInventoryItem* pItem) const - { - return (m_pItem) && (pItem) && (m_pItem->getLinkedUUID() == pItem->getLinkedUUID()); - } -protected: - const LLViewerInventoryItem* m_pItem; -}; - -// ============================================================================ -// Inlined class member functions -// - -// Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.2a -inline bool RlvUtil::isEmote(const std::string& strUTF8Text) -{ - return (strUTF8Text.length() > 4) && ( (strUTF8Text.compare(0, 4, "/me ") == 0) || (strUTF8Text.compare(0, 4, "/me'") == 0) ); -} - -// Checked: 2010-03-09 (RLVa-1.2.0b) | Added: RLVa-1.0.2a -inline bool RlvUtil::isValidReplyChannel(S32 nChannel) -{ - return (nChannel > 0) && (CHAT_CHANNEL_DEBUG != nChannel); -} - -// Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e -inline bool RlvUtil::sendChatReply(const std::string& strChannel, const std::string& strUTF8Text) -{ - S32 nChannel; - return (LLStringUtil::convertToS32(strChannel, nChannel)) ? sendChatReply(nChannel, strUTF8Text) : false; -} - -// ============================================================================ - -#endif // RLV_COMMON_H diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h deleted file mode 100644 index 22f79abb81..0000000000 --- a/indra/newview/rlvdefines.h +++ /dev/null @@ -1,316 +0,0 @@ -/** - * - * Copyright (c) 2009-2010, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the - * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt - * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * - * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to - * abide by those obligations. - * - */ - -#ifndef RLV_DEFINES_H -#define RLV_DEFINES_H - -// ============================================================================ -// Extensions -// - -// Provides access to "advanced" features through the RLVa debug menu -#define RLV_EXTENSION_FLOATER_RESTRICTIONS // Enables the Advanced / RLVa / Restrictions... floater -#define RLV_EXTENSION_HIDELOCKED // "Hide locked layers", "Hide locked attachments" and "Hide locked inventory" - -// Extensions -#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx -#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders: