This commit is contained in:
Shyotl
2019-09-29 19:29:28 -05:00
208 changed files with 8300 additions and 4787 deletions

14
Pipfile Normal file
View File

@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
llbase = "*"
certifi = "*"
autobuild = {hg = "https://bitbucket.org/alchemyviewer/autobuild-1.1"}
[requires]
python_version = "2.7"

View File

@@ -68,18 +68,18 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>b95e484e5b6cc0d10da48d3cf0ad37cd</string> <string>b82d5aa8380926240f3415279480c831</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://depot.alchemyviewer.org/pub/packages/common/abseil_cpp-20190327.190862343-common-190862343.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-external/abseil-cpp/common/abseil_cpp-ac78ffc.1-common-1.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>common</string> <string>common</string>
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>20190327.190862343</string> <string>ac78ffc.1</string>
</map> </map>
<key>apr_suite</key> <key>apr_suite</key>
<map> <map>
@@ -650,11 +650,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>2f44b376e436f37cbad5c7567edddebd</string> <string>06746b78827e9a0c6b666bd2528d36ad</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>https://bitbucket.org/router_gray/rg_3p-dullahan/downloads/dullahan-1.1.1085-3.3497.1833.g13f506f-linux64-201902042123.tar.bz2</string> <string>https://bitbucket.org/SingularityViewer/libraries/downloads/dullahan-1.1.1320_73.1.12%252Bgee4b49f%252Bchromium-73.0.3683.75-linux64-192030536.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>linux64</string> <string>linux64</string>
@@ -664,9 +664,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>c3e093d40e93ff242e9b9c953ae7316c</string> <string>e19b664ad8cf9e7f4a7bf649d28faa76</string>
<key>url</key> <key>url</key>
<string>https://depot.alchemyviewer.org/pub/windows/lib-vc142/dullahan-1.1.930-3.3282.1733.g9091548-windows-201802202358.tar.bz2</string> <string>https://bitbucket.org/SingularityViewer/libraries/downloads/dullahan-1.1.1320_73.1.12+gee4b49f+chromium-73.0.3683.75-windows-191102212.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
@@ -802,7 +802,7 @@
<key>fmodstudio</key> <key>fmodstudio</key>
<map> <map>
<key>copyright</key> <key>copyright</key>
<string>FMOD Studio, copyright (c) Firelight Technologies Pty, Ltd., 2012-2017.</string> <string>FMOD Studio, copyright (c) Firelight Technologies Pty, Ltd., 2012-2019.</string>
<key>description</key> <key>description</key>
<string>FMOD Studio audio system library</string> <string>FMOD Studio audio system library</string>
<key>license</key> <key>license</key>
@@ -818,15 +818,29 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>a3ccf7916d1e0b6f01370978b661c139</string> <string>4a4e1bfd0e1e982643e75533ead10c55</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>https://depot.alchemyviewer.org/pub/darwin/lib/fmodstudio-1.10.02-darwin-201712262058.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-internal/fmodstudio/darwin/fmodstudio-2.00.03.192211300-darwin-192211300.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>darwin</string> <string>darwin</string>
</map> </map>
<key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>fe1a606582fb72d5d1c9ec4a2d906830</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-internal/fmodstudio/darwin64/fmodstudio-2.00.03.192211302-darwin64-192211302.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
<key>linux</key> <key>linux</key>
<map> <map>
<key>archive</key> <key>archive</key>
@@ -836,7 +850,7 @@
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://depot.alchemyviewer.org/pub/linux/lib/fmodstudio-1.06.07-linux-201507231333.tar.bz2</string> <string>https://depot.alchemyviewer.org/pub/linux/lib/fmodstudio-1.06.07-linux-201507231333.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>linux</string> <string>linux</string>
@@ -850,7 +864,7 @@
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>https://depot.alchemyviewer.org/pub/linux64/lib/fmodstudio-1.10.00-linux64-201709282320.tar.bz2</string> <string>/opt/devel/secondlife/pkg/fmodstudio-2.00.02.191991250-linux64-191991250.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>linux64</string> <string>linux64</string>
@@ -860,11 +874,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>b23a30967666da49346983658ed50e92</string> <string>e0e87e0423fa42e4d2997b47b92eac6e</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>https://depot.alchemyviewer.org/pub/windows/lib/fmodstudio-1.10.00-windows-201709290225.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-internal/fmodstudio/windows/fmodstudio-2.00.03.192211030-windows-192211030.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
@@ -874,11 +888,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>779ae33c6b84656295bd6cf50a69c830</string> <string>c2e55e1bfef7e066a0e40867a64b4cce</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://depot.alchemyviewer.org/pub/packages/windows64/msvc/fmodstudio-1.10.10.190360453-windows64-190360453.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-internal/fmodstudio/windows64/fmodstudio-2.00.03.192211029-windows64-192211029.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
@@ -2106,7 +2120,7 @@
<key>nvapi</key> <key>nvapi</key>
<map> <map>
<key>copyright</key> <key>copyright</key>
<string>Copyright (c) 2007- 2014 NVIDIA Corporation. All rights reserved. </string> <string>Copyright (c) 2007- 2019 NVIDIA Corporation. All rights reserved. </string>
<key>license</key> <key>license</key>
<string>nvapi</string> <string>nvapi</string>
<key>license_file</key> <key>license_file</key>
@@ -2120,11 +2134,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>f70cc94b1f43c4889b0dfff33f40fb11</string> <string>408eff309f6f3031d74da5491c1852a9</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>file:///c:/devel/secondlife/packages/windows/nvapi-R361v2-windows-201604020339.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-internal/nvapi/windows/nvapi-R430.192211828-windows-192211828.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
@@ -2134,18 +2148,18 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>619598988143e12ad0d1a271f881b3bd</string> <string>76a547f558b8499dc85135b8718eb18a</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>file:///c:/devel/secondlife/packages/windows64/nvapi-R384-windows64-201712260642.tar.bz2</string> <string>https://pkg.alchemyviewer.org/repository/autobuild-internal/nvapi/windows64/nvapi-R430.192211828-windows64-192211828.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>R384</string> <string>R430.192211828</string>
</map> </map>
<key>ogg_vorbis</key> <key>ogg_vorbis</key>
<map> <map>
@@ -3121,7 +3135,7 @@
<key>windows</key> <key>windows</key>
<map> <map>
<key>build_directory</key> <key>build_directory</key>
<string>build-vc$AUTOBUILD_WIN_VSVER-$AUTOBUILD_ADDRSIZE</string> <string>build-vc${AUTOBUILD_WIN_VSVER|161}-$AUTOBUILD_ADDRSIZE</string>
<key>configurations</key> <key>configurations</key>
<map> <map>
<key>RelWithDebInfo</key> <key>RelWithDebInfo</key>

View File

@@ -17,6 +17,7 @@ project(${ROOT_PROJECT_NAME})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Variables) include(Variables)
include(00-Common)
include(BuildVersion) include(BuildVersion)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
@@ -27,6 +28,9 @@ if (NOT CMAKE_BUILD_TYPE)
"Build type. One of: Debug Release RelWithDebInfo" FORCE) "Build type. One of: Debug Release RelWithDebInfo" FORCE)
endif (NOT CMAKE_BUILD_TYPE) endif (NOT CMAKE_BUILD_TYPE)
include(Abseil-CPP)
# Dependencies
add_subdirectory(${ABSEIL_SRC_DIR} ${ABSEIL_BIN_DIR})
add_subdirectory(cmake) add_subdirectory(cmake)
add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine) add_subdirectory(${LIBS_OPEN_PREFIX}aistatemachine)
add_subdirectory(${LIBS_OPEN_PREFIX}llaudio) add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)

View File

@@ -39,3 +39,9 @@ set_source_files_properties(${aistatemachine_HEADER_FILES}
list(APPEND aistatemachine_SOURCE_FILES ${aistatemachine_HEADER_FILES}) list(APPEND aistatemachine_SOURCE_FILES ${aistatemachine_HEADER_FILES})
add_library (aistatemachine ${aistatemachine_SOURCE_FILES}) add_library (aistatemachine ${aistatemachine_SOURCE_FILES})
target_link_libraries(
aistatemachine
PUBLIC
llcommon
)

View File

@@ -0,0 +1,8 @@
# -*- cmake -*-
include(Prebuilt)
set(BUILD_TESTING OFF)
use_prebuilt_binary(abseil-cpp)
set(ABSEIL_SRC_DIR ${LIBS_PREBUILT_DIR}/abseil-cpp)
set(ABSEIL_BIN_DIR ${CMAKE_BINARY_DIR}/abseil-cpp)

View File

@@ -39,7 +39,7 @@ elseif (DARWIN)
elseif (LINUX) elseif (LINUX)
set(CEF_PLUGIN_LIBRARIES set(CEF_PLUGIN_LIBRARIES
dullahan dullahan
cef_dll_wrapper cef_dll_wrapper.a
cef cef
) )
endif (WINDOWS) endif (WINDOWS)

View File

@@ -8,6 +8,7 @@ set(cmake_SOURCE_FILES
CMakeLists.txt CMakeLists.txt
00-Common.cmake 00-Common.cmake
Abseil-CPP.cmake
AIStateMachine.cmake AIStateMachine.cmake
APR.cmake APR.cmake
Audio.cmake Audio.cmake
@@ -38,7 +39,6 @@ set(cmake_SOURCE_FILES
FindNDOF.cmake FindNDOF.cmake
FindOpenJPEG.cmake FindOpenJPEG.cmake
FindTut.cmake FindTut.cmake
FindVCRedist.cmake
FindURIPARSER.cmake FindURIPARSER.cmake
FindXmlRpcEpi.cmake FindXmlRpcEpi.cmake
FMODSTUDIO.cmake FMODSTUDIO.cmake

View File

@@ -13,6 +13,10 @@ include(LLCommon)
# set up platform specific lists of files that need to be copied # set up platform specific lists of files that need to be copied
################################################################### ###################################################################
if(WINDOWS) if(WINDOWS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
include(InstallRequiredSystemLibrariesAL)
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug") set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug")
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo") set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release") set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release")
@@ -83,15 +87,30 @@ if(WINDOWS)
endif(NOT DISABLE_TCMALLOC) endif(NOT DISABLE_TCMALLOC)
if (FMODSTUDIO) if (FMODSTUDIO)
if(ADDRESS_SIZE STREQUAL 64) set(debug_files ${debug_files} fmodL.dll)
set(debug_files ${debug_files} fmodL64.dll) set(release_files ${release_files} fmod.dll)
set(release_files ${release_files} fmod64.dll)
else(ADDRESS_SIZE STREQUAL 64)
set(debug_files ${debug_files} fmodL.dll)
set(release_files ${release_files} fmod.dll)
endif(ADDRESS_SIZE STREQUAL 64)
endif (FMODSTUDIO) endif (FMODSTUDIO)
foreach(redistfullfile IN LISTS CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
get_filename_component(redistfilepath ${redistfullfile} DIRECTORY )
get_filename_component(redistfilename ${redistfullfile} NAME)
copy_if_different(
${redistfilepath}
"${SHARED_LIB_STAGING_DIR_RELEASE}"
out_targets
${redistfilename}
)
set(third_party_targets ${third_party_targets} ${out_targets})
copy_if_different(
${redistfilepath}
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
out_targets
${redistfilename}
)
set(third_party_targets ${third_party_targets} ${out_targets})
endforeach()
elseif(DARWIN) elseif(DARWIN)
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources") set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")

View File

@@ -11,13 +11,8 @@ if (FMODSTUDIO)
set(lib_suffix .so) set(lib_suffix .so)
endif(WINDOWS) endif(WINDOWS)
if(WINDOWS) if(WINDOWS)
if(WORD_SIZE EQUAL 64) set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod${lib_suffix})
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod64${lib_suffix}) set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL64${lib_suffix})
else(WORD_SIZE EQUAL 64)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/fmod${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/fmodL${lib_suffix})
endif(WORD_SIZE EQUAL 64)
else(WINDOWS) else(WINDOWS)
set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmod${lib_suffix}) set(FMOD_LIBRARY_RELEASE ${LIBS_PREBUILT_DIR}/lib/release/libfmod${lib_suffix})
set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodL${lib_suffix}) set(FMOD_LIBRARY_DEBUG ${LIBS_PREBUILT_DIR}/lib/debug/libfmodL${lib_suffix})

View File

@@ -1,34 +0,0 @@
include(Variables)
if(WINDOWS)
if(MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1920)
set(VISUAL_STUDIO_VERSION 15.0)
set(VISUAL_STUDIO_VERSION_UPPER 16.0)
elseif(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940)
set(VISUAL_STUDIO_VERSION 16.0)
set(VISUAL_STUDIO_VERSION_UPPER 17.0)
endif ()
set(vswhere "$ENV{PROGRAMFILES\(X86\)}\\Microsoft Visual Studio\\Installer\\vswhere.exe")
if(EXISTS ${vswhere})
execute_process(COMMAND ${vswhere} -version "[${VISUAL_STUDIO_VERSION},${VISUAL_STUDIO_VERSION_UPPER})" -property "installationPath"
OUTPUT_VARIABLE installationPath
OUTPUT_STRIP_TRAILING_WHITESPACE)
file(TO_CMAKE_PATH ${installationPath} installationPath)
set(redistPath "${installationPath}/VC/Redist/MSVC")
file(GLOB redistPath "${installationPath}/VC/Redist/MSVC/*")
list(LENGTH redistPath length)
if(length EQUAL 1)
if(ADDRESS_SIZE EQUAL 64)
set(VISUAL_STUDIO_REDISTRIBUTABLE_NAME "vc_redist.x64.exe" CACHE FILEPATH "Name of Microsoft Visual Studio Redistributable")
set(redistPath "${redistPath}/${VISUAL_STUDIO_REDISTRIBUTABLE_NAME}")
else()
set(VISUAL_STUDIO_REDISTRIBUTABLE_NAME "vc_redist.x86.exe" CACHE FILEPATH "Name of Microsoft Visual Studio Redistributable")
set(redistPath "${redistPath}/${VISUAL_STUDIO_REDISTRIBUTABLE_NAME}")
endif()
if(EXISTS ${redistPath})
set(VISUAL_STUDIO_REDISTRIBUTABLE_PATH ${redistPath} CACHE FILEPATH "Path to the appropriate Microsoft Visual Studio Redistributable")
endif()
endif()
endif()
endif(WINDOWS)

View File

@@ -0,0 +1,741 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
InstallRequiredSystemLibraries
------------------------------
Include this module to search for compiler-provided system runtime
libraries and add install rules for them. Some optional variables
may be set prior to including the module to adjust behavior:
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS``
Specify additional runtime libraries that may not be detected.
After inclusion any detected libraries will be appended to this.
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP``
Set to TRUE to skip calling the :command:`install(PROGRAMS)` command to
allow the includer to specify its own install rule, using the value of
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS`` to get the list of libraries.
``CMAKE_INSTALL_DEBUG_LIBRARIES``
Set to TRUE to install the debug runtime libraries when available
with MSVC tools.
``CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY``
Set to TRUE to install only the debug runtime libraries with MSVC
tools even if the release runtime libraries are also available.
``CMAKE_INSTALL_UCRT_LIBRARIES``
Set to TRUE to install the Windows Universal CRT libraries for
app-local deployment (e.g. to Windows XP). This is meaningful
only with MSVC from Visual Studio 2015 or higher.
One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
to an absolute path to tell CMake to look for Windows 10 SDKs in
a custom location. The specified directory is expected to contain
``Redist/ucrt/DLLs/*`` directories.
``CMAKE_INSTALL_MFC_LIBRARIES``
Set to TRUE to install the MSVC MFC runtime libraries.
``CMAKE_INSTALL_OPENMP_LIBRARIES``
Set to TRUE to install the MSVC OpenMP runtime libraries
``CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION``
Specify the :command:`install(PROGRAMS)` command ``DESTINATION``
option. If not specified, the default is ``bin`` on Windows
and ``lib`` elsewhere.
``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS``
Set to TRUE to disable warnings about required library files that
do not exist. (For example, Visual Studio Express editions may
not provide the redistributable files.)
``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT``
Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
option. If not specified, no such option will be used.
#]=======================================================================]
cmake_policy(PUSH)
cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
set(_IRSL_HAVE_Intel FALSE)
set(_IRSL_HAVE_MSVC FALSE)
foreach(LANG IN ITEMS C CXX Fortran)
if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel")
if(NOT _IRSL_HAVE_Intel)
get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_Intel_archdir intel64)
else()
set(_Intel_archdir x86)
endif()
set(_Intel_compiler_ver ${CMAKE_${LANG}_COMPILER_VERSION})
if(WIN32)
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../redist/${_Intel_archdir}/compiler" ABSOLUTE)
elseif(APPLE)
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib" ABSOLUTE)
else()
if(EXISTS "${_Intel_basedir}/../lib/${_Intel_archdir}_lin")
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../lib/${_Intel_archdir}" ABSOLUTE)
else()
get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib/${_Intel_archdir}_lin" ABSOLUTE)
endif()
endif()
set(_IRSL_HAVE_Intel TRUE)
endif()
elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC")
set(_IRSL_HAVE_MSVC TRUE)
endif()
endforeach()
if(MSVC)
file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
if(CMAKE_CL_64)
if(MSVC_VERSION GREATER 1599)
# VS 10 and later:
set(CMAKE_MSVC_ARCH x64)
else()
# VS 9 and earlier:
set(CMAKE_MSVC_ARCH amd64)
endif()
else()
set(CMAKE_MSVC_ARCH x86)
endif()
get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE)
if(MSVC_VERSION EQUAL 1300)
set(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
"${SYSTEMROOT}/system32/msvcr70.dll"
)
endif()
if(MSVC_VERSION EQUAL 1310)
set(__install__libs
"${SYSTEMROOT}/system32/msvcp71.dll"
"${SYSTEMROOT}/system32/msvcr71.dll"
)
endif()
if(MSVC_TOOLSET_VERSION EQUAL 80)
# Find the runtime library redistribution directory.
get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
if(DEFINED MSVC80_REDIST_DIR AND EXISTS "${MSVC80_REDIST_DIR}")
set(MSVC_REDIST_DIR "${MSVC80_REDIST_DIR}") # use old cache entry
endif()
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS
"${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
mark_as_advanced(MSVC_REDIST_DIR)
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
"${MSVC_CRT_DIR}/Microsoft.VC80.CRT.manifest"
"${MSVC_CRT_DIR}/msvcm80.dll"
"${MSVC_CRT_DIR}/msvcp80.dll"
"${MSVC_CRT_DIR}/msvcr80.dll"
)
else()
set(__install__libs)
endif()
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_CRT_DIR
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
set(__install__libs ${__install__libs}
"${MSVC_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
"${MSVC_CRT_DIR}/msvcm80d.dll"
"${MSVC_CRT_DIR}/msvcp80d.dll"
"${MSVC_CRT_DIR}/msvcr80d.dll"
)
endif()
endif()
if(MSVC_TOOLSET_VERSION EQUAL 90)
# Find the runtime library redistribution directory.
get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
get_filename_component(msvc_express_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
if(DEFINED MSVC90_REDIST_DIR AND EXISTS "${MSVC90_REDIST_DIR}")
set(MSVC_REDIST_DIR "${MSVC90_REDIST_DIR}") # use old cache entry
endif()
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS
"${msvc_install_dir}/../../VC/redist"
"${msvc_express_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
mark_as_advanced(MSVC_REDIST_DIR)
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
"${MSVC_CRT_DIR}/Microsoft.VC90.CRT.manifest"
"${MSVC_CRT_DIR}/msvcm90.dll"
"${MSVC_CRT_DIR}/msvcp90.dll"
"${MSVC_CRT_DIR}/msvcr90.dll"
)
else()
set(__install__libs)
endif()
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_CRT_DIR
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
set(__install__libs ${__install__libs}
"${MSVC_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
"${MSVC_CRT_DIR}/msvcm90d.dll"
"${MSVC_CRT_DIR}/msvcp90d.dll"
"${MSVC_CRT_DIR}/msvcr90d.dll"
)
endif()
endif()
set(MSVC_REDIST_NAME "")
set(_MSVC_DLL_VERSION "")
set(_MSVC_IDE_VERSION "")
if(MSVC_VERSION GREATER_EQUAL 2000)
message(WARNING "MSVC ${MSVC_VERSION} not yet supported.")
elseif(MSVC_VERSION_VERSION GREATER_EQUAL 143)
message(WARNING "MSVC toolset v${MSVC_VERSION_VERSION} not yet supported.")
elseif(MSVC_TOOLSET_VERSION EQUAL 142)
set(MSVC_REDIST_NAME VC142)
set(_MSVC_DLL_VERSION 140)
set(_MSVC_IDE_VERSION 16)
if(MSVC_VERSION EQUAL 1920)
# VS2019 named this differently prior to update 1.
set(MSVC_REDIST_NAME VC141)
endif()
elseif(MSVC_TOOLSET_VERSION EQUAL 141)
set(MSVC_REDIST_NAME VC141)
set(_MSVC_DLL_VERSION 140)
set(_MSVC_IDE_VERSION 15)
if(MSVC_VERSION EQUAL 1910)
# VS2017 named this differently prior to update 3.
set(MSVC_REDIST_NAME VC150)
endif()
elseif(MSVC_TOOLSET_VERSION)
set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION})
math(EXPR _MSVC_DLL_VERSION "${MSVC_TOOLSET_VERSION} / 10 * 10")
math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10")
endif()
set(_MSVCRT_DLL_VERSION "")
set(_MSVCRT_IDE_VERSION "")
if(_MSVC_IDE_VERSION GREATER_EQUAL 10)
set(_MSVCRT_DLL_VERSION "${_MSVC_DLL_VERSION}")
set(_MSVCRT_IDE_VERSION "${_MSVC_IDE_VERSION}")
endif()
if(_MSVCRT_DLL_VERSION)
set(v "${_MSVCRT_DLL_VERSION}")
set(vs "${_MSVCRT_IDE_VERSION}")
# Find the runtime library redistribution directory.
if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
endif()
if(NOT vs VERSION_LESS 15)
set(_vs_redist_paths "")
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query
if(IS_DIRECTORY "${_vs_dir}")
file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*")
endif()
unset(_vs_dir)
else()
get_filename_component(_vs_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
set(programfilesx86 "ProgramFiles(x86)")
set(_vs_redist_paths
"${_vs_dir}/../../VC/redist"
"${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist"
"$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist"
)
unset(_vs_dir)
unset(programfilesx86)
endif()
find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT PATHS ${_vs_redist_paths})
unset(_vs_redist_paths)
mark_as_advanced(MSVC_REDIST_DIR)
set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
"${MSVC_CRT_DIR}/msvcp${v}.dll"
)
if(NOT vs VERSION_LESS 14)
file(GLOB __msvcr_dlls "${MSVC_CRT_DIR}/*.dll")
list(APPEND __install__libs ${__msvcr_dlls})
else()
list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll")
endif()
else()
set(__install__libs)
endif()
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_CRT_DIR
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugCRT")
set(__install__libs ${__install__libs}
"${MSVC_CRT_DIR}/msvcp${v}d.dll"
)
if(NOT vs VERSION_LESS 14)
list(APPEND __install__libs
"${MSVC_CRT_DIR}/vcruntime${v}d.dll"
"${MSVC_CRT_DIR}/concrt${v}d.dll"
)
else()
list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll")
endif()
endif()
if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14)
# Find the Windows Kits directory.
get_filename_component(windows_kits_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
set(programfilesx86 "ProgramFiles(x86)")
if(";${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION};$ENV{UCRTVersion};$ENV{WindowsSDKVersion};" MATCHES [=[;(10\.[0-9.]+)[;\]]=])
set(__ucrt_version "${CMAKE_MATCH_1}/")
else()
set(__ucrt_version "")
endif()
find_path(WINDOWS_KITS_DIR
NAMES
Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
PATHS
$ENV{CMAKE_WINDOWS_KITS_10_DIR}
"${windows_kits_dir}"
"$ENV{ProgramFiles}/Windows Kits/10"
"$ENV{${programfilesx86}}/Windows Kits/10"
)
mark_as_advanced(WINDOWS_KITS_DIR)
# Glob the list of UCRT DLLs.
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
if(EXISTS "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll")
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll")
else()
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll")
endif()
list(APPEND __install__libs ${__ucrt_dlls})
endif()
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
if(EXISTS "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/ucrtbased.dll")
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/*.dll")
else()
file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll")
endif()
list(APPEND __install__libs ${__ucrt_dlls})
endif()
endif()
endif()
if(CMAKE_INSTALL_MFC_LIBRARIES)
if(MSVC_VERSION EQUAL 1300)
set(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc70.dll"
)
endif()
if(MSVC_VERSION EQUAL 1310)
set(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc71.dll"
)
endif()
if(MSVC_VERSION EQUAL 1400)
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_MFC_DIR
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
"${MSVC_MFC_DIR}/mfc80d.dll"
"${MSVC_MFC_DIR}/mfc80ud.dll"
"${MSVC_MFC_DIR}/mfcm80d.dll"
"${MSVC_MFC_DIR}/mfcm80ud.dll"
)
endif()
set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/Microsoft.VC80.MFC.manifest"
"${MSVC_MFC_DIR}/mfc80.dll"
"${MSVC_MFC_DIR}/mfc80u.dll"
"${MSVC_MFC_DIR}/mfcm80.dll"
"${MSVC_MFC_DIR}/mfcm80u.dll"
)
endif()
# include the language dll's for vs8 as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
set(__install__libs ${__install__libs}
"${MSVC_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
"${MSVC_MFCLOC_DIR}/mfc80chs.dll"
"${MSVC_MFCLOC_DIR}/mfc80cht.dll"
"${MSVC_MFCLOC_DIR}/mfc80enu.dll"
"${MSVC_MFCLOC_DIR}/mfc80esp.dll"
"${MSVC_MFCLOC_DIR}/mfc80deu.dll"
"${MSVC_MFCLOC_DIR}/mfc80fra.dll"
"${MSVC_MFCLOC_DIR}/mfc80ita.dll"
"${MSVC_MFCLOC_DIR}/mfc80jpn.dll"
"${MSVC_MFCLOC_DIR}/mfc80kor.dll"
)
endif()
if(MSVC_VERSION EQUAL 1500)
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_MFC_DIR
"${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
"${MSVC_MFC_DIR}/mfc90d.dll"
"${MSVC_MFC_DIR}/mfc90ud.dll"
"${MSVC_MFC_DIR}/mfcm90d.dll"
"${MSVC_MFC_DIR}/mfcm90ud.dll"
)
endif()
set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/Microsoft.VC90.MFC.manifest"
"${MSVC_MFC_DIR}/mfc90.dll"
"${MSVC_MFC_DIR}/mfc90u.dll"
"${MSVC_MFC_DIR}/mfcm90.dll"
"${MSVC_MFC_DIR}/mfcm90u.dll"
)
endif()
# include the language dll's for vs9 as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
set(__install__libs ${__install__libs}
"${MSVC_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
"${MSVC_MFCLOC_DIR}/mfc90chs.dll"
"${MSVC_MFCLOC_DIR}/mfc90cht.dll"
"${MSVC_MFCLOC_DIR}/mfc90enu.dll"
"${MSVC_MFCLOC_DIR}/mfc90esp.dll"
"${MSVC_MFCLOC_DIR}/mfc90deu.dll"
"${MSVC_MFCLOC_DIR}/mfc90fra.dll"
"${MSVC_MFCLOC_DIR}/mfc90ita.dll"
"${MSVC_MFCLOC_DIR}/mfc90jpn.dll"
"${MSVC_MFCLOC_DIR}/mfc90kor.dll"
)
endif()
set(_MFC_DLL_VERSION "")
set(_MFC_IDE_VERSION "")
if(_MSVC_IDE_VERSION GREATER_EQUAL 10)
set(_MFC_DLL_VERSION ${_MSVC_DLL_VERSION})
set(_MFC_IDE_VERSION ${_MSVC_IDE_VERSION})
endif()
if(_MFC_DLL_VERSION)
set(v "${_MFC_DLL_VERSION}")
set(vs "${_MFC_IDE_VERSION}")
# Starting with VS 15 the MFC DLLs may be in a different directory.
if (NOT vs VERSION_LESS 15)
file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*")
find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC
PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH)
mark_as_advanced(MSVC_REDIST_MFC_DIR)
unset(_MSVC_REDIST_DIRS)
else()
set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
endif()
# Multi-Byte Character Set versions of MFC are available as optional
# addon since Visual Studio 12. So for version 12 or higher, check
# whether they are available and exclude them if they are not.
if(CMAKE_INSTALL_DEBUG_LIBRARIES)
set(MSVC_MFC_DIR
"${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugMFC")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfc${v}ud.dll"
"${MSVC_MFC_DIR}/mfcm${v}ud.dll"
)
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfc${v}d.dll"
)
endif()
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}d.dll")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfcm${v}d.dll"
)
endif()
endif()
set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfc${v}u.dll"
"${MSVC_MFC_DIR}/mfcm${v}u.dll"
)
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfc${v}.dll"
)
endif()
if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}.dll")
set(__install__libs ${__install__libs}
"${MSVC_MFC_DIR}/mfcm${v}.dll"
)
endif()
endif()
# include the language dll's as well as the actual dll's
set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC")
set(__install__libs ${__install__libs}
"${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
"${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
)
endif()
endif()
# MSVC 8 was the first version with OpenMP
# Furthermore, there is no debug version of this
if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC)
set(_MSOMP_DLL_VERSION ${_MSVC_DLL_VERSION})
set(_MSOMP_IDE_VERSION ${_MSVC_IDE_VERSION})
if(_MSOMP_DLL_VERSION)
set(v "${_MSOMP_DLL_VERSION}")
set(vs "${_MSOMP_IDE_VERSION}")
set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.OPENMP")
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs ${__install__libs}
"${MSVC_OPENMP_DIR}/vcomp${v}.dll")
endif()
endif()
endif()
foreach(lib
${__install__libs}
)
if(EXISTS ${lib})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
else()
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
message(WARNING "system runtime library file does not exist: '${lib}'")
# This warning indicates an incomplete Visual Studio installation
# or a bug somewhere above here in this file.
# If you would like to avoid this warning, fix the real problem, or
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
# this file.
endif()
endif()
endforeach()
endif()
if(_IRSL_HAVE_Intel)
unset(__install_libs)
if(CMAKE_INSTALL_OPENMP_LIBRARIES)
if(WIN32)
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5md.dll" "${_Intel_redistdir}/libiompstubs5md.dll")
elseif(APPLE)
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.dylib" "${_Intel_redistdir}/libiompstubs5.dylib")
else()
list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.so" "${_Intel_redistdir}/libiompstubs5.so")
if(_Intel_compiler_ver VERSION_LESS 17)
list(APPEND __install_libs "${_Intel_redistdir}/libomp_db.so")
endif()
if(_Intel_compiler_ver VERSION_LESS 13)
list(APPEND __install_libs "${_Intel_redistdir}/libiompprof5.so")
endif()
endif()
endif()
if(WIN32)
set(__install_dirs "${_Intel_redistdir}/1033")
if(EXISTS "${_Intel_redistdir}/1041")
list(APPEND __install_dirs "${_Intel_redistdir}/1041")
endif()
if(_Intel_compiler_ver VERSION_LESS 18)
list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c")
endif()
foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll
libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll")
endif()
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
elseif(APPLE)
foreach(__Intel_lib IN ITEMS libchkp.dylib libcilkrts.5.dylib libcilkrts.dylib libimf.dylib libintlc.dylib libirc.dylib libirng.dylib libsvml.dylib)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
if(_Intel_compiler_ver VERSION_LESS 17)
list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.dylib")
endif()
endif()
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
foreach(__Intel_lib IN ITEMS libifcore.dylib libifcoremt.dylib libifport.dylib libifportmt.dylib)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
else()
foreach(__Intel_lib IN ITEMS libchkp.so libcilkrts.so libcilkrts.so.5 libimf.so libintlc.so libintlc.so.5 libirc.so libpdbx.so libpdbx.so.5 libsvml.so)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 13)
foreach(__Intel_lib IN ITEMS libirng.so liboffload.so liboffload.so.5)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
set(__install_dirs "${_Intel_redistdir}/irml")
list(APPEND __install_libs "${_Intel_redistdir}/cilk_db.so")
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15)
list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so" "${_Intel_redistdir}/libgfxoffload.so")
endif()
endif()
if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16)
foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
if(_Intel_compiler_ver VERSION_LESS 15)
foreach(__Intel_lib IN ITEMS libcxaguard.so libcxaguard.so.5)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
foreach(__Intel_lib IN ITEMS libicaf.so libifcore.so libifcore.so.5 libifcoremt.so libifcoremt.so.5 libifport.so libifport.so.5)
list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
endforeach()
endif()
endif()
foreach(lib IN LISTS __install_libs)
if(EXISTS ${lib})
list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
else()
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
message(WARNING "system runtime library file does not exist: '${lib}'")
endif()
endif()
endforeach()
foreach(dir IN LISTS __install_dirs)
if(EXISTS ${dir})
list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES ${dir})
else()
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
message(WARNING "system runtime library file does not exist: '${dir}'")
endif()
endif()
endforeach()
endif()
if(WATCOM)
get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
if(CMAKE_C_COMPILER_VERSION)
set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
else()
set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
endif()
string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
list(GET _watcom_version_list 0 _watcom_major)
list(GET _watcom_version_list 1 _watcom_minor)
set( __install__libs
${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
foreach(lib
${__install__libs}
)
if(EXISTS ${lib})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
else()
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
message(WARNING "system runtime library file does not exist: '${lib}'")
# This warning indicates an incomplete Watcom installation
# or a bug somewhere above here in this file.
# If you would like to avoid this warning, fix the real problem, or
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
# this file.
endif()
endif()
endforeach()
endif()
# Include system runtime libraries in the installation if any are
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
if(WIN32)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
else()
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
endif()
endif()
if(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT)
set(_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT
COMPONENT ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT})
endif()
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
)
install(DIRECTORY ${CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES}
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
)
endif()
endif()
cmake_policy(POP)

View File

@@ -5,22 +5,30 @@ set(PYTHONINTERP_FOUND)
if (WINDOWS) if (WINDOWS)
# On Windows, explicitly avoid Cygwin Python. # On Windows, explicitly avoid Cygwin Python.
find_program(PYTHON_EXECUTABLE if (DEFINED ENV{VIRTUAL_ENV})
NAMES python25.exe python23.exe python.exe find_program(PYTHON_EXECUTABLE
NO_DEFAULT_PATH # added so that cmake does not find cygwin python NAMES python.exe
PATHS PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] "$ENV{VIRTUAL_ENV}\\scripts"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] NO_DEFAULT_PATH
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] )
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] else()
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] find_program(PYTHON_EXECUTABLE
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] NAMES python25.exe python23.exe python.exe
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] NO_DEFAULT_PATH # added so that cmake does not find cygwin python
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] PATHS
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
) [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
)
endif()
elseif (EXISTS /etc/arch-release) elseif (EXISTS /etc/arch-release)
# On Archlinux, use Python 2 # On Archlinux, use Python 2

View File

@@ -33,3 +33,8 @@ set_source_files_properties(${libndhacd_HEADER_FILES}
add_library( nd_hacdConvexDecomposition STATIC ${libndhacd_SOURCE_FILES} ${libndhacd_HEADER_FILES}) add_library( nd_hacdConvexDecomposition STATIC ${libndhacd_SOURCE_FILES} ${libndhacd_HEADER_FILES})
target_link_libraries(
nd_hacdConvexDecomposition
PUBLIC
llcommon
)

View File

@@ -30,3 +30,8 @@ set_source_files_properties(${libpathing_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE) PROPERTIES HEADER_FILE_ONLY TRUE)
add_library(nd_Pathing STATIC ${libpathing_SOURCE_FILES} ${libpathing_HEADER_FILES} ) add_library(nd_Pathing STATIC ${libpathing_SOURCE_FILES} ${libpathing_HEADER_FILES} )
target_link_libraries(nd_Pathing
PUBLIC
llcommon
)

View File

@@ -81,3 +81,9 @@ set_source_files_properties(${llaudio_HEADER_FILES}
list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
add_library (llaudio ${llaudio_SOURCE_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES})
target_link_libraries(
llaudio
PUBLIC
llcommon
)

View File

@@ -77,3 +77,9 @@ set_source_files_properties(${llcharacter_HEADER_FILES}
list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES})
add_library (llcharacter ${llcharacter_SOURCE_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES})
target_link_libraries(
llcharacter
PUBLIC
llcommon
)

View File

@@ -162,7 +162,7 @@ public:
void pauseAllMotions(); void pauseAllMotions();
void unpauseAllMotions(); void unpauseAllMotions();
BOOL isPaused() const { return mPaused; } BOOL isPaused() const { return mPaused; }
U32 getPausedFrame() const { return mPausedFrame; } U64 getPausedFrame() const { return mPausedFrame; }
//<singu> //<singu>
void requestPause(std::vector<LLAnimPauseRequest>& avatar_pause_handles); void requestPause(std::vector<LLAnimPauseRequest>& avatar_pause_handles);
void pauseAllSyncedCharacters(std::vector<LLAnimPauseRequest>& avatar_pause_handles); void pauseAllSyncedCharacters(std::vector<LLAnimPauseRequest>& avatar_pause_handles);
@@ -252,7 +252,7 @@ protected:
F32 mLastTime; F32 mLastTime;
BOOL mHasRunOnce; BOOL mHasRunOnce;
BOOL mPaused; BOOL mPaused;
U32 mPausedFrame; U64 mPausedFrame;
F32 mTimeStep; F32 mTimeStep;
S32 mTimeStepCount; S32 mTimeStepCount;
F32 mLastInterp; F32 mLastInterp;

View File

@@ -4,7 +4,9 @@ project(llcommon)
include(Cwdebug) include(Cwdebug)
include(00-Common) include(00-Common)
include(Linking)
include(LLCommon) include(LLCommon)
include(EXPAT)
include(APR) include(APR)
include(Linking) include(Linking)
include(Boost) include(Boost)
@@ -287,6 +289,8 @@ endif(LLCOMMON_LINK_SHARED)
target_link_libraries( target_link_libraries(
llcommon llcommon
PUBLIC
absl::hash
${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES} ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
${APRUTIL_LIBRARIES} ${APRUTIL_LIBRARIES}
${APR_LIBRARIES} ${APR_LIBRARIES}

View File

@@ -90,7 +90,7 @@
bool operator==(AISyncKey const& key1, AISyncKey const& key2) bool operator==(AISyncKey const& key1, AISyncKey const& key2)
{ {
// Test if these keys match based on time. // Test if these keys match based on time.
if (std::abs((S32)(key1.mStartFrameCount - key2.mStartFrameCount)) > 1 && if (std::abs((S64)(key1.mStartFrameCount - key2.mStartFrameCount)) > 1 &&
std::abs(key1.mFrameTimer.getStartTime() - key2.mFrameTimer.getStartTime()) >= sSyncKeyExpirationTime) std::abs(key1.mFrameTimer.getStartTime() - key2.mFrameTimer.getStartTime()) >= sSyncKeyExpirationTime)
{ {
return false; return false;
@@ -420,7 +420,7 @@ void AISyncServerMap::remove_server(AISyncServer* server)
#include <boost/io/ios_state.hpp> #include <boost/io/ios_state.hpp>
//static //static
U32 LLFrameTimer::sFrameCount; U64 LLFrameTimer::sFrameCount;
double innerloop_count = 0; double innerloop_count = 0;

View File

@@ -56,8 +56,8 @@ struct LLFrameTimer
double mStartTime; double mStartTime;
double mExpiry; double mExpiry;
static double getCurrentTime(void); static double getCurrentTime(void);
static U32 sFrameCount; static U64 sFrameCount;
static U32 getFrameCount() { return sFrameCount; } static U64 getFrameCount() { return sFrameCount; }
F64 getStartTime() const { return mStartTime; } F64 getStartTime() const { return mStartTime; }
void reset(double expiration) { mStartTime = getCurrentTime(); mExpiry = mStartTime + expiration; } void reset(double expiration) { mStartTime = getCurrentTime(); mExpiry = mStartTime + expiration; }
bool hasExpired(void) const { return getCurrentTime() > mExpiry; } bool hasExpired(void) const { return getCurrentTime() > mExpiry; }
@@ -114,7 +114,7 @@ class LL_COMMON_API AISyncKey
{ {
private: private:
LLFrameTimer mFrameTimer; // This timer is started at the moment the sync key is created. LLFrameTimer mFrameTimer; // This timer is started at the moment the sync key is created.
U32 mStartFrameCount; // The frame count at which the timer was started. U64 mStartFrameCount; // The frame count at which the timer was started.
public: public:
// Constructor. // Constructor.

View File

@@ -43,7 +43,7 @@ F64 LLFrameTimer::sTotalSeconds = // Current time in seconds since epoch
U64_to_F64(LLFrameTimer::sTotalTime) * USEC_TO_SEC_F64; U64_to_F64(LLFrameTimer::sTotalTime) * USEC_TO_SEC_F64;
F64 LLFrameTimer::sFrameTime = 0.0; // Current time in seconds since application start, updated together with LLFrameTimer::sTotalTime. F64 LLFrameTimer::sFrameTime = 0.0; // Current time in seconds since application start, updated together with LLFrameTimer::sTotalTime.
// Updated exactly once per frame: // Updated exactly once per frame:
S32 LLFrameTimer::sFrameCount = 0; // Current frame number (number of frames since application start). U64 LLFrameTimer::sFrameCount = 0; // Current frame number (number of frames since application start).
U64 LLFrameTimer::sPrevTotalTime = LLFrameTimer::sStartTotalTime; // Previous (frame) time in microseconds since epoch, updated once per frame. U64 LLFrameTimer::sPrevTotalTime = LLFrameTimer::sStartTotalTime; // Previous (frame) time in microseconds since epoch, updated once per frame.
U64 LLFrameTimer::sFrameDeltaTime = 0; // Microseconds between last two calls to LLFrameTimer::updateFrameTimeAndCount. U64 LLFrameTimer::sFrameDeltaTime = 0; // Microseconds between last two calls to LLFrameTimer::updateFrameTimeAndCount.
// Mutex for the above. // Mutex for the above.

View File

@@ -84,12 +84,12 @@ public:
} }
// Return current frame number (the number of frames since application start). // Return current frame number (the number of frames since application start).
static U32 getFrameCount(void) static U64 getFrameCount(void)
{ {
// sFrameCount is only accessed by the main thread, so no locking is necessary. // sFrameCount is only accessed by the main thread, so no locking is necessary.
llassert(is_main_thread()); llassert(is_main_thread());
//sGlobalMutex.lock(); //sGlobalMutex.lock();
U32 res = sFrameCount; U64 res = sFrameCount;
//sGlobalMutex.unlock(); //sGlobalMutex.unlock();
return res; return res;
} }
@@ -185,7 +185,7 @@ protected:
static F64 sTotalSeconds; static F64 sTotalSeconds;
// Current frame number (number of frames since application start). // Current frame number (number of frames since application start).
static S32 sFrameCount; static U64 sFrameCount;
static bool sFirstFrameTimerCreated; static bool sFirstFrameTimerCreated;

View File

@@ -88,7 +88,7 @@ protected:
} }
static U64 getFrame() // Return the current frame number static U64 getFrame() // Return the current frame number
{ {
return (U64) LLFrameTimer::getFrameCount(); return LLFrameTimer::getFrameCount();
} }
}; };

View File

@@ -34,6 +34,7 @@
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include "stdtypes.h" #include "stdtypes.h"
#include "llpreprocessor.h" #include "llpreprocessor.h"
#include <absl/hash/hash.h>
class LLMutex; class LLMutex;
@@ -94,6 +95,11 @@ public:
bool operator<(const LLUUID &rhs) const; bool operator<(const LLUUID &rhs) const;
bool operator>(const LLUUID &rhs) const; bool operator>(const LLUUID &rhs) const;
template <typename H>
friend H AbslHashValue(H h, const LLUUID& id) {
return H::combine_contiguous(std::move(h), id.mData, UUID_BYTES);
}
// xor functions. Useful since any two random uuids xored together // xor functions. Useful since any two random uuids xored together
// will yield a determinate third random unique id that can be // will yield a determinate third random unique id that can be
// used as a key in a single uuid that represents 2. // used as a key in a single uuid that represents 2.
@@ -294,24 +300,22 @@ typedef std::set<LLUUID, lluuid_less> uuid_list_t;
namespace std { namespace std {
template <> struct hash<LLUUID> template <> struct hash<LLUUID>
{ {
public:
size_t operator()(const LLUUID & id) const size_t operator()(const LLUUID & id) const
{ {
return id.hash(); return absl::Hash<LLUUID>{}(id);
} }
}; };
} }
namespace boost { namespace boost {
template<> class hash<LLUUID> template<> struct hash<LLUUID>
{
public:
size_t operator()(const LLUUID& id) const
{ {
return id.hash(); size_t operator()(const LLUUID& id) const
} {
}; return absl::Hash<LLUUID>{}(id);
}
};
} }
/* /*

View File

@@ -57,6 +57,8 @@ add_library (llimage ${llimage_SOURCE_FILES})
target_link_libraries( target_link_libraries(
llimage llimage
PUBLIC
llcommon
${JPEG_LIBRARIES} ${JPEG_LIBRARIES}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}

View File

@@ -44,6 +44,8 @@ add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES})
target_link_libraries( target_link_libraries(
llimagej2coj llimagej2coj
PUBLIC
llcommon
${OPENJPEG_LIBRARIES} ${OPENJPEG_LIBRARIES}
) )

View File

@@ -69,3 +69,9 @@ set_source_files_properties(${llinventory_HEADER_FILES}
list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES})
add_library (llinventory ${llinventory_SOURCE_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES})
target_link_libraries(
llinventory
PUBLIC
llcommon
)

View File

@@ -803,7 +803,7 @@ void LLParcel::expirePasses(S32 now)
if (entry.mTime != 0 && entry.mTime < now) if (entry.mTime != 0 && entry.mTime < now)
{ {
mAccessList.erase(itor++); itor = mAccessList.erase(itor);
} }
else else
{ {
@@ -894,7 +894,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
{ {
if (time == 0 || (entry.mTime != 0 && entry.mTime < time)) if (time == 0 || (entry.mTime != 0 && entry.mTime < time))
{ {
mAccessList.erase(itor++); itor = mAccessList.erase(itor);
} }
else else
{ {
@@ -937,15 +937,18 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
const LLAccessEntry& entry = (*itor).second; const LLAccessEntry& entry = (*itor).second;
if (entry.mID == agent_id) if (entry.mID == agent_id)
{ {
if (time == 0 || (entry.mTime != 0 && entry.mTime < time)) // Singu Note: Allow amending ban time to be less without needing to remove
//if (time == 0 || (entry.mTime != 0 && entry.mTime < time))
{ {
mBanList.erase(itor++); itor = mBanList.erase(itor);
} }
#if 0
else else
{ {
// existing one expires later // existing one expires later
return FALSE; return FALSE;
} }
#endif
} }
else else
{ {
@@ -973,7 +976,7 @@ BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
const LLAccessEntry& entry = (*itor).second; const LLAccessEntry& entry = (*itor).second;
if (entry.mID == agent_id) if (entry.mID == agent_id)
{ {
list->erase(itor++); itor = list->erase(itor);
removed = TRUE; removed = TRUE;
} }
else else

View File

@@ -102,3 +102,9 @@ set_source_files_properties(${llmath_HEADER_FILES}
list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})
add_library (llmath ${llmath_SOURCE_FILES}) add_library (llmath ${llmath_SOURCE_FILES})
target_link_libraries(
llmath
PUBLIC
llcommon
)

View File

@@ -219,6 +219,8 @@ add_library (llmessage ${llmessage_SOURCE_FILES})
target_link_libraries( target_link_libraries(
llmessage llmessage
PUBLIC
llcommon
${CURL_LIBRARIES} ${CURL_LIBRARIES}
${CARES_LIBRARIES} ${CARES_LIBRARIES}
${CRYPTO_LIBRARIES} ${CRYPTO_LIBRARIES}

View File

@@ -927,7 +927,6 @@ P2(groupProposalBallotResponder, transfer_300s);
P(homeLocationResponder); P(homeLocationResponder);
P2(HTTPGetResponder, reply_15s); P2(HTTPGetResponder, reply_15s);
P(iamHere); P(iamHere);
P(iamHereVoice);
P2(BGFolderHttpHandler, transfer_300s); P2(BGFolderHttpHandler, transfer_300s);
P(BGItemHttpHandler); P(BGItemHttpHandler);
P(lcl_responder); P(lcl_responder);

View File

@@ -198,7 +198,7 @@ void LLXferManager::updateHostStatus()
<< " is " << xferp->mXferSize << " bytes" << " is " << xferp->mXferSize << " bytes"
<< ", status " << (S32)(xferp->mStatus) << ", status " << (S32)(xferp->mStatus)
<< ", waiting for ACK: " << (S32)(xferp->mWaitingForACK) << ", waiting for ACK: " << (S32)(xferp->mWaitingForACK)
<< " in frame " << (S32) LLFrameTimer::getFrameCount() << " in frame " << LLFrameTimer::getFrameCount()
<< LL_ENDL; << LL_ENDL;
} }
@@ -209,7 +209,7 @@ void LLXferManager::updateHostStatus()
<< " has " << (*iter)->mNumActive << " has " << (*iter)->mNumActive
<< " active, " << (*iter)->mNumPending << " active, " << (*iter)->mNumPending
<< " pending" << " pending"
<< " in frame " << (S32) LLFrameTimer::getFrameCount() << " in frame " << LLFrameTimer::getFrameCount()
<< LL_ENDL; << LL_ENDL;
} }
#endif // LL_XFER_DIAGNOISTIC_LOGGING #endif // LL_XFER_DIAGNOISTIC_LOGGING

View File

@@ -58,8 +58,14 @@ list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES})
if(LINUX AND STANDALONE) if(LINUX AND STANDALONE)
target_link_libraries (llplugin rt dl) target_link_libraries (llplugin llcommon rt dl)
endif(LINUX AND STANDALONE) else()
target_link_libraries(
llplugin
PUBLIC
llcommon
)
endif()
add_subdirectory(slplugin) add_subdirectory(slplugin)

View File

@@ -1,6 +1,7 @@
project(SLPlugin) project(SLPlugin)
include(00-Common) include(00-Common)
include(Linking)
include(LLCommon) include(LLCommon)
include(LLPlugin) include(LLPlugin)
include(Linking) include(Linking)

View File

@@ -71,3 +71,9 @@ set_source_files_properties(${llprimitive_HEADER_FILES}
list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES})
add_library (llprimitive ${llprimitive_SOURCE_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES})
target_link_libraries(
llprimitive
PUBLIC
llcommon
)

View File

@@ -84,3 +84,9 @@ endif (DARWIN)
list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
add_library (llrender ${llrender_SOURCE_FILES}) add_library (llrender ${llrender_SOURCE_FILES})
target_link_libraries(
llrender
PUBLIC
llcommon
)

View File

@@ -461,7 +461,7 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
if(mMouseDownSignal) (*mMouseDownSignal)(this, LLSD()); if(mMouseDownSignal) (*mMouseDownSignal)(this, LLSD());
mMouseDownTimer.start(); mMouseDownTimer.start();
mMouseDownFrame = (S32) LLFrameTimer::getFrameCount(); mMouseDownFrame = LLFrameTimer::getFrameCount();
mMouseHeldDownCount = 0; mMouseHeldDownCount = 0;
@@ -589,7 +589,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
if (mMouseDownTimer.getStarted()) if (mMouseDownTimer.getStarted())
{ {
F32 elapsed = getHeldDownTime(); F32 elapsed = getHeldDownTime();
if( mHeldDownDelay <= elapsed && mHeldDownFrameDelay <= (S32)LLFrameTimer::getFrameCount() - mMouseDownFrame) if( mHeldDownDelay <= elapsed && mHeldDownFrameDelay <= LLFrameTimer::getFrameCount() - mMouseDownFrame)
{ {
LLSD param; LLSD param;
param["count"] = mMouseHeldDownCount++; param["count"] = mMouseHeldDownCount++;

View File

@@ -319,7 +319,7 @@ protected:
const LLFontGL *mGLFont; const LLFontGL *mGLFont;
S32 mMouseDownFrame; U64 mMouseDownFrame;
S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback
F32 mHeldDownDelay; // seconds, after which held-down callbacks get called F32 mHeldDownDelay; // seconds, after which held-down callbacks get called
S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called

View File

@@ -674,6 +674,31 @@ void LLFloater::close(bool app_quitting)
} }
} }
//If floater is a dependent, remove it from parent (dependee)
LLFloater* dependee = mDependeeHandle.get();
if (dependee)
{
dependee->removeDependentFloater(this);
}
// now close dependent floater
for (handle_set_iter_t dependent_it = mDependents.begin();
dependent_it != mDependents.end(); )
{
LLFloater* floaterp = dependent_it->get();
if (floaterp)
{
++dependent_it;
floaterp->close(app_quitting);
}
else
{
mDependents.erase(dependent_it++);
}
}
cleanupHandles();
if (!app_quitting && !getControlName().empty()) if (!app_quitting && !getControlName().empty())
setControlValue(false); setControlValue(false);

View File

@@ -432,6 +432,13 @@ void LLLineEditor::setCursorToEnd()
deselect(); deselect();
} }
void LLLineEditor::resetScrollPosition()
{
mScrollHPos = 0;
// make sure cursor stays in visible range
setCursor(getCursor());
}
BOOL LLLineEditor::canDeselect() const BOOL LLLineEditor::canDeselect() const
{ {
return hasSelection(); return hasSelection();

View File

@@ -190,6 +190,9 @@ public:
void setCursor( S32 pos ); void setCursor( S32 pos );
void setCursorToEnd(); void setCursorToEnd();
// set scroll to earliest position it can reasonably be set
void resetScrollPosition();
// Selects characters 'start' to 'end'. // Selects characters 'start' to 'end'.
void setSelection(S32 start, S32 end); void setSelection(S32 start, S32 end);

View File

@@ -78,7 +78,7 @@ public:
visible("visible", true), visible("visible", true),
value("value"), value("value"),
tool_tip("tool_tip", ""), tool_tip("tool_tip", ""),
format("format", ""), format("format", "%D %T"),
font("font"/*, LLFontGL::getFontSansSerifSmall()*/), font("font"/*, LLFontGL::getFontSansSerifSmall()*/),
font_color("font_color", LLColor4::black), font_color("font_color", LLColor4::black),
font_style("font-style"), font_style("font-style"),

View File

@@ -54,6 +54,8 @@
#include "llsdparam.h" #include "llsdparam.h"
#include "llmenugl.h" #include "llmenugl.h"
#include <boost/algorithm/string/predicate.hpp>
static LLRegisterWidget<LLScrollListCtrl> r("scroll_list"); static LLRegisterWidget<LLScrollListCtrl> r("scroll_list");
@@ -157,6 +159,7 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect,
mFgUnselectedColor(LLUI::sColorsGroup->getColor("ScrollUnselectedColor")), mFgUnselectedColor(LLUI::sColorsGroup->getColor("ScrollUnselectedColor")),
mFgDisabledColor(LLUI::sColorsGroup->getColor("ScrollDisabledColor")), mFgDisabledColor(LLUI::sColorsGroup->getColor("ScrollDisabledColor")),
mHighlightedColor(LLUI::sColorsGroup->getColor("ScrollHighlightedColor")), mHighlightedColor(LLUI::sColorsGroup->getColor("ScrollHighlightedColor")),
mFilter(),
mSearchColumn(0), mSearchColumn(0),
mColumnPadding(5) mColumnPadding(5)
{ {
@@ -195,7 +198,8 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect,
addChild(mBorder); addChild(mBorder);
} }
LLTextBox* textBox = new LLTextBox("comment_text",mItemListRect,std::string()); LLTextBox* textBox = new LLTextBox("comment_text",mItemListRect, LLStringUtil::null);
mCommentTextView = textBox;
textBox->setBorderVisible(false); textBox->setBorderVisible(false);
textBox->setFollows(FOLLOWS_ALL); textBox->setFollows(FOLLOWS_ALL);
textBox->setFontShadow(LLFontGL::NO_SHADOW); textBox->setFontShadow(LLFontGL::NO_SHADOW);
@@ -312,12 +316,12 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
uuid_vec_t LLScrollListCtrl::getSelectedIDs() uuid_vec_t LLScrollListCtrl::getSelectedIDs()
{ {
LLUUID selected_id;
uuid_vec_t ids; uuid_vec_t ids;
std::vector<LLScrollListItem*> selected = this->getAllSelected(); if (!getCanSelect()) return ids;
for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
for(const auto& item : mItemList)
{ {
ids.push_back((*itr)->getUUID()); if (item->getSelected()) ids.push_back(item->getUUID());
} }
return ids; return ids;
} }
@@ -400,6 +404,17 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllData() const
return ret; return ret;
} }
uuid_vec_t LLScrollListCtrl::getAllIDs() const
{
uuid_vec_t ret;
ret.reserve(mItemList.size()); //Optimization
for(const auto& item : mItemList)
{
ret.push_back(item->getUUID());
}
return ret;
}
// returns first matching item // returns first matching item
LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const
{ {
@@ -443,23 +458,27 @@ void LLScrollListCtrl::updateLayout()
mCommentTextView->setShape(mItemListRect); mCommentTextView->setShape(mItemListRect);
// how many lines of content in a single "page" adjustScrollbar(mFilter.empty() ? getItemCount() : mScrollbar->getDocSize()); // Doc size is the item count without a filter, otherwise it's calculated whenever filter is updated
S32 page_lines = getLinesPerPage(); dirtyColumns();
}
BOOL scrollbar_visible = mLineHeight * getItemCount() > mItemListRect.getHeight(); void LLScrollListCtrl::adjustScrollbar(S32 doc_size)
{
// how many lines of content in a single "page"
S32 page_lines = getLinesPerPage();
bool scrollbar_visible = mLineHeight * doc_size > mItemListRect.getHeight();
if (scrollbar_visible) if (scrollbar_visible)
{ {
// provide space on the right for scrollbar // provide space on the right for scrollbar
mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE; mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE;
mScrollbar->setOrigin(mItemListRect.mRight, mItemListRect.mBottom);
mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
} }
mScrollbar->setOrigin(getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE, mItemListRect.mBottom);
mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
mScrollbar->setPageSize(page_lines); mScrollbar->setPageSize(page_lines);
mScrollbar->setDocSize( getItemCount() ); mScrollbar->setDocSize(doc_size);
mScrollbar->setVisible(scrollbar_visible); mScrollbar->setVisible(scrollbar_visible);
dirtyColumns();
} }
// Attempt to size the control to show all items. // Attempt to size the control to show all items.
@@ -493,6 +512,9 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
BOOL not_too_big = getItemCount() < mMaxItemCount; BOOL not_too_big = getItemCount() < mMaxItemCount;
if (not_too_big) if (not_too_big)
{ {
if (!mFilter.empty() && !filterItem(item)) // If we're filtering, filter this item if needed, if not, bump the document size.
mScrollbar->setDocSize(mScrollbar->getDocSize()+1);
switch( pos ) switch( pos )
{ {
case ADD_TOP: case ADD_TOP:
@@ -575,10 +597,11 @@ S32 LLScrollListCtrl::calcMaxContentWidth()
{ {
// update max content width for this column, by looking at all items // update max content width for this column, by looking at all items
column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel.getWString()) + mColumnPadding + HEADING_TEXT_PADDING : 0; column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel.getWString()) + mColumnPadding + HEADING_TEXT_PADDING : 0;
item_list::iterator iter; for (auto& item : mItemList)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); if (item->getFiltered()) continue;
LLScrollListCell* cellp = item->getColumn(column->mIndex);
if (!cellp) continue; if (!cellp) continue;
column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth);
@@ -588,6 +611,7 @@ S32 LLScrollListCtrl::calcMaxContentWidth()
} }
mColumnWidthsDirty = false; mColumnWidthsDirty = false;
mMaxContentWidth = max_item_width;
return max_item_width; return max_item_width;
} }
@@ -631,10 +655,8 @@ const S32 SCROLL_LIST_ROW_PAD = 2;
void LLScrollListCtrl::updateLineHeight() void LLScrollListCtrl::updateLineHeight()
{ {
mLineHeight = 0; mLineHeight = 0;
item_list::iterator iter; for (auto& itemp : mItemList)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem *itemp = *iter;
S32 num_cols = itemp->getNumColumns(); S32 num_cols = itemp->getNumColumns();
S32 i = 0; S32 i = 0;
for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i)) for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
@@ -755,6 +777,7 @@ BOOL LLScrollListCtrl::selectFirstItem()
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem *itemp = *iter; LLScrollListItem *itemp = *iter;
if (itemp->getFiltered()) continue;
if( first_item && itemp->getEnabled() ) if( first_item && itemp->getEnabled() )
{ {
if (!itemp->getSelected()) if (!itemp->getSelected())
@@ -814,9 +837,9 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
continue ; continue ;
} }
if( index >= first_index && index <= last_index ) if (index >= first_index && index <= last_index)
{ {
if( itemp->getEnabled() ) if (itemp->getEnabled())
{ {
selectItem(itemp, FALSE); selectItem(itemp, FALSE);
success = TRUE; success = TRUE;
@@ -962,6 +985,8 @@ S32 LLScrollListCtrl::selectMultiple( uuid_vec_t ids )
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
if (item->getFiltered()) continue;
uuid_vec_t::iterator iditr; uuid_vec_t::iterator iditr;
for(iditr = ids.begin(); iditr != ids.end(); ++iditr) for(iditr = ids.begin(); iditr != ids.end(); ++iditr)
{ {
@@ -987,15 +1012,14 @@ S32 LLScrollListCtrl::getItemIndex( LLScrollListItem* target_item ) const
updateSort(); updateSort();
S32 index = 0; S32 index = 0;
item_list::const_iterator iter; for (LLScrollListItem* itemp : mItemList)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem *itemp = *iter; if (itemp->getFiltered()) continue;
if (target_item == itemp) if (target_item == itemp)
{ {
return index; return index;
} }
index++; ++index;
} }
return -1; return -1;
} }
@@ -1005,15 +1029,14 @@ S32 LLScrollListCtrl::getItemIndex( const LLUUID& target_id ) const
updateSort(); updateSort();
S32 index = 0; S32 index = 0;
item_list::const_iterator iter; for (LLScrollListItem* itemp : mItemList)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem *itemp = *iter; if (itemp->getFiltered()) continue;
if (target_id == itemp->getUUID()) if (target_id == itemp->getUUID())
{ {
return index; return index;
} }
index++; ++index;
} }
return -1; return -1;
} }
@@ -1035,6 +1058,7 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* cur_item = *iter; LLScrollListItem* cur_item = *iter;
if (cur_item->getFiltered()) continue;
if (cur_item->getSelected()) if (cur_item->getSelected())
{ {
@@ -1079,6 +1103,7 @@ void LLScrollListCtrl::selectNextItem( BOOL extend_selection)
for (iter = mItemList.rbegin(); iter != mItemList.rend(); iter++) for (iter = mItemList.rbegin(); iter != mItemList.rend(); iter++)
{ {
LLScrollListItem* cur_item = *iter; LLScrollListItem* cur_item = *iter;
if (cur_item->getFiltered()) continue;
if (cur_item->getSelected()) if (cur_item->getSelected())
{ {
@@ -1128,7 +1153,7 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change)
void LLScrollListCtrl::setCommentText(const std::string& comment_text) void LLScrollListCtrl::setCommentText(const std::string& comment_text)
{ {
getChild<LLTextBox>("comment_text")->setWrappedText(comment_text); static_cast<LLTextBox*>(mCommentTextView)->setWrappedText(comment_text);
} }
LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos) LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
@@ -1183,6 +1208,7 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOO
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
std::string item_text = item->getColumn(column)->getValue().asString(); // Only select enabled items with matching names std::string item_text = item->getColumn(column)->getValue().asString(); // Only select enabled items with matching names
if (!case_sensitive) if (!case_sensitive)
{ {
@@ -1218,6 +1244,8 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
if (item->getFiltered()) continue;
// Only select enabled items with matching names // Only select enabled items with matching names
LLScrollListCell* cellp = item->getColumn(getSearchColumn()); LLScrollListCell* cellp = item->getColumn(getSearchColumn());
BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE; BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE;
@@ -1241,6 +1269,9 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
// Don't select filtered items
if (item->getFiltered()) continue;
// Only select enabled items with matching names // Only select enabled items with matching names
LLScrollListCell* cellp = item->getColumn(getSearchColumn()); LLScrollListCell* cellp = item->getColumn(getSearchColumn());
if (!cellp) if (!cellp)
@@ -1325,6 +1356,8 @@ BOOL LLScrollListCtrl::setSelectedByValue(const LLSD& value, BOOL selected)
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
if (item->getFiltered()) continue;
if (item->getEnabled() && (item->getValue().asString() == value.asString())) if (item->getEnabled() && (item->getValue().asString() == value.asString()))
{ {
if (selected) if (selected)
@@ -1354,7 +1387,7 @@ BOOL LLScrollListCtrl::isSelected(const LLSD& value) const
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
if (item->getValue().asString() == value.asString()) if (!item->getFiltered() && item->getValue().asString() == value.asString())
{ {
return item->getSelected(); return item->getSelected();
} }
@@ -1393,9 +1426,6 @@ void LLScrollListCtrl::drawItems()
S32 x = mItemListRect.mLeft; S32 x = mItemListRect.mLeft;
S32 y = mItemListRect.mTop - mLineHeight; S32 y = mItemListRect.mTop - mLineHeight;
// allow for partial line at bottom
S32 num_page_lines = getLinesPerPage();
LLRect item_rect; LLRect item_rect;
LLGLSUIDefault gls_ui; LLGLSUIDefault gls_ui;
@@ -1414,27 +1444,32 @@ void LLScrollListCtrl::drawItems()
clip_rect.intersectWith(scissor); clip_rect.intersectWith(scissor);
} }
S32 max_columns = 0;
LLColor4 highlight_color = LLColor4::white;
F32 type_ahead_timeout = LLUI::sConfigGroup->getF32("TypeAheadTimeout");
highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f);
S32 first_line = mScrollLines; S32 first_line = mScrollLines;
S32 last_line = llmin((S32)mItemList.size() - 1, mScrollLines + getLinesPerPage());
if ((item_list::size_type)first_line >= mItemList.size()) if ((item_list::size_type)first_line >= mItemList.size())
{ {
return; return;
} }
S32 list_size = mItemList.size() - 1;
// allow for partial line at bottom
S32 num_page_lines = mFilter.empty() ? getLinesPerPage() : mScrollbar->getDocSize() + 1;
S32 last_line = llmin(list_size, mScrollLines + num_page_lines);
S32 max_columns = 0;
LLColor4 highlight_color = LLColor4::white;
static const LLUICachedControl<F32> type_ahead_timeout("TypeAheadTimeout");
highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f);
bool done = false; bool done = false;
for (S32 pass = 0; !done; ++pass) for (S32 pass = 0; !done; ++pass)
{ {
bool should_continue = false; // False until all passes are done for all row cells. bool should_continue = false; // False until all passes are done for all row cells.
S32 cur_y = y; S32 cur_y = y;
for (S32 line = first_line; line <= last_line; line++) for (S32 index = first_line, line = first_line; index <= list_size; ++index)
{ {
LLScrollListItem* item = mItemList[line]; LLScrollListItem* item = mItemList[index];
if (item->getFiltered()) continue; // Skip filtered
item_rect.setOriginAndSize( item_rect.setOriginAndSize(
x, x,
@@ -1450,7 +1485,6 @@ void LLScrollListCtrl::drawItems()
LLColor4 fg_color; LLColor4 fg_color;
LLColor4 bg_color(LLColor4::transparent); LLColor4 bg_color(LLColor4::transparent);
if (mScrollLines <= line && line < mScrollLines + num_page_lines)
{ {
cur_y -= mLineHeight; cur_y -= mLineHeight;
@@ -1486,6 +1520,10 @@ void LLScrollListCtrl::drawItems()
} }
should_continue |= item->draw(pass, item_rect, fg_color, bg_color, highlight_color, mColumnPadding); should_continue |= item->draw(pass, item_rect, fg_color, bg_color, highlight_color, mColumnPadding);
if (++line > last_line)
{
break; // Don't draw any more than needed.
}
} }
} }
done = !should_continue; done = !should_continue;
@@ -1518,7 +1556,7 @@ void LLScrollListCtrl::draw()
updateColumns(); updateColumns();
getChildView("comment_text")->setVisible(mItemList.empty()); mCommentTextView->setVisible(mItemList.empty());
drawItems(); drawItems();
@@ -1636,9 +1674,10 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
// meaning that we never stop selecting until hitting max or // meaning that we never stop selecting until hitting max or
// the end of the list. // the end of the list.
LLScrollListItem* lastSelected = mLastSelected; LLScrollListItem* lastSelected = mLastSelected;
auto selected_count = getAllSelected().size();
for (itor = mItemList.begin(); itor != mItemList.end(); ++itor) for (itor = mItemList.begin(); itor != mItemList.end(); ++itor)
{ {
if(mMaxSelectable > 0 && getAllSelected().size() >= mMaxSelectable) if(mMaxSelectable > 0 && selected_count >= mMaxSelectable)
{ {
if(mOnMaximumSelectCallback) if(mOnMaximumSelectCallback)
{ {
@@ -1647,6 +1686,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
break; break;
} }
LLScrollListItem *item = *itor; LLScrollListItem *item = *itor;
if (item->getFiltered()) continue;
if (item == hit_item || item == lastSelected) if (item == hit_item || item == lastSelected)
{ {
selectItem(item, FALSE); selectItem(item, FALSE);
@@ -1661,6 +1701,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask)
{ {
selectItem(item, FALSE); selectItem(item, FALSE);
} }
++selected_count;
} }
} }
} }
@@ -1788,17 +1829,19 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{ {
// Offer the click to the children, even if we aren't enabled // Offer the click to the children, even if we aren't enabled
// so the scroll bars will work. // so the scroll bars will work.
if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) handled = LLView::childrenHandleDoubleClick(x, y, mask) != nullptr;
if (!handled)
{ {
// Run the callback only if an item is being double-clicked. // Run the callback only if an item is being double-clicked.
if( mCanSelect && hitItem(x, y) && mOnDoubleClickCallback ) if (mCanSelect && mOnDoubleClickCallback && hitItem(x, y))
{ {
mOnDoubleClickCallback(); mOnDoubleClickCallback();
handled = true;
} }
} }
} }
return TRUE; return handled;
} }
BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
@@ -1871,15 +1914,16 @@ LLScrollListItem* LLScrollListCtrl::hitItem( S32 x, S32 y )
// allow for partial line at bottom // allow for partial line at bottom
S32 num_page_lines = getLinesPerPage(); S32 num_page_lines = getLinesPerPage();
S32 list_size = mItemList.size() - 1;
S32 last_line = llmin(list_size, mScrollLines + num_page_lines);
S32 line = 0; for (S32 index = mScrollLines, line = mScrollLines; index <= list_size; ++index)
item_list::iterator iter;
for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = mItemList[index];
if( mScrollLines <= line && line < mScrollLines + num_page_lines ) if (item->getFiltered()) continue;
{ {
if( item->getEnabled() && item_rect.pointInRect( x, y ) ) if (item->getEnabled() && item_rect.pointInRect( x, y ))
{ {
hit_item = item; hit_item = item;
break; break;
@@ -1887,7 +1931,7 @@ LLScrollListItem* LLScrollListCtrl::hitItem( S32 x, S32 y )
item_rect.translate(0, -mLineHeight); item_rect.translate(0, -mLineHeight);
} }
line++; if (++line > last_line) break; // Don't try to hit any undrawn items
} }
return hit_item; return hit_item;
@@ -1945,6 +1989,58 @@ S32 LLScrollListCtrl::getRowOffsetFromIndex(S32 index)
return row_bottom; return row_bottom;
} }
bool LLScrollListCtrl::filterItem(LLScrollListItem* item)
{
for (const auto& column : item->mColumns)
{
// Only filter text, search tooltip because it'll usually be the text anyway.
if (column->isText() && boost::icontains(column->getToolTip(), mFilter))
{
item->setFiltered(false);
return false;
}
}
item->setFiltered(true);
return true;
}
void LLScrollListCtrl::setFilter(const std::string& filter)
{
if (filter == mFilter) return;
bool no_filter = filter.empty();
// If our filter string has been expanded, we can skip already filtered items
bool expanded = !no_filter && !mFilter.empty() && boost::icontains(filter, mFilter);
// If our filter string has been contracted, we can skip already unfiltered items
bool contracted = !no_filter && !mFilter.empty() && !expanded && boost::icontains(mFilter, filter);
bool unique = !expanded && !contracted;
mFilter = filter;
S32 unfiltered_count = no_filter ? mItemList.size() // No filter, doc size is all items
: !unique ? mScrollbar->getDocSize() // Expanded/contracted filter, start with the current doc size and remove/add respectively
: 0; // Different filter, count up from 0;
for (auto& item : mItemList)
{
if (no_filter) item->setFiltered(false);
else if (expanded && !item->getFiltered()) // Filter has been expanded and we are not yet filtered
{
if (filterItem(item)) --unfiltered_count; // We are now filtered, lower the count
}
else if (unique || // Filter isn't expanded, find out if we should be filtered or
(contracted && item->getFiltered())) // Filter has contracted and we were filtered before, should we still be?
{
if (!filterItem(item)) ++unfiltered_count; // Wasn't filltered, bump count
}
}
if (mLastSelected && mLastSelected->getFiltered()) // Remove selection if filtered.
mLastSelected = nullptr;
// Scrollbar needs adjusted
setScrollPos(0); // Changing the filter resets scroll position
adjustScrollbar(unfiltered_count);
}
BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask)
{ {
@@ -2174,26 +2270,28 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char)
while(iter != start_iter) while(iter != start_iter)
{ {
LLScrollListItem* item = *iter; LLScrollListItem* item = *iter;
if (!item->getFiltered())
LLScrollListCell* cellp = item->getColumn(getSearchColumn());
if (cellp)
{ {
// Only select enabled items with matching first characters LLScrollListCell* cellp = item->getColumn(getSearchColumn());
LLWString item_label = utf8str_to_wstring(cellp->getValue().asString()); if (cellp)
if (item->getEnabled() && LLStringOps::toLower(item_label[0]) == uni_char)
{ {
selectItem(item); // Only select enabled items with matching first characters
mNeedsScroll = true; LLWString item_label = utf8str_to_wstring(cellp->getValue().asString());
cellp->highlightText(0, 1); if (item->getEnabled() && LLStringOps::toLower(item_label[0]) == uni_char)
mSearchTimer.reset();
if (mCommitOnKeyboardMovement
&& !mCommitOnSelectionChange)
{ {
onCommit(); selectItem(item);
} mNeedsScroll = true;
cellp->highlightText(0, 1);
mSearchTimer.reset();
break; if (mCommitOnKeyboardMovement
&& !mCommitOnSelectionChange)
{
onCommit();
}
break;
}
} }
} }
@@ -2359,6 +2457,12 @@ void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar )
} }
void LLScrollListCtrl::setSortOrder(const sort_order_t& order)
{
mSortColumns = order;
updateSort();
}
void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending) void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending)
{ {
column_map_t::iterator itor = mColumns.find(name); column_map_t::iterator itor = mColumns.find(name);
@@ -2805,7 +2909,7 @@ void LLScrollListCtrl::selectAll()
for (iter = mItemList.begin(); iter != mItemList.end(); iter++) for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{ {
LLScrollListItem *itemp = *iter; LLScrollListItem *itemp = *iter;
if( itemp->getEnabled() ) if (itemp->getEnabled() && !itemp->getFiltered())
{ {
selectItem(itemp, FALSE); selectItem(itemp, FALSE);
} }

View File

@@ -207,6 +207,7 @@ public:
LLScrollListItem* getFirstData() const; LLScrollListItem* getFirstData() const;
LLScrollListItem* getLastData() const; LLScrollListItem* getLastData() const;
std::vector<LLScrollListItem*> getAllData() const; std::vector<LLScrollListItem*> getAllData() const;
uuid_vec_t getAllIDs() const; //Helper. Much like getAllData, but just provides a LLUUID vec
LLScrollListItem* getItem(const LLSD& sd) const; LLScrollListItem* getItem(const LLSD& sd) const;
@@ -248,6 +249,9 @@ public:
void clearSearchString() { mSearchString.clear(); } void clearSearchString() { mSearchString.clear(); }
bool filterItem(LLScrollListItem* item);
void setFilter(const std::string& filter);
// support right-click context menus for avatar/group lists // support right-click context menus for avatar/group lists
void setContextMenu(LLMenuGL* menu) { mPopupMenu = menu; } void setContextMenu(LLMenuGL* menu) { mPopupMenu = menu; }
void setContextMenu(S32 index) { mPopupMenu = sMenus[index]; } void setContextMenu(S32 index) { mPopupMenu = sMenus[index]; }
@@ -275,6 +279,7 @@ public:
virtual void resetDirty(); // Clear dirty state virtual void resetDirty(); // Clear dirty state
virtual void updateLayout(); virtual void updateLayout();
void adjustScrollbar(S32 doc_size);
virtual void fitContents(S32 max_width, S32 max_height); virtual void fitContents(S32 max_width, S32 max_height);
virtual LLRect getRequiredRect(); virtual LLRect getRequiredRect();
@@ -321,10 +326,12 @@ public:
S32 getTotalStaticColumnWidth() { return mTotalStaticColumnWidth; } S32 getTotalStaticColumnWidth() { return mTotalStaticColumnWidth; }
typedef std::pair<S32, bool> sort_column_t; typedef std::pair<S32, bool> sort_column_t;
const std::vector<sort_column_t>& getSortColumns() const { return mSortColumns; } typedef std::vector<sort_column_t> sort_order_t;
const sort_order_t& getSortOrder() const { return mSortColumns; }
std::string getSortColumnName(); std::string getSortColumnName();
BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; } BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
BOOL hasSortOrder() const; BOOL hasSortOrder() const;
void setSortOrder(const sort_order_t& order);
void clearSortOrder(); void clearSortOrder();
void setSortEnabled(bool sort); void setSortEnabled(bool sort);
@@ -468,6 +475,8 @@ private:
LLWString mSearchString; LLWString mSearchString;
LLFrameTimer mSearchTimer; LLFrameTimer mSearchTimer;
std::string mFilter;
S32 mSearchColumn; S32 mSearchColumn;
S32 mNumDynamicWidthColumns; S32 mNumDynamicWidthColumns;
S32 mTotalStaticColumnWidth; S32 mTotalStaticColumnWidth;
@@ -484,7 +493,7 @@ private:
typedef std::vector<LLScrollListColumn*> ordered_columns_t; typedef std::vector<LLScrollListColumn*> ordered_columns_t;
ordered_columns_t mColumnsIndexed; ordered_columns_t mColumnsIndexed;
std::vector<sort_column_t> mSortColumns; sort_order_t mSortColumns;
sort_signal_t* mSortCallback; sort_signal_t* mSortCallback;
}; // end class LLScrollListCtrl }; // end class LLScrollListCtrl

View File

@@ -38,6 +38,7 @@
LLScrollListItem::LLScrollListItem( const Params& p ) LLScrollListItem::LLScrollListItem( const Params& p )
: mSelected(FALSE), : mSelected(FALSE),
mEnabled(p.enabled), mEnabled(p.enabled),
mFiltered(false),
mUserdata(p.userdata), mUserdata(p.userdata),
mItemValue(p.value), mItemValue(p.value),
mColumns() mColumns()

View File

@@ -71,6 +71,9 @@ public:
void setEnabled( BOOL b ) { mEnabled = b; } void setEnabled( BOOL b ) { mEnabled = b; }
BOOL getEnabled() const { return mEnabled; } BOOL getEnabled() const { return mEnabled; }
void setFiltered(bool b) { if (mFiltered = b) mSelected = false; }
bool getFiltered() const { return mFiltered; }
void setUserdata( void* userdata ) { mUserdata = userdata; } void setUserdata( void* userdata ) { mUserdata = userdata; }
void* getUserdata() const { return mUserdata; } void* getUserdata() const { return mUserdata; }
@@ -100,6 +103,7 @@ protected:
private: private:
BOOL mSelected; BOOL mSelected;
BOOL mEnabled; BOOL mEnabled;
bool mFiltered;
void* mUserdata; void* mUserdata;
LLSD mItemValue; LLSD mItemValue;
std::vector<LLScrollListCell *> mColumns; std::vector<LLScrollListCell *> mColumns;

View File

@@ -264,6 +264,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value )
mValue = v; mValue = v;
updateEditor(); updateEditor();
mEditor->resetScrollPosition();
} }
} }
@@ -329,7 +330,9 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data )
if( success ) if( success )
{ {
updateEditor(); // We committed and clamped value
// try to display as much as possible
mEditor->resetScrollPosition();
} }
else else
{ {
@@ -461,6 +464,7 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
// text editors don't support revert normally (due to user confusion) // text editors don't support revert normally (due to user confusion)
// but not allowing revert on a spinner seems dangerous // but not allowing revert on a spinner seems dangerous
updateEditor(); updateEditor();
mEditor->resetScrollPosition();
mEditor->setFocus(FALSE); mEditor->setFocus(FALSE);
return TRUE; return TRUE;
} }

View File

@@ -386,9 +386,15 @@ const std::string& LLTextEditor::getMenuSegmentUrl() const
static LLTextEditor* get_focused_text_editor() static LLTextEditor* get_focused_text_editor()
{ {
auto* list = dynamic_cast<LLTextEditor*>(gFocusMgr.getKeyboardFocus()); auto* te =
llassert(list); // This listener only applies to lists #ifdef SHOW_ASSERT
return list; dynamic_cast<LLTextEditor*>
#else
static_cast<LLTextEditor*>
#endif
(gFocusMgr.getKeyboardFocus());
llassert(te); // This listener only applies to text editors
return te;
} }
class ContextText : public LLMemberListener<LLView> class ContextText : public LLMemberListener<LLView>
@@ -436,20 +442,67 @@ class ContextUrl : public LLMemberListener<LLView>
} }
}; };
class ContextUrlCopy : public LLMemberListener<LLView> class ContextIDUrl : public LLMemberListener<LLView>
{ {
protected:
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override std::string getID(const std::string& type) const
{ {
const auto& url = get_focused_url(); const auto& url = get_focused_url();
const auto& type = userdata.asStringRef();
// Empty works like avatar and group, "object" is an object (you needed to be told this) // Empty works like avatar and group, "object" is an object (you needed to be told this)
const auto& id = type.empty() ? LLUrlAction::getUserID(url) : LLUrlAction::getObjectId(url); return type.empty() ? LLUrlAction::getUserID(url) : LLUrlAction::getObjectId(url);
LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(id)); }
};
class ContextUrlCopy : public ContextIDUrl
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
{
LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(getID(userdata.asStringRef())));
return true; return true;
} }
}; };
class ContextUrlExt : public ContextIDUrl
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
{
std::string cmd = userdata.asStringRef();
std::string type;
const auto sep = cmd.find(',');
if (sep != std::string::npos)
{
type = cmd.substr(sep);
cmd = cmd.substr(0, sep);
}
mExtCallback(cmd, LLUUID(getID(type)));
return true;
}
LLTextEditor::ext_slurl_cb mExtCallback;
public:
ContextUrlExt(LLTextEditor::ext_slurl_cb cb) : mExtCallback(cb) {}
};
class ContextUrlExtVisible : public ContextIDUrl
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent>, const LLSD& userdata) override
{
std::string cmd = userdata["data"];
std::string type;
const auto sep = cmd.find(',');
if (sep != std::string::npos)
{
type = cmd.substr(sep);
cmd = cmd.substr(0, sep);
}
LLMenuGL::sMenuContainer->findControl(userdata["control"].asString())->setValue(mExtVCB(cmd, LLUUID(getID(type))));
return true;
}
LLTextEditor::ext_slurl_visible_cb mExtVCB;
public:
ContextUrlExtVisible(LLTextEditor::ext_slurl_visible_cb vcb) : mExtVCB(vcb) {}
};
void LLTextEditor::spell_correct(void* data) void LLTextEditor::spell_correct(void* data)
{ {
@@ -528,11 +581,13 @@ void LLTextEditor::spell_add(void* data)
} }
//static //static
void LLTextEditor::addMenuListeners() void LLTextEditor::addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb)
{ {
(new ContextText)->registerListener(LLMenuGL::sMenuContainer, "Text"); (new ContextText)->registerListener(LLMenuGL::sMenuContainer, "Text");
(new ContextUrl)->registerListener(LLMenuGL::sMenuContainer, "Text.Url"); (new ContextUrl)->registerListener(LLMenuGL::sMenuContainer, "Text.Url");
(new ContextUrlCopy)->registerListener(LLMenuGL::sMenuContainer, "Text.Url.CopyUUID"); (new ContextUrlCopy)->registerListener(LLMenuGL::sMenuContainer, "Text.Url.CopyUUID");
(new ContextUrlExt(cb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.Ext");
(new ContextUrlExtVisible(vcb))->registerListener(LLMenuGL::sMenuContainer, "Text.Url.ExtVisible");
} }
void LLTextEditor::setTrackColor( const LLColor4& color ) void LLTextEditor::setTrackColor( const LLColor4& color )
@@ -721,8 +776,8 @@ LLMenuGL* LLTextEditor::createUrlContextMenu(S32 x, S32 y, const std::string &in
if (addFriendButton && removeFriendButton) if (addFriendButton && removeFriendButton)
{ {
addFriendButton->setEnabled(!isFriend); addFriendButton->setVisible(!isFriend);
removeFriendButton->setEnabled(isFriend); removeFriendButton->setVisible(isFriend);
} }
} }

View File

@@ -80,7 +80,11 @@ public:
static boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb); static boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb);
static boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb); static boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb);
static void addMenuListeners();
typedef std::function<void(const std::string&, const LLUUID&)> ext_slurl_cb;
typedef std::function<bool(const std::string&, const LLUUID&)> ext_slurl_visible_cb;
static void addMenuListeners(ext_slurl_cb cb, ext_slurl_visible_cb vcb);
void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback); void setKeystrokeCallback(const keystroke_signal_t::slot_type& callback);
virtual LLXMLNodePtr getXML(bool save_children = true) const; virtual LLXMLNodePtr getXML(bool save_children = true) const;

View File

@@ -1133,6 +1133,15 @@ std::string LLUrlEntryPlace::getLabel(const std::string &url, const LLUrlLabelCa
std::string y = path_array[1]; std::string y = path_array[1];
return location + " (" + x + "," + y + ")"; return location + " (" + x + "," + y + ")";
} }
else if (path_parts > 3) // xgrid, show as grid: place(x, y, z)
{
auto place = unescapeUrl(path_array[1].asStringRef());
const auto& x = path_array[2].asStringRef();
const auto& y = path_array[3].asStringRef();
location += ": " + place + " (" + x + ',' + y;
if (path_parts == 5) location += ',' + path_array[4].asStringRef();
return location + ')';
}
return url; return url;
} }
@@ -1140,6 +1149,12 @@ std::string LLUrlEntryPlace::getLabel(const std::string &url, const LLUrlLabelCa
std::string LLUrlEntryPlace::getLocation(const std::string &url) const std::string LLUrlEntryPlace::getLocation(const std::string &url) const
{ {
// return the part of the Url after secondlife:// part // return the part of the Url after secondlife:// part
const auto uri = LLURI(url);
bool xgrid = boost::algorithm::starts_with(uri.scheme(), "x-grid");
if (xgrid)
{
return ::getStringAfterToken(url, "region/");
}
return ::getStringAfterToken(url, "://"); return ::getStringAfterToken(url, "://");
} }
@@ -1149,7 +1164,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const
// //
LLUrlEntryRegion::LLUrlEntryRegion() LLUrlEntryRegion::LLUrlEntryRegion()
{ {
mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?", mPattern = boost::regex(X_GRID_OR_SECONDLIFE_HEADER_REGEX"//app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
boost::regex::perl|boost::regex::icase); boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml"; mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL"); mTooltip = LLTrans::getString("TooltipSLURL");
@@ -1165,30 +1180,37 @@ std::string LLUrlEntryRegion::getLabel(const std::string &url, const LLUrlLabelC
// - secondlife:///app/region/Place // - secondlife:///app/region/Place
// //
LLSD path_array = LLURI(url).pathArray(); const auto uri = LLURI(url);
LLSD path_array = uri.pathArray();
S32 path_parts = path_array.size(); S32 path_parts = path_array.size();
if (path_parts < 3) // no region name bool xgrid = boost::algorithm::starts_with(uri.scheme(), "x-grid");
auto i = xgrid ? 3 : 2;
if (path_parts < i+1) // no region name
{ {
LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL; LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL;
return url; return url;
} }
std::string label = unescapeUrl(path_array[2]); // region name std::string label =
xgrid ? unescapeUrl(path_array[0].asStringRef()) + ": " + unescapeUrl(path_array[i].asStringRef()) : // grid and region name
unescapeUrl(path_array[i].asStringRef()); // region name
if (path_parts > 3) // secondlife:///app/region/Place/X ++i;
if (path_parts > i+1) // secondlife:///app/region/Place/X
{ {
std::string x = path_array[3]; std::string x = path_array[i++];
label += " (" + x; label += " (" + x;
if (path_parts > 4) // secondlife:///app/region/Place/X/Y if (path_parts > i+1) // secondlife:///app/region/Place/X/Y
{ {
std::string y = path_array[4]; std::string y = path_array[i++];
label += "," + y; label += "," + y;
if (path_parts > 5) // secondlife:///app/region/Place/X/Y/Z if (path_parts > i+1) // secondlife:///app/region/Place/X/Y/Z
{ {
std::string z = path_array[5]; std::string z = path_array[i];
label = label + "," + z; label = label + "," + z;
} }
} }
@@ -1201,8 +1223,10 @@ std::string LLUrlEntryRegion::getLabel(const std::string &url, const LLUrlLabelC
std::string LLUrlEntryRegion::getLocation(const std::string &url) const std::string LLUrlEntryRegion::getLocation(const std::string &url) const
{ {
LLSD path_array = LLURI(url).pathArray(); const auto uri = LLURI(url);
std::string region_name = unescapeUrl(path_array[2]); LLSD path_array = uri.pathArray();
bool xgrid = boost::algorithm::starts_with(uri.scheme(), "x-grid");
std::string region_name = unescapeUrl(path_array[xgrid ? 3 : 2]);
return region_name; return region_name;
} }

View File

@@ -62,6 +62,8 @@ list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES})
add_library (llvfs ${llvfs_SOURCE_FILES}) add_library (llvfs ${llvfs_SOURCE_FILES})
target_link_libraries(llvfs target_link_libraries(llvfs
PUBLIC
llcommon
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
) )

View File

@@ -262,7 +262,7 @@ bool LLDir_Linux::fileExists(const std::string &filename) const
/*virtual*/ std::string LLDir_Linux::getLLPluginLauncher() /*virtual*/ std::string LLDir_Linux::getLLPluginLauncher()
{ {
return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() + return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() +
"SLPlugin"; "llplugin/SLPlugin";
} }
/*virtual*/ std::string LLDir_Linux::getLLPluginFilename(std::string base_name) /*virtual*/ std::string LLDir_Linux::getLLPluginFilename(std::string base_name)

View File

@@ -148,4 +148,4 @@ endif (llwindow_HEADER_FILES)
${viewer_SOURCE_FILES} ${viewer_SOURCE_FILES}
) )
target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) target_link_libraries (llwindow PUBLIC llcommon ${llwindow_LINK_LIBRARIES})

View File

@@ -1385,18 +1385,25 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso
{ {
modes--; modes--;
SDL_Rect *r = *modes; SDL_Rect *r = *modes;
int w = r->w; S32 w = r->w;
int h = r->h; S32 h = r->h;
if ((w >= 800) && (h >= 600)) if ((w >= 800) && (h >= 600))
{ {
// make sure we don't add the same resolution multiple times! // make sure we don't add the same resolution multiple times!
if ( (mNumSupportedResolutions == 0) || bool resolution_exists = false;
((mSupportedResolutions[mNumSupportedResolutions-1].mWidth != w) && for (S32 i = 0; i < mNumSupportedResolutions; ++i)
(mSupportedResolutions[mNumSupportedResolutions-1].mHeight != h)) ) {
if (mSupportedResolutions[i].mWidth == w &&
mSupportedResolutions[i].mHeight == h)
{
resolution_exists = true;
break;
}
}
if (!resolution_exists)
{ {
mSupportedResolutions[mNumSupportedResolutions].mWidth = w; mSupportedResolutions[mNumSupportedResolutions].mWidth = w;
mSupportedResolutions[mNumSupportedResolutions].mHeight = h; mSupportedResolutions[mNumSupportedResolutions++].mHeight = h;
mNumSupportedResolutions++;
} }
} }
} }

View File

@@ -40,5 +40,7 @@ add_library (llxml ${llxml_SOURCE_FILES})
target_link_libraries( target_link_libraries(
llxml llxml
PUBLIC
llcommon
${EXPAT_LIBRARIES} ${EXPAT_LIBRARIES}
) )

View File

@@ -3,13 +3,16 @@
project(viewer) project(viewer)
include(00-Common) include(00-Common)
# DON'T move Linking.cmake to its place in the alphabetized list below: it
# sets variables on which the 3p .cmake files depend.
include(Linking)
include(Boost) include(Boost)
include(BuildPackagesInfo) include(BuildPackagesInfo)
include(BuildVersion) include(BuildVersion)
include(BuildBranding) include(BuildBranding)
include(CMakeCopyIfDifferent) include(CMakeCopyIfDifferent)
include(DBusGlib) include(DBusGlib)
include(FindVCRedist)
include(FMODSTUDIO) include(FMODSTUDIO)
include(GLOD) include(GLOD)
include(Hunspell) include(Hunspell)
@@ -32,7 +35,6 @@ include(LLUI)
include(LLVFS) include(LLVFS)
include(LLWindow) include(LLWindow)
include(LLXML) include(LLXML)
include(Linking)
include(NDOF) include(NDOF)
include(NVAPI) include(NVAPI)
include(OPENAL) include(OPENAL)
@@ -88,7 +90,6 @@ set(viewer_SOURCE_FILES
daeexport.cpp daeexport.cpp
floaterao.cpp floaterao.cpp
floaterlocalassetbrowse.cpp floaterlocalassetbrowse.cpp
floatervoicelicense.cpp
generichandlers.cpp generichandlers.cpp
groupchatlistener.cpp groupchatlistener.cpp
hbfloatergrouptitles.cpp hbfloatergrouptitles.cpp
@@ -185,6 +186,7 @@ set(viewer_SOURCE_FILES
llfloateravatarlist.cpp llfloateravatarlist.cpp
llfloateravatarpicker.cpp llfloateravatarpicker.cpp
llfloateravatartextures.cpp llfloateravatartextures.cpp
llfloaterbanduration.cpp
llfloaterbeacons.cpp llfloaterbeacons.cpp
llfloaterblacklist.cpp llfloaterblacklist.cpp
llfloaterbuildoptions.cpp llfloaterbuildoptions.cpp
@@ -625,7 +627,6 @@ set(viewer_HEADER_FILES
daeexport.h daeexport.h
floaterao.h floaterao.h
floaterlocalassetbrowse.h floaterlocalassetbrowse.h
floatervoicelicense.h
generichandlers.h generichandlers.h
groupchatlistener.h groupchatlistener.h
hbfloatergrouptitles.h hbfloatergrouptitles.h
@@ -722,6 +723,7 @@ set(viewer_HEADER_FILES
llfloateravatarlist.h llfloateravatarlist.h
llfloateravatarpicker.h llfloateravatarpicker.h
llfloateravatartextures.h llfloateravatartextures.h
llfloaterbanduration.h
llfloaterbeacons.h llfloaterbeacons.h
llfloaterblacklist.h llfloaterblacklist.h
llfloaterbuildoptions.h llfloaterbuildoptions.h
@@ -1519,7 +1521,7 @@ if (WINDOWS)
${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll
${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll
SLPlugin SLPlugin
media_plugin_quicktime media_plugin_libvlc
media_plugin_cef media_plugin_cef
windows-crash-logger windows-crash-logger
) )
@@ -1581,29 +1583,6 @@ if (WINDOWS)
add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat) add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat)
if(EXISTS ${VISUAL_STUDIO_REDISTRIBUTABLE_PATH})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist"
DEPENDS copy_w_viewer_manifest
COMMENT "Creating redist dir"
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist/${VISUAL_STUDIO_REDISTRIBUTABLE_NAME}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
ARGS
${VISUAL_STUDIO_REDISTRIBUTABLE_PATH}
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist/${VISUAL_STUDIO_REDISTRIBUTABLE_NAME}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist
COMMENT "Copying ${VISUAL_STUDIO_REDISTRIBUTABLE_PATH} to redist dir"
)
add_custom_target(copy_w_redist ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/redist/${VISUAL_STUDIO_REDISTRIBUTABLE_NAME})
add_dependencies(${VIEWER_BINARY_NAME} copy_w_redist)
endif()
add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest) add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
@@ -1704,6 +1683,8 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${HUNSPELL_LIBRARY} ${HUNSPELL_LIBRARY}
${LLPHYSICSEXTENSIONS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES}
${LLAPPEARANCE_LIBRARIES} ${LLAPPEARANCE_LIBRARIES}
absl::flat_hash_map
absl::node_hash_map
) )
if (LINUX) if (LINUX)
@@ -1766,13 +1747,12 @@ if (LINUX)
) )
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 basic_plugin_filepicker) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 basic_plugin_filepicker)
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
if (PACKAGE) if (PACKAGE)
add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz) add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz)
# Make sure we don't run two instances of viewer_manifest.py at the same time.
add_dependencies(llpackage copy_l_viewer_manifest)
check_message_template(llpackage) check_message_template(llpackage)
else (PACKAGE)
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
endif (PACKAGE) endif (PACKAGE)
endif (LINUX) endif (LINUX)
@@ -1822,7 +1802,7 @@ if (DARWIN)
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
) )
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_webkit basic_plugin_filepicker)
if (PACKAGE) if (PACKAGE)
add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME}) add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME})

View File

@@ -54,6 +54,9 @@ http_response http_response(key request_id, integer status, list metad
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
transaction_result transaction_result(key id, integer success, string data): Triggered when currency is given to task transaction_result transaction_result(key id, integer success, string data): Triggered when currency is given to task
path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used
experience_permissions experience_permissions(key agent): Triggered when agent has approved an experience permissions request. This may be through interaction with the experience permission dialog or the experience profile, or automatically if the agent has previously approved the experience.
experience_permissions_denied experience_permissions_denied(key agent, integer reason): Triggered when agent has denied experience permission. reason is the reason for denial; one of the Experience Tools XP_ERROR_* errors flags.
# integer constants # integer constants
[word .1, .1, .5] [word .1, .1, .5]
@@ -65,11 +68,11 @@ STATUS_ROTATE_X Passed in the llSetStatus library function. If FALSE, o
STATUS_ROTATE_Y Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Y axis STATUS_ROTATE_Y Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Y axis
STATUS_ROTATE_Z Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Z axis STATUS_ROTATE_Z Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Z axis
STATUS_SANDBOX Passed in the llSetStatus library function. If TRUE, object can't cross region boundaries or move more than 10 meters from its start location STATUS_SANDBOX Passed in the llSetStatus library function. If TRUE, object can't cross region boundaries or move more than 10 meters from its start location
STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object can't be grabbed and physically dragged STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, root prim of linkset (or unlinked prim) can't be grabbed and physically dragged
STATUS_BLOCK_GRAB_OBJECT This status flag keeps the object from being moved by grabs. This flag applies to the entire linkset
STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner
STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set
STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects
STATUS_BLOCK_GRAB_OBJECT Passed in the llSetStatus library function. If TRUE, no prims in linkset can be grabbed or physically dragged
AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME
AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name
@@ -150,15 +153,6 @@ PSYS_PART_EMISSIVE_MASK
PSYS_PART_TARGET_LINEAR_MASK PSYS_PART_TARGET_LINEAR_MASK
PSYS_PART_RIBBON_MASK PSYS_PART_RIBBON_MASK
PSYS_PART_BF_ONE
PSYS_PART_BF_ZERO
PSYS_PART_BF_DEST_COLOR
PSYS_PART_BF_SOURCE_COLOR
PSYS_PART_BF_ONE_MINUS_DEST_COLOR
PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
PSYS_PART_BF_SOURCE_ALPHA
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
PSYS_SRC_PATTERN PSYS_SRC_PATTERN
PSYS_SRC_INNERANGLE Deprecated -- Use PSYS_SRC_ANGLE_BEGIN PSYS_SRC_INNERANGLE Deprecated -- Use PSYS_SRC_ANGLE_BEGIN
PSYS_SRC_OUTERANGLE Deprecated -- Use PSYS_SRC_ANGLE_END PSYS_SRC_OUTERANGLE Deprecated -- Use PSYS_SRC_ANGLE_END
@@ -180,6 +174,14 @@ PSYS_SRC_PATTERN_EXPLODE
PSYS_SRC_PATTERN_ANGLE PSYS_SRC_PATTERN_ANGLE
PSYS_SRC_PATTERN_ANGLE_CONE PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
PSYS_PART_BF_ONE
PSYS_PART_BF_ZERO
PSYS_PART_BF_DEST_COLOR
PSYS_PART_BF_SOURCE_COLOR
PSYS_PART_BF_ONE_MINUS_DEST_COLOR
PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
PSYS_PART_BF_SOURCE_ALPHA
PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type
OBJECT_HOVER_HEIGHT This is a flag used with llGetObjectDetails to get hover height of the avatar. If no data is available, 0.0 is returned. OBJECT_HOVER_HEIGHT This is a flag used with llGetObjectDetails to get hover height of the avatar. If no data is available, 0.0 is returned.
@@ -404,8 +406,6 @@ REMOTE_DATA_REQUEST Value of event_type in remote_event if X
REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received
PRIM_NAME Sets the prim's name
PRIM_DESC Sets the prim's description
PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments
PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER
PRIM_PHYSICS Sets physics to TRUE or FALSE PRIM_PHYSICS Sets physics to TRUE or FALSE
@@ -417,19 +417,26 @@ PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an intege
PRIM_POSITION Sets primitive position to a vector position PRIM_POSITION Sets primitive position to a vector position
PRIM_SIZE Sets primitive size to a vector size PRIM_SIZE Sets primitive size to a vector size
PRIM_ROTATION Sets primitive rotation PRIM_ROTATION Sets primitive rotation
PRIM_TEXT Used to get or set the object's floating text.
PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians
PRIM_COLOR Followed by an integer face, vector color, and float alpha PRIM_COLOR Followed by an integer face, vector color, and float alpha
PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc
PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE
PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR
PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount
PRIM_POS_LOCAL Sets the prim's local position PRIM_TEXT Used to get or set the object's floating text.
PRIM_NAME Sets the prim's name
PRIM_DESC Sets the prim's description
PRIM_ROT_LOCAL Sets the prim's local rotation PRIM_ROT_LOCAL Sets the prim's local rotation
PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX.
PRIM_OMEGA Makes the object spin at the specified axis and rate PRIM_OMEGA Makes the object spin at the specified axis and rate
PRIM_POS_LOCAL Sets the prim's local position
PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call. PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call.
PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0> PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0>
PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects)
PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects)
PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim.
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
@@ -489,11 +496,6 @@ PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type
PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted
PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis
PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX.
PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects)
PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects)
PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim.
PRIM_SPECULAR Used to get or set the specular map texture settings of a prim's face. PRIM_SPECULAR Used to get or set the specular map texture settings of a prim's face.
PRIM_NORMAL Used to get or set the normal map texture settings of a prim's face. PRIM_NORMAL Used to get or set the normal map texture settings of a prim's face.
@@ -519,7 +521,7 @@ PARCEL_MEDIA_COMMAND_STOP Stop media stream
PARCEL_MEDIA_COMMAND_PAUSE Pause media stream PARCEL_MEDIA_COMMAND_PAUSE Pause media stream
PARCEL_MEDIA_COMMAND_PLAY Play media stream PARCEL_MEDIA_COMMAND_PLAY Play media stream
PARCEL_MEDIA_COMMAND_LOOP Loop media stream PARCEL_MEDIA_COMMAND_LOOP Loop media stream
PARCEL_MEDIA_COMMAND_LOOP_SET Used to get or set the parcel's media loop duration PARCEL_MEDIA_COMMAND_LOOP_SET Used to get or set the parcel's media loop duration.
PARCEL_MEDIA_COMMAND_TEXTURE Get or set the parcel's media texture PARCEL_MEDIA_COMMAND_TEXTURE Get or set the parcel's media texture
PARCEL_MEDIA_COMMAND_URL Get or set the parcel's media url PARCEL_MEDIA_COMMAND_URL Get or set the parcel's media url
PARCEL_MEDIA_COMMAND_TYPE Get or set the parcel's media mimetype PARCEL_MEDIA_COMMAND_TYPE Get or set the parcel's media mimetype
@@ -672,12 +674,12 @@ RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast f
RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low. RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low.
RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason. RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason.
ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list. ESTATE_ACCESS_ALLOWED_AGENT_ADD Passed to llManageEstateAccess to add the agent to this estate's Allowed Residents list
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list. ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Passed to llManageEstateAccess to remove the agent from this estate's Allowed Residents list
ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list. ESTATE_ACCESS_ALLOWED_GROUP_ADD Passed to llManageEstateAccess to add the group to this estate's Allowed groups list
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list. ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Passed to llManageEstateAccess to remove the group from this estate's Allowed groups list
ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list. ESTATE_ACCESS_BANNED_AGENT_ADD Passed to llManageEstateAccess to add the agent to this estate's Banned residents list
ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list. ESTATE_ACCESS_BANNED_AGENT_REMOVE Passed to llManageEstateAccess to remove the agent from this estate's Banned residents list
DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density. DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density.
FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction. FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction.
@@ -690,6 +692,7 @@ KFM_COMMAND Option for llSetKeyframedMotion(), followe
KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion.
KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion.
KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion.
#KFM_CMD_SET_MODE TODO: add documentation
KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE.
KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode.
KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode.
@@ -735,7 +738,7 @@ PU_FAILURE_NO_NAVMESH Triggered if no navmesh is available for the re
PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled. PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled.
PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked. PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked.
CHARACTER_TYPE Specifies which walkability coefficient will be used by this character. CHARACTER_TYPE Specifies which walkability coefficient will be used by this character. Used in combination with one of the character type flags.
CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids. CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids.
CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles. CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles.
CHARACTER_TYPE_C Used for mechanical character types or road going vehicles. CHARACTER_TYPE_C Used for mechanical character types or road going vehicles.
@@ -920,6 +923,26 @@ TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture
URL_REQUEST_GRANTED Used with http_request when a public URL is successfully granted URL_REQUEST_GRANTED Used with http_request when a public URL is successfully granted
URL_REQUEST_DENIED Used with http_request when a public URL is not available URL_REQUEST_DENIED Used with http_request when a public URL is not available
XP_ERROR_NONE No error was detected
XP_ERROR_THROTTLED The call failed due to too many recent calls.
XP_ERROR_EXPERIENCES_DISABLED The region currently has experiences disabled.
XP_ERROR_INVALID_PARAMETERS One of the string arguments was too big to fit in the key-value store.
XP_ERROR_NOT_PERMITTED This experience is not allowed to run on the current region.
XP_ERROR_NO_EXPERIENCE This script is not associated with an experience.
XP_ERROR_NOT_FOUND The sim was unable to verify the validity of the experience. Retrying after a short wait is advised.
XP_ERROR_INVALID_EXPERIENCE The script is associated with an experience that no longer exists.
XP_ERROR_EXPERIENCE_DISABLED The experience owner has temporarily disabled the experience.
XP_ERROR_EXPERIENCE_SUSPENDED The experience has been suspended by Linden Customer Support.
XP_ERROR_QUOTA_EXCEEDED An attempted write data to the key-value store failed due to the data quota being met.
XP_ERROR_STORE_DISABLED The key-value store is currently disabled on this region.
XP_ERROR_STORAGE_EXCEPTION Unable to communicate with the key-value store.
XP_ERROR_KEY_NOT_FOUND The requested key does not exist.
XP_ERROR_RETRY_UPDATE A checked update failed due to an out of date request.
XP_ERROR_MATURITY_EXCEEDED The request failed due to agent content preferences.
XP_ERROR_UNKNOWN_ERROR Other unknown error.
XP_ERROR_INVALID_PARAMETERS One of the string arguments was too big to fit in the key-value store.
# float constants # float constants
[word .3, .1, .5] [word .3, .1, .5]
PI 3.1415926535897932384626433832795 PI 3.1415926535897932384626433832795

View File

@@ -7,7 +7,7 @@
none none
</defaultwidget> </defaultwidget>
<defaultimpl> <defaultimpl>
media_plugin_webkit media_plugin_cef
</defaultimpl> </defaultimpl>
<widgetset name="web"> <widgetset name="web">
<label name="web_label"> <label name="web_label">
@@ -101,6 +101,27 @@
true true
</allow_looping> </allow_looping>
</widgetset> </widgetset>
<widgetset name="none">
<label name="none_label">
No Content
</label>
<default_type>
none/none
</default_type>
<icon>
icn_media_web.tga
</icon>
<tooltip name="none_tooltip">
No media here
</tooltip>
<playtip name="none_playtip" />
<allow_resize>
false
</allow_resize>
<allow_looping>
false
</allow_looping>
</widgetset>
<scheme name="rtsp"> <scheme name="rtsp">
<label name="rtsp_label"> <label name="rtsp_label">
Real Time Streaming Real Time Streaming
@@ -109,10 +130,21 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</scheme> </scheme>
<mimetype name="blank"> <scheme name="libvlc">
<label name="libvlc_label">
LibVLC supported media
</label>
<widgettype>
movie
</widgettype>
<impl>
media_plugin_libvlc
</impl>
</scheme>
<mimetype name="blank">
<label name="blank_label"> <label name="blank_label">
- None - - None -
</label> </label>
@@ -120,7 +152,7 @@
none none
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="none/none"> <mimetype name="none/none">
@@ -131,7 +163,7 @@
none none
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="audio/*"> <mimetype name="audio/*">
@@ -142,7 +174,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="video/*"> <mimetype name="video/*">
@@ -153,7 +185,7 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="image/*"> <mimetype name="image/*">
@@ -164,7 +196,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy"> <mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
@@ -175,8 +207,8 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/javascript"> <mimetype name="application/javascript">
<label name="application/javascript_label"> <label name="application/javascript_label">
@@ -186,7 +218,7 @@
web web
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/ogg"> <mimetype name="application/ogg">
@@ -197,7 +229,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/pdf"> <mimetype name="application/pdf">
@@ -208,7 +240,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/postscript"> <mimetype name="application/postscript">
@@ -219,7 +251,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/rtf"> <mimetype name="application/rtf">
@@ -230,18 +262,18 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/smil"> <mimetype name="application/smil">
<label name="application/smil_label"> <label name="application/smil_label">
Synchronized Multimedia Integration Language (SMIL) Synchronized Multimedia Integration Language (SMIL)
</label> </label>
<widgettype> <widgettype>
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/xhtml+xml"> <mimetype name="application/xhtml+xml">
@@ -252,7 +284,7 @@
web web
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="application/x-director"> <mimetype name="application/x-director">
@@ -263,7 +295,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="audio/mid"> <mimetype name="audio/mid">
@@ -274,7 +306,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="audio/mpeg"> <mimetype name="audio/mpeg">
@@ -285,7 +317,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="audio/x-aiff"> <mimetype name="audio/x-aiff">
@@ -296,7 +328,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="audio/x-wav"> <mimetype name="audio/x-wav">
@@ -307,7 +339,7 @@
audio audio
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="image/bmp"> <mimetype menu="1" name="image/bmp">
@@ -318,7 +350,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="image/gif"> <mimetype menu="1" name="image/gif">
@@ -329,7 +361,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="image/jpeg"> <mimetype menu="1" name="image/jpeg">
@@ -340,7 +372,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="image/png"> <mimetype menu="1" name="image/png">
@@ -351,7 +383,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="image/svg+xml"> <mimetype name="image/svg+xml">
@@ -362,7 +394,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="image/tiff"> <mimetype menu="1" name="image/tiff">
@@ -373,7 +405,7 @@
image image
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="text/html"> <mimetype menu="1" name="text/html">
@@ -384,8 +416,8 @@
web web
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="text/plain"> <mimetype menu="1" name="text/plain">
<label name="text/plain_label"> <label name="text/plain_label">
@@ -395,7 +427,7 @@
text text
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="text/xml"> <mimetype name="text/xml">
@@ -406,7 +438,7 @@
text text
</widgettype> </widgettype>
<impl> <impl>
media_plugin_webkit media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="video/mpeg"> <mimetype menu="1" name="video/mpeg">
@@ -417,8 +449,8 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="video/mp4"> <mimetype name="video/mp4">
<label name="video/mp4_label"> <label name="video/mp4_label">
@@ -428,19 +460,30 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl>
</mimetype>
<mimetype name="application/octet-stream">
<label name="video/octet-stream">
Movie
</label>
<widgettype>
movie
</widgettype>
<impl>
media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="video/quicktime"> <mimetype menu="1" name="video/libvlc">
<label name="video/quicktime_label"> <label name="video/libvlc_label">
Movie (QuickTime) Movie (QuickTime)
</label> </label>
<widgettype> <widgettype>
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="video/x-ms-asf"> <mimetype name="video/x-ms-asf">
<label name="video/x-ms-asf_label"> <label name="video/x-ms-asf_label">
@@ -450,8 +493,8 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_libvlc
</impl> </impl>
</mimetype> </mimetype>
<mimetype name="video/x-ms-wmv"> <mimetype name="video/x-ms-wmv">
<label name="video/x-ms-wmv_label"> <label name="video/x-ms-wmv_label">
@@ -461,8 +504,8 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
<mimetype menu="1" name="video/x-msvideo"> <mimetype menu="1" name="video/x-msvideo">
<label name="video/x-msvideo_label"> <label name="video/x-msvideo_label">
@@ -472,7 +515,7 @@
movie movie
</widgettype> </widgettype>
<impl> <impl>
media_plugin_quicktime media_plugin_cef
</impl> </impl>
</mimetype> </mimetype>
</mimetypes> </mimetypes>

View File

@@ -7133,7 +7133,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Type</key> <key>Type</key>
<string>Boolean</string> <string>Boolean</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>1</integer>
</map> </map>
<key>FloaterAboutRect</key> <key>FloaterAboutRect</key>
<map> <map>
@@ -7608,22 +7608,6 @@ This should be as low as possible, but too low may break functionality</string>
<integer>0</integer> <integer>0</integer>
</array> </array>
</map> </map>
<key>FloaterInvPanelRect</key>
<map>
<key>Comment</key>
<string>Rectangle for new inventory windows a folder is opened in</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>400</integer>
<integer>300</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterJoystickRect</key> <key>FloaterJoystickRect</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -12701,11 +12685,11 @@ This should be as low as possible, but too low may break functionality</string>
<key>AlwaysRenderFriends</key> <key>AlwaysRenderFriends</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
<string>Always render friends regardless of max complexity</string> <string>Always render friends regardless of max complexity, a value of 2 will only render friends</string>
<key>Persist</key> <key>Persist</key>
<integer>1</integer> <integer>1</integer>
<key>Type</key> <key>Type</key>
<string>Boolean</string> <string>S32</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </map>
@@ -17883,17 +17867,6 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key> <key>Value</key>
<integer>1</integer> <integer>1</integer>
</map> </map>
<key>WarnQuickTimeInstalled</key>
<map>
<key>Comment</key>
<string>Enables QuickTimeInstalled warning dialog</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>WarnReturnToOwner</key> <key>WarnReturnToOwner</key>
<map> <map>
<key>Comment</key> <key>Comment</key>

View File

@@ -943,6 +943,17 @@ Changing this setting only affects new text.</string>
<key>Value</key> <key>Value</key>
<boolean>1</boolean> <boolean>1</boolean>
</map> </map>
<key>SupportChatDisplayBuild</key>
<map>
<key>Comment</key>
<string>Whether or not to display your current build (and its channel indicator) when you speak in identified support group chats</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<boolean>-1</boolean>
</map>
<key>WarnRecommendedUpdate</key> <key>WarnRecommendedUpdate</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -1779,6 +1790,19 @@ Changing this setting only affects new text.</string>
<key>IsCOA</key> <key>IsCOA</key>
<integer>1</integer> <integer>1</integer>
</map> </map>
<key>ToolbarVisibleInventoryReceivedItems</key>
<map>
<key>Comment</key>
<string>Whether or not the button for received items is on the toolbar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
<key>IsCOA</key>
<integer>1</integer>
</map>
<key>ToolbarVisibleJoystick</key> <key>ToolbarVisibleJoystick</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -1805,6 +1829,19 @@ Changing this setting only affects new text.</string>
<key>IsCOA</key> <key>IsCOA</key>
<integer>1</integer> <integer>1</integer>
</map> </map>
<key>ToolbarVisibleMarketplace</key>
<map>
<key>Comment</key>
<string>Whether or not the button for marketplace is on the toolbar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
<key>IsCOA</key>
<integer>1</integer>
</map>
<key>ToolbarVisibleMarketplaceListings</key> <key>ToolbarVisibleMarketplaceListings</key>
<map> <map>
<key>Comment</key> <key>Comment</key>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,106 @@
<llsd>
<map>
<key>ambient</key>
<array>
<real>0</real>
<real>0.05999999865889549255371094</real>
<real>0.1499999910593032836914063</real>
<real>0.04999999701976776123046875</real>
</array>
<key>blue_density</key>
<array>
<real>1.99999988079071044921875</real>
<real>1.99999988079071044921875</real>
<real>1.99999988079071044921875</real>
<real>1</real>
</array>
<key>blue_horizon</key>
<array>
<real>0.680000007152557373046875</real>
<real>0.680000007152557373046875</real>
<real>0.680000007152557373046875</real>
<real>0.3400000035762786865234375</real>
</array>
<key>cloud_color</key>
<array>
<real>0.2999999821186065673828125</real>
<real>0.2999999821186065673828125</real>
<real>0.2999999821186065673828125</real>
<real>0.2999999821186065673828125</real>
</array>
<key>cloud_pos_density1</key>
<array>
<real>1</real>
<real>1</real>
<real>0.0999999940395355224609375</real>
<real>1</real>
</array>
<key>cloud_pos_density2</key>
<array>
<real>1.6884100437164306640625</real>
<real>1</real>
<real>0.0999999940395355224609375</real>
<real>1</real>
</array>
<key>cloud_scale</key>
<real>0.2000000029802322387695313</real>
<key>cloud_scroll_rate</key>
<array>
<real>10.1499996185302734375</real>
<real>10</real>
</array>
<key>cloud_shadow</key>
<real>0.5</real>
<key>density_multiplier</key>
<real>5.999999848427250981330872e-05</real>
<key>distance_multiplier</key>
<real>3</real>
<key>east_angle</key>
<real>0</real>
<key>enable_cloud_scroll</key>
<array>
<boolean>1</boolean>
<boolean>1</boolean>
</array>
<key>gamma</key>
<array>
<real>1.75</real>
<real>0</real>
<real>0</real>
<real>1</real>
</array>
<key>glow</key>
<array>
<real>10</real>
<real>0.001000000047497451305389404</real>
<real>-0.449999988079071044921875</real>
<real>1</real>
</array>
<key>haze_density</key>
<real>4</real>
<key>haze_horizon</key>
<real>0</real>
<key>lightnorm</key>
<array>
<real>0</real>
<real>0</real>
<real>-1</real>
<real>0</real>
</array>
<key>max_y</key>
<real>500</real>
<key>preset_num</key>
<integer>22</integer>
<key>star_brightness</key>
<real>0</real>
<key>sun_angle</key>
<real>3.1415927410125732421875</real>
<key>sunlight_color</key>
<array>
<real>0.2999999821186065673828125</real>
<real>0.38999998569488525390625</real>
<real>0.4500000178813934326171875</real>
<real>0.1499999910593032836914063</real>
</array>
</map>
</llsd>

View File

@@ -0,0 +1,106 @@
<llsd>
<map>
<key>ambient</key>
<array>
<real>0.04499999806284904479980469</real>
<real>0.06749998778104782104492188</real>
<real>0.08999999612569808959960938</real>
<real>0.02999999932944774627685547</real>
</array>
<key>blue_density</key>
<array>
<real>2</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>blue_horizon</key>
<array>
<real>0.5</real>
<real>0.5</real>
<real>0.5</real>
<real>0.25</real>
</array>
<key>cloud_color</key>
<array>
<real>0.1400000005960464477539063</real>
<real>0.1400000005960464477539063</real>
<real>0.1400000005960464477539063</real>
<real>0.1400000005960464477539063</real>
</array>
<key>cloud_pos_density1</key>
<array>
<real>1</real>
<real>1</real>
<real>0.25</real>
<real>1</real>
</array>
<key>cloud_pos_density2</key>
<array>
<real>1.6884100437164306640625</real>
<real>1</real>
<real>0</real>
<real>1</real>
</array>
<key>cloud_scale</key>
<real>0.2000000029802322387695313</real>
<key>cloud_scroll_rate</key>
<array>
<real>10.3999996185302734375</real>
<real>10</real>
</array>
<key>cloud_shadow</key>
<real>0.599999964237213134765625</real>
<key>density_multiplier</key>
<real>4.999999873689375817775726e-05</real>
<key>distance_multiplier</key>
<real>7</real>
<key>east_angle</key>
<real>0</real>
<key>enable_cloud_scroll</key>
<array>
<boolean>1</boolean>
<boolean>1</boolean>
</array>
<key>gamma</key>
<array>
<real>0.75</real>
<real>0</real>
<real>0</real>
<real>1</real>
</array>
<key>glow</key>
<array>
<real>10</real>
<real>0.001000000047497451305389404</real>
<real>-0.449999988079071044921875</real>
<real>1</real>
</array>
<key>haze_density</key>
<real>4</real>
<key>haze_horizon</key>
<real>0</real>
<key>lightnorm</key>
<array>
<real>0</real>
<real>0</real>
<real>-1</real>
<real>0</real>
</array>
<key>max_y</key>
<real>1</real>
<key>preset_num</key>
<integer>22</integer>
<key>star_brightness</key>
<real>0</real>
<key>sun_angle</key>
<real>3.1415927410125732421875</real>
<key>sunlight_color</key>
<array>
<real>0</real>
<real>0</real>
<real>0</real>
<real>0</real>
</array>
</map>
</llsd>

View File

@@ -112,57 +112,75 @@ void LLPrefsAscentChat::onSpellBaseComboBoxCommit(const LLSD& value)
glggHunSpell->newDictSelection(value.asString()); glggHunSpell->newDictSelection(value.asString());
} }
void setTimeDateFormats(const S8& tempTimeFormat, const S8& tempDateFormat)
{
std::string short_date, long_date, short_time, long_time, timestamp;
if (tempDateFormat != -1)
{
if (tempDateFormat < 3)
{
short_date = !tempDateFormat ? "%F" :
tempDateFormat == 1 ? "%Y/%m/%d" :
"%d/%m/%Y";
long_date = "%A, %d %B %Y";
timestamp = "%a %d %b %Y";
}
else
{
short_date = "%m/%d/%Y";
long_date = "%A, %B %d %Y";
timestamp = "%a %b %d %Y";
}
}
if (tempTimeFormat != -1)
{
if (tempTimeFormat == 0)
{
short_time = "%R";
long_time = "%T";
if (!timestamp.empty()) timestamp += " %T";
}
else
{
short_time = "%I:%M %p";
long_time = "%I:%M:%S %p";
if (!timestamp.empty()) timestamp += " %I:%M %p";
}
}
else if (!timestamp.empty())
{
timestamp += ' ' + gSavedSettings.getString("ShortTimeFormat");
}
if (!short_date.empty())
{
gSavedSettings.setString("ShortDateFormat", short_date);
gSavedSettings.setString("LongDateFormat", long_date);
}
if (!short_time.empty())
{
gSavedSettings.setString("ShortTimeFormat", short_time);
gSavedSettings.setString("LongTimeFormat", long_time);
}
if (!timestamp.empty())
gSavedSettings.setString("TimestampFormat", timestamp);
}
void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl) void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl)
{ {
LLComboBox* combo = static_cast<LLComboBox*>(ctrl); LLComboBox* combo = static_cast<LLComboBox*>(ctrl);
if (ctrl->getName() == "time_format_combobox") if (ctrl->getName() == "time_format_combobox")
{ {
tempTimeFormat = combo->getCurrentIndex(); tempTimeFormat = combo->getCurrentIndex();
} }
else if (ctrl->getName() == "date_format_combobox") else if (ctrl->getName() == "date_format_combobox")
{ {
tempDateFormat = combo->getCurrentIndex(); tempDateFormat = combo->getCurrentIndex();
} }
std::string short_date, long_date, short_time, long_time, timestamp; setTimeDateFormats(tempTimeFormat, tempDateFormat);
if (tempTimeFormat == 0)
{
short_time = "%R";
long_time = "%T";
timestamp = " %T";
}
else
{
short_time = "%I:%M %p";
long_time = "%I:%M:%S %p";
timestamp = " %I:%M %p";
}
if (tempDateFormat == 0)
{
short_date = "%F";
long_date = "%A %d %B %Y";
timestamp = "%a %d %b %Y" + timestamp;
}
else if (tempDateFormat == 1)
{
short_date = "%d/%m/%Y";
long_date = "%A %d %B %Y";
timestamp = "%a %d %b %Y" + timestamp;
}
else
{
short_date = "%D";
long_date = "%A, %B %d %Y";
timestamp = "%a %b %d %Y" + timestamp;
}
gSavedSettings.setString("ShortDateFormat", short_date);
gSavedSettings.setString("LongDateFormat", long_date);
gSavedSettings.setString("ShortTimeFormat", short_time);
gSavedSettings.setString("LongTimeFormat", long_time);
gSavedSettings.setString("TimestampFormat", timestamp);
} }
void LLPrefsAscentChat::onCommitKeywords(LLUICtrl* ctrl) void LLPrefsAscentChat::onCommitKeywords(LLUICtrl* ctrl)
@@ -208,28 +226,16 @@ void LLPrefsAscentChat::refreshValues()
mSecondsInLog = gSavedSettings.getBOOL("SecondsInLog"); mSecondsInLog = gSavedSettings.getBOOL("SecondsInLog");
std::string format = gSavedSettings.getString("ShortTimeFormat"); std::string format = gSavedSettings.getString("ShortTimeFormat");
if (format.find("%p") == std::string::npos) mTimeFormat = format == "%R" ? 0
{ : format == "%I:%M %p" ? 1
mTimeFormat = 0; : -1;
}
else
{
mTimeFormat = 1;
}
format = gSavedSettings.getString("ShortDateFormat"); format = gSavedSettings.getString("ShortDateFormat");
if (format.find("%D") != std::string::npos || format.find("%m/%d/%") != std::string::npos) mDateFormat = format == "%F" ? 0 :
{ format == "%Y/%m/%d" ? 1 :
mDateFormat = 2; format == "%d/%m/%Y" ? 2 :
} format == "%m/%d/%Y" ? 3 :
else if (format.find("%d/%m/%") != std::string::npos) -1;
{
mDateFormat = 1;
}
else
{
mDateFormat = 0;
}
tempTimeFormat = mTimeFormat; tempTimeFormat = mTimeFormat;
tempDateFormat = mDateFormat; tempDateFormat = mDateFormat;
@@ -316,83 +322,78 @@ void LLPrefsAscentChat::refreshValues()
// Update controls based on current settings // Update controls based on current settings
void LLPrefsAscentChat::refresh() void LLPrefsAscentChat::refresh()
{ {
//Chat -------------------------------------------------------------------------------- //Chat --------------------------------------------------------------------------------
// time format combobox // time format combobox
LLComboBox* combo = getChild<LLComboBox>("time_format_combobox"); if (mTimeFormat != -1)
if (combo) {
{ if (auto combo = getChild<LLComboBox>("time_format_combobox"))
combo->setCurrentByIndex(mTimeFormat); {
} combo->setCurrentByIndex(mTimeFormat);
}
}
// date format combobox // date format combobox
combo = getChild<LLComboBox>("date_format_combobox"); if (mDateFormat != -1)
if (combo) {
{ if (auto combo = getChild<LLComboBox>("date_format_combobox"))
combo->setCurrentByIndex(mDateFormat); {
} combo->setCurrentByIndex(mDateFormat);
}
}
//Chat UI ----------------------------------------------------------------------------- //Chat UI -----------------------------------------------------------------------------
if (combo = getChild<LLComboBox>("chat_tabs_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("chat_tabs_namesystem_combobox"))
combo->setCurrentByIndex(mChatTabNames); combo->setCurrentByIndex(mChatTabNames);
if (combo = getChild<LLComboBox>("friends_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("friends_namesystem_combobox"))
combo->setCurrentByIndex(mFriendNames); combo->setCurrentByIndex(mFriendNames);
if (combo = getChild<LLComboBox>("group_members_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("group_members_namesystem_combobox"))
combo->setCurrentByIndex(mGroupMembersNames); combo->setCurrentByIndex(mGroupMembersNames);
if (combo = getChild<LLComboBox>("land_management_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("land_management_namesystem_combobox"))
combo->setCurrentByIndex(mLandManagementNames); combo->setCurrentByIndex(mLandManagementNames);
if (combo = getChild<LLComboBox>("radar_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("radar_namesystem_combobox"))
combo->setCurrentByIndex(mRadarNames); combo->setCurrentByIndex(mRadarNames);
if (combo = getChild<LLComboBox>("speaker_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("speaker_namesystem_combobox"))
combo->setCurrentByIndex(mSpeakerNames); combo->setCurrentByIndex(mSpeakerNames);
//Text Options ------------------------------------------------------------------------ //Text Options ------------------------------------------------------------------------
combo = getChild<LLComboBox>("SpellBase"); if (auto combo = getChild<LLComboBox>("SpellBase"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
std::vector<std::string> names = glggHunSpell->getDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(gSavedSettings.getString("SpellBase")); combo->setSimple(gSavedSettings.getString("SpellBase"));
} }
combo = getChild<LLComboBox>("EmSpell_Avail"); if (auto combo = getChild<LLComboBox>("EmSpell_Avail"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
combo->add(""); combo->add(LLStringUtil::null);
std::vector<std::string> names = glggHunSpell->getAvailDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getAvailDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(std::string("")); combo->setSimple(LLStringUtil::null);
} }
combo = getChild<LLComboBox>("EmSpell_Installed"); if (auto combo = getChild<LLComboBox>("EmSpell_Installed"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
combo->add(""); combo->add(LLStringUtil::null);
std::vector<std::string> names = glggHunSpell->getInstalledDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getInstalledDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(std::string("")); combo->setSimple(LLStringUtil::null);
} }
childSetEnabled("KeywordsList", mKeywordsOn); childSetEnabled("KeywordsList", mKeywordsOn);
@@ -434,45 +435,7 @@ void LLPrefsAscentChat::cancel()
gSavedSettings.setBOOL("SecondsInChatAndIMs", mSecondsInChatAndIMs); gSavedSettings.setBOOL("SecondsInChatAndIMs", mSecondsInChatAndIMs);
gSavedSettings.setBOOL("SecondsInLog", mSecondsInLog); gSavedSettings.setBOOL("SecondsInLog", mSecondsInLog);
std::string short_date, long_date, short_time, long_time, timestamp; setTimeDateFormats(mTimeFormat, mDateFormat);
if (mTimeFormat == 0)
{
short_time = "%H:%M";
long_time = "%H:%M:%S";
timestamp = " %H:%M:%S";
}
else
{
short_time = "%I:%M %p";
long_time = "%I:%M:%S %p";
timestamp = " %I:%M %p";
}
if (mDateFormat == 0)
{
short_date = "%Y-%m-%d";
long_date = "%A %d %B %Y";
timestamp = "%a %d %b %Y" + timestamp;
}
else if (mDateFormat == 1)
{
short_date = "%d/%m/%Y";
long_date = "%A %d %B %Y";
timestamp = "%a %d %b %Y" + timestamp;
}
else
{
short_date = "%m/%d/%Y";
long_date = "%A, %B %d %Y";
timestamp = "%a %b %d %Y" + timestamp;
}
gSavedSettings.setString("ShortDateFormat", short_date);
gSavedSettings.setString("LongDateFormat", long_date);
gSavedSettings.setString("ShortTimeFormat", short_time);
gSavedSettings.setString("LongTimeFormat", long_time);
gSavedSettings.setString("TimestampFormat", timestamp);
//Chat UI ----------------------------------------------------------------------------- //Chat UI -----------------------------------------------------------------------------
gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs);

View File

@@ -67,10 +67,10 @@ private:
bool mEnableMUPose; bool mEnableMUPose;
bool mEnableOOCAutoClose; bool mEnableOOCAutoClose;
U32 mLinksForChattingObjects; U32 mLinksForChattingObjects;
U32 mTimeFormat; S8 mTimeFormat;
U32 mDateFormat; S8 mDateFormat;
U32 tempTimeFormat; S8 tempTimeFormat;
U32 tempDateFormat; S8 tempDateFormat;
bool mSecondsInChatAndIMs; bool mSecondsInChatAndIMs;
bool mSecondsInLog; bool mSecondsInLog;

View File

@@ -1,244 +0,0 @@
/**
* @file floatervoicelicense.cpp
* @brief prompts user to agree to the Vivox license in order to enable voice
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2010, McCabe Maxsted
*
* Imprudence Viewer Source Code
* The source code in this file ("Source Code") is provided to you
* under the terms of the GNU General Public License, version 2.0
* ("GPL"). 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 SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "floatervoicelicense.h"
// viewer includes
#include "llagent.h"
#include "llappviewer.h"
#include "llstartup.h"
#include "llviewercontrol.h"
#include "llviewerstats.h"
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
// linden library includes
#include "llbutton.h"
#include "llhttpclient.h"
#include "llhttpstatuscodes.h" // for HTTP_FOUND
#include "llradiogroup.h"
#include "lltextbox.h"
#include "llui.h"
#include "lluictrlfactory.h"
#include "llvfile.h"
#include "message.h"
class AIHTTPTimeoutPolicy;
extern AIHTTPTimeoutPolicy iamHereVoice_timeout;
FloaterVoiceLicense::FloaterVoiceLicense(const LLSD& key)
: LLModalDialog( std::string(" "), 100, 100 ),
mLoadCompleteCount( 0 )
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_license.xml");
}
// helper class that trys to download a URL from a web site and calls a method
// on parent class indicating if the web server is working or not
class LLIamHereVoice : public LLHTTPClient::ResponderWithResult
{
private:
LLIamHereVoice( FloaterVoiceLicense* parent ) :
mParent( parent )
{}
FloaterVoiceLicense* mParent;
public:
static boost::intrusive_ptr< LLIamHereVoice > build( FloaterVoiceLicense* parent )
{
return boost::intrusive_ptr< LLIamHereVoice >( new LLIamHereVoice( parent ) );
};
virtual void setParent( FloaterVoiceLicense* parentIn )
{
mParent = parentIn;
};
/*virtual*/ void httpSuccess(void)
{
if ( mParent )
mParent->setSiteIsAlive( true );
};
/*virtual*/ void httpFailure(void)
{
if ( mParent )
{
// *HACK: For purposes of this alive check, 302 Found
// (aka Moved Temporarily) is considered alive. The web site
// redirects this link to a "cache busting" temporary URL. JC
bool alive = (mStatus == HTTP_FOUND);
mParent->setSiteIsAlive( alive );
}
};
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return iamHereVoice_timeout; }
/*virtual*/ bool pass_redirect_status(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLIamHereVoice"; }
};
// this is global and not a class member to keep crud out of the header file
namespace {
boost::intrusive_ptr< LLIamHereVoice > gResponsePtr = 0;
};
BOOL FloaterVoiceLicense::postBuild()
{
childSetAction("Continue", onContinue, this);
childSetAction("Cancel", onCancel, this);
childSetCommitCallback("agree_chk", updateAgree, this);
// disable Agree to License radio button until the page has fully loaded
LLCheckBoxCtrl* license_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
license_agreement->setEnabled( false );
// hide the SL text widget if we're displaying license with using a browser widget.
LLTextEditor *editor = getChild<LLTextEditor>("license_text");
editor->setVisible( FALSE );
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("license_html");
if ( web_browser )
{
// start to observe it so we see navigate complete events
web_browser->addObserver( this );
std::string url = getString( "real_url" );
if(url.substr(0,4) == "http") {
gResponsePtr = LLIamHereVoice::build( this );
LLHTTPClient::get( url, gResponsePtr );
} else {
setSiteIsAlive(false);
}
}
return TRUE;
}
void FloaterVoiceLicense::setSiteIsAlive( bool alive )
{
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("license_html");
// if the contents of the site was retrieved
if ( alive )
{
if ( web_browser )
{
// navigate to the "real" page
std::string real_url = getString( "real_url" );
web_browser->navigateTo(real_url);
}
}
else
{
web_browser->navigateToLocalPage("license", getString("fallback_html"));
// normally this is set when navigation to license page completes (so you can't accept before it loads)
// but if the page is unavailable, we need to do this now
LLCheckBoxCtrl* license_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
license_agreement->setEnabled( true );
}
}
FloaterVoiceLicense::~FloaterVoiceLicense()
{
// tell the responder we're not here anymore
if ( gResponsePtr )
{
gResponsePtr->setParent( 0 );
}
}
// virtual
void FloaterVoiceLicense::draw()
{
// draw children
LLModalDialog::draw();
}
// static
void FloaterVoiceLicense::updateAgree(LLUICtrl*, void* userdata )
{
FloaterVoiceLicense* self = (FloaterVoiceLicense*) userdata;
bool agree = self->childGetValue("agree_chk").asBoolean();
self->childSetEnabled("Continue", agree);
}
// static
void FloaterVoiceLicense::onContinue( void* userdata )
{
FloaterVoiceLicense* self = (FloaterVoiceLicense*) userdata;
LL_INFOS() << "User agreed to the Vivox personal license" << LL_ENDL;
// enabling voice by default here seems like the best behavior
gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
gSavedSettings.setBOOL("VivoxLicenseAccepted", TRUE);
// save these settings in case something bad happens later
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
if (LLStartUp::getStartupState() == STATE_LOGIN_VOICE_LICENSE)
{
LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
}
self->close(); // destroys this object
}
// static
void FloaterVoiceLicense::onCancel( void* userdata )
{
FloaterVoiceLicense* self = (FloaterVoiceLicense*) userdata;
LL_INFOS() << "User disagreed with the vivox personal license" << LL_ENDL;
gSavedSettings.setBOOL("EnableVoiceChat", FALSE);
gSavedSettings.setBOOL("VivoxLicenseAccepted", FALSE);
if (LLStartUp::getStartupState() == STATE_LOGIN_VOICE_LICENSE)
{
LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
}
self->mLoadCompleteCount = 0; // reset counter for next time we come here
self->close(); // destroys this object
}
//virtual
void FloaterVoiceLicense::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event)
{
if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{
// skip past the loading screen navigate complete
if ( ++mLoadCompleteCount == 2 )
{
LL_INFOS() << "NAVIGATE COMPLETE" << LL_ENDL;
// enable Agree to License radio button now that page has loaded
LLCheckBoxCtrl * license_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
license_agreement->setEnabled( true );
}
}
}

View File

@@ -1,72 +0,0 @@
/**
* @file floatervoicelicense.h
* @brief prompts user to agree to the Vivox license in order to enable voice
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2010, McCabe Maxsted
*
* Imprudence Viewer Source Code
* The source code in this file ("Source Code") is provided to you
* under the terms of the GNU General Public License, version 2.0
* ("GPL"). 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 SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef FLOATERVOICELICENSE_H
#define FLOATERVOICELICENSE_H
#include "llfloater.h"
#include "llmodaldialog.h"
#include "llassetstorage.h"
#include "llmediactrl.h"
class LLButton;
class LLRadioGroup;
class LLVFS;
class LLTextEditor;
class LLUUID;
class FloaterVoiceLicense :
public LLModalDialog,
public LLViewerMediaObserver,
public LLFloaterSingleton<FloaterVoiceLicense>
{
public:
FloaterVoiceLicense(const LLSD& key);
virtual ~FloaterVoiceLicense();
BOOL postBuild();
virtual void draw();
static void updateAgree( LLUICtrl *, void* userdata );
static void onContinue( void* userdata );
static void onCancel( void* userdata );
void setSiteIsAlive( bool alive );
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
private:
int mLoadCompleteCount;
};
#endif // FLOATERVOICELICENSE_H

View File

@@ -217,7 +217,6 @@ ATI Radeon RX700 .*ATI.*RX70.* 1 1
ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1 ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1
ATI RS880M .*ATI.*RS880M 1 1 ATI RS880M .*ATI.*RS880M 1 1
ATI Radeon RX9550 .*ATI.*RX9550.* 1 1 ATI Radeon RX9550 .*ATI.*RX9550.* 1 1
ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0
ATI Radeon X1000 .*ATI.*Radeon *X10.* 0 1 ATI Radeon X1000 .*ATI.*Radeon *X10.* 0 1
ATI Radeon X1200 .*ATI.*Radeon *X12.* 0 1 ATI Radeon X1200 .*ATI.*Radeon *X12.* 0 1
ATI Radeon X1300 .*ATI.*Radeon *X13.* 1 1 ATI Radeon X1300 .*ATI.*Radeon *X13.* 1 1
@@ -276,8 +275,9 @@ AMD RV730 (HD 4600) .*RV730.* 3 1
AMD RV740 (HD 4700) .*RV740.* 3 1 AMD RV740 (HD 4700) .*RV740.* 3 1
AMD RV770 (HD 4800) .*RV770.* 3 1 AMD RV770 (HD 4800) .*RV770.* 3 1
AMD RV790 (HD 4800) .*RV790.* 3 1 AMD RV790 (HD 4800) .*RV790.* 3 1
AMD Vega .*AMD.*Vega.* 3 1 AMD Vega .*(AMD|ATI).*Vega.* 3 1
AMD Radeon VII .*AMD.*Radeon ?VII.* 3 1 AMD Radeon VII .*AMD.*Radeon ?VII.* 3 1
AMD Radeon RX Series .*ATI.*(Radeon|ASUS).* RX.* 3 1
ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1 ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1
ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1 ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1
ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1 ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1
@@ -288,6 +288,7 @@ ATI FirePro 5000 .*ATI.*FirePro V5.* 3 1
ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1 ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1
ATI FirePro M .*ATI.*FirePro M.* 3 1 ATI FirePro M .*ATI.*FirePro M.* 3 1
ATI Technologies .*ATI *Technologies.* 0 1 ATI Technologies .*ATI *Technologies.* 0 1
ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0
// This entry is last to work around the "R300" driver problem. // This entry is last to work around the "R300" driver problem.
ATI R300 (9700) .*R300.* 1 1 ATI R300 (9700) .*R300.* 1 1
ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1 ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1
@@ -438,6 +439,8 @@ NVIDIA GTX 780 .*NVIDIA .*GTX *78.* 3 1
NVIDIA GTX 970 .*NVIDIA .*GTX *97.* 3 1 NVIDIA GTX 970 .*NVIDIA .*GTX *97.* 3 1
NVIDIA GTX 980 .*NVIDIA .*GTX *98.* 3 1 NVIDIA GTX 980 .*NVIDIA .*GTX *98.* 3 1
NVIDIA GTX TITAN .*NVIDIA .*GTX *TITAN.* 3 1 NVIDIA GTX TITAN .*NVIDIA .*GTX *TITAN.* 3 1
NVIDIA GeForce/Quadro RTX .*(GeForce|Quadro) .*RTX.* 3 1
NVIDIA RTX TITAN .*NVIDIA .*RTX.*TITAN.* 3 1
NVIDIA GT 7xxM .*NVIDIA .*GT *7.* 3 1 NVIDIA GT 7xxM .*NVIDIA .*GT *7.* 3 1
NVIDIA C51 .*NVIDIA .*C51.* 0 1 NVIDIA C51 .*NVIDIA .*C51.* 0 1
NVIDIA G72 .*NVIDIA .*G72.* 1 1 NVIDIA G72 .*NVIDIA .*G72.* 1 1

View File

@@ -409,12 +409,6 @@ Section "Viewer"
;This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py ;This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py
%%INSTALL_FILES%% %%INSTALL_FILES%%
!ifdef WIN64_BIN_BUILD
ExecWait '"$INSTDIR\redist\vc_redist.x64.exe" /passive /norestart'
!else
ExecWait '"$INSTDIR\redist\vc_redist.x86.exe" /passive /norestart'
!endif
;Pass the installer's language to the client to use as a default ;Pass the installer's language to the client to use as a default
StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)"

View File

@@ -621,7 +621,7 @@ private:
BOOL mAutoPilotUseRotation; BOOL mAutoPilotUseRotation;
LLVector3 mAutoPilotTargetFacing; LLVector3 mAutoPilotTargetFacing;
F32 mAutoPilotTargetDist; F32 mAutoPilotTargetDist;
S32 mAutoPilotNoProgressFrameCount; U64 mAutoPilotNoProgressFrameCount;
F32 mAutoPilotRotationThreshold; F32 mAutoPilotRotationThreshold;
std::string mAutoPilotBehaviorName; std::string mAutoPilotBehaviorName;
void (*mAutoPilotFinishedCallback)(BOOL, void *); void (*mAutoPilotFinishedCallback)(BOOL, void *);

View File

@@ -241,7 +241,6 @@ F32 gSimLastTime; // Used in LLAppViewer::init and send_stats()
F32 gSimFrames; F32 gSimFrames;
BOOL gShowObjectUpdates = FALSE; BOOL gShowObjectUpdates = FALSE;
BOOL gUseQuickTime = TRUE;
BOOL gAcceptTOS = FALSE; BOOL gAcceptTOS = FALSE;
BOOL gAcceptCriticalMessage = FALSE; BOOL gAcceptCriticalMessage = FALSE;

View File

@@ -45,8 +45,8 @@
#include "llviewercontrol.h" #include "llviewercontrol.h"
#include "llui.h" #include "llui.h"
#include "llappviewer.h" #include "llappviewer.h"
#include "llfloatertos.h"
#include "lltracker.h" #include "lltracker.h"
#include "floatervoicelicense.h"
#include "llstartup.h" #include "llstartup.h"
#include "hippogridmanager.h" #include "hippogridmanager.h"
@@ -303,8 +303,9 @@ void LLFirstUse::voiceLicenseAgreement()
{ {
gSavedSettings.setWarning("FirstVoiceLicense", FALSE); gSavedSettings.setWarning("FirstVoiceLicense", FALSE);
FloaterVoiceLicense::getInstance()->open(); auto inst = LLFloaterTOS::show(LLFloaterTOS::TOS_VOICE);
FloaterVoiceLicense::getInstance()->center(); inst->open();
inst->center();
} }
else // currently in STATE_LOGIN_VOICE_LICENSE when arriving here else // currently in STATE_LOGIN_VOICE_LICENSE when arriving here
{ {

View File

@@ -172,7 +172,8 @@ void LLAvatarListEntry::processProperties(void* data, EAvatarProcessorType type)
{ {
using namespace boost::gregorian; using namespace boost::gregorian;
int year, month, day; int year, month, day;
if (sscanf(pAvatarData->born_on.c_str(),"%d/%d/%d",&month,&day,&year) == 3) const auto born = pAvatarData->born_on;
if (!born.empty() && sscanf(born.c_str(),"%d/%d/%d",&month,&day,&year) == 3)
try try
{ {
mAge = (day_clock::local_day() - date(year, month, day)).days(); mAge = (day_clock::local_day() - date(year, month, day)).days();
@@ -187,7 +188,7 @@ void LLAvatarListEntry::processProperties(void* data, EAvatarProcessorType type)
} }
else // Something failed, resend request else // Something failed, resend request
{ {
LL_WARNS() << "Failed to extract age from APT_PROPERTIES for " << mID << ", received \"" << pAvatarData->born_on << "\". Requesting properties again." << LL_ENDL; LL_WARNS() << "Failed to extract age from APT_PROPERTIES for " << mID << ", received \"" << born << "\". Requesting properties again." << LL_ENDL;
inst.sendAvatarPropertiesRequest(mID); inst.sendAvatarPropertiesRequest(mID);
} }
} }
@@ -258,7 +259,7 @@ LLFloaterAvatarList::~LLFloaterAvatarList()
{ {
mCleanup = true; mCleanup = true;
LLSD sort; LLSD sort;
for (const auto& col : mAvatarList->getSortColumns()) for (const auto& col : mAvatarList->getSortOrder())
{ {
sort.append(mAvatarList->getColumn(col.first)->mName); sort.append(mAvatarList->getColumn(col.first)->mName);
sort.append(col.second); sort.append(col.second);
@@ -311,6 +312,42 @@ BOOL LLFloaterAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLFloater::handleRightMouseDown(x, y, mask); return LLFloater::handleRightMouseDown(x, y, mask);
} }
bool is_nearby(const LLUUID& id)
{
if (id.isNull()) return false;
if (const auto inst = LLFloaterAvatarList::getIfExists())
return inst->getAvatarEntry(id);
uuid_vec_t avatars;
LLWorld::instance().getAvatars(&avatars);
return std::find(avatars.begin(), avatars.end(), id) != avatars.end();
}
void track_av(const LLUUID& id)
{
if (auto inst = LLFloaterAvatarList::getIfExists())
if (inst->getAvatarEntry(id))
{
inst->trackAvatar(id);
return;
}
LLWorld::pos_map_t avatars;
LLWorld::instance().getAvatars(&avatars);
LLTracker::trackLocation(avatars[id], LLStringUtil::null, LLStringUtil::null);
}
void teleport_to(const LLUUID& id)
{
if (auto entry = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::instance().getAvatarEntry(id) : nullptr)
gAgent.teleportViaLocation(entry->getPosition());
else
{
LLWorld::pos_map_t avatars;
LLWorld::instance().getAvatars(&avatars);
gAgent.teleportViaLocation(avatars[id]);
}
}
static void cmd_profile(const LLAvatarListEntry* entry); static void cmd_profile(const LLAvatarListEntry* entry);
static void cmd_toggle_mark(LLAvatarListEntry* entry); static void cmd_toggle_mark(LLAvatarListEntry* entry);
static void cmd_ar(const LLAvatarListEntry* entry); static void cmd_ar(const LLAvatarListEntry* entry);
@@ -368,7 +405,7 @@ namespace
{ {
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{ {
LLFloaterAvatarList::instance().doCommand(cmd_teleport, true); teleport_to(get_focused_list_id_selected());
return true; return true;
} }
}; };
@@ -387,13 +424,13 @@ void addMenu(view_listener_t* menu, const std::string& name);
void add_radar_listeners() void add_radar_listeners()
{ {
addMenu(new RadarTrack(), "Radar.Track"); addMenu(new RadarTrack, "Radar.Track");
addMenu(new RadarMark(), "Radar.Mark"); addMenu(new RadarMark, "Radar.Mark");
addMenu(new RadarFocus(), "Radar.Focus"); addMenu(new RadarFocus, "Radar.Focus");
addMenu(new RadarFocusPrev(), "Radar.FocusPrev"); addMenu(new RadarFocusPrev, "Radar.FocusPrev");
addMenu(new RadarFocusNext(), "Radar.FocusNext"); addMenu(new RadarFocusNext, "Radar.FocusNext");
addMenu(new RadarTeleportTo(), "Radar.TeleportTo"); addMenu(new RadarTeleportTo, "Radar.TeleportTo");
addMenu(new RadarAnnounceKeys(), "Radar.AnnounceKeys"); addMenu(new RadarAnnounceKeys, "Radar.AnnounceKeys");
} }
BOOL LLFloaterAvatarList::postBuild() BOOL LLFloaterAvatarList::postBuild()
@@ -1098,8 +1135,11 @@ void LLFloaterAvatarList::onClickTrack()
LLScrollListItem* item = mAvatarList->getFirstSelected(); LLScrollListItem* item = mAvatarList->getFirstSelected();
if (!item) return; if (!item) return;
LLUUID agent_id = item->getUUID(); trackAvatar(item->getUUID());
}
void LLFloaterAvatarList::trackAvatar(const LLUUID& agent_id)
{
if (mTracking && mTrackedAvatar == agent_id) if (mTracking && mTrackedAvatar == agent_id)
{ {
LLTracker::stopTracking(false); LLTracker::stopTracking(false);
@@ -1430,7 +1470,7 @@ static void cmd_eject(const LLAvatarListEntry* entry) { send_eject(entry->getID
static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); } static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); }
static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("kickestate", {entry->getID().asString()}); } static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("kickestate", {entry->getID().asString()}); }
static void cmd_estate_tp_home(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", {gAgentID.asString(), entry->getID().asString()}); } static void cmd_estate_tp_home(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", {gAgentID.asString(), entry->getID().asString()}); }
static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); } static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateAccess::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); }
void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const
{ {

View File

@@ -266,6 +266,7 @@ public:
void focusOnNext(bool marked_only); void focusOnNext(bool marked_only);
void refreshTracker(); void refreshTracker();
void trackAvatar(const LLUUID& agent_id);
void trackAvatar(const LLAvatarListEntry* entry) const; void trackAvatar(const LLAvatarListEntry* entry) const;
/** /**

View File

@@ -257,13 +257,18 @@ void LLFloaterAvatarPicker::onBtnSelect()
uuid_vec_t avatar_ids; uuid_vec_t avatar_ids;
std::vector<LLAvatarName> avatar_names; std::vector<LLAvatarName> avatar_names;
getSelectedAvatarData(list, avatar_ids, avatar_names); getSelectedAvatarData(list, avatar_ids, avatar_names);
if (mCloseOnSelect) // Singu Note: Close before callback if we get here first, makes potential next dialog floater position correctly
{
mCloseOnSelect = FALSE;
close();
}
mSelectionCallback(avatar_ids, avatar_names); mSelectionCallback(avatar_ids, avatar_names);
} }
} }
getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE); getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE); getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
getChild<LLScrollListCtrl>("Friends")->deselectAllItems(TRUE); getChild<LLScrollListCtrl>("Friends")->deselectAllItems(TRUE);
if(mCloseOnSelect) if (mCloseOnSelect)
{ {
mCloseOnSelect = FALSE; mCloseOnSelect = FALSE;
close(); close();

View File

@@ -0,0 +1,92 @@
/**
* @file llfloaterbanduration.cpp
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2018, 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;
* version 2.1 of the License only.
*
* 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
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llfloaterbanduration.h"
#include "llcombobox.h"
#include "llspinctrl.h"
#include "lluictrlfactory.h"
LLFloaterBanDuration::LLFloaterBanDuration(const LLSD& target) : LLFloater()
{
LLUICtrlFactory::instance().buildFloater(this, "floater_ban_duration.xml");
}
BOOL LLFloaterBanDuration::postBuild()
{
childSetAction("ok_btn", boost::bind(&LLFloaterBanDuration::onClickBan, this));
childSetAction("cancel_btn", boost::bind(&LLFloaterBanDuration::close, this, false));
auto combo = getChild<LLUICtrl>("ban_duration_combo");
combo->setCommitCallback(boost::bind(&LLFloaterBanDuration::onClickCombo, this, _2, getChild<LLUICtrl>("ban_duration")));
combo->onCommit();
return TRUE;
}
LLFloaterBanDuration* LLFloaterBanDuration::show(select_callback_t callback, const uuid_vec_t& ids)
{
LLFloaterBanDuration* floater = showInstance();
if (!floater)
{
LL_WARNS() << "Cannot instantiate ban duration floater" << LL_ENDL;
return nullptr;
}
floater->mSelectionCallback = callback;
floater->mAvatar_ids = ids;
return floater;
}
void LLFloaterBanDuration::onClickCombo(const LLSD& val, LLUICtrl* duration)
{
duration->setEnabled(val.asInteger() != 0);
}
void LLFloaterBanDuration::onClickBan()
{
if (mSelectionCallback)
{
S32 time = 0;
if (auto type = getChild<LLUICtrl>("ban_duration_combo")->getValue().asInteger())
{
LLSpinCtrl* duration_spin = getChild<LLSpinCtrl>("ban_duration");
if (duration_spin)
{
time = (duration_spin->getValue().asInteger() * 3600);
if (type > 1)
{
time *= type == 2 ? 24 : type == 3 ? 168 : 730;
}
time += LLDate::now().secondsSinceEpoch();
}
}
mSelectionCallback(mAvatar_ids, time);
}
close();
}

View File

@@ -0,0 +1,52 @@
/**
* @file llfloaterbanduration.h
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2018, 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;
* version 2.1 of the License only.
*
* 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
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_FLOATERBANDURATION_H
#define LL_FLOATERBANDURATION_H
#include "llfloater.h"
class LLFloaterBanDuration : public LLFloater
, public LLFloaterSingleton<LLFloaterBanDuration>
{
typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
public:
LLFloaterBanDuration(const LLSD& target);
BOOL postBuild() override;
static LLFloaterBanDuration* show(select_callback_t callback, const uuid_vec_t& ids);
private:
~LLFloaterBanDuration() {};
void onClickBan();
void onClickCombo(const LLSD&, LLUICtrl*);
uuid_vec_t mAvatar_ids;
select_callback_t mSelectionCallback;
};
#endif // LL_FLOATERBANDURATION_H

View File

@@ -510,7 +510,7 @@ LLColor4 get_text_color(const LLChat& chat, bool from_im)
} }
static const LLCachedControl<bool> sKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false); static const LLCachedControl<bool> sKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false);
if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(boost::starts_with(chat.mText, chat.mFromName) ? chat.mText.substr(chat.mFromName.length()) : chat.mText, 1)) if (sKeywordsChangeColor && gAgentID != chat.mFromID && AscentKeyword::hasKeyword((chat.mSourceType != CHAT_SOURCE_SYSTEM && boost::starts_with(chat.mText, chat.mFromName)) ? chat.mText.substr(chat.mFromName.length()) : chat.mText, 1))
{ {
static const LLCachedControl<LLColor4> sKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f)); static const LLCachedControl<LLColor4> sKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f));
text_color = sKeywordsColor; text_color = sKeywordsColor;

View File

@@ -52,6 +52,7 @@
#include "llcombobox.h" #include "llcombobox.h"
#include "llfloaterauction.h" #include "llfloaterauction.h"
#include "llfloateravatarpicker.h" #include "llfloateravatarpicker.h"
#include "llfloaterbanduration.h"
#include "llfloatergroups.h" #include "llfloatergroups.h"
#include "llfloaterscriptlimits.h" #include "llfloaterscriptlimits.h"
#include "llgroupactions.h" #include "llgroupactions.h"
@@ -220,7 +221,6 @@ void LLFloaterLand::onOpen()
refresh(); refresh();
} }
// virtual // virtual
void LLFloaterLand::onClose(bool app_quitting) void LLFloaterLand::onClose(bool app_quitting)
{ {
@@ -471,6 +471,13 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnBuyLand = getChild<LLButton>("Buy Land..."); mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND); mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
if(gDisconnected)
{
return TRUE;
}
// note: on region change this will not be re checked, should not matter on Agni as // note: on region change this will not be re checked, should not matter on Agni as
// 99% of the time all regions will return the same caps. In case of an erroneous setting // 99% of the time all regions will return the same caps. In case of an erroneous setting
// to enabled the floater will just throw an error when trying to get it's cap // to enabled the floater will just throw an error when trying to get it's cap
@@ -584,6 +591,11 @@ void LLPanelLandGeneral::refresh()
mBtnReleaseLand->setEnabled(FALSE); mBtnReleaseLand->setEnabled(FALSE);
mBtnReclaimLand->setEnabled(FALSE); mBtnReclaimLand->setEnabled(FALSE);
mBtnBuyPass->setEnabled(FALSE); mBtnBuyPass->setEnabled(FALSE);
if(gDisconnected)
{
return;
}
} }
else else
{ {
@@ -591,7 +603,7 @@ void LLPanelLandGeneral::refresh()
BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus()); BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
BOOL region_xfer = FALSE; BOOL region_xfer = FALSE;
if(regionp if(regionp
&& !regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL)) && !(regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL)))
{ {
region_xfer = TRUE; region_xfer = TRUE;
} }
@@ -1245,7 +1257,7 @@ void LLPanelLandObjects::refresh()
mOwnerList->deleteAllItems(); mOwnerList->deleteAllItems();
mOwnerList->setEnabled(FALSE); mOwnerList->setEnabled(FALSE);
if (!parcel) if (!parcel || gDisconnected)
{ {
mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0)); mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0)); mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0));
@@ -1619,23 +1631,22 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
{ {
msg->getU32("DataExtended", "TimeStamp", most_recent_time, i); msg->getU32("DataExtended", "TimeStamp", most_recent_time, i);
} }
if (owner_id.isNull()) if (owner_id.isNull())
{ {
continue; continue;
} }
BOOL in_sim = (std::find(avatar_ids.begin(), avatar_ids.end(), owner_id) != avatar_ids.end());
LLNameListCtrl::NameItem item_params; LLNameListCtrl::NameItem item_params;
item_params.value = owner_id; item_params.value = owner_id;
item_params.target = is_group_owned ? LLNameListCtrl::GROUP : LLNameListCtrl::INDIVIDUAL; item_params.target = is_group_owned ? LLNameListItem::GROUP : LLNameListItem::INDIVIDUAL;
if (is_group_owned) if (is_group_owned)
{ {
item_params.columns.add().type("icon").value(self->mIconGroup->getName()).column("type"); item_params.columns.add().type("icon").value(self->mIconGroup->getName()).column("type");
item_params.columns.add().value(OWNER_GROUP).font(FONT).column("online_status"); item_params.columns.add().value(OWNER_GROUP).font(FONT).column("online_status");
} }
else if (in_sim) else if (std::find(avatar_ids.begin(), avatar_ids.end(), owner_id) != avatar_ids.end())
{ {
item_params.columns.add().type("icon").value(self->mIconAvatarInSim->getName()).column("type"); item_params.columns.add().type("icon").value(self->mIconAvatarInSim->getName()).column("type");
item_params.columns.add().value(OWNER_INSIM).font(FONT).column("online_status"); item_params.columns.add().value(OWNER_INSIM).font(FONT).column("online_status");
@@ -1661,10 +1672,10 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date"); item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date");
self->mOwnerList->addNameItemRow(item_params); self->mOwnerList->addNameItemRow(item_params);
LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
<< ") owns " << object_count << " objects." << LL_ENDL; << ") owns " << object_count << " objects." << LL_ENDL;
} }
// check for no results // check for no results
if (0 == self->mOwnerList->getItemCount()) if (0 == self->mOwnerList->getItemCount())
{ {
@@ -1842,10 +1853,15 @@ void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data)
LLParcel* parcel = lop->mParcel->getParcel(); LLParcel* parcel = lop->mParcel->getParcel();
if (parcel) if (parcel)
{ {
lop->mOtherTime = atoi(lop->mCleanOtherObjectsTime->getText().c_str()); S32 return_time = atoi(lop->mCleanOtherObjectsTime->getText().c_str());
// Only send return time if it has changed
if (return_time != lop->mOtherTime)
{
lop->mOtherTime = return_time;
parcel->setCleanOtherTime(lop->mOtherTime); parcel->setCleanOtherTime(lop->mOtherTime);
send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime); send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
}
} }
} }
@@ -2014,7 +2030,7 @@ void LLPanelLandOptions::refresh()
refreshSearch(); refreshSearch();
LLParcel *parcel = mParcel->getParcel(); LLParcel *parcel = mParcel->getParcel();
if (!parcel) if (!parcel || gDisconnected)
{ {
mCheckEditObjects ->set(FALSE); mCheckEditObjects ->set(FALSE);
mCheckEditObjects ->setEnabled(FALSE); mCheckEditObjects ->setEnabled(FALSE);
@@ -2203,7 +2219,7 @@ void LLPanelLandOptions::draw()
void LLPanelLandOptions::refreshSearch() void LLPanelLandOptions::refreshSearch()
{ {
LLParcel *parcel = mParcel->getParcel(); LLParcel *parcel = mParcel->getParcel();
if (!parcel) if (!parcel || gDisconnected)
{ {
mCheckShowDirectory->set(FALSE); mCheckShowDirectory->set(FALSE);
mCheckShowDirectory->setEnabled(FALSE); mCheckShowDirectory->setEnabled(FALSE);
@@ -2499,127 +2515,120 @@ void LLPanelLandAccess::refresh()
LLParcel *parcel = mParcel->getParcel(); LLParcel *parcel = mParcel->getParcel();
// Display options // Display options
if (parcel) if (parcel && !gDisconnected)
{ {
BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST); BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
BOOL public_access = !use_access_list && !use_group; BOOL public_access = !use_access_list && !use_group;
getChild<LLUICtrl>("public_access")->setValue(public_access ); getChild<LLUICtrl>("public_access")->setValue(public_access);
getChild<LLUICtrl>("GroupCheck")->setValue(use_group ); getChild<LLUICtrl>("GroupCheck")->setValue(use_group);
std::string group_name; std::string group_name;
gCacheName->getGroupName(parcel->getGroupID(), group_name); gCacheName->getGroupName(parcel->getGroupID(), group_name);
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name ); getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
const auto always = getString("Always");
static const LLCachedControl<std::string> date("ShortDateFormat");
static const LLCachedControl<std::string> time("LongTimeFormat");
const auto time_format = date() + ' ' + time();
// Allow list // Allow list
if (mListAccess) if (mListAccess)
{ {
// Clear the sort order so we don't re-sort on every add. // Clear the sort order so we don't re-sort on every add.
const auto order = mListAccess->getSortOrder();
mListAccess->clearSortOrder(); mListAccess->clearSortOrder();
mListAccess->deleteAllItems(); mListAccess->deleteAllItems();
S32 count = parcel->mAccessList.size(); S32 count = parcel->mAccessList.size();
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild<LLUICtrl>("AllowedText")->setTextArg("[COUNT]", llformat("%d",count));
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); getChild<LLUICtrl>("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
for (access_map_const_iterator cit = parcel->mAccessList.begin(); for (access_map_const_iterator cit = parcel->mAccessList.begin();
cit != parcel->mAccessList.end(); ++cit) cit != parcel->mAccessList.end(); ++cit)
{ {
const LLAccessEntry& entry = (*cit).second; const LLAccessEntry& entry = (*cit).second;
std::string suffix; LLSD item;
item["id"] = entry.mID;
LLSD& columns = item["columns"];
columns[0]["column"] = "name"; // to be populated later
columns[1]["column"] = "duration";
if (entry.mTime != 0) if (entry.mTime != 0)
{ {
S32 now = time(NULL); columns[1]["type"] = "date";
S32 seconds = entry.mTime - now; columns[1]["format"] = time_format;
if (seconds < 0) seconds = 0; columns[1]["value"] = LLDate(entry.mTime);
suffix.assign(" (");
if (seconds >= 120)
{
std::string buf = llformat("%d ", (seconds/60)) + getString("minutes");
suffix.append(buf);
}
else if (seconds >= 60)
{
suffix.append(getString("1_minute"));
}
else if (seconds == 1)
{
suffix.append(getString("1_second"));
}
else
{
std::string buf = llformat("%d ", seconds) + getString("seconds");
suffix.append(buf);
}
suffix.append(" " + getString("remaining") + ")");
} }
mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); else
{
columns[1]["value"] = always;
}
mListAccess->addElement(item);
} }
mListAccess->sortByName(TRUE); mListAccess->setSortOrder(order);
} }
// Ban List // Ban List
if(mListBanned) if(mListBanned)
{ {
// Clear the sort order so we don't re-sort on every add. // Clear the sort order so we don't re-sort on every add.
const auto order = mListBanned->getSortOrder();
mListBanned->clearSortOrder(); mListBanned->clearSortOrder();
mListBanned->deleteAllItems(); mListBanned->deleteAllItems();
S32 count = parcel->mBanList.size(); S32 count = parcel->mBanList.size();
getChild<LLUICtrl>("BanCheck")->setTextArg("[COUNT]", llformat("%d",count));
getChild<LLUICtrl>("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
for (access_map_const_iterator cit = parcel->mBanList.begin(); for (access_map_const_iterator cit = parcel->mBanList.begin();
cit != parcel->mBanList.end(); ++cit) cit != parcel->mBanList.end(); ++cit)
{ {
const LLAccessEntry& entry = (*cit).second; const LLAccessEntry& entry = (*cit).second;
std::string suffix; LLSD item;
item["id"] = entry.mID;
LLSD& columns = item["columns"];
columns[0]["column"] = "name"; // to be populated later
columns[1]["column"] = "duration";
if (entry.mTime != 0) if (entry.mTime != 0)
{ {
S32 now = time(NULL); columns[1]["type"] = "date";
S32 seconds = entry.mTime - now; columns[1]["format"] = time_format;
if (seconds < 0) seconds = 0; columns[1]["value"] = LLDate(entry.mTime);
suffix.assign(" (");
if (seconds >= 120)
{
std::string buf = llformat("%d ", (seconds/60)) + getString("minutes");
suffix.append(buf);
}
else if (seconds >= 60)
{
suffix.append(getString("1_minute"));
}
else if (seconds == 1)
{
suffix.append(getString("1_second"));
}
else
{
std::string buf = llformat("%d ", seconds) + getString("seconds");
suffix.append(buf);
}
suffix.append(" " + getString("remaining") + ")");
} }
mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); else
{
columns[1]["value"] = always;
}
mListBanned->addElement(item);
} }
mListBanned->sortByName(TRUE); mListBanned->setSortOrder(order);
} }
if(parcel->getRegionDenyAnonymousOverride()) if(parcel->getRegionDenyAnonymousOverride())
{ {
getChild<LLUICtrl>("limit_payment")->setValue(TRUE); getChild<LLUICtrl>("limit_payment")->setValue(TRUE);
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
} }
else else
{ {
getChild<LLUICtrl>("limit_payment")->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS))); getChild<LLUICtrl>("limit_payment")->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
} }
if(parcel->getRegionDenyAgeUnverifiedOverride()) if(parcel->getRegionDenyAgeUnverifiedOverride())
{ {
getChild<LLUICtrl>("limit_age_verified")->setValue(TRUE); getChild<LLUICtrl>("limit_age_verified")->setValue(TRUE);
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
} }
else else
{ {
getChild<LLUICtrl>("limit_age_verified")->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED))); getChild<LLUICtrl>("limit_age_verified")->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
} }
BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST); BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
@@ -2650,10 +2659,10 @@ void LLPanelLandAccess::refresh()
getChild<LLUICtrl>("PassCheck")->setValue(FALSE); getChild<LLUICtrl>("PassCheck")->setValue(FALSE);
getChild<LLUICtrl>("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT); getChild<LLUICtrl>("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
getChild<LLUICtrl>("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT ); getChild<LLUICtrl>("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT );
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0)); mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0)); mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0)); mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0)); mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
} }
} }
@@ -2667,11 +2676,15 @@ void LLPanelLandAccess::refresh_ui()
getChildView("pass_combo")->setEnabled(FALSE); getChildView("pass_combo")->setEnabled(FALSE);
getChildView("PriceSpin")->setEnabled(FALSE); getChildView("PriceSpin")->setEnabled(FALSE);
getChildView("HoursSpin")->setEnabled(FALSE); getChildView("HoursSpin")->setEnabled(FALSE);
getChildView("AccessList")->setEnabled(FALSE); mListAccess->setEnabled(FALSE);
getChildView("BannedList")->setEnabled(FALSE); mListBanned->setEnabled(FALSE);
getChildView("add_allowed")->setEnabled(FALSE);
getChildView("remove_allowed")->setEnabled(FALSE);
getChildView("add_banned")->setEnabled(FALSE);
getChildView("remove_banned")->setEnabled(FALSE);
LLParcel *parcel = mParcel->getParcel(); LLParcel *parcel = mParcel->getParcel();
if (parcel) if (parcel && !gDisconnected)
{ {
BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
@@ -2710,7 +2723,7 @@ void LLPanelLandAccess::refresh_ui()
getChildView("GroupCheck")->setEnabled(FALSE); getChildView("GroupCheck")->setEnabled(FALSE);
getChildView("PassCheck")->setEnabled(FALSE); getChildView("PassCheck")->setEnabled(FALSE);
getChildView("pass_combo")->setEnabled(FALSE); getChildView("pass_combo")->setEnabled(FALSE);
getChildView("AccessList")->setEnabled(FALSE); mListAccess->setEnabled(FALSE);
} }
else else
{ {
@@ -2731,13 +2744,13 @@ void LLPanelLandAccess::refresh_ui()
getChildView("HoursSpin")->setEnabled(can_manage_allowed); getChildView("HoursSpin")->setEnabled(can_manage_allowed);
} }
} }
getChildView("AccessList")->setEnabled(true/*can_manage_allowed*/); mListAccess->setEnabled(true/*can_manage_allowed*/);
S32 allowed_list_count = parcel->mAccessList.size(); S32 allowed_list_count = parcel->mAccessList.size();
getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST); getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0); BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected); getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
getChildView("BannedList")->setEnabled(true/*can_manage_banned*/); mListBanned->setEnabled(true/*can_manage_banned*/);
S32 banned_list_count = parcel->mBanList.size(); S32 banned_list_count = parcel->mBanList.size();
getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST); getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0); has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0);
@@ -2779,12 +2792,12 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
// If we disabled public access, enable group access by default (if applicable) // If we disabled public access, enable group access by default (if applicable)
BOOL public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean(); BOOL public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
if (public_access == FALSE) if (!public_access)
{ {
std::string group_name; std::string group_name;
if (gCacheName->getGroupName(parcel->getGroupID(), group_name)) if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
{ {
self->getChild<LLUICtrl>("GroupCheck")->setValue(public_access ? FALSE : TRUE); self->getChild<LLUICtrl>("GroupCheck")->setValue(true);
} }
} }
@@ -2893,7 +2906,7 @@ void LLPanelLandAccess::onClickAddAccess()
{ {
LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1)); boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), true, true);
if (picker) if (picker)
{ {
root_floater->addDependentFloater(picker); root_floater->addDependentFloater(picker);
@@ -2902,17 +2915,29 @@ void LLPanelLandAccess::onClickAddAccess()
void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids) void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
{ {
if (!ids.empty()) LLParcel* parcel = mParcel->getParcel();
if (!parcel) return;
U32 lists_to_update = 0;
for (const auto& id : ids)
{ {
LLUUID id = ids[0]; if (parcel->addToAccessList(id, 0))
LLParcel* parcel = mParcel->getParcel();
if (parcel)
{ {
parcel->addToAccessList(id, 0); lists_to_update |= AL_ACCESS;
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS); // agent was successfully added to access list
refresh(); // but we also need to check ban list to ensure that agent will not be in two lists simultaneously
if(parcel->removeFromBanList(id))
{
lists_to_update |= AL_BAN;
}
} }
} }
if (lists_to_update)
{
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
} }
// static // static
@@ -2942,7 +2967,7 @@ void LLPanelLandAccess::onClickAddBanned()
{ {
LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1)); boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, true);
if (picker) if (picker)
{ {
root_floater->addDependentFloater(picker); root_floater->addDependentFloater(picker);
@@ -2951,17 +2976,40 @@ void LLPanelLandAccess::onClickAddBanned()
void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids) void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
{ {
if (!ids.empty()) LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterBanDuration* duration_floater = LLFloaterBanDuration::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned2, this, _1, _2), ids);
if (duration_floater)
{ {
LLUUID id = ids[0]; root_floater->addDependentFloater(duration_floater);
LLParcel* parcel = mParcel->getParcel(); }
if (parcel) }
void LLPanelLandAccess::callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration)
{
LLParcel* parcel = mParcel->getParcel();
if (!parcel) return;
U32 lists_to_update = 0;
for (const auto& id : ids)
{
if (parcel->addToBanList(id, duration))
{ {
parcel->addToBanList(id, 0); lists_to_update |= AL_BAN;
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN); // agent was successfully added to ban list
refresh(); // but we also need to check access list to ensure that agent will not be in two lists simultaneously
if(parcel->removeFromAccessList(id))
{
lists_to_update |= AL_ACCESS;
}
} }
} }
if (lists_to_update)
{
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
} }
// static // static
@@ -3010,7 +3058,7 @@ BOOL LLPanelLandCovenant::postBuild()
void LLPanelLandCovenant::refresh() void LLPanelLandCovenant::refresh()
{ {
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return; if(!region || gDisconnected) return;
LLTextBox* region_name = getChild<LLTextBox>("region_name_text"); LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name) if (region_name)

View File

@@ -384,6 +384,7 @@ public:
void onClickAddAccess(); void onClickAddAccess();
void onClickAddBanned(); void onClickAddBanned();
void callbackAvatarCBBanned(const uuid_vec_t& ids); void callbackAvatarCBBanned(const uuid_vec_t& ids);
void callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration);
void callbackAvatarCBAccess(const uuid_vec_t& ids); void callbackAvatarCBAccess(const uuid_vec_t& ids);
protected: protected:

View File

@@ -41,6 +41,7 @@
// project include // project include
#include "llfloateravatarpicker.h" #include "llfloateravatarpicker.h"
#include "llgroupactions.h"
#include "llmutelist.h" #include "llmutelist.h"
#include "llnamelistctrl.h" #include "llnamelistctrl.h"
@@ -248,20 +249,20 @@ void LLFloaterMute::refreshMuteList()
{ {
case LLMute::GROUP: case LLMute::GROUP:
icon_column.value = mGroupIcon->getName(); icon_column.value = mGroupIcon->getName();
element.target = LLNameListCtrl::GROUP; element.target = LLNameListItem::GROUP;
break; break;
case LLMute::AGENT: case LLMute::AGENT:
icon_column.value = mAvatarIcon->getName(); icon_column.value = mAvatarIcon->getName();
element.target = LLNameListCtrl::INDIVIDUAL; element.target = LLNameListItem::INDIVIDUAL;
break; break;
case LLMute::OBJECT: case LLMute::OBJECT:
icon_column.value = mObjectIcon->getName(); icon_column.value = mObjectIcon->getName();
element.target = LLNameListCtrl::SPECIAL; element.target = LLNameListItem::SPECIAL;
break; break;
case LLMute::BY_NAME: case LLMute::BY_NAME:
default: default:
icon_column.value = mNameIcon->getName(); icon_column.value = mNameIcon->getName();
element.target = LLNameListCtrl::SPECIAL; element.target = LLNameListItem::SPECIAL;
break; break;
} }

View File

@@ -72,6 +72,7 @@ private:
void onPickUser(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names); void onPickUser(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
static void onClickMuteByName(void*); static void onClickMuteByName(void*);
static void callbackMuteByName(const std::string& text, void*); static void callbackMuteByName(const std::string& text, void*);
void showProfile() const;
private: private:
LLNameListCtrl* mMuteList; LLNameListCtrl* mMuteList;

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,7 @@
#define LL_LLFLOATERREGIONINFO_H #define LL_LLFLOATERREGIONINFO_H
#include <vector> #include <vector>
#include "llagent.h"
#include "llfloater.h" #include "llfloater.h"
#include "llpanel.h" #include "llpanel.h"
@@ -63,15 +64,17 @@ class LLPanelRegionDebugInfo;
class LLPanelRegionTerrainInfo; class LLPanelRegionTerrainInfo;
class LLPanelEstateInfo; class LLPanelEstateInfo;
class LLPanelEstateCovenant; class LLPanelEstateCovenant;
class LLPanelEstateAccess;
class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton<LLFloaterRegionInfo> class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton<LLFloaterRegionInfo>
{ {
friend class LLUISingleton<LLFloaterRegionInfo, VisibilityPolicy<LLFloater> >; friend class LLUISingleton<LLFloaterRegionInfo, VisibilityPolicy<LLFloater>>;
public: public:
/*virtual*/ void onOpen(); /*virtual*/ void onOpen();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*virtual*/ void open(); /*virtual*/ void open();
@@ -88,6 +91,7 @@ public:
//static void incrementSerial() { sRequestSerial++; } //static void incrementSerial() { sRequestSerial++; }
static LLPanelEstateInfo* getPanelEstate(); static LLPanelEstateInfo* getPanelEstate();
static LLPanelEstateAccess* getPanelAccess();
static LLPanelEstateCovenant* getPanelCovenant(); static LLPanelEstateCovenant* getPanelCovenant();
static LLPanelRegionTerrainInfo* getPanelRegionTerrain(); static LLPanelRegionTerrainInfo* getPanelRegionTerrain();
@@ -106,6 +110,7 @@ protected:
protected: protected:
void onTabSelected(const LLSD& param); void onTabSelected(const LLSD& param);
void refreshFromRegion(LLViewerRegion* region); void refreshFromRegion(LLViewerRegion* region);
void onGodLevelChange(U8 god_level);
// member data // member data
LLTabContainer* mTab; LLTabContainer* mTab;
@@ -113,6 +118,10 @@ protected:
info_panels_t mInfoPanels; info_panels_t mInfoPanels;
//static S32 sRequestSerial; // serial # of last EstateOwnerRequest //static S32 sRequestSerial; // serial # of last EstateOwnerRequest
static LLUUID sRequestInvoice; static LLUUID sRequestInvoice;
private:
LLAgent::god_level_change_slot_t mGodLevelChangeSlot;
}; };
@@ -261,41 +270,18 @@ public:
void onChangeFixedSun(); void onChangeFixedSun();
void onChangeUseGlobalTime(); void onChangeUseGlobalTime();
void onChangeAccessOverride();
void onClickEditSky(); void onClickEditSky();
void onClickEditSkyHelp(); void onClickEditSkyHelp();
void onClickEditDayCycle(); void onClickEditDayCycle();
void onClickEditDayCycleHelp(); void onClickEditDayCycleHelp();
void onClickAddAllowedAgent();
void onClickRemoveAllowedAgent();
void onClickAddAllowedGroup();
void onClickRemoveAllowedGroup();
void onClickAddBannedAgent();
void onClickRemoveBannedAgent();
void onClickAddEstateManager();
void onClickRemoveEstateManager();
void onClickKickUser(); void onClickKickUser();
// Group picker callback is different, can't use core methods below
bool addAllowedGroup(const LLSD& notification, const LLSD& response);
void addAllowedGroup2(LLUUID id);
// Core methods for all above add/remove button clicks
static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
static bool accessAddCore2(const LLSD& notification, const LLSD& response);
static void accessAddCore3(const uuid_vec_t& ids, LLEstateAccessChangeInfo* change_info);
static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name);
static bool accessRemoveCore2(const LLSD& notification, const LLSD& response);
// used for both add and remove operations
static bool accessCoreConfirm(const LLSD& notification, const LLSD& response);
bool kickUserConfirm(const LLSD& notification, const LLSD& response); bool kickUserConfirm(const LLSD& notification, const LLSD& response);
// Send the actual EstateOwnerRequest "estateaccessdelta" message
static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
void onKickUserCommit(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names); void onKickUserCommit(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
static void onClickMessageEstate(void* data); static void onClickMessageEstate(void* data);
bool onMessageCommit(const LLSD& notification, const LLSD& response); bool onMessageCommit(const LLSD& notification, const LLSD& response);
@@ -331,7 +317,6 @@ protected:
void commitEstateAccess(); void commitEstateAccess();
void commitEstateManagers(); void commitEstateManagers();
void clearAccessLists();
BOOL checkSunHourSlider(LLUICtrl* child_ctrl); BOOL checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID; U32 mEstateID;
@@ -410,8 +395,6 @@ public:
// LLPanel // LLPanel
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
// LLPanelRegionInfo
/*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onOpen(const LLSD& key);
// LLView // LLView
@@ -463,4 +446,104 @@ private:
LLComboBox* mDayCyclePresetCombo; LLComboBox* mDayCyclePresetCombo;
}; };
#if 0 // Singu TODO: Experiences
class LLPanelRegionExperiences : public LLPanelRegionInfo
{
LOG_CLASS(LLPanelEnvironmentInfo);
public:
LLPanelRegionExperiences();
/*virtual*/ BOOL postBuild() override;
BOOL sendUpdate() override;
static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response);
static void sendEstateExperienceDelta(U32 flags, const LLUUID& agent_id);
static void infoCallback(LLHandle<LLPanelRegionExperiences> handle, const LLSD& content);
bool refreshFromRegion(LLViewerRegion* region) override;
void sendPurchaseRequest()const;
void processResponse( const LLSD& content );
private:
void refreshRegionExperiences();
static std::string regionCapabilityQuery(LLViewerRegion* region, const std::string &cap);
void setupList(LLPanelExperienceListEditor* child, const char* control_name, U32 add_id, U32 remove_id);
static LLSD addIds( LLPanelExperienceListEditor* panel );
void itemChanged(U32 event_type, const LLUUID& id);
LLPanelExperienceListEditor* mTrusted;
LLPanelExperienceListEditor* mAllowed;
LLPanelExperienceListEditor* mBlocked;
LLUUID mDefaultExperience;
};
#endif // Singu TODO: Experiences
class LLPanelEstateAccess : public LLPanelRegionInfo
{
LOG_CLASS(LLPanelEnvironmentInfo);
public:
LLPanelEstateAccess();
virtual BOOL postBuild();
virtual void updateChild(LLUICtrl* child_ctrl);
void updateControls(LLViewerRegion* region);
void updateLists();
void setPendingUpdate(bool pending) { mPendingUpdate = pending; }
bool getPendingUpdate() { return mPendingUpdate; }
virtual bool refreshFromRegion(LLViewerRegion* region);
static void onEstateAccessReceived(const LLSD& result);
private:
void onClickAddAllowedAgent();
void onClickRemoveAllowedAgent();
void onClickCopyAllowedList();
void onClickAddAllowedGroup();
void onClickRemoveAllowedGroup();
void onClickCopyAllowedGroupList();
void onClickAddBannedAgent();
void onClickRemoveBannedAgent();
void onClickCopyBannedList();
void onClickAddEstateManager();
void onClickRemoveEstateManager();
void onAllowedSearchEdit(const std::string& search_string);
void onAllowedGroupsSearchEdit(const std::string& search_string);
void onBannedSearchEdit(const std::string& search_string);
// Group picker callback is different, can't use core methods below
bool addAllowedGroup(const LLSD& notification, const LLSD& response);
void addAllowedGroup2(LLUUID id);
// Core methods for all above add/remove button clicks
static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
static bool accessAddCore2(const LLSD& notification, const LLSD& response);
static void accessAddCore3(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names, LLEstateAccessChangeInfo* change_info);
static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name);
static bool accessRemoveCore2(const LLSD& notification, const LLSD& response);
// used for both add and remove operations
static bool accessCoreConfirm(const LLSD& notification, const LLSD& response);
public:
// Send the actual EstateOwnerRequest "estateaccessdelta" message
static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
private:
//static void requestEstateGetAccessCoro(std::string url);
void searchAgent(LLNameListCtrl* listCtrl, const std::string& search_string);
void copyListToClipboard(std::string list_name);
bool mPendingUpdate;
bool mCtrlsEnabled;
};
#endif #endif

View File

@@ -1,34 +1,33 @@
/** /**
* @file llfloatertos.cpp * @file llfloatertos.cpp
* @brief Terms of Service Agreement dialog * @brief Terms of Service Agreement dialog
* *
* $LicenseInfo:firstyear=2003&license=viewergpl$ * $LicenseInfo:firstyear=2003&license=viewergpl$
* *
* Copyright (c) 2003-2009, Linden Research, Inc. * Copyright (c) 2003-2009, Linden Research, Inc.; 2010, McCabe Maxsted; 2019, Liru Faers
* *
* Second Life Viewer Source Code * Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab * 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 * to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement * ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of * ("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 * the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* *
* There are special exceptions to the terms and conditions of the GPL as * 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 * 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 * in the file doc/FLOSS-exception.txt in this software distribution, or
* online at * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
* http://secondlifegrid.net/programs/open_source/licensing/flossexception *
* * By copying, modifying or distributing this software, you acknowledge
* By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above,
* that you have read and understood your obligations described above, * and agree to abide by those obligations.
* and agree to abide by those obligations. *
* * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE.
* COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$
* $/LicenseInfo$ */
*/
#include "llviewerprecompiledheaders.h" #include "llviewerprecompiledheaders.h"
@@ -58,86 +57,71 @@ class AIHTTPTimeoutPolicy;
extern AIHTTPTimeoutPolicy iamHere_timeout; extern AIHTTPTimeoutPolicy iamHere_timeout;
// static // static
LLFloaterTOS* LLFloaterTOS::sInstance = NULL; LLFloaterTOS* LLFloaterTOS::sInstance = nullptr;
// static // static
LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message) LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message)
{ {
if( !LLFloaterTOS::sInstance ) if (sInstance) sInstance->close();
{ return sInstance = new LLFloaterTOS(type, message);
LLFloaterTOS::sInstance = new LLFloaterTOS(type, message);
}
if (type == TOS_TOS)
{
LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_tos.xml");
}
else
{
LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_critical.xml");
}
return LLFloaterTOS::sInstance;
} }
LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message) LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string& message)
: LLModalDialog( std::string(" "), 100, 100 ), : LLModalDialog(std::string(" "), 100, 100),
mType(type), mType(type),
mMessage(message), mLoadCompleteCount(0)
mLoadCompleteCount( 0 )
{ {
LLUICtrlFactory::getInstance()->buildFloater(this,
mType == TOS_CRITICAL_MESSAGE ? "floater_critical.xml"
: mType == TOS_TOS ? "floater_tos.xml"
: "floater_voice_license.xml");
if (mType == TOS_CRITICAL_MESSAGE)
{
// this displays the critical message
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setHandleEditKeysDirectly(TRUE);
editor->setEnabled(FALSE);
editor->setWordWrap(TRUE);
editor->setFocus(TRUE);
editor->setValue(message);
}
} }
// helper class that trys to download a URL from a web site and calls a method // helper class that trys to download a URL from a web site and calls a method
// on parent class indicating if the web server is working or not // on parent class indicating if the web server is working or not
class LLIamHere : public LLHTTPClient::ResponderWithResult class LLIamHere : public LLHTTPClient::ResponderWithResult
{ {
private: LLIamHere(LLFloaterTOS* parent) : mParent(parent->getDerivedHandle<LLFloaterTOS>()) {}
LLIamHere( LLFloaterTOS* parent ) : LLHandle<LLFloaterTOS> mParent;
mParent( parent )
{}
LLFloaterTOS* mParent; public:
static boost::intrusive_ptr<LLIamHere> build(LLFloaterTOS* parent)
{
return boost::intrusive_ptr<LLIamHere>(new LLIamHere(parent));
}
public: void httpSuccess() override
{
if (!mParent.isDead())
mParent.get()->setSiteIsAlive(true);
}
static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent ) void httpFailure() override
{
if (!mParent.isDead())
{ {
return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) ); // *HACK: For purposes of this alive check, 302 Found
}; // (aka Moved Temporarily) is considered alive. The web site
// redirects this link to a "cache busting" temporary URL. JC
mParent.get()->setSiteIsAlive(mStatus == HTTP_FOUND);
}
}
virtual void setParent( LLFloaterTOS* parentIn ) AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy() const override { return iamHere_timeout; }
{ bool pass_redirect_status() const override { return true; }
mParent = parentIn; char const* getName() const override { return "LLIamHere"; }
};
/*virtual*/ void httpSuccess(void)
{
if ( mParent )
mParent->setSiteIsAlive( true );
};
/*virtual*/ void httpFailure(void)
{
if ( mParent )
{
// *HACK: For purposes of this alive check, 302 Found
// (aka Moved Temporarily) is considered alive. The web site
// redirects this link to a "cache busting" temporary URL. JC
bool alive = (mStatus == HTTP_FOUND);
mParent->setSiteIsAlive( alive );
}
};
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return iamHere_timeout; }
/*virtual*/ bool pass_redirect_status(void) const { return true; }
/*virtual*/ char const* getName(void) const { return "LLIamHere"; }
};
// this is global and not a class member to keep crud out of the header file
namespace {
boost::intrusive_ptr< LLIamHere > gResponsePtr = 0;
}; };
BOOL LLFloaterTOS::postBuild() BOOL LLFloaterTOS::postBuild()
@@ -146,78 +130,60 @@ BOOL LLFloaterTOS::postBuild()
childSetAction("Cancel", onCancel, this); childSetAction("Cancel", onCancel, this);
childSetCommitCallback("agree_chk", updateAgree, this); childSetCommitCallback("agree_chk", updateAgree, this);
if ( mType != TOS_TOS ) if (mType == TOS_CRITICAL_MESSAGE) return TRUE;
{
// this displays the critical message
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setHandleEditKeysDirectly( TRUE );
editor->setEnabled( FALSE );
editor->setWordWrap(TRUE);
editor->setFocus(TRUE);
editor->setValue(LLSD(mMessage));
return TRUE;
}
// disable Agree to TOS radio button until the page has fully loaded // disable Agree to TOS radio button until the page has fully loaded
LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
tos_agreement->setEnabled( false ); tos_agreement->setEnabled(false);
bool voice = mType == TOS_VOICE;
// hide the SL text widget if we're displaying TOS with using a browser widget. // hide the SL text widget if we're displaying TOS with using a browser widget.
LLTextEditor *editor = getChild<LLTextEditor>("tos_text"); getChild<LLTextEditor>(voice ? "license_text" : "tos_text")->setVisible(FALSE);
editor->setVisible( FALSE );
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); if (LLMediaCtrl* web_browser = getChild<LLMediaCtrl>(voice ? "license_html" : "tos_html"))
if ( web_browser )
{ {
// start to observe it so we see navigate complete events
web_browser->addObserver(this); web_browser->addObserver(this);
gResponsePtr = LLIamHere::build( this ); std::string url = getString( "real_url" );
LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); if (!voice || url.substr(0,4) == "http") {
LLHTTPClient::get(url, LLIamHere::build(this));
} else {
setSiteIsAlive(false);
}
} }
return TRUE; return TRUE;
} }
void LLFloaterTOS::setSiteIsAlive( bool alive ) void LLFloaterTOS::setSiteIsAlive(bool alive)
{ {
// only do this for TOS pages // only do this for TOS pages
if ( mType == TOS_TOS ) if (mType != TOS_CRITICAL_MESSAGE)
{ {
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); bool voice = mType == TOS_VOICE;
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>(voice ? "license_html" : "tos_html");
// if the contents of the site was retrieved // if the contents of the site was retrieved
if ( alive ) if (alive)
{ {
if ( web_browser ) if (web_browser)
{ {
// navigate to the "real" page // navigate to the "real" page
web_browser->navigateTo( getString( "real_url" ) ); web_browser->navigateTo(getString("real_url"));
}; }
} }
else else
{ {
if (voice) web_browser->navigateToLocalPage("license", getString("fallback_html"));
// normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads) // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads)
// but if the page is unavailable, we need to do this now // but if the page is unavailable, we need to do this now
LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); getChild<LLCheckBoxCtrl>("agree_chk")->setEnabled(true);
tos_agreement->setEnabled( true ); }
}; }
};
} }
LLFloaterTOS::~LLFloaterTOS() LLFloaterTOS::~LLFloaterTOS()
{ {
sInstance = nullptr;
// tell the responder we're not here anymore
if ( gResponsePtr )
gResponsePtr->setParent( 0 );
LLFloaterTOS::sInstance = NULL;
}
// virtual
void LLFloaterTOS::draw()
{
// draw children
LLModalDialog::draw();
} }
// static // static
@@ -229,11 +195,21 @@ void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata )
} }
// static // static
void LLFloaterTOS::onContinue( void* userdata ) void LLFloaterTOS::onContinue(void* userdata)
{ {
LLFloaterTOS* self = (LLFloaterTOS*) userdata; LLFloaterTOS* self = (LLFloaterTOS*) userdata;
LL_INFOS() << "User agrees with TOS." << LL_ENDL; bool voice = self->mType == TOS_VOICE;
if (self->mType == TOS_TOS) LL_INFOS() << (voice ? "User agreed to the Vivox personal license" : "User agrees with TOS.") << LL_ENDL;
if (voice)
{
// enabling voice by default here seems like the best behavior
gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
gSavedSettings.setBOOL("VivoxLicenseAccepted", TRUE);
// save these settings in case something bad happens later
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
}
else if (self->mType == TOS_TOS)
{ {
gAcceptTOS = TRUE; gAcceptTOS = TRUE;
} }
@@ -242,42 +218,57 @@ void LLFloaterTOS::onContinue( void* userdata )
gAcceptCriticalMessage = TRUE; gAcceptCriticalMessage = TRUE;
} }
auto state = LLStartUp::getStartupState();
// Testing TOS dialog // Testing TOS dialog
#if ! LL_RELEASE_FOR_DOWNLOAD #if !LL_RELEASE_FOR_DOWNLOAD
if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT ) if (!voice && state == STATE_LOGIN_WAIT)
{ {
LLStartUp::setStartupState( STATE_LOGIN_SHOW ); LLStartUp::setStartupState(STATE_LOGIN_SHOW);
} }
else else
#endif #endif
if (!voice || state == STATE_LOGIN_VOICE_LICENSE)
LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication {
LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); // Go back and finish authentication
}
self->close(); // destroys this object self->close(); // destroys this object
} }
// static // static
void LLFloaterTOS::onCancel( void* userdata ) void LLFloaterTOS::onCancel(void* userdata)
{ {
LLFloaterTOS* self = (LLFloaterTOS*) userdata; LLFloaterTOS* self = (LLFloaterTOS*) userdata;
LL_INFOS() << "User disagrees with TOS." << LL_ENDL; if (self->mType == TOS_VOICE)
LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); {
LLStartUp::setStartupState( STATE_LOGIN_SHOW ); LL_INFOS() << "User disagreed with the Vivox personal license" << LL_ENDL;
self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS gSavedSettings.setBOOL("EnableVoiceChat", FALSE);
gSavedSettings.setBOOL("VivoxLicenseAccepted", FALSE);
if (LLStartUp::getStartupState() == STATE_LOGIN_VOICE_LICENSE)
{
LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); // Go back and finish authentication
}
}
else
{
LL_INFOS() << "User disagrees with TOS." << LL_ENDL;
LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
LLStartUp::setStartupState(STATE_LOGIN_SHOW);
}
self->close(); // destroys this object self->close(); // destroys this object
} }
//virtual //virtual
void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event)
{ {
if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) if (event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{ {
// skip past the loading screen navigate complete // skip past the loading screen navigate complete
if ( ++mLoadCompleteCount == 2 ) if (++mLoadCompleteCount == 2)
{ {
LL_INFOS() << "NAVIGATE COMPLETE" << LL_ENDL; LL_INFOS() << "NAVIGATE COMPLETE" << LL_ENDL;
// enable Agree to TOS radio button now that page has loaded // enable Agree to TOS radio button now that page has loaded
LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); getChild<LLCheckBoxCtrl>("agree_chk")->setEnabled(true);
tos_agreement->setEnabled( true );
} }
} }
} }

View File

@@ -24,7 +24,7 @@
* that you have read and understood your obligations described above, * that you have read and understood your obligations described above,
* and agree to abide by those obligations. * and agree to abide by those obligations.
* *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE. * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$ * $/LicenseInfo$
@@ -54,16 +54,14 @@ public:
enum ETOSType enum ETOSType
{ {
TOS_TOS = 0, TOS_TOS = 0,
TOS_CRITICAL_MESSAGE = 1 TOS_CRITICAL_MESSAGE = 1,
TOS_VOICE = 2
}; };
// Asset_id is overwritten with LLUUID::null when agree is clicked. static LLFloaterTOS* show(ETOSType type, const std::string& message = LLStringUtil::null);
static LLFloaterTOS* show(ETOSType type, const std::string & message);
BOOL postBuild(); BOOL postBuild();
virtual void draw();
static void updateAgree( LLUICtrl *, void* userdata ); static void updateAgree( LLUICtrl *, void* userdata );
static void onContinue( void* userdata ); static void onContinue( void* userdata );
static void onCancel( void* userdata ); static void onCancel( void* userdata );
@@ -74,12 +72,9 @@ public:
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
private: private:
// Asset_id is overwritten with LLUUID::null when agree is clicked. LLFloaterTOS(ETOSType type, const std::string& message);
LLFloaterTOS(ETOSType type, const std::string & message);
private:
ETOSType mType; ETOSType mType;
std::string mMessage;
int mLoadCompleteCount; int mLoadCompleteCount;
static LLFloaterTOS* sInstance; static LLFloaterTOS* sInstance;

View File

@@ -585,7 +585,7 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
void LLFolderViewItem::openItem( void ) void LLFolderViewItem::openItem( void )
{ {
if (!mListener) return; if (!mListener) return;
if (mAllowWear || mListener->isItemWearable()) //if (mAllowWear || mListener->isItemWearable()) // Singu Note: This will do nothing if can't do anything, so just call it
{ {
mListener->openItem(); mListener->openItem();
} }

View File

@@ -996,9 +996,9 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
{ {
LLLoadInfo* info = (LLLoadInfo*)user_data; LLLoadInfo* info = (LLLoadInfo*)user_data;
const LLUUID& item_id = info->mItemID; const LLUUID item_id = info->mItemID;
const bool& inform_server = info->mInformServer; const bool inform_server = info->mInformServer;
const bool& deactivate_similar = info->mDeactivateSimilar; const bool deactivate_similar = info->mDeactivateSimilar;
delete info; delete info;
info = nullptr; info = nullptr;

View File

@@ -125,7 +125,7 @@ public:
bool triggerGesture(KEY key, MASK mask); bool triggerGesture(KEY key, MASK mask);
// Trigger all gestures referenced as substrings in this string // Trigger all gestures referenced as substrings in this string
bool triggerAndReviseString(const std::string &str, std::string *revised_string = NULL); bool triggerAndReviseString(const std::string &str, std::string *revised_string = nullptr);
// Does some gesture have this key bound? // Does some gesture have this key bound?
//bool isKeyBound(KEY key, MASK mask) const; //bool isKeyBound(KEY key, MASK mask) const;

View File

@@ -45,6 +45,7 @@
#include "llfloateravatarpicker.h" #include "llfloateravatarpicker.h"
#include "llfloaterchat.h" #include "llfloaterchat.h"
#include "llfloaterinventory.h" #include "llfloaterinventory.h"
#include "llfloaterreporter.h"
#include "llfloaterwebcontent.h" // For web browser display of logs #include "llfloaterwebcontent.h" // For web browser display of logs
#include "llgroupactions.h" #include "llgroupactions.h"
#include "llhttpclient.h" #include "llhttpclient.h"
@@ -294,6 +295,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(
mLogLabel(log_label), mLogLabel(log_label),
mQueuedMsgsForInit(), mQueuedMsgsForInit(),
mOtherParticipantUUID(other_participant_id), mOtherParticipantUUID(other_participant_id),
mInitialTargetIDs(ids),
mDialog(dialog), mDialog(dialog),
mTyping(false), mTyping(false),
mTypingLineStartIndex(0), mTypingLineStartIndex(0),
@@ -574,8 +576,19 @@ BOOL LLFloaterIMPanel::postBuild()
} }
break; break;
case SUPPORT_SESSION: case SUPPORT_SESSION:
getChildView("Support Check")->setVisible(true); {
auto support = getChildView("Support Check");
support->setVisible(true);
auto control = gSavedSettings.getControl(support->getControlName());
if (control->get().asInteger() == -1)
{
LLNotificationsUtil::add("SupportChatShowInfo", LLSD(), LLSD(), [control](const LLSD& p, const LLSD& f)
{
control->set(!LLNotificationsUtil::getSelectedOption(p, f));
});
}
// Singu Note: We could make a button feature for dumping Help->About contents for support, too. // Singu Note: We could make a button feature for dumping Help->About contents for support, too.
}
break; break;
default: default:
break; break;
@@ -1121,7 +1134,7 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
switch (mSessionType) switch (mSessionType)
{ {
case SUPPORT_SESSION: case SUPPORT_SESSION:
case GROUP_SESSION: LLGroupActions::show(mOtherParticipantUUID); return; case GROUP_SESSION: LLGroupActions::show(mSessionUUID); return;
case P2P_SESSION: LLAvatarActions::showProfile(mOtherParticipantUUID); return; case P2P_SESSION: LLAvatarActions::showProfile(mOtherParticipantUUID); return;
default: onClickHistory(); return; // If there's no profile for this type, we should be the history button. default: onClickHistory(); return; // If there's no profile for this type, we should be the history button.
} }
@@ -1138,6 +1151,7 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
case -2: LLAvatarActions::showOnMap(mOtherParticipantUUID); break; case -2: LLAvatarActions::showOnMap(mOtherParticipantUUID); break;
case -3: gAgentCamera.lookAtObject(mOtherParticipantUUID); break; case -3: gAgentCamera.lookAtObject(mOtherParticipantUUID); break;
case -4: onAddButtonClicked(); break; case -4: onAddButtonClicked(); break;
case -5: LLFloaterReporter::showFromAvatar(mOtherParticipantUUID, mLogLabel); break;
default: // Options >= 6 use dynamic items default: // Options >= 6 use dynamic items
{ {
// First remove them all // First remove them all

View File

@@ -148,6 +148,7 @@ protected:
void removeDynamicFocus(); void removeDynamicFocus();
private: private:
friend class LLSpeakerMgr;
// Called by UI methods. // Called by UI methods.
void onSendMsg(); void onSendMsg();
@@ -214,6 +215,7 @@ private:
// inventory folder ==> first target id in list // inventory folder ==> first target id in list
// 911 ==> sender // 911 ==> sender
LLUUID mOtherParticipantUUID; LLUUID mOtherParticipantUUID;
uuid_vec_t mInitialTargetIDs;
EInstantMessage mDialog; EInstantMessage mDialog;

View File

@@ -76,30 +76,41 @@ std::string LLLogChat::cleanFileName(std::string filename)
return filename; return filename;
} }
static void time_format(std::string& out, const char* fmt, const std::tm* time)
{
typedef typename std::vector<char, boost::alignment::aligned_allocator<char, 1>> vec_t;
static thread_local vec_t charvector(1024); // Evolves into charveleon
#define format_the_time() std::strftime(charvector.data(), charvector.capacity(), fmt, time)
const auto smallsize(charvector.capacity());
const auto size = format_the_time();
if (size < 0)
{
LL_ERRS() << "Formatting time failed, code " << size << ". String hint: " << out << '/' << fmt << LL_ENDL;
}
else if (static_cast<vec_t::size_type>(size) >= smallsize) // Resize if we need more space
{
charvector.resize(1+size); // Use the String Stone
format_the_time();
}
out.assign(charvector.data());
}
std::string LLLogChat::timestamp(bool withdate) std::string LLLogChat::timestamp(bool withdate)
{ {
time_t utc_time;
utc_time = time_corrected();
// There's only one internal tm buffer.
struct tm* timep;
// Convert to Pacific, based on server's opinion of whether // Convert to Pacific, based on server's opinion of whether
// it's daylight savings time there. // it's daylight savings time there.
timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); auto time = utc_to_pacific_time(time_corrected(), gPacificDaylightTime);
static LLCachedControl<bool> withseconds("SecondsInLog"); static const LLCachedControl<bool> withseconds("SecondsInLog");
std::string text; static const LLCachedControl<std::string> date("ShortDateFormat");
if (withdate) static const LLCachedControl<std::string> shorttime("ShortTimeFormat");
if (withseconds) static const LLCachedControl<std::string> longtime("LongTimeFormat");
text = llformat("[%d/%02d/%02d %02d:%02d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min, timep->tm_sec); std::string text = "[";
else if (withdate) text += date() + ' ';
text = llformat("[%d/%02d/%02d %02d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min); text += (withseconds ? longtime : shorttime)() + "] ";
else
if (withseconds) time_format(text, text.data(), time);
text = llformat("[%02d:%02d:%02d] ", timep->tm_hour, timep->tm_min, timep->tm_sec);
else
text = llformat("[%02d:%02d] ", timep->tm_hour, timep->tm_min);
return text; return text;
} }

View File

@@ -54,6 +54,7 @@
#include "llviewermenu.h" #include "llviewermenu.h"
// linden library includes // linden library includes
#include "llclipboard.h"
#include "llfocusmgr.h" #include "llfocusmgr.h"
#include "llsdutil.h" #include "llsdutil.h"
#include "lltextbox.h" #include "lltextbox.h"
@@ -397,6 +398,7 @@ void LLMediaCtrl::onFocusLost()
BOOL LLMediaCtrl::postBuild () BOOL LLMediaCtrl::postBuild ()
{ {
/*LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar; /*LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Copy.PageURL", boost::bind(&LLMediaCtrl::onCopyURL, this));
registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this)); registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
registar.add("Open.ViewSource", boost::bind(&LLMediaCtrl::onShowSource, this)); registar.add("Open.ViewSource", boost::bind(&LLMediaCtrl::onShowSource, this));
@@ -414,6 +416,12 @@ BOOL LLMediaCtrl::postBuild ()
return true; return true;
} }
void LLMediaCtrl::onCopyURL() const
{
auto wurl = utf8str_to_wstring(mCurrentNavUrl);
gClipboard.copyFromSubstring(wurl, 0, wurl.size());
}
void LLMediaCtrl::onOpenWebInspector() void LLMediaCtrl::onOpenWebInspector()
{ {
if (mMediaSource && mMediaSource->hasMedia()) if (mMediaSource && mMediaSource->hasMedia())

View File

@@ -168,6 +168,7 @@ public:
// Incoming media event dispatcher // Incoming media event dispatcher
void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override; void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
void onCopyURL() const;
// right click debugging item // right click debugging item
void onOpenWebInspector(); void onOpenWebInspector();
void onShowSource(); void onShowSource();

View File

@@ -205,7 +205,6 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
registerFloater("test", boost::bind(LLFloaterTest::show, (void*)NULL)); registerFloater("test", boost::bind(LLFloaterTest::show, (void*)NULL));
// Phoenix: Wolfspirit: Enabled Show Floater out of viewer menu // Phoenix: Wolfspirit: Enabled Show Floater out of viewer menu
registerFloater("WaterSettings", boost::bind(LLFloaterWater::show), boost::bind(LLFloaterWater::isOpen)); registerFloater("WaterSettings", boost::bind(LLFloaterWater::show), boost::bind(LLFloaterWater::isOpen));
registerFloater("web", boost::bind(LLFloaterWebContent::showInstance, "dict web", LLFloaterWebContent::Params()));
registerFloater("Windlight", boost::bind(LLFloaterWindLight::show), boost::bind(LLFloaterWindLight::isOpen)); registerFloater("Windlight", boost::bind(LLFloaterWindLight::show), boost::bind(LLFloaterWindLight::isOpen));
registerFloater("world map", boost::bind(LLFloaterWorldMap::toggle)); registerFloater("world map", boost::bind(LLFloaterWorldMap::toggle));
registerFloater<LLFloaterLand> ("about land"); registerFloater<LLFloaterLand> ("about land");

View File

@@ -35,6 +35,7 @@
#include "llmimetypes.h" #include "llmimetypes.h"
#include "lltrans.h" #include "lltrans.h"
#include "llxmlnode.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
@@ -84,7 +85,7 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
} }
for (LLXMLNode* node = root->getFirstChild(); for (LLXMLNode* node = root->getFirstChild();
node != NULL; node != nullptr;
node = node->getNextSibling()) node = node->getNextSibling())
{ {
if (node->hasName("defaultlabel")) if (node->hasName("defaultlabel"))
@@ -105,7 +106,7 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
node->getAttributeString("name", mime_type); node->getAttributeString("name", mime_type);
LLMIMEInfo info; LLMIMEInfo info;
for (LLXMLNode* child = node->getFirstChild(); for (LLXMLNode* child = node->getFirstChild();
child != NULL; child != nullptr;
child = child->getNextSibling()) child = child->getNextSibling())
{ {
if (child->hasName("label")) if (child->hasName("label"))
@@ -129,7 +130,7 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
node->getAttributeString("name", set_name); node->getAttributeString("name", set_name);
LLMIMEWidgetSet info; LLMIMEWidgetSet info;
for (LLXMLNode* child = node->getFirstChild(); for (LLXMLNode* child = node->getFirstChild();
child != NULL; child != nullptr;
child = child->getNextSibling()) child = child->getNextSibling())
{ {
if (child->hasName("label")) if (child->hasName("label"))

View File

@@ -33,6 +33,8 @@
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
#include "llcachename.h" #include "llcachename.h"
#include "llagent.h" #include "llagent.h"
#include "llavataractions.h"
#include "llgroupactions.h"
#include "llinventory.h" #include "llinventory.h"
#include "llscrolllistitem.h" #include "llscrolllistitem.h"
#include "llscrolllistcolumn.h" #include "llscrolllistcolumn.h"
@@ -42,11 +44,11 @@
static LLRegisterWidget<LLNameListCtrl> r("name_list"); static LLRegisterWidget<LLNameListCtrl> r("name_list");
void LLNameListCtrl::NameTypeNames::declareValues() void LLNameListItem::NameTypeNames::declareValues()
{ {
declare("INDIVIDUAL", LLNameListCtrl::INDIVIDUAL); declare("INDIVIDUAL", INDIVIDUAL);
declare("GROUP", LLNameListCtrl::GROUP); declare("GROUP", GROUP);
declare("SPECIAL", LLNameListCtrl::SPECIAL); declare("SPECIAL", SPECIAL);
} }
LLNameListCtrl::LLNameListCtrl(const std::string& name, const LLRect& rect, BOOL allow_multiple_selection, BOOL draw_border, bool draw_heading, S32 name_column_index, const std::string& name_system, const std::string& tooltip) LLNameListCtrl::LLNameListCtrl(const std::string& name, const LLRect& rect, BOOL allow_multiple_selection, BOOL draw_border, bool draw_heading, S32 name_column_index, const std::string& name_system, const std::string& tooltip)
@@ -61,16 +63,16 @@ LLNameListCtrl::LLNameListCtrl(const std::string& name, const LLRect& rect, BOOL
// public // public
LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
BOOL enabled, const std::string& suffix) BOOL enabled, const std::string& suffix, const std::string& prefix)
{ {
//LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL; //LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL;
NameItem item; NameItem item;
item.value = agent_id; item.value = agent_id;
item.enabled = enabled; item.enabled = enabled;
item.target = INDIVIDUAL; item.target = LLNameListItem::INDIVIDUAL;
return addNameItemRow(item, pos, suffix); return addNameItemRow(item, pos, suffix, prefix);
} }
// virtual, public // virtual, public
@@ -121,6 +123,24 @@ BOOL LLNameListCtrl::handleDragAndDrop(
return handled; return handled;
} }
BOOL LLNameListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
{
bool handled = LLScrollListCtrl::handleDoubleClick(x, y, mask);
if (!handled)
{
if (auto item = static_cast<LLNameListItem*>(hitItem(x, y)))
{
switch (item->getNameType())
{
case LLNameListItem::INDIVIDUAL: LLAvatarActions::showProfile(item->getValue()); break;
case LLNameListItem::GROUP: LLGroupActions::show(item->getValue()); break;
default: return false;
}
handled = true;
}
}
return handled;
}
// public // public
void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos, void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos,
@@ -129,7 +149,7 @@ void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos,
NameItem item; NameItem item;
item.value = group_id; item.value = group_id;
item.enabled = enabled; item.enabled = enabled;
item.target = GROUP; item.target = LLNameListItem::GROUP;
addNameItemRow(item, pos); addNameItemRow(item, pos);
} }
@@ -137,13 +157,13 @@ void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos,
// public // public
void LLNameListCtrl::addGroupNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos) void LLNameListCtrl::addGroupNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
{ {
item.target = GROUP; item.target = LLNameListItem::GROUP;
addNameItemRow(item, pos); addNameItemRow(item, pos);
} }
LLScrollListItem* LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos) LLScrollListItem* LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition pos)
{ {
item.target = INDIVIDUAL; item.target = LLNameListItem::INDIVIDUAL;
return addNameItemRow(item, pos); return addNameItemRow(item, pos);
} }
@@ -160,10 +180,11 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p
LLScrollListItem* LLNameListCtrl::addNameItemRow( LLScrollListItem* LLNameListCtrl::addNameItemRow(
const LLNameListCtrl::NameItem& name_item, const LLNameListCtrl::NameItem& name_item,
EAddPosition pos, EAddPosition pos,
const std::string& suffix) const std::string& suffix,
const std::string& prefix)
{ {
LLUUID id = name_item.value().asUUID(); LLUUID id = name_item.value().asUUID();
LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP); LLNameListItem* item = new LLNameListItem(name_item);
if (!item) return NULL; if (!item) return NULL;
@@ -173,14 +194,25 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
std::string fullname = name_item.name; std::string fullname = name_item.name;
switch(name_item.target) switch(name_item.target)
{ {
case GROUP: case LLNameListItem::GROUP:
gCacheName->getGroupName(id, fullname); if (!gCacheName->getGroupName(id, fullname))
// fullname will be "nobody" if group not found {
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(id);
if (it != mAvatarNameCacheConnections.end())
{
if (it->second.connected())
{
it->second.disconnect();
}
mAvatarNameCacheConnections.erase(it);
}
mAvatarNameCacheConnections[id] = gCacheName->getGroup(id, boost::bind(&LLNameListCtrl::onGroupNameCache, this, _1, _2, item->getHandle()));
}
break; break;
case SPECIAL: case LLNameListItem::SPECIAL:
// just use supplied name // just use supplied name
break; break;
case INDIVIDUAL: case LLNameListItem::INDIVIDUAL:
{ {
LLAvatarName av_name; LLAvatarName av_name;
if (id.isNull()) if (id.isNull())
@@ -203,12 +235,12 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
} }
mAvatarNameCacheConnections.erase(it); mAvatarNameCacheConnections.erase(it);
} }
mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle())); mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, prefix, item->getHandle()));
if (mPendingLookupsRemaining <= 0) if (mPendingLookupsRemaining <= 0)
{ {
// BAKER TODO: // BAKER TODO:
// We might get into a state where mPendingLookupsRemainig might // We might get into a state where mPendingLookupsRemaining might
// go negative. So just reset it right now and figure out if it's // go negative. So just reset it right now and figure out if it's
// possible later :) // possible later :)
mPendingLookupsRemaining = 0; mPendingLookupsRemaining = 0;
@@ -231,7 +263,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
LLScrollListCell* cell = item->getColumn(mNameColumnIndex); LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
if (cell) if (cell)
{ {
cell->setValue(fullname); cell->setValue(prefix + fullname);
} }
dirtyColumns(); dirtyColumns();
@@ -271,9 +303,24 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
} }
} }
// public
LLScrollListItem* LLNameListCtrl::getNameItemByAgentId(const LLUUID& agent_id)
{
for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++)
{
LLScrollListItem* item = *it;
if (item && item->getUUID() == agent_id)
{
return item;
}
}
return NULL;
}
void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name, const LLAvatarName& av_name,
std::string suffix, std::string suffix,
std::string prefix,
LLHandle<LLNameListItem> item) LLHandle<LLNameListItem> item)
{ {
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id); avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id);
@@ -295,6 +342,11 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
name.append(suffix); name.append(suffix);
} }
if (!prefix.empty())
{
name.insert(0, prefix);
}
LLNameListItem* list_item = item.get(); LLNameListItem* list_item = item.get();
if (list_item && list_item->getUUID() == agent_id) if (list_item && list_item->getUUID() == agent_id)
{ {
@@ -326,6 +378,33 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
dirtyColumns(); dirtyColumns();
} }
void LLNameListCtrl::onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle<LLNameListItem> item)
{
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(group_id);
if (it != mAvatarNameCacheConnections.end())
{
if (it->second.connected())
{
it->second.disconnect();
}
mAvatarNameCacheConnections.erase(it);
}
LLNameListItem* list_item = item.get();
if (list_item && list_item->getUUID() == group_id)
{
LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex);
if (cell)
{
cell->setValue(name);
setNeedsSort();
}
}
dirtyColumns();
}
void LLNameListCtrl::sortByName(BOOL ascending) void LLNameListCtrl::sortByName(BOOL ascending)
{ {
sortByColumnIndex(mNameColumnIndex,ascending); sortByColumnIndex(mNameColumnIndex,ascending);

View File

@@ -42,24 +42,47 @@ class LLAvatarName;
class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem> class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem>
{ {
public: public:
bool isGroup() const { return mIsGroup; } enum ENameType
void setIsGroup(bool is_group) { mIsGroup = is_group; } {
INDIVIDUAL,
GROUP,
SPECIAL
};
// provide names for enums
struct NameTypeNames : public LLInitParam::TypeValuesHelper<ENameType, NameTypeNames>
{
static void declareValues();
};
struct Params : public LLInitParam::Block<Params, LLScrollListItem::Params>
{
Optional<std::string> name;
Optional<ENameType, NameTypeNames> target;
Params()
: name("name"),
target("target", INDIVIDUAL)
{}
};
ENameType getNameType() const { return mNameType; }
void setNameType(ENameType name_type) { mNameType = name_type; }
protected: protected:
friend class LLNameListCtrl; friend class LLNameListCtrl;
LLNameListItem( const LLScrollListItem::Params& p ) LLNameListItem( const Params& p )
: LLScrollListItem(p), mIsGroup(false) : LLScrollListItem(p), mNameType(p.target)
{ {
} }
LLNameListItem( const LLScrollListItem::Params& p, bool is_group ) LLNameListItem( const LLScrollListItem::Params& p, ENameType name_type)
: LLScrollListItem(p), mIsGroup(is_group) : LLScrollListItem(p), mNameType(name_type)
{ {
} }
private: private:
bool mIsGroup; ENameType mNameType;
}; };
@@ -68,30 +91,7 @@ class LLNameListCtrl
{ {
public: public:
typedef boost::signals2::signal<void(bool)> namelist_complete_signal_t; typedef boost::signals2::signal<void(bool)> namelist_complete_signal_t;
typedef LLNameListItem::Params NameItem;
typedef enum e_name_type
{
INDIVIDUAL,
GROUP,
SPECIAL
} ENameType;
// provide names for enums
struct NameTypeNames : public LLInitParam::TypeValuesHelper<LLNameListCtrl::ENameType, NameTypeNames>
{
static void declareValues();
};
struct NameItem : public LLInitParam::Block<NameItem, LLScrollListItem::Params>
{
Optional<std::string> name;
Optional<ENameType, NameTypeNames> target;
NameItem()
: name("name"),
target("target", INDIVIDUAL)
{}
};
struct NameColumn : public LLInitParam::ChoiceBlock<NameColumn> struct NameColumn : public LLInitParam::ChoiceBlock<NameColumn>
{ {
@@ -124,11 +124,12 @@ public:
// Add a user to the list by name. It will be added, the name // Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary. // requested from the cache, and updated as necessary.
LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null);
LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null,
const std::string& prefix = LLStringUtil::null);
// Add a user to the list by name. It will be added, the name // Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary. // requested from the cache, and updated as necessary.
@@ -139,17 +140,21 @@ public:
void removeNameItem(const LLUUID& agent_id); void removeNameItem(const LLUUID& agent_id);
LLScrollListItem* getNameItemByAgentId(const LLUUID& agent_id);
// LLView interface // LLView interface
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data, BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept, EAcceptance *accept,
std::string& tooltip_msg); std::string& tooltip_msg);
BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; }
void sortByName(BOOL ascending); void sortByName(BOOL ascending);
private: private:
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, LLHandle<LLNameListItem> item); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, std::string prefix, LLHandle<LLNameListItem> item);
void onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle<LLNameListItem> item);
private: private:
S32 mNameColumnIndex; S32 mNameColumnIndex;

View File

@@ -186,7 +186,12 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType
args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(pAvatarData); args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(pAvatarData);
args["[AGEVERIFICATION]"] = LLStringUtil::null; args["[AGEVERIFICATION]"] = LLStringUtil::null;
getChild<LLUICtrl>("acct")->setValue(getString("CaptionTextAcctInfo", args)); {
const auto account_info = getString("CaptionTextAcctInfo", args);
auto acct = getChild<LLUICtrl>("acct");
acct->setValue(account_info);
acct->setToolTip(account_info);
}
getChild<LLTextureCtrl>("img")->setImageAssetID(pAvatarData->image_id); getChild<LLTextureCtrl>("img")->setImageAssetID(pAvatarData->image_id);
@@ -194,11 +199,16 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType
{ {
using namespace boost::gregorian; using namespace boost::gregorian;
int year, month, day; int year, month, day;
sscanf(pAvatarData->born_on.c_str(),"%d/%d/%d", &month, &day, &year); const auto& born = pAvatarData->born_on;
date birthday(year, month, day), today(day_clock::local_day()); if (!born.empty() && sscanf(born.c_str(),"%d/%d/%d", &month, &day, &year) == 3 // Make sure input is valid
std::ostringstream born_on; && month > 0 && month <= 12 && day > 0 && day <= 31 && year >= 1400) // Don't use numbers that gregorian will choke on
born_on << pAvatarData->born_on << " (" << today - birthday << ')'; {
childSetValue("born", born_on.str()); date birthday(year, month, day), today(day_clock::local_day());
std::ostringstream born_on;
born_on << pAvatarData->born_on << " (" << today - birthday << ')';
childSetValue("born", born_on.str());
}
else childSetValue("born", born);
} }
bool allow_publish = (pAvatarData->flags & AVATAR_ALLOW_PUBLISH); bool allow_publish = (pAvatarData->flags & AVATAR_ALLOW_PUBLISH);

View File

@@ -43,7 +43,6 @@
#include "llcheckboxctrl.h" #include "llcheckboxctrl.h"
#include "llcombobox.h" #include "llcombobox.h"
#include "lldbstrings.h" #include "lldbstrings.h"
#include "llavataractions.h"
#include "llgroupactions.h" #include "llgroupactions.h"
#include "llimview.h" #include "llimview.h"
#include "lllineeditor.h" #include "lllineeditor.h"
@@ -159,10 +158,6 @@ BOOL LLPanelGroupGeneral::postBuild()
mFounderName = getChild<LLNameBox>("founder_name"); mFounderName = getChild<LLNameBox>("founder_name");
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse); mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
if (mListVisibleMembers)
{
mListVisibleMembers->setDoubleClickCallback(boost::bind(LLAvatarActions::showProfile, boost::bind(&LLScrollListCtrl::getCurrentID, mListVisibleMembers), false));
}
// Options // Options
mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse); mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);

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