Merge remote-tracking branch 'singu/master'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,3 +24,5 @@
|
||||
/edited-files.txt
|
||||
qtcreator-build/
|
||||
/.pc
|
||||
/build-*
|
||||
/viewer-*
|
||||
|
||||
@@ -108,7 +108,7 @@ if (LINUX)
|
||||
# The viewer doesn't need to catch SIGCHLD anyway.
|
||||
add_definitions(-DLL_IGNORE_SIGCHLD)
|
||||
|
||||
if(${CMAKE_C_COMPILER} MATCHES "gcc*")
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
find_program(GXX g++)
|
||||
mark_as_advanced(GXX)
|
||||
|
||||
@@ -159,6 +159,11 @@ if (LINUX)
|
||||
add_definitions(-Wno-unused-but-set-variable)
|
||||
endif (NOT ${CXX_VERSION} LESS 460)
|
||||
|
||||
#gcc 4.8 boost spam wall
|
||||
if(NOT ${CXX_VERSION} LESS 480)
|
||||
add_definitions(-Wno-unused-local-typedefs)
|
||||
endif (NOT ${CXX_VERSION} LESS 480)
|
||||
|
||||
# End of hacks.
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
@@ -184,13 +189,7 @@ if (LINUX)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
endif (${ARCH} STREQUAL "x86_64")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
find_program(CLANG clang)
|
||||
mark_as_advanced(CLANG)
|
||||
|
||||
find_program(CLANGXX clang++)
|
||||
mark_as_advanced(CLANGXX)
|
||||
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_definitions(
|
||||
-D_FORTIFY_SOURCE=2
|
||||
)
|
||||
@@ -200,20 +199,13 @@ if (LINUX)
|
||||
add_definitions(-fno-stack-protector)
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
set(MARCH_FLAG " -march=pentium4")
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${MARCH_FLAG} -fno-inline -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "icc*" AND ${CMAKE_CXX_COMPILER} MATCHES "icpc*")
|
||||
find_program(ICC icc)
|
||||
mark_as_advanced(ICC)
|
||||
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
add_definitions(
|
||||
-D_FORTIFY_SOURCE=2
|
||||
)
|
||||
@@ -248,7 +240,8 @@ if (DARWIN)
|
||||
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
if(${CMAKE_C_COMPILER} MATCHES "gcc*")
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
@@ -257,7 +250,7 @@ if (DARWIN)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3")
|
||||
@@ -269,20 +262,21 @@ endif (DARWIN)
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
if(${CMAKE_C_COMPILER} MATCHES "gcc*")
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_definitions(-DLL_GNUC=1)
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "clang*")
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-tautological-compare -Wno-char-subscripts -Wno-gnu -Wno-logical-op-parentheses -Wno-non-virtual-dtor")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_definitions(-DLL_CLANG=1)
|
||||
set(UNIX_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-tautological-compare -Wno-char-subscripts -Wno-gnu -Wno-logical-op-parentheses -Wno-non-virtual-dtor")
|
||||
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Woverloaded-virtual -Wno-parentheses-equality -Wno-reorder -Wno-unused-function -Wno-unused-value -Wno-unused-variable")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}")
|
||||
elseif(${CMAKE_C_COMPILER} MATCHES "icc")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
add_definitions(-DLL_ICC=1)
|
||||
set(UNIX_WARNINGS "-wd327 -wd597 -wd858")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_WARNINGS}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# Use -DDISABLE_FATAL_WARNINGS:BOOL=FALSE during configuration to enable fatal warnings.
|
||||
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
||||
if (NOT DISABLE_FATAL_WARNINGS)
|
||||
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Werror")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_CXX_WARNINGS} -Werror")
|
||||
|
||||
@@ -30,6 +30,7 @@ set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
||||
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
|
||||
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
|
||||
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
||||
|
||||
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
|
||||
"Location of prebuilt libraries.")
|
||||
|
||||
@@ -45,7 +45,6 @@ import commands
|
||||
class CommandError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def mkdir(path):
|
||||
try:
|
||||
os.mkdir(path)
|
||||
@@ -54,15 +53,19 @@ def mkdir(path):
|
||||
if err.errno != errno.EEXIST or not os.path.isdir(path):
|
||||
raise
|
||||
|
||||
def getcwd():
|
||||
cwd = os.getcwd()
|
||||
if 'a' <= cwd[0] <= 'z' and cwd[1] == ':':
|
||||
def prettyprint_path_for_cmake(path):
|
||||
if 'a' <= path[0] <= 'z' and path[1] == ':':
|
||||
# CMake wants DOS drive letters to be in uppercase. The above
|
||||
# condition never asserts on platforms whose full path names
|
||||
# always begin with a slash, so we don't need to test whether
|
||||
# we are running on Windows.
|
||||
cwd = cwd[0].upper() + cwd[1:]
|
||||
return cwd
|
||||
path = path[0].upper() + path[1:]
|
||||
return path
|
||||
|
||||
def getcwd():
|
||||
return prettyprint_path_for_cmake(os.getcwd())
|
||||
|
||||
source_indra = prettyprint_path_for_cmake(os.path.dirname(os.path.realpath(__file__)))
|
||||
|
||||
def quote(opts):
|
||||
return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"'
|
||||
@@ -150,7 +153,7 @@ class PlatformSetup(object):
|
||||
simple = False
|
||||
try:
|
||||
os.chdir(d)
|
||||
cmd = self.cmake_commandline(cwd, d, args, simple)
|
||||
cmd = self.cmake_commandline(source_indra, d, args, simple)
|
||||
print 'Running %r in %r' % (cmd, d)
|
||||
self.run(cmd, 'cmake')
|
||||
finally:
|
||||
@@ -270,18 +273,9 @@ class LinuxSetup(UnixSetup):
|
||||
return 'linux'
|
||||
|
||||
def build_dirs(self):
|
||||
# Only build the server code if we have it.
|
||||
platform_build = '%s-%s' % (self.platform(), self.build_type.lower())
|
||||
|
||||
if self.arch() == 'i686' and self.is_internal_tree():
|
||||
return ['viewer-' + platform_build, 'server-' + platform_build]
|
||||
elif self.arch() == 'x86_64' and self.is_internal_tree():
|
||||
# the viewer does not build in 64bit -- kdu5 issues
|
||||
# we can either use openjpeg, or overhaul our viewer to handle kdu5 or higher
|
||||
# doug knows about kdu issues
|
||||
return ['server-' + platform_build]
|
||||
else:
|
||||
return ['viewer-' + platform_build]
|
||||
return ['viewer-' + platform_build]
|
||||
|
||||
def cmake_commandline(self, src_dir, build_dir, opts, simple):
|
||||
args = dict(
|
||||
@@ -293,31 +287,11 @@ class LinuxSetup(UnixSetup):
|
||||
type=self.build_type.upper(),
|
||||
project_name=self.project_name,
|
||||
word_size=self.word_size,
|
||||
cxx="g++"
|
||||
)
|
||||
if not self.is_internal_tree():
|
||||
args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'})
|
||||
else:
|
||||
if self.distcc:
|
||||
distcc = self.find_in_path('distcc')
|
||||
baseonly = True
|
||||
else:
|
||||
distcc = []
|
||||
baseonly = False
|
||||
if 'server' in build_dir:
|
||||
gcc = distcc + self.find_in_path(
|
||||
self.debian_sarge and 'g++-3.3' or 'g++-4.1',
|
||||
'g++', baseonly)
|
||||
args.update({'cxx': ' '.join(gcc), 'server': 'ON',
|
||||
'viewer': 'OFF'})
|
||||
else:
|
||||
gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly)
|
||||
args.update({'cxx': ' '.join(gcc41),
|
||||
'server': 'OFF',
|
||||
'viewer': 'ON'})
|
||||
|
||||
cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
|
||||
'-G %(generator)r -DSERVER:BOOL=%(server)s '
|
||||
'-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
|
||||
'-DUNATTENDED:BOOL=%(unattended)s '
|
||||
'-G %(generator)r -DSTANDALONE:BOOL=%(standalone)s '
|
||||
'-DWORD_SIZE:STRING=%(word_size)s '
|
||||
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
|
||||
'%(opts)s %(dir)r')
|
||||
|
||||
@@ -1,13 +1,39 @@
|
||||
cmake_minimum_required(VERSION 2.6.4)
|
||||
# -*- cmake -*-
|
||||
|
||||
project(libhacd CXX C)
|
||||
project(libhacd)
|
||||
include(00-Common)
|
||||
|
||||
file (GLOB SOURCE_FILES *.cpp )
|
||||
file (GLOB INCLUDE_FILES *.h )
|
||||
set(libhacd_SOURCE_FILES
|
||||
hacdGraph.cpp
|
||||
hacdHACD.cpp
|
||||
hacdICHull.cpp
|
||||
hacdManifoldMesh.cpp
|
||||
hacdMeshDecimator.cpp
|
||||
hacdMicroAllocator.cpp
|
||||
hacdRaycastMesh.cpp
|
||||
)
|
||||
|
||||
set(libhacd_HEADER_FILES
|
||||
hacdCircularList.h
|
||||
hacdCircularList.inl
|
||||
hacdGraph.h
|
||||
hacdHACD.h
|
||||
hacdICHull.h
|
||||
hacdManifoldMesh.h
|
||||
hacdMeshDecimator.h
|
||||
hacdMicroAllocator.h
|
||||
hacdRaycastMesh.h
|
||||
hacdSArray.h
|
||||
hacdVector.h
|
||||
hacdVector.inl
|
||||
hacdVersion.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${libhacd_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
IF(WINDOWS)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
ENDIF(WINDOWS)
|
||||
|
||||
add_library(hacd ${SOURCE_FILES} ${INCLUDE_FILES})
|
||||
add_library(hacd ${libhacd_SOURCE_FILES} ${libhacd_INCLUDE_FILES})
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace HACD
|
||||
{
|
||||
public:
|
||||
virtual void operator()( char const *aMsg, double aProgress, double aConcavity, size_t aVertices) = 0;
|
||||
virtual ~ICallback() {}
|
||||
};
|
||||
|
||||
typedef ICallback* CallBackFunction;
|
||||
|
||||
@@ -1,9 +1,35 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(libndhacd)
|
||||
|
||||
include(00-Common)
|
||||
|
||||
include_directories(${LIBS_OPEN_DIR}/libhacd)
|
||||
|
||||
set (SOURCE_FILES LLConvexDecomposition.cpp nd_hacdConvexDecomposition.cpp nd_hacdStructs.cpp nd_hacdUtils.cpp nd_EnterExitTracer.cpp nd_StructTracer.cpp )
|
||||
file(GLOB HEADER_FILES *.h)
|
||||
set (libndhacd_SOURCE_FILES
|
||||
LLConvexDecomposition.cpp
|
||||
nd_hacdConvexDecomposition.cpp
|
||||
nd_hacdStructs.cpp
|
||||
nd_hacdUtils.cpp
|
||||
nd_EnterExitTracer.cpp
|
||||
nd_StructTracer.cpp
|
||||
)
|
||||
|
||||
add_library( nd_hacdConvexDecomposition STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
||||
set (libndhacd_HEADER_FILES
|
||||
LLConvexDecomposition.h
|
||||
ndConvexDecomposition.h
|
||||
nd_hacdConvexDecomposition.h
|
||||
nd_hacdStructs.h
|
||||
nd_StructTracer.h
|
||||
LLConvexDecompositionStubImpl.h
|
||||
nd_EnterExitTracer.h
|
||||
nd_hacdDefines.h
|
||||
nd_hacdUtils.h
|
||||
windowsincludes.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${libndhacd_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
add_library( nd_hacdConvexDecomposition STATIC ${libndhacd_SOURCE_FILES} ${libndhacd_HEADER_FILES})
|
||||
|
||||
|
||||
@@ -1,13 +1,34 @@
|
||||
cmake_minimum_required(VERSION 2.6.4)
|
||||
# -*- cmake -*-
|
||||
|
||||
project(libpathing)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLMath)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
project(ndPathingLib CXX C)
|
||||
|
||||
if( MSVC )
|
||||
add_definitions(-D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1)
|
||||
endif( MSVC )
|
||||
|
||||
file (GLOB SOURCE_FILES *.cpp )
|
||||
file (GLOB INCLUDE_FILES *.h )
|
||||
set(libpathing_SOURCE_FILES
|
||||
llpathinglib.cpp
|
||||
llphysicsextensions.cpp
|
||||
)
|
||||
|
||||
add_library(nd_Pathing STATIC ${SOURCE_FILES} ${INCLUDE_FILES} )
|
||||
set(libpathing_HEADER_FILES
|
||||
llpathinglib.h
|
||||
llphysicsextensions.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${libpathing_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
add_library(nd_Pathing STATIC ${libpathing_SOURCE_FILES} ${libpathing_HEADER_FILES} )
|
||||
add_dependencies(nd_Pathing prepare)
|
||||
|
||||
|
||||
@@ -3,37 +3,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifndef LL_V3MATH_H
|
||||
class LLVector3
|
||||
{
|
||||
public:
|
||||
float mV[3];
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef LL_V4COLORU_H
|
||||
class LLColor4U
|
||||
{
|
||||
public:
|
||||
unsigned char mV[4];
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef LL_LLUUID_H
|
||||
class LLUUID
|
||||
{
|
||||
public:
|
||||
unsigned char mData[16];
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef LLQUATERNION_H
|
||||
class LLQuaternion
|
||||
{
|
||||
public:
|
||||
double mQ[4];
|
||||
};
|
||||
#endif
|
||||
#include "v3math.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llquaternion.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
class LLRender;
|
||||
|
||||
@@ -43,7 +16,7 @@ public:
|
||||
enum LLPLResult
|
||||
{
|
||||
LLPL_NO_PATH,
|
||||
LLPL_PATH_GENERATED_OK,
|
||||
LLPL_PATH_GENERATED_OK
|
||||
};
|
||||
|
||||
enum LLPLCharacterType
|
||||
@@ -52,7 +25,7 @@ public:
|
||||
LLPL_CHARACTER_TYPE_A,
|
||||
LLPL_CHARACTER_TYPE_B,
|
||||
LLPL_CHARACTER_TYPE_C,
|
||||
LLPL_CHARACTER_TYPE_D,
|
||||
LLPL_CHARACTER_TYPE_D
|
||||
};
|
||||
|
||||
enum LLShapeType
|
||||
@@ -60,13 +33,13 @@ public:
|
||||
LLST_WalkableObjects = 1,
|
||||
LLST_ObstacleObjects = 2,
|
||||
LLST_MaterialPhantoms = 3,
|
||||
LLST_ExclusionPhantoms = 4,
|
||||
LLST_ExclusionPhantoms = 4
|
||||
};
|
||||
|
||||
enum LLPLRenderType
|
||||
{
|
||||
LLPL_START,
|
||||
LLPL_END,
|
||||
LLPL_END
|
||||
};
|
||||
|
||||
struct Vector
|
||||
@@ -87,9 +60,9 @@ public:
|
||||
operator LLVector3() const
|
||||
{
|
||||
LLVector3 ret;
|
||||
ret.mV[0] = mX;
|
||||
ret.mV[1] = mY;
|
||||
ret.mV[2] = mZ;
|
||||
ret.mV[0] = (F32) mX;
|
||||
ret.mV[1] = (F32) mY;
|
||||
ret.mV[2] = (F32) mZ;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -473,6 +473,8 @@ const std::string LLTexLayerSet::getBodyRegionName() const
|
||||
// virtual
|
||||
void LLTexLayerSet::asLLSD(LLSD& sd) const
|
||||
{
|
||||
llassert_always(false); // broken function
|
||||
#if 0
|
||||
sd["visible"] = LLSD::Boolean(isVisible());
|
||||
LLSD layer_list_sd;
|
||||
layer_list_t::const_iterator layer_iter = mLayerList.begin();
|
||||
@@ -492,6 +494,7 @@ void LLTexLayerSet::asLLSD(LLSD& sd) const
|
||||
sd["layers"] = layer_list_sd;
|
||||
sd["masks"] = mask_list_sd;
|
||||
sd["info"] = info_sd;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,10 @@ protected:
|
||||
typedef std::map<S32, F32> param_map_t;
|
||||
param_map_t mSavedVisualParamMap; // last saved version of visual params
|
||||
|
||||
public:
|
||||
typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
|
||||
|
||||
protected:
|
||||
visual_param_index_map_t mVisualParamIndexMap;
|
||||
|
||||
te_map_t mTEMap; // maps TE to LocalTextureObject
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <map>
|
||||
#include <deque>
|
||||
|
||||
#include "lluuidhashmap.h"
|
||||
#include "llmotion.h"
|
||||
#include "llpose.h"
|
||||
#include "llframetimer.h"
|
||||
|
||||
@@ -234,7 +234,7 @@ set(llcommon_HEADER_FILES
|
||||
lltypeinfolookup.h
|
||||
lluri.h
|
||||
lluuid.h
|
||||
lluuidhashmap.h
|
||||
sguuidhash.h
|
||||
llversionviewer.h.in
|
||||
llworkerthread.h
|
||||
metaclass.h
|
||||
|
||||
@@ -61,6 +61,13 @@ typedef enum e_chat_audible_level
|
||||
CHAT_AUDIBLE_FULLY = 1
|
||||
} EChatAudible;
|
||||
|
||||
typedef enum e_chat_style
|
||||
{
|
||||
CHAT_STYLE_NORMAL,
|
||||
CHAT_STYLE_IRC,
|
||||
CHAT_STYLE_HISTORY
|
||||
}EChatStyle;
|
||||
|
||||
// A piece of chat
|
||||
class LLChat
|
||||
{
|
||||
@@ -80,7 +87,8 @@ public:
|
||||
// [/RLVa:KB]
|
||||
mTime(0.0),
|
||||
mPosAgent(),
|
||||
mURL()
|
||||
mURL(),
|
||||
mChatStyle(CHAT_STYLE_NORMAL)
|
||||
{ }
|
||||
|
||||
LLChat(const LLChat &chat)
|
||||
@@ -93,7 +101,8 @@ public:
|
||||
mMuted(chat.mMuted),
|
||||
mTime(chat.mTime),
|
||||
mPosAgent(chat.mPosAgent),
|
||||
mURL(chat.mURL)
|
||||
mURL(chat.mURL),
|
||||
mChatStyle(chat.mChatStyle)
|
||||
{ }
|
||||
|
||||
std::string mText; // UTF-8 line of text
|
||||
@@ -110,6 +119,7 @@ public:
|
||||
F64 mTime; // viewer only, seconds from viewer start
|
||||
LLVector3 mPosAgent;
|
||||
std::string mURL;
|
||||
EChatStyle mChatStyle;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -72,14 +72,14 @@
|
||||
|
||||
|
||||
// Figure out differences between compilers
|
||||
#if defined(__clang__) && defined(__GNUC__)
|
||||
#if defined(__clang__)
|
||||
#define CLANG_VERSION (__clang_major__ * 10000 \
|
||||
+ __clang_minor__ * 100 \
|
||||
+ __clang_patchlevel__)
|
||||
#ifndef LL_CLANG
|
||||
#define LL_CLANG 1
|
||||
#endif
|
||||
#elif defined (__ICC) && defined(__GNUC__)
|
||||
#elif defined (__ICC)
|
||||
#ifndef LL_ICC
|
||||
#define LL_ICC 1
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if LL_GNUC
|
||||
// Generate code for inlines from llthread.h (needed for is_main_thread()).
|
||||
#pragma implementation "llthread.h"
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef LL_LLTHREAD_H
|
||||
#define LL_LLTHREAD_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if LL_GNUC
|
||||
// Needed for is_main_thread() when compiling with optimization (relwithdebinfo).
|
||||
// It doesn't hurt to just always specify it though.
|
||||
#pragma interface
|
||||
|
||||
@@ -171,14 +171,6 @@ void LLUUID::toString(std::string& out) const
|
||||
(U8)(mData[15]));
|
||||
}
|
||||
|
||||
// *TODO: deprecate
|
||||
void LLUUID::toString(char *out) const
|
||||
{
|
||||
std::string buffer;
|
||||
toString(buffer);
|
||||
strcpy(out,buffer.c_str()); /* Flawfinder: ignore */
|
||||
}
|
||||
|
||||
void LLUUID::toCompressedString(std::string& out) const
|
||||
{
|
||||
char bytes[UUID_BYTES+1];
|
||||
@@ -187,13 +179,6 @@ void LLUUID::toCompressedString(std::string& out) const
|
||||
out.assign(bytes, UUID_BYTES);
|
||||
}
|
||||
|
||||
// *TODO: deprecate
|
||||
void LLUUID::toCompressedString(char *out) const
|
||||
{
|
||||
memcpy(out, mData, UUID_BYTES); /* Flawfinder: ignore */
|
||||
out[UUID_BYTES] = '\0';
|
||||
}
|
||||
|
||||
std::string LLUUID::getString() const
|
||||
{
|
||||
return asString();
|
||||
@@ -422,14 +407,9 @@ std::ostream& operator<<(std::ostream& s, const LLUUID &uuid)
|
||||
|
||||
std::istream& operator>>(std::istream &s, LLUUID &uuid)
|
||||
{
|
||||
U32 i;
|
||||
char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */
|
||||
for (i = 0; i < UUID_STR_LENGTH-1; i++)
|
||||
{
|
||||
s >> uuid_str[i];
|
||||
}
|
||||
uuid_str[i] = '\0';
|
||||
uuid.set(std::string(uuid_str));
|
||||
std::string uuid_str;
|
||||
s >> uuid_str;
|
||||
uuid.set(uuid_str);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,9 +106,7 @@ public:
|
||||
friend LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLUUID &uuid);
|
||||
friend LL_COMMON_API std::istream& operator>>(std::istream& s, LLUUID &uuid);
|
||||
|
||||
void toString(char *out) const; // Does not allocate memory, needs 36 characters (including \0)
|
||||
void toString(std::string& out) const;
|
||||
void toCompressedString(char *out) const; // Does not allocate memory, needs 17 characters (including \0)
|
||||
void toCompressedString(std::string& out) const;
|
||||
|
||||
std::string asString() const;
|
||||
|
||||
@@ -1,589 +0,0 @@
|
||||
/**
|
||||
* @file lluuidhashmap.h
|
||||
* @brief A uuid based hash map.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLUUIDHASHMAP_H
|
||||
#define LL_LLUUIDHASHMAP_H
|
||||
|
||||
#include "stdtypes.h"
|
||||
#include "llerror.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
// UUID hash map
|
||||
|
||||
/*
|
||||
LLUUIDHashMap<uuid_pair, 32> foo(test_equals);
|
||||
LLUUIDHashMapIter<uuid_pair, 32> bar(&foo);
|
||||
|
||||
LLDynamicArray<LLUUID> source_ids;
|
||||
const S32 COUNT = 100000;
|
||||
S32 q;
|
||||
for (q = 0; q < COUNT; q++)
|
||||
{
|
||||
llinfos << "Creating" << llendl;
|
||||
LLUUID id;
|
||||
id.generate();
|
||||
//llinfos << q << ":" << id << llendl;
|
||||
uuid_pair pair;
|
||||
pair.mUUID = id;
|
||||
pair.mValue = q;
|
||||
foo.set(id, pair);
|
||||
source_ids.put(id);
|
||||
//ms_sleep(1);
|
||||
}
|
||||
|
||||
uuid_pair cur;
|
||||
llinfos << "Iterating" << llendl;
|
||||
for (cur = bar.first(); !bar.done(); cur = bar.next())
|
||||
{
|
||||
if (source_ids[cur.mValue] != cur.mUUID)
|
||||
{
|
||||
llerrs << "Incorrect value iterated!" << llendl;
|
||||
}
|
||||
//llinfos << cur.mValue << ":" << cur.mUUID << llendl;
|
||||
//ms_sleep(1);
|
||||
}
|
||||
|
||||
llinfos << "Finding" << llendl;
|
||||
for (q = 0; q < COUNT; q++)
|
||||
{
|
||||
cur = foo.get(source_ids[q]);
|
||||
if (source_ids[cur.mValue] != cur.mUUID)
|
||||
{
|
||||
llerrs << "Incorrect value found!" << llendl;
|
||||
}
|
||||
//llinfos << res.mValue << ":" << res.mUUID << llendl;
|
||||
//ms_sleep(1);
|
||||
}
|
||||
|
||||
llinfos << "Removing" << llendl;
|
||||
for (q = 0; q < COUNT/2; q++)
|
||||
{
|
||||
if (!foo.remove(source_ids[q]))
|
||||
{
|
||||
llerrs << "Remove failed!" << llendl;
|
||||
}
|
||||
//ms_sleep(1);
|
||||
}
|
||||
|
||||
llinfos << "Iterating" << llendl;
|
||||
for (cur = bar.first(); !bar.done(); cur = bar.next())
|
||||
{
|
||||
if (source_ids[cur.mValue] != cur.mUUID)
|
||||
{
|
||||
llerrs << "Incorrect value found!" << llendl;
|
||||
}
|
||||
//llinfos << cur.mValue << ":" << cur.mUUID << llendl;
|
||||
//ms_sleep(1);
|
||||
}
|
||||
llinfos << "Done with UUID map test" << llendl;
|
||||
|
||||
return 0;
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// LLUUIDHashNode
|
||||
//
|
||||
|
||||
template <class DATA, int SIZE>
|
||||
class LLUUIDHashNode
|
||||
{
|
||||
public:
|
||||
LLUUIDHashNode();
|
||||
|
||||
public:
|
||||
S32 mCount;
|
||||
U8 mKey[SIZE];
|
||||
DATA mData[SIZE];
|
||||
LLUUIDHashNode<DATA, SIZE> *mNextNodep;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// LLUUIDHashNode implementation
|
||||
//
|
||||
template <class DATA, int SIZE>
|
||||
LLUUIDHashNode<DATA, SIZE>::LLUUIDHashNode()
|
||||
{
|
||||
mCount = 0;
|
||||
mNextNodep = NULL;
|
||||
}
|
||||
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
class LLUUIDHashMap
|
||||
{
|
||||
public:
|
||||
// basic constructor including sorter
|
||||
LLUUIDHashMap(BOOL (*equals)(const LLUUID &uuid, const DATA_TYPE &data),
|
||||
const DATA_TYPE &null_data);
|
||||
~LLUUIDHashMap();
|
||||
|
||||
inline DATA_TYPE &get(const LLUUID &uuid);
|
||||
inline BOOL check(const LLUUID &uuid) const;
|
||||
inline DATA_TYPE &set(const LLUUID &uuid, const DATA_TYPE &type);
|
||||
inline BOOL remove(const LLUUID &uuid);
|
||||
void removeAll();
|
||||
|
||||
inline S32 getLength() const; // Warning, NOT O(1!)
|
||||
public:
|
||||
BOOL (*mEquals)(const LLUUID &uuid, const DATA_TYPE &data);
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE> mNodes[256];
|
||||
|
||||
S32 mIterCount;
|
||||
protected:
|
||||
DATA_TYPE mNull;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// LLUUIDHashMap implementation
|
||||
//
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
LLUUIDHashMap<DATA_TYPE, SIZE>::LLUUIDHashMap(BOOL (*equals)(const LLUUID &uuid, const DATA_TYPE &data),
|
||||
const DATA_TYPE &null_data)
|
||||
: mEquals(equals),
|
||||
mIterCount(0),
|
||||
mNull(null_data)
|
||||
{ }
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
LLUUIDHashMap<DATA_TYPE, SIZE>::~LLUUIDHashMap()
|
||||
{
|
||||
removeAll();
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
void LLUUIDHashMap<DATA_TYPE, SIZE>::removeAll()
|
||||
{
|
||||
S32 bin;
|
||||
for (bin = 0; bin < 256; bin++)
|
||||
{
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[bin];
|
||||
|
||||
BOOL first = TRUE;
|
||||
while (nodep)
|
||||
{
|
||||
S32 i;
|
||||
const S32 count = nodep->mCount;
|
||||
|
||||
// Iterate through all members of this node
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
nodep->mData[i] = mNull;
|
||||
}
|
||||
|
||||
nodep->mCount = 0;
|
||||
// Done with all objects in this node, go to the next.
|
||||
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE>* curp = nodep;
|
||||
nodep = nodep->mNextNodep;
|
||||
|
||||
// Delete the node if it's not the first node
|
||||
if (first)
|
||||
{
|
||||
first = FALSE;
|
||||
curp->mNextNodep = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete curp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline S32 LLUUIDHashMap<DATA_TYPE, SIZE>::getLength() const
|
||||
{
|
||||
S32 count = 0;
|
||||
S32 bin;
|
||||
for (bin = 0; bin < 256; bin++)
|
||||
{
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = (LLUUIDHashNode<DATA_TYPE, SIZE>*) &mNodes[bin];
|
||||
while (nodep)
|
||||
{
|
||||
count += nodep->mCount;
|
||||
nodep = nodep->mNextNodep;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline DATA_TYPE &LLUUIDHashMap<DATA_TYPE, SIZE>::get(const LLUUID &uuid)
|
||||
{
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[uuid.mData[0]];
|
||||
|
||||
// Grab the second byte of the UUID, which is the key for the node data
|
||||
const S32 second_byte = uuid.mData[1];
|
||||
while (nodep)
|
||||
{
|
||||
S32 i;
|
||||
const S32 count = nodep->mCount;
|
||||
|
||||
// Iterate through all members of this node
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ((nodep->mKey[i] == second_byte) && mEquals(uuid, nodep->mData[i]))
|
||||
{
|
||||
// The second byte matched, and our equality test passed.
|
||||
// We found it.
|
||||
return nodep->mData[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Done with all objects in this node, go to the next.
|
||||
nodep = nodep->mNextNodep;
|
||||
}
|
||||
return mNull;
|
||||
}
|
||||
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline BOOL LLUUIDHashMap<DATA_TYPE, SIZE>::check(const LLUUID &uuid) const
|
||||
{
|
||||
const LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[uuid.mData[0]];
|
||||
|
||||
// Grab the second byte of the UUID, which is the key for the node data
|
||||
const S32 second_byte = uuid.mData[1];
|
||||
while (nodep)
|
||||
{
|
||||
S32 i;
|
||||
const S32 count = nodep->mCount;
|
||||
|
||||
// Iterate through all members of this node
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ((nodep->mKey[i] == second_byte) && mEquals(uuid, nodep->mData[i]))
|
||||
{
|
||||
// The second byte matched, and our equality test passed.
|
||||
// We found it.
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Done with all objects in this node, go to the next.
|
||||
nodep = nodep->mNextNodep;
|
||||
}
|
||||
|
||||
// Didn't find anything
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline DATA_TYPE &LLUUIDHashMap<DATA_TYPE, SIZE>::set(const LLUUID &uuid, const DATA_TYPE &data)
|
||||
{
|
||||
// Set is just like a normal find, except that if we find a match
|
||||
// we replace it with the input value.
|
||||
// If we don't find a match, we append to the end of the list.
|
||||
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE>* nodep = &mNodes[uuid.mData[0]];
|
||||
|
||||
const S32 second_byte = uuid.mData[1];
|
||||
while (1)
|
||||
{
|
||||
const S32 count = nodep->mCount;
|
||||
|
||||
S32 i;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ((nodep->mKey[i] == second_byte) && mEquals(uuid, nodep->mData[i]))
|
||||
{
|
||||
// We found a match for this key, replace the data with
|
||||
// the incoming data.
|
||||
nodep->mData[i] = data;
|
||||
return nodep->mData[i];
|
||||
}
|
||||
}
|
||||
if (!nodep->mNextNodep)
|
||||
{
|
||||
// We've iterated through all of the keys without finding a match
|
||||
if (i < SIZE)
|
||||
{
|
||||
// There's still some space on this node, append
|
||||
// the key and data to it.
|
||||
nodep->mKey[i] = second_byte;
|
||||
nodep->mData[i] = data;
|
||||
nodep->mCount++;
|
||||
|
||||
return nodep->mData[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
// This node is full, append a new node to the end.
|
||||
nodep->mNextNodep = new LLUUIDHashNode<DATA_TYPE, SIZE>;
|
||||
nodep->mNextNodep->mKey[0] = second_byte;
|
||||
nodep->mNextNodep->mData[0] = data;
|
||||
nodep->mNextNodep->mCount = 1;
|
||||
|
||||
return nodep->mNextNodep->mData[0];
|
||||
}
|
||||
}
|
||||
|
||||
// No match on this node, go to the next
|
||||
nodep = nodep->mNextNodep;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline BOOL LLUUIDHashMap<DATA_TYPE, SIZE>::remove(const LLUUID &uuid)
|
||||
{
|
||||
if (mIterCount)
|
||||
{
|
||||
// We don't allow remove when we're iterating, it's bad karma!
|
||||
llerrs << "Attempted remove while an outstanding iterator in LLUUIDHashMap!" << llendl;
|
||||
}
|
||||
// Remove is the trickiest operation.
|
||||
// What we want to do is swap the last element of the last
|
||||
// node if we find the one that we want to remove, but we have
|
||||
// to deal with deleting the node from the tail if it's empty, but
|
||||
// NOT if it's the only node left.
|
||||
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE> *nodep = &mNodes[uuid.mData[0]];
|
||||
|
||||
// Not empty, we need to search through the nodes
|
||||
const S32 second_byte = uuid.mData[1];
|
||||
|
||||
// A modification of the standard search algorithm.
|
||||
while (nodep)
|
||||
{
|
||||
const S32 count = nodep->mCount;
|
||||
|
||||
S32 i;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ((nodep->mKey[i] == second_byte) && mEquals(uuid, nodep->mData[i]))
|
||||
{
|
||||
// We found the node that we want to remove.
|
||||
// Find the last (and next-to-last) node, and the index of the last
|
||||
// element. We could conceviably start from the node we're on,
|
||||
// but that makes it more complicated, this is easier.
|
||||
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE> *prevp = &mNodes[uuid.mData[0]];
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE> *lastp = prevp;
|
||||
|
||||
// Find the last and next-to-last
|
||||
while (lastp->mNextNodep)
|
||||
{
|
||||
prevp = lastp;
|
||||
lastp = lastp->mNextNodep;
|
||||
}
|
||||
|
||||
// First, swap in the last to the current location.
|
||||
nodep->mKey[i] = lastp->mKey[lastp->mCount - 1];
|
||||
nodep->mData[i] = lastp->mData[lastp->mCount - 1];
|
||||
|
||||
// Now, we delete the entry
|
||||
lastp->mCount--;
|
||||
lastp->mData[lastp->mCount] = mNull;
|
||||
|
||||
if (!lastp->mCount)
|
||||
{
|
||||
// We deleted the last element!
|
||||
if (lastp != &mNodes[uuid.mData[0]])
|
||||
{
|
||||
// Only blitz the node if it's not the head
|
||||
// Set the previous node to point to NULL, then
|
||||
// blitz the empty last node
|
||||
prevp->mNextNodep = NULL;
|
||||
delete lastp;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate to the next node, we've scanned all the entries in this one.
|
||||
nodep = nodep->mNextNodep;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// LLUUIDHashMapIter
|
||||
//
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
class LLUUIDHashMapIter
|
||||
{
|
||||
public:
|
||||
LLUUIDHashMapIter(LLUUIDHashMap<DATA_TYPE, SIZE> *hash_mapp);
|
||||
~LLUUIDHashMapIter();
|
||||
|
||||
|
||||
inline void reset();
|
||||
inline void first();
|
||||
inline void next();
|
||||
inline BOOL done() const;
|
||||
|
||||
DATA_TYPE& operator*() const
|
||||
{
|
||||
return mCurHashNodep->mData[mCurHashNodeKey];
|
||||
}
|
||||
DATA_TYPE* operator->() const
|
||||
{
|
||||
return &(operator*());
|
||||
}
|
||||
|
||||
protected:
|
||||
LLUUIDHashMap<DATA_TYPE, SIZE> *mHashMapp;
|
||||
LLUUIDHashNode<DATA_TYPE, SIZE> *mCurHashNodep;
|
||||
|
||||
S32 mCurHashMapNodeNum;
|
||||
S32 mCurHashNodeKey;
|
||||
|
||||
DATA_TYPE mNull;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// LLUUIDHashMapIter Implementation
|
||||
//
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
LLUUIDHashMapIter<DATA_TYPE, SIZE>::LLUUIDHashMapIter(LLUUIDHashMap<DATA_TYPE, SIZE> *hash_mapp)
|
||||
{
|
||||
mHashMapp = hash_mapp;
|
||||
mCurHashNodep = NULL;
|
||||
mCurHashMapNodeNum = 0;
|
||||
mCurHashNodeKey = 0;
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
LLUUIDHashMapIter<DATA_TYPE, SIZE>::~LLUUIDHashMapIter()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline void LLUUIDHashMapIter<DATA_TYPE, SIZE>::reset()
|
||||
{
|
||||
if (mCurHashNodep)
|
||||
{
|
||||
// We're partway through an iteration, we can clean up now
|
||||
mHashMapp->mIterCount--;
|
||||
mCurHashNodep = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline void LLUUIDHashMapIter<DATA_TYPE, SIZE>::first()
|
||||
{
|
||||
// Iterate through until we find the first non-empty node;
|
||||
S32 i;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (mHashMapp->mNodes[i].mCount)
|
||||
{
|
||||
if (!mCurHashNodep)
|
||||
{
|
||||
// Increment, since it's no longer safe for us to do a remove
|
||||
mHashMapp->mIterCount++;
|
||||
}
|
||||
|
||||
mCurHashNodep = &mHashMapp->mNodes[i];
|
||||
mCurHashMapNodeNum = i;
|
||||
mCurHashNodeKey = 0;
|
||||
//return mCurHashNodep->mData[0];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Completely empty!
|
||||
mCurHashNodep = NULL;
|
||||
//return mNull;
|
||||
return;
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline BOOL LLUUIDHashMapIter<DATA_TYPE, SIZE>::done() const
|
||||
{
|
||||
return mCurHashNodep ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
template <class DATA_TYPE, int SIZE>
|
||||
inline void LLUUIDHashMapIter<DATA_TYPE, SIZE>::next()
|
||||
{
|
||||
// No current entry, this iterator is done
|
||||
if (!mCurHashNodep)
|
||||
{
|
||||
//return mNull;
|
||||
return;
|
||||
}
|
||||
|
||||
// Go to the next element
|
||||
mCurHashNodeKey++;
|
||||
if (mCurHashNodeKey < mCurHashNodep->mCount)
|
||||
{
|
||||
// We're not done with this node, return the current element
|
||||
//return mCurHashNodep->mData[mCurHashNodeKey];
|
||||
return;
|
||||
}
|
||||
|
||||
// Done with this node, move to the next
|
||||
mCurHashNodep = mCurHashNodep->mNextNodep;
|
||||
if (mCurHashNodep)
|
||||
{
|
||||
// Return the first element
|
||||
mCurHashNodeKey = 0;
|
||||
//return mCurHashNodep->mData[0];
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the next non-empty node (keyed on the first byte)
|
||||
mCurHashMapNodeNum++;
|
||||
|
||||
S32 i;
|
||||
for (i = mCurHashMapNodeNum; i < 256; i++)
|
||||
{
|
||||
if (mHashMapp->mNodes[i].mCount)
|
||||
{
|
||||
// We found one that wasn't empty
|
||||
mCurHashNodep = &mHashMapp->mNodes[i];
|
||||
mCurHashMapNodeNum = i;
|
||||
mCurHashNodeKey = 0;
|
||||
//return mCurHashNodep->mData[0];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// OK, we're done, nothing else to iterate
|
||||
mCurHashNodep = NULL;
|
||||
mHashMapp->mIterCount--; // Decrement since we're safe to do removes now
|
||||
//return mNull;
|
||||
}
|
||||
|
||||
#endif // LL_LLUUIDHASHMAP_H
|
||||
36
indra/llcommon/sguuidhash.h
Normal file
36
indra/llcommon/sguuidhash.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Copyright (C) 2013 Siana Gearz
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef SGUUIDHASH_H
|
||||
#define SGUUIDHASH_H
|
||||
|
||||
#include "lluuid.h"
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
namespace boost {
|
||||
template<> class hash<LLUUID> {
|
||||
public:
|
||||
size_t operator()(const LLUUID& id ) const
|
||||
{
|
||||
return *reinterpret_cast<const size_t*>(id.mData);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -41,7 +41,7 @@ namespace expression {
|
||||
|
||||
|
||||
//TODO: If we can find a better way to do this with boost::pheonix::bind lets do it
|
||||
namespace { // anonymous
|
||||
//namespace { // anonymous
|
||||
|
||||
template <typename T>
|
||||
T min_glue(T a, T b)
|
||||
@@ -91,7 +91,7 @@ struct lazy_bfunc_
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace anonymous
|
||||
//} // end namespace anonymous
|
||||
|
||||
template <typename FPT, typename Iterator>
|
||||
struct grammar
|
||||
|
||||
@@ -261,7 +261,7 @@ U32 LLXferManager::numActiveListEntries(LLXfer *list_head)
|
||||
|
||||
while (list_head)
|
||||
{
|
||||
if ((list_head->mStatus == e_LL_XFER_IN_PROGRESS))
|
||||
if (list_head->mStatus == e_LL_XFER_IN_PROGRESS)
|
||||
{
|
||||
num_entries++;
|
||||
}
|
||||
|
||||
0
indra/llplugin/slplugin/slplugin_info.plist
Executable file → Normal file
0
indra/llplugin/slplugin/slplugin_info.plist
Executable file → Normal file
@@ -202,7 +202,6 @@ protected:
|
||||
LLColor4 mListColor;
|
||||
|
||||
private:
|
||||
S32 mButtonPadding;
|
||||
LLLineEditor* mTextEntry;
|
||||
BOOL mAllowTextEntry;
|
||||
S32 mMaxChars;
|
||||
|
||||
@@ -2405,7 +2405,6 @@ void LLMenuGL::arrange( void )
|
||||
|
||||
// Scrolling support
|
||||
item_list_t::iterator first_visible_item_iter;
|
||||
item_list_t::iterator first_hidden_item_iter = mItems.end();
|
||||
//S32 height_before_first_visible_item = -1;
|
||||
//S32 visible_items_height = 0;
|
||||
//U32 scrollable_items_cnt = 0;
|
||||
@@ -2903,9 +2902,6 @@ 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();
|
||||
@@ -2981,9 +2977,6 @@ 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();
|
||||
|
||||
0
indra/llwindow/glh/glh_linear.h
Executable file → Normal file
0
indra/llwindow/glh/glh_linear.h
Executable file → Normal file
@@ -41,8 +41,8 @@ class LLPreeditor;
|
||||
class LLWindowCallbacks;
|
||||
|
||||
|
||||
static const S32 MIN_WINDOW_WIDTH = 864;
|
||||
static const S32 MIN_WINDOW_HEIGHT = 472;
|
||||
const S32 MIN_WINDOW_WIDTH = 256;
|
||||
const S32 MIN_WINDOW_HEIGHT = 256;
|
||||
|
||||
// Refer to llwindow_test in test/common/llwindow for usage example
|
||||
|
||||
|
||||
@@ -651,6 +651,17 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LiruItalicizeActions</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When enabled, /me chat will be italicized.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LiruFlyAfterTeleport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -15549,6 +15560,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>InstantMessagesFriendsOnly</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Only accept instant messages from residents on your friends list</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoDisengageMic</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -16396,6 +16418,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ClearBeaconAfterTeleport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Clear the red tracker beacon after you teleport</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LogTextureDownloadsToViewerLog</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
</map>
|
||||
|
||||
<!-- End AO -->
|
||||
|
||||
|
||||
<!-- Ascent Account-Specific (Always) -->
|
||||
|
||||
|
||||
<!-- Ascent Account-Specific (Always) -->
|
||||
<key>AscentContactGroups</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -215,72 +215,7 @@
|
||||
<string />
|
||||
</array>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseAnyone</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to anyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to non-friends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with the autoresponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseItemData</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseMuted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to muted people</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageResponseRepeat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -292,21 +227,11 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageShowOnTyping</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageShowResponded</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to hide IMs entirely from those you have chosen to send autoresponses</string>
|
||||
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for an actual message</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -314,6 +239,219 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<!-- Autoresponse Section -->
|
||||
<key>AutoresponseAnyone</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to anyone who isn't muted (or just friends, if AutoresponseAnyoneFriendsOnly)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneFriendsOnly</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send AutoresponseAnyone to friends only</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that AutoresponseAnyone's were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to nonfriends, separately using a different response</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that AutoresponseNonFriends's were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMuted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to muted people</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMutedItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMutedItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseMutedMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>BusyModeResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages while in busy mode.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string>
|
||||
</map>
|
||||
<key>BusyModeResponseItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with BusyModeResponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>BusyModeResponseItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with BusyModeResponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>BusyModeResponseShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that BusyModeResponses were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
|
||||
<key>EveryoneExport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -336,84 +474,7 @@
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>BusyModeResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages while in busy mode.</string>
|
||||
</map>
|
||||
<key>AO.Settings</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>List for animation overrider</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<string/>
|
||||
</array>
|
||||
</map>
|
||||
<key>Responder.Settings</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>New organization to the Auto-Respond settings for keeping clean</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<map>
|
||||
<key>Message</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
</map>
|
||||
<!-- Ascent Account-Specific (Always) -->
|
||||
<!-- General additions -->
|
||||
<key>rkeastInventoryPreviousCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Used to keep track of the number of items in inventory when fetching for progress reasons. DO NOT EDIT.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>-1</integer>
|
||||
</map>
|
||||
<key>rkeastInventorySearchType</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Controls what type of inventory search we perform.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>rkeastInventoryPartialSearch</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Toggles whether to search using partial search filters on normal (name, desc, creator) searches.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>BusyModeResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages while in busy mode.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string>
|
||||
</map>
|
||||
<key>IMLogTimestamp</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -14,72 +14,7 @@
|
||||
<string />
|
||||
</array>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseAnyone</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to anyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to non-friends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with the autoresponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseItemData</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>AscentInstantMessageResponseMuted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to auto-respond to muted people</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageResponseRepeat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -91,21 +26,11 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>AscentInstantMessageShowOnTyping</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for a actual message</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentInstantMessageShowResponded</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to hide IMs entirely from those you have chosen to send autoresponses</string>
|
||||
<string>Whether to perform the autorespond the moment they begin to type instead of waiting for an actual message</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -113,5 +38,216 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<!-- Autoresponse Section -->
|
||||
<key>AutoresponseAnyone</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to anyone who isn't muted (or just friends, if AutoresponseAnyoneFriendsOnly)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneFriendsOnly</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send AutoresponseAnyone to friends only</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseAnyone</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AutoresponseAnyoneShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that AutoresponseAnyone's were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to nonfriends, separately using a different response</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseNonFriends</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>AutoresponseNonFriendsShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that AutoresponseNonFriends's were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMuted</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send autoresponse to muted people</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMutedItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoresponseMutedItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>AutoresponseMutedMessage</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Message to send as the autoresponse to AutoresponseMuted</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>This is an autoresponse!</string>
|
||||
</map>
|
||||
<key>BusyModeResponse</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Auto response to instant messages while in busy mode.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string>
|
||||
</map>
|
||||
<key>BusyModeResponseItem</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to send a item along with BusyModeResponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>BusyModeResponseItemID</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of item to send along with BusyModeResponse</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>BusyModeResponseShow</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to show that BusyModeResponses were sent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
</llsd>
|
||||
|
||||
0
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
Executable file → Normal file
0
indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
Executable file → Normal file
@@ -46,8 +46,6 @@
|
||||
|
||||
#include "llstartup.h"
|
||||
|
||||
LLDropTarget* mObjectDropTarget;
|
||||
LLPrefsAscentChat* LLPrefsAscentChat::sInst;
|
||||
|
||||
LLPrefsAscentChat::LLPrefsAscentChat()
|
||||
{
|
||||
@@ -62,44 +60,31 @@ LLPrefsAscentChat::LLPrefsAscentChat()
|
||||
childSetCommitCallback("time_format_combobox", onCommitTimeDate, this);
|
||||
childSetCommitCallback("date_format_combobox", onCommitTimeDate, this);
|
||||
|
||||
childSetCommitCallback("AscentInstantMessageResponseAnyone", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageResponseFriends", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageResponseMuted", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageShowOnTyping", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this);
|
||||
childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this);
|
||||
|
||||
if(sInst)delete sInst; sInst = this;
|
||||
LLView* target_view = getChild<LLView>("im_give_drop_target_rect");
|
||||
if (target_view)
|
||||
bool started = (LLStartUp::getStartupState() == STATE_STARTED);
|
||||
if (!started) // Disable autoresponse when not logged in
|
||||
{
|
||||
const std::string drop="drop target";
|
||||
if (mObjectDropTarget) delete mObjectDropTarget;
|
||||
mObjectDropTarget = new LLDropTarget(drop, target_view->getRect(), SinguIMResponseItemDrop);//, mAvatarID);
|
||||
addChild(mObjectDropTarget);
|
||||
LLView* autoresponse = getChildView("Autoresponse");
|
||||
autoresponse->setAllChildrenEnabled(false);
|
||||
autoresponse->setToolTip(LLTrans::getString("NotLoggedIn"));
|
||||
}
|
||||
|
||||
bool started = LLStartUp::getStartupState() == STATE_STARTED;
|
||||
if (started)
|
||||
{
|
||||
LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("AscentInstantMessageResponseItemData");
|
||||
LLViewerInventoryItem* item = gInventory.getItem(itemid);
|
||||
|
||||
if (item)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
childSetValue("im_give_disp_rect_txt", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
else if (itemid.isNull())
|
||||
childSetValue("im_give_disp_rect_txt", LLTrans::getString("CurrentlyNotSet"));
|
||||
else
|
||||
childSetValue("im_give_disp_rect_txt", LLTrans::getString("CurrentlySetToAnItemNotOnThisAccount"));
|
||||
}
|
||||
else childSetValue("im_give_disp_rect_txt", LLTrans::getString("NotLoggedIn"));
|
||||
|
||||
childSetCommitCallback("im_response", onCommitAutoResponse, this);
|
||||
// Saved per account settings aren't detected by control_name, therefore autoresponse controls get their values here and have them saved during apply.
|
||||
childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"));
|
||||
childSetValue("AutoresponseAnyone", gSavedPerAccountSettings.getBOOL("AutoresponseAnyone"));
|
||||
childSetValue("AutoresponseAnyoneFriendsOnly", gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly"));
|
||||
childSetValue("AutoresponseAnyoneItem", gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneItem"));
|
||||
childSetValue("AutoresponseAnyoneMessage", gSavedPerAccountSettings.getString("AutoresponseAnyoneMessage"));
|
||||
childSetValue("AutoresponseAnyoneShow", gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneShow"));
|
||||
childSetValue("AutoresponseNonFriends", gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends"));
|
||||
childSetValue("AutoresponseNonFriendsItem", gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsItem"));
|
||||
childSetValue("AutoresponseNonFriendsMessage", gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage"));
|
||||
childSetValue("AutoresponseNonFriendsShow", gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsShow"));
|
||||
childSetValue("AutoresponseMuted", gSavedPerAccountSettings.getBOOL("AutoresponseMuted"));
|
||||
childSetValue("AutoresponseMutedItem", gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"));
|
||||
childSetValue("AutoresponseMutedMessage", gSavedPerAccountSettings.getString("AutoresponseMutedMessage"));
|
||||
childSetValue("BusyModeResponse", gSavedPerAccountSettings.getString("BusyModeResponse"));
|
||||
childSetValue("BusyModeResponseItem", gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"));
|
||||
childSetValue("BusyModeResponseShow", gSavedPerAccountSettings.getBOOL("BusyModeResponseShow"));
|
||||
|
||||
childSetEnabled("reset_antispam", started);
|
||||
childSetCommitCallback("reset_antispam", onCommitResetAS, this);
|
||||
@@ -122,8 +107,6 @@ LLPrefsAscentChat::LLPrefsAscentChat()
|
||||
|
||||
LLPrefsAscentChat::~LLPrefsAscentChat()
|
||||
{
|
||||
sInst=NULL;
|
||||
delete mObjectDropTarget; mObjectDropTarget=NULL;
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -231,30 +214,6 @@ void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl, void* userdata)
|
||||
gSavedSettings.setString("TimestampFormat", timestamp);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentChat::onCommitAutoResponse(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPrefsAscentChat* self = (LLPrefsAscentChat*)user_data;
|
||||
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", self->childGetValue("AscentInstantMessageResponseAnyone"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", self->childGetValue("AscentInstantMessageResponseFriends"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", self->childGetValue("AscentInstantMessageResponseMuted"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", self->childGetValue("AscentInstantMessageShowOnTyping"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", self->childGetValue("AscentInstantMessageShowResponded"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", self->childGetValue("AscentInstantMessageResponseRepeat"));
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", self->childGetValue("AscentInstantMessageResponseItem"));
|
||||
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", self->childGetValue("im_response"));
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentChat::SinguIMResponseItemDrop(LLViewerInventoryItem* item)
|
||||
{
|
||||
gSavedPerAccountSettings.setString("AscentInstantMessageResponseItemData", item->getUUID().asString());
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
sInst->childSetValue("im_give_disp_rect_txt", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentChat::onCommitResetAS(LLUICtrl*, void*)
|
||||
{
|
||||
@@ -327,6 +286,7 @@ void LLPrefsAscentChat::refreshValues()
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming");
|
||||
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
|
||||
mInstantMessagesFriendsOnly = gSavedSettings.getBOOL("InstantMessagesFriendsOnly");
|
||||
mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM");
|
||||
mShowDisplayNameChanges = gSavedSettings.getBOOL("ShowDisplayNameChanges");
|
||||
mUseTypingBubbles = gSavedSettings.getBOOL("UseTypingBubbles");
|
||||
@@ -365,15 +325,6 @@ void LLPrefsAscentChat::refreshValues()
|
||||
tempTimeFormat = mTimeFormat;
|
||||
tempDateFormat = mDateFormat;
|
||||
|
||||
mIMResponseAnyone = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone");
|
||||
mIMResponseFriends = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends");
|
||||
mIMResponseMuted = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted");
|
||||
mIMShowOnTyping = gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowOnTyping");
|
||||
mIMShowResponded = gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded");
|
||||
mIMResponseRepeat = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat");
|
||||
mIMResponseItem = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem");
|
||||
mIMResponseText = gSavedPerAccountSettings.getString("AscentInstantMessageResponse");
|
||||
|
||||
//Chat UI -----------------------------------------------------------------------------
|
||||
mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs");
|
||||
mOtherChatsTornOff = gSavedSettings.getBOOL("OtherChatsTornOff");
|
||||
@@ -383,6 +334,30 @@ void LLPrefsAscentChat::refreshValues()
|
||||
mOneLineGroupButt = gSavedSettings.getBOOL("UseConciseGroupChatButtons");
|
||||
mOneLineConfButt = gSavedSettings.getBOOL("UseConciseConferenceButtons");
|
||||
mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut");
|
||||
mItalicizeActions = gSavedSettings.getBOOL("LiruItalicizeActions");
|
||||
|
||||
//Autoresponse ------------------------------------------------------------------------
|
||||
mIMResponseAnyoneItemID = gSavedPerAccountSettings.getString("AutoresponseAnyoneItemID");
|
||||
mIMResponseNonFriendsItemID = gSavedPerAccountSettings.getString("AutoresponseNonFriendsItemID");
|
||||
mIMResponseMutedItemID = gSavedPerAccountSettings.getString("AutoresponseMutedItemID");
|
||||
mIMResponseBusyItemID = gSavedPerAccountSettings.getString("BusyModeResponseItemID");
|
||||
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", childGetValue("AscentInstantMessageResponseRepeat"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseAnyone", childGetValue("AutoresponseAnyone"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseAnyoneFriendsOnly", childGetValue("AutoresponseAnyoneFriendsOnly"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseAnyoneItem", childGetValue("AutoresponseAnyoneItem"));
|
||||
gSavedPerAccountSettings.setString("AutoresponseAnyoneMessage", childGetValue("AutoresponseAnyoneMessage"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseAnyoneShow", childGetValue("AutoresponseAnyoneShow"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseNonFriends", childGetValue("AutoresponseNonFriends"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseNonFriendsItem", childGetValue("AutoresponseNonFriendsItem"));
|
||||
gSavedPerAccountSettings.setString("AutoresponseNonFriendsMessage", childGetValue("AutoresponseNonFriendsMessage"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseNonFriendsShow", childGetValue("AutoresponseNonFriendsShow"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseMuted", childGetValue("AutoresponseMuted"));
|
||||
gSavedPerAccountSettings.setBOOL("AutoresponseMutedItem", childGetValue("AutoresponseMutedItem"));
|
||||
gSavedPerAccountSettings.setString("AutoresponseMutedMessage", childGetValue("AutoresponseMutedMessage"));
|
||||
gSavedPerAccountSettings.setString("BusyModeResponse", childGetValue("BusyModeResponse"));
|
||||
gSavedPerAccountSettings.setBOOL("BusyModeResponseItem", childGetValue("BusyModeResponseItem"));
|
||||
gSavedPerAccountSettings.setBOOL("BusyModeResponseShow", childGetValue("BusyModeResponseShow"));
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
mEnableAS = gSavedSettings.getBOOL("AntiSpamEnabled");
|
||||
@@ -434,19 +409,6 @@ void LLPrefsAscentChat::refresh()
|
||||
combo->setCurrentByIndex(mDateFormat);
|
||||
}
|
||||
|
||||
childSetValue("AscentInstantMessageResponseAnyone", mIMResponseAnyone);
|
||||
childSetValue("AscentInstantMessageResponseFriends", mIMResponseFriends);
|
||||
childSetValue("AscentInstantMessageResponseMuted", mIMResponseMuted);
|
||||
childSetValue("AscentInstantMessageShowOnTyping", mIMShowOnTyping);
|
||||
childSetValue("AscentInstantMessageShowResponded", mIMShowResponded);
|
||||
childSetValue("AscentInstantMessageResponseRepeat", mIMResponseRepeat);
|
||||
childSetValue("AscentInstantMessageResponseItem", mIMResponseItem);
|
||||
|
||||
LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") );
|
||||
LLWStringUtil::replaceChar(auto_response, '^', '\n');
|
||||
LLWStringUtil::replaceChar(auto_response, '%', ' ');
|
||||
childSetText("im_response", wstring_to_utf8str(auto_response));
|
||||
|
||||
//Antispam ------------------------------------------------------------------------
|
||||
// sensitivity tuners
|
||||
childSetEnabled("spammsg_checkbox", mEnableAS);
|
||||
@@ -544,6 +506,7 @@ void LLPrefsAscentChat::cancel()
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming);
|
||||
gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification);
|
||||
gSavedSettings.setBOOL("InstantMessagesFriendsOnly", mInstantMessagesFriendsOnly);
|
||||
gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM);
|
||||
gSavedSettings.setBOOL("ShowDisplayNameChanges", mShowDisplayNameChanges);
|
||||
gSavedSettings.setBOOL("UseTypingBubbles", mUseTypingBubbles);
|
||||
@@ -595,15 +558,6 @@ void LLPrefsAscentChat::cancel()
|
||||
gSavedSettings.setString("LongTimeFormat", long_time);
|
||||
gSavedSettings.setString("TimestampFormat", timestamp);
|
||||
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", mIMResponseAnyone);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", mIMResponseFriends);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", mIMResponseMuted);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", mIMShowOnTyping);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", mIMShowResponded);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", mIMResponseRepeat);
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", mIMResponseItem);
|
||||
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", mIMResponseText);
|
||||
|
||||
//Chat UI -----------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs);
|
||||
gSavedSettings.setBOOL("OtherChatsTornOff", mOtherChatsTornOff);
|
||||
@@ -613,6 +567,13 @@ void LLPrefsAscentChat::cancel()
|
||||
gSavedSettings.setBOOL("UseConciseGroupChatButtons", mOneLineGroupButt);
|
||||
gSavedSettings.setBOOL("UseConciseConferenceButtons", mOneLineConfButt);
|
||||
gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm);
|
||||
gSavedSettings.setBOOL("LiruItalicizeActions", mItalicizeActions);
|
||||
|
||||
//Autoresponse ------------------------------------------------------------------------
|
||||
gSavedPerAccountSettings.setString("AutoresponseAnyoneItemID", mIMResponseAnyoneItemID);
|
||||
gSavedPerAccountSettings.setString("AutoresponseNonFriendsItemID", mIMResponseNonFriendsItemID);
|
||||
gSavedPerAccountSettings.setString("AutoresponseMutedItemID", mIMResponseMutedItemID);
|
||||
gSavedPerAccountSettings.setString("BusyModeResponseItemID", mIMResponseBusyItemID);
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("AntiSpamEnabled", mEnableAS);
|
||||
@@ -632,7 +593,7 @@ void LLPrefsAscentChat::cancel()
|
||||
gSavedSettings.setU32("_NACL_AntiSpamSoundMulti", mSoundMulti);
|
||||
gSavedSettings.setU32("_NACL_AntiSpamNewlines", mNewLines);
|
||||
gSavedSettings.setU32("_NACL_AntiSpamSoundPreloadMulti", mPreloadMulti);
|
||||
gSavedSettings.setBOOL("EnableGestureSounds", mEnableGestureSounds);
|
||||
gSavedSettings.setBOOL("EnableGestureSounds", mEnableGestureSounds);
|
||||
|
||||
//Text Options ------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("SpellDisplay", mSpellDisplay);
|
||||
@@ -649,8 +610,6 @@ void LLPrefsAscentChat::cancel()
|
||||
// Update local copy so cancel has no effect
|
||||
void LLPrefsAscentChat::apply()
|
||||
{
|
||||
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response"));
|
||||
|
||||
refreshValues();
|
||||
refresh();
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lldroptarget.h"
|
||||
|
||||
|
||||
class LLPrefsAscentChat : public LLPanel
|
||||
{
|
||||
@@ -55,7 +53,6 @@ protected:
|
||||
static void onSpellEditCustom(void* data);
|
||||
static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTimeDate(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitAutoResponse(LLUICtrl* ctrl, void* user_data);
|
||||
static void onCommitResetAS(LLUICtrl*,void*);
|
||||
static void onCommitEnableAS(LLUICtrl*, void*);
|
||||
static void onCommitDialogBlock(LLUICtrl*, void*);
|
||||
@@ -64,6 +61,7 @@ protected:
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
BOOL mIMAnnounceIncoming;
|
||||
BOOL mHideTypingNotification;
|
||||
bool mInstantMessagesFriendsOnly;
|
||||
BOOL mShowGroupNameInChatIM;
|
||||
bool mShowDisplayNameChanges;
|
||||
bool mUseTypingBubbles;
|
||||
@@ -79,15 +77,6 @@ protected:
|
||||
BOOL mSecondsInChatAndIMs;
|
||||
BOOL mSecondsInLog;
|
||||
|
||||
BOOL mIMResponseAnyone;
|
||||
BOOL mIMResponseFriends;
|
||||
BOOL mIMResponseMuted;
|
||||
BOOL mIMShowOnTyping;
|
||||
BOOL mIMShowResponded;
|
||||
BOOL mIMResponseRepeat;
|
||||
BOOL mIMResponseItem;
|
||||
std::string mIMResponseText;
|
||||
|
||||
//Chat UI -----------------------------------------------------------------------------
|
||||
bool mWoLfVerticalIMTabs;
|
||||
bool mOtherChatsTornOff;
|
||||
@@ -97,6 +86,13 @@ protected:
|
||||
bool mOneLineGroupButt;
|
||||
bool mOneLineConfButt;
|
||||
bool mOnlyComm;
|
||||
bool mItalicizeActions;
|
||||
|
||||
//Autoresponse ------------------------------------------------------------------------
|
||||
std::string mIMResponseAnyoneItemID;
|
||||
std::string mIMResponseNonFriendsItemID;
|
||||
std::string mIMResponseMutedItemID;
|
||||
std::string mIMResponseBusyItemID;
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
BOOL mEnableAS;
|
||||
@@ -128,9 +124,6 @@ protected:
|
||||
LLColor4 mKeywordsColor;
|
||||
BOOL mKeywordsPlaySound;
|
||||
LLUUID mKeywordsSound;
|
||||
private:
|
||||
static LLPrefsAscentChat* sInst;
|
||||
static void SinguIMResponseItemDrop(LLViewerInventoryItem* item);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,12 +44,8 @@
|
||||
#include "lltexturectrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llstartup.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
LLDropTarget* mBuildDropTarget;
|
||||
LLPrefsAscentSys* LLPrefsAscentSys::sInst;
|
||||
|
||||
LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
|
||||
@@ -91,42 +87,12 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("EmeraldBuildPrefs_Texture")));
|
||||
childSetCommitCallback("texture control", onCommitTexturePicker, this);
|
||||
|
||||
if(sInst)delete sInst; sInst = this;
|
||||
LLView* target_view = getChild<LLView>("build_item_drop_target_rect");
|
||||
if (target_view)
|
||||
{
|
||||
const std::string drop="drop target";
|
||||
if (mBuildDropTarget) delete mBuildDropTarget;
|
||||
mBuildDropTarget = new LLDropTarget(drop, target_view->getRect(), SinguBuildItemDrop);//, mAvatarID);
|
||||
addChild(mBuildDropTarget);
|
||||
}
|
||||
|
||||
if (LLStartUp::getStartupState() == STATE_STARTED)
|
||||
{
|
||||
LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("EmeraldBuildPrefs_Item");
|
||||
LLViewerInventoryItem* item = gInventory.getItem(itemid);
|
||||
|
||||
if (item)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
childSetValue("build_item_add_disp_rect_txt", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
else if (itemid.isNull())
|
||||
childSetValue("build_item_add_disp_rect_txt", LLTrans::getString("CurrentlyNotSet"));
|
||||
else
|
||||
childSetValue("build_item_add_disp_rect_txt", LLTrans::getString("CurrentlySetToAnItemNotOnThisAccount"));
|
||||
}
|
||||
else childSetValue("build_item_add_disp_rect_txt", LLTrans::getString("NotLoggedIn"));
|
||||
|
||||
refreshValues();
|
||||
refresh();
|
||||
}
|
||||
|
||||
LLPrefsAscentSys::~LLPrefsAscentSys()
|
||||
{
|
||||
sInst=NULL;
|
||||
delete mBuildDropTarget; mBuildDropTarget=NULL;
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -253,21 +219,13 @@ void LLPrefsAscentSys::onCommitTexturePicker(LLUICtrl* ctrl, void* userdata)
|
||||
if(image_ctrl) gSavedSettings.setString("EmeraldBuildPrefs_Texture", image_ctrl->getImageAssetID().asString());
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentSys::SinguBuildItemDrop(LLViewerInventoryItem* item)
|
||||
{
|
||||
gSavedPerAccountSettings.setString("EmeraldBuildPrefs_Item", item->getUUID().asString());
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
sInst->childSetValue("build_item_add_disp_rect_txt", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::refreshValues()
|
||||
{
|
||||
//General -----------------------------------------------------------------------------
|
||||
mDoubleClickTeleport = gSavedSettings.getBOOL("DoubleClickTeleport");
|
||||
mResetCameraAfterTP = gSavedSettings.getBOOL("OptionRotateCamAfterLocalTP");
|
||||
mOffsetTPByUserHeight = gSavedSettings.getBOOL("OptionOffsetTPByAgentHeight");
|
||||
mClearBeaconAfterTeleport = gSavedSettings.getBOOL("ClearBeaconAfterTeleport");
|
||||
mLiruFlyAfterTeleport = gSavedSettings.getBOOL("LiruFlyAfterTeleport");
|
||||
mLiruContinueFlying = gSavedSettings.getBOOL("LiruContinueFlyingOnUnsit");
|
||||
mPreviewAnimInWorld = gSavedSettings.getBOOL("PreviewAnimInWorld");
|
||||
@@ -323,6 +281,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mColor = gSavedSettings.getColor4("EmeraldBuildPrefs_Color");
|
||||
mFullBright = gSavedSettings.getBOOL("EmeraldBuildPrefs_FullBright");
|
||||
mGlow = gSavedSettings.getF32("EmeraldBuildPrefs_Glow");
|
||||
mItem = gSavedPerAccountSettings.getString("EmeraldBuildPrefs_Item");
|
||||
mMaterial = gSavedSettings.getString("BuildPrefs_Material");
|
||||
mNextCopy = gSavedSettings.getBOOL("NextOwnerCopy");
|
||||
mNextMod = gSavedSettings.getBOOL("NextOwnerModify");
|
||||
@@ -420,6 +379,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("DoubleClickTeleport", mDoubleClickTeleport);
|
||||
gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP", mResetCameraAfterTP);
|
||||
gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight", mOffsetTPByUserHeight);
|
||||
gSavedSettings.setBOOL("ClearBeaconAfterTeleport", mClearBeaconAfterTeleport);
|
||||
gSavedSettings.setBOOL("LiruFlyAfterTeleport", mLiruFlyAfterTeleport);
|
||||
gSavedSettings.setBOOL("LiruContinueFlyingOnUnsit", mLiruContinueFlying);
|
||||
gSavedSettings.setBOOL("PreviewAnimInWorld", mPreviewAnimInWorld);
|
||||
@@ -474,6 +434,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setColor4("EmeraldBuildPrefs_Color", mColor);
|
||||
gSavedSettings.setBOOL("EmeraldBuildPrefs_FullBright", mFullBright);
|
||||
gSavedSettings.setF32("EmeraldBuildPrefs_Glow", mGlow);
|
||||
gSavedPerAccountSettings.setString("EmeraldBuildPrefs_Item", mItem);
|
||||
gSavedSettings.setString("BuildPrefs_Material", mMaterial);
|
||||
gSavedSettings.setBOOL("NextOwnerCopy", mNextCopy);
|
||||
gSavedSettings.setBOOL("NextOwnerModify", mNextMod);
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lldroptarget.h"
|
||||
|
||||
|
||||
class LLPrefsAscentSys : public LLPanel
|
||||
{
|
||||
@@ -58,6 +56,7 @@ protected:
|
||||
BOOL mDoubleClickTeleport;
|
||||
BOOL mResetCameraAfterTP;
|
||||
BOOL mOffsetTPByUserHeight;
|
||||
bool mClearBeaconAfterTeleport;
|
||||
bool mLiruFlyAfterTeleport;
|
||||
bool mLiruContinueFlying;
|
||||
BOOL mPreviewAnimInWorld;
|
||||
@@ -107,11 +106,13 @@ protected:
|
||||
bool mDisableClickSitOtherOwner;
|
||||
BOOL mDisplayScriptJumps;
|
||||
F32 mNumScriptDiff;
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
F32 mAlpha;
|
||||
LLColor4 mColor;
|
||||
BOOL mFullBright;
|
||||
F32 mGlow;
|
||||
std::string mItem;
|
||||
std::string mMaterial;
|
||||
BOOL mNextCopy;
|
||||
BOOL mNextMod;
|
||||
@@ -124,9 +125,6 @@ protected:
|
||||
F32 mXsize;
|
||||
F32 mYsize;
|
||||
F32 mZsize;
|
||||
private:
|
||||
static LLPrefsAscentSys* sInst;
|
||||
static void SinguBuildItemDrop(LLViewerInventoryItem* item);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -136,73 +136,6 @@ BOOL AOInvTimer::tick()
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
// NC DROP -------------------------------------------------------
|
||||
|
||||
class AONoteCardDropTarget : public LLView
|
||||
{
|
||||
public:
|
||||
AONoteCardDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*));
|
||||
~AONoteCardDropTarget();
|
||||
|
||||
void doDrop(EDragAndDropType cargo_type, void* cargo_data);
|
||||
|
||||
//
|
||||
// LLView functionality
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
protected:
|
||||
void (*mDownCallback)(LLViewerInventoryItem*);
|
||||
};
|
||||
|
||||
|
||||
AONoteCardDropTarget::AONoteCardDropTarget(const std::string& name, const LLRect& rect,
|
||||
void (*callback)(LLViewerInventoryItem*)) :
|
||||
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
|
||||
mDownCallback(callback)
|
||||
{
|
||||
}
|
||||
|
||||
AONoteCardDropTarget::~AONoteCardDropTarget()
|
||||
{
|
||||
}
|
||||
|
||||
void AONoteCardDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
|
||||
{
|
||||
// llinfos << "AONoteCardDropTarget::doDrop()" << llendl;
|
||||
}
|
||||
|
||||
BOOL AONoteCardDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
if(getParent())
|
||||
{
|
||||
handled = TRUE;
|
||||
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
|
||||
if(gInventory.getItem(inv_item->getUUID()))
|
||||
{
|
||||
*accept = ACCEPT_YES_COPY_SINGLE;
|
||||
if(drop)
|
||||
{
|
||||
mDownCallback(inv_item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*accept = ACCEPT_NO;
|
||||
}
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
AONoteCardDropTarget * LLFloaterAO::mAOItemDropTarget;
|
||||
|
||||
|
||||
// STUFF -------------------------------------------------------
|
||||
|
||||
@@ -283,8 +216,6 @@ LLFloaterAO::~LLFloaterAO()
|
||||
mcomboBox_lands = 0;
|
||||
mcomboBox_standups = 0;
|
||||
mcomboBox_prejumps = 0;
|
||||
delete mAOItemDropTarget;
|
||||
mAOItemDropTarget = NULL;
|
||||
// llinfos << "floater destroyed" << llendl;
|
||||
}
|
||||
|
||||
@@ -315,39 +246,6 @@ bool LLFloaterAO::getInstance()
|
||||
|
||||
BOOL LLFloaterAO::postBuild()
|
||||
{
|
||||
LLView *target_view = getChild<LLView>("ao_notecard");
|
||||
if(target_view)
|
||||
{
|
||||
if (mAOItemDropTarget)
|
||||
{
|
||||
delete mAOItemDropTarget;
|
||||
}
|
||||
mAOItemDropTarget = new AONoteCardDropTarget("drop target", target_view->getRect(), AOItemDrop);//, mAvatarID);
|
||||
addChild(mAOItemDropTarget);
|
||||
}
|
||||
if(LLStartUp::getStartupState() == STATE_STARTED)
|
||||
{
|
||||
LLUUID itemidimport = (LLUUID)gSavedPerAccountSettings.getString("AOConfigNotecardID");
|
||||
LLViewerInventoryItem* itemimport = gInventory.getItem(itemidimport);
|
||||
if(itemimport)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = itemimport->getName();
|
||||
childSetValue("ao_nc_text", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
else if(itemidimport.isNull())
|
||||
{
|
||||
childSetValue("ao_nc_text", LLTrans::getString("CurrentlyNotSet"));
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetValue("ao_nc_text", LLTrans::getString("CurrentlySetToAnItemNotOnThisAccount"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetValue("ao_nc_text", LLTrans::getString("NotLoggedIn"));
|
||||
}
|
||||
childSetAction("more_btn", onClickMore, this);
|
||||
childSetAction("less_btn", onClickLess, this);
|
||||
|
||||
@@ -793,14 +691,6 @@ void LLFloaterAO::setCurrentStandId(const LLUUID& id)
|
||||
mCurrentStandId = id;
|
||||
}
|
||||
|
||||
void LLFloaterAO::AOItemDrop(LLViewerInventoryItem* item)
|
||||
{
|
||||
gSavedPerAccountSettings.setString("AOConfigNotecardID", item->getUUID().asString());
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
sInstance->childSetValue("ao_nc_text", LLTrans::getString("CurrentlySetTo", args));
|
||||
}
|
||||
|
||||
LLUUID LLFloaterAO::GetAnimID(const LLUUID& id)
|
||||
{
|
||||
for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
|
||||
@@ -1383,7 +1273,7 @@ BOOL LLFloaterAO::SetDefault(void* userdata, LLUUID ao_id, std::string defaultan
|
||||
if (sInstance && (userdata))
|
||||
{
|
||||
LLComboBox *box = (LLComboBox *) userdata;
|
||||
if (LLUUID::null == ao_id)
|
||||
if (ao_id.isNull())
|
||||
{
|
||||
box->clear();
|
||||
box->removeall();
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "lleventtimer.h"
|
||||
|
||||
|
||||
class AONoteCardDropTarget;
|
||||
|
||||
const int STATE_AGENT_IDLE = 0;
|
||||
const int STATE_AGENT_WALK = 1;
|
||||
const int STATE_AGENT_RUN = 2;
|
||||
@@ -113,8 +111,6 @@ private:
|
||||
static int mAnimationState;
|
||||
static LLUUID mCurrentStandId;
|
||||
|
||||
static AONoteCardDropTarget* mAOItemDropTarget;
|
||||
static void AOItemDrop(LLViewerInventoryItem* item);
|
||||
static void onSpinnerCommit(LLUICtrl* ctrl);
|
||||
static void onComboBoxCommit(LLUICtrl* ctrl);
|
||||
static BOOL SetDefault(void *userdata, LLUUID ao_id, std::string defaultanim);
|
||||
|
||||
@@ -252,7 +252,6 @@ private:
|
||||
LLButton* mUploadBtn;
|
||||
|
||||
LLScrollListCtrl* mBitmapList;
|
||||
LLScrollListCtrl* mUsedList;
|
||||
LLTextureCtrl* mTextureView;
|
||||
LLCheckBoxCtrl* mUpdateChkBox;
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ extern AIHTTPTimeoutPolicy iamHereVoice_timeout;
|
||||
|
||||
FloaterVoiceLicense::FloaterVoiceLicense(const LLSD& key)
|
||||
: LLModalDialog( std::string(" "), 100, 100 ),
|
||||
mWebBrowserWindowId( 0 ),
|
||||
mLoadCompleteCount( 0 )
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_license.xml");
|
||||
|
||||
@@ -66,7 +66,6 @@ public:
|
||||
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
|
||||
|
||||
private:
|
||||
int mWebBrowserWindowId;
|
||||
int mLoadCompleteCount;
|
||||
};
|
||||
|
||||
|
||||
0
indra/newview/installers/windows/install_icon_singularity.BMP
Executable file → Normal file
0
indra/newview/installers/windows/install_icon_singularity.BMP
Executable file → Normal file
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
0
indra/newview/installers/windows/uninstall_icon_singularity.BMP
Executable file → Normal file
0
indra/newview/installers/windows/uninstall_icon_singularity.BMP
Executable file → Normal file
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
0
indra/newview/installers/windows/uninstall_icon_singularity.ico
Executable file → Normal file
0
indra/newview/installers/windows/uninstall_icon_singularity.ico
Executable file → Normal file
|
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 359 KiB |
@@ -154,7 +154,7 @@ export SL_OPT="`cat gridargs.dat` $@"
|
||||
eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr
|
||||
|
||||
# Handle any resulting errors
|
||||
if [ -n "$LL_RUN_ERR" ]; then
|
||||
if [ "$LL_RUN_ERR" = "runerr" ]; then
|
||||
# generic error running the binary
|
||||
echo '*** Bad shutdown. ***'
|
||||
fi
|
||||
|
||||
@@ -666,11 +666,13 @@ void LLAgent::setFlying(BOOL fly)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Singu Note: We don't take off while sitting, don't bother with this check, let us toggle fly whenever.
|
||||
// don't allow taking off while sitting
|
||||
if (fly && gAgentAvatarp->isSitting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if (fly)
|
||||
@@ -3862,7 +3864,7 @@ bool LLAgent::teleportCore(bool is_local)
|
||||
|
||||
// close the map panel so we can see our destination.
|
||||
// we don't close search floater, see EXT-5840.
|
||||
LLFloaterWorldMap::hide(NULL);
|
||||
LLFloaterWorldMap::hide();
|
||||
|
||||
// hide land floater too - it'll be out of date
|
||||
LLFloaterLand::hideInstance();
|
||||
|
||||
@@ -910,7 +910,6 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
|
||||
}
|
||||
|
||||
|
||||
LLVector3d camera_offset(mCameraFocusOffsetTarget);
|
||||
LLVector3d camera_offset_unit(mCameraFocusOffsetTarget);
|
||||
F32 min_zoom = 0.f;//LAND_MIN_ZOOM;
|
||||
F32 current_distance = (F32)camera_offset_unit.normalize();
|
||||
@@ -988,7 +987,6 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVector3d camera_offset(mCameraFocusOffsetTarget);
|
||||
LLVector3d camera_offset_unit(mCameraFocusOffsetTarget);
|
||||
F32 current_distance = (F32)camera_offset_unit.normalize();
|
||||
F32 new_distance = current_distance - meters;
|
||||
|
||||
@@ -40,24 +40,127 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "lldroptarget.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llinventorymodel.h"
|
||||
|
||||
LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id) :
|
||||
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
|
||||
mAgentID(agent_id),
|
||||
mDownCallback(NULL)
|
||||
#include "llinventorymodel.h"
|
||||
#include "llstartup.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
static LLRegisterWidget<LLDropTarget> r("drop_target");
|
||||
|
||||
static std::string currently_set_to(const LLViewerInventoryItem* item)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[ITEM]"] = item->getName();
|
||||
return LLTrans::getString("CurrentlySetTo", args);
|
||||
}
|
||||
|
||||
LLDropTarget::LLDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*)) :
|
||||
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
|
||||
mDownCallback(callback)
|
||||
LLDropTarget::LLDropTarget(const LLDropTarget::Params& p)
|
||||
: LLView(p)
|
||||
{
|
||||
setToolTip(std::string(p.tool_tip));
|
||||
|
||||
mText = new LLTextBox("drop_text", p.rect, p.label);
|
||||
addChild(mText);
|
||||
|
||||
setControlName(p.control_name, NULL);
|
||||
mText->setOrigin(0, 0);
|
||||
mText->setFollows(FOLLOWS_NONE);
|
||||
mText->setHAlign(LLFontGL::HCENTER);
|
||||
mText->setBorderVisible(true);
|
||||
mText->setBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight"));
|
||||
|
||||
if (p.fill_parent) fillParent(getParent());
|
||||
}
|
||||
|
||||
LLDropTarget::~LLDropTarget()
|
||||
{
|
||||
delete mText;
|
||||
}
|
||||
|
||||
// static
|
||||
LLView* LLDropTarget::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory)
|
||||
{
|
||||
LLDropTarget* target = new LLDropTarget();
|
||||
target->initFromXML(node, parent);
|
||||
return target;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLDropTarget::initFromXML(LLXMLNodePtr node, LLView* parent)
|
||||
{
|
||||
LLView::initFromXML(node, parent);
|
||||
|
||||
const LLRect& rect = getRect();
|
||||
mText->setRect(LLRect(0, rect.getHeight(), rect.getWidth(), 0));
|
||||
|
||||
if (node->hasAttribute("name")) // Views can't have names, but drop targets can
|
||||
{
|
||||
std::string name;
|
||||
node->getAttributeString("name", name);
|
||||
setName(name);
|
||||
}
|
||||
|
||||
if (node->hasAttribute("label"))
|
||||
{
|
||||
std::string label;
|
||||
node->getAttributeString("label", label);
|
||||
mText->setText(label);
|
||||
}
|
||||
|
||||
if (node->hasAttribute("fill_parent"))
|
||||
{
|
||||
bool fill;
|
||||
node->getAttribute_bool("fill_parent", fill);
|
||||
if (fill) fillParent(parent);
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLDropTarget::setControlName(const std::string& control_name, LLView* context)
|
||||
{
|
||||
if (control_name.empty()) // The "empty set"
|
||||
{
|
||||
mControl = NULL;
|
||||
return; // This DropTarget never changes text, it isn't tied to a control
|
||||
}
|
||||
|
||||
std::string text;
|
||||
if (LLStartUp::getStartupState() != STATE_STARTED) // Too early for PerAccount
|
||||
{
|
||||
text = LLTrans::getString("NotLoggedIn");
|
||||
}
|
||||
else
|
||||
{
|
||||
mControl = gSavedPerAccountSettings.getControl(control_name);
|
||||
const LLUUID id(mControl->getValue().asString());
|
||||
if (id.isNull())
|
||||
text = LLTrans::getString("CurrentlyNotSet");
|
||||
else if (LLViewerInventoryItem* item = gInventory.getItem(id))
|
||||
text = currently_set_to(item);
|
||||
else
|
||||
text = LLTrans::getString("CurrentlySetToAnItemNotOnThisAccount");
|
||||
}
|
||||
|
||||
mText->setText(text);
|
||||
}
|
||||
|
||||
void LLDropTarget::fillParent(const LLView* parent)
|
||||
{
|
||||
if (!parent) return; // No parent to fill
|
||||
|
||||
const std::string& tool_tip = getToolTip();
|
||||
if (!tool_tip.empty()) // Don't tool_tip the entire parent
|
||||
{
|
||||
mText->setToolTip(tool_tip);
|
||||
setToolTip(LLStringExplicit(""));
|
||||
}
|
||||
|
||||
// The following block enlarges the target, but maintains the desired size for the text and border
|
||||
mText->setRect(getRect()); // mText takes over the old rectangle, since the position will now be relative to the parent's rectangle for the text.
|
||||
const LLRect& parent_rect = parent->getRect();
|
||||
setRect(LLRect(0, parent_rect.getHeight(), parent_rect.getWidth(), 0));
|
||||
}
|
||||
|
||||
void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
|
||||
@@ -67,17 +170,23 @@ void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
|
||||
|
||||
BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
|
||||
{
|
||||
if(!getParent()) return false;
|
||||
if(!mDownCallback) LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop, cargo_type, cargo_data, accept);
|
||||
else
|
||||
if (mEntityID.isNull())
|
||||
{
|
||||
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
|
||||
if (gInventory.getItem(inv_item->getUUID()))
|
||||
if (LLViewerInventoryItem* inv_item = static_cast<LLViewerInventoryItem*>(cargo_data))
|
||||
{
|
||||
*accept = ACCEPT_YES_COPY_SINGLE;
|
||||
if (drop) mDownCallback(inv_item);
|
||||
if (drop)
|
||||
{
|
||||
mText->setText(currently_set_to(inv_item));
|
||||
if (mControl) mControl->setValue(inv_item->getUUID().asString());
|
||||
}
|
||||
}
|
||||
else *accept = ACCEPT_NO;
|
||||
else
|
||||
{
|
||||
*accept = ACCEPT_NO;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return getParent() ? LLToolDragAndDrop::handleGiveDragAndDrop(mEntityID, LLUUID::null, drop, cargo_type, cargo_data, accept) : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,23 +42,44 @@
|
||||
|
||||
#include "stdtypes.h"
|
||||
#include "llview.h"
|
||||
class LLViewerInventoryItem;
|
||||
|
||||
class LLDropTarget : public LLView
|
||||
{
|
||||
public:
|
||||
LLDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*));
|
||||
LLDropTarget(const std::string& name, const LLRect& rect, const LLUUID& agent_id);
|
||||
struct Params : public LLInitParam::Block<Params, LLView::Params>
|
||||
{
|
||||
Optional<std::string> control_name; // Control to change on item drop (Per Account only)
|
||||
Optional<std::string> label; // Label for the LLTextBox, used when label doesn't dynamically change on drop
|
||||
Optional<bool> fill_parent; // Whether or not to fill the direct parent, to have a larger drop target. If true, the next sibling must explicitly define its rect without deltas.
|
||||
Params()
|
||||
: control_name("control_name", "")
|
||||
, label("label", "")
|
||||
, fill_parent("fill_parent", false)
|
||||
{
|
||||
changeDefault(mouse_opaque, false);
|
||||
changeDefault(follows.flags, FOLLOWS_ALL);
|
||||
}
|
||||
};
|
||||
|
||||
LLDropTarget(const Params& p = Params());
|
||||
~LLDropTarget();
|
||||
|
||||
void doDrop(EDragAndDropType cargo_type, void* cargo_data);
|
||||
virtual void doDrop(EDragAndDropType cargo_type, void* cargo_data);
|
||||
|
||||
//
|
||||
// LLView functionality
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg);
|
||||
void setAgentID(const LLUUID &agent_id){ mAgentID = agent_id;}
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory);
|
||||
virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
|
||||
virtual void setControlName(const std::string& control, LLView* context);
|
||||
|
||||
void fillParent(const LLView* parent);
|
||||
void setEntityID(const LLUUID& id) { mEntityID = id;}
|
||||
protected:
|
||||
LLUUID mAgentID;
|
||||
void (*mDownCallback)(LLViewerInventoryItem*);
|
||||
LLUUID mEntityID;
|
||||
private:
|
||||
LLControlVariable* mControl;
|
||||
class LLTextBox* mText;
|
||||
};
|
||||
|
||||
#endif // LLDROPTARGET_H
|
||||
|
||||
@@ -1051,8 +1051,8 @@ void LLSpeakerMgr::update(BOOL resort_ok)
|
||||
{
|
||||
LLUUID speaker_id = speaker_it->first;
|
||||
LLSpeaker* speakerp = speaker_it->second;
|
||||
|
||||
speaker_map_t::iterator cur_speaker_it = speaker_it++;
|
||||
|
||||
speaker_it++;
|
||||
|
||||
if (voice_channel_active && gVoiceClient->getVoiceEnabled(speaker_id))
|
||||
{
|
||||
|
||||
@@ -1186,7 +1186,7 @@ void LLFloaterAvatarList::onClickTrack()
|
||||
|
||||
if (mTracking && mTrackedAvatar == agent_id)
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
mTracking = FALSE;
|
||||
}
|
||||
else
|
||||
@@ -1203,7 +1203,7 @@ void LLFloaterAvatarList::refreshTracker()
|
||||
{
|
||||
if (!mTracking) return;
|
||||
|
||||
if (LLTracker::isTracking(NULL))
|
||||
if (LLTracker::isTracking())
|
||||
{
|
||||
if(LLAvatarListEntry* entry = getAvatarEntry(mTrackedAvatar))
|
||||
{
|
||||
@@ -1215,7 +1215,7 @@ void LLFloaterAvatarList::refreshTracker()
|
||||
}
|
||||
else
|
||||
{ // Tracker stopped.
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
mTracking = FALSE;
|
||||
// llinfos << "Tracking stopped." << llendl;
|
||||
}
|
||||
@@ -1385,12 +1385,7 @@ void LLFloaterAvatarList::onClickGetKey()
|
||||
|
||||
if (NULL == item) return;
|
||||
|
||||
LLUUID agent_id = item->getUUID();
|
||||
|
||||
char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
|
||||
agent_id.toString(buffer);
|
||||
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(item->getUUID().asString()));
|
||||
}
|
||||
|
||||
void LLFloaterAvatarList::sendKeys()
|
||||
|
||||
@@ -43,6 +43,25 @@ void LLFloaterBlacklist::show()
|
||||
sInstance->open();
|
||||
}
|
||||
}
|
||||
// static
|
||||
void LLFloaterBlacklist::toggle()
|
||||
{
|
||||
if (sInstance && sInstance->getVisible())
|
||||
{
|
||||
delete sInstance;
|
||||
}
|
||||
else
|
||||
{
|
||||
show();
|
||||
}
|
||||
}
|
||||
// static
|
||||
BOOL LLFloaterBlacklist::visible()
|
||||
{
|
||||
if (sInstance && sInstance->getVisible())
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
BOOL LLFloaterBlacklist::postBuild()
|
||||
{
|
||||
childSetAction("add_btn", onClickAdd, this);
|
||||
|
||||
@@ -11,6 +11,8 @@ public:
|
||||
LLFloaterBlacklist();
|
||||
~LLFloaterBlacklist();
|
||||
static void show();
|
||||
static void toggle();
|
||||
static BOOL visible();
|
||||
BOOL postBuild();
|
||||
void refresh();
|
||||
static LLFloaterBlacklist* getInstance() { return sInstance; };
|
||||
|
||||
@@ -91,18 +91,12 @@ private:
|
||||
void doCheckUncheckAll(BOOL check);
|
||||
|
||||
private:
|
||||
// UI
|
||||
LLScrollListCtrl* mMessages;
|
||||
LLButton* mCloseBtn;
|
||||
|
||||
// Object Queue
|
||||
LLDynamicArray<LLUUID> mObjectIDs;
|
||||
LLUUID mCurrentObjectID;
|
||||
BOOL mDone;
|
||||
|
||||
LLUUID mID;
|
||||
|
||||
const char* mStartString;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,54 +38,32 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
|
||||
#include "llchat.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llerror.h"
|
||||
#include "llstring.h"
|
||||
#include "message.h"
|
||||
|
||||
// project include
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llconsole.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llkeyboard.h"
|
||||
//#include "lllineeditor.h"
|
||||
#include "llmutelist.h"
|
||||
//#include "llresizehandle.h"
|
||||
#include "llchatbar.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewergesture.h" // for triggering gestures
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llchatbar.h"
|
||||
#include "lllogchat.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "lltextparser.h"
|
||||
#include "llfloaterhtml.h"
|
||||
#include "llweb.h"
|
||||
#include "llstylemap.h"
|
||||
#include "ascentkeyword.h"
|
||||
|
||||
// linden library includes
|
||||
#include "llaudioengine.h"
|
||||
#include "llchat.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llrect.h"
|
||||
#include "llerror.h"
|
||||
#include "llstring.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lltextparser.h"
|
||||
#include "lltrans.h"
|
||||
#include "llwindow.h"
|
||||
#include "message.h"
|
||||
|
||||
// project include
|
||||
#include "ascentkeyword.h"
|
||||
#include "llagent.h"
|
||||
#include "llchatbar.h"
|
||||
#include "llconsole.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
#include "lllogchat.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llstylemap.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llweb.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
@@ -94,7 +72,8 @@
|
||||
//
|
||||
// Global statics
|
||||
//
|
||||
LLColor4 get_text_color(const LLChat& chat);
|
||||
LLColor4 agent_chat_color(const LLUUID& id, const std::string&, bool local_chat = true);
|
||||
LLColor4 get_text_color(const LLChat& chat, bool from_im = false);
|
||||
|
||||
//
|
||||
// Member Functions
|
||||
@@ -187,13 +166,12 @@ void LLFloaterChat::handleVisibilityChange(BOOL new_visibility)
|
||||
// virtual
|
||||
void LLFloaterChat::onFocusReceived()
|
||||
{
|
||||
LLView* chat_editor = getChildView("Chat Editor");
|
||||
if (getVisible() && childIsVisible("Chat Editor"))
|
||||
LLUICtrl* chat_editor = getChild<LLUICtrl>("Chat Editor");
|
||||
if (getVisible() && chat_editor->getVisible())
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
chat_editor->setFocus(TRUE);
|
||||
}
|
||||
|
||||
LLFloater::onFocusReceived();
|
||||
@@ -227,9 +205,9 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
|
||||
// If the msg is from an agent (not yourself though),
|
||||
// extract out the sender name and replace it with the hotlinked name.
|
||||
if (chat.mSourceType == CHAT_SOURCE_AGENT &&
|
||||
// chat.mFromID != LLUUID::null)
|
||||
// chat.mFromID.notNull())
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
chat.mFromID != LLUUID::null &&
|
||||
chat.mFromID.notNull() &&
|
||||
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
@@ -238,20 +216,27 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
|
||||
|
||||
if(chat.mSourceType == CHAT_SOURCE_OBJECT && !chat.mFromName.length())
|
||||
{
|
||||
chat.mFromName = "(no name)";
|
||||
chat.mFromName = LLTrans::getString("Unnamed");
|
||||
line = chat.mFromName + line;
|
||||
}
|
||||
|
||||
static const LLCachedControl<bool> italicize("LiruItalicizeActions");
|
||||
bool is_irc = italicize && chat.mChatStyle == CHAT_STYLE_IRC;
|
||||
// If the chat line has an associated url, link it up to the name.
|
||||
if (!chat.mURL.empty()
|
||||
&& (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
|
||||
{
|
||||
std::string start_line = line.substr(0, chat.mFromName.length() + 1);
|
||||
line = line.substr(chat.mFromName.length() + 1);
|
||||
const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL);
|
||||
LLStyleSP sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL);
|
||||
sourceStyle->mItalic = is_irc;
|
||||
edit->appendStyledText(start_line, false, prepend_newline, sourceStyle);
|
||||
prepend_newline = false;
|
||||
}
|
||||
edit->appendColoredText(line, false, prepend_newline, color);
|
||||
LLStyleSP style(new LLStyle);
|
||||
style->setColor(color);
|
||||
style->mItalic = is_irc;
|
||||
edit->appendStyledText(line, false, prepend_newline, style);
|
||||
}
|
||||
|
||||
void log_chat_text(const LLChat& chat)
|
||||
@@ -439,7 +424,7 @@ void LLFloaterChat::addChat(const LLChat& chat,
|
||||
BOOL from_instant_message,
|
||||
BOOL local_agent)
|
||||
{
|
||||
LLColor4 text_color = get_text_color(chat);
|
||||
LLColor4 text_color = get_text_color(chat, from_instant_message);
|
||||
|
||||
BOOL invisible_script_debug_chat =
|
||||
chat.mChatType == CHAT_TYPE_DEBUG_MSG
|
||||
@@ -474,14 +459,6 @@ void LLFloaterChat::addChat(const LLChat& chat,
|
||||
&& gConsole
|
||||
&& !local_agent)
|
||||
{
|
||||
if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
|
||||
{
|
||||
text_color = gSavedSettings.getColor("SystemChatColor");
|
||||
}
|
||||
else if(from_instant_message)
|
||||
{
|
||||
text_color = gSavedSettings.getColor("IMChatColor");
|
||||
}
|
||||
// We display anything if it's not an IM. If it's an IM, check pref...
|
||||
if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") )
|
||||
{
|
||||
@@ -547,7 +524,7 @@ void LLFloaterChat::triggerAlerts(const std::string& text)
|
||||
}
|
||||
}
|
||||
|
||||
LLColor4 get_text_color(const LLChat& chat)
|
||||
LLColor4 get_text_color(const LLChat& chat, bool from_im)
|
||||
{
|
||||
LLColor4 text_color;
|
||||
|
||||
@@ -567,48 +544,7 @@ LLColor4 get_text_color(const LLChat& chat)
|
||||
text_color = gSavedSettings.getColor4("SystemChatColor");
|
||||
break;
|
||||
case CHAT_SOURCE_AGENT:
|
||||
if (chat.mFromID.isNull())
|
||||
{
|
||||
text_color = gSavedSettings.getColor4("SystemChatColor");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gAgent.getID() == chat.mFromID)
|
||||
{
|
||||
text_color = gSavedSettings.getColor4("UserChatColor");
|
||||
}
|
||||
else
|
||||
{
|
||||
static LLCachedControl<bool> color_linden_chat("ColorLindenChat");
|
||||
if (color_linden_chat && LLMuteList::getInstance()->isLinden(chat.mFromName))
|
||||
{
|
||||
text_color = gSavedSettings.getColor4("AscentLindenColor");
|
||||
}
|
||||
else if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
static LLCachedControl<bool> color_friend_chat("ColorFriendChat");
|
||||
static LLCachedControl<bool> color_eo_chat("ColorEstateOwnerChat");
|
||||
if (color_friend_chat && LLAvatarTracker::instance().isBuddy(chat.mFromID))
|
||||
{
|
||||
text_color = gSavedSettings.getColor4("AscentFriendColor");
|
||||
}
|
||||
else if (color_eo_chat)
|
||||
{
|
||||
LLViewerRegion* parent_estate = gAgent.getRegion();
|
||||
if (parent_estate && parent_estate->isAlive() && chat.mFromID == parent_estate->getOwner())
|
||||
text_color = gSavedSettings.getColor4("AscentEstateOwnerColor");
|
||||
else
|
||||
text_color = gSavedSettings.getColor4("AgentChatColor");
|
||||
}
|
||||
else
|
||||
text_color = gSavedSettings.getColor4("AgentChatColor");
|
||||
}
|
||||
else
|
||||
{
|
||||
text_color = gSavedSettings.getColor4("AgentChatColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
text_color = agent_chat_color(chat.mFromID, chat.mFromName, !from_im);
|
||||
break;
|
||||
case CHAT_SOURCE_OBJECT:
|
||||
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
|
||||
@@ -751,13 +687,12 @@ void LLFloaterChat::hide(LLFloater* instance, const LLSD& key)
|
||||
|
||||
BOOL LLFloaterChat::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||
{
|
||||
LLView* chat_editor = getChildView("Chat Editor");
|
||||
if (getVisible() && childIsVisible("Chat Editor"))
|
||||
LLUICtrl* chat_editor = getChild<LLUICtrl>("Chat Editor");
|
||||
if (getVisible() && chat_editor->getVisible())
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
chat_editor->setFocus(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ LLFloaterCustomize::~LLFloaterCustomize()
|
||||
BOOL LLFloaterCustomize::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>("Make Outfit")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnMakeOutfit, this));
|
||||
getChild<LLUICtrl>("Save Outfit")->setCommitCallback(boost::bind(&LLAppearanceMgr::updateBaseOutfit, LLAppearanceMgr::getInstance()));
|
||||
getChild<LLUICtrl>("Ok")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnOk, this));
|
||||
getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLFloater::onClickClose, this));
|
||||
|
||||
|
||||
@@ -68,6 +68,13 @@ void LLFloaterExploreSounds::toggle()
|
||||
else LLFloaterExploreSounds::sInstance = new LLFloaterExploreSounds();
|
||||
}
|
||||
|
||||
BOOL LLFloaterExploreSounds::visible()
|
||||
{
|
||||
if (LLFloaterExploreSounds::sInstance)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LLFloaterExploreSounds::close(bool app_quitting)
|
||||
{
|
||||
LLFloater::close(app_quitting);
|
||||
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
static LLFloaterExploreSounds* sInstance;
|
||||
|
||||
static void toggle();
|
||||
static BOOL visible();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -300,7 +300,7 @@ void LLFloaterLandHoldings::buttonCore(S32 which)
|
||||
break;
|
||||
case 1:
|
||||
gFloaterWorldMap->trackLocation(pos_global);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/**
|
||||
* @file llfloaterreporter.cpp
|
||||
* @brief Bug and abuse reports.
|
||||
* @brief Abuse reports.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
@@ -39,30 +38,23 @@
|
||||
|
||||
// linden library includes
|
||||
#include "llassetstorage.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcachename.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llgl.h" // for renderer
|
||||
#include "llimagej2c.h"
|
||||
#include "llinventory.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llstring.h"
|
||||
#include "llsys.h"
|
||||
#include "sgversion.h"
|
||||
#include "message.h"
|
||||
#include "v3math.h"
|
||||
|
||||
// viewer project includes
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llimview.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lldispatcher.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llcombobox.h"
|
||||
@@ -80,7 +72,7 @@
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "lldir.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llviewerbuild.h"
|
||||
#include "sgversion.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewernetwork.h"
|
||||
|
||||
@@ -88,10 +80,6 @@
|
||||
|
||||
#include "lltrans.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
const U32 INCLUDE_SCREENSHOT = 0x01 << 0;
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
@@ -101,125 +89,23 @@ extern AIHTTPTimeoutPolicy userReportResponder_timeout;
|
||||
// Globals
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// this map keeps track of current reporter instances
|
||||
// there can only be one instance of each reporter type
|
||||
LLMap< EReportType, LLFloaterReporter* > gReporterInstances;
|
||||
|
||||
// keeps track of where email is going to - global to avoid a pile
|
||||
// of static/non-static access outside my control
|
||||
namespace {
|
||||
static BOOL gDialogVisible = FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Member functions
|
||||
//-----------------------------------------------------------------------------
|
||||
LLFloaterReporter::LLFloaterReporter(
|
||||
const std::string& name,
|
||||
const LLRect& rect,
|
||||
const std::string& title,
|
||||
EReportType report_type)
|
||||
:
|
||||
LLFloater(name, rect, title),
|
||||
mReportType(report_type),
|
||||
LLFloaterReporter::LLFloaterReporter()
|
||||
: LLFloater(),
|
||||
mReportType(COMPLAINT_REPORT),
|
||||
mObjectID(),
|
||||
mScreenID(),
|
||||
mAbuserID(),
|
||||
mOwnerName(),
|
||||
mDeselectOnClose( FALSE ),
|
||||
mPicking( FALSE),
|
||||
mPosition(),
|
||||
mCopyrightWarningSeen( FALSE ),
|
||||
mResourceDatap(new LLResourceData())
|
||||
{
|
||||
if (report_type == BUG_REPORT)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_bug.xml");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
|
||||
}
|
||||
|
||||
childSetText("abuse_location_edit", gAgent.getSLURL() );
|
||||
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0a
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
// Can't filter these since they get sent as part of the report so just hide them instead
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
{
|
||||
childSetVisible("abuse_location_edit", false);
|
||||
childSetVisible("pos_field", false);
|
||||
}
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
childSetVisible("owner_name", false);
|
||||
childSetVisible("abuser_name_edit", false);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLButton* pick_btn = getChild<LLButton>("pick_btn");
|
||||
if (pick_btn)
|
||||
{
|
||||
// XUI: Why aren't these in viewerart.ini?
|
||||
pick_btn->setImages( std::string("UIImgFaceUUID"),
|
||||
std::string("UIImgFaceSelectedUUID") );
|
||||
childSetAction("pick_btn", onClickObjPicker, this);
|
||||
}
|
||||
|
||||
if (report_type != BUG_REPORT)
|
||||
{
|
||||
// abuser name is selected from a list
|
||||
LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
|
||||
le->setEnabled( FALSE );
|
||||
}
|
||||
|
||||
childSetAction("select_abuser", onClickSelectAbuser, this);
|
||||
|
||||
childSetAction("send_btn", onClickSend, this);
|
||||
childSetAction("cancel_btn", onClickCancel, this);
|
||||
|
||||
enableControls(TRUE);
|
||||
|
||||
// convert the position to a string
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
LLViewerRegion *regionp = gAgent.getRegion();
|
||||
if (regionp)
|
||||
{
|
||||
pos -= regionp->getOriginGlobal();
|
||||
}
|
||||
setPosBox(pos);
|
||||
|
||||
gReporterInstances.addData(report_type, this);
|
||||
|
||||
// Take a screenshot, but don't draw this floater.
|
||||
setVisible(FALSE);
|
||||
takeScreenshot();
|
||||
setVisible(TRUE);
|
||||
|
||||
// Default text to be blank
|
||||
childSetText("object_name", LLStringUtil::null);
|
||||
childSetText("owner_name", LLStringUtil::null);
|
||||
|
||||
childSetFocus("summary_edit");
|
||||
|
||||
mDefaultSummary = childGetText("details_edit");
|
||||
|
||||
gDialogVisible = TRUE;
|
||||
|
||||
// only request details for abuse reports (not BUG reports)
|
||||
if (report_type != BUG_REPORT)
|
||||
{
|
||||
// send a message and ask for information about this region -
|
||||
// result comes back in processRegionInfo(..)
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("RequestRegionInfo");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", gAgent.getID());
|
||||
msg->addUUID("SessionID", gAgent.getSessionID());
|
||||
gAgent.sendReliableMessage();
|
||||
};
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -228,16 +114,77 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg)
|
||||
U32 region_flags;
|
||||
msg->getU32("RegionInfo", "RegionFlags", region_flags);
|
||||
|
||||
if ( gDialogVisible )
|
||||
if (LLFloaterReporter::instanceExists() && LLFloaterReporter::getInstance()->getVisible())
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseEmailLL");
|
||||
};
|
||||
}
|
||||
}
|
||||
// virtual
|
||||
BOOL LLFloaterReporter::postBuild()
|
||||
{
|
||||
getChild<LLUICtrl>("abuse_location_edit")->setValue(gAgent.getSLURL());
|
||||
|
||||
enableControls(TRUE);
|
||||
|
||||
// convert the position to a string
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
LLViewerRegion *regionp = gAgent.getRegion();
|
||||
if (regionp)
|
||||
{
|
||||
getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
|
||||
pos -= regionp->getOriginGlobal();
|
||||
}
|
||||
setPosBox(pos);
|
||||
|
||||
// Take a screenshot, but don't draw this floater.
|
||||
setVisible(FALSE);
|
||||
takeScreenshot();
|
||||
setVisible(TRUE);
|
||||
|
||||
// Default text to be blank
|
||||
getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
|
||||
getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
|
||||
mOwnerName = LLStringUtil::null;
|
||||
|
||||
getChild<LLUICtrl>("summary_edit")->setFocus(TRUE);
|
||||
|
||||
mDefaultSummary = getChild<LLUICtrl>("details_edit")->getValue().asString();
|
||||
|
||||
// send a message and ask for information about this region -
|
||||
// result comes back in processRegionInfo(..)
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("RequestRegionInfo");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", gAgent.getID());
|
||||
msg->addUUID("SessionID", gAgent.getSessionID());
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
|
||||
// abuser name is selected from a list
|
||||
LLUICtrl* le = getChild<LLUICtrl>("abuser_name_edit");
|
||||
le->setEnabled( false );
|
||||
|
||||
LLButton* pick_btn = getChild<LLButton>("pick_btn");
|
||||
// XUI: Why aren't these in viewerart.ini?
|
||||
pick_btn->setImages(std::string("UIImgFaceUUID"),
|
||||
std::string("UIImgFaceSelectedUUID") );
|
||||
childSetAction("pick_btn", onClickObjPicker, this);
|
||||
childSetAction("select_abuser", boost::bind(&LLFloaterReporter::onClickSelectAbuser, this));
|
||||
|
||||
childSetAction("send_btn", onClickSend, this);
|
||||
childSetAction("cancel_btn", onClickCancel, this);
|
||||
// grab the user's name
|
||||
std::string reporter;
|
||||
gAgent.buildFullname(reporter);
|
||||
getChild<LLUICtrl>("reporter_field")->setValue(reporter);
|
||||
|
||||
center();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// virtual
|
||||
LLFloaterReporter::~LLFloaterReporter()
|
||||
{
|
||||
gReporterInstances.removeData(mReportType);
|
||||
// child views automatically deleted
|
||||
mObjectID = LLUUID::null;
|
||||
|
||||
@@ -252,27 +199,26 @@ LLFloaterReporter::~LLFloaterReporter()
|
||||
mMCDList.clear();
|
||||
|
||||
delete mResourceDatap;
|
||||
gDialogVisible = FALSE;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterReporter::draw()
|
||||
{
|
||||
childSetEnabled("screen_check", TRUE );
|
||||
getChildView("screen_check")->setEnabled(TRUE );
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterReporter::enableControls(BOOL enable)
|
||||
{
|
||||
childSetEnabled("category_combo", enable);
|
||||
childSetEnabled("screen_check", enable);
|
||||
childDisable("screenshot");
|
||||
childSetEnabled("pick_btn", enable);
|
||||
childSetEnabled("summary_edit", enable);
|
||||
childSetEnabled("details_edit", enable);
|
||||
childSetEnabled("send_btn", enable);
|
||||
childSetEnabled("cancel_btn", enable);
|
||||
getChildView("category_combo")->setEnabled(enable);
|
||||
getChildView("screen_check")->setEnabled(enable);
|
||||
getChildView("screenshot")->setEnabled(false);
|
||||
getChildView("pick_btn")->setEnabled(enable);
|
||||
getChildView("summary_edit")->setEnabled(enable);
|
||||
getChildView("details_edit")->setEnabled(enable);
|
||||
getChildView("send_btn")->setEnabled(enable);
|
||||
getChildView("cancel_btn")->setEnabled(enable);
|
||||
}
|
||||
|
||||
void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
|
||||
@@ -287,28 +233,29 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
|
||||
|
||||
mObjectID = object_id;
|
||||
|
||||
if (LLUUID::null != mObjectID)
|
||||
if (mObjectID.notNull())
|
||||
{
|
||||
// get object info for the user's benefit
|
||||
LLViewerObject* objectp = NULL;
|
||||
objectp = gObjectList.findObject( mObjectID );
|
||||
if (objectp)
|
||||
if (LLViewerObject* objectp = gObjectList.findObject(mObjectID))
|
||||
{
|
||||
if ( objectp->isAttachment() )
|
||||
{
|
||||
objectp = (LLViewerObject*)objectp->getRoot();
|
||||
mObjectID = objectp->getID();
|
||||
}
|
||||
|
||||
// correct the region and position information
|
||||
LLViewerRegion *regionp = objectp->getRegion();
|
||||
if (regionp)
|
||||
{
|
||||
childSetText("sim_field", regionp->getName());
|
||||
getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
|
||||
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
/*
|
||||
if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
|
||||
{
|
||||
childSetText("sim_field", RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
|
||||
}
|
||||
*/
|
||||
// [/RLVa:KB]
|
||||
LLVector3d global_pos;
|
||||
global_pos.setVec(objectp->getPositionRegion());
|
||||
@@ -317,38 +264,14 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
|
||||
|
||||
if (objectp->isAvatar())
|
||||
{
|
||||
// we have the information we need
|
||||
std::string object_owner;
|
||||
|
||||
LLNameValue* firstname = objectp->getNVPair("FirstName");
|
||||
LLNameValue* lastname = objectp->getNVPair("LastName");
|
||||
if (firstname && lastname)
|
||||
{
|
||||
object_owner.append(firstname->getString());
|
||||
object_owner.append(1, ' ');
|
||||
object_owner.append(lastname->getString());
|
||||
}
|
||||
else
|
||||
{
|
||||
object_owner.append("Unknown");
|
||||
}
|
||||
childSetText("object_name", object_owner);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RVLa-1.0.0e
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
childSetVisible("object_name", false); // Hide the object name if the picked object represents an avataz
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
childSetText("owner_name", object_owner);
|
||||
childSetText("abuser_name_edit", object_owner);
|
||||
mAbuserID = object_id;
|
||||
setFromAvatarID(mObjectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we have to query the simulator for information
|
||||
// about this object
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
U32 request_flags = (mReportType == BUG_REPORT) ? BUG_REPORT_REQUEST : COMPLAINT_REPORT_REQUEST;
|
||||
U32 request_flags = COMPLAINT_REPORT_REQUEST;
|
||||
msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
@@ -363,28 +286,50 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterReporter::onClickSelectAbuser(void *userdata)
|
||||
void LLFloaterReporter::onClickSelectAbuser()
|
||||
{
|
||||
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
|
||||
|
||||
gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, self, _1, _2), FALSE, TRUE ));
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE );
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterReporter::callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
|
||||
{
|
||||
if (ids.empty() || names.empty()) return;
|
||||
|
||||
// this should never be called in a bug report but here for safety.
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
childSetText("abuser_name_edit", names[0].getCompleteName() );
|
||||
getChild<LLUICtrl>("abuser_name_edit")->setValue(names[0].getCompleteName());
|
||||
|
||||
mAbuserID = ids[0];
|
||||
mAbuserID = ids[0];
|
||||
|
||||
refresh();
|
||||
};
|
||||
refresh();
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
|
||||
{
|
||||
mAbuserID = mObjectID = avatar_id;
|
||||
std::string avatar_link;
|
||||
|
||||
if (LLAvatarNameCache::getPNSName(avatar_id, avatar_link))
|
||||
{
|
||||
getChild<LLUICtrl>("owner_name")->setValue(avatar_link);
|
||||
getChild<LLUICtrl>("object_name")->setValue(avatar_link);
|
||||
getChild<LLUICtrl>("abuser_name_edit")->setValue(avatar_link);
|
||||
return;
|
||||
}
|
||||
|
||||
LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
|
||||
}
|
||||
|
||||
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
|
||||
{
|
||||
std::string avatar_link;
|
||||
LLAvatarNameCache::getPNSName(av_name, avatar_link);
|
||||
getChild<LLUICtrl>("owner_name")->setValue(avatar_link);
|
||||
getChild<LLUICtrl>("object_name")->setValue(avatar_link);
|
||||
getChild<LLUICtrl>("abuser_name_edit")->setValue(avatar_link);
|
||||
}
|
||||
|
||||
|
||||
@@ -400,39 +345,34 @@ void LLFloaterReporter::onClickSend(void *userdata)
|
||||
|
||||
if(self->validateReport())
|
||||
{
|
||||
// only show copyright alert for abuse reports
|
||||
if ( self->mReportType != BUG_REPORT )
|
||||
const int IP_CONTENT_REMOVAL = 66;
|
||||
const int IP_PERMISSONS_EXPLOIT = 37;
|
||||
LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
|
||||
int category_value = combo->getSelectedValue().asInteger();
|
||||
|
||||
if ( ! self->mCopyrightWarningSeen )
|
||||
{
|
||||
const int IP_CONTENT_REMOVAL = 66;
|
||||
const int IP_PERMISSONS_EXPLOIT = 37;
|
||||
LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
|
||||
int category_value = combo->getSelectedValue().asInteger();
|
||||
|
||||
if ( ! self->mCopyrightWarningSeen )
|
||||
std::string details_lc = self->getChild<LLUICtrl>("details_edit")->getValue().asString();
|
||||
LLStringUtil::toLower( details_lc );
|
||||
std::string summary_lc = self->getChild<LLUICtrl>("summary_edit")->getValue().asString();
|
||||
LLStringUtil::toLower( summary_lc );
|
||||
if ( details_lc.find( "copyright" ) != std::string::npos ||
|
||||
summary_lc.find( "copyright" ) != std::string::npos ||
|
||||
category_value == IP_CONTENT_REMOVAL ||
|
||||
category_value == IP_PERMISSONS_EXPLOIT)
|
||||
{
|
||||
|
||||
std::string details_lc = self->childGetText("details_edit");
|
||||
LLStringUtil::toLower( details_lc );
|
||||
std::string summary_lc = self->childGetText("summary_edit");
|
||||
LLStringUtil::toLower( summary_lc );
|
||||
if ( details_lc.find( "copyright" ) != std::string::npos ||
|
||||
summary_lc.find( "copyright" ) != std::string::npos ||
|
||||
category_value == IP_CONTENT_REMOVAL ||
|
||||
category_value == IP_PERMISSONS_EXPLOIT)
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
|
||||
self->mCopyrightWarningSeen = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (category_value == IP_CONTENT_REMOVAL)
|
||||
{
|
||||
// IP_CONTENT_REMOVAL *always* shows the dialog -
|
||||
// ergo you can never send that abuse report type.
|
||||
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
|
||||
self->mCopyrightWarningSeen = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (category_value == IP_CONTENT_REMOVAL)
|
||||
{
|
||||
// IP_CONTENT_REMOVAL *always* shows the dialog -
|
||||
// ergo you can never send that abuse report type.
|
||||
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
|
||||
return;
|
||||
}
|
||||
|
||||
LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report"));
|
||||
// *TODO don't upload image if checkbox isn't checked
|
||||
@@ -445,10 +385,10 @@ void LLFloaterReporter::onClickSend(void *userdata)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(self->childGetValue("screen_check"))
|
||||
if(self->getChild<LLUICtrl>("screen_check")->getValue())
|
||||
{
|
||||
self->childDisable("send_btn");
|
||||
self->childDisable("cancel_btn");
|
||||
self->getChildView("send_btn")->setEnabled(FALSE);
|
||||
self->getChildView("cancel_btn")->setEnabled(FALSE);
|
||||
// the callback from uploading the image calls sendReportViaLegacy()
|
||||
self->uploadImage();
|
||||
}
|
||||
@@ -486,8 +426,9 @@ void LLFloaterReporter::onClickObjPicker(void *userdata)
|
||||
LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self);
|
||||
LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance());
|
||||
self->mPicking = TRUE;
|
||||
self->childSetText("object_name", LLStringUtil::null);
|
||||
self->childSetText("owner_name", LLStringUtil::null);
|
||||
self->getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
|
||||
self->getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
|
||||
self->mOwnerName = LLStringUtil::null;
|
||||
LLButton* pick_btn = self->getChild<LLButton>("pick_btn");
|
||||
if (pick_btn) pick_btn->setToggleState(TRUE);
|
||||
}
|
||||
@@ -511,62 +452,34 @@ void LLFloaterReporter::closePickTool(void *userdata)
|
||||
// static
|
||||
void LLFloaterReporter::showFromMenu(EReportType report_type)
|
||||
{
|
||||
if (gReporterInstances.checkData(report_type))
|
||||
if (COMPLAINT_REPORT != report_type)
|
||||
{
|
||||
// ...bring that window to front
|
||||
LLFloaterReporter *f = gReporterInstances.getData(report_type);
|
||||
f->open(); /* Flawfinder: ignore */
|
||||
llwarns << "Unknown LLViewerReporter type : " << report_type << llendl;
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
LLFloaterReporter* f = getInstance();
|
||||
if (f)
|
||||
{
|
||||
LLFloaterReporter *f;
|
||||
if (BUG_REPORT == report_type)
|
||||
{
|
||||
f = LLFloaterReporter::createNewBugReporter();
|
||||
}
|
||||
else if (COMPLAINT_REPORT == report_type)
|
||||
{
|
||||
f = LLFloaterReporter::createNewAbuseReporter();
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unknown LLViewerReporter type : " << report_type << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
f->center();
|
||||
|
||||
if (report_type == BUG_REPORT)
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportBug");
|
||||
}
|
||||
else
|
||||
{
|
||||
// popup for abuse reports is triggered elsewhere
|
||||
}
|
||||
|
||||
// grab the user's name
|
||||
std::string fullname;
|
||||
gAgent.buildFullname(fullname);
|
||||
f->childSetText("reporter_field", fullname);
|
||||
f->setReportType(report_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterReporter::showFromObject(const LLUUID& object_id)
|
||||
void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name)
|
||||
{
|
||||
LLFloaterReporter* f = createNewAbuseReporter();
|
||||
f->center();
|
||||
f->setFocus(TRUE);
|
||||
LLFloaterReporter* f = getInstance();
|
||||
|
||||
// grab the user's name
|
||||
std::string fullname;
|
||||
gAgent.buildFullname(fullname);
|
||||
f->childSetText("reporter_field", fullname);
|
||||
|
||||
// Request info for this object
|
||||
f->getObjectInfo(object_id);
|
||||
if (avatar_name.empty())
|
||||
{
|
||||
// Request info for this object
|
||||
f->getObjectInfo(object_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
f->setFromAvatarID(object_id);
|
||||
}
|
||||
|
||||
// Need to deselect on close
|
||||
f->mDeselectOnClose = TRUE;
|
||||
@@ -576,55 +489,33 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id)
|
||||
|
||||
|
||||
// static
|
||||
LLFloaterReporter* LLFloaterReporter::getReporter(EReportType report_type)
|
||||
void LLFloaterReporter::showFromObject(const LLUUID& object_id)
|
||||
{
|
||||
LLFloaterReporter *self = NULL;
|
||||
if (gReporterInstances.checkData(report_type))
|
||||
{
|
||||
// ...bring that window to front
|
||||
self = gReporterInstances.getData(report_type);
|
||||
}
|
||||
return self;
|
||||
show(object_id);
|
||||
}
|
||||
|
||||
LLFloaterReporter* LLFloaterReporter::createNewAbuseReporter()
|
||||
// static
|
||||
void LLFloaterReporter::showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name)
|
||||
{
|
||||
return new LLFloaterReporter("complaint_reporter",
|
||||
LLRect(),
|
||||
"Report Abuse",
|
||||
COMPLAINT_REPORT);
|
||||
show(avatar_id, avatar_name);
|
||||
}
|
||||
|
||||
//static
|
||||
LLFloaterReporter* LLFloaterReporter::createNewBugReporter()
|
||||
{
|
||||
return new LLFloaterReporter("bug_reporter",
|
||||
LLRect(),
|
||||
"Report Bug",
|
||||
BUG_REPORT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
|
||||
{
|
||||
childSetText("object_name", object_name);
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RVLa-1.0.0e
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
childSetVisible("object_name", true); // Show the object name if the picked object is actually an object
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
childSetText("owner_name", owner_name);
|
||||
childSetText("abuser_name_edit", owner_name);
|
||||
getChild<LLUICtrl>("object_name")->setValue(object_name);
|
||||
|
||||
|
||||
getChild<LLUICtrl>("owner_name")->setValue(owner_name);
|
||||
getChild<LLUICtrl>("abuser_name_edit")->setValue(owner_name);
|
||||
mAbuserID = owner_id;
|
||||
mOwnerName = owner_name;
|
||||
}
|
||||
|
||||
|
||||
bool LLFloaterReporter::validateReport()
|
||||
{
|
||||
// Ensure user selected a category from the list
|
||||
LLSD category_sd = childGetValue("category_combo");
|
||||
LLSD category_sd = getChild<LLUICtrl>("category_combo")->getValue();
|
||||
U8 category = (U8)category_sd.asInteger();
|
||||
if(category >= 100) //This is here for reasons (like shenanigans)
|
||||
{
|
||||
@@ -633,55 +524,39 @@ bool LLFloaterReporter::validateReport()
|
||||
}
|
||||
if (category == 0)
|
||||
{
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseSelectCategory");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserNameEmpty");
|
||||
}
|
||||
LLNotificationsUtil::add("HelpReportAbuseSelectCategory");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
if ( childGetText("abuser_name_edit").empty() )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
|
||||
return false;
|
||||
};
|
||||
|
||||
if ( childGetText("abuse_location_edit").empty() )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
||||
if ( childGetText("summary_edit").empty() )
|
||||
if ( getChild<LLUICtrl>("abuser_name_edit")->getValue().asString().empty() )
|
||||
{
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseSummaryEmpty");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportBugSummaryEmpty");
|
||||
}
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserNameEmpty");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( getChild<LLUICtrl>("abuse_location_edit")->getValue().asString().empty() )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( getChild<LLUICtrl>("abuse_location_edit")->getValue().asString().empty() )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ( getChild<LLUICtrl>("summary_edit")->getValue().asString().empty() )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseSummaryEmpty");
|
||||
return false;
|
||||
};
|
||||
|
||||
if ( childGetText("details_edit") == mDefaultSummary )
|
||||
if ( getChild<LLUICtrl>("details_edit")->getValue().asString() == mDefaultSummary )
|
||||
{
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportAbuseDetailsEmpty");
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("HelpReportBugDetailsEmpty");
|
||||
}
|
||||
return false;
|
||||
};
|
||||
return true;
|
||||
@@ -710,65 +585,45 @@ LLSD LLFloaterReporter::gatherReport()
|
||||
|
||||
#if LL_WINDOWS
|
||||
const char* platform = "Win";
|
||||
const char* short_platform = "O:W";
|
||||
#elif LL_DARWIN
|
||||
const char* platform = "Mac";
|
||||
const char* short_platform = "O:M";
|
||||
#elif LL_LINUX
|
||||
const char* platform = "Lnx";
|
||||
const char* short_platform = "O:L";
|
||||
#elif LL_SOLARIS
|
||||
const char* platform = "Sol";
|
||||
const char* short_platform = "O:S";
|
||||
#else
|
||||
const char* platform = "???";
|
||||
const char* short_platform = "O:?";
|
||||
#endif
|
||||
|
||||
|
||||
if ( mReportType == BUG_REPORT)
|
||||
{
|
||||
summary << short_platform << " V" << gVersionMajor << "."
|
||||
<< gVersionMinor << "."
|
||||
<< gVersionPatch << "."
|
||||
<< gVersionBuild
|
||||
<< " (" << regionp->getName() << ")"
|
||||
<< "[" << category_name << "] "
|
||||
<< "\"" << childGetValue("summary_edit").asString() << "\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
summary << ""
|
||||
<< " |" << regionp->getName() << "|" // region reporter is currently in.
|
||||
<< " (" << childGetText("abuse_location_edit") << ")" // region abuse occured in (freeform text - no LLRegionPicker tool)
|
||||
<< " [" << category_name << "] " // updated category
|
||||
<< " {" << childGetText("abuser_name_edit") << "} " // name of abuse entered in report (chosen using LLAvatarPicker)
|
||||
<< " \"" << childGetValue("summary_edit").asString() << "\""; // summary as entered
|
||||
};
|
||||
|
||||
summary << ""
|
||||
<< " |" << regionp->getName() << "|" // region reporter is currently in.
|
||||
<< " (" << getChild<LLUICtrl>("abuse_location_edit")->getValue().asString() << ")" // region abuse occured in (freeform text - no LLRegionPicker tool)
|
||||
<< " [" << category_name << "] " // updated category
|
||||
<< " {" << getChild<LLUICtrl>("abuser_name_edit")->getValue().asString() << "} " // name of abuse entered in report (chosen using LLAvatarPicker)
|
||||
<< " \"" << getChild<LLUICtrl>("summary_edit")->getValue().asString() << "\""; // summary as entered
|
||||
|
||||
|
||||
std::ostringstream details;
|
||||
if (mReportType != BUG_REPORT)
|
||||
{
|
||||
details << "V" << gVersionMajor << "." // client version moved to body of email for abuse reports
|
||||
<< gVersionMinor << "."
|
||||
<< gVersionPatch << "."
|
||||
<< gVersionBuild << std::endl << std::endl;
|
||||
}
|
||||
std::string object_name = childGetText("object_name");
|
||||
std::string owner_name = childGetText("owner_name");
|
||||
if (!object_name.empty() && !owner_name.empty())
|
||||
|
||||
details << "V" << gVersionMajor << "." // client version moved to body of email for abuse reports
|
||||
<< gVersionMinor << "."
|
||||
<< gVersionPatch << "."
|
||||
<< gVersionBuild << std::endl << std::endl;
|
||||
|
||||
std::string object_name = getChild<LLUICtrl>("object_name")->getValue().asString();
|
||||
if (!object_name.empty() && !mOwnerName.empty())
|
||||
{
|
||||
details << "Object: " << object_name << "\n";
|
||||
details << "Owner: " << owner_name << "\n";
|
||||
details << "Owner: " << mOwnerName << "\n";
|
||||
}
|
||||
|
||||
if ( mReportType != BUG_REPORT )
|
||||
{
|
||||
details << "Abuser name: " << childGetText("abuser_name_edit") << " \n";
|
||||
details << "Abuser location: " << childGetText("abuse_location_edit") << " \n";
|
||||
};
|
||||
|
||||
details << childGetValue("details_edit").asString();
|
||||
details << "Abuser name: " << getChild<LLUICtrl>("abuser_name_edit")->getValue().asString() << " \n";
|
||||
details << "Abuser location: " << getChild<LLUICtrl>("abuse_location_edit")->getValue().asString() << " \n";
|
||||
|
||||
details << getChild<LLUICtrl>("details_edit")->getValue().asString();
|
||||
|
||||
std::string version_string;
|
||||
version_string = llformat(
|
||||
@@ -784,14 +639,14 @@ LLSD LLFloaterReporter::gatherReport()
|
||||
// only send a screenshot ID if we're asked to and the email is
|
||||
// going to LL - Estate Owners cannot see the screenshot asset
|
||||
LLUUID screenshot_id = LLUUID::null;
|
||||
if (childGetValue("screen_check"))
|
||||
if (getChild<LLUICtrl>("screen_check")->getValue())
|
||||
{
|
||||
screenshot_id = childGetValue("screenshot");
|
||||
};
|
||||
screenshot_id = getChild<LLUICtrl>("screenshot")->getValue();
|
||||
}
|
||||
|
||||
LLSD report = LLSD::emptyMap();
|
||||
report["report-type"] = (U8) mReportType;
|
||||
report["category"] = childGetValue("category_combo");
|
||||
report["category"] = getChild<LLUICtrl>("category_combo")->getValue();
|
||||
report["position"] = mPosition.getValue();
|
||||
report["check-flags"] = (U8)0; // this is not used
|
||||
report["screenshot-id"] = screenshot_id;
|
||||
@@ -877,7 +732,7 @@ public:
|
||||
|
||||
void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url, const LLSD& report)
|
||||
{
|
||||
if(childGetValue("screen_check").asBoolean() && !sshot_url.empty())
|
||||
if(getChild<LLUICtrl>("screen_check")->getValue().asBoolean() && !sshot_url.empty())
|
||||
{
|
||||
// try to upload screenshot
|
||||
LLHTTPClient::post(sshot_url, report, new LLUserReportScreenshotResponder(report,
|
||||
@@ -893,11 +748,11 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url
|
||||
|
||||
void LLFloaterReporter::takeScreenshot()
|
||||
{
|
||||
const S32 IMAGE_WIDTH = 1024;
|
||||
const S32 IMAGE_HEIGHT = 768;
|
||||
// Warning: This crops left and right in case of wide-screen monitor:
|
||||
const S32 IMAGE_WIDTH = 1024; //gViewerWindow->getWindowWidthRaw();
|
||||
const S32 IMAGE_HEIGHT = 768; //gViewerWindow->getWindowHeightRaw();
|
||||
|
||||
LLPointer<LLImageRaw> raw = new LLImageRaw;
|
||||
// Warning: This crops left and right in case of wide-screen monitor:
|
||||
if( !gViewerWindow->rawSnapshot(raw, IMAGE_WIDTH, IMAGE_HEIGHT, (F32)IMAGE_WIDTH / IMAGE_HEIGHT, TRUE, FALSE))
|
||||
{
|
||||
llwarns << "Unable to take screenshot" << llendl;
|
||||
@@ -911,15 +766,11 @@ void LLFloaterReporter::takeScreenshot()
|
||||
mResourceDatap->mExpectedUploadCost = 0; // we expect that abuse screenshots are free
|
||||
mResourceDatap->mAssetInfo.mTransactionID.generate();
|
||||
mResourceDatap->mAssetInfo.mUuid = mResourceDatap->mAssetInfo.mTransactionID.makeAssetID(gAgent.getSecureSessionID());
|
||||
if (BUG_REPORT == mReportType)
|
||||
|
||||
if (COMPLAINT_REPORT == mReportType)
|
||||
{
|
||||
mResourceDatap->mAssetInfo.mType = LLAssetType::AT_TEXTURE;
|
||||
mResourceDatap->mPreferredLocation = LLFolderType::EType(-1);
|
||||
}
|
||||
else if (COMPLAINT_REPORT == mReportType)
|
||||
{
|
||||
mResourceDatap->mAssetInfo.mType = LLAssetType::AT_TEXTURE;
|
||||
mResourceDatap->mPreferredLocation = LLFolderType::EType(-2);
|
||||
mResourceDatap->mPreferredLocation = LLFolderType::EType(LLResourceData::INVALID_LOCATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -987,11 +838,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
|
||||
}
|
||||
|
||||
EReportType report_type = UNKNOWN_REPORT;
|
||||
if (data->mPreferredLocation == -1)
|
||||
{
|
||||
report_type = BUG_REPORT;
|
||||
}
|
||||
else if (data->mPreferredLocation == -2)
|
||||
if (data->mPreferredLocation == LLResourceData::INVALID_LOCATION)
|
||||
{
|
||||
report_type = COMPLAINT_REPORT;
|
||||
}
|
||||
@@ -1000,7 +847,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
|
||||
llwarns << "Unknown report type : " << data->mPreferredLocation << llendl;
|
||||
}
|
||||
|
||||
LLFloaterReporter *self = getReporter(report_type);
|
||||
LLFloaterReporter *self = getInstance();
|
||||
if (self)
|
||||
{
|
||||
self->mScreenID = uuid;
|
||||
@@ -1018,38 +865,38 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos)
|
||||
mPosition.mV[VX],
|
||||
mPosition.mV[VY],
|
||||
mPosition.mV[VZ]);
|
||||
childSetText("pos_field", pos_string);
|
||||
getChild<LLUICtrl>("pos_field")->setValue(pos_string);
|
||||
}
|
||||
|
||||
void LLFloaterReporter::setDescription(const std::string& description, LLMeanCollisionData *mcd)
|
||||
{
|
||||
LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT];
|
||||
if (self)
|
||||
{
|
||||
self->childSetText("details_edit", description);
|
||||
//void LLFloaterReporter::setDescription(const std::string& description, LLMeanCollisionData *mcd)
|
||||
//{
|
||||
// LLFloaterReporter *self = getInstance();
|
||||
// if (self)
|
||||
// {
|
||||
// self->getChild<LLUICtrl>("details_edit")->setValue(description);
|
||||
|
||||
for_each(self->mMCDList.begin(), self->mMCDList.end(), DeletePointer());
|
||||
self->mMCDList.clear();
|
||||
if (mcd)
|
||||
{
|
||||
self->mMCDList.push_back(new LLMeanCollisionData(mcd));
|
||||
}
|
||||
}
|
||||
}
|
||||
// for_each(self->mMCDList.begin(), self->mMCDList.end(), DeletePointer());
|
||||
// self->mMCDList.clear();
|
||||
// if (mcd)
|
||||
// {
|
||||
// self->mMCDList.push_back(new LLMeanCollisionData(mcd));
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
void LLFloaterReporter::addDescription(const std::string& description, LLMeanCollisionData *mcd)
|
||||
{
|
||||
LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT];
|
||||
if (self)
|
||||
{
|
||||
LLTextEditor* text = self->getChild<LLTextEditor>("details_edit");
|
||||
if (text)
|
||||
{
|
||||
text->insertText(description);
|
||||
}
|
||||
if (mcd)
|
||||
{
|
||||
self->mMCDList.push_back(new LLMeanCollisionData(mcd));
|
||||
}
|
||||
}
|
||||
}
|
||||
//void LLFloaterReporter::addDescription(const std::string& description, LLMeanCollisionData *mcd)
|
||||
//{
|
||||
// LLFloaterReporter *self = getInstance();
|
||||
// if (self)
|
||||
// {
|
||||
// LLTextEditor* text = self->getChild<LLTextEditor>("details_edit");
|
||||
// if (text)
|
||||
// {
|
||||
// text->insertText(description);
|
||||
// }
|
||||
// if (mcd)
|
||||
// {
|
||||
// self->mMCDList.push_back(new LLMeanCollisionData(mcd));
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/**
|
||||
* @file llfloaterreporter.h
|
||||
* @author Andrew Meadows
|
||||
* @brief Bug and abuse reports.
|
||||
* @brief Abuse reports.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (c) 2006-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
@@ -49,7 +48,7 @@ class LLMeanCollisionData;
|
||||
struct LLResourceData;
|
||||
|
||||
// these flags are used to label info requests to the server
|
||||
const U32 BUG_REPORT_REQUEST = 0x01 << 0;
|
||||
//const U32 BUG_REPORT_REQUEST = 0x01 << 0; // DEPRECATED
|
||||
const U32 COMPLAINT_REPORT_REQUEST = 0x01 << 1;
|
||||
const U32 OBJECT_PAY_REQUEST = 0x01 << 2;
|
||||
|
||||
@@ -74,48 +73,45 @@ enum EReportType
|
||||
{
|
||||
NULL_REPORT = 0, // don't use this value anywhere
|
||||
UNKNOWN_REPORT = 1,
|
||||
BUG_REPORT = 2,
|
||||
//BUG_REPORT = 2, // DEPRECATED
|
||||
COMPLAINT_REPORT = 3,
|
||||
CS_REQUEST_REPORT = 4
|
||||
};
|
||||
|
||||
class LLFloaterReporter
|
||||
: public LLFloater
|
||||
: public LLFloater, public LLSingleton<LLFloaterReporter>
|
||||
{
|
||||
public:
|
||||
LLFloaterReporter(const std::string& name,
|
||||
const LLRect &rect,
|
||||
const std::string& title,
|
||||
EReportType = UNKNOWN_REPORT);
|
||||
LLFloaterReporter();
|
||||
/*virtual*/ ~LLFloaterReporter();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
virtual void draw();
|
||||
|
||||
void setReportType(EReportType type) { mReportType = type; }
|
||||
|
||||
// Enables all buttons
|
||||
static void showFromMenu(EReportType report_type);
|
||||
|
||||
static void showFromObject(const LLUUID& object_id);
|
||||
static void showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name);
|
||||
|
||||
static void onClickSend (void *userdata);
|
||||
static void onClickCancel (void *userdata);
|
||||
static void onClickObjPicker (void *userdata);
|
||||
static void onClickSelectAbuser (void *userdata);
|
||||
void onClickSelectAbuser ();
|
||||
static void closePickTool (void *userdata);
|
||||
static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status);
|
||||
static void addDescription(const std::string& description, LLMeanCollisionData *mcd = NULL);
|
||||
static void setDescription(const std::string& description, LLMeanCollisionData *mcd = NULL);
|
||||
|
||||
// returns a pointer to reporter of report_type
|
||||
static LLFloaterReporter* getReporter(EReportType report_type);
|
||||
static LLFloaterReporter* createNewAbuseReporter();
|
||||
static LLFloaterReporter* createNewBugReporter();
|
||||
|
||||
// static
|
||||
static void processRegionInfo(LLMessageSystem* msg);
|
||||
|
||||
void setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id);
|
||||
|
||||
private:
|
||||
static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null);
|
||||
|
||||
void takeScreenshot();
|
||||
void sendReportViaCaps(std::string url);
|
||||
void uploadImage();
|
||||
@@ -128,12 +124,16 @@ private:
|
||||
void enableControls(BOOL own_avatar);
|
||||
void getObjectInfo(const LLUUID& object_id);
|
||||
void callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
|
||||
void setFromAvatarID(const LLUUID& avatar_id);
|
||||
void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name);
|
||||
|
||||
private:
|
||||
EReportType mReportType;
|
||||
LLUUID mObjectID;
|
||||
LLUUID mScreenID;
|
||||
LLUUID mAbuserID;
|
||||
// Store the real name, not the link, for upstream reporting
|
||||
std::string mOwnerName;
|
||||
BOOL mDeselectOnClose;
|
||||
BOOL mPicking;
|
||||
LLVector3 mPosition;
|
||||
|
||||
@@ -353,7 +353,7 @@ void LLFloaterTeleportHistory::onShowOnMap(void* data)
|
||||
|
||||
// point world map at position
|
||||
gFloaterWorldMap->trackURL(region, x, y, z);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -85,7 +85,6 @@ LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message)
|
||||
: LLModalDialog( std::string(" "), 100, 100 ),
|
||||
mType(type),
|
||||
mMessage(message),
|
||||
mWebBrowserWindowId( 0 ),
|
||||
mLoadCompleteCount( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ private:
|
||||
private:
|
||||
ETOSType mType;
|
||||
std::string mMessage;
|
||||
int mWebBrowserWindowId;
|
||||
int mLoadCompleteCount;
|
||||
|
||||
static LLFloaterTOS* sInstance;
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwindow.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcolorscheme.h"
|
||||
@@ -57,9 +55,8 @@
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "lllandmarklist.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llpreviewlandmark.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llregionhandle.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltextbox.h"
|
||||
@@ -76,10 +73,9 @@
|
||||
#include "llappviewer.h"
|
||||
#include "llmapimagetype.h"
|
||||
#include "llweb.h"
|
||||
#include "llwindow.h" // copyTextToClipboard()
|
||||
|
||||
|
||||
#include "llglheaders.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
@@ -104,6 +100,7 @@ struct SortRegionNames
|
||||
return(LLStringUtil::compareInsensitive(_left.second->getName(), _right.second->getName()) < 0);
|
||||
}
|
||||
};
|
||||
|
||||
enum EPanDirection
|
||||
{
|
||||
PAN_UP,
|
||||
@@ -284,7 +281,7 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::show(void*, BOOL center_on_target)
|
||||
void LLFloaterWorldMap::show(bool center_on_target)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP))
|
||||
@@ -351,13 +348,13 @@ void LLFloaterWorldMap::reloadIcons(void*)
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::toggle(void*)
|
||||
void LLFloaterWorldMap::toggle()
|
||||
{
|
||||
BOOL visible = gFloaterWorldMap->getVisible();
|
||||
|
||||
if (!visible)
|
||||
{
|
||||
show(NULL, FALSE);
|
||||
show(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -368,7 +365,7 @@ void LLFloaterWorldMap::toggle(void*)
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterWorldMap::hide(void*)
|
||||
void LLFloaterWorldMap::hide()
|
||||
{
|
||||
gFloaterWorldMap->mIsClosing = TRUE;
|
||||
gFloaterWorldMap->close();
|
||||
@@ -547,7 +544,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
|
||||
}
|
||||
else
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
setDefaultBtn("Teleport");
|
||||
}
|
||||
@@ -591,7 +588,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
|
||||
}
|
||||
else
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
setDefaultBtn("Teleport");
|
||||
}
|
||||
@@ -618,7 +615,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
||||
{
|
||||
// We haven't found a region for that point yet, leave the tracking to the world map
|
||||
LLWorldMap::getInstance()->setTracking(pos_global);
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
S32 world_x = S32(pos_global.mdV[0] / 256);
|
||||
S32 world_y = S32(pos_global.mdV[1] / 256);
|
||||
LLWorldMapMessage::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true);
|
||||
@@ -635,7 +632,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
||||
// i.e. let the world map that this and tell it it's invalid
|
||||
LLWorldMap::getInstance()->setTracking(pos_global);
|
||||
LLWorldMap::getInstance()->setTrackingInvalid();
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
setDefaultBtn("");
|
||||
|
||||
// clicked on a down region - turn off coord display
|
||||
@@ -774,10 +771,9 @@ void LLFloaterWorldMap::updateLocation()
|
||||
// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
|
||||
if ( gotSimName )
|
||||
{
|
||||
LLVector3d agentPos = gAgent.getPositionGlobal();
|
||||
S32 x = llround( (F32)fmod( (F32)agentPos[VX], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 y = llround( (F32)fmod( (F32)agentPos[VY], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 z = llround( (F32)agentPos[VZ] );
|
||||
S32 x = llround( (F32)fmod( (F32)coord_pos[VX], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 y = llround( (F32)fmod( (F32)coord_pos[VY], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 z = llround( (F32)coord_pos[VZ] );
|
||||
mSLURL = LLURLDispatcher::buildSLURL(sim_name, x, y, z);
|
||||
}
|
||||
else
|
||||
@@ -880,7 +876,7 @@ void LLFloaterWorldMap::friendsChanged()
|
||||
(buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) ||
|
||||
gAgent.isGodlike())
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1100,7 +1096,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdat
|
||||
|
||||
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1110,7 +1106,7 @@ void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata )
|
||||
// Reset the tracking whenever we start typing into any of the search fields,
|
||||
// so that hitting <enter> does an auto-complete versus teleporting us to the
|
||||
// previously selected landmark/friend.
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1134,7 +1130,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
|
||||
LLUUID asset_id;
|
||||
LLUUID item_id = list->getCurrentID();
|
||||
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
|
||||
//RN: stopTracking() clears current combobox selection, need to reassert it here
|
||||
list->setCurrentByID(item_id);
|
||||
@@ -1190,7 +1186,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( LLUICtrl* ctrl, void* userdata
|
||||
|
||||
if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1297,7 +1293,7 @@ void LLFloaterWorldMap::onCoordinatesCommit()
|
||||
void LLFloaterWorldMap::onClearBtn()
|
||||
{
|
||||
mTrackedStatus = LLTracker::TRACKING_NOTHING;
|
||||
LLTracker::stopTracking((void *)(intptr_t)TRUE);
|
||||
LLTracker::stopTracking(true);
|
||||
LLWorldMap::getInstance()->cancelTracking();
|
||||
mSLURL = ""; // Clear the SLURL since it's invalid
|
||||
mSetToUserPosition = TRUE; // Revert back to the current user position
|
||||
|
||||
@@ -63,10 +63,10 @@ public:
|
||||
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
static void show(void*, BOOL center_on_target );
|
||||
static void show(bool center_on_target);
|
||||
static void reloadIcons(void*);
|
||||
static void toggle(void*);
|
||||
static void hide(void*);
|
||||
static void toggle();
|
||||
static void hide();
|
||||
|
||||
/*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE );
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
@@ -1123,7 +1123,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(
|
||||
{
|
||||
llwarns << "Other participant is NULL" << llendl;
|
||||
}
|
||||
|
||||
|
||||
init(session_label);
|
||||
}
|
||||
|
||||
@@ -1160,7 +1160,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(
|
||||
{
|
||||
llwarns << "Other participant is NULL" << llendl;
|
||||
}
|
||||
|
||||
|
||||
mSessionInitialTargetIDs = ids;
|
||||
init(session_label);
|
||||
}
|
||||
@@ -1173,9 +1173,9 @@ void LLFloaterIMPanel::init(const std::string& session_label)
|
||||
|
||||
mSessionLabel = session_label;
|
||||
|
||||
// [Ansariel: Display name support]
|
||||
mProfileButtonEnabled = FALSE;
|
||||
// [/Ansariel: Display name support]
|
||||
// [Ansariel: Display name support]
|
||||
mProfileButtonEnabled = FALSE;
|
||||
// [/Ansariel: Display name support]
|
||||
|
||||
static LLCachedControl<bool> concise_im("UseConciseIMButtons");
|
||||
static LLCachedControl<bool> concise_group("UseConciseGroupChatButtons");
|
||||
@@ -1610,25 +1610,25 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
|
||||
static const LLCachedControl<bool> mKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false);
|
||||
static const LLCachedControl<LLColor4> mKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f));
|
||||
|
||||
if (gAgent.getID() != source)
|
||||
if (gAgentID != source)
|
||||
{
|
||||
if (mKeywordsChangeColor)
|
||||
{
|
||||
if (AscentKeyword::hasKeyword(utf8msg, 2))
|
||||
{
|
||||
if (AscentKeyword::hasKeyword(utf8msg, 2))
|
||||
{
|
||||
incolor = mKeywordsColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const LLColor4& color = incolor;
|
||||
// start tab flashing when receiving im for background session from user
|
||||
if (source != LLUUID::null)
|
||||
if (source.notNull())
|
||||
{
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if( !isInVisibleChain()
|
||||
&& hostp
|
||||
&& source != gAgent.getID())
|
||||
&& source != gAgentID)
|
||||
{
|
||||
hostp->setFloaterFlashing(this, TRUE);
|
||||
}
|
||||
@@ -1640,14 +1640,15 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
|
||||
removeTypingIndicator(NULL);
|
||||
|
||||
// Actually add the line
|
||||
std::string timestring;
|
||||
bool prepend_newline = true;
|
||||
if (gSavedSettings.getBOOL("IMShowTimestamps"))
|
||||
{
|
||||
timestring = mHistoryEditor->appendTime(prepend_newline);
|
||||
mHistoryEditor->appendTime(prepend_newline);
|
||||
prepend_newline = false;
|
||||
}
|
||||
|
||||
std::string show_name = name;
|
||||
bool is_irc = false;
|
||||
// 'name' is a sender name that we want to hotlink so that clicking on it opens a profile.
|
||||
if (!name.empty()) // If name exists, then add it to the front of the message.
|
||||
{
|
||||
@@ -1658,40 +1659,36 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string show_name = name;
|
||||
// IRC style text starts with a colon here; empty names and system messages aren't irc style.
|
||||
static const LLCachedControl<bool> italicize("LiruItalicizeActions");
|
||||
is_irc = italicize && utf8msg[0] != ':';
|
||||
if (source.notNull())
|
||||
LLAvatarNameCache::getPNSName(source, show_name);
|
||||
// Convert the name to a hotlink and add to message.
|
||||
const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source);
|
||||
LLStyleSP source_style = LLStyleMap::instance().lookupAgent(source);
|
||||
source_style->mItalic = is_irc;
|
||||
mHistoryEditor->appendStyledText(show_name,false,prepend_newline,source_style);
|
||||
}
|
||||
prepend_newline = false;
|
||||
}
|
||||
|
||||
//Kadah - Bold group mods chat. Doesnt work on the first msg of the session, dont have speakers list yet?
|
||||
if (gSavedSettings.getBOOL("SingularityBoldGroupModerator") && isModerator(source))
|
||||
// Append the chat message in style
|
||||
{
|
||||
mHistoryEditor->appendColoredText(utf8msg.substr(0,1), false, prepend_newline, color);
|
||||
LLStyleSP style(new LLStyle);
|
||||
style->setVisible(true);
|
||||
style->setColor(color);
|
||||
style->setFontName(LLStringUtil::null);
|
||||
style->mBold = TRUE;
|
||||
mHistoryEditor->appendStyledText(utf8msg.substr(1), false, prepend_newline, style);
|
||||
style->mItalic = is_irc;
|
||||
style->mBold = gSavedSettings.getBOOL("SingularityBoldGroupModerator") && isModerator(source);
|
||||
mHistoryEditor->appendStyledText(utf8msg, false, prepend_newline, style);
|
||||
}
|
||||
else
|
||||
{
|
||||
mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color);
|
||||
}
|
||||
|
||||
|
||||
if (log_to_file
|
||||
&& gSavedPerAccountSettings.getBOOL("LogInstantMessages") )
|
||||
{
|
||||
std::string histstr;
|
||||
if (gSavedPerAccountSettings.getBOOL("IMLogTimestamp"))
|
||||
histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + name + utf8msg;
|
||||
histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + show_name + utf8msg;
|
||||
else
|
||||
histstr = name + utf8msg;
|
||||
histstr = show_name + utf8msg;
|
||||
|
||||
// [Ansariel: Display name support]
|
||||
// Floater title contains display name -> bad idea to use that as filename
|
||||
@@ -1706,7 +1703,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
|
||||
mNumUnreadMessages++;
|
||||
}
|
||||
|
||||
if (source != LLUUID::null)
|
||||
if (source.notNull())
|
||||
{
|
||||
mSpeakers->speakerChatted(source);
|
||||
mSpeakers->setSpeakerTyping(source, FALSE);
|
||||
@@ -1722,12 +1719,6 @@ void LLFloaterIMPanel::setVisible(BOOL b)
|
||||
if( b && hostp )
|
||||
{
|
||||
hostp->setFloaterFlashing(this, FALSE);
|
||||
|
||||
/* Don't change containing floater title - leave it "Instant Message" JC
|
||||
LLUIString title = sTitleString;
|
||||
title.setArg("[NAME]", mSessionLabel);
|
||||
hostp->setTitle( title );
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2048,17 +2039,16 @@ void deliver_message(const std::string& utf8_text,
|
||||
bool sent = false;
|
||||
gAgent.buildFullname(name);
|
||||
|
||||
const LLRelationship* info = NULL;
|
||||
info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
|
||||
|
||||
const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
|
||||
|
||||
U8 offline = (!info || info->isOnline()) ? IM_ONLINE : IM_OFFLINE;
|
||||
|
||||
|
||||
if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id)))
|
||||
{
|
||||
// User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice.
|
||||
sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text);
|
||||
}
|
||||
|
||||
|
||||
if(!sent)
|
||||
{
|
||||
// Send message normally.
|
||||
@@ -2127,56 +2117,56 @@ void LLFloaterIMPanel::sendMsg()
|
||||
// store sent line in history, duplicates will get filtered
|
||||
if (mInputEditor) mInputEditor->updateHistory();
|
||||
// Truncate and convert to UTF8 for transport
|
||||
std::string utf8text = wstring_to_utf8str(text);
|
||||
std::string utf8_text = wstring_to_utf8str(text);
|
||||
// Convert MU*s style poses into IRC emotes here.
|
||||
if (gSavedSettings.getBOOL("AscentAllowMUpose") && utf8text.length() > 3 && utf8text[0] == ':')
|
||||
if (gSavedSettings.getBOOL("AscentAllowMUpose") && utf8_text.length() > 3 && utf8_text[0] == ':')
|
||||
{
|
||||
if (utf8text[1] == '\'')
|
||||
if (utf8_text[1] == '\'')
|
||||
{
|
||||
utf8text.replace(0, 1, "/me");
|
||||
utf8_text.replace(0, 1, "/me");
|
||||
}
|
||||
else if (isalpha(utf8text[1])) // Do not prevent smileys and such.
|
||||
else if (isalpha(utf8_text[1])) // Do not prevent smileys and such.
|
||||
{
|
||||
utf8text.replace(0, 1, "/me ");
|
||||
utf8_text.replace(0, 1, "/me ");
|
||||
}
|
||||
}
|
||||
if (utf8text.find("/ME'") == 0 || utf8text.find("/ME ") == 0) //Allow CAPSlock /me
|
||||
utf8text.replace(1, 2, "me");
|
||||
std::string prefix = utf8text.substr(0, 4);
|
||||
if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8text.length() > 1) && !mRPMode)
|
||||
if (utf8_text.find("/ME'") == 0 || utf8_text.find("/ME ") == 0) //Allow CAPSlock /me
|
||||
utf8_text.replace(1, 2, "me");
|
||||
std::string prefix = utf8_text.substr(0, 4);
|
||||
if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8_text.length() > 1) && !mRPMode)
|
||||
{
|
||||
//Check if it needs the end-of-chat brackets -HgB
|
||||
if (utf8text.find("((") == 0 && utf8text.find("))") == std::string::npos)
|
||||
if (utf8_text.find("((") == 0 && utf8_text.find("))") == std::string::npos)
|
||||
{
|
||||
if(*utf8text.rbegin() == ')')
|
||||
utf8text+=" ";
|
||||
utf8text+="))";
|
||||
if(*utf8_text.rbegin() == ')')
|
||||
utf8_text+=" ";
|
||||
utf8_text+="))";
|
||||
}
|
||||
else if(utf8text.find("[[") == 0 && utf8text.find("]]") == std::string::npos)
|
||||
else if(utf8_text.find("[[") == 0 && utf8_text.find("]]") == std::string::npos)
|
||||
{
|
||||
if(*utf8text.rbegin() == ']')
|
||||
utf8text+=" ";
|
||||
utf8text+="]]";
|
||||
if(*utf8_text.rbegin() == ']')
|
||||
utf8_text+=" ";
|
||||
utf8_text+="]]";
|
||||
}
|
||||
|
||||
if (prefix != "/me " && prefix != "/me'") //Allow /me to end with )) or ]]
|
||||
{
|
||||
if (utf8text.find("((") == std::string::npos && utf8text.find("))") == (utf8text.length() - 2))
|
||||
if (utf8_text.find("((") == std::string::npos && utf8_text.find("))") == (utf8_text.length() - 2))
|
||||
{
|
||||
if(utf8text[0] == '(')
|
||||
utf8text.insert(0," ");
|
||||
utf8text.insert(0,"((");
|
||||
if(utf8_text[0] == '(')
|
||||
utf8_text.insert(0," ");
|
||||
utf8_text.insert(0,"((");
|
||||
}
|
||||
else if (utf8text.find("[[") == std::string::npos && utf8text.find("]]") == (utf8text.length() - 2))
|
||||
else if (utf8_text.find("[[") == std::string::npos && utf8_text.find("]]") == (utf8_text.length() - 2))
|
||||
{
|
||||
if(utf8text[0] == '[')
|
||||
utf8text.insert(0," ");
|
||||
utf8text.insert(0,"[[");
|
||||
if(utf8_text[0] == '[')
|
||||
utf8_text.insert(0," ");
|
||||
utf8_text.insert(0,"[[");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mRPMode && prefix != "/me " && prefix != "/me'")
|
||||
utf8text = "[[" + utf8text + "]]";
|
||||
utf8_text = "[[" + utf8_text + "]]";
|
||||
// [RLVa:KB] - Checked: 2011-09-17 (RLVa-1.1.4b) | Modified: RLVa-1.1.4b
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) )
|
||||
{
|
||||
@@ -2203,7 +2193,7 @@ void LLFloaterIMPanel::sendMsg()
|
||||
itSpeaker != speakers.end(); ++itSpeaker)
|
||||
{
|
||||
const LLSpeaker* pSpeaker = *itSpeaker;
|
||||
if ( (gAgent.getID() != pSpeaker->mID) && (!gRlvHandler.canSendIM(pSpeaker->mID)) )
|
||||
if ( (gAgentID != pSpeaker->mID) && (!gRlvHandler.canSendIM(pSpeaker->mID)) )
|
||||
{
|
||||
fRlvFilter = true;
|
||||
break;
|
||||
@@ -2217,7 +2207,7 @@ void LLFloaterIMPanel::sendMsg()
|
||||
}
|
||||
|
||||
if (fRlvFilter)
|
||||
utf8text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM);
|
||||
utf8_text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -2226,7 +2216,7 @@ void LLFloaterIMPanel::sendMsg()
|
||||
// Split messages that are too long, same code like in llimpanel.cpp
|
||||
U32 split = MAX_MSG_BUF_SIZE - 1;
|
||||
U32 pos = 0;
|
||||
U32 total = utf8text.length();
|
||||
U32 total = utf8_text.length();
|
||||
|
||||
while (pos < total)
|
||||
{
|
||||
@@ -2239,11 +2229,11 @@ void LLFloaterIMPanel::sendMsg()
|
||||
else
|
||||
{
|
||||
// don't split utf-8 bytes
|
||||
while (U8(utf8text[pos + next_split]) != 0x20 // space
|
||||
&& U8(utf8text[pos + next_split]) != 0x21 // !
|
||||
&& U8(utf8text[pos + next_split]) != 0x2C // ,
|
||||
&& U8(utf8text[pos + next_split]) != 0x2E // .
|
||||
&& U8(utf8text[pos + next_split]) != 0x3F // ?
|
||||
while (U8(utf8_text[pos + next_split]) != 0x20 // space
|
||||
&& U8(utf8_text[pos + next_split]) != 0x21 // !
|
||||
&& U8(utf8_text[pos + next_split]) != 0x2C // ,
|
||||
&& U8(utf8_text[pos + next_split]) != 0x2E // .
|
||||
&& U8(utf8_text[pos + next_split]) != 0x3F // ?
|
||||
&& next_split > 0)
|
||||
{
|
||||
--next_split;
|
||||
@@ -2260,7 +2250,7 @@ void LLFloaterIMPanel::sendMsg()
|
||||
}
|
||||
}
|
||||
|
||||
std::string send = utf8text.substr(pos, next_split);
|
||||
std::string send = utf8_text.substr(pos, next_split);
|
||||
pos += next_split;
|
||||
LL_WARNS("Splitting") << "Pos: " << pos << " next_split: " << next_split << LL_ENDL;
|
||||
|
||||
@@ -2274,37 +2264,30 @@ LL_WARNS("Splitting") << "Pos: " << pos << " next_split: " << next_split << LL_E
|
||||
if((mDialog == IM_NOTHING_SPECIAL) &&
|
||||
(mOtherParticipantUUID.notNull()))
|
||||
{
|
||||
std::string history_echo;
|
||||
gAgent.buildFullname(history_echo);
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
|
||||
// Look for IRC-style emotes here.
|
||||
std::string prefix = utf8text.substr(0, 4);
|
||||
std::string prefix = utf8_text.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
utf8text.replace(0,3,"");
|
||||
utf8_text.replace(0,3,"");
|
||||
}
|
||||
else
|
||||
{
|
||||
history_echo += ": ";
|
||||
}
|
||||
history_echo += utf8text;
|
||||
|
||||
BOOL other_was_typing = mOtherTyping;
|
||||
|
||||
addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID());
|
||||
|
||||
if (other_was_typing)
|
||||
{
|
||||
addTypingIndicator(mOtherTypingName);
|
||||
utf8_text.insert(0, ": ");
|
||||
}
|
||||
|
||||
bool other_was_typing = mOtherTyping;
|
||||
addHistoryLine(utf8_text, gSavedSettings.getColor("UserChatColor"), true, gAgentID, name);
|
||||
if (other_was_typing) addTypingIndicator(mOtherTypingName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//queue up the message to send once the session is
|
||||
//initialized
|
||||
mQueuedMsgsForInit.append(utf8text);
|
||||
mQueuedMsgsForInit.append(utf8_text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2441,12 +2424,15 @@ void LLFloaterIMPanel::sendTypingState(BOOL typing)
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, BOOL typing)
|
||||
{
|
||||
if (typing)
|
||||
{
|
||||
// other user started typing
|
||||
addTypingIndicator(im_info->mName);
|
||||
std::string name;
|
||||
if (!LLAvatarNameCache::getPNSName(im_info->mFromID, name)) name = im_info->mName;
|
||||
addTypingIndicator(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2584,12 +2570,11 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
|
||||
//only 1 option really
|
||||
LLUUID session_id = notification["payload"]["session_id"];
|
||||
|
||||
if ( gIMMgr )
|
||||
if (gIMMgr)
|
||||
{
|
||||
LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(
|
||||
session_id);
|
||||
LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(session_id);
|
||||
|
||||
if ( floaterp ) floaterp->close(FALSE);
|
||||
if (floaterp) floaterp->close(FALSE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2608,29 +2593,20 @@ const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id)
|
||||
|
||||
BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||
{
|
||||
LLView* chat_editor = getChildView("chat_editor");
|
||||
if (getVisible() && childIsVisible("chat_editor"))
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
if (getVisible() && mInputEditor->getVisible())
|
||||
{
|
||||
setInputFocus(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash);
|
||||
return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash);
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onFocusReceived()
|
||||
{
|
||||
LLView* chat_editor = getChildView("chat_editor");
|
||||
if (getVisible() && childIsVisible("chat_editor"))
|
||||
if (getVisible() && mInputEditor->getVisible())
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
setInputFocus(true);
|
||||
}
|
||||
|
||||
LLFloater::onFocusReceived();
|
||||
|
||||
@@ -88,6 +88,36 @@ LLIMMgr* gIMMgr = NULL;
|
||||
//
|
||||
// Helper Functions
|
||||
//
|
||||
LLColor4 agent_chat_color(const LLUUID& id, const std::string& name, bool local_chat)
|
||||
{
|
||||
if (id.isNull() || (name == SYSTEM_FROM))
|
||||
return gSavedSettings.getColor4("SystemChatColor");
|
||||
|
||||
if (id == gAgentID)
|
||||
return gSavedSettings.getColor4("UserChatColor");
|
||||
|
||||
static const LLCachedControl<bool> color_linden_chat("ColorLindenChat");
|
||||
if (color_linden_chat && LLMuteList::getInstance()->isLinden(name))
|
||||
return gSavedSettings.getColor4("AscentLindenColor");
|
||||
|
||||
// [RLVa:LF] Chat colors would identify names, don't use them in local chat if restricted
|
||||
if (local_chat && rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
return gSavedSettings.getColor4("AgentChatColor");
|
||||
|
||||
static const LLCachedControl<bool> color_friend_chat("ColorFriendChat");
|
||||
if (color_friend_chat && LLAvatarTracker::instance().isBuddy(id))
|
||||
return gSavedSettings.getColor4("AscentFriendColor");
|
||||
|
||||
static const LLCachedControl<bool> color_eo_chat("ColorEstateOwnerChat");
|
||||
if (color_eo_chat)
|
||||
{
|
||||
const LLViewerRegion* parent_estate = gAgent.getRegion();
|
||||
if (parent_estate && id == parent_estate->getOwner())
|
||||
return gSavedSettings.getColor4("AscentEstateOwnerColor");
|
||||
}
|
||||
|
||||
return local_chat ? gSavedSettings.getColor4("AgentChatColor") : gSavedSettings.getColor("IMChatColor");
|
||||
}
|
||||
|
||||
// returns true if a should appear before b
|
||||
//static BOOL group_dictionary_sort( LLGroupData* a, LLGroupData* b )
|
||||
@@ -482,13 +512,6 @@ void LLIMMgr::addMessage(
|
||||
return;
|
||||
}
|
||||
|
||||
//not sure why...but if it is from ourselves we set the target_id
|
||||
//to be NULL, which seems to be breaking links on group chats, so let's not there.
|
||||
if (other_participant_id == gAgent.getID() && !gAgent.isInGroup(session_id))
|
||||
{
|
||||
other_participant_id = LLUUID::null;
|
||||
}
|
||||
|
||||
LLFloaterIMPanel* floater;
|
||||
LLUUID new_session_id = session_id;
|
||||
if (new_session_id.isNull())
|
||||
@@ -572,34 +595,13 @@ void LLIMMgr::addMessage(
|
||||
}
|
||||
|
||||
// now add message to floater
|
||||
bool is_from_system = target_id.isNull() || (from == SYSTEM_FROM);
|
||||
|
||||
static LLCachedControl<bool> color_linden_chat("ColorLindenChat");
|
||||
bool linden = color_linden_chat && LLMuteList::getInstance()->isLinden(from);
|
||||
|
||||
static LLCachedControl<bool> color_friend_chat("ColorFriendChat");
|
||||
bool contact = color_friend_chat && LLAvatarTracker::instance().isBuddy(other_participant_id);
|
||||
|
||||
static LLCachedControl<bool> color_eo_chat("ColorEstateOwnerChat");
|
||||
bool estate_owner = false;
|
||||
if (color_eo_chat)
|
||||
{
|
||||
LLViewerRegion* parent_estate = gAgent.getRegion();
|
||||
estate_owner = (parent_estate && parent_estate->isAlive() && other_participant_id == parent_estate->getOwner());
|
||||
}
|
||||
|
||||
const LLColor4& color = ( is_from_system ? gSavedSettings.getColor4("SystemChatColor")
|
||||
: linden ? gSavedSettings.getColor4("AscentLindenColor")
|
||||
: contact ? gSavedSettings.getColor4("AscentFriendColor")
|
||||
: estate_owner ? gSavedSettings.getColor4("AscentEstateOwnerColor")
|
||||
: gSavedSettings.getColor("IMChatColor"));
|
||||
const LLColor4& color = agent_chat_color(other_participant_id, from, false);
|
||||
if ( !link_name )
|
||||
{
|
||||
floater->addHistoryLine(msg,color); // No name to prepend, so just add the message normally
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if( other_participant_id == session_id )
|
||||
{
|
||||
// The name can be bogus on InWorldz
|
||||
@@ -1436,7 +1438,7 @@ public:
|
||||
floaterp->processSessionUpdate(body["session_info"]);
|
||||
}
|
||||
|
||||
//aply updates we've possibly received previously
|
||||
//apply updates we've possibly received previously
|
||||
floaterp->updateSpeakersList(
|
||||
gIMMgr->getPendingAgentListUpdates(session_id));
|
||||
}
|
||||
@@ -1614,8 +1616,9 @@ public:
|
||||
{
|
||||
separator_string = "";
|
||||
message_offset = 3;
|
||||
chat.mChatStyle = CHAT_STYLE_IRC;
|
||||
}
|
||||
|
||||
|
||||
chat.mMuted = is_muted && !is_linden;
|
||||
chat.mFromID = from_id;
|
||||
chat.mFromName = name;
|
||||
@@ -1719,7 +1722,7 @@ public:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!LLVoiceClient::voiceEnabled())
|
||||
{
|
||||
// Don't display voice invites unless the user has voice enabled.
|
||||
|
||||
@@ -31,11 +31,14 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llagentwearables.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llfoldervieweventlistener.h"
|
||||
#include "llimview.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryclipboard.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llmakeoutfitdialog.h"
|
||||
@@ -43,7 +46,6 @@
|
||||
#include "llpanelmaininventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llpreview.h" // For LLMultiPreview
|
||||
#include "llfoldervieweventlistener.h"
|
||||
#include "lltrans.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
@@ -317,7 +319,7 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, std::string type,
|
||||
LLInventoryType::IT_GESTURE,
|
||||
PERM_ALL);
|
||||
}
|
||||
else if ("outfit" == type)
|
||||
else if ("outfit" == type || ("update outfit" == type && !LLAppearanceMgr::getInstance()->updateBaseOutfit())) // If updateBaseOutfit fails, prompt to make a new outfit
|
||||
{
|
||||
new LLMakeOutfitDialog(false);
|
||||
return;
|
||||
|
||||
@@ -2614,7 +2614,6 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
|
||||
if(drop && accept)
|
||||
{
|
||||
it = inventory_objects.begin();
|
||||
LLInventoryObject::object_list_t::iterator first_it = inventory_objects.begin();
|
||||
LLMoveInv* move_inv = new LLMoveInv;
|
||||
move_inv->mObjectID = object_id;
|
||||
move_inv->mCategoryID = category_id;
|
||||
|
||||
@@ -75,7 +75,7 @@ void handle_track_avatar(const LLUUID& agent_id, const std::string& name)
|
||||
LLAvatarTracker::instance().track(agent_id, name);
|
||||
|
||||
LLFloaterDirectory::hide(NULL);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
void handle_pay_by_id(const LLUUID& agent_id)
|
||||
@@ -92,7 +92,7 @@ void handle_mouselook(void*)
|
||||
|
||||
void handle_map(void*)
|
||||
{
|
||||
LLFloaterWorldMap::toggle(NULL);
|
||||
LLFloaterWorldMap::toggle();
|
||||
}
|
||||
|
||||
void handle_mini_map(void*)
|
||||
|
||||
@@ -2514,7 +2514,7 @@ void LLMeshRepository::notifyMeshUnavailable(const LLVolumeParams& mesh_params,
|
||||
}
|
||||
|
||||
S32 LLMeshRepository::getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
|
||||
{
|
||||
{
|
||||
return mThread->getActualMeshLOD(mesh_params, lod);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "lluuid.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llvolume.h"
|
||||
#include "sguuidhash.h"
|
||||
|
||||
#define LLCONVEXDECOMPINTER_STATIC 1
|
||||
|
||||
@@ -505,8 +506,8 @@ public:
|
||||
|
||||
typedef std::map<LLVolumeParams, std::set<LLUUID> > mesh_load_map;
|
||||
mesh_load_map mLoadingMeshes[4];
|
||||
|
||||
typedef std::map<LLUUID, LLMeshSkinInfo> skin_map;
|
||||
|
||||
typedef boost::unordered_map<LLUUID, LLMeshSkinInfo> skin_map;
|
||||
skin_map mSkinMap;
|
||||
|
||||
typedef std::map<LLUUID, LLModel::Decomposition*> decomposition_map;
|
||||
|
||||
@@ -955,7 +955,7 @@ BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
LLVector3d pos_global = viewPosToGlobal(x, y, gSavedSettings.getBOOL( "MiniMapRotate" ));
|
||||
BOOL new_target = FALSE;
|
||||
if (!LLTracker::isTracking(NULL))
|
||||
if (!LLTracker::isTracking())
|
||||
{
|
||||
gFloaterWorldMap->trackLocation(pos_global);
|
||||
new_target = TRUE;
|
||||
@@ -967,7 +967,7 @@ BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterWorldMap::show(NULL, new_target);
|
||||
LLFloaterWorldMap::show(new_target);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1108,14 +1108,14 @@ bool LLNetMap::LLCheckRotateMap::handleEvent(LLPointer<LLEvent> event, const LLS
|
||||
|
||||
bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLNetMap::LLEnableTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLNetMap *self = mPtr;
|
||||
self->findControl(userdata["control"].asString())->setValue(LLTracker::isTracking(NULL));
|
||||
self->findControl(userdata["control"].asString())->setValue(LLTracker::isTracking());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,8 @@
|
||||
#include "llstatusbar.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llimview.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewermenu.h" // *FIX: for is_agent_friend()
|
||||
#include "llviewergenericmessage.h" // send_generic_message
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
@@ -82,7 +79,6 @@
|
||||
#include "llinventorymodel.h"
|
||||
#include "roles_constants.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "lldroptarget.h"
|
||||
|
||||
@@ -105,6 +101,8 @@ BOOL LLPanelAvatar::sAllowFirstLife = FALSE;
|
||||
extern void callback_invite_to_group(LLUUID group_id, void *user_data);
|
||||
extern void handle_lure(const LLUUID& invitee);
|
||||
extern void handle_pay_by_id(const LLUUID& payee);
|
||||
BOOL is_agent_friend(const LLUUID& agent_id);
|
||||
BOOL is_agent_mappable(const LLUUID& agent_id);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -362,6 +360,13 @@ void LLPanelAvatarSecondLife::enableControls(BOOL self)
|
||||
{
|
||||
childSetEnabled("img", self);
|
||||
childSetEnabled("about", self);
|
||||
if (self) // We can't give inventory to self
|
||||
{
|
||||
if (LLDropTarget* drop_target = findChild<LLDropTarget>("drop_target_rect"))
|
||||
removeChild(drop_target);
|
||||
if (LLTextBox* text_box = findChild<LLTextBox>("Give item:"))
|
||||
removeChild(text_box);
|
||||
}
|
||||
childSetVisible("allow_publish", self);
|
||||
childSetEnabled("allow_publish", self);
|
||||
childSetVisible("?", self);
|
||||
@@ -1434,7 +1439,6 @@ LLPanelAvatar::LLPanelAvatar(
|
||||
mPanelNotes(NULL),
|
||||
mPanelFirstLife(NULL),
|
||||
mPanelWeb(NULL),
|
||||
mDropTarget(NULL),
|
||||
mAvatarID( LLUUID::null ), // mAvatarID is set with 'setAvatar' or 'setAvatarID'
|
||||
mHaveProperties(FALSE),
|
||||
mHaveStatistics(FALSE),
|
||||
@@ -1595,16 +1599,16 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
{
|
||||
if (avatar_id.isNull()) return;
|
||||
|
||||
BOOL avatar_changed = FALSE;
|
||||
//BOOL avatar_changed = FALSE;
|
||||
if (avatar_id != mAvatarID)
|
||||
{
|
||||
avatar_changed = TRUE;
|
||||
//avatar_changed = TRUE;
|
||||
if(mAvatarID.notNull())
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
|
||||
}
|
||||
mAvatarID = avatar_id;
|
||||
}
|
||||
mAvatarID = avatar_id;
|
||||
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(mAvatarID, this);
|
||||
|
||||
@@ -1628,18 +1632,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
// Teens don't have this.
|
||||
if (mPanelFirstLife) mPanelFirstLife->enableControls(own_avatar && mAllowEdit);
|
||||
|
||||
LLView *target_view = getChild<LLView>("drop_target_rect");
|
||||
if(target_view)
|
||||
{
|
||||
if (mDropTarget)
|
||||
{
|
||||
delete mDropTarget;
|
||||
}
|
||||
mDropTarget = new LLDropTarget("drop target", target_view->getRect(), mAvatarID);
|
||||
addChild(mDropTarget);
|
||||
mDropTarget->setAgentID(mAvatarID);
|
||||
}
|
||||
|
||||
getChild<LLDropTarget>("drop_target_rect")->setEntityID(mAvatarID);
|
||||
|
||||
LLNameEditor* name_edit = getChild<LLNameEditor>("name");
|
||||
if(name_edit)
|
||||
{
|
||||
@@ -1726,8 +1720,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
childSetEnabled("Mute",FALSE);
|
||||
childSetVisible("Offer Teleport...",FALSE);
|
||||
childSetEnabled("Offer Teleport...",FALSE);
|
||||
childSetVisible("drop target",FALSE);
|
||||
childSetEnabled("drop target",FALSE);
|
||||
childSetVisible("Find on Map",FALSE);
|
||||
childSetEnabled("Find on Map",FALSE);
|
||||
childSetVisible("Add Friend...",FALSE);
|
||||
@@ -1750,8 +1742,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
|
||||
childSetVisible("Mute",TRUE);
|
||||
childSetEnabled("Mute",FALSE);
|
||||
|
||||
childSetVisible("drop target",TRUE);
|
||||
childSetEnabled("drop target",FALSE);
|
||||
|
||||
childSetVisible("Find on Map",TRUE);
|
||||
// Note: we don't always know online status, so always allow gods to try to track
|
||||
@@ -1893,11 +1883,9 @@ void LLPanelAvatar::onClickGetKey(void *userdata)
|
||||
LLPanelAvatar* self = (LLPanelAvatar*)userdata;
|
||||
LLUUID agent_id = self->getAvatarID();
|
||||
|
||||
char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
|
||||
agent_id.toString(buffer);
|
||||
llinfos << "Copy agent id: " << agent_id << " buffer: " << buffer << llendl;
|
||||
llinfos << "Copy agent id: " << agent_id << llendl;
|
||||
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(agent_id.asString()));
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1914,7 +1902,7 @@ void LLPanelAvatar::onClickTrack(void* userdata)
|
||||
LLNameEditor* nameedit = self->mPanelSecondLife->getChild<LLNameEditor>("name");
|
||||
if (nameedit) name = nameedit->getText();
|
||||
gFloaterWorldMap->trackAvatar(self->mAvatarID, name);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2077,8 +2065,6 @@ void LLPanelAvatar::processProperties(void* data, EAvatarProcessorType type)
|
||||
childSetEnabled("Pay...",TRUE);
|
||||
childSetEnabled("Mute",TRUE);
|
||||
|
||||
childSetEnabled("drop target",TRUE);
|
||||
|
||||
mHaveProperties = TRUE;
|
||||
enableOKIfReady();
|
||||
|
||||
|
||||
@@ -373,8 +373,6 @@ public:
|
||||
|
||||
std::list<LLPanelAvatarTab*> mAvatarPanelList;
|
||||
|
||||
LLDropTarget* mDropTarget;
|
||||
|
||||
// Teen users are not allowed to see or enter data into the first life page,
|
||||
// or their own about/interests text entry fields.
|
||||
static BOOL sAllowFirstLife;
|
||||
|
||||
@@ -886,7 +886,7 @@ void LLPanelClassified::onClickMap(void* data)
|
||||
{
|
||||
LLPanelClassified* self = (LLPanelClassified*)data;
|
||||
gFloaterWorldMap->trackLocation(self->mPosGlobal);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
|
||||
self->sendClassifiedClickMessage("map");
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ void LLPanelEvent::onClickMap(void* data)
|
||||
if (!self->mEventInfo.mPosGlobal.isExactlyZero())
|
||||
{
|
||||
gFloaterWorldMap->trackLocation(self->mEventInfo.mPosGlobal);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ void LLPanelFace::sendTextureInfo()
|
||||
return (object->mDrawable) ? object->mDrawable->getFace(te): NULL;
|
||||
}
|
||||
} get_last_face_func;
|
||||
LLFace* last_face;
|
||||
LLFace* last_face(NULL);
|
||||
LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_last_face_func, last_face);
|
||||
|
||||
LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
|
||||
@@ -654,7 +654,7 @@ void LLPanelFace::getState()
|
||||
return (object->mDrawable) ? object->mDrawable->getFace(te): NULL;
|
||||
}
|
||||
} get_te_face_func;
|
||||
LLFace* last_face;
|
||||
LLFace* last_face(NULL);
|
||||
LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_te_face_func, last_face);
|
||||
LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face);
|
||||
// this will determine if the texture param controls are tentative:
|
||||
|
||||
@@ -248,7 +248,7 @@ void LLPanelGroupLandMoney::impl::onMapButton()
|
||||
LLVector3d pos_global(global_x, global_y, global_z);
|
||||
gFloaterWorldMap->trackLocation(pos_global);
|
||||
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
bool LLPanelGroupLandMoney::impl::applyContribution()
|
||||
|
||||
@@ -66,20 +66,17 @@ const S32 NOTICE_DATE_STRING_SIZE = 30;
|
||||
/////////////////////////
|
||||
// LLPanelGroupNotices //
|
||||
/////////////////////////
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLDropTarget
|
||||
//
|
||||
// This handy class is a simple way to drop something on another
|
||||
// view. It handles drop events, always setting itself to the size of
|
||||
// its parent.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class LLGroupDropTarget : public LLView
|
||||
|
||||
#include "lldroptarget.h"
|
||||
class LLGroupDropTarget : public LLDropTarget
|
||||
{
|
||||
public:
|
||||
LLGroupDropTarget(const std::string& name, const LLRect& rect, LLPanelGroupNotices* panel, const LLUUID& group_id);
|
||||
LLGroupDropTarget(const LLDropTarget::Params& p = LLDropTarget::Params());
|
||||
~LLGroupDropTarget() {};
|
||||
|
||||
void doDrop(EDragAndDropType cargo_type, void* cargo_data);
|
||||
//
|
||||
// LLDropTarget functionality
|
||||
virtual void doDrop(EDragAndDropType cargo_type, void* cargo_data);
|
||||
|
||||
//
|
||||
// LLView functionality
|
||||
@@ -88,19 +85,26 @@ public:
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory);
|
||||
|
||||
void setGroupNoticesPanel(LLPanelGroupNotices* panel) { mGroupNoticesPanel = panel; }
|
||||
protected:
|
||||
LLPanelGroupNotices* mGroupNoticesPanel;
|
||||
LLUUID mGroupID;
|
||||
};
|
||||
|
||||
LLGroupDropTarget::LLGroupDropTarget(const std::string& name, const LLRect& rect,
|
||||
LLPanelGroupNotices* panel, const LLUUID& group_id) :
|
||||
LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
|
||||
mGroupNoticesPanel(panel),
|
||||
mGroupID(group_id)
|
||||
LLGroupDropTarget::LLGroupDropTarget(const LLDropTarget::Params& p)
|
||||
: LLDropTarget(p)
|
||||
{
|
||||
}
|
||||
|
||||
// static
|
||||
LLView* LLGroupDropTarget::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory)
|
||||
{
|
||||
LLGroupDropTarget* target = new LLGroupDropTarget();
|
||||
target->initFromXML(node, parent);
|
||||
return target;
|
||||
}
|
||||
|
||||
void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
|
||||
{
|
||||
llinfos << "LLGroupDropTarget::doDrop()" << llendl;
|
||||
@@ -114,7 +118,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
{
|
||||
BOOL handled = FALSE;
|
||||
|
||||
if (!gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND))
|
||||
if (!gAgent.hasPowerInGroup(mEntityID,GP_NOTICES_SEND))
|
||||
{
|
||||
*accept = ACCEPT_NO;
|
||||
return TRUE;
|
||||
@@ -172,6 +176,8 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
return handled;
|
||||
}
|
||||
|
||||
static LLRegisterWidget<LLGroupDropTarget> r("group_drop_target");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPanelGroupNotices
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -264,17 +270,9 @@ BOOL LLPanelGroupNotices::postBuild()
|
||||
mPanelCreateNotice = getChild<LLPanel>("panel_create_new_notice",recurse);
|
||||
mPanelViewNotice = getChild<LLPanel>("panel_view_past_notice",recurse);
|
||||
|
||||
// Must be in front of all other UI elements.
|
||||
LLPanel* dtv = getChild<LLPanel>("drop_target",recurse);
|
||||
LLGroupDropTarget* target = new LLGroupDropTarget("drop_target",
|
||||
dtv->getRect(),
|
||||
this, mGroupID);
|
||||
target->setEnabled(TRUE);
|
||||
target->setToolTip(dtv->getToolTip());
|
||||
|
||||
mPanelCreateNotice->addChild(target);
|
||||
mPanelCreateNotice->removeChild(dtv);
|
||||
delete dtv;
|
||||
LLGroupDropTarget* group_drop_target = getChild<LLGroupDropTarget>("drop_target",recurse);
|
||||
group_drop_target->setEntityID(mGroupID);
|
||||
group_drop_target->setGroupNoticesPanel(this);
|
||||
|
||||
arrangeNoticeView(VIEW_PAST_NOTICE);
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ void LLPanelPick::onClickMap(void* data)
|
||||
{
|
||||
LLPanelPick* self = (LLPanelPick*)data;
|
||||
gFloaterWorldMap->trackLocation(self->mPosGlobal);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -384,7 +384,7 @@ void LLPanelPlace::onClickMap(void* data)
|
||||
if (!self->mPosGlobal.isExactlyZero())
|
||||
{
|
||||
gFloaterWorldMap->trackLocation(self->mPosGlobal);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,15 +114,12 @@ BOOL LLPrefsIMImpl::postBuild()
|
||||
childDisable("log_chat");
|
||||
childDisable("log_show_history");
|
||||
//childDisable("log_path_button");
|
||||
childDisable("busy_response");
|
||||
childDisable("log_instant_messages_timestamp");
|
||||
childDisable("log_chat_timestamp");
|
||||
childDisable("log_chat_IM");
|
||||
childDisable("log_date_timestamp");
|
||||
childDisable("logfile_name_datestamp");
|
||||
|
||||
childSetText("busy_response", getString("log_in_to_change"));
|
||||
|
||||
childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole"));
|
||||
childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps"));
|
||||
childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification"));
|
||||
@@ -147,7 +144,6 @@ BOOL LLPrefsIMImpl::postBuild()
|
||||
|
||||
void LLPrefsIMImpl::enableHistory()
|
||||
{
|
||||
|
||||
if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean())
|
||||
{
|
||||
childEnable("log_show_history");
|
||||
@@ -162,18 +158,8 @@ void LLPrefsIMImpl::enableHistory()
|
||||
|
||||
void LLPrefsIMImpl::apply()
|
||||
{
|
||||
LLTextEditor* busy = getChild<LLTextEditor>("busy_response");
|
||||
LLWString busy_response;
|
||||
if (busy) busy_response = busy->getWText();
|
||||
LLWStringUtil::replaceTabsWithSpaces(busy_response, 4);
|
||||
LLWStringUtil::replaceChar(busy_response, '\n', '^');
|
||||
LLWStringUtil::replaceChar(busy_response, ' ', '%');
|
||||
|
||||
if(mGotPersonalInfo)
|
||||
{
|
||||
|
||||
gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response)));
|
||||
|
||||
gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean());
|
||||
gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean());
|
||||
gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean());
|
||||
@@ -272,24 +258,11 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e
|
||||
childSetValue("send_im_to_email", im_via_email);
|
||||
childEnable("log_instant_messages");
|
||||
childEnable("log_chat");
|
||||
childEnable("busy_response");
|
||||
childEnable("log_instant_messages_timestamp");
|
||||
childEnable("log_chat_timestamp");
|
||||
childEnable("log_chat_IM");
|
||||
childEnable("log_date_timestamp");
|
||||
childEnable("logfile_name_datestamp");
|
||||
|
||||
//RN: get wide string so replace char can work (requires fixed-width encoding)
|
||||
LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") );
|
||||
LLWStringUtil::replaceChar(busy_response, '^', '\n');
|
||||
LLWStringUtil::replaceChar(busy_response, '%', ' ');
|
||||
childSetText("busy_response", wstring_to_utf8str(busy_response));
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM))
|
||||
{
|
||||
childDisable("busy_response");
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
enableHistory();
|
||||
|
||||
|
||||
@@ -5144,10 +5144,9 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
|
||||
msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, desc);
|
||||
|
||||
// the reporter widget askes the server for info about picked objects
|
||||
if (request_flags & (COMPLAINT_REPORT_REQUEST | BUG_REPORT_REQUEST))
|
||||
if (request_flags & COMPLAINT_REPORT_REQUEST)
|
||||
{
|
||||
EReportType report_type = (COMPLAINT_REPORT_REQUEST & request_flags) ? COMPLAINT_REPORT : BUG_REPORT;
|
||||
LLFloaterReporter *reporterp = LLFloaterReporter::getReporter(report_type);
|
||||
LLFloaterReporter *reporterp = LLFloaterReporter::getInstance();
|
||||
if (reporterp)
|
||||
{
|
||||
std::string fullname;
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llstylemap.h"
|
||||
#include "llstring.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llagent.h"
|
||||
|
||||
LLStyleMap::LLStyleMap()
|
||||
{
|
||||
@@ -60,19 +56,12 @@ const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source)
|
||||
if (find(source) == end())
|
||||
{
|
||||
LLStyleSP style(new LLStyle);
|
||||
style->setVisible(true);
|
||||
style->setFontName(LLStringUtil::null);
|
||||
if (source != LLUUID::null && source != gAgent.getID() )
|
||||
if (source.notNull())
|
||||
{
|
||||
style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
|
||||
std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str());
|
||||
style->setLinkHREF(link);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make the resident's own name white and don't make the name clickable.
|
||||
style->setColor(LLColor4::white);
|
||||
}
|
||||
(*this)[source] = style;
|
||||
}
|
||||
return (*this)[source];
|
||||
@@ -86,9 +75,7 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link)
|
||||
if (iter == end())
|
||||
{
|
||||
LLStyleSP style(new LLStyle);
|
||||
style->setVisible(true);
|
||||
style->setFontName(LLStringUtil::null);
|
||||
if (id != LLUUID::null && !link.empty())
|
||||
if (id.notNull() && !link.empty())
|
||||
{
|
||||
style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
|
||||
style->setLinkHREF(link);
|
||||
|
||||
@@ -307,7 +307,12 @@ void LLToolBar::refresh()
|
||||
setVisible(show && !mouselook);
|
||||
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgentAvatarp)
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
|
||||
@@ -111,9 +111,8 @@ LLTracker::~LLTracker()
|
||||
|
||||
|
||||
// static
|
||||
void LLTracker::stopTracking(void* userdata)
|
||||
void LLTracker::stopTracking(bool clear_ui)
|
||||
{
|
||||
BOOL clear_ui = ((BOOL)(intptr_t)userdata);
|
||||
instance()->stopTrackingAll(clear_ui);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ public:
|
||||
// these are static so that they can be used a callbacks
|
||||
static ETrackingStatus getTrackingStatus() { return instance()->mTrackingStatus; }
|
||||
static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; }
|
||||
static BOOL isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; }
|
||||
static void stopTracking(void*);
|
||||
static BOOL isTracking() { return instance()->mTrackingStatus != TRACKING_NOTHING; }
|
||||
static void stopTracking(bool);
|
||||
static void clearFocus();
|
||||
|
||||
static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; }
|
||||
|
||||
@@ -359,13 +359,13 @@ void LLViewerInventoryItem::fetchFromServer(void) const
|
||||
// we have to check region. It can be null after region was destroyed. See EXT-245
|
||||
if (region)
|
||||
{
|
||||
if(gAgent.getID() != mPermissions.getOwner())
|
||||
if(gAgent.getID() != mPermissions.getOwner())
|
||||
{
|
||||
url = region->getCapability("FetchLib2");
|
||||
url = region->getCapability("FetchLib2");
|
||||
}
|
||||
else
|
||||
{
|
||||
url = region->getCapability("FetchInventory2");
|
||||
else
|
||||
{
|
||||
url = region->getCapability("FetchInventory2");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloaterbvhpreview.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloateravatartextures.h"
|
||||
@@ -358,7 +357,6 @@ void handle_singleton_toggle(void *)
|
||||
|
||||
// <edit>
|
||||
void handle_fake_away_status(void*);
|
||||
void handle_area_search(void*);
|
||||
|
||||
// <dogmode> for pose stand
|
||||
LLUUID current_pose = LLUUID::null;
|
||||
@@ -404,13 +402,8 @@ BOOL handle_check_pose(void* userdata) {
|
||||
}
|
||||
|
||||
|
||||
void handle_force_ground_sit(void*);
|
||||
void handle_hide_typing_notification(void*);
|
||||
void handle_close_all_notifications(void*);
|
||||
void handle_open_message_log(void*);
|
||||
void handle_edit_ao(void*);
|
||||
void handle_sounds_explorer(void*);
|
||||
void handle_blacklist(void*);
|
||||
// </edit>
|
||||
|
||||
void handle_reset_view();
|
||||
@@ -706,32 +699,6 @@ void init_menus()
|
||||
// TomY TODO convert these two
|
||||
LLMenuGL*menu;
|
||||
|
||||
menu = new LLMenuGL("Singularity");
|
||||
menu->setCanTearOff(TRUE);
|
||||
menu->addChild(new LLMenuItemCallGL( "Close All Dialogs",
|
||||
&handle_close_all_notifications, NULL, NULL, 'D', MASK_CONTROL | MASK_ALT | MASK_SHIFT));
|
||||
menu->addSeparator();
|
||||
menu->addChild(new LLMenuItemCallGL( "Fake Away Status", &handle_fake_away_status, NULL));
|
||||
menu->addChild(new LLMenuItemCallGL( "Force Ground Sit", &handle_force_ground_sit, NULL));
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addChild(new LLMenuItemCallGL( "Animation Override...",
|
||||
&handle_edit_ao, NULL));
|
||||
menu->addChild(new LLMenuItemCheckGL( "Nimble",
|
||||
&menu_toggle_control,
|
||||
NULL,
|
||||
&menu_check_control,
|
||||
(void*)"Nimble"));
|
||||
menu->addSeparator();
|
||||
menu->addChild(new LLMenuItemCallGL( "Object Area Search", &handle_area_search, NULL));
|
||||
|
||||
menu->addChild(new LLMenuItemCallGL( "Sound Explorer",
|
||||
&handle_sounds_explorer, NULL));
|
||||
menu->addChild(new LLMenuItemCallGL( "Asset Blacklist",
|
||||
&handle_blacklist, NULL));
|
||||
menu->addChild(new LLMenuItemCheckGL( "Streaming Audio Display",
|
||||
&handle_ticker_toggle, &handle_ticker_enabled, &handle_singleton_check<SHFloaterMediaTicker>, NULL ));
|
||||
|
||||
// <dogmode>
|
||||
// Add in the pose stand -------------------------------------------
|
||||
/*LLMenuGL* sub = new LLMenuGL("Pose Stand...");
|
||||
@@ -746,12 +713,6 @@ void init_menus()
|
||||
sub->addChild(new LLMenuItemCallGL( "Stop Pose Stand", &handle_pose_stand_stop, NULL));
|
||||
// </dogmode> ------------------------------------------------------*/
|
||||
|
||||
menu->addChild(new LLMenuItemCheckGL("Pose Stand",&handle_toggle_pose, NULL, &handle_check_pose, NULL));
|
||||
|
||||
//these should always be last in a sub menu
|
||||
menu->createJumpKeys();
|
||||
gMenuBarView->addChild( menu );
|
||||
|
||||
menu = new LLMenuGL(CLIENT_MENU_NAME);
|
||||
menu->setCanTearOff(TRUE);
|
||||
init_client_menu(menu);
|
||||
@@ -799,7 +760,7 @@ void init_menus()
|
||||
ins->setVisible(false);
|
||||
ins = gMenuBarView->getChildView("insert_tools", true, false);
|
||||
ins->setVisible(false);
|
||||
/* Singu Note: When the advanced and/or admin menu is made xml, this should be uncommented.
|
||||
/* Singu Note: When the advanced and/or admin menus are made xml, these should be uncommented.
|
||||
ins = gMenuBarView->getChildView("insert_advanced", true, false);
|
||||
ins->setVisible(false);
|
||||
ins = gMenuBarView->getChildView("insert_admin", true, false);
|
||||
@@ -1588,7 +1549,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
|
||||
(void*)LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES));
|
||||
menu->addChild(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation));
|
||||
menu->addChild(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
|
||||
menu->addChild(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
|
||||
menu->addChild(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures));
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
menu->addChild(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
|
||||
menu->addChild(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));
|
||||
@@ -2377,18 +2338,19 @@ bool enable_object_edit()
|
||||
enable = LLViewerParcelMgr::getInstance()->allowAgentBuild()
|
||||
|| LLSelectMgr::getInstance()->getSelection()->isAttachment();
|
||||
}
|
||||
else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound())
|
||||
// Singu Note: The following check is wasteful, bypass it
|
||||
// The following RLVa patch has been modified from its original version. It been formatted to run in the time allotted.
|
||||
//else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound())
|
||||
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified after RLVa-1.3.0c on 2013-05-18
|
||||
else if (!rlv_handler_t::isEnabled() || (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ)))
|
||||
{
|
||||
// enable = true;
|
||||
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
bool fRlvCanEdit = (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ));
|
||||
if (!fRlvCanEdit)
|
||||
{
|
||||
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
|
||||
RlvSelectIsEditable f;
|
||||
fRlvCanEdit = (hSel.notNull()) && ((hSel->getFirstRootNode(&f, TRUE)) == NULL);
|
||||
}
|
||||
enable = fRlvCanEdit;
|
||||
enable = true;
|
||||
}
|
||||
else // Restrictions disallow edit, check for an exception for the selection
|
||||
{
|
||||
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
|
||||
RlvSelectIsEditable f;
|
||||
enable = (hSel.notNull()) && ((hSel->getFirstRootNode(&f, TRUE)) == NULL);
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
@@ -3263,10 +3225,7 @@ class LLAvatarCopyUUID : public view_listener_t
|
||||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
if(!avatar) return true;
|
||||
|
||||
LLUUID uuid = avatar->getID();
|
||||
char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
|
||||
uuid.toString(buffer);
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(avatar->getID().asString()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -3739,21 +3698,6 @@ void handle_open_message_log(void*)
|
||||
LLFloaterMessageLog::show();
|
||||
}
|
||||
|
||||
void handle_edit_ao(void*)
|
||||
{
|
||||
LLFloaterAO::show(NULL);
|
||||
}
|
||||
|
||||
void handle_sounds_explorer(void*)
|
||||
{
|
||||
LLFloaterExploreSounds::toggle();
|
||||
}
|
||||
|
||||
void handle_blacklist(void*)
|
||||
{
|
||||
LLFloaterBlacklist::show();
|
||||
}
|
||||
|
||||
void handle_close_all_notifications(void*)
|
||||
{
|
||||
LLView::child_list_t child_list(*(gNotifyBoxView->getChildList()));
|
||||
@@ -3777,21 +3721,6 @@ void handle_fake_away_status(void*)
|
||||
gSavedSettings.setBOOL("FakeAway", !fake_away);
|
||||
}
|
||||
|
||||
void handle_force_ground_sit(void*)
|
||||
{
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if (!gAgentAvatarp->isSitting())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// </edit>
|
||||
|
||||
/*
|
||||
@@ -4055,7 +3984,12 @@ class LLWorldEnableFly : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
BOOL sitting = FALSE;
|
||||
if (gAgentAvatarp)
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
@@ -6494,7 +6428,7 @@ class LLShowFloater : public view_listener_t
|
||||
}
|
||||
else if (floater_name == "world map")
|
||||
{
|
||||
LLFloaterWorldMap::toggle(NULL);
|
||||
LLFloaterWorldMap::toggle();
|
||||
}
|
||||
else if (floater_name == "mini map")
|
||||
{
|
||||
@@ -6572,12 +6506,6 @@ class LLShowFloater : public view_listener_t
|
||||
{
|
||||
LLFloaterLagMeter::showInstance();
|
||||
}
|
||||
else if (floater_name == "bug reporter")
|
||||
{
|
||||
// Prevent menu from appearing in screen shot.
|
||||
gMenuHolder->hideMenus();
|
||||
LLFloaterReporter::showFromMenu(BUG_REPORT);
|
||||
}
|
||||
else if (floater_name == "buy currency")
|
||||
{
|
||||
LLFloaterBuyCurrency::buyCurrency();
|
||||
@@ -6704,6 +6632,14 @@ class LLFloaterVisible : public view_listener_t
|
||||
{
|
||||
new_value = LLFloaterPathfindingCharacters::instanceVisible(LLSD());
|
||||
}
|
||||
else if (floater_name == "sound_explorer")
|
||||
{
|
||||
new_value = LLFloaterExploreSounds::visible();
|
||||
}
|
||||
else if (floater_name == "asset_blacklist")
|
||||
{
|
||||
new_value = LLFloaterBlacklist::visible();
|
||||
}
|
||||
gMenuHolder->findControl(control_name)->setValue(new_value);
|
||||
return true;
|
||||
}
|
||||
@@ -9269,6 +9205,153 @@ class LLWorldDayCycle : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class SinguCloseAllDialogs : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_close_all_notifications(NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguAnimationOverride : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterAO::show(NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguNimble : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gSavedSettings.setBOOL("Nimble", !gSavedSettings.getBOOL("Nimble"));
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguCheckNimble : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(gSavedSettings.getBOOL("Nimble"));
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguSoundExplorer : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterExploreSounds::toggle();
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguAssetBlacklist : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLFloaterBlacklist::toggle();
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguStreamingAudioDisplay : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_ticker_toggle(NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguCheckStreamingAudioDisplay : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(handle_singleton_check<SHFloaterMediaTicker>(NULL));
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguEnableStreamingAudioDisplay : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
return handle_ticker_enabled(NULL);
|
||||
}
|
||||
};
|
||||
|
||||
class SinguPoseStand : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_toggle_pose(NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguCheckPoseStand : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(handle_check_pose(NULL));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguRebake : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_rebake_textures(NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguDebugConsole : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
handle_singleton_toggle<LLFloaterRegionDebugConsole>(NULL);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguCheckDebugConsole : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(handle_singleton_check<LLFloaterRegionDebugConsole>(NULL));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class SinguVisibleDebugConsole : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (LLViewerRegion* region = gAgent.getRegion())
|
||||
{
|
||||
if (LLView* item = gMenuBarView->getChildView("Region Debug Console", true, false))
|
||||
item->setVisible(!(region->getCapability("SimConsoleAsync").empty() || region->getCapability("SimConsole").empty()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void addMenu(view_listener_t *menu, const std::string& name)
|
||||
{
|
||||
sMenus.push_back(menu);
|
||||
@@ -9544,6 +9627,24 @@ void initialize_menus()
|
||||
addMenu(new LLEditableSelected(), "EditableSelected");
|
||||
addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
|
||||
|
||||
// Singularity menu
|
||||
addMenu(new SinguCloseAllDialogs(), "CloseAllDialogs");
|
||||
// ---- Fake away handled elsewhere
|
||||
addMenu(new SinguAnimationOverride(), "AnimationOverride");
|
||||
addMenu(new SinguNimble(), "Nimble");
|
||||
addMenu(new SinguCheckNimble(), "CheckNimble");
|
||||
addMenu(new SinguSoundExplorer(), "SoundExplorer");
|
||||
addMenu(new SinguAssetBlacklist(), "AssetBlacklist");
|
||||
addMenu(new SinguStreamingAudioDisplay(), "StreamingAudioDisplay");
|
||||
addMenu(new SinguEnableStreamingAudioDisplay(), "EnableStreamingAudioDisplay");
|
||||
addMenu(new SinguCheckStreamingAudioDisplay(), "CheckStreamingAudioDisplay");
|
||||
addMenu(new SinguPoseStand(), "PoseStand");
|
||||
addMenu(new SinguCheckPoseStand(), "CheckPoseStand");
|
||||
addMenu(new SinguRebake(), "Rebake");
|
||||
addMenu(new SinguDebugConsole(), "RegionDebugConsole");
|
||||
addMenu(new SinguCheckDebugConsole(), "CheckRegionDebugConsole");
|
||||
addMenu(new SinguVisibleDebugConsole(), "VisibleRegionDebugConsole");
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-01-18 (RLVa-1.1.0m) | Added: RLVa-1.1.0m | OK
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llviewermessage.h"
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "llanimationstates.h"
|
||||
@@ -1950,6 +1951,28 @@ void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string m
|
||||
|
||||
}
|
||||
|
||||
// Replace wild cards in autoresponse messages
|
||||
std::string replace_wildcards(std::string autoresponse, const LLUUID& id, const std::string& name)
|
||||
{
|
||||
// Add in their legacy name
|
||||
boost::algorithm::replace_all(autoresponse, "#n", name);
|
||||
|
||||
// Add in our location's slurl
|
||||
boost::algorithm::replace_all(autoresponse, "#r", gAgent.getSLURL());
|
||||
|
||||
// Add in their display name
|
||||
LLAvatarName av_name;
|
||||
boost::algorithm::replace_all(autoresponse, "#d", LLAvatarNameCache::get(id, &av_name) ? av_name.mDisplayName : name);
|
||||
|
||||
if (!isAgentAvatarValid()) return autoresponse;
|
||||
// Add in idle time
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[MINS]"] = boost::lexical_cast<std::string, int>(gAgentAvatarp->mIdleTimer.getElapsedTimeF32()/60);
|
||||
boost::algorithm::replace_all(autoresponse, "#i", LLTrans::getString("IM_autoresponse_minutes", args));
|
||||
|
||||
return autoresponse;
|
||||
}
|
||||
|
||||
void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
if (gNoRender)
|
||||
@@ -2019,11 +2042,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
return;
|
||||
// NaCl End
|
||||
|
||||
// make sure that we don't have an empty or all-whitespace name
|
||||
// make sure that we don't have an empty or all-whitespace name
|
||||
LLStringUtil::trim(name);
|
||||
if (name.empty())
|
||||
{
|
||||
name = LLTrans::getString("Unnamed");
|
||||
name = LLTrans::getString("Unnamed");
|
||||
}
|
||||
|
||||
// Preserve the unaltered name for use in group notice mute checking.
|
||||
@@ -2033,7 +2056,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
name = clean_name_from_im(name, dialog);
|
||||
|
||||
// <edit>
|
||||
llinfos << "RegionID: " << region_id.asString() << llendl;
|
||||
if (region_id.notNull())
|
||||
llinfos << "RegionID: " << region_id.asString() << llendl;
|
||||
// </edit>
|
||||
|
||||
BOOL is_busy = gAgent.getBusy();
|
||||
@@ -2043,7 +2067,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
BOOL is_linden = LLMuteList::getInstance()->isLinden(name);
|
||||
BOOL is_owned_by_me = FALSE;
|
||||
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
|
||||
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly");
|
||||
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("InstantMessagesFriendsOnly");
|
||||
|
||||
LLUUID computed_session_id = LLIMMgr::computeSessionID(dialog,from_id);
|
||||
|
||||
@@ -2067,238 +2091,24 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
std::string separator_string(": ");
|
||||
int message_offset = 0;
|
||||
|
||||
//Handle IRC styled /me messages.
|
||||
//Handle IRC styled /me messages.
|
||||
std::string prefix = message.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
chat.mChatStyle = CHAT_STYLE_IRC;
|
||||
separator_string = "";
|
||||
message_offset = 3;
|
||||
}
|
||||
|
||||
if( dialog == IM_TYPING_START
|
||||
|| dialog == IM_NOTHING_SPECIAL
|
||||
|| dialog == IM_TYPING_STOP
|
||||
|| dialog == IM_BUSY_AUTO_RESPONSE)
|
||||
{
|
||||
if(session_id != computed_session_id)
|
||||
{
|
||||
session_id = computed_session_id;
|
||||
}
|
||||
}
|
||||
bool typing_init = false;
|
||||
if( dialog == IM_TYPING_START && !is_muted )
|
||||
{
|
||||
if(!gIMMgr->hasSession(computed_session_id) && gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"))
|
||||
{
|
||||
typing_init = true;
|
||||
gIMMgr->addMessage(
|
||||
computed_session_id,
|
||||
from_id,
|
||||
name,
|
||||
llformat("%s ",name.c_str()) + LLTrans::getString("IM_announce_incoming"),
|
||||
name,
|
||||
IM_NOTHING_SPECIAL,
|
||||
parent_estate_id,
|
||||
region_id,
|
||||
position,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
bool is_auto_response = false;
|
||||
if(dialog == IM_NOTHING_SPECIAL) {
|
||||
// detect auto responses from GreenLife and compatible viewers
|
||||
is_auto_response = ( message.substr(0, 21) == "/me (auto-response): " );
|
||||
}
|
||||
|
||||
bool do_auto_response = false;
|
||||
if( gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone" ) )
|
||||
do_auto_response = true;
|
||||
|
||||
// odd name for auto respond to non-friends
|
||||
if( gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends") &&
|
||||
LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL )
|
||||
do_auto_response = true;
|
||||
|
||||
if( is_muted )
|
||||
do_auto_response = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted");
|
||||
|
||||
if( offline != IM_ONLINE )
|
||||
do_auto_response = false;
|
||||
|
||||
if( is_auto_response )
|
||||
do_auto_response = false;
|
||||
|
||||
// handle cases where IM_NOTHING_SPECIAL is not an IM
|
||||
if( name == SYSTEM_FROM ||
|
||||
from_id.isNull() ||
|
||||
to_id.isNull() )
|
||||
do_auto_response = false;
|
||||
|
||||
// if( do_auto_response )
|
||||
// [RLVa:KB] - Alternate: Phoenix-370
|
||||
// Phoenix specific: auto-response should be blocked if the avie is RLV @sendim=n restricted and the recipient is not an exception
|
||||
if ( (do_auto_response) && ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.isException(RLV_BHVR_SENDIM, from_id)) ) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) ||
|
||||
(dialog == IM_TYPING_START && gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"))
|
||||
)
|
||||
{
|
||||
BOOL has = gIMMgr->hasSession(computed_session_id);
|
||||
if(!has || gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat") || typing_init)
|
||||
{
|
||||
BOOL show = !gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded");
|
||||
if(!has && show)
|
||||
{
|
||||
gIMMgr->addSession(name, IM_NOTHING_SPECIAL, from_id);
|
||||
}
|
||||
if(show)
|
||||
{
|
||||
gIMMgr->addMessage(
|
||||
computed_session_id,
|
||||
from_id,
|
||||
SYSTEM_FROM,
|
||||
LLTrans::getString("IM_autoresponded_to") + llformat(" %s.",name.c_str()),
|
||||
LLStringUtil::null,
|
||||
IM_NOTHING_SPECIAL,
|
||||
parent_estate_id,
|
||||
region_id,
|
||||
position,
|
||||
false);
|
||||
}
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
|
||||
//<-- Personalized Autoresponse by Madgeek
|
||||
std::string autoresponse = gSavedPerAccountSettings.getText("AscentInstantMessageResponse");
|
||||
//Define Wildcards
|
||||
std::string fname_wildcard = "#f";
|
||||
std::string lname_wildcard = "#l";
|
||||
std::string time_wildcard = "#t";
|
||||
std::string region_wildcard = "#r";
|
||||
std::string idle_wildcard = "#i";
|
||||
//Extract Name
|
||||
std::string f_name, l_name;
|
||||
std::istringstream inname(name);
|
||||
inname >> f_name >> l_name;
|
||||
//Generate a Timestamp
|
||||
time_t rawtime;
|
||||
time(&rawtime);
|
||||
char * timestamp_chars;
|
||||
timestamp_chars = asctime(localtime(&rawtime));
|
||||
std::string timestamp;
|
||||
timestamp.assign(timestamp_chars);
|
||||
timestamp = timestamp.substr(0, timestamp.find('\n'));
|
||||
//Generate slurl
|
||||
std::string slrul = gAgent.getSLURL();
|
||||
//Generate idle time
|
||||
LLVOAvatar* myavatar = gAgentAvatarp;
|
||||
std::string idle_time = "";
|
||||
if(myavatar)idle_time = llformat("%d mins", (U8)(myavatar->mIdleTimer.getElapsedTimeF32()/60.));
|
||||
|
||||
//Handle Replacements
|
||||
size_t found = autoresponse.find(fname_wildcard);
|
||||
while(found != std::string::npos)
|
||||
{
|
||||
autoresponse.replace(found, 2, f_name);
|
||||
found = autoresponse.find(fname_wildcard);
|
||||
}
|
||||
found = autoresponse.find(lname_wildcard);
|
||||
while(found != std::string::npos)
|
||||
{
|
||||
autoresponse.replace(found, 2, l_name);
|
||||
found = autoresponse.find(lname_wildcard);
|
||||
}
|
||||
found = autoresponse.find(time_wildcard);
|
||||
while(found != std::string::npos)
|
||||
{
|
||||
autoresponse.replace(found, 2, timestamp);
|
||||
found = autoresponse.find(time_wildcard);
|
||||
}
|
||||
found = autoresponse.find(region_wildcard);
|
||||
while(found != std::string::npos)
|
||||
{
|
||||
autoresponse.replace(found, 2, slrul);
|
||||
found = autoresponse.find(region_wildcard);
|
||||
}
|
||||
found = autoresponse.find(idle_wildcard);
|
||||
while(found != std::string::npos)
|
||||
{
|
||||
autoresponse.replace(found, 2, idle_time);
|
||||
found = autoresponse.find(idle_wildcard);
|
||||
}
|
||||
//--> Personalized Autoresponse
|
||||
|
||||
if(gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat") && has && !typing_init) {
|
||||
// send as busy auto response instead to prevent endless repeating replies
|
||||
// when other end is a bot or broken client that answers to every usual IM
|
||||
// reasoning for this decision can be found in RFC2812 3.3.2 Notices
|
||||
// where PRIVMSG can be seen as IM_NOTHING_SPECIAL and NOTICE can be seen as
|
||||
// IM_BUSY_AUTO_RESPONSE. The assumption here is that no existing client
|
||||
// responds to IM_BUSY_AUTO_RESPONSE. --TS
|
||||
std::string response = autoresponse;
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgent.getID(),
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
my_name,
|
||||
response,
|
||||
IM_OFFLINE,
|
||||
IM_BUSY_AUTO_RESPONSE,
|
||||
session_id);
|
||||
} else {
|
||||
std::string response = "/me (auto-response): "+autoresponse;
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgent.getID(),
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
my_name,
|
||||
response,
|
||||
IM_OFFLINE,
|
||||
IM_NOTHING_SPECIAL,
|
||||
session_id);
|
||||
}
|
||||
gAgent.sendReliableMessage();
|
||||
if(gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem") && (!has || typing_init))
|
||||
{
|
||||
LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("AscentInstantMessageResponseItemData");
|
||||
LLViewerInventoryItem* item = gInventory.getItem(itemid);
|
||||
if(item)
|
||||
{
|
||||
//childSetValue("im_give_disp_rect_txt","Currently set to: "+item->getName());
|
||||
if(show)
|
||||
{
|
||||
gIMMgr->addMessage(
|
||||
computed_session_id,
|
||||
from_id,
|
||||
SYSTEM_FROM,
|
||||
llformat("%s %s \"%s\"",name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()),
|
||||
LLStringUtil::null,
|
||||
IM_NOTHING_SPECIAL,
|
||||
parent_estate_id,
|
||||
region_id,
|
||||
position,
|
||||
false);
|
||||
}
|
||||
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// These bools are here because they would make mess of logic down below in IM_NOTHING_SPECIAL.
|
||||
bool is_autorespond = !is_muted && (is_friend || !gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly")) && gSavedPerAccountSettings.getBOOL("AutoresponseAnyone");
|
||||
bool is_autorespond_muted = is_muted && gSavedPerAccountSettings.getBOOL("AutoresponseMuted");
|
||||
bool is_autorespond_nonfriends = !is_friend && !is_muted && gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends");
|
||||
|
||||
LLSD args;
|
||||
switch(dialog)
|
||||
{
|
||||
case IM_CONSOLE_AND_CHAT_HISTORY:
|
||||
// These are used for system messages, hence don't need the name,
|
||||
// as it is always "Second Life".
|
||||
// *TODO:translate
|
||||
args["MESSAGE"] = message;
|
||||
|
||||
// Note: don't put the message in the IM history, even though was sent
|
||||
@@ -2306,7 +2116,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
LLNotificationsUtil::add("SystemMessageTip",args);
|
||||
break;
|
||||
|
||||
case IM_NOTHING_SPECIAL:
|
||||
case IM_NOTHING_SPECIAL:
|
||||
// Don't show dialog, just do IM
|
||||
if (!gAgent.isGodlike()
|
||||
&& gAgent.getRegion()->isPrelude()
|
||||
@@ -2327,37 +2137,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
// [/RLVa:KB]
|
||||
// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
|
||||
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && (gRlvHandler.canReceiveIM(from_id)) )
|
||||
else if (offline == IM_ONLINE && !is_linden && (is_busy || is_autorespond || is_autorespond_nonfriends || is_autorespond_muted) && name != SYSTEM_FROM && gRlvHandler.canReceiveIM(from_id))
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// return a standard "busy" message, but only do it to online IM
|
||||
// (i.e. not other auto responses and not store-and-forward IM)
|
||||
if (!gIMMgr->hasSession(session_id))
|
||||
{
|
||||
// if there is not a panel for this conversation (i.e. it is a new IM conversation
|
||||
// initiated by the other party) then...
|
||||
std::string my_name;
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
std::string response = gSavedPerAccountSettings.getText("BusyModeResponse");
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgent.getID(),
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
my_name,
|
||||
response,
|
||||
IM_ONLINE,
|
||||
IM_BUSY_AUTO_RESPONSE,
|
||||
session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
// now store incoming IM in chat history
|
||||
|
||||
buffer = separator_string + message.substr(message_offset);
|
||||
|
||||
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
|
||||
bool send_autoresponse = !gIMMgr->hasSession(session_id) || gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat");
|
||||
|
||||
// add to IM panel, but do not bother the user
|
||||
gIMMgr->addMessage(
|
||||
@@ -2375,6 +2163,76 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
// pretend this is chat generated by self, so it does not show up on screen
|
||||
chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset);
|
||||
LLFloaterChat::addChat( chat, TRUE, TRUE );
|
||||
|
||||
// return a standard "busy" message, but only do it to online IM
|
||||
// (i.e. not other auto responses and not store-and-forward IM)
|
||||
if (send_autoresponse)
|
||||
{
|
||||
// if there is not a panel for this conversation (i.e. it is a new IM conversation
|
||||
// initiated by the other party) then...
|
||||
std::string my_name;
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
std::string response;
|
||||
bool show_autoresponded = false;
|
||||
LLUUID itemid;
|
||||
if (is_muted)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("AutoresponseMutedMessage");
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"));
|
||||
// We don't show that we've responded to mutes
|
||||
}
|
||||
else if (is_busy)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("BusyModeResponse");
|
||||
if (gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("BusyModeResponseItemID"));
|
||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("BusyModeResponseShow");
|
||||
}
|
||||
else if (is_autorespond_nonfriends)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage");
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseNonFriendsItemID"));
|
||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsShow");
|
||||
}
|
||||
else if (is_autorespond)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("AutoresponseAnyoneMessage");
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseAnyoneItemID"));
|
||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneShow");
|
||||
}
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgentID,
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
my_name,
|
||||
replace_wildcards(response, from_id, name),
|
||||
IM_ONLINE,
|
||||
IM_BUSY_AUTO_RESPONSE,
|
||||
session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
std::string pns_name;
|
||||
if (!LLAvatarNameCache::getPNSName(from_id, pns_name)) pns_name = name;
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(session_id, from_id, LLStringUtil::null, LLTrans::getString("IM_autoresponded_to") + " " + pns_name);
|
||||
}
|
||||
if (LLViewerInventoryItem* item = gInventory.getItem(itemid))
|
||||
{
|
||||
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(computed_session_id, from_id, LLStringUtil::null,
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
// We stored the incoming IM in history before autoresponding, logically.
|
||||
}
|
||||
else if (from_id.isNull())
|
||||
{
|
||||
@@ -2447,9 +2305,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
position,
|
||||
true);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset);
|
||||
|
||||
BOOL local_agent = FALSE;
|
||||
LLFloaterChat::addChat( chat, TRUE, local_agent );
|
||||
LLFloaterChat::addChat(chat, true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2457,14 +2313,94 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
// history. Pretend the chat is from a local agent,
|
||||
// so it will go into the history but not be shown on screen.
|
||||
chat.mText = buffer;
|
||||
BOOL local_agent = TRUE;
|
||||
LLFloaterChat::addChat( chat, TRUE, local_agent );
|
||||
LLFloaterChat::addChat(chat, true, true);
|
||||
|
||||
// Autoresponse to muted avatars
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseMuted"))
|
||||
{
|
||||
std::string my_name;
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
gAgentID,
|
||||
FALSE,
|
||||
gAgent.getSessionID(),
|
||||
from_id,
|
||||
my_name,
|
||||
replace_wildcards(gSavedPerAccountSettings.getString("AutoresponseMutedMessage"), from_id, name),
|
||||
IM_ONLINE,
|
||||
IM_BUSY_AUTO_RESPONSE,
|
||||
session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"))
|
||||
if (LLViewerInventoryItem* item = gInventory.getItem(static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"))))
|
||||
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IM_TYPING_START:
|
||||
{
|
||||
// Don't announce that someone has started messaging, if they're muted or when in busy mode
|
||||
if (!is_muted && (!accept_im_from_only_friend || is_friend) && !is_busy && !gIMMgr->hasSession(computed_session_id) && gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"))
|
||||
{
|
||||
std::string pns_name;
|
||||
if (!LLAvatarNameCache::getPNSName(from_id, pns_name)) pns_name = name;
|
||||
|
||||
gIMMgr->addMessage(
|
||||
computed_session_id,
|
||||
from_id,
|
||||
name,
|
||||
llformat("%s ", pns_name.c_str()) + LLTrans::getString("IM_announce_incoming"),
|
||||
name,
|
||||
IM_NOTHING_SPECIAL,
|
||||
parent_estate_id,
|
||||
region_id,
|
||||
position,
|
||||
false);
|
||||
|
||||
// This block is very similar to the one above, but is necessary, since a session is opened to announce incoming message..
|
||||
// In order to prevent doubling up on the first response, We neglect to send this if Repeat for each message is on.
|
||||
if ((is_autorespond_nonfriends || is_autorespond) && !gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"))
|
||||
{
|
||||
std::string my_name;
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
std::string response;
|
||||
bool show_autoresponded = false;
|
||||
LLUUID itemid;
|
||||
if (is_autorespond_nonfriends)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage");
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseNonFriendsItemID"));
|
||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsShow");
|
||||
}
|
||||
else if (is_autorespond)
|
||||
{
|
||||
response = gSavedPerAccountSettings.getString("AutoresponseAnyoneMessage");
|
||||
if (gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneItem"))
|
||||
itemid = static_cast<LLUUID>(gSavedPerAccountSettings.getString("AutoresponseAnyoneItemID"));
|
||||
show_autoresponded = gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneShow");
|
||||
}
|
||||
pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id, my_name, replace_wildcards(response, from_id, name), IM_ONLINE, IM_BUSY_AUTO_RESPONSE, session_id);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(session_id, from_id, LLStringUtil::null, LLTrans::getString("IM_autoresponded_to") + " " + pns_name);
|
||||
}
|
||||
if (LLViewerInventoryItem* item = gInventory.getItem(itemid))
|
||||
{
|
||||
LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
|
||||
if (show_autoresponded)
|
||||
{
|
||||
gIMMgr->addMessage(computed_session_id, from_id, LLStringUtil::null,
|
||||
llformat("%s %s \"%s\"", pns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
|
||||
gIMMgr->processIMTypingStart(im_info);
|
||||
}
|
||||
@@ -2682,6 +2618,7 @@ 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;
|
||||
info->mFromObject = FALSE;
|
||||
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) )
|
||||
@@ -2690,7 +2627,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
else
|
||||
else // IM_TASK_INVENTORY_OFFERED
|
||||
{
|
||||
if (sizeof(S8) != binary_bucket_size)
|
||||
{
|
||||
@@ -2700,6 +2637,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
}
|
||||
info->mType = (LLAssetType::EType) binary_bucket[0];
|
||||
info->mObjectID = LLUUID::null;
|
||||
info->mFromObject = TRUE;
|
||||
}
|
||||
|
||||
info->mIM = dialog;
|
||||
@@ -2708,7 +2646,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
info->mTransactionID = session_id;
|
||||
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
|
||||
|
||||
info->mFromObject = (dialog == IM_TASK_INVENTORY_OFFERED);
|
||||
info->mFromName = name;
|
||||
info->mDesc = message;
|
||||
info->mHost = msg->getSender();
|
||||
@@ -2913,7 +2850,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
chat.mText = name + separator_string + message.substr(message_offset);
|
||||
|
||||
// Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
|
||||
// IMs from objcts don't open IM sessions.
|
||||
// IMs from objects don't open IM sessions.
|
||||
LLFloaterChat::addChat(chat, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
@@ -2981,7 +2918,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
|
||||
// [RLVa:KB] - Checked: 2010-12-11 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
if (!gRlvHandler.canTeleportViaLure(from_id))
|
||||
@@ -3452,10 +3389,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
LLViewerObject* chatter;
|
||||
|
||||
msg->getString("ChatData", "FromName", from_name);
|
||||
if (from_name.empty())
|
||||
{
|
||||
from_name = "(no name)";
|
||||
}
|
||||
if (from_name.empty())
|
||||
{
|
||||
from_name = LLTrans::getString("Unnamed");
|
||||
}
|
||||
|
||||
msg->getUUID("ChatData", "SourceID", from_id);
|
||||
chat.mFromID = from_id;
|
||||
@@ -3527,8 +3464,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
// </edit>
|
||||
if (chatter)
|
||||
{
|
||||
LLSD args;
|
||||
args["NAME"] = from_name;
|
||||
chat.mPosAgent = chatter->getPositionAgent();
|
||||
|
||||
// Make swirly things only for talking objects. (not script debug messages, though)
|
||||
@@ -3618,7 +3553,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
}
|
||||
}
|
||||
// NaCl End
|
||||
|
||||
|
||||
static std::map<LLUUID, bool> sChatObjectAuth;
|
||||
|
||||
if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) &&
|
||||
@@ -3785,23 +3720,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
return;
|
||||
}
|
||||
|
||||
// We have a real utterance now, so can stop showing "..." and proceed.
|
||||
if (chatter && chatter->isAvatar())
|
||||
{
|
||||
LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
|
||||
((LLVOAvatar*)chatter)->stopTyping();
|
||||
|
||||
if (!is_muted && !is_busy)
|
||||
{
|
||||
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
visible_in_chat_bubble = use_chat_bubbles;
|
||||
((LLVOAvatar*)chatter)->addChat(chat);
|
||||
}
|
||||
}
|
||||
|
||||
// Look for IRC-style emotes
|
||||
if (ircstyle)
|
||||
{
|
||||
// set CHAT_STYLE_IRC to avoid adding Avatar Name as author of message. See EXT-656
|
||||
chat.mChatStyle = CHAT_STYLE_IRC;
|
||||
|
||||
// Do nothing, ircstyle is fixed above for chat bubbles
|
||||
}
|
||||
else
|
||||
@@ -3853,7 +3777,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
}
|
||||
}
|
||||
|
||||
RlvForceWear::instance().done();
|
||||
if (RlvForceWear::instanceExists())
|
||||
RlvForceWear::instance().done();
|
||||
|
||||
if ( (!RlvSettings::getDebug()) || ((strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty())) )
|
||||
return;
|
||||
@@ -3926,7 +3851,21 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
|
||||
chat.mText = from_name + verb + mesg;
|
||||
}
|
||||
|
||||
|
||||
// We have a real utterance now, so can stop showing "..." and proceed.
|
||||
if (chatter && chatter->isAvatar())
|
||||
{
|
||||
LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE);
|
||||
((LLVOAvatar*)chatter)->stopTyping();
|
||||
|
||||
if (!is_muted && !is_busy)
|
||||
{
|
||||
static const LLCachedControl<bool> use_chat_bubbles("UseChatBubbles",false);
|
||||
visible_in_chat_bubble = use_chat_bubbles;
|
||||
((LLVOAvatar*)chatter)->addChat(chat);
|
||||
}
|
||||
}
|
||||
|
||||
if (chatter)
|
||||
{
|
||||
chat.mPosAgent = chatter->getPositionAgent();
|
||||
@@ -4386,24 +4325,31 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
|
||||
}
|
||||
}
|
||||
|
||||
if ( LLTracker::isTracking(NULL) )
|
||||
if (LLTracker::isTracking())
|
||||
{
|
||||
// Check distance to beacon, if < 5m, remove beacon
|
||||
LLVector3d beacon_pos = LLTracker::getTrackedPositionGlobal();
|
||||
LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0);
|
||||
if (beacon_dir.magVecSquared() < 25.f)
|
||||
{
|
||||
LLTracker::stopTracking(NULL);
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() )
|
||||
else if (is_teleport)
|
||||
{
|
||||
//look at the beacon
|
||||
LLVector3 global_agent_pos = agent_pos;
|
||||
global_agent_pos[0] += x;
|
||||
global_agent_pos[1] += y;
|
||||
look_at = (LLVector3)beacon_pos - global_agent_pos;
|
||||
look_at.normVec();
|
||||
gAgentCamera.slamLookAt(look_at);
|
||||
if (!gAgent.getTeleportKeepsLookAt())
|
||||
{
|
||||
//look at the beacon
|
||||
LLVector3 global_agent_pos = agent_pos;
|
||||
global_agent_pos[0] += x;
|
||||
global_agent_pos[1] += y;
|
||||
look_at = (LLVector3)beacon_pos - global_agent_pos;
|
||||
look_at.normVec();
|
||||
gAgentCamera.slamLookAt(look_at);
|
||||
}
|
||||
if (gSavedSettings.getBOOL("ClearBeaconAfterTeleport"))
|
||||
{
|
||||
LLTracker::stopTracking(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7717,7 +7663,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
|
||||
msg->getVector3("Data", "LookAt", look_at);
|
||||
|
||||
gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
|
||||
LLFloaterWorldMap::show(NULL, TRUE);
|
||||
LLFloaterWorldMap::show(true);
|
||||
|
||||
// remove above two lines and replace with below line
|
||||
// to re-enable parcel browser for llMapDestination()
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
// common includes
|
||||
#include "llstat.h"
|
||||
#include "llstring.h"
|
||||
#include "sguuidhash.h"
|
||||
|
||||
// project includes
|
||||
#include "llviewerobject.h"
|
||||
@@ -216,8 +217,8 @@ public:
|
||||
|
||||
std::set<LLUUID> mDeadObjects;
|
||||
|
||||
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
||||
std::map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
||||
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
|
||||
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
|
||||
|
||||
//set of objects that need to update their cost
|
||||
std::set<LLUUID> mStaleObjectCost;
|
||||
@@ -269,7 +270,7 @@ extern LLViewerObjectList gObjectList;
|
||||
// Inlines
|
||||
inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
|
||||
{
|
||||
std::map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
|
||||
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
|
||||
if(iter != mUUIDObjectMap.end())
|
||||
{
|
||||
return iter->second;
|
||||
@@ -282,7 +283,7 @@ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
|
||||
|
||||
inline LLVOAvatar *LLViewerObjectList::findAvatar(const LLUUID &id) const
|
||||
{
|
||||
std::map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
|
||||
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
|
||||
return (iter != mUUIDAvatarMap.end()) ? iter->second.get() : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
#include "llsys.h"
|
||||
#include "llthread.h"
|
||||
#include "lltimer.h"
|
||||
#include "lluuidhashmap.h"
|
||||
//#include "processor.h"
|
||||
#include "stdenums.h"
|
||||
#include "stdtypes.h"
|
||||
|
||||
@@ -3670,6 +3670,15 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
|
||||
return LLPickInfo();
|
||||
}
|
||||
|
||||
// push back pick info object
|
||||
BOOL in_build_mode = gFloaterTools && gFloaterTools->getVisible();
|
||||
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
|
||||
{
|
||||
// build mode allows interaction with all transparent objects
|
||||
// "Show Debug Alpha" means no object actually transparent
|
||||
pick_transparent = TRUE;
|
||||
}
|
||||
|
||||
// shortcut queueing in mPicks and just update mLastPick in place
|
||||
MASK key_mask = gKeyboard->currentMask(TRUE);
|
||||
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, TRUE, NULL);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user