Merge remote-tracking branch 'Liru/master'
This commit is contained in:
@@ -246,44 +246,39 @@ endif (LINUX)
|
||||
|
||||
|
||||
if (DARWIN)
|
||||
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
add_definitions(-DLL_DARWIN=1)
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
|
||||
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.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
|
||||
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_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")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse3")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -msse3")
|
||||
endif()
|
||||
set(DARWIN_extra_cstar_flags "-g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -ftemplate-depth=256")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
|
||||
# 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_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS SSE3)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL -O3)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_C_FLAGS_RELEASE}")
|
||||
if (XCODE_VERSION GREATER 4.2)
|
||||
set(ENABLE_SIGNING TRUE)
|
||||
set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
|
||||
endif (XCODE_VERSION GREATER 4.2)
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(GCC_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_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}")
|
||||
set(UNIX_WARNINGS "${UNIX_WARNINGS} -Wno-deprecated")
|
||||
set(UNIX_CXX_WARNINGS "${UNIX_CXX_WARNINGS} -Wno-deprecated -Wno-reorder -Wno-tautological-compare")
|
||||
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 ()
|
||||
|
||||
if (NOT DISABLE_FATAL_WARNINGS)
|
||||
|
||||
@@ -97,24 +97,54 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(DARWIN 1)
|
||||
|
||||
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
#SDK Compiler and Deployment targets for XCode
|
||||
if (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
|
||||
else (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
endif (${XCODE_VERSION} VERSION_LESS 4.0.0)
|
||||
else(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
endif(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
execute_process(
|
||||
COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
|
||||
OUTPUT_VARIABLE XCODE_VERSION )
|
||||
string(REGEX REPLACE "(\r?\n)+$" "" XCODE_VERSION "${XCODE_VERSION}")
|
||||
|
||||
# # To support a different SDK update these Xcode settings:
|
||||
# if (XCODE_VERSION GREATER 4.9) # (Which would be 5.0+)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.9)
|
||||
# else (XCODE_VERION GREATER 4.9)
|
||||
# if (XCODE_VERSION GREATER 4.5)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.8)
|
||||
# else (XCODE_VERSION GREATER 4.5)
|
||||
# if (XCODE_VERSION GREATER 4.2)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
||||
# else (XCODE_VERSION GREATER 4.2)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
||||
# endif (XCODE_VERSION GREATER 4.2)
|
||||
# endif (XCODE_VERSION GREATER 4.5)
|
||||
# endif (XCODE_VERSION GREATER 4.9)
|
||||
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
||||
# Hardcode SDK we build against until we can test and allow newer ones
|
||||
# as autodetected in the code above
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
set(CMAKE_OSX_SYSROOT macosx10.6)
|
||||
|
||||
# Support for Unix Makefiles generator
|
||||
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
execute_process(COMMAND xcodebuild -version -sdk "${CMAKE_OSX_SYSROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
|
||||
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
|
||||
endif (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
|
||||
# LLVM-GCC has been removed in Xcode5
|
||||
if (XCODE_VERSION GREATER 4.9)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
|
||||
else (XCODE_VERSION GREATER 4.9)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
||||
endif (XCODE_VERSION GREATER 4.9)
|
||||
|
||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
|
||||
|
||||
message(STATUS "Xcode version: ${XCODE_VERSION}")
|
||||
message(STATUS "OSX sysroot: ${CMAKE_OSX_SYSROOT}")
|
||||
message(STATUS "OSX deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
|
||||
# Build only for i386 by default, system default on MacOSX 10.6 is x86_64
|
||||
set(CMAKE_OSX_ARCHITECTURES i386)
|
||||
set(ARCH i386)
|
||||
|
||||
@@ -60,7 +60,6 @@ set(llcommon_SOURCE_FILES
|
||||
llformat.cpp
|
||||
llframetimer.cpp
|
||||
llheartbeat.cpp
|
||||
llindraconfigfile.cpp
|
||||
llinitparam.cpp
|
||||
llinstancetracker.cpp
|
||||
llliveappconfig.cpp
|
||||
@@ -186,7 +185,6 @@ set(llcommon_HEADER_FILES
|
||||
llheartbeat.h
|
||||
llhttpstatuscodes.h
|
||||
llindexedqueue.h
|
||||
llindraconfigfile.h
|
||||
llinitparam.h
|
||||
llinstancetracker.h
|
||||
llkeythrottle.h
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
/**
|
||||
* @file llindraconfigfile.cpp
|
||||
*
|
||||
*
|
||||
* This class is an LLLiveFile that has config info for indra
|
||||
* Currently only whether it's blacklisted
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-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$
|
||||
*/
|
||||
|
||||
#include "llindraconfigfile.h"
|
||||
|
||||
#include "llfile.h"
|
||||
#include "llsd.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llframetimer.h"
|
||||
|
||||
static std::string sConfigDir = "";
|
||||
static const char indraConfigFileName[] = "indra.xml";
|
||||
|
||||
|
||||
LLIndraConfigFile::LLIndraConfigFile()
|
||||
: LLLiveFile(filename()),
|
||||
mConfig(LLSD())
|
||||
{
|
||||
}
|
||||
|
||||
//static
|
||||
void LLIndraConfigFile::initClass(const std::string& config_dir)
|
||||
{
|
||||
sConfigDir = config_dir;
|
||||
llinfos << "LLIndraConfigFile::initClass config dir "
|
||||
<< config_dir << "/" << indraConfigFileName << llendl;
|
||||
}
|
||||
|
||||
LLSD LLIndraConfigFile::getConfig(const std::string& config_name)
|
||||
{
|
||||
if (sConfigDir.empty())
|
||||
{
|
||||
llerrs << "LLIndraConfigFile::initClass() not called" << llendl;
|
||||
}
|
||||
|
||||
LLFrameTimer::updateFrameTime();
|
||||
|
||||
static LLIndraConfigFile the_file;
|
||||
the_file.checkAndReload();
|
||||
|
||||
return the_file.mConfig[config_name];
|
||||
}
|
||||
|
||||
std::string LLIndraConfigFile::filename()
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
|
||||
ostr << sConfigDir
|
||||
<< "/" << indraConfigFileName;
|
||||
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
bool LLIndraConfigFile::loadFile()
|
||||
{
|
||||
llinfos << "LLIndraConfigFile::loadFile: reading from "
|
||||
<< filename() << llendl;
|
||||
|
||||
LLSD config;
|
||||
|
||||
{
|
||||
llifstream file(filename());
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(config, file);
|
||||
}
|
||||
|
||||
if (config.isUndefined())
|
||||
{
|
||||
llinfos << "LLIndraConfigFile::loadFile: file missing, ill-formed,"
|
||||
" or simply undefined; not changing the blacklist" << llendl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.isMap())
|
||||
{
|
||||
mConfig = config;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLIndraConfigFile: " << indraConfigFileName << " expects a map; wrong format" << llendl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* @file llindraconfigfile.h
|
||||
* @brief manages configuration file for indra.xml
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2007-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_LLINDRACONFIGFILE_H
|
||||
#define LL_LLINDRACONFIGFILE_H
|
||||
|
||||
#include "linden_common.h"
|
||||
#include <string>
|
||||
|
||||
#include "lllivefile.h"
|
||||
#include "llsd.h"
|
||||
|
||||
|
||||
// To use, call LLIndraConfigFile::initClass(config_dir);
|
||||
// Then whenever getConfig is called, it will check and reload automatically
|
||||
|
||||
class LLIndraConfigFile : public LLLiveFile
|
||||
{
|
||||
public:
|
||||
LLIndraConfigFile();
|
||||
static void initClass(const std::string& config_dir);
|
||||
static LLSD getConfig(const std::string& config_name);
|
||||
|
||||
private:
|
||||
static std::string filename();
|
||||
|
||||
protected:
|
||||
/* virtual */ bool loadFile();
|
||||
LLSD mConfig;
|
||||
};
|
||||
|
||||
#endif //LL_LLINDRACONFIGFILE_H
|
||||
@@ -965,7 +965,6 @@ P(newAgentInventoryVariablePriceResponder);
|
||||
P(objectCostResponder);
|
||||
P(objectLinksetsResponder);
|
||||
P(physicsFlagsResponder);
|
||||
P(placeAvatarTeleportResponder);
|
||||
P(productInfoRequestResponder);
|
||||
P(regionResponder);
|
||||
P(remoteParcelRequestResponder);
|
||||
|
||||
@@ -168,6 +168,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
||||
|
||||
if ( !get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source) || !pos_source )
|
||||
{
|
||||
llwarns << "Could not find dom sources for basic geo data; invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
@@ -188,27 +189,78 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
||||
|
||||
LLVolumeFace::VertexMapData::PointMap point_map;
|
||||
|
||||
for (U32 i = 0; i < idx.getCount(); i += idx_stride)
|
||||
U32 index_count = idx.getCount();
|
||||
U32 vertex_count = pos_source ? v.getCount() : 0;
|
||||
U32 tc_count = tc_source ? tc.getCount() : 0;
|
||||
U32 norm_count = norm_source ? n.getCount() : 0;
|
||||
|
||||
for (U32 i = 0; i < index_count; i += idx_stride)
|
||||
{
|
||||
LLVolumeFace::VertexData cv;
|
||||
if (pos_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or verts
|
||||
//
|
||||
if (((i + pos_offset) > index_count)
|
||||
|| ((idx[i+pos_offset]*3+2) > vertex_count))
|
||||
{
|
||||
llwarns << "Out of range index data; invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0],
|
||||
v[idx[i+pos_offset]*3+1],
|
||||
v[idx[i+pos_offset]*3+2]));
|
||||
|
||||
if (!cv.getPosition().isFinite3())
|
||||
{
|
||||
llwarns << "Nan positional data, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
if (tc_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or tcs
|
||||
//
|
||||
|
||||
if (((i + tc_offset) > index_count)
|
||||
|| ((idx[i+tc_offset]*2+1) > tc_count))
|
||||
{
|
||||
llwarns << "Out of range TC indices." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
|
||||
tc[idx[i+tc_offset]*2+1]);
|
||||
|
||||
if (!cv.mTexCoord.isFinite())
|
||||
{
|
||||
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
if (norm_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or norms
|
||||
//
|
||||
if (((i + norm_offset) > index_count)
|
||||
|| ((idx[i+norm_offset]*3+2) > norm_count))
|
||||
{
|
||||
llwarns << "Found out of range norm indices, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
|
||||
n[idx[i+norm_offset]*3+1],
|
||||
n[idx[i+norm_offset]*3+2]));
|
||||
|
||||
if (!cv.getNormal().isFinite3())
|
||||
{
|
||||
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL found = FALSE;
|
||||
@@ -263,7 +315,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
||||
LLVolumeFace& new_face = *face_list.rbegin();
|
||||
if (!norm_source)
|
||||
{
|
||||
//l_aligned_free_16(new_face.mNormals);
|
||||
//ll_aligned_free_16(new_face.mNormals);
|
||||
new_face.mNormals = NULL;
|
||||
}
|
||||
|
||||
@@ -335,6 +387,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
|
||||
|
||||
if (!get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source))
|
||||
{
|
||||
llwarns << "Could not get DOM sources for basic geo data, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
@@ -366,6 +419,11 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
|
||||
|
||||
LLVolumeFace::VertexMapData::PointMap point_map;
|
||||
|
||||
U32 index_count = idx.getCount();
|
||||
U32 vertex_count = pos_source ? v.getCount() : 0;
|
||||
U32 tc_count = tc_source ? tc.getCount() : 0;
|
||||
U32 norm_count = norm_source ? n.getCount() : 0;
|
||||
|
||||
U32 cur_idx = 0;
|
||||
for (U32 i = 0; i < vcount.getCount(); ++i)
|
||||
{ //for each polygon
|
||||
@@ -378,22 +436,68 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
|
||||
|
||||
if (pos_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or verts
|
||||
//
|
||||
if (((cur_idx + pos_offset) > index_count)
|
||||
|| ((idx[cur_idx+pos_offset]*3+2) > vertex_count))
|
||||
{
|
||||
llwarns << "Out of range position indices, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0],
|
||||
v[idx[cur_idx+pos_offset]*3+1],
|
||||
v[idx[cur_idx+pos_offset]*3+2]);
|
||||
|
||||
if (!cv.getPosition().isFinite3())
|
||||
{
|
||||
llwarns << "Found NaN while loading positions from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tc_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or tcs
|
||||
//
|
||||
if (((cur_idx + tc_offset) > index_count)
|
||||
|| ((idx[cur_idx+tc_offset]*2+1) > tc_count))
|
||||
{
|
||||
llwarns << "Out of range TC indices, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.mTexCoord.setVec(tc[idx[cur_idx+tc_offset]*2+0],
|
||||
tc[idx[cur_idx+tc_offset]*2+1]);
|
||||
|
||||
if (!cv.mTexCoord.isFinite())
|
||||
{
|
||||
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
if (norm_source)
|
||||
{
|
||||
// guard against model data specifiying out of range indices or norms
|
||||
//
|
||||
if (((cur_idx + norm_offset) > index_count)
|
||||
|| ((idx[cur_idx+norm_offset]*3+2) > norm_count))
|
||||
{
|
||||
llwarns << "Out of range norm indices, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
|
||||
cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
|
||||
n[idx[cur_idx+norm_offset]*3+1],
|
||||
n[idx[cur_idx+norm_offset]*3+2]);
|
||||
|
||||
if (!cv.getNormal().isFinite3())
|
||||
{
|
||||
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
cur_idx += idx_stride;
|
||||
@@ -560,6 +664,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
domVertices* vertices = (domVertices*) elem.cast();
|
||||
if (!vertices)
|
||||
{
|
||||
llwarns << "Could not find vertex source, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
domInputLocal_Array& v_inp = vertices->getInput_array();
|
||||
@@ -573,6 +678,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
domSource* src = (domSource*) elem.cast();
|
||||
if (!src)
|
||||
{
|
||||
llwarns << "Could not find DOM source, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
v = &(src->getFloat_array()->getValue());
|
||||
@@ -588,6 +694,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
domSource* src = (domSource*) elem.cast();
|
||||
if (!src)
|
||||
{
|
||||
llwarns << "Could not find DOM source, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
n = &(src->getFloat_array()->getValue());
|
||||
@@ -600,6 +707,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
domSource* src = (domSource*) elem.cast();
|
||||
if (!src)
|
||||
{
|
||||
llwarns << "Could not find DOM source, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
t = &(src->getFloat_array()->getValue());
|
||||
@@ -634,6 +742,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
vert.getPosition().set(v->get(v_idx),
|
||||
v->get(v_idx+1),
|
||||
v->get(v_idx+2));
|
||||
|
||||
if (!vert.getPosition().isFinite3())
|
||||
{
|
||||
llwarns << "Found NaN while loading position data from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
|
||||
//bounds check n and t lookups because some FBX to DAE converters
|
||||
@@ -646,6 +760,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
vert.getNormal().set(n->get(n_idx),
|
||||
n->get(n_idx+1),
|
||||
n->get(n_idx+2));
|
||||
|
||||
if (!vert.getNormal().isFinite3())
|
||||
{
|
||||
llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -659,6 +779,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
|
||||
vert.mTexCoord.setVec(t->get(t_idx),
|
||||
t->get(t_idx+1));
|
||||
|
||||
if (!vert.mTexCoord.isFinite())
|
||||
{
|
||||
llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
|
||||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1591,6 +1717,7 @@ LLSD LLModel::writeModel(
|
||||
mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
|
||||
mdl[model_names[idx]][i]["TexCoord0"] = tc;
|
||||
}
|
||||
|
||||
mdl[model_names[idx]][i]["TriangleList"] = indices;
|
||||
|
||||
if (skinning)
|
||||
|
||||
@@ -921,6 +921,23 @@ void LLLineEditor::addChar(const llwchar uni_char)
|
||||
|
||||
mText.insert(getCursor(), w_buf);
|
||||
setCursor(getCursor() + 1);
|
||||
|
||||
if (!mReadOnly && mAutoreplaceCallback != NULL)
|
||||
{
|
||||
// autoreplace the text, if necessary
|
||||
S32 replacement_start;
|
||||
S32 replacement_length;
|
||||
LLWString replacement_string;
|
||||
S32 new_cursor_pos = getCursor();
|
||||
mAutoreplaceCallback(replacement_start, replacement_length, replacement_string, new_cursor_pos, mText);
|
||||
|
||||
if (replacement_length > 0 || !replacement_string.empty())
|
||||
{
|
||||
mText.erase(replacement_start, replacement_length);
|
||||
mText.insert(replacement_start, replacement_string);
|
||||
setCursor(new_cursor_pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -167,6 +167,10 @@ public:
|
||||
virtual BOOL isSpellDirty() const { return mText.getString() != mPrevSpelledText; } // Returns TRUE if user changed value at all
|
||||
virtual void resetSpellDirty() { mPrevSpelledText = mText.getString(); } // Clear dirty state
|
||||
|
||||
typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t;
|
||||
autoreplace_callback_t mAutoreplaceCallback;
|
||||
void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; }
|
||||
|
||||
// assumes UTF8 text
|
||||
virtual void setValue(const LLSD& value ) { setText(value.asString()); }
|
||||
virtual LLSD getValue() const { return LLSD(getText()); }
|
||||
|
||||
@@ -156,8 +156,6 @@ LLDir_Win32::LLDir_Win32()
|
||||
mAppRODataDir = mWorkingDir;
|
||||
|
||||
|
||||
// if (mExecutableDir.find("indra") == std::string::npos)
|
||||
|
||||
// *NOTE:Mani - It is a mistake to put viewer specific code in
|
||||
// the LLDir implementation. The references to 'skins' and
|
||||
// 'llplugin' need to go somewhere else.
|
||||
@@ -172,7 +170,18 @@ LLDir_Win32::LLDir_Win32()
|
||||
|
||||
llinfos << "mAppRODataDir = " << mAppRODataDir << llendl;
|
||||
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
std::string::size_type build_dir_pos = mExecutableDir.rfind("indra" + mDirDelimiter);
|
||||
if (build_dir_pos != std::string::npos)
|
||||
{
|
||||
// ...we're in a dev checkout
|
||||
mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "indra" + mDirDelimiter + "newview" + mDirDelimiter + "skins";
|
||||
llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...normal installation running
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
}
|
||||
|
||||
// Build the default cache directory
|
||||
mDefaultCacheDir = buildSLOSCacheDir();
|
||||
|
||||
@@ -126,6 +126,7 @@ set(viewer_SOURCE_FILES
|
||||
llassetuploadresponders.cpp
|
||||
llattachmentsmgr.cpp
|
||||
llaudiosourcevo.cpp
|
||||
llautoreplace.cpp
|
||||
llavataractions.cpp
|
||||
llavatarpropertiesprocessor.cpp
|
||||
llbox.cpp
|
||||
@@ -181,6 +182,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterabout.cpp
|
||||
llfloateractivespeakers.cpp
|
||||
llfloaterauction.cpp
|
||||
llfloaterautoreplacesettings.cpp
|
||||
llfloateravatarinfo.cpp
|
||||
llfloateravatarlist.cpp
|
||||
llfloateravatarpicker.cpp
|
||||
@@ -244,7 +246,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterpathfindingcharacters.cpp
|
||||
llfloaterpathfindinglinksets.cpp
|
||||
llfloaterpathfindingobjects.cpp
|
||||
llfloaterpermissionsmgr.cpp
|
||||
llfloaterperms.cpp
|
||||
llfloaterpostcard.cpp
|
||||
llfloaterpostprocess.cpp
|
||||
@@ -646,6 +647,7 @@ set(viewer_HEADER_FILES
|
||||
llassetuploadresponders.h
|
||||
llattachmentsmgr.h
|
||||
llaudiosourcevo.h
|
||||
llautoreplace.h
|
||||
llavataractions.h
|
||||
llavatarpropertiesprocessor.h
|
||||
llbox.h
|
||||
@@ -701,6 +703,7 @@ set(viewer_HEADER_FILES
|
||||
llfloaterabout.h
|
||||
llfloateractivespeakers.h
|
||||
llfloaterauction.h
|
||||
llfloaterautoreplacesettings.h
|
||||
llfloateravatarinfo.h
|
||||
llfloateravatarlist.h
|
||||
llfloateravatarpicker.h
|
||||
@@ -764,7 +767,6 @@ set(viewer_HEADER_FILES
|
||||
llfloaterpathfindingcharacters.h
|
||||
llfloaterpathfindinglinksets.h
|
||||
llfloaterpathfindingobjects.h
|
||||
llfloaterpermissionsmgr.h
|
||||
llfloaterperms.h
|
||||
llfloaterpostcard.h
|
||||
llfloaterpostprocess.h
|
||||
|
||||
8330
indra/newview/app_settings/autoreplace.xml
Normal file
8330
indra/newview/app_settings/autoreplace.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -834,6 +834,17 @@
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>LiruMouselookHidesToolbar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not the toolbar will be hidden in mouselook</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>LiruMouselookMenu</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -2693,6 +2704,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoReplace</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Replaces keywords with a configured word or phrase</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoAcceptAllNewInventory</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -7277,6 +7299,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>24</integer>
|
||||
</map>
|
||||
<key>RadarColumnVoiceWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's voice status column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>24</integer>
|
||||
</map>
|
||||
<key>RadarColumnAgeWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -7354,6 +7387,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnVoiceHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's voice status column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RadarColumnAgeHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -11123,22 +11167,6 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PermissionsManagerRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for permissions manager window</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>85</integer>
|
||||
<integer>300</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>PickerContextOpacity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -908,6 +908,17 @@
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ToolbarVisibleAutoReplace</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not the button for autoreplace is on the toolbar</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ToolbarVisibleBeacons</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -1672,7 +1683,7 @@
|
||||
<key>ToolbarVisibleToolbarPrefs</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not the button for the floater to change buttons on the toolbar is on the toolbar (Nonfunctional, yet. Poke Liru.)</string>
|
||||
<string>Whether or not the button for the floater to change buttons on the toolbar is on the toolbar</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llcolorswatch.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterautoreplacesettings.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
@@ -92,6 +93,7 @@ LLPrefsAscentChat::LLPrefsAscentChat()
|
||||
getChild<LLUICtrl>("antispam_checkbox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));
|
||||
getChild<LLUICtrl>("Group Invites")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));
|
||||
|
||||
getChild<LLUICtrl>("autoreplace")->setCommitCallback(boost::bind(LLFloaterAutoReplaceSettings::showInstance, LLSD()));
|
||||
getChild<LLUICtrl>("KeywordsOn")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
|
||||
getChild<LLUICtrl>("KeywordsList")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
|
||||
getChild<LLUICtrl>("KeywordsSound")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#ifndef MS_CHATBARCMDLINE_H
|
||||
#define MS_CHATBARCMDLINE_H
|
||||
|
||||
#include "llchatbar.h"
|
||||
|
||||
bool cmd_line_chat(std::string revised_text, EChatType type);
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,9 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef SG_GENERICHANDLERS_H
|
||||
#define SG_GENERICHANDLERS_H
|
||||
|
||||
class GenericHandlers
|
||||
{
|
||||
public:
|
||||
@@ -29,3 +32,5 @@ public:
|
||||
};
|
||||
|
||||
extern GenericHandlers *gGenericHandlers;
|
||||
|
||||
#endif // SG_GENERIC_HANDLERS
|
||||
@@ -31,6 +31,9 @@
|
||||
* Modified, debugged, optimized and improved by Henri Beauchamp Feb 2010.
|
||||
*/
|
||||
|
||||
#ifndef JC_FLOATERAREASEARCH_H
|
||||
#define JC_FLOATERAREASEARCH_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lluuid.h"
|
||||
#include "llstring.h"
|
||||
@@ -90,3 +93,5 @@ private:
|
||||
|
||||
std::string mFilterStrings[LIST_OBJECT_COUNT];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -28,6 +28,8 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef LGG_DICDOWNLOAD_H
|
||||
#define LGG_DICDOWNLOAD_H
|
||||
|
||||
class LggDicDownload
|
||||
{
|
||||
@@ -35,3 +37,4 @@ class LggDicDownload
|
||||
static void show( BOOL showw , std::vector<std::string> shortNames, std::vector<std::string> longNames, void * data);
|
||||
};
|
||||
|
||||
#endif
|
||||
802
indra/newview/llautoreplace.cpp
Normal file
802
indra/newview/llautoreplace.cpp
Normal file
@@ -0,0 +1,802 @@
|
||||
/**
|
||||
* @file llautoreplace.cpp
|
||||
* @brief Auto Replace Manager
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* 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
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llboost.h"
|
||||
#include "llcontrol.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
const char* LLAutoReplace::SETTINGS_FILE_NAME = "autoreplace.xml";
|
||||
|
||||
void LLAutoReplace::autoreplaceCallback(S32& replacement_start, S32& replacement_length, LLWString& replacement_string, S32& cursor_pos, const LLWString& input_text)
|
||||
{
|
||||
// make sure these returned values are cleared in case there is no replacement
|
||||
replacement_start = 0;
|
||||
replacement_length = 0;
|
||||
replacement_string.clear();
|
||||
|
||||
static LLCachedControl<bool> perform_autoreplace(gSavedSettings, "AutoReplace", 0);
|
||||
if (perform_autoreplace)
|
||||
{
|
||||
S32 word_end = cursor_pos - 1;
|
||||
|
||||
bool at_space = (input_text[word_end] == ' ');
|
||||
bool have_word = (LLWStringUtil::isPartOfWord(input_text[word_end]));
|
||||
|
||||
if (at_space || have_word)
|
||||
{
|
||||
if (at_space && word_end > 0)
|
||||
{
|
||||
// find out if this space immediately follows a word
|
||||
word_end--;
|
||||
have_word = (LLWStringUtil::isPartOfWord(input_text[word_end]));
|
||||
}
|
||||
if (have_word)
|
||||
{
|
||||
// word_end points to the end of a word, now find the start of the word
|
||||
std::string word;
|
||||
S32 word_start = word_end;
|
||||
for (S32 back_one = word_start - 1;
|
||||
back_one >= 0 && LLWStringUtil::isPartOfWord(input_text[back_one]);
|
||||
back_one--
|
||||
)
|
||||
{
|
||||
word_start--; // walk word_start back to the beginning of the word
|
||||
}
|
||||
LL_DEBUGS("AutoReplace") << "word_start: " << word_start << " word_end: " << word_end << LL_ENDL;
|
||||
std::string str_text = std::string(input_text.begin(), input_text.end());
|
||||
std::string last_word = str_text.substr(word_start, word_end - word_start + 1);
|
||||
std::string replacement_word(mSettings.replaceWord(last_word));
|
||||
|
||||
if (replacement_word != last_word)
|
||||
{
|
||||
// The last word is one for which we have a replacement
|
||||
if (at_space)
|
||||
{
|
||||
// return the replacement string
|
||||
replacement_start = word_start;
|
||||
replacement_length = last_word.length();
|
||||
replacement_string = utf8str_to_wstring(replacement_word);
|
||||
LLWString old_string = utf8str_to_wstring(last_word);
|
||||
S32 size_change = replacement_string.size() - old_string.size();
|
||||
cursor_pos += size_change;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string LLAutoReplace::getUserSettingsFileName()
|
||||
{
|
||||
std::string path=gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
|
||||
|
||||
if (!path.empty())
|
||||
{
|
||||
path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, SETTINGS_FILE_NAME);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
std::string LLAutoReplace::getAppSettingsFileName()
|
||||
{
|
||||
std::string path=gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "");
|
||||
|
||||
if (!path.empty())
|
||||
{
|
||||
path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, SETTINGS_FILE_NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("AutoReplace") << "Failed to get app settings directory name" << LL_ENDL;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
LLAutoReplaceSettings LLAutoReplace::getSettings()
|
||||
{
|
||||
return mSettings;
|
||||
}
|
||||
|
||||
void LLAutoReplace::setSettings(const LLAutoReplaceSettings& newSettings)
|
||||
{
|
||||
mSettings.set(newSettings);
|
||||
/// Make the newSettings active and write them to user storage
|
||||
saveToUserSettings();
|
||||
}
|
||||
|
||||
LLAutoReplace::LLAutoReplace()
|
||||
{
|
||||
}
|
||||
|
||||
void LLAutoReplace::initSingleton()
|
||||
{
|
||||
loadFromSettings();
|
||||
}
|
||||
|
||||
void LLAutoReplace::loadFromSettings()
|
||||
{
|
||||
std::string filename=getUserSettingsFileName();
|
||||
if (filename.empty())
|
||||
{
|
||||
LL_INFOS("AutoReplace") << "no valid user settings directory." << LL_ENDL;
|
||||
}
|
||||
if(gDirUtilp->fileExists(filename))
|
||||
{
|
||||
LLSD userSettings;
|
||||
llifstream file;
|
||||
file.open(filename.c_str());
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(userSettings, file);
|
||||
}
|
||||
file.close();
|
||||
if ( mSettings.setFromLLSD(userSettings) )
|
||||
{
|
||||
LL_INFOS("AutoReplace") << "settings loaded from '" << filename << "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "invalid settings found in '" << filename << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else // no user settings found, try application settings
|
||||
{
|
||||
std::string defaultName = getAppSettingsFileName();
|
||||
LL_INFOS("AutoReplace") << " user settings file '" << filename << "' not found"<< LL_ENDL;
|
||||
|
||||
bool gotSettings = false;
|
||||
if(gDirUtilp->fileExists(defaultName))
|
||||
{
|
||||
LLSD appDefault;
|
||||
llifstream file;
|
||||
file.open(defaultName.c_str());
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXMLDocument(appDefault, file);
|
||||
}
|
||||
file.close();
|
||||
|
||||
if ( mSettings.setFromLLSD(appDefault) )
|
||||
{
|
||||
LL_INFOS("AutoReplace") << "settings loaded from '" << defaultName.c_str() << "'" << LL_ENDL;
|
||||
gotSettings = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "invalid settings found in '" << defaultName.c_str() << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! gotSettings )
|
||||
{
|
||||
if (mSettings.setFromLLSD(mSettings.getExampleLLSD()))
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "no settings found; loaded example." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "no settings found and example invalid!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLAutoReplace::saveToUserSettings()
|
||||
{
|
||||
std::string filename=getUserSettingsFileName();
|
||||
llofstream file;
|
||||
file.open(filename.c_str());
|
||||
LLSDSerialize::toPrettyXML(mSettings.asLLSD(), file);
|
||||
file.close();
|
||||
LL_INFOS("AutoReplace") << "settings saved to '" << filename << "'" << LL_ENDL;
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// LLAutoReplaceSettings
|
||||
// ================================================================
|
||||
|
||||
const std::string LLAutoReplaceSettings::AUTOREPLACE_LIST_NAME = "name"; ///< key for looking up list names
|
||||
const std::string LLAutoReplaceSettings::AUTOREPLACE_LIST_REPLACEMENTS = "replacements"; ///< key for looking up replacement map
|
||||
|
||||
LLAutoReplaceSettings::LLAutoReplaceSettings()
|
||||
{
|
||||
}
|
||||
|
||||
LLAutoReplaceSettings::LLAutoReplaceSettings(const LLAutoReplaceSettings& settings)
|
||||
{
|
||||
// copy all values through fundamental type intermediates for thread safety
|
||||
mLists = LLSD::emptyArray();
|
||||
|
||||
for ( LLSD::array_const_iterator list = settings.mLists.beginArray(), listEnd = settings.mLists.endArray();
|
||||
list != listEnd;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( (*list).isMap() ) // can fail due to LLSD-30: ignore it
|
||||
{
|
||||
LLSD listMap = LLSD::emptyMap();
|
||||
std::string listName = (*list)[AUTOREPLACE_LIST_NAME];
|
||||
listMap[AUTOREPLACE_LIST_NAME] = listName;
|
||||
listMap[AUTOREPLACE_LIST_REPLACEMENTS] = LLSD::emptyMap();
|
||||
|
||||
for ( LLSD::map_const_iterator
|
||||
entry = (*list)[AUTOREPLACE_LIST_REPLACEMENTS].beginMap(),
|
||||
entriesEnd = (*list)[AUTOREPLACE_LIST_REPLACEMENTS].endMap();
|
||||
entry != entriesEnd;
|
||||
entry++
|
||||
)
|
||||
{
|
||||
std::string keyword = entry->first;
|
||||
std::string replacement = entry->second.asString();
|
||||
listMap[AUTOREPLACE_LIST_REPLACEMENTS].insert(keyword, LLSD(replacement));
|
||||
}
|
||||
|
||||
mLists.append(listMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLAutoReplaceSettings::set(const LLAutoReplaceSettings& newSettings)
|
||||
{
|
||||
mLists = newSettings.mLists;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::setFromLLSD(const LLSD& settingsFromLLSD)
|
||||
{
|
||||
bool settingsValid = true;
|
||||
|
||||
if ( settingsFromLLSD.isArray() )
|
||||
{
|
||||
for ( LLSD::array_const_iterator
|
||||
list = settingsFromLLSD.beginArray(),
|
||||
listEnd = settingsFromLLSD.endArray();
|
||||
settingsValid && list != listEnd;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( (*list).isDefined() ) // can be undef due to LLSD-30: ignore it
|
||||
{
|
||||
settingsValid = listIsValid(*list);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
settingsValid = false;
|
||||
LL_WARNS("AutoReplace") << "settings are not an array" << LL_ENDL;
|
||||
}
|
||||
|
||||
if ( settingsValid )
|
||||
{
|
||||
mLists = settingsFromLLSD;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "invalid settings discarded; using hard coded example" << LL_ENDL;
|
||||
}
|
||||
|
||||
return settingsValid;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::listNameMatches( const LLSD& list, const std::string name )
|
||||
{
|
||||
return list.isMap()
|
||||
&& list.has(AUTOREPLACE_LIST_NAME)
|
||||
&& list[AUTOREPLACE_LIST_NAME].asString() == name;
|
||||
}
|
||||
|
||||
const LLSD* LLAutoReplaceSettings::getListEntries(std::string listName)
|
||||
{
|
||||
const LLSD* returnedEntries = NULL;
|
||||
for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray();
|
||||
returnedEntries == NULL && list != endList;
|
||||
list++
|
||||
)
|
||||
{
|
||||
const LLSD& thisList = *list;
|
||||
if ( listNameMatches(thisList, listName) )
|
||||
{
|
||||
returnedEntries = &thisList[AUTOREPLACE_LIST_REPLACEMENTS];
|
||||
}
|
||||
}
|
||||
return returnedEntries;
|
||||
}
|
||||
|
||||
std::string LLAutoReplaceSettings::replacementFor(std::string keyword, std::string listName)
|
||||
{
|
||||
std::string replacement;
|
||||
bool foundList = false;
|
||||
for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray();
|
||||
! foundList && list != endList;
|
||||
list++
|
||||
)
|
||||
{
|
||||
const LLSD& thisList = *list;
|
||||
if ( listNameMatches(thisList, listName) )
|
||||
{
|
||||
foundList = true; // whether there is a replacement or not, we're done
|
||||
if ( thisList.isMap()
|
||||
&& thisList.has(AUTOREPLACE_LIST_REPLACEMENTS)
|
||||
&& thisList[AUTOREPLACE_LIST_REPLACEMENTS].has(keyword)
|
||||
)
|
||||
{
|
||||
replacement = thisList[AUTOREPLACE_LIST_REPLACEMENTS][keyword].asString();
|
||||
LL_DEBUGS("AutoReplace")<<"'"<<keyword<<"' -> '"<<replacement<<"'"<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
if (!foundList)
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"failed to find list '"<<listName<<"'"<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
if (replacement.empty())
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"failed to find '"<<keyword<<"'"<<LL_ENDL;
|
||||
}
|
||||
return replacement;
|
||||
}
|
||||
|
||||
LLSD LLAutoReplaceSettings::getListNames()
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"====="<<LL_ENDL;
|
||||
LLSD toReturn = LLSD::emptyArray();
|
||||
S32 counter=0;
|
||||
for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray();
|
||||
list != endList;
|
||||
list++
|
||||
)
|
||||
{
|
||||
const LLSD& thisList = *list;
|
||||
if ( thisList.isMap() )
|
||||
{
|
||||
if ( thisList.has(AUTOREPLACE_LIST_NAME) )
|
||||
{
|
||||
std::string name = thisList[AUTOREPLACE_LIST_NAME].asString();
|
||||
LL_DEBUGS("AutoReplace")<<counter<<" '"<<name<<"'"<<LL_ENDL;
|
||||
toReturn.append(LLSD(name));
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("AutoReplace") <<counter<<" ! MISSING "<<AUTOREPLACE_LIST_NAME<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<counter<<" ! not a map: "/*<<LLSD::typeString(thisList.type())*/<< LL_ENDL;
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
LL_DEBUGS("AutoReplace")<<"^^^^^^"<<LL_ENDL;
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::listIsValid(const LLSD& list)
|
||||
{
|
||||
bool listValid = true;
|
||||
if ( ! list.isMap() )
|
||||
{
|
||||
listValid = false;
|
||||
LL_WARNS("AutoReplace") << "list is not a map" << LL_ENDL;
|
||||
}
|
||||
else if ( ! list.has(AUTOREPLACE_LIST_NAME)
|
||||
|| ! list[AUTOREPLACE_LIST_NAME].isString()
|
||||
|| list[AUTOREPLACE_LIST_NAME].asString().empty()
|
||||
)
|
||||
{
|
||||
listValid = false;
|
||||
LL_WARNS("AutoReplace")
|
||||
<< "list found without " << AUTOREPLACE_LIST_NAME
|
||||
<< " (or it is empty)"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
else if ( ! list.has(AUTOREPLACE_LIST_REPLACEMENTS) || ! list[AUTOREPLACE_LIST_REPLACEMENTS].isMap() )
|
||||
{
|
||||
listValid = false;
|
||||
LL_WARNS("AutoReplace") << "list '" << list[AUTOREPLACE_LIST_NAME].asString() << "' without " << AUTOREPLACE_LIST_REPLACEMENTS << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( LLSD::map_const_iterator
|
||||
entry = list[AUTOREPLACE_LIST_REPLACEMENTS].beginMap(),
|
||||
entriesEnd = list[AUTOREPLACE_LIST_REPLACEMENTS].endMap();
|
||||
listValid && entry != entriesEnd;
|
||||
entry++
|
||||
)
|
||||
{
|
||||
if ( ! entry->second.isString() )
|
||||
{
|
||||
listValid = false;
|
||||
LL_WARNS("AutoReplace")
|
||||
<< "non-string replacement value found in list '"
|
||||
<< list[AUTOREPLACE_LIST_NAME].asString() << "'"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return listValid;
|
||||
}
|
||||
|
||||
const LLSD* LLAutoReplaceSettings::exportList(std::string listName)
|
||||
{
|
||||
const LLSD* exportedList = NULL;
|
||||
for ( LLSD::array_const_iterator list = mLists.beginArray(), listEnd = mLists.endArray();
|
||||
exportedList == NULL && list != listEnd;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( listNameMatches(*list, listName) )
|
||||
{
|
||||
const LLSD& namedList = (*list);
|
||||
exportedList = &namedList;
|
||||
}
|
||||
}
|
||||
return exportedList;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::listNameIsUnique(const LLSD& newList)
|
||||
{
|
||||
bool nameIsUnique = true;
|
||||
// this must always be called with a valid list, so it is safe to assume it has a name
|
||||
std::string newListName = newList[AUTOREPLACE_LIST_NAME].asString();
|
||||
for ( LLSD::array_const_iterator list = mLists.beginArray(), listEnd = mLists.endArray();
|
||||
nameIsUnique && list != listEnd;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( listNameMatches(*list, newListName) )
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"duplicate list name '"<<newListName<<"'"<<LL_ENDL;
|
||||
nameIsUnique = false;
|
||||
}
|
||||
}
|
||||
return nameIsUnique;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void LLAutoReplaceSettings::createEmptyList(LLSD& emptyList)
|
||||
{
|
||||
emptyList = LLSD::emptyMap();
|
||||
emptyList[AUTOREPLACE_LIST_NAME] = "Empty";
|
||||
emptyList[AUTOREPLACE_LIST_REPLACEMENTS] = LLSD::emptyMap();
|
||||
}
|
||||
|
||||
/* static */
|
||||
void LLAutoReplaceSettings::setListName(LLSD& list, const std::string& newName)
|
||||
{
|
||||
list[AUTOREPLACE_LIST_NAME] = newName;
|
||||
}
|
||||
|
||||
/* static */
|
||||
std::string LLAutoReplaceSettings::getListName(LLSD& list)
|
||||
{
|
||||
std::string name;
|
||||
if ( list.isMap() && list.has(AUTOREPLACE_LIST_NAME) && list[AUTOREPLACE_LIST_NAME].isString() )
|
||||
{
|
||||
name = list[AUTOREPLACE_LIST_NAME].asString();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::addList(const LLSD& newList)
|
||||
{
|
||||
AddListResult result;
|
||||
if ( listIsValid( newList ) )
|
||||
{
|
||||
if ( listNameIsUnique( newList ) )
|
||||
{
|
||||
mLists.append(newList);
|
||||
result = AddListOk;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempt to add duplicate name" << LL_ENDL;
|
||||
result = AddListDuplicateName;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempt to add invalid list" << LL_ENDL;
|
||||
result = AddListInvalidList;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LLSD& newList)
|
||||
{
|
||||
AddListResult result = AddListInvalidList;
|
||||
if ( listIsValid( newList ) )
|
||||
{
|
||||
std::string listName = newList[AUTOREPLACE_LIST_NAME].asString();
|
||||
bool listFound = false;
|
||||
S32 search_index;
|
||||
LLSD targetList;
|
||||
// The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30
|
||||
for ( search_index = 0, targetList = mLists[0];
|
||||
!listFound && search_index < mLists.size();
|
||||
search_index += 1, targetList = mLists[search_index]
|
||||
)
|
||||
{
|
||||
if ( targetList.isMap() )
|
||||
{
|
||||
if ( listNameMatches( targetList, listName) )
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"list to replace found at "<<search_index<<LL_ENDL;
|
||||
mLists.erase(search_index);
|
||||
mLists.insert(search_index, newList);
|
||||
listFound = true;
|
||||
result = AddListOk;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! listFound )
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempt to replace unconfigured list" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempt to add invalid list" << LL_ENDL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::removeReplacementList(std::string listName)
|
||||
{
|
||||
bool found = false;
|
||||
for( S32 index = 0; !found && mLists[index].isDefined(); index++ )
|
||||
{
|
||||
if( listNameMatches(mLists.get(index), listName) )
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"list '"<<listName<<"'"<<LL_ENDL;
|
||||
mLists.erase(index);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
/// Move the named list up in the priority order
|
||||
bool LLAutoReplaceSettings::increaseListPriority(std::string listName)
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<listName<<LL_ENDL;
|
||||
bool found = false;
|
||||
S32 search_index, previous_index;
|
||||
LLSD targetList;
|
||||
// The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30
|
||||
previous_index = -1;
|
||||
for ( search_index = 0, targetList = mLists[0];
|
||||
!found && search_index < mLists.size();
|
||||
search_index += 1, targetList = mLists[search_index]
|
||||
)
|
||||
{
|
||||
if ( targetList.isMap() )
|
||||
{
|
||||
if ( listNameMatches( targetList, listName) )
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"found at "<<search_index<<", previous is "<<previous_index<<LL_ENDL;
|
||||
found = true;
|
||||
if (previous_index >= 0)
|
||||
{
|
||||
LL_DEBUGS("AutoReplace") << "erase "<<search_index<<LL_ENDL;
|
||||
mLists.erase(search_index);
|
||||
LL_DEBUGS("AutoReplace") << "insert at "<<previous_index<<LL_ENDL;
|
||||
mLists.insert(previous_index, targetList);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempted to move top list up" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
previous_index = search_index;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//LL_DEBUGS("AutoReplace") << search_index<<" is "<<LLSD::typeString(targetList.type())<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
/// Move the named list down in the priority order
|
||||
bool LLAutoReplaceSettings::decreaseListPriority(std::string listName)
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<listName<<LL_ENDL;
|
||||
S32 found_index = -1;
|
||||
S32 search_index;
|
||||
for ( search_index = 0;
|
||||
found_index == -1 && search_index < mLists.size();
|
||||
search_index++
|
||||
)
|
||||
{
|
||||
if ( listNameMatches( mLists[search_index], listName) )
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"found at index "<<search_index<<LL_ENDL;
|
||||
found_index = search_index;
|
||||
}
|
||||
}
|
||||
if (found_index != -1)
|
||||
{
|
||||
S32 next_index;
|
||||
for ( next_index = found_index+1;
|
||||
next_index < mLists.size() && ! mLists[next_index].isMap();
|
||||
next_index++
|
||||
)
|
||||
{
|
||||
// skipping over any undefined slots (see LLSD-30)
|
||||
LL_WARNS("AutoReplace")<<next_index<<" ! not a map: "/*<<LLSD::typeString(mLists[next_index].type())*/<< LL_ENDL;
|
||||
}
|
||||
if ( next_index < mLists.size() )
|
||||
{
|
||||
LLSD next_list = mLists[next_index];
|
||||
LL_DEBUGS("AutoReplace") << "erase "<<next_index<<LL_ENDL;
|
||||
mLists.erase(next_index);
|
||||
LL_DEBUGS("AutoReplace") << "insert at "<<found_index<<LL_ENDL;
|
||||
mLists.insert(found_index, next_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "attempted to move bottom list down" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "not found" << LL_ENDL;
|
||||
}
|
||||
return (found_index != -1);
|
||||
}
|
||||
|
||||
|
||||
std::string LLAutoReplaceSettings::replaceWord(const std::string currentWord)
|
||||
{
|
||||
std::string returnedWord = currentWord; // in case no replacement is found
|
||||
static LLCachedControl<bool> autoreplace_enabled(gSavedSettings, "AutoReplace", false);
|
||||
if ( autoreplace_enabled )
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"checking '"<<currentWord<<"'"<< LL_ENDL;
|
||||
//loop through lists in order
|
||||
bool found = false;
|
||||
for( LLSD::array_const_iterator list = mLists.beginArray(), endLists = mLists.endArray();
|
||||
! found && list != endLists;
|
||||
list++
|
||||
)
|
||||
{
|
||||
const LLSD& checkList = *list;
|
||||
const LLSD& replacements = checkList[AUTOREPLACE_LIST_REPLACEMENTS];
|
||||
|
||||
if ( replacements.has(currentWord) )
|
||||
{
|
||||
found = true;
|
||||
LL_DEBUGS("AutoReplace")
|
||||
<< " found in list '" << checkList[AUTOREPLACE_LIST_NAME].asString()
|
||||
<< " => '" << replacements[currentWord].asString() << "'"
|
||||
<< LL_ENDL;
|
||||
returnedWord = replacements[currentWord].asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return returnedWord;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::addEntryToList(LLWString keyword, LLWString replacement, std::string listName)
|
||||
{
|
||||
bool added = false;
|
||||
|
||||
if ( ! keyword.empty() && ! replacement.empty() )
|
||||
{
|
||||
bool isOneWord = true;
|
||||
for (size_t character = 0; isOneWord && character < keyword.size(); character++ )
|
||||
{
|
||||
if ( ! LLWStringUtil::isPartOfWord(keyword[character]) )
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "keyword '" << wstring_to_utf8str(keyword) << "' not a single word (len "<<keyword.size()<<" '"<<character<<"')" << LL_ENDL;
|
||||
isOneWord = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isOneWord )
|
||||
{
|
||||
bool listFound = false;
|
||||
for( LLSD::array_iterator list = mLists.beginArray(), endLists = mLists.endArray();
|
||||
! listFound && list != endLists;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( listNameMatches(*list, listName) )
|
||||
{
|
||||
listFound = true;
|
||||
(*list)[AUTOREPLACE_LIST_REPLACEMENTS][wstring_to_utf8str(keyword)]=wstring_to_utf8str(replacement);
|
||||
}
|
||||
}
|
||||
if (listFound)
|
||||
{
|
||||
added = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "list '" << listName << "' not found" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
bool LLAutoReplaceSettings::removeEntryFromList(std::string keyword, std::string listName)
|
||||
{
|
||||
bool found = false;
|
||||
for( LLSD::array_iterator list = mLists.beginArray(), endLists = mLists.endArray();
|
||||
! found && list != endLists;
|
||||
list++
|
||||
)
|
||||
{
|
||||
if ( listNameMatches(*list, listName) )
|
||||
{
|
||||
found = true;
|
||||
(*list)[AUTOREPLACE_LIST_REPLACEMENTS].erase(keyword);
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
LL_WARNS("AutoReplace") << "list '" << listName << "' not found" << LL_ENDL;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
LLSD LLAutoReplaceSettings::getExampleLLSD()
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<LL_ENDL;
|
||||
LLSD example = LLSD::emptyArray();
|
||||
|
||||
example[0] = LLSD::emptyMap();
|
||||
example[0][AUTOREPLACE_LIST_NAME] = "Example List 1";
|
||||
example[0][AUTOREPLACE_LIST_REPLACEMENTS] = LLSD::emptyMap();
|
||||
example[0][AUTOREPLACE_LIST_REPLACEMENTS]["keyword1"] = "replacement string 1";
|
||||
example[0][AUTOREPLACE_LIST_REPLACEMENTS]["keyword2"] = "replacement string 2";
|
||||
|
||||
example[1] = LLSD::emptyMap();
|
||||
example[1][AUTOREPLACE_LIST_NAME] = "Example List 2";
|
||||
example[1][AUTOREPLACE_LIST_REPLACEMENTS] = LLSD::emptyMap();
|
||||
example[1][AUTOREPLACE_LIST_REPLACEMENTS]["mistake1"] = "correction 1";
|
||||
example[1][AUTOREPLACE_LIST_REPLACEMENTS]["mistake2"] = "correction 2";
|
||||
|
||||
return example;
|
||||
}
|
||||
|
||||
const LLSD& LLAutoReplaceSettings::asLLSD()
|
||||
{
|
||||
return mLists;
|
||||
}
|
||||
|
||||
LLAutoReplaceSettings::~LLAutoReplaceSettings()
|
||||
{
|
||||
}
|
||||
227
indra/newview/llautoreplace.h
Normal file
227
indra/newview/llautoreplace.h
Normal file
@@ -0,0 +1,227 @@
|
||||
/**
|
||||
* @file llautoreplace.h
|
||||
* @brief Auto Replace Manager
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* 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 LLAUTOREPLACE_H
|
||||
#define LLAUTOREPLACE_H
|
||||
|
||||
#include "lllineeditor.h"
|
||||
|
||||
class LLAutoReplace;
|
||||
|
||||
/** The configuration data for the LLAutoReplace object
|
||||
*
|
||||
* This is a separate class so that the LLFloaterAutoReplaceSettings
|
||||
* can have a copy of the configuration to manipulate before committing
|
||||
* the changes back to the LLAutoReplace singleton that provides the
|
||||
* autoreplace callback.
|
||||
*/
|
||||
class LLAutoReplaceSettings
|
||||
{
|
||||
public:
|
||||
LLAutoReplaceSettings();
|
||||
~LLAutoReplaceSettings();
|
||||
|
||||
/// Constructor for creating a tempory copy of the current settings
|
||||
LLAutoReplaceSettings(const LLAutoReplaceSettings& settings);
|
||||
|
||||
/// Replace the current settings with new ones and save them to the user settings file
|
||||
void set(const LLAutoReplaceSettings& newSettings);
|
||||
|
||||
/// Load the current settings read from an LLSD file
|
||||
bool setFromLLSD(const LLSD& settingsFromLLSD);
|
||||
///< @returns whether or not the settingsFromLLSD were valid
|
||||
|
||||
// ================================================================
|
||||
///@{ @name List Operations
|
||||
// ================================================================
|
||||
|
||||
/// @returns the configured list names as an LLSD Array of strings
|
||||
LLSD getListNames();
|
||||
|
||||
/// Status values returned from the addList method
|
||||
typedef enum
|
||||
{
|
||||
AddListOk,
|
||||
AddListDuplicateName,
|
||||
AddListInvalidList,
|
||||
} AddListResult;
|
||||
|
||||
/// Inserts a new list at the end of the priority order
|
||||
AddListResult addList(const LLSD& newList);
|
||||
|
||||
/// Inserts a list in place of an existing list of the same name
|
||||
AddListResult replaceList(const LLSD& newList);
|
||||
|
||||
/// Removes the named list, @returns false if not found
|
||||
bool removeReplacementList(std::string listName);
|
||||
|
||||
/// Move the named list up in the priority order
|
||||
bool increaseListPriority(std::string listName);
|
||||
///< @returns false if the list is not found
|
||||
|
||||
/// Move the named list down in the priority order
|
||||
bool decreaseListPriority(std::string listName);
|
||||
///< @returns false if the list is not found
|
||||
|
||||
/// Get a copy of just one list (for saving to an export file)
|
||||
const LLSD* exportList(std::string listName);
|
||||
/// @returns an LLSD map
|
||||
|
||||
/// Checks for required elements, and that each has the correct type.
|
||||
bool listIsValid(const LLSD& listSettings);
|
||||
|
||||
/// Checks for required elements, and that each has the correct type.
|
||||
bool listNameIs(const LLSD& listSettings);
|
||||
|
||||
/// Checks to see if a new lists name conflicts with one in the settings
|
||||
bool listNameIsUnique(const LLSD& newList);
|
||||
/// @note must be called with LLSD that has passed listIsValid
|
||||
|
||||
/// Initializes emptyList to an empty list named 'Empty'
|
||||
static void createEmptyList(LLSD& emptyList);
|
||||
|
||||
/// Resets the name of a list to a new value
|
||||
static void setListName(LLSD& list, const std::string& newName);
|
||||
|
||||
/// Gets the name of a list
|
||||
static std::string getListName(LLSD& list);
|
||||
|
||||
///@}
|
||||
// ================================================================
|
||||
///@{ @name Replacement Entry Operations
|
||||
// ================================================================
|
||||
|
||||
/// Get the replacements specified by a given list
|
||||
const LLSD* getListEntries(std::string listName);
|
||||
///< @returns an LLSD Map of keyword -> replacement test pairs
|
||||
|
||||
/// Get the replacement for the keyword from the specified list
|
||||
std::string replacementFor(std::string keyword, std::string listName);
|
||||
|
||||
/// Adds a keywword/replacement pair to the named list
|
||||
bool addEntryToList(LLWString keyword, LLWString replacement, std::string listName);
|
||||
|
||||
/// Removes the keywword and its replacement from the named list
|
||||
bool removeEntryFromList(std::string keyword, std::string listName);
|
||||
|
||||
/**
|
||||
* Look for currentWord in the lists in order, returning any substitution found
|
||||
* If no configured substitution is found, returns currentWord
|
||||
*/
|
||||
std::string replaceWord(const std::string currentWord /**< word to search for */ );
|
||||
|
||||
/// Provides a hard-coded example of settings
|
||||
LLSD getExampleLLSD();
|
||||
|
||||
/// Get the actual settings as LLSD
|
||||
const LLSD& asLLSD();
|
||||
///< @note for use only in AutoReplace::saveToUserSettings
|
||||
|
||||
private:
|
||||
/// Efficiently and safely compare list names
|
||||
bool listNameMatches( const LLSD& list, const std::string name );
|
||||
|
||||
/// The actual llsd data structure
|
||||
LLSD mLists;
|
||||
|
||||
static const std::string AUTOREPLACE_LIST_NAME; ///< key for looking up list names
|
||||
static const std::string AUTOREPLACE_LIST_REPLACEMENTS; ///< key for looking up replacement map
|
||||
|
||||
/**<
|
||||
* LLSD structure of the lists
|
||||
* - The configuration is an array (mLists),
|
||||
* - Each entry in the array is a replacement list
|
||||
* - Each replacement list is a map with three keys:
|
||||
* @verbatim
|
||||
* "name" String the name of the list
|
||||
* "replacements" Map keyword -> replacement pairs
|
||||
*
|
||||
* <llsd>
|
||||
* <array>
|
||||
* <map>
|
||||
* <key>name</key> <string>List 1</string>
|
||||
* <key>data</key>
|
||||
* <map>
|
||||
* <key>keyword1</key> <string>replacement1</string>
|
||||
* <key>keyword2</key> <string>replacement2</string>
|
||||
* </map>
|
||||
* </map>
|
||||
* <map>
|
||||
* <key>name</key> <string>List 2</string>
|
||||
* <key>data</key>
|
||||
* <map>
|
||||
* <key>keyword1</key> <string>replacement1</string>
|
||||
* <key>keyword2</key> <string>replacement2</string>
|
||||
* </map>
|
||||
* </map>
|
||||
* </array>
|
||||
* </llsd>
|
||||
* @endverbatim
|
||||
*/
|
||||
};
|
||||
|
||||
/** Provides a facility to auto-replace text dynamically as it is entered.
|
||||
*
|
||||
* When the end of a word is detected (defined as any punctuation character,
|
||||
* or any whitespace except newline or return), the preceding word is used
|
||||
* as a lookup key in an ordered list of maps. If a match is found in any
|
||||
* map, the replacement start index and length are returned along with the
|
||||
* new replacement string.
|
||||
*
|
||||
* See the autoreplaceCallback method for how to add autoreplace functionality
|
||||
* to a text entry tool.
|
||||
*/
|
||||
class LLAutoReplace : public LLSingleton<LLAutoReplace>
|
||||
{
|
||||
public:
|
||||
/// Callback that provides the hook for use in text entry methods
|
||||
void autoreplaceCallback(S32& replacement_start, S32& replacement_length, LLWString& replacement_string, S32& cursor_pos, const LLWString& input_text);
|
||||
|
||||
/// Get a copy of the current settings
|
||||
LLAutoReplaceSettings getSettings();
|
||||
|
||||
/// Commit new settings after making changes
|
||||
void setSettings(const LLAutoReplaceSettings& settings);
|
||||
|
||||
private:
|
||||
friend class LLSingleton<LLAutoReplace>;
|
||||
LLAutoReplace();
|
||||
/*virtual*/ void initSingleton();
|
||||
|
||||
LLAutoReplaceSettings mSettings; ///< configuration information
|
||||
|
||||
/// Read settings from persistent storage
|
||||
void loadFromSettings();
|
||||
|
||||
/// Make the newSettings active and write them to user storage
|
||||
void saveToUserSettings();
|
||||
|
||||
/// Compute the user settings file name
|
||||
std::string getUserSettingsFileName();
|
||||
|
||||
/// Compute the (read-ony) application settings file name
|
||||
std::string getAppSettingsFileName();
|
||||
|
||||
/// basename for the settings files
|
||||
static const char* SETTINGS_FILE_NAME;
|
||||
};
|
||||
|
||||
#endif /* LLAUTOREPLACE_H */
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "llfocusmgr.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llcommandhandler.h" // secondlife:///app/chat/ support
|
||||
@@ -149,6 +150,7 @@ BOOL LLChatBar::postBuild()
|
||||
mInputEditor = findChild<LLLineEditor>("Chat Editor");
|
||||
if (mInputEditor)
|
||||
{
|
||||
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
|
||||
mInputEditor->setKeystrokeCallback(boost::bind(&LLChatBar::onInputEditorKeystroke,this));
|
||||
mInputEditor->setFocusLostCallback(boost::bind(&LLChatBar::onInputEditorFocusLost));
|
||||
mInputEditor->setFocusReceivedCallback(boost::bind(&LLChatBar::onInputEditorGainFocus));
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "sgversion.h"
|
||||
#include "llviewerbuild.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluri.h"
|
||||
#include "llweb.h"
|
||||
@@ -141,7 +140,7 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
+ " (64 bit)"
|
||||
#endif
|
||||
+ llformat(" %d.%d.%d (%d) %s %s (%s)\n",
|
||||
gVersionMajor, gVersionMinor, gVersionPatch, LL_VIEWER_BUILD,
|
||||
gVersionMajor, gVersionMinor, gVersionPatch, gVersionBuild,
|
||||
__DATE__, __TIME__,
|
||||
gVersionChannel));
|
||||
support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
|
||||
|
||||
632
indra/newview/llfloaterautoreplacesettings.cpp
Normal file
632
indra/newview/llfloaterautoreplacesettings.cpp
Normal file
@@ -0,0 +1,632 @@
|
||||
/**
|
||||
* @file llfloaterautoreplacesettings.cpp
|
||||
* @brief Auto Replace List floater
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* 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
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterautoreplacesettings.h"
|
||||
|
||||
#include "statemachine/aifilepicker.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llautoreplace.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
|
||||
LLFloaterAutoReplaceSettings::LLFloaterAutoReplaceSettings(const LLSD& key)
|
||||
: LLFloater(/*key*/)
|
||||
, mSelectedListName("")
|
||||
, mListNames(NULL)
|
||||
, mReplacementsList(NULL)
|
||||
, mKeyword(NULL)
|
||||
, mPreviousKeyword("")
|
||||
, mReplacement(NULL)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_autoreplace.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterAutoReplaceSettings::postBuild(void)
|
||||
{
|
||||
// get copies of the current settings that we will operate on
|
||||
mEnabled = gSavedSettings.getBOOL("AutoReplace");
|
||||
LL_DEBUGS("AutoReplace") << ( mEnabled ? "enabled" : "disabled") << LL_ENDL;
|
||||
|
||||
mSettings = LLAutoReplace::getInstance()->getSettings();
|
||||
|
||||
// global checkbox for whether or not autoreplace is active
|
||||
LLUICtrl* enabledCheckbox = getChild<LLUICtrl>("autoreplace_enable");
|
||||
enabledCheckbox->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onAutoReplaceToggled, this));
|
||||
enabledCheckbox->setValue(LLSD(mEnabled));
|
||||
|
||||
// top row list creation and deletion
|
||||
getChild<LLUICtrl>("autoreplace_import_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onImportList,this));
|
||||
getChild<LLUICtrl>("autoreplace_export_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onExportList,this));
|
||||
getChild<LLUICtrl>("autoreplace_new_list")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onNewList,this));
|
||||
getChild<LLUICtrl>("autoreplace_delete_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteList,this));
|
||||
|
||||
// the list of keyword->replacement lists
|
||||
mListNames = getChild<LLScrollListCtrl>("autoreplace_list_name");
|
||||
mListNames->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectList, this));
|
||||
mListNames->setCommitOnSelectionChange(true);
|
||||
|
||||
// list ordering
|
||||
getChild<LLUICtrl>("autoreplace_list_up")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onListUp,this));
|
||||
getChild<LLUICtrl>("autoreplace_list_down")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onListDown,this));
|
||||
|
||||
// keyword->replacement entry add / delete
|
||||
getChild<LLUICtrl>("autoreplace_add_entry")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onAddEntry,this));
|
||||
getChild<LLUICtrl>("autoreplace_delete_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteEntry,this));
|
||||
|
||||
// entry edits
|
||||
mKeyword = getChild<LLLineEditor>("autoreplace_keyword");
|
||||
mReplacement = getChild<LLLineEditor>("autoreplace_replacement");
|
||||
getChild<LLUICtrl>("autoreplace_save_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveEntry, this));
|
||||
|
||||
// dialog termination ( Save Changes / Cancel )
|
||||
getChild<LLUICtrl>("autoreplace_save_changes")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveChanges, this));
|
||||
getChild<LLUICtrl>("autoreplace_cancel")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::close, this, false));
|
||||
|
||||
// the list of keyword->replacement pairs
|
||||
mReplacementsList = getChild<LLScrollListCtrl>("autoreplace_list_replacements");
|
||||
mReplacementsList->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectEntry, this));
|
||||
mReplacementsList->setCommitOnSelectionChange(true);
|
||||
|
||||
center();
|
||||
|
||||
mSelectedListName.clear();
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterAutoReplaceSettings::updateListNames()
|
||||
{
|
||||
mListNames->deleteAllItems(); // start from scratch
|
||||
|
||||
LLSD listNames = mSettings.getListNames(); // Array of Strings
|
||||
|
||||
for ( LLSD::array_const_iterator entry = listNames.beginArray(), end = listNames.endArray();
|
||||
entry != end;
|
||||
++entry
|
||||
)
|
||||
{
|
||||
const std::string& listName = entry->asString();
|
||||
mListNames->addSimpleElement(listName);
|
||||
}
|
||||
|
||||
if (!mSelectedListName.empty())
|
||||
{
|
||||
mListNames->setSelectedByValue( LLSD(mSelectedListName), true );
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::updateListNamesControls()
|
||||
{
|
||||
if ( mSelectedListName.empty() )
|
||||
{
|
||||
// There is no selected list
|
||||
|
||||
// Disable all controls that operate on the selected list
|
||||
getChild<LLButton>("autoreplace_export_list")->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_delete_list")->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_list_up")->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_list_down")->setEnabled(false);
|
||||
|
||||
mReplacementsList->deleteAllItems();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Enable the controls that operate on the selected list
|
||||
getChild<LLButton>("autoreplace_export_list")->setEnabled(true);
|
||||
getChild<LLButton>("autoreplace_delete_list")->setEnabled(true);
|
||||
getChild<LLButton>("autoreplace_list_up")->setEnabled(!selectedListIsFirst());
|
||||
getChild<LLButton>("autoreplace_list_down")->setEnabled(!selectedListIsLast());
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onSelectList()
|
||||
{
|
||||
std::string previousSelectedListName = mSelectedListName;
|
||||
// only one selection allowed
|
||||
LLSD selected = mListNames->getSelectedValue();
|
||||
if (selected.isDefined())
|
||||
{
|
||||
mSelectedListName = selected.asString();
|
||||
LL_DEBUGS("AutoReplace")<<"selected list '"<<mSelectedListName<<"'"<<LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mSelectedListName.clear();
|
||||
LL_DEBUGS("AutoReplace")<<"unselected"<<LL_ENDL;
|
||||
}
|
||||
|
||||
updateListNamesControls();
|
||||
|
||||
if ( previousSelectedListName != mSelectedListName )
|
||||
{
|
||||
updateReplacementsList();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onSelectEntry()
|
||||
{
|
||||
LLSD selectedRow = mReplacementsList->getSelectedValue();
|
||||
if (selectedRow.isDefined())
|
||||
{
|
||||
mPreviousKeyword = selectedRow.asString();
|
||||
LL_DEBUGS("AutoReplace")<<"selected entry '"<<mPreviousKeyword<<"'"<<LL_ENDL;
|
||||
mKeyword->setValue(selectedRow);
|
||||
std::string replacement = mSettings.replacementFor(mPreviousKeyword, mSelectedListName );
|
||||
mReplacement->setValue(replacement);
|
||||
enableReplacementEntry();
|
||||
mReplacement->setFocus(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// no entry selection, so the entry panel should be off
|
||||
disableReplacementEntry();
|
||||
LL_DEBUGS("AutoReplace")<<"no row selected"<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::updateReplacementsList()
|
||||
{
|
||||
// start from scratch, since this should only be called when the list changes
|
||||
mReplacementsList->deleteAllItems();
|
||||
|
||||
if ( mSelectedListName.empty() )
|
||||
{
|
||||
mReplacementsList->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_add_entry")->setEnabled(false);
|
||||
disableReplacementEntry();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Populate the keyword->replacement list from the selected list
|
||||
const LLSD* mappings = mSettings.getListEntries(mSelectedListName);
|
||||
for ( LLSD::map_const_iterator entry = mappings->beginMap(), end = mappings->endMap();
|
||||
entry != end;
|
||||
entry++
|
||||
)
|
||||
{
|
||||
LLSD row;
|
||||
row["id"] = entry->first;
|
||||
row["columns"][0]["column"] = "Keyword";
|
||||
row["columns"][0]["value"] = entry->first;
|
||||
row["columns"][1]["column"] = "Replacement";
|
||||
row["columns"][1]["value"] = entry->second;
|
||||
|
||||
mReplacementsList->addElement(row, ADD_BOTTOM);
|
||||
}
|
||||
|
||||
mReplacementsList->deselectAllItems(false /* don't call commit */);
|
||||
mReplacementsList->setEnabled(true);
|
||||
|
||||
getChild<LLButton>("autoreplace_add_entry")->setEnabled(true);
|
||||
disableReplacementEntry();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::enableReplacementEntry()
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<LL_ENDL;
|
||||
mKeyword->setEnabled(true);
|
||||
mReplacement->setEnabled(true);
|
||||
getChild<LLButton>("autoreplace_save_entry")->setEnabled(true);
|
||||
getChild<LLButton>("autoreplace_delete_entry")->setEnabled(true);
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::disableReplacementEntry()
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<LL_ENDL;
|
||||
mPreviousKeyword.clear();
|
||||
mKeyword->clear();
|
||||
mKeyword->setEnabled(false);
|
||||
mReplacement->clear();
|
||||
mReplacement->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_save_entry")->setEnabled(false);
|
||||
getChild<LLButton>("autoreplace_delete_entry")->setEnabled(false);
|
||||
}
|
||||
|
||||
// called when the global settings checkbox is changed
|
||||
void LLFloaterAutoReplaceSettings::onAutoReplaceToggled()
|
||||
{
|
||||
// set our local copy of the flag, copied to the global preference in onOk
|
||||
mEnabled = childGetValue("autoreplace_enable").asBoolean();
|
||||
LL_DEBUGS("AutoReplace")<< "autoreplace_enable " << ( mEnabled ? "on" : "off" ) << LL_ENDL;
|
||||
}
|
||||
|
||||
// called when the List Up button is pressed
|
||||
void LLFloaterAutoReplaceSettings::onListUp()
|
||||
{
|
||||
S32 selectedRow = mListNames->getFirstSelectedIndex();
|
||||
LLSD selectedName = mListNames->getSelectedValue().asString();
|
||||
|
||||
if ( mSettings.increaseListPriority(selectedName) )
|
||||
{
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace")
|
||||
<< "invalid row ("<<selectedRow<<") selected '"<<selectedName<<"'"
|
||||
<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// called when the List Down button is pressed
|
||||
void LLFloaterAutoReplaceSettings::onListDown()
|
||||
{
|
||||
S32 selectedRow = mListNames->getFirstSelectedIndex();
|
||||
std::string selectedName = mListNames->getSelectedValue().asString();
|
||||
|
||||
if ( mSettings.decreaseListPriority(selectedName) )
|
||||
{
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace")
|
||||
<< "invalid row ("<<selectedRow<<") selected '"<<selectedName<<"'"
|
||||
<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// called when the Delete Entry button is pressed
|
||||
void LLFloaterAutoReplaceSettings::onDeleteEntry()
|
||||
{
|
||||
LLSD selectedRow = mReplacementsList->getSelectedValue();
|
||||
if (selectedRow.isDefined())
|
||||
{
|
||||
std::string keyword = selectedRow.asString();
|
||||
mReplacementsList->deleteSelectedItems(); // delete from the control
|
||||
mSettings.removeEntryFromList(keyword, mSelectedListName); // delete from the local settings copy
|
||||
disableReplacementEntry(); // no selection active, so turn off the buttons
|
||||
}
|
||||
}
|
||||
|
||||
// called when the Import List button is pressed
|
||||
void LLFloaterAutoReplaceSettings::onImportList()
|
||||
{
|
||||
AIFilePicker* picker = AIFilePicker::create();
|
||||
picker->open(FFLOAD_XML, "", "autoreplace");
|
||||
picker->run(boost::bind(&LLFloaterAutoReplaceSettings::onImportList_continued, this, picker));
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onImportList_continued(AIFilePicker* picker)
|
||||
{
|
||||
if (picker->hasFilename())
|
||||
{
|
||||
llifstream file;
|
||||
file.open(picker->getFilename());
|
||||
LLSD newList;
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXMLDocument(newList, file);
|
||||
}
|
||||
file.close();
|
||||
|
||||
switch ( mSettings.addList(newList) )
|
||||
{
|
||||
case LLAutoReplaceSettings::AddListOk:
|
||||
mSelectedListName = LLAutoReplaceSettings::getListName(newList);
|
||||
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
break;
|
||||
|
||||
case LLAutoReplaceSettings::AddListDuplicateName:
|
||||
{
|
||||
std::string newName = LLAutoReplaceSettings::getListName(newList);
|
||||
LL_WARNS("AutoReplace")<<"name '"<<newName<<"' is in use; prompting for new name"<<LL_ENDL;
|
||||
LLSD newPayload;
|
||||
newPayload["list"] = newList;
|
||||
LLSD args;
|
||||
args["DUPNAME"] = newName;
|
||||
|
||||
LLNotificationsUtil::add("RenameAutoReplaceList", args, newPayload,
|
||||
boost::bind(&LLFloaterAutoReplaceSettings::callbackListNameConflict, this, _1, _2));
|
||||
}
|
||||
break;
|
||||
|
||||
case LLAutoReplaceSettings::AddListInvalidList:
|
||||
LLNotificationsUtil::add("InvalidAutoReplaceList");
|
||||
LL_WARNS("AutoReplace") << "imported list was invalid" << LL_ENDL;
|
||||
|
||||
mSelectedListName.clear();
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
break;
|
||||
|
||||
default:
|
||||
LL_ERRS("AutoReplace") << "invalid AddListResult" << LL_ENDL;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AutoReplace") << "file selection failed for import list" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onNewList()
|
||||
{
|
||||
LLSD payload;
|
||||
LLSD emptyList;
|
||||
LLAutoReplaceSettings::createEmptyList(emptyList);
|
||||
payload["list"] = emptyList;
|
||||
LLSD args;
|
||||
|
||||
LLNotificationsUtil::add("AddAutoReplaceList", args, payload,
|
||||
boost::bind(&LLFloaterAutoReplaceSettings::callbackNewListName, this, _1, _2));
|
||||
}
|
||||
|
||||
bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"called"<<LL_ENDL;
|
||||
|
||||
LLSD newList = notification["payload"]["list"];
|
||||
|
||||
if ( response.has("listname") && response["listname"].isString() )
|
||||
{
|
||||
std::string newName = response["listname"].asString();
|
||||
LLAutoReplaceSettings::setListName(newList, newName);
|
||||
|
||||
switch ( mSettings.addList(newList) )
|
||||
{
|
||||
case LLAutoReplaceSettings::AddListOk:
|
||||
LL_INFOS("AutoReplace") << "added new list '"<<newName<<"'"<<LL_ENDL;
|
||||
mSelectedListName = newName;
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
break;
|
||||
|
||||
case LLAutoReplaceSettings::AddListDuplicateName:
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"name '"<<newName<<"' is in use; prompting for new name"<<LL_ENDL;
|
||||
LLSD newPayload;
|
||||
newPayload["list"] = notification["payload"]["list"];
|
||||
LLSD args;
|
||||
args["DUPNAME"] = newName;
|
||||
|
||||
LLNotificationsUtil::add("RenameAutoReplaceList", args, newPayload,
|
||||
boost::bind(&LLFloaterAutoReplaceSettings::callbackListNameConflict, this, _1, _2));
|
||||
}
|
||||
break;
|
||||
|
||||
case LLAutoReplaceSettings::AddListInvalidList:
|
||||
LLNotificationsUtil::add("InvalidAutoReplaceList");
|
||||
|
||||
mSelectedListName.clear();
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
break;
|
||||
|
||||
default:
|
||||
LL_ERRS("AutoReplace") << "invalid AddListResult" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("AutoReplace") << "adding notification response" << LL_ENDL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// callback for the RenameAutoReplaceList notification
|
||||
bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
LLSD newList = notification["payload"]["list"];
|
||||
std::string listName = LLAutoReplaceSettings::getListName(newList);
|
||||
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch ( option )
|
||||
{
|
||||
case 0:
|
||||
// Replace current list
|
||||
if ( LLAutoReplaceSettings::AddListOk == mSettings.replaceList(newList) )
|
||||
{
|
||||
LL_INFOS("AutoReplace") << "replaced list '"<<listName<<"'"<<LL_ENDL;
|
||||
mSelectedListName = listName;
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"failed to replace list '"<<listName<<"'"<<LL_ENDL;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Use New Name
|
||||
LL_INFOS("AutoReplace")<<"option 'use new name' selected"<<LL_ENDL;
|
||||
callbackNewListName(notification, response);
|
||||
break;
|
||||
|
||||
default:
|
||||
LL_ERRS("AutoReplace")<<"invalid selected option "<<option<<LL_ENDL;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onDeleteList()
|
||||
{
|
||||
std::string listName = mListNames->getSelectedValue().asString();
|
||||
if ( ! listName.empty() )
|
||||
{
|
||||
if ( mSettings.removeReplacementList(listName) )
|
||||
{
|
||||
LL_INFOS("AutoReplace")<<"deleted list '"<<listName<<"'"<<LL_ENDL;
|
||||
mReplacementsList->deleteSelectedItems(); // remove from the scrolling list
|
||||
mSelectedListName.clear();
|
||||
updateListNames();
|
||||
updateListNamesControls();
|
||||
updateReplacementsList();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("AutoReplace")<<"failed to delete list '"<<listName<<"'"<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"no list selected for delete"<<LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onExportList()
|
||||
{
|
||||
std::string listName=mListNames->getFirstSelected()->getColumn(0)->getValue().asString();
|
||||
std::string listFileName = listName + ".xml";
|
||||
AIFilePicker* picker = AIFilePicker::create();
|
||||
picker->open(listFileName, FFSAVE_XML, "", "autoreplace");
|
||||
picker->run(boost::bind(&LLFloaterAutoReplaceSettings::onExportList_continued, this, picker, mSettings.exportList(listName)));
|
||||
}
|
||||
void LLFloaterAutoReplaceSettings::onExportList_continued(AIFilePicker* picker, const LLSD* list)
|
||||
{
|
||||
if (picker->hasFilename())
|
||||
{
|
||||
llofstream file;
|
||||
file.open(picker->getFilename());
|
||||
LLSDSerialize::toPrettyXML(*list, file);
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onAddEntry()
|
||||
{
|
||||
mPreviousKeyword.clear();
|
||||
mReplacementsList->deselectAllItems(false /* don't call commit */);
|
||||
mKeyword->clear();
|
||||
mReplacement->clear();
|
||||
enableReplacementEntry();
|
||||
mKeyword->setFocus(true);
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onSaveEntry()
|
||||
{
|
||||
LL_DEBUGS("AutoReplace")<<"called"<<LL_ENDL;
|
||||
|
||||
if ( ! mPreviousKeyword.empty() )
|
||||
{
|
||||
// delete any existing value for the key that was editted
|
||||
LL_INFOS("AutoReplace")
|
||||
<< "list '" << mSelectedListName << "' "
|
||||
<< "removed '" << mPreviousKeyword
|
||||
<< "'" << LL_ENDL;
|
||||
mSettings.removeEntryFromList( mPreviousKeyword, mSelectedListName );
|
||||
}
|
||||
|
||||
LLWString keyword = mKeyword->getWText();
|
||||
LLWString replacement = mReplacement->getWText();
|
||||
if ( mSettings.addEntryToList(keyword, replacement, mSelectedListName) )
|
||||
{
|
||||
// insert the new keyword->replacement pair
|
||||
LL_INFOS("AutoReplace")
|
||||
<< "list '" << mSelectedListName << "' "
|
||||
<< "added '" << wstring_to_utf8str(keyword)
|
||||
<< "' -> '" << wstring_to_utf8str(replacement)
|
||||
<< "'" << LL_ENDL;
|
||||
|
||||
updateReplacementsList();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("InvalidAutoReplaceEntry");
|
||||
LL_WARNS("AutoReplace")<<"invalid entry "
|
||||
<< "keyword '" << wstring_to_utf8str(keyword)
|
||||
<< "' replacement '" << wstring_to_utf8str(replacement)
|
||||
<< "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAutoReplaceSettings::onSaveChanges()
|
||||
{
|
||||
// put our local copy of the settings into the active copy
|
||||
LLAutoReplace::getInstance()->setSettings( mSettings );
|
||||
// save our local copy of the global feature enable/disable value
|
||||
gSavedSettings.setBOOL("AutoReplace", mEnabled);
|
||||
close();
|
||||
}
|
||||
|
||||
bool LLFloaterAutoReplaceSettings::selectedListIsFirst()
|
||||
{
|
||||
bool isFirst = false;
|
||||
|
||||
if (!mSelectedListName.empty())
|
||||
{
|
||||
LLSD lists = mSettings.getListNames(); // an Array of Strings
|
||||
LLSD first = lists.get(0);
|
||||
if ( first.isString() && first.asString() == mSelectedListName )
|
||||
{
|
||||
isFirst = true;
|
||||
}
|
||||
}
|
||||
return isFirst;
|
||||
}
|
||||
|
||||
bool LLFloaterAutoReplaceSettings::selectedListIsLast()
|
||||
{
|
||||
bool isLast = false;
|
||||
|
||||
if (!mSelectedListName.empty())
|
||||
{
|
||||
LLSD last;
|
||||
LLSD lists = mSettings.getListNames(); // an Array of Strings
|
||||
for ( LLSD::array_const_iterator list = lists.beginArray(), listEnd = lists.endArray();
|
||||
list != listEnd;
|
||||
list++
|
||||
)
|
||||
{
|
||||
last = *list;
|
||||
}
|
||||
if ( last.isString() && last.asString() == mSelectedListName )
|
||||
{
|
||||
isLast = true;
|
||||
}
|
||||
}
|
||||
return isLast;
|
||||
}
|
||||
|
||||
/* TBD
|
||||
mOldText = getChild<LLLineEditor>("autoreplace_old_text");
|
||||
mNewText = getChild<LLLineEditor>("autoreplace_new_text");
|
||||
*/
|
||||
111
indra/newview/llfloaterautoreplacesettings.h
Normal file
111
indra/newview/llfloaterautoreplacesettings.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @file llfloaterautoreplacesettings.h
|
||||
* @brief Auto Replace List floater
|
||||
* @copyright Copyright (c) 2011 LordGregGreg Back
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2012, Linden Research, Inc.
|
||||
*
|
||||
* 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
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLFLOATERAUTOREPLACESETTINGS_H
|
||||
#define LLFLOATERAUTOREPLACESETTINGS_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llautoreplace.h"
|
||||
|
||||
class AIFilePicker;
|
||||
class LLLineEditor;
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class LLFloaterAutoReplaceSettings : public LLFloater, public LLFloaterSingleton<LLFloaterAutoReplaceSettings>
|
||||
{
|
||||
public:
|
||||
LLFloaterAutoReplaceSettings(const LLSD& key = LLSD());
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
private:
|
||||
|
||||
/** @{ @name Local Copies of Settings
|
||||
* These are populated in the postBuild method with the values
|
||||
* current when the floater is instantiated, and then either
|
||||
* discarded when Cancel is pressed, or copied back to the active
|
||||
* settings if Ok is pressed.
|
||||
*/
|
||||
bool mEnabled; ///< the global preference for AutoReplace
|
||||
LLAutoReplaceSettings mSettings; ///< settings being modified
|
||||
/** @} */
|
||||
|
||||
/// convenience variable - the name of the currently selected list (if any)
|
||||
std::string mSelectedListName;
|
||||
/// the scrolling list of list names (one column, no headings, order manually controlled)
|
||||
LLScrollListCtrl* mListNames;
|
||||
/// the scroling list of keyword->replacement pairs
|
||||
LLScrollListCtrl* mReplacementsList;
|
||||
|
||||
/// the keyword for the entry editing pane
|
||||
LLLineEditor* mKeyword;
|
||||
/// saved keyword value
|
||||
std::string mPreviousKeyword;
|
||||
/// the replacement for the entry editing pane
|
||||
LLLineEditor* mReplacement;
|
||||
|
||||
/// callback for when the feature enable/disable checkbox changes
|
||||
void onAutoReplaceToggled();
|
||||
/// callback for when an entry in the list of list names is selected
|
||||
void onSelectList();
|
||||
|
||||
void onImportList();
|
||||
void onImportList_continued(AIFilePicker* picker);
|
||||
void onExportList();
|
||||
void onExportList_continued(AIFilePicker* picker, const LLSD* list);
|
||||
void onNewList();
|
||||
void onDeleteList();
|
||||
|
||||
void onListUp();
|
||||
void onListDown();
|
||||
|
||||
void onSelectEntry();
|
||||
void onAddEntry();
|
||||
void onDeleteEntry();
|
||||
void onSaveEntry();
|
||||
|
||||
void onSaveChanges();
|
||||
|
||||
/// updates the contents of the mListNames
|
||||
void updateListNames();
|
||||
/// updates the controls associated with mListNames (depends on whether a name is selected or not)
|
||||
void updateListNamesControls();
|
||||
/// updates the contents of the mReplacementsList
|
||||
void updateReplacementsList();
|
||||
/// enables the components that should only be active when a keyword is selected
|
||||
void enableReplacementEntry();
|
||||
/// disables the components that should only be active when a keyword is selected
|
||||
void disableReplacementEntry();
|
||||
|
||||
/// called from the AddAutoReplaceList notification dialog
|
||||
bool callbackNewListName(const LLSD& notification, const LLSD& response);
|
||||
/// called from the RenameAutoReplaceList notification dialog
|
||||
bool callbackListNameConflict(const LLSD& notification, const LLSD& response);
|
||||
|
||||
bool selectedListIsFirst();
|
||||
bool selectedListIsLast();
|
||||
};
|
||||
|
||||
#endif // LLFLOATERAUTOREPLACESETTINGS_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,10 @@
|
||||
// Copyright: See COPYING file that comes with this distribution
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef LL_LLFLOATERAVATARLIST_H
|
||||
#define LL_LLFLOATERAVATARLIST_H
|
||||
|
||||
#include "llavatarname.h"
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
#include "llfloater.h"
|
||||
@@ -76,7 +80,7 @@ enum ACTIVITY_TYPE
|
||||
* Update world position.
|
||||
* Affects age.
|
||||
*/
|
||||
void setPosition(LLVector3d position, bool this_sim, bool drawn, bool chatrange, bool shoutrange);
|
||||
void setPosition(const LLVector3d& position, bool this_sim, bool drawn, bool chatrange, bool shoutrange);
|
||||
|
||||
const LLVector3d& getPosition() const { return mPosition; }
|
||||
|
||||
@@ -86,7 +90,7 @@ enum ACTIVITY_TYPE
|
||||
* This is only used for determining whether the avatar is still around.
|
||||
* @see getEntryAgeSeconds
|
||||
*/
|
||||
bool getAlive();
|
||||
bool getAlive() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the age of this entry in seconds
|
||||
@@ -107,14 +111,14 @@ enum ACTIVITY_TYPE
|
||||
void setActivity(ACTIVITY_TYPE activity);
|
||||
|
||||
/**
|
||||
* @brief Returns the activity type
|
||||
* @brief Returns the activity type, updates mActivityType if necessary
|
||||
*/
|
||||
const ACTIVITY_TYPE getActivity();
|
||||
|
||||
/**
|
||||
* @brief Sets the 'focus' status on this entry (camera focused on this avatar)
|
||||
*/
|
||||
void setFocus(BOOL value) { mFocused = value; }
|
||||
void setFocus(bool value) { mFocused = value; }
|
||||
|
||||
bool isFocused() const { return mFocused; }
|
||||
|
||||
@@ -130,7 +134,7 @@ enum ACTIVITY_TYPE
|
||||
bool isInList() const { return mIsInList; }
|
||||
/**
|
||||
* @brief Returns whether the item is dead and shouldn't appear in the list
|
||||
* @returns TRUE if dead
|
||||
* @returns true if dead
|
||||
*/
|
||||
bool isDead() const;
|
||||
|
||||
@@ -207,7 +211,6 @@ public:
|
||||
/*virtual*/ void onOpen();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
static void createInstance(bool visible);
|
||||
/**
|
||||
* @brief Toggles interface visibility
|
||||
* There is only one instance of the avatar scanner at any time.
|
||||
@@ -234,20 +237,20 @@ public:
|
||||
* @brief Returns the entry for an avatar, if preset
|
||||
* @returns Pointer to avatar entry, NULL if not found.
|
||||
*/
|
||||
LLAvatarListEntry* getAvatarEntry(LLUUID avatar);
|
||||
LLAvatarListEntry* getAvatarEntry(const LLUUID& avatar) const;
|
||||
|
||||
/**
|
||||
* @brief Returns a string with the selected names in the list
|
||||
*/
|
||||
std::string getSelectedNames(const std::string& separator = ", ");
|
||||
std::string getSelectedName();
|
||||
LLUUID getSelectedID();
|
||||
uuid_vec_t getSelectedIDs();
|
||||
std::string getSelectedNames(const std::string& separator = ", ") const;
|
||||
std::string getSelectedName() const;
|
||||
LLUUID getSelectedID() const;
|
||||
uuid_vec_t getSelectedIDs() const;
|
||||
|
||||
static void lookAtAvatar(LLUUID &uuid);
|
||||
static bool lookAtAvatar(const LLUUID& uuid);
|
||||
|
||||
static void sound_trigger_hook(LLMessageSystem* msg,void **);
|
||||
void sendKeys();
|
||||
void sendKeys() const;
|
||||
|
||||
typedef boost::shared_ptr<LLAvatarListEntry> LLAvatarListEntryPtr;
|
||||
typedef std::vector< LLAvatarListEntryPtr > av_list_t;
|
||||
@@ -264,6 +267,7 @@ public:
|
||||
LIST_POSITION,
|
||||
LIST_ALTITUDE,
|
||||
LIST_ACTIVITY,
|
||||
LIST_VOICE,
|
||||
LIST_AGE,
|
||||
LIST_TIME,
|
||||
LIST_CLIENT,
|
||||
@@ -285,16 +289,16 @@ public:
|
||||
* @brief Focus camera on previous avatar
|
||||
* @param marked_only Whether to choose only marked avatars
|
||||
*/
|
||||
void focusOnPrev(BOOL marked_only);
|
||||
void focusOnPrev(bool marked_only);
|
||||
|
||||
/**
|
||||
* @brief Focus camera on next avatar
|
||||
* @param marked_only Whether to choose only marked avatars
|
||||
*/
|
||||
void focusOnNext(BOOL marked_only);
|
||||
void focusOnNext(bool marked_only);
|
||||
|
||||
void refreshTracker();
|
||||
void trackAvatar(const LLAvatarListEntry* entry);
|
||||
void trackAvatar(const LLAvatarListEntry* entry) const;
|
||||
|
||||
/**
|
||||
* @brief Handler for the "refresh" button click.
|
||||
@@ -321,7 +325,8 @@ public:
|
||||
void onClickEject();
|
||||
void onClickEjectFromEstate();
|
||||
void onClickBanFromEstate();
|
||||
void onAvatarSortingChanged();
|
||||
|
||||
void onAvatarSortingChanged() { mDirtyAvatarSorting = true; }
|
||||
|
||||
/**
|
||||
* @brief Called via notification feedback.
|
||||
@@ -335,7 +340,7 @@ public:
|
||||
|
||||
static void callbackIdle(void *userdata);
|
||||
|
||||
void doCommand(avlist_command_t cmd, bool single = false);
|
||||
void doCommand(avlist_command_t cmd, bool single = false) const;
|
||||
|
||||
/**
|
||||
* @brief Cleanup avatar list, removing dead entries from it.
|
||||
@@ -355,7 +360,7 @@ private:
|
||||
bool mDirtyAvatarSorting;
|
||||
|
||||
/**
|
||||
* @brief TRUE when Updating
|
||||
* @brief true when Updating
|
||||
*/
|
||||
const LLCachedControl<bool> mUpdate;
|
||||
|
||||
@@ -373,3 +378,5 @@ private:
|
||||
*/
|
||||
LLUUID mFocusedAvatar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef LL_LLFLOATERMESSAGELOG_H
|
||||
#define LL_LLFLOATERMESSAGELOG_H
|
||||
|
||||
// <edit>
|
||||
#include "llfloater.h"
|
||||
#include "llmessagelog.h"
|
||||
@@ -94,3 +97,5 @@ public:
|
||||
static void onClickFilterMenu(void* user_data);
|
||||
};
|
||||
// </edit>
|
||||
|
||||
#endif
|
||||
@@ -241,6 +241,22 @@ bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a
|
||||
|
||||
bool validate_face(const LLVolumeFace& face)
|
||||
{
|
||||
|
||||
for (S32 v = 0; v < face.mNumVertices; v++)
|
||||
{
|
||||
if(face.mPositions && !face.mPositions[v].isFinite3())
|
||||
{
|
||||
llwarns << "NaN position data in face found!" << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(face.mNormals && !face.mNormals[v].isFinite3())
|
||||
{
|
||||
llwarns << "NaN normal data in face found!" << llendl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (S32 i = 0; i < face.mNumIndices; ++i)
|
||||
{
|
||||
if (face.mIndices[i] >= face.mNumVertices)
|
||||
@@ -3807,15 +3823,30 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
||||
|
||||
U32 triangle_count = 0;
|
||||
|
||||
for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
|
||||
U32 instanced_triangle_count = 0;
|
||||
|
||||
//get the triangle count for the whole scene
|
||||
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter)
|
||||
{
|
||||
LLModel* mdl = *iter;
|
||||
for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
|
||||
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
|
||||
{
|
||||
triangle_count += mdl->getVolumeFace(i).mNumIndices/3;
|
||||
LLModel* mdl = instance->mModel;
|
||||
if (mdl)
|
||||
{
|
||||
instanced_triangle_count += mdl->getNumTriangles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the triangle count for the non-instanced set of models
|
||||
for (U32 i = 0; i < mBaseModel.size(); ++i)
|
||||
{
|
||||
triangle_count += mBaseModel[i]->getNumTriangles();
|
||||
}
|
||||
|
||||
//get ratio of uninstanced triangles to instanced triangles
|
||||
F32 triangle_ratio = (F32) triangle_count / (F32) instanced_triangle_count;
|
||||
|
||||
U32 base_triangle_count = triangle_count;
|
||||
|
||||
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
@@ -3849,6 +3880,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
||||
if (which_lod > -1 && which_lod < NUM_LOD)
|
||||
{
|
||||
limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
|
||||
//convert from "scene wide" to "non-instanced" triangle limit
|
||||
limit = (S32) ( (F32) limit*triangle_ratio );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3953,7 +3986,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
||||
U32 actual_verts = 0;
|
||||
U32 submeshes = 0;
|
||||
|
||||
mRequestedTriangleCount[lod] = triangle_count;
|
||||
mRequestedTriangleCount[lod] = (S32) ( (F32) triangle_count / triangle_ratio );
|
||||
mRequestedErrorThreshold[lod] = lod_error_threshold;
|
||||
|
||||
glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode);
|
||||
@@ -4135,28 +4168,36 @@ void LLModelPreview::updateStatusMessages()
|
||||
//initialize total for this lod to 0
|
||||
total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0;
|
||||
|
||||
for (U32 i = 0; i < mModel[lod].size(); ++i)
|
||||
{ //for each model in the lod
|
||||
S32 cur_tris = 0;
|
||||
S32 cur_verts = 0;
|
||||
S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces();
|
||||
for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter)
|
||||
{
|
||||
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
|
||||
{
|
||||
LLModel* model = instance->mModel;
|
||||
if (model)
|
||||
{
|
||||
//for each model in the lod
|
||||
S32 cur_tris = 0;
|
||||
S32 cur_verts = 0;
|
||||
S32 cur_submeshes = model->getNumVolumeFaces();
|
||||
|
||||
for (S32 j = 0; j < cur_submeshes; ++j)
|
||||
{ //for each submesh (face), add triangles and vertices to current total
|
||||
const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j);
|
||||
cur_tris += face.mNumIndices/3;
|
||||
cur_verts += face.mNumVertices;
|
||||
for (S32 j = 0; j < cur_submeshes; ++j)
|
||||
{ //for each submesh (face), add triangles and vertices to current total
|
||||
const LLVolumeFace& face = model->getVolumeFace(j);
|
||||
cur_tris += face.mNumIndices/3;
|
||||
cur_verts += face.mNumVertices;
|
||||
}
|
||||
|
||||
//add this model to the lod total
|
||||
total_tris[lod] += cur_tris;
|
||||
total_verts[lod] += cur_verts;
|
||||
total_submeshes[lod] += cur_submeshes;
|
||||
|
||||
//store this model's counts to asset data
|
||||
tris[lod].push_back(cur_tris);
|
||||
verts[lod].push_back(cur_verts);
|
||||
submeshes[lod].push_back(cur_submeshes);
|
||||
}
|
||||
}
|
||||
|
||||
//add this model to the lod total
|
||||
total_tris[lod] += cur_tris;
|
||||
total_verts[lod] += cur_verts;
|
||||
total_submeshes[lod] += cur_submeshes;
|
||||
|
||||
//store this model's counts to asset data
|
||||
tris[lod].push_back(cur_tris);
|
||||
verts[lod].push_back(cur_verts);
|
||||
submeshes[lod].push_back(cur_submeshes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4334,34 +4375,38 @@ void LLModelPreview::updateStatusMessages()
|
||||
}
|
||||
|
||||
//add up physics triangles etc
|
||||
S32 start = 0;
|
||||
S32 end = mModel[LLModel::LOD_PHYSICS].size();
|
||||
|
||||
S32 phys_tris = 0;
|
||||
S32 phys_hulls = 0;
|
||||
S32 phys_points = 0;
|
||||
|
||||
for (S32 i = start; i < end; ++i)
|
||||
{ //add up hulls and points and triangles for selected mesh(es)
|
||||
LLModel* model = mModel[LLModel::LOD_PHYSICS][i];
|
||||
S32 cur_submeshes = model->getNumVolumeFaces();
|
||||
|
||||
LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull;
|
||||
|
||||
if (!decomp.empty())
|
||||
//get the triangle count for the whole scene
|
||||
for (LLModelLoader::scene::iterator iter = mScene[LLModel::LOD_PHYSICS].begin(), endIter = mScene[LLModel::LOD_PHYSICS].end(); iter != endIter; ++iter)
|
||||
{
|
||||
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
|
||||
{
|
||||
phys_hulls += decomp.size();
|
||||
for (U32 i = 0; i < decomp.size(); ++i)
|
||||
LLModel* model = instance->mModel;
|
||||
if (model)
|
||||
{
|
||||
phys_points += decomp[i].size();
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //choose physics shape OR decomposition, can't use both
|
||||
for (S32 j = 0; j < cur_submeshes; ++j)
|
||||
{ //for each submesh (face), add triangles and vertices to current total
|
||||
const LLVolumeFace& face = model->getVolumeFace(j);
|
||||
phys_tris += face.mNumIndices/3;
|
||||
S32 cur_submeshes = model->getNumVolumeFaces();
|
||||
|
||||
LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull;
|
||||
|
||||
if (!decomp.empty())
|
||||
{
|
||||
phys_hulls += decomp.size();
|
||||
for (U32 i = 0; i < decomp.size(); ++i)
|
||||
{
|
||||
phys_points += decomp[i].size();
|
||||
}
|
||||
}
|
||||
else
|
||||
{ //choose physics shape OR decomposition, can't use both
|
||||
for (S32 j = 0; j < cur_submeshes; ++j)
|
||||
{ //for each submesh (face), add triangles and vertices to current total
|
||||
const LLVolumeFace& face = model->getVolumeFace(j);
|
||||
phys_tris += face.mNumIndices/3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4523,7 +4568,7 @@ void LLModelPreview::updateLodControls(S32 lod)
|
||||
if (!lod_combo) return;
|
||||
|
||||
S32 lod_mode = lod_combo->getCurrentIndex();
|
||||
if (lod_mode == 0) // LoD from file
|
||||
if (lod_mode == LOD_FROM_FILE) // LoD from file
|
||||
{
|
||||
fmp->mLODMode[lod] = 0;
|
||||
for (U32 i = 0; i < num_file_controls; ++i)
|
||||
@@ -4536,7 +4581,7 @@ void LLModelPreview::updateLodControls(S32 lod)
|
||||
mFMP->childHide(lod_controls[i] + lod_name[lod]);
|
||||
}
|
||||
}
|
||||
else if (lod_mode == 2) // use LoD above
|
||||
else if (lod_mode == USE_LOD_ABOVE) // use LoD above
|
||||
{
|
||||
fmp->mLODMode[lod] = 2;
|
||||
for (U32 i = 0; i < num_file_controls; ++i)
|
||||
|
||||
@@ -298,6 +298,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
|
||||
typedef boost::signals2::signal<void (void)> model_loaded_signal_t;
|
||||
typedef boost::signals2::signal<void (bool)> model_updated_signal_t;
|
||||
|
||||
public:
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LOD_FROM_FILE = 0,
|
||||
GENERATE,
|
||||
USE_LOD_ABOVE,
|
||||
} eLoDMode;
|
||||
|
||||
public:
|
||||
LLModelPreview(S32 width, S32 height, LLFloater* fmp);
|
||||
virtual ~LLModelPreview();
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
/**
|
||||
* @file llfloaterpermissionsmgr.cpp
|
||||
* @brief for user control of script permissions
|
||||
*
|
||||
* $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$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterpermissionsmgr.h"
|
||||
|
||||
#include "llscrollcontainer.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llbutton.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llstl.h"
|
||||
|
||||
// constants
|
||||
const S32 MIN_PERM_MGR_WIDTH = 100;
|
||||
const S32 MIN_PERM_MGR_HEIGHT = 100;
|
||||
const S32 VPAD = 8;
|
||||
const S32 HPAD = 8;
|
||||
const S32 LINE = 16;
|
||||
|
||||
// statics
|
||||
LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::sInstance = NULL;
|
||||
|
||||
LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::show()
|
||||
{
|
||||
if (!sInstance)
|
||||
{
|
||||
sInstance = new LLFloaterPermissionsMgr();
|
||||
|
||||
sInstance->open(); /* Flawfinder: ignore */
|
||||
gFloaterView->adjustToFitScreen(sInstance, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance->open(); /* Flawfinder: ignore */
|
||||
}
|
||||
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
void LLFloaterPermissionsMgr::processPermissionsList(LLMessageSystem* msg, void**)
|
||||
{
|
||||
}
|
||||
|
||||
LLFloaterPermissionsMgr::LLFloaterPermissionsMgr() :
|
||||
LLFloater(std::string("floater_perm_mgr"), std::string("PermissionsManagerRect"), std::string("Permissions Manager"),
|
||||
TRUE, MIN_PERM_MGR_WIDTH, MIN_PERM_MGR_HEIGHT)
|
||||
{
|
||||
S32 y = getRect().getHeight() - VPAD - LINE;
|
||||
LLRect scrollable_container_rect(0, y, getRect().getWidth(), 0);
|
||||
LLRect permissions_rect(0, 0, getRect().getWidth() - HPAD - HPAD, 0);
|
||||
mPermissions = new LLPermissionsView(permissions_rect);
|
||||
mScroller = new LLScrollContainer(
|
||||
std::string("permissions container"),
|
||||
scrollable_container_rect,
|
||||
mPermissions
|
||||
);
|
||||
mScroller->setFollowsAll();
|
||||
mScroller->setReserveScrollCorner(TRUE);
|
||||
addChild(mScroller);
|
||||
}
|
||||
|
||||
LLFloaterPermissionsMgr::~LLFloaterPermissionsMgr()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// LLPermissionsView
|
||||
//
|
||||
|
||||
LLPermissionsView::LLPermissionsView(const LLRect &rect) : LLView(std::string("permissions_view"), rect, TRUE, FOLLOWS_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
void LLPermissionsView::clearPermissionsData()
|
||||
{
|
||||
deleteAllChildren();
|
||||
}
|
||||
|
||||
void LLPermissionsView::addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags)
|
||||
{
|
||||
// grow to make room for new element
|
||||
reshape(getRect().getWidth(), getRect().getHeight() + LINE + VPAD + BTN_HEIGHT + VPAD);
|
||||
S32 y = getRect().getHeight() - LINE - VPAD;
|
||||
LLRect label_rect(HPAD, y + LINE, getRect().getWidth(), y);
|
||||
LLTextBox* text = new LLTextBox(std::string("perm_label"), label_rect, object_name);
|
||||
text->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
|
||||
addChild(text);
|
||||
|
||||
y -= LINE + VPAD;
|
||||
|
||||
LLRect btn_rect(HPAD, y + BTN_HEIGHT, 120, y);
|
||||
LLButton* button = new LLButton(std::string("Revoke permissions"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::revokePermissions, object_id, permissions_flags));
|
||||
button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
|
||||
addChild(button);
|
||||
|
||||
/*btn_rect.set(HPAD + 120 + HPAD, y + BTN_HEIGHT, HPAD + 120 + HPAD + 120, y);
|
||||
button = new LLButton(std::string("Find in world"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::findObject, object_id, permissions_flags));
|
||||
button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
|
||||
addChild(button);*/
|
||||
}
|
||||
|
||||
void LLPermissionsView::revokePermissions(const LLUUID& object_id, U32 permission_flags)
|
||||
{
|
||||
LLViewerObject* objectp = gObjectList.findObject(object_id);
|
||||
if (objectp)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_RevokePermissions);
|
||||
msg->nextBlockFast(_PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->nextBlockFast(_PREHASH_Data);
|
||||
msg->addUUIDFast(_PREHASH_ObjectID, object_id);
|
||||
msg->addU32Fast(_PREHASH_ObjectPermissions, permission_flags);
|
||||
msg->sendReliable(objectp->getRegion()->getHost());
|
||||
}
|
||||
}
|
||||
|
||||
/*void LLPermissionsView::findObject(const LLUUID& object_id, U32 permission_flags)
|
||||
{
|
||||
}*/
|
||||
@@ -1,82 +0,0 @@
|
||||
/**
|
||||
* @file llfloaterpermissionsmgr.h
|
||||
* @brief for user control of script permissions
|
||||
*
|
||||
* $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_LLFLOATERPERMISSIONSMGR_H
|
||||
#define LL_LLFLOATERPERMISSIONSMGR_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include <vector>
|
||||
|
||||
class LLScrollContainer;
|
||||
class LLPermissionsView;
|
||||
|
||||
class LLFloaterPermissionsMgr
|
||||
: public LLFloater
|
||||
{
|
||||
public:
|
||||
static LLFloaterPermissionsMgr* show();
|
||||
|
||||
// Message system callbacks
|
||||
static void processPermissionsList(LLMessageSystem* msg, void**);
|
||||
|
||||
virtual void onClose(bool app_quitting) { setVisible(FALSE); }
|
||||
|
||||
private:
|
||||
// Must construct by calling show().
|
||||
LLFloaterPermissionsMgr();
|
||||
virtual ~LLFloaterPermissionsMgr();
|
||||
|
||||
public:
|
||||
LLPermissionsView* mPermissions;
|
||||
|
||||
protected:
|
||||
LLScrollContainer* mScroller;
|
||||
|
||||
static LLFloaterPermissionsMgr* sInstance;
|
||||
};
|
||||
|
||||
class LLPermissionsView : public LLView
|
||||
{
|
||||
public:
|
||||
LLPermissionsView(const LLRect& rect);
|
||||
virtual ~LLPermissionsView() {};
|
||||
|
||||
public:
|
||||
void clearPermissionsData();
|
||||
void addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags);
|
||||
|
||||
static void revokePermissions(const LLUUID& object_id, U32 permission_flags);
|
||||
//static void findObject(const LLUUID& object_id, U32 permission_flags);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,332 +0,0 @@
|
||||
/**
|
||||
* @file llfloaterteleport.cpp
|
||||
* @brief floater code for agentd teleports.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2008, 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$
|
||||
*/
|
||||
//Teleport floater used for agent domain TP. URI text floater.
|
||||
//Copyright International Business Machines Corporation 2008-9
|
||||
//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution
|
||||
//Agreement and licensed as above.
|
||||
#include "llviewerprecompiledheaders.h" // must be first include
|
||||
|
||||
#include "llfloaterteleport.h"
|
||||
|
||||
#include "llagent.h" //for hack in teleport start
|
||||
#include "llchat.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "lluictrlfactory.h" // builds floaters from XML
|
||||
#include "llurlhistory.h"
|
||||
#include "lluserauth.h" // for saving placeavatarresponder result
|
||||
#include "llviewercontrol.h" // for gSavedSettings
|
||||
#include "llviewerdisplay.h" // for gTeleportDisplay
|
||||
#include "llviewermessage.h" // for send_agent_movement_complete attempt
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerwindow.h" // for hack in teleport start
|
||||
#include "llvoavatar.h"
|
||||
#include "llworld.h"
|
||||
#include "pipeline.h" // for gPipeline
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
extern AIHTTPTimeoutPolicy placeAvatarTeleportResponder_timeout;
|
||||
|
||||
// OGPX HTTP responder for PlaceAvatar cap used for Teleport
|
||||
// very similar to the responder in Login, but not as many fields are returned in the TP version
|
||||
// OGPX TODO: should this be combined with the Login responder for rez_avatar/place?
|
||||
// OGPX TODO: mResult should not get replaced in result(), instead
|
||||
// should replace individual LLSD fields in mResult.
|
||||
class LLPlaceAvatarTeleportResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
public:
|
||||
LLPlaceAvatarTeleportResponder()
|
||||
{
|
||||
}
|
||||
|
||||
~LLPlaceAvatarTeleportResponder()
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
{
|
||||
LL_INFOS("OGPX") << "LLPlaceAvatarTeleportResponder error in TP "
|
||||
<< statusNum << " " << reason << LL_ENDL;
|
||||
|
||||
LLSD args;
|
||||
args["REASON"] = reason;
|
||||
|
||||
|
||||
LLNotificationsUtil::add("CouldNotTeleportReason", args);
|
||||
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
{
|
||||
|
||||
LLSD result;
|
||||
result["agent_id"] = content["agent_id"]; // need this for send_complete_agent_movement
|
||||
result["region_x"] = content["region_x"]; // need these for making the first region
|
||||
result["region_y"] = content["region_y"];
|
||||
result["login"] = "true"; // this gets checked in idle_startup()
|
||||
result["session_id"] = content["session_id"];
|
||||
result["secure_session_id"] = content["secure_session_id"];
|
||||
result["circuit_code"] = content["circuit_code"];
|
||||
result["sim_port"] = content["sim_port"];
|
||||
result["sim_host"] = content["sim_host"];
|
||||
result["look_at"] = content["look_at"];
|
||||
// maintaining result seed_capability name for compatibility with legacy login
|
||||
result["seed_capability"] = content["region_seed_capability"];
|
||||
result["position"] = content["position"]; // save this for agentmovementcomplete type processing
|
||||
|
||||
// Even though we have the pretty print of the complete content returned, we still find it handy
|
||||
// when scanning SecondLife.log to have these laid out in this way. So they are still here.
|
||||
LL_DEBUGS("OGPX") << " Teleport placeAvatar responder " << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "agent_id: " << content["agent_id"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "region_x: " << content["region_x"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "session_id: " << content["session_id"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "sim_port: " << content["sim_port"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "sim_host: " << content["sim_host"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "look_at: " << content["look_at"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "position: " << content["position"] << LL_ENDL;
|
||||
LL_DEBUGS("OGPX") << "seed_capability: " << content["region_seed_capability"] << LL_ENDL;
|
||||
|
||||
LL_INFOS("OGPX") << " All the LLSD PlaceAvatarTeleportResponder content: \n " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX
|
||||
|
||||
|
||||
// check "connect" to make sure place_avatar fully successful
|
||||
if (!content["connect"].asBoolean())
|
||||
{
|
||||
// place_avatar failed somewhere
|
||||
LL_INFOS("OGPX") << "TP failed, connect false in TP PlaceAvatarResponder " << LL_ENDL;
|
||||
|
||||
LLSD args;
|
||||
args["REASON"] = "Place Avatar Failed";
|
||||
|
||||
//gViewerWindow->alertXml("CouldNotTeleportReason", args);
|
||||
LLNotificationsUtil::add("CouldNotTeleportReason",args);
|
||||
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
U64 region_handle;
|
||||
region_handle = to_region_handle_global(content["region_x"].asInteger(), content["region_y"].asInteger());
|
||||
|
||||
LLHost sim_host;
|
||||
U32 sim_port = strtoul(result["sim_port"].asString().c_str(), NULL, 10);
|
||||
sim_host.setHostByName(result["sim_host"].asString().c_str());
|
||||
sim_host.setPort(sim_port);
|
||||
|
||||
if (sim_host.isOk())
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
gMessageSystem->enableCircuit(sim_host, TRUE);
|
||||
msg->newMessageFast(_PREHASH_UseCircuitCode);
|
||||
msg->nextBlockFast(_PREHASH_CircuitCode);
|
||||
msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
|
||||
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
|
||||
msg->sendReliable(sim_host);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("OGPX") << "TP failed, could not resolve hostname for UDP messages." << LL_ENDL;
|
||||
LLSD args;
|
||||
args["REASON"] = "Failed to resolve host.";
|
||||
//gViewerWindow->alertXml("CouldNotTeleportReason", args);
|
||||
LLNotificationsUtil::add("CouldNotTeleportReason", args);
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Viewer trusts the simulator.
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
regionp->setSeedCapability(content["seed_capability"].asString().c_str());
|
||||
// process_agent_movement_complete needs the region to still be the old region gAgent.setRegion(regionp);
|
||||
|
||||
// placing these in result so they can be set properly in LLUserAuth result
|
||||
// ...they are only passed in on login, and not on TP
|
||||
result["session_id"] = gAgent.getSessionID();
|
||||
result["agent_id"] = gAgent.getID();
|
||||
result["circuit_code"].asString() = gMessageSystem->mOurCircuitCode; // this is what startup sets, is this proper to do?
|
||||
|
||||
// grab the skeleton and root.
|
||||
result["inventory-skeleton"] = LLUserAuth::getInstance()->mResult["inventory-skeleton"];
|
||||
result["inventory-root"] = LLUserAuth::getInstance()->mResult["inventory-root"];
|
||||
|
||||
LL_DEBUGS("OGPX") << "session_id: " << result["session_id"] << LL_ENDL;
|
||||
|
||||
|
||||
|
||||
// results need to be stored so process_agent_movement_complete() can pull them
|
||||
LLUserAuth::getInstance()->mAuthResponse = LLUserAuth::E_OK;
|
||||
|
||||
// OGPX TODO: This just reeks of causing problems, because we are using
|
||||
// ... mResult to store things that we get from other caps....So slamming a
|
||||
// ... completely new result in on teleport is going to cause issues.
|
||||
// ... It makes changing the things we save in mResult error prone.
|
||||
// ... Question is, how should we really be storing the seemingly random things
|
||||
// ... that we get back from (now) various different caps that used to all come back
|
||||
// ... in the result of XMLRPC authenticate?
|
||||
LLUserAuth::getInstance()->mResult = result;
|
||||
|
||||
|
||||
|
||||
// ... new sim not sending me much without sending it CompleteAgentMovement msg.
|
||||
//gAgent.setTeleportState( LLAgent::TELEPORT_MOVING ); // process_agent_mv_complete looks for TELEPORT_MOVING
|
||||
LLVector3 position = ll_vector3_from_sd(result["position"]);
|
||||
gAgent.setHomePosRegion(region_handle, position); // taken from teleport_finish (not sure regular code path gets this)
|
||||
|
||||
send_complete_agent_movement(sim_host);
|
||||
|
||||
// Turn off progress msg (also need to do this in all the possible failure places)
|
||||
// I think we leave this, as the scene is still changing during the
|
||||
// processing of agentmovementcomeplete message. TELEPORT_NONE resets it anyway
|
||||
// gViewerWindow->setShowProgress(FALSE);
|
||||
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return placeAvatarTeleportResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLPlaceAvatarTeleportResponder"; }
|
||||
};
|
||||
|
||||
// Statics
|
||||
LLFloaterTeleport* LLFloaterTeleport::sInstance = NULL;
|
||||
|
||||
LLFloaterTeleport::LLFloaterTeleport()
|
||||
: LLFloater("floater_teleport")
|
||||
{
|
||||
if(!sInstance)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_teleport.xml");
|
||||
|
||||
LLComboBox* regioncombo = getChild<LLComboBox>("teleport_edit");
|
||||
regioncombo->setAllowTextEntry(TRUE, 256, FALSE); // URL bar needs to allow user text input
|
||||
|
||||
// iterate on uri list adding to combobox (couldn't figure out how to add them all in one call)
|
||||
LLSD regionuri_history = LLURLHistory::getURLHistory("regionuri");
|
||||
LLSD::array_iterator iter_history = regionuri_history.beginArray();
|
||||
LLSD::array_iterator iter_end = regionuri_history.endArray();
|
||||
for(; iter_history != iter_end; ++iter_history)
|
||||
{
|
||||
regioncombo->addSimpleElement((*iter_history).asString());
|
||||
}
|
||||
|
||||
// select which is displayed if we have a current URL.
|
||||
regioncombo->setSelectedByValue(LLSD(gSavedSettings.getString("CmdLineRegionURI")),TRUE);
|
||||
|
||||
// TODO : decide if 'enter' when selecting something from the combox box should *not* be sent
|
||||
// to the floater (p.s. and figure out how to change it)
|
||||
|
||||
childSetAction("teleport_btn", onClickTeleport, this);
|
||||
childSetAction("cancel_btn", onClickCancel, this);
|
||||
|
||||
setDefaultBtn("teleport_btn");
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance->show(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTeleport::show(void*)
|
||||
{
|
||||
if (!sInstance)
|
||||
{
|
||||
sInstance = new LLFloaterTeleport();
|
||||
}
|
||||
|
||||
sInstance->open();
|
||||
}
|
||||
|
||||
LLFloaterTeleport::~LLFloaterTeleport()
|
||||
{
|
||||
sInstance=NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterTeleport::onClickTeleport(void* userdata)
|
||||
{
|
||||
std::string placeAvatarCap = LLAppViewer::instance()->getPlaceAvatarCap();
|
||||
LLSD args;
|
||||
|
||||
LLFloaterTeleport* self = (LLFloaterTeleport*)userdata;
|
||||
std::string text = self->childGetText("teleport_edit");
|
||||
if (text.find("://",0) == std::string::npos)
|
||||
{
|
||||
// if there is no uri, prepend it with http://
|
||||
text = "http://"+text;
|
||||
LL_DEBUGS("OGPX") << "Teleport URI was prepended, now " << text << LL_ENDL;
|
||||
}
|
||||
|
||||
LL_DEBUGS("OGPX") << "onClickTeleport! from using place_avatar cap "<< placeAvatarCap << " contains "<< text << LL_ENDL;
|
||||
LLStringUtil::trim(text); // trim extra spacing
|
||||
gAgent.setTeleportSourceURL(gSavedSettings.getString("CmdLineRegionURI")); // grab src region name
|
||||
gSavedSettings.setString("CmdLineRegionURI",text); // save the dst region
|
||||
args["public_region_seed_capability"] = text;
|
||||
args["position"] = ll_sd_from_vector3(LLVector3(128, 128, 50)); // default to middle of region above base terrain
|
||||
LL_INFOS("OGPX") << " args to placeavatar cap " << placeAvatarCap << " on teleport: " << LLSDOStreamer<LLSDXMLFormatter>(args) << LL_ENDL;
|
||||
LLHTTPClient::post(placeAvatarCap, args, new LLPlaceAvatarTeleportResponder());
|
||||
gAgent.setTeleportMessage(
|
||||
LLAgent::sTeleportProgressMessages["requesting"]);
|
||||
gViewerWindow->setShowProgress(TRUE);
|
||||
gAgent.teleportCore();
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_PLACE_AVATAR ); // teleportcore() sets tp state to legacy path, so reset. ick!
|
||||
gTeleportDisplayTimer.reset();
|
||||
|
||||
|
||||
|
||||
self->setVisible(FALSE);
|
||||
if ( LLURLHistory::appendToURLCollection("regionuri",text))
|
||||
{
|
||||
// since URL history only populated on create of sInstance, add to combo list directly
|
||||
LLComboBox* regioncombo = self->getChild<LLComboBox>("teleport_edit");
|
||||
// BUG : this should add the new item to the combo box, but doesn't
|
||||
regioncombo->addSimpleElement(text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLFloaterTeleport::onClickCancel(void *userdata)
|
||||
{
|
||||
LLFloaterTeleport* self = (LLFloaterTeleport*)userdata;
|
||||
LL_INFOS("OGPX") << "Teleport Cancel " << self->getName() << LL_ENDL;
|
||||
self->setVisible(FALSE);
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/**
|
||||
* @file llfloaterteleport.h
|
||||
* @brief floater header for agentd teleports.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2008, 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$
|
||||
*/
|
||||
// Teleport floater for agent domain TPs using URIs.
|
||||
//Copyright International Business Machines Corporation 2008-9
|
||||
//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution
|
||||
//Agreement and licensed as above.
|
||||
#ifndef LL_FLOATER_TELEPORT_H
|
||||
#define LL_FLOATER_TELEPORT_H
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLFloaterTeleport : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterTeleport();
|
||||
|
||||
virtual ~LLFloaterTeleport();
|
||||
|
||||
// by convention, this shows the floater and does instance management
|
||||
static void show(void*);
|
||||
|
||||
private:
|
||||
// when a line editor loses keyboard focus, it is committed.
|
||||
// commit callbacks are named onCommitWidgetName by convention.
|
||||
static void onCommitTeleport(LLUICtrl* ctrl, void *userdata);
|
||||
|
||||
// by convention, button callbacks are named onClickButtonLabel
|
||||
static void onClickTeleport(void* userdata);
|
||||
static void onClickCancel(void *userdata);
|
||||
|
||||
// no pointers to widgets here - they are referenced by name
|
||||
|
||||
// assuming we just need one, which is typical
|
||||
static LLFloaterTeleport* sInstance;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "ascentkeyword.h"
|
||||
#include "llagent.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llbutton.h"
|
||||
@@ -466,6 +467,7 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
LLAvatarNameCache::get(mOtherParticipantUUID, boost::bind(&LLFloaterIMPanel::onAvatarNameLookup, this, _2));
|
||||
|
||||
mInputEditor = getChild<LLLineEditor>("chat_editor");
|
||||
mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
|
||||
mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) );
|
||||
mFocusLostSignal = mInputEditor->setFocusLostCallback(boost::bind(&LLFloaterIMPanel::setTyping, this, false));
|
||||
mInputEditor->setKeystrokeCallback( boost::bind(&LLFloaterIMPanel::onInputEditorKeystroke, this, _1) );
|
||||
@@ -969,7 +971,7 @@ void copy_profile_uri(const LLUUID& id, bool group = false);
|
||||
|
||||
void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
||||
{
|
||||
if (value.isUndefined())
|
||||
if (value.isUndefined() || value.asInteger() == 0)
|
||||
{
|
||||
LLAvatarActions::showProfile(mOtherParticipantUUID);
|
||||
return;
|
||||
|
||||
@@ -2112,25 +2112,6 @@ bool LLInventoryModel::loadSkeleton(
|
||||
return rv;
|
||||
}
|
||||
|
||||
//OGPX crap. Since this function is actually functionally the same as its LLSD variant..
|
||||
// just convert options_t to LLSD and route to the LLSD version. Yuck.
|
||||
bool LLInventoryModel::loadSkeleton(
|
||||
const LLInventoryModel::options_t& options,
|
||||
const LLUUID& owner_id)
|
||||
{
|
||||
LLSD options_list;
|
||||
for(options_t::const_iterator it = options.begin(); it < options.end(); ++it)
|
||||
{
|
||||
LLSD entry;
|
||||
for(response_t::const_iterator it2 = it->begin(); it2 != it->end(); ++it2)
|
||||
{
|
||||
entry[it2->first]=it2->second;
|
||||
}
|
||||
options_list.append(entry);
|
||||
}
|
||||
return loadSkeleton(options_list,owner_id);
|
||||
}
|
||||
|
||||
// This is a brute force method to rebuild the entire parent-child
|
||||
// relations. The overall operation has O(NlogN) performance, which
|
||||
// should be sufficient for our needs.
|
||||
|
||||
@@ -409,14 +409,6 @@ public:
|
||||
void addCategory(LLViewerInventoryCategory* category);
|
||||
void addItem(LLViewerInventoryItem* item);
|
||||
|
||||
// methods to load up inventory skeleton & meat. These are used
|
||||
// during authentication. return true if everything parsed.
|
||||
typedef std::map<std::string, std::string> response_t;
|
||||
typedef std::vector<response_t> options_t;
|
||||
|
||||
|
||||
//OGPX really screwed with the login process. This is needed until it's all sorted out.
|
||||
bool loadSkeleton(const options_t& options, const LLUUID& owner_id);
|
||||
/** Mutators
|
||||
** **
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "llfasttimerview.h"
|
||||
#include "llfloaterabout.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloaterautoreplacesettings.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
@@ -219,6 +220,7 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
registerFloater<LLFloaterRegionInfo> ("about region");
|
||||
registerFloater<LLFloaterActiveSpeakers> ("active speakers");
|
||||
registerFloater<JCFloaterAreaSearch> ("areasearch");
|
||||
registerFloater<LLFloaterAutoReplaceSettings> ("autoreplace");
|
||||
registerFloater<LLFloaterBeacons> ("beacons");
|
||||
registerFloater<LLFloaterCamera> ("camera controls");
|
||||
registerFloater<LLFloaterChat> ("chat history");
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
#include "llui.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llurlhistory.h" // OGPX : regionuri text box has a history of region uris (if FN/LN are loaded at startup)
|
||||
#include "llviewerbuild.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewermenu.h" // for handle_preferences()
|
||||
#include "llviewernetwork.h"
|
||||
@@ -254,7 +253,7 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect)
|
||||
gVersionMajor,
|
||||
gVersionMinor,
|
||||
gVersionPatch,
|
||||
LL_VIEWER_BUILD );
|
||||
gVersionBuild );
|
||||
LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
|
||||
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
|
||||
channel_text->setTextArg("[VERSION]", version);
|
||||
|
||||
@@ -58,24 +58,30 @@
|
||||
|
||||
#if LL_DARWIN
|
||||
|
||||
#include "llresizehandle.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llresizehandle.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
// This class draws like an LLResizeHandle but has no interactivity.
|
||||
// It's just there to provide a cue to the user that the lower right corner of the window functions as a resize handle.
|
||||
class LLFakeResizeHandle : public LLResizeHandle
|
||||
// This class draws like an LLResizeHandle but has no interactivity.
|
||||
// It's just there to provide a cue to the user that the lower right corner of the window functions as a resize handle.
|
||||
class LLFakeResizeHandle : public LLResizeHandle
|
||||
{
|
||||
public:
|
||||
LLFakeResizeHandle(const LLResizeHandle::Params& p) : LLResizeHandle(p) {}
|
||||
|
||||
virtual BOOL handleHover(S32 x, S32 y, MASK mask) { return false; }
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return false; }
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) { return false; }
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
public:
|
||||
LLFakeResizeHandle(const LLResizeHandle::Params& p)
|
||||
: LLResizeHandle(p)
|
||||
{
|
||||
}
|
||||
// Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar.
|
||||
if (gViewerWindow->getWindow()->getFullscreen())
|
||||
return setVisible(false);
|
||||
|
||||
virtual BOOL handleHover(S32 x, S32 y, MASK mask) { return FALSE; };
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) { return FALSE; };
|
||||
|
||||
};
|
||||
setVisible(true);
|
||||
const F32 wide(gViewerWindow->getWindowWidth() + 2);
|
||||
setRect(LLRect(wide - RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT, wide, 0));
|
||||
}
|
||||
};
|
||||
|
||||
#endif // LL_DARWIN
|
||||
|
||||
@@ -98,9 +104,6 @@ void show_floater(const std::string& floater_name);
|
||||
|
||||
LLToolBar::LLToolBar()
|
||||
: LLLayoutPanel()
|
||||
#if LL_DARWIN
|
||||
, mResizeHandle(NULL)
|
||||
#endif // LL_DARWIN
|
||||
{
|
||||
setIsChrome(TRUE);
|
||||
setFocusRoot(TRUE);
|
||||
@@ -130,22 +133,16 @@ BOOL LLToolBar::postBuild()
|
||||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
if(mResizeHandle == NULL)
|
||||
{
|
||||
LLResizeHandle::Params p;
|
||||
p.rect(LLRect(0, 0, RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT));
|
||||
p.name(std::string(""));
|
||||
p.min_width(RESIZE_HANDLE_WIDTH);
|
||||
p.min_height(RESIZE_HANDLE_HEIGHT);
|
||||
p.corner(LLResizeHandle::RIGHT_BOTTOM);
|
||||
mResizeHandle = new LLFakeResizeHandle(p); this->addChildInBack(mResizeHandle);
|
||||
LLLayoutStack* toolbar_stack = getChild<LLLayoutStack>("toolbar_stack");
|
||||
toolbar_stack->reshape(toolbar_stack->getRect().getWidth() - RESIZE_HANDLE_WIDTH, toolbar_stack->getRect().getHeight());
|
||||
}
|
||||
LLResizeHandle::Params p;
|
||||
p.rect(LLRect(0, 0, RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT));
|
||||
p.name(std::string(""));
|
||||
p.min_width(RESIZE_HANDLE_WIDTH);
|
||||
p.min_height(RESIZE_HANDLE_HEIGHT);
|
||||
p.corner(LLResizeHandle::RIGHT_BOTTOM);
|
||||
addChildInBack(new LLFakeResizeHandle(p));
|
||||
reshape(getRect().getWidth(), getRect().getHeight());
|
||||
#endif // LL_DARWIN
|
||||
|
||||
layoutButtons();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -161,18 +158,18 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
|
||||
LLButton* inventory_btn = mInventoryBtn;
|
||||
if (!inventory_btn || !inventory_btn->getVisible()) return FALSE;
|
||||
|
||||
LLInventoryView* active_inventory = LLInventoryView::getActiveInventory();
|
||||
|
||||
if (active_inventory && active_inventory->getVisible())
|
||||
{
|
||||
mInventoryAutoOpen = FALSE;
|
||||
mInventoryAutoOpenTimer.stop();
|
||||
}
|
||||
else if (inventory_btn->getRect().pointInRect(x, y))
|
||||
{
|
||||
if (mInventoryAutoOpen)
|
||||
if (mInventoryAutoOpenTimer.getStarted())
|
||||
{
|
||||
if (!(active_inventory && active_inventory->getVisible()) &&
|
||||
mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
|
||||
@@ -182,71 +179,35 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
}
|
||||
else
|
||||
{
|
||||
mInventoryAutoOpen = TRUE;
|
||||
mInventoryAutoOpenTimer.reset();
|
||||
mInventoryAutoOpenTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
return LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
|
||||
}
|
||||
|
||||
void LLToolBar::layoutButtons()
|
||||
{
|
||||
#if LL_DARWIN
|
||||
const S32 FUDGE_WIDTH_OF_SCREEN = 4;
|
||||
S32 width = gViewerWindow->getWindowWidth() + FUDGE_WIDTH_OF_SCREEN;
|
||||
S32 pad = 2;
|
||||
|
||||
// this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet.
|
||||
if(mResizeHandle != NULL)
|
||||
{
|
||||
if(!gViewerWindow->getWindow()->getFullscreen())
|
||||
{
|
||||
// Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar.
|
||||
width -= RESIZE_HANDLE_WIDTH;
|
||||
|
||||
LLRect r;
|
||||
r.mLeft = width - pad;
|
||||
r.mBottom = 0;
|
||||
r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH;
|
||||
r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT;
|
||||
mResizeHandle->setRect(r);
|
||||
mResizeHandle->setVisible(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
mResizeHandle->setVisible(FALSE);
|
||||
}
|
||||
}
|
||||
#endif // LL_DARWIN
|
||||
}
|
||||
|
||||
|
||||
// virtual
|
||||
void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
LLPanel::reshape(width, height, called_from_parent);
|
||||
|
||||
layoutButtons();
|
||||
}
|
||||
|
||||
|
||||
// Per-frame updates of visibility
|
||||
void LLToolBar::refresh()
|
||||
{
|
||||
if(!isAgentAvatarValid())
|
||||
return;
|
||||
static const LLCachedControl<bool> show_toolbar("ShowToolBar", true);
|
||||
bool show = show_toolbar;
|
||||
if (show && gAgentCamera.cameraMouselook())
|
||||
{
|
||||
static const LLCachedControl<bool> hidden("LiruMouselookHidesToolbar");
|
||||
show = !hidden;
|
||||
}
|
||||
setVisible(show);
|
||||
if (!show) return; // Everything below this point manipulates visible UI, anyway
|
||||
|
||||
static LLCachedControl<bool> show("ShowToolBar", true);
|
||||
BOOL mouselook = gAgentCamera.cameraMouselook();
|
||||
setVisible(show && !mouselook);
|
||||
updateCommunicateList();
|
||||
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
bool sitting = !continue_flying_on_unsit && gAgentAvatarp && gAgentAvatarp->isSitting();
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
mFlyBtn->setEnabled((gAgent.canFly() || gAgent.getFlying()) && !sitting );
|
||||
static LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
|
||||
mBuildBtn->setEnabled((LLViewerParcelMgr::getInstance()->allowAgentBuild() || ascent_build_always_enabled));
|
||||
static const LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
mFlyBtn->setEnabled((gAgent.canFly() || gAgent.getFlying()) && (continue_flying_on_unsit || !gAgentAvatarp->isSitting()));
|
||||
static const LLCachedControl<bool> ascent_build_always_enabled("AscentBuildAlwaysEnabled", true);
|
||||
mBuildBtn->setEnabled(ascent_build_always_enabled || LLViewerParcelMgr::getInstance()->allowAgentBuild());
|
||||
|
||||
// Check to see if we're in build mode
|
||||
// And not just clicking on a scripted object
|
||||
@@ -268,11 +229,6 @@ void LLToolBar::refresh()
|
||||
mInventoryBtn->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if (isInVisibleChain() && mCommunicateBtn->getVisible())
|
||||
{
|
||||
updateCommunicateList();
|
||||
}
|
||||
}
|
||||
|
||||
void bold_if_equal(const LLFloater* f1, const LLFloater* f2, LLScrollListItem* itemp)
|
||||
@@ -283,11 +239,13 @@ void bold_if_equal(const LLFloater* f1, const LLFloater* f2, LLScrollListItem* i
|
||||
|
||||
void LLToolBar::updateCommunicateList()
|
||||
{
|
||||
if (!mCommunicateBtn->getVisible()) return;
|
||||
|
||||
LLSD selected = mCommunicateBtn->getValue();
|
||||
|
||||
mCommunicateBtn->removeall();
|
||||
|
||||
LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
|
||||
const LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
|
||||
bold_if_equal(LLFloaterMyFriends::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP));
|
||||
bold_if_equal(LLFloaterChat::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP));
|
||||
mCommunicateBtn->addSeparator(ADD_TOP);
|
||||
@@ -300,11 +258,11 @@ void LLToolBar::updateCommunicateList()
|
||||
{
|
||||
if (LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get())
|
||||
{
|
||||
S32 count = im_floaterp->getNumUnreadMessages();
|
||||
const S32 count = im_floaterp->getNumUnreadMessages();
|
||||
std::string floater_title;
|
||||
if (count > 0) floater_title = "*";
|
||||
floater_title.append(im_floaterp->getShortTitle());
|
||||
static LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
|
||||
static const LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
|
||||
if (show_counts && count > 0)
|
||||
{
|
||||
floater_title += " - ";
|
||||
@@ -323,7 +281,8 @@ void LLToolBar::updateCommunicateList()
|
||||
}
|
||||
}
|
||||
|
||||
mCommunicateBtn->setToggleState(gSavedSettings.getBOOL("ShowCommunicate"));
|
||||
static const LLCachedControl<bool> show_comm("ShowCommunicate", true);
|
||||
mCommunicateBtn->setToggleState(show_comm);
|
||||
if (!selected.isUndefined()) mCommunicateBtn->setValue(selected);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
// "Constants" loaded from settings.xml at start time
|
||||
extern S32 TOOL_BAR_HEIGHT;
|
||||
|
||||
#if LL_DARWIN
|
||||
class LLFakeResizeHandle;
|
||||
#endif // LL_DARWIN
|
||||
|
||||
class LLFlyoutButton;
|
||||
|
||||
class LLToolBar
|
||||
@@ -62,11 +58,6 @@ public:
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
|
||||
// Move buttons to appropriate locations based on rect.
|
||||
void layoutButtons();
|
||||
|
||||
// Per-frame refresh call
|
||||
void refresh();
|
||||
|
||||
@@ -79,12 +70,8 @@ private:
|
||||
void updateCommunicateList();
|
||||
|
||||
private:
|
||||
BOOL mInventoryAutoOpen;
|
||||
LLFrameTimer mInventoryAutoOpenTimer;
|
||||
S32 mNumUnreadIMs;
|
||||
#if LL_DARWIN
|
||||
LLFakeResizeHandle *mResizeHandle;
|
||||
#endif // LL_DARWIN
|
||||
|
||||
CachedUICtrl<LLFlyoutButton> mCommunicateBtn;
|
||||
CachedUICtrl<LLButton> mFlyBtn;
|
||||
|
||||
@@ -106,39 +106,6 @@ LLSD LLURLHistory::getURLHistory(const std::string& collection)
|
||||
return LLSD();
|
||||
}
|
||||
|
||||
// OGPX : static function that appends unique values to existing collection.
|
||||
// returns true if appended, else false.
|
||||
BOOL LLURLHistory::appendToURLCollection(const std::string& collection, const std::string& url)
|
||||
{
|
||||
if (!url.empty())
|
||||
{
|
||||
BOOL found_current_url = FALSE;
|
||||
// make room for the new url if needed
|
||||
// always append to the end and remove from the front so you have the most recent.
|
||||
if (sHistorySD[collection].size() >= MAX_URL_COUNT)
|
||||
{
|
||||
sHistorySD[collection].erase(0);
|
||||
}
|
||||
|
||||
LLSD::array_iterator iter_history = sHistorySD[collection].beginArray();
|
||||
LLSD::array_iterator iter_end = sHistorySD[collection].endArray();
|
||||
for (; iter_history != iter_end; ++iter_history)
|
||||
{
|
||||
if ((*iter_history).asString() == url)
|
||||
{
|
||||
found_current_url = TRUE;
|
||||
}
|
||||
}
|
||||
if (!found_current_url )
|
||||
{
|
||||
sHistorySD[collection].append(LLSD(url));
|
||||
LLURLHistory::limitSize(collection);
|
||||
//llinfos << " appending XX" << url << "XX urlcollection: " << LLSDOStreamer<LLSDXMLFormatter>(sHistorySD) << llendl;
|
||||
return TRUE; // value was unique, needed to be inserted
|
||||
}
|
||||
}
|
||||
return FALSE; // value was empty or already in the collection
|
||||
}
|
||||
// static
|
||||
void LLURLHistory::addURL(const std::string& collection, const std::string& url)
|
||||
{
|
||||
|
||||
@@ -49,9 +49,6 @@ public:
|
||||
static LLSD getURLHistory(const std::string& collection);
|
||||
|
||||
static void addURL(const std::string& collection, const std::string& url);
|
||||
// OGPX appends url to a collection if it doesn't already exist in the collection.
|
||||
// this is used in the collection of region URIs that are saved per region
|
||||
static BOOL appendToURLCollection(const std::string& collection, const std::string& url);
|
||||
static void removeURL(const std::string& collection, const std::string& url);
|
||||
static void clear(const std::string& collection);
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "lldir.h"
|
||||
#include "sgversion.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llviewerbuild.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llxmlrpcresponder.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* @file llviewerbuild.h
|
||||
* @brief Sets viewer build number
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-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$
|
||||
*/
|
||||
|
||||
#include "sgversion.h"
|
||||
|
||||
// Set the build number in indra/llcommon/llversionviewer.h!
|
||||
|
||||
const S32 LL_VIEWER_BUILD = gVersionBuild;
|
||||
@@ -514,6 +514,7 @@ public:
|
||||
inline BOOL flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); }
|
||||
inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
|
||||
|
||||
inline bool getPhysicsShapeUnknown() const { return mPhysicsShapeUnknown; }
|
||||
U8 getPhysicsShapeType() const;
|
||||
inline F32 getPhysicsGravity() const { return mPhysicsGravity; }
|
||||
inline F32 getPhysicsFriction() const { return mPhysicsFriction; }
|
||||
|
||||
@@ -641,14 +641,30 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list, bool i
|
||||
prim_llsd["scale"] = object->getScale().getValue();
|
||||
|
||||
// Flags
|
||||
prim_llsd["shadows"] = FALSE;
|
||||
prim_llsd["phantom"] = object->flagPhantom();
|
||||
prim_llsd["physical"] = object->flagUsePhysics();
|
||||
prim_llsd["flags"] = (S32)object->getFlags();
|
||||
|
||||
// Volume params
|
||||
LLVolumeParams params = object->getVolume()->getParams();
|
||||
prim_llsd["volume"] = params.asLLSD();
|
||||
|
||||
// Material
|
||||
prim_llsd["material"] = object->getMaterial();
|
||||
|
||||
// Click Action
|
||||
if (S32 action = object->getClickAction()) // Non-zero
|
||||
prim_llsd["clickaction"] = action;
|
||||
|
||||
// Physics
|
||||
if (!object->getPhysicsShapeUnknown())
|
||||
{
|
||||
LLSD& physics = prim_llsd["ExtraPhysics"];
|
||||
physics["PhysicsShapeType"] = object->getPhysicsShapeType();
|
||||
physics["Density"] = object->getPhysicsDensity();
|
||||
physics["Friction"] = object->getPhysicsFriction();
|
||||
physics["GravityMultiplier"] = object->getPhysicsGravity();
|
||||
physics["Restitution"] = object->getPhysicsRestitution();
|
||||
}
|
||||
|
||||
// Extra paramsb6fab961-af18-77f8-cf08-f021377a7244
|
||||
if (object->isFlexible())
|
||||
{
|
||||
@@ -662,6 +678,12 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list, bool i
|
||||
LLLightParams* light = (LLLightParams*)object->getParameterEntry(LLNetworkData::PARAMS_LIGHT);
|
||||
prim_llsd["light"] = light->asLLSD();
|
||||
}
|
||||
if (object->getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE))
|
||||
{
|
||||
// Light Texture
|
||||
LLLightImageParams* light_texture = (LLLightImageParams*)object->getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
|
||||
prim_llsd["light_texture"] = light_texture->asLLSD();
|
||||
}
|
||||
if (object->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT))
|
||||
{
|
||||
// Sculpt
|
||||
@@ -714,7 +736,10 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list, bool i
|
||||
for (iter = mTexturesList.begin(); iter != mTexturesList.end(); iter++)
|
||||
{
|
||||
if ((*iter) == t_id)
|
||||
{
|
||||
alreadyseen = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (alreadyseen == false)
|
||||
mTexturesList.push_back(t_id);
|
||||
@@ -871,7 +896,7 @@ void LLObjectBackup::importObject_continued(AIFilePicker* filepicker)
|
||||
}
|
||||
}
|
||||
|
||||
LLSD te_llsd = prim_llsd["textures"];
|
||||
LLSD& te_llsd = prim_llsd.has("textures") ? prim_llsd["textures"] : prim_llsd["texture"]; // Firestorm's format uses singular "texture"
|
||||
|
||||
for (text_it = te_llsd.beginArray(); text_it != te_llsd.endArray(); text_it++)
|
||||
{
|
||||
@@ -968,6 +993,16 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
LLSelectMgr::getInstance()->selectionSetObjectDescription(prim_llsd["description"]);
|
||||
}
|
||||
|
||||
if (prim_llsd.has("material"))
|
||||
{
|
||||
LLSelectMgr::getInstance()->selectionSetMaterial(prim_llsd["material"].asInteger());
|
||||
}
|
||||
|
||||
if (prim_llsd.has("clickaction"))
|
||||
{
|
||||
LLSelectMgr::getInstance()->selectionSetClickAction(prim_llsd["clickaction"].asInteger());
|
||||
}
|
||||
|
||||
if (prim_llsd.has("parent"))
|
||||
{
|
||||
//we are not the root node.
|
||||
@@ -985,6 +1020,13 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
|
||||
object->setScale(prim_llsd["scale"]);
|
||||
|
||||
if (prim_llsd.has("flags"))
|
||||
{
|
||||
U32 flags(prim_llsd["flags"].asInteger());
|
||||
object->setFlags(flags, true);
|
||||
}
|
||||
else // Legacy
|
||||
{
|
||||
/*if (prim_llsd.has("shadows"))
|
||||
if (prim_llsd["shadows"].asInteger() == 1)
|
||||
object->setFlags(FLAGS_CAST_SHADOWS, true);*/
|
||||
@@ -996,6 +1038,18 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
if (prim_llsd.has("physical"))
|
||||
if (prim_llsd["physical"].asInteger() == 1)
|
||||
object->setFlags(FLAGS_USE_PHYSICS, true);
|
||||
}
|
||||
|
||||
if (prim_llsd.has("ExtraPhysics"))
|
||||
{
|
||||
const LLSD& physics = prim_llsd["ExtraPhysics"];
|
||||
object->setPhysicsShapeType(physics["PhysicsShapeType"].asInteger());
|
||||
object->setPhysicsDensity(physics["Density"].asFloat());
|
||||
object->setPhysicsFriction(physics["Friction"].asFloat());
|
||||
object->setPhysicsGravity(physics["GravityMultiplier"].asFloat());
|
||||
object->setPhysicsRestitution(physics["Restitution"].asFloat());
|
||||
object->updateFlags(true);
|
||||
}
|
||||
|
||||
// Volume params
|
||||
LLVolumeParams volume_params = object->getVolume()->getParams();
|
||||
@@ -1025,6 +1079,14 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
object->setParameterEntry(LLNetworkData::PARAMS_LIGHT, light, true);
|
||||
}
|
||||
|
||||
if (prim_llsd.has("light_texture"))
|
||||
{
|
||||
// Light Texture
|
||||
LLLightImageParams light_texture;
|
||||
light_texture.fromLLSD(prim_llsd["light_texture"]);
|
||||
object->setParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE, light_texture, true);
|
||||
}
|
||||
|
||||
if (prim_llsd.has("flexible"))
|
||||
{
|
||||
LLFlexibleObjectData flex;
|
||||
@@ -1034,7 +1096,7 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
|
||||
// Textures
|
||||
LL_INFOS("ObjectBackup") << "Processing textures for prim" << LL_ENDL;
|
||||
LLSD te_llsd = prim_llsd["textures"];
|
||||
LLSD& te_llsd = prim_llsd.has("textures") ? prim_llsd["textures"] : prim_llsd["texture"]; // Firestorm's format uses singular "texture"
|
||||
LLSD::array_iterator text_it;
|
||||
U8 i = 0;
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLVIEWEROBJECTBACKUP_H
|
||||
#define LL_LLVIEWEROBJECTBACKUP_H
|
||||
|
||||
#include "llviewerinventory.h"
|
||||
|
||||
enum export_states {
|
||||
@@ -179,3 +182,4 @@ private:
|
||||
LLQuaternion mAgentRot;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,6 @@
|
||||
#ifndef LL_LLWLHANDLERS_H
|
||||
#define LL_LLWLHANDLERS_H
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llhttpclient.h"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef SH_SHFLOATERMEDIATICKER_H
|
||||
#define SH_SHFLOATERMEDIATICKER_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLIconCtrl;
|
||||
@@ -56,3 +59,4 @@ private:
|
||||
BOOL handle_ticker_enabled(void *);
|
||||
void handle_ticker_toggle(void *);
|
||||
|
||||
#endif
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 B |
32
indra/newview/skins/default/xui/de/floater_autoreplace.xml
Normal file
32
indra/newview/skins/default/xui/de/floater_autoreplace.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="autoreplace_floater" title="Einstellungen für automatische Ersetzung...">
|
||||
<check_box label="Automatische Ersetzung aktivieren..." name="autoreplace_enable" tool_tip="Eines oder mehrere Schlüsselwörter bei der Eingabe von Chat-Text durch die entsprechende Ersetzung substituieren"/>
|
||||
<button label="Liste importieren..." name="autoreplace_import_list" tool_tip="Exportierte Liste aus einer Datei laden."/>
|
||||
<button label="Liste exportieren..." name="autoreplace_export_list" tool_tip="Ausgewählte Liste zur Weitergabe in einer Datei speichern."/>
|
||||
<button label="Neue Liste..." name="autoreplace_new_list" tool_tip="Neue Liste erstellen."/>
|
||||
<button label="Liste löschen" name="autoreplace_delete_list" tool_tip="Ausgewählte Liste löschen."/>
|
||||
<button name="autoreplace_list_up" tool_tip="Dieser Liste eine höhere Priorität einräumen."/>
|
||||
<button name="autoreplace_list_down" tool_tip="Dieser Liste eine niedrigere Priorität einräumen."/>
|
||||
<scroll_list name="autoreplace_list_replacements">
|
||||
<scroll_list.columns label="Schlüsselwort" name="Keyword"/>
|
||||
<scroll_list.columns label="Ersetzung" name="Replacement"/>
|
||||
</scroll_list>
|
||||
<button label="Hinzufügen..." name="autoreplace_add_entry"/>
|
||||
<button label="Entfernen" name="autoreplace_delete_entry"/>
|
||||
<button label="Eintrag speichern" name="autoreplace_save_entry" tool_tip="Diesen Eintrag speichern."/>
|
||||
<button label="Änderungen speichern" name="autoreplace_save_changes" tool_tip="Alle Änderungen speichern."/>
|
||||
<button label="Abbrechen" name="autoreplace_cancel" tool_tip="Alle Änderungen löschen."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
291
indra/newview/skins/default/xui/en-us/floater_autoreplace.xml
Normal file
291
indra/newview/skins/default/xui/en-us/floater_autoreplace.xml
Normal file
@@ -0,0 +1,291 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
border="true"
|
||||
can_close="true"
|
||||
can_minimize="true"
|
||||
can_resize="false"
|
||||
help_topic="autoreplace_settings"
|
||||
save_rect="true"
|
||||
height="455"
|
||||
width="490"
|
||||
name="autoreplace_floater"
|
||||
title="Auto-Replace Settings">
|
||||
<check_box
|
||||
bottom="-40"
|
||||
left_delta="15"
|
||||
height="16"
|
||||
width="100"
|
||||
follows="left|top"
|
||||
label="Enable Auto-Replace"
|
||||
name="autoreplace_enable"
|
||||
tool_tip="As you enter chat text, replace any of the keywords entered with the corresponding replacement"/>
|
||||
<view_border
|
||||
bottom_delta="-15"
|
||||
left="2"
|
||||
height="0"
|
||||
width="491"
|
||||
follows="left|top"
|
||||
bevel_style="none"
|
||||
border_thickness="1"
|
||||
mouse_opaque="false"
|
||||
name="divisor1"/>
|
||||
<button
|
||||
bottom_delta="-30"
|
||||
left="10"
|
||||
height="22"
|
||||
width="110"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_import_list"
|
||||
label="Import List..."
|
||||
tool_tip="Load a previously exported list from a file."/>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
left_delta="120"
|
||||
height="22"
|
||||
width="110"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_export_list"
|
||||
label="Export List..."
|
||||
tool_tip="Save the selected list to a file so you can share it."/>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
left_delta="120"
|
||||
height="22"
|
||||
width="110"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_new_list"
|
||||
label="New List..."
|
||||
tool_tip="Create a new list."/>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
left_delta="120"
|
||||
height="22"
|
||||
width="110"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_delete_list"
|
||||
label="Delete List"
|
||||
tool_tip="Delete the selected list."/>
|
||||
<scroll_list
|
||||
bottom_delta="-112"
|
||||
left="10"
|
||||
height="100"
|
||||
width="370"
|
||||
follows="left|top"
|
||||
column_padding="0"
|
||||
draw_heading="false"
|
||||
multi_select="false"
|
||||
name="autoreplace_list_name"
|
||||
search_column="0">
|
||||
</scroll_list>
|
||||
<button
|
||||
bottom_delta="56"
|
||||
left_delta="380"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_list_up"
|
||||
image_overlay="up_arrow.tga"
|
||||
label=""
|
||||
tool_tip="Move this list up in priority."/>
|
||||
<button
|
||||
bottom_delta="-32"
|
||||
left_delta="0"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_list_down"
|
||||
image_overlay="down_arrow.tga"
|
||||
label=""
|
||||
tool_tip="Move this list down in priority."/>
|
||||
<view_border
|
||||
bottom_delta="-36"
|
||||
left="2"
|
||||
height="0"
|
||||
width="491"
|
||||
follows="left|top"
|
||||
bevel_style="none"
|
||||
border_thickness="1"
|
||||
mouse_opaque="false"
|
||||
name="divisor2"/>
|
||||
<scroll_list
|
||||
bottom_delta="-130"
|
||||
left="10"
|
||||
height="120"
|
||||
width="370"
|
||||
follows="left|top"
|
||||
column_padding="0"
|
||||
draw_heading="true"
|
||||
multi_select="true"
|
||||
name="autoreplace_list_replacements"
|
||||
search_column="0">
|
||||
<scroll_list.columns
|
||||
label="Keyword"
|
||||
name="Keyword"
|
||||
relative_width="0.30" />
|
||||
<scroll_list.columns
|
||||
label="Replacement"
|
||||
name="Replacement"
|
||||
relative_width="0.70" />
|
||||
</scroll_list>
|
||||
<button
|
||||
bottom_delta="64"
|
||||
left_delta="380"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_add_entry"
|
||||
label="Add..."/>
|
||||
<button
|
||||
bottom_delta="-32"
|
||||
left_delta="0"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_delete_entry"
|
||||
label="Remove"/>
|
||||
<view_border
|
||||
bottom_delta="-42"
|
||||
left="2"
|
||||
height="0"
|
||||
width="491"
|
||||
follows="left|top"
|
||||
bevel_style="none"
|
||||
border_thickness="1"
|
||||
mouse_opaque="false"
|
||||
name="divisor3"/>
|
||||
<text
|
||||
type="string"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
bottom_delta="-29"
|
||||
width="50">
|
||||
Keyword:
|
||||
</text>
|
||||
<line_editor
|
||||
name="autoreplace_keyword"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="100"
|
||||
max_length_bytes="255"
|
||||
bottom_delta="0"
|
||||
width="150"
|
||||
/>
|
||||
<text
|
||||
type="string"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
right="90"
|
||||
bottom_delta="-29"
|
||||
>
|
||||
Replacement:
|
||||
</text>
|
||||
<line_editor
|
||||
name="autoreplace_replacement"
|
||||
follows="left|top"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="100"
|
||||
max_length_bytes="255"
|
||||
bottom_delta="0"
|
||||
width="280"
|
||||
/>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
right="-10"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="false"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_save_entry"
|
||||
label="Save Entry"
|
||||
tool_tip="Save this entry."/>
|
||||
<view_border
|
||||
bottom_delta="-10"
|
||||
left="2"
|
||||
height="0"
|
||||
width="491"
|
||||
follows="left|top"
|
||||
bevel_style="none"
|
||||
border_thickness="1"
|
||||
mouse_opaque="false"
|
||||
name="divisor4"/>
|
||||
<button
|
||||
bottom_delta="-29"
|
||||
right="380"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_save_changes"
|
||||
label="Save Changes"
|
||||
tool_tip="Save all changes."/>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
right="480"
|
||||
height="22"
|
||||
width="90"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="true"
|
||||
halign="center"
|
||||
scale_image="true"
|
||||
name="autoreplace_cancel"
|
||||
label="Cancel"
|
||||
tool_tip="Discard all changes."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater border="true" bottom="-298" can_close="true" can_minimize="false" can_resize="true" default_tab_group="1" enabled="true" follows="left|top|right|bottom" height="197" label="(unknown)" left="1" min_height="100" min_width="300" name="im_floater" rect_control="" title="(unknown)" width="501">
|
||||
<floater border="true" bottom="-298" can_close="true" can_minimize="false" can_resize="true" default_tab_group="1" enabled="true" follows="left|top|right|bottom" height="197" label="(unknown)" left="1" min_height="100" min_width="345" name="im_floater" rect_control="" title="(unknown)" width="501">
|
||||
<string name="ringing">Joining Voice Chat...</string>
|
||||
<string name="connected">Connected, click End Call to hang up</string>
|
||||
<string name="hang_up">Left Voice Chat</string>
|
||||
@@ -8,8 +8,8 @@
|
||||
<string name="typing_start_string">[NAME] is typing...</string>
|
||||
<string name="session_start_string">Starting session with [NAME], please wait.</string>
|
||||
<string name="default_text_label">Click here to instant message.</string>
|
||||
<button bottom="-20" follows="right|top" height="20" label="History" right="-165" name="history_btn" width="80"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
|
||||
<button bottom="-20" follows="right|top" height="20" label="History" right="-210" name="history_btn" width="80"/>
|
||||
<button bottom_delta="0" follows="right|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
|
||||
<button.commit_callback function="FlipDing"/>
|
||||
</button>
|
||||
<button bottom_delta="0" enabled="false" follows="right|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="50" name="start_call_btn" width="80"/>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<string name="unavailable_text_label">Text chat is not available for this call.</string>
|
||||
<string name="inventory_item_offered">Inventory item offered</string>
|
||||
<flyout_button bottom="-20" follows="right|top" halign="center" height="20" label="Profile" left="280" name="instant_message_flyout" width="80" list_position="below">
|
||||
<flyout_button_item label="Profile" name="profile_item" value="0"/>
|
||||
<flyout_button_item label="History" name="history_btn" value="1"/>
|
||||
<flyout_button_item label="Offer Teleport" name="profile_tele_btn" value="2"/>
|
||||
<flyout_button_item label="Request Teleport" name="request_teleport_item" value="3"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater border="true" bottom="-298" can_close="true" can_minimize="true" can_resize="true" default_tab_group="1" enabled="true" follows="left|top|right|bottom" height="197" label="(unknown)" left="1" min_height="100" min_width="330" name="im_floater" rect_control="" title="(unknown)" width="501">
|
||||
<floater border="true" bottom="-298" can_close="true" can_minimize="true" can_resize="true" default_tab_group="1" enabled="true" follows="left|top|right|bottom" height="197" label="(unknown)" left="1" min_height="100" min_width="375" name="im_floater" rect_control="" title="(unknown)" width="501">
|
||||
<string name="ringing">Joining Voice Chat...</string>
|
||||
<string name="connected">Connected, click End Call to hang up</string>
|
||||
<string name="hang_up">Left Voice Chat</string>
|
||||
@@ -10,9 +10,9 @@
|
||||
<string name="default_text_label">Click here to instant message.</string>
|
||||
<string name="moderated_chat_label">(Moderated: Voices off by default)</string>
|
||||
<string name="muted_text_label">Your text chat has been disabled by a Group Moderator.</string>
|
||||
<button bottom="-20" follows="right|top" height="20" label="Group Info" right="-245" name="group_info_btn" tab_group="0" width="80"/>
|
||||
<button bottom="-20" follows="right|top" height="20" label="Group Info" right="-290" name="group_info_btn" tab_group="0" width="80"/>
|
||||
<button bottom_delta="0" follows="right|top" height="20" label="History" left_delta="80" name="history_btn" width="80"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
|
||||
<button bottom_delta="0" follows="right|top" height="20" left_delta="80" width="50" toggle="true" name="ding_btn" label="Ding">
|
||||
<button.commit_callback function="FlipDing"/>
|
||||
</button>
|
||||
<button bottom_delta="0" enabled="false" follows="right|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="50" name="start_call_btn" width="80"/>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
|
||||
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
|
||||
<column name="activity" label="Act." width="24" tool_tip="Activity"/>
|
||||
<column name="voice" image_overlay="inv_item_sound.tga" width="24" tool_tip="Voice Status"/>
|
||||
<column name="age" label="Age" width="45" tool_tip="Age"/>
|
||||
<column name="time" label="Time" width="52" tool_tip="Time since arrival in the sim."/>
|
||||
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
|
||||
@@ -355,7 +356,8 @@
|
||||
<check_box follows="bottom|left" bottom_delta="-25" left="5" control_name="RadarColumnMarkHidden" name="hide_mark" label="Mark"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnPositionHidden" name="hide_pos" label="Pos." tool_tip="Position"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAltitudeHidden" name="hide_alt" label="Alt." tool_tip="Altitude"/>
|
||||
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnActivityHidden" name="hide_act" label="Act." tool_tip="Activity"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnActivityHidden" name="hide_act" label="Act." tool_tip="Activity"/>
|
||||
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnVoiceHidden" name="hide_voice" label="Voice" tool_tip="Voice Status"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAgeHidden" name="hide_age" label="Age"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnTimeHidden" name="hide_time" label="Time"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnClientHidden" name="hide_client" label="Client"/>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<!--agentd teleport floater-->
|
||||
<floater
|
||||
name="teleport_floater"
|
||||
title="Teleport"
|
||||
can_resize="true"
|
||||
can_minimize="true"
|
||||
can_close="true"
|
||||
can_drag_on_left="false"
|
||||
width="300"
|
||||
height="150"
|
||||
min_width="80"
|
||||
min_height="150"
|
||||
>
|
||||
|
||||
<text name="teleport_text"
|
||||
font="SansSerifSmall"
|
||||
left="10"
|
||||
bottom_delta="-40"
|
||||
width="260"
|
||||
height="16"
|
||||
follows="left|top"
|
||||
> Public Region Seed: </text>
|
||||
|
||||
|
||||
<combo_box allow_text_entry="true"
|
||||
name="teleport_edit"
|
||||
width="250"
|
||||
height="20"
|
||||
left="10"
|
||||
bottom_delta="-30"
|
||||
follows="left|top"
|
||||
hidden="false"
|
||||
mouse_opaque="true"
|
||||
max_length="420"
|
||||
font="SansSerif"
|
||||
bevel_style="in"
|
||||
border_style="line"
|
||||
border_thickness="1"
|
||||
select_all_on_focus_received="true"
|
||||
/>
|
||||
|
||||
<button
|
||||
name="teleport_btn"
|
||||
label="Teleport"
|
||||
font="SansSerifSmall"
|
||||
left="10"
|
||||
bottom_delta="-25"
|
||||
width="100"
|
||||
height="20"
|
||||
follows="top|left"
|
||||
/>
|
||||
<button bottom_delta="0" follows="bottom|right" height="20" label="Cancel" right="224"
|
||||
name="cancel_btn" width="90" />
|
||||
</floater>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater bottom_delta="-20" can_close="true" can_minimize="true" can_resize="false" follows="left|right|bottom" height="330" name="floater_toolbar_prefs.xml" width="1024" title="Choose the buttons you want shown on the toolbar" rect_control="FloaterUploadRect">
|
||||
<check_box bottom="-38" image_selected="btn_chatbar_selected.tga" scale_image="true" image_unselected="btn_chatbar.tga" label="Chatbar Toggle" left="5" name="chat_btn" follows="left|right" control_name="ToolbarVisibleChatbar"/>
|
||||
<check_box bottom_delta="-20" label="Communicate Flyout" name="communicate_flyout" follows="left|right" control_name="ToolbarVisibleCommunicateIM"/>
|
||||
<check_box bottom_delta="-20" label="Communicate Button" name="communicate_btn" follows="left|right" control_name="ToolbarVisibleCommunicate"/>
|
||||
<check_box control_name="ToolbarVisibleFriends" bottom_delta="-20" label="Friends" name="friends_btn" follows="left|right"/>
|
||||
<check_box bottom_delta="-20" label="Groups" name="groups_btn" follows="left|right" control_name="ToolbarVisibleGroups"/>
|
||||
<check_box bottom_delta="-20" label="Group Titles" name="group_titles_btn" follows="left|right" control_name="ToolbarVisibleGroupTitles"/>
|
||||
<check_box bottom_delta="-20" label="Local Chat" name="chat_history_btn" follows="left|right" control_name="ToolbarVisibleChatHistory"/>
|
||||
<check_box bottom_delta="-20" label="Active Speakers" name="active_speakers_btn" follows="left|right" control_name="ToolbarVisibleActiveSpeakers"/>
|
||||
<check_box bottom_delta="-20" label="Mute List" name="mute_list_btn" follows="left|right" control_name="ToolbarVisibleMuteList"/>
|
||||
<check_box bottom_delta="-20" label="Asset Blacklist" name="black_list_btn" follows="left|right" control_name="ToolbarVisibleAssetBlacklist"/>
|
||||
<check_box bottom_delta="-20" label="Voice FX" name="voice_effects_btn" follows="left|right" control_name="ToolbarVisibleVoiceEffect"/>
|
||||
<check_box bottom_delta="-20" label="Gestures" name="gestures_btn" follows="left|right" control_name="ToolbarVisibleGestures"/>
|
||||
<check_box bottom_delta="-20" label="Beacons" name="beacons_btn" follows="left|right" control_name="ToolbarVisibleBeacons"/>
|
||||
<check_box bottom_delta="-20" label="Radar" name="radar_list_btn" follows="left|right" control_name="ToolbarVisibleRadar"/>
|
||||
<check_box bottom_delta="-20" label="Camera Controls" name="camera_controls_btn" follows="left|right" control_name="ToolbarVisibleCameraControls"/>
|
||||
<check_box bottom="-38" label="Movement Controls" name="movement_controls_btn" follows="left|right" control_name="ToolbarVisibleMovementControls" left_delta="160"/>
|
||||
<check_box bottom_delta="-20" label="Mouselook" name="look_btn" follows="left|right" control_name="ToolbarVisibleMouselook"/>
|
||||
<check_box bottom_delta="-20" label="Fly" name="fly_btn" follows="left|right" control_name="ToolbarVisibleFly"/>
|
||||
<check_box bottom_delta="-20" label="Sit" name="sit_btn" follows="left|right" control_name="ToolbarVisibleSit"/>
|
||||
<check_box bottom_delta="-20" label="Run" name="run_btn" follows="left|right" control_name="ToolbarVisibleAlwaysRun"/>
|
||||
<check_box bottom_delta="-20" label="Velocity" name="velocity_btn" follows="left|right" control_name="ToolbarVisibleVelocity"/>
|
||||
<check_box bottom_delta="-20" label="Bumps" name="bumps_btn" follows="left|right" control_name="ToolbarVisibleMeanEvents"/>
|
||||
<check_box bottom_delta="-20" label="Stream Display" name="media_ticker_btn" follows="left|right" control_name="ToolbarVisibleMediaTicker"/>
|
||||
<check_box bottom_delta="-20" label="Media Filter" name="media_filter_btn" follows="left|right" control_name="ToolbarVisibleMediaFilter"/>
|
||||
<check_box bottom_delta="-20" label="Snapshot" name="snapshot_btn" follows="left|right" control_name="ToolbarVisibleSnapshot"/>
|
||||
<check_box bottom_delta="-20" label="Appearance" name="appearance_btn" follows="left|right" control_name="ToolbarVisibleAppearance"/>
|
||||
<check_box bottom_delta="-20" label="Search" name="directory_btn" follows="left|right" control_name="ToolbarVisibleSearch"/>
|
||||
<check_box bottom_delta="-20" label="Web Browser" name="web_browser_btn" follows="left|right" control_name="ToolbarVisibleWeb"/>
|
||||
<check_box bottom_delta="-20" label="AO Settings" name="ao_btn" follows="left|right" control_name="ToolbarVisibleAO"/>
|
||||
<check_box bottom_delta="-20" label="Debug Settings" name="debug_settings_btn" follows="left|right" control_name="ToolbarVisibleDebugSettings"/>
|
||||
<check_box bottom="-38" label="Debug Avatar" name="debug_avatar_btn" follows="left|right" control_name="ToolbarVisibleDebugAvatar" left_delta="160"/>
|
||||
<check_box bottom_delta="-20" label="Anims Explorer" name="anims_explorer_btn" follows="left|right" control_name="ToolbarVisibleAnimsExplorer"/>
|
||||
<check_box bottom_delta="-20" label="Sound Explorer" name="sound_explorer_btn" follows="left|right" control_name="ToolbarVisibleSoundExplorer"/>
|
||||
<check_box bottom_delta="-20" label="Area Search" name="areasearch_btn" follows="left|right" control_name="ToolbarVisibleAreaSearch"/>
|
||||
<check_box bottom_delta="-20" label="Inspect" name="inspect_btn" follows="left|right" control_name="ToolbarVisibleInspect"/>
|
||||
<check_box bottom_delta="-20" label="Characters" name="pathing_characters_btn" follows="left|right" control_name="ToolbarVisiblePathfindingCharacters"/>
|
||||
<check_box bottom_delta="-20" label="Linksets" name="pathing_linksets_btn" follows="left|right" control_name="ToolbarVisiblePathfindingLinksets"/>
|
||||
<check_box bottom_delta="-20" label="Build" name="build_btn" follows="left|right" control_name="ToolbarVisibleBuild"/>
|
||||
<check_box bottom_delta="-20" label="Grid Options" name="grid_options_btn" follows="left|right" control_name="ToolbarVisibleGridOptions"/>
|
||||
<check_box bottom_delta="-20" label="Local Textures" name="local_textures_btn" follows="left|right" control_name="ToolbarVisibleLocalAssets"/>
|
||||
<check_box bottom_delta="-20" label="Upload Perms" name="perm_prefs_btn" follows="left|right" control_name="ToolbarVisiblePermPrefs"/>
|
||||
<check_box bottom_delta="-20" label="Script Errors" name="script_errors_btn" follows="left|right" control_name="ToolbarVisibleScriptErrors"/>
|
||||
<check_box bottom_delta="-20" label="Environment Editor" name="env_editor_btn" follows="left|right" control_name="ToolbarVisibleEnvSettings"/>
|
||||
<check_box bottom_delta="-20" label="Day Cycle Editor" name="day_cycle_editor_btn" follows="left|right" control_name="ToolbarVisibleDayCycle"/>
|
||||
<check_box bottom_delta="-20" label="Windlight" name="windlight_btn" follows="left|right" control_name="ToolbarVisibleWindlight"/>
|
||||
<check_box bottom="-38" label="Water Editor" name="water_editor_btn" follows="left|right" control_name="ToolbarVisibleWaterSettings" left_delta="160"/>
|
||||
<check_box bottom_delta="-20" label="Post-Process FX" name="post_process_btn" follows="left|right" control_name="ToolbarVisiblePostProcess"/>
|
||||
<check_box bottom_delta="-20" label="Buy [CURRENCY]" name="buy_currency_btn" follows="left|right" control_name="ToolbarVisibleBuyCurrency"/>
|
||||
<check_box bottom_delta="-20" label="Buy Land" name="buy_land_btn" follows="left|right" control_name="ToolbarVisibleBuyLand"/>
|
||||
<check_box bottom_delta="-20" label="My Land" name="my_land_btn" follows="left|right" control_name="ToolbarVisibleMyLand"/>
|
||||
<check_box bottom_delta="-20" label="About Land" name="about_land_btn" follows="left|right" control_name="ToolbarVisibleAboutLand"/>
|
||||
<check_box bottom_delta="-20" label="Script Info" name="script_info_btn" follows="left|right" control_name="ToolbarVisibleScriptInfo"/>
|
||||
<check_box bottom_delta="-20" label="Region/Estate" name="about_region_btn" follows="left|right" control_name="ToolbarVisibleAboutRegion"/>
|
||||
<check_box bottom_delta="-20" label="God Tools" name="god_tools_btn" follows="left|right" control_name="ToolbarVisibleGodTools"/>
|
||||
<check_box bottom_delta="-20" label="TP History" name="teleport_history_btn" follows="left|right" control_name="ToolbarVisibleTeleportHistory"/>
|
||||
<check_box bottom_delta="-20" label="Map" name="map_btn" follows="left|right" control_name="ToolbarVisibleWorldMap"/>
|
||||
<check_box bottom_delta="-20" label="Mini-Map" name="minimap_btn" follows="left|right" control_name="ToolbarVisibleMiniMap"/>
|
||||
<!-- [RLVa:LF] -->
|
||||
<check_box bottom_delta="-20" label="RLVa Restrictions" name="rlv_restrictions_btn" follows="left|right" control_name="ToolbarVisibleRLVRestrictions"/>
|
||||
<check_box bottom_delta="-20" label="RLVa Locks" name="rlv_locks_btn" follows="left|right" control_name="ToolbarVisibleRLVLocks"/>
|
||||
<check_box bottom_delta="-20" label="RLVa Strings" name="rlv_strings_btn" follows="left|right" control_name="ToolbarVisibleRLVStrings"/>
|
||||
<!-- [/RLVa:LF] -->
|
||||
<check_box bottom="-38" label="Memory Leak" name="memleak_btn" follows="left|right" control_name="ToolbarVisibleMemLeak" visibility_control="QAMode" left_delta="160"/>
|
||||
<check_box bottom_delta="-20" label="Message Log" name="message_log_btn" follows="left|right" control_name="ToolbarVisibleMessageLog"/>
|
||||
<check_box bottom_delta="-20" label="Statistics" name="stats_btn" follows="left|right" control_name="ToolbarVisibleStatBar"/>
|
||||
<check_box bottom_delta="-20" label="Notifications Console" name="notifications_console_btn" follows="left|right" control_name="ToolbarVisibleNotificationsConsole"/>
|
||||
<check_box bottom_delta="-20" label="Debug Console" name="debug_console_btn" follows="left|right" control_name="ToolbarVisibleDebugConsole"/>
|
||||
<check_box bottom_delta="-20" label="Region Console" name="region_console_btn" follows="left|right" control_name="ToolbarVisibleRegionDebugConsole"/>
|
||||
<check_box bottom_delta="-20" label="Fast Timers" name="fast_timers_btn" follows="left|right" control_name="ToolbarVisibleFastTimers"/>
|
||||
<check_box bottom_delta="-20" label="Frame Console" name="frame_console_btn" follows="left|right" control_name="ToolbarVisibleFrameConsole"/>
|
||||
<check_box bottom_delta="-20" label="HTTP Console" name="http_console_btn" follows="left|right" control_name="ToolbarVisibleHTTPConsole"/>
|
||||
<check_box bottom_delta="-20" label="Texture Console" name="texture_console_btn" follows="left|right" control_name="ToolbarVisibleTextureConsole"/>
|
||||
<check_box bottom_delta="-20" label="Texture Category Console" name="texture_category_console_btn" follows="left|right" control_name="ToolbarVisibleTextureCategoryConsole" visibility_control="AuditTexture"/>
|
||||
<check_box bottom_delta="-20" label="Texture Size Console" name="texture_size_console_btn" follows="left|right" control_name="ToolbarVisibleTextureSizeConsole" visibility_control="AuditTexture"/>
|
||||
<check_box bottom_delta="-20" label="Inventory" name="directory_btn" follows="left|right" control_name="ToolbarVisibleInventory"/>
|
||||
<check_box bottom_delta="-20" label="Make Outfit" name="make_outfit_btn" follows="left|right" control_name="ToolbarVisibleOutfit"/>
|
||||
<check_box bottom_delta="-20" label="Outfits" name="outfits_btn" follows="left|right" control_name="ToolbarVisibleInventoryOutfits"/>
|
||||
<check_box bottom="-38" label="Favorites" name="favs_btn" follows="left|right" control_name="ToolbarVisibleInventoryFavs" left_delta="160"/>
|
||||
<check_box bottom_delta="-20" label="Outbox" name="outbox_btn" follows="left|right" control_name="ToolbarVisibleOutbox"/>
|
||||
<check_box bottom_delta="-20" label="Preferences" name="preferences_btn" follows="left|right" control_name="ToolbarVisiblePreferences"/>
|
||||
<check_box bottom_delta="-20" label="Autoreplace" name="auto_replace_btn" follows="left|right" control_name="ToolbarVisibleAutoReplace"/>
|
||||
<check_box bottom_delta="-20" label="Display Name" name="display_name_btn" follows="left|right" control_name="ToolbarVisibleDisplayName"/>
|
||||
<check_box bottom_delta="-20" label="Floater Test" name="floater_test_btn" follows="left|right" control_name="ToolbarVisibleTest"/>
|
||||
<check_box bottom_delta="-20" label="Edit UI" name="edit_ui_btn" follows="left|right" control_name="ToolbarVisibleEditUI"/>
|
||||
<check_box bottom_delta="-20" label="Font Test" name="font_test_btn" follows="left|right" control_name="ToolbarVisibleFontTest"/>
|
||||
<check_box bottom_delta="-20" label="Lag Meter" name="lag_meter_btn" follows="left|right" control_name="ToolbarVisibleLagMeter"/>
|
||||
<check_box bottom_delta="-20" label="Report Abuse" name="abuse_btn" follows="left|right" control_name="ToolbarVisibleComplaintReporter"/>
|
||||
<!-- Singu TODO: Re-implement f1 help.
|
||||
<check_box bottom_delta="-20" label="Help" name="help_btn" follows="left|right" control_name="ToolbarVisibleHelp"/>
|
||||
-->
|
||||
<check_box bottom_delta="-20" label="Tutorial" name="tutorial_btn" follows="left|right" control_name="ToolbarVisibleHelpTutorial"/>
|
||||
<check_box bottom_delta="-20" label="About [SHORT_APP_NAME]" name="about_btn" follows="left|right" control_name="ToolbarVisibleAbout"/>
|
||||
<check_box bottom_delta="-20" label="Change Buttons" name="change_buttons_btn" follows="left|right" control_name="ToolbarVisibleToolbarPrefs"/>
|
||||
</floater>
|
||||
@@ -176,6 +176,10 @@
|
||||
<on_click function="ToggleControl" userdata="RadarColumnActivityHidden"/>
|
||||
<on_check control="RadarColumnActivityHidden"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Voice" name="Voice">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnVoiceHidden"/>
|
||||
<on_check control="RadarColumnVoiceHidden"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Age" name="Age">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnAgeHidden"/>
|
||||
<on_check control="RadarColumnAgeHidden"/>
|
||||
|
||||
@@ -324,6 +324,9 @@
|
||||
<on_click function="ShowFloater" userdata="toolbar" />
|
||||
<on_check function="FloaterVisible" userdata="toolbar" />
|
||||
</menu_item_check>
|
||||
<menu_item_call label="Change toolbar buttons" name="toolbar_prefs">
|
||||
<on_click function="ShowFloater" userdata="floater_toolbar_prefs.xml"/>
|
||||
</menu_item_call>
|
||||
<menu_item_check bottom="-132" enabled="true" height="19" label="Local Chat" left="0"
|
||||
mouse_opaque="true" name="Chat History" shortcut="control|H" width="211">
|
||||
<on_click function="ShowFloater" userdata="chat history"/>
|
||||
|
||||
@@ -2456,6 +2456,55 @@ Do you want to remove multiple friends from your Friends list?
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Add Auto-Replace List"
|
||||
name="AddAutoReplaceList"
|
||||
type="alertmodal">
|
||||
<tag>addlist</tag>
|
||||
Name for the new list:
|
||||
<tag>confirm</tag>
|
||||
<form name="form">
|
||||
<input name="listname" type="text"/>
|
||||
<button
|
||||
default="true"
|
||||
index="0"
|
||||
name="SetName"
|
||||
text="OK"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Rename Auto-Replace List"
|
||||
name="RenameAutoReplaceList"
|
||||
type="alertmodal">
|
||||
The name '[DUPNAME]' is in use
|
||||
Enter a new unique name:
|
||||
<tag>confirm</tag>
|
||||
<form name="form">
|
||||
<input name="listname" type="text"/>
|
||||
<button
|
||||
default="false"
|
||||
index="0"
|
||||
name="ReplaceList"
|
||||
text="Replace Current List"/>
|
||||
<button
|
||||
default="true"
|
||||
index="1"
|
||||
name="SetName"
|
||||
text="Use New Name"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="InvalidAutoReplaceEntry"
|
||||
type="alertmodal">
|
||||
The keyword must be a single word, and the replacement may not be empty.
|
||||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="GodDeleteAllScriptedPublicObjectsByUser"
|
||||
|
||||
@@ -172,16 +172,17 @@ To use spellcheck, right-click a misspelled word
|
||||
(red or otherwise) and select its replacement
|
||||
</text>
|
||||
|
||||
<view_border bevel_style="none" border_thickness="1" bottom_delta="-16" follows="top" height="0" left="5" name="CmdDivisor" width="356"/>
|
||||
<button bottom_delta="-26" left="12" follows="top" height="20" width="250" label="Autoreplace Preferences" name="autoreplace"/>
|
||||
<view_border bevel_style="none" border_thickness="1" bottom_delta="-5" follows="top" height="0" left="5" name="CmdDivisor" width="376"/>
|
||||
|
||||
<check_box bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="16"
|
||||
label="Highlight messages if any of them contain the terms" name="KeywordsOn" width="270"/>
|
||||
<text bottom_delta="-20" follows="top" height="20" left="12" name="keyword_txt1">(separated by commas)</text>
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" left_delta="5" max_length="500" name="KeywordsList" width="300"/>
|
||||
<text bottom_delta="-24" follows="top" height="20" left_delta="15" name="EmKeyw">Is found within:</text>
|
||||
<check_box bottom_delta="3" follows="top" height="16" left_delta="100" label="Local Chat Floater" name="KeywordsInChat"/>
|
||||
<check_box bottom_delta="-15" follows="left|top" height="16" label="Instant Message Floater" name="KeywordsInIM"/>
|
||||
<check_box bottom_delta="-24" follows="top" height="16" label="Highlight the message in this color:" left_delta="-110" name="KeywordsChangeColor"/>
|
||||
<text bottom_delta="-24" follows="top" height="20" left_delta="0" name="EmKeyw">Is found within:</text>
|
||||
<check_box bottom_delta="3" follows="top" height="16" left_delta="80" label="Local Chat Floater" name="KeywordsInChat"/>
|
||||
<check_box bottom_delta="0" left_delta="120" follows="left|top" height="16" label="Instant Message Floater" name="KeywordsInIM"/>
|
||||
<check_box bottom_delta="-24" follows="top" height="16" label="Highlight the message in this color:" left_delta="-195" name="KeywordsChangeColor"/>
|
||||
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom_delta="-16" can_apply_immediately="true" color="1, 1, 1, 1" follows="left|top" height="35" left_delta="210" name="KeywordsColor" tool_tip="Click to open Color Picker" width="50"/>
|
||||
<check_box bottom_delta="-10" follows="top" height="16" left_delta="-210" label="Play this sound alert: (UUID)" name="KeywordsPlaySound"/>
|
||||
<line_editor bottom_delta="-20" follows="left|top" bevel_style="in" border_style="line" border_thickness="1" height="20" left_delta="-5" max_length="36" name="KeywordsSound" width="300"/>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security" name="Security">
|
||||
<check_box bottom_delta="-25" control_name="BroadcastViewerEffects" follows="top" initial_value="true" label="Broadcast Viewer Effects (does not affect pointat and lookat)" left="10" name="broadcast_viewer_effects" width="400"/>
|
||||
<check_box bottom_delta="-20" control_name="DisablePointAtAndBeam" follows="top" initial_value="true" label="Disable Point At And Beam" tool_tip="Don't point at or show your edit beam when selecting an object." name="disable_point_at_and_beams_check"/>
|
||||
<check_box bottom_delta="-20" control_name="PrivateLookAt" follows="top" initial_value="false" label="Do not Look At objects and/or avatars" tool_tip="Disables headturns and lookat beacons: causes your avatar to look straight ahead like a zombie." name="private_look_at_check"/>
|
||||
<check_box bottom_delta="-20" control_name="PrivateLookAt" follows="top" initial_value="false" label="Do not Look At objects and/or avatars" tool_tip="Disables headturns and lookat beacons, causing your avatar to look straight ahead (unless scripted to do otherwise)." name="private_look_at_check"/>
|
||||
<check_box bottom_delta="-20" control_name="AscentShowLookAt" follows="top" initial_value="false" label="Show others' LookAt beacons" tool_tip="Shows you where others are looking." name="show_look_at_check"/>
|
||||
<check_box bottom_delta="-20" control_name="SGDetachBridge" follows="top" initial_value="false" label="Auto detach LSL Bridge" tool_tip="Automatically detach LSL Bridge of Phoenix or Firestorm viewer." name="detach_bridge"/>
|
||||
<check_box bottom_delta="-20" control_name="QuietSnapshotsToDisk" follows="top" initial_value="false" label="Quiet Snapshots to Disk" tool_tip="Doesn't make a camera sound nor alert everyone when you take a snapshot to your computer." name="quiet_snapshots_check"/>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<check_box bottom_delta="-18" follows="top" height="16" control_name="LiruMouselookHidesFloaters" name="mouselook_hides_floaters" label="Floaters"/>
|
||||
<check_box left_delta="80" bottom_delta="0" follows="top" height="16" control_name="LiruMouselookHidesNotices" name="mouselook_hides_notices" label="Notices"/>
|
||||
<check_box left="148" bottom_delta="-18" follows="top" height="16" control_name="LiruMouselookHidesMenubar" name="mouselook_hides_menubar" label="Menubar"/>
|
||||
<check_box left_delta="80" bottom_delta="0" follows="top" height="16" control_name="LiruMouselookHidesToolbar" name="mouselook_hides_toolbar" label="Toolbar"/>
|
||||
<text bottom_delta="-30" follows="top" height="10" left="10" name=" Movement Options:">Movement Options:</text>
|
||||
<check_box bottom_delta="-6" follows="top" height="16" label="Fly/land on holding up/down" left="148" name="automatic_fly"/>
|
||||
<check_box bottom_delta="-18" follows="top" height="16" label="Allow crouch toggle by holding shift" name="crouch_toggle" control_name="SGShiftCrouchToggle"/>
|
||||
|
||||
@@ -404,6 +404,11 @@
|
||||
<button.commit_callback function="ShowFloater" parameter="Preferences"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panelautoreplace" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleAutoReplace">
|
||||
<button bottom="0" height="24" label="Autoreplace" name="auto_replace_btn" image_overlay="icn_toolbar_auto_replace.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" width="50" follows="left|right">
|
||||
<button.commit_callback function="ShowFloater" parameter="autoreplace"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="paneldisplayname" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleDisplayName">
|
||||
<button bottom="0" height="24" label="Display Name" name="display_name_btn" image_overlay="icn_toolbar_display_name.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" width="50" follows="left|right">
|
||||
<button.commit_callback function="ShowFloater" parameter="displayname"/>
|
||||
|
||||
32
indra/newview/skins/default/xui/es/floater_autoreplace.xml
Normal file
32
indra/newview/skins/default/xui/es/floater_autoreplace.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="autoreplace_floater" title="Configuración de reemplazo automático">
|
||||
<check_box label="Habilitar el reemplazo automático" name="autoreplace_enable" tool_tip="Al escribir el texto del chat, reemplaza las palabras clave especificadas con la sustitución correspondiente"/>
|
||||
<button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carga una lista previamente exportada desde un archivo."/>
|
||||
<button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Guarda la lista seleccionada en un archivo para poder compartirla."/>
|
||||
<button label="Lista nueva..." name="autoreplace_new_list" tool_tip="Crea una lista nueva."/>
|
||||
<button label="Eliminar lista" name="autoreplace_delete_list" tool_tip="Elimina la lista seleccionada."/>
|
||||
<button name="autoreplace_list_up" tool_tip="Aumenta la prioridad de esta lista."/>
|
||||
<button name="autoreplace_list_down" tool_tip="Baja la prioridad de esta lista."/>
|
||||
<scroll_list name="autoreplace_list_replacements">
|
||||
<scroll_list.columns label="Palabra clave" name="Keyword"/>
|
||||
<scroll_list.columns label="Reemplazo" name="Replacement"/>
|
||||
</scroll_list>
|
||||
<button label="Añadir..." name="autoreplace_add_entry"/>
|
||||
<button label="Eliminar" name="autoreplace_delete_entry"/>
|
||||
<button label="Guardar entrada" name="autoreplace_save_entry" tool_tip="Guarda esta entrada."/>
|
||||
<button label="Guardar cambios" name="autoreplace_save_changes" tool_tip="Guarda todos los cambios."/>
|
||||
<button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todos los cambios."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<!--agentd teleport floater-->
|
||||
<floater name="teleport_floater" title="Teleportar" >
|
||||
<text name="teleport_text"> Semillas Región Pública: </text>
|
||||
<combo_box name="teleport_edit"/>
|
||||
<button name="teleport_btn" label="Teleportar"/>
|
||||
<button label="Cancelar" name="cancel_btn"/>
|
||||
</floater>
|
||||
32
indra/newview/skins/default/xui/fr/floater_autoreplace.xml
Normal file
32
indra/newview/skins/default/xui/fr/floater_autoreplace.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="autoreplace_floater" title="Paramètres Rechercher/Remplacer">
|
||||
<check_box label="Activer la fonction Rechercher/Remplacer" name="autoreplace_enable" tool_tip="Lors de la saisie du texte d'un chat, remplace chaque mot-clé spécifié par la valeur correspondante."/>
|
||||
<button label="Importer une liste..." name="autoreplace_import_list" tool_tip="Charger une liste précédemment exportée à partir d'un fichier."/>
|
||||
<button label="Exporter la liste..." name="autoreplace_export_list" tool_tip="Enregistrer la liste sélectionnée dans un fichier afin de pouvoir la partager."/>
|
||||
<button label="Nouvelle liste..." name="autoreplace_new_list" tool_tip="Créer une nouvelle liste."/>
|
||||
<button label="Supprimer la liste" name="autoreplace_delete_list" tool_tip="Supprimer la liste sélectionnée."/>
|
||||
<button name="autoreplace_list_up" tool_tip="Augmenter la priorité de cette liste."/>
|
||||
<button name="autoreplace_list_down" tool_tip="Diminuer la priorité de cette liste."/>
|
||||
<scroll_list name="autoreplace_list_replacements">
|
||||
<scroll_list.columns label="Mot-clé" name="Keyword"/>
|
||||
<scroll_list.columns label="Remplacement" name="Replacement"/>
|
||||
</scroll_list>
|
||||
<button label="Ajouter..." name="autoreplace_add_entry"/>
|
||||
<button label="Supprimer" name="autoreplace_delete_entry"/>
|
||||
<button label="Enregistrer" name="autoreplace_save_entry" tool_tip="Enregistrer cette entrée."/>
|
||||
<button label="Enregistrer les modifications" name="autoreplace_save_changes" tool_tip="Enregistrer toutes les modifications."/>
|
||||
<button label="Annuler" name="autoreplace_cancel" tool_tip="Ignorer toutes les modifications."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
32
indra/newview/skins/default/xui/it/floater_autoreplace.xml
Normal file
32
indra/newview/skins/default/xui/it/floater_autoreplace.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="autoreplace_floater" title="Impostazioni sostituzione automatica">
|
||||
<check_box label="Attiva sostituzione automatica" name="autoreplace_enable" tool_tip="Quando inserisci testo nella chat, sostituisci le parole chiave inserite con l'elemento sostitutivo corrispondente."/>
|
||||
<button label="Importa lista..." name="autoreplace_import_list" tool_tip="Carica da file una lista esportata in precedenza."/>
|
||||
<button label="Esporta lista..." name="autoreplace_export_list" tool_tip="Salva la lista selezionata in un file per condividerla."/>
|
||||
<button label="Nuova lista..." name="autoreplace_new_list" tool_tip="Crea una nuova lista"/>
|
||||
<button label="Cancella lista" name="autoreplace_delete_list" tool_tip="Cancella la lista selezionata"/>
|
||||
<button name="autoreplace_list_up" tool_tip="Aumenta la priorità di questa lista."/>
|
||||
<button name="autoreplace_list_down" tool_tip="Diminuisci la priorità di questa lista."/>
|
||||
<scroll_list name="autoreplace_list_replacements">
|
||||
<scroll_list.columns label="Parola chiave" name="Keyword"/>
|
||||
<scroll_list.columns label="Sostituzione" name="Replacement"/>
|
||||
</scroll_list>
|
||||
<button label="Aggiungi..." name="autoreplace_add_entry"/>
|
||||
<button label="Rimuovi" name="autoreplace_delete_entry"/>
|
||||
<button label="Salva elemento" name="autoreplace_save_entry" tool_tip="Salva questo elemento."/>
|
||||
<button label="Salva modifiche" name="autoreplace_save_changes" tool_tip="Salva tutte le modifiche."/>
|
||||
<button label="Annulla" name="autoreplace_cancel" tool_tip="Annulla tutte le modifiche."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
32
indra/newview/skins/default/xui/pt/floater_autoreplace.xml
Normal file
32
indra/newview/skins/default/xui/pt/floater_autoreplace.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater name="autoreplace_floater" title="Configurações da substituição automática">
|
||||
<check_box label="Habilitar substituição automática" name="autoreplace_enable" tool_tip="Ao inserir texto de bate-papo, substitua quaisquer palavras-chave inseridas pela substituição correspondente"/>
|
||||
<button label="Importar lista..." name="autoreplace_import_list" tool_tip="Carrega uma lista exportada anteriormente de um arquivo."/>
|
||||
<button label="Exportar lista..." name="autoreplace_export_list" tool_tip="Salva um arquivo da lista selecionada para compartilhá-la."/>
|
||||
<button label="Nova lista..." name="autoreplace_new_list" tool_tip="Cria uma nova lista."/>
|
||||
<button label="Excluir lista" name="autoreplace_delete_list" tool_tip="Exclui a lista selecionada."/>
|
||||
<button name="autoreplace_list_up" tool_tip="Aumenta a prioridade desta lista."/>
|
||||
<button name="autoreplace_list_down" tool_tip="Diminui a prioridade desta lista."/>
|
||||
<scroll_list name="autoreplace_list_replacements">
|
||||
<scroll_list.columns label="Palavra-chave" name="Keyword"/>
|
||||
<scroll_list.columns label="Substituição" name="Replacement"/>
|
||||
</scroll_list>
|
||||
<button label="Adicionar..." name="autoreplace_add_entry"/>
|
||||
<button label="Remover" name="autoreplace_delete_entry"/>
|
||||
<button label="Salvar entrada" name="autoreplace_save_entry" tool_tip="Salva esta entrada."/>
|
||||
<button label="Salvar alterações" name="autoreplace_save_changes" tool_tip="Salvar todas as alterações."/>
|
||||
<button label="Cancelar" name="autoreplace_cancel" tool_tip="Descarta todas as alterações."/>
|
||||
</floater>
|
||||
<!--
|
||||
<text
|
||||
top_pad="10"
|
||||
left="10"
|
||||
height="16"
|
||||
width="260"
|
||||
follows="left|top"
|
||||
halign="center"
|
||||
mouse_opaque="true"
|
||||
name="autoreplace_text2">
|
||||
Entries
|
||||
</text>
|
||||
-->
|
||||
@@ -772,9 +772,9 @@ class LinuxManifest(ViewerManifest):
|
||||
self.run_command("""
|
||||
find '%(dst)s' -type d -print0 | xargs -0 --no-run-if-empty chmod 755;
|
||||
find '%(dst)s' -type f -perm 0700 -print0 | xargs -0 --no-run-if-empty chmod 0755;
|
||||
find '%(dst)s' -type f -perm 0500 -print0 | xargs -0 --no-run-if-empty chmod 0555;
|
||||
find '%(dst)s' -type f -perm 0500 -print0 | xargs -0 --no-run-if-empty chmod 0755;
|
||||
find '%(dst)s' -type f -perm 0600 -print0 | xargs -0 --no-run-if-empty chmod 0644;
|
||||
find '%(dst)s' -type f -perm 0400 -print0 | xargs -0 --no-run-if-empty chmod 0444;
|
||||
find '%(dst)s' -type f -perm 0400 -print0 | xargs -0 --no-run-if-empty chmod 0644;
|
||||
true""" % {'dst':self.get_dst_prefix() })
|
||||
self.package_file = installer_name + '.tar.bz2'
|
||||
|
||||
|
||||
@@ -202,9 +202,9 @@
|
||||
<key>darwin</key>
|
||||
<map>
|
||||
<key>md5sum</key>
|
||||
<string>b31c495d5e77daa09394b370fc228312</string>
|
||||
<string>6564a085a5a353a531908d2e6fcafd64</string>
|
||||
<key>url</key>
|
||||
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-darwin-20130221.tar.bz2</uri>
|
||||
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/boost-1.52.0-darwin-20140202.tar.bz2</uri>
|
||||
</map>
|
||||
<key>linux</key>
|
||||
<map>
|
||||
|
||||
Reference in New Issue
Block a user