diff options
1763 files changed, 21123 insertions, 19666 deletions
diff --git a/.github/labeler.yaml b/.github/labeler.yaml index 5a6590d4aa..6359419ba6 100644 --- a/.github/labeler.yaml +++ b/.github/labeler.yaml @@ -1,81 +1,109 @@ llappearance: - - indra/llappearance/**/* +- changed-files: + - any-glob-to-any-file: indra/llappearance/** llaudio: - - indra/llaudio/**/* +- changed-files: + - any-glob-to-any-file: indra/llaudio/** llcharacter: - - indra/llcharacter/**/* +- changed-files: + - any-glob-to-any-file: indra/llcharacter/** llcommon: - - indra/llcommon/**/* +- changed-files: + - any-glob-to-any-file: indra/llcommon/** llcorehttp: - - indra/llcorehttp/**/* +- changed-files: + - any-glob-to-any-file: indra/llcorehttp/** llcrashlogger: - - indra/llcrashlogger/**/* +- changed-files: + - any-glob-to-any-file: indra/llcrashlogger/** llfilesystem: - - indra/llfilesystem/**/* +- changed-files: + - any-glob-to-any-file: indra/llfilesystem/** llimage: - - indra/llimage/**/* +- changed-files: + - any-glob-to-any-file: indra/llimage/** llimagej2coj: - - indra/llimagej2coj/**/* +- changed-files: + - any-glob-to-any-file: indra/llimagej2coj/** llinventory: - - indra/llinventory/**/* +- changed-files: + - any-glob-to-any-file: indra/llinventory/** llkdu: - - indra/llkdu/**/* +- changed-files: + - any-glob-to-any-file: indra/llkdu/** llmath: - - indra/llmath/**/* +- changed-files: + - any-glob-to-any-file: indra/llmath/** llmeshoptimizer: - - indra/llmeshoptimizer/**/* +- changed-files: + - any-glob-to-any-file: indra/llmeshoptimizer/** llmessage: - - indra/llmessage/**/* +- changed-files: + - any-glob-to-any-file: indra/llmessage/** llplugin: - - indra/llplugin/**/* +- changed-files: + - any-glob-to-any-file: indra/llplugin/** llprimitive: - - indra/llprimitive/**/* +- changed-files: + - any-glob-to-any-file: indra/llprimitive/** llrender: - - indra/llrender/**/* +- changed-files: + - any-glob-to-any-file: indra/llrender/** llui: - - indra/llui/**/* +- changed-files: + - any-glob-to-any-file: indra/llui/** llwindow: - - indra/llwindow/**/* +- changed-files: + - any-glob-to-any-file: indra/llwindow/** llxml: - - indra/llxml/**/* +- changed-files: + - any-glob-to-any-file: indra/llxml/** cmake: - - '**/*.cmake' - - '**/*/cmake/*' - - '**/CMakeLists.txt' +- changed-files: + - any-glob-to-any-file: + - '**/*.cmake' + - '**/*/cmake/*' + - '**/CMakeLists.txt' python: - - '**/*.py' +- changed-files: + - any-glob-to-any-file: '**/*.py' c/cpp: - - '**/*.c' - - '**/*.cpp' - - '**/*.cxx' - - '**/*.h' - - '**/*.hpp' - - '**/*.hxx' - - '**/*.i' - - '**/*.inl' - - '**/*.y' +- changed-files: + - any-glob-to-any-file: + - '**/*.c' + - '**/*.cpp' + - '**/*.cxx' + - '**/*.h' + - '**/*.hpp' + - '**/*.hxx' + - '**/*.i' + - '**/*.inl' + - '**/*.y' -'team:viewer': - - '*' +objc: +- changed-files: + - any-glob-to-any-file: + - '**/*.m' + - '**/*.mm' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c948e5586..84c05dacdf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,14 @@ name: Build on: workflow_dispatch: + inputs: + installer_type: + description: 'Windows installer type' + type: choice + options: + - velopack + - nsis + default: 'velopack' pull_request: push: branches: ["main", "release/*", "project/*"] @@ -53,6 +61,20 @@ jobs: relnotes: ${{ steps.which-branch.outputs.relnotes }} imagename: ${{ steps.build.outputs.imagename }} configuration: ${{ matrix.configuration }} + # Windows Velopack outputs (passed to sign-pkg-windows) + velopack_pack_id: ${{ steps.build.outputs.velopack_pack_id }} + velopack_pack_version: ${{ steps.build.outputs.velopack_pack_version }} + velopack_pack_title: ${{ steps.build.outputs.velopack_pack_title }} + velopack_main_exe: ${{ steps.build.outputs.velopack_main_exe }} + velopack_exclude: ${{ steps.build.outputs.velopack_exclude }} + velopack_icon: ${{ steps.build.outputs.velopack_icon }} + velopack_installer_base: ${{ steps.build.outputs.velopack_installer_base }} + # macOS Velopack outputs (passed to sign-pkg-mac) + velopack_mac_pack_id: ${{ steps.build.outputs.velopack_mac_pack_id }} + velopack_mac_pack_version: ${{ steps.build.outputs.velopack_mac_pack_version }} + velopack_mac_pack_title: ${{ steps.build.outputs.velopack_mac_pack_title }} + velopack_mac_main_exe: ${{ steps.build.outputs.velopack_mac_main_exe }} + velopack_mac_bundle_id: ${{ steps.build.outputs.velopack_mac_bundle_id }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -84,25 +106,27 @@ jobs: # Only set variants to the one configuration: don't let build.sh loop # over variants, let GitHub distribute variants over multiple hosts. variants: ${{ matrix.configuration }} + # Pass USE_VELOPACK to CMake when using Velopack installer (default) - Windows and macOS + autobuild_configure_parameters: ${{ (contains(matrix.runner, 'windows') || contains(matrix.runner, 'macos')) && (github.event.inputs.installer_type || 'velopack') == 'velopack' && '-- -DUSE_VELOPACK:BOOL=ON' || '' }} steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Setup python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" - name: Checkout build variables - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: repository: secondlife/build-variables ref: master path: .build-variables - name: Checkout master-message-template - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: repository: secondlife/master-message-template path: .master-message-template @@ -112,7 +136,7 @@ jobs: - name: Cache autobuild packages id: cache-installables - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: .autobuild-installables key: ${{ runner.os }}-64-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} @@ -126,6 +150,17 @@ jobs: with: token: ${{ github.token }} + - name: Setup .NET for Velopack + if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack' + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Install Velopack CLI + if: (runner.os == 'Windows' || runner.os == 'macOS') && (github.event.inputs.installer_type || 'velopack') == 'velopack' + shell: bash + run: dotnet tool install -g vpk + - name: Build id: build shell: bash @@ -265,7 +300,7 @@ jobs: - name: Upload executable if: steps.build.outputs.viewer_app - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: "${{ steps.build.outputs.artifact }}-app" path: | @@ -275,13 +310,13 @@ jobs: # artifact for that too. - name: Upload symbol file if: steps.build.outputs.symbolfile - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: "${{ steps.build.outputs.artifact }}-symbols" path: ${{ steps.build.outputs.symbolfile }} - name: Upload metadata - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: "${{ steps.build.outputs.artifact }}-metadata" # emitted by build.sh, possibly multiple lines @@ -289,7 +324,7 @@ jobs: ${{ steps.build.outputs.metadata }} - name: Upload physics package - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 # should only be set for viewer-private if: matrix.configuration == 'Release' && steps.build.outputs.physicstpv with: @@ -310,13 +345,21 @@ jobs: steps: - name: Sign and package Windows viewer if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID - uses: secondlife/viewer-build-util/sign-pkg-windows@v2.0.4 + uses: secondlife/viewer-build-util/sign-pkg-windows@v2.1.0 with: vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}" cert_name: "${{ env.AZURE_CERT_NAME }}" client_id: "${{ env.AZURE_CLIENT_ID }}" client_secret: "${{ env.AZURE_CLIENT_SECRET }}" tenant_id: "${{ env.AZURE_TENANT_ID }}" + installer_type: "${{ github.event.inputs.installer_type || 'velopack' }}" + velopack_pack_id: "${{ needs.build.outputs.velopack_pack_id }}" + velopack_pack_version: "${{ needs.build.outputs.velopack_pack_version }}" + velopack_pack_title: "${{ needs.build.outputs.velopack_pack_title }}" + velopack_main_exe: "${{ needs.build.outputs.velopack_main_exe }}" + velopack_exclude: "${{ needs.build.outputs.velopack_exclude }}" + velopack_icon: "${{ needs.build.outputs.velopack_icon }}" + velopack_installer_base: "${{ needs.build.outputs.velopack_installer_base }}" sign-and-package-mac: env: @@ -349,7 +392,7 @@ jobs: - name: Sign and package Mac viewer if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team - uses: secondlife/viewer-build-util/sign-pkg-mac@v2 + uses: secondlife/viewer-build-util/sign-pkg-mac@v2.1.0 with: channel: ${{ needs.build.outputs.viewer_channel }} imagename: ${{ needs.build.outputs.imagename }} @@ -359,80 +402,95 @@ jobs: note_user: ${{ steps.note-creds.outputs.note_user }} note_pass: ${{ steps.note-creds.outputs.note_pass }} note_team: ${{ steps.note-creds.outputs.note_team }} + velopack_pack_id: "${{ needs.build.outputs.velopack_mac_pack_id }}" + velopack_pack_version: "${{ needs.build.outputs.velopack_mac_pack_version }}" + velopack_pack_title: "${{ needs.build.outputs.velopack_mac_pack_title }}" + velopack_main_exe: "${{ needs.build.outputs.velopack_mac_main_exe }}" + velopack_bundle_id: "${{ needs.build.outputs.velopack_mac_bundle_id }}" post-windows-symbols: env: - BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} - BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} + BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}" + SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}" + SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}" needs: build if: needs.build.outputs.configuration == 'Release' runs-on: ubuntu-latest steps: - name: Download viewer exe - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: Windows-app path: _artifacts - name: Download Windows Symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: actions/download-artifact@v4 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: actions/download-artifact@v7 with: name: Windows-symbols - name: Extract viewer pdb - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID shell: bash run: | tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife-3p/symbol-upload@v10 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8 with: - username: ${{ env.BUGSPLAT_USER }} - password: ${{ env.BUGSPLAT_PASS }} - database: "SecondLife_Viewer_2018" + clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}" + clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}" + database: "${{ env.BUGSPLAT_DATABASE }}" application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} directory: _artifacts files: "**/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}" + node-version: "22" + dumpSyms: false post-mac-symbols: env: - BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} - BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} + BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}" + SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}" + SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}" needs: build if: needs.build.outputs.configuration == 'Release' runs-on: ubuntu-latest steps: - name: Download Mac Symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: actions/download-artifact@v4 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: actions/download-artifact@v7 with: name: macOS-symbols - name: Post Mac symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife-3p/symbol-upload@v10 + if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID + uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8 with: - username: ${{ env.BUGSPLAT_USER }} - password: ${{ env.BUGSPLAT_PASS }} - database: "SecondLife_Viewer_2018" + clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}" + clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}" + database: "${{ env.BUGSPLAT_DATABASE }}" application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }}) directory: . files: "**/*.xcarchive.zip" + node-version: "22" + dumpSyms: false release: needs: [setup, build, sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest if: needs.setup.outputs.release_run steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: pattern: "*-installer" - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: pattern: "*-metadata" + - uses: actions/download-artifact@v4 + with: + pattern: "*-releases" + - name: Rename metadata run: | cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml @@ -458,12 +516,14 @@ jobs: generate_release_notes: true target_commitish: ${{ github.sha }} append_body: true - fail_on_unmatched_files: true + fail_on_unmatched_files: false files: | macOS-installer/*.dmg Windows-installer/*.exe *-autobuild-package.xml *-viewer_version.txt + Windows-releases/* + macOS-releases/* - name: post release URL run: | diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index a5cee9157c..08e907e83f 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check PR description - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const description = context.payload.pull_request.body || ''; diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index 627ba512c4..800f3c42d1 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -23,4 +23,4 @@ jobs: path-to-signatures: signatures.json remote-organization-name: secondlife remote-repository-name: cla-signatures - allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye + allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye,signal@lindenlab.com,dependabot*,bot* diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 6e41d8aa2d..218327ef47 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -9,7 +9,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v6 with: configuration-path: .github/labeler.yaml repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 726e1cd889..93bcafdea8 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -11,8 +11,8 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: 3.x - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index f77151a815..edfe71b693 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -12,7 +12,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v6 + - uses: actions/stale@v10 id: stale with: stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 24ee2de794..0f826222a0 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -21,7 +21,9 @@ on: project: description: "Project Name (used for channel name in project builds, and tag name for all builds)" default: "hippo" - # TODO - add an input for selecting another sha to build other than head of branch + tag_override: + description: "Override the tag name (optional). If the tag already exists, a numeric suffix is appended." + required: false jobs: tag-release: @@ -34,8 +36,8 @@ jobs: NIGHTLY_DATE=$(date --rfc-3339=date) echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV} echo TAG_ID="$(echo ${{ github.sha }} | cut -c1-8)-${{ inputs.project || '${NIGHTLY_DATE}' }}" >> ${GITHUB_ENV} - - name: Update Tag - uses: actions/github-script@v7.0.1 + - name: Create Tag + uses: actions/github-script@v8 with: # use a real access token instead of GITHUB_TOKEN default. # required so that the results of this tag creation can trigger the build workflow @@ -44,9 +46,27 @@ jobs: # this token will need to be renewed anually in January github-token: ${{ secrets.LL_TAG_RELEASE_TOKEN }} script: | - github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: "refs/tags/${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}", - sha: context.sha - }) + const override = `${{ inputs.tag_override }}`.trim(); + const baseTag = override || `${{ env.VIEWER_CHANNEL }}#${{ env.TAG_ID }}`; + + // Try the base tag first, then append -2, -3, etc. if it already exists + let tag = baseTag; + for (let attempt = 1; ; attempt++) { + try { + await github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: `refs/tags/${tag}`, + sha: context.sha + }); + core.info(`Created tag: ${tag}`); + break; + } catch (e) { + if (e.status === 422 && attempt < 10) { + core.info(`Tag '${tag}' already exists, trying next suffix...`); + tag = `${baseTag}-${attempt + 1}`; + } else { + throw e; + } + } + } @@ -19,18 +19,9 @@ $ cd build-`uname -s|tr '[:upper:]' '[:lower:]'`-`uname -m` ### Arch ``` -$ sudo pacman -S cmake base-devel python apr-util boost fltk glm glu hunspell minizip nanosvg libnghttp2 openjpeg2 libpipewire sdl2 vlc libvorbis xxhash +$ sudo pacman -S cmake base-devel python freealut apr-util boost fltk glm glu hunspell minizip nanosvg libnghttp2 openjpeg2 libpipewire sdl2 vlc libvorbis xxhash $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" -``` -build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`) -``` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_INSTALL_PREFIX=/usr ../indra -``` -OR, use openal audio: (currently breaks CEF) -``` $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_INSTALL_PREFIX=/usr ../indra -``` -``` $ make -j`nproc` $ makepkg -R $ sudo pacman -U megapahit-`cat newview/viewer_version.txt|sed 's/\(.*\)\./\1-/'`-`uname -m`.pkg.tar.zst @@ -40,9 +31,9 @@ $ megapahit ### Debian amd64 ``` -$ sudo apt install cmake pkg-config libxml2-utils libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.4-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libopenjp2-7-dev libpipewire-0.3-dev libpng-dev libsdl2-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev +$ sudo apt install cmake pkg-config libxml2-utils libalut-dev libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.4-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libopenjp2-7-dev libpipewire-0.3-dev libpng-dev libsdl2-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra +$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra $ make -j`nproc` $ cpack -G DEB $ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb @@ -64,18 +55,9 @@ $ megapahit ### Fedora ``` -$ sudo dnf install cmake gcc-c++ patch patchelf rpm-build perl-FindBin apr-util-devel boost-devel boost-url expat-devel fltk-devel glm-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel v-hacd-devel vlc-devel libvorbis-devel libXcursor-devel libXfixes-devel libXinerama-devel xxhash-devel +$ sudo dnf install cmake gcc-c++ patch patchelf rpm-build perl-FindBin freealut-devel apr-util-devel boost-devel boost-url expat-devel fltk-devel glm-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel sdl2-compat-devel v-hacd-devel vlc-devel libvorbis-devel libXcursor-devel libXfixes-devel libXinerama-devel xxhash-devel $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" -``` -build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`) -``` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -OR, use openal audio: (currently breaks CEF) -``` $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -``` $ make -j`nproc` $ cpack -G RPM $ sudo dnf install megapahit-`cat newview/viewer_version.txt`-Linux.rpm @@ -128,18 +110,12 @@ $ open newview/Megapahit.app ### openSUSE Tumbleweed ``` -$ sudo zypper install cmake gcc-c++ patch patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_90_0 libboost_url1_90_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_thread-devel libpng16-devel libxml++-devel libexpat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel rpm-build +$ sudo zypper install cmake gcc-c++ patch patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_91_0 libboost_url1_91_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_thread-devel libpng16-devel libxml++-devel libexpat-devel fltk-devel glm glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel rpm-build + $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" -``` -build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`) -``` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -OR, use openal audio: (currently breaks CEF) -``` + $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -``` + $ make -j`nproc` $ cpack -G RPM $ rpm --addsign megapahit-`cat newview/viewer_version.txt`-Linux.rpm (Set up pgp public key first) @@ -150,18 +126,9 @@ $ megapahit ### Ubuntu ``` -$ sudo apt install cmake pkg-config libxml2-utils libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libpng-dev libsdl2-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev +$ sudo apt install cmake pkg-config libxml2-utils libalut-dev libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.4-dev libfontconfig-dev libfreetype-dev libglm-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libopenjp2-7-dev libpipewire-0.3-dev libpng-dev libsdl2-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev $ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1" -``` -build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`) -``` -$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -OR, use openal audio: (currently breaks CEF) -``` $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra -``` -``` $ make -j`nproc` $ cpack -G DEB $ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb @@ -173,10 +140,10 @@ $ megapahit $ vcpkg install python3 freealut apr-util boost curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash $ vcpkg install --allow-unsupported boost-fiber $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /Zc:preprocessor" -$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.31.10-windows/cmake-3.31.10-windows-arm64/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH" -$ export PYTHON="$VCPKG_ROOT/installed/arm64-windows/tools/python3/python.exe" +$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.3.2-windows/cmake-4.3.2-windows-arm64/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH" +$ export PYTHON="$VCPKG_ROOT/installed/arm64-windows/tools/python3" $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra -$ MSBuild.exe Megapahit.sln -p:Configuration=Release +$ MSBuild.exe Megapahit.slnx -p:Configuration=Release $ cpack -G NSIS $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe ``` @@ -185,10 +152,10 @@ $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe ``` $ vcpkg install python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nanosvg nghttp2 openjpeg libvorbis libxml2[tools] xxhash $ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602" -$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.31.10-windows/cmake-3.31.10-windows-x86_64/bin:$VCPKG_ROOT/installed/x64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH" -$ export PYTHON="$VCPKG_ROOT/installed/x64-windows/tools/python3/python.exe" +$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-4.3.2-windows/cmake-4.3.2-windows-x86_64/bin:$VCPKG_ROOT/installed/x64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/MSBuild/Current/Bin:$PATH" +$ export PYTHON="$VCPKG_ROOT/installed/x64-windows/tools/python3" $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=Megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra -$ MSBuild.exe Megapahit.sln -p:Configuration=Release +$ MSBuild.exe Megapahit.slnx -p:Configuration=Release $ cpack -G NSIS $ start Megapahit-`cat newview/viewer_version.txt`-win64.exe ``` diff --git a/autobuild.xml b/autobuild.xml index a14d477234..357ec9f952 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -78,11 +78,11 @@ <key>archive</key> <map> <key>hash</key> - <string>a21487f4e3a68721fd97edef117795a1b7212a77</string> + <string>3f8e58fe74e144b771858e89a5514bf354964c76</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r1/apr_suite-1.7.5-12259255574-darwin64-12259255574.tar.zst</string> + <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r2/apr_suite-1.7.5-18696779749-darwin64-18696779749.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -92,11 +92,11 @@ <key>archive</key> <map> <key>hash</key> - <string>45baf82d3366734e542a2a3749f495b64f5513b4</string> + <string>df36114eb8fb66fdcbb190011222a7d336791d98</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r1/apr_suite-1.7.5-12259255574-linux64-12259255574.tar.zst</string> + <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r2/apr_suite-1.7.5-18696779749-linux64-18696779749.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -106,11 +106,11 @@ <key>archive</key> <map> <key>hash</key> - <string>bdd35d3b9580d3cdcb98afae639936aaa40e24c4</string> + <string>164705831819d247753c9fd608c2c1ac8dca1883</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r1/apr_suite-1.7.5-12259255574-windows64-12259255574.tar.zst</string> + <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.5-r2/apr_suite-1.7.5-18696779749-windows64-18696779749.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -123,7 +123,7 @@ <key>copyright</key> <string>Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</string> <key>version</key> - <string>1.7.5-12259255574</string> + <string>1.7.5-18696779749</string> <key>name</key> <string>apr_suite</string> <key>description</key> @@ -138,11 +138,11 @@ <key>archive</key> <map> <key>hash</key> - <string>a4553df5b8fde2e9cd54ebb94c6efb8eb5fe3c38</string> + <string>61cc299413a32350175cf7139f64388d3d096ec7</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-boost/releases/download/v1.86.0-be1a669/boost-1.86-darwin64-13246092114.tar.zst</string> + <string>https://github.com/secondlife/3p-boost/releases/download/v1.90.0-c7a9feb/boost-1.90-darwin64-20977261894.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -152,11 +152,11 @@ <key>archive</key> <map> <key>hash</key> - <string>4a2a19dc5cb555e157ad894ba917f5a83a35b20d</string> + <string>6b93e323284bfab8ec20a7f3bc740c6915980bf8</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-boost/releases/download/v1.86.0-be1a669/boost-1.86-linux64-13246092114.tar.zst</string> + <string>https://github.com/secondlife/3p-boost/releases/download/v1.90.0-c7a9feb/boost-1.90-linux64-20977261894.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -166,11 +166,11 @@ <key>archive</key> <map> <key>hash</key> - <string>8a1fa9366bfe49009286e4805d7aaedb7c3df82e</string> + <string>c543437ca30a63dcd2538fffa89a43ef43f625fb</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-boost/releases/download/v1.86.0-be1a669/boost-1.86-windows64-13246092114.tar.zst</string> + <string>https://github.com/secondlife/3p-boost/releases/download/v1.90.0-c7a9feb/boost-1.90-windows64-20977261894.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -183,7 +183,7 @@ <key>copyright</key> <string>(see individual source files)</string> <key>version</key> - <string>1.86</string> + <string>1.90.0-c7a9feb</string> <key>name</key> <string>boost</string> <key>description</key> @@ -198,11 +198,11 @@ <key>archive</key> <map> <key>hash</key> - <string>cd1f1d55a2488657ec2253774b3a414621f81b24</string> + <string>9bcafdd7e1df6b92096fa850627d4f3437630d4a</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-bugsplat/releases/download/v1.1.5-71fc41e/bugsplat-1.1.1-9599607655-darwin64-9599607655.tar.zst</string> + <string>https://github.com/secondlife/3p-bugsplat/releases/download/v1.2.6-a475cbb/bugsplat-1.2.6-19430122611-darwin64-19430122611.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -212,11 +212,11 @@ <key>archive</key> <map> <key>hash</key> - <string>9fb0615d17988bd89a2e5ae6d4d19e150afb54a9</string> + <string>4e9f0c1cdbc1cebf6185ecc45228ced7f9af1532</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-bugsplat/releases/download/v1.1.5-71fc41e/bugsplat-5.0.1.0-9599607655-windows64-9599607655.tar.zst</string> + <string>https://github.com/secondlife/3p-bugsplat/releases/download/v1.2.6-a475cbb/bugsplat-6.1.1.0-19430122611-windows64-19430122611.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -244,11 +244,11 @@ <key>archive</key> <map> <key>hash</key> - <string>bf2fe4e8272e990bc8687b3b37bf4bb2b2ad6eb4</string> + <string>9710f82a237b95aaafbbcf708b89f6015b80d85f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r10/colladadom-2.3.0-r10-darwin64-13259816660.tar.zst</string> + <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r11/colladadom-2.3.0-r11-darwin64-20980076767.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -258,11 +258,11 @@ <key>archive</key> <map> <key>hash</key> - <string>118e509ca464182ef4b94ee8c4aa5b14a6c52a94</string> + <string>6a1725b1bc13634eb4dd872a4f83c3f16497475f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r10/colladadom-2.3.0-r10-linux64-13259816660.tar.zst</string> + <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r11/colladadom-2.3.0-r11-linux64-20980076767.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -272,11 +272,11 @@ <key>archive</key> <map> <key>hash</key> - <string>d7aee1b2ec17bd88a2c27359281b58a11ec52d48</string> + <string>ba9eeb62ae3046d91f9e061db823c1863623b017</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r10/colladadom-2.3.0-r10-windows64-13259816660.tar.zst</string> + <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r11/colladadom-2.3.0-r11-windows64-20980076767.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -289,7 +289,7 @@ <key>copyright</key> <string>Copyright 2006 Sony Computer Entertainment Inc.</string> <key>version</key> - <string>2.3.0-r10</string> + <string>2.3.0-r11</string> <key>name</key> <string>colladadom</string> </map> @@ -360,11 +360,11 @@ <key>archive</key> <map> <key>hash</key> - <string>e742b1e2d0a58d607b023bf55411041ac65e8a76</string> + <string>5eab8167cec442e8c156bb653012d7544cca6037</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r3/curl-7.54.1-13259824618-darwin64-13259824618.tar.zst</string> + <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r4/curl-7.54.1-20982000504-darwin64-20982000504.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -374,11 +374,11 @@ <key>archive</key> <map> <key>hash</key> - <string>49621c70f385d37c95bcb69a9a24d86ac25f4781</string> + <string>3465bbe70cfba2814b1fd52094c62804f4067490</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r3/curl-7.54.1-13259824618-linux64-13259824618.tar.zst</string> + <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r4/curl-7.54.1-20982000504-linux64-20982000504.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -388,11 +388,11 @@ <key>archive</key> <map> <key>hash</key> - <string>2522201692116cf0adb7203e169be9126885108c</string> + <string>0e64e20945eeb19259abf8e78400eb492e31eda7</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r3/curl-7.54.1-13259824618-windows64-13259824618.tar.zst</string> + <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r4/curl-7.54.1-20982000504-windows64-20982000504.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -405,7 +405,7 @@ <key>copyright</key> <string>Copyright (c) 1996 - 2014, Daniel Stenberg, (daniel@haxx.se).</string> <key>version</key> - <string>7.54.1-13259824618</string> + <string>7.54.1-20982000504</string> <key>name</key> <string>curl</string> <key>description</key> @@ -666,11 +666,11 @@ <key>archive</key> <map> <key>hash</key> - <string>5e6c7b9aaf73d90d7feab846a4024193c48eff6c</string> + <string>550a90bca35bdbbd615afb1a1c02383cb3b6edbe</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r3/freetype-2.13.3-r3-darwin64-13259804885.tar.zst</string> + <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r4/freetype-2.13.3-r4-darwin64-20935810762.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -680,11 +680,11 @@ <key>archive</key> <map> <key>hash</key> - <string>a9a3c371958e64a49b07d7be8f59218dfd6b0352</string> + <string>f52b05392962cb6a8e5f534d8687faa525d4960a</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r3/freetype-2.13.3-r3-linux64-13259804885.tar.zst</string> + <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r4/freetype-2.13.3-r4-linux64-20935810762.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -694,11 +694,11 @@ <key>archive</key> <map> <key>hash</key> - <string>ad7fbc4a01607ec43d86035a49dadd43d6f2a4e5</string> + <string>3c30052adcbfec572562bb1e7927d7a8f4d93f3d</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r3/freetype-2.13.3-r3-windows64-13259804885.tar.zst</string> + <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.3-r4/freetype-2.13.3-r4-windows64-20935810762.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -711,7 +711,7 @@ <key>copyright</key> <string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string> <key>version</key> - <string>2.13.3-r3</string> + <string>2.13.3-r4</string> <key>name</key> <string>freetype</string> <key>description</key> @@ -1234,11 +1234,11 @@ <key>archive</key> <map> <key>hash</key> - <string>a453355ee032f79aea4142218a957085a22c7656</string> + <string>6fa10d5f44601dda6efc3eda1a9dab22525e7a9a</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.44-r2/libpng-1.6.44-r2-darwin64-13246065198.tar.zst</string> + <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.53-eea12b7/libpng-1.6.44-dev1.geea12b7-darwin64-20934739343.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -1248,11 +1248,11 @@ <key>archive</key> <map> <key>hash</key> - <string>75c7608646c9f5b99b1a9e3946326e2804a304d7</string> + <string>112b7f46f5923e6418dfa4bc13ebe2db6911c9b9</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.44-r2/libpng-1.6.44-r2-linux64-13246065198.tar.zst</string> + <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.53-eea12b7/libpng-1.6.44-dev1.geea12b7-linux64-20934739343.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -1262,11 +1262,11 @@ <key>archive</key> <map> <key>hash</key> - <string>09af51774c4ee7c03fe67a87dfc52e846aa625ea</string> + <string>2731c45f1e62e33b8612b3ee2b9c4cb39dafbfe2</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.44-r2/libpng-1.6.44-r2-windows64-13246065198.tar.zst</string> + <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.53-eea12b7/libpng-1.6.44-dev1.geea12b7-windows64-20934739343.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -1279,7 +1279,7 @@ <key>copyright</key> <string>Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson</string> <key>version</key> - <string>1.6.44-r2</string> + <string>1.6.53-eea12b7</string> <key>name</key> <string>libpng</string> <key>description</key> @@ -1324,11 +1324,11 @@ <key>archive</key> <map> <key>hash</key> - <string>372c92936d940b1cfb5ba34310691d4bb435c161</string> + <string>c1ad7ff9ec91049c93d2dcd832f81a00f8f4b4b9</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.5-r2/libxml2-2.13.5-r2-darwin64-13246071272.tar.zst</string> + <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.9-d53cd6f/libxml2-2.13.9-d53cd6f-darwin64-20936141417.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -1338,11 +1338,11 @@ <key>archive</key> <map> <key>hash</key> - <string>ba6fbc34112b1acab1c8615dcd13de983f3678d3</string> + <string>7fc2df91648661468a82754b26fd7dedfbef1d39</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.5-r2/libxml2-2.13.5-r2-linux64-13246071272.tar.zst</string> + <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.9-d53cd6f/libxml2-2.13.9-d53cd6f-linux64-20936141417.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -1352,11 +1352,11 @@ <key>archive</key> <map> <key>hash</key> - <string>71968c4b621636e8ae0c5680e631f4aa67561944</string> + <string>84828c26b67c33f0d3e565718943aa339582b34f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.5-r2/libxml2-2.13.5-r2-windows64-13246071272.tar.zst</string> + <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.9-d53cd6f/libxml2-2.13.9-d53cd6f-windows64-20936141417.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -1369,7 +1369,7 @@ <key>copyright</key> <string>Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.</string> <key>version</key> - <string>2.13.5-r2</string> + <string>2.13.9-d53cd6f</string> <key>name</key> <string>libxml2</string> <key>description</key> @@ -1543,11 +1543,11 @@ <key>archive</key> <map> <key>hash</key> - <string>874a7d2bc843554aa4facd03b3a6d681f2b5150c</string> + <string>3692af717636da9c2b1e0f13eb084ce022b67f6c</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v220-r1/meshoptimizer-220.0.0-r1-darwin64-11968851109.tar.zst</string> + <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v1.0.1-9d6a006/meshoptimizer-1.0.1-9d6a006-darwin64-20867041007.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -1557,11 +1557,11 @@ <key>archive</key> <map> <key>hash</key> - <string>31a537f1a3d38ef85443214315111dd56a534d9a</string> + <string>22ad1be39a1196a1ca3902ba936460cb69252b9c</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v220-r1/meshoptimizer-220.0.0-r1-linux64-11968851109.tar.zst</string> + <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v1.0.1-9d6a006/meshoptimizer-1.0.1-9d6a006-linux64-20867041007.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -1571,11 +1571,11 @@ <key>archive</key> <map> <key>hash</key> - <string>6fd727a9ccb3e7a6c6b4ffef8179e266c032eb3e</string> + <string>2c9769f31da5de3920d7ee400d280398c911a30f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v220-r1/meshoptimizer-220.0.0-r1-windows64-11968851109.tar.zst</string> + <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v1.0.1-9d6a006/meshoptimizer-1.0.1-9d6a006-windows64-20867041007.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -1667,11 +1667,11 @@ <key>archive</key> <map> <key>hash</key> - <string>b628d088e1f368a0cd51a6b66292aaf9a025e2d4</string> + <string>85179317015c5c91986000d69c9f61a01af7617f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r3/minizip_ng-4.0.7-r3-darwin64-13246046977.tar.zst</string> + <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r4/minizip_ng-4.0.7-r4-darwin64-20933148061.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -1681,11 +1681,11 @@ <key>archive</key> <map> <key>hash</key> - <string>492ce9175b730d43df63821c4481685e035af623</string> + <string>ef1524f507f44fed6f1c1f00ae274ddb8a1ac359</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r3/minizip_ng-4.0.7-r3-linux64-13246046977.tar.zst</string> + <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r4/minizip_ng-4.0.7-r4-linux64-20933148061.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -1695,11 +1695,11 @@ <key>archive</key> <map> <key>hash</key> - <string>58773e707ff3490822b7b8217d7729ade2186632</string> + <string>90be39cf789b596377458f1ea78f415a9c281a8c</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r3/minizip_ng-4.0.7-r3-windows64-13246046977.tar.zst</string> + <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r4/minizip_ng-4.0.7-r4-windows64-20933148061.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -1712,7 +1712,7 @@ <key>copyright</key> <string>This project uses the zlib license. Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string> <key>version</key> - <string>4.0.7-r3</string> + <string>4.0.7-r4</string> <key>name</key> <string>minizip-ng</string> <key>canonical_repo</key> @@ -2092,11 +2092,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>157193699127ac5056c5fc1a410f9c98d39731e2</string> + <string>e08f640fb423f878c288426c836189b30b0c8ad0</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r3/openssl-1.1.1w-r3-darwin64-13246054022.tar.zst</string> + <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r4/openssl-1.1.1w-r4-darwin64-20981673556.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -2106,11 +2106,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>2e29c127dbd002d64ae55bc000f8b6ed0249fad7</string> + <string>d83a1e910762b792c90550ce2b8f51f9aaec7570</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r3/openssl-1.1.1w-r3-linux64-13246054022.tar.zst</string> + <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r4/openssl-1.1.1w-r4-linux64-20981673556.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -2120,11 +2120,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>ae9ced89051e03a99628c99b9ac78530fdea1e5a</string> + <string>eec78c22e2d1eecf375aa0c6eff08fe67d2316f4</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r3/openssl-1.1.1w-r3-windows64-13246054022.tar.zst</string> + <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r4/openssl-1.1.1w-r4-windows64-20981673556.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -2137,7 +2137,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>copyright</key> <string>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved; Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)</string> <key>version</key> - <string>1.1.1w-r3</string> + <string>1.1.1w-r4</string> <key>name</key> <string>openssl</string> <key>description</key> @@ -2495,6 +2495,38 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>description</key> <string>Viewer fonts</string> </map> + <key>google-fonts</key> + <map> + <key>platforms</key> + <map> + <key>common</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>8de96fd083783b9f4df1d8d7028c8a713a7d7217</string> + <key>hash_algorithm</key> + <string>sha1</string> + <key>url</key> + <string>https://github.com/secondlife/3p-google-fonts/releases/download/v1.0.0-r6/google_fonts-1.0.0.24469773244-common-24469773244.tar.zst</string> + </map> + <key>name</key> + <string>common</string> + </map> + </map> + <key>license</key> + <string>SIL Open Font License, Version 1.1</string> + <key>license_file</key> + <string>LICENSES/google_inter.txt</string> + <key>copyright</key> + <string>Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)</string> + <key>version</key> + <string>1.0.0.22606339007</string> + <key>name</key> + <string>google-fonts</string> + <key>description</key> + <string>Google fonts</string> + </map> <key>viewer-manager</key> <map> <key>platforms</key> @@ -2646,11 +2678,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>43c5f93517794aeade550e4266b959d1f0cfcb7f</string> + <string>72ed1f6d469a8ffaffd69be39b7af186d7c3b1d7</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.20-universal/webrtc-m137.7151.04.20-universal.17630578914-darwin64-17630578914.tar.zst</string> + <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.22/webrtc-m137.7151.04.22.21966754211-darwin64-21966754211.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -2660,11 +2692,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>efc5b176d878cfc16b8f82445d82ddb96815b6ab</string> + <string>b4d0c836d99491841c3816ff93bb2655a2817bd3</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.20-universal/webrtc-m137.7151.04.20-universal.17630578914-linux64-17630578914.tar.zst</string> + <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.22/webrtc-m137.7151.04.22.21966754211-linux64-21966754211.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -2674,11 +2706,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>1e36f100de32c7c71325497a672fb1659b3f206d</string> + <string>ab2bddd77b1568b22b50ead13c1c33da94f4d59a</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.20-universal/webrtc-m137.7151.04.20-universal.17630578914-windows64-17630578914.tar.zst</string> + <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m137.7151.04.22/webrtc-m137.7151.04.22.21966754211-windows64-21966754211.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -2691,7 +2723,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>copyright</key> <string>Copyright (c) 2011, The WebRTC project authors. All rights reserved.</string> <key>version</key> - <string>m137.7151.04.20-universal.17630578914</string> + <string>m137.7151.04.22.21966754211</string> <key>name</key> <string>webrtc</string> <key>vcs_branch</key> @@ -2744,11 +2776,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>e363e3b889c52fda7601d7aeaa9832307034651e</string> + <string>4906257288c61b14d2e16116fc3139af35d3374f</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.3-r1/zlib_ng-2.2.3-dev0.g8aa13e3.d20250206-darwin64-13183604450.tar.zst</string> + <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.5-0d88d03/zlib_ng-2.2.5-dev0.g0d88d03.d20260112-darwin64-20930307098.tar.zst</string> </map> <key>name</key> <string>darwin64</string> @@ -2758,11 +2790,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>3cdd52f7fb3691789d50f0b40ed6f5642321ff32</string> + <string>2b81a6a4ebd9ae5555d48b52eea7c2d875d68f60</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.3-r1/zlib_ng-2.2.3-dev0.g8aa13e3.d20250206-linux64-13183604450.tar.zst</string> + <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.5-0d88d03/zlib_ng-2.2.5-dev0.g0d88d03.d20260112-linux64-20930307098.tar.zst</string> </map> <key>name</key> <string>linux64</string> @@ -2772,11 +2804,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>archive</key> <map> <key>hash</key> - <string>e802a28139328bb2421ad39e13d996d350d8106d</string> + <string>e2e0f964ba44fe2e6428e1e7ca262a3f80d92e65</string> <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.3-r1/zlib_ng-2.2.3-dev0.g8aa13e3.d20250206-windows64-13183604450.tar.zst</string> + <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.5-0d88d03/zlib_ng-2.2.5-dev0.g0d88d03.d20260112-windows64-20930307098.tar.zst</string> </map> <key>name</key> <string>windows64</string> @@ -2789,7 +2821,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>copyright</key> <string>Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string> <key>version</key> - <string>2.2.3-dev0.g8aa13e3.d20250206</string> + <string>2.2.5-0d88d03</string> <key>name</key> <string>zlib-ng</string> <key>canonical_repo</key> @@ -2927,6 +2959,56 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> <key>description</key> <string>Voxelized Hierarchical Approximate Convex Decomposition</string> </map> + <key>velopack</key> + <map> + <key>platforms</key> + <map> + <key>windows64</key> + <map> + <key>archive</key> + <map> + <key>creds</key> + <string>github</string> + <key>hash</key> + <string>91abbc360640b5b2e0a4c001a36ad411a9a42602</string> + <key>hash_algorithm</key> + <string>sha1</string> + <key>url</key> + <string>https://api.github.com/repos/secondlife-3p/3p-velopack/releases/assets/380583560</string> + </map> + <key>name</key> + <string>windows64</string> + </map> + <key>darwin64</key> + <map> + <key>archive</key> + <map> + <key>creds</key> + <string>github</string> + <key>hash</key> + <string>05563a79bdeb83d66a72ac1e97587dc2a8f64511</string> + <key>hash_algorithm</key> + <string>sha1</string> + <key>url</key> + <string>https://api.github.com/repos/secondlife-3p/3p-velopack/releases/assets/380583554</string> + </map> + <key>name</key> + <string>darwin64</string> + </map> + </map> + <key>license</key> + <string>MIT</string> + <key>license_file</key> + <string>LICENSES/velopack.txt</string> + <key>copyright</key> + <string>Velopack Ltd.</string> + <key>version</key> + <string>40232ef.23500976684</string> + <key>name</key> + <string>velopack</string> + <key>description</key> + <string>Velopack C/C++ Library</string> + </map> </map> <key>package_description</key> <map> diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 6f3ec1cfff..aacbfe6496 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -74,7 +74,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llphysicsextensionsos) add_subdirectory(${LIBS_OPEN_PREFIX}llprimitive) add_subdirectory(${LIBS_OPEN_PREFIX}llrender) add_subdirectory(${LIBS_OPEN_PREFIX}llfilesystem) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) add_subdirectory(${LIBS_OPEN_PREFIX}llwebrtc) endif () add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 22e94f2c8f..4ce0d47f7f 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -45,8 +45,3 @@ if(DARWIN) endif() target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1) - -# Fix erroneous check for __attribute__ definition introduced with APR 1.7.5, causing lots of "this declaration may not have extern 'C' linkage" errors in VS -file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS) -string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}") -file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}") diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 14ea27e686..25d673e49a 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -13,9 +13,9 @@ elseif (WINDOWS) target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) target_link_directories( ll::boost INTERFACE ${prefix_result}) if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - set(sfx -vc143-mt-a64-1_90) + set(sfx -vc143-mt-a64-1_91) else () - set(sfx -vc143-mt-x64-1_90) + set(sfx -vc143-mt-x64-1_91) endif () else () find_package( Boost ) @@ -33,7 +33,7 @@ if (WINDOWS) else () target_link_libraries( ll::boost INTERFACE boost_regex${sfx}) endif () -if (NOT (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES fedora) OR DARWIN) target_link_libraries( ll::boost INTERFACE boost_system${sfx}) endif () target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) @@ -55,48 +55,42 @@ if (WINDOWS) find_library(BOOST_CONTEXT_LIBRARY NAMES + libboost_context libboost_context-mt libboost_context-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_FIBER_LIBRARY NAMES + libboost_fiber libboost_fiber-mt libboost_fiber-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_FILESYSTEM_LIBRARY NAMES + libboost_filesystem libboost_filesystem-mt libboost_filesystem-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_PROGRAMOPTIONS_LIBRARY NAMES + libboost_program_options libboost_program_options-mt libboost_program_options-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - find_library(BOOST_REGEX_LIBRARY - NAMES - libboost_regex-mt - libboost_regex-mt${addrsfx} - PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - - find_library(BOOST_SYSTEM_LIBRARY - NAMES - libboost_system-mt - libboost_system-mt${addrsfx} - PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - find_library(BOOST_THREAD_LIBRARY NAMES + libboost_thread libboost_thread-mt libboost_thread-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_URL_LIBRARY NAMES + libboost_url libboost_url-mt libboost_url-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) @@ -105,48 +99,42 @@ else (WINDOWS) find_library(BOOST_CONTEXT_LIBRARY NAMES + boost_context boost_context-mt boost_context-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_FIBER_LIBRARY NAMES + boost_fiber boost_fiber-mt boost_fiber-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_FILESYSTEM_LIBRARY NAMES + boost_filesystem boost_filesystem-mt boost_filesystem-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_PROGRAMOPTIONS_LIBRARY NAMES + boost_program_options boost_program_options-mt boost_program_options-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - find_library(BOOST_REGEX_LIBRARY - NAMES - boost_regex-mt - boost_regex-mt${addrsfx} - PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - - find_library(BOOST_SYSTEM_LIBRARY - NAMES - boost_system-mt - boost_system-mt${addrsfx} - PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - find_library(BOOST_THREAD_LIBRARY NAMES + boost_thread boost_thread-mt boost_thread-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) find_library(BOOST_URL_LIBRARY NAMES + boost_url boost_url-mt boost_url-mt${addrsfx} PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) @@ -158,8 +146,6 @@ target_link_libraries(ll::boost INTERFACE ${BOOST_CONTEXT_LIBRARY} ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_PROGRAMOPTIONS_LIBRARY} - ${BOOST_REGEX_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} ${BOOST_THREAD_LIBRARY} ${BOOST_URL_LIBRARY}) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index be1e9008e5..5a53f43d1c 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -61,6 +61,7 @@ set(cmake_SOURCE_FILES UI.cmake UnixInstall.cmake Variables.cmake + Velopack.cmake VHACD.cmake ViewerMiscLibs.cmake VisualLeakDetector.cmake diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 99045e3aa3..09fc43dff4 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -27,20 +27,20 @@ use_prebuilt_binary(curl) endif () endif () elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3.tar.gz) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4.tar.gz) file(DOWNLOAD - https://github.com/secondlife/3p-curl/archive/refs/tags/v7.54.1-r3.tar.gz - ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3.tar.gz + https://github.com/secondlife/3p-curl/archive/refs/tags/v7.54.1-r4.tar.gz + ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4.tar.gz ) endif () file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3.tar.gz + INPUT ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) execute_process( COMMAND sed -i netrc.c -e "s/defined(HAVE_GETPWUID_R)/0/g" netrc.c - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3/curl/lib + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4/curl/lib ) endif () file( @@ -60,16 +60,16 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA set(ENV{CFLAGS} "-std=c90") execute_process( COMMAND ./configure --disable-alt-svc --disable-dict --disable-doh --disable-file --disable-gopher --disable-headers-api --disable-hsts --disable-imap --disable-ldap --disable-ldaps --disable-libcurl-option --disable-manual --disable-mqtt --disable-ntlm --disable-ntlm-wb --disable-pop3 --disable-rtsp --disable-shared --disable-smb --disable-smtp --disable-sspi --disable-telnet --disable-tftp --disable-tls-srp --disable-unix-sockets --disable-verbose --disable-versioned-symbols --enable-threaded-resolver --with-ssl=${LIBS_PREBUILT_DIR} --without-libidn2 --without-libpsl --without-libssh2 --prefix=${LIBS_PREBUILT_DIR} --libdir=${ARCH_PREBUILT_DIRS_RELEASE} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3/curl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4/curl ) execute_process( COMMAND make -j${MAKE_JOBS} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3/curl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4/curl ) unset(ENV{CFLAGS}) execute_process( COMMAND make install - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r3/curl + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r4/curl RESULT_VARIABLE curl_installed ) if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 2342f07e53..ad8dc38c70 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -34,7 +34,7 @@ if (USE_FMODSTUDIO) file(MAKE_DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}) if (DARWIN) execute_process( - COMMAND hdiutil attach -noverify fmodstudioapi20233mac-installer.dmg + COMMAND hdiutil attach -noverify fmodstudioapi20234mac-installer.dmg WORKING_DIRECTORY $ENV{HOME}/Downloads ) file( @@ -64,36 +64,36 @@ if (USE_FMODSTUDIO) file(WRITE ${PREBUILD_TRACKING_DIR}/fmodstudio_installed "${fmodstudio_installed}") else () file(ARCHIVE_EXTRACT - INPUT $ENV{HOME}/Downloads/fmodstudioapi20233linux.tar.gz + INPUT $ENV{HOME}/Downloads/fmodstudioapi20234linux.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod.hpp - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_codec.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_common.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_dsp.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_dsp_effects.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_errors.h - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/inc/fmod_output.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod.hpp + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_codec.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_common.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_dsp.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_dsp_effects.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_errors.h + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/inc/fmod_output.h DESTINATION ${LIBS_PREBUILT_DIR}/include/fmodstudio ) if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/arm64/libfmod.so - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/arm64/libfmod.so.13 - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/arm64/libfmod.so.13.33 + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/arm64/libfmod.so + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/arm64/libfmod.so.13 + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/arm64/libfmod.so.13.34 DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} FOLLOW_SYMLINK_CHAIN ) else () file( COPY - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 - ${CMAKE_BINARY_DIR}/fmodstudioapi20233linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.33 + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13 + ${CMAKE_BINARY_DIR}/fmodstudioapi20234linux/api/core/lib/${CMAKE_SYSTEM_PROCESSOR}/libfmod.so.13.34 DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} FOLLOW_SYMLINK_CHAIN ) diff --git a/indra/cmake/GLM.cmake b/indra/cmake/GLM.cmake index db6acc065e..e4c6796f6c 100644 --- a/indra/cmake/GLM.cmake +++ b/indra/cmake/GLM.cmake @@ -4,7 +4,7 @@ include(Prebuilt) add_library( ll::glm INTERFACE IMPORTED ) #use_system_binary( glm ) -if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) +if (${LINUX_DISTRO} MATCHES debian) use_prebuilt_binary(glm) elseif (NOT WINDOWS) find_package( glm REQUIRED ) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 09413c912d..df8d96109f 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -21,29 +21,32 @@ endif() if (TRUE) include(FindPkgConfig) pkg_check_modules(Minizip REQUIRED minizip) + if (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES gentoo) OR DARWIN) + set(Minizip_INCLUDE_DIRS ${Minizip_INCLUDE_DIRS}/minizip) + endif () pkg_check_modules(Libxml2 REQUIRED libxml-2.0) target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} ) target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} ) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10.tar.gz) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11.tar.gz) file(DOWNLOAD - https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r10.tar.gz - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10.tar.gz + https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r11.tar.gz + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11.tar.gz ) endif () file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10.tar.gz + INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) if (WINDOWS OR CMAKE_COMMAND MATCHES /usr/bin/cmake) execute_process( COMMAND sed -i "s/include_directories/cmake_minimum_required(VERSION 3.28)\\ninclude_directories/" CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 ) else () execute_process( COMMAND sed -i "" -e "s/include_directories/cmake_minimum_required(VERSION 3.28)\\ninclude_directories/" CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 ) endif () if (WINDOWS) @@ -51,12 +54,12 @@ if (TRUE) COMMAND sed -i "s/SHARED/STATIC/" 1.4/CMakeLists.txt COMMAND sed -i "/#include <cstdarg>/a #define WIN32" dae/daeUtils.cpp COMMAND sed -i "/using namespace cdom;/a namespace boost{void boost::throw_exception(class std::exception const &){}}" dae/daeURI.cpp - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10/src + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11/src ) else () execute_process( COMMAND sed -i "" -e "s/SHARED/STATIC/" src/1.4/CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 ) endif () if (DARWIN) @@ -67,23 +70,23 @@ if (TRUE) set(BOOST_CFLAGS -I${prefix_result}/../include) set(BOOST_LIBS -L${prefix_result}) if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - set(BOOST_LIBRARY_SUFFIX -vc143-mt-a64-1_90) + set(BOOST_LIBRARY_SUFFIX -vc143-mt-a64-1_91) else () - set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_90) + set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_91) endif () elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(BOOST_CFLAGS -I/usr/local/include) execute_process( COMMAND sed -i "" -e "s/endif 0/endif/" dae/daeUtils.cpp COMMAND sed -i "" -e "s/linux/FreeBSD/" dae/daeUtils.cpp - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10/src + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11/src ) endif () file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) try_compile(COLLADADOM_RESULT PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 TARGET collada14dom CMAKE_FLAGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} @@ -103,13 +106,13 @@ if (TRUE) ) if (WINDOWS) execute_process( - COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10/Project.sln -p:Configuration=${CMAKE_BUILD_TYPE} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + COMMAND MSBuild.exe ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11/Project.slnx -p:Configuration=${CMAKE_BUILD_TYPE} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 OUTPUT_VARIABLE colladadom_installed ) file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada) file( - COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10/include + COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11/include DESTINATION ${LIBS_PREBUILT_DIR}/include ) file(RENAME @@ -118,13 +121,13 @@ if (TRUE) ) file(MAKE_DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}) file(RENAME - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10/src/1.4/${CMAKE_BUILD_TYPE}/collada14dom.lib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11/src/1.4/${CMAKE_BUILD_TYPE}/collada14dom.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ) elseif (${COLLADADOM_RESULT}) execute_process( COMMAND ${CMAKE_MAKE_PROGRAM} install - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r10 + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r11 OUTPUT_VARIABLE colladadom_installed ) file(RENAME diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 125f32e711..fbe028a199 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,70 +6,10 @@ include(Linking) add_library( ll::openjpeg INTERFACE IMPORTED ) -#use_system_binary(openjpeg) -#use_prebuilt_binary(openjpeg) +include(FindPkgConfig) +pkg_check_modules(Openjpeg REQUIRED libopenjp2) +target_include_directories(ll::openjpeg SYSTEM INTERFACE ${Openjpeg_INCLUDE_DIRS}) +target_link_directories(ll::openjpeg INTERFACE ${Openjpeg_LIBRARY_DIRS}) +target_link_libraries(ll::openjpeg INTERFACE ${Openjpeg_LIBRARIES}) -if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/openjpeg-2.5.3.tar.gz) - file(DOWNLOAD - https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.3.tar.gz - ${CMAKE_BINARY_DIR}/openjpeg-2.5.3.tar.gz - ) - endif () - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/openjpeg-2.5.3.tar.gz - DESTINATION ${CMAKE_BINARY_DIR} - ) - - if (${LINUX_DISTRO} MATCHES ubuntu) - try_compile(OPENJPEG_RESULT - PROJECT OPENJPEG - SOURCE_DIR ${CMAKE_BINARY_DIR}/openjpeg-2.5.3 - BINARY_DIR ${CMAKE_BINARY_DIR}/openjpeg-2.5.3 - TARGET openjp2 - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET} - -DCMAKE_INSTALL_PREFIX:PATH=${LIBS_PREBUILT_DIR} - -DCMAKE_INSTALL_LIBDIR:PATH=${ARCH_PREBUILT_DIRS_RELEASE} - -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON - -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} - -DBUILD_CODEC:BOOL=OFF - ) - if (${OPENJPEG_RESULT}) - execute_process( - COMMAND ${CMAKE_MAKE_PROGRAM} install - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openjpeg-2.5.3 - OUTPUT_VARIABLE openjpeg_installed - ) - endif () - - else () - execute_process( - COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_INSTALL_PREFIX:PATH=${LIBS_PREBUILT_DIR} -DCMAKE_INSTALL_LIBDIR:PATH=${ARCH_PREBUILT_DIRS_RELEASE} -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} -DBUILD_CODEC:BOOL=OFF - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openjpeg-2.5.3 - OUTPUT_VARIABLE openjpeg_installed - ) - endif () - - file( - COPY - ${CMAKE_BINARY_DIR}/openjpeg-2.5.3/src/lib/openjp2/cio.h - ${CMAKE_BINARY_DIR}/openjpeg-2.5.3/src/lib/openjp2/event.h - ${CMAKE_BINARY_DIR}/openjpeg-2.5.3/src/lib/openjp2/opj_config_private.h - DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") -endif () - -if (${LINUX_DISTRO} MATCHES ubuntu) -target_link_libraries(ll::openjpeg INTERFACE openjp2 ) -else () - include(FindPkgConfig) - pkg_check_modules(Openjpeg REQUIRED libopenjp2) - target_include_directories(ll::openjpeg SYSTEM INTERFACE ${Openjpeg_INCLUDE_DIRS}) - target_link_directories(ll::openjpeg INTERFACE ${Openjpeg_LIBRARY_DIRS}) - target_link_libraries(ll::openjpeg INTERFACE ${Openjpeg_LIBRARIES}) -endif () target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index 7cce190f6a..428f9e3326 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -1,57 +1,18 @@ -# -*- cmake -*- +# Allow explicit Python path via environment variable +if(DEFINED ENV{PYTHON}) + set(Python3_ROOT_DIR "$ENV{PYTHON}") +endif() -set(PYTHONINTERP_FOUND) +# On Windows, prefer registry entries to avoid Cygwin/MSYS Python +# The registry is searched first by default, which finds native Windows Python +# installations rather than Cygwin/MSYS Python +if(WINDOWS) + set(Python3_FIND_REGISTRY FIRST CACHE STRING "Python search order") +endif() -if (DEFINED ENV{PYTHON}) - # Allow python executable to be explicitly set - set(python "$ENV{PYTHON}") - set(PYTHONINTERP_FOUND ON) -elseif (WINDOWS) - # On Windows, explicitly avoid Cygwin Python. +# Find Python 3 interpreter +find_package(Python3 REQUIRED COMPONENTS Interpreter) - # if the user has their own version of Python installed, prefer that - foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) - # prefer more recent Python versions to older ones, if multiple versions - # are installed - foreach(pyver 3.13 3.12 3.11 3.10 3.9 3.8 3.7) - list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]") - endforeach() - endforeach() - - # TODO: This logic has the disadvantage that if you have multiple versions - # of Python installed, the selected path won't necessarily be the newest - - # e.g. this GLOB will prefer Python310 to Python311. But since pymaybe is - # checked AFTER the registry entries, this will only surface as a problem if - # no installed Python appears in the registry. - file(GLOB pymaybe - "$ENV{PROGRAMFILES}/Python*" -## "$ENV{PROGRAMFILES(X86)}/Python*" - # The Windows environment variable is in fact as shown above, but CMake - # disallows querying an environment variable containing parentheses - - # thanks, Windows. Fudge by just appending " (x86)" to $PROGRAMFILES and - # hoping for the best. - "$ENV{PROGRAMFILES} (x86)/Python*" - "c:/Python*") - - find_program(python - NAMES python3.exe python.exe - NO_DEFAULT_PATH # added so that cmake does not find cygwin python - PATHS - ${regpaths} - ${pymaybe} - ) - find_package(Python3 COMPONENTS Interpreter) -else() - find_program(python python3) - - if (python) - set(PYTHONINTERP_FOUND ON) - endif (python) -endif (DEFINED ENV{PYTHON}) - -if (NOT python) - message(FATAL_ERROR "No Python interpreter found") -endif (NOT python) - -set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds") +# Set legacy variable name for compatibility with existing code +set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}" CACHE FILEPATH "Python interpreter for builds") mark_as_advanced(PYTHON_EXECUTABLE) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index ac45838427..dc8d84217a 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -12,7 +12,7 @@ if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) return() endif() - if (${LINUX_DISTRO} MATCHES debian) + if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) include(FindPkgConfig) pkg_check_modules(Cairo REQUIRED cairo) target_include_directories(ll::uilibraries SYSTEM INTERFACE ${Cairo_INCLUDE_DIRS}) diff --git a/indra/cmake/Velopack.cmake b/indra/cmake/Velopack.cmake new file mode 100644 index 0000000000..a1dbe2cbe9 --- /dev/null +++ b/indra/cmake/Velopack.cmake @@ -0,0 +1,68 @@ +# -*- cmake -*- +# Velopack installer and update framework integration +# https://velopack.io/ + +include_guard() + +# USE_VELOPACK controls whether to use Velopack for installer packaging (instead of NSIS/DMG) +option(USE_VELOPACK "Use Velopack for installer packaging" OFF) + +if (WINDOWS) + include(Prebuilt) + use_prebuilt_binary(velopack) + + add_library(ll::velopack INTERFACE IMPORTED) + + target_include_directories(ll::velopack SYSTEM INTERFACE + ${LIBS_PREBUILT_DIR}/include/velopack + ) + + target_link_libraries(ll::velopack INTERFACE + ${ARCH_PREBUILT_DIRS_RELEASE}/velopack_libc.lib + ) + + # Windows system libraries required by Velopack + target_link_libraries(ll::velopack INTERFACE + winhttp + ole32 + shell32 + shlwapi + version + userenv + ws2_32 + bcrypt + ntdll + ) + + target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1) + +elseif (DARWIN) + include(Prebuilt) + use_prebuilt_binary(velopack) + + add_library(ll::velopack INTERFACE IMPORTED) + + target_include_directories(ll::velopack SYSTEM INTERFACE + ${LIBS_PREBUILT_DIR}/include/velopack + ) + + target_link_libraries(ll::velopack INTERFACE + ${ARCH_PREBUILT_DIRS_RELEASE}/libvelopack_libc.a + ) + + # macOS system frameworks required by Velopack (Rust static library dependencies) + target_link_libraries(ll::velopack INTERFACE + "-framework Foundation" + "-framework Security" + "-framework SystemConfiguration" + "-framework AppKit" + "-framework CoreFoundation" + "-framework CoreServices" + "-framework IOKit" + "-liconv" + "-lresolv" + ) + + target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1) + +endif() diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index af13746c91..65b8e5cfc0 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -16,8 +16,9 @@ endif() use_prebuilt_binary(slvoice) endif (FALSE) -if (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 OR DARWIN) +if (DARWIN) use_prebuilt_binary(nanosvg) endif () use_prebuilt_binary(viewer-fonts) +use_prebuilt_binary(google-fonts) use_prebuilt_binary(emoji_shortcodes) diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 5fda2f71b9..286d3aa172 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -8,7 +8,7 @@ add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") if (DARWIN OR WINDOWS) use_prebuilt_binary(webrtc) -elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +elseif (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) if (DARWIN) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 509981d72c..d2a8fcca46 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -23,8 +23,14 @@ if (USE_BUGSPLAT) elseif (DARWIN) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") + find_library(CRASHREPORTED_LIBRARIES CrashReporter REQUIRED + NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") + find_library(HOCKEYSDK_LIBRARIES HockeySDK REQUIRED + NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") target_link_libraries( ll::bugsplat INTERFACE ${BUGSPLAT_LIBRARIES} + ${CRASHREPORTED_LIBRARIES} + ${HOCKEYSDK_LIBRARIES} ) else (WINDOWS) message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 1bd65eb57d..0ad0b6b1a9 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -157,7 +157,8 @@ BASE_ARGUMENTS=[ for use by a .bat file.""", default=None), dict(name='versionfile', - description="""The name of a file containing the full version number."""), + description="""The name of a file containing the full version number.""", + default=None), ] def usage(arguments, srctree=""): diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index bcb00e6afd..2452352097 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1424,6 +1424,12 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC size_t mem_size = pixels * bytes_per_pixel; alpha_data = (U8*)ll_aligned_malloc_32(mem_size); + if (!alpha_data) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Failed to allocate memory for morph texture: " << (S32)(mem_size) << LL_ENDL; + return; + } bool skip_readback = LLRender::sNsightDebugSupport; // nSight doesn't support use of glReadPixels @@ -1433,6 +1439,12 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC { // work-around for broken intel drivers which cannot do glReadPixels on an RGBA FBO // returning only the alpha portion without locking up downstream U8* temp = (U8*)ll_aligned_malloc_32(mem_size << 2); // allocate same size, but RGBA + if (!temp) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Failed to allocate temporary memory for morph texture readback: " << (S32)(mem_size << 2) << LL_ENDL; + return; + } if (bound_target) { @@ -1471,6 +1483,12 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC // We just want GL_ALPHA, but that isn't supported in OGL core profile 4. static const size_t TEMP_BYTES_PER_PIXEL = 4; U8* temp_data = (U8*)ll_aligned_malloc_32(mem_size * TEMP_BYTES_PER_PIXEL); + if (!temp_data) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Failed to allocate temporary memory for morph texture: " << (S32)(mem_size * TEMP_BYTES_PER_PIXEL) << LL_ENDL; + return; + } glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, temp_data); for (size_t pixel = 0; pixel < pixels; pixel++) { alpha_data[pixel] = temp_data[(pixel * TEMP_BYTES_PER_PIXEL) + 3]; diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h index 5e785e4f3e..59320cc00d 100644 --- a/indra/llappearance/lltexlayerparams.h +++ b/indra/llappearance/lltexlayerparams.h @@ -27,6 +27,7 @@ #ifndef LL_LLTEXLAYERPARAMS_H #define LL_LLTEXLAYERPARAMS_H +#include <atomic> #include "llpointer.h" #include "v4color.h" #include "llviewervisualparam.h" diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 613c408157..6f2f7eae61 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -225,6 +225,7 @@ void LLAudioEngine::updateChannels() void LLAudioEngine::idle() { + LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; // "Update" all of our audio sources, clean up dead ones. // Primarily does position updating, cleanup of unused audio sources. // Also does regeneration of the current priority of each audio source. diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index 7c158c4ff9..6795652136 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -17,14 +17,12 @@ set(llcharacter_SOURCE_FILES lljointsolverrp3.cpp llkeyframefallmotion.cpp llkeyframemotion.cpp - llkeyframemotionparam.cpp llkeyframestandmotion.cpp llkeyframewalkmotion.cpp llmotioncontroller.cpp llmotion.cpp llmultigesture.cpp llpose.cpp - llstatemachine.cpp lltargetingmotion.cpp llvisualparam.cpp ) @@ -45,14 +43,12 @@ set(llcharacter_HEADER_FILES lljointstate.h llkeyframefallmotion.h llkeyframemotion.h - llkeyframemotionparam.h llkeyframestandmotion.h llkeyframewalkmotion.h llmotion.h llmotioncontroller.h llmultigesture.h llpose.h - llstatemachine.h lltargetingmotion.h llvisualparam.h ) diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index b82734615f..be1c74a908 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1229,7 +1229,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints) { bool old_version = false; - std::unique_ptr<LLKeyframeMotion::JointMotionList> joint_motion_list(new LLKeyframeMotion::JointMotionList); + std::unique_ptr<LLKeyframeMotion::JointMotionList> joint_motion_list = std::make_unique<LLKeyframeMotion::JointMotionList>(); //------------------------------------------------------------------------- // get base priority @@ -1826,7 +1826,7 @@ bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo for(S32 i = 0; i < num_constraints; ++i) { // read in constraint data - std::unique_ptr<JointConstraintSharedData> constraintp(new JointConstraintSharedData); + std::unique_ptr<JointConstraintSharedData> constraintp = std::make_unique<JointConstraintSharedData>(); U8 byte = 0; if (!dp.unpackU8(byte, "chain_length")) diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp deleted file mode 100644 index e4552b96c9..0000000000 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ /dev/null @@ -1,436 +0,0 @@ -/** - * @file llkeyframemotionparam.cpp - * @brief Implementation of LLKeyframeMotion class. - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -//----------------------------------------------------------------------------- -// Header Files -//----------------------------------------------------------------------------- -#include "linden_common.h" - -#include "llkeyframemotionparam.h" -#include "llcharacter.h" -#include "llmath.h" -#include "m3math.h" -#include "lldir.h" -#include "llanimationstates.h" - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam class -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam() -// Class Constructor -//----------------------------------------------------------------------------- -LLKeyframeMotionParam::LLKeyframeMotionParam( const LLUUID &id) : LLMotion(id) -{ - mDefaultKeyframeMotion = NULL; - mCharacter = NULL; - - mEaseInDuration = 0.f; - mEaseOutDuration = 0.f; - mDuration = 0.f; - mPriority = LLJoint::LOW_PRIORITY; -} - - -//----------------------------------------------------------------------------- -// ~LLKeyframeMotionParam() -// Class Destructor -//----------------------------------------------------------------------------- -LLKeyframeMotionParam::~LLKeyframeMotionParam() -{ - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - delete paramMotion.mMotion; - } - motionList.clear(); - } - mParameterizedMotions.clear(); -} - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::onInitialize(LLCharacter *character) -//----------------------------------------------------------------------------- -LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *character) -{ - mCharacter = character; - - if (!loadMotions()) - { - return STATUS_FAILURE; - } - - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - LLMotion* motion = paramMotion.mMotion; - motion->onInitialize(character); - - if (motion->getDuration() > mEaseInDuration) - { - mEaseInDuration = motion->getEaseInDuration(); - } - - if (motion->getEaseOutDuration() > mEaseOutDuration) - { - mEaseOutDuration = motion->getEaseOutDuration(); - } - - if (motion->getDuration() > mDuration) - { - mDuration = motion->getDuration(); - } - - if (motion->getPriority() > mPriority) - { - mPriority = motion->getPriority(); - } - - LLPose *pose = motion->getPose(); - - mPoseBlender.addMotion(motion); - for (LLJointState *jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) - { - LLPose *blendedPose = mPoseBlender.getBlendedPose(); - blendedPose->addJointState(jsp); - } - } - } - - return STATUS_SUCCESS; -} - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::onActivate() -//----------------------------------------------------------------------------- -bool LLKeyframeMotionParam::onActivate() -{ - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - paramMotion.mMotion->activate(mActivationTimestamp); - } - } - return true; -} - - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::onUpdate() -//----------------------------------------------------------------------------- -bool LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) -{ - LL_PROFILE_ZONE_SCOPED; - F32 weightFactor = 1.f / (F32)mParameterizedMotions.size(); - - // zero out all pose weights - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { -// LL_INFOS() << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << LL_ENDL; - paramMotion.mMotion->getPose()->setWeight(0.f); - } - } - - - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - const std::string& paramName = motion_pair.first; - F32* paramValue = (F32 *)mCharacter->getAnimationData(paramName); - if (NULL == paramValue) // unexpected, but... - { - LL_WARNS() << "paramValue == NULL" << LL_ENDL; - continue; - } - - // DANGER! Do not modify mParameterizedMotions while using these pointers! - const ParameterizedMotion* firstMotion = NULL; - const ParameterizedMotion* secondMotion = NULL; - - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - paramMotion.mMotion->onUpdate(time, joint_mask); - - F32 distToParam = paramMotion.mParam - *paramValue; - - if ( distToParam <= 0.f) - { - // keep track of the motion closest to the parameter value - firstMotion = ¶mMotion; - } - else - { - // we've passed the parameter value - // so store the first motion we find as the second one we want to blend... - if (firstMotion && !secondMotion ) - { - secondMotion = ¶mMotion; - } - //...or, if we've seen no other motion so far, make sure we blend to this only - else if (!firstMotion) - { - firstMotion = ¶mMotion; - secondMotion = ¶mMotion; - } - } - } - - LLPose *firstPose; - LLPose *secondPose; - - if (firstMotion) - firstPose = firstMotion->mMotion->getPose(); - else - firstPose = NULL; - - if (secondMotion) - secondPose = secondMotion->mMotion->getPose(); - else - secondPose = NULL; - - // now modify weight of the subanim (only if we are blending between two motions) - if (firstMotion && secondMotion) - { - if (firstMotion == secondMotion) - { - firstPose->setWeight(weightFactor); - } - else if (firstMotion->mParam == secondMotion->mParam) - { - firstPose->setWeight(0.5f * weightFactor); - secondPose->setWeight(0.5f * weightFactor); - } - else - { - F32 first_weight = 1.f - - ((llclamp(*paramValue - firstMotion->mParam, 0.f, (secondMotion->mParam - firstMotion->mParam))) / - (secondMotion->mParam - firstMotion->mParam)); - first_weight = llclamp(first_weight, 0.f, 1.f); - - F32 second_weight = 1.f - first_weight; - - firstPose->setWeight(first_weight * weightFactor); - secondPose->setWeight(second_weight * weightFactor); - -// LL_INFOS() << "Parameter " << *paramName << ": " << *paramValue << LL_ENDL; -// LL_INFOS() << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << LL_ENDL; - } - } - else if (firstMotion && !secondMotion) - { - firstPose->setWeight(weightFactor); - } - } - - // blend poses - mPoseBlender.blendAndApply(); - - LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL; - - return true; -} - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::onDeactivate() -//----------------------------------------------------------------------------- -void LLKeyframeMotionParam::onDeactivate() -{ - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - paramMotion.mMotion->onDeactivate(); - } - } -} - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::addKeyframeMotion() -//----------------------------------------------------------------------------- -bool LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value) -{ - LLMotion *newMotion = mCharacter->createMotion( id ); - - if (!newMotion) - { - return false; - } - - newMotion->setName(name); - - // now add motion to this list - mParameterizedMotions[param].insert(ParameterizedMotion(newMotion, value)); - - return true; -} - - -//----------------------------------------------------------------------------- -// LLKeyframeMotionParam::setDefaultKeyframeMotion() -//----------------------------------------------------------------------------- -void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name) -{ - for (motion_map_t::value_type& motion_pair : mParameterizedMotions) - { - motion_list_t& motionList = motion_pair.second; - for (const ParameterizedMotion& paramMotion : motionList) - { - if (paramMotion.mMotion->getName() == name) - { - mDefaultKeyframeMotion = paramMotion.mMotion; - } - } - } -} - -//----------------------------------------------------------------------------- -// loadMotions() -//----------------------------------------------------------------------------- -bool LLKeyframeMotionParam::loadMotions() -{ - //------------------------------------------------------------------------- - // Load named file by concatenating the character prefix with the motion name. - // Load data into a buffer to be parsed. - //------------------------------------------------------------------------- - //std::string path = gDirUtilp->getExpandedFilename(LL_PATH_MOTIONS,mCharacter->getAnimationPrefix()) - // + "_" + getName() + ".llp"; - //RN: deprecated unused reference to "motion" directory - std::string path; - - - //------------------------------------------------------------------------- - // open the file - //------------------------------------------------------------------------- - S32 fileSize = 0; - LLAPRFile infile ; - infile.open(path, LL_APR_R, NULL, &fileSize); - apr_file_t* fp = infile.getFileHandle() ; - if (!fp || fileSize == 0) - { - LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL; - return false; - } - - // allocate a text buffer - std::vector<char> text(fileSize+1); - - //------------------------------------------------------------------------- - // load data from file into buffer - //------------------------------------------------------------------------- - bool error = false; - char *p = &text[0]; - while ( 1 ) - { - if (apr_file_eof(fp) == APR_EOF) - { - break; - } - if (apr_file_gets(p, 1024, fp) != APR_SUCCESS) - { - error = true; - break; - } - while ( *(++p) ) - ; - } - - //------------------------------------------------------------------------- - // close the file - //------------------------------------------------------------------------- - infile.close(); - - //------------------------------------------------------------------------- - // check for error - //------------------------------------------------------------------------- - llassert( p <= (&text[0] + fileSize) ); - - if ( error ) - { - LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL; - return false; - } - - LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL; - - //------------------------------------------------------------------------- - // parse the text and build keyframe data structures - //------------------------------------------------------------------------- - p = &text[0]; - S32 num; - char strA[80]; /* Flawfinder: ignore */ - char strB[80]; /* Flawfinder: ignore */ - F32 floatA = 0.0f; - - - //------------------------------------------------------------------------- - // get priority - //------------------------------------------------------------------------- - bool isFirstMotion = true; - num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */ - - while(1) - { - if (num == 0 || num == EOF) break; - if ((num != 3)) - { - LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL; - return false; - } - - addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA); - if (isFirstMotion) - { - isFirstMotion = false; - setDefaultKeyframeMotion(strA); - } - - p = strstr(p, "\n"); - if (!p) - { - break; - } - - p++; - num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */ - } - - return true; -} - -// End diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h deleted file mode 100644 index 8c57766e9b..0000000000 --- a/indra/llcharacter/llkeyframemotionparam.h +++ /dev/null @@ -1,169 +0,0 @@ -/** - * @file llkeyframemotionparam.h - * @brief Implementation of LLKeframeMotionParam class. - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLKEYFRAMEMOTIONPARAM_H -#define LL_LLKEYFRAMEMOTIONPARAM_H - -//----------------------------------------------------------------------------- -// Header files -//----------------------------------------------------------------------------- - -#include <string> - -#include "llmotion.h" -#include "lljointstate.h" -#include "v3math.h" -#include "llquaternion.h" -#include "llkeyframemotion.h" - -//----------------------------------------------------------------------------- -// class LLKeyframeMotionParam -//----------------------------------------------------------------------------- -class LLKeyframeMotionParam : - public LLMotion -{ -public: - // Constructor - LLKeyframeMotionParam(const LLUUID &id); - - // Destructor - virtual ~LLKeyframeMotionParam(); - -public: - //------------------------------------------------------------------------- - // functions to support MotionController and MotionRegistry - //------------------------------------------------------------------------- - - // static constructor - // all subclasses must implement such a function and register it - static LLMotion *create(const LLUUID &id) { return new LLKeyframeMotionParam(id); } - -public: - //------------------------------------------------------------------------- - // animation callbacks to be implemented by subclasses - //------------------------------------------------------------------------- - - // motions must specify whether or not they loop - virtual bool getLoop() { - return true; - } - - // motions must report their total duration - virtual F32 getDuration() { - return mDuration; - } - - // motions must report their "ease in" duration - virtual F32 getEaseInDuration() { - return mEaseInDuration; - } - - // motions must report their "ease out" duration. - virtual F32 getEaseOutDuration() { - return mEaseOutDuration; - } - - // motions must report their priority - virtual LLJoint::JointPriority getPriority() { - return mPriority; - } - - virtual LLMotionBlendType getBlendType() { return NORMAL_BLEND; } - - // called to determine when a motion should be activated/deactivated based on avatar pixel coverage - virtual F32 getMinPixelArea() { return MIN_REQUIRED_PIXEL_AREA_KEYFRAME; } - - // run-time (post constructor) initialization, - // called after parameters have been set - // must return true to indicate success and be available for activation - virtual LLMotionInitStatus onInitialize(LLCharacter *character); - - // called when a motion is activated - // must return true to indicate success, or else - // it will be deactivated - virtual bool onActivate(); - - // called per time step - // must return true while it is active, and - // must return false when the motion is completed. - virtual bool onUpdate(F32 time, U8* joint_mask); - - // called when a motion is deactivated - virtual void onDeactivate(); - - virtual LLPose* getPose() { return mPoseBlender.getBlendedPose();} - -protected: - //------------------------------------------------------------------------- - // new functions defined by this subclass - //------------------------------------------------------------------------- - struct ParameterizedMotion - { - ParameterizedMotion(LLMotion* motion, F32 param) : mMotion(motion), mParam(param) {} - LLMotion* mMotion; - F32 mParam; - }; - - // add a motion and associated parameter triplet - bool addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value); - - // set default motion for LOD and retrieving blend constants - void setDefaultKeyframeMotion(char *); - - bool loadMotions(); - -protected: - //------------------------------------------------------------------------- - // Member Data - //------------------------------------------------------------------------- - - struct compare_motions - { - bool operator() (const ParameterizedMotion& a, const ParameterizedMotion& b) const - { - if (a.mParam != b.mParam) - return (a.mParam < b.mParam); - else - return a.mMotion < b.mMotion; - } - }; - - typedef std::set < ParameterizedMotion, compare_motions > motion_list_t; - typedef std::map <std::string, motion_list_t > motion_map_t; - motion_map_t mParameterizedMotions; - LLMotion* mDefaultKeyframeMotion; - LLCharacter* mCharacter; - LLPoseBlender mPoseBlender; - - F32 mEaseInDuration; - F32 mEaseOutDuration; - F32 mDuration; - LLJoint::JointPriority mPriority; - - LLUUID mTransactionID; -}; - -#endif // LL_LLKEYFRAMEMOTIONPARAM_H diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp index bc9f578660..a51857c9a1 100644 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -51,8 +51,8 @@ LLMotion::LLMotion( const LLUUID &id ) : mSendStopTimestamp(F32_MAX), mResidualWeight(0.f), mFadeWeight(1.f), - mDeactivateCallback(NULL), - mDeactivateCallbackUserData(NULL) + mDeactivateCallback(nullptr), + mDeactivateCallbackUserData(nullptr) { for (S32 i=0; i<3; ++i) memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS); diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 0c262bf24a..c2cb174821 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -37,7 +37,6 @@ #include "llmotion.h" #include "llpose.h" #include "llframetimer.h" -#include "llstatemachine.h" #include "llstring.h" //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h index af0cb08650..199ed5c543 100644 --- a/indra/llcharacter/llmultigesture.h +++ b/indra/llcharacter/llmultigesture.h @@ -54,11 +54,10 @@ public: void reset(); const std::string& getTrigger() const { return mTrigger; } -protected: - LLMultiGesture(const LLMultiGesture& gest); - const LLMultiGesture& operator=(const LLMultiGesture& rhs); -public: + LLMultiGesture(const LLMultiGesture& gest) = delete; + const LLMultiGesture& operator=(const LLMultiGesture& rhs) = delete; + KEY mKey { 0 }; MASK mMask { 0 }; diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp deleted file mode 100644 index 38e9ef444c..0000000000 --- a/indra/llcharacter/llstatemachine.cpp +++ /dev/null @@ -1,384 +0,0 @@ -/** - * @file llstatemachine.cpp - * @brief LLStateMachine implementation file. - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "linden_common.h" - -#include "llstatemachine.h" -#include "llapr.h" - -#define FSM_PRINT_STATE_TRANSITIONS (0) - -U32 LLUniqueID::sNextID = 0; - -bool operator==(const LLUniqueID &a, const LLUniqueID &b) -{ - return (a.mId == b.mId); -} - -bool operator!=(const LLUniqueID &a, const LLUniqueID &b) -{ - return (a.mId != b.mId); -} - -//----------------------------------------------------------------------------- -// LLStateDiagram -//----------------------------------------------------------------------------- -LLStateDiagram::LLStateDiagram() -{ - mDefaultState = NULL; - mUseDefaultState = false; -} - -LLStateDiagram::~LLStateDiagram() -{ - -} - -// add a state to the state graph -bool LLStateDiagram::addState(LLFSMState *state) -{ - mStates[state] = Transitions(); - return true; -} - -// add a directed transition between 2 states -bool LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) -{ - StateMap::iterator state_it; - state_it = mStates.find(&start_state); - Transitions* state_transitions = NULL; - if (state_it == mStates.end() ) - { - addState(&start_state); - state_transitions = &mStates[&start_state]; - } - else - { - state_transitions = &state_it->second; - } - state_it = mStates.find(&end_state); - if (state_it == mStates.end() ) - { - addState(&end_state); - } - - Transitions::iterator transition_it = state_transitions->find(&transition); - if (transition_it != state_transitions->end()) - { - LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL; - return false; // transition already exists - } - - (*state_transitions)[&transition] = &end_state; - return true; -} - -// add an undirected transition between 2 states -bool LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) -{ - bool result; - result = addTransition(start_state, end_state, transition); - if (result) - { - result = addTransition(end_state, start_state, transition); - } - return result; -} - -// add a transition that exists for every state -void LLStateDiagram::addDefaultTransition(LLFSMState& end_state, LLFSMTransition& transition) -{ - mDefaultTransitions[&transition] = &end_state; -} - -// process a possible transition, and get the resulting state -LLFSMState* LLStateDiagram::processTransition(LLFSMState& start_state, LLFSMTransition& transition) -{ - // look up transition - //LLFSMState** dest_state = (mStates.getValue(&start_state))->getValue(&transition); - LLFSMState* dest_state = NULL; - StateMap::iterator state_it = mStates.find(&start_state); - if (state_it == mStates.end()) - { - return NULL; - } - Transitions::iterator transition_it = state_it->second.find(&transition); - - // try default transitions if state-specific transition not found - if (transition_it == state_it->second.end()) - { - dest_state = mDefaultTransitions[&transition]; - } - else - { - dest_state = transition_it->second; - } - - // if we have a destination state... - if (NULL != dest_state) - { - // ...return it... - return dest_state; - } - // ... otherwise ... - else - { - // ...look for default state... - if (mUseDefaultState) - { - // ...return it if we have it... - return mDefaultState; - } - else - { - // ...or else we're still in the same state. - return &start_state; - } - } -} - -void LLStateDiagram::setDefaultState(LLFSMState& default_state) -{ - mUseDefaultState = true; - mDefaultState = &default_state; -} - -S32 LLStateDiagram::numDeadendStates() -{ - S32 numDeadends = 0; - for (StateMap::value_type& state_pair : mStates) - { - if (state_pair.second.size() == 0) - { - numDeadends++; - } - } - return numDeadends; -} - -bool LLStateDiagram::stateIsValid(LLFSMState& state) -{ - if (mStates.find(&state) != mStates.end()) - { - return true; - } - return false; -} - -LLFSMState* LLStateDiagram::getState(U32 state_id) -{ - for (StateMap::value_type& state_pair : mStates) - { - if (state_pair.first->getID() == state_id) - { - return state_pair.first; - } - } - return NULL; -} - -bool LLStateDiagram::saveDotFile(const std::string& filename) -{ - LLAPRFile outfile ; - outfile.open(filename, LL_APR_W); - apr_file_t* dot_file = outfile.getFileHandle() ; - - if (!dot_file) - { - LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL; - return false; - } - apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); - - for (StateMap::value_type& state_pair : mStates) - { - apr_file_printf(dot_file, "\t\"%s\" [fontsize=28,shape=box]\n", state_pair.first->getName().c_str()); - } - apr_file_printf(dot_file, "\t\"All States\" [fontsize=30,style=bold,shape=box]\n"); - - for (Transitions::value_type& transition_pair : mDefaultTransitions) - { - apr_file_printf(dot_file, "\t\"All States\" -> \"%s\" [label = \"%s\",fontsize=24];\n", transition_pair.second->getName().c_str(), - transition_pair.second->getName().c_str()); - } - - if (mDefaultState) - { - apr_file_printf(dot_file, "\t\"All States\" -> \"%s\";\n", mDefaultState->getName().c_str()); - } - - - for (StateMap::value_type& state_pair : mStates) - { - LLFSMState *state = state_pair.first; - - for (Transitions::value_type& transition_pair : state_pair.second) - { - std::string state_name = state->getName(); - std::string target_name = transition_pair.second->getName(); - std::string transition_name = transition_pair.first->getName(); - apr_file_printf(dot_file, "\t\"%s\" -> \"%s\" [label = \"%s\",fontsize=24];\n", state->getName().c_str(), - target_name.c_str(), - transition_name.c_str()); - } - } - - apr_file_printf(dot_file, "}\n"); - - return true; -} - -std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM) -{ - if (FSM.mDefaultState) - { - s << "Default State: " << FSM.mDefaultState->getName() << "\n"; - } - - for (LLStateDiagram::Transitions::value_type& transition_pair : FSM.mDefaultTransitions) - { - s << "Any State -- " << transition_pair.first->getName() - << " --> " << transition_pair.second->getName() << "\n"; - } - - for (LLStateDiagram::StateMap::value_type& state_pair : FSM.mStates) - { - for (LLStateDiagram::Transitions::value_type& transition_pair : state_pair.second) - { - s << state_pair.first->getName() << " -- " << transition_pair.first->getName() - << " --> " << transition_pair.second->getName() << "\n"; - } - s << "\n"; - } - - return s; -} - -//----------------------------------------------------------------------------- -// LLStateMachine -//----------------------------------------------------------------------------- - -LLStateMachine::LLStateMachine() -{ - // we haven't received a starting state yet - mCurrentState = NULL; - mLastState = NULL; - mLastTransition = NULL; - mStateDiagram = NULL; -} - -LLStateMachine::~LLStateMachine() -{ - -} - -// returns current state -LLFSMState* LLStateMachine::getCurrentState() const -{ - return mCurrentState; -} - -// executes current state -void LLStateMachine::runCurrentState(void *data) -{ - mCurrentState->execute(data); -} - -// set current state -bool LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry) -{ - llassert(mStateDiagram); - - if (mStateDiagram->stateIsValid(*initial_state)) - { - mLastState = mCurrentState = initial_state; - if (!skip_entry) - { - initial_state->onEntry(user_data); - } - return true; - } - - return false; -} - -bool LLStateMachine::setCurrentState(U32 state_id, void* user_data, bool skip_entry) -{ - llassert(mStateDiagram); - - LLFSMState* state = mStateDiagram->getState(state_id); - - if (state) - { - mLastState = mCurrentState = state; - if (!skip_entry) - { - state->onEntry(user_data); - } - return true; - } - - return false; -} - -void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_data) -{ - llassert(mStateDiagram); - - if (NULL == mCurrentState) - { - LL_WARNS() << "mCurrentState == NULL; aborting processTransition()" << LL_ENDL; - return; - } - - LLFSMState* new_state = mStateDiagram->processTransition(*mCurrentState, transition); - - if (NULL == new_state) - { - LL_WARNS() << "new_state == NULL; aborting processTransition()" << LL_ENDL; - return; - } - - mLastTransition = &transition; - mLastState = mCurrentState; - - if (*mCurrentState != *new_state) - { - mCurrentState->onExit(user_data); - mCurrentState = new_state; - mCurrentState->onEntry(user_data); -#if FSM_PRINT_STATE_TRANSITIONS - LL_INFOS() << "Entering state " << mCurrentState->getName() << - " on transition " << transition.getName() << " from state " << - mLastState->getName() << LL_ENDL; -#endif - } -} - -void LLStateMachine::setStateDiagram(LLStateDiagram* diagram) -{ - mStateDiagram = diagram; -} diff --git a/indra/llcharacter/llstatemachine.h b/indra/llcharacter/llstatemachine.h deleted file mode 100644 index 9a33798d96..0000000000 --- a/indra/llcharacter/llstatemachine.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * @file llstatemachine.h - * @brief LLStateMachine class header file. - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLSTATEMACHINE_H -#define LL_LLSTATEMACHINE_H - -#include <string> - -#include "llerror.h" -#include <map> - -class LLUniqueID -{ - friend bool operator==(const LLUniqueID &a, const LLUniqueID &b); - friend bool operator!=(const LLUniqueID &a, const LLUniqueID &b); -protected: - static U32 sNextID; - U32 mId; -public: - LLUniqueID(){mId = sNextID++;} - virtual ~LLUniqueID(){} - U32 getID() {return mId;} -}; - -class LLFSMTransition : public LLUniqueID -{ -public: - LLFSMTransition() : LLUniqueID(){}; - virtual std::string getName()const { return "unnamed"; } -}; - -class LLFSMState : public LLUniqueID -{ -public: - LLFSMState() : LLUniqueID(){}; - virtual void onEntry(void *){}; - virtual void onExit(void *){}; - virtual void execute(void *){}; - virtual std::string getName() const { return "unnamed"; } -}; - -class LLStateDiagram -{ -typedef std::map<LLFSMTransition*, LLFSMState*> Transitions; - -friend std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM); -friend class LLStateMachine; - -protected: - typedef std::map<LLFSMState*, Transitions> StateMap; - StateMap mStates; - Transitions mDefaultTransitions; - LLFSMState* mDefaultState; - bool mUseDefaultState; - -public: - LLStateDiagram(); - virtual ~LLStateDiagram(); - -protected: - // add a state to the state graph, executed implicitly when adding transitions - bool addState(LLFSMState *state); - - // add a directed transition between 2 states - bool addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); - - // add an undirected transition between 2 states - bool addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); - - // add a transition that is taken if none other exist - void addDefaultTransition(LLFSMState& end_state, LLFSMTransition& transition); - - // process a possible transition, and get the resulting state - LLFSMState* processTransition(LLFSMState& start_state, LLFSMTransition& transition); - - // add a transition that exists for every state - void setDefaultState(LLFSMState& default_state); - - // return total number of states with no outgoing transitions - S32 numDeadendStates(); - - // does this state exist in the state diagram? - bool stateIsValid(LLFSMState& state); - - // get a state pointer by ID - LLFSMState* getState(U32 state_id); - -public: - // save the graph in a DOT file for rendering and visualization - bool saveDotFile(const std::string& filename); -}; - -class LLStateMachine -{ -protected: - LLFSMState* mCurrentState; - LLFSMState* mLastState; - LLFSMTransition* mLastTransition; - LLStateDiagram* mStateDiagram; - -public: - LLStateMachine(); - virtual ~LLStateMachine(); - - // set state diagram - void setStateDiagram(LLStateDiagram* diagram); - - // process this transition - void processTransition(LLFSMTransition &transition, void* user_data); - - // returns current state - LLFSMState* getCurrentState() const; - - // execute current state - void runCurrentState(void *data); - - // set state by state pointer - bool setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry = true); - - // set state by unique ID - bool setCurrentState(U32 state_id, void* user_data, bool skip_entry = true); -}; - -#endif //_LL_LLSTATEMACHINE_H diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 3caddb9c62..8d2c4a3723 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -30,7 +30,8 @@ #include "v3math.h" #include "llstring.h" #include "llxmltree.h" -#include <boost/function.hpp> + +#include <functional> class LLPolyMesh; class LLXmlTreeNode; @@ -104,7 +105,7 @@ LL_ALIGN_PREFIX(16) class LLVisualParam { public: - typedef boost::function<LLVisualParam*(S32)> visual_param_mapper; + typedef std::function<LLVisualParam*(S32)> visual_param_mapper; LLVisualParam(); virtual ~LLVisualParam(); diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 55dde5dc42..0aaa7433ce 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -66,6 +66,7 @@ set(llcommon_SOURCE_FILES llmetricperformancetester.cpp llmortician.cpp llmutex.cpp + llpointer.cpp llptrto.cpp llpredicate.cpp llprocess.cpp @@ -99,6 +100,7 @@ set(llcommon_SOURCE_FILES lluri.cpp lluriparser.cpp lluuid.cpp + llwatchdog.cpp llworkerthread.cpp hbxxh.cpp u64.cpp @@ -240,6 +242,7 @@ set(llcommon_HEADER_FILES lluri.h lluriparser.h lluuid.h + llwatchdog.h llwin32headers.h llworkerthread.h hbxxh.h diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index a0394da281..404e0c71ce 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -163,6 +163,28 @@ constexpr U8 SIM_ACCESS_ADULT = 42; // Seriously Adult Only constexpr U8 SIM_ACCESS_DOWN = 254; constexpr U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT; +// map item types +constexpr U32 MAP_ITEM_TELEHUB = 0x01; +constexpr U32 MAP_ITEM_PG_EVENT = 0x02; +constexpr U32 MAP_ITEM_MATURE_EVENT = 0x03; +// constexpr U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW +// constexpr U32 MAP_ITEM_AGENT_COUNT = 0x05; +constexpr U32 MAP_ITEM_AGENT_LOCATIONS = 0x06; +constexpr U32 MAP_ITEM_LAND_FOR_SALE = 0x07; +constexpr U32 MAP_ITEM_CLASSIFIED = 0x08; +constexpr U32 MAP_ITEM_ADULT_EVENT = 0x09; +constexpr U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a; + +// Region map layer numbers +constexpr S32 MAP_SIM_OBJECTS = 0; +constexpr S32 MAP_SIM_TERRAIN = 1; +constexpr S32 MAP_SIM_LAND_FOR_SALE = 2; // Transparent alpha overlay of land for sale +constexpr S32 MAP_SIM_IMAGE_TYPES = 3; // Number of map layers +constexpr S32 MAP_SIM_INFO_MASK = 0x00FFFFFF; // Agent access may be stuffed into upper byte +constexpr S32 MAP_SIM_LAYER_MASK = 0x0000FFFF; // Layer info is in lower 16 bits +constexpr S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000; +constexpr S32 MAP_SIM_PRELUDE = 0x00020000; + // attachment constants constexpr U8 ATTACHMENT_ADD = 0x80; diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index c532620daa..f92bb98ba6 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -93,6 +93,7 @@ bool LLApp::sDisableCrashlogger = false; LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED}; LLAppErrorHandler LLApp::sErrorHandler = NULL; +bool gDisconnected = false; LLApp::LLApp() { diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index 57f5a112d9..3a855bc480 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -50,6 +50,8 @@ void clear_signals(); #endif +extern bool gDisconnected; + class LL_COMMON_API LLApp { public: @@ -283,6 +285,7 @@ public: #ifdef LL_WINDOWS virtual bool reportCrashToBugsplat(void* pExcepInfo /*EXCEPTION_POINTERS*/) { return false; } + virtual bool reportCustomToBugsplat(const std::string& description) { return false; } #endif public: diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 04aba817f8..51c814a387 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -154,7 +154,7 @@ LLVolatileAPRPool::LLVolatileAPRPool(bool is_local, apr_pool_t *parent, apr_size //create mutex if(!is_local) //not a local apr_pool, that is: shared by multiple threads. { - mMutexp.reset(new std::mutex()); + mMutexp = std::make_unique<std::mutex>(); } } diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index 13597d56a4..d9f1a31575 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -33,7 +33,6 @@ #include <sys/param.h> // Need PATH_MAX in APR headers... #endif -#include <boost/noncopyable.hpp> #include "llwin32headers.h" #include "apr_thread_proc.h" #include "apr_getopt.h" @@ -146,7 +145,7 @@ private: // 2, a global pool. // -class LL_COMMON_API LLAPRFile : boost::noncopyable +class LL_COMMON_API LLAPRFile { // make this non copyable since a copy closes the file private: @@ -154,9 +153,12 @@ private: LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool. public: - LLAPRFile() ; + LLAPRFile(); LLAPRFile(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL); - ~LLAPRFile() ; + ~LLAPRFile(); + + LLAPRFile(const LLAPRFile&) = delete; + LLAPRFile& operator=(const LLAPRFile&) = delete; apr_status_t open(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL, S32* sizep = NULL); apr_status_t open(const std::string& filename, apr_int32_t flags, bool use_global_pool); //use gAPRPoolp. diff --git a/indra/llcommon/llcallbacklist.h b/indra/llcommon/llcallbacklist.h index d6c415f7c5..036e575117 100644 --- a/indra/llcommon/llcallbacklist.h +++ b/indra/llcommon/llcallbacklist.h @@ -27,8 +27,9 @@ #ifndef LL_LLCALLBACKLIST_H #define LL_LLCALLBACKLIST_H -#include "llstl.h" -#include <boost/function.hpp> +#include "stdtypes.h" + +#include <functional> #include <list> class LLCallbackList @@ -59,8 +60,8 @@ protected: callback_list_t mCallbackList; }; -typedef boost::function<void ()> nullary_func_t; -typedef boost::function<bool ()> bool_func_t; +typedef std::function<void ()> nullary_func_t; +typedef std::function<bool ()> bool_func_t; // Call a given callable once in idle loop. void doOnIdleOneTime(nullary_func_t callable); diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index c3820ae987..9df52b6ed5 100644 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -37,7 +37,7 @@ #include "mutex.h" #include "llsingleton.h" #include "llinstancetracker.h" -#include <boost/function.hpp> +#include <functional> #include <string> #include <exception> #include <queue> @@ -112,7 +112,7 @@ public: /// stuck with the term "coroutine." typedef boost::fibers::fiber coro; /// Canonical callable type - typedef boost::function<void()> callable_t; + typedef std::function<void()> callable_t; /** * Create and start running a new coroutine with specified name. The name diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 5205699b92..5545bb71af 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -41,6 +41,9 @@ #include "llstring.h" #include "llfasttimer.h" +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> + static const F64 LL_APR_USEC_PER_SEC = 1000000.0; // should be APR_USEC_PER_SEC, but that relies on INT64_C which // isn't defined in glib under our build set up for some reason @@ -64,7 +67,7 @@ std::string LLDate::asString() const { std::ostringstream stream; toStream(stream); - return stream.str(); + return std::move(stream).str(); } //@ brief Converts time in seconds since EPOCH @@ -184,7 +187,7 @@ bool LLDate::split(S32 *year, S32 *month, S32 *day, S32 *hour, S32 *min, S32 *se bool LLDate::fromString(const std::string& iso8601_date) { - std::istringstream stream(iso8601_date); + boost::iostreams::stream<boost::iostreams::array_source> stream(iso8601_date.data(), iso8601_date.size()); return fromStream(stream); } diff --git a/indra/llcommon/lldeadmantimer.h b/indra/llcommon/lldeadmantimer.h index 3f10420d41..19d65b78b6 100644 --- a/indra/llcommon/lldeadmantimer.h +++ b/indra/llcommon/lldeadmantimer.h @@ -99,13 +99,10 @@ public: /// during updates. If false, cpu usage data isn't /// collected and will be zero if queried. LLDeadmanTimer(F64 horizon, bool inc_cpu); + ~LLDeadmanTimer() = default; - ~LLDeadmanTimer() - {} - -private: - LLDeadmanTimer(const LLDeadmanTimer &); // Not defined - void operator=(const LLDeadmanTimer &); // Not defined + LLDeadmanTimer(const LLDeadmanTimer &) = delete; + LLDeadmanTimer& operator=(const LLDeadmanTimer&) = delete; public: /// Get the current time. Zero-basis for this time diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h index 47b6fedc7d..a1b5c83caf 100644 --- a/indra/llcommon/lldependencies.h +++ b/indra/llcommon/lldependencies.h @@ -30,6 +30,7 @@ #if ! defined(LL_LLDEPENDENCIES_H) #define LL_LLDEPENDENCIES_H +#include <functional> #include <string> #include <vector> #include <set> @@ -38,7 +39,6 @@ #include <boost/iterator/transform_iterator.hpp> #include <boost/iterator/indirect_iterator.hpp> #include <boost/range/iterator_range.hpp> -#include <boost/function.hpp> #include <boost/bind.hpp> #include "llexception.h" @@ -217,7 +217,7 @@ class LLDependencies: public LLDependenciesBase /// We have various ways to get the dependencies for a given DepNode. /// Rather than having to restate each one for 'after' and 'before' /// separately, pass a dep_selector so we can apply each to either. - typedef boost::function<const typename DepNode::dep_set&(const DepNode&)> dep_selector; + typedef std::function<const typename DepNode::dep_set&(const DepNode&)> dep_selector; public: LLDependencies() {} @@ -340,7 +340,7 @@ private: public: /// iterator over value_type entries - typedef boost::transform_iterator<boost::function<value_type(DepNodeMapEntry&)>, + typedef boost::transform_iterator<std::function<value_type(DepNodeMapEntry&)>, typename DepNodeMap::iterator> iterator; /// range over value_type entries typedef boost::iterator_range<iterator> range; @@ -352,7 +352,7 @@ public: } /// iterator over const_value_type entries - typedef boost::transform_iterator<boost::function<const_value_type(const DepNodeMapEntry&)>, + typedef boost::transform_iterator<std::function<const_value_type(const DepNodeMapEntry&)>, typename DepNodeMap::const_iterator> const_iterator; /// range over const_value_type entries typedef boost::iterator_range<const_iterator> const_range; @@ -364,7 +364,7 @@ public: } /// iterator over stored NODEs - typedef boost::transform_iterator<boost::function<NODE&(DepNodeMapEntry&)>, + typedef boost::transform_iterator<std::function<NODE&(DepNodeMapEntry&)>, typename DepNodeMap::iterator> node_iterator; /// range over stored NODEs typedef boost::iterator_range<node_iterator> node_range; @@ -380,7 +380,7 @@ public: } /// const iterator over stored NODEs - typedef boost::transform_iterator<boost::function<const NODE&(const DepNodeMapEntry&)>, + typedef boost::transform_iterator<std::function<const NODE&(const DepNodeMapEntry&)>, typename DepNodeMap::const_iterator> const_node_iterator; /// const range over stored NODEs typedef boost::iterator_range<const_node_iterator> const_node_range; @@ -396,7 +396,7 @@ public: } /// const iterator over stored KEYs - typedef boost::transform_iterator<boost::function<const KEY&(const DepNodeMapEntry&)>, + typedef boost::transform_iterator<std::function<const KEY&(const DepNodeMapEntry&)>, typename DepNodeMap::const_iterator> const_key_iterator; /// const range over stored KEYs typedef boost::iterator_range<const_key_iterator> const_key_range; diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h index 25039c3e9c..ad4dc57d58 100644 --- a/indra/llcommon/lldoubledispatch.h +++ b/indra/llcommon/lldoubledispatch.h @@ -30,9 +30,7 @@ #define LL_LLDOUBLEDISPATCH_H #include <list> -#include <boost/function.hpp> -#include <boost/bind.hpp> -#include <boost/ref.hpp> +#include <functional> /** * This class supports function calls which are virtual on the dynamic type of @@ -156,9 +154,9 @@ public: insert(t1, t2, func); if (symmetrical) { - // Use boost::bind() to construct a param-swapping thunk. Don't + // Use std::bind() to construct a param-swapping thunk. Don't // forget to reverse the parameters too. - insert(t2, t1, boost::bind(func, _2, _1)); + insert(t2, t1, std::bind(func, std::placeholders::_2, std::placeholders::_1)); } } @@ -193,7 +191,7 @@ public: insert(Type<Type1>(), Type<Type2>(), func, insertion); if (symmetrical) { - insert(Type<Type2>(), Type<Type1>(), boost::bind(func, _2, _1), insertion); + insert(Type<Type2>(), Type<Type1>(), std::bind(func, std::placeholders::_2, std::placeholders::_1), insertion); } } @@ -271,8 +269,8 @@ private: typename DispatchTable::iterator find(const ParamBaseType& param1, const ParamBaseType& param2) { return std::find_if(mDispatch.begin(), mDispatch.end(), - boost::bind(&EntryBase::matches, _1, - boost::ref(param1), boost::ref(param2))); + std::bind(&EntryBase::matches, std::placeholders::_1, + std::ref(param1), std::ref(param2))); } /// Look up the first matching entry. diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 3411e9c6bb..6f5e57c3de 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -480,7 +480,7 @@ namespace } - typedef std::map<std::string, LLError::ELevel> LevelMap; + typedef std::unordered_map<std::string, LLError::ELevel> LevelMap; typedef std::vector<LLError::RecorderPtr> Recorders; typedef std::vector<LLError::CallSite*> CallSiteVector; @@ -501,7 +501,7 @@ namespace LevelMap mClassLevelMap; LevelMap mFileLevelMap; LevelMap mTagLevelMap; - std::map<std::string, unsigned int> mUniqueLogMessages; + std::unordered_map<std::string, unsigned int> mUniqueLogMessages; LLError::FatalFunction mCrashFunction; LLError::TimeFunction mTimeFunction; @@ -527,8 +527,8 @@ namespace mFileLevelMap(), mTagLevelMap(), mUniqueLogMessages(), - mCrashFunction(NULL), - mTimeFunction(NULL), + mCrashFunction(nullptr), + mTimeFunction(nullptr), mRecorders(), mShouldLogCallCounter(0) { @@ -1231,7 +1231,7 @@ namespace std::ostringstream message_stream; - if (r->wantsTime() && s->mTimeFunction != NULL) + if (r->wantsTime() && s->mTimeFunction != nullptr) { message_stream << s->mTimeFunction(); } @@ -1404,7 +1404,7 @@ namespace LLError { std::ostringstream message_stream; - std::map<std::string, unsigned int>::iterator messageIter = s->mUniqueLogMessages.find(message); + auto messageIter = s->mUniqueLogMessages.find(message); if (messageIter != s->mUniqueLogMessages.end()) { messageIter->second++; diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index 0a7b3d2046..3c58d1df22 100644 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -31,7 +31,7 @@ #include "llerror.h" #include "llpointer.h" #include "llrefcount.h" -#include "boost/function.hpp" +#include <functional> #include <string> class LLSD; @@ -70,7 +70,6 @@ namespace LLError Setting a level means log messages at that level or above. */ - LL_COMMON_API void setPrintLocation(bool); LL_COMMON_API void setDefaultLevel(LLError::ELevel); LL_COMMON_API ELevel getDefaultLevel(); LL_COMMON_API void setAlwaysFlush(bool flush); @@ -92,7 +91,7 @@ namespace LLError Control functions. */ - typedef boost::function<void(const std::string&)> FatalFunction; + typedef std::function<void(const std::string&)> FatalFunction; LL_COMMON_API void setFatalFunction(const FatalFunction&); // The fatal function will be called after an message of LEVEL_ERROR diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp index e1fc4764f6..bb2cd4fb2e 100644 --- a/indra/llcommon/lleventcoro.cpp +++ b/indra/llcommon/lleventcoro.cpp @@ -137,6 +137,18 @@ void llcoro::suspendUntilTimeout(float seconds) suspendUntilEventOnWithTimeout(bogus, seconds, timedout); } +void llcoro::suspendUntilNextFrame() +{ + LLCoros::checkStop(); + LLCoros::TempStatus st("waiting for next frame"); + + // Listen for the next event on the "mainloop" event pump. + // Once per frame we get mainloop.post(newFrame); + LLEventPumpOrPumpName mainloop_pump("mainloop"); + // Wait for the next event (the event data is ignored). + suspendUntilEventOn(mainloop_pump); +} + namespace { diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index 492563bb98..25a8a98e36 100644 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -85,6 +85,11 @@ void suspend(); void suspendUntilTimeout(float seconds); /** + * Yield control from a coroutine until the next mainloop's newFrame event. + */ +void suspendUntilNextFrame(); + +/** * Post specified LLSD event on the specified LLEventPump, then suspend for a * response on specified other LLEventPump. This is more than mere * convenience: the difference between this function and the sequence diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index 4c3c0f3414..97a60e2829 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -33,9 +33,7 @@ #define LL_LLEVENTDISPATCHER_H #include <boost/fiber/fss.hpp> -#include <boost/function_types/is_member_function_pointer.hpp> #include <boost/function_types/is_nonmember_callable_builtin.hpp> -#include <boost/hof/is_invocable.hpp> // until C++17, when we get std::is_invocable #include <boost/iterator/transform_iterator.hpp> #include <functional> // std::function #include <memory> // std::unique_ptr @@ -99,7 +97,7 @@ public: template <typename CALLABLE, typename=typename std::enable_if< - boost::hof::is_invocable<CALLABLE, LLSD>::value + std::is_invocable<CALLABLE, LLSD>::value >::type> void add(const std::string& name, const std::string& desc, @@ -295,9 +293,8 @@ public: * converted to the corresponding parameter type using LLSDParam. */ template <typename CALLABLE, - typename=typename std::enable_if< - ! boost::hof::is_invocable<CALLABLE, LLSD>() - >::type> + typename=typename std::enable_if_t< + ! std::is_invocable<CALLABLE, LLSD>()>> void add(const std::string& name, const std::string& desc, CALLABLE&& f) @@ -318,7 +315,7 @@ public: */ template<typename Method, typename InstanceGetter, typename = typename std::enable_if< - boost::function_types::is_member_function_pointer<Method>::value && + std::is_member_function_pointer<Method>::value && ! std::is_convertible<InstanceGetter, LLSD>::value >::type> void add(const std::string& name, const std::string& desc, Method f, @@ -338,7 +335,7 @@ public: template<typename Function, typename = typename std::enable_if< boost::function_types::is_nonmember_callable_builtin<Function>::value && - ! boost::hof::is_invocable<Function, LLSD>::value + ! std::is_invocable<Function, LLSD>::value >::type> void add(const std::string& name, const std::string& desc, Function f, const LLSD& params, const LLSD& defaults=LLSD()); @@ -364,7 +361,7 @@ public: */ template<typename Method, typename InstanceGetter, typename = typename std::enable_if< - boost::function_types::is_member_function_pointer<Method>::value && + std::is_member_function_pointer<Method>::value && ! std::is_convertible<InstanceGetter, LLSD>::value >::type> void add(const std::string& name, const std::string& desc, Method f, diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h index d8c7e15a27..8b917c23be 100644 --- a/indra/llcommon/lleventfilter.h +++ b/indra/llcommon/lleventfilter.h @@ -33,7 +33,8 @@ #include "stdtypes.h" #include "lltimer.h" #include "llsdutil.h" -#include <boost/function.hpp> + +#include <functional> class LLEventTimer; class LLDate; @@ -92,8 +93,8 @@ public: /// construct and connect LLEventTimeoutBase(LLEventPump& source); - /// Callable, can be constructed with boost::bind() - typedef boost::function<void()> Action; + /// Callable, can be constructed with std::bind() + typedef std::function<void()> Action; /** * Start countdown timer for the specified number of @a seconds. Forward diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 3c6743eac9..9a5324b598 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -44,7 +44,6 @@ #include <cmath> #include <cctype> // external library headers -#include <boost/range/iterator_range.hpp> #if LL_WINDOWS #pragma warning (push) #pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h index 4bf1fa07a2..18c05a0081 100644 --- a/indra/llcommon/llevents.h +++ b/indra/llcommon/llevents.h @@ -41,11 +41,7 @@ #include <boost/signals2.hpp> #include <boost/bind.hpp> -#include <boost/utility.hpp> // noncopyable #include <boost/optional/optional.hpp> -#include <boost/visit_each.hpp> -#include <boost/ref.hpp> // reference_wrapper -#include <boost/type_traits/is_pointer.hpp> #include <boost/static_assert.hpp> #include "llsd.h" #include "llsingleton.h" diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index fde168b022..a3f8d02463 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -31,6 +31,9 @@ #include "lltrace.h" #include "lltreeiterators.h" #include "llprocessor.h" +#if _M_ARM64 +#include "llmutex.h" +#endif #if LL_X86 || LL_X86_64 #if LL_WINDOWS diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index a539e4fe28..f752e31563 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -187,13 +187,34 @@ static unsigned short get_fileattr(const std::wstring& utf16path, bool dontFollo CloseHandle(file_handle); return st_mode; } + // Retrieve last error before calling CloseHandle() + DWORD last_error = GetLastError(); + CloseHandle(file_handle); + set_errno_from_oserror(last_error); + } + else + { + set_errno_from_oserror(GetLastError()); } - // Retrieve last error and set errno before calling CloseHandle() - set_errno_from_oserror(GetLastError()); - if (file_handle != INVALID_HANDLE_VALUE) + // If CreateFileW approach failed (e.g., exFAT), try the simpler GetFileAttributesW() + // GetFileAttributesW() always follows symlinks, so we skip this fallback when dontFollowSymLink is true. + if (!dontFollowSymLink) { - CloseHandle(file_handle); + DWORD attributes = GetFileAttributesW(utf16path.c_str()); + if (attributes != INVALID_FILE_ATTRIBUTES) + { + bool is_directory = (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0; + unsigned short st_mode = is_directory ? S_IFDIR : S_IFREG; + st_mode |= (attributes & FILE_ATTRIBUTE_READONLY) ? S_IREAD : S_IREAD | S_IWRITE; + + // propagate user bits to group/other fields: + st_mode |= (st_mode & 0700) >> 3; + st_mode |= (st_mode & 0700) >> 6; + + return st_mode; + } + set_errno_from_oserror(GetLastError()); } return 0; } diff --git a/indra/llcommon/llhandle.h b/indra/llcommon/llhandle.h index ceea1d9c48..fd7d32e79a 100644 --- a/indra/llcommon/llhandle.h +++ b/indra/llcommon/llhandle.h @@ -31,8 +31,6 @@ #include "llrefcount.h" #include "llexception.h" #include <stdexcept> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> #include <boost/throw_exception.hpp> /** @@ -90,7 +88,7 @@ public: LLHandle() : mTombStone(getDefaultTombStone()) {} template<typename U> - LLHandle(const LLHandle<U>& other, typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0) + LLHandle(const LLHandle<U>& other, typename std::enable_if_t<std::is_convertible_v<U*, T*>>* dummy = 0) : mTombStone(other.mTombStone) {} @@ -199,7 +197,7 @@ public: } template <typename U> - LLHandle<U> getDerivedHandle(typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0) const + LLHandle<U> getDerivedHandle(typename std::enable_if_t<std::is_convertible_v<U*, T*> >* dummy = 0) const { LLHandle<U> downcast_handle; downcast_handle.mTombStone = getHandle().mTombStone; diff --git a/indra/llcommon/llheteromap.cpp b/indra/llcommon/llheteromap.cpp index 823bea7a3c..03dd7856b6 100644 --- a/indra/llcommon/llheteromap.cpp +++ b/indra/llcommon/llheteromap.cpp @@ -27,6 +27,6 @@ LLHeteroMap::~LLHeteroMap() // pair.second is the std::pair; pair.second.first is the void*; // pair.second.second points to the deleter function (pair.second.second)(pair.second.first); - pair.second.first = NULL; + pair.second.first = nullptr; } } diff --git a/indra/llcommon/llheteromap.h b/indra/llcommon/llheteromap.h index d8e6fefb17..211dfaae83 100644 --- a/indra/llcommon/llheteromap.h +++ b/indra/llcommon/llheteromap.h @@ -12,9 +12,10 @@ #if ! defined(LL_LLHETEROMAP_H) #define LL_LLHETEROMAP_H +#include <typeindex> #include <typeinfo> #include <utility> // std::pair -#include <map> +#include <unordered_map> /** * LLHeteroMap addresses an odd requirement. Usually when you want to put @@ -43,7 +44,7 @@ public: // Look up map entry by typeid(T). We don't simply use mMap[typeid(T)] // because that requires default-constructing T on every lookup. For // some kinds of T, that could be expensive. - TypeMap::iterator found = mMap.find(&typeid(T)); + TypeMap::iterator found = mMap.find(typeid(T)); if (found == mMap.end()) { // Didn't find typeid(T). Create an entry. Because we're storing @@ -52,8 +53,8 @@ public: void* ptr = new T(); void (*dlfn)(void*) = &deleter<T>; std::pair<TypeMap::iterator, bool> inserted = - mMap.insert(TypeMap::value_type(&typeid(T), - TypeMap::mapped_type(ptr, dlfn))); + mMap.emplace(typeid(T), + TypeMap::mapped_type(ptr, dlfn)); // Okay, now that we have an entry, claim we found it. found = inserted.first; } @@ -71,23 +72,9 @@ private: delete static_cast<T*>(p); } - // Comparing two std::type_info* values is tricky, because the standard - // does not guarantee that there will be only one type_info instance for a - // given type. In other words, &typeid(A) in one part of the program may - // not always equal &typeid(A) in some other part. Use special comparator. - struct type_info_ptr_comp - { - bool operator()(const std::type_info* lhs, const std::type_info* rhs) const - { - return lhs->before(*rhs); - } - }; - - // What we actually store is a map from std::type_info (permitting lookup + // What we actually store is a map from std::type_index (permitting lookup // by object type) to a void* pointer to the object PLUS its deleter. - typedef std::map< - const std::type_info*, std::pair<void*, void (*)(void*)>, - type_info_ptr_comp> + typedef std::unordered_map<std::type_index, std::pair<void*, void (*)(void*)>> TypeMap; TypeMap mMap; }; diff --git a/indra/llcommon/llinitdestroyclass.h b/indra/llcommon/llinitdestroyclass.h index 2354c9f2ed..7cc9c6b930 100644 --- a/indra/llcommon/llinitdestroyclass.h +++ b/indra/llcommon/llinitdestroyclass.h @@ -37,7 +37,7 @@ #define LL_LLINITDESTROYCLASS_H #include "llsingleton.h" -#include <boost/function.hpp> +#include <functional> #include <typeinfo> #include <vector> #include <utility> // std::pair @@ -50,7 +50,7 @@ class LLCallbackRegistry { public: - typedef boost::function<void()> func_t; + typedef std::function<void()> func_t; void registerCallback(const std::string& name, const func_t& func) { diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 32d7b17034..b220afadfc 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -28,12 +28,12 @@ #ifndef LL_LLPARAM_H #define LL_LLPARAM_H +#include <functional> +#include <type_traits> #include <vector> #include <list> +#include <unordered_map> #include <boost/function.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/type_traits/is_enum.hpp> -#include <boost/unordered_map.hpp> #include "llerror.h" #include "llstl.h" @@ -105,6 +105,26 @@ namespace LLTypeTags }; } +namespace ll +{ + // Primary template: general case is false + template<typename T> + struct is_std_function : std::false_type + { + }; + + // Specialization for std::function + // R is the return type, Args is a parameter pack for argument types + template<typename R, typename... Args> + struct is_std_function<std::function<R(Args...)>> : std::true_type + { + }; + + // Helper variable template for convenience (C++14 onwards) + template<typename T> + constexpr bool is_std_function_v = is_std_function<T>::value; +} + namespace LLInitParam { // used to indicate no matching value to a given name when parsing @@ -114,7 +134,7 @@ namespace LLInitParam // wraps comparison operator between any 2 values of the same type // specialize to handle cases where equality isn't defined well, or at all - template <typename T, bool IS_BOOST_FUNCTION = boost::is_convertible<T, boost::function_base>::value > + template <typename T, bool IS_BOOST_FUNCTION = std::is_constructible_v<T, boost::function_base> || ll::is_std_function_v<T>> struct ParamCompare { static bool equals(const T &a, const T &b) @@ -123,7 +143,7 @@ namespace LLInitParam } }; - // boost function types are not comparable + // boost and std function types are not comparable template<typename T> struct ParamCompare<T, true> { @@ -246,7 +266,7 @@ namespace LLInitParam private: struct Inaccessable{}; public: - typedef std::map<std::string, T> value_name_map_t; + typedef std::unordered_map<std::string, T> value_name_map_t; typedef Inaccessable name_t; typedef TypeValues<T> type_value_t; typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; @@ -273,7 +293,7 @@ namespace LLInitParam static std::vector<std::string>* getPossibleValues() { - return NULL; + return nullptr; } void assignNamedValue(const Inaccessable& name) @@ -289,7 +309,7 @@ namespace LLInitParam return param_value_t::getValue(); } - static value_name_map_t* getValueNames() {return NULL;} + static value_name_map_t* getValueNames() { return nullptr; } }; // helper class to implement name value lookups @@ -300,7 +320,7 @@ namespace LLInitParam { typedef TypeValuesHelper<T, DERIVED_TYPE, IS_SPECIALIZED> self_t; public: - typedef typename std::map<std::string, T> value_name_map_t; + typedef typename std::unordered_map<std::string, T> value_name_map_t; typedef std::string name_t; typedef self_t type_value_t; typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; @@ -474,11 +494,11 @@ namespace LLInitParam typedef bool (*parser_read_func_t)(Parser& parser, void* output); typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&); - typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t; + typedef std::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t; - typedef std::map<const std::type_info*, parser_read_func_t> parser_read_func_map_t; - typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t; - typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t; + typedef std::unordered_map<std::type_index, parser_read_func_t> parser_read_func_map_t; + typedef std::unordered_map<std::type_index, parser_write_func_t> parser_write_func_map_t; + typedef std::unordered_map<std::type_index, parser_inspect_func_t> parser_inspect_func_map_t; public: @@ -491,9 +511,9 @@ namespace LLInitParam virtual ~Parser(); - template <typename T> bool readValue(T& param, typename boost::disable_if<boost::is_enum<T> >::type* dummy = 0) + template <typename T> bool readValue(T& param, typename std::enable_if_t<!std::is_enum_v<T>>* dummy = 0) { - parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); + parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(typeid(T)); if (found_it != mParserReadFuncs->end()) { return found_it->second(*this, (void*)¶m); @@ -502,16 +522,16 @@ namespace LLInitParam return false; } - template <typename T> bool readValue(T& param, typename boost::enable_if<boost::is_enum<T> >::type* dummy = 0) + template <typename T> bool readValue(T& param, typename std::enable_if_t<std::is_enum_v<T> >* dummy = 0) { - parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); + parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(typeid(T)); if (found_it != mParserReadFuncs->end()) { return found_it->second(*this, (void*)¶m); } else { - found_it = mParserReadFuncs->find(&typeid(S32)); + found_it = mParserReadFuncs->find(typeid(S32)); if (found_it != mParserReadFuncs->end()) { S32 int_value; @@ -525,7 +545,7 @@ namespace LLInitParam template <typename T> bool writeValue(const T& param, name_stack_t& name_stack) { - parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); + parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(typeid(T)); if (found_it != mParserWriteFuncs->end()) { return found_it->second(*this, (const void*)¶m, name_stack); @@ -536,7 +556,7 @@ namespace LLInitParam // dispatch inspection to registered inspection functions, for each parameter in a param block template <typename T> bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values) { - parser_inspect_func_map_t::iterator found_it = mParserInspectFuncs->find(&typeid(T)); + parser_inspect_func_map_t::iterator found_it = mParserInspectFuncs->find(typeid(T)); if (found_it != mParserInspectFuncs->end()) { found_it->second(name_stack, min_count, max_count, possible_values); @@ -553,16 +573,16 @@ namespace LLInitParam protected: template <typename T> - void registerParserFuncs(parser_read_func_t read_func, parser_write_func_t write_func = NULL) + void registerParserFuncs(parser_read_func_t read_func, parser_write_func_t write_func = nullptr) { - mParserReadFuncs->insert(std::make_pair(&typeid(T), read_func)); - mParserWriteFuncs->insert(std::make_pair(&typeid(T), write_func)); + mParserReadFuncs->emplace(typeid(T), read_func); + mParserWriteFuncs->emplace(typeid(T), write_func); } template <typename T> void registerInspectFunc(parser_inspect_func_t inspect_func) { - mParserInspectFuncs->insert(std::make_pair(&typeid(T), inspect_func)); + mParserInspectFuncs->emplace(typeid(T), inspect_func); } bool mParseSilently; @@ -593,7 +613,7 @@ namespace LLInitParam { struct UserData { - virtual ~UserData() {} + virtual ~UserData() = default; }; typedef bool(*merge_func_t)(Param&, const Param&, bool); @@ -644,7 +664,7 @@ namespace LLInitParam void aggregateBlockData(BlockDescriptor& src_block_data); void addParam(ParamDescriptorPtr param, const char* name); - typedef boost::unordered_map<const std::string, ParamDescriptorPtr> param_map_t; + typedef std::unordered_map<std::string, ParamDescriptorPtr, ll::string_hash, std::equal_to<>> param_map_t; typedef std::vector<ParamDescriptorPtr> param_list_t; typedef std::list<ParamDescriptorPtr> all_params_list_t; typedef std::vector<std::pair<param_handle_t, ParamDescriptor::validation_func_t> > param_validation_list_t; @@ -658,38 +678,26 @@ namespace LLInitParam class BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed }; - //TODO: implement in terms of owned_ptr - template<typename T> + // TODO: implement in terms of owned_ptr + template<typename T> class LazyValue - { - public: - LazyValue() - : mPtr(NULL) - {} + { + public: + LazyValue() = default; - ~LazyValue() - { - delete mPtr; - } + ~LazyValue() { delete mPtr; } - LazyValue(const T& value) - { - mPtr = new T(value); - } + LazyValue(const T& value) { mPtr = new T(value); } - LazyValue(const LazyValue& other) - : mPtr(NULL) - { - *this = other; - } + LazyValue(const LazyValue& other) : mPtr(nullptr) { *this = other; } - LazyValue& operator = (const LazyValue& other) - { + LazyValue& operator=(const LazyValue& other) + { if (!other.mPtr) { delete mPtr; - mPtr = NULL; - } + mPtr = nullptr; + } else { if (!mPtr) @@ -700,23 +708,21 @@ namespace LLInitParam { *mPtr = *(other.mPtr); } - } - return *this; } + return *this; + } bool operator==(const LazyValue& other) const { - if (empty() || other.empty()) return false; + if (empty() || other.empty()) + return false; return *mPtr == *other.mPtr; } - bool empty() const - { - return mPtr == NULL; - } + bool empty() const { return mPtr == nullptr; } - void set(const T& other) - { + void set(const T& other) + { if (!mPtr) { mPtr = new T(other); @@ -727,36 +733,26 @@ namespace LLInitParam } } - const T& get() const - { - return *ensureInstance(); - } + const T& get() const { return *ensureInstance(); } - T& get() - { - return *ensureInstance(); - } + T& get() { return *ensureInstance(); } - operator const T&() const - { - return get(); - } + operator const T&() const { return get(); } - private: - // lazily allocate an instance of T - T* ensureInstance() const + private: + // lazily allocate an instance of T + T* ensureInstance() const + { + if (mPtr == nullptr) { - if (mPtr == NULL) - { - mPtr = new T(); - } - return mPtr; + mPtr = new T(); } + return mPtr; + } - private: - - mutable T* mPtr; - }; + private: + mutable T* mPtr = nullptr; + }; // root class of all parameter blocks @@ -843,7 +839,7 @@ namespace LLInitParam mParamProvided(false) {} - virtual ~BaseBlock() {} + virtual ~BaseBlock() = default; bool submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent=false); param_handle_t getHandleFromParam(const Param* param) const; diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp index ada6b9519e..1614cc6e57 100644 --- a/indra/llcommon/llleap.cpp +++ b/indra/llcommon/llleap.cpp @@ -61,7 +61,7 @@ public: // Pass it a callback to our connect() method, so it can send events // from a particular LLEventPump to the plugin without having to know // this class or method name. - mListener(new LLLeapListener( + mListener(std::make_unique<LLLeapListener>( [this](LLEventPump& pump, const std::string& listener) { return connect(pump, listener); })) { diff --git a/indra/llcommon/llleaplistener.h b/indra/llcommon/llleaplistener.h index cad4543d02..f5587d1d68 100644 --- a/indra/llcommon/llleaplistener.h +++ b/indra/llcommon/llleaplistener.h @@ -13,10 +13,9 @@ #define LL_LLLEAPLISTENER_H #include "lleventapi.h" +#include <functional> #include <map> #include <string> -#include <boost/function.hpp> -#include <boost/ptr_container/ptr_map.hpp> /// Listener class implementing LLLeap query/control operations. /// See https://jira.lindenlab.com/jira/browse/DEV-31978. @@ -31,7 +30,7 @@ public: * define the signature for a function that will perform that, and make * our constructor accept such a function. */ - typedef boost::function<LLBoundListener(LLEventPump&, const std::string& listener)> + typedef std::function<LLBoundListener(LLEventPump&, const std::string& listener)> ConnectFunc; LLLeapListener(const ConnectFunc& connect); ~LLLeapListener(); diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h index 62943845a5..f3615a1270 100644 --- a/indra/llcommon/llmutex.h +++ b/indra/llcommon/llmutex.h @@ -29,7 +29,6 @@ #include "stdtypes.h" #include "llthread.h" -#include <boost/noncopyable.hpp> #include "mutex.h" #include <shared_mutex> @@ -249,7 +248,7 @@ private: * The constructor handles the lock, and the destructor handles * the unlock. Instances of this class are <b>not</b> thread safe. */ -class LL_COMMON_API LLScopedLock : private boost::noncopyable +class LL_COMMON_API LLScopedLock { public: /** @@ -265,6 +264,12 @@ public: */ ~LLScopedLock(); + /* + * @brief Non-copyable constructor and operator + */ + LLScopedLock(const LLScopedLock&) = delete; + LLScopedLock& operator=(const LLScopedLock&) = delete; + /** * @brief Check lock. */ diff --git a/indra/llcommon/llpointer.cpp b/indra/llcommon/llpointer.cpp new file mode 100755 index 0000000000..1bb7055b3a --- /dev/null +++ b/indra/llcommon/llpointer.cpp @@ -0,0 +1,43 @@ +/** + * @file llpointer.cpp + * @author Nat Goodspeed + * @date 2024-09-26 + * @brief Implementation for llpointer. + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, 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$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "llpointer.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llerror.h" + +void LLPointerBase::wild_dtor(std::string_view msg) +{ +// LL_WARNS() << msg << LL_ENDL; + llassert_msg(false, msg); +} diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index 048547e4cc..d2dcf530e5 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -26,8 +26,9 @@ #ifndef LLPOINTER_H #define LLPOINTER_H -#include "llerror.h" // *TODO: consider eliminating this -#include "llmutex.h" +#include <functional> +#include <string_view> +#include <utility> // std::swap() //---------------------------------------------------------------------------- // RefCount objects should generally only be accessed by way of LLPointer<>'s @@ -42,8 +43,18 @@ //---------------------------------------------------------------------------- +class LLPointerBase +{ +protected: + // alert the coder that a referenced type's destructor did something very + // strange -- this is in a non-template base class so we can hide the + // implementation in llpointer.cpp + static void wild_dtor(std::string_view msg); +}; + // Note: relies on Type having ref() and unref() methods -template <class Type> class LLPointer +template <class Type> +class LLPointer: public LLPointerBase { public: template<typename Subclass> @@ -60,6 +71,13 @@ public: ref(); } + // Even though the template constructors below accepting + // (const LLPointer<Subclass>&) and (LLPointer<Subclass>&&) appear to + // subsume these specific (const LLPointer<Type>&) and (LLPointer<Type>&&) + // constructors, the compiler recognizes these as The Copy Constructor and + // The Move Constructor, respectively. In other words, even in the + // presence of the LLPointer<Subclass> constructors, we still must specify + // the LLPointer<Type> constructors. LLPointer(const LLPointer<Type>& ptr) : mPointer(ptr.mPointer) { @@ -98,39 +116,52 @@ public: const Type& operator*() const { return *mPointer; } Type& operator*() { return *mPointer; } - operator BOOL() const { return (mPointer != nullptr); } operator bool() const { return (mPointer != nullptr); } bool operator!() const { return (mPointer == nullptr); } bool isNull() const { return (mPointer == nullptr); } bool notNull() const { return (mPointer != nullptr); } operator Type*() const { return mPointer; } - bool operator !=(Type* ptr) const { return (mPointer != ptr); } - bool operator ==(Type* ptr) const { return (mPointer == ptr); } - bool operator ==(const LLPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } - bool operator < (const LLPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } - bool operator > (const LLPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } + template <typename Type1> + bool operator !=(Type1* ptr) const { return (mPointer != ptr); } + template <typename Type1> + bool operator ==(Type1* ptr) const { return (mPointer == ptr); } + template <typename Type1> + bool operator !=(const LLPointer<Type1>& ptr) const { return (mPointer != ptr.mPointer); } + template <typename Type1> + bool operator ==(const LLPointer<Type1>& ptr) const { return (mPointer == ptr.mPointer); } + bool operator < (const LLPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } + bool operator > (const LLPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } LLPointer<Type>& operator =(Type* ptr) { - assign(ptr); + // copy-and-swap idiom, see http://gotw.ca/gotw/059.htm + LLPointer temp(ptr); + using std::swap; // per Swappable convention + swap(*this, temp); return *this; } + // Even though the template assignment operators below accepting + // (const LLPointer<Subclass>&) and (LLPointer<Subclass>&&) appear to + // subsume these specific (const LLPointer<Type>&) and (LLPointer<Type>&&) + // assignment operators, the compiler recognizes these as Copy Assignment + // and Move Assignment, respectively. In other words, even in the presence + // of the LLPointer<Subclass> assignment operators, we still must specify + // the LLPointer<Type> operators. LLPointer<Type>& operator =(const LLPointer<Type>& ptr) { - assign(ptr); + LLPointer temp(ptr); + using std::swap; // per Swappable convention + swap(*this, temp); return *this; } LLPointer<Type>& operator =(LLPointer<Type>&& ptr) { - if (mPointer != ptr.mPointer) - { - unref(); - mPointer = ptr.mPointer; - ptr.mPointer = nullptr; - } + LLPointer temp(std::move(ptr)); + using std::swap; // per Swappable convention + swap(*this, temp); return *this; } @@ -138,28 +169,32 @@ public: template<typename Subclass> LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr) { - assign(ptr.get()); + LLPointer temp(ptr); + using std::swap; // per Swappable convention + swap(*this, temp); return *this; } template<typename Subclass> LLPointer<Type>& operator =(LLPointer<Subclass>&& ptr) { - if (mPointer != ptr.mPointer) - { - unref(); - mPointer = ptr.mPointer; - ptr.mPointer = nullptr; - } + LLPointer temp(std::move(ptr)); + using std::swap; // per Swappable convention + swap(*this, temp); return *this; } // Just exchange the pointers, which will not change the reference counts. static void swap(LLPointer<Type>& a, LLPointer<Type>& b) { - Type* temp = a.mPointer; - a.mPointer = b.mPointer; - b.mPointer = temp; + using std::swap; // per Swappable convention + swap(a.mPointer, b.mPointer); + } + + // Put swap() overload in the global namespace, per Swappable convention + friend void swap(LLPointer<Type>& a, LLPointer<Type>& b) + { + LLPointer<Type>::swap(a, b); } protected: @@ -184,191 +219,19 @@ protected: temp->unref(); if (mPointer != nullptr) { - LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL; + wild_dtor("Unreference did assignment to non-NULL because of destructor"); unref(); } } } #endif // LL_LIBRARY_INCLUDE - void assign(const LLPointer<Type>& ptr) - { - if (mPointer != ptr.mPointer) - { - unref(); - mPointer = ptr.mPointer; - ref(); - } - } - protected: Type* mPointer; }; -template <class Type> class LLConstPointer -{ - template<typename Subclass> - friend class LLConstPointer; -public: - LLConstPointer() : - mPointer(nullptr) - { - } - - LLConstPointer(const Type* ptr) : - mPointer(ptr) - { - ref(); - } - - LLConstPointer(const LLConstPointer<Type>& ptr) : - mPointer(ptr.mPointer) - { - ref(); - } - - LLConstPointer(LLConstPointer<Type>&& ptr) noexcept - { - mPointer = ptr.mPointer; - ptr.mPointer = nullptr; - } - - // support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. - template<typename Subclass> - LLConstPointer(const LLConstPointer<Subclass>& ptr) : - mPointer(ptr.get()) - { - ref(); - } - - template<typename Subclass> - LLConstPointer(LLConstPointer<Subclass>&& ptr) noexcept : - mPointer(ptr.get()) - { - ptr.mPointer = nullptr; - } - - ~LLConstPointer() - { - unref(); - } - - const Type* get() const { return mPointer; } - const Type* operator->() const { return mPointer; } - const Type& operator*() const { return *mPointer; } - - operator BOOL() const { return (mPointer != nullptr); } - operator bool() const { return (mPointer != nullptr); } - bool operator!() const { return (mPointer == nullptr); } - bool isNull() const { return (mPointer == nullptr); } - bool notNull() const { return (mPointer != nullptr); } - - operator const Type*() const { return mPointer; } - bool operator !=(const Type* ptr) const { return (mPointer != ptr); } - bool operator ==(const Type* ptr) const { return (mPointer == ptr); } - bool operator ==(const LLConstPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); } - bool operator < (const LLConstPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); } - bool operator > (const LLConstPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); } - - LLConstPointer<Type>& operator =(const Type* ptr) - { - if( mPointer != ptr ) - { - unref(); - mPointer = ptr; - ref(); - } - - return *this; - } - - LLConstPointer<Type>& operator =(const LLConstPointer<Type>& ptr) - { - if( mPointer != ptr.mPointer ) - { - unref(); - mPointer = ptr.mPointer; - ref(); - } - return *this; - } - - LLConstPointer<Type>& operator =(LLConstPointer<Type>&& ptr) - { - if (mPointer != ptr.mPointer) - { - unref(); - mPointer = ptr.mPointer; - ptr.mPointer = nullptr; - } - return *this; - } - - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. - template<typename Subclass> - LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr) - { - if( mPointer != ptr.get() ) - { - unref(); - mPointer = ptr.get(); - ref(); - } - return *this; - } - - template<typename Subclass> - LLConstPointer<Type>& operator =(LLConstPointer<Subclass>&& ptr) - { - if (mPointer != ptr.mPointer) - { - unref(); - mPointer = ptr.mPointer; - ptr.mPointer = nullptr; - } - return *this; - } - - // Just exchange the pointers, which will not change the reference counts. - static void swap(LLConstPointer<Type>& a, LLConstPointer<Type>& b) - { - const Type* temp = a.mPointer; - a.mPointer = b.mPointer; - b.mPointer = temp; - } - -protected: -#ifdef LL_LIBRARY_INCLUDE - void ref(); - void unref(); -#else // LL_LIBRARY_INCLUDE - void ref() - { - if (mPointer) - { - mPointer->ref(); - } - } - - void unref() - { - if (mPointer) - { - const Type *temp = mPointer; - mPointer = nullptr; - temp->unref(); - if (mPointer != nullptr) - { - LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL; - unref(); - } - } - } -#endif // LL_LIBRARY_INCLUDE - -protected: - const Type* mPointer; -}; +template <typename Type> +using LLConstPointer = LLPointer<const Type>; template<typename Type> class LLCopyOnWritePointer : public LLPointer<Type> @@ -418,38 +281,26 @@ private: bool mStayUnique; }; -template<typename Type> -bool operator!=(Type* lhs, const LLPointer<Type>& rhs) +template<typename Type0, typename Type1> +bool operator!=(Type0* lhs, const LLPointer<Type1>& rhs) { return (lhs != rhs.get()); } -template<typename Type> -bool operator==(Type* lhs, const LLPointer<Type>& rhs) +template<typename Type0, typename Type1> +bool operator==(Type0* lhs, const LLPointer<Type1>& rhs) { return (lhs == rhs.get()); } -// boost hash adapter -template <class Type> -struct boost::hash<LLPointer<Type>> -{ - typedef LLPointer<Type> argument_type; - typedef std::size_t result_type; - result_type operator()(argument_type const& s) const - { - return (std::size_t) s.get(); - } -}; - -// Adapt boost hash to std hash +// Specialize for std::hash namespace std { template<class Type> struct hash<LLPointer<Type>> { std::size_t operator()(LLPointer<Type> const& s) const noexcept { - return boost::hash<LLPointer<Type>>()(s); + return std::hash<Type*>()(s.get()); } }; } diff --git a/indra/llcommon/llpounceable.h b/indra/llcommon/llpounceable.h index 0421ce966a..20561b0c65 100644 --- a/indra/llcommon/llpounceable.h +++ b/indra/llcommon/llpounceable.h @@ -36,13 +36,13 @@ #define LL_LLPOUNCEABLE_H #include "llsingleton.h" -#include <boost/noncopyable.hpp> #include <boost/call_traits.hpp> -#include <boost/type_traits/remove_pointer.hpp> #include <boost/utility/value_init.hpp> -#include <boost/unordered_map.hpp> #include <boost/signals2/signal.hpp> +#include <unordered_map> +#include <type_traits> + // Forward declare the user template, since we want to be able to point to it // in some of its implementation classes. template <typename T, class TAG> @@ -86,7 +86,7 @@ class LLPounceableQueueSingleton: // instance will call on the SAME LLPounceableQueueSingleton instance -- // given how class statics work. We must keep a separate queue for each // LLPounceable instance. Use a hash map for that. - typedef boost::unordered_map<owner_ptr, signal_t> map_t; + typedef std::unordered_map<owner_ptr, signal_t> map_t; public: // Disambiguate queues belonging to different LLPounceables. @@ -139,7 +139,7 @@ private: // LLPounceable<T> is for an LLPounceable instance on the heap or the stack. // LLPounceable<T, LLPounceableStatic> is for a static LLPounceable instance. template <typename T, class TAG=LLPounceableQueue> -class LLPounceable: public boost::noncopyable +class LLPounceable { private: typedef LLPounceableTraits<T, TAG> traits; @@ -158,9 +158,13 @@ public: mEmpty(empty) {} + // Non-copyable + LLPounceable(const LLPounceable&) = delete; + LLPounceable& operator=(const LLPounceable&) = delete; + // make read access to mHeld as cheap and transparent as possible operator T () const { return mHeld; } - typename boost::remove_pointer<T>::type operator*() const { return *mHeld; } + typename std::remove_pointer<T>::type operator*() const { return *mHeld; } typename boost::call_traits<T>::value_type operator->() const { return mHeld; } // uncomment 'explicit' as soon as we allow C++11 compilation /*explicit*/ operator bool() const { return bool(mHeld); } diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 2800cc5608..cbba2ceb87 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -176,13 +176,13 @@ public: // In general, our streambuf might contain a number of different // physical buffers; iterate over those. bool keepwriting = true; - for (auto bufi = buffer_sequence_begin(bufs), bufend = buffer_sequence_end(bufs); + for (auto bufi(boost::asio::buffer_sequence_begin(bufs)), bufend(boost::asio::buffer_sequence_end(bufs)); bufi != bufend && keepwriting; ++bufi) { // http://www.boost.org/doc/libs/1_49_0_beta1/doc/html/boost_asio/reference/buffer.html#boost_asio.reference.buffer.accessing_buffer_contents // Although apr_file_write() accepts const void*, we // manipulate const char* so we can increment the pointer. - const char* remainptr = static_cast<const char*>((*bufi).data()); + const char* remainptr = static_cast<const char*>(bufi->data()); std::size_t remainlen = boost::asio::buffer_size(*bufi); while (remainlen) { @@ -377,14 +377,14 @@ public: // In general, the mutable_buffer_sequence returned by prepare() might // contain a number of different physical buffers; iterate over those. std::size_t tocommit(0); - for (auto bufi = buffer_sequence_begin(bufs), bufend = buffer_sequence_end(bufs); + for (auto bufi(boost::asio::buffer_sequence_begin(bufs)), bufend(boost::asio::buffer_sequence_end(bufs)); bufi != bufend; ++bufi) { // http://www.boost.org/doc/libs/1_49_0_beta1/doc/html/boost_asio/reference/buffer.html#boost_asio.reference.buffer.accessing_buffer_contents std::size_t toread(boost::asio::buffer_size(*bufi)); apr_size_t gotten(toread); apr_status_t err = apr_file_read(mPipe, - static_cast<void*>((*bufi).data()), + bufi->data(), &gotten); // EAGAIN is exactly what we want from a nonblocking pipe. // Rather than waiting for data, it should return immediately. @@ -457,7 +457,8 @@ public: ("slot", LLSD::Integer(mIndex)) ("name", whichfile(mIndex)) ("desc", mDesc) - ("eof", state == CLOSED)); + ("eof", state == CLOSED) + ("exhst", state == EXHAUSTED)); } return false; @@ -528,18 +529,9 @@ LLProcess::LLProcess(const LLSDOrParams& params): // preserve existing semantics, we promise that mAttached defaults to the // same setting as mAutokill. mAttached(params.attached.isProvided()? params.attached : params.autokill), - mPool(NULL), - mPipes(NSLOTS) + mPool(NULL) { - // Hmm, when you construct a ptr_vector with a size, it merely reserves - // space, it doesn't actually make it that big. Explicitly make it bigger. - // Because of ptr_vector's odd semantics, have to push_back(0) the right - // number of times! resize() wants to default-construct new BasePipe - // instances, which fails because it's pure virtual. But because of the - // constructor call, these push_back() calls should require no new - // allocation. - for (size_t i = 0; i < mPipes.capacity(); ++i) - mPipes.push_back(0); + mPipes.resize(NSLOTS); if (! params.validateBlock(true)) { @@ -665,10 +657,7 @@ LLProcess::LLProcess(const LLSDOrParams& params): // case), e.g. by calling operator(), returns a reference to *the same // instance* of the wrapped type that's stored in our Block subclass. // That's important! We know 'params' persists throughout this method - // call; but without that guarantee, we'd have to assume that converting - // one of its members to std::string might return a different (temp) - // instance. Capturing the c_str() from a temporary std::string is Bad Bad - // Bad. But armed with this knowledge, when you see params.cwd().c_str(), + // call; but without that guarantee, when you see params.cwd().c_str(), // grit your teeth and smile and carry on. if (params.cwd.isProvided()) @@ -763,11 +752,11 @@ LLProcess::LLProcess(const LLSDOrParams& params): apr_file_t* pipe(mProcess.*(members[i])); if (i == STDIN) { - mPipes.replace(i, new WritePipeImpl(desc, pipe)); + mPipes[i] = std::make_unique<WritePipeImpl>(desc, pipe); } else { - mPipes.replace(i, new ReadPipeImpl(desc, pipe, FILESLOT(i))); + mPipes[i] = std::make_unique<ReadPipeImpl>(desc, pipe, FILESLOT(i)); } // Removed temporaily for Xcode 7 build tests: error was: // "error: expression with side effects will be evaluated despite @@ -1075,14 +1064,14 @@ PIPETYPE* LLProcess::getPipePtr(std::string& error, FILESLOT slot) error = STRINGIZE(mDesc << " has no slot " << slot); return NULL; } - if (mPipes.is_null(slot)) + if (!mPipes[slot]) { error = STRINGIZE(mDesc << ' ' << whichfile(slot) << " not a monitored pipe"); return NULL; } // Make sure we dynamic_cast in pointer domain so we can test, rather than // accepting runtime's exception. - PIPETYPE* ppipe = dynamic_cast<PIPETYPE*>(&mPipes[slot]); + PIPETYPE* ppipe = dynamic_cast<PIPETYPE*>(mPipes[slot].get()); if (! ppipe) { error = STRINGIZE(mDesc << ' ' << whichfile(slot) << " not a " << typeid(PIPETYPE).name()); diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h index 52b5e0f562..773a3e97f4 100644 --- a/indra/llcommon/llprocess.h +++ b/indra/llcommon/llprocess.h @@ -31,9 +31,7 @@ #include "llsdparam.h" #include "llexception.h" #include "apr_thread_proc.h" -#include <boost/ptr_container/ptr_vector.hpp> #include <boost/optional.hpp> -#include <boost/noncopyable.hpp> #include <iosfwd> // std::ostream #if LL_WINDOWS @@ -67,7 +65,7 @@ typedef std::shared_ptr<LLProcess> LLProcessPtr; * indra/llcommon/tests/llprocess_test.cpp for an example of waiting for * child-process termination in a standalone test context. */ -class LL_COMMON_API LLProcess: public boost::noncopyable +class LL_COMMON_API LLProcess { LOG_CLASS(LLProcess); public: @@ -547,6 +545,10 @@ public: static std::string basename(const std::string& path); static std::string getline(std::istream&); + // Non-copyable + LLProcess(const LLProcess&) = delete; + LLProcess& operator=(const LLProcess&) = delete; + private: /// constructor is private: use create() instead LLProcess(const LLSDOrParams& params); @@ -569,7 +571,7 @@ private: bool mAutokill, mAttached; Status mStatus; // explicitly want this ptr_vector to be able to store NULLs - typedef boost::ptr_vector< boost::nullable<BasePipe> > PipeVector; + typedef std::vector<std::unique_ptr<BasePipe>> PipeVector; PipeVector mPipes; apr_pool_t* mPool; }; diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 2b6e4be1c8..bb3a35a1e3 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -764,34 +764,7 @@ private: } } - // *NOTE:Mani - I didn't find any docs that assure me that machdep.cpu.feature_bits will always be - // The feature bits I think it is. Here's a test: -#ifndef LL_RELEASE_FOR_DOWNLOAD - #if defined(__i386__) && defined(__PIC__) - /* %ebx may be the PIC register. */ - #define __cpuid(level, a, b, c, d) \ - __asm__ ("xchgl\t%%ebx, %1\n\t" \ - "cpuid\n\t" \ - "xchgl\t%%ebx, %1\n\t" \ - : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ - : "0" (level)) - #else - #define __cpuid(level, a, b, c, d) \ - __asm__ ("cpuid\n\t" \ - : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ - : "0" (level)) - #endif - -#if __i386__ || __x86_64__ - unsigned int eax, ebx, ecx, edx; - __cpuid(0x1, eax, ebx, ecx, edx); - if(feature_infos[0] != (S32)edx) - { - LL_WARNS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; - } -#endif // __i386__ || __x86_64__ -#endif // LL_RELEASE_FOR_DOWNLOAD - + // @TODO: Audit our usage of machdep.cpu.feature_bits. uint64_t ext_feature_info = getSysctlInt64("machdep.cpu.extfeature_bits"); S32 *ext_feature_infos = (S32*)(&ext_feature_info); diff --git a/indra/llcommon/llprocinfo.h b/indra/llcommon/llprocinfo.h index 5955799812..0fc8b9dbe4 100644 --- a/indra/llcommon/llprocinfo.h +++ b/indra/llcommon/llprocinfo.h @@ -51,10 +51,10 @@ public: typedef U64 time_type; /// Relative microseconds private: - LLProcInfo(); // Not defined - ~LLProcInfo(); // Not defined - LLProcInfo(const LLProcInfo &); // Not defined - void operator=(const LLProcInfo &); // Not defined + LLProcInfo() = delete; + ~LLProcInfo() = delete; + LLProcInfo(const LLProcInfo&) = delete; + LLProcInfo& operator=(const LLProcInfo&) = delete; public: /// Get accumulated system and user CPU time in diff --git a/indra/llcommon/llptrto.cpp b/indra/llcommon/llptrto.cpp index c4528a47a7..adf636c4d2 100644 --- a/indra/llcommon/llptrto.cpp +++ b/indra/llcommon/llptrto.cpp @@ -31,10 +31,9 @@ // associated header #include "llptrto.h" // STL headers +#include <type_traits> // std headers // external library headers -#include <boost/type_traits/is_same.hpp> -#include <boost/static_assert.hpp> // other Linden headers #include "llmemory.h" @@ -76,27 +75,27 @@ public: int main(int argc, char *argv[]) { // test LLPtrTo<> - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<RCFoo>::type, LLPointer<RCFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<RCSubFoo>::type, LLPointer<RCSubFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<TSRCFoo>::type, LLPointer<TSRCFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<Bar>::type, Bar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<SubBar>::type, SubBar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<int>::type, int*>::value)); + static_assert((std::is_same_v<LLPtrTo<RCFoo>::type, LLPointer<RCFoo> >)); + static_assert((std::is_same_v<LLPtrTo<RCSubFoo>::type, LLPointer<RCSubFoo> >)); + static_assert((std::is_same_v<LLPtrTo<TSRCFoo>::type, LLPointer<TSRCFoo> >)); + static_assert((std::is_same_v<LLPtrTo<Bar>::type, Bar*>)); + static_assert((std::is_same_v<LLPtrTo<SubBar>::type, SubBar*>)); + static_assert((std::is_same_v<LLPtrTo<int>::type, int*>)); // Test LLRemovePointer<>. Note that we remove both pointer variants from // each kind of type, regardless of whether the variant makes sense. - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<RCFoo*>::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCFoo> >::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<RCSubFoo*>::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCSubFoo> >::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<TSRCFoo*>::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<TSRCFoo> >::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<Bar*>::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<Bar> >::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<SubBar*>::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<SubBar> >::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<int*>::type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<int> >::type, int>::value)); + static_assert((std::is_same_v<LLRemovePointer<RCFoo*>::type, RCFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<RCFoo> >::type, RCFoo>)); + static_assert((std::is_same_v<LLRemovePointer<RCSubFoo*>::type, RCSubFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<RCSubFoo> >::type, RCSubFoo>)); + static_assert((std::is_same_v<LLRemovePointer<TSRCFoo*>::type, TSRCFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<TSRCFoo> >::type, TSRCFoo>)); + static_assert((std::is_same_v<LLRemovePointer<Bar*>::type, Bar>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<Bar> >::type, Bar>)); + static_assert((std::is_same_v<LLRemovePointer<SubBar*>::type, SubBar>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<SubBar> >::type, SubBar>)); + static_assert((std::is_same_v<LLRemovePointer<int*>::type, int>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<int> >::type, int>)); return 0; } diff --git a/indra/llcommon/llptrto.h b/indra/llcommon/llptrto.h index b57a1ee7f4..24e312559e 100644 --- a/indra/llcommon/llptrto.h +++ b/indra/llcommon/llptrto.h @@ -35,8 +35,6 @@ #include "llrefcount.h" // LLRefCount #include <boost/intrusive_ptr.hpp> #include <boost/shared_ptr.hpp> -#include <boost/type_traits/is_base_of.hpp> -#include <boost/type_traits/remove_pointer.hpp> #include <memory> // std::shared_ptr, std::unique_ptr #include <type_traits> @@ -58,14 +56,14 @@ struct LLPtrTo /// specialize for subclasses of LLRefCount template <class T> -struct LLPtrTo<T, typename std::enable_if< boost::is_base_of<LLRefCount, T>::value >::type> +struct LLPtrTo<T, typename std::enable_if< std::is_base_of<LLRefCount, T>::value >::type> { typedef LLPointer<T> type; }; /// specialize for subclasses of LLThreadSafeRefCount template <class T> -struct LLPtrTo<T, typename std::enable_if< boost::is_base_of<LLThreadSafeRefCount, T>::value >::type> +struct LLPtrTo<T, typename std::enable_if< std::is_base_of<LLThreadSafeRefCount, T>::value >::type> { typedef LLPointer<T> type; }; @@ -76,7 +74,7 @@ struct LLPtrTo<T, typename std::enable_if< boost::is_base_of<LLThreadSafeRefCoun template <typename PTRTYPE> struct LLRemovePointer { - typedef typename boost::remove_pointer<PTRTYPE>::type type; + typedef typename std::remove_pointer<PTRTYPE>::type type; }; /// specialize for LLPointer<SOMECLASS> diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h index 02d3a96fcc..de50b8ae95 100644 --- a/indra/llcommon/llqueuedthread.h +++ b/indra/llcommon/llqueuedthread.h @@ -117,11 +117,11 @@ public: virtual ~LLQueuedThread(); virtual void shutdown(); -private: // No copy constructor or copy assignment - LLQueuedThread(const LLQueuedThread&); - LLQueuedThread& operator=(const LLQueuedThread&); + LLQueuedThread(const LLQueuedThread&) = delete; + LLQueuedThread& operator=(const LLQueuedThread&) = delete; +private: virtual bool runCondition(void); virtual void run(void); virtual void startThread(void); diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h index 3a253d8fa6..93ca7d1d00 100644 --- a/indra/llcommon/llrefcount.h +++ b/indra/llcommon/llrefcount.h @@ -26,7 +26,6 @@ #ifndef LLREFCOUNT_H #define LLREFCOUNT_H -#include <boost/noncopyable.hpp> #include <boost/intrusive_ptr.hpp> #include "llatomic.h" diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h index 35335e1213..92f8ae3245 100644 --- a/indra/llcommon/llregistry.h +++ b/indra/llcommon/llregistry.h @@ -32,21 +32,11 @@ #include "llsingleton.h" #include "llstl.h" -template <typename T> -struct LLRegistryDefaultComparator -{ - bool operator()(const T& lhs, const T& rhs) const - { - using std::less; - return less<T>()(lhs, rhs); - } -}; - -template <typename KEY, typename VALUE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> > +template <typename KEY, typename VALUE> class LLRegistry { public: - typedef LLRegistry<KEY, VALUE, COMPARATOR> registry_t; + typedef LLRegistry<KEY, VALUE> registry_t; typedef const KEY& ref_const_key_t; typedef const VALUE& ref_const_value_t; typedef const VALUE* ptr_const_value_t; @@ -54,9 +44,9 @@ public: class Registrar { - friend class LLRegistry<KEY, VALUE, COMPARATOR>; + friend class LLRegistry<KEY, VALUE>; public: - typedef std::map<KEY, VALUE, COMPARATOR> registry_map_t; + typedef std::map<KEY, VALUE> registry_map_t; bool add(ref_const_key_t key, ref_const_value_t value) { @@ -234,9 +224,9 @@ private: Registrar mDefaultRegistrar; }; -template <typename KEY, typename VALUE, typename DERIVED_TYPE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> > +template <typename KEY, typename VALUE, typename DERIVED_TYPE> class LLRegistrySingleton - : public LLRegistry<KEY, VALUE, COMPARATOR>, + : public LLRegistry<KEY, VALUE>, public LLSingleton<DERIVED_TYPE> { // This LLRegistrySingleton doesn't use LLSINGLETON(LLRegistrySingleton) @@ -244,7 +234,7 @@ class LLRegistrySingleton // LLRegistrySingleton. So each concrete subclass needs // LLSINGLETON(whatever) -- not this intermediate base class. public: - typedef LLRegistry<KEY, VALUE, COMPARATOR> registry_t; + typedef LLRegistry<KEY, VALUE> registry_t; typedef const KEY& ref_const_key_t; typedef const VALUE& ref_const_value_t; typedef VALUE* ptr_value_t; @@ -309,7 +299,7 @@ public: }; // convenience functions - typedef typename LLRegistry<KEY, VALUE, COMPARATOR>::Registrar& ref_registrar_t; + typedef typename LLRegistry<KEY, VALUE>::Registrar& ref_registrar_t; static ref_registrar_t currentRegistrar() { return singleton_t::instance().registry_t::currentRegistrar(); diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp index 77fe545c3f..ce39bc7af3 100644 --- a/indra/llcommon/llsd.cpp +++ b/indra/llcommon/llsd.cpp @@ -39,6 +39,9 @@ #include <limits> +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> + // Defend against a caller forcibly passing a negative number into an unsigned // size_t index param inline @@ -103,6 +106,9 @@ protected: U32 mUseCount; public: + static void destruct(Impl*& var); + ///< safely decrement or destroy var + static void reset(Impl*& var, Impl* impl); ///< safely set var to refer to the new impl (possibly shared) @@ -166,7 +172,7 @@ public: virtual const LLSD& ref(size_t) const { return undef(); } virtual LLSD::map_const_iterator beginMap() const { return endMap(); } - virtual LLSD::map_const_iterator endMap() const { static const std::map<String, LLSD> empty; return empty.end(); } + virtual LLSD::map_const_iterator endMap() const { static const LLSD::llsd_map_t empty; return empty.end(); } virtual LLSD::array_const_iterator beginArray() const { return endArray(); } virtual LLSD::array_const_iterator endArray() const { static const std::vector<LLSD> empty; return empty.end(); } @@ -345,18 +351,7 @@ namespace LLSD::Real ImplString::asReal() const { - F64 v = 0.0; - std::istringstream i_stream(mValue); - i_stream >> v; - - // we would probably like to ignore all trailing whitespace as - // well, but for now, simply eat the next character, and make - // sure we reached the end of the string. - // *NOTE: gcc 2.95 does not generate an eof() event on the - // stream operation above, so we manually get here to force it - // across platforms. - int c = i_stream.get(); - return ((EOF ==c) ? v : 0.0); + return llsd::string_to_real(mValue); } @@ -431,7 +426,7 @@ namespace class ImplMap final : public LLSD::Impl { private: - typedef std::map<LLSD::String, LLSD, std::less<>> DataMap; + using DataMap = LLSD::llsd_map_t; DataMap mData; @@ -457,7 +452,7 @@ namespace << it.second.asXMLRPCValue() << "</member>"; } os << "</struct>"; - return os.str(); + return std::move(os).str(); } virtual bool has(std::string_view) const; @@ -467,8 +462,13 @@ namespace using LLSD::Impl::ref; // Unhiding ref(size_t) virtual LLSD get(std::string_view) const; virtual LLSD getKeys() const; + void insert(std::string&& k, const LLSD& v); + void insert(std::string&& k, LLSD&& v); void insert(std::string_view k, const LLSD& v); + void insert(std::string_view k, LLSD&& v); virtual void erase(const LLSD::String&); + LLSD& ref(std::string&&); + virtual const LLSD& ref(std::string&&) const; LLSD& ref(std::string_view); virtual const LLSD& ref(std::string_view) const; @@ -525,18 +525,58 @@ namespace return keys; } + void ImplMap::insert(std::string&& k, const LLSD& v) + { + LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; + mData.emplace(std::move(k), v); + } + + void ImplMap::insert(std::string&& k, LLSD&& v) + { + LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; + mData.emplace(std::move(k), std::move(v)); + } + void ImplMap::insert(std::string_view k, const LLSD& v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; mData.emplace(k, v); } + void ImplMap::insert(std::string_view k, LLSD&& v) + { + LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; + mData.emplace(k, std::move(v)); + } + void ImplMap::erase(const LLSD::String& k) { LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; mData.erase(k); } + LLSD& ImplMap::ref(std::string&& k) + { + DataMap::iterator i = mData.lower_bound(k); + if (i == mData.end() || mData.key_comp()(k, i->first)) + { + return mData.emplace_hint(i, std::make_pair(std::move(k), LLSD()))->second; + } + + return i->second; + } + + const LLSD& ImplMap::ref(std::string&& k) const + { + DataMap::const_iterator i = mData.lower_bound(k); + if (i == mData.end() || mData.key_comp()(k, i->first)) + { + return undef(); + } + + return i->second; + } + LLSD& ImplMap::ref(std::string_view k) { DataMap::iterator i = mData.lower_bound(k); @@ -598,7 +638,7 @@ namespace ImplArray(const DataVector& data) : mData(data) { } public: - ImplArray() { } + ImplArray() = default; virtual ImplArray& makeArray(Impl*&); @@ -615,7 +655,7 @@ namespace os << it.asXMLRPCValue(); } os << "</data></array>"; - return os.str(); + return std::move(os).str(); } using LLSD::Impl::get; // Unhiding get(LLSD::String) @@ -625,10 +665,13 @@ namespace virtual LLSD get(size_t) const; void set(size_t, const LLSD&); void insert(size_t, const LLSD&); + void insert(size_t, LLSD&&); LLSD& append(const LLSD&); + LLSD& append(LLSD&&); virtual void erase(size_t); LLSD& ref(size_t); virtual const LLSD& ref(size_t) const; + void reserve(size_t size) { mData.reserve(size); } LLSD::array_iterator beginArray() { return mData.begin(); } LLSD::array_iterator endArray() { return mData.end(); } @@ -690,12 +733,31 @@ namespace mData.insert(mData.begin() + index, v); } + void ImplArray::insert(size_t i, LLSD&& v) + { + NEGATIVE_EXIT(i); + DataVector::size_type index = i; + + if (index >= mData.size()) // tbd - sanity check limit for index ? + { + mData.resize(index + 1); + } + + mData.insert(mData.begin() + index, std::move(v)); + } + LLSD& ImplArray::append(const LLSD& v) { mData.push_back(v); return mData.back(); } + LLSD& ImplArray::append(LLSD&& v) + { + mData.push_back(std::move(v)); + return mData.back(); + } + void ImplArray::erase(size_t i) { NEGATIVE_EXIT(i); @@ -763,6 +825,14 @@ LLSD::Impl::~Impl() --sOutstandingCount; } +void LLSD::Impl::destruct(Impl*& var) +{ + if (var && var->mUseCount != STATIC_USAGE_COUNT && --var->mUseCount == 0) + { + delete var; + } +} + void LLSD::Impl::reset(Impl*& var, Impl* impl) { if (impl && impl->mUseCount != STATIC_USAGE_COUNT) @@ -961,7 +1031,7 @@ namespace LLSD::LLSD() : impl(0) { ALLOC_LLSD_OBJECT; } -LLSD::~LLSD() { FREE_LLSD_OBJECT; Impl::reset(impl, 0); } +LLSD::~LLSD() { FREE_LLSD_OBJECT; Impl::destruct(impl); } LLSD::LLSD(const LLSD& other) : impl(0) { ALLOC_LLSD_OBJECT; assign(other); } void LLSD::assign(const LLSD& other) { Impl::assign(impl, other.impl); } @@ -1037,13 +1107,31 @@ LLSD LLSD::emptyMap() bool LLSD::has(const std::string_view k) const { return safe(impl).has(k); } LLSD LLSD::get(const std::string_view k) const { return safe(impl).get(k); } LLSD LLSD::getKeys() const { return safe(impl).getKeys(); } +void LLSD::insert(std::string&& k, const LLSD& v) { makeMap(impl).insert(std::move(k), v); } +void LLSD::insert(std::string&& k, LLSD&& v) { makeMap(impl).insert(std::move(k), std::move(v)); } void LLSD::insert(std::string_view k, const LLSD& v) { makeMap(impl).insert(k, v); } +void LLSD::insert(std::string_view k, LLSD&& v) { makeMap(impl).insert(k, std::move(v)); } +LLSD& LLSD::with(std::string&& k, const LLSD& v) + { + makeMap(impl).insert(std::move(k), v); + return *this; + } +LLSD& LLSD::with(std::string&& k, LLSD&& v) + { + makeMap(impl).insert(std::move(k), std::move(v)); + return *this; + } LLSD& LLSD::with(std::string_view k, const LLSD& v) { makeMap(impl).insert(k, v); return *this; } +LLSD& LLSD::with(std::string_view k, LLSD&& v) + { + makeMap(impl).insert(k, std::move(v)); + return *this; + } void LLSD::erase(const String& k) { makeMap(impl).erase(k); } LLSD& LLSD::operator[](const std::string_view k) @@ -1051,6 +1139,13 @@ LLSD& LLSD::operator[](const std::string_view k) LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; return makeMap(impl).ref(k); } + +LLSD& LLSD::operator[](std::string&& k) +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; + return makeMap(impl).ref(std::move(k)); +} + const LLSD& LLSD::operator[](const std::string_view k) const { LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; @@ -1064,18 +1159,33 @@ LLSD LLSD::emptyArray() return v; } +LLSD LLSD::emptyReservedArray(size_t size) +{ + LLSD v; + makeArray(v.impl).reserve(size); + return v; +} + size_t LLSD::size() const { return safe(impl).size(); } LLSD LLSD::get(Integer i) const { return safe(impl).get(i); } void LLSD::set(Integer i, const LLSD& v){ makeArray(impl).set(i, v); } +void LLSD::set(Integer i, LLSD&& v) { makeArray(impl).set(i, std::move(v)); } void LLSD::insert(Integer i, const LLSD& v) { makeArray(impl).insert(i, v); } +void LLSD::insert(Integer i, LLSD&& v) { makeArray(impl).insert(i, std::move(v)); } LLSD& LLSD::with(Integer i, const LLSD& v) { makeArray(impl).insert(i, v); return *this; } +LLSD& LLSD::with(Integer i, LLSD&& v) + { + makeArray(impl).insert(i, std::move(v)); + return *this; + } LLSD& LLSD::append(const LLSD& v) { return makeArray(impl).append(v); } +LLSD& LLSD::append(LLSD&& v) { return makeArray(impl).append(std::move(v)); } void LLSD::erase(Integer i) { makeArray(impl).erase(i); } LLSD& LLSD::operator[](size_t i) @@ -1143,6 +1253,22 @@ LLSD::reverse_array_iterator LLSD::rendArray() { return makeArray(impl) namespace llsd { +LLSD::Real string_to_real(std::string_view in_string) +{ + LLSD::Real v = 0.0; + boost::iostreams::stream<boost::iostreams::array_source> i_stream(in_string.data(), in_string.size()); + i_stream >> v; + + // we would probably like to ignore all trailing whitespace as + // well, but for now, simply eat the next character, and make + // sure we reached the end of the string. + // *NOTE: gcc 2.95 does not generate an eof() event on the + // stream operation above, so we manually get here to force it + // across platforms. + int c = i_stream.get(); + return ((EOF == c) ? v : 0.0); +} + U32 allocationCount() { return LLSD::Impl::sAllocationCount; } U32 outstandingCount() { return LLSD::Impl::sOutstandingCount; } diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index d2b3548831..afe35a65ba 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -34,6 +34,7 @@ #include "stdtypes.h" #include "lldate.h" +#include "llstl.h" #include "lluri.h" #include "lluuid.h" @@ -321,11 +322,34 @@ public: bool has(const std::string_view) const; LLSD get(const std::string_view) const; LLSD getKeys() const; // Return an LLSD array with keys as strings + void insert(const char* k, const LLSD& v) + { + return insert(std::string_view(k), v); + } + void insert(const char* k , LLSD&& v) + { + return insert(std::string_view(k), std::move(v)); + } + void insert(std::string&&, const LLSD&); + void insert(std::string&&, LLSD&&); void insert(std::string_view, const LLSD&); + void insert(std::string_view, LLSD&&); void erase(const String&); + LLSD& with(const char* k, const LLSD& v) + { + return with(std::string_view(k), v); + } + LLSD& with(const char* k, LLSD&& v) + { + return with(std::string_view(k), std::move(v)); + } + LLSD& with(std::string&&, const LLSD&); + LLSD& with(std::string&&, LLSD&&); LLSD& with(std::string_view, const LLSD&); + LLSD& with(std::string_view, LLSD&&); LLSD& operator[](const std::string_view); + LLSD& operator[](std::string&&); LLSD& operator[](const char* c) { return c ? (*this)[std::string_view(c)] : *this; @@ -339,14 +363,22 @@ public: /** @name Array Values */ //@{ + // Allocate an empty array static LLSD emptyArray(); + // Allocate an array with internal storage reserved but not initialized like a std::vector + static LLSD emptyReservedArray(size_t size); + LLSD get(Integer) const; void set(Integer, const LLSD&); + void set(Integer, LLSD&&); void insert(Integer, const LLSD&); + void insert(Integer, LLSD&&); LLSD& append(const LLSD&); + LLSD& append(LLSD&&); void erase(Integer); LLSD& with(Integer, const LLSD&); + LLSD& with(Integer, LLSD&&); // accept size_t so we can index relative to size() const LLSD& operator[](size_t) const; @@ -366,8 +398,9 @@ public: //@{ size_t size() const; - typedef std::map<String, LLSD>::iterator map_iterator; - typedef std::map<String, LLSD>::const_iterator map_const_iterator; + using llsd_map_t = std::map<String, LLSD, std::less<>>; + typedef llsd_map_t::iterator map_iterator; + typedef llsd_map_t::const_iterator map_const_iterator; map_iterator beginMap(); map_iterator endMap(); @@ -512,6 +545,8 @@ LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd); namespace llsd { + // Used by LLSD::ImplString to convert string type to real + LLSD::Real string_to_real(std::string_view in_string); #ifdef LLSD_DEBUG_INFO /** @name Unit Testing Interface */ diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index a4b45ed80d..71f35802c5 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -70,7 +70,7 @@ LLSD LlsdFromJson(const boost::json::value& val) const boost::json::array& array = val.as_array(); size_t size = array.size(); // allocate elements 0 .. (size() - 1) to avoid incremental allocation - if (! array.empty()) + if (!array.empty()) { result[size - 1] = LLSD(); } @@ -84,7 +84,7 @@ LLSD LlsdFromJson(const boost::json::value& val) result = LLSD::emptyMap(); for (const auto& element : val.as_object()) { - result[element.key()] = LlsdFromJson(element.value()); + result[std::string_view(element.key())] = LlsdFromJson(element.value()); } break; } diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index 3ae153a67c..caaac3d762 100644 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -30,7 +30,6 @@ // Project includes #include "llsdparam.h" #include "llsdutil.h" -#include "boost/bind.hpp" static LLInitParam::Parser::parser_read_func_map_t sReadFuncs; static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; @@ -43,8 +42,6 @@ static const LLSD NO_VALUE_MARKER; LLParamSDParser::LLParamSDParser() : Parser(sReadFuncs, sWriteFuncs, sInspectFuncs) { - using boost::bind; - if (sReadFuncs.empty()) { registerParserFuncs<LLInitParam::Flag>(readFlag, &LLParamSDParser::writeFlag); @@ -97,7 +94,7 @@ void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool mNameStack.clear(); setParseSilently(silent); - LLParamSDParserUtilities::readSDValues(boost::bind(&LLParamSDParser::submit, this, boost::ref(block), _1, _2), sd, mNameStack); + LLParamSDParserUtilities::readSDValues(std::bind(&LLParamSDParser::submit, this, std::ref(block), std::placeholders::_1, std::placeholders::_2), sd, mNameStack); //readSDValues(sd, block); } @@ -276,14 +273,14 @@ void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLI } else if (sd.isUndefined()) { - if (!cb.empty()) + if (cb != nullptr) { cb(NO_VALUE_MARKER, stack); } } else { - if (!cb.empty()) + if (cb != nullptr) { cb(sd, stack); } @@ -333,7 +330,7 @@ namespace LLInitParam if (!p.writeValue<LLSD>(mValue, name_stack_range)) { // otherwise read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc) - LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, name_stack_range); + LLParamSDParserUtilities::readSDValues(std::bind(&serializeElement, std::ref(p), std::placeholders::_1, std::placeholders::_2), mValue, name_stack_range); } return true; } diff --git a/indra/llcommon/llsdparam.h b/indra/llcommon/llsdparam.h index 21ebb9a258..447ba02327 100644 --- a/indra/llcommon/llsdparam.h +++ b/indra/llcommon/llsdparam.h @@ -29,14 +29,14 @@ #define LL_LLSDPARAM_H #include "llinitparam.h" -#include "boost/function.hpp" +#include <functional> #include "llfasttimer.h" struct LL_COMMON_API LLParamSDParserUtilities { static LLSD& getSDWriteNode(LLSD& input, LLInitParam::Parser::name_stack_range_t& name_stack_range); - typedef boost::function<void (const LLSD&, LLInitParam::Parser::name_stack_t&)> read_sd_cb_t; + typedef std::function<void (const LLSD&, LLInitParam::Parser::name_stack_t&)> read_sd_cb_t; static void readSDValues(read_sd_cb_t cb, const LLSD& sd, LLInitParam::Parser::name_stack_t& stack); static void readSDValues(read_sd_cb_t cb, const LLSD& sd); }; diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 68a7bf0adf..f850238dff 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -775,7 +775,8 @@ S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) c // There must be a value for every key, thus // child_count must be greater than 0. parse_count += count; - map.insert(name, child); + map.insert(std::move(name), std::move(child)); // Move as name will be filled on next iteration + name.clear(); } else { @@ -822,7 +823,7 @@ S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array, S32 max_dept else { parse_count += count; - array.append(child); + array.append(std::move(child)); } c = get(istr); } @@ -841,7 +842,7 @@ bool LLSDNotationParser::parseString(std::istream& istr, LLSD& data) const auto count = deserialize_string(istr, value, mMaxBytesLeft); if(PARSE_FAILURE == count) return false; account(count); - data = value; + data = std::move(value); return true; } @@ -872,10 +873,10 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const if(len) { value.resize(len); - account(fullread(istr, (char *)&value[0], len)); + account(fullread(istr, (char*)value.data(), len)); } c = get(istr); // strip off the trailing double-quote - data = value; + data = std::move(value); } else if(0 == strncmp("b64", buf, 3)) { @@ -885,7 +886,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const std::stringstream coded_stream; get(istr, *(coded_stream.rdbuf()), '\"'); c = get(istr); - std::string encoded(coded_stream.str()); + std::string encoded(std::move(coded_stream).str()); S32 len = apr_base64_decode_len(encoded.c_str()); std::vector<U8> value; if(len) @@ -894,7 +895,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const len = apr_base64_decode_binary(&value[0], encoded.c_str()); value.resize(len); } - data = value; + data = std::move(value); } else if(0 == strncmp("b16", buf, 3)) { @@ -925,7 +926,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const // copy the data out of the byte buffer value.insert(value.end(), byte_buffer, write); } - data = value; + data = std::move(value); } else { @@ -1077,7 +1078,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) con } else { - data = value; + data = std::move(value); account(cnt); } if(istr.fail()) @@ -1094,7 +1095,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) con std::string value; if(parseString(istr, value)) { - data = value; + data = std::move(value); } else { @@ -1159,7 +1160,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) con value.resize(size); account(fullread(istr, (char*)&value[0], size)); } - data = value; + data = std::move(value); } if(istr.fail()) { @@ -1218,7 +1219,7 @@ S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) con // There must be a value for every key, thus child_count // must be greater than 0. parse_count += child_count; - map.insert(name, child); + map.insert(std::move(name), std::move(child)); } else { @@ -1238,13 +1239,12 @@ S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) con S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array, S32 max_depth) const { - array = LLSD::emptyArray(); U32 value_nbo = 0; read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ S32 size = (S32)ntohl(value_nbo); - // *FIX: This would be a good place to reserve some space in the - // array... + // Preallocate array to avoid incremental allocation + array = LLSD::emptyReservedArray(size); S32 parse_count = 0; S32 count = 0; @@ -1260,7 +1260,7 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array, S32 max_depth) if(child_count) { parse_count += child_count; - array.append(child); + array.append(std::move(child)); } ++count; c = istr.peek(); @@ -1279,18 +1279,15 @@ bool LLSDBinaryParser::parseString( std::istream& istr, std::string& value) const { - // *FIX: This is memory inefficient. U32 value_nbo = 0; read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ S32 size = (S32)ntohl(value_nbo); if(mCheckLimits && (size > mMaxBytesLeft)) return false; if(size < 0) return false; - std::vector<char> buf; if(size) { - buf.resize(size); - account(fullread(istr, &buf[0], size)); - value.assign(buf.begin(), buf.end()); + value.resize(size); + account(fullread(istr, value.data(), size)); } return true; } @@ -1785,7 +1782,7 @@ llssize deserialize_string_delim( } } - value = write_buffer.str(); + value = std::move(write_buffer).str(); return count; } @@ -1806,15 +1803,12 @@ llssize deserialize_string_raw( { // We probably have a valid raw string. determine // the size, and read it. - // *FIX: This is memory inefficient. - auto len = strtol(buf + 1, NULL, 0); + auto len = strtol(buf + 1, nullptr, 0); if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE; - std::vector<char> buf; if(len) { - buf.resize(len); - count += fullread(istr, (char *)&buf[0], len); - value.assign(buf.begin(), buf.end()); + value.resize(len); + count += fullread(istr, value.data(), len); } c = istr.get(); ++count; @@ -2170,7 +2164,7 @@ std::string zip_llsd(LLSD& data) return std::string(); } - std::string source = llsd_strm.str(); + std::string source = std::move(llsd_strm).str(); U8 out[CHUNK]; diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index ce416baa04..afe4fd63a6 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -31,6 +31,8 @@ #include <deque> #include "apr_base64.h" +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> #include <boost/regex.hpp> extern "C" @@ -645,7 +647,7 @@ void LLSDXMLParser::Impl::startElementHandler(const XML_Char* name, const XML_Ch if (mCurrentKey.empty()) { return startSkipping(); } LLSD& map = *mStack.back(); - LLSD& newElement = map[mCurrentKey]; + LLSD& newElement = map[std::move(mCurrentKey)]; mStack.push_back(&newElement); mCurrentKey.clear(); @@ -709,7 +711,8 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) return; case ELEMENT_KEY: - mCurrentKey = mCurrentContent; + mCurrentKey = std::move(mCurrentContent); // This is safe to move as we are in the end element handler + mCurrentContent.clear(); // Ensure mCurrentContent is empty for subsequent use return; default: @@ -742,14 +745,22 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) } else { - value = LLSD(mCurrentContent).asInteger(); + // This must treat "1.23" not as an error, but as a number, which is + // then truncated down to an integer. Hence, this code doesn't call + // std::istringstream::operator>>(int&), which would not consume the + // ".23" portion. + + // Utilizes implementation used internally by LLSD::ImplString::asInteger + value = (int)llsd::string_to_real(mCurrentContent); } } break; case ELEMENT_REAL: { - value = LLSD(mCurrentContent).asReal(); + // Utilizes implementation used internally by LLSD::ImplString::asReal + value = llsd::string_to_real(mCurrentContent); + // removed since this breaks when locale has decimal separator that isn't '.' // investigated changing local to something compatible each time but deemed higher // risk that just using LLSD.asReal() each time. @@ -766,19 +777,19 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) break; case ELEMENT_STRING: - value = mCurrentContent; + value = std::move(mCurrentContent); // This is safe to move as we are in the end element handler and this is cleared below break; case ELEMENT_UUID: - value = LLSD(mCurrentContent).asUUID(); + value = LLUUID(mCurrentContent); break; case ELEMENT_DATE: - value = LLSD(mCurrentContent).asDate(); + value = LLDate(mCurrentContent); break; case ELEMENT_URI: - value = LLSD(mCurrentContent).asURI(); + value = LLURI(mCurrentContent); break; case ELEMENT_BINARY: @@ -787,15 +798,14 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) // created by python and other non-linden systems - DEV-39358 // Fortunately we have very little binary passing now, // so performance impact shold be negligible. + poppy 2009-09-04 - boost::regex r; - r.assign("\\s"); + static const boost::regex r("\\s"); std::string stripped = boost::regex_replace(mCurrentContent, r, ""); S32 len = apr_base64_decode_len(stripped.c_str()); std::vector<U8> data; data.resize(len); len = apr_base64_decode_binary(&data[0], stripped.c_str()); data.resize(len); - value = data; + value = std::move(data); break; } diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index b5659e053c..e6989211ae 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -25,11 +25,10 @@ #ifndef LLSINGLETON_H #define LLSINGLETON_H -#include <boost/noncopyable.hpp> -#include <boost/unordered_set.hpp> #include <initializer_list> #include <list> #include <typeinfo> +#include <unordered_set> #include <vector> #include "mutex.h" #include "lockstatic.h" @@ -43,11 +42,14 @@ #pragma warning(disable : 4506) // no definition for inline function #endif -class LLSingletonBase: private boost::noncopyable +class LLSingletonBase { public: class MasterList; + LLSingletonBase(const LLSingletonBase&) = delete; + LLSingletonBase& operator=(const LLSingletonBase&) = delete; + private: // All existing LLSingleton instances are tracked in this master list. typedef std::list<LLSingletonBase*> list_t; @@ -59,7 +61,7 @@ private: static vec_t dep_sort(); // we directly depend on these other LLSingletons - typedef boost::unordered_set<LLSingletonBase*> set_t; + typedef std::unordered_set<LLSingletonBase*> set_t; set_t mDepends; protected: diff --git a/indra/llcommon/llstaticstringtable.h b/indra/llcommon/llstaticstringtable.h index 66ba3487c4..edff955ee7 100644 --- a/indra/llcommon/llstaticstringtable.h +++ b/indra/llcommon/llstaticstringtable.h @@ -29,9 +29,10 @@ #define LL_STATIC_STRING_TABLE_H #include "lldefs.h" -#include <boost/unordered_map.hpp> #include "llstl.h" +#include <unordered_map> + class LLStaticHashedString { public: @@ -74,7 +75,7 @@ struct LLStaticStringHasher template< typename MappedObject > class LL_COMMON_API LLStaticStringTable - : public boost::unordered_map< LLStaticHashedString, MappedObject, LLStaticStringHasher > + : public std::unordered_map< LLStaticHashedString, MappedObject, LLStaticStringHasher > { }; diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 7d41c42ba7..7a1c7caf82 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -34,6 +34,7 @@ #include <vector> #include <list> #include <set> +#include <typeindex> #include <typeinfo> #ifdef LL_LINUX @@ -229,12 +230,10 @@ void delete_and_clear_array(T*& ptr) template <typename T> inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key) { - // Typedef here avoids warnings because of new c++ naming rules. - typedef typename T::const_iterator map_iter; - map_iter iter = inmap.find(key); + auto iter = inmap.find(key); if(iter == inmap.end()) { - return NULL; + return nullptr; } else { @@ -243,8 +242,8 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty }; // helper function which returns true if key is in inmap. -template <typename K, typename T> -inline bool is_in_map(const std::map<K,T>& inmap, const K& key) +template <typename T> +inline bool is_in_map(const T& inmap, typename T::key_type const& key) { if(inmap.find(key) == inmap.end()) { @@ -260,12 +259,10 @@ inline bool is_in_map(const std::map<K,T>& inmap, const K& key) // To replace LLSkipMap getIfThere, use: // get_if_there(map, key, 0) // WARNING: Make sure default_value (generally 0) is not a valid map entry! -template <typename K, typename T> -inline T get_if_there(const std::map<K,T>& inmap, const K& key, T default_value) +template <typename T> +inline typename T::mapped_type get_if_there(const T& inmap, typename T::key_type const& key, typename T::mapped_type default_value) { - // Typedef here avoids warnings because of new c++ naming rules. - typedef typename std::map<K,T>::const_iterator map_iter; - map_iter iter = inmap.find(key); + auto iter = inmap.find(key); if(iter == inmap.end()) { return default_value; @@ -709,5 +706,24 @@ struct ll_template_cast_impl<DEST, SOURCE> \ } \ } +// Transparent string hashing helper for use with std::unordered_* +// std::unordered_map<std::string, val, ll::string_hash, std::equal_to<>> +namespace ll +{ + struct string_hash + { + using is_transparent = void; + [[nodiscard]] size_t operator()(char const* rhs) const { return std::hash<std::string_view>{}(rhs); } + [[nodiscard]] size_t operator()(std::string_view rhs) const { return std::hash<std::string_view>{}(rhs); } + [[nodiscard]] size_t operator()(const std::string& rhs) const { return std::hash<std::string>{}(rhs); } + }; +} // namespace ll + +// Specialize ostream for std::type_index to allow log output +inline std::ostream& operator<<(std::ostream& s, std::type_index type) +{ + s << type.name(); + return s; +} #endif // LL_LLSTL_H diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 2e579a4d2d..4023294fff 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -1239,9 +1239,9 @@ void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<strin // (unless there ARE no escapes). std::unique_ptr< LLStringUtilBaseImpl::InString<T> > instrp; if (escapes.empty()) - instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end())); + instrp = std::make_unique<LLStringUtilBaseImpl::InString<T>>(string.begin(), string.end()); else - instrp.reset(new LLStringUtilBaseImpl::InEscString<T>(string.begin(), string.end(), escapes)); + instrp = std::make_unique<LLStringUtilBaseImpl::InEscString<T>>(string.begin(), string.end(), escapes); LLStringUtilBaseImpl::getTokens(*instrp, tokens, drop_delims, keep_delims, quotes); } diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index edc891f5ec..542de4ee67 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -51,9 +51,6 @@ #include <boost/circular_buffer.hpp> #include <boost/lexical_cast.hpp> #include <boost/range.hpp> -#include <boost/utility/enable_if.hpp> -#include <boost/type_traits/is_integral.hpp> -#include <boost/type_traits/is_float.hpp> #include "llfasttimer.h" using namespace llsd; @@ -727,7 +724,7 @@ public: // Store every integer type as LLSD::Integer. template <class T> void add(const LLSD::String& name, const T& value, - typename boost::enable_if<boost::is_integral<T> >::type* = 0) + typename std::enable_if_t<std::is_integral_v<T> >* = 0) { mStats[name] = LLSD::Integer(value); } @@ -735,7 +732,7 @@ public: // Store every floating-point type as LLSD::Real. template <class T> void add(const LLSD::String& name, const T& value, - typename boost::enable_if<boost::is_float<T> >::type* = 0) + typename std::enable_if_t<std::is_floating_point_v<T> >* = 0) { mStats[name] = LLSD::Real(value); } diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 692941a892..8c12ee7f12 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -240,7 +240,11 @@ void LLThread::tryRun() LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); main_queue->post( // Bind the current exception, rethrow it in main loop. - [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + [exc = std::current_exception(), name = mName]() + { + LL_INFOS("THREAD") << "Rethrowing exception from thread " << name << LL_ENDL; + std::rethrow_exception(exc); + }); } #endif // else LL_WINDOWS } diff --git a/indra/llcommon/lltreeiterators.h b/indra/llcommon/lltreeiterators.h index cef501b987..cc13955d2f 100644 --- a/indra/llcommon/lltreeiterators.h +++ b/indra/llcommon/lltreeiterators.h @@ -60,10 +60,10 @@ #define LL_LLTREEITERATORS_H #include "llptrto.h" +#include <functional> #include <vector> #include <deque> #include <boost/iterator/iterator_facade.hpp> -#include <boost/function.hpp> #include <boost/static_assert.hpp> namespace LLTreeIter @@ -93,7 +93,7 @@ protected: typedef typename LLPtrTo<NODE>::type ptr_type; /// function that advances from this node to next accepts a node pointer /// and returns another - typedef boost::function<ptr_type(const ptr_type&)> func_type; + typedef std::function<ptr_type(const ptr_type&)> func_type; typedef SELFTYPE self_type; }; @@ -330,7 +330,7 @@ protected: typedef typename super::ptr_type ptr_type; // The func_type is different for this: from a NODE pointer, we must // obtain a CHILDITER. - typedef boost::function<CHILDITER(const ptr_type&)> func_type; + typedef std::function<CHILDITER(const ptr_type&)> func_type; private: typedef std::vector<ptr_type> list_type; public: @@ -435,7 +435,7 @@ protected: typedef typename super::ptr_type ptr_type; // The func_type is different for this: from a NODE pointer, we must // obtain a CHILDITER. - typedef boost::function<CHILDITER(const ptr_type&)> func_type; + typedef std::function<CHILDITER(const ptr_type&)> func_type; private: // Upon reaching a given node in our pending list, we need to know whether // we've already pushed that node's children, so we must associate a bool @@ -574,7 +574,7 @@ protected: typedef typename super::ptr_type ptr_type; // The func_type is different for this: from a NODE pointer, we must // obtain a CHILDITER. - typedef boost::function<CHILDITER(const ptr_type&)> func_type; + typedef std::function<CHILDITER(const ptr_type&)> func_type; private: // We need a FIFO queue rather than a LIFO stack. Use a deque rather than // a vector, since vector can't implement pop_front() efficiently. diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp index 33a48d970d..1d246bb70e 100644 --- a/indra/llcommon/lluriparser.cpp +++ b/indra/llcommon/lluriparser.cpp @@ -33,7 +33,7 @@ LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedT { if (u.find("://") == std::string::npos) { - mNormalizedUri = "http://"; + mNormalizedUri = "https://"; mTmpScheme = true; } diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index ca1cf03c4d..f91aadccc0 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -26,6 +26,7 @@ #ifndef LL_LLUUID_H #define LL_LLUUID_H +#include <functional> #include <iostream> #include <set> #include <vector> @@ -176,15 +177,27 @@ namespace std { inline size_t operator()(const LLUUID& id) const noexcept { - return (size_t)id.getDigest64(); + size_t h = 0; + // Golden ratio hash with avalanche mixing + // Process 8 bytes at a time by manually constructing 64-bit values + // Shift by 31: mixes upper half into lower half for better bit distribution + // Shift by 47: ensures highest bits influence final hash output + for (int i = 0; i < UUID_BYTES; i += 8) { + size_t chunk = (size_t)id.mData[i] | ((size_t)id.mData[i+1] << 8) | + ((size_t)id.mData[i+2] << 16) | ((size_t)id.mData[i+3] << 24) | + ((size_t)id.mData[i+4] << 32) | ((size_t)id.mData[i+5] << 40) | + ((size_t)id.mData[i+6] << 48) | ((size_t)id.mData[i+7] << 56); + h ^= (chunk * 0x9e3779b97f4a7c15ULL) ^ (h >> 31) ^ (h >> 47); + } + return h; } }; } -// For use with boost containers. +// For use with boost::container_hash inline size_t hash_value(const LLUUID& id) noexcept { - return (size_t)id.getDigest64(); + return std::hash<LLUUID>{}(id); } #endif // LL_LLUUID_H diff --git a/indra/newview/llwatchdog.cpp b/indra/llcommon/llwatchdog.cpp index bf171fe954..66b565c763 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/llcommon/llwatchdog.cpp @@ -24,9 +24,11 @@ * $/LicenseInfo$ */ +// Precompiled header +#include "linden_common.h" -#include "llviewerprecompiledheaders.h" #include "llwatchdog.h" +#include "llmutex.h" #include "llthread.h" constexpr U32 WATCHDOG_SLEEP_TIME_USEC = 1000000U; @@ -66,7 +68,9 @@ private: }; // LLWatchdogEntry -LLWatchdogEntry::LLWatchdogEntry() +LLWatchdogEntry::LLWatchdogEntry(const std::string& thread_name) + : mThreadName(thread_name) + , mThreadID(LLThread::currentID()) { } @@ -83,16 +87,21 @@ void LLWatchdogEntry::start() void LLWatchdogEntry::stop() { // this can happen very late in the shutdown sequence - if (!LLWatchdog::wasDeleted()) + if (LLWatchdog::instanceExists()) { LLWatchdog::getInstance()->remove(this); } } +std::string LLWatchdogEntry::getThreadName() const +{ + return mThreadName + llformat(": %d", mThreadID); +} // LLWatchdogTimeout const std::string UNINIT_STRING = "uninitialized"; -LLWatchdogTimeout::LLWatchdogTimeout() : +LLWatchdogTimeout::LLWatchdogTimeout(const std::string& thread_name) : + LLWatchdogEntry(thread_name), mTimeout(0.0f), mPingState(UNINIT_STRING) { @@ -164,6 +173,17 @@ void LLWatchdog::add(LLWatchdogEntry* e) { lockThread(); mSuspects.insert(e); + + if (!mFrozeList.empty()) + { + mFrozeList.erase(e); + if (mFrozeList.empty()) + { + // Clear error marker file if there is no frozen threads, + // viewer is responsive again. + mClearMarkerFnc(); + } + } unlockThread(); } @@ -171,10 +191,16 @@ void LLWatchdog::remove(LLWatchdogEntry* e) { lockThread(); mSuspects.erase(e); + mFrozeList.erase(e); unlockThread(); } -void LLWatchdog::init() +void LLWatchdog::init( + create_marker_func_t error_state_callback, + clear_marker_func_t clear_marker_callback, + report_func_t report_callback, + notify_func_t notify_callback, + bool crash_on_freeze) { if (!mSuspectsAccessMutex && !mTimer) { @@ -187,6 +213,11 @@ void LLWatchdog::init() // start needs to use the mSuspectsAccessMutex mTimer->start(); } + mCreateMarkerFnc = error_state_callback; + mClearMarkerFnc = clear_marker_callback; + mCrashReportFnc = report_callback; + mNotifyFnc = notify_callback; + mCrashOnFreeze = crash_on_freeze; } void LLWatchdog::cleanup() @@ -241,7 +272,48 @@ void LLWatchdog::run() mTimer->stop(); } - LL_ERRS() << "Watchdog timer expired; assuming viewer is hung and crashing" << LL_ENDL; + std::string last_state = (*result)->getLastState(); + std::string description = "Watchdog timer for thread " + (*result)->getThreadName() + " expired"; + if (!last_state.empty()) + { + description += " with state: " + last_state; + } + description += "; assuming viewer is hung and crashing"; + + if (!mCrashOnFreeze) + { + // Sets watchdog marker file + mCreateMarkerFnc(false); + // If it's mainloop and it somehow recovers, it will re-add itself + LLWatchdogEntry* froze_entry = *result; + mSuspects.erase(result); + mFrozeList.insert(froze_entry); + LL_WARNS() << description << LL_ENDL; + } + else + { + + if (!mCrashReportFnc(description)) + { + // Sets error marker file + mCreateMarkerFnc(true); + // If false is returned, then we failed to report the issue to bugsplat, + // instead, Notify user, then crash viewer. + // Todo: ask user if viewer should quit or wait? + mNotifyFnc(); + LL_ERRS() << description << LL_ENDL; + } + else + { + // Sets watchdog marker file + mCreateMarkerFnc(false); + // Already reported, don't report again. + // If it's mainloop and it somehow recovers, it will re-add itself + LLWatchdogEntry* froze_entry = *result; + mSuspects.erase(result); + mFrozeList.insert(froze_entry); + } + } } } diff --git a/indra/newview/llwatchdog.h b/indra/llcommon/llwatchdog.h index 1931c582b0..f138fbccb0 100644 --- a/indra/newview/llwatchdog.h +++ b/indra/llcommon/llwatchdog.h @@ -27,18 +27,20 @@ #ifndef LL_LLTHREADWATCHDOG_H #define LL_LLTHREADWATCHDOG_H -#include <boost/function.hpp> - #ifndef LL_TIMER_H #include "lltimer.h" #endif +#include "llmutex.h" +#include "llsingleton.h" + +#include <functional> // LLWatchdogEntry is the interface used by the tasks that // need to be watched. class LLWatchdogEntry { public: - LLWatchdogEntry(); + LLWatchdogEntry(const std::string &thread_name); virtual ~LLWatchdogEntry(); // isAlive is accessed by the watchdog thread. @@ -48,12 +50,19 @@ public: virtual void reset() = 0; virtual void start(); virtual void stop(); + virtual std::string getLastState() const { return std::string(); } + typedef std::thread::id id_t; + std::string getThreadName() const; + +private: + id_t mThreadID; // ID of the thread being watched + std::string mThreadName; }; class LLWatchdogTimeout : public LLWatchdogEntry { public: - LLWatchdogTimeout(); + LLWatchdogTimeout(const std::string& thread_name); virtual ~LLWatchdogTimeout(); bool isAlive() const override; @@ -65,6 +74,7 @@ public: void setTimeout(F32 d); void ping(std::string_view state); const std::string& getState() {return mPingState; } + std::string getLastState() const override { return mPingState; } private: LLTimer mTimer; @@ -73,29 +83,49 @@ private: }; class LLWatchdogTimerThread; // Defined in the cpp -class LLWatchdog : public LLSingleton<LLWatchdog> +class LLWatchdog : public LLSimpleton<LLWatchdog> { - LLSINGLETON(LLWatchdog); +public: + LLWatchdog(); ~LLWatchdog(); -public: // Add an entry to the watchdog. void add(LLWatchdogEntry* e); void remove(LLWatchdogEntry* e); - void init(); + typedef std::function<void(bool)> create_marker_func_t; + typedef std::function<void()> clear_marker_func_t; + typedef std::function<bool(std::string&)> report_func_t; + typedef std::function<void()> notify_func_t; + void init( + create_marker_func_t error_state_callback, + clear_marker_func_t clear_marker_callback, + report_func_t report_callback, + notify_func_t notify_callback, + bool crash_on_freeze); void run(); void cleanup(); + private: void lockThread(); void unlockThread(); typedef std::set<LLWatchdogEntry*> SuspectsRegistry; SuspectsRegistry mSuspects; + SuspectsRegistry mFrozeList; LLMutex* mSuspectsAccessMutex; LLWatchdogTimerThread* mTimer; U64 mLastClockCount; + bool mCrashOnFreeze; + + // At the moment watchdog expects app to set markers in mCreateMarkerFnc, + // but technically can be used to set any error states or do some cleanup + // or show warnings. + create_marker_func_t mCreateMarkerFnc; + clear_marker_func_t mClearMarkerFnc; + report_func_t mCrashReportFnc; + notify_func_t mNotifyFnc; }; #endif // LL_LLTHREADWATCHDOG_H diff --git a/indra/llcommon/tests/lldependencies_test.cpp b/indra/llcommon/tests/lldependencies_test.cpp index 84eb41b5fe..2fea92e3b7 100644 --- a/indra/llcommon/tests/lldependencies_test.cpp +++ b/indra/llcommon/tests/lldependencies_test.cpp @@ -31,7 +31,6 @@ #include <string> // std headers // external library headers -#include <boost/assign/list_of.hpp> // Precompiled header #include "linden_common.h" // associated header @@ -106,8 +105,6 @@ std::ostream& operator<<(std::ostream& out, const std::set<ENTRY>& set) /***************************************************************************** * Other helpers *****************************************************************************/ -using boost::assign::list_of; - typedef LLDependencies<> StringDeps; typedef StringDeps::KeyList StringList; @@ -165,7 +162,7 @@ namespace tut // The quick brown fox jumps over the lazy yellow dog. // (note, "The" and "the" are distinct, else this test wouldn't work) deps.add("lazy"); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy"))); + ensure_equals(sorted_keys(deps), StringList{"lazy"}); deps.add("jumps"); ensure("found lazy", deps.get("lazy")); ensure("not found dog.", ! deps.get("dog.")); @@ -175,24 +172,23 @@ namespace tut // A change to the implementation of boost::topological_sort() would // be an acceptable reason, and you can simply update the expected // test output. - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("jumps"))); - deps.add("The", 0, empty, list_of("fox")("dog.")); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "jumps" }); + deps.add("The", 0, empty, { "fox", "dog." }); // Test key accessors ensure("empty before deps for missing key", is_empty(deps.get_before_range("bogus"))); ensure("empty before deps for jumps", is_empty(deps.get_before_range("jumps"))); - ensure_equals(instance_from_range< std::set<std::string> >(deps.get_before_range("The")), - make< std::set<std::string> >(list_of("dog.")("fox"))); + ensure_equals(instance_from_range< std::set<std::string> >(deps.get_before_range("The")), std::set<std::string>{ "dog.", "fox" }); // resume building dependencies - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("jumps")("The"))); - deps.add("the", 0, list_of("The")); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("jumps")("The")("the"))); - deps.add("fox", 0, list_of("The"), list_of("jumps")); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("the")("fox")("jumps"))); - deps.add("the", 0, list_of("The")); // same, see if cache works - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("the")("fox")("jumps"))); - deps.add("jumps", 0, empty, list_of("over")); // update jumps deps - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("the")("fox")("jumps"))); -/*==========================================================================*| + ensure_equals(sorted_keys(deps), StringList{ "lazy", "jumps", "The" }); + deps.add("the", 0, { "The" }); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "jumps", "The", "the" }); + deps.add("fox", 0, { "The" }, { "jumps" }); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "the", "fox", "jumps" }); + deps.add("the", 0, { "The" }); // same, see if cache works + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "the", "fox", "jumps" }); + deps.add("jumps", 0, empty, { "over" }); // update jumps deps + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "the", "fox", "jumps" }); + /*==========================================================================*| // It drives me nuts that this test doesn't work in the test // framework, because -- for reasons unknown -- running the test // framework on Mac OS X 10.5 Leopard and Windows XP Pro, the catch @@ -216,22 +212,21 @@ namespace tut deps.remove("over"); } |*==========================================================================*/ - deps.add("dog.", 0, list_of("yellow")("lazy")); - ensure_equals(instance_from_range< std::set<std::string> >(deps.get_after_range("dog.")), - make< std::set<std::string> >(list_of("lazy")("yellow"))); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("the")("fox")("jumps")("dog."))); - deps.add("quick", 0, list_of("The"), list_of("fox")("brown")); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("the")("quick")("fox")("jumps")("dog."))); - deps.add("over", 0, list_of("jumps"), list_of("yellow")("the")); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("lazy")("The")("quick")("fox")("jumps")("over")("the")("dog."))); - deps.add("yellow", 0, list_of("the"), list_of("lazy")); - ensure_equals(sorted_keys(deps), make<StringList>(list_of("The")("quick")("fox")("jumps")("over")("the")("yellow")("lazy")("dog."))); + deps.add("dog.", 0, { "yellow", "lazy" }); + ensure_equals(instance_from_range< std::set<std::string> >(deps.get_after_range("dog.")), std::set<std::string>{ "lazy", "yellow" }); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "the", "fox", "jumps", "dog." }); + deps.add("quick", 0, { "The" }, { "fox", "brown" }); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "the", "quick", "fox", "jumps", "dog." }); + deps.add("over", 0, { "jumps" }, { "yellow", "the" }); + ensure_equals(sorted_keys(deps), StringList{ "lazy", "The", "quick", "fox", "jumps", "over", "the", "dog." }); + deps.add("yellow", 0, { "the" }, { "lazy" }); + ensure_equals(sorted_keys(deps), StringList{ "The", "quick", "fox", "jumps", "over", "the", "yellow", "lazy", "dog." }); deps.add("brown"); // By now the dependencies are pretty well in place. A change to THIS // order should be viewed with suspicion. - ensure_equals(sorted_keys(deps), make<StringList>(list_of("The")("quick")("brown")("fox")("jumps")("over")("the")("yellow")("lazy")("dog."))); + ensure_equals(sorted_keys(deps), StringList{ "The", "quick", "brown", "fox", "jumps", "over", "the", "yellow", "lazy", "dog." }); - StringList keys(make<StringList>(list_of("The")("brown")("dog.")("fox")("jumps")("lazy")("over")("quick")("the")("yellow"))); + StringList keys(StringList{ "The", "brown", "dog.", "fox", "jumps", "lazy", "over", "quick", "the", "yellow" }); ensure_equals(instance_from_range<StringList>(deps.get_key_range()), keys); #if (! defined(__GNUC__)) || (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) // This is the succinct way, works on modern compilers @@ -255,9 +250,9 @@ namespace tut typedef LLDependencies<std::string, int> NameIndexDeps; NameIndexDeps nideps; const NameIndexDeps& const_nideps(nideps); - nideps.add("def", 2, list_of("ghi")); + nideps.add("def", 2, { "ghi" }); nideps.add("ghi", 3); - nideps.add("abc", 1, list_of("def")); + nideps.add("abc", 1, { "def" }); NameIndexDeps::range range(nideps.get_range()); ensure_equals(range.begin()->first, "abc"); ensure_equals(range.begin()->second, 1); @@ -269,20 +264,20 @@ namespace tut ensure_equals(const_iterator->first, "def"); ensure_equals(const_iterator->second, 2); // NameIndexDeps::node_range node_range(nideps.get_node_range()); -// ensure_equals(instance_from_range<std::vector<int> >(node_range), make< std::vector<int> >(list_of(1)(2)(3))); +// ensure_equals(instance_from_range<std::vector<int> >(node_range), make< std::vector<int> >(list_of(1,2,3))); // *node_range.begin() = 0; // *node_range.begin() = 1; NameIndexDeps::const_node_range const_node_range(const_nideps.get_node_range()); - ensure_equals(instance_from_range<std::vector<int> >(const_node_range), make< std::vector<int> >(list_of(1)(2)(3))); + ensure_equals(instance_from_range<std::vector<int>>(const_node_range), std::vector<int>{ 1, 2, 3 }); NameIndexDeps::const_key_range const_key_range(const_nideps.get_key_range()); - ensure_equals(instance_from_range<StringList>(const_key_range), make<StringList>(list_of("abc")("def")("ghi"))); + ensure_equals(instance_from_range<StringList>(const_key_range), StringList{ "abc", "def", "ghi" }); NameIndexDeps::sorted_range sorted(const_nideps.sort()); NameIndexDeps::sorted_iterator sortiter(sorted.begin()); ensure_equals(sortiter->first, "ghi"); ensure_equals(sortiter->second, 3); // test all iterator-flavored versions of get_after_range() - StringList def(make<StringList>(list_of("def"))); + StringList def{"def"}; ensure("empty abc before list", is_empty(nideps.get_before_range(nideps.get_range().begin()))); ensure_equals(instance_from_range<StringList>(nideps.get_after_range(nideps.get_range().begin())), def); @@ -296,7 +291,6 @@ namespace tut def); // advance from "ghi" to "def", which must come after "ghi" ++sortiter; - ensure_equals(instance_from_range<StringList>(const_nideps.get_after_range(sortiter)), - make<StringList>(list_of("ghi"))); + ensure_equals(instance_from_range<StringList>(const_nideps.get_after_range(sortiter)), StringList{ "ghi" }); } } // namespace tut diff --git a/indra/llcommon/tests/lleventdispatcher_test.cpp b/indra/llcommon/tests/lleventdispatcher_test.cpp index 44f772e322..8b206f7b14 100644 --- a/indra/llcommon/tests/lleventdispatcher_test.cpp +++ b/indra/llcommon/tests/lleventdispatcher_test.cpp @@ -33,7 +33,6 @@ #include <stdexcept> #include <boost/bind.hpp> -#include <boost/function.hpp> #include <boost/range.hpp> #include <boost/lambda/lambda.hpp> diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index 13422612d6..d3d8e54d45 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -21,7 +21,6 @@ // external library headers #include "llapr.h" #include "apr_thread_proc.h" -#include <boost/function.hpp> #include <boost/algorithm/string/find_iterator.hpp> #include <boost/algorithm/string/finder.hpp> // other Linden headers @@ -126,6 +125,8 @@ void waitfor(LLProcess& proc, int timeout=60) { yield(); } + // Pump once more after the process exits to flush any final events such as EOF. + yield(0); std::string msg = "process took longer than " + std::to_string(timeout) + " seconds to terminate"; tut::ensure(msg, i < timeout); } @@ -137,6 +138,8 @@ void waitfor(LLProcess::handle h, const std::string& desc, int timeout=60) { yield(); } + // Pump once more after the process exits to flush any final events such as EOF. + yield(0); std::string msg = "process took longer than " + std::to_string(timeout) + " seconds to terminate"; tut::ensure(msg, i < timeout); } @@ -260,9 +263,12 @@ static std::string python_out(const std::string& desc, const CONTENT& script) } /// Create a temporary directory and clean it up later. -class NamedTempDir: public boost::noncopyable +class NamedTempDir { public: + NamedTempDir(const NamedTempDir&) = delete; + NamedTempDir& operator=(const NamedTempDir&) = delete; + NamedTempDir(): mPath(NamedTempFile::temp_path()), mCreated(boost::filesystem::create_directories(mPath)) @@ -1091,8 +1097,11 @@ namespace tut ensure_equals("bad child exit code", py.mPy->getStatus().mData, 0); } - struct EventListener: public boost::noncopyable + struct EventListener { + EventListener(const EventListener&) = delete; + EventListener& operator=(const EventListener&) = delete; + EventListener(LLEventPump& pump) { mConnection = @@ -1203,8 +1212,8 @@ namespace tut { set_test_name("ReadPipe \"eof\" event"); PythonProcessLauncher py(get_test_name(), - "from __future__ import print_function\n" - "print('Hello from Python!')\n"); + "import time\n" + "time.sleep(1.5)\n"); py.mParams.files.add(LLProcess::FileParam()); // stdin py.mParams.files.add(LLProcess::FileParam("pipe")); // stdout py.launch(); diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index b68c63a15f..6a2c967363 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -28,13 +28,10 @@ #include "linden_common.h" -#include <boost/assign/list_of.hpp> #include "../llstring.h" #include "StringVec.h" // must come BEFORE lltut.h #include "../test/lltut.h" -using boost::assign::list_of; - namespace tut { struct string_index @@ -763,14 +760,14 @@ namespace tut ensure_equals("only delims", LLStringUtil::getTokens(" \r\n ", " \r\n"), StringVec()); ensure_equals("sequence of delims", - LLStringUtil::getTokens(",,, one ,,,", ","), list_of("one")); + LLStringUtil::getTokens(",,, one ,,,", ","), StringVec{"one"}); // nat considers this a dubious implementation side effect, but I'd // hate to change it now... ensure_equals("noncontiguous tokens", - LLStringUtil::getTokens(", ,, , one ,,,", ","), list_of("")("")("one")); + LLStringUtil::getTokens(", ,, , one ,,,", ","), StringVec{ "", "", "one" }); ensure_equals("space-padded tokens", - LLStringUtil::getTokens(", one , two ,", ","), list_of("one")("two")); - ensure_equals("no delims", LLStringUtil::getTokens("one", ","), list_of("one")); + LLStringUtil::getTokens(", one , two ,", ","), StringVec{"one", "two"}); + ensure_equals("no delims", LLStringUtil::getTokens("one", ","), StringVec{ "one" }); } // Shorthand for verifying that getTokens() behaves the same when you @@ -817,39 +814,33 @@ namespace tut ensure_getTokens("only delims", " \r\n ", " \r\n", "", StringVec()); ensure_getTokens("sequence of delims", - ",,, one ,,,", ", ", "", list_of("one")); + ",,, one ,,,", ", ", "", StringVec{"one"}); // Note contrast with the case in the previous method ensure_getTokens("noncontiguous tokens", - ", ,, , one ,,,", ", ", "", list_of("one")); + ", ,, , one ,,,", ", ", "", StringVec{"one"}); ensure_getTokens("space-padded tokens", ", one , two ,", ", ", "", - list_of("one")("two")); - ensure_getTokens("no delims", "one", ",", "", list_of("one")); + StringVec{"one", "two"}); + ensure_getTokens("no delims", "one", ",", "", StringVec{ "one" }); // drop_delims vs. keep_delims ensure_getTokens("arithmetic", - " ab+def / xx* yy ", " ", "+-*/", - list_of("ab")("+")("def")("/")("xx")("*")("yy")); + " ab+def / xx* yy ", " ", "+-*/", { "ab", "+", "def", "/", "xx", "*", "yy" }); // quotes ensure_getTokens("no quotes", - "She said, \"Don't go.\"", " ", ",", "", - list_of("She")("said")(",")("\"Don't")("go.\"")); + "She said, \"Don't go.\"", " ", ",", "", { "She", "said", ",", "\"Don't", "go.\"" }); ensure_getTokens("quotes", - "She said, \"Don't go.\"", " ", ",", "\"", - list_of("She")("said")(",")("Don't go.")); + "She said, \"Don't go.\"", " ", ",", "\"", { "She", "said", ",", "Don't go." }); ensure_getTokens("quotes and delims", "run c:/'Documents and Settings'/someone", " ", "", "'", - list_of("run")("c:/Documents and Settings/someone")); + { "run", "c:/Documents and Settings/someone" }); ensure_getTokens("unmatched quote", - "baby don't leave", " ", "", "'", - list_of("baby")("don't")("leave")); + "baby don't leave", " ", "", "'", { "baby", "don't", "leave" }); ensure_getTokens("adjacent quoted", - "abc'def \"ghi'\"jkl' mno\"pqr", " ", "", "\"'", - list_of("abcdef \"ghijkl' mnopqr")); + "abc'def \"ghi'\"jkl' mno\"pqr", " ", "", "\"'", { "abcdef \"ghijkl' mnopqr" }); ensure_getTokens("quoted empty string", - "--set SomeVar ''", " ", "", "'", - list_of("--set")("SomeVar")("")); + "--set SomeVar ''", " ", "", "'", { "--set", "SomeVar", "" }); // escapes // Don't use backslash as an escape for these tests -- you'll go nuts @@ -857,15 +848,12 @@ namespace tut // something else! ensure_equals("escaped delims", LLStringUtil::getTokens("^ a - dog^-gone^ phrase", " ", "-", "", "^"), - list_of(" a")("-")("dog-gone phrase")); + StringVec{ " a", "-", "dog-gone phrase" }); ensure_equals("escaped quotes", LLStringUtil::getTokens("say: 'this isn^'t w^orking'.", " ", "", "'", "^"), - list_of("say:")("this isn't working.")); + StringVec{ "say:", "this isn't working." }); ensure_equals("escaped escape", - LLStringUtil::getTokens("want x^^2", " ", "", "", "^"), - list_of("want")("x^2")); - ensure_equals("escape at end", - LLStringUtil::getTokens("it's^ up there^", " ", "", "'", "^"), - list_of("it's up")("there^")); + LLStringUtil::getTokens("want x^^2", " ", "", "", "^"), StringVec{ "want", "x^2" }); + ensure_equals("escape at end", LLStringUtil::getTokens("it's^ up there^", " ", "", "'", "^"), StringVec{ "it's up", "there^" }); } } diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp index 7a2adfd8ba..6734596d25 100644 --- a/indra/llcommon/tests/lltreeiterators_test.cpp +++ b/indra/llcommon/tests/lltreeiterators_test.cpp @@ -32,6 +32,7 @@ // STL headers // std headers +#include <functional> #include <iostream> #include <sstream> #include <string> @@ -915,7 +916,7 @@ struct WalkExpected<LLTreeIter::BFS>: public Expected template <class NODE, typename CHILDITER> typename LLPtrTo<NODE>::type get_B2b(const typename LLPtrTo<NODE>::type& root, - const boost::function<CHILDITER(const typename LLPtrTo<NODE>::type&)>& child_begin) + const std::function<CHILDITER(const typename LLPtrTo<NODE>::type&)>& child_begin) { typedef typename LLPtrTo<NODE>::type NodePtr; CHILDITER Bi(child_begin(root)); diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index 7efaebd569..fbd92d089e 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -38,7 +38,8 @@ LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown) { // Register for "LLApp" events so we can implicitly close() on viewer shutdown std::string listener_name = "WorkQueue:" + getKey(); - LLEventPumps::instance().obtain("LLApp").listen( + LLEventPumps* pump = LLEventPumps::getInstance(); + pump->obtain("LLApp").listen( listener_name, [this](const LLSD& stat) { @@ -54,14 +55,25 @@ LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown) // Store the listener name so we can unregister in the destructor mListenerName = listener_name; + mPumpHandle = pump->getHandle(); } } LL::WorkQueueBase::~WorkQueueBase() { - if (!mListenerName.empty() && !LLEventPumps::wasDeleted()) + if (!mListenerName.empty() && !mPumpHandle.isDead()) { - LLEventPumps::instance().obtain("LLApp").stopListening(mListenerName); + // Due to shutdown order issues, use handle, not a singleton + // and ignore fiber issue. + try + { + LLEventPumps* pump = mPumpHandle.get(); + pump->obtain("LLApp").stopListening(mListenerName); + } + catch (const boost::fibers::lock_error&) + { + // Likely mutex is down, ignore + } } } @@ -216,10 +228,15 @@ void LL::WorkQueueBase::callWork(const Work& work) LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase " << getKey() << LL_ENDL; + std::string name = getKey(); LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); main_queue->post( // Bind the current exception, rethrow it in main loop. - [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + [exc = std::current_exception(), name]() + { + LL_INFOS("LLCoros") << "Rethrowing exception from WorkQueueBase::callWork " << name << LL_ENDL; + std::rethrow_exception(exc); + }); } else { @@ -276,12 +293,30 @@ bool LL::WorkQueue::done() bool LL::WorkQueue::post(const Work& callable) { - return mQueue.pushIfOpen(callable); + try + { + return mQueue.pushIfOpen(callable); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::post" << LL_ENDL; + return false; + } } bool LL::WorkQueue::tryPost(const Work& callable) { - return mQueue.tryPush(callable); + try + { + return mQueue.tryPush(callable); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::tryPost" << LL_ENDL; + return false; + } } LL::WorkQueue::Work LL::WorkQueue::pop_() diff --git a/indra/llcommon/workqueue.h b/indra/llcommon/workqueue.h index 735ad38a26..69f3286c1b 100644 --- a/indra/llcommon/workqueue.h +++ b/indra/llcommon/workqueue.h @@ -14,6 +14,7 @@ #include "llcoros.h" #include "llexception.h" +#include "llhandle.h" #include "llinstancetracker.h" #include "llinstancetrackersubclass.h" #include "threadsafeschedule.h" @@ -22,6 +23,9 @@ #include <functional> // std::function #include <string> +class LLEventPumps; + + namespace LL { @@ -202,6 +206,8 @@ namespace LL // Name used for the LLApp event listener (empty if not registered) std::string mListenerName; + // Due to shutdown order issues, store by handle + LLHandle<LLEventPumps> mPumpHandle; }; /***************************************************************************** @@ -530,7 +536,11 @@ namespace LL reply, // Bind the current exception to transport back to the // originating WorkQueue. Once there, rethrow it. - [exc = std::current_exception()](){ std::rethrow_exception(exc); }); + [exc = std::current_exception()]() + { + LL_INFOS("LLCoros") << "Rethrowing exception from WorkQueueBase::postTo" << LL_ENDL; + std::rethrow_exception(exc); + }); } }, // if caller passed a TimePoint, pass it along to post() diff --git a/indra/llcorehttp/_httplibcurl.h b/indra/llcorehttp/_httplibcurl.h index 3631965837..58affcb796 100644 --- a/indra/llcorehttp/_httplibcurl.h +++ b/indra/llcorehttp/_httplibcurl.h @@ -61,8 +61,8 @@ public: virtual ~HttpLibcurl(); private: - HttpLibcurl(const HttpLibcurl &); // Not defined - void operator=(const HttpLibcurl &); // Not defined + HttpLibcurl(const HttpLibcurl&) = delete; + void operator=(const HttpLibcurl&) = delete; public: typedef std::shared_ptr<HttpOpRequest> opReqPtr_t; @@ -179,8 +179,8 @@ protected: ~HandleCache(); private: - HandleCache(const HandleCache &); // Not defined - void operator=(const HandleCache &); // Not defined + HandleCache(const HandleCache&) = delete; + void operator=(const HandleCache&) = delete; public: /// Allocate a curl handle for caller. May be freed using diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h index ff7efe60e9..8412043aa5 100644 --- a/indra/llcorehttp/_httpoperation.h +++ b/indra/llcorehttp/_httpoperation.h @@ -68,8 +68,7 @@ class HttpService; /// via queue-like interfaces that are thread compatible /// and those interfaces establish the access rules. -class HttpOperation : private boost::noncopyable, - public std::enable_shared_from_this<HttpOperation> +class HttpOperation : public std::enable_shared_from_this<HttpOperation> { public: typedef std::shared_ptr<HttpOperation> ptr_t; @@ -82,6 +81,9 @@ public: /// Threading: called by any thread. virtual ~HttpOperation(); // Use release() + // Non-copyable + HttpOperation(const HttpOperation&) = delete; + HttpOperation& operator=(const HttpOperation&) = delete; public: /// Register a reply queue and a handler for completion notifications. @@ -220,12 +222,10 @@ class HttpOpStop : public HttpOperation { public: HttpOpStop(); - virtual ~HttpOpStop(); -private: - HttpOpStop(const HttpOpStop &); // Not defined - void operator=(const HttpOpStop &); // Not defined + HttpOpStop(const HttpOpStop &) = delete; + HttpOpStop& operator=(const HttpOpStop&) = delete; public: virtual void stageFromRequest(HttpService *); @@ -242,12 +242,10 @@ class HttpOpNull : public HttpOperation { public: HttpOpNull(); - virtual ~HttpOpNull(); -private: - HttpOpNull(const HttpOpNull &); // Not defined - void operator=(const HttpOpNull &); // Not defined + HttpOpNull(const HttpOpNull&) = delete; + HttpOpNull& operator=(const HttpOpNull&) = delete; public: virtual void stageFromRequest(HttpService *); @@ -264,12 +262,10 @@ public: // 0 does a hard spin in the operation // 1 does a soft spin continuously requeuing itself HttpOpSpin(int mode); - virtual ~HttpOpSpin(); -private: - HttpOpSpin(const HttpOpSpin &); // Not defined - void operator=(const HttpOpSpin &); // Not defined + HttpOpSpin(const HttpOpSpin&) = delete; + HttpOpSpin& operator=(const HttpOpSpin&) = delete; public: virtual void stageFromRequest(HttpService *); diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index bde1aed910..bbf39c2afa 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -153,7 +153,7 @@ HttpOpRequest::HttpOpRequest() mPolicyRetryLimit(HTTP_RETRY_COUNT_DEFAULT), mPolicyMinRetryBackoff(HttpTime(HTTP_RETRY_BACKOFF_MIN_DEFAULT)), mPolicyMaxRetryBackoff(HttpTime(HTTP_RETRY_BACKOFF_MAX_DEFAULT)), - mCallbackSSLVerify(NULL) + mCallbackSSLVerify(nullptr) { // *NOTE: As members are added, retry initialization/cleanup // may need to be extended in @see prepareRequest(). @@ -272,7 +272,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request) response->setContentType(mReplyConType); response->setRetries(mPolicyRetries, mPolicy503Retries); - HttpResponse::TransferStats::ptr_t stats = HttpResponse::TransferStats::ptr_t(new HttpResponse::TransferStats); + HttpResponse::TransferStats::ptr_t stats = std::make_shared<HttpResponse::TransferStats>(); curl_easy_getinfo(mCurlHandle, CURLINFO_SIZE_DOWNLOAD, &stats->mSizeDownload); curl_easy_getinfo(mCurlHandle, CURLINFO_TOTAL_TIME, &stats->mTotalTime); @@ -968,7 +968,7 @@ size_t HttpOpRequest::headerCallback(void * data, size_t size, size_t nmemb, voi // Save headers in response if (! op->mReplyHeaders) { - op->mReplyHeaders = HttpHeaders::ptr_t(new HttpHeaders); + op->mReplyHeaders = std::make_shared<HttpHeaders>(); } op->mReplyHeaders->append(name, value ? value : ""); } diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h index b029bc740c..717535555c 100644 --- a/indra/llcorehttp/_httpoprequest.h +++ b/indra/llcorehttp/_httpoprequest.h @@ -73,8 +73,8 @@ public: virtual ~HttpOpRequest(); // Use release() private: - HttpOpRequest(const HttpOpRequest &); // Not defined - void operator=(const HttpOpRequest &); // Not defined + HttpOpRequest(const HttpOpRequest&) = delete; + void operator=(const HttpOpRequest&) = delete; public: enum EMethod diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h index 0b927a6b71..ff8204547b 100644 --- a/indra/llcorehttp/_httpopsetget.h +++ b/indra/llcorehttp/_httpopsetget.h @@ -60,8 +60,8 @@ public: virtual ~HttpOpSetGet(); // Use release() private: - HttpOpSetGet(const HttpOpSetGet &); // Not defined - void operator=(const HttpOpSetGet &); // Not defined + HttpOpSetGet(const HttpOpSetGet&) = delete; + void operator=(const HttpOpSetGet&) = delete; public: /// Threading: called by application thread diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h index a074949f20..82f552176e 100644 --- a/indra/llcorehttp/_httppolicy.h +++ b/indra/llcorehttp/_httppolicy.h @@ -56,8 +56,8 @@ public: virtual ~HttpPolicy(); private: - HttpPolicy(const HttpPolicy &); // Not defined - void operator=(const HttpPolicy &); // Not defined + HttpPolicy(const HttpPolicy&) = delete; + void operator=(const HttpPolicy&) = delete; public: typedef std::shared_ptr<HttpOpRequest> opReqPtr_t; diff --git a/indra/llcorehttp/_httppolicyclass.h b/indra/llcorehttp/_httppolicyclass.h index 32bcad4f9c..5bf0fa1fa7 100644 --- a/indra/llcorehttp/_httppolicyclass.h +++ b/indra/llcorehttp/_httppolicyclass.h @@ -53,7 +53,7 @@ public: ~HttpPolicyClass(); HttpPolicyClass & operator=(const HttpPolicyClass &); - HttpPolicyClass(const HttpPolicyClass &); // Not defined + HttpPolicyClass(const HttpPolicyClass &); public: HttpStatus set(HttpRequest::EPolicyOption opt, long value); diff --git a/indra/llcorehttp/_httppolicyglobal.h b/indra/llcorehttp/_httppolicyglobal.h index d9114d167f..3840d66b22 100644 --- a/indra/llcorehttp/_httppolicyglobal.h +++ b/indra/llcorehttp/_httppolicyglobal.h @@ -55,7 +55,7 @@ public: HttpPolicyGlobal & operator=(const HttpPolicyGlobal &); private: - HttpPolicyGlobal(const HttpPolicyGlobal &); // Not defined + HttpPolicyGlobal(const HttpPolicyGlobal &) = delete; public: HttpStatus set(HttpRequest::EPolicyOption opt, long value); diff --git a/indra/llcorehttp/_httpreadyqueue.h b/indra/llcorehttp/_httpreadyqueue.h index 0bc0723511..04fcf25356 100644 --- a/indra/llcorehttp/_httpreadyqueue.h +++ b/indra/llcorehttp/_httpreadyqueue.h @@ -77,8 +77,8 @@ public: {} protected: - HttpReadyQueue(const HttpReadyQueue &); // Not defined - void operator=(const HttpReadyQueue &); // Not defined + HttpReadyQueue(const HttpReadyQueue&) = delete; + void operator=(const HttpReadyQueue&) = delete; public: diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h index d8847fafb5..e1b5648691 100644 --- a/indra/llcorehttp/_httpreplyqueue.h +++ b/indra/llcorehttp/_httpreplyqueue.h @@ -30,8 +30,6 @@ #include "_refcounted.h" #include "_mutex.h" -#include "boost/noncopyable.hpp" - namespace LLCore { @@ -59,7 +57,7 @@ class HttpOperation; /// will be coded anyway so it shouldn't be too much of a /// burden. -class HttpReplyQueue : private boost::noncopyable +class HttpReplyQueue { public: @@ -69,6 +67,9 @@ public: HttpReplyQueue(); virtual ~HttpReplyQueue(); + HttpReplyQueue(const HttpReplyQueue&) = delete; + HttpReplyQueue& operator=(const HttpReplyQueue&) = delete; + public: typedef std::vector< opPtr_t > OpContainer; diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h index 0823126f78..82537c9053 100644 --- a/indra/llcorehttp/_httprequestqueue.h +++ b/indra/llcorehttp/_httprequestqueue.h @@ -57,8 +57,8 @@ protected: virtual ~HttpRequestQueue(); // Use release() private: - HttpRequestQueue(const HttpRequestQueue &); // Not defined - void operator=(const HttpRequestQueue &); // Not defined + HttpRequestQueue(const HttpRequestQueue&) = delete; + void operator=(const HttpRequestQueue&) = delete; public: typedef std::shared_ptr<HttpOperation> opPtr_t; diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 5880fb7e87..a8660decc3 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -27,7 +27,6 @@ #include "_httpservice.h" #include <boost/bind.hpp> -#include <boost/function.hpp> #include "_httpoperation.h" #include "_httprequestqueue.h" diff --git a/indra/llcorehttp/_httpservice.h b/indra/llcorehttp/_httpservice.h index 13eb034f0e..7202b496fc 100644 --- a/indra/llcorehttp/_httpservice.h +++ b/indra/llcorehttp/_httpservice.h @@ -86,8 +86,8 @@ protected: virtual ~HttpService(); private: - HttpService(const HttpService &); // Not defined - void operator=(const HttpService &); // Not defined + HttpService(const HttpService&) = delete; + void operator=(const HttpService&) = delete; public: enum EState diff --git a/indra/llcorehttp/_refcounted.h b/indra/llcorehttp/_refcounted.h index 7470965a7f..63684b5e2c 100644 --- a/indra/llcorehttp/_refcounted.h +++ b/indra/llcorehttp/_refcounted.h @@ -31,12 +31,9 @@ #include "linden_common.h" #include "fix_macros.h" -#include <boost/thread.hpp> #include <boost/intrusive_ptr.hpp> - #include "llatomic.h" - namespace LLCoreInt { @@ -44,8 +41,9 @@ namespace LLCoreInt class RefCounted { private: - RefCounted(); // Not defined - may not be default constructed - void operator=(const RefCounted &); // Not defined + RefCounted() = delete; // may not be default constructed + RefCounted(const RefCounted&) = delete; + RefCounted& operator=(const RefCounted&) = delete; public: explicit RefCounted(bool const implicit) diff --git a/indra/llcorehttp/_thread.h b/indra/llcorehttp/_thread.h index 6c0e39cf92..93efbbedbc 100644 --- a/indra/llcorehttp/_thread.h +++ b/indra/llcorehttp/_thread.h @@ -42,8 +42,10 @@ namespace LLCoreInt class HttpThread : public RefCounted { private: - HttpThread(); // Not defined - void operator=(const HttpThread &); // Not defined + // May not be default constructed or copied + HttpThread() = delete; + HttpThread(const HttpThread&) = delete; + void operator=(const HttpThread &) = delete; void at_exit() { diff --git a/indra/llcorehttp/bufferarray.cpp b/indra/llcorehttp/bufferarray.cpp index 6b33661d8f..46c03f991d 100644 --- a/indra/llcorehttp/bufferarray.cpp +++ b/indra/llcorehttp/bufferarray.cpp @@ -57,12 +57,12 @@ public: void operator delete(void *); void operator delete(void *, size_t len); + Block(const Block&) = delete; + Block& operator=(const Block&) = delete; + protected: Block(size_t len); - Block(const Block &); // Not defined - void operator=(const Block &); // Not defined - // Allocate the block with the additional space for the // buffered data at the end of the object. void * operator new(size_t len, size_t addl_len); diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h index 5105dbc4f7..9abe1778ed 100644 --- a/indra/llcorehttp/bufferarray.h +++ b/indra/llcorehttp/bufferarray.h @@ -79,8 +79,8 @@ protected: virtual ~BufferArray(); // Use release() private: - BufferArray(const BufferArray &); // Not defined - void operator=(const BufferArray &); // Not defined + BufferArray(const BufferArray&) = delete; + void operator=(const BufferArray&) = delete; public: // Internal magic number, may be used by unit tests. diff --git a/indra/llcorehttp/bufferstream.h b/indra/llcorehttp/bufferstream.h index 93891810aa..ba84821df3 100644 --- a/indra/llcorehttp/bufferstream.h +++ b/indra/llcorehttp/bufferstream.h @@ -91,8 +91,8 @@ public: virtual ~BufferArrayStreamBuf(); private: - BufferArrayStreamBuf(const BufferArrayStreamBuf &); // Not defined - void operator=(const BufferArrayStreamBuf &); // Not defined + BufferArrayStreamBuf(const BufferArrayStreamBuf&) = delete; + void operator=(const BufferArrayStreamBuf&) = delete; public: // Input interfaces from std::streambuf diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h index 511a17e000..1c003a0966 100644 --- a/indra/llcorehttp/httpcommon.h +++ b/indra/llcorehttp/httpcommon.h @@ -191,7 +191,6 @@ #include "llsd.h" #include <string> #include <curl/curl.h> -#include "boost/noncopyable.hpp" namespace LLCore { @@ -297,25 +296,25 @@ struct HttpStatus HttpStatus() { - mDetails = std::shared_ptr<Details>(new Details(LLCORE, HE_SUCCESS)); + mDetails = std::make_shared<Details>(LLCORE, HE_SUCCESS); } HttpStatus(type_enum_t type, short status) { - mDetails = std::shared_ptr<Details>(new Details(type, status)); + mDetails = std::make_shared<Details>(type, status); } HttpStatus(int http_status) { - mDetails = std::shared_ptr<Details>(new Details(http_status, - (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR)); + mDetails = std::make_shared<Details>(http_status, + (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR); llassert(http_status >= 100 && http_status <= 999); } HttpStatus(int http_status, const std::string &message) { - mDetails = std::shared_ptr<Details>(new Details(http_status, - (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR)); + mDetails = std::make_shared<Details>(http_status, + (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR); llassert(http_status >= 100 && http_status <= 999); mDetails->mMessage = message; } @@ -337,7 +336,7 @@ struct HttpStatus HttpStatus & clone(const HttpStatus &rhs) { - mDetails = std::shared_ptr<Details>(new Details(*rhs.mDetails)); + mDetails = std::make_shared<Details>(*rhs.mDetails); return *this; } diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h index a5ca7749b0..6a03cf4083 100644 --- a/indra/llcorehttp/httpheaders.h +++ b/indra/llcorehttp/httpheaders.h @@ -74,7 +74,7 @@ namespace LLCore /// constructor is given a refcount. /// -class HttpHeaders: private boost::noncopyable +class HttpHeaders { public: typedef std::pair<std::string, std::string> header_t; @@ -94,11 +94,11 @@ public: HttpHeaders(); virtual ~HttpHeaders(); // Use release() - //typedef LLCoreInt::IntrusivePtr<HttpHeaders> ptr_t; -protected: + // Non-copyable + HttpHeaders(const HttpHeaders&) = delete; + HttpHeaders& operator=(const HttpHeaders&) = delete; - HttpHeaders(const HttpHeaders &); // Not defined - void operator=(const HttpHeaders &); // Not defined + //typedef LLCoreInt::IntrusivePtr<HttpHeaders> ptr_t; public: // Empty the list of headers. diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h index fdb277c66e..d50c5470ae 100644 --- a/indra/llcorehttp/httpoptions.h +++ b/indra/llcorehttp/httpoptions.h @@ -55,7 +55,7 @@ namespace LLCore /// Allocation: Refcounted, heap only. Caller of the constructor /// is given a refcount. /// -class HttpOptions : private boost::noncopyable +class HttpOptions { public: HttpOptions(); @@ -64,10 +64,9 @@ public: virtual ~HttpOptions(); // Use release() -protected: - - HttpOptions(const HttpOptions &); // Not defined - void operator=(const HttpOptions &); // Not defined + // Non-copyable + HttpOptions(const HttpOptions&) = delete; + HttpOptions& operator=(const HttpOptions&) = delete; public: diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index 2aaf71f8a4..d8fcd6a03f 100644 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -60,7 +60,7 @@ HttpRequest::HttpRequest() mRequestQueue = HttpRequestQueue::instanceOf(); mRequestQueue->addRef(); - mReplyQueue.reset( new HttpReplyQueue() ); + mReplyQueue = std::make_shared<HttpReplyQueue>(); HTTPStats::instance().recordHTTPRequest(); } @@ -129,7 +129,7 @@ HttpHandle HttpRequest::setPolicyOption(EPolicyOption opt, policy_t pclass, { HttpStatus status; - HttpOpSetGet::ptr_t op(new HttpOpSetGet()); + HttpOpSetGet::ptr_t op = std::make_shared<HttpOpSetGet>(); if (! (status = op->setupSet(opt, pclass, value))) { mLastReqStatus = status; @@ -152,7 +152,7 @@ HttpHandle HttpRequest::setPolicyOption(EPolicyOption opt, policy_t pclass, { HttpStatus status; - HttpOpSetGet::ptr_t op (new HttpOpSetGet()); + HttpOpSetGet::ptr_t op = std::make_shared<HttpOpSetGet>(); if (! (status = op->setupSet(opt, pclass, value))) { mLastReqStatus = status; @@ -190,7 +190,7 @@ HttpHandle HttpRequest::requestGet(policy_t policy_id, LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (! (status = op->setupGet(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -219,7 +219,7 @@ HttpHandle HttpRequest::requestGetByteRange(policy_t policy_id, LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (! (status = op->setupGetByteRange(policy_id, url, offset, len, options, headers))) { mLastReqStatus = status; @@ -246,7 +246,7 @@ HttpHandle HttpRequest::requestPost(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (! (status = op->setupPost(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -273,7 +273,7 @@ HttpHandle HttpRequest::requestPut(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (! (status = op->setupPut(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -298,7 +298,7 @@ HttpHandle HttpRequest::requestDelete(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (!(status = op->setupDelete(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -324,7 +324,7 @@ HttpHandle HttpRequest::requestPatch(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (!(status = op->setupPatch(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -349,7 +349,7 @@ HttpHandle HttpRequest::requestCopy(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (!(status = op->setupCopy(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -375,7 +375,7 @@ HttpHandle HttpRequest::requestMove(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared<HttpOpRequest>(); if (!(status = op->setupMove(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -397,7 +397,7 @@ HttpHandle HttpRequest::requestNoOp(HttpHandler::ptr_t user_handler) { HttpStatus status; - HttpOperation::ptr_t op (new HttpOpNull()); + HttpOperation::ptr_t op = std::make_shared<HttpOpNull>(); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -463,7 +463,7 @@ HttpHandle HttpRequest::requestCancel(HttpHandle request, HttpHandler::ptr_t use { HttpStatus status; - HttpOperation::ptr_t op(new HttpOpCancel(request)); + HttpOperation::ptr_t op = std::make_shared<HttpOpCancel>(request); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -528,7 +528,7 @@ HttpHandle HttpRequest::requestStopThread(HttpHandler::ptr_t user_handler) HttpStatus status; HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); - HttpOperation::ptr_t op(new HttpOpStop()); + HttpOperation::ptr_t op = std::make_shared<HttpOpStop>(); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -548,7 +548,7 @@ HttpHandle HttpRequest::requestSpin(int mode) HttpStatus status; HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); - HttpOperation::ptr_t op(new HttpOpSpin(mode)); + HttpOperation::ptr_t op = std::make_shared<HttpOpSpin>(mode); op->setReplyPath(mReplyQueue, HttpHandler::ptr_t()); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { diff --git a/indra/llcorehttp/httprequest.h b/indra/llcorehttp/httprequest.h index e6e051410e..f7516f127a 100644 --- a/indra/llcorehttp/httprequest.h +++ b/indra/llcorehttp/httprequest.h @@ -104,9 +104,9 @@ public: /// Represents a default, catch-all policy class that guarantees /// eventual service for any HTTP request. - static const policy_t DEFAULT_POLICY_ID = 0; - static const policy_t INVALID_POLICY_ID = 0xFFFFFFFFU; - static const policy_t GLOBAL_POLICY_ID = 0xFFFFFFFEU; + static constexpr policy_t DEFAULT_POLICY_ID = 0; + static constexpr policy_t INVALID_POLICY_ID = 0xFFFFFFFFU; + static constexpr policy_t GLOBAL_POLICY_ID = 0xFFFFFFFEU; /// Create a new policy class into which requests can be made. /// @@ -237,7 +237,7 @@ public: /// Prototype for policy based callbacks. The callback methods will be executed /// on the worker thread so no modifications should be made to the HttpHandler object. - typedef boost::function<HttpStatus(const std::string &, const HttpHandler::ptr_t &, void *)> policyCallback_t; + typedef std::function<HttpStatus(const std::string &, const HttpHandler::ptr_t &, void *)> policyCallback_t; /// Set a policy option for a global or class parameter at /// startup time (prior to thread start). diff --git a/indra/llcorehttp/httpresponse.h b/indra/llcorehttp/httpresponse.h index 99c8f1d2f9..ed2d76c10f 100644 --- a/indra/llcorehttp/httpresponse.h +++ b/indra/llcorehttp/httpresponse.h @@ -65,8 +65,8 @@ public: protected: virtual ~HttpResponse(); // Use release() - HttpResponse(const HttpResponse &); // Not defined - void operator=(const HttpResponse &); // Not defined + HttpResponse(const HttpResponse&) = delete; + void operator=(const HttpResponse&) = delete; public: /// Statistics for the HTTP diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index 33760d28ae..a57ac021d9 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -44,16 +44,10 @@ #include "stringize.h" #include "llstring.h" #include <boost/filesystem.hpp> -#include <boost/range/begin.hpp> -#include <boost/range/end.hpp> -#include <boost/assign/list_of.hpp> +#include "llprocess.h" #include <boost/bind.hpp> -#include <boost/ref.hpp> #include <algorithm> -using boost::assign::list_of; -using boost::assign::map_list_of; - #if LL_WINDOWS #include "lldir_win32.h" LLDir_Win32 gDirUtil; @@ -452,28 +446,28 @@ const std::string &LLDir::getUserName() const static std::string ELLPathToString(ELLPath location) { typedef std::map<ELLPath, const char*> ELLPathMap; -#define ENT(symbol) (symbol, #symbol) - static const ELLPathMap sMap = map_list_of - ENT(LL_PATH_NONE) - ENT(LL_PATH_USER_SETTINGS) - ENT(LL_PATH_APP_SETTINGS) - ENT(LL_PATH_PER_SL_ACCOUNT) // returns/expands to blank string if we don't know the account name yet - ENT(LL_PATH_CACHE) - ENT(LL_PATH_CHARACTER) - ENT(LL_PATH_HELP) - ENT(LL_PATH_LOGS) - ENT(LL_PATH_TEMP) - ENT(LL_PATH_SKINS) - ENT(LL_PATH_TOP_SKIN) - ENT(LL_PATH_CHAT_LOGS) - ENT(LL_PATH_PER_ACCOUNT_CHAT_LOGS) - ENT(LL_PATH_USER_SKIN) - ENT(LL_PATH_LOCAL_ASSETS) - ENT(LL_PATH_EXECUTABLE) - ENT(LL_PATH_DEFAULT_SKIN) - ENT(LL_PATH_FONTS) - ENT(LL_PATH_LAST) - ; +#define ENT(symbol) { symbol, #symbol } + static const ELLPathMap sMap = { + ENT(LL_PATH_NONE), + ENT(LL_PATH_USER_SETTINGS), + ENT(LL_PATH_APP_SETTINGS), + ENT(LL_PATH_PER_SL_ACCOUNT), // returns/expands to blank string if we don't know the account name yet + ENT(LL_PATH_CACHE), + ENT(LL_PATH_CHARACTER), + ENT(LL_PATH_HELP), + ENT(LL_PATH_LOGS), + ENT(LL_PATH_TEMP), + ENT(LL_PATH_SKINS), + ENT(LL_PATH_TOP_SKIN), + ENT(LL_PATH_CHAT_LOGS), + ENT(LL_PATH_PER_ACCOUNT_CHAT_LOGS), + ENT(LL_PATH_USER_SKIN), + ENT(LL_PATH_LOCAL_ASSETS), + ENT(LL_PATH_EXECUTABLE), + ENT(LL_PATH_DEFAULT_SKIN), + ENT(LL_PATH_FONTS), + ENT(LL_PATH_LAST), + }; #undef ENT ELLPathMap::const_iterator found = sMap.find(location); @@ -729,10 +723,10 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir, LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // Recognize subdirs that have no localization. - static const std::set<std::string> sUnlocalized = list_of - ("") // top-level directory not localized - ("textures") // textures not localized - ; + static const std::set<std::string> sUnlocalized = { + "", // top-level directory not localized + "textures" // textures not localized + }; LL_DEBUGS("LLDir") << "subdir '" << subdir << "', filename '" << filename << "', constraint " @@ -1111,6 +1105,64 @@ LLDir::SepOff LLDir::needSep(const std::string& path, const std::string& name) c return SepOff(false, 0); } +void LLDir::openDir(const std::string& filepath) +{ + if (filepath.empty()) + { + LL_WARNS() << "Cannot open file browser: filepath is empty" << LL_ENDL; + return; + } + + // Extract directory path from full filepath + std::string dir_path = getDirName(filepath); + + LLProcess::Params params; + +#if LL_WINDOWS + // Windows: Use explorer.exe with /select flag to highlight the file + std::string system_root = LLStringUtil::getenv("SystemRoot"); + if (system_root.empty()) + { + system_root = LLStringUtil::getenv("WINDIR"); + } + if (system_root.empty()) + { + LL_WARNS() << "Neither SystemRoot nor WINDIR environment variable is set" << LL_ENDL; + system_root = "C:\\Windows"; // Last resort fallback + } + params.executable = system_root + "\\explorer.exe"; + params.args.add("/select,"); + params.args.add(filepath); +#elif LL_DARWIN + // macOS: Use 'open' command with -R flag to reveal in Finder + params.executable = "/usr/bin/open"; + params.args.add("-R"); + params.args.add(filepath); +#elif LL_LINUX + // Linux: Use xdg-open to open the directory + // Note: Most file managers don't support file selection, so we open the directory + params.executable = "/usr/bin/xdg-open"; + params.args.add(dir_path); +#elif __FreeBSD__ + params.executable = "/usr/local/bin/xdg-open"; + params.args.add(dir_path); +#else + LL_WARNS() << "Platform not supported for file browser opening" << LL_ENDL; + return; +#endif + + params.autokill = false; // Don't kill the file browser when viewer exits + + if (!LLProcess::create(params)) + { + LL_WARNS() << "Failed to open file browser for: " << filepath << LL_ENDL; + } + else + { + LL_INFOS() << "Opened file browser for: " << filepath << LL_ENDL; + } +} + void dir_exists_or_crash(const std::string &dir_name) { #if LL_WINDOWS diff --git a/indra/llfilesystem/lldir.h b/indra/llfilesystem/lldir.h index b0d2b6aada..3c8e2e2da6 100644 --- a/indra/llfilesystem/lldir.h +++ b/indra/llfilesystem/lldir.h @@ -194,6 +194,9 @@ class LLDir virtual void dumpCurrentDirectories(LLError::ELevel level = LLError::LEVEL_DEBUG); + // Open the system file browser to reveal a file or directory + void openDir(const std::string& filepath); + // Utility routine std::string buildSLOSCacheDir() const; diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index 82e9e18918..fafe959ac6 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -91,6 +91,8 @@ LLDiskCache::LLDiskCache(const std::string& cache_dir, // asset will have to be re-requested. void LLDiskCache::purge() { + LL_PROFILE_ZONE_SCOPED; + if (mEnableCacheDebugInfo) { LL_INFOS() << "Total dir size before purge is " << dirFileSize(sCacheDir) << LL_ENDL; @@ -112,6 +114,10 @@ void LLDiskCache::purge() boost::filesystem::directory_iterator iter(cache_path, ec); while (iter != boost::filesystem::directory_iterator() && !ec.failed()) { + if(!LLApp::isRunning()) + { + return; + } if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { #if LL_WINDOWS @@ -158,6 +164,10 @@ void LLDiskCache::purge() uintmax_t file_size_total = 0; for (file_info_t& entry : file_info) { + if (!LLApp::isRunning()) + { + return; + } file_size_total += entry.second.first; bool should_remove = file_size_total > mMaxSizeBytes; @@ -190,6 +200,10 @@ void LLDiskCache::purge() // Logging thousands of file results can take hundreds of milliseconds for (size_t i = 0; i < file_info.size(); ++i) { + if (!LLApp::isRunning()) + { + return; + } const file_info_t& entry = file_info[i]; const bool removed = file_removed[i]; const std::string action = removed ? "DELETE:" : "KEEP:"; diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index 541266af4f..cd0ce45049 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -75,13 +75,16 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type) { LL_PROFILE_ZONE_SCOPED; +#if LL_WINDOWS + const auto filename = ll_convert<std::wstring>(LLDiskCache::metaDataToFilepath(file_id, file_type)); +#else const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); +#endif - llifstream file(filename, std::ios::binary); - if (file.is_open()) + boost::system::error_code ec; + if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) { - file.seekg(0, std::ios::end); - return file.tellg() > 0; + return boost::filesystem::file_size(filename, ec) > 0; } return false; } @@ -118,17 +121,18 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp // static S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type) { +#if LL_WINDOWS + const auto filename = ll_convert<std::wstring>(LLDiskCache::metaDataToFilepath(file_id, file_type)); +#else const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); +#endif - S32 file_size = 0; - llifstream file(filename, std::ios::binary); - if (file.is_open()) + boost::system::error_code ec; + if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) { - file.seekg(0, std::ios::end); - file_size = (S32)file.tellg(); + return static_cast<S32>(boost::filesystem::file_size(filename, ec)); } - - return file_size; + return 0; } bool LLFileSystem::read(U8* buffer, S32 bytes) diff --git a/indra/llfilesystem/tests/lldir_test.cpp b/indra/llfilesystem/tests/lldir_test.cpp index d7d57fa86f..13db6fad80 100644 --- a/indra/llfilesystem/tests/lldir_test.cpp +++ b/indra/llfilesystem/tests/lldir_test.cpp @@ -34,19 +34,6 @@ #include "../test/lltut.h" #include "stringize.h" -#include <boost/assign/list_of.hpp> - -using boost::assign::list_of; - -// We use ensure_equals(..., vec(list_of(...))) not because it's functionally -// required, but because ensure_equals() knows how to format a StringVec. -// Turns out that when ensure_equals() displays a test failure with just -// list_of("string")("another"), you see 'stringanother' vs. '("string", -// "another")'. -StringVec vec(const StringVec& v) -{ - return v; -} // For some tests, use a dummy LLDir that uses memory data instead of touching // the filesystem @@ -590,20 +577,18 @@ namespace tut // top-level directory of a skin isn't localized ensure_equals(lldir.findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS), - vec(list_of("install/skins/default/colors.xml") - ("user/skins/default/colors.xml"))); + StringVec{ "install/skins/default/colors.xml", "user/skins/default/colors.xml" }); // We should not have needed to check for skins/default/en. We should // just "know" that SKINBASE is not localized. lldir.ensure_not_checked("install/skins/default/en"); ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_default.jpeg"), - vec(list_of("install/skins/default/textures/only_default.jpeg"))); + StringVec{ "install/skins/default/textures/only_default.jpeg" }); // Nor should we have needed to check skins/default/textures/en // because textures is known not to be localized. lldir.ensure_not_checked("install/skins/default/textures/en"); - StringVec expected(vec(list_of("install/skins/default/xui/en/strings.xml") - ("user/skins/default/xui/en/strings.xml"))); + StringVec expected(StringVec{ "install/skins/default/xui/en/strings.xml", "user/skins/default/xui/en/strings.xml" }); ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), expected); // The first time, we had to probe to find out whether xui was localized. @@ -616,23 +601,19 @@ namespace tut lldir.ensure_not_checked("install/skins/default/xui/en"); // localized subdir with "en-us" instead of "en" - ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), - vec(list_of("install/skins/default/html/en-us/welcome.html"))); + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), StringVec{ "install/skins/default/html/en-us/welcome.html" }); lldir.ensure_checked("install/skins/default/html/en"); lldir.ensure_checked("install/skins/default/html/en-us"); lldir.clear_checked(); - ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), - vec(list_of("install/skins/default/html/en-us/welcome.html"))); + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), StringVec{ "install/skins/default/html/en-us/welcome.html" }); lldir.ensure_not_checked("install/skins/default/html/en"); lldir.ensure_not_checked("install/skins/default/html/en-us"); - ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), - vec(list_of("install/skins/default/future/somefile.txt"))); + ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), StringVec{ "install/skins/default/future/somefile.txt" }); // Test probing for an unrecognized unlocalized future subdir. lldir.ensure_checked("install/skins/default/future/en"); lldir.clear_checked(); - ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), - vec(list_of("install/skins/default/future/somefile.txt"))); + ensure_equals(lldir.findSkinnedFilenames("future", "somefile.txt"), StringVec{ "install/skins/default/future/somefile.txt" }); // Second time it should remember that future is unlocalized. lldir.ensure_not_checked("install/skins/default/future/en"); @@ -643,8 +624,7 @@ namespace tut // make the default localization be "en" and allow "en-gb" (or // whatever) localizations, which would work much more the way you'd // expect. - ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), - vec(list_of("install/skins/default/html/en-us/welcome.html"))); + ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), StringVec{ "install/skins/default/html/en-us/welcome.html" }); /*------------------------ "default", "fr" -------------------------*/ // We start being able to distinguish localized subdirs from @@ -654,100 +634,74 @@ namespace tut // pass merge=true to request this filename in all relevant skins ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), - vec(list_of - ("install/skins/default/xui/en/strings.xml") - ("install/skins/default/xui/fr/strings.xml") - ("user/skins/default/xui/en/strings.xml") - ("user/skins/default/xui/fr/strings.xml"))); + StringVec{ "install/skins/default/xui/en/strings.xml", "install/skins/default/xui/fr/strings.xml", + "user/skins/default/xui/en/strings.xml", "user/skins/default/xui/fr/strings.xml" }); // pass (or default) merge=false to request only most specific skin ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), - vec(list_of - ("user/skins/default/xui/en/strings.xml") - ("user/skins/default/xui/fr/strings.xml"))); + StringVec{ "user/skins/default/xui/en/strings.xml", "user/skins/default/xui/fr/strings.xml" }); // Our dummy floater.xml has a user localization (for "fr") but no // English override. This is a case in which CURRENT_SKIN nonetheless // returns paths from two different skins. ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "floater.xml"), - vec(list_of - ("install/skins/default/xui/en/floater.xml") - ("user/skins/default/xui/fr/floater.xml"))); + StringVec{ "install/skins/default/xui/en/floater.xml", "user/skins/default/xui/fr/floater.xml" }); // Our dummy newfile.xml has an English override but no user // localization. This is another case in which CURRENT_SKIN // nonetheless returns paths from two different skins. ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "newfile.xml"), - vec(list_of - ("user/skins/default/xui/en/newfile.xml") - ("install/skins/default/xui/fr/newfile.xml"))); + StringVec{ "user/skins/default/xui/en/newfile.xml", "install/skins/default/xui/fr/newfile.xml" }); ensure_equals(lldir.findSkinnedFilenames("html", "welcome.html"), - vec(list_of - ("install/skins/default/html/en-us/welcome.html") - ("install/skins/default/html/fr/welcome.html"))); + StringVec{ "install/skins/default/html/en-us/welcome.html", "install/skins/default/html/fr/welcome.html" }); /*------------------------ "default", "zh" -------------------------*/ lldir.setSkinFolder("default", "zh"); // Because strings.xml has only a "fr" override but no "zh" override // in any skin, the most localized version we can find is "en". - ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), - vec(list_of("user/skins/default/xui/en/strings.xml"))); + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), StringVec{ "user/skins/default/xui/en/strings.xml" }); /*------------------------- "steam", "en" --------------------------*/ lldir.setSkinFolder("steam", "en"); ensure_equals(lldir.findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS), - vec(list_of - ("install/skins/default/colors.xml") - ("install/skins/steam/colors.xml") - ("user/skins/default/colors.xml") - ("user/skins/steam/colors.xml"))); + StringVec{ "install/skins/default/colors.xml", "install/skins/steam/colors.xml", "user/skins/default/colors.xml", + "user/skins/steam/colors.xml" }); ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_default.jpeg"), - vec(list_of("install/skins/default/textures/only_default.jpeg"))); + StringVec{ "install/skins/default/textures/only_default.jpeg" }); ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_steam.jpeg"), - vec(list_of("install/skins/steam/textures/only_steam.jpeg"))); + StringVec{ "install/skins/steam/textures/only_steam.jpeg" }); ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_user_default.jpeg"), - vec(list_of("user/skins/default/textures/only_user_default.jpeg"))); + StringVec{ "user/skins/default/textures/only_user_default.jpeg" }); ensure_equals(lldir.findSkinnedFilenames(LLDir::TEXTURES, "only_user_steam.jpeg"), - vec(list_of("user/skins/steam/textures/only_user_steam.jpeg"))); + StringVec{ "user/skins/steam/textures/only_user_steam.jpeg" }); // CURRENT_SKIN - ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), - vec(list_of("user/skins/steam/xui/en/strings.xml"))); + ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), StringVec{ "user/skins/steam/xui/en/strings.xml" }); // pass constraint=ALL_SKINS to request this filename in all relevant skins ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), - vec(list_of - ("install/skins/default/xui/en/strings.xml") - ("install/skins/steam/xui/en/strings.xml") - ("user/skins/default/xui/en/strings.xml") - ("user/skins/steam/xui/en/strings.xml"))); + StringVec{ "install/skins/default/xui/en/strings.xml", "install/skins/steam/xui/en/strings.xml", + "user/skins/default/xui/en/strings.xml", "user/skins/steam/xui/en/strings.xml" }); /*------------------------- "steam", "fr" --------------------------*/ lldir.setSkinFolder("steam", "fr"); // pass CURRENT_SKIN to request only the most specialized files ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml"), - vec(list_of - ("user/skins/steam/xui/en/strings.xml") - ("user/skins/steam/xui/fr/strings.xml"))); + StringVec{ "user/skins/steam/xui/en/strings.xml", "user/skins/steam/xui/fr/strings.xml" }); // pass ALL_SKINS to request this filename in all relevant skins ensure_equals(lldir.findSkinnedFilenames(LLDir::XUI, "strings.xml", LLDir::ALL_SKINS), - vec(list_of - ("install/skins/default/xui/en/strings.xml") - ("install/skins/default/xui/fr/strings.xml") - ("install/skins/steam/xui/en/strings.xml") - ("install/skins/steam/xui/fr/strings.xml") - ("user/skins/default/xui/en/strings.xml") - ("user/skins/default/xui/fr/strings.xml") - ("user/skins/steam/xui/en/strings.xml") - ("user/skins/steam/xui/fr/strings.xml"))); + StringVec{ "install/skins/default/xui/en/strings.xml", "install/skins/default/xui/fr/strings.xml", + "install/skins/steam/xui/en/strings.xml", "install/skins/steam/xui/fr/strings.xml", + "user/skins/default/xui/en/strings.xml", "user/skins/default/xui/fr/strings.xml", + "user/skins/steam/xui/en/strings.xml", "user/skins/steam/xui/fr/strings.xml" }); } template<> template<> diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index ca8a4199e8..35bc7065b1 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -709,8 +709,20 @@ U8* LLImageBase::allocateData(S32 size) mData = (U8*)ll_aligned_malloc_16(size); if (!mData) { - LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL; - mBadBufferAllocation = true; + constexpr S32 MAX_TOLERANCE = 1024 * 1024 * 4; // 4 MB + if (size > MAX_TOLERANCE) + { + // If a big image failed to allocate, tollerate it for now. + // It's insightfull when crash logs without obvious cause are being analyzed, + // so a crash in a random location that normally is a mystery can get proper handling. + LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL; + } + else + { + // We are too far gone if we can't allocate a small buffer. + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL; + } } } diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 6b14b68c78..1fb61673bd 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -27,10 +27,11 @@ #ifndef LL_LLIMAGE_H #define LL_LLIMAGE_H -#include "lluuid.h" -#include "llstring.h" +#include "llmutex.h" #include "llpointer.h" +#include "llstring.h" #include "lltrace.h" +#include "lluuid.h" constexpr S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 constexpr S32 MAX_IMAGE_MIP = 12; // 4096x4096 diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index bdaef0c653..46ab6a441e 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -67,7 +67,7 @@ private: LLImageDecodeThread::LLImageDecodeThread(bool /*threaded*/) : mDecodeCount(0) { - mThreadPool.reset(new LL::ThreadPool("ImageDecode", 8)); + mThreadPool = std::make_unique<LL::ThreadPool>("ImageDecode", 8); mThreadPool->start(); } diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 9350901324..7cfadb889d 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -28,7 +28,7 @@ #include "llimagej2coj.h" // this is defined so that we get static linking. -#include <openjpeg-2.5/openjpeg.h> +#include "openjpeg.h" // Factory function: see declaration in llimagej2c.cpp LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl() diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 3defad8f3b..f126accfb8 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1017,10 +1017,9 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) if (i->first == INV_THUMBNAIL_LABEL) { const LLSD &thumbnail_map = i->second; - const std::string w = INV_ASSET_ID_LABEL; - if (thumbnail_map.has(w)) + if (thumbnail_map.has(INV_ASSET_ID_LABEL)) { - mThumbnailUUID = thumbnail_map[w]; + mThumbnailUUID = thumbnail_map[INV_ASSET_ID_LABEL]; } /* Example: <key> asset_id </key> @@ -1033,7 +1032,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) <integer> 1 </key> */ continue; - } + } if (i->first == INV_THUMBNAIL_ID_LABEL) { @@ -1044,10 +1043,9 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) if (i->first == INV_FAVORITE_LABEL) { const LLSD& favorite_map = i->second; - const std::string w = INV_TOGGLED_LABEL; - if (favorite_map.has(w)) + if (favorite_map.has(INV_TOGGLED_LABEL)) { - mFavorite = favorite_map[w].asBoolean(); + mFavorite = favorite_map[INV_TOGGLED_LABEL].asBoolean(); } continue; } @@ -1111,7 +1109,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) LLSD const &label = i->second; if (label.isString()) { - mType = LLAssetType::lookup(label.asString().c_str()); + mType = LLAssetType::lookup(label.asStringRef().c_str()); } else if (label.isInteger()) { @@ -1126,7 +1124,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) LLSD const &label = i->second; if (label.isString()) { - mInventoryType = LLInventoryType::lookup(label.asString().c_str()); + mInventoryType = LLInventoryType::lookup(label.asStringRef().c_str()); } else if (label.isInteger()) { @@ -1290,7 +1288,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const bool LLInventoryCategory::fromLLSD(const LLSD& sd) { - std::string w; + std::string_view w; w = INV_FOLDER_ID_LABEL_WS; if (sd.has(w)) diff --git a/indra/llinventory/lllandmark.h b/indra/llinventory/lllandmark.h index 75596dc287..75520195ec 100644 --- a/indra/llinventory/lllandmark.h +++ b/indra/llinventory/lllandmark.h @@ -28,8 +28,8 @@ #ifndef LL_LLLANDMARK_H #define LL_LLLANDMARK_H +#include <functional> #include <map> -#include <boost/function.hpp> #include "llframetimer.h" #include "lluuid.h" #include "v3dmath.h" @@ -41,7 +41,7 @@ class LLLandmark { public: // for calling back interested parties when a region handle comes back. - typedef boost::function<void(const LLUUID& region_id, const U64& region_handle)> region_handle_callback_t; + typedef std::function<void(const LLUUID& region_id, const U64& region_handle)> region_handle_callback_t; ~LLLandmark() {} diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index 5bd490974b..6c07c3309a 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -599,7 +599,7 @@ bool LLSettingsBase::Validator::verify(LLSD &data, U32 flags) return false; } - if (!mVerify.empty() && !mVerify(data[mName], flags)) + if (mVerify != nullptr && !mVerify(data[mName], flags)) { LL_WARNS("SETTINGS") << "Setting '" << mName << "' fails validation." << LL_ENDL; return false; diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index bea6fdec97..20979bd98e 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -49,8 +49,7 @@ #define SETTINGS_OVERRIDE override class LLSettingsBase : - public PTR_NAMESPACE::enable_shared_from_this<LLSettingsBase>, - private boost::noncopyable + public PTR_NAMESPACE::enable_shared_from_this<LLSettingsBase> { friend class LLEnvironment; friend class LLSettingsDay; @@ -96,7 +95,11 @@ public: typedef PTR_NAMESPACE::shared_ptr<LLSettingsBase> ptr_t; - virtual ~LLSettingsBase() { }; + virtual ~LLSettingsBase() = default; + + // Non-copyable + LLSettingsBase(const LLSettingsBase&) = delete; + LLSettingsBase& operator=(const LLSettingsBase&) = delete; //--------------------------------------------------------------------- virtual std::string getSettingsType() const = 0; @@ -285,7 +288,7 @@ public: public: static const U32 VALIDATION_PARTIAL; - typedef boost::function<bool(LLSD &, U32)> verify_pr; + typedef std::function<bool(LLSD &, U32)> verify_pr; Validator(std::string name, bool required, LLSD::Type type, verify_pr verify = verify_pr(), LLSD defval = LLSD()) : mName(name), @@ -430,7 +433,7 @@ public: mFinal = mInitial; } - virtual ~LLSettingsBlender() {} + virtual ~LLSettingsBlender() = default; virtual void reset( LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, const LLSettingsBase::TrackPosition&) { diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 7eba9494a6..e7ac6bdb31 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -615,6 +615,11 @@ bool LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco return false; } } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Bad memory allocation in J2C KDU" << LL_ENDL; + } catch (const KDUError& msg) { base.setLastError(msg.what()); diff --git a/indra/llmath/llrigginginfo.h b/indra/llmath/llrigginginfo.h index d761af68b1..e5a41d2ecf 100644 --- a/indra/llmath/llrigginginfo.h +++ b/indra/llmath/llrigginginfo.h @@ -70,11 +70,10 @@ public: LLJointRiggingInfo* begin() { return mRigInfoPtr; } LLJointRiggingInfo* end() { return mRigInfoPtr + mSize; } -private: - // Not implemented - LLJointRiggingInfoTab& operator=(const LLJointRiggingInfoTab& src); - LLJointRiggingInfoTab(const LLJointRiggingInfoTab& src); + LLJointRiggingInfoTab& operator=(const LLJointRiggingInfoTab& src) = delete; + LLJointRiggingInfoTab(const LLJointRiggingInfoTab& src) = delete; +private: LLJointRiggingInfo *mRigInfoPtr; S32 mSize; bool mNeedsUpdate; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 0cf5ecd3d0..4660026d40 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -912,7 +912,7 @@ bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detai case LL_PCODE_HOLE_CIRCLE: case LL_PCODE_HOLE_SAME: default: - addHole(params, true, circle_detail, 0, hollow, 1.f); + addHole(params, false, circle_detail, 0, hollow, 1.f); break; } } @@ -4943,9 +4943,17 @@ LLVolumeFace::LLVolumeFace(const LLVolumeFace& src) mOctree(NULL), mOctreeTriangles(NULL) { - mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3); - mCenter = mExtents+2; - *this = src; + try + { + mExtents = (LLVector4a*)ll_aligned_malloc_16(sizeof(LLVector4a) * 3); + mCenter = mExtents + 2; + *this = src; + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLVolume") << "Bad memory allocation in LLVolumeFace" << LL_ENDL; + } } LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src) @@ -5163,7 +5171,7 @@ void LLVolumeFace::remap() // Documentation for meshopt_generateVertexRemapMulti claims that remap should use vertice count // but all examples use indice count. There are out of bounds crashes when using vertice count. // To be on the safe side use bigger of the two. - std::vector<unsigned int> remap(llmax(mNumIndices, mNumVertices)); + std::vector<unsigned int> remap(llmax(mNumIndices, mNumVertices), 0); S32 remap_vertices_count = static_cast<S32>(LLMeshOptimizer::generateRemapMultiU16(&remap[0], mIndices, mNumIndices, @@ -5681,7 +5689,12 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) catch (std::bad_alloc&) { LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("LLCoros") << "Bad memory allocation in MikktData::genTangSpace" << LL_ENDL; + LL_ERRS("LLVolume") << "Bad memory allocation in MikktData::genTangSpace" << LL_ENDL; + } + catch (...) + { + LL_WARNS_ONCE("LLVolume") << "Mikktspace::genTangSpace() failed" << LL_ENDL; + return false; } @@ -5703,7 +5716,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) catch (std::bad_alloc&) { LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("LLCoros") << "Failed to allocate memory for remap: " << (S32)data.p.size() << LL_ENDL; + LL_ERRS("LLVOLUME") << "Failed to allocate memory for remap: " << (S32)data.p.size() << LL_ENDL; } U32 stream_count = data.w.empty() ? 4 : 5; @@ -5720,7 +5733,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) catch (std::bad_alloc&) { LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("LLCoros") << "Failed to allocate memory for VertexRemap: " << (S32)data.p.size() << LL_ENDL; + LL_ERRS("LLVolume") << "Failed to allocate memory for VertexRemap: " << (S32)data.p.size() << LL_ENDL; } } @@ -5732,7 +5745,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) if (mNumVertices == 0) { LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("LLCoros") << "Failed to allocate memory for resizeVertices(" << vert_count << ")" << LL_ENDL; + LL_ERRS("LLVolume") << "Failed to allocate memory for resizeVertices(" << vert_count << ")" << LL_ENDL; } if (!data.w.empty()) diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index bb0c94d513..d8f649140f 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -25,6 +25,7 @@ #include "linden_common.h" +#include "llmutex.h" #include "llvolumemgr.h" #include "llvolume.h" diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h index 1d74644715..b6b7e22517 100644 --- a/indra/llmath/llvolumeoctree.h +++ b/indra/llmath/llvolumeoctree.h @@ -78,16 +78,8 @@ public: LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* node); ~LLVolumeOctreeListener(); - LLVolumeOctreeListener(const LLVolumeOctreeListener& rhs) - { - *this = rhs; - } - - const LLVolumeOctreeListener& operator=(const LLVolumeOctreeListener& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLVolumeOctreeListener(const LLVolumeOctreeListener& rhs) = delete; + const LLVolumeOctreeListener& operator=(const LLVolumeOctreeListener& rhs) = delete; //LISTENER FUNCTIONS virtual void handleChildAddition(const LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* parent, LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* child); diff --git a/indra/llmeshoptimizer/llmeshoptimizer.cpp b/indra/llmeshoptimizer/llmeshoptimizer.cpp index 7339454367..76d51fdad0 100644 --- a/indra/llmeshoptimizer/llmeshoptimizer.cpp +++ b/indra/llmeshoptimizer/llmeshoptimizer.cpp @@ -171,7 +171,6 @@ size_t LLMeshOptimizer::generateRemapMultiU32( // but providing indices helps with removing unused vertices U64 indeces_cmp = indices ? index_count : vertex_count; - // meshopt_generateVertexRemapMulti will throw an assert if (indices[i] >= vertex_count) return meshopt_generateVertexRemapMulti(&remap[0], indices, indeces_cmp, vertex_count, streams, sizeof(streams) / sizeof(streams[0])); } diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index f661e2c348..61c54d6313 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -17,7 +17,6 @@ set(llmessage_SOURCE_FILES llassetstorage.cpp llavatarname.cpp llavatarnamecache.cpp - llblowfishcipher.cpp llbuffer.cpp llbufferstream.cpp llcachename.cpp @@ -39,7 +38,6 @@ set(llmessage_SOURCE_FILES lliopipe.cpp lliosocket.cpp llioutil.cpp - llmail.cpp llmessagebuilder.cpp llmessageconfig.cpp llmessagereader.cpp @@ -96,7 +94,6 @@ set(llmessage_HEADER_FILES llassetstorage.h llavatarname.h llavatarnamecache.h - llblowfishcipher.h llbuffer.h llbufferstream.h llcachename.h @@ -126,7 +123,6 @@ set(llmessage_HEADER_FILES lliosocket.h llioutil.h llloginflags.h - llmail.h llmessagebuilder.h llmessageconfig.h llmessagereader.h diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 10fd56a68e..4c3acb27f4 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1316,6 +1316,9 @@ const char* LLAssetStorage::getErrorString(S32 status) case LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE: return "Asset request: asset not found in database"; + case LL_ERR_NO_CAP: + return "Asset request: region or asset capability not available"; + case LL_ERR_EOF: return "End of file"; diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 6d6526757d..d5daa0cb8f 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -57,6 +57,7 @@ const int LL_ERR_ASSET_REQUEST_FAILED = -1; const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3; const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4; const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5; +const int LL_ERR_NO_CAP = -6; const int LL_ERR_PRICE_MISMATCH = -23018; // *TODO: these typedefs are passed into the cache via a legacy C function pointer diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 9b4454a847..86b36315dc 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -117,9 +117,9 @@ LLAvatarNameCache::LLAvatarNameCache() mUsePeopleAPI = true; - sHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest()); - sHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); - sHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + sHttpRequest = std::make_shared<LLCore::HttpRequest>(); + sHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); + sHttpOptions = std::make_shared<LLCore::HttpOptions>(); sHttpPolicy = LLCore::HttpRequest::DEFAULT_POLICY_ID; } @@ -276,7 +276,7 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h // Provide some fallback for agents that return errors void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) { - std::map<LLUUID,LLAvatarName>::iterator existing = mCache.find(agent_id); + cache_t::iterator existing = mCache.find(agent_id); if (existing == mCache.end()) { // there is no existing cache entry, so make a temporary name from legacy @@ -311,7 +311,7 @@ void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName& bool updated_account = true; // assume obsolete value for new arrivals by default - std::map<LLUUID, LLAvatarName>::iterator it = mCache.find(agent_id); + cache_t::iterator it = mCache.find(agent_id); if (it != mCache.end() && (*it).second.getAccountName() == av_name.getAccountName()) { @@ -418,7 +418,7 @@ void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id, // Retrieve the name and set it to never (or almost never...) expire: when we are using the legacy // protocol, we do not get an expiration date for each name and there's no reason to ask the // data again and again so we set the expiration time to the largest value admissible. - std::map<LLUUID,LLAvatarName>::iterator av_record = LLAvatarNameCache::getInstance()->mCache.find(agent_id); + cache_t::iterator av_record = LLAvatarNameCache::getInstance()->mCache.find(agent_id); LLAvatarName& av_name = av_record->second; av_name.setExpires(MAX_UNREFRESHED_TIME); } @@ -631,7 +631,7 @@ bool LLAvatarNameCache::getName(const LLUUID& agent_id, LLAvatarName *av_name) if (mRunning) { // ...only do immediate lookups when cache is running - std::map<LLUUID,LLAvatarName>::iterator it = mCache.find(agent_id); + cache_t::iterator it = mCache.find(agent_id); if (it != mCache.end()) { *av_name = it->second; @@ -682,7 +682,7 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::getNameCallback(cons if (mRunning) { // ...only do immediate lookups when cache is running - std::map<LLUUID,LLAvatarName>::iterator it = mCache.find(agent_id); + cache_t::iterator it = mCache.find(agent_id); if (it != mCache.end()) { const LLAvatarName& av_name = it->second; @@ -753,13 +753,11 @@ void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_na LLUUID LLAvatarNameCache::findIdByName(const std::string& name) { - std::map<LLUUID, LLAvatarName>::iterator it; - std::map<LLUUID, LLAvatarName>::iterator end = mCache.end(); - for (it = mCache.begin(); it != end; ++it) + for (const auto& [id, avatar_name] : mCache) { - if (it->second.getUserName() == name) + if (avatar_name.getUserName() == name) { - return it->first; + return id; } } diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index fe51355207..6743943495 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -30,8 +30,10 @@ #include "llavatarname.h" // for convenience #include "llsingleton.h" +#include "lluuid.h" #include <boost/signals2.hpp> #include <set> +#include <unordered_map> class LLSD; class LLUUID; @@ -42,7 +44,7 @@ class LLAvatarNameCache : public LLSingleton<LLAvatarNameCache> ~LLAvatarNameCache(); public: typedef boost::signals2::signal<void (void)> use_display_name_signal_t; - typedef boost::function<void (const LLUUID id, const LLAvatarName& av_name)> account_name_changed_callback_t; + typedef std::function<void (const LLUUID id, const LLAvatarName& av_name)> account_name_changed_callback_t; // Import/export the name cache to file. bool importFile(std::istream& istr); @@ -161,23 +163,23 @@ private: std::string mNameLookupURL; // Accumulated agent IDs for next query against service - typedef std::set<LLUUID> ask_queue_t; + using ask_queue_t = std::set<LLUUID>; ask_queue_t mAskQueue; // Agent IDs that have been requested, but with no reply. // Maps agent ID to frame time request was made. - typedef std::map<LLUUID, F64> pending_queue_t; + using pending_queue_t = std::unordered_map<LLUUID, F64>; pending_queue_t mPendingQueue; // Callbacks to fire when we received a name. // May have multiple callbacks for a single ID, which are // represented as multiple slots bound to the signal. // Avoid copying signals via pointers. - typedef std::map<LLUUID, callback_signal_t*> signal_map_t; + using signal_map_t = std::unordered_map<LLUUID, callback_signal_t*>; signal_map_t mSignalMap; // The cache at last, i.e. avatar names we know about. - typedef std::map<LLUUID, LLAvatarName> cache_t; + using cache_t = std::unordered_map<LLUUID, LLAvatarName>; cache_t mCache; // Time when unrefreshed cached names were checked last. diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp deleted file mode 100644 index 3973565e22..0000000000 --- a/indra/llmessage/llblowfishcipher.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/** - * @file llblowfishcipher.cpp - * @brief Wrapper around OpenSSL Blowfish encryption algorithm. - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "linden_common.h" -#include "llblowfishcipher.h" -#include <openssl/evp.h> - - -LLBlowfishCipher::LLBlowfishCipher(const U8* secret, size_t secret_size) -: LLCipher() -{ - llassert(secret); - - mSecretSize = secret_size; - mSecret = new U8[mSecretSize]; - memcpy(mSecret, secret, mSecretSize); -} - -LLBlowfishCipher::~LLBlowfishCipher() -{ - delete [] mSecret; - mSecret = NULL; -} - -// virtual -U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) -{ - if (!src || !src_len || !dst || !dst_len) return 0; - if (src_len > dst_len) return 0; - - // OpenSSL uses "cipher contexts" to hold encryption parameters. - EVP_CIPHER_CTX *context = EVP_CIPHER_CTX_new(); - if (!context) - { - LL_WARNS() << "LLBlowfishCipher::encrypt EVP_CIPHER_CTX initiation failure" << LL_ENDL; - return 0; - } - - // We want a blowfish cyclic block chain cipher, but need to set - // the key length before we pass in a key, so call EncryptInit - // first with NULLs. - EVP_EncryptInit_ex(context, EVP_bf_cbc(), NULL, NULL, NULL); - EVP_CIPHER_CTX_set_key_length(context, (int)mSecretSize); - - // Complete initialization. Per EVP_EncryptInit man page, the - // cipher pointer must be NULL. Apparently initial_vector must - // be 8 bytes for blowfish, as this is the block size. - unsigned char initial_vector[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - EVP_EncryptInit_ex(context, NULL, NULL, mSecret, initial_vector); - - int blocksize = EVP_CIPHER_CTX_block_size(context); - int keylen = EVP_CIPHER_CTX_key_length(context); - int iv_length = EVP_CIPHER_CTX_iv_length(context); - LL_DEBUGS() << "LLBlowfishCipher blocksize " << blocksize - << " keylen " << keylen - << " iv_len " << iv_length - << LL_ENDL; - - int output_len = 0; - int temp_len = 0; - if (!EVP_EncryptUpdate(context, - dst, - &output_len, - src, - src_len)) - { - LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << LL_ENDL; - goto BF_ENCRYPT_ERROR; - } - - // There may be some final data left to encrypt if the input is - // not an exact multiple of the block size. - if (!EVP_EncryptFinal_ex(context, (unsigned char*)(dst + output_len), &temp_len)) - { - LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << LL_ENDL; - goto BF_ENCRYPT_ERROR; - } - output_len += temp_len; - - EVP_CIPHER_CTX_free(context); - return output_len; - -BF_ENCRYPT_ERROR: - EVP_CIPHER_CTX_free(context); - return 0; -} - -// virtual -U32 LLBlowfishCipher::decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) -{ - LL_ERRS() << "LLBlowfishCipher decrypt unsupported" << LL_ENDL; - return 0; -} - -// virtual -U32 LLBlowfishCipher::requiredEncryptionSpace(U32 len) const -{ - // *HACK: We know blowfish uses an 8 byte block size. - // Oddly, sometimes EVP_Encrypt produces an extra block - // if the input is an exact multiple of the block size. - // So round up. - const U32 BLOCK_SIZE = 8; - len += BLOCK_SIZE; - len -= (len % BLOCK_SIZE); - return len; -} diff --git a/indra/llmessage/llblowfishcipher.h b/indra/llmessage/llblowfishcipher.h deleted file mode 100644 index 53dc94cce9..0000000000 --- a/indra/llmessage/llblowfishcipher.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @file llblowfishcipher.h - * @brief A symmetric block cipher, designed in 1993 by Bruce Schneier. - * We use it because it has an 8 byte block size, allowing encryption of - * two UUIDs and a timestamp (16x2 + 4 = 36 bytes) with only 40 bytes of - * output. AES has a block size of 32 bytes, so this would require 64 bytes. - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 LLBLOWFISHCIPHER_H -#define LLBLOWFISHCIPHER_H - -#include "llcipher.h" - - -class LLBlowfishCipher : public LLCipher -{ -public: - // Secret may be up to 56 bytes in length per Blowfish spec. - LLBlowfishCipher(const U8* secret, size_t secret_size); - virtual ~LLBlowfishCipher(); - - // See llcipher.h for documentation. - /*virtual*/ U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); - /*virtual*/ U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); - /*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const; - -#ifdef _DEBUG - static bool testHarness(); -#endif - -private: - U8* mSecret; - size_t mSecretSize; -}; - -#endif // LL_LLCRYPTO_H diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 64f660d0ce..95b7bb8c3d 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -179,12 +179,11 @@ void ReplySender::flush() } } - -typedef std::set<LLUUID> AskQueue; -typedef std::list<PendingReply*> ReplyQueue; -typedef std::map<LLUUID,U32> PendingQueue; -typedef std::map<LLUUID, LLCacheNameEntry*> Cache; -typedef std::map<std::string, LLUUID> ReverseCache; +using AskQueue = std::set<LLUUID>; +using ReplyQueue = std::list<PendingReply*>; +using PendingQueue = std::unordered_map<LLUUID, U32>; +using Cache = std::unordered_map<LLUUID, LLCacheNameEntry*>; +using ReverseCache = std::unordered_map<std::string, LLUUID>; class LLCacheName::Impl { @@ -214,7 +213,7 @@ public: Impl(LLMessageSystem* msg); ~Impl(); - bool getName(const LLUUID& id, std::string& first, std::string& last, std::map<std::string, std::string>& default_names); + bool getName(const LLUUID& id, std::string& first, std::string& last, cache_map_t& default_names); boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback); void addPending(const LLUUID& id, const LLHost& host); @@ -401,7 +400,7 @@ void LLCacheName::exportFile(std::ostream& ostr) } -bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last, std::map<std::string, std::string>& default_names) +bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last, cache_map_t &default_names) { if(id.isNull()) { @@ -600,7 +599,7 @@ std::string LLCacheName::buildLegacyName(const std::string& complete_name) // This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer. // The reason it is a slot is so that the legacy get() function below can bind an old callback -// and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior +// and pass it as a slot. The reason it isn't a std::function is so that trackable behavior // doesn't get lost. As a result, we have to bind the slot to a signal to call it, even when // we call it immediately. -Steve // NOTE: Even though passing first and last name is a bit of extra overhead, it eliminates the @@ -780,6 +779,7 @@ void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingReplies() { // First call all the callbacks, because they might send messages. + // Todo: needs cleanup logic, otherwise invalid ids might stay here indefinitely for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) { PendingReply* reply = *it; diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index 609387b6de..a333eac0f5 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -136,7 +136,8 @@ public: void localizeCacheName(std::string key, std::string value); private: - std::map<std::string, std::string> mCacheName; + using cache_map_t = std::unordered_map<std::string, std::string>; + cache_map_t mCacheName; class Impl; Impl& impl; diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 8f9c02bdca..c2b1a2f069 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -71,8 +71,8 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id, mPacketsOutID(0), mPacketsInID(in_id), mHighestPacketID(in_id), - mTimeoutCallback(NULL), - mTimeoutUserData(NULL), + mTimeoutCallback(nullptr), + mTimeoutUserData(nullptr), mTrusted(false), mbAllowTimeout(true), mbAlive(true), diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 5c7b1c4235..0e5725baf3 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -53,7 +53,7 @@ static const U32 DEFAULT_POOL_SIZE = 5; const U32 LLCoprocedureManager::DEFAULT_QUEUE_SIZE = 1024*512; //========================================================================= -class LLCoprocedurePool: private boost::noncopyable +class LLCoprocedurePool { public: typedef LLCoprocedureManager::CoProcedure_t CoProcedure_t; @@ -61,6 +61,10 @@ public: LLCoprocedurePool(const std::string &name, size_t size, size_t queue_size); ~LLCoprocedurePool(); + // Non-copyable + LLCoprocedurePool(const LLCoprocedurePool&) = delete; + LLCoprocedurePool& operator=(const LLCoprocedurePool&) = delete; + /// Places the coprocedure on the queue for processing. /// /// @param name Is used for debugging and should identify this coroutine. @@ -151,8 +155,8 @@ LLCoprocedureManager::~LLCoprocedureManager() // Shutting down, just log it LL_WARNS() << "Exception during ~LLCoprocedureManager(): " << e.what() << LL_ENDL; } - mPropertyQueryFn.clear(); - mPropertyDefineFn.clear(); + mPropertyQueryFn = nullptr; + mPropertyDefineFn = nullptr; mPoolMap.clear(); } @@ -195,7 +199,7 @@ void LLCoprocedureManager::initializePool(const std::string &poolName, size_t qu LL_WARNS("CoProcMgr") << "LLCoprocedureManager: No setting for \"" << keyName << "\" setting pool size to default of " << size << LL_ENDL; } - poolPtr_t pool(new LLCoprocedurePool(poolName, size, queue_size)); + poolPtr_t pool = std::make_shared<LLCoprocedurePool>(poolName, size, queue_size); LL_ERRS_IF(!pool, "CoprocedureManager") << "Unable to create pool named \"" << poolName << "\" FATAL!" << LL_ENDL; bool inserted = mPoolMap.emplace(poolName, pool).second; @@ -365,7 +369,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size, s for (size_t count = 0; count < mPoolSize; ++count) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter( mPoolName + "Adapter", mHTTPPolicy)); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>(mPoolName + "Adapter", mHTTPPolicy); std::string pooledCoro = LLCoros::instance().launch( "LLCoprocedurePool("+mPoolName+")::coprocedureInvokerCoro", diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 485333657c..f6f9a5783b 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -41,10 +41,10 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > virtual ~LLCoprocedureManager(); public: - typedef boost::function<U32(const std::string &)> SettingQuery_t; - typedef boost::function<void(const std::string &, U32, const std::string &)> SettingUpdate_t; + typedef std::function<U32(const std::string &)> SettingQuery_t; + typedef std::function<void(const std::string &, U32, const std::string &)> SettingUpdate_t; - typedef boost::function<void(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, const LLUUID &id)> CoProcedure_t; + typedef std::function<void(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, const LLUUID &id)> CoProcedure_t; /// Places the coprocedure on the queue for processing. /// diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 992e145758..647064f607 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -37,6 +37,7 @@ #include "llsdserialize.h" #include "boost/json.hpp" // Boost.Json #include "llfilesystem.h" +#include "workqueue.h" #include "message.h" // for getting the port @@ -57,7 +58,7 @@ namespace inline bool getBoolSetting(const std::string &keyname) { - if (!mBoolSettingGet || mBoolSettingGet.empty()) + if (mBoolSettingGet == nullptr) return(false); return mBoolSettingGet(HTTP_LOGBODY_KEY); } @@ -69,7 +70,7 @@ void setPropertyMethods(BoolSettingQuery_t queryfn, BoolSettingUpdate_t updatefn mBoolSettingGet = queryfn; mBoolSettingPut = updatefn; - if (mBoolSettingPut && !mBoolSettingPut.empty()) + if (mBoolSettingPut != nullptr) { mBoolSettingPut(HTTP_LOGBODY_KEY, false, "Log the entire HTTP body in the case of an HTTP error."); } @@ -295,41 +296,73 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons } else { - try + constexpr size_t MAX_BODY_SIZE_THRESHOLD = 65536; + bool posted = false; + // Some messsages (ex: AISAPI) can return large bodies. + // If the body is larger than our threshold, post the + // parsing to the general queue to avoid stalling the + // main thread. + if (response->getBodySize() > MAX_BODY_SIZE_THRESHOLD) { - result = this->handleSuccess(response, status); - } - catch (std::bad_alloc&) - { - LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("CoreHTTP") << "Failed to allocate memory for response handling." << LL_ENDL; - } - } + response->addRef(); - buildStatusEntry(response, status, result); + LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); + LL::WorkQueue::ptr_t general_queue = LL::WorkQueue::getInstance("General"); + posted = main_queue->postTo( + general_queue, + [handler = shared_from_this(), response, status]() // Work done on general queue + { + std::pair<LLSD, LLCore::HttpStatus> result; + result.second = status; + try + { + result.first = handler->handleSuccess(response, result.second); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("CoreHTTP") << "Failed to allocate memory for response handling (threaded)." << LL_ENDL; + } + // LLSD is not thread safe! Be carefull with moving the result around. + return result; + }, + [handler = shared_from_this(), response](std::pair<LLSD, LLCore::HttpStatus> result) mutable // Callback to main thread + { + handler->replyPost(response, result.second, result.first); + response->release(); + }); - if (!status) - { - LLSD &httpStatus = result[HttpCoroutineAdapter::HTTP_RESULTS]; + if (posted) + { + // Thread will do the cleanup and notify the pump. Done. + return; + } + else + { + // For whatever reason, failed to post, clean up and + // do the work on the main thread. + response->release(); + } + } - LLCore::BufferArray *body = response->getBody(); - LLCore::BufferArrayStream bas(body); - LLSD::String bodyData; - bodyData.reserve(response->getBodySize()); - bas >> std::noskipws; - bodyData.assign(std::istream_iterator<U8>(bas), std::istream_iterator<U8>()); - httpStatus["error_body"] = LLSD(bodyData); - if (getBoolSetting(HTTP_LOGBODY_KEY)) + if (!posted) { - // commenting out, but keeping since this can be useful for debugging - LL_WARNS("CoreHTTP") << "Returned body=" << std::endl << httpStatus["error_body"].asString() << LL_ENDL; + try + { + result = this->handleSuccess(response, status); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("CoreHTTP") << "Failed to allocate memory for response handling." << LL_ENDL; + } } } - mReplyPump.post(result); + replyPost(response, status, result); } -void HttpCoroHandler::buildStatusEntry(LLCore::HttpResponse *response, LLCore::HttpStatus status, LLSD &result) +void HttpCoroHandler::buildStatusEntry(LLCore::HttpResponse *response, LLCore::HttpStatus status, LLSD &result) const { LLSD httpresults = LLSD::emptyMap(); @@ -357,6 +390,31 @@ void HttpCoroHandler::buildStatusEntry(LLCore::HttpResponse *response, LLCore::H result[HttpCoroutineAdapter::HTTP_RESULTS] = httpresults; } +void HttpCoroHandler::replyPost(LLCore::HttpResponse* response, LLCore::HttpStatus &status, LLSD& result) +{ + buildStatusEntry(response, status, result); + + if (!status) + { + LLSD& httpStatus = result[HttpCoroutineAdapter::HTTP_RESULTS]; + + LLCore::BufferArray* body = response->getBody(); + LLCore::BufferArrayStream bas(body); + LLSD::String bodyData; + bodyData.reserve(response->getBodySize()); + bas >> std::noskipws; + bodyData.assign(std::istream_iterator<U8>(bas), std::istream_iterator<U8>()); + httpStatus["error_body"] = LLSD(bodyData); + if (getBoolSetting(HTTP_LOGBODY_KEY)) + { + // commenting out, but keeping since this can be useful for debugging + LL_WARNS("CoreHTTP") << "Returned body=" << std::endl << httpStatus["error_body"].asString() << LL_ENDL; + } + } + + mReplyPump.post(result); +} + void HttpCoroHandler::writeStatusCodes(LLCore::HttpStatus status, const std::string &url, LLSD &result) { result[HttpCoroutineAdapter::HTTP_RESULTS_SUCCESS] = static_cast<LLSD::Boolean>(status); @@ -389,8 +447,8 @@ public: HttpCoroLLSDHandler(LLEventStream &reply); protected: - virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status); - virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success); + virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const; + virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success) const; }; //------------------------------------------------------------------------- @@ -400,7 +458,7 @@ HttpCoroLLSDHandler::HttpCoroLLSDHandler(LLEventStream &reply): } -LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) +LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const { LLSD result; @@ -465,7 +523,7 @@ LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore: return result; } -LLSD HttpCoroLLSDHandler::parseBody(LLCore::HttpResponse *response, bool &success) +LLSD HttpCoroLLSDHandler::parseBody(LLCore::HttpResponse *response, bool &success) const { success = true; if (response->getBodySize() == 0) @@ -496,8 +554,8 @@ class HttpCoroRawHandler : public HttpCoroHandler public: HttpCoroRawHandler(LLEventStream &reply); - virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status); - virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success); + virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const; + virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success) const; }; //------------------------------------------------------------------------- @@ -506,7 +564,7 @@ HttpCoroRawHandler::HttpCoroRawHandler(LLEventStream &reply): { } -LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) +LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const { LLSD result = LLSD::emptyMap(); @@ -552,7 +610,7 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:: return result; } -LLSD HttpCoroRawHandler::parseBody(LLCore::HttpResponse *response, bool &success) +LLSD HttpCoroRawHandler::parseBody(LLCore::HttpResponse *response, bool &success) const { success = true; return LLSD(); @@ -571,8 +629,8 @@ class HttpCoroJSONHandler : public HttpCoroHandler public: HttpCoroJSONHandler(LLEventStream &reply); - virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status); - virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success); + virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const; + virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success) const; }; //------------------------------------------------------------------------- @@ -581,7 +639,7 @@ HttpCoroJSONHandler::HttpCoroJSONHandler(LLEventStream &reply) : { } -LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) +LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const { LLSD result = LLSD::emptyMap(); @@ -607,7 +665,7 @@ LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore: return result; } -LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &success) +LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &success) const { success = true; BufferArray * body(response->getBody()); @@ -666,9 +724,9 @@ const std::string HttpCoroutineAdapter::HTTP_RESULTS_HEADERS("headers"); const std::string HttpCoroutineAdapter::HTTP_RESULTS_CONTENT("content"); const std::string HttpCoroutineAdapter::HTTP_RESULTS_RAW("raw"); -HttpCoroutineAdapter::HttpCoroutineAdapter(const std::string &name, +HttpCoroutineAdapter::HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId) : - mAdapterName(name), + mAdapterName(std::move(name)), mPolicyId(policyId), mYieldingHandle(LLCORE_HTTP_HANDLE_INVALID), mWeakRequest(), @@ -686,7 +744,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return postAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -723,7 +781,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return postAndSuspend_(request, url, rawbody, options, headers, httpHandler); } @@ -733,7 +791,7 @@ LLSD HttpCoroutineAdapter::postRawAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroRawHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroRawHandler>(replyPump); return postAndSuspend_(request, url, rawbody, options, headers, httpHandler); } @@ -797,7 +855,7 @@ LLSD HttpCoroutineAdapter::postJsonAndSuspend(LLCore::HttpRequest::ptr_t request LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroJSONHandler>(replyPump); LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray); @@ -846,7 +904,7 @@ LLSD HttpCoroutineAdapter::putAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return putAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -856,7 +914,7 @@ LLSD HttpCoroutineAdapter::putJsonAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroJSONHandler>(replyPump); LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray); @@ -931,7 +989,7 @@ LLSD HttpCoroutineAdapter::getAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -941,7 +999,7 @@ LLSD HttpCoroutineAdapter::getRawAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroRawHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroRawHandler>(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -950,7 +1008,7 @@ LLSD HttpCoroutineAdapter::getJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroJSONHandler>(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -987,7 +1045,7 @@ LLSD HttpCoroutineAdapter::deleteAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return deleteAndSuspend_(request, url, options, headers, httpHandler); } @@ -997,7 +1055,7 @@ LLSD HttpCoroutineAdapter::deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t reque LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroJSONHandler>(replyPump); return deleteAndSuspend_(request, url, options, headers, httpHandler); } @@ -1032,7 +1090,7 @@ LLSD HttpCoroutineAdapter::patchAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); return patchAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -1070,10 +1128,10 @@ LLSD HttpCoroutineAdapter::copyAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared<LLCore::HttpHeaders>(); headers->append(HTTP_OUT_HEADER_DESTINATION, dest); return copyAndSuspend_(request, url, options, headers, httpHandler); @@ -1112,10 +1170,10 @@ LLSD HttpCoroutineAdapter::moveAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared<HttpCoroLLSDHandler>(replyPump); if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared<LLCore::HttpHeaders>(); headers->append(HTTP_OUT_HEADER_DESTINATION, dest); return moveAndSuspend_(request, url, options, headers, httpHandler); @@ -1153,7 +1211,7 @@ LLSD HttpCoroutineAdapter::moveAndSuspend_(LLCore::HttpRequest::ptr_t &request, void HttpCoroutineAdapter::checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers) { if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared<LLCore::HttpHeaders>(); if (!headers->find(HTTP_OUT_HEADER_ACCEPT)) { headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML); @@ -1236,9 +1294,9 @@ void HttpCoroutineAdapter::callbackHttpGet(const std::string &url, LLCore::HttpR /*static*/ void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::string &success, const std::string &failure) { - completionCallback_t cbSuccess = (success.empty()) ? NULL : + completionCallback_t cbSuccess = (success.empty()) ? nullptr : static_cast<completionCallback_t>(boost::bind(&logMessageSuccess, "HttpCoroutineAdapter", url, success)); - completionCallback_t cbFailure = (failure.empty()) ? NULL : + completionCallback_t cbFailure = (failure.empty()) ? nullptr : static_cast<completionCallback_t>(boost::bind(&logMessageFail, "HttpCoroutineAdapter", url, failure)); callbackHttpGet(url, cbSuccess, cbFailure); } @@ -1247,9 +1305,9 @@ void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::str void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericGetCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("genericGetCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -1286,9 +1344,9 @@ void HttpCoroutineAdapter::callbackHttpPost(const std::string &url, LLCore::Http /*static*/ void HttpCoroutineAdapter::messageHttpPost(const std::string &url, const LLSD &postData, const std::string &success, const std::string &failure) { - completionCallback_t cbSuccess = (success.empty()) ? NULL : + completionCallback_t cbSuccess = (success.empty()) ? nullptr : static_cast<completionCallback_t>(boost::bind(&logMessageSuccess, "HttpCoroutineAdapter", url, success)); - completionCallback_t cbFailure = (failure.empty()) ? NULL : + completionCallback_t cbFailure = (failure.empty()) ? nullptr : static_cast<completionCallback_t>(boost::bind(&logMessageFail, "HttpCoroutineAdapter", url, failure)); callbackHttpPost(url, postData, cbSuccess, cbFailure); @@ -1298,9 +1356,9 @@ void HttpCoroutineAdapter::messageHttpPost(const std::string &url, const LLSD &p void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("genericPostCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -1342,9 +1400,9 @@ void HttpCoroutineAdapter::callbackHttpDel(const std::string &url, LLCore::HttpR void HttpCoroutineAdapter::trivialDelCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericDelCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("genericDelCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index 45b673b9d5..3072f78911 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -58,8 +58,8 @@ namespace LLCoreHttpUtil { /// Allow access to to the property settings methods. -typedef boost::function<bool(const std::string &)> BoolSettingQuery_t; -typedef boost::function<void(const std::string &, bool, const std::string &)> BoolSettingUpdate_t; +typedef std::function<bool(const std::string &)> BoolSettingQuery_t; +typedef std::function<void(const std::string &, bool, const std::string &)> BoolSettingUpdate_t; void setPropertyMethods(BoolSettingQuery_t queryfn, BoolSettingUpdate_t updatefn); @@ -259,7 +259,7 @@ inline LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest::ptr_t & requ /// +- ["url"] - The URL used to make the call. /// +- ["headers"] - A map of name name value pairs with the HTTP headers. /// -class HttpCoroHandler : public LLCore::HttpHandler +class HttpCoroHandler : public LLCore::HttpHandler, public std::enable_shared_from_this<HttpCoroHandler> { public: @@ -279,11 +279,12 @@ public: protected: /// this method may modify the status value - virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) = 0; - virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success) = 0; + virtual LLSD handleSuccess(LLCore::HttpResponse * response, LLCore::HttpStatus &status) const = 0; + virtual LLSD parseBody(LLCore::HttpResponse *response, bool &success) const = 0; private: - void buildStatusEntry(LLCore::HttpResponse *response, LLCore::HttpStatus status, LLSD &result); + void buildStatusEntry(LLCore::HttpResponse *response, LLCore::HttpStatus status, LLSD &result) const; + void replyPost(LLCore::HttpResponse* response, LLCore::HttpStatus& status, LLSD& result); LLEventStream &mReplyPump; }; @@ -320,7 +321,7 @@ public: typedef std::shared_ptr<HttpCoroutineAdapter> ptr_t; typedef std::weak_ptr<HttpCoroutineAdapter> wptr_t; - HttpCoroutineAdapter(const std::string &name, LLCore::HttpRequest::policy_t policyId); + HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId); ~HttpCoroutineAdapter(); /// Execute a Post transaction on the supplied URL and yield execution of @@ -330,19 +331,19 @@ public: /// not be deallocated during the yield. LLSD postAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return postAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD postAndSuspend(LLCore::HttpRequest::ptr_t &request, @@ -350,59 +351,59 @@ public: LLCore::HttpHeaders::ptr_t &headers) { return postAndSuspend(request, url, rawbody, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD postRawAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postRawAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { return postRawAndSuspend(request, url, rawbody, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, std::string fileName, LLCore::HttpHeaders::ptr_t &headers) { return postFileAndSuspend(request, url, fileName, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpHeaders::ptr_t &headers) { return postFileAndSuspend(request, url, assetId, assetType, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD postJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD postJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return postJsonAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } @@ -414,27 +415,27 @@ public: /// not be deallocated during the yield. LLSD putAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD putAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t headers) { return putAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD putJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD putJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return putJsonAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } /// Execute a Get transaction on the supplied URL and yield execution of @@ -445,25 +446,25 @@ public: /// LLSD getAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD getAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared<LLCore::HttpOptions>(), headers); } LLSD getRawAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD getRawAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getRawAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared<LLCore::HttpOptions>(), headers); } @@ -473,13 +474,13 @@ public: /// before being returned to the caller. LLSD getJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD getJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getJsonAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared<LLCore::HttpOptions>(), headers); } @@ -491,13 +492,13 @@ public: /// not be deallocated during the yield. LLSD deleteAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD deleteAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpHeaders::ptr_t headers) { return deleteAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared<LLCore::HttpOptions>(), headers); } @@ -507,13 +508,13 @@ public: /// before being returned to the caller. LLSD deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpHeaders::ptr_t headers) { return deleteJsonAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared<LLCore::HttpOptions>(), headers); } @@ -525,14 +526,14 @@ public: /// not be deallocated during the yield. LLSD patchAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD patchAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return patchAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } /// Execute a COPY transaction on the supplied URL and yield execution of @@ -545,14 +546,14 @@ public: /// not be deallocated during the yield. LLSD copyAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const std::string dest, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD copyAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const std::string & dest, LLCore::HttpHeaders::ptr_t &headers) { return copyAndSuspend(request, url, dest, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } /// Execute a MOVE transaction on the supplied URL and yield execution of @@ -565,14 +566,14 @@ public: /// not be deallocated during the yield. LLSD moveAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const std::string dest, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared<LLCore::HttpOptions>(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>()); LLSD moveAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const std::string & dest, LLCore::HttpHeaders::ptr_t &headers) { return moveAndSuspend(request, url, dest, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared<LLCore::HttpOptions>(), headers); } /// @@ -585,21 +586,21 @@ public: /// should match this form. /// @sa callbackHttpGet /// @sa callbackHttpPost - typedef boost::function<void(const LLSD &)> completionCallback_t; + typedef std::function<void(const LLSD &)> completionCallback_t; - static void callbackHttpGet(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = NULL, completionCallback_t failure = NULL); - static void callbackHttpGet(const std::string &url, completionCallback_t success = NULL, completionCallback_t failure = NULL) + static void callbackHttpGet(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = nullptr, completionCallback_t failure = nullptr); + static void callbackHttpGet(const std::string &url, completionCallback_t success = nullptr, completionCallback_t failure = nullptr) { callbackHttpGet(url, LLCore::HttpRequest::DEFAULT_POLICY_ID, success, failure); } - static void callbackHttpPost(const std::string &url, LLCore::HttpRequest::policy_t policyId, const LLSD &postData, completionCallback_t success = NULL, completionCallback_t failure = NULL); - static void callbackHttpPost(const std::string &url, const LLSD &postData, completionCallback_t success = NULL, completionCallback_t failure = NULL) + static void callbackHttpPost(const std::string &url, LLCore::HttpRequest::policy_t policyId, const LLSD &postData, completionCallback_t success = nullptr, completionCallback_t failure = nullptr); + static void callbackHttpPost(const std::string &url, const LLSD &postData, completionCallback_t success = nullptr, completionCallback_t failure = nullptr) { callbackHttpPost(url, LLCore::HttpRequest::DEFAULT_POLICY_ID, postData, success, failure); } - static void callbackHttpDel(const std::string &url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = NULL, - completionCallback_t failure = NULL); + static void callbackHttpDel(const std::string& url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success = nullptr, + completionCallback_t failure = nullptr); /// Generic Get and post routines for HTTP via coroutines. /// These static methods do all required setup for the GET or POST operation. diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 78cca47456..e4c7deb1c5 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -35,7 +35,6 @@ #include <set> #include <map> #include <boost/tokenizer.hpp> -#include <boost/concept_check.hpp> //========================================================================= namespace LLExperienceCacheImpl @@ -113,9 +112,7 @@ void LLExperienceCache::initSingleton() constexpr size_t CORO_QUEUE_SIZE = 2048; LLCoprocedureManager::instance().initializePool("ExpCache", CORO_QUEUE_SIZE); - LLCoros::instance().launch("LLExperienceCache::idleCoro", - boost::bind(&LLExperienceCache::idleCoro, this)); - + LLCoros::instance().launch("LLExperienceCache::idleCoro", LLExperienceCache::idleCoro); } void LLExperienceCache::cleanup() @@ -247,14 +244,22 @@ const LLExperienceCache::cache_t& LLExperienceCache::getCached() return mCache; } +// static because used by coroutine and can outlive the instance void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, std::string url, RequestQueue_t requests) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); //LL_INFOS("requestExperiencesCoro") << "url: " << url << LL_ENDL; LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + if (sShutdown) + { + return; + } + + LLExperienceCache* self = LLExperienceCache::getInstance(); + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -266,7 +271,7 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap // build dummy entries for the failed requests for (RequestQueue_t::const_iterator it = requests.begin(); it != requests.end(); ++it) { - LLSD exp = get(*it); + LLSD exp = self->get(*it); //leave the properties alone if we already have a cache entry for this xp if (exp.isUndefined()) { @@ -279,7 +284,7 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap exp["error"] = (LLSD::Integer)status.getType(); exp[QUOTA] = DEFAULT_QUOTA; - processExperience(*it, exp); + self->processExperience(*it, exp); } return; } @@ -295,7 +300,7 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap LL_DEBUGS("ExperienceCache") << "Received result for " << public_key << " display '" << row[LLExperienceCache::NAME].asString() << "'" << LL_ENDL; - processExperience(public_key, row); + self->processExperience(public_key, row); } LLSD error_ids = result["error_ids"]; @@ -311,7 +316,7 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap exp[MISSING] = true; exp[QUOTA] = DEFAULT_QUOTA; - processExperience(id, exp); + self->processExperience(id, exp); LL_WARNS("ExperienceCache") << "LLExperienceResponder::result() error result for " << id << LL_ENDL; } @@ -320,7 +325,7 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap void LLExperienceCache::requestExperiences() { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -362,7 +367,7 @@ void LLExperienceCache::requestExperiences() if (mRequestQueue.empty() || (ostr.tellp() > EXP_URL_SEND_THRESHOLD)) { // request is placed in the coprocedure pool for the ExpCache cache. Throttling is done by the pool itself. LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "RequestExperiences", - boost::bind(&LLExperienceCache::requestExperiencesCoro, this, _1, ostr.str(), requests) ); + boost::bind(&LLExperienceCache::requestExperiencesCoro, _1, ostr.str(), requests) ); ostr.str(std::string()); ostr << urlBase << "?page_size=" << PAGE_SIZE1; @@ -394,7 +399,7 @@ void LLExperienceCache::setCapabilityQuery(LLExperienceCache::CapabilityQuery_t mCapability = queryfn; } - +// static, because coro can outlive the instance void LLExperienceCache::idleCoro() { const F32 SECS_BETWEEN_REQUESTS = 0.5f; @@ -403,14 +408,15 @@ void LLExperienceCache::idleCoro() LL_INFOS("ExperienceCache") << "Launching Experience cache idle coro." << LL_ENDL; do { - if (mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT)) + LLExperienceCache* self = LLExperienceCache::getInstance(); + if (self->mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT)) { - eraseExpired(); + self->eraseExpired(); } - if (!mRequestQueue.empty()) + if (!self->mRequestQueue.empty()) { - requestExperiences(); + self->requestExperiences(); } llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS); @@ -527,7 +533,7 @@ void LLExperienceCache::get(const LLUUID& key, LLExperienceCache::ExperienceGetF fetch(key); - signal_ptr signal = signal_ptr(new callback_signal_t()); + signal_ptr signal = std::make_shared<callback_signal_t>(); std::pair<signal_map_t::iterator, bool> result = mSignalMap.insert(signal_map_t::value_type(key, signal)); if (!result.second) @@ -538,7 +544,7 @@ void LLExperienceCache::get(const LLUUID& key, LLExperienceCache::ExperienceGetF //========================================================================= void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -550,7 +556,7 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -562,7 +568,7 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, std::string url, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); if (url.empty()) { @@ -600,8 +606,10 @@ void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCorout failure["error"] = -1; failure["message"] = "no experience"; } - if (fn && !fn.empty()) + if (fn != nullptr) + { fn(failure); + } return; } @@ -612,7 +620,7 @@ void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCorout //------------------------------------------------------------------------- void LLExperienceCache::findExperienceByName(const std::string text, int page, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -624,7 +632,7 @@ void LLExperienceCache::findExperienceByName(const std::string text, int page, E void LLExperienceCache::findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, std::string text, int page, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::ostringstream url; @@ -655,7 +663,7 @@ void LLExperienceCache::findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAd //------------------------------------------------------------------------- void LLExperienceCache::getGroupExperiences(const LLUUID &groupId, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -667,7 +675,7 @@ void LLExperienceCache::getGroupExperiences(const LLUUID &groupId, ExperienceGet void LLExperienceCache::getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID groupId, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); // search for experiences owned by the current group std::string url = mCapability("GroupExperiences"); @@ -710,7 +718,7 @@ void LLExperienceCache::setRegionExperiences(CapabilityQuery_t regioncaps, const void LLExperienceCache::regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); // search for experiences owned by the current group std::string url = regioncaps("RegionExperiences"); @@ -743,7 +751,7 @@ void LLExperienceCache::regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapt //------------------------------------------------------------------------- void LLExperienceCache::getExperiencePermission(const LLUUID &experienceId, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -767,7 +775,7 @@ void LLExperienceCache::getExperiencePermission(const LLUUID &experienceId, Expe void LLExperienceCache::setExperiencePermission(const LLUUID &experienceId, const std::string &permission, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -797,7 +805,7 @@ void LLExperienceCache::setExperiencePermission(const LLUUID &experienceId, cons void LLExperienceCache::forgetExperiencePermission(const LLUUID &experienceId, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -822,7 +830,7 @@ void LLExperienceCache::forgetExperiencePermission(const LLUUID &experienceId, E void LLExperienceCache::experiencePermissionCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, permissionInvoker_fn invokerfn, std::string url, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); // search for experiences owned by the current group @@ -841,7 +849,7 @@ void LLExperienceCache::experiencePermissionCoro(LLCoreHttpUtil::HttpCoroutineAd //------------------------------------------------------------------------- void LLExperienceCache::getExperienceAdmin(const LLUUID &experienceId, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -853,7 +861,7 @@ void LLExperienceCache::getExperienceAdmin(const LLUUID &experienceId, Experienc void LLExperienceCache::getExperienceAdminCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID experienceId, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = mCapability("IsExperienceAdmin"); if (url.empty()) @@ -873,7 +881,7 @@ void LLExperienceCache::getExperienceAdminCoro(LLCoreHttpUtil::HttpCoroutineAdap //------------------------------------------------------------------------- void LLExperienceCache::updateExperience(LLSD updateData, ExperienceGetFn_t fn) { - if (mCapability.empty()) + if (mCapability == nullptr) { LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL; return; @@ -885,7 +893,7 @@ void LLExperienceCache::updateExperience(LLSD updateData, ExperienceGetFn_t fn) void LLExperienceCache::updateExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLSD updateData, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = mCapability("UpdateExperience"); if (url.empty()) diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h index 81e904107f..9ecdb9efca 100644 --- a/indra/llmessage/llexperiencecache.h +++ b/indra/llmessage/llexperiencecache.h @@ -35,7 +35,7 @@ #include "llsd.h" #include "llcorehttputil.h" #include <boost/signals2.hpp> -#include <boost/function.hpp> +#include <functional> class LLSD; class LLUUID; @@ -46,8 +46,8 @@ class LLExperienceCache: public LLSingleton < LLExperienceCache > LLSINGLETON(LLExperienceCache); public: - typedef boost::function<std::string(const std::string &)> CapabilityQuery_t; - typedef boost::function<void(const LLSD &)> ExperienceGetFn_t; + typedef std::function<std::string(const std::string &)> CapabilityQuery_t; + typedef std::function<void(const LLSD &)> ExperienceGetFn_t; void setCapabilityQuery(CapabilityQuery_t queryfn); void cleanup(); @@ -108,7 +108,7 @@ private: virtual void initSingleton() override; - typedef boost::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLCore::HttpRequest::ptr_t, std::string)> permissionInvoker_fn; + typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLCore::HttpRequest::ptr_t, std::string)> permissionInvoker_fn; // Callback types for get() typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t; @@ -144,9 +144,9 @@ private: std::string mCacheFileName; static bool sShutdown; // control for coroutines, they exist out of LLExperienceCache's scope, so they need a static control - void idleCoro(); + static void idleCoro(); void eraseExpired(); - void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t); + static void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t); void requestExperiences(); void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, std::string, ExperienceGetFn_t); diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp deleted file mode 100644 index b842aeda62..0000000000 --- a/indra/llmessage/llmail.cpp +++ /dev/null @@ -1,395 +0,0 @@ -/** - * @file llmail.cpp - * @brief smtp helper functions. - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "linden_common.h" - -#include "llmail.h" - -#include "llwin32headers.h" -#include <string> -#include <sstream> - -#include "apr_pools.h" -#include "apr_network_io.h" - -#include "llapr.h" -#include "llbase32.h" // IM-to-email address -#include "llblowfishcipher.h" -#include "llerror.h" -#include "llhost.h" -#include "llsd.h" -#include "llstring.h" -#include "lluuid.h" -#include "net.h" - -// -// constants -// -const size_t LL_MAX_KNOWN_GOOD_MAIL_SIZE = 4096; - -static bool gMailEnabled = true; -static apr_pool_t* gMailPool; -static apr_sockaddr_t* gSockAddr; -static apr_socket_t* gMailSocket; - -bool connect_smtp(); -void disconnect_smtp(); - -//#if LL_WINDOWS -//SOCKADDR_IN gMailDstAddr, gMailSrcAddr, gMailLclAddr; -//#else -//struct sockaddr_in gMailDstAddr, gMailSrcAddr, gMailLclAddr; -//#endif - -// Define this for a super-spammy mail mode. -//#define LL_LOG_ENTIRE_MAIL_MESSAGE_ON_SEND 1 - -bool connect_smtp() -{ - // Prepare an soket to talk smtp - apr_status_t status; - status = apr_socket_create( - &gMailSocket, - gSockAddr->sa.sin.sin_family, - SOCK_STREAM, - APR_PROTO_TCP, - gMailPool); - if(ll_apr_warn_status(status)) return false; - status = apr_socket_connect(gMailSocket, gSockAddr); - if(ll_apr_warn_status(status)) - { - status = apr_socket_close(gMailSocket); - ll_apr_warn_status(status); - return false; - } - return true; -} - -void disconnect_smtp() -{ - if(gMailSocket) - { - apr_status_t status = apr_socket_close(gMailSocket); - ll_apr_warn_status(status); - gMailSocket = NULL; - } -} - -// Returns true on success. -// message should NOT be SMTP escaped. -// static -bool LLMail::send( - const char* from_name, - const char* from_address, - const char* to_name, - const char* to_address, - const char* subject, - const char* message, - const LLSD& headers) -{ - std::string header = buildSMTPTransaction( - from_name, - from_address, - to_name, - to_address, - subject, - headers); - if(header.empty()) - { - return false; - } - - std::string message_str; - if(message) - { - message_str = message; - } - bool rv = send(header, message_str, to_address, from_address); - if(rv) return true; - return false; -} - -// static -void LLMail::init(const std::string& hostname, apr_pool_t* pool) -{ - gMailSocket = NULL; - if(hostname.empty() || !pool) - { - gMailPool = NULL; - gSockAddr = NULL; - } - else - { - gMailPool = pool; - - // collect all the information into a socaddr sturcture. the - // documentation is a bit unclear, but I either have to - // specify APR_UNSPEC or not specify any flags. I am not sure - // which option is better. - apr_status_t status = apr_sockaddr_info_get( - &gSockAddr, - hostname.c_str(), - APR_UNSPEC, - 25, - APR_IPV4_ADDR_OK, - gMailPool); - ll_apr_warn_status(status); - } -} - -// static -void LLMail::enable(bool mail_enabled) -{ - gMailEnabled = mail_enabled; -} - -// Test a subject line for RFC2822 compliance. -static bool valid_subject_chars(const char *subject) -{ - for (; *subject != '\0'; subject++) - { - unsigned char c = *subject; - - if (c == '\xa' || c == '\xd' || c > '\x7f') - { - return false; - } - } - - return true; -} - -// static -std::string LLMail::buildSMTPTransaction( - const char* from_name, - const char* from_address, - const char* to_name, - const char* to_address, - const char* subject, - const LLSD& headers) -{ - if(!from_address || !to_address) - { - LL_INFOS() << "send_mail build_smtp_transaction reject: missing to and/or" - << " from address." << LL_ENDL; - return std::string(); - } - if(!valid_subject_chars(subject)) - { - LL_INFOS() << "send_mail build_smtp_transaction reject: bad subject header: " - << "to=<" << to_address - << ">, from=<" << from_address << ">" - << LL_ENDL; - return std::string(); - } - std::ostringstream from_fmt; - if(from_name && from_name[0]) - { - // "My Name" <myaddress@example.com> - from_fmt << "\"" << from_name << "\" <" << from_address << ">"; - } - else - { - // <myaddress@example.com> - from_fmt << "<" << from_address << ">"; - } - std::ostringstream to_fmt; - if(to_name && to_name[0]) - { - to_fmt << "\"" << to_name << "\" <" << to_address << ">"; - } - else - { - to_fmt << "<" << to_address << ">"; - } - std::ostringstream header; - header - << "HELO lindenlab.com\r\n" - << "MAIL FROM:<" << from_address << ">\r\n" - << "RCPT TO:<" << to_address << ">\r\n" - << "DATA\r\n" - << "From: " << from_fmt.str() << "\r\n" - << "To: " << to_fmt.str() << "\r\n" - << "Subject: " << subject << "\r\n"; - - if(headers.isMap()) - { - LLSD::map_const_iterator iter = headers.beginMap(); - LLSD::map_const_iterator end = headers.endMap(); - for(; iter != end; ++iter) - { - header << (*iter).first << ": " << ((*iter).second).asString() - << "\r\n"; - } - } - - header << "\r\n"; - return header.str(); -} - -// static -bool LLMail::send( - const std::string& header, - const std::string& raw_message, - const char* from_address, - const char* to_address) -{ - if(!from_address || !to_address) - { - LL_INFOS() << "send_mail reject: missing to and/or from address." - << LL_ENDL; - return false; - } - - // remove any "." SMTP commands to prevent injection (DEV-35777) - // we don't need to worry about "\r\n.\r\n" because of the - // "\n" --> "\n\n" conversion going into rfc2822_msg below - std::string message = raw_message; - std::string bad_string = "\n.\n"; - std::string good_string = "\n..\n"; - while (1) - { - auto index = message.find(bad_string); - if (index == std::string::npos) break; - message.replace(index, bad_string.size(), good_string); - } - - // convert all "\n" into "\r\n" - std::ostringstream rfc2822_msg; - for(U32 i = 0; i < message.size(); ++i) - { - switch(message[i]) - { - case '\0': - break; - case '\n': - // *NOTE: this is kinda busted if we're fed \r\n - rfc2822_msg << "\r\n"; - break; - default: - rfc2822_msg << message[i]; - break; - } - } - - if(!gMailEnabled) - { - LL_INFOS() << "send_mail reject: mail system is disabled: to=<" - << to_address << ">, from=<" << from_address - << ">" << LL_ENDL; - // Any future interface to SMTP should return this as an - // error. --mark - return true; - } - if(!gSockAddr) - { - LL_WARNS() << "send_mail reject: mail system not initialized: to=<" - << to_address << ">, from=<" << from_address - << ">" << LL_ENDL; - return false; - } - - if(!connect_smtp()) - { - LL_WARNS() << "send_mail reject: SMTP connect failure: to=<" - << to_address << ">, from=<" << from_address - << ">" << LL_ENDL; - return false; - } - - std::ostringstream smtp_fmt; - smtp_fmt << header << rfc2822_msg.str() << "\r\n" << ".\r\n" << "QUIT\r\n"; - std::string smtp_transaction = smtp_fmt.str(); - size_t original_size = smtp_transaction.size(); - apr_size_t send_size = original_size; - apr_status_t status = apr_socket_send( - gMailSocket, - smtp_transaction.c_str(), - (apr_size_t*)&send_size); - disconnect_smtp(); - if(ll_apr_warn_status(status)) - { - LL_WARNS() << "send_mail socket failure: unable to write " - << "to=<" << to_address - << ">, from=<" << from_address << ">" - << ", bytes=" << original_size - << ", sent=" << send_size << LL_ENDL; - return false; - } - if(send_size >= LL_MAX_KNOWN_GOOD_MAIL_SIZE) - { - LL_WARNS() << "send_mail message has been shown to fail in testing " - << "when sending messages larger than " << LL_MAX_KNOWN_GOOD_MAIL_SIZE - << " bytes. The next log about success is potentially a lie." << LL_ENDL; - } - LL_DEBUGS() << "send_mail success: " - << "to=<" << to_address - << ">, from=<" << from_address << ">" - << ", bytes=" << original_size - << ", sent=" << send_size << LL_ENDL; - -#if LL_LOG_ENTIRE_MAIL_MESSAGE_ON_SEND - LL_INFOS() << rfc2822_msg.str() << LL_ENDL; -#endif - return true; -} - - -// static -std::string LLMail::encryptIMEmailAddress(const LLUUID& from_agent_id, - const LLUUID& to_agent_id, - U32 time, - const U8* secret, - size_t secret_size) -{ -#if LL_WINDOWS - return "blowfish-not-supported-on-windows"; -#else - size_t data_size = 4 + UUID_BYTES + UUID_BYTES; - // Convert input data into a binary blob - std::vector<U8> data; - data.resize(data_size); - // *NOTE: This may suffer from endian issues. Could be htolememcpy. - memcpy(&data[0], &time, 4); - memcpy(&data[4], &from_agent_id.mData[0], UUID_BYTES); - memcpy(&data[4 + UUID_BYTES], &to_agent_id.mData[0], UUID_BYTES); - - // Encrypt the blob - LLBlowfishCipher cipher(secret, secret_size); - size_t encrypted_size = cipher.requiredEncryptionSpace(data.size()); - U8* encrypted = new U8[encrypted_size]; - cipher.encrypt(&data[0], data_size, encrypted, encrypted_size); - - std::string address = LLBase32::encode(encrypted, encrypted_size); - - // Make it more pretty for humans. - LLStringUtil::toLower(address); - - delete [] encrypted; - - return address; -#endif -} diff --git a/indra/llmessage/llmail.h b/indra/llmessage/llmail.h deleted file mode 100644 index d67b89d1ea..0000000000 --- a/indra/llmessage/llmail.h +++ /dev/null @@ -1,130 +0,0 @@ -/** - * @file llmail.h - * @brief smtp helper functions. - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLMAIL_H -#define LL_LLMAIL_H - -typedef struct apr_pool_t apr_pool_t; - -#include "llsd.h" - -class LLMail -{ -public: - // if hostname is NULL, then the host is resolved as 'mail' - static void init(const std::string& hostname, apr_pool_t* pool); - - // Allow all email transmission to be disabled/enabled. - static void enable(bool mail_enabled); - - /** - * @brief send an email - * @param from_name The name of the email sender - * @param from_address The email address for the sender - * @param to_name The name of the email recipient - * @param to_address The email recipient address - * @param subject The subject of the email - * @param headers optional X-Foo headers in an llsd map. - * @return Returns true if the call succeeds, false otherwise. - * - * Results in: - * From: "from_name" <from_address> - * To: "to_name" <to_address> - * Subject: subject - * - * message - */ - static bool send( - const char* from_name, - const char* from_address, - const char* to_name, - const char* to_address, - const char* subject, - const char* message, - const LLSD& headers = LLSD()); - - /** - * @brief build the complete smtp transaction & header for use in an - * mail. - * - * @param from_name The name of the email sender - * @param from_address The email address for the sender - * @param to_name The name of the email recipient - * @param to_address The email recipient address - * @param subject The subject of the email - * @param headers optional X-Foo headers in an llsd map. - * @return Returns the complete SMTP transaction mail header. - */ - static std::string buildSMTPTransaction( - const char* from_name, - const char* from_address, - const char* to_name, - const char* to_address, - const char* subject, - const LLSD& headers = LLSD()); - - /** - * @brief send an email with header and body. - * - * @param header The email header. Use build_mail_header(). - * @param message The unescaped email message. - * @param from_address Used for debugging - * @param to_address Used for debugging - * @return Returns true if the message could be sent. - */ - static bool send( - const std::string& header, - const std::string& message, - const char* from_address, - const char* to_address); - - // IM-to-email sessions use a "session id" based on an encrypted - // combination of from agent_id, to agent_id, and timestamp. When - // a user replies to an email we use the from_id to determine the - // sender's name and the to_id to route the message. The address - // is encrypted to prevent users from building addresses to spoof - // IMs from other users. The timestamps allow the "sessions" to - // expire, in case one of the sessions is stolen/hijacked. - // - // indra/tools/mailglue is responsible for parsing the inbound mail. - // - // secret: binary blob passed to blowfish, max length 56 bytes - // secret_size: length of blob, in bytes - // - // Returns: "base64" encoded email local-part, with _ and - as the - // non-alphanumeric characters. This allows better compatibility - // with email systems than the default / and + extra chars. JC - static std::string encryptIMEmailAddress( - const LLUUID& from_agent_id, - const LLUUID& to_agent_id, - U32 time, - const U8* secret, - size_t secret_size); -}; - -extern const size_t LL_MAX_KNOWN_GOOD_MAIL_SIZE; - -#endif diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 7798e5692b..f12e4dc2d5 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -122,9 +122,6 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname { switch( vardata_size ) { - case 0: - // This is here to prevent a memcpy from a null value which is undefined behavior. - break; case 1: *((U8*)datap) = *((U8*)vardata.getData()); break; @@ -293,7 +290,7 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, void LLTemplateMessageReader::getBOOL(const char *block, const char *var, bool &b, S32 blocknum ) { - U8 value(0); + U8 value; getData(block, var, &value, sizeof(U8), blocknum); b = (bool)value; } @@ -452,7 +449,7 @@ S32 LLTemplateMessageReader::getMessageSize() const // Returns template for the message contained in buffer bool LLTemplateMessageReader::decodeTemplate( const U8* buffer, S32 buffer_size, // inputs - LLMessageTemplate** msg_template, bool custom ) // outputs + LLMessageTemplate** msg_template ) // outputs { const U8* header = buffer + LL_PACKET_ID_SIZE; @@ -494,7 +491,6 @@ bool LLTemplateMessageReader::decodeTemplate( } else // bogus packet received (too short) { - if (!custom) LL_WARNS() << "Packet with unusable length received (too short): " << buffer_size << LL_ENDL; return(false); @@ -507,11 +503,9 @@ bool LLTemplateMessageReader::decodeTemplate( } else { - if (!custom) - { + // MAINT-7482 - make viewer more tolerant of unknown messages. LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec << " received but not registered!" << LL_ENDL; - } //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); return(false); } @@ -541,7 +535,7 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3 static LLTrace::BlockTimerStatHandle FTM_PROCESS_MESSAGES("Process Messages"); // decode a given message -bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, bool custom ) +bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) { LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES); @@ -601,7 +595,6 @@ bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, } else { - if (!custom) LL_ERRS() << "Unknown block type" << LL_ENDL; return false; } @@ -648,7 +641,6 @@ bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, if ((decode_pos + data_size) > mReceiveSize) { - if (!custom) logRanOffEndOfPacket(sender, decode_pos, data_size); // default to 0 length variable blocks @@ -685,7 +677,6 @@ bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, // so, copy data pointer and set data size to fixed size if ((decode_pos + mvci.getSize()) > mReceiveSize) { - if (!custom) logRanOffEndOfPacket(sender, decode_pos, mvci.getSize()); // default to 0s. @@ -710,11 +701,10 @@ bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, if (mCurrentRMessageData->mMemberBlocks.empty() && !mCurrentRMessageTemplate->mMemberBlocks.empty()) { - LL_WARNS() << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << LL_ENDL; + LL_DEBUGS() << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << LL_ENDL; return false; } - if (!custom) { static LLTimer decode_timer; @@ -767,12 +757,11 @@ bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, bool LLTemplateMessageReader::validateMessage(const U8* buffer, S32 buffer_size, const LLHost& sender, - bool trusted, - bool custom) + bool trusted) { mReceiveSize = buffer_size; - BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate, custom ); - if(valid && !custom) + bool valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); + if(valid) { mCurrentRMessageTemplate->mReceiveCount++; //LL_DEBUGS() << "MessageRecvd:" @@ -843,9 +832,3 @@ void LLTemplateMessageReader::copyToBuilder(LLMessageBuilder& builder) const } builder.copyFromMessageData(*mCurrentRMessageData); } - -LLMessageTemplate* LLTemplateMessageReader::getTemplate() -{ - return mCurrentRMessageTemplate; -} - diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h index 0f7160d328..6f1977cf83 100644 --- a/indra/llmessage/lltemplatemessagereader.h +++ b/indra/llmessage/lltemplatemessagereader.h @@ -99,26 +99,25 @@ public: virtual void copyToBuilder(LLMessageBuilder&) const; bool validateMessage(const U8* buffer, S32 buffer_size, - const LLHost& sender, bool trusted = false, bool custom = false); + const LLHost& sender, bool trusted = false); bool readMessage(const U8* buffer, const LLHost& sender); bool isTrusted() const; bool isBanned(bool trusted_source) const; bool isUdpBanned() const; - bool decodeData(const U8* buffer, const LLHost& sender, bool custom = false ); - LLMessageTemplate* getTemplate(); - private: void getData(const char *blockname, const char *varname, void *datap, S32 size = 0, S32 blocknum = 0, S32 max_size = S32_MAX); bool decodeTemplate(const U8* buffer, S32 buffer_size, // inputs - LLMessageTemplate** msg_template, bool custom = false ); // outputs + LLMessageTemplate** msg_template ); // outputs void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ); + bool decodeData(const U8* buffer, const LLHost& sender ); + S32 mReceiveSize; LLMessageTemplate* mCurrentRMessageTemplate; LLMsgData* mCurrentRMessageData; diff --git a/indra/llmessage/lltransfertargetfile.h b/indra/llmessage/lltransfertargetfile.h index 43189eb388..cca0ea8d04 100644 --- a/indra/llmessage/lltransfertargetfile.h +++ b/indra/llmessage/lltransfertargetfile.h @@ -37,8 +37,8 @@ public: LLTransferTargetParamsFile() : LLTransferTargetParams(LLTTT_FILE), - mCompleteCallback(NULL), - mUserData(NULL) + mCompleteCallback(nullptr), + mUserData(nullptr) {} void setFilename(const std::string& filename) { mFilename = filename; } void setCallback(LLTTFCompleteCallback cb, void *user_data) { mCompleteCallback = cb; mUserData = user_data; } diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index fcf853845b..bbc2ddf4cc 100644 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -41,8 +41,8 @@ void LLTransferTargetVFile::updateQueue(bool shutdown) LLTransferTargetParamsVFile::LLTransferTargetParamsVFile() : LLTransferTargetParams(LLTTT_VFILE), mAssetType(LLAssetType::AT_NONE), - mCompleteCallback(NULL), - mRequestDatap(NULL), + mCompleteCallback(nullptr), + mRequestDatap(nullptr), mErrCode(0) { } diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index ad1ff86807..e2937490ba 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -913,7 +913,7 @@ LLStoredMessagePtr LLMessageSystem::getReceivedMessage() const const std::string& name = mMessageReader->getMessageName(); LLSD message = wrapReceivedTemplateData(); - return LLStoredMessagePtr(new LLStoredMessage(name, message)); + return std::make_shared<LLStoredMessage>(name, message); } LLStoredMessagePtr LLMessageSystem::getBuiltMessage() const @@ -921,7 +921,7 @@ LLStoredMessagePtr LLMessageSystem::getBuiltMessage() const const std::string& name = mMessageBuilder->getMessageName(); LLSD message = wrapBuiltTemplateData(); - return LLStoredMessagePtr(new LLStoredMessage(name, message)); + return std::make_shared<LLStoredMessage>(name, message); } S32 LLMessageSystem::sendMessage(const LLHost &host, LLStoredMessagePtr message) @@ -1162,7 +1162,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) { LLSD message = mLLSDMessageBuilder->getMessage(); - UntrustedCallback_t cb = NULL; + UntrustedCallback_t cb = nullptr; if ((mSendReliable) && (mReliablePacketParams.mCallback)) { cb = boost::bind(mReliablePacketParams.mCallback, mReliablePacketParams.mCallbackData, _1); @@ -1359,7 +1359,7 @@ S32 LLMessageSystem::sendMessage( return 0; } - UntrustedCallback_t cb = NULL; + UntrustedCallback_t cb = nullptr; if ((mSendReliable) && (mReliablePacketParams.mCallback)) { cb = boost::bind(mReliablePacketParams.mCallback, mReliablePacketParams.mCallbackData, _1); @@ -4028,9 +4028,9 @@ void LLMessageSystem::sendUntrustedSimulatorMessageCoro(std::string url, std::st { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("untrustedSimulatorMessage", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("untrustedSimulatorMessage", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); if (url.empty()) @@ -4049,8 +4049,10 @@ void LLMessageSystem::sendUntrustedSimulatorMessageCoro(std::string url, std::st LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - if ((callback) && (!callback.empty())) + if (callback != nullptr) + { callback((status) ? LL_ERR_NOERR : LL_ERR_TCP_TIMEOUT); + } } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index 30945cac51..14cdc48a07 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -28,6 +28,7 @@ #define LL_MESSAGE_H #include <cstring> +#include <functional> #include <set> #if LL_LINUX @@ -55,7 +56,6 @@ #include "llmessagesenderinterface.h" #include "llstoredmessage.h" -#include "boost/function.hpp" #include "llpounceable.h" #include "llcoros.h" #include LLCOROS_MUTEX_HEADER @@ -826,7 +826,7 @@ public: void receivedMessageFromTrustedSender(); private: - typedef boost::function<void(S32)> UntrustedCallback_t; + typedef std::function<void(S32)> UntrustedCallback_t; void sendUntrustedSimulatorMessageCoro(std::string url, std::string message, LLSD body, UntrustedCallback_t callback); diff --git a/indra/llmessage/tests/llareslistener_test.cpp b/indra/llmessage/tests/llareslistener_test.cpp deleted file mode 100644 index f4a9e501ec..0000000000 --- a/indra/llmessage/tests/llareslistener_test.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/** - * @file llareslistener_test.cpp - * @author Mark Palange - * @date 2009-02-26 - * @brief Tests of llareslistener.h. - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -#if LL_WINDOWS -#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally -#endif - -// Precompiled header -#include "linden_common.h" -// associated header -#include "../llareslistener.h" -// STL headers -#include <iostream> -// std headers -// external library headers -#include <boost/bind.hpp> - -// other Linden headers -#include "llsd.h" -#include "llares.h" -#include "../test/lltut.h" -#include "llevents.h" -#include "tests/wrapllerrs.h" - -/***************************************************************************** -* Dummy stuff -*****************************************************************************/ -LLAres::LLAres(): - // Simulate this much of the real LLAres constructor: we need an - // LLAresListener instance. - mListener(new LLAresListener("LLAres", this)) -{} -LLAres::~LLAres() {} -void LLAres::rewriteURI(const std::string &uri, - LLAres::UriRewriteResponder *resp) -{ - // This is the only LLAres method I chose to implement. - // The effect is that LLAres returns immediately with - // a result that is equal to the input uri. - std::vector<std::string> result; - result.push_back(uri); - resp->rewriteResult(result); -} - -LLAres::QueryResponder::~QueryResponder() {} -void LLAres::QueryResponder::queryError(int) {} -void LLAres::QueryResponder::queryResult(char const*, size_t) {} -LLQueryResponder::LLQueryResponder() {} -void LLQueryResponder::queryResult(char const*, size_t) {} -void LLQueryResponder::querySuccess() {} -void LLAres::UriRewriteResponder::queryError(int) {} -void LLAres::UriRewriteResponder::querySuccess() {} -void LLAres::UriRewriteResponder::rewriteResult(const std::vector<std::string>& uris) {} - -/***************************************************************************** -* TUT -*****************************************************************************/ -namespace tut -{ - struct data - { - LLAres dummyAres; - }; - typedef test_group<data> llareslistener_group; - typedef llareslistener_group::object object; - llareslistener_group llareslistenergrp("llareslistener"); - - struct ResponseCallback - { - std::vector<std::string> mURIs; - bool operator()(const LLSD& response) - { - mURIs.clear(); - for (LLSD::array_const_iterator ri(response.beginArray()), rend(response.endArray()); - ri != rend; ++ri) - { - mURIs.push_back(*ri); - } - return false; - } - }; - - template<> template<> - void object::test<1>() - { - set_test_name("test event"); - // Tests the success and failure cases, since they both use - // the same code paths in the LLAres responder. - ResponseCallback response; - std::string pumpname("trigger"); - // Since we're asking LLEventPumps to obtain() the pump by the desired - // name, it will persist beyond the current scope, so ensure we - // disconnect from it when 'response' goes away. - LLTempBoundListener temp( - LLEventPumps::instance().obtain(pumpname).listen("rewriteURIresponse", - boost::bind(&ResponseCallback::operator(), &response, _1))); - // Now build an LLSD request that will direct its response events to - // that pump. - const std::string testURI("login.bar.com"); - LLSD request; - request["op"] = "rewriteURI"; - request["uri"] = testURI; - request["reply"] = pumpname; - LLEventPumps::instance().obtain("LLAres").post(request); - ensure_equals(response.mURIs.size(), 1); - ensure_equals(response.mURIs.front(), testURI); - } - - template<> template<> - void object::test<2>() - { - set_test_name("bad op"); - WrapLLErrs capture; - LLSD request; - request["op"] = "foo"; - std::string threw = capture.catch_llerrs([&request](){ - LLEventPumps::instance().obtain("LLAres").post(request); - }); - ensure_contains("LLAresListener bad op", threw, "bad"); - } - - template<> template<> - void object::test<3>() - { - set_test_name("bad rewriteURI request"); - WrapLLErrs capture; - LLSD request; - request["op"] = "rewriteURI"; - std::string threw = capture.catch_llerrs([&request](){ - LLEventPumps::instance().obtain("LLAres").post(request); - }); - ensure_contains("LLAresListener bad req", threw, "missing"); - ensure_contains("LLAresListener bad req", threw, "reply"); - ensure_contains("LLAresListener bad req", threw, "uri"); - } - - template<> template<> - void object::test<4>() - { - set_test_name("bad rewriteURI request"); - WrapLLErrs capture; - LLSD request; - request["op"] = "rewriteURI"; - request["reply"] = "nonexistent"; - std::string threw = capture.catch_llerrs([&request](){ - LLEventPumps::instance().obtain("LLAres").post(request); - }); - ensure_contains("LLAresListener bad req", threw, "missing"); - ensure_contains("LLAresListener bad req", threw, "uri"); - ensure_does_not_contain("LLAresListener bad req", threw, "reply"); - } - - template<> template<> - void object::test<5>() - { - set_test_name("bad rewriteURI request"); - WrapLLErrs capture; - LLSD request; - request["op"] = "rewriteURI"; - request["uri"] = "foo.bar.com"; - std::string threw = capture.catch_llerrs([&request](){ - LLEventPumps::instance().obtain("LLAres").post(request); - }); - ensure_contains("LLAresListener bad req", threw, "missing"); - ensure_contains("LLAresListener bad req", threw, "reply"); - ensure_does_not_contain("LLAresListener bad req", threw, "uri"); - } -} diff --git a/indra/llmessage/tests/llcoproceduremanager_test.cpp b/indra/llmessage/tests/llcoproceduremanager_test.cpp index 4caae5f082..0a77fd218b 100644 --- a/indra/llmessage/tests/llcoproceduremanager_test.cpp +++ b/indra/llmessage/tests/llcoproceduremanager_test.cpp @@ -48,7 +48,7 @@ #pragma warning(disable: 4702) #endif -LLCoreHttpUtil::HttpCoroutineAdapter::HttpCoroutineAdapter(std::string const&, unsigned int) +LLCoreHttpUtil::HttpCoroutineAdapter::HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId) { } diff --git a/indra/llphysicsextensionsos/llconvexdecompositionvhacd.cpp b/indra/llphysicsextensionsos/llconvexdecompositionvhacd.cpp index 78876f9f36..b7c4b5e591 100644 --- a/indra/llphysicsextensionsos/llconvexdecompositionvhacd.cpp +++ b/indra/llphysicsextensionsos/llconvexdecompositionvhacd.cpp @@ -75,10 +75,7 @@ LLCDResult LLConvexDecompositionVHACD::quitSystem() LLConvexDecompositionVHACD::LLConvexDecompositionVHACD() { - //Create our vhacd instance and setup default parameters - mVHACD = VHACD::CreateVHACD(); - - mVHACDParameters.m_callback = &mVHACDCallback; + // Setup default parameters mVHACDParameters.m_logger = &mVHACDLogger; mDecompStages[0].mName = "Analyze"; @@ -206,27 +203,33 @@ LLConvexDecompositionVHACD::LLConvexDecompositionVHACD() LLConvexDecompositionVHACD::~LLConvexDecompositionVHACD() { - mBoundDecomp = nullptr; - mDecompData.clear(); - - mVHACD->Release(); + { + LLMutexLock lock(&mDecompDataMutex); + mBoundDecompID = INVALID_DECOMP_ID; + mDecompData.clear(); + } } void LLConvexDecompositionVHACD::genDecomposition(int& decomp) { - int new_decomp_id = static_cast<int>(mDecompData.size()) + 1; - mDecompData[new_decomp_id] = LLDecompData(); - decomp = new_decomp_id; + LLMutexLock lock(&mDecompDataMutex); + + mDecompData[mNextDecompID] = std::make_shared<LLDecompData>(); + decomp = mNextDecompID; + + ++mNextDecompID; // Increment decomposition ID. Never reuse to protect downstream consumers from misuse } void LLConvexDecompositionVHACD::deleteDecomposition(int decomp) { + LLMutexLock lock(&mDecompDataMutex); + auto iter = mDecompData.find(decomp); if (iter != mDecompData.end()) { - if (mBoundDecomp == &iter->second) + if (mBoundDecompID == decomp) { - mBoundDecomp = nullptr; + mBoundDecompID = INVALID_DECOMP_ID; } mDecompData.erase(iter); } @@ -234,29 +237,48 @@ void LLConvexDecompositionVHACD::deleteDecomposition(int decomp) void LLConvexDecompositionVHACD::bindDecomposition(int decomp) { - auto iter = mDecompData.find(decomp); - if (iter != mDecompData.end()) + LLMutexLock lock(&mDecompDataMutex); + + if (mDecompData.contains(decomp)) { - mBoundDecomp = &iter->second; + mBoundDecompID = decomp; } else { LL_WARNS() << "Failed to bind unknown decomposition: " << decomp << LL_ENDL; - mBoundDecomp = nullptr; + mBoundDecompID = INVALID_DECOMP_ID; } } +LLConvexDecompositionVHACD::data_ptr_t LLConvexDecompositionVHACD::getBoundDecomp() +{ + data_ptr_t bound_decomp; + { + LLMutexLock lock(&mDecompDataMutex); + auto it = mDecompData.find(mBoundDecompID); + if (it != mDecompData.end()) + { + bound_decomp = it->second; // Take a copy of the shared_ptr to avoid potential deletion + } + } + return bound_decomp; +} + LLCDResult LLConvexDecompositionVHACD::setParam(const char* name, float val) { - if (name == std::string("Num Hulls")) + LLMutexLock lock(&mParamsMutex); + + using namespace std::literals; + + if (name == "Num Hulls"sv) { mVHACDParameters.m_maxConvexHulls = llclamp(ll_round(val), 1, MAX_HULLS); } - else if (name == std::string("Num Vertices")) + else if (name == "Num Vertices"sv) { mVHACDParameters.m_maxNumVerticesPerCH = llclamp(ll_round(val), 3, MAX_VERTICES_PER_HULL); } - else if (name == std::string("Error Tolerance")) + else if (name == "Error Tolerance"sv) { mVHACDParameters.m_minimumVolumePercentErrorAllowed = val; } @@ -270,11 +292,15 @@ LLCDResult LLConvexDecompositionVHACD::setParam(const char* name, bool val) LLCDResult LLConvexDecompositionVHACD::setParam(const char* name, int val) { - if (name == std::string("Fill Mode")) + LLMutexLock lock(&mParamsMutex); + + using namespace std::literals; + + if (name == "Fill Mode"sv) { mVHACDParameters.m_fillMode = (VHACD::FillMode)val; } - else if (name == std::string("Voxel Resolution")) + else if (name == "Voxel Resolution"sv) { mVHACDParameters.m_resolution = val; } @@ -283,19 +309,21 @@ LLCDResult LLConvexDecompositionVHACD::setParam(const char* name, int val) LLCDResult LLConvexDecompositionVHACD::setMeshData( const LLCDMeshData* data, bool vertex_based ) { - if (!mBoundDecomp) + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp) { return LLCD_NULL_PTR; } - return mBoundDecomp->mSourceMesh.from(data, vertex_based); + return bound_decomp->mSourceMesh.from(data, vertex_based); } LLCDResult LLConvexDecompositionVHACD::registerCallback(int stage, llcdCallbackFunc callback ) { if (stage == 0) { - mVHACDCallback.setCallbackFunc(callback); + LLMutexLock lock(&mParamsMutex); + mCurrentCallbackFunc = callback; return LLCD_OK; } else @@ -306,44 +334,68 @@ LLCDResult LLConvexDecompositionVHACD::registerCallback(int stage, llcdCallbackF LLCDResult LLConvexDecompositionVHACD::executeStage(int stage) { - if (!mBoundDecomp) + if (stage != 0) + { + return LLCD_INVALID_STAGE; + } + + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp) { return LLCD_NULL_PTR; } - if (stage != 0) + bound_decomp->mDecomposedHulls.clear(); + + const auto& decomp_mesh = bound_decomp->mSourceMesh; + + VHACDCallback callbacks; + VHACD::IVHACD::Parameters current_params; { - return LLCD_INVALID_STAGE; + LLMutexLock lock(&mParamsMutex); + + current_params = mVHACDParameters; + callbacks.setCallbackFunc(mCurrentCallbackFunc); + } + current_params.m_callback = &callbacks; + + auto vhacd_impl = VHACD::CreateVHACD(); + if (!vhacd_impl) + { + LL_WARNS() << "Failed to create VHACD instance" << LL_ENDL; + return LLCD_NULL_PTR; } - mBoundDecomp->mDecomposedHulls.clear(); - const auto& decomp_mesh = mBoundDecomp->mSourceMesh; - if (!mVHACD->Compute((const double* const)decomp_mesh.mVertices.data(), static_cast<uint32_t>(decomp_mesh.mVertices.size()), (const uint32_t* const)decomp_mesh.mIndices.data(), static_cast<uint32_t>(decomp_mesh.mIndices.size()), mVHACDParameters)) + if (!vhacd_impl->Compute((const double*)decomp_mesh.mVertices.data(), static_cast<uint32_t>(decomp_mesh.mVertices.size()), + (const uint32_t*)decomp_mesh.mIndices.data(), static_cast<uint32_t>(decomp_mesh.mIndices.size()), + current_params)) { + vhacd_impl->Release(); return LLCD_INVALID_HULL_DATA; } - uint32_t num_nulls = mVHACD->GetNConvexHulls(); - if (num_nulls == 0) + uint32_t num_convex_hulls = vhacd_impl->GetNConvexHulls(); + if (num_convex_hulls == 0) { + vhacd_impl->Release(); return LLCD_INVALID_HULL_DATA; } - for (uint32_t i = 0; num_nulls > i; ++i) + for (uint32_t i = 0; num_convex_hulls > i; ++i) { VHACD::IVHACD::ConvexHull ch; - if (!mVHACD->GetConvexHull(i, ch)) + if (!vhacd_impl->GetConvexHull(i, ch)) continue; LLConvexMesh out_mesh; out_mesh.setVertices(ch.m_points); out_mesh.setIndices(ch.m_triangles); - mBoundDecomp->mDecomposedHulls.push_back(std::move(out_mesh)); + bound_decomp->mDecomposedHulls.push_back(std::move(out_mesh)); } - mVHACD->Clean(); + vhacd_impl->Release(); return LLCD_OK; } @@ -351,19 +403,21 @@ LLCDResult LLConvexDecompositionVHACD::executeStage(int stage) LLCDResult LLConvexDecompositionVHACD::buildSingleHull() { LL_INFOS() << "Building single hull mesh" << LL_ENDL; - if (!mBoundDecomp || mBoundDecomp->mSourceMesh.mVertices.empty()) + + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp || bound_decomp->mSourceMesh.mVertices.empty()) { return LLCD_NULL_PTR; } - mBoundDecomp->mSingleHullMesh.clear(); + bound_decomp->mSingleHullMesh.clear(); VHACD::QuickHull quickhull; - uint32_t num_tris = quickhull.ComputeConvexHull(mBoundDecomp->mSourceMesh.mVertices, MAX_VERTICES_PER_HULL); + uint32_t num_tris = quickhull.ComputeConvexHull(bound_decomp->mSourceMesh.mVertices, MAX_VERTICES_PER_HULL); if (num_tris > 0) { - mBoundDecomp->mSingleHullMesh.setVertices(quickhull.GetVertices()); - mBoundDecomp->mSingleHullMesh.setIndices(quickhull.GetIndices()); + bound_decomp->mSingleHullMesh.setVertices(quickhull.GetVertices()); + bound_decomp->mSingleHullMesh.setIndices(quickhull.GetIndices()); return LLCD_OK; } @@ -373,29 +427,31 @@ LLCDResult LLConvexDecompositionVHACD::buildSingleHull() int LLConvexDecompositionVHACD::getNumHullsFromStage(int stage) { - if (!mBoundDecomp || stage != 0) + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp || stage != 0) { return 0; } - return narrow(mBoundDecomp->mDecomposedHulls.size()); + return narrow(bound_decomp->mDecomposedHulls.size()); } LLCDResult LLConvexDecompositionVHACD::getSingleHull( LLCDHull* hullOut ) { memset( hullOut, 0, sizeof(LLCDHull) ); - if (!mBoundDecomp) + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp) { return LLCD_NULL_PTR; } - if (mBoundDecomp->mSingleHullMesh.vertices.empty()) + if (bound_decomp->mSingleHullMesh.vertices.empty()) { return LLCD_INVALID_HULL_DATA; } - mBoundDecomp->mSingleHullMesh.to(hullOut); + bound_decomp->mSingleHullMesh.to(hullOut); return LLCD_OK; } @@ -403,7 +459,8 @@ LLCDResult LLConvexDecompositionVHACD::getHullFromStage( int stage, int hull, LL { memset( hullOut, 0, sizeof(LLCDHull) ); - if (!mBoundDecomp) + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp) { return LLCD_NULL_PTR; } @@ -413,19 +470,21 @@ LLCDResult LLConvexDecompositionVHACD::getHullFromStage( int stage, int hull, LL return LLCD_INVALID_STAGE; } - if (mBoundDecomp->mDecomposedHulls.empty() || mBoundDecomp->mDecomposedHulls.size() <= hull) + if (bound_decomp->mDecomposedHulls.empty() || S32(bound_decomp->mDecomposedHulls.size()) <= hull) { return LLCD_REQUEST_OUT_OF_RANGE; } - mBoundDecomp->mDecomposedHulls[hull].to(hullOut); + bound_decomp->mDecomposedHulls[hull].to(hullOut); return LLCD_OK; } LLCDResult LLConvexDecompositionVHACD::getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut ) { memset( meshDataOut, 0, sizeof(LLCDMeshData)); - if (!mBoundDecomp) + + data_ptr_t bound_decomp = getBoundDecomp(); + if (!bound_decomp) { return LLCD_NULL_PTR; } @@ -435,12 +494,12 @@ LLCDResult LLConvexDecompositionVHACD::getMeshFromStage( int stage, int hull, LL return LLCD_INVALID_STAGE; } - if (mBoundDecomp->mDecomposedHulls.empty() || mBoundDecomp->mDecomposedHulls.size() <= hull) + if (bound_decomp->mDecomposedHulls.empty() || S32(bound_decomp->mDecomposedHulls.size()) <= hull) { return LLCD_REQUEST_OUT_OF_RANGE; } - mBoundDecomp->mDecomposedHulls[hull].to(meshDataOut); + bound_decomp->mDecomposedHulls[hull].to(meshDataOut); return LLCD_OK; } diff --git a/indra/llphysicsextensionsos/llconvexdecompositionvhacd.h b/indra/llphysicsextensionsos/llconvexdecompositionvhacd.h index 675356629c..27c867704e 100644 --- a/indra/llphysicsextensionsos/llconvexdecompositionvhacd.h +++ b/indra/llphysicsextensionsos/llconvexdecompositionvhacd.h @@ -31,6 +31,7 @@ #include "llconvexdecomposition.h" #include "llsingleton.h" #include "llmath.h" +#include "llmutex.h" #include <vector> @@ -323,14 +324,25 @@ private: std::vector<LLConvexMesh> mDecomposedHulls; }; - std::unordered_map<int, LLDecompData> mDecompData; + using data_ptr_t = std::shared_ptr<LLDecompData>; - LLDecompData* mBoundDecomp = nullptr; + data_ptr_t getBoundDecomp(); + + // MUST lock before accessing mDecompData mBoundDecompID or mNextDecompID + LLMutex mDecompDataMutex; + + static constexpr int INVALID_DECOMP_ID = -1; + + int mBoundDecompID = INVALID_DECOMP_ID; + int mNextDecompID = 0; // Only for use inside genDecomposition. + + std::unordered_map<int, data_ptr_t> mDecompData; - VHACD::IVHACD* mVHACD = nullptr; - VHACDCallback mVHACDCallback; VHACDLogger mVHACDLogger; + + LLMutex mParamsMutex; VHACD::IVHACD::Parameters mVHACDParameters; + llcdCallbackFunc mCurrentCallbackFunc; LLConvexMesh mMeshFromHullData; LLConvexMesh mSingleHullMeshFromMeshData; diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 53a338b3d6..34f1b83b6d 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -1658,3 +1658,15 @@ void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history) LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL; } + +void LLPluginClassMedia::forceRenderRefresh() +{ + // Force layout recalculation by briefly hiding/showing the web content + // Used to clear black screen issues after resize, see #5607 + const std::string refresh_script = + "document.documentElement.style.visibility='hidden';" + "document.documentElement.offsetHeight;" + "document.documentElement.style.visibility='';"; + + executeJavaScript(refresh_script); +} diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 6c512003cc..91901719d3 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -356,6 +356,8 @@ public: std::shared_ptr<LLPluginClassMedia> getSharedPtr() { return std::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this + void forceRenderRefresh(); + protected: LLPluginClassMediaOwner *mOwner; diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 334f1411af..ea604ca8d7 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -30,7 +30,6 @@ #define LL_LLPLUGINPROCESSPARENT_H #include <queue> -#include <boost/enable_shared_from_this.hpp> #include "llapr.h" #include "llprocess.h" diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp index 930222e3db..764ab222ad 100644 --- a/indra/llprimitive/llgltfmaterial.cpp +++ b/indra/llprimitive/llgltfmaterial.cpp @@ -214,7 +214,7 @@ std::string LLGLTFMaterial::asJSON(bool prettyprint) const // to WriteGltfSceneToStream in the viewer. gltf.WriteGltfSceneToStream(&model_out, str, prettyprint, false); - return str.str(); + return std::move(str).str(); } void LLGLTFMaterial::setFromModel(const tinygltf::Model& model, S32 mat_index) @@ -924,6 +924,34 @@ void LLGLTFMaterial::updateTextureTracking() // for material overrides editor will set it } +// Test cases: +// Case 1. +// Input: scale 1.0,1.0; Offset horizontal 0.0, Offset vertical 0.0 Rotation 0.349066; +// Expected output: scale 1.0,1.0; Offset horizontal 0.201, Offset vertical -0.141 Rotation -0.349066; +// Case 2. +// Input: scale 1.0,1.0; Offset horizontal 0.5, Offset vertical 0.1 Rotation 0; +// Expected output: scale 1.0,1.0; Offset horizontal 0.5, Offset vertical -0.1 Rotation -0; +// Case 3. +// Input: scale 1.0,1.0; Offset horizontal 0.1, Offset vertical 0.2 Rotation 0.349066; +// Expected output: scale 1.0,1.0; Offset horizontal 0.295, Offset vertical -0.345 Rotation -0.349066; +// Case 4. +// Input: scale 1.0,1.0; Offset horizontal 0.5, Offset vertical 0.0 Rotation 0.349066; +// Expected output: scale 1.0,1.0; Offset horizontal 0.701, Offset vertical -0.141 Rotation -0.349066; +// Case 5. +// Input: scale 10.0,15.0; Offset horizontal 0.0, Offset vertical 0.0 Rotation -1.57079637 +// Expected output: scale 15.0,10.0; Offset horizontal 7.5, Offset vertical -4.0 Rotation 1.57079637; +// Case 6. +// Input: scale 10.0,15.0; Offset horizontal 0.0, Offset vertical 0.0 Rotation 0 +// Expected output: scale 10.0,15.0; Offset horizontal 0.5, Offset vertical .0 Rotation 0; +// Case 7. +// Input: scale 10.0,15.0; Offset horizontal 0.0, Offset vertical 0.0 Rotation -0.785398163 +// Expected output: scale 12.74,12.74; Offset horizontal 0.5, Offset vertical .0 Rotation 0.785398163; +// +// Legacy offsets are right to left and top to bottom. +// PBR offsets are right to left and bottom to top. +// +// Legacy rotation is relative to face's center counter clockwise, +// PBR rotation is relative to top-left corner, clockwise void LLGLTFMaterial::convertTextureTransformToPBR( F32 tex_scale_s, F32 tex_scale_t, @@ -934,23 +962,108 @@ void LLGLTFMaterial::convertTextureTransformToPBR( LLVector2& pbr_offset, F32& pbr_rotation) { - pbr_scale.set(tex_scale_s, tex_scale_t); - pbr_rotation = -(tex_rotation) / 2.f; - const F32 adjusted_offset_s = tex_offset_s; - const F32 adjusted_offset_t = -tex_offset_t; - F32 center_adjust_s = 0.5f * (1.0f - tex_scale_s); - F32 center_adjust_t = 0.5f * (1.0f - tex_scale_t); + // Legacy is counter-clockwise, PBR is clockwise + pbr_rotation = -tex_rotation; - if (pbr_rotation != 0.0f) + // Center of the tile + const F32 center_s = 0.5f; + const F32 center_t = 0.5f; + + // Calculate the rotated scale + F32 cos_rot = cosf(tex_rotation); + F32 sin_rot = sinf(tex_rotation); + F32 cos_sq = cos_rot * cos_rot; + F32 sin_sq = sin_rot * sin_rot; + + // GLTF scale doesn't match legacy scaling when rotation is applied. + // Legacy applies scale then rotation, which allows for planar aligment + // withoutn deformations, but gltf rotates first, so when scale gets + // aplied image gets deformed by rotation. + // It appears to be imposible to properly match legacy scale, so this + // is an approximation that at least matches at 0, 90, 180, 270 degree + // rotations, and is close enough at angles like 45. + pbr_scale.mV[VX] = tex_scale_s * cos_sq + tex_scale_t * sin_sq; + pbr_scale.mV[VY] = tex_scale_s * sin_sq + tex_scale_t * cos_sq; + + // Center adjustment for scale + F32 center_adjust_s = 0.5f * (1.0f - pbr_scale.mV[VX]); + F32 center_adjust_t = 0.5f * (1.0f - pbr_scale.mV[VY]); + + // 2. Offset from center + F32 pos_s = center_adjust_s - center_s; + F32 pos_t = center_adjust_t - center_t; + + // 3. Rotate around center (clockwise, as per GLTF spec) + F32 c = cosf(pbr_rotation); + F32 s = sinf(pbr_rotation); + F32 rot_s = pos_s * c + pos_t * s; + F32 rot_t = -pos_s * s + pos_t * c; + + // 4. Move back to top-left and apply offset + pbr_offset.set(rot_s + center_s + tex_offset_s, rot_t + center_t - tex_offset_t); +} + +// Convert PBR transform values back to legacy TE transform values. +// This is the reverse of convertTextureTransformToPBR. +void LLGLTFMaterial::convertPBRTransformToTexture( + const LLVector2& pbr_scale, + const LLVector2& pbr_offset, + F32 pbr_rotation, + F32& tex_scale_s, + F32& tex_scale_t, + F32& tex_offset_s, + F32& tex_offset_t, + F32& tex_rotation) +{ + tex_rotation = -pbr_rotation; + + // Reverse the scale transformation + // From: pbr_s = tex_s * cos² + tex_t * sin² + // pbr_t = tex_s * sin² + tex_t * cos² + // Solve for tex_s and tex_t + F32 cos_rot = cosf(tex_rotation); + F32 sin_rot = sinf(tex_rotation); + F32 cos_sq = cos_rot * cos_rot; + F32 sin_sq = sin_rot * sin_rot; + + F32 denom = cos_sq * cos_sq - sin_sq * sin_sq; + + if (fabsf(denom) < 0.0001f) // Near 45 degrees (cos²≈sin²≈0.5) + { + // At 45°: both scales contribute equally + // pbr_s = pbr_t = (tex_s + tex_t) / 2 + // So: tex_s + tex_t = 2 * pbr_avg + // Use the average and assume symmetric scaling + tex_scale_s = tex_scale_t = (pbr_scale.mV[VX] + pbr_scale.mV[VY]) / 2.f; + } + else { - const F32 c = cosf(pbr_rotation); - const F32 s = sinf(pbr_rotation); - const F32 tmp_s = center_adjust_s * c - center_adjust_t * s; - const F32 tmp_t = center_adjust_s * s + center_adjust_t * c; - center_adjust_s = tmp_s; - center_adjust_t = tmp_t; + // Solve the 2x2 system: + // pbr_s * cos² - pbr_t * sin² = tex_s * (cos⁴ - sin⁴) + // pbr_t * cos² - pbr_s * sin² = tex_t * (cos⁴ - sin⁴) + tex_scale_s = (pbr_scale.mV[VX] * cos_sq - pbr_scale.mV[VY] * sin_sq) / denom; + tex_scale_t = (pbr_scale.mV[VY] * cos_sq - pbr_scale.mV[VX] * sin_sq) / denom; } - pbr_offset.set(adjusted_offset_s + center_adjust_s, - adjusted_offset_t + center_adjust_t); + // Center of the tile + const F32 center_s = 0.5f; + const F32 center_t = 0.5f; + + // Center adjustment for scale + F32 center_adjust_s = 0.5f * (1.0f - pbr_scale.mV[VX]); + F32 center_adjust_t = 0.5f * (1.0f - pbr_scale.mV[VY]); + + // 2. Offset from center + F32 pos_s = center_adjust_s - center_s; + F32 pos_t = center_adjust_t - center_t; + + // 3. Rotate around center (clockwise, as per GLTF spec) + F32 c = cosf(pbr_rotation); + F32 s = sinf(pbr_rotation); + F32 rot_s = pos_s * c + pos_t * s; + F32 rot_t = -pos_s * s + pos_t * c; + + // 3. Recover legacy offset + tex_offset_s = pbr_offset.mV[0] - rot_s - center_s; + tex_offset_t = -(pbr_offset.mV[1] - rot_t - center_t); } diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index 6bb021254b..64b585aacf 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -223,6 +223,14 @@ public: LLVector2& pbr_scale, LLVector2& pbr_offset, F32& pbr_rotation); + + // Convert PBR transform values to legacy TE transform values. + static void convertPBRTransformToTexture(const LLVector2& pbr_scale, + const LLVector2& pbr_offset, + F32 pbr_rotation, + F32& tex_scale_s, F32& tex_scale_t, + F32& tex_offset_s, F32& tex_offset_t, + F32& tex_rotation); protected: static LLVector2 vec2FromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const LLVector2& default_value); static F32 floatFromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const F32 default_value); diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h index bd6256d961..41dd5a8710 100644 --- a/indra/llprimitive/llmaterialid.h +++ b/indra/llprimitive/llmaterialid.h @@ -67,15 +67,11 @@ public: static const LLMaterialID null; - // Returns a 64 bits digest of the material Id, by XORing its two 64 bits - // long words. HB - inline U64 getDigest64() const - { - U64* tmp = (U64*)mID; - return tmp[0] ^ tmp[1]; - } - private: + // definitions follow class + friend std::hash<LLMaterialID>; + friend size_t hash_value(const LLMaterialID&) noexcept; + void parseFromBinary(const LLSD::Binary& pMaterialID); void copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID); int compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const; @@ -90,15 +86,27 @@ namespace std { inline size_t operator()(const LLMaterialID& id) const noexcept { - return (size_t)id.getDigest64(); + size_t h = 0; + // Golden ratio hash with avalanche mixing + // Process 8 bytes at a time by manually constructing 64-bit values + // Shift by 31: mixes upper half into lower half for better bit distribution + // Shift by 47: ensures highest bits influence final hash output + for (int i = 0; i < MATERIAL_ID_SIZE; i += 8) { + size_t chunk = (size_t)id.mID[i] | ((size_t)id.mID[i + 1] << 8) | + ((size_t)id.mID[i+2] << 16) | ((size_t)id.mID[i+3] << 24) | + ((size_t)id.mID[i+4] << 32) | ((size_t)id.mID[i+5] << 40) | + ((size_t)id.mID[i + 6] << 48) | ((size_t)id.mID[i + 7] << 56); + h ^= (chunk * 0x9e3779b97f4a7c15ULL) ^ (h >> 31) ^ (h >> 47); + } + return h; } }; } -// For use with boost containers. +// For use with boost::container_hash inline size_t hash_value(const LLMaterialID& id) noexcept { - return (size_t)id.getDigest64(); + return std::hash<LLMaterialID>{}(id); } #endif // LL_LLMATERIALID_H diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp index b5b17c53aa..48c6ba1fa5 100644 --- a/indra/llprimitive/llmediaentry.cpp +++ b/indra/llprimitive/llmediaentry.cpp @@ -74,7 +74,7 @@ const char* LLMediaEntry::WHITELIST_KEY = MEDIA_WHITELIST_KEY_STR; const char* LLMediaEntry::PERMS_INTERACT_KEY = MEDIA_PERMS_INTERACT_KEY_STR; const char* LLMediaEntry::PERMS_CONTROL_KEY = MEDIA_PERMS_CONTROL_KEY_STR; -#define DEFAULT_URL_PREFIX "http://" +#define DEFAULT_URL_PREFIX "https://" // Constructor(s) LLMediaEntry::LLMediaEntry() : diff --git a/indra/llprimitive/llmodelloader.h b/indra/llprimitive/llmodelloader.h index 335d809386..8acc75b1be 100644 --- a/indra/llprimitive/llmodelloader.h +++ b/indra/llprimitive/llmodelloader.h @@ -29,7 +29,7 @@ #include "llmodel.h" #include "llthread.h" -#include <boost/function.hpp> +#include <functional> #include <list> class LLJoint; @@ -57,25 +57,25 @@ public: // Callback with loaded model data and loaded LoD // - typedef boost::function<void (scene&, model_list&, S32, void*)> load_callback_t; + typedef std::function<void (scene&, model_list&, S32, void*)> load_callback_t; // Function to provide joint lookup by name // (within preview avi skeleton, for example) // - typedef boost::function<LLJoint* (const std::string&, void*)> joint_lookup_func_t; + typedef std::function<LLJoint* (const std::string&, void*)> joint_lookup_func_t; // Func to load and associate material with all it's textures, // returned value is the number of textures loaded // intentionally non-const so func can modify material to // store platform-specific data // - typedef boost::function<U32 (LLImportMaterial&, void*)> texture_load_func_t; + typedef std::function<U32 (LLImportMaterial&, void*)> texture_load_func_t; // Callback to inform client of state changes // during loading process (errors will be reported // as state changes here as well) // - typedef boost::function<void (U32, void*)> state_callback_t; + typedef std::function<void (U32, void*)> state_callback_t; typedef enum { diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 31bc76344c..c3e3e19ee9 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -109,11 +109,12 @@ public: PARAMS_EXTENDED_MESH = 0x70, PARAMS_RENDER_MATERIAL = 0x80, PARAMS_REFLECTION_PROBE = 0x90, + PARAMS_MAX = PARAMS_REFLECTION_PROBE, }; public: U16 mType; - virtual ~LLNetworkData() {}; + virtual ~LLNetworkData() = default; virtual bool pack(LLDataPacker &dp) const = 0; virtual bool unpack(LLDataPacker &dp) = 0; virtual bool operator==(const LLNetworkData& data) const = 0; @@ -319,7 +320,7 @@ public: bool fromLLSD(LLSD& sd); void setSculptTexture(const LLUUID& texture_id, U8 sculpt_type); - LLUUID getSculptTexture() const { return mSculptTexture; } + const LLUUID& getSculptTexture() const { return mSculptTexture; } U8 getSculptType() const { return mSculptType; } }; @@ -340,10 +341,10 @@ public: bool fromLLSD(LLSD& sd); void setLightTexture(const LLUUID& id) { mLightTexture = id; } - LLUUID getLightTexture() const { return mLightTexture; } + const LLUUID& getLightTexture() const { return mLightTexture; } bool isLightSpotlight() const { return mLightTexture.notNull(); } void setParams(const LLVector3& params) { mParams = params; } - LLVector3 getParams() const { return mParams; } + const LLVector3& getParams() const { return mParams; } }; diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index d48b508ddc..6de5685517 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -10,7 +10,6 @@ include(LLImage) include(LLWindow) set(llrender_SOURCE_FILES - llatmosphere.cpp llcubemap.cpp llcubemaparray.cpp llfontbitmapcache.cpp @@ -40,7 +39,6 @@ set(llrender_SOURCE_FILES set(llrender_HEADER_FILES CMakeLists.txt - llatmosphere.h llcubemap.h llcubemaparray.h llfontgl.h diff --git a/indra/llrender/llatmosphere.cpp b/indra/llrender/llatmosphere.cpp deleted file mode 100644 index eae5623a3c..0000000000 --- a/indra/llrender/llatmosphere.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/** - * @file llatmosphere.cpp - * @brief LLAtmosphere integration impl - * - * $LicenseInfo:firstyear=2018&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 "linden_common.h" - -#include "llatmosphere.h" -#include "llfasttimer.h" -#include "llsys.h" -#include "llglheaders.h" -#include "llrender.h" -#include "llshadermgr.h" -#include "llglslshader.h" - -LLAtmosphere* gAtmosphere = nullptr; - -// Values from "Reference Solar Spectral Irradiance: ASTM G-173", ETR column -// (see http://rredc.nrel.gov/solar/spectra/am1.5/ASTMG173/ASTMG173.html), -// summed and averaged in each bin (e.g. the value for 360nm is the average -// of the ASTM G-173 values for all wavelengths between 360 and 370nm). -// Values in W.m^-2. -const int kLambdaMin = 360; -const int kLambdaMax = 830; -const double kSolarIrradiance[48] = { - 1.11776, 1.14259, 1.01249, 1.14716, 1.72765, 1.73054, 1.6887, 1.61253, - 1.91198, 2.03474, 2.02042, 2.02212, 1.93377, 1.95809, 1.91686, 1.8298, - 1.8685, 1.8931, 1.85149, 1.8504, 1.8341, 1.8345, 1.8147, 1.78158, 1.7533, - 1.6965, 1.68194, 1.64654, 1.6048, 1.52143, 1.55622, 1.5113, 1.474, 1.4482, - 1.41018, 1.36775, 1.34188, 1.31429, 1.28303, 1.26758, 1.2367, 1.2082, - 1.18737, 1.14683, 1.12362, 1.1058, 1.07124, 1.04992 -}; - -// Values from http://www.iup.uni-bremen.de/gruppen/molspec/databases/ -// referencespectra/o3spectra2011/index.html for 233K, summed and averaged in -// each bin (e.g. the value for 360nm is the average of the original values -// for all wavelengths between 360 and 370nm). Values in m^2. -const double kOzoneCrossSection[48] = { - 1.18e-27, 2.182e-28, 2.818e-28, 6.636e-28, 1.527e-27, 2.763e-27, 5.52e-27, - 8.451e-27, 1.582e-26, 2.316e-26, 3.669e-26, 4.924e-26, 7.752e-26, 9.016e-26, - 1.48e-25, 1.602e-25, 2.139e-25, 2.755e-25, 3.091e-25, 3.5e-25, 4.266e-25, - 4.672e-25, 4.398e-25, 4.701e-25, 5.019e-25, 4.305e-25, 3.74e-25, 3.215e-25, - 2.662e-25, 2.238e-25, 1.852e-25, 1.473e-25, 1.209e-25, 9.423e-26, 7.455e-26, - 6.566e-26, 5.105e-26, 4.15e-26, 4.228e-26, 3.237e-26, 2.451e-26, 2.801e-26, - 2.534e-26, 1.624e-26, 1.465e-26, 2.078e-26, 1.383e-26, 7.105e-27 -}; - -// From https://en.wikipedia.org/wiki/Dobson_unit, in molecules.m^-2. -const double kDobsonUnit = 2.687e20; -// Maximum number density of ozone molecules, in m^-3 (computed so at to get -// 300 Dobson units of ozone - for this we divide 300 DU by the integral of -// the ozone density profile defined below, which is equal to 15km). -const double kMaxOzoneNumberDensity = 300.0 * kDobsonUnit / 15000.0; -const double kRayleigh = 1.24062e-6; -const double kRayleighScaleHeight = 8000.0; -const double kMieScaleHeight = 1200.0; -const double kMieAngstromAlpha = 0.0; -const double kMieAngstromBeta = 5.328e-3; -const double kMieSingleScatteringAlbedo = 0.9; -const double kGroundAlbedo = 0.1; - -AtmosphericModelSettings::AtmosphericModelSettings() - : m_skyBottomRadius(6360.0f) - , m_skyTopRadius(6420.0f) - , m_sunArcRadians(0.00045f) - , m_mieAnisotropy(0.8f) -{ - DensityLayer rayleigh_density(0.0, 1.0, -1.0 / kRayleighScaleHeight, 0.0, 0.0); - DensityLayer mie_density(0.0, 1.0, -1.0 / kMieScaleHeight, 0.0, 0.0); - - m_rayleighProfile.push_back(rayleigh_density); - m_mieProfile.push_back(mie_density); - - // Density profile increasing linearly from 0 to 1 between 10 and 25km, and - // decreasing linearly from 1 to 0 between 25 and 40km. This is an approximate - // profile from http://www.kln.ac.lk/science/Chemistry/Teaching_Resources/ - // Documents/Introduction%20to%20atmospheric%20chemistry.pdf (page 10). - m_absorptionProfile.push_back(DensityLayer(25000.0, 0.0, 0.0, 1.0 / 15000.0, -2.0 / 3.0)); - m_absorptionProfile.push_back(DensityLayer(0.0, 0.0, 0.0, -1.0 / 15000.0, 8.0 / 3.0)); -} - -AtmosphericModelSettings::AtmosphericModelSettings( - DensityProfile& rayleighProfile, - DensityProfile& mieProfile, - DensityProfile& absorptionProfile) -: m_skyBottomRadius(6360.0f) -, m_skyTopRadius(6420.0f) -, m_rayleighProfile(rayleighProfile) -, m_mieProfile(mieProfile) -, m_absorptionProfile(absorptionProfile) -, m_sunArcRadians(0.00045f) -, m_mieAnisotropy(0.8f) -{ -} - -AtmosphericModelSettings::AtmosphericModelSettings( - F32 skyBottomRadius, - F32 skyTopRadius, - DensityProfile& rayleighProfile, - DensityProfile& mieProfile, - DensityProfile& absorptionProfile, - F32 sunArcRadians, - F32 mieAniso) -: m_skyBottomRadius(skyBottomRadius) -, m_skyTopRadius(skyTopRadius) -, m_rayleighProfile(rayleighProfile) -, m_mieProfile(mieProfile) -, m_absorptionProfile(absorptionProfile) -, m_sunArcRadians(sunArcRadians) -, m_mieAnisotropy(mieAniso) -{ -} - -bool AtmosphericModelSettings::operator==(const AtmosphericModelSettings& rhs) const -{ - if (m_skyBottomRadius != rhs.m_skyBottomRadius) - { - return false; - } - - if (m_skyTopRadius != rhs.m_skyTopRadius) - { - return false; - } - - if (m_sunArcRadians != rhs.m_sunArcRadians) - { - return false; - } - - if (m_mieAnisotropy != rhs.m_mieAnisotropy) - { - return false; - } - - if (m_rayleighProfile != rhs.m_rayleighProfile) - { - return false; - } - - if (m_mieProfile != rhs.m_mieProfile) - { - return false; - } - - if (m_absorptionProfile != rhs.m_absorptionProfile) - { - return false; - } - - return true; -} - -void LLAtmosphere::initClass() -{ - if (!gAtmosphere) - { - gAtmosphere = new LLAtmosphere; - } -} - -void LLAtmosphere::cleanupClass() -{ - if(gAtmosphere) - { - delete gAtmosphere; - } - gAtmosphere = NULL; -} - -LLAtmosphere::LLAtmosphere() -{ - for (int l = kLambdaMin; l <= kLambdaMax; l += 10) - { - double lambda = static_cast<double>(l) * 1e-3; // micro-meters - double mie = kMieAngstromBeta / kMieScaleHeight * pow(lambda, -kMieAngstromAlpha); - m_wavelengths.push_back(l); - m_solar_irradiance.push_back(kSolarIrradiance[(l - kLambdaMin) / 10]); - m_rayleigh_scattering.push_back(kRayleigh * pow(lambda, -4)); - m_mie_scattering.push_back(mie * kMieSingleScatteringAlbedo); - m_mie_extinction.push_back(mie); - m_absorption_extinction.push_back(kMaxOzoneNumberDensity * kOzoneCrossSection[(l - kLambdaMin) / 10]); - m_ground_albedo.push_back(kGroundAlbedo); - } - - AtmosphericModelSettings defaults; - configureAtmosphericModel(defaults); -} - -LLAtmosphere::~LLAtmosphere() -{ - // Cease referencing textures from atmosphere::model from our LLGLTextures wrappers for same. - if (m_transmittance) - { - m_transmittance->setTexName(0); - } - - if (m_scattering) - { - m_scattering->setTexName(0); - } - - if (m_mie_scatter_texture) - { - m_mie_scatter_texture->setTexName(0); - } -} - -bool LLAtmosphere::configureAtmosphericModel(AtmosphericModelSettings& settings) -{ - // TBD - return true; -} - -LLGLTexture* LLAtmosphere::getTransmittance() -{ - if (!m_transmittance) - { - m_transmittance = new LLGLTexture; - m_transmittance->generateGLTexture(); - m_transmittance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); - m_transmittance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_transmittance->setExplicitFormat(GL_RGB32F, GL_RGB, GL_FLOAT); - m_transmittance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE); - } - return m_transmittance; -} - -LLGLTexture* LLAtmosphere::getScattering() -{ - if (!m_scattering) - { - m_scattering = new LLGLTexture; - m_scattering->generateGLTexture(); - m_scattering->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); - m_scattering->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_scattering->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT); - m_scattering->setTarget(GL_TEXTURE_3D, LLTexUnit::TT_TEXTURE_3D); - } - return m_scattering; -} - -LLGLTexture* LLAtmosphere::getMieScattering() -{ - if (!m_mie_scatter_texture) - { - m_mie_scatter_texture = new LLGLTexture; - m_mie_scatter_texture->generateGLTexture(); - m_mie_scatter_texture->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); - m_mie_scatter_texture->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_mie_scatter_texture->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT); - m_mie_scatter_texture->setTarget(GL_TEXTURE_3D, LLTexUnit::TT_TEXTURE_3D); - } - return m_mie_scatter_texture; -} - -LLGLTexture* LLAtmosphere::getIlluminance() -{ - if (!m_illuminance) - { - m_illuminance = new LLGLTexture; - m_illuminance->generateGLTexture(); - m_illuminance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); - m_illuminance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); - m_illuminance->setExplicitFormat(GL_RGB32F, GL_RGB, GL_FLOAT); - m_illuminance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE); - } - return m_illuminance; -} diff --git a/indra/llrender/llatmosphere.h b/indra/llrender/llatmosphere.h deleted file mode 100644 index 4b8c7d0819..0000000000 --- a/indra/llrender/llatmosphere.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - * @file llatmosphere.h - * @brief LLAtmosphere class - * - * $LicenseInfo:firstyear=2018&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_ATMOSPHERE_H -#define LL_ATMOSPHERE_H - -#include "llglheaders.h" -#include "llgltexture.h" - -// An atmosphere layer of width 'width' (in m), and whose density is defined as -// 'exp_term' * exp('exp_scale' * h) + 'linear_term' * h + 'constant_term', -// clamped to [0,1], and where h is the altitude (in m). 'exp_term' and -// 'constant_term' are unitless, while 'exp_scale' and 'linear_term' are in -// m^-1. -class DensityLayer { - public: - DensityLayer() - : width(0.0f) - , exp_term(0.0f) - , exp_scale(0.0f) - , linear_term(0.0f) - , constant_term(0.0f) - { - } - - DensityLayer(float width, float exp_term, float exp_scale, float linear_term, float constant_term) - : width(width) - , exp_term(exp_term) - , exp_scale(exp_scale) - , linear_term(linear_term) - , constant_term(constant_term) - { - } - - bool operator==(const DensityLayer& rhs) const - { - if (width != rhs.width) - { - return false; - } - - if (exp_term != rhs.exp_term) - { - return false; - } - - if (exp_scale != rhs.exp_scale) - { - return false; - } - - if (linear_term != rhs.linear_term) - { - return false; - } - - if (constant_term != rhs.constant_term) - { - return false; - } - - return true; - } - - float width = 1024.0f; - float exp_term = 1.0f; - float exp_scale = 1.0f; - float linear_term = 1.0f; - float constant_term = 0.0f; -}; - -typedef std::vector<DensityLayer> DensityProfile; - -class AtmosphericModelSettings -{ -public: - AtmosphericModelSettings(); - - AtmosphericModelSettings( - DensityProfile& rayleighProfile, - DensityProfile& mieProfile, - DensityProfile& absorptionProfile); - - AtmosphericModelSettings( - F32 skyBottomRadius, - F32 skyTopRadius, - DensityProfile& rayleighProfile, - DensityProfile& mieProfile, - DensityProfile& absorptionProfile, - F32 sunArcRadians, - F32 mieAniso); - - bool operator==(const AtmosphericModelSettings& rhs) const; - - F32 m_skyBottomRadius; - F32 m_skyTopRadius; - DensityProfile m_rayleighProfile; - DensityProfile m_mieProfile; - DensityProfile m_absorptionProfile; - F32 m_sunArcRadians; - F32 m_mieAnisotropy; -}; - -class LLAtmosphere -{ -public: - LLAtmosphere(); - ~LLAtmosphere(); - - static void initClass(); - static void cleanupClass(); - - const LLAtmosphere& operator=(const LLAtmosphere& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } - - LLGLTexture* getTransmittance(); - LLGLTexture* getScattering(); - LLGLTexture* getMieScattering(); - LLGLTexture* getIlluminance(); - - bool configureAtmosphericModel(AtmosphericModelSettings& settings); - -protected: - LLAtmosphere(const LLAtmosphere& rhs) - { - *this = rhs; - } - - LLPointer<LLGLTexture> m_transmittance; - LLPointer<LLGLTexture> m_scattering; - LLPointer<LLGLTexture> m_mie_scatter_texture; - LLPointer<LLGLTexture> m_illuminance; - - std::vector<double> m_wavelengths; - std::vector<double> m_solar_irradiance; - std::vector<double> m_rayleigh_scattering; - std::vector<double> m_mie_scattering; - std::vector<double> m_mie_extinction; - std::vector<double> m_absorption_extinction; - std::vector<double> m_ground_albedo; - - AtmosphericModelSettings m_settings; -}; - -extern LLAtmosphere* gAtmosphere; - -#endif // LL_ATMOSPHERE_H diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 9d6773ac5b..91898e6de1 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -39,6 +39,7 @@ // For some reason, this won't work if it's not wrapped in the ifdef #ifdef FT_FREETYPE_H #include FT_FREETYPE_H +#include FT_MULTIPLE_MASTERS_H #endif #include "lldir.h" @@ -118,6 +119,8 @@ LLFontGlyphInfo::LLFontGlyphInfo(U32 index, EFontGlyphType glyph_type) mYBitmapOffset(0), // Offset to the origin in the bitmap mXBearing(0), // Distance from baseline to left in pixels mYBearing(0), // Distance from baseline to top in pixels + mLsbDelta(0), + mRsbDelta(0), mBitmapEntry(std::make_pair(EFontGlyphType::Unspecified, -1)) // Which bitmap in the bitmap cache contains this glyph { } @@ -133,6 +136,8 @@ LLFontGlyphInfo::LLFontGlyphInfo(const LLFontGlyphInfo& fgi) , mYBitmapOffset(fgi.mYBitmapOffset) , mXBearing(fgi.mXBearing) , mYBearing(fgi.mYBearing) + , mLsbDelta(fgi.mLsbDelta) + , mRsbDelta(fgi.mRsbDelta) { mBitmapEntry = fgi.mBitmapEntry; } @@ -143,6 +148,7 @@ LLFontFreetype::LLFontFreetype() mDescender(0.f), mLineHeight(0.f), mIsFallback(false), + mHinting(EFontHinting::FORCE_AUTOHINT), mFTFace(nullptr), mRenderGlyphCount(0), mStyle(0), @@ -166,7 +172,7 @@ LLFontFreetype::~LLFontFreetype() // mFallbackFonts cleaned up by LLPointer destructor } -bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n) +bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) { // Don't leak face objects. This is also needed to deal with // changed font file names. @@ -190,6 +196,20 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v return false; mIsFallback = is_fallback; + mHinting = hinting; + mFontFlags = flags; + mWeight = weight; + + bool variable_font = false; + if (weight >= 0) + { + variable_font = setVariationAxis("wght", static_cast<F32>(weight)); + + // For Inter, also set optical size based on point size + // This makes text look better at different sizes + setVariationAxis("opsz", point_size); + } + F32 pixels_per_em = (point_size / 72.f)*vert_dpi; // Size in inches * dpi error = FT_Set_Char_Size(mFTFace, /* handle to face object */ @@ -245,6 +265,18 @@ bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v { mStyle |= LLFontGL::BOLD; } + else if (flags & LLFontGL::BOLD) + { + // FontGL applies programmatic bolding to fonts that are a part of 'bold' descriptor but don't have the bold style set. + // Ex: Inter SemiBold doesn't have FT_STYLE_FLAG_BOLD and without this style it would be bolded programmatically. + mStyle |= LLFontGL::BOLD; + } + else if (weight >= 600 && variable_font) + { + // If the font is heavy enough, consider it bold and avoid programmatic bolding + // even if it doesn't have the bold style set. + mStyle |= LLFontGL::BOLD; + } if(mFTFace->style_flags & FT_STYLE_FLAG_ITALIC) { @@ -343,16 +375,10 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const //llassert(!mIsFallback); LLFontGlyphInfo* left_glyph_info = getGlyphInfo(char_left, EFontGlyphType::Unspecified);; - U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0; // Kern this puppy. LLFontGlyphInfo* right_glyph_info = getGlyphInfo(char_right, EFontGlyphType::Unspecified); - U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0; - FT_Vector delta; - - llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); - - return delta.x*(1.f/64.f); + return getXKerning(left_glyph_info, right_glyph_info); } F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const @@ -365,9 +391,28 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL FT_Vector delta; - llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); + llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, FT_KERNING_UNFITTED, &delta)); - return delta.x*(1.f/64.f); + // Apply the FreeType auto-hinter's subpixel side-bearing correction between + // adjacent glyphs. When the hinter has shifted the right side of the left + // glyph or the left side of the right glyph, (rsb_delta - lsb_delta) is the + // sub-pixel nudge that keeps spacing visually even. + F32 delta_correction = 0.0f; + if (left_glyph_info && right_glyph_info) + { + // According to FreeType docs, these delta values should only trigger + // discrete ±1 pixel adjustments when they cross certain thresholds. + // Substructing delta_diff from delta.x doesn't work as well as treating + // it as a thresholds + S32 delta_diff = left_glyph_info->mRsbDelta - right_glyph_info->mLsbDelta; + if (delta_diff > 32) + delta_correction = -1.0f; + else if (delta_diff < -31) + delta_correction = 1.0f; + } + + // ft_kerning_unfitted mode always returns 26.6 fixed-point values + return (F32)(delta.x * (1.f / 64.f)) + delta_correction; } bool LLFontFreetype::hasGlyph(llwchar wch) const @@ -512,6 +557,11 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l gi->mHeight = height; gi->mXBearing = fontp->mFTFace->glyph->bitmap_left; gi->mYBearing = fontp->mFTFace->glyph->bitmap_top; + // FreeType fills these when the glyph has been auto-hinted; they describe how + // much the hinter nudged the left/right side bearings (in 26.6 pixels). Keep + // them so inter-glyph spacing can be corrected in getXKerning(). + gi->mLsbDelta = (S32)fontp->mFTFace->glyph->lsb_delta; + gi->mRsbDelta = (S32)fontp->mFTFace->glyph->rsb_delta; // Convert these from 26.6 units to float pixels. gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f; gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f; @@ -637,7 +687,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll if (mFTFace == nullptr) return; - FT_Int32 load_flags = FT_LOAD_FORCE_AUTOHINT; + FT_Int32 load_flags = (FT_Int32)mHinting; if (EFontGlyphType::Color == bitmap_type) { // We may not actually get a color render so our caller should always examine mFTFace->glyph->bitmap.pixel_mode @@ -680,7 +730,7 @@ void LLFontFreetype::renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, ll void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi) { resetBitmapCache(); - loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mIsFallback, 0); + loadFace(mName, mPointSize, vert_dpi ,horz_dpi, mWeight, mIsFallback, 0, mHinting, mFontFlags); if (!mIsFallback) { // This is the head of the list - need to rebuild ourself and all fallbacks. @@ -848,6 +898,73 @@ void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 } } +bool LLFontFreetype::setVariationAxis(const std::string& axis_tag, F32 value) +{ + if (!mFTFace) + return false; + + // Check if this is a variable font + FT_MM_Var* master = nullptr; + if (FT_Get_MM_Var(mFTFace, &master) != 0) + { + // Not a variable font - this is not an error, just silently skip + return false; + } + + // Find the axis by tag (e.g., "wght" for weight) + FT_UInt axis_index = 0; + bool found = false; + for (FT_UInt i = 0; i < master->num_axis; i++) + { + // Compare the 4-byte tag + if (master->axis[i].tag == FT_MAKE_TAG(axis_tag[0], axis_tag[1], axis_tag[2], axis_tag[3])) + { + axis_index = i; + found = true; + + // Clamp value to valid range for this axis + F32 min_val = master->axis[i].minimum / 65536.0f; + F32 max_val = master->axis[i].maximum / 65536.0f; + value = llclamp(value, min_val, max_val); + + break; + } + } + + if (!found) + { + FT_Done_MM_Var(gFTLibrary, master); + LL_WARNS_ONCE("Font") << "Axis '" << axis_tag << "' not found in font: " << mName << LL_ENDL; + return false; + } + + FT_UInt num_coords = master->num_axis; + FT_Fixed* coords = new FT_Fixed[num_coords]; + + // Get current coordinates + FT_Get_Var_Design_Coordinates(mFTFace, num_coords, coords); + + // Update the specific axis + coords[axis_index] = (FT_Fixed)(value * 65536.0f); + + // Set all coordinates + int error = FT_Set_Var_Design_Coordinates(mFTFace, num_coords, coords); + + delete[] coords; + FT_Done_MM_Var(gFTLibrary, master); + + if (error != 0) + { + LL_WARNS() << "Failed to set variation coordinates for " << axis_tag + << " = " << value << " in font: " << mName << LL_ENDL; + return false; + } + + LL_DEBUGS("Font") << "Set " << axis_tag << " = " << value + << " for font: " << mName << LL_ENDL; + return true; +} + namespace ll { diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index a9b3a944ee..d2164e8fa2 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -27,13 +27,14 @@ #ifndef LL_LLFONTFREETYPE_H #define LL_LLFONTFREETYPE_H -#include <boost/unordered_map.hpp> #include "llpointer.h" #include "llstl.h" #include "llimagegl.h" #include "llfontbitmapcache.h" +#include <unordered_map> + // Hack. FT_Face is just a typedef for a pointer to a struct, // but there's no simple forward declarations file for FreeType, // and the main include file is 200K. @@ -42,6 +43,7 @@ struct FT_FaceRec_; typedef struct FT_FaceRec_* LLFT_Face; struct FT_StreamRec_; typedef struct FT_StreamRec_ LLFT_Stream; +enum class EFontHinting : S32; namespace ll { @@ -86,6 +88,8 @@ struct LLFontGlyphInfo S32 mYBitmapOffset; // Offset to the origin in the bitmap S32 mXBearing; // Distance from baseline to left in pixels S32 mYBearing; // Distance from baseline to top in pixels + S32 mLsbDelta; // FreeType subpixel left side bearing delta (26.6 units) + S32 mRsbDelta; // FreeType subpixel right side bearing delta (26.6 units) std::pair<EFontGlyphType, S32> mBitmapEntry; // Which bitmap in the bitmap cache contains this glyph }; @@ -99,7 +103,7 @@ public: // is_fallback should be true for fallback fonts that aren't used // to render directly (Unicode backup, primarily) - bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n); + bool loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); S32 getNumFaces(const std::string& filename); @@ -161,9 +165,14 @@ private: void resetBitmapCache(); void setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 width, U32 height, U8 *data, S32 stride = 0) const; bool setSubImageBGRA(U32 x, U32 y, U32 bitmap_num, U16 width, U16 height, const U8* data, U32 stride) const; + bool setVariationAxis(const std::string& axis_tag, F32 value); bool hasGlyph(llwchar wch) const; // Has a glyph for this character LLFontGlyphInfo* addGlyph(llwchar wch, EFontGlyphType glyph_type) const; // Add a new character to the font if necessary - LLFontGlyphInfo* addGlyphFromFont(const LLFontFreetype *fontp, llwchar wch, U32 glyph_index, EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found) + LLFontGlyphInfo* addGlyphFromFont( + const LLFontFreetype *fontp, + llwchar wch, + U32 glyph_index, + EFontGlyphType bitmap_type) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found) void renderGlyph(EFontGlyphType bitmap_type, U32 glyph_index, llwchar wch) const; void insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const; @@ -179,12 +188,15 @@ private: LLFT_Face mFTFace; bool mIsFallback; + EFontHinting mHinting; + S32 mFontFlags; + S32 mWeight = -1; typedef std::pair<LLPointer<LLFontFreetype>, char_functor_t> fallback_font_t; typedef std::vector<fallback_font_t> fallback_font_vector_t; fallback_font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars) // *NOTE: the same glyph can be present with multiple representations (but the pointer is always unique) - typedef boost::unordered_multimap<llwchar, LLFontGlyphInfo*> char_glyph_info_map_t; + typedef std::unordered_multimap<llwchar, LLFontGlyphInfo*> char_glyph_info_map_t; mutable char_glyph_info_map_t mCharGlyphInfoMap; // Information about glyph location in bitmap mutable LLFontBitmapCache* mFontBitmapCachep; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 16eec1fdd2..5d99c35047 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -90,14 +90,14 @@ void LLFontGL::destroyGL() mFontFreetype->destroyGL(); } -bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n) +bool LLFontGL::loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags) { if(mFontFreetype == reinterpret_cast<LLFontFreetype*>(NULL)) { mFontFreetype = new LLFontFreetype; } - return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, is_fallback, face_n); + return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, weight, is_fallback, face_n, hinting, flags); } S32 LLFontGL::getNumFaces(const std::string& filename) @@ -1115,7 +1115,14 @@ LLFontGL* LLFontGL::getFontSansSerifSmallItalic() //static LLFontGL* LLFontGL::getFontSansSerif() { - static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Medium",0)); + static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Small",0)); + return fontp; +} + +// static +LLFontGL* LLFontGL::getFontSansSerifMedium() +{ + static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif", "Medium", 0)); return fontp; } diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 1c8e036f58..3b82d8e43d 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -87,7 +87,7 @@ public: void destroyGL(); - bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n); + bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, S32 weight, bool is_fallback, S32 face_n, EFontHinting hinting, S32 flags); S32 getNumFaces(const std::string& filename); S32 getCacheGeneration() const; @@ -204,6 +204,7 @@ public: static LLFontGL* getFontSansSerifSmallBold(); static LLFontGL* getFontSansSerifSmallItalic(); static LLFontGL* getFontSansSerif(); + static LLFontGL* getFontSansSerifMedium(); static LLFontGL* getFontSansSerifBig(); static LLFontGL* getFontSansSerifHuge(); static LLFontGL* getFontSansSerifBold(); diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index c48a389f6a..890308ab54 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -170,7 +170,7 @@ LLFontDescriptor LLFontDescriptor::normalize() const if (new_size != s_template_string && new_size.empty() && findSubString(new_name,"Monospace")) new_size = "Monospace"; if (new_size.empty()) - new_size = "Medium"; + new_size = "Small"; if (removeSubString(new_name,"Bold")) new_style |= LLFontGL::BOLD; @@ -181,16 +181,16 @@ LLFontDescriptor LLFontDescriptor::normalize() const return LLFontDescriptor(new_name,new_size,new_style, getFontFiles(), getFontCollectionFiles()); } -void LLFontDescriptor::addFontFile(const std::string& file_name, const std::string& char_functor) +void LLFontDescriptor::addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor) { char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor); - mFontFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr)); + mFontFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, weight, (mCharFunctors.end() != it) ? it->second : nullptr)); } -void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, const std::string& char_functor) +void LLFontDescriptor::addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor) { char_functor_map_t::const_iterator it = mCharFunctors.find(char_functor); - mFontCollectionFiles.push_back(LLFontFileInfo(file_name, (mCharFunctors.end() != it) ? it->second : nullptr)); + mFontCollectionFiles.push_back(LLFontFileInfo(file_name, hinting, flags, size_delta, weight, (mCharFunctors.end() != it) ? it->second : nullptr)); } LLFontRegistry::LLFontRegistry(bool create_gl_textures) @@ -289,23 +289,69 @@ bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc) { std::string font_file_name = child->getTextContents(); std::string char_functor; + EFontHinting hinting = EFontHinting::FORCE_AUTOHINT; + S32 flags = 0; + S32 weight = -1; if (child->hasAttribute("functor")) { child->getAttributeString("functor", char_functor); } + if (child->hasAttribute("font_hinting")) + { + std::string attr_hinting; + child->getAttributeString("font_hinting", attr_hinting); + LLStringUtil::toLower(attr_hinting); + + if (attr_hinting == "default") + { + hinting = EFontHinting::DEFAULT; + } + else if (attr_hinting == "force_auto") + { + hinting = EFontHinting::FORCE_AUTOHINT; + } + else if (attr_hinting == "no_hinting") + { + hinting = EFontHinting::NO_HINTING; + } + } + + if (child->hasAttribute("flags")) + { + std::string attr_flags; + child->getAttributeString("flags", attr_flags); + LLStringUtil::toLower(attr_flags); + + if (attr_flags == "bold") + { + flags |= LLFontGL::BOLD; + } + } + + F32 size_delta = 0.f; + if (child->hasAttribute("size_delta")) + { + child->getAttributeF32("size_delta", size_delta); + } + + if (child->hasAttribute("font_weight")) + { + child->getAttributeS32("font_weight", weight); + } + if (child->hasAttribute("load_collection")) { bool col = false; child->getAttributeBOOL("load_collection", col); if (col) { - desc.addFontCollectionFile(font_file_name, char_functor); + desc.addFontCollectionFile(font_file_name, hinting, flags, size_delta, weight, char_functor); } } - desc.addFontFile(font_file_name, char_functor); + desc.addFontFile(font_file_name, hinting, flags, size_delta, weight, char_functor); } else if (child->hasName("os")) { @@ -462,7 +508,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // Add ultimate fallback list - generated dynamically on linux, // null elsewhere. std::transform(getUltimateFallbackList().begin(), getUltimateFallbackList().end(), std::back_inserter(font_files), - [](const std::string& file_name) { return LLFontFileInfo(file_name); }); + [](const std::string& file_name) { return LLFontFileInfo(file_name, EFontHinting::FORCE_AUTOHINT, 0, 0.f, -1); }); // Load fonts based on names. if (font_files.empty()) @@ -517,8 +563,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) { fontp = new LLFontGL; } - if (fontp->loadFace(font_path, point_size_scale, - LLFontGL::sVertDPI, LLFontGL::sHorizDPI, is_fallback, i)) + if (fontp->loadFace(font_path, point_size_scale + font_file_it->mSizeDelta, + LLFontGL::sVertDPI, LLFontGL::sHorizDPI, font_file_it->mWeight, is_fallback, i, font_file_it->mHinting, font_file_it->mFlags)) { is_font_loaded = true; if (is_first_found) diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h index 8bbf5aa30c..fcbb2667e4 100644 --- a/indra/llrender/llfontregistry.h +++ b/indra/llrender/llfontregistry.h @@ -34,22 +34,45 @@ class LLFontGL; typedef std::vector<std::string> string_vec_t; +enum class EFontHinting : S32 +{ + DEFAULT = 0, + NO_HINTING = 0x8000U, + FORCE_AUTOHINT = 0x20, +}; + struct LLFontFileInfo { - LLFontFileInfo(const std::string& file_name, const std::function<bool(llwchar)>& char_functor = nullptr) + LLFontFileInfo(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::function<bool(llwchar)>& char_functor = nullptr) : FileName(file_name) , CharFunctor(char_functor) + , mHinting(hinting) + , mFlags(flags) + , mSizeDelta(size_delta) + , mWeight(weight) { } - LLFontFileInfo(const LLFontFileInfo& ffi) + LLFontFileInfo(const LLFontFileInfo& ffi, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight) : FileName(ffi.FileName) , CharFunctor(ffi.CharFunctor) + , mHinting(hinting) + , mFlags(flags) + , mSizeDelta(size_delta) + , mWeight(weight) { } std::string FileName; std::function<bool(llwchar)> CharFunctor; + EFontHinting mHinting; + S32 mFlags; + S32 mWeight; // -1 - default, whatever is in the file. + + // Not all fonts are the same size, Ex: dejavu is bigger than inter, + // so in some cases we want to adjust relative sizes to make characters + // from different files match. + F32 mSizeDelta; }; typedef std::vector<LLFontFileInfo> font_file_info_vec_t; @@ -71,10 +94,10 @@ public: const std::string& getSize() const { return mSize; } void setSize(const std::string& size) { mSize = size; } - void addFontFile(const std::string& file_name, const std::string& char_functor = LLStringUtil::null); + void addFontFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null); const font_file_info_vec_t & getFontFiles() const { return mFontFiles; } void setFontFiles(const font_file_info_vec_t& font_files) { mFontFiles = font_files; } - void addFontCollectionFile(const std::string& file_name, const std::string& char_functor = LLStringUtil::null); + void addFontCollectionFile(const std::string& file_name, EFontHinting hinting, S32 flags, F32 size_delta, S32 weight, const std::string& char_functor = LLStringUtil::null); const font_file_info_vec_t& getFontCollectionFiles() const { return mFontCollectionFiles; } void setFontCollectionFiles(const font_file_info_vec_t& font_collection_files) { mFontCollectionFiles = font_collection_files; } diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index b002d183ef..3a36e49029 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2386,7 +2386,7 @@ void clear_glerror() // // Static members -boost::unordered_map<LLGLenum, LLGLboolean> LLGLState::sStateMap; +std::unordered_map<LLGLenum, LLGLboolean> LLGLState::sStateMap; GLboolean LLGLDepthTest::sDepthEnabled = GL_FALSE; // OpenGL default GLenum LLGLDepthTest::sDepthFunc = GL_LESS; // OpenGL default @@ -2433,7 +2433,7 @@ void LLGLState::resetTextureStates() void LLGLState::dumpStates() { LL_INFOS("RenderState") << "GL States:" << LL_ENDL; - for (boost::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin(); + for (std::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin(); iter != sStateMap.end(); ++iter) { LL_INFOS("RenderState") << llformat(" 0x%04x : %s",(S32)iter->first,iter->second?"true":"false") << LL_ENDL; @@ -2465,7 +2465,7 @@ void LLGLState::checkStates(GLboolean writeAlpha) //llassert_always(colorMask[2]); // llassert_always(colorMask[3] == writeAlpha); - for (boost::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin(); + for (std::unordered_map<LLGLenum, LLGLboolean>::iterator iter = sStateMap.begin(); iter != sStateMap.end(); ++iter) { LLGLenum state = iter->first; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 130b06f9df..a7dced3753 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -29,8 +29,9 @@ // This file contains various stuff for handling gl extensions and other gl related stuff. +#include <functional> #include <string> -#include <boost/unordered_map.hpp> +#include <unordered_map> #include <list> #include "llerror.h" @@ -232,8 +233,6 @@ void clear_glerror(); */ -#include "boost/function.hpp" - class LLGLState { public: @@ -249,7 +248,7 @@ public: static void checkStates(GLboolean writeAlpha = GL_TRUE); protected: - static boost::unordered_map<LLGLenum, LLGLboolean> sStateMap; + static std::unordered_map<LLGLenum, LLGLboolean> sStateMap; public: enum { CURRENT_STATE = -2, DISABLED_STATE = 0, ENABLED_STATE = 1 }; @@ -281,7 +280,7 @@ public: class LLGLEnableFunc : LLGLState { public: - LLGLEnableFunc(LLGLenum state, bool enable, boost::function<void()> func) + LLGLEnableFunc(LLGLenum state, bool enable, std::function<void()> func) : LLGLState(state, enable) { if (enable) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index bc80bd9556..4901cb423b 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2300,7 +2300,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h) { - if(sSkipAnalyzeAlpha || !mNeedsAlphaAndPickMask) + if(!data_in || sSkipAnalyzeAlpha || !mNeedsAlphaAndPickMask) { return ; } diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index ea8530f282..f50ce26793 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -513,7 +513,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev { //search from the current gpu class down to class 1 to find the most relevant shader std::stringstream fname; fname << getShaderDirPrefix(); - fname << gpu_class << "/" << filename; + fname << gpu_class << gDirUtilp->getDirDelimiter() << filename; open_file_name = fname.str(); @@ -542,7 +542,14 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev if (file == NULL) { - LL_WARNS("ShaderLoading") << "GLSL Shader file not found: " << open_file_name << LL_ENDL; + if (gDirUtilp->fileExists(open_file_name)) + { + LL_WARNS("ShaderLoading") << "GLSL Shader file failed to open: " << open_file_name << LL_ENDL; + } + else + { + LL_WARNS("ShaderLoading") << "GLSL Shader file not found: " << open_file_name << LL_ENDL; + } return 0; } @@ -859,6 +866,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev //load source if (ret) { + LL_DEBUGS("ShaderLoading") << "glCreateShader done" << LL_ENDL; glShaderSource(ret, shader_code_count, (const GLchar**)shader_code_text, NULL); error = glGetError(); @@ -873,6 +881,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev //compile source if (ret) { + LL_DEBUGS("ShaderLoading") << "glShaderSource done" << U32(ret) << LL_ENDL; glCompileShader(ret); error = glGetError(); @@ -887,6 +896,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev if (error == GL_NO_ERROR) { //check for errors + LL_DEBUGS("ShaderLoading") << "glCompileShader done" << U32(ret) << LL_ENDL; GLint success = GL_TRUE; glGetShaderiv(ret, GL_COMPILE_STATUS, &success); @@ -903,6 +913,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev } else { + LL_DEBUGS("ShaderLoading") << "loadShaderFile() completed, ret: " << U32(ret) << LL_ENDL; ret = 0; } stop_glerror(); diff --git a/indra/llrender/lltexturemanagerbridge.cpp b/indra/llrender/lltexturemanagerbridge.cpp index c243f0697a..67838418bf 100644 --- a/indra/llrender/lltexturemanagerbridge.cpp +++ b/indra/llrender/lltexturemanagerbridge.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "lltexturemanagerbridge.h" // Define a null texture manager bridge. Applications must provide their own bridge implementaton. diff --git a/indra/llrender/lluiimage.h b/indra/llrender/lluiimage.h index 7988243a89..7dde84f295 100644 --- a/indra/llrender/lluiimage.h +++ b/indra/llrender/lluiimage.h @@ -30,14 +30,15 @@ #include "v4color.h" #include "llpointer.h" #include "llrefcount.h" -#include "llrefcount.h" #include "llrect.h" -#include <boost/function.hpp> -#include <boost/signals2.hpp> #include "llinitparam.h" #include "lltexture.h" #include "llrender2dutils.h" +#include <boost/signals2.hpp> + +#include <type_traits> + extern const LLColor4 UI_VERTEX_COLOR; class LLUIImage : public LLRefCount @@ -119,7 +120,7 @@ namespace LLInitParam class ParamValue<LLUIImage*> : public CustomParamValue<LLUIImage*> { - typedef boost::add_reference<boost::add_const<LLUIImage*>::type>::type T_const_ref; + typedef std::add_lvalue_reference<std::add_const<LLUIImage*>::type>::type T_const_ref; typedef CustomParamValue<LLUIImage*> super_t; public: Optional<std::string> name; diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index b0f6ae7d8d..0928f801ad 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -98,16 +98,8 @@ public: U32 mEnd; }; - LLVertexBuffer(const LLVertexBuffer& rhs) - { - *this = rhs; - } - - const LLVertexBuffer& operator=(const LLVertexBuffer& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLVertexBuffer(const LLVertexBuffer& rhs) = delete; + const LLVertexBuffer& operator=(const LLVertexBuffer& rhs) = delete; static void initClass(LLWindow* window, U32 mode_ = 0); static void cleanupClass(); diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 83b3a220a0..9077670b67 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -274,6 +274,10 @@ target_link_libraries(llui include(LibraryInstall) +if (CMAKE_CXX_COMPILER_ID MATCHES GNU) + set_source_files_properties(llxuiparser.cpp PROPERTIES COMPILE_FLAGS -Wno-sfinae-incomplete) +endif () + # Add tests if(LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 2cd394476e..ac8f7c2126 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -47,6 +47,8 @@ static constexpr F32 AUTO_SCROLL_RATE_ACCEL = 120.f; static LLDefaultChildRegistry::Register<LLAccordionCtrl> t2("accordion"); +std::set<LLAccordionCtrl*> LLAccordionCtrl::sPendingArrange; + LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mFitParent(params.fit_parent) , mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString()) @@ -163,7 +165,11 @@ bool LLAccordionCtrl::postBuild() //--------------------------------------------------------------------------------- LLAccordionCtrl::~LLAccordionCtrl() { - mAccordionTabs.clear(); + if (mArrangePending) + { + sPendingArrange.erase(this); + } + mAccordionTabs.clear(); } //--------------------------------------------------------------------------------- @@ -184,7 +190,7 @@ void LLAccordionCtrl::reshape(S32 width, S32 height, bool called_from_parent) // necessary text paddings can be set via h_pad and v_pad mNoVisibleTabsHelpText->setRect(getLocalRect()); - arrange(); + scheduleArrange(); } //--------------------------------------------------------------------------------- @@ -325,7 +331,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab) mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, (S16)(mAccordionTabs.size() - 1)) ); - arrange(); + scheduleArrange(); } void LLAccordionCtrl::removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab) @@ -682,8 +688,9 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info) std::string str_action = info["action"]; if (str_action == "size_changes") { - // - arrange(); + // Multiple children can request an arrange, + // but only need to do it once so schedule it for later. + scheduleArrange(); return 1; } if (str_action == "select_next") @@ -925,3 +932,25 @@ void LLAccordionCtrl::collapseAllTabs() arrange(); } } + +void LLAccordionCtrl::scheduleArrange() +{ + if (!mArrangePending) + { + mArrangePending = true; + sPendingArrange.insert(this); + } +} + +void LLAccordionCtrl::updateClass() +{ + for (LLAccordionCtrl* inst : sPendingArrange) + { + if (inst) + { + inst->mArrangePending = false; + inst->arrange(); + } + } + sPendingArrange.clear(); +} diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index 43a33a2b3c..c7bb8bc9ff 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -142,6 +142,9 @@ public: void setSkipScrollToChild(bool skip) { mSkipScrollToChild = skip; } + void scheduleArrange(); + static void updateClass(); + private: void initNoTabsWidget(const LLTextBox::Params& tb_params); void updateNoTabsHelpTextVisibility(); @@ -188,12 +191,15 @@ private: LLTextBox* mNoVisibleTabsHelpText = nullptr; bool mSkipScrollToChild = false; + bool mArrangePending = false; std::string mNoMatchedTabsOrigString; std::string mNoVisibleTabsOrigString; LLAccordionCtrlTab* mSelectedTab = nullptr; const LLTabComparator* mTabComparator = nullptr; + + static std::set<LLAccordionCtrl*> sPendingArrange; }; diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 828bfb289b..fa9de1eb09 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -39,7 +39,7 @@ static const std::string DD_BUTTON_NAME = "dd_button"; static const std::string DD_TEXTBOX_NAME = "dd_textbox"; static const std::string DD_HEADER_NAME = "dd_header"; -static const S32 HEADER_HEIGHT = 23; +static const S32 HEADER_HEIGHT = 25; static const S32 HEADER_IMAGE_LEFT_OFFSET = 5; static const S32 HEADER_TEXT_LEFT_OFFSET = 30; static const F32 AUTO_OPEN_TIME = 1.f; diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index d2534b3939..7f209c60a7 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -85,6 +85,7 @@ LLButton::Params::Params() image_top_pad("image_top_pad"), image_bottom_pad("image_bottom_pad"), imgoverlay_label_space("imgoverlay_label_space", 1), + image_overlay_right_delta("image_overlay_right_delta", 0), label_color("label_color"), label_color_selected("label_color_selected"), // requires is_toggle true label_color_disabled("label_color_disabled"), @@ -109,6 +110,8 @@ LLButton::Params::Params() commit_on_capture_lost("commit_on_capture_lost", false), display_pressed_state("display_pressed_state", true), use_draw_context_alpha("use_draw_context_alpha", true), + draw_focus_border("draw_focus_border", true), + hover_hand_cursor("hover_hand_cursor", false), badge("badge"), handle_right_mouse("handle_right_mouse"), held_down_delay("held_down_delay"), @@ -158,6 +161,7 @@ LLButton::LLButton(const LLButton::Params& p) mImageOverlayTopPad(p.image_top_pad), mImageOverlayBottomPad(p.image_bottom_pad), mImgOverlayLabelSpace(p.imgoverlay_label_space), + mImageOverlayRightDelta(p.image_overlay_right_delta), mIsToggle(p.is_toggle), mScaleImage(p.scale_image), mDropShadowedText(p.label_shadow), @@ -179,6 +183,8 @@ LLButton::LLButton(const LLButton::Params& p) mMouseUpSignal(NULL), mHeldDownSignal(NULL), mUseDrawContextAlpha(p.use_draw_context_alpha), + mDrawFocusBorder(p.draw_focus_border), + mHoverHandCursor(p.hover_hand_cursor), mHandleRightMouse(p.handle_right_mouse), mFlashingTimer(NULL) { @@ -190,7 +196,7 @@ LLButton::LLButton(const LLButton::Params& p) // Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing"). S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0; F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0f; - mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate); + mFlashingTimer = new LLFlashTimer((LLFlashTimer::callback_t) nullptr, flash_count, flash_rate); } else { @@ -653,7 +659,7 @@ bool LLButton::handleHover(S32 x, S32 y, MASK mask) } // We only handle the click if the click both started and ended within us - getWindow()->setCursor(UI_CURSOR_ARROW); + getWindow()->setCursor(mHoverHandCursor ? UI_CURSOR_HAND : UI_CURSOR_ARROW); LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL; } return true; @@ -840,10 +846,9 @@ void LLButton::draw() label_color = ll::ui::SearchableControl::getHighlightFontColor(); // overlay with keyboard focus border - if (hasFocus()) + if (hasFocus() && mDrawFocusBorder) { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, ll_round(lerp(1.f, 3.f, lerp_amt))); + drawBorder(imagep, gFocusMgr.getFocusColor() % alpha, gFocusMgr.getFocusFlashWidth()); } if (use_glow_effect) @@ -930,6 +935,17 @@ void LLButton::draw() } overlay_color.mV[VALPHA] *= alpha; + if (mImageOverlayRightDelta > 0) + { + mImageOverlay->draw(getRect().getWidth() - overlay_width - mImageOverlayRightDelta, + center_y - (overlay_height / 2), + overlay_width, + overlay_height, + overlay_color); + } + else + { + switch(mImageOverlayAlignment) { case LLFontGL::LEFT: @@ -964,6 +980,7 @@ void LLButton::draw() // draw nothing break; } + } } // Draw label diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 890e7c2d1e..0d1a28ee31 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -110,6 +110,7 @@ public: //image overlay paddings Optional<S32> image_top_pad; Optional<S32> image_bottom_pad; + Optional<S32> image_overlay_right_delta; /** * Space between image_overlay and label @@ -132,7 +133,9 @@ public: Optional<F32> hover_glow_amount; Optional<TimeIntervalParam> held_down_delay; - Optional<bool> use_draw_context_alpha; + Optional<bool> use_draw_context_alpha, + draw_focus_border, + hover_hand_cursor; Optional<LLBadge::Params> badge; @@ -153,7 +156,7 @@ public: ~LLButton(); // For backward compatability only - typedef boost::function<void(void*)> button_callback_t; + typedef std::function<void(void*)> button_callback_t; void addImageAttributeToXML(LLXMLNodePtr node, const std::string& imageName, const LLUUID& imageID,const std::string& xmlTagName) const; @@ -366,12 +369,16 @@ protected: S32 mImageOverlayBottomPad; bool mUseDrawContextAlpha; + bool mDrawFocusBorder; + bool mHoverHandCursor; /* * Space between image_overlay and label */ S32 mImgOverlayLabelSpace; + S32 mImageOverlayRightDelta; + F32 mHoverGlowStrength; F32 mCurGlowStrength; diff --git a/indra/llui/llcallbackmap.h b/indra/llui/llcallbackmap.h index 07775dc30f..69b80db1e8 100644 --- a/indra/llui/llcallbackmap.h +++ b/indra/llui/llcallbackmap.h @@ -27,17 +27,19 @@ #ifndef LLCALLBACKMAP_H #define LLCALLBACKMAP_H -#include <map> +#include "llstl.h" + #include <string> -#include <boost/function.hpp> +#include <functional> +#include <unordered_map> class LLCallbackMap { public: // callback definition. - typedef boost::function<void* (void* data)> callback_t; + typedef std::function<void* (void* data)> callback_t; - typedef std::map<std::string, LLCallbackMap> map_t; + typedef std::unordered_map<std::string, LLCallbackMap> map_t; typedef map_t::iterator map_iter_t; typedef map_t::const_iterator map_const_iter_t; @@ -48,8 +50,8 @@ public: return (void*)panel; } - LLCallbackMap() : mCallback(NULL), mData(NULL) { } - LLCallbackMap(callback_t callback, void* data = NULL) : mCallback(callback), mData(data) { } + LLCallbackMap() : mCallback(nullptr), mData(nullptr) {} + LLCallbackMap(callback_t callback, void* data = nullptr) : mCallback(callback), mData(data) {} callback_t mCallback; void* mData; diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h index 12d8233e0a..9f9cc3e54d 100644 --- a/indra/llui/llclipboard.h +++ b/indra/llui/llclipboard.h @@ -27,8 +27,6 @@ #ifndef LL_LLCLIPBOARD_H #define LL_LLCLIPBOARD_H -#include <boost/function.hpp> - #include "llstring.h" #include "lluuid.h" #include "llsingleton.h" diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index f3876ef695..ae676251ff 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -1009,7 +1009,7 @@ void LLComboBox::setKeystrokeOnEsc(bool enable) void LLComboBox::onTextEntry(LLLineEditor* line_editor) { - if (mTextEntryCallback != NULL) + if (mTextEntryCallback != nullptr) { (mTextEntryCallback)(line_editor, LLSD()); } @@ -1029,7 +1029,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor) mList->deselectAllItems(); mLastSelectedIndex = -1; } - if (mTextChangedCallback != NULL) + if (mTextChangedCallback != nullptr) { (mTextChangedCallback)(line_editor, LLSD()); } @@ -1077,7 +1077,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor) // RN: presumably text entry updateSelection(); } - if (mTextChangedCallback != NULL) + if (mTextChangedCallback != nullptr) { (mTextChangedCallback)(line_editor, LLSD()); } diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 8be3eb57e4..d6ea1202d3 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -36,7 +36,6 @@ #include "llrect.h" #include "llscrolllistctrl.h" #include "lllineeditor.h" -#include <boost/function.hpp> // Classes diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 91e6f281da..ca512a9883 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -67,6 +67,10 @@ LLConsole::LLConsole(const LLConsole::Params& p) { setFontSize(p.font_size_index); } + if (mFont == nullptr) + { + setFontSize(0); // sans-serif + } mFadeTime = mLinePersistTime - FADE_DURATION; setMaxLines(LLUI::getInstance()->mSettingGroups["config"]->getS32("ConsoleMaxLines")); } @@ -79,6 +83,13 @@ void LLConsole::setLinePersistTime(F32 seconds) void LLConsole::reshape(S32 width, S32 height, bool called_from_parent) { + if (mFont == nullptr) + { + // not initialized yet + LL_WARNS() << "LLConsole::reshape called before font is set" << LL_ENDL; + return; + } + S32 new_width = llmax(50, llmin(getRect().getWidth(), width)); S32 new_height = llmax(mFont->getLineHeight() + 15, llmin(getRect().getHeight(), height)); diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 19ae03cdf9..c20e5a806c 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -77,7 +77,7 @@ LLDockableFloater::~LLDockableFloater() bool LLDockableFloater::postBuild() { // Remember we should force docking when the floater is opened for the first time - if (mIsDockedStateForcedCallback != NULL && mIsDockedStateForcedCallback()) + if (mIsDockedStateForcedCallback != nullptr && mIsDockedStateForcedCallback()) { mForceDocking = true; } diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 9c516e23a4..accd9fddfc 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -129,7 +129,7 @@ protected: // Checks if docking should be forced. // It may be useful e.g. if floater created in mouselook mode (see EXT-5609) - boost::function<bool ()> mIsDockedStateForcedCallback; + std::function<bool()> mIsDockedStateForcedCallback; private: std::unique_ptr<LLDockControl> mDockControl; diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index b6ac9c19dd..1f6c3b9f57 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -49,11 +49,11 @@ public: public: // callback for a function getting a rect valid for control's position - typedef boost::function<void (LLRect& )> get_allowed_rect_callback_t; + typedef std::function<void (LLRect& )> get_allowed_rect_callback_t; LOG_CLASS(LLDockControl); LLDockControl(LLView* dockWidget, LLFloater* dockableFloater, - const LLUIImagePtr& dockTongue, DocAt dockAt, get_allowed_rect_callback_t get_rect_callback = NULL); + const LLUIImagePtr& dockTongue, DocAt dockAt, get_allowed_rect_callback_t get_rect_callback = nullptr); virtual ~LLDockControl(); public: diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 15536178ab..b3b47084c5 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -59,7 +59,9 @@ LLDragHandle::LLDragHandle(const LLDragHandle::Params& p) mMaxTitleWidth( 0 ), mForeground( true ), mDragHighlightColor(p.drag_highlight_color()), - mDragShadowColor(p.drag_shadow_color()) + mDragShadowColor(p.drag_shadow_color()), + mFont(p.font), + mLabelVPad(p.label_vpad()) { static LLUICachedControl<S32> snap_margin ("SnapMargin", 0); @@ -98,14 +100,13 @@ void LLDragHandleTop::setTitle(const std::string& title) } else { - const LLFontGL* font = LLFontGL::getFontSansSerif(); LLTextBox::Params params; params.name("Drag Handle Title"); params.rect(getRect()); params.initial_value(trimmed_title); - params.font(font); + params.font(mFont); params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); - params.font_shadow(LLFontGL::DROP_SHADOW_SOFT); + params.font_shadow(LLFontGL::NO_SHADOW); params.use_ellipses = true; params.parse_urls = false; //cancel URL replacement in floater title mTitleBox = LLUICtrlFactory::create<LLTextBox> (params); @@ -236,7 +237,6 @@ void LLDragHandleLeft::draw() void LLDragHandleTop::reshapeTitleBox() { - static LLUICachedControl<S32> title_vpad("UIFloaterTitleVPad", 0); if( ! mTitleBox) { return; @@ -248,7 +248,7 @@ void LLDragHandleTop::reshapeTitleBox() LLRect title_rect; title_rect.setLeftTopAndSize( LEFT_PAD, - getRect().getHeight() - title_vpad, + getRect().getHeight() - mLabelVPad, title_width, title_height); diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h index 73211d5292..f768839749 100644 --- a/indra/llui/lldraghandle.h +++ b/indra/llui/lldraghandle.h @@ -43,13 +43,17 @@ public: : public LLInitParam::Block<Params, LLView::Params> { Optional<std::string> label; + Optional<S32> label_vpad; Optional<LLUIColor> drag_highlight_color; Optional<LLUIColor> drag_shadow_color; + Optional<const LLFontGL*> font; Params() : label("label"), + label_vpad("label_vpad", 7), drag_highlight_color("drag_highlight_color", LLUIColorTable::instance().getColor("DefaultHighlightLight")), - drag_shadow_color("drag_shadow_color", LLUIColorTable::instance().getColor("DefaultShadowDark")) + drag_shadow_color("drag_shadow_color", LLUIColorTable::instance().getColor("DefaultShadowDark")), + font("font", LLFontGL::getFontSansSerif()) { changeDefault(mouse_opaque, true); changeDefault(follows.flags, FOLLOWS_ALL); @@ -82,6 +86,8 @@ protected: protected: LLTextBox* mTitleBox; + const LLFontGL* mFont; + S32 mLabelVPad; private: LLRect mButtonsRect; diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 54f54653e2..addc3375b3 100644 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -50,7 +50,7 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) void LLFlashTimer::unset() { mUnset = true; - mCallback = NULL; + mCallback = nullptr; } bool LLFlashTimer::tick() diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index 4ef70faf2d..1cd1df392b 100644 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -28,13 +28,13 @@ #define LL_FLASHTIMER_H #include "lleventtimer.h" -#include "boost/function.hpp" +#include <functional> class LLFlashTimer : public LLEventTimer { public: - typedef boost::function<void (bool)> callback_t; + typedef std::function<void (bool)> callback_t; /** * Constructor. @@ -43,7 +43,7 @@ public: * @param period - how frequently callback should be called * @param cb - callback to be called each tick */ - LLFlashTimer(callback_t cb = NULL, S32 count = 0, F32 period = 0.0); + LLFlashTimer(callback_t cb = nullptr, S32 count = 0, F32 period = 0.0); ~LLFlashTimer() {}; /*virtual*/ bool tick(); diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index dfe0a71b74..34eb1ea3fc 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -537,6 +537,7 @@ bool LLFlatListView::postBuild() void LLFlatListView::rearrangeItems() { + LL_PROFILE_ZONE_SCOPED; static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); setNoItemsCommentVisible(0==size()); @@ -1132,6 +1133,7 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) void LLFlatListView::notifyParentItemsRectChanged() { + LL_PROFILE_ZONE_SCOPED; S32 comment_height = 0; // take into account comment text height if exists @@ -1401,7 +1403,7 @@ bool LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action) return false; } -void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent) +bool LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent) { std::string cur_filter = mFilterSubString; LLStringUtil::toUpper(cur_filter); @@ -1426,7 +1428,9 @@ void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent) { rearrangeItems(); notifyParentItemsRectChanged(); + return true; } + return false; } bool LLFlatListViewEx::hasMatchedItems() diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 1f22360a8a..39afa33be8 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -499,8 +499,9 @@ public: /** * Filters the list, rearranges and notifies parent about shape changes. * Derived classes may want to overload rearrangeItems() to exclude repeated separators after filtration. + * Returns true in case of changes */ - void filterItems(bool re_sort, bool notify_parent); + bool filterItems(bool re_sort, bool notify_parent); /** * Returns true if last call of filterItems() found at least one matching item diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 52a5e3dbd6..9361358ced 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -183,8 +183,10 @@ LLFloater::Params::Params() show_title("show_title", true), auto_close("auto_close", false), positioning("positioning", LLFloaterEnums::POSITIONING_RELATIVE), + header_font("header_font", LLFontGL::getFontSansSerif()), header_height("header_height", 0), legacy_header_height("legacy_header_height", 0), + header_vpad("header_vpad", 7), close_image("close_image"), restore_image("restore_image"), minimize_image("minimize_image"), @@ -239,7 +241,7 @@ void LLFloater::initClass() } // defaults for floater param block pulled from widgets/floater.xml -static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(&typeid(LLFloater::Params), "floater"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(typeid(LLFloater::Params), "floater"); LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) : LLPanel(), // intentionally do not pass params here, see initFromParams @@ -293,7 +295,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) memset(mButtonsEnabled, 0, BUTTON_COUNT * sizeof(bool)); memset(mButtons, 0, BUTTON_COUNT * sizeof(LLButton*)); - addDragHandle(); + addDragHandle(p); addResizeCtrls(); initFromParams(p); @@ -336,7 +338,7 @@ void LLFloater::initFloater(const Params& p) } } -void LLFloater::addDragHandle() +void LLFloater::addDragHandle(const LLFloater::Params& floater_params) { if (!mDragHandle) { @@ -346,6 +348,8 @@ void LLFloater::addDragHandle() p.name("drag"); p.follows.flags(FOLLOWS_ALL); p.label(mTitle); + p.font(floater_params.header_font); + p.label_vpad(floater_params.header_vpad); mDragHandle = LLUICtrlFactory::create<LLDragHandleLeft>(p); } else // drag on top @@ -354,6 +358,8 @@ void LLFloater::addDragHandle() p.name("Drag Handle"); p.follows.flags(FOLLOWS_ALL); p.label(mTitle); + p.font(floater_params.header_font); + p.label_vpad(floater_params.header_vpad); mDragHandle = LLUICtrlFactory::create<LLDragHandleTop>(p); } addChild(mDragHandle); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 9e1594bdd2..bda2531b43 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -172,8 +172,10 @@ public: Optional<LLFloaterEnums::EOpenPositioning> positioning; + Optional<const LLFontGL*> header_font; Optional<S32> header_height, - legacy_header_height; // HACK see initFromXML() + legacy_header_height, // HACK see initFromXML() + header_vpad; Optional<F32> rel_x, rel_y; @@ -442,7 +444,7 @@ private: bool offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index); void addResizeCtrls(); void layoutResizeCtrls(); - void addDragHandle(); + void addDragHandle(const LLFloater::Params& p); void layoutDragHandle(); // repair layout static void updateActiveFloaterTransparency(); diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index a818e72f59..c18495ce71 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -40,9 +40,9 @@ LLFloaterReg::instance_list_t LLFloaterReg::sNullInstanceList; LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap; LLFloaterReg::build_map_t LLFloaterReg::sBuildMap; -std::map<std::string, std::string, std::less<>> LLFloaterReg::sGroupMap; +LLFloaterReg::group_map_t LLFloaterReg::sGroupMap; bool LLFloaterReg::sBlockShowFloaters = false; -std::set<std::string, std::less<>> LLFloaterReg::sAlwaysShowableList; +LLFloaterReg::always_showable_t LLFloaterReg::sAlwaysShowableList; static LLFloaterRegListener sFloaterRegListener; @@ -96,11 +96,8 @@ LLFloater* LLFloaterReg::getLastFloaterCascading() candidate_rect.mTop = 100000; LLFloater* candidate_floater = NULL; - std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end(); - for( ; it != it_end; ++it) + for (const auto& [floater_name, group_name] : sGroupMap) { - const std::string& group_name = it->second; - instance_list_t& instances = sInstanceMap[group_name]; for (LLFloater* inst : instances) @@ -604,17 +601,11 @@ U32 LLFloaterReg::getVisibleFloaterInstanceCount() { U32 count = 0; - std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end(); - for( ; it != it_end; ++it) + for (const auto& [floater_name, group_name] : sGroupMap) { - const std::string& group_name = it->second; - instance_list_t& instances = sInstanceMap[group_name]; - - for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter) + for (LLFloater* inst : instances) { - LLFloater* inst = *iter; - if (inst->getVisible() && !inst->isMinimized()) { count++; diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 94a67c8d8b..71a11b6f42 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -29,9 +29,11 @@ /// llcommon #include "llrect.h" #include "llsd.h" +#include "llstl.h" +#include <functional> #include <list> -#include <boost/function.hpp> +#include <unordered_set> //******************************************************* // @@ -41,7 +43,7 @@ class LLFloater; class LLUICtrl; -typedef boost::function<LLFloater* (const LLSD& key)> LLFloaterBuildFunc; +typedef std::function<LLFloater* (const LLSD& key)> LLFloaterBuildFunc; class LLFloaterReg { @@ -51,26 +53,29 @@ public: // 2) We can change the key of a floater without altering the list. typedef std::list<LLFloater*> instance_list_t; typedef const instance_list_t const_instance_list_t; - typedef std::map<std::string, instance_list_t, std::less<>> instance_map_t; + typedef std::unordered_map<std::string, instance_list_t, ll::string_hash, std::equal_to<>> instance_map_t; struct BuildData { LLFloaterBuildFunc mFunc; std::string mFile; }; - typedef std::map<std::string, BuildData, std::less<>> build_map_t; + typedef std::unordered_map<std::string, BuildData, ll::string_hash, std::equal_to<>> build_map_t; private: friend class LLFloaterRegListener; static instance_list_t sNullInstanceList; static instance_map_t sInstanceMap; static build_map_t sBuildMap; - static std::map<std::string, std::string, std::less<>> sGroupMap; + + using group_map_t = std::unordered_map<std::string, std::string, ll::string_hash, std::equal_to<>>; + static group_map_t sGroupMap; static bool sBlockShowFloaters; /** * Defines list of floater names that can be shown despite state of sBlockShowFloaters. */ - static std::set<std::string, std::less<>> sAlwaysShowableList; + using always_showable_t = std::unordered_set<std::string, ll::string_hash, std::equal_to<>>; + static always_showable_t sAlwaysShowableList; public: // Registration diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 0d7c98294f..ce0e8036e7 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -32,11 +32,11 @@ const F32 FOCUS_FADE_TIME = 0.3f; -LLFocusableElement::LLFocusableElement() -: mFocusLostCallback(NULL), - mFocusReceivedCallback(NULL), - mFocusChangedCallback(NULL), - mTopLostCallback(NULL) +LLFocusableElement::LLFocusableElement() : + mFocusLostCallback(nullptr), + mFocusReceivedCallback(nullptr), + mFocusChangedCallback(nullptr), + mTopLostCallback(nullptr) { } @@ -464,6 +464,11 @@ F32 LLFocusMgr::getFocusFlashAmt() const return clamp_rescale(mFocusFlashTimer.getElapsedTimeF32(), 0.f, FOCUS_FADE_TIME, 1.f, 0.f); } +S32 LLFocusMgr::getFocusFlashWidth() const +{ + return ll_round(lerp(1.f, 2.f, getFocusFlashAmt())); +} + LLColor4 LLFocusMgr::getFocusColor() const { static LLUIColor focus_color_cached = LLUIColorTable::instance().getColor("FocusColor"); diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 89fee5c9f1..2e2293196b 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -101,7 +101,7 @@ public: void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; } F32 getFocusFlashAmt() const; - S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); } + S32 getFocusFlashWidth() const; LLColor4 getFocusColor() const; void triggerFocusFlash(); bool getAppHasFocus() const { return mAppHasFocus; } diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 878f1cb856..fcc1964bd6 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -28,6 +28,7 @@ #include "llflashtimer.h" #include "linden_common.h" +#include "llapp.h" #include "llfolderviewitem.h" #include "llfolderview.h" #include "llfolderviewmodel.h" @@ -158,9 +159,11 @@ LLFolderViewItem::Params::Params() icon_width("icon_width", 0), text_pad("text_pad", 0), text_pad_right("text_pad_right", 0), + text_pad_top("text_pad_top", 1), single_folder_mode("single_folder_mode", false), double_click_override("double_click_override", false), arrow_size("arrow_size", 0), + arrow_pad_top("arrow_pad_top", 1), max_folder_item_overlap("max_folder_item_overlap", 0) { } @@ -200,7 +203,9 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mIconWidth(p.icon_width), mTextPad(p.text_pad), mTextPadRight(p.text_pad_right), + mTextPadTop(p.text_pad_top), mArrowSize(p.arrow_size), + mArrowPadTop(p.arrow_pad_top), mSingleFolderMode(p.single_folder_mode), mMaxFolderItemOverlap(p.max_folder_item_overlap), mDoubleClickOverride(p.double_click_override) @@ -810,7 +815,7 @@ void LLFolderViewItem::drawOpenFolderArrow() if (hasVisibleChildren() || !isFolderComplete()) { gl_draw_scaled_rotated_image( - mIndentation, getRect().getHeight() - mArrowSize - mTextPad - sTopPad, + mIndentation, getRect().getHeight() - mArrowSize - mArrowPadTop - sTopPad, mArrowSize, mArrowSize, mControlLabelRotation, sFolderArrowImg->getImage(), sFgColor); } } @@ -1044,7 +1049,7 @@ void LLFolderViewItem::draw() S32 filter_string_length = mViewModelItem->hasFilterStringMatch() ? (S32)mViewModelItem->getFilterStringSize() : 0; F32 right_x = 0; - F32 y = (F32)rect_height - line_height - (F32)mTextPad - (F32)sTopPad; + F32 y = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)sTopPad; F32 text_left = (F32)getLabelXPos(); LLWString combined_string = mLabel + mLabelSuffix; @@ -1123,7 +1128,7 @@ void LLFolderViewItem::draw() if(mLabelSuffix.empty() || (font == sSuffixFont)) { F32 match_string_left = text_left + font->getWidthF32(combined_string.c_str(), 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string.c_str(), filter_offset, filter_string_length); - F32 yy = (F32)rect_height - line_height - (F32)mTextPad - (F32)sTopPad; + F32 yy = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)sTopPad; font->render(combined_string, filter_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, filter_string_length, S32_MAX, &right_x); @@ -1134,7 +1139,7 @@ void LLFolderViewItem::draw() if(label_filter_length > 0) { F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel.c_str(), filter_offset, label_filter_length); - F32 yy = (F32)rect_height - line_height - (F32)mTextPad - (F32)sTopPad; + F32 yy = (F32)rect_height - line_height - (F32)mTextPadTop - (F32)sTopPad; font->render(mLabel, filter_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, label_filter_length, S32_MAX, &right_x); @@ -1145,7 +1150,7 @@ void LLFolderViewItem::draw() { S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size()); F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, static_cast<S32>(mLabel.size())) + sSuffixFont->getWidthF32(mLabelSuffix.c_str(), 0, suffix_offset + suffix_filter_length) - sSuffixFont->getWidthF32(mLabelSuffix.c_str(), suffix_offset, suffix_filter_length); - F32 yy = (F32)rect_height - sSuffixFont->getLineHeight() - (F32)mTextPad - (F32)sTopPad; + F32 yy = (F32)rect_height - sSuffixFont->getLineHeight() - (F32)mTextPadTop - (F32)sTopPad; sSuffixFont->render(mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, suffix_filter_length, S32_MAX, &right_x); @@ -1884,6 +1889,11 @@ void LLFolderViewFolder::updateHasFavorites(bool new_childs_value) void LLFolderViewFolder::onIdleUpdateFavorites(void* data) { LLFolderViewFolder* self = reinterpret_cast<LLFolderViewFolder*>(data); + if (gDisconnected || !self) + { + return; + } + if (self->mFavoritesDirtyFlags == FAVORITE_CLEANUP) { // parent or child already processed the update, clean the callback @@ -2359,9 +2369,10 @@ bool LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask ) { // navigating is going to destroy views and change children // delay it untill handleDoubleClick processing is complete - doOnIdleOneTime([this]() - { - getViewModelItem()->navigateToFolder(false); + LLPointer<LLFolderViewModelItem> view_model_item = getViewModelItem(); + doOnIdleOneTime([view_model_item]() mutable + {; + view_model_item->navigateToFolder(false); }); } return true; diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 23d794bf26..258a806b91 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -73,7 +73,9 @@ public: icon_width, text_pad, text_pad_right, + text_pad_top, arrow_size, + arrow_pad_top, max_folder_item_overlap; Optional<bool> single_folder_mode, double_click_override; @@ -117,7 +119,9 @@ protected: mIconWidth, mTextPad, mTextPadRight, + mTextPadTop, mArrowSize, + mArrowPadTop, mMaxFolderItemOverlap; F32 mControlLabelRotation; diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 2865b789b9..07e8b890b8 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -432,11 +432,11 @@ public: virtual SortType& getSorter() { return *mSorter; } virtual const SortType& getSorter() const { return *mSorter; } - virtual void setSorter(const SortType& sorter) { mSorter.reset(new SortType(sorter)); requestSortAll(); } + virtual void setSorter(const SortType& sorter) { mSorter = std::make_unique<SortType>(sorter); requestSortAll(); } virtual FilterType& getFilter() override { return *mFilter; } virtual const FilterType& getFilter() const override { return *mFilter; } - virtual void setFilter(const FilterType& filter) { mFilter.reset(new FilterType(filter)); } + virtual void setFilter(const FilterType& filter) { mFilter = std::make_unique<FilterType>(filter); } // By default, we assume the content is available. If a network fetch mechanism is implemented for the model, // this method needs to be overloaded and return the relevant fetch status. diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h index da5570d922..40a3e439a6 100644 --- a/indra/llui/llfunctorregistry.h +++ b/indra/llui/llfunctorregistry.h @@ -29,10 +29,9 @@ #define LL_LLFUNCTORREGISTRY_H #include <string> -#include <map> - -#include <boost/function.hpp> +#include <unordered_map> +#include "llstring.h" #include "llsd.h" #include "llsingleton.h" @@ -58,7 +57,7 @@ class LLFunctorRegistry : public LLSingleton<LLFunctorRegistry<FUNCTOR_TYPE> > public: typedef FUNCTOR_TYPE ResponseFunctor; - typedef typename std::map<std::string, FUNCTOR_TYPE> FunctorMap; + typedef typename std::unordered_map<std::string, FUNCTOR_TYPE, ll::string_hash, std::equal_to<>> FunctorMap; bool registerFunctor(const std::string& name, ResponseFunctor f) { diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 5892238593..53b5435324 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -194,7 +194,7 @@ protected: token_list_t mLineTokenList; token_list_t mDelimiterTokenList; - typedef std::map<std::string, std::string, std::less<>> element_attributes_t; + typedef std::unordered_map<std::string, std::string, ll::string_hash, std::equal_to<>> element_attributes_t; typedef element_attributes_t::const_iterator attribute_iterator_t; element_attributes_t mAttributes; std::string getAttribute(std::string_view key); diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index fe0591ce4b..1dc80671cc 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -48,17 +48,21 @@ static LLLayoutStack::LayoutStackRegistry::Register<LLLayoutPanel> register_layo LLLayoutPanel::Params::Params() : expanded_min_dim("expanded_min_dim", 0), min_dim("min_dim", -1), + max_dim("max_dim", -1), user_resize("user_resize", false), auto_resize("auto_resize", true) { addSynonym(min_dim, "min_width"); addSynonym(min_dim, "min_height"); + addSynonym(max_dim, "max_width"); + addSynonym(max_dim, "max_height"); } LLLayoutPanel::LLLayoutPanel(const Params& p) : LLPanel(p), mExpandedMinDim(p.expanded_min_dim.isProvided() ? p.expanded_min_dim : p.min_dim), mMinDim(p.min_dim), + mMaxDim(p.max_dim), mAutoResize(p.auto_resize), mUserResize(p.user_resize), mCollapsed(false), @@ -75,6 +79,7 @@ LLLayoutPanel::LLLayoutPanel(const Params& p) { mVisibleAmt = 0.f; } + setMaxDim(mMaxDim); } void LLLayoutPanel::initFromParams(const Params& p) @@ -113,6 +118,8 @@ S32 LLLayoutPanel::getTargetDim() const void LLLayoutPanel::setTargetDim(S32 value) { + value = llmin(value, mMaxDim); + LLRect new_rect(getRect()); if (mOrientation == LLLayoutStack::HORIZONTAL) { @@ -145,6 +152,7 @@ void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) setMinDim(layout_dim); } mTargetDim = llmax(layout_dim, getMinDim()); + mTargetDim = llmin(mTargetDim, mMaxDim); } void LLLayoutPanel::setVisible( bool visible ) @@ -167,6 +175,7 @@ void LLLayoutPanel::reshape( S32 width, S32 height, bool called_from_parent /*= if (!mIgnoreReshape && !mAutoResize) { mTargetDim = (mOrientation == LLLayoutStack::HORIZONTAL) ? width : height; + mTargetDim = llmin(mTargetDim, mMaxDim); LLLayoutStack* stackp = dynamic_cast<LLLayoutStack*>(getParent()); if (stackp) { @@ -439,6 +448,7 @@ void LLLayoutStack::updateLayout() F32 fraction_to_distribute = (panelp->mFractionalSize * panelp->getAutoResizeFactor()) / (total_visible_fraction); S32 delta = ll_round((F32)space_to_distribute * fraction_to_distribute); panelp->mTargetDim += delta; + panelp->mTargetDim = llmin(panelp->mTargetDim, panelp->mMaxDim); remaining_space -= delta; } } @@ -455,6 +465,7 @@ void LLLayoutStack::updateLayout() { S32 space_for_panel = remaining_space > 0 ? 1 : -1; panelp->mTargetDim += space_for_panel; + panelp->mTargetDim = llmin(panelp->mTargetDim, panelp->mMaxDim); remaining_space -= space_for_panel; } } diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 9e3536aaff..4c78c8a289 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -140,7 +140,8 @@ public: struct Params : public LLInitParam::Block<Params, LLPanel::Params> { Optional<S32> expanded_min_dim, - min_dim; + min_dim, + max_dim; Optional<bool> user_resize, auto_resize; @@ -164,6 +165,8 @@ public: S32 getMinDim() const { return llmax(0, mMinDim); } void setMinDim(S32 value) { mMinDim = value; } + void setMaxDim(S32 value) { mMaxDim = value < 0 ? S32_MAX : value; } + S32 getExpandedMinDim() const { return mExpandedMinDim >= 0 ? mExpandedMinDim : getMinDim(); } void setExpandedMinDim(S32 value) { mExpandedMinDim = value; } @@ -198,6 +201,7 @@ protected: S32 mExpandedMinDim; S32 mMinDim; + S32 mMaxDim; bool mCollapsed; F32 mVisibleAmt; F32 mCollapseAmt; diff --git a/indra/llui/lllazyvalue.h b/indra/llui/lllazyvalue.h index 622e69ce95..fc15ead032 100644 --- a/indra/llui/lllazyvalue.h +++ b/indra/llui/lllazyvalue.h @@ -28,15 +28,16 @@ #ifndef LL_LAZY_VALUE_H #define LL_LAZY_VALUE_H -#include <boost/function.hpp> +#include <functional> +#include <type_traits> // Holds on to a value of type T *or* calls a functor to generate a value of type T template<typename T> class LLLazyValue { public: - typedef typename boost::add_reference<typename boost::add_const<T>::type>::type T_const_ref; - typedef typename boost::function<T_const_ref (void)> function_type; + typedef typename std::add_lvalue_reference<typename std::add_const<T>::type>::type T_const_ref; + typedef typename std::function<T_const_ref (void)> function_type; public: LLLazyValue(const function_type& value) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index b534c8d4e8..9a88083a5d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -97,6 +97,7 @@ LLLineEditor::Params::Params() ignore_tab("ignore_tab", true), is_password("is_password", false), allow_emoji("allow_emoji", true), + draw_focus_border("draw_focus_border", true), cursor_color("cursor_color"), use_bg_color("use_bg_color", false), bg_color("bg_color"), @@ -122,6 +123,7 @@ LLLineEditor::Params::Params() LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) : LLUICtrl(p), + mDefaultText(p.default_text), mMaxLengthBytes(p.max_length.bytes), mMaxLengthChars(p.max_length.chars), mCursorPos( 0 ), @@ -146,6 +148,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mIgnoreTab( p.ignore_tab ), mDrawAsterixes( p.is_password ), mAllowEmoji( p.allow_emoji ), + mDrawFocusBorder(p.draw_focus_border), mSpellCheck( p.spellcheck ), mSpellCheckStart(-1), mSpellCheckEnd(-1), @@ -1794,7 +1797,7 @@ void LLLineEditor::drawBackground() if (!image) return; // optionally draw programmatic border - if (has_focus) + if (has_focus && mDrawFocusBorder) { LLColor4 tmp_color = gFocusMgr.getFocusColor(); tmp_color.setAlpha(alpha); @@ -1954,12 +1957,11 @@ void LLLineEditor::draw() width = llmin(width, mTextRightEdge - ll_round(rendered_pixels_right)); gl_rect_2d(ll_round(rendered_pixels_right), cursor_top, ll_round(rendered_pixels_right)+width, cursor_bottom, color); - LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha ); rendered_text += mFontBufferSelection.render( mGLFont, mText, mScrollHPos + rendered_text, rendered_pixels_right, text_bottom, - tmp_color, + LLColor4::black, LLFontGL::LEFT, LLFontGL::BOTTOM, 0, LLFontGL::NO_SHADOW, diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 7533f76f1d..fd248edda3 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -60,7 +60,7 @@ class LLLineEditor { public: - typedef boost::function<void (LLLineEditor* caller)> keystroke_callback_t; + typedef std::function<void (LLLineEditor* caller)> keystroke_callback_t; struct MaxLength : public LLInitParam::ChoiceBlock<MaxLength> { @@ -95,7 +95,8 @@ public: show_label_focused, is_password, allow_emoji, - use_bg_color; + use_bg_color, + draw_focus_border; // colors Optional<LLUIColor> cursor_color, @@ -202,6 +203,7 @@ public: void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } const std::string& getLabel() { return mLabel.getString(); } + void setDefaultText() { setText(mDefaultText); } void setText(const LLStringExplicit &new_text); const std::string& getText() const override { return mText.getString(); } @@ -259,7 +261,7 @@ public: void setSelectAllonCommit(bool b) { mSelectAllonCommit = b; } void onKeystroke(); - typedef boost::function<void (LLLineEditor* caller, void* user_data)> callback_t; + typedef std::function<void (LLLineEditor* caller, void* user_data)> callback_t; void setKeystrokeCallback(callback_t callback, void* user_data); void setMaxTextLength(S32 max_text_length); @@ -347,6 +349,7 @@ protected: LLFontVertexBuffer mFontBufferSelection; LLFontVertexBuffer mFontBufferPostSelection; LLFontVertexBuffer mFontBufferLabel; + std::string mDefaultText; S32 mMaxLengthBytes; // Max length of the UTF8 string in bytes S32 mMaxLengthChars; // Maximum number of characters in the string S32 mCursorPos; // I-beam is just after the mCursorPos-th character. @@ -409,6 +412,7 @@ protected: bool mAllowEmoji; bool mUseBgColor; + bool mDrawFocusBorder; LLWString mPreeditWString; LLWString mPreeditOverwrittenWString; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 2ca2454040..3b21ed8f47 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -73,7 +73,7 @@ S32 MENU_BAR_WIDTH = 410; /// Local function declarations, constants, enums, and typedefs ///============================================================================ -const S32 LABEL_BOTTOM_PAD_PIXELS = 2; +const S32 LABEL_BOTTOM_PAD_PIXELS = 1; const U32 LEFT_PAD_PIXELS = 3; const U32 LEFT_WIDTH_PIXELS = 15; @@ -519,21 +519,25 @@ void LLMenuItemGL::draw( void ) } else { + // Munus are all of the same size, so fixed offset works here, + // but it won't work if somebody decides to use different font + // todo: adjust logic to work of rect and font height + F32 y = (F32)MENU_ITEM_PADDING / 2.f; if( !mDrawBoolLabel.empty() ) { - mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, + mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } - mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, + mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); if( !mDrawAccelLabel.empty() ) { - mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, + mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, y, color, LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } if( !mDrawBranchLabel.empty() ) { - mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, + mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, y, color, LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false ); } } @@ -1638,6 +1642,9 @@ void LLMenuItemBranchDownGL::draw( void ) { color = mDisabledColor.get(); } + // Munus are all of the same size, so fixed offset works here, + // but it won't work if somebody decides to use different font + // todo: adjust logic to work of rect and font height getFont()->render( mLabel.getWString(), 0, (F32)getRect().getWidth() / 2.f, (F32)LABEL_BOTTOM_PAD_PIXELS, color, LLFontGL::HCENTER, LLFontGL::BOTTOM, LLFontGL::NORMAL); @@ -4404,3 +4411,17 @@ bool LLContextMenu::addChild(LLView* view, S32 tab_group) return addContextChild(view, tab_group); } +void LLContextMenu::deleteAllChildren() +{ + mHoverItem = nullptr; + LLMenuGL::deleteAllChildren(); +} + +void LLContextMenu::removeChild(LLView* ctrl) +{ + if (ctrl == mHoverItem) + { + mHoverItem = nullptr; + } + LLMenuGL::removeChild(ctrl); +} diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index ff9456acc6..bca0a731fc 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -37,7 +37,8 @@ #include "llfloater.h" #include "lluistring.h" #include "llview.h" -#include <boost/function.hpp> + +#include <boost/bind.hpp> extern S32 MENU_BAR_HEIGHT; extern S32 MENU_BAR_WIDTH; @@ -729,6 +730,8 @@ public: virtual bool handleRightMouseUp ( S32 x, S32 y, MASK mask ); virtual bool addChild (LLView* view, S32 tab_group = 0); + /*virtual*/ void deleteAllChildren(); + /*virtual*/ void removeChild(LLView* ctrl); LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index a05feab1d9..56475a2d8d 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -457,7 +457,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mTags.push_back(tag.value); } - mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form)); + mForm = std::make_shared<LLNotificationForm>(p.name, p.form_ref.form); } LLNotificationVisibilityRule::LLNotificationVisibilityRule(const LLNotificationVisibilityRule::Rule &p) @@ -875,7 +875,7 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele // TODO: something like this so that a missing alert is sensible: //mSubstitutions["_ARGS"] = get_all_arguments_as_text(mSubstitutions); - mForm = LLNotificationFormPtr(new LLNotificationForm(*mTemplatep->mForm)); + mForm = std::make_shared<LLNotificationForm>(*mTemplatep->mForm); mForm->append(form_elements); // apply substitution to form labels @@ -1249,7 +1249,7 @@ LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything), mIgnoreAllNotifications(false) { - mListener.reset(new LLNotificationsListener(*this)); + mListener = std::make_unique<LLNotificationsListener>(*this); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2)); // touch the instance tracker for notification channels, so that it will still be around in our destructor @@ -1424,6 +1424,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN // this function is called once at construction time, after the object is constructed. void LLNotifications::initSingleton() { + LL_PROFILE_ZONE_SCOPED; loadTemplates(); loadVisibilityRules(); createDefaultChannels(); @@ -1436,6 +1437,8 @@ void LLNotifications::cleanupSingleton() void LLNotifications::createDefaultChannels() { + LL_PROFILE_ZONE_SCOPED; + LL_INFOS("Notifications") << "Generating default notification channels" << LL_ENDL; // now construct the various channels AFTER loading the notifications, // because the history channel is going to rewrite the stored notifications file @@ -1487,7 +1490,7 @@ bool LLNotifications::templateExists(std::string_view name) void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option) { - LLNotificationPtr temp_notify(new LLNotification(params)); + LLNotificationPtr temp_notify = std::make_shared<LLNotification>(params); if (!temp_notify->getForm()) { @@ -1578,6 +1581,8 @@ void addPathIfExists(const std::string& new_path, std::vector<std::string>& path bool LLNotifications::loadTemplates() { + LL_PROFILE_ZONE_SCOPED; + LL_INFOS("Notifications") << "Reading notifications template" << LL_ENDL; // Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it // output all relevant pathnames instead of just the ones from the most @@ -1653,7 +1658,7 @@ bool LLNotifications::loadTemplates() replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text); } } - mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification)); + mTemplates[notification.name] = std::make_shared<LLNotificationTemplate>(notification); } LL_INFOS("Notifications") << "...done" << LL_ENDL; @@ -1663,6 +1668,8 @@ bool LLNotifications::loadTemplates() bool LLNotifications::loadVisibilityRules() { + LL_PROFILE_ZONE_SCOPED; + const std::string xml_filename = "notification_visibility.xml"; // Note that here we're looking for the "en" version, the default // language, rather than the most localized version of this file. @@ -1683,7 +1690,7 @@ bool LLNotifications::loadVisibilityRules() for (const LLNotificationVisibilityRule::Rule& rule : params.rules) { - mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule))); + mVisibilityRules.push_back(std::make_shared<LLNotificationVisibilityRule>(rule)); } return true; @@ -1726,7 +1733,7 @@ LLNotificationPtr LLNotifications::add(const std::string& name, const LLSD& subs // generalized add function that takes a parameter block object for more complex instantiations LLNotificationPtr LLNotifications::add(const LLNotification::Params& p) { - LLNotificationPtr pNotif(new LLNotification(p)); + LLNotificationPtr pNotif = std::make_shared<LLNotification>(p); add(pNotif); return pNotif; } @@ -1834,7 +1841,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif) LLNotificationPtr LLNotifications::find(LLUUID uuid) { - LLNotificationPtr target = LLNotificationPtr(new LLNotification(LLNotification::Params().id(uuid))); + LLNotificationPtr target = std::make_shared<LLNotification>(LLNotification::Params().id(uuid)); LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 3c8e1e85fa..ea1cb7f638 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -75,6 +75,7 @@ * */ +#include <functional> #include <string> #include <list> #include <vector> @@ -83,8 +84,6 @@ #include <iomanip> #include <sstream> -#include <boost/utility.hpp> -#include <boost/type_traits.hpp> #include <boost/signals2.hpp> #include <boost/range.hpp> #include <boost/intrusive_ptr.hpp> @@ -94,6 +93,7 @@ #include "llinitparam.h" #include "llinstancetracker.h" #include "llmortician.h" +#include "llmutex.h" #include "llnotificationptr.h" #include "llpointer.h" #include "llrefcount.h" @@ -129,7 +129,7 @@ public: virtual void fromLLSD(const LLSD& params) = 0; }; -typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder; +typedef std::function<void (const LLSD&, const LLSD&)> LLNotificationResponder; typedef std::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr; @@ -303,7 +303,6 @@ typedef std::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRu * shared pointer. */ class LLNotification : - boost::noncopyable, public std::enable_shared_from_this<LLNotification> { LOG_CLASS(LLNotification); @@ -429,6 +428,10 @@ private: public: LLNotification(const LLSDParamAdapter<Params>& p); + // Non-copyable + LLNotification(const LLNotification&) = delete; + LLNotification& operator=(const LLNotification&) = delete; + void setResponseFunctor(std::string const &responseFunctorName); void setResponseFunctor(const LLNotificationFunctorRegistry::ResponseFunctor& cb); @@ -666,8 +669,8 @@ namespace LLNotificationFilters template<typename T> struct filterBy { - typedef boost::function<T (LLNotificationPtr)> field_t; - typedef typename boost::remove_reference<T>::type value_t; + typedef std::function<T (LLNotificationPtr)> field_t; + typedef typename std::remove_reference<T>::type value_t; filterBy(field_t field, value_t value, EComparison comparison = EQUAL) : mField(field), @@ -712,7 +715,7 @@ namespace LLNotificationComparators }; }; -typedef boost::function<bool (LLNotificationPtr)> LLNotificationFilter; +typedef std::function<bool (LLNotificationPtr)> LLNotificationFilter; typedef std::set<LLNotificationPtr, LLNotificationComparators::orderByUUID> LLNotificationSet; typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap; @@ -817,10 +820,9 @@ typedef boost::intrusive_ptr<LLNotificationChannel> LLNotificationChannelPtr; // manages a list of notifications // Note that if this is ever copied around, we might find ourselves with multiple copies // of a queue with notifications being added to different nonequivalent copies. So we -// make it inherit from boost::noncopyable, and then create a map of LLPointer to manage it. +// delete the copy operator and constructor, and then create a map of LLPointer to manage it. // class LLNotificationChannel : - boost::noncopyable, public LLNotificationChannelBase, public LLInstanceTracker<LLNotificationChannel, std::string> { @@ -843,6 +845,10 @@ public: virtual ~LLNotificationChannel(); typedef LLNotificationSet::iterator Iterator; + // Non-copyable + LLNotificationChannel(const LLNotificationChannel&) = delete; + LLNotificationChannel& operator=(const LLNotificationChannel&) = delete; + std::string getName() const { return mName; } typedef std::vector<std::string>::const_iterator parents_iter; boost::iterator_range<parents_iter> getParents() const @@ -854,7 +860,7 @@ public: S32 size() const; size_t size(); - typedef boost::function<void(LLNotificationPtr)> NotificationProcess; + typedef std::function<void(LLNotificationPtr)> NotificationProcess; void forEachNotification(NotificationProcess process); std::string summarize(); @@ -940,7 +946,7 @@ public: typedef std::vector<std::string> TemplateNames; TemplateNames getTemplateNames() const; // returns a list of notification names - typedef std::map<std::string, LLNotificationTemplatePtr, std::less<>> TemplateMap; + typedef std::unordered_map<std::string, LLNotificationTemplatePtr, ll::string_hash, std::equal_to<>> TemplateMap; TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); } TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); } @@ -986,7 +992,7 @@ private: LLNotificationMap mUniqueNotifications; - typedef std::map<std::string, std::string, std::less<>> GlobalStringMap; + typedef std::unordered_map<std::string, std::string, ll::string_hash, std::equal_to<>> GlobalStringMap; GlobalStringMap mGlobalStrings; bool mIgnoreAllNotifications; diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 9c1fc27c51..d07d42bdba 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -266,7 +266,7 @@ void LLNotificationsListener::forward(const LLSD& params) entry(mForwarders.insert(ForwarderMap::value_type(channel, ForwarderMap::mapped_type())).first); if (! entry->second) { - entry->second.reset(new Forwarder(mNotifications, channel)); + entry->second = std::make_shared<Forwarder>(mNotifications, channel); } // Now, whether this Forwarder is brand-new or not, update it with the new // request info. diff --git a/indra/llui/llnotificationsutil.cpp b/indra/llui/llnotificationsutil.cpp index c1cad431c5..6b570d043f 100644 --- a/indra/llui/llnotificationsutil.cpp +++ b/indra/llui/llnotificationsutil.cpp @@ -71,7 +71,7 @@ LLNotificationPtr LLNotificationsUtil::add(const std::string& name, LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& substitutions, const LLSD& payload, - boost::function<void (const LLSD&, const LLSD&)> functor) + std::function<void (const LLSD&, const LLSD&)> functor) { LLNotification::Params::Functor functor_p; functor_p.function = functor; diff --git a/indra/llui/llnotificationsutil.h b/indra/llui/llnotificationsutil.h index f21d93a50e..73e64e47ba 100644 --- a/indra/llui/llnotificationsutil.h +++ b/indra/llui/llnotificationsutil.h @@ -32,7 +32,7 @@ #include "llnotificationptr.h" #include "lluuid.h" -#include <boost/function.hpp> +#include <functional> class LLSD; @@ -55,7 +55,7 @@ namespace LLNotificationsUtil LLNotificationPtr add(const std::string& name, const LLSD& substitutions, const LLSD& payload, - boost::function<void (const LLSD&, const LLSD&)> functor); + std::function<void (const LLSD&, const LLSD&)> functor); S32 getSelectedOption(const LLSD& notification, const LLSD& response); diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index db314cae0f..2100b23783 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -662,12 +662,12 @@ bool LLPanel::childHasFocus(std::string_view id) // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)), // which takes a generic slot. Or use mCommitCallbackRegistrar.add() with // a named callback and reference it in XML. -void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data) +void LLPanel::childSetCommitCallback(std::string_view id, std::function<void (LLUICtrl*,void*)> cb, void* data) { LLUICtrl* child = findChild<LLUICtrl>(id); if (child) { - child->setCommitCallback(boost::bind(cb, child, data)); + child->setCommitCallback(std::bind(cb, child, data)); } } @@ -759,12 +759,12 @@ void LLPanel::childSetAction(std::string_view id, const commit_signal_t::slot_ty } } -void LLPanel::childSetAction(std::string_view id, boost::function<void(void*)> function, void* value) +void LLPanel::childSetAction(std::string_view id, std::function<void(void*)> function, void* value) { LLButton* button = findChild<LLButton>(id); if (button) { - button->setClickedCallback(boost::bind(function, value)); + button->setClickedCallback(std::bind(function, value)); } } diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index f085c123c1..a928997c7d 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -191,7 +191,7 @@ public: // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)), // which takes a generic slot. Or use mCommitCallbackRegistrar.add() with // a named callback and reference it in XML. - void childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data); + void childSetCommitCallback(std::string_view id, std::function<void (LLUICtrl*,void*)> cb, void* data); void childSetColor(std::string_view id, const LLUIColor& color); LLCtrlSelectionInterface* childGetSelectionInterface(std::string_view id) const; @@ -208,7 +208,7 @@ public: bool childSetLabelArg(std::string_view id, const std::string& key, const LLStringExplicit& text); // LLButton - void childSetAction(std::string_view id, boost::function<void(void*)> function, void* value); + void childSetAction(std::string_view id, std::function<void(void*)> function, void* value); void childSetAction(std::string_view id, const commit_signal_t::slot_type& function); static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL); @@ -250,7 +250,7 @@ private: LLButton* mDefaultBtn; LLUIString mLabel; - typedef std::map<std::string, std::string, std::less<>> ui_string_map_t; + typedef std::unordered_map<std::string, std::string, ll::string_hash, std::equal_to<>> ui_string_map_t; ui_string_map_t mUIStrings; @@ -262,7 +262,7 @@ extern template class LLPanel* LLView::getChild<class LLPanel>( std::string_view name, bool recurse) const; #endif -typedef boost::function<LLPanel* (void)> LLPanelClassCreatorFunc; +typedef std::function<LLPanel* (void)> LLPanelClassCreatorFunc; // local static instance for registering a particular panel class @@ -292,7 +292,7 @@ public: } private: - typedef std::map< std::string, LLPanelClassCreatorFunc, std::less<>> param_name_map_t; + typedef std::unordered_map<std::string, LLPanelClassCreatorFunc, ll::string_hash, std::equal_to<>> param_name_map_t; param_name_map_t mPanelClassesNames; }; diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 2aff434612..1dbd9f5b0c 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -67,7 +67,7 @@ protected: LLSD mPayload; // stores data that this item represents in the radio group }; -static LLWidgetNameRegistry::StaticRegistrar register_radio_item(&typeid(LLRadioGroup::ItemParams), "radio_item"); +static LLWidgetNameRegistry::StaticRegistrar register_radio_item(typeid(LLRadioGroup::ItemParams), "radio_item"); LLRadioGroup::Params::Params() : allow_deselect("allow_deselect"), diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 68bf0fd95e..d95536c360 100644 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -62,7 +62,7 @@ public: void setEnableSnapping(bool enable) { mSnappingEnabled = enable; } void setAllowDoubleClickSnapping(bool allow) { mAllowDoubleClickSnapping = allow; } bool canResize() const { return getEnabled() && mMaxSize > mMinSize; } - void setResizeListener(boost::function<void(void*)> listener) {mResizeListener = listener;} + void setResizeListener(std::function<void(void*)> listener) { mResizeListener = listener; } void setImagePanel(LLPanel * panelp); LLPanel * getImagePanel() const; @@ -78,7 +78,7 @@ private: bool mSnappingEnabled, mAllowDoubleClickSnapping; LLView* mResizingView; - boost::function<void(void*)> mResizeListener; + std::function<void(void*)> mResizeListener; LLPointer<LLUIImage> mDragHandleImage; LLPanel * mImagePanel; }; diff --git a/indra/llui/llrngwriter.cpp b/indra/llui/llrngwriter.cpp index 1b4008cff2..5b0d2315c1 100644 --- a/indra/llui/llrngwriter.cpp +++ b/indra/llui/llrngwriter.cpp @@ -94,7 +94,7 @@ void LLRNGWriter::addDefinition(const std::string& type_name, const LLInitParam: block.inspectBlock(*this); // add includes for all possible children - const std::type_info* type = *LLWidgetTypeRegistry::instance().getValue(type_name); + const std::type_index& type = *LLWidgetTypeRegistry::instance().getValue(type_name); const widget_registry_t* widget_registryp = LLChildRegistryRegistry::instance().getValue(type); // add include declarations for all valid children diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h index 9607355a9d..c49d2b534a 100644 --- a/indra/llui/llscrollbar.h +++ b/indra/llui/llscrollbar.h @@ -40,7 +40,7 @@ class LLScrollbar { public: - typedef boost::function<void (S32, LLScrollbar*)> callback_t; + typedef std::function<void (S32, LLScrollbar*)> callback_t; struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index a3108d77e8..bdf88768c3 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -98,6 +98,7 @@ const LLSD LLScrollListCell::getAltValue() const LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p) : LLScrollListCell(p), mIcon(LLUI::getUIImage(p.value().asString())), + mIconSize(0), mColor(p.color), mAlignment(p.font_halign) {} @@ -140,20 +141,32 @@ void LLScrollListIcon::setValue(const LLSD& value) } } - void LLScrollListIcon::setColor(const LLColor4& color) { mColor = color; } +void LLScrollListIcon::setIconSize(S32 size) +{ + mIconSize = size; +} + S32 LLScrollListIcon::getWidth() const { // if no specified fix width, use width of icon - if (LLScrollListCell::getWidth() == 0 && mIcon.notNull()) + if (LLScrollListCell::getWidth() != 0) + { + return LLScrollListCell::getWidth(); + } + if (mIconSize != 0) + { + return mIconSize; + } + if (mIcon.notNull()) { return mIcon->getWidth(); } - return LLScrollListCell::getWidth(); + return 0; } @@ -161,16 +174,23 @@ void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_col { if (mIcon) { + S32 draw_width = mIcon->getWidth(); + S32 draw_height = mIcon->getHeight(); + if (mIconSize != 0) + { + draw_width = mIconSize; + draw_height = mIconSize; + } // else will draw full icon even if cell is smaller switch(mAlignment) { case LLFontGL::LEFT: - mIcon->draw(0, 0, mColor); + mIcon->draw(0, 0, draw_width, draw_height, mColor); break; case LLFontGL::RIGHT: - mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor); + mIcon->draw(getWidth() - draw_width, 0, draw_width, draw_height, mColor); break; case LLFontGL::HCENTER: - mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor); + mIcon->draw((getWidth() - draw_width) / 2, 0, draw_width, draw_height, mColor); break; default: break; diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h index 7dded3c0b7..f0a0f216b4 100644 --- a/indra/llui/llscrolllistcell.h +++ b/indra/llui/llscrolllistcell.h @@ -197,11 +197,13 @@ public: /*virtual*/ const LLSD getValue() const; /*virtual*/ void setColor(const LLColor4&); /*virtual*/ void setValue(const LLSD& value); + void setIconSize(S32 size); private: LLPointer<LLUIImage> mIcon; LLColor4 mColor; LLFontGL::HAlign mAlignment; + S32 mIconSize; }; diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index a4510d1fc2..b5ba466750 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -39,7 +39,7 @@ const S32 MIN_COLUMN_WIDTH = 20; // defaults for LLScrollColumnHeader param block pulled from widgets/scroll_column_header.xml -static LLWidgetNameRegistry::StaticRegistrar sRegisterColumnHeaderParams(&typeid(LLScrollColumnHeader::Params), "scroll_column_header"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterColumnHeaderParams(typeid(LLScrollColumnHeader::Params), "scroll_column_header"); //--------------------------------------------------------------------------- // LLScrollColumnHeader diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index ff77b4d482..558ce6a7fd 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -190,19 +190,19 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mColumnsDirty(false), mMaxItemCount(INT_MAX), mBorderThickness( 2 ), - mOnDoubleClickCallback( NULL ), - mOnMaximumSelectCallback( NULL ), - mOnSortChangedCallback( NULL ), + mOnDoubleClickCallback(nullptr), + mOnMaximumSelectCallback(nullptr), + mOnSortChangedCallback(nullptr), mHighlightedItem(-1), - mBorder(NULL), - mSortCallback(NULL), + mBorder(nullptr), + mSortCallback(nullptr), mNumDynamicWidthColumns(0), mTotalStaticColumnWidth(0), mTotalColumnPadding(0), mSorted(false), mDirty(false), mOriginalSelection(-1), - mLastSelected(NULL), + mLastSelected(nullptr), mHeadingHeight(p.heading_height), mAllowMultipleSelection(p.multi_select), mDisplayColumnHeaders(p.draw_heading), @@ -222,7 +222,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mRowPadding(p.row_padding), mAlternateSort(false), mContextMenuType(MENU_NONE), - mIsFriendSignal(NULL) + mIsFriendSignal(nullptr) { mItemListRect.setOriginAndSize( mBorderThickness, @@ -3185,6 +3185,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS if (cell_p.width.isProvided()) { new_column.width.pixel_width = cell_p.width; + new_column.width.pixel_width.choose(); } addColumn(new_column); columnp = mColumns[column]; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 1f04100306..d3735c5052 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -77,7 +77,7 @@ public: }; // *TODO: Add callbacks to Params - typedef boost::function<void (void)> callback_t; + typedef std::function<void (void)> callback_t; template<typename T> struct maximum { @@ -241,7 +241,7 @@ public: void setMaximumSelectCallback( callback_t cb) { mOnMaximumSelectCallback = cb; } void setSortChangedCallback( callback_t cb) { mOnSortChangedCallback = cb; } // Convenience function; *TODO: replace with setter above + boost::bind() in calling code - void setDoubleClickCallback( boost::function<void (void* userdata)> cb, void* userdata) { mOnDoubleClickCallback = boost::bind(cb, userdata); } + void setDoubleClickCallback( std::function<void (void* userdata)> cb, void* userdata) { mOnDoubleClickCallback = std::bind(cb, userdata); } void swapWithNext(S32 index); void swapWithPrevious(S32 index); diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index a0c1e9d0c0..244faf8fe9 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -106,12 +106,12 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) LLSearchEditor::~LLSearchEditor() { - mKeystrokeCallback = NULL; - mTextChangedCallback = NULL; + mKeystrokeCallback = nullptr; + mTextChangedCallback = nullptr; setCommitOnFocusLost(false); - mSearchButton = NULL; - mClearButton = NULL; + mSearchButton = nullptr; + mClearButton = nullptr; mSearchEditor->deleteAllChildren(); deleteAllChildren(); } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 5e0985c79c..27f1dcb03d 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -483,7 +483,7 @@ void LLTabContainer::draw() tuple->mButton->setVisible( true ); } - S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos(); + S32 max_scroll_visible = getVisibleTabCount() - getMaxScrollPos() + getScrollPos(); S32 idx = 0; for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { @@ -1380,6 +1380,20 @@ S32 LLTabContainer::getTabCount() const return static_cast<S32>(mTabList.size()); } +S32 LLTabContainer::getVisibleTabCount() const +{ + S32 visible_count = 0; + for (tuple_list_t::const_iterator itr = mTabList.begin(); itr != mTabList.end(); ++itr) + { + const LLTabTuple* pTT = *itr; + if (pTT->mVisible) + { + visible_count++; + } + } + return visible_count; +} + LLPanel* LLTabContainer::getPanelByIndex(S32 index) const { if (index >= 0 && index < (S32)mTabList.size()) @@ -2109,6 +2123,14 @@ void LLTabContainer::updateMaxScrollPos() S32 tab_space = 0; S32 available_space = 0; tab_space = mTotalTabWidth; + for(tuple_list_t::const_iterator tab_it = mTabList.begin(); tab_it != mTabList.end(); ++tab_it) + { + const LLTabTuple* tuple = *tab_it; + if (!tuple->mVisible) + { + tab_space -= tuple->mButton->getRect().getWidth(); + } + } available_space = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_tab_h_pad); if( tab_space > available_space ) @@ -2118,7 +2140,7 @@ void LLTabContainer::updateMaxScrollPos() available_width_with_arrows -= tabcntr_tab_partial_width; S32 running_tab_width = 0; - setMaxScrollPos(getTabCount()); + setMaxScrollPos(getVisibleTabCount()); for(tuple_list_t::reverse_iterator tab_it = mTabList.rbegin(); tab_it != mTabList.rend(); ++tab_it) { running_tab_width += (*tab_it)->mButton->getRect().getWidth(); @@ -2129,7 +2151,7 @@ void LLTabContainer::updateMaxScrollPos() setMaxScrollPos(getMaxScrollPos()-1); } // in case last tab doesn't actually fit on screen, make it the last scrolling position - setMaxScrollPos(llmin(getMaxScrollPos(), getTabCount() - 1)); + setMaxScrollPos(llmin(getMaxScrollPos(), getVisibleTabCount() - 1)); no_scroll = false; } } @@ -2202,3 +2224,16 @@ void LLTabContainer::setTabVisibility( LLPanel const *aPanel, bool aVisible ) updateMaxScrollPos(); } + +bool LLTabContainer::getTabVisibility(const LLPanel* panel) const +{ + for (tuple_list_t::const_iterator itr = mTabList.begin(); itr != mTabList.end(); ++itr) + { + LLTabTuple const* pTT = *itr; + if (pTT->mTabPanel == panel) + { + return pTT->mVisible; + } + } + return false; +} diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 4ac7e73d25..3095e641f8 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -188,6 +188,7 @@ public: LLPanel* getCurrentPanel(); S32 getCurrentPanelIndex() const; S32 getTabCount() const; + S32 getVisibleTabCount() const; LLPanel* getPanelByIndex(S32 index) const; S32 getIndexForPanel(LLPanel* panel) const; S32 getPanelIndexByTitle(std::string_view title) const; @@ -225,6 +226,7 @@ public: S32 getMaxTabWidth() const { return mMaxTabWidth; } void setTabVisibility( LLPanel const *aPanel, bool ); + bool getTabVisibility(const LLPanel* panel) const; void startDragAndDropDelayTimer() { mDragAndDropDelayTimer.start(); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 44151a4355..5882c1edbb 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -51,6 +51,9 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. +constexpr F32 FOCUSED_SELECTION_BG_ALPHA = 1; +constexpr F32 UNFOCUSED_SELECTION_BG_ALPHA = 0.7f; + LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), mDocIndexEnd(index_end), @@ -129,7 +132,7 @@ struct LLTextBase::line_end_compare // // register LLTextBase::Params under name "textbase" -static LLWidgetNameRegistry::StaticRegistrar sRegisterTextBaseParams(&typeid(LLTextBase::Params), "textbase"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterTextBaseParams(typeid(LLTextBase::Params), "textbase"); LLTextBase::LineSpacingParams::LineSpacingParams() : multiple("multiple", 1.f), @@ -529,7 +532,7 @@ void LLTextBase::drawSelectionBackground() // Draw the selection box (we're using a box instead of reversing the colors on the selected text). gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); const LLColor4& color = mSelectedBGColor; - F32 alpha = hasFocus() ? 0.7f : 0.3f; + F32 alpha = hasFocus() ? FOCUSED_SELECTION_BG_ALPHA : UNFOCUSED_SELECTION_BG_ALPHA; alpha *= getDrawContext().mAlpha; LLColor4 selection_color(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], alpha); @@ -3477,7 +3480,6 @@ S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offs void LLTextSegment::updateLayout(const LLTextBase& editor) {} F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; } bool LLTextSegment::canEdit() const { return false; } -bool LLTextSegment::getPermitsEmoji() const { return true; } void LLTextSegment::unlinkFromDocument(LLTextBase*) {} void LLTextSegment::linkToDocument(LLTextBase*) {} const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; } @@ -3521,6 +3523,11 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e { mFontHeight = mStyle->getFont()->getLineHeight(); mCanEdit = !mStyle->getDrawHighlightBg(); + if (!mCanEdit) + { + // Emoji shouldn't split the segment with the mention. + mPermitsEmoji = false; + } LLUIImagePtr image = mStyle->getImage(); if (image.notNull()) @@ -4041,6 +4048,7 @@ LLInlineViewSegment::LLInlineViewSegment(const Params& p, S32 start, S32 end) mTopPad(p.top_pad), mBottomPad(p.bottom_pad) { + mPermitsEmoji = false; } LLInlineViewSegment::~LLInlineViewSegment() diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 50767a35b3..35477bdea9 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -61,13 +61,15 @@ class LLTextSegment public: LLTextSegment(S32 start, S32 end) : mStart(start), - mEnd(end) + mEnd(end), + mPermitsEmoji(true) {} virtual ~LLTextSegment(); virtual LLTextSegmentPtr clone(LLTextBase& terget) const { return new LLTextSegment(mStart, mEnd); } static LLStyleSP cloneStyle(LLTextBase& target, const LLStyle* source); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; + bool getPermitsEmoji() const { return mPermitsEmoji; }; virtual bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const; virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; @@ -87,7 +89,6 @@ public: virtual void updateLayout(const class LLTextBase& editor); virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); virtual bool canEdit() const; - virtual bool getPermitsEmoji() const; virtual void unlinkFromDocument(class LLTextBase* editor); virtual void linkToDocument(class LLTextBase* editor); @@ -126,6 +127,8 @@ public: protected: S32 mStart; S32 mEnd; + + bool mPermitsEmoji; }; class LLNormalTextSegment : public LLTextSegment @@ -405,6 +408,7 @@ public: /*virtual*/ void setColor(const LLUIColor& c) override; virtual void setReadOnlyColor(const LLUIColor& c); /*virtual*/ void onVisibilityChange(bool new_visibility) override; + void setBgReadOnlyColor(const LLUIColor& c) { mReadOnlyBgColor = c; } /*virtual*/ void setValue(const LLSD& value) override; /*virtual*/ LLTextViewModel* getViewModel() const override; diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 9f945d3735..d2a21998a6 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -43,7 +43,7 @@ template class LLTextBox* LLView::getChild<class LLTextBox>( LLTextBox::LLTextBox(const LLTextBox::Params& p) : LLTextBase(p), - mClickedCallback(NULL), + mClickedCallback(nullptr), mShowCursorHand(true) { mSkipTripleClick = true; @@ -135,9 +135,9 @@ void LLTextBox::setText(const LLStringExplicit& text , const LLStyle::Params& in LLTextBase::setText(mText.getString(), input_params ); } -void LLTextBox::setClickedCallback( boost::function<void (void*)> cb, void* userdata /*= NULL */ ) +void LLTextBox::setClickedCallback(std::function<void (void*)> cb, void* userdata /*= nullptr */) { - mClickedCallback = boost::bind(cb, userdata); + mClickedCallback = std::bind(cb, userdata); } S32 LLTextBox::getTextPixelWidth() diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index 507d8f3ee6..8716917ced 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -36,7 +36,7 @@ class LLTextBox : public: // *TODO: Add callback to Params - typedef boost::function<void (void)> callback_t; + typedef std::function<void (void)> callback_t; struct Params : public LLInitParam::Block<Params, LLTextBase::Params> {}; @@ -58,7 +58,7 @@ public: void setRightAlign() { mHAlign = LLFontGL::RIGHT; } void setHAlign(LLFontGL::HAlign align) { mHAlign = align; } - void setClickedCallback(boost::function<void(void*)> cb, void* userdata = NULL); + void setClickedCallback(std::function<void(void*)> cb, void* userdata = nullptr); void reshapeToFitText(bool called_from_parent = false); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 58b785fcdd..7689b93374 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -581,7 +581,7 @@ S32 LLTextEditor::indentLine( S32 pos, S32 spaces ) LLWString wtext = getWText(); if (wtext[pos] == ' ') { - delta_spaces += remove( pos, 1, false ); + delta_spaces -= remove( pos, 1, false ); } } } @@ -1242,7 +1242,7 @@ void LLTextEditor::addChar(llwchar wc) tryToShowEmojiHelper(); tryToShowMentionHelper(); - if (!mReadOnly && mAutoreplaceCallback != NULL) + if (!mReadOnly && mAutoreplaceCallback != nullptr) { // autoreplace the text, if necessary S32 replacement_start; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index cdfcbcdd63..d9742db34d 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -164,7 +164,7 @@ public: bool allowsEmbeddedItems() const { return mAllowEmbeddedItems; } // Autoreplace (formerly part of LLLineEditor) - typedef boost::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t; + typedef std::function<void(S32&, S32&, LLWString&, S32&, const LLWString&)> autoreplace_callback_t; autoreplace_callback_t mAutoreplaceCallback; void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp index 8ffce1b8b4..1454de34c7 100644 --- a/indra/llui/lltextutil.cpp +++ b/indra/llui/lltextutil.cpp @@ -30,7 +30,7 @@ #include "lltextbox.h" #include "llurlmatch.h" -boost::function<bool(LLUrlMatch*,LLTextBase*)> LLTextUtil::TextHelpers::iconCallbackCreationFunction = 0; +std::function<bool(LLUrlMatch*, LLTextBase*)> LLTextUtil::TextHelpers::iconCallbackCreationFunction = nullptr; void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& hl) { diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h index f3838e59fa..6328ff133f 100644 --- a/indra/llui/lltextutil.h +++ b/indra/llui/lltextutil.h @@ -74,7 +74,7 @@ namespace LLTextUtil //we need this special callback since we need to create LLAvataIconCtrls while parsing //avatar/group url but can't create LLAvataIconCtrl from LLUI public: - static boost::function<bool(LLUrlMatch*,LLTextBase*)> iconCallbackCreationFunction; + static std::function<bool(LLUrlMatch*,LLTextBase*)> iconCallbackCreationFunction; }; diff --git a/indra/llui/lltextvalidate.h b/indra/llui/lltextvalidate.h index a4ff144d82..096c28b448 100644 --- a/indra/llui/lltextvalidate.h +++ b/indra/llui/lltextvalidate.h @@ -30,7 +30,6 @@ #include "llstring.h" #include "llinitparam.h" -#include <boost/function.hpp> namespace LLTextValidate { diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 56ab6e9bae..785dc85448 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -99,8 +99,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mWrap(p.wrap), mNeedsLayout(false), mModified(false), - mButtonPanel(NULL), - mCenteringStack(NULL), + mButtonPanel(nullptr), + mCenteringStack(nullptr), mPadLeft(p.pad_left), mPadRight(p.pad_right), mPadTop(p.pad_top), @@ -108,17 +108,17 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mPadBetween(p.pad_between), mMinGirth(p.min_girth), mPopupMenuHandle(), - mRightMouseTargetButton(NULL), - mStartDragItemCallback(NULL), - mHandleDragItemCallback(NULL), - mHandleDropCallback(NULL), - mButtonAddSignal(NULL), - mButtonEnterSignal(NULL), - mButtonLeaveSignal(NULL), - mButtonRemoveSignal(NULL), + mRightMouseTargetButton(nullptr), + mStartDragItemCallback(nullptr), + mHandleDragItemCallback(nullptr), + mHandleDropCallback(nullptr), + mButtonAddSignal(nullptr), + mButtonEnterSignal(nullptr), + mButtonLeaveSignal(nullptr), + mButtonRemoveSignal(nullptr), mDragAndDropTarget(false), - mCaretIcon(NULL), - mCenterPanel(NULL) + mCaretIcon(nullptr), + mCenterPanel(nullptr) { mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text; mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon; @@ -1097,12 +1097,12 @@ LLToolBarButton::LLToolBarButton(const Params& p) mWidthRange(p.button_width), mDesiredHeight(p.desired_height), mId(""), - mIsEnabledSignal(NULL), - mIsRunningSignal(NULL), - mIsStartingSignal(NULL), + mIsEnabledSignal(nullptr), + mIsRunningSignal(nullptr), + mIsStartingSignal(nullptr), mIsDragged(false), - mStartDragItemCallback(NULL), - mHandleDragItemCallback(NULL), + mStartDragItemCallback(nullptr), + mHandleDragItemCallback(nullptr), mOriginalImageSelected(p.image_selected), mOriginalImageUnselected(p.image_unselected), mOriginalImagePressed(p.image_pressed), @@ -1256,7 +1256,7 @@ void LLToolBar::LLCenterLayoutPanel::handleReshape(const LLRect& rect, bool by_u { LLLayoutPanel::handleReshape(rect, by_user); - if (!mReshapeCallback.empty()) + if (mReshapeCallback != nullptr) { LLRect r; localRectToOtherView(mButtonPanel->getRect(), &r, gFloaterView); diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index a3f044c256..abf44f259a 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -39,9 +39,9 @@ class LLToolBar; class LLToolBarButton; class LLIconCtrl; -typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t; -typedef boost::function<bool (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; -typedef boost::function<bool (void* data, EDragAndDropType cargo_type, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t; +typedef std::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t; +typedef std::function<bool (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; +typedef std::function<bool (void* data, EDragAndDropType cargo_type, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t; class LLToolBarButton : public LLButton { @@ -167,7 +167,7 @@ public: class LLCenterLayoutPanel : public LLLayoutPanel { public: - typedef boost::function<void(LLToolBarEnums::EToolBarLocation tb, const LLRect& rect)> reshape_callback_t; + typedef std::function<void(LLToolBarEnums::EToolBarLocation tb, const LLRect& rect)> reshape_callback_t; virtual ~LLCenterLayoutPanel() {} /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 74f03618cf..c5b1b5ba1d 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -129,7 +129,7 @@ void LLToolTipView::drawStickyRect() } // defaults for floater param block pulled from widgets/floater.xml -static LLWidgetNameRegistry::StaticRegistrar sRegisterInspectorParams(&typeid(LLInspector::Params), "inspector"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterInspectorParams(typeid(LLInspector::Params), "inspector"); // // LLToolTip diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index 760acddd6f..c9d6937c1a 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -67,8 +67,8 @@ public: struct Params : public LLInitParam::Block<Params, LLPanel::Params> { - typedef boost::function<void(void)> click_callback_t; - typedef boost::function<LLToolTip*(LLToolTip::Params)> create_callback_t; + typedef std::function<void(void)> click_callback_t; + typedef std::function<LLToolTip*(LLToolTip::Params)> create_callback_t; Optional<std::string> message; Multiple<StyledText> styled_message; diff --git a/indra/llui/lltrans.h b/indra/llui/lltrans.h index c5d01e6f8d..4dba4c5c3e 100644 --- a/indra/llui/lltrans.h +++ b/indra/llui/lltrans.h @@ -125,7 +125,7 @@ public: } private: - typedef std::map<std::string, LLTransTemplate, std::less<>> template_map_t; + typedef std::unordered_map<std::string, LLTransTemplate, ll::string_hash, std::equal_to<>> template_map_t; static template_map_t sStringTemplates; static template_map_t sDefaultStringTemplates; static LLStringUtil::format_map_t sDefaultArgs; diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 179d1dcaff..5e01cffe38 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -65,7 +65,6 @@ // for XUIParse #include "llquaternion.h" -#include <boost/tokenizer.hpp> #include <boost/algorithm/string/find_iterator.hpp> #include <boost/algorithm/string/finder.hpp> @@ -157,6 +156,7 @@ mWindow(NULL), // set later in startup mRootView(NULL), mHelpImpl(NULL) { + LL_PROFILE_ZONE_SCOPED; LLRender2D::createInstance(image_provider); LLSpellChecker::createInstance(); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index b2dcb6dc88..091e0ab1cf 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -114,7 +114,7 @@ class LLUI : public LLSimpleton<LLUI> { LOG_CLASS(LLUI); public: - typedef std::map<std::string, LLControlGroup*, std::less<> > settings_map_t; + typedef std::unordered_map<std::string, LLControlGroup*, ll::string_hash, std::equal_to<>> settings_map_t; LLUI(const settings_map_t &settings, LLImageProviderInterface* image_provider, @@ -241,9 +241,9 @@ public: // // Methods // - typedef boost::function<void(LLView*)> add_popup_t; - typedef boost::function<void(LLView*)> remove_popup_t; - typedef boost::function<void(void)> clear_popups_t; + typedef std::function<void(LLView*)> add_popup_t; + typedef std::function<void(LLView*)> remove_popup_t; + typedef std::function<void(void)> clear_popups_t; void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& ); diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index a792cb8103..7a4f72fe4f 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -198,8 +198,8 @@ LLUIColor LLUIColorTable::getColor(std::string_view name, const LLColor4& defaul // update user color, loaded colors are parsed on initialization void LLUIColorTable::setColor(std::string_view name, const LLColor4& color) { - auto it = mUserSetColors.lower_bound(name); - if(it != mUserSetColors.end() && !(mUserSetColors.key_comp()(name, it->first))) + auto it = mUserSetColors.find(name); + if(it != mUserSetColors.end()) { it->second = color; } @@ -330,9 +330,8 @@ void LLUIColorTable::clearTable(string_color_map_t& table) // if the color already exists it changes the color void LLUIColorTable::setColor(std::string_view name, const LLColor4& color, string_color_map_t& table) { - string_color_map_t::iterator it = table.lower_bound(name); - if(it != table.end() - && !(table.key_comp()(name, it->first))) + string_color_map_t::iterator it = table.find(name); + if(it != table.end()) { it->second = color; } diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h index 0c6286e5eb..aff6f59db6 100644 --- a/indra/llui/lluicolortable.h +++ b/indra/llui/lluicolortable.h @@ -27,7 +27,7 @@ #ifndef LL_LLUICOLORTABLE_H_ #define LL_LLUICOLORTABLE_H_ -#include <map> +#include <unordered_map> #include "llinitparam.h" #include "llsingleton.h" @@ -42,7 +42,7 @@ class LLUIColorTable : public LLSingleton<LLUIColorTable> LOG_CLASS(LLUIColorTable); // consider using sorted vector, can be much faster - typedef std::map<std::string, LLUIColor, std::less<>> string_color_map_t; + typedef std::unordered_map<std::string, LLUIColor, ll::string_hash, std::equal_to<>> string_color_map_t; public: struct ColorParams : LLInitParam::ChoiceBlock<ColorParams> diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index cbabb5a933..9a27049d37 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -80,7 +80,7 @@ LLUICtrl::Params::Params() mouseenter_callback("mouseenter_callback"), mouseleave_callback("mouseleave_callback"), control_name("control_name"), - font("font", LLFontGL::getFontEmojiMedium()), + font("font", LLFontGL::getFontEmojiSmall()), font_halign("halign"), font_valign("valign"), length("length"), // ignore LLXMLNode cruft @@ -999,15 +999,16 @@ bool LLUICtrl::findHelpTopic(std::string& help_topic_out) } // *TODO: Deprecate; for backwards compatability only: -boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data) +boost::signals2::connection LLUICtrl::setCommitCallback( std::function<void (LLUICtrl*,void*)> cb, void* data) { - return setCommitCallback( boost::bind(cb, _1, data)); + return setCommitCallback( std::bind(cb, std::placeholders::_1, data)); } -boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb ) + +boost::signals2::connection LLUICtrl::setValidateBeforeCommit( std::function<bool (const LLSD& data)> cb ) { if (!mValidateSignal) mValidateSignal = new enable_signal_t(); - return mValidateSignal->connect(boost::bind(cb, _2)); + return mValidateSignal->connect(std::bind(cb, std::placeholders::_2)); } // virtual diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index bcaf479b0f..749999bbfe 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -31,7 +31,8 @@ //#include "llboost.h" #include "llrect.h" #include "llsd.h" -#include <boost/function.hpp> +#include <functional> +#include <boost/bind.hpp> #include <boost/signals2.hpp> #include "llinitparam.h" @@ -47,12 +48,12 @@ class LLUICtrl : public LLView, public boost::signals2::trackable { public: - typedef boost::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t; + typedef std::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t; typedef boost::signals2::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t; // *TODO: add xml support for this type of signal in the future typedef boost::signals2::signal<void (LLUICtrl* ctrl, S32 x, S32 y, MASK mask)> mouse_signal_t; - typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t; + typedef std::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t; typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t; struct CallbackParam : public LLInitParam::Block<CallbackParam> @@ -258,8 +259,8 @@ public: boost::signals2::connection setDoubleClickCallback( const mouse_signal_t::slot_type& cb ); // *TODO: Deprecate; for backwards compatability only: - boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data); - boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb ); + boost::signals2::connection setCommitCallback( std::function<void (LLUICtrl*,void*)> cb, void* data); + boost::signals2::connection setValidateBeforeCommit( std::function<bool (const LLSD& data)> cb ); LLUICtrl* findRootMostFocusRoot(); diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index a2a6d661ff..33ffc3dfc6 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -100,16 +100,19 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa std::string base_filename = search_paths.front(); if (!base_filename.empty()) { - LLUICtrlFactory::instance().pushFileName(base_filename); + LLUICtrlFactory *factory = LLUICtrlFactory::getInstance(); + factory->mFileNames.push_back(base_filename); - if (!LLXMLNode::getLayeredXMLNode(root_node, search_paths)) + if (LLXMLNode::getLayeredXMLNode(root_node, search_paths)) + { + LLXUIParser parser; + parser.readXUI(root_node, block, base_filename); + } + else { LL_WARNS() << "Couldn't parse widget from: " << base_filename << LL_ENDL; - return; } - LLXUIParser parser; - parser.readXUI(root_node, block, base_filename); - LLUICtrlFactory::instance().popFileName(); + factory->mFileNames.pop_back(); } } @@ -250,7 +253,7 @@ const LLInitParam::BaseBlock& get_empty_param_block() // adds a widget and its param block to various registries //static -void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& name) +void LLUICtrlFactory::registerWidget(std::type_index widget_type, std::type_index param_block_type, const std::string& name) { // associate parameter block type with template .xml file std::string* existing_name = LLWidgetNameRegistry::instance().getValue(param_block_type); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 91221dc7f3..f44b4ba4dc 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -65,7 +65,7 @@ class LLDefaultChildRegistry : public LLChildRegistry<LLDefaultChildRegistry> // lookup widget name by type class LLWidgetNameRegistry -: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry> +: public LLRegistrySingleton<std::type_index, std::string, LLWidgetNameRegistry> { LLSINGLETON_EMPTY_CTOR(LLWidgetNameRegistry); }; @@ -74,7 +74,7 @@ class LLWidgetNameRegistry // this is used for schema generation //typedef const LLInitParam::BaseBlock& (*empty_param_block_func_t)(); //class LLDefaultParamBlockRegistry -//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry> +//: public LLRegistrySingleton<std::type_index, empty_param_block_func_t, LLDefaultParamBlockRegistry> //{ // LLSINGLETON(LLDefaultParamBlockRegistry); //}; @@ -202,7 +202,7 @@ private: static void copyName(LLXMLNodePtr src, LLXMLNodePtr dest); // helper function for adding widget type info to various registries - static void registerWidget(const std::type_info* widget_type, const std::type_info* param_block_type, const std::string& tag); + static void registerWidget(std::type_index widget_type, std::type_index param_block_type, const std::string& tag); static void loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block); @@ -290,7 +290,7 @@ template <typename PARAM_BLOCK, int DUMMY> LLUICtrlFactory::ParamDefaults<PARAM_BLOCK, DUMMY>::ParamDefaults() { // look up template file for this param block... - const std::string* param_block_tag = LLWidgetNameRegistry::instance().getValue(&typeid(PARAM_BLOCK)); + const std::string* param_block_tag = LLWidgetNameRegistry::instance().getValue(typeid(PARAM_BLOCK)); if (param_block_tag) { // ...and if it exists, back fill values using the most specific template first PARAM_BLOCK params; @@ -311,15 +311,15 @@ LLUICtrlFactory::ParamDefaults<LLInitParam::BaseBlock, DUMMY>::ParamDefaults() { template<typename DERIVED> template<typename T> LLChildRegistry<DERIVED>::Register<T>::Register(const char* tag, LLWidgetCreatorFunc func) -: LLChildRegistry<DERIVED>::StaticRegistrar(tag, func.empty() ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T> : func) +: LLChildRegistry<DERIVED>::StaticRegistrar(tag, func == nullptr ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T> : func) { // add this widget to various registries - LLUICtrlFactory::instance().registerWidget(&typeid(T), &typeid(typename T::Params), tag); + LLUICtrlFactory::instance().registerWidget(typeid(T), typeid(typename T::Params), tag); // since registry_t depends on T, do this in line here // TODO: uncomment this for schema generation //typedef typename T::child_registry_t registry_t; - //LLChildRegistryRegistry::instance().defaultRegistrar().add(&typeid(T), registry_t::instance()); + //LLChildRegistryRegistry::instance().defaultRegistrar().add(typeid(T), registry_t::instance()); } #endif //LLUICTRLFACTORY_H diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 56d459bb26..c4cfd0f3fb 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -28,8 +28,8 @@ #ifndef LL_LLURLACTION_H #define LL_LLURLACTION_H +#include <functional> #include <string> -#include <boost/function.hpp> /// /// The LLUrlAction class provides a number of static functions that @@ -93,8 +93,8 @@ public: static void unblockObject(std::string url); /// specify the callbacks to enable this class's functionality - typedef boost::function<void (const std::string&)> url_callback_t; - typedef boost::function<bool(const std::string& url, bool trusted_content)> execute_url_callback_t; + typedef std::function<void (const std::string&)> url_callback_t; + typedef std::function<bool(const std::string& url, bool trusted_content)> execute_url_callback_t; static void setOpenURLCallback(url_callback_t cb); static void setOpenURLInternalCallback(url_callback_t cb); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 95603d7ed5..bba80dd20e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -234,7 +234,7 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const || label.find("www.") != std::string::npos) && label.find("://") == std::string::npos) { - label = "http://" + label; + label = "https://" + label; } return !LLUrlRegistry::instance().hasUrl(label); @@ -315,7 +315,7 @@ std::string LLUrlEntryHTTP::getUrl(const std::string &string) const { if (string.find("://") == std::string::npos) { - return "http://" + escapeUrl(string); + return "https://" + escapeUrl(string); } return escapeUrl(string); } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 97212a9d2d..d747ef9555 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -48,9 +48,8 @@ #include "lltreeiterators.h" #include "llfocusmgr.h" +#include <functional> #include <list> -#include <boost/function.hpp> -#include <boost/noncopyable.hpp> class LLSD; @@ -627,7 +626,7 @@ private: LLView& getDefaultWidgetContainer() const; // This allows special mouse-event targeting logic for testing. - typedef boost::function<bool(const LLView*, S32 x, S32 y)> DrilldownFunc; + typedef std::function<bool(const LLView*, S32 x, S32 y)> DrilldownFunc; static DrilldownFunc sDrilldown; public: @@ -637,7 +636,7 @@ public: // LLView::TemporaryDrilldownFunc scoped_func(myfunctor); // // ... test with myfunctor ... // } // exiting block restores original LLView::sDrilldown - class TemporaryDrilldownFunc: public boost::noncopyable + class TemporaryDrilldownFunc { public: TemporaryDrilldownFunc(const DrilldownFunc& func): @@ -651,6 +650,10 @@ public: sDrilldown = mOldDrilldown; } + // Non-copyable + TemporaryDrilldownFunc(const TemporaryDrilldownFunc&) = delete; + TemporaryDrilldownFunc& operator=(const TemporaryDrilldownFunc&) = delete; + private: DrilldownFunc mOldDrilldown; }; diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index d53fd6eb91..68ca61681c 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -149,7 +149,7 @@ void LLViewBorder::drawOnePixelLines() top_color = gFocusMgr.getFocusColor(); bottom_color = top_color; - LLUI::setLineWidth(lerp(1.f, 3.f, gFocusMgr.getFocusFlashAmt())); + LLUI::setLineWidth(lerp(1.f, 2.f, gFocusMgr.getFocusFlashAmt())); } S32 left = 0; diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 8cd11b86b3..52afac430e 100644 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -602,7 +602,7 @@ void LLXUIXSDWriter::writeXSD(const std::string& type_name, const std::string& p LLXSDWriter::writeXSD(type_name, root_nodep, block, "http://www.lindenlab.com/xui"); // add includes for all possible children - const std::type_info* type = *LLWidgetTypeRegistry::instance().getValue(type_name); + const std::type_index& type = *LLWidgetTypeRegistry::instance().getValue(type_name); const widget_registry_t* widget_registryp = LLChildRegistryRegistry::instance().getValue(type); // add choices for valid children @@ -1459,7 +1459,7 @@ void LLSimpleXUIParser::characterDataHandler(void *userData, const char *s, int void LLSimpleXUIParser::characterData(const char *s, int len) { - mTextContents += std::string(s, len); + mTextContents.append(s, len); } void LLSimpleXUIParser::startElement(const char *name, const char **atts) @@ -1480,24 +1480,24 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts) mOutputStack.back().second++; S32 num_tokens_pushed = 0; - std::string child_name(name); + std::string_view child_name(name); if (mOutputStack.back().second == 1) { // root node for this block - mScope.push_back(child_name); + mScope.emplace_back(child_name); } else { // compound attribute if (child_name.find(".") == std::string::npos) { - mNameStack.push_back(std::make_pair(child_name, true)); + mNameStack.emplace_back(child_name, true); num_tokens_pushed++; - mScope.push_back(child_name); + mScope.emplace_back(child_name); } else { // parse out "dotted" name into individual tokens - tokenizer name_tokens(child_name, sep); + tokenizer name_tokens(std::string(child_name), sep); tokenizer::iterator name_token_it = name_tokens.begin(); if(name_token_it == name_tokens.end()) @@ -1603,8 +1603,8 @@ bool LLSimpleXUIParser::processText() LLStringUtil::trim(mTextContents); if (!mTextContents.empty()) { - mNameStack.push_back(std::make_pair(std::string("value"), true)); - mCurAttributeValueBegin = mTextContents.c_str(); + mNameStack.emplace_back("value", true); + mCurAttributeValueBegin = std::move(mTextContents); mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently); mNameStack.pop_back(); } @@ -1648,12 +1648,12 @@ bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr) bool LLSimpleXUIParser::readBoolValue(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - if (!strcmp(self.mCurAttributeValueBegin, "true")) + if (!strcmp(self.mCurAttributeValueBegin.c_str(), "true")) { *((bool*)val_ptr) = true; return true; } - else if (!strcmp(self.mCurAttributeValueBegin, "false")) + else if (!strcmp(self.mCurAttributeValueBegin.c_str(), "false")) { *((bool*)val_ptr) = false; return true; @@ -1665,56 +1665,56 @@ bool LLSimpleXUIParser::readBoolValue(Parser& parser, void* val_ptr) bool LLSimpleXUIParser::readStringValue(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - *((std::string*)val_ptr) = self.mCurAttributeValueBegin; + *((std::string*)val_ptr) = std::move(self.mCurAttributeValueBegin); return true; } bool LLSimpleXUIParser::readU8Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, uint_p[assign_a(*(U8*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), uint_p[assign_a(*(U8*)val_ptr)]).full; } bool LLSimpleXUIParser::readS8Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, int_p[assign_a(*(S8*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), int_p[assign_a(*(S8*)val_ptr)]).full; } bool LLSimpleXUIParser::readU16Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, uint_p[assign_a(*(U16*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), uint_p[assign_a(*(U16*)val_ptr)]).full; } bool LLSimpleXUIParser::readS16Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, int_p[assign_a(*(S16*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), int_p[assign_a(*(S16*)val_ptr)]).full; } bool LLSimpleXUIParser::readU32Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, uint_p[assign_a(*(U32*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), uint_p[assign_a(*(U32*)val_ptr)]).full; } bool LLSimpleXUIParser::readS32Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, int_p[assign_a(*(S32*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), int_p[assign_a(*(S32*)val_ptr)]).full; } bool LLSimpleXUIParser::readF32Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, real_p[assign_a(*(F32*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), real_p[assign_a(*(F32*)val_ptr)]).full; } bool LLSimpleXUIParser::readF64Value(Parser& parser, void* val_ptr) { LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); - return parse(self.mCurAttributeValueBegin, real_p[assign_a(*(F64*)val_ptr)]).full; + return parse(self.mCurAttributeValueBegin.c_str(), real_p[assign_a(*(F64*)val_ptr)]).full; } bool LLSimpleXUIParser::readColor4Value(Parser& parser, void* val_ptr) @@ -1722,7 +1722,7 @@ bool LLSimpleXUIParser::readColor4Value(Parser& parser, void* val_ptr) LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); LLColor4 value; - if (parse(self.mCurAttributeValueBegin, real_p[assign_a(value.mV[0])] >> real_p[assign_a(value.mV[1])] >> real_p[assign_a(value.mV[2])] >> real_p[assign_a(value.mV[3])], space_p).full) + if (parse(self.mCurAttributeValueBegin.c_str(), real_p[assign_a(value.mV[0])] >> real_p[assign_a(value.mV[1])] >> real_p[assign_a(value.mV[2])] >> real_p[assign_a(value.mV[3])], space_p).full) { *(LLColor4*)(val_ptr) = value; return true; @@ -1736,7 +1736,7 @@ bool LLSimpleXUIParser::readUIColorValue(Parser& parser, void* val_ptr) LLColor4 value; LLUIColor* colorp = (LLUIColor*)val_ptr; - if (parse(self.mCurAttributeValueBegin, real_p[assign_a(value.mV[0])] >> real_p[assign_a(value.mV[1])] >> real_p[assign_a(value.mV[2])] >> real_p[assign_a(value.mV[3])], space_p).full) + if (parse(self.mCurAttributeValueBegin.c_str(), real_p[assign_a(value.mV[0])] >> real_p[assign_a(value.mV[1])] >> real_p[assign_a(value.mV[2])] >> real_p[assign_a(value.mV[3])], space_p).full) { colorp->set(value); return true; @@ -1749,7 +1749,7 @@ bool LLSimpleXUIParser::readUUIDValue(Parser& parser, void* val_ptr) LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser); LLUUID temp_id; // LLUUID::set is destructive, so use temporary value - if (temp_id.set(std::string(self.mCurAttributeValueBegin))) + if (temp_id.set(self.mCurAttributeValueBegin)) { *(LLUUID*)(val_ptr) = temp_id; return true; diff --git a/indra/llui/llxuiparser.h b/indra/llui/llxuiparser.h index f755c12cbf..3cc564772e 100644 --- a/indra/llui/llxuiparser.h +++ b/indra/llui/llxuiparser.h @@ -31,7 +31,7 @@ #include "llregistry.h" #include "llxmlnode.h" -#include <boost/function.hpp> +#include <functional> #include <iosfwd> #include <stack> #include <set> @@ -40,19 +40,19 @@ class LLView; // lookup widget type by name class LLWidgetTypeRegistry -: public LLRegistrySingleton<std::string, const std::type_info*, LLWidgetTypeRegistry> +: public LLRegistrySingleton<std::string, std::type_index, LLWidgetTypeRegistry> { LLSINGLETON_EMPTY_CTOR(LLWidgetTypeRegistry); }; // global static instance for registering all widget types -typedef boost::function<LLView* (LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)> LLWidgetCreatorFunc; +typedef std::function<LLView* (LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)> LLWidgetCreatorFunc; typedef LLRegistry<std::string, LLWidgetCreatorFunc> widget_registry_t; class LLChildRegistryRegistry -: public LLRegistrySingleton<const std::type_info*, widget_registry_t, LLChildRegistryRegistry> +: public LLRegistrySingleton<std::type_index, widget_registry_t, LLChildRegistryRegistry> { LLSINGLETON_EMPTY_CTOR(LLChildRegistryRegistry); }; @@ -247,7 +247,7 @@ private: S32 mCurReadDepth; std::string mCurFileName; std::string mTextContents; - const char* mCurAttributeValueBegin; + std::string mCurAttributeValueBegin; std::vector<S32> mTokenSizeStack; std::vector<std::string> mScope; std::vector<bool> mEmptyLeafNode; diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 7c2481a94c..589934fcce 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -749,12 +749,17 @@ void LLWebRTCImpl::intSetMute(bool mute, int delay_ms) { mPeerCustomProcessor->setGain(mMute ? 0.0f : mGain); } + + // Sequence counter to prevent race conditions from rapid requests to mute/unmute + static std::atomic<uint32_t> mute_sequence(0); + uint32_t current_sequence = ++mute_sequence; + if (mMute) { mWorkerThread->PostDelayedTask( - [this] + [this, current_sequence] { - if (mDeviceModule) + if (mDeviceModule && (current_sequence == mute_sequence.load())) { mDeviceModule->ForceStopRecording(); } @@ -764,9 +769,9 @@ void LLWebRTCImpl::intSetMute(bool mute, int delay_ms) else { mWorkerThread->PostTask( - [this] + [this, current_sequence] { - if (mDeviceModule) + if (mDeviceModule && (current_sequence == mute_sequence.load())) { mDeviceModule->InitRecording(); mDeviceModule->ForceStartRecording(); @@ -822,6 +827,8 @@ LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : mPeerConnection(nullptr), mMute(MUTE_INITIAL), mAnswerReceived(false), + mPeerConnectionState(webrtc::PeerConnectionInterface::PeerConnectionState::kNew), + mDisconnectCount(0), mPendingJobs(0) { } @@ -830,6 +837,7 @@ LLWebRTCPeerConnectionImpl::~LLWebRTCPeerConnectionImpl() { mSignalingObserverList.clear(); mDataObserverList.clear(); + mPeerConnectionFactory.release(); if (mPendingJobs > 0) { RTC_LOG(LS_ERROR) << __FUNCTION__ << "Destroying a connection that has " << std::to_string(mPendingJobs) << " unfinished jobs that might cause workers to crash"; @@ -893,7 +901,6 @@ void LLWebRTCPeerConnectionImpl::terminate() } mPendingJobs--; }); - mPeerConnectionFactory.release(); } void LLWebRTCPeerConnectionImpl::setSignalingObserver(LLWebRTCSignalingObserver *observer) { mSignalingObserverList.emplace_back(observer); } @@ -936,14 +943,17 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti config.set_max_port(60100); webrtc::PeerConnectionDependencies pc_dependencies(this); - if (mPeerConnectionFactory == nullptr) + // Other thread manages mPeerConnectionFactory's lifetime and it can be reset + // at any momment, create own scoped_refptr (atomic). + webrtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory = mPeerConnectionFactory; + if (peer_connection_factory == nullptr) { RTC_LOG(LS_ERROR) << __FUNCTION__ << "Error creating peer connection, factory doesn't exist"; // Too early? mPendingJobs--; return; } - auto error_or_peer_connection = mPeerConnectionFactory->CreatePeerConnectionOrError(config, std::move(pc_dependencies)); + auto error_or_peer_connection = peer_connection_factory->CreatePeerConnectionOrError(config, std::move(pc_dependencies)); if (error_or_peer_connection.ok()) { mPeerConnection = std::move(error_or_peer_connection.value()); @@ -976,10 +986,10 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti audioOptions.noise_suppression = true; audioOptions.init_recording_on_send = false; - mLocalStream = mPeerConnectionFactory->CreateLocalMediaStream("SLStream"); + mLocalStream = peer_connection_factory->CreateLocalMediaStream("SLStream"); webrtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( - mPeerConnectionFactory->CreateAudioTrack("SLAudio", mPeerConnectionFactory->CreateAudioSource(audioOptions).get())); + peer_connection_factory->CreateAudioTrack("SLAudio", peer_connection_factory->CreateAudioSource(audioOptions).get())); audio_track->set_enabled(false); mLocalStream->AddTrack(audio_track); @@ -1017,6 +1027,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti } webrtc::PeerConnectionInterface::RTCOfferAnswerOptions offerOptions; + this->AddRef(); // CreateOffer will deref this when it's done. Without this, the callbacks never get called. mPeerConnection->CreateOffer(this, offerOptions); mPendingJobs--; }); @@ -1244,11 +1255,15 @@ void LLWebRTCPeerConnectionImpl::OnIceGatheringChange(webrtc::PeerConnectionInte } } +static const webrtc::TimeDelta DISCONNECT_RENEGOTIATE_DELAY = webrtc::TimeDelta::Millis(10000); + // Called any time the PeerConnectionState changes. void LLWebRTCPeerConnectionImpl::OnConnectionChange(webrtc::PeerConnectionInterface::PeerConnectionState new_state) { RTC_LOG(LS_ERROR) << __FUNCTION__ << " Peer Connection State Change " << new_state; + mPeerConnectionState = new_state; + switch (new_state) { case webrtc::PeerConnectionInterface::PeerConnectionState::kConnected: @@ -1264,13 +1279,32 @@ void LLWebRTCPeerConnectionImpl::OnConnectionChange(webrtc::PeerConnectionInterf break; } case webrtc::PeerConnectionInterface::PeerConnectionState::kFailed: - case webrtc::PeerConnectionInterface::PeerConnectionState::kDisconnected: { for (auto &observer : mSignalingObserverList) { observer->OnRenegotiationNeeded(); } - + break; + } + case webrtc::PeerConnectionInterface::PeerConnectionState::kDisconnected: + { + // Wait 10 seconds before renegotiating in case the connection recovers on its own. + // Use a sequence count so that only the most recent disconnect transition can trigger + // a renegotiation, avoiding stale delayed tasks from earlier disconnect/reconnect cycles. + uint32_t disconnect_count = ++mDisconnectCount; + mWebRTCImpl->PostDelayedSignalingTask( + [this, disconnect_count]() + { + if (disconnect_count == mDisconnectCount + && mPeerConnectionState == webrtc::PeerConnectionInterface::PeerConnectionState::kDisconnected) + { + for (auto &observer : mSignalingObserverList) + { + observer->OnRenegotiationNeeded(); + } + } + }, + DISCONNECT_RENEGOTIATE_DELAY); break; } default: @@ -1543,6 +1577,57 @@ void LLWebRTCPeerConnectionImpl::unsetDataObserver(LLWebRTCDataObserver* observe } } +class LLStatsCollectorCallback : public webrtc::RTCStatsCollectorCallback +{ +public: + typedef std::function<void(const LLWebRTCStatsMap&)> StatsCallback; + + LLStatsCollectorCallback(StatsCallback callback) : callback_(callback) {} + + void OnStatsDelivered(const webrtc::scoped_refptr<const webrtc::RTCStatsReport>& report) override + { + if (callback_) + { + // Transform RTCStatsReport stats to simple map + LLWebRTCStatsMap stats_map; + for (const auto& stats : *report) + { + std::map<std::string, std::string> stat_attributes; + + // Convert each attribute to string format + for (const auto& attribute : stats.Attributes()) + { + stat_attributes[attribute.name()] = attribute.ToString(); + } + stats_map[stats.id()] = stat_attributes; + } + callback_(stats_map); + } + } + +private: + StatsCallback callback_; +}; + +void LLWebRTCPeerConnectionImpl::gatherConnectionStats() +{ + if (!mPeerConnection) + { + return; + } + + auto stats_callback = webrtc::make_ref_counted<LLStatsCollectorCallback>( + [this](const LLWebRTCStatsMap& generic_stats) + { + for (auto& observer : mSignalingObserverList) + { + observer->OnStatsDelivered(generic_stats); + } + }); + + mPeerConnection->GetStats(stats_callback.get()); +} + LLWebRTCImpl * gWebRTCImpl = nullptr; LLWebRTCDeviceInterface * getDeviceInterface() { diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index 7d06b7d2b4..e76e708f0c 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -38,6 +38,7 @@ #ifndef LLWEBRTC_H #define LLWEBRTC_H +#include <map> #include <string> #include <vector> @@ -55,6 +56,7 @@ namespace llwebrtc { +typedef std::map<std::string, std::map<std::string, std::string>> LLWebRTCStatsMap; class LLWebRTCLogCallback { @@ -240,6 +242,8 @@ class LLWebRTCSignalingObserver // Called when the data channel has been established and data // transfer can begin. virtual void OnDataChannelReady(LLWebRTCDataInterface *data_interface) = 0; + + virtual void OnStatsDelivered(const LLWebRTCStatsMap& stats_data) {} }; // LLWebRTCPeerConnectionInterface representsd a connection to a peer, @@ -273,6 +277,8 @@ class LLWebRTCPeerConnectionInterface virtual void unsetSignalingObserver(LLWebRTCSignalingObserver* observer) = 0; virtual void AnswerAvailable(const std::string &sdp) = 0; + + virtual void gatherConnectionStats() = 0; }; // The following define the dynamic linked library diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 9d3af985ef..2fd11b9b4f 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -345,6 +345,7 @@ public: inner_->InitRecording(); inner_->StartRecording(); } + inner_->InitPlayout(); inner_->StartPlayout(); } } @@ -489,6 +490,13 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceO mSignalingThread->PostTask(std::move(task), location); } + void PostDelayedSignalingTask(absl::AnyInvocable<void() &&> task, + webrtc::TimeDelta delay, + const webrtc::Location& location = webrtc::Location::Current()) + { + mSignalingThread->PostDelayedTask(std::move(task), delay, location); + } + void PostNetworkTask(absl::AnyInvocable<void() &&> task, const webrtc::Location& location = webrtc::Location::Current()) { @@ -658,6 +666,8 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnectionInterface, void enableSenderTracks(bool enable); void enableReceiverTracks(bool enable); + void gatherConnectionStats() override; + protected: LLWebRTCImpl * mWebRTCImpl; @@ -683,6 +693,10 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnectionInterface, std::vector<LLWebRTCDataObserver *> mDataObserverList; webrtc::scoped_refptr<webrtc::DataChannelInterface> mDataChannel; + // connection state tracking for delayed renegotiation on disconnect + webrtc::PeerConnectionInterface::PeerConnectionState mPeerConnectionState; + uint32_t mDisconnectCount; + std::atomic<int> mPendingJobs; }; diff --git a/indra/llwindow/llappdelegate-objc.h b/indra/llwindow/llappdelegate-objc.h index ef36f7d4a8..5b6e11e4e4 100644 --- a/indra/llwindow/llappdelegate-objc.h +++ b/indra/llwindow/llappdelegate-objc.h @@ -36,16 +36,17 @@ std::string secondLogPath; } -@property (assign) IBOutlet LLNSWindow *window; -@property (assign) IBOutlet NSWindow *inputWindow; -@property (assign) IBOutlet LLNonInlineTextView *inputView; +@property (assign) IBOutlet LLNSWindow * _Nullable window; +@property (assign) IBOutlet NSWindow * _Nullable inputWindow; +@property (assign) IBOutlet LLNonInlineTextView * _Nullable inputView; -@property (retain) NSString *currentInputLanguage; +@property (retain) NSString * _Nullable currentInputLanguage; - (void) oneFrame; -- (void) showInputWindow:(bool)show withEvent:(NSEvent*)textEvent; +- (void) showInputWindow:(bool)show withEvent:(nullable NSEvent *)textEvent; - (void) languageUpdated; - (bool) romanScript; +- (void) setBugsplatValue:(nullable NSString *)value forAttribute:(nullable NSString *)attribute; @end @interface LLApplication : NSApplication diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index a16c0a318a..d9c1a9cf7d 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -30,6 +30,8 @@ #include "llwindowcallbacks.h" +#include "llstl.h" + // // Globals // diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index a527227672..808be7b245 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -27,10 +27,9 @@ #ifndef LL_LLKEYBOARD_H #define LL_LLKEYBOARD_H +#include <functional> #include <map> -#include <boost/function.hpp> -#include "llstringtable.h" #include "lltimer.h" #include "indra_constants.h" @@ -41,7 +40,7 @@ enum EKeystate KEYSTATE_UP }; -typedef boost::function<bool(EKeystate keystate)> LLKeyFunc; +typedef std::function<bool(EKeystate keystate)> LLKeyFunc; typedef std::string (LLKeyStringTranslatorFunc)(std::string_view); enum EKeyboardInsertMode diff --git a/indra/llwindow/llkeyboardsdl.cpp b/indra/llwindow/llkeyboardsdl.cpp index 72b4577276..c8805300cb 100644 --- a/indra/llwindow/llkeyboardsdl.cpp +++ b/indra/llwindow/llkeyboardsdl.cpp @@ -23,6 +23,7 @@ * $/LicenseInfo$ */ +#include <set> #include "linden_common.h" #include "llkeyboardsdl.h" #include "llwindowcallbacks.h" diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index d63927d23d..80bfd60cd1 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -205,6 +205,8 @@ public: }; virtual S32 getRefreshRate() { return mRefreshRate; } + + virtual void initWatchdog() {} // windows runs window as a thread and it needs a watchdog protected: LLWindow(LLWindowCallbacks* callbacks, bool fullscreen, U32 flags); virtual ~LLWindow(); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 0bf1c4b057..42250535f0 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1262,9 +1262,6 @@ bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position) // trigger mouse move callback LLCoordGL gl_pos; convertCoords(position, &gl_pos); - float scale = getSystemUISize(); - gl_pos.mX *= scale; - gl_pos.mY *= scale; mCallbacks->handleMouseMove(this, gl_pos, (MASK)0); return result; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 5471e1c87a..dbdbfe390f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -49,6 +49,7 @@ #include "llthreadsafequeue.h" #include "stringize.h" #include "llframetimer.h" +#include "llwatchdog.h" // System includes #include <commdlg.h> @@ -364,7 +365,8 @@ static LLMonitorInfo sMonitorInfo; // the containing class a friend. struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool { - static const int MAX_QUEUE_SIZE = 2048; + static constexpr int MAX_QUEUE_SIZE = 2048; + static constexpr F32 WINDOW_TIMEOUT_SEC = 90.f; LLThreadSafeQueue<MSG> mMessageQueue; @@ -426,6 +428,50 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool PostMessage(windowHandle, WM_POST_FUNCTION_, wparam, LPARAM(ptr)); } + // Call from main thread. + void initTimeout() + { + // post into thread's queue to avoid threading issues + post([this]() + { + if (!mWindowTimeout) + { + mWindowTimeout = std::make_unique<LLWatchdogTimeout>("WindowThread"); + // supposed to be executed within run(), + // so no point checking if thread is alive + resumeTimeout("TimeoutInit"); + } + }); + } +private: + // These timeout related functions are strictly for the thread. + void resumeTimeout(std::string_view state) + { + if (mWindowTimeout) + { + mWindowTimeout->setTimeout(WINDOW_TIMEOUT_SEC); + mWindowTimeout->start(state); + } + } + + void pauseTimeout() + { + if (mWindowTimeout) + { + mWindowTimeout->stop(); + } + } + + void pingTimeout(std::string_view state) + { + if (mWindowTimeout) + { + mWindowTimeout->setTimeout(WINDOW_TIMEOUT_SEC); + mWindowTimeout->ping(state); + } + } + +public: using FuncType = std::function<void()>; // call GetMessage() and pull enqueue messages for later processing HWND mWindowHandleThrd = NULL; @@ -436,6 +482,8 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool bool mGLReady = false; bool mGotGLBuffer = false; LLAtomicBool mDeleteOnExit = false; +private: + std::unique_ptr<LLWatchdogTimeout> mWindowTimeout; }; @@ -2504,16 +2552,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // Comes after WM_QUERYENDSESSION LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_ENDSESSION"); LL_INFOS("Window") << "Received WM_ENDSESSION with wParam: " << (U32)w_param << " lParam: " << (U32)l_param << LL_ENDL; - unsigned int end_session_flags = (U32)w_param; - if (end_session_flags == 0) - { - // session is not actually ending - return 0; - } + unsigned int end_session_flags = (U32)l_param; - if ((end_session_flags & ENDSESSION_CLOSEAPP) - || (end_session_flags & ENDSESSION_CRITICAL) - || (end_session_flags & ENDSESSION_LOGOFF)) + if (w_param == TRUE // if true, session is ending + || end_session_flags == 0 // not possible to determine type of the event + // || (end_session_flags & ENDSESSION_CLOSEAPP)) system update or low resources, must be acompanied by w_param == TRUE + || (end_session_flags & ENDSESSION_CRITICAL) // will shutdown regardless of app state + || (end_session_flags & ENDSESSION_LOGOFF)) // logoff, can delay shutdown { window_imp->post([=]() { @@ -2522,13 +2567,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ { // Get the app to initiate cleanup. window_imp->mCallbacks->handleQuit(window_imp); - // The app is responsible for calling destroyWindow when done with GL } }); // Give app a second to finish up. That's not enough for a clean exit, // but better than nothing. // Todo: sync this better, some kind of waitForResult? Can't wait forever, - // but can potentially use ShutdownBlockReasonCreate for a bigger delay. + // but for ENDSESSION_LOGOFF can potentially use ShutdownBlockReasonCreate + // for a bigger delay. ms_sleep(1000); } // Don't need to post quit or destroy window, @@ -4600,6 +4645,11 @@ bool LLWindowWin32::getInputDevices(U32 device_type_filter, return false; } +void LLWindowWin32::initWatchdog() +{ + mWindowThread->initTimeout(); +} + F32 LLWindowWin32::getSystemUISize() { F32 scale_value = 1.f; @@ -4737,6 +4787,8 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem() return; } + pauseTimeout(); + IDXGIFactory4* p_factory = nullptr; HRESULT res = CreateDXGIFactory1(__uuidof(IDXGIFactory4), (void**)&p_factory); @@ -4840,6 +4892,8 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem() } mGotGLBuffer = true; + + resumeTimeout("checkDXMem"); } void LLWindowWin32::LLWindowWin32Thread::run() @@ -4855,6 +4909,9 @@ void LLWindowWin32::LLWindowWin32Thread::run() timeBeginPeriod(llclamp((U32) 1, tc.wPeriodMin, tc.wPeriodMax)); } + // Normally won't exist yet, but in case of re-init, make sure it's cleaned up + resumeTimeout("WindowThread"); + while (! getQueue().done()) { LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32; @@ -4864,6 +4921,7 @@ void LLWindowWin32::LLWindowWin32Thread::run() if (mWindowHandleThrd != 0) { + pingTimeout("messages"); MSG msg; BOOL status; if (mhDCThrd == 0) @@ -4891,6 +4949,7 @@ void LLWindowWin32::LLWindowWin32Thread::run() { LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - Function Queue"); + pingTimeout("queue"); logger.onChange("runPending()"); //process any pending functions getQueue().runPending(); @@ -4905,6 +4964,7 @@ void LLWindowWin32::LLWindowWin32Thread::run() #endif } + pauseTimeout(); destroyWindow(); if (mDeleteOnExit) diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 0fc93ad0b1..8159092794 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -45,83 +45,82 @@ typedef void (*LLW32MsgCallback)(const MSG &msg); class LLWindowWin32 : public LLWindow { public: - /*virtual*/ void show(); - /*virtual*/ void hide(); - /*virtual*/ void close(); - /*virtual*/ bool getVisible(); - /*virtual*/ bool getMinimized(); - /*virtual*/ bool getMaximized(); - /*virtual*/ bool maximize(); - /*virtual*/ void minimize(); - /*virtual*/ void restore(); - /*virtual*/ bool getFullscreen(); - /*virtual*/ bool getPosition(LLCoordScreen *position); - /*virtual*/ bool getSize(LLCoordScreen *size); - /*virtual*/ bool getSize(LLCoordWindow *size); - /*virtual*/ bool setPosition(LLCoordScreen position); - /*virtual*/ bool setSizeImpl(LLCoordScreen size); - /*virtual*/ bool setSizeImpl(LLCoordWindow size); - /*virtual*/ bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL); - /*virtual*/ void setTitle(const std::string title); + void show() override; + void hide() override; + void close() override; + bool getVisible() override; + bool getMinimized() override; + bool getMaximized() override; + bool maximize() override; + void minimize() override; + void restore() override; + bool getFullscreen(); + bool getPosition(LLCoordScreen *position) override; + bool getSize(LLCoordScreen *size) override; + bool getSize(LLCoordWindow *size) override; + bool setPosition(LLCoordScreen position) override; + bool setSizeImpl(LLCoordScreen size) override; + bool setSizeImpl(LLCoordWindow size) override; + bool switchContext(bool fullscreen, const LLCoordScreen &size, bool enable_vsync, const LLCoordScreen * const posp = NULL) override; + void setTitle(const std::string title) override; void* createSharedContext() override; void makeContextCurrent(void* context) override; void destroySharedContext(void* context) override; - /*virtual*/ void toggleVSync(bool enable_vsync); - /*virtual*/ bool setCursorPosition(LLCoordWindow position); - /*virtual*/ bool getCursorPosition(LLCoordWindow *position); - /*virtual*/ bool getCursorDelta(LLCoordCommon* delta); - /*virtual*/ bool isWrapMouse() const override { return !mAbsoluteCursorPosition; }; - /*virtual*/ void showCursor(); - /*virtual*/ void hideCursor(); - /*virtual*/ void showCursorFromMouseMove(); - /*virtual*/ void hideCursorUntilMouseMove(); - /*virtual*/ bool isCursorHidden(); - /*virtual*/ void updateCursor(); - /*virtual*/ ECursorType getCursor() const; - /*virtual*/ void captureMouse(); - /*virtual*/ void releaseMouse(); - /*virtual*/ void setMouseClipping( bool b ); - /*virtual*/ bool isClipboardTextAvailable(); - /*virtual*/ bool pasteTextFromClipboard(LLWString &dst); - /*virtual*/ bool copyTextToClipboard(const LLWString &src); - /*virtual*/ void flashIcon(F32 seconds); - /*virtual*/ F32 getGamma(); - /*virtual*/ bool setGamma(const F32 gamma); // Set the gamma - /*virtual*/ void setFSAASamples(const U32 fsaa_samples); - /*virtual*/ U32 getFSAASamples(); - /*virtual*/ bool restoreGamma(); // Restore original gamma table (before updating gamma) - /*virtual*/ ESwapMethod getSwapMethod() { return mSwapMethod; } - /*virtual*/ void gatherInput(); - /*virtual*/ void delayInputProcessing(); - /*virtual*/ void swapBuffers(); - /*virtual*/ void restoreGLContext() {}; + void toggleVSync(bool enable_vsync) override; + bool setCursorPosition(LLCoordWindow position) override; + bool getCursorPosition(LLCoordWindow *position) override; + bool getCursorDelta(LLCoordCommon* delta) override; + bool isWrapMouse() const override { return !mAbsoluteCursorPosition; }; + void showCursor() override; + void hideCursor() override; + void showCursorFromMouseMove() override; + void hideCursorUntilMouseMove() override; + bool isCursorHidden() override; + void updateCursor() override; + ECursorType getCursor() const override; + void captureMouse() override; + void releaseMouse() override; + void setMouseClipping( bool b ) override; + bool isClipboardTextAvailable() override; + bool pasteTextFromClipboard(LLWString &dst) override; + bool copyTextToClipboard(const LLWString &src) override; + void flashIcon(F32 seconds) override; + F32 getGamma() override; + bool setGamma(const F32 gamma) override; // Set the gamma + void setFSAASamples(const U32 fsaa_samples) override; + U32 getFSAASamples() override; + bool restoreGamma() override; // Restore original gamma table (before updating gamma) + ESwapMethod getSwapMethod() override { return mSwapMethod; } + void gatherInput() override; + void delayInputProcessing() override; + void swapBuffers() override; // handy coordinate space conversion routines - /*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordWindow *to); - /*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordScreen *to); - /*virtual*/ bool convertCoords(LLCoordWindow from, LLCoordGL *to); - /*virtual*/ bool convertCoords(LLCoordGL from, LLCoordWindow *to); - /*virtual*/ bool convertCoords(LLCoordScreen from, LLCoordGL *to); - /*virtual*/ bool convertCoords(LLCoordGL from, LLCoordScreen *to); + bool convertCoords(LLCoordScreen from, LLCoordWindow *to) override; + bool convertCoords(LLCoordWindow from, LLCoordScreen *to) override; + bool convertCoords(LLCoordWindow from, LLCoordGL *to) override; + bool convertCoords(LLCoordGL from, LLCoordWindow *to) override; + bool convertCoords(LLCoordScreen from, LLCoordGL *to) override; + bool convertCoords(LLCoordGL from, LLCoordScreen *to) override; - /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions); - /*virtual*/ F32 getNativeAspectRatio(); - /*virtual*/ F32 getPixelAspectRatio(); - /*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; } + LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) override; + F32 getNativeAspectRatio() override; + F32 getPixelAspectRatio() override; + void setNativeAspectRatio(F32 ratio) override { mOverrideAspectRatio = ratio; } - /*virtual*/ bool dialogColorPicker(F32 *r, F32 *g, F32 *b ); + bool dialogColorPicker(F32 *r, F32 *g, F32 *b ) override; - /*virtual*/ void *getPlatformWindow(); - /*virtual*/ void bringToFront(); - /*virtual*/ void focusClient(); + void *getPlatformWindow() override; + void bringToFront() override; + void focusClient() override; - /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, bool b); - /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); - /*virtual*/ void updateLanguageTextInputArea(); - /*virtual*/ void interruptLanguageTextInput(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); + void allowLanguageTextInput(LLPreeditor *preeditor, bool b) override; + void setLanguageTextInput( const LLCoordGL & pos ) override; + void updateLanguageTextInputArea() override; + void interruptLanguageTextInput() override; + void spawnWebBrowser(const std::string& escaped_url, bool async) override; - /*virtual*/ F32 getSystemUISize(); + F32 getSystemUISize() override; LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url ); @@ -129,14 +128,16 @@ public: static std::vector<std::string> getDynamicFallbackFontList(); static void setDPIAwareness(); - /*virtual*/ void* getDirectInput8(); - /*virtual*/ bool getInputDevices(U32 device_type_filter, + void* getDirectInput8() override; + bool getInputDevices(U32 device_type_filter, std::function<bool(std::string&, LLSD&, void*)> osx_callback, void* win_callback, - void* userdata); + void* userdata) override; U32 getRawWParam() { return mRawWParam; } + void initWatchdog() override; + protected: LLWindowWin32(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 562a30e8d1..34643d5f5c 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -157,9 +157,12 @@ LLControlVariable::LLControlVariable(const std::string& name, eControlType type, { if ((persist != PERSIST_NO) && mComment.empty()) { - // File isn't actually missing, but something is wrong with it - // so the main point is to warn user to reinstall - LLError::LLUserWarningMsg::showMissingFiles(); + std::string error_string = + "Second Life failed to initialize settings. Setting " + mName + " is invalid. " + "Either settings' files were supplied incorrectly or default files were corrupted." + "\n\nPlease reinstall viewer from https://secondlife.com/support/downloads/ and " + "contact https://support.secondlife.com if issue persists after reinstall."; + LLError::LLUserWarningMsg::show(error_string); LL_ERRS() << "Must supply a comment for control " << mName << LL_ENDL; } //Push back versus setValue'ing here, since we don't want to call a signal yet @@ -758,6 +761,7 @@ void LLControlGroup::setUntypedValue(std::string_view name, const LLSD& val) // Returns number of controls loaded, so 0 if failure U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, bool require_declaration, eControlType declare_as) { + LL_PROFILE_ZONE_SCOPED; std::string name; LLXmlTree xml_controls; @@ -990,8 +994,9 @@ U32 LLControlGroup::saveToFile(const std::string& filename, bool nondefault_only return num_saved; } -U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values, bool save_values) +U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values, bool save_values, bool error_when_no_comment) { + LL_PROFILE_ZONE_SCOPED; LLSD settings; llifstream infile; infile.open(filename.c_str()); @@ -1105,10 +1110,26 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v } } + std::string comment = control_map["Comment"].asString(); + if (!error_when_no_comment + && !set_default_values + && comment.empty()) + { + // Only error for default settings that should remind the developer to provide comments + // and otherwise indicate a problem with viewer's files. + // But permit this minor transgression in user's files. + // Otherwise user might have a hard time figuring out source of the error or how to fix it. + // Instead make setting to not persist so that unrecognized invalid settings won't be saved + // for the next run. + persist = LLControlVariable::PERSIST_NO; + comment = "Comment not provided, setting won't persist"; + LL_WARNS() << "Control " << name << " is missing a comment value. Setting will be marked as PERSIST_NO" << LL_ENDL; + } + declareControl(name, typeStringToEnum(control_map["Type"].asString()), control_map["Value"], - control_map["Comment"].asString(), + comment, persist, hidefromsettingseditor ); diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 4f54a9d705..5aa2b9715e 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -28,15 +28,17 @@ #define LL_LLCONTROL_H #include "llboost.h" -#include "llevent.h" #include "llstring.h" +#include "llpointer.h" #include "llrect.h" #include "llrefcount.h" #include "llinstancetracker.h" +#include "llstl.h" +#include <functional> +#include <unordered_map> #include <vector> -#include <boost/bind.hpp> #include <boost/signals2.hpp> class LLVector3; @@ -165,7 +167,7 @@ class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string> LOG_CLASS(LLControlGroup); protected: - typedef std::map<std::string, LLControlVariablePtr, std::less<> > ctrl_name_table_t; + using ctrl_name_table_t = std::unordered_map<std::string, LLControlVariablePtr, ll::string_hash, std::equal_to<>>; ctrl_name_table_t mNameTable; static const std::string mTypeString[TYPE_COUNT]; @@ -278,7 +280,7 @@ public: // as the given type. U32 loadFromFileLegacy(const std::string& filename, bool require_declaration = true, eControlType declare_as = TYPE_STRING); U32 saveToFile(const std::string& filename, bool nondefault_only); - U32 loadFromFile(const std::string& filename, bool default_values = false, bool save_values = true); + U32 loadFromFile(const std::string& filename, bool default_values = false, bool save_values = true, bool error_when_no_comment = true); void resetToDefaults(); void incrCount(std::string_view name); @@ -341,7 +343,7 @@ private: // Add a listener to the controls signal... // NOTE: All listeners connected to 0 group, for guaranty that variable handlers (gSavedSettings) call last mConnection = controlp->getSignal()->connect(0, - boost::bind(&LLControlCache<T>::handleValueChange, this, _2) + std::bind(&LLControlCache<T>::handleValueChange, this, std::placeholders::_2) ); mType = controlp->type(); } @@ -400,7 +402,7 @@ public: } operator const T&() const { return mCachedControlPtr->getValue(); } - operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); } + operator std::function<const T&()> () const { return std::function<const T&()>(*this); } const T& operator()() { return mCachedControlPtr->getValue(); } private: diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 042b658d75..236e117aa7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -49,11 +49,6 @@ if (LINUX) linux/volume_catcher_pipewire.cpp ) - if (NOT (${LINUX_DISTRO} MATCHES ubuntu)) - message( "Building with Linux volume catcher for PulseAudio only and cancelling PipeWire" ) - list(REMOVE_ITEM LINUX_VOLUME_CATCHER linux/volume_catcher_pipewire.cpp) - endif () - list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER}) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../../lib'") list(APPEND media_plugin_cef_LINK_LIBRARIES llwindow ) @@ -76,10 +71,6 @@ add_library(media_plugin_cef ${media_plugin_cef_SOURCE_FILES} ) -if (${LINUX_DISTRO} MATCHES ubuntu) - target_compile_definitions(media_plugin_cef PRIVATE USE_VOLUME_CATCHER_PW=1) -endif () - #add_dependencies(media_plugin_cef # ${MEDIA_PLUGIN_BASE_LIBRARIES} #) @@ -214,7 +205,6 @@ if (INSTALL) ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat ${AUTOBUILD_INSTALL_DIR}/resources/resources.pak - ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin DESTINATION llplugin ) diff --git a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp index ba2ed1aa56..7d33242063 100644 --- a/indra/media_plugins/cef/linux/volume_catcher_linux.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_linux.cpp @@ -37,14 +37,12 @@ void VolumeCatcher::onEnablePipeWireVolumeCatcher(bool enable) if (pimpl != nullptr) return; -#if USE_VOLUME_CATCHER_PW if (enable) { LL_DEBUGS() << "volume catcher using pipewire" << LL_ENDL; pimpl = new VolumeCatcherPipeWire(); } else -#endif { LL_DEBUGS() << "volume catcher using pulseaudio" << LL_ENDL; pimpl = new VolumeCatcherPulseAudio(); diff --git a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp index 27fea547c9..04bbbcff6c 100755 --- a/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp +++ b/indra/media_plugins/cef/linux/volume_catcher_pipewire.cpp @@ -207,7 +207,7 @@ void VolumeCatcherPipeWire::ChildNode::updateVolume() { std::lock_guard pwLock(*mImpl); - pw_node_set_param(mProxy, SPA_PARAM_Props, 0, pod); + pw_node_set_param((pw_node*)mProxy, SPA_PARAM_Props, 0, pod); } } @@ -303,7 +303,7 @@ void VolumeCatcherPipeWire::handleRegistryEventGlobal( childNode->mProxy = proxy; childNode->mImpl = this; - pw_node_add_listener(proxy, &childNode->mNodeListener, &NODE_EVENTS, childNode); + pw_node_add_listener((pw_node*)proxy, &childNode->mNodeListener, &NODE_EVENTS, childNode); llpw_proxy_add_listener(proxy, &childNode->mProxyListener, &PROXY_EVENTS, childNode); } diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 3fe2c2b193..edf93f359a 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -191,7 +191,11 @@ void MediaPluginLibVLC::initVLC() // void MediaPluginLibVLC::resetVLC() { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); libvlc_release(mLibVLC); } @@ -258,7 +262,11 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->mVlcStatus = STATUS_DONE; break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerEndReached: +#else + case libvlc_MediaPlayerStopping: +#endif parent->mVlcStatus = STATUS_DONE; parent->mCurTime = parent->mDuration; parent->setDurationDirty(); @@ -285,6 +293,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) parent->setDurationDirty(); break; +#if LIBVLC_VERSION_MAJOR < 4 case libvlc_MediaPlayerTitleChanged: { char* title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); @@ -294,6 +303,7 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) } } break; +#endif case libvlc_MediaMetaChanged: auto title = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_Title); if (title) @@ -331,10 +341,18 @@ void MediaPluginLibVLC::playMedia() // memory. if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str()); +#else + mLibVLCMedia = libvlc_media_new_location(mURL.c_str()); +#endif if (!mLibVLCMedia) { mLibVLCMediaPlayer = 0; @@ -342,7 +360,11 @@ void MediaPluginLibVLC::playMedia() return; } +#if LIBVLC_VERSION_MAJOR < 4 mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLCMedia); +#else + mLibVLCMediaPlayer = libvlc_media_player_new_from_media(mLibVLC, mLibVLCMedia); +#endif if (!mLibVLCMediaPlayer) { setStatus(STATUS_ERROR); @@ -357,12 +379,18 @@ void MediaPluginLibVLC::playMedia() libvlc_event_attach(em, libvlc_MediaPlayerPlaying, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPaused, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerStopped, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerEndReached, eventCallbacks, this); +#else + libvlc_event_attach(em, libvlc_MediaPlayerStopping, eventCallbacks, this); +#endif libvlc_event_attach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, this); libvlc_event_attach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, this); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this); +#endif } auto event_manager = libvlc_media_event_manager(mLibVLCMedia); if (event_manager) @@ -548,7 +576,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mPixels == iter->second.mAddress) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif libvlc_media_player_release(mLibVLCMediaPlayer); mLibVLCMediaPlayer = 0; @@ -612,7 +644,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { @@ -648,7 +684,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mLibVLCMediaPlayer) { +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } } else if (message_name == "start") @@ -658,9 +698,13 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mVlcStatus == STATUS_DONE && !libvlc_media_player_is_playing(mLibVLCMediaPlayer)) { // stop or vlc will ignore 'play', it will just - // make an MediaPlayerEndReached event even if + // make an MediaPlayerEndReached/MediaPlayerStopping event even if // seek was used +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_stop(mLibVLCMediaPlayer); +#else + libvlc_media_player_stop_async(mLibVLCMediaPlayer); +#endif } libvlc_media_player_play(mLibVLCMediaPlayer); } @@ -677,7 +721,11 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) if (mLibVLCMediaPlayer) { libvlc_time_t time = (libvlc_time_t)(1000.0 * message_in.getValueReal("time")); +#if LIBVLC_VERSION_MAJOR < 4 libvlc_media_player_set_time(mLibVLCMediaPlayer, time); +#else + libvlc_media_player_set_time(mLibVLCMediaPlayer, time, true); +#endif time = libvlc_media_player_get_time(mLibVLCMediaPlayer); if (time < 0) { diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a5d949d25b..9a2778f853 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -43,6 +43,7 @@ include(TinyEXR) include(ThreeJS) include(Tracy) include(UI) +#include(Velopack) include(ViewerMiscLibs) #include(ViewerManager) include(VisualLeakDetector) @@ -205,7 +206,6 @@ set(viewer_SOURCE_FILES llfloateravatartextures.cpp llfloaterbanduration.cpp llfloaterbeacons.cpp - llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp llfloaterbulkupload.cpp @@ -227,6 +227,7 @@ set(viewer_SOURCE_FILES llfloatercreatelandmark.cpp llfloaterdeleteprefpreset.cpp llfloaterdestinations.cpp + llfloaterdirectory.cpp llfloaterdisplayname.cpp llfloatereditenvironmentbase.cpp llfloatereditextdaycycle.cpp @@ -251,7 +252,6 @@ set(viewer_SOURCE_FILES llfloaterhelpbrowser.cpp llfloaterhoverheight.cpp mpfloatertuning.cpp - fsfloatersearch.cpp llfloaterhowto.cpp llfloaterhud.cpp llfloaterimagepreview.cpp @@ -289,7 +289,6 @@ set(viewer_SOURCE_FILES llfloaterpay.cpp llfloaterperformance.cpp llfloaterperms.cpp - llfloaterpostprocess.cpp llfloaterprofile.cpp llfloaterpreference.cpp llfloaterpreferencesgraphicsadvanced.cpp @@ -314,7 +313,6 @@ set(viewer_SOURCE_FILES llfloatersidepanelcontainer.cpp llfloaterslapptest.cpp llfloatersnapshot.cpp - llfloatersounddevices.cpp llfloaterspellchecksettings.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp @@ -326,7 +324,6 @@ set(viewer_SOURCE_FILES llfloatertranslationsettings.cpp llfloateruipreview.cpp llfloaterurlentry.cpp - llfloatervoiceeffect.cpp llfloatervoicevolume.cpp llfloaterwebcontent.cpp llfloaterwhitelistentry.cpp @@ -429,6 +426,7 @@ set(viewer_SOURCE_FILES llfloaterimnearbychat.cpp llfloaterimnearbychathandler.cpp llfloaterimnearbychatlistener.cpp + llnearbyvoicemoderation.cpp llnetmap.cpp llnotificationalerthandler.cpp llnotificationgrouphandler.cpp @@ -451,11 +449,20 @@ set(viewer_SOURCE_FILES llpanelblockedlist.cpp llpanelclassified.cpp llpanelcontents.cpp + llpaneldirbrowser.cpp + llpaneldirclassified.cpp + llpaneldirevents.cpp + llpaneldirgroups.cpp + llpaneldirland.cpp + llpaneldirpeople.cpp + llpaneldirplaces.cpp + llpaneldirweb.cpp llpaneleditsky.cpp llpaneleditwater.cpp llpaneleditwearable.cpp llpanelemojicomplete.cpp llpanelenvironment.cpp + llpaneleventinfo.cpp llpanelexperiencelisteditor.cpp llpanelexperiencelog.cpp llpanelexperiencepicker.cpp @@ -513,7 +520,6 @@ set(viewer_SOURCE_FILES llpanelsnapshotprofile.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp - llpanelvoiceeffect.cpp llpaneltopinfobar.cpp llpanelpulldown.cpp llpanelvoicedevicesettings.cpp @@ -659,6 +665,7 @@ set(viewer_SOURCE_FILES llurllineeditorctrl.cpp llurlwhitelist.cpp llversioninfo.cpp + llvvmquery.cpp llviewchildren.cpp llviewerassetstats.cpp llviewerassetstorage.cpp @@ -736,7 +743,6 @@ set(viewer_SOURCE_FILES llvovolume.cpp llvowater.cpp llvowlsky.cpp - llwatchdog.cpp llwearableitemslist.cpp llwearablelist.cpp llweb.cpp @@ -760,7 +766,7 @@ set(viewer_SOURCE_FILES rlvhandler.cpp ) -if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)) +if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64)) list(REMOVE_ITEM viewer_SOURCE_FILES llvoicewebrtc.cpp) endif () @@ -891,7 +897,6 @@ set(viewer_HEADER_FILES llfloateravatartextures.h llfloaterbanduration.h llfloaterbeacons.h - llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h llfloaterbulkupload.h @@ -913,6 +918,7 @@ set(viewer_HEADER_FILES llfloatercreatelandmark.h llfloaterdeleteprefpreset.h llfloaterdestinations.h + llfloaterdirectory.h llfloaterdisplayname.h llfloatereditenvironmentbase.h llfloatereditextdaycycle.h @@ -937,7 +943,6 @@ set(viewer_HEADER_FILES llfloaterhelpbrowser.h llfloaterhoverheight.h mpfloatertuning.h - fsfloatersearch.h llfloaterhowto.h llfloaterhud.h llfloaterimagepreview.h @@ -979,7 +984,6 @@ set(viewer_HEADER_FILES llfloaterpay.h llfloaterperformance.h llfloaterperms.h - llfloaterpostprocess.h llfloaterprofile.h llfloaterpreference.h llfloaterpreferencesgraphicsadvanced.h @@ -1004,7 +1008,6 @@ set(viewer_HEADER_FILES llfloatersidepanelcontainer.h llfloaterslapptest.h llfloatersnapshot.h - llfloatersounddevices.h llfloaterspellchecksettings.h llfloatertelehub.h llfloatertestinspectors.h @@ -1016,7 +1019,6 @@ set(viewer_HEADER_FILES llfloatertranslationsettings.h llfloateruipreview.h llfloaterurlentry.h - llfloatervoiceeffect.h llfloatervoicevolume.h llfloaterwebcontent.h llfloaterwhitelistentry.h @@ -1113,6 +1115,7 @@ set(viewer_HEADER_FILES llnameeditor.h llnamelistctrl.h llnavigationbar.h + llnearbyvoicemoderation.h llnetmap.h llnotificationhandler.h llnotificationlistitem.h @@ -1129,11 +1132,20 @@ set(viewer_HEADER_FILES llpanelblockedlist.h llpanelclassified.h llpanelcontents.h + llpaneldirbrowser.h + llpaneldirclassified.h + llpaneldirevents.h + llpaneldirgroups.h + llpaneldirland.h + llpaneldirpeople.h + llpaneldirplaces.h + llpaneldirweb.h llpaneleditsky.h llpaneleditwater.h llpaneleditwearable.h llpanelemojicomplete.h llpanelenvironment.h + llpaneleventinfo.h llpanelexperiencelisteditor.h llpanelexperiencelog.h llpanelexperiencepicker.h @@ -1189,7 +1201,6 @@ set(viewer_HEADER_FILES llpaneltiptoast.h llpanelpulldown.h llpanelvoicedevicesettings.h - llpanelvoiceeffect.h llpaneltopinfobar.h llpanelvolume.h llpanelvolumepulldown.h @@ -1339,6 +1350,7 @@ set(viewer_HEADER_FILES llurllineeditorctrl.h llurlwhitelist.h llversioninfo.h + llvvmquery.h llviewchildren.h llviewerassetstats.h llviewerassetstorage.h @@ -1415,7 +1427,6 @@ set(viewer_HEADER_FILES llvovolume.h llvowater.h llvowlsky.h - llwatchdog.h llwearableitemslist.h llwearablelist.h llweb.h @@ -1465,6 +1476,8 @@ if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.h) LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm) LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h) + LIST(APPEND viewer_SOURCE_FILES llvelopack.cpp) + LIST(APPEND viewer_HEADER_FILES llvelopack.h) set_source_files_properties( llappviewermacosx-objc.mm @@ -1530,16 +1543,19 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES llappviewerwin32.cpp + llvelopack.cpp llwindebug.cpp ) set_source_files_properties( llappviewerwin32.cpp + llvelopack.cpp PROPERTIES COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" ) list(APPEND viewer_HEADER_FILES llappviewerwin32.h + llvelopack.h llwindebug.h ) @@ -2059,6 +2075,7 @@ if (WINDOWS) "--discord=${USE_DISCORD}" "--openal=${USE_OPENAL}" "--tracy=${USE_TRACY}" + "--velopack=${USE_VELOPACK}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=$<CONFIG> "--channel=${VIEWER_CHANNEL}" @@ -2100,6 +2117,7 @@ elseif (DARWIN) XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos" ) + add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos) elseif(HAVOK_TPV) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2110,6 +2128,7 @@ elseif (DARWIN) XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${ARCH_PREBUILT_DIRS}/ -lllphysicsextensions_tpv" XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos" ) + add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos) else() target_link_libraries(${VIEWER_BINARY_NAME} llphysicsextensionsos) endif() @@ -2177,7 +2196,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::openxr ) -if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64) OR (${LINUX_DISTRO} MATCHES debian AND CMAKE_SYSTEM_PROCESSOR MATCHES aarch64))) +if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch64))) target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) endif () @@ -2192,6 +2211,10 @@ if (USE_DISCORD) target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk ) endif () +if (TARGET ll::velopack) + target_link_libraries(${VIEWER_BINARY_NAME} ll::velopack ) +endif () + if( TARGET ll::intel_memops ) target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops ) endif() @@ -2263,6 +2286,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU) gltf/animation.cpp gltf/primitive.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-function) + set_source_files_properties(llmutelist.cpp + PROPERTIES COMPILE_FLAGS -Wno-free-nonheap-object) endif () message("Copying fonts") @@ -2349,15 +2374,10 @@ if (LINUX) set(CPACK_DEBIAN_PACKAGE_SECTION net CACHE STRING "Debian package section.") if (${LINUX_DISTRO} MATCHES debian) - if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libalut0, libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.4, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libopenjp2-7, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" - CACHE STRING "Debian package dependencies.") - else () - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.4, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libopenjp2-7, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libalut0, libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.4, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libopenjp2-7, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" CACHE STRING "Debian package dependencies.") - endif () else () - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.3t64, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libalut0, libaprutil1t64, libboost-fiber1.90.0, libboost-filesystem1.90.0, libboost-program-options1.90.0, libboost-regex1.90.0, libboost-thread1.90.0, libboost-url1.90.0, libexpat1, libfltk1.4, libgles-dev, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libminizip1t64, libnghttp2-14, libnspr4, libnss3, libopenjp2-7, libsdl2-2.0-0, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" CACHE STRING "Debian package dependencies.") endif () elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) @@ -2375,10 +2395,10 @@ if (LINUX) set(CPACK_RPM_PACKAGE_DESCRIPTION ${VIEWER_PACKAGE_DESCRIPTION} CACHE STRING "RPM package description.") if (${LINUX_DISTRO} MATCHES fedora) - set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, vlc-libs, vlc-plugins-base, libvorbis" + set(CPACK_RPM_PACKAGE_REQUIRES "freealut, apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg, sdl2-compat, vlc-libs, vlc-plugins-base, libvorbis" CACHE STRING "RPM package requirements.") else () - set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_90_0, libboost_program_options1_90_0, libboost_regex1_90_0, libboost_thread1_90_0, libboost_url1_90_0, libboost_url1_90_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0" + set(CPACK_RPM_PACKAGE_REQUIRES "libalut0, libapr-util1-0, libboost_fiber1_91_0, libboost_program_options1_91_0, libboost_regex1_91_0, libboost_thread1_91_0, libboost_url1_91_0, libboost_url1_91_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, libvorbis0" CACHE STRING "RPM package requirements.") endif () endif () @@ -2550,9 +2570,11 @@ if (DARWIN) --arch=${ARCH} --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" + --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER} "--discord=${USE_DISCORD}" "--openal=${USE_OPENAL}" "--tracy=${USE_TRACY}" + "--velopack=${USE_VELOPACK}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=$<CONFIG> "--channel=${VIEWER_CHANNEL}" diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index fbeea05359..77b4683c88 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -80,18 +80,18 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicudata.76.dylib" - "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.76.dylib" + "../../../../Frameworks/libicudata.78.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.78.dylib" SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicui18n.76.dylib" - "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.76.dylib" + "../../../../Frameworks/libicui18n.78.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.78.dylib" SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicuuc.76.dylib" - "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.76.dylib" + "../../../../Frameworks/libicuuc.78.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.78.dylib" SYMBOLIC ) file(CREATE_LINK @@ -158,9 +158,9 @@ execute_process( COMMAND lipo libbz2.1.0.8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbz2.1.0.8.dylib - COMMAND lipo libexpat.1.11.1.dylib + COMMAND lipo libexpat.1.11.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libexpat.1.11.1.dylib + -output libexpat.1.11.3.dylib COMMAND lipo libfreetype.6.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libfreetype.6.dylib @@ -170,24 +170,21 @@ execute_process( COMMAND lipo libiconv.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libiconv.2.dylib - COMMAND lipo libicudata.76.1.dylib + COMMAND lipo libicudata.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicudata.76.1.dylib - COMMAND lipo libicui18n.76.1.dylib + -output libicudata.78.3.dylib + COMMAND lipo libicui18n.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicui18n.76.1.dylib - COMMAND lipo libicuuc.76.1.dylib + -output libicui18n.78.3.dylib + COMMAND lipo libicuuc.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicuuc.76.1.dylib + -output libicuuc.78.3.dylib COMMAND lipo libjpeg.8.3.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libjpeg.8.3.2.dylib COMMAND lipo libllwebrtc.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libllwebrtc.dylib - COMMAND lipo liblzma.5.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output liblzma.5.dylib COMMAND lipo libminizip.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libminizip.1.dylib @@ -203,9 +200,9 @@ execute_process( COMMAND lipo libogg.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libogg.0.dylib - COMMAND lipo libopenal.1.24.2.dylib + COMMAND lipo libopenal.1.25.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libopenal.1.24.2.dylib + -output libopenal.1.25.1.dylib COMMAND lipo libopenjp2.2.5.4.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenjp2.2.5.4.dylib @@ -227,12 +224,12 @@ execute_process( COMMAND lipo libvorbisfile.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libvorbisfile.3.dylib - COMMAND lipo libxml2.2.dylib + COMMAND lipo libxml2.16.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libxml2.2.dylib - COMMAND lipo libz.1.3.1.dylib + -output libxml2.16.dylib + COMMAND lipo libz.1.3.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libz.1.3.1.dylib + -output libz.1.3.2.dylib WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Frameworks ERROR_QUIET ) @@ -261,22 +258,21 @@ execute_process( Frameworks/libbrotlidec.1.2.0.dylib Frameworks/libbz2.1.0.8.dylib Frameworks/libdiscord_partner_sdk.dylib - Frameworks/libexpat.1.11.1.dylib + Frameworks/libexpat.1.11.3.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib Frameworks/libiconv.2.dylib - Frameworks/libicudata.76.1.dylib - Frameworks/libicui18n.76.1.dylib - Frameworks/libicuuc.76.1.dylib + Frameworks/libicudata.78.3.dylib + Frameworks/libicui18n.78.3.dylib + Frameworks/libicuuc.78.3.dylib Frameworks/libjpeg.8.3.2.dylib Frameworks/libllwebrtc.dylib - Frameworks/liblzma.5.dylib Frameworks/libminizip.1.dylib Frameworks/libncurses.6.dylib Frameworks/libndofdev.dylib Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib - Frameworks/libopenal.1.24.2.dylib + Frameworks/libopenal.1.25.1.dylib Frameworks/libopenjp2.2.5.4.dylib Frameworks/libpng16.16.dylib Frameworks/libvlc.5.dylib @@ -284,8 +280,8 @@ execute_process( Frameworks/libvorbis.0.dylib Frameworks/libvorbisenc.2.dylib Frameworks/libvorbisfile.3.dylib - Frameworks/libxml2.2.dylib - Frameworks/libz.1.3.1.dylib + Frameworks/libxml2.16.dylib + Frameworks/libz.1.3.2.dylib Resources/libndofdev.dylib Resources/SLPlugin.app/Contents/Frameworks/media_plugin_cef.dylib Resources/SLPlugin.app/Contents/Frameworks/media_plugin_libvlc.dylib diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 17272f5881..e67026aabb 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -80,18 +80,18 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicudata.76.dylib" - "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.76.dylib" + "../../../../Frameworks/libicudata.78.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.78.dylib" SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicui18n.76.dylib" - "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.76.dylib" + "../../../../Frameworks/libicui18n.78.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.78.dylib" SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libicuuc.76.dylib" - "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.76.dylib" + "../../../../Frameworks/libicuuc.78.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.78.dylib" SYMBOLIC ) file(CREATE_LINK @@ -158,9 +158,9 @@ execute_process( COMMAND lipo libbz2.1.0.8.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbz2.1.0.8.dylib - COMMAND lipo libexpat.1.11.1.dylib + COMMAND lipo libexpat.1.11.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libexpat.1.11.1.dylib + -output libexpat.1.11.3.dylib COMMAND lipo libfreetype.6.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libfreetype.6.dylib @@ -170,24 +170,21 @@ execute_process( COMMAND lipo libiconv.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libiconv.2.dylib - COMMAND lipo libicudata.76.1.dylib + COMMAND lipo libicudata.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicudata.76.1.dylib - COMMAND lipo libicui18n.76.1.dylib + -output libicudata.78.3.dylib + COMMAND lipo libicui18n.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicui18n.76.1.dylib - COMMAND lipo libicuuc.76.1.dylib + -output libicui18n.78.3.dylib + COMMAND lipo libicuuc.78.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libicuuc.76.1.dylib + -output libicuuc.78.3.dylib COMMAND lipo libjpeg.8.3.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libjpeg.8.3.2.dylib COMMAND lipo libllwebrtc.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libllwebrtc.dylib - COMMAND lipo liblzma.5.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output liblzma.5.dylib COMMAND lipo libminizip.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libminizip.1.dylib @@ -203,9 +200,9 @@ execute_process( COMMAND lipo libogg.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libogg.0.dylib - COMMAND lipo libopenal.1.24.2.dylib + COMMAND lipo libopenal.1.25.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libopenal.1.24.2.dylib + -output libopenal.1.25.1.dylib COMMAND lipo libopenjp2.2.5.4.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenjp2.2.5.4.dylib @@ -227,12 +224,12 @@ execute_process( COMMAND lipo libvorbisfile.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libvorbisfile.3.dylib - COMMAND lipo libxml2.2.dylib + COMMAND lipo libxml2.16.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libxml2.2.dylib - COMMAND lipo libz.1.3.1.dylib + -output libxml2.16.dylib + COMMAND lipo libz.1.3.2.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libz.1.3.1.dylib + -output libz.1.3.2.dylib WORKING_DIRECTORY ${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Frameworks ERROR_QUIET ) @@ -261,22 +258,21 @@ execute_process( Frameworks/libbrotlidec.1.2.0.dylib Frameworks/libbz2.1.0.8.dylib Frameworks/libdiscord_partner_sdk.dylib - Frameworks/libexpat.1.11.1.dylib + Frameworks/libexpat.1.11.3.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib Frameworks/libiconv.2.dylib - Frameworks/libicudata.76.1.dylib - Frameworks/libicui18n.76.1.dylib - Frameworks/libicuuc.76.1.dylib + Frameworks/libicudata.78.3.dylib + Frameworks/libicui18n.78.3.dylib + Frameworks/libicuuc.78.3.dylib Frameworks/libjpeg.8.3.2.dylib Frameworks/libllwebrtc.dylib - Frameworks/liblzma.5.dylib Frameworks/libminizip.1.dylib Frameworks/libncurses.6.dylib Frameworks/libndofdev.dylib Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib - Frameworks/libopenal.1.24.2.dylib + Frameworks/libopenal.1.25.1.dylib Frameworks/libopenjp2.2.5.4.dylib Frameworks/libpng16.16.dylib Frameworks/libvlc.5.dylib @@ -284,8 +280,8 @@ execute_process( Frameworks/libvorbis.0.dylib Frameworks/libvorbisenc.2.dylib Frameworks/libvorbisfile.3.dylib - Frameworks/libxml2.2.dylib - Frameworks/libz.1.3.1.dylib + Frameworks/libxml2.16.dylib + Frameworks/libz.1.3.2.dylib Resources/libndofdev.dylib Resources/SLPlugin.app/Contents/Frameworks/media_plugin_cef.dylib Resources/SLPlugin.app/Contents/Frameworks/media_plugin_libvlc.dylib diff --git a/indra/newview/PKGBUILD.in b/indra/newview/PKGBUILD.in index 3310c6c601..3de9558000 100644 --- a/indra/newview/PKGBUILD.in +++ b/indra/newview/PKGBUILD.in @@ -6,7 +6,7 @@ pkgdesc="${VIEWER_PACKAGE_COMMENT}" arch=('${CMAKE_SYSTEM_PROCESSOR}') url="https://${VIEWER_PACKAGE_DOMAIN_NAME}" license=('LGPL-2.1') -depends=(apr-util at-spi2-core boost-libs fltk glu hunspell libnghttp2 openjpeg2 sdl2 vlc libvorbis) +depends=(freealut apr-util at-spi2-core boost-libs fltk glu hunspell libnghttp2 openjpeg2 sdl2 vlc libvorbis) package() { cd "$startdir" diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 429dc57af3..b7397ce158 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -7.2.3 +26.2.0 diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 5aadc51869..56a3394943 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -135,13 +135,13 @@ elseif (WINDOWS) ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${VIEWER_BINARY_NAME}.exe ${prefix_result}/../bin/OpenAL32.dll ${prefix_result}/../bin/alut.dll - ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_filesystem-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_json-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_program_options-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_thread-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_url-vc143-mt-${BOOST_PLATFORM}-1_90.dll + ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_filesystem-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_json-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_program_options-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_thread-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_url-vc143-mt-${BOOST_PLATFORM}-1_91.dll ${prefix_result}/../bin/brotlicommon.dll ${prefix_result}/../bin/brotlidec.dll ${prefix_result}/../bin/bz2.dll @@ -163,7 +163,7 @@ elseif (WINDOWS) ${prefix_result}/../bin/vorbis.dll ${prefix_result}/../bin/vorbisenc.dll ${prefix_result}/../bin/vorbisfile.dll - ${prefix_result}/../bin/zlib1.dll + ${prefix_result}/../bin/z.dll DESTINATION . ) @@ -176,8 +176,8 @@ elseif (WINDOWS) install( PROGRAMS - ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_90.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_90.dll + ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_91.dll ${prefix_result}/../bin/libapr-1.dll ${prefix_result}/../bin/libaprutil-1.dll ${prefix_result}/../bin/libexpat.dll @@ -208,7 +208,7 @@ if (LINUX) install(FILES ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13 - ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.33 + ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.34 DESTINATION ${_LIB}) endif (USE_FMODSTUDIO) endif (LINUX) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ecea9a3238..f1e5217afd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -511,6 +511,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>RecentJumpThresholdSecs</key> + <map> + <key>Comment</key> + <string>Seconds after a jump input during which finish-anim is suppressed to avoid interrupting rapid successive jumps.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>1.0</real> + </map> <key>AvatarAxisDeadZone0</key> <map> <key>Comment</key> @@ -663,7 +674,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html</string> + <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html</string> </map> <!--AvatarBakedTextureUploadTimeout is in use by QA--> <key>AvatarBakedTextureUploadTimeout</key> @@ -677,6 +688,28 @@ <key>Value</key> <integer>60</integer> </map> + <key>AvatarRotateThresholdSlow</key> + <map> + <key>Comment</key> + <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving slowly (degrees)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <integer>60</integer> + </map> + <key>AvatarRotateThresholdFast</key> + <map> + <key>Comment</key> + <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving fast (degrees)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <integer>2</integer> + </map> <key>AvatarPhysics</key> <map> <key>Comment</key> @@ -2467,7 +2500,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string> + <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string> </map> <key>DisableCameraConstraints</key> <map> @@ -2786,7 +2819,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://events.[GRID]/viewer/embed/event/[EVENT_ID]</string> + <string>https://events.[GRID]/viewer/embed/event/[EVENT_ID]</string> </map> <key>MainWorkTime</key> <map> @@ -3443,7 +3476,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC][DEBUG_MODE]</string> + <string>https://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC][DEBUG_MODE]</string> </map> <key>HowToHelpURL</key> <map> @@ -3454,7 +3487,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string> + <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string> </map> <key>HomeSidePanelURL</key> <map> @@ -4070,7 +4103,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string> + <string>https://wiki.secondlife.com/wiki/[LSL_STRING]</string> </map> <key>LSLFontSizeName</key> <map> @@ -4248,7 +4281,17 @@ <key>Value</key> <string>0.0.0</string> </map> - + <key>PreviousInstallChecked</key> + <map> + <key>Comment</key> + <string>Whether viewer checked previous install on the same channel for NSIS</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>LimitDragDistance</key> <map> <key>Comment</key> @@ -4495,13 +4538,24 @@ <key>MainloopTimeoutDefault</key> <map> <key>Comment</key> - <string>Timeout duration for mainloop lock detection, in seconds.</string> + <string>Timeout duration for mainloop lock detection during teleports, login and logout, in seconds.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>F32</string> <key>Value</key> - <real>60.0</real> + <real>120.0</real> + </map> + <key>MainloopTimeoutStarted</key> + <map> + <key>Comment</key> + <string>Timeout duration for mainloop lock detection when logged in and not teleporting, in seconds.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>60.0</real> </map> <key>MapScale</key> <map> @@ -4591,6 +4645,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>MapShowGridCoords</key> + <map> + <key>Comment</key> + <string>Shows/hides the grid coordinates of each region on the world map.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>MiniMapAutoCenter</key> <map> <key>Comment</key> @@ -5095,7 +5160,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>MediaControlFadeTime</key> <map> @@ -5873,6 +5938,17 @@ <key>Value</key> <integer>90</integer> </map> + <key>ScriptToastButtonWidth</key> + <map> + <key>Comment</key> + <string>Default width of buttons in the Script dialog toast.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>110</integer> + </map> <key>NotificationChannelRightMargin</key> <map> <key>Comment</key> @@ -6104,6 +6180,39 @@ <key>Value</key> <integer>0</integer> </map> + <key>OpenDebugStatVoice</key> + <map> + <key>Comment</key> + <string>Expand Voice (WebRTC) stats display</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>OpenDebugStatVoiceOutgoing</key> + <map> + <key>Comment</key> + <string>Expand Outgoing audio (Voice) stats display</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>OpenDebugStatVoiceIncoming</key> + <map> + <key>Comment</key> + <string>Expand Incoming audio (Voice) stats display</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>OutBandwidth</key> <map> <key>Comment</key> @@ -7329,7 +7438,7 @@ <key>RenderAvatarCloth</key> <map> <key>Comment</key> - <string>DEPRECATED - only false supported - Controls if avatars use wavy cloth</string> + <string>Controls if system avatar clothes use wavy cloth</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -7368,7 +7477,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>32.0</real> + <real>48.0</real> </map> <key>RenderCPUBasis</key> <map> @@ -9086,6 +9195,17 @@ <key>Value</key> <integer>16</integer> </map> + <key>RenderReflectionProbeShowTransparent</key> + <map> + <key>Comment</key> + <string>Show reflection probes in the transparency debug view</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>RenderReflectionProbeVolumes</key> <map> <key>Comment</key> @@ -10723,6 +10843,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>GroupTitlesTagMode</key> + <map> + <key>Comment</key> + <string>Select Group Titles tag mode: 0 - no group tags, 1 - only my group tag, 2 - all group tags</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2</integer> + </map> <key>ShowAxes</key> <map> <key>Comment</key> @@ -11250,6 +11381,45 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowPGClassifieds</key> + <map> + <key>Comment</key> + <string>Display results of find classifieds that are flagged as general</string> + <key>Persist</key> + <integer>1</integer> + <key>HideFromEditor</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ShowMatureClassifieds</key> + <map> + <key>Comment</key> + <string>Display results of find classifieds that are flagged as moderate</string> + <key>Persist</key> + <integer>1</integer> + <key>HideFromEditor</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ShowAdultClassifieds</key> + <map> + <key>Comment</key> + <string>Display results of find classifieds that are flagged as adult</string> + <key>Persist</key> + <integer>1</integer> + <key>HideFromEditor</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowPGSims</key> <map> <key>Comment</key> @@ -11289,6 +11459,54 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowPGEvents</key> + <map> + <key>Comment</key> + <string>Display results of find events that are flagged as general</string> + <key>Persist</key> + <integer>1</integer> + <key>HideFromEditor</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ShowMatureGroups</key> + <map> + <key>Comment</key> + <string>Include groups that are flagged as mature to Search results</string> + <key>Persist</key> + <integer>1</integer> + <key>HideFromEditor</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>FindLandArea</key> + <map> + <key>Comment</key> + <string>Enables filtering of land search results by area</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>FindLandPrice</key> + <map> + <key>Comment</key> + <string>Enables filtering of land search results by price</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowNearClip</key> <map> <key>Comment</key> @@ -12285,17 +12503,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>UIFloaterTitleVPad</key> - <map> - <key>Comment</key> - <string>Distance from top of floater to top of title string, pixels</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <real>7</real> - </map> <key>UIImgDefaultEyesUUID</key> <map> <key>Comment</key> @@ -13080,11 +13287,11 @@ <key>UpdaterShowReleaseNotes</key> <map> <key>Comment</key> - <string>Enables displaying of the Release notes in a web floater after update.</string> + <string>Enables displaying of the Release notes in a web floater after update. 0 - don't show, 1 - show, 2 - show even for test viewers</string> <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>Boolean</string> + <string>S32</string> <key>Value</key> <integer>1</integer> </map> @@ -13896,7 +14103,7 @@ <key>WatchdogEnabled</key> <map> <key>Comment</key> - <string>Controls whether the thread watchdog timer is activated. Value is boolean. Set to -1 to defer to built-in default.</string> + <string>Controls whether the thread watchdog timer is activated. Value is S32. Set to -1 to defer to built-in default.</string> <key>Persist</key> <integer>0</integer> <key>Type</key> @@ -15308,7 +15515,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string> + <string>https://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string> </map> <key>OpenIMOnVoice</key> <map> @@ -16996,6 +17203,39 @@ <key>Value</key> <integer>0</integer> </map> + <key>InventoryShowRecentTab</key> + <map> + <key>Comment</key> + <string>Show/hide Recent tab in the Inventory floater</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>InventoryShowWornTab</key> + <map> + <key>Comment</key> + <string>Show/hide Worn tab in the Inventory floater</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>InventoryShowFavoritesTab</key> + <map> + <key>Comment</key> + <string>Show/hide Favorites tab in the Inventory floater</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>StatsReportMaxDuration</key> <map> <key>Comment</key> @@ -17150,5 +17390,16 @@ <key>Value</key> <integer>2</integer> </map> + <key>PurgeDiskCacheOnStartup</key> + <map> + <key>Comment</key> + <string>Whether or not to LRU purge the disk cache during startup on main thread</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl index aabbbac12a..1b1233790e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl @@ -28,6 +28,9 @@ uniform mat4 projection_matrix; in vec3 position; in vec3 normal; in vec2 texcoord0; +#ifdef AVATAR_CLOTH +in vec4 clothing; +#endif mat4 getSkinnedTransform(); @@ -37,6 +40,15 @@ out vec3 vary_normal; out vec2 vary_texcoord0; out vec3 vary_position; +#ifdef AVATAR_CLOTH +uniform vec4 gWindDir; +uniform vec4 gSinWaveParams; +uniform vec4 gGravity; + +const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542); // #minimax-generated coefficients +const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); // # {1/2PI, 2PI, PI, PI/2} +#endif + void main() { vary_texcoord0 = texcoord0; @@ -46,16 +58,78 @@ void main() vec4 pos_in = vec4(position.xyz, 1.0); mat4 trans = getSkinnedTransform(); - pos.x = dot(trans[0], pos_in); - pos.y = dot(trans[1], pos_in); - pos.z = dot(trans[2], pos_in); - pos.w = 1.0; norm.x = dot(trans[0].xyz, normal); norm.y = dot(trans[1].xyz, normal); norm.z = dot(trans[2].xyz, normal); norm = normalize(norm); +#ifdef AVATAR_CLOTH + //wind + vec4 windEffect; + windEffect = vec4(dot(norm, gWindDir.xyz)); + pos.x = dot(trans[2], pos_in); + windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015) + + windEffect.xyz; + windEffect.w = windEffect.w * 2.0 + 1.0; // move wind offset value to [-1, 3] + windEffect.w = windEffect.w*gWindDir.w; // modulate wind strength + + windEffect.xyz = windEffect.xyz*gSinWaveParams.xyz + +vec3(gSinWaveParams.w); // use sin wave params to scale and offset input + + //reduce to period of 2 PI + vec4 temp1, temp0, temp2, offsetPos; + temp1.xyz = windEffect.xyz * gPiConstants.x; // change input as multiple of [0-2PI] to [0-1] + temp0.y = mod(temp1.x,1.0); + windEffect.x = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI] + temp1.z = temp1.z - gPiConstants.w; // shift normal oscillation by PI/2 + temp0.y = mod(temp1.z,1.0); + + windEffect.z = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI] + windEffect.xyz = windEffect.xyz + vec3(-3.141592); // offset to [-PI, PI] + + //calculate sinusoid + vec4 sinWave; + temp1 = windEffect*windEffect; + sinWave = -temp1 * gMinMaxConstants.w + + vec4(gMinMaxConstants.z); // y = -(x^2)/7! + 1/5! + sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y); // y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3! + sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x); // y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1 + sinWave = sinWave * windEffect; // y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1) + + // sinWave.x holds sin(norm . wind_direction) with primary frequency + // sinWave.y holds sin(norm . wind_direction) with secondary frequency + // sinWave.z hold cos(norm . wind_direction) with primary frequency + sinWave.xyz = sinWave.xyz * gWindDir.w + + vec3(windEffect.w); // multiply by wind strength in gWindDir.w [-wind, wind] + + // add normal facing bias offset [-wind,wind] -> [-wind - .25, wind + 1] + temp1 = vec4(dot(norm, gGravity.xyz)); // how much is this normal facing in direction of gGravity? + temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0)); // clamp [-1, 1] to [-1, 0.2] + temp1 = temp1*vec4(1.5,0.0,0.0,0.0); // scale from [-1,0.2] to [-1.5, 0.3] + sinWave.x = sinWave.x + temp1.x; // add gGravity effect to sinwave (only primary frequency) + sinWave.xyz = sinWave.xyz * clothing.w; // modulate by clothing coverage + + sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // clamp to underlying body shape + offsetPos = clothing * sinWave.x; // multiply wind effect times clothing displacement + temp2 = gWindDir*sinWave.z + vec4(norm,0); // calculate normal offset due to wind oscillation + offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+pos_in; // add to offset vertex position, and zero out effect from w + norm += temp2.xyz*2.0; // add sin wave effect on normals (exaggerated) + + //renormalize normal (again) + norm = normalize(norm); + + pos.x = dot(trans[0], offsetPos); + pos.y = dot(trans[1], offsetPos); + pos.z = dot(trans[2], offsetPos); + pos.w = 1.0; +#else + pos.x = dot(trans[0], pos_in); + pos.y = dot(trans[1], pos_in); + pos.z = dot(trans[2], pos_in); + pos.w = 1.0; +#endif + vary_normal = norm; vary_position = pos.xyz; diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl index dd9e883fdf..abe61fe892 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl @@ -146,6 +146,9 @@ vec3 srgb_to_linear(vec3 c); void main() { vec4 basecolor = texture(diffuseMap, base_color_texcoord.xy).rgba; + + basecolor.a *= vertex_color.a; + if (basecolor.a < minimum_alpha) { discard; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 50b40e9c20..b08193a7dd 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -51,9 +51,7 @@ in vec3 vary_norm; in vec4 vertex_color; //vertex color should be treated as sRGB #endif -#ifdef HAS_ALPHA_MASK uniform float minimum_alpha; -#endif uniform mat4 proj_mat; uniform mat4 inv_proj; @@ -225,6 +223,13 @@ void main() float final_alpha = diffuse_linear.a; +#ifdef IS_AVATAR_SKIN + if(final_alpha < minimum_alpha) + { + discard; + } +#endif + #ifdef USE_VERTEX_COLOR final_alpha *= vertex_color.a; diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp deleted file mode 100644 index 7e0a873452..0000000000 --- a/indra/newview/fsfloatersearch.cpp +++ /dev/null @@ -1,3212 +0,0 @@ -/** - * @file fsfloatersearch.cpp - * @brief Firestorm Search Floater - * - * $LicenseInfo:firstyear=2012&license=fsviewerlgpl$ - * Phoenix Firestorm Viewer Source Code - * Copyright (C) 2012, Cinder Roxley <cinder.roxley@phoenixviewer.com> - * - * 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 - * - * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA - * http://www.firestormviewer.org - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "fsfloatersearch.h" - -#include "lldispatcher.h" -#include "llagent.h" -#include "llavataractions.h" -#include "llavatarname.h" -#include "llavatarnamecache.h" -#include "llavatarpropertiesprocessor.h" -#include "llclassifiedflags.h" -#include "llclassifiedinfo.h" -#include "llcombobox.h" -#include "lldateutil.h" -#include "lleventflags.h" -#include "lleventnotifier.h" -#include "llfloaterreg.h" -#include "llfloaterworldmap.h" -#include "llgroupactions.h" -#include "llgroupmgr.h" -#include "llloadingindicator.h" -#include "lllogininstance.h" -#include "llnotificationsutil.h" -#include "llpanelprofile.h" -#include "llpanelprofileclassifieds.h" -#include "llparcel.h" -#include "llproductinforequest.h" -#include "llqueryflags.h" -#include "llregionhandle.h" -#include "llremoteparcelrequest.h" -#include "lltimer.h" -#include "lltrans.h" -#include "llviewercontrol.h" -#include "llviewergenericmessage.h" -#include "llviewernetwork.h" -#include "llviewerregion.h" -#include "llworldmapmessage.h" -#include "message.h" -#include <boost/tokenizer.hpp> -#include <boost/algorithm/string.hpp> -#include <string> - -#include <chrono> - -static const S32 MIN_SEARCH_STRING_SIZE = 2; -static const S32 RESULT_PAGE_SIZE = 100; - -// (observeur) Hack to avoid Find to be called several times (due to a bug in llsearchcombobox) -static std::chrono::time_point<std::chrono::system_clock> lastRequestTime; -static const S32 REQUEST_MIN_ELAPSED_TIME = 500; - -std::string filterShortWords(std::string query_string); -void fillSearchComboBox(LLSearchComboBox* search_combo); - -//////////////////////////////////////// -// Observer Classes // -//////////////////////////////////////// - -class FSSearchRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver -{ -public: - FSSearchRemoteParcelInfoObserver(FSFloaterSearch* floater, bool for_events) : LLRemoteParcelInfoObserver(), - mParent(floater), - mForEvents(for_events) - {} - - ~FSSearchRemoteParcelInfoObserver() - { - // remove any in-flight observers - std::set<LLUUID>::iterator it; - for (it = mParcelIDs.begin(); it != mParcelIDs.end(); ++it) - { - const LLUUID &id = *it; - LLRemoteParcelInfoProcessor::getInstance()->removeObserver(id, this); - } - mParcelIDs.clear(); - } - - /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data) - { - if (mParent) - { - if (mForEvents) - { - mParent->displayEventParcelImage(parcel_data); - } - else - { - mParent->displayParcelDetails(parcel_data); - } - } - mParcelIDs.erase(parcel_data.parcel_id); - LLRemoteParcelInfoProcessor::getInstance()->removeObserver(parcel_data.parcel_id, this); - } - - /*virtual*/ void setParcelID(const LLUUID& parcel_id) - { - if (!parcel_id.isNull()) - { - mParcelIDs.insert(parcel_id); - LLRemoteParcelInfoProcessor::getInstance()->addObserver(parcel_id, this); - LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(parcel_id); - } - } - - /*virtual*/ void setErrorStatus(S32 status, const std::string& reason) - { - LL_WARNS("Search") << "Can't complete remote parcel request. Http Status: " << status << ". Reason : " << reason << LL_ENDL; - } -private: - std::set<LLUUID> mParcelIDs; - FSFloaterSearch* mParent; - bool mForEvents; -}; - -///// Avatar Properties Observer ///// - -class FSSearchAvatarPropertiesObserver : public LLAvatarPropertiesObserver -{ -public: - FSSearchAvatarPropertiesObserver(FSFloaterSearch* floater) : LLAvatarPropertiesObserver(), - mParent(floater) - {} - - ~FSSearchAvatarPropertiesObserver() - { - // remove any in-flight observers - std::set<LLUUID>::iterator it; - for (it = mAvatarIDs.begin(); it != mAvatarIDs.end(); ++it) - { - const LLUUID &id = *it; - LLAvatarPropertiesProcessor::getInstance()->removeObserver(id, this); - } - mAvatarIDs.clear(); - } - - void processProperties(void* data, EAvatarProcessorType type) - { - if (!data) - return; - - if (APT_PROPERTIES == type) - { - LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); - if (avatar_data) - { - mParent->displayAvatarDetails(avatar_data); - LLAvatarPropertiesProcessor::getInstance()->removeObserver(avatar_data->avatar_id, this); - } - } - else if (APT_PROPERTIES_LEGACY == type) - { - LLAvatarData avatar_data(*static_cast<LLAvatarLegacyData*>(data)); - mParent->displayAvatarDetails(&avatar_data); - LLAvatarPropertiesProcessor::getInstance()->removeObserver(avatar_data.avatar_id, this); - } - if (APT_CLASSIFIED_INFO == type) - { - LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data); - if (c_info) - { - mParent->displayClassifiedDetails(c_info); - LLAvatarPropertiesProcessor::getInstance()->removeObserver(c_info->classified_id, this); - std::string url = gAgent.getRegionCapability("SearchStatRequest"); - if (!url.empty()) - { - LL_INFOS("Search") << "Classified stat request via capability" << LL_ENDL; - LLSD body; - body["classified_id"] = c_info->classified_id; - LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body, boost::bind(&LLPanelProfileClassified::handleSearchStatResponse, c_info->classified_id, _1)); - } - } - } - } -private: - std::set<LLUUID> mAvatarIDs; - FSFloaterSearch* mParent; -}; - -///// Group Info Observer ///// - -class FSSearchGroupInfoObserver : public LLGroupMgrObserver -{ -public: - FSSearchGroupInfoObserver(const LLUUID& group_id, FSFloaterSearch* parent) : - LLGroupMgrObserver(group_id), - mParent(parent) - { - LLGroupMgr* groupmgr = LLGroupMgr::getInstance(); - if (!group_id.isNull() && groupmgr) - { - groupmgr->addObserver(this); - mID = group_id; - groupmgr->sendGroupPropertiesRequest(group_id); - } - } - - ~FSSearchGroupInfoObserver() - { - LLGroupMgr::getInstance()->removeObserver(this); - } - - void changed(LLGroupChange gc) - { - if (gc == GC_PROPERTIES) - { - LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID); - mParent->displayGroupDetails(group_data); - LLGroupMgr::getInstance()->removeObserver(this); - } - } -private: - FSFloaterSearch* mParent; - LLUUID mID; -}; - -///// Silly Classified Clickthrough Class ///// -class FSDispatchClassifiedClickThrough : public LLDispatchHandler -{ -public: - virtual bool operator()( - const LLDispatcher* dispatcher, - const std::string& key, - const LLUUID& invoice, - const sparam_t& strings) - { - if (strings.size() != 4) return false; - LLUUID classified_id(strings[0]); - S32 teleport_clicks = atoi(strings[1].c_str()); - S32 map_clicks = atoi(strings[2].c_str()); - S32 profile_clicks = atoi(strings[3].c_str()); - - LLPanelProfileClassified::setClickThrough( - classified_id, teleport_clicks, map_clicks, profile_clicks, false); - - return true; - } -}; -static FSDispatchClassifiedClickThrough sClassifiedClickThrough; - -SearchQuery::SearchQuery() -: category("category", "") -, query("query") -{} - -//////////////////////////////////////// -// The floater itself // -//////////////////////////////////////// - -FSFloaterSearch::FSFloaterSearch(const Params& key) -: LLFloater(key) -{ - mRemoteParcelObserver = new FSSearchRemoteParcelInfoObserver(this, false); - mRemoteParcelEventLocationObserver = new FSSearchRemoteParcelInfoObserver(this, true); - mAvatarPropertiesObserver = new FSSearchAvatarPropertiesObserver(this); - mEventNotifierConnection = gEventNotifier.setNewEventCallback(boost::bind(&FSFloaterSearch::displayEventDetails, this, boost::placeholders::_1)); -} - -FSFloaterSearch::~FSFloaterSearch() -{ - mEventNotifierConnection.disconnect(); - delete mRemoteParcelObserver; - delete mRemoteParcelEventLocationObserver; - delete mAvatarPropertiesObserver; - gGenericDispatcher.addHandler("classifiedclickthrough", nullptr); -} - -// virtual -void FSFloaterSearch::onOpen(const LLSD& key) -{ - Params p(key); - mPanelWeb->loadURL(p.search); - if (key.has("query")) - { - mTabContainer->selectTabPanel(mPanelWeb); - } - else if (key.has("tab") && key["tab"].asString() == "groups") - { - mTabContainer->selectTabPanel(mPanelGroups); - } - - FSSearchPanelBase* current_panel = dynamic_cast<FSSearchPanelBase*>(mTabContainer->getCurrentPanel()); - if (current_panel) - { - current_panel->focusDefaultElement(); - } -} - -//virtual -void FSFloaterSearch::onClose(bool app_quitting) -{ - if (mTabContainer) - { - gSavedSettings.setS32("FSLastSearchTab", mTabContainer->getCurrentPanelIndex()); - } -} - -bool FSFloaterSearch::postBuild() -{ - childSetAction("people_profile_btn", boost::bind(&FSFloaterSearch::onBtnPeopleProfile, this)); - childSetAction("people_message_btn", boost::bind(&FSFloaterSearch::onBtnPeopleIM, this)); - childSetAction("people_friend_btn", boost::bind(&FSFloaterSearch::onBtnPeopleFriend, this)); - childSetAction("group_profile_btn", boost::bind(&FSFloaterSearch::onBtnGroupProfile, this)); - childSetAction("group_message_btn", boost::bind(&FSFloaterSearch::onBtnGroupChat, this)); - childSetAction("group_join_btn", boost::bind(&FSFloaterSearch::onBtnGroupJoin, this)); - childSetAction("event_reminder_btn", boost::bind(&FSFloaterSearch::onBtnEventReminder, this)); - childSetAction("teleport_btn", boost::bind(&FSFloaterSearch::onBtnTeleport, this)); - childSetAction("map_btn", boost::bind(&FSFloaterSearch::onBtnMap, this)); - resetVerbs(); - - mPanelPeople = findChild<FSPanelSearchPeople>("panel_ls_people"); - mPanelGroups = findChild<FSPanelSearchGroups>("panel_ls_groups"); - mPanelPlaces = findChild<FSPanelSearchPlaces>("panel_ls_places"); - mPanelEvents = findChild<FSPanelSearchEvents>("panel_ls_events"); - mPanelLand = findChild<FSPanelSearchLand>("panel_ls_land"); - mPanelClassifieds = findChild<FSPanelSearchClassifieds>("panel_ls_classifieds"); - mPanelWeb = findChild<FSPanelSearchWeb>("panel_ls_web"); - - mDetailsPanel = getChild<LLPanel>("panel_ls_details"); - mDetailTitle = getChild<LLTextEditor>("title"); - mDetailDesc = getChild<LLTextEditor>("desc"); - mDetailAux1 = getChild<LLTextEditor>("aux1"); - mDetailAux2 = getChild<LLTextEditor>("aux2"); - mDetailLocation = getChild<LLTextEditor>("location"); - mDetailSnapshot = getChild<LLTextureCtrl>("snapshot"); - mDetailSnapshotParcel = getChild<LLTextureCtrl>("snapshot_parcel"); - mDetailMaturity = getChild<LLIconCtrl>("maturity_icon"); - mTabContainer = getChild<LLTabContainer>("ls_tabs"); - - mTabContainer->setCommitCallback(boost::bind(&FSFloaterSearch::onTabChange, this)); - - flushDetails(); - - mDetailsPanel->setVisible(false); - - mHasSelection = false; - - if (!mTabContainer->selectTab(gSavedSettings.getS32("FSLastSearchTab"))) - { - mTabContainer->selectFirstTab(); - } - - return TRUE; -} - -void FSFloaterSearch::onTabChange() -{ - LL_INFOS() << "onTabChange()()" << LL_ENDL; - - flushDetails(); - - LLPanel* active_panel = mTabContainer->getCurrentPanel(); - - if (active_panel == mPanelWeb) - { - mDetailsPanel->setVisible(false); - mPanelWeb->resetFocusOnLoad(); - } - else if (active_panel == mPanelPeople) - { - mDetailsPanel->setVisible(mHasSelection); - } - - if (active_panel == mPanelPeople || active_panel == mPanelGroups) - { - mDetailSnapshotParcel->setVisible(FALSE); - mDetailSnapshot->setVisible(TRUE); - } - else if (active_panel == mPanelPlaces || active_panel == mPanelLand || - active_panel == mPanelEvents || active_panel == mPanelClassifieds) - { - mDetailSnapshot->setVisible(FALSE); - mDetailSnapshotParcel->setVisible(TRUE); - } -} - -//static -template <class T> -T* FSFloaterSearch::getSearchPanel(const std::string& panel_name) -{ - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance && search_instance->mTabContainer) - { - return dynamic_cast<T*>(search_instance->mTabContainer->getPanelByName(panel_name)); - } - else - { - return nullptr; - } -} - -void FSFloaterSearch::onSelectedItem(const LLUUID& selected_item, ESearchCategory type) -{ - LL_INFOS() << "onSelectedItem()" << LL_ENDL; - - if (!selected_item.isNull()) - { - mSelectedID = selected_item; - resetVerbs(); - flushDetails(); - switch (type) - { - case SC_AVATAR: - { - LLAvatarPropertiesProcessor::getInstance()->addObserver(selected_item, mAvatarPropertiesObserver); - LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(selected_item); - } - break; - case SC_GROUP: - mGroupPropertiesRequest = new FSSearchGroupInfoObserver(selected_item, this); - break; - case SC_PLACE: - mRemoteParcelObserver->setParcelID(selected_item); - break; - case SC_CLASSIFIED: - LLAvatarPropertiesProcessor::getInstance()->addObserver(selected_item, mAvatarPropertiesObserver); - LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(selected_item); - gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough); - break; - } - setLoadingProgress(true); - } -} - -void FSFloaterSearch::onSelectedEvent(const S32 selected_event) -{ - LL_INFOS() << "onSelectedEvent()()" << LL_ENDL; - - resetVerbs(); - flushDetails(); - - gMessageSystem->newMessageFast(_PREHASH_EventInfoRequest); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - gMessageSystem->nextBlockFast(_PREHASH_EventData); - gMessageSystem->addU32Fast(_PREHASH_EventID, selected_event); - gAgent.sendReliableMessage(); -} - -void FSFloaterSearch::displayParcelDetails(const LLParcelData& parcel_data) -{ - S32 region_x; - S32 region_y; - S32 region_z; - region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS; - region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS; - region_z = ll_round(parcel_data.global_z); - // HACK: Flag 0x2 == adult region, - // Flag 0x1 == mature region, otherwise assume PG - if (parcel_data.flags & 0x2) - { - mDetailMaturity->setValue("Parcel_R_Dark"); - } - else if (parcel_data.flags & 0x1) - { - mDetailMaturity->setValue("Parcel_M_Dark"); - } - else - { - mDetailMaturity->setValue("Parcel_PG_Dark"); - } - - LLStringUtil::format_map_t map; - map["DWELL"] = llformat("%.0f", (F64)parcel_data.dwell); - map["AREA"] = llformat("%d m²", parcel_data.actual_area); - map["LOCATION"] = llformat("%s (%d, %d, %d)", parcel_data.sim_name.c_str(), region_x, region_y, region_z); - - mParcelGlobal = LLVector3d(parcel_data.global_x, parcel_data.global_y, parcel_data.global_z); - mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_places" || mTabContainer->getCurrentPanel()->getName() == "panel_ls_land"); - mHasSelection = true; - mDetailMaturity->setVisible(true); - mDetailTitle->setValue(parcel_data.name); - mDetailDesc->setValue(parcel_data.desc); - mDetailAux1->setValue(getString("string.traffic", map)); - mDetailAux2->setValue(getString("string.area", map)); - mDetailLocation->setValue(getString("string.location", map)); - mDetailSnapshotParcel->setValue(parcel_data.snapshot_id); - childSetVisible("teleport_btn", true); - childSetVisible("map_btn", true); - setLoadingProgress(false); -} - -void FSFloaterSearch::displayAvatarDetails(LLAvatarData* avatar_data) -{ - if (avatar_data) - { - LLStringUtil::format_map_t map; - map["AGE"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now()); - if (avatar_data->partner_id.notNull()) - { - map["PARTNER"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString(); - mDetailAux2->setValue(getString("string.partner", map)); - } - - mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_people"); - mHasSelection = true; - mDetailTitle->setValue(LLTrans::getString("LoadingData")); - mDetailDesc->setValue(avatar_data->about_text); - mDetailSnapshot->setValue(avatar_data->image_id); - mDetailAux1->setValue(avatar_data->hide_age ? "" : getString("string.age", map)); - LLAvatarNameCache::get(avatar_data->avatar_id, boost::bind(&FSFloaterSearch::avatarNameUpdatedCallback,this, _1, _2)); - childSetVisible("people_profile_btn", true); - childSetVisible("people_message_btn", true); - childSetVisible("people_friend_btn", true); - getChildView("people_friend_btn")->setEnabled(!LLAvatarActions::isFriend(avatar_data->avatar_id)); - } -} - -void FSFloaterSearch::displayGroupDetails(LLGroupMgrGroupData*& group_data) -{ - if (group_data) - { - LLStringUtil::format_map_t map; - map["MEMBER_COUNT"] = llformat("%d",group_data->mMemberCount); - map["FOUNDER"] = LLSLURL("agent", group_data->mFounderID, "inspect").getSLURLString(); - - mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_groups"); - mHasSelection = true; - mDetailTitle->setValue(LLTrans::getString("LoadingData")); - mDetailDesc->setValue(group_data->mCharter); - mDetailSnapshot->setValue(group_data->mInsigniaID); - mDetailAux1->setValue(getString("string.members", map)); - mDetailAux2->setValue(getString("string.founder", map)); - LLGroupData agent_gdatap; - bool is_member = gAgent.getGroupData(getSelectedID(),agent_gdatap) || gAgent.isGodlike(); - bool join_btn_enabled = !is_member && group_data->mOpenEnrollment; - childSetVisible("group_profile_btn", true); - childSetVisible("group_message_btn", true); - childSetVisible("group_join_btn", true); - getChildView("group_join_btn")->setEnabled(join_btn_enabled); - getChildView("group_message_btn")->setEnabled(is_member); - gCacheName->getGroup(getSelectedID(), boost::bind(&FSFloaterSearch::groupNameUpdatedCallback, this, _1, _2, _3)); - } -} - -void FSFloaterSearch::displayClassifiedDetails(LLAvatarClassifiedInfo*& c_info) -{ - if (c_info) - { - if (c_info->flags & CLASSIFIED_FLAG_MATURE) - { - mDetailMaturity->setValue("Parcel_M_Dark"); - } - else - { - mDetailMaturity->setValue("Parcel_PG_Dark"); - } - - LLStringUtil::format_map_t map; - map["LISTING_PRICE"] = llformat("L$%d", c_info->price_for_listing); - map["SLURL"] = LLSLURL("parcel", c_info->parcel_id, "about").getSLURLString(); - - mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_classifieds"); - mHasSelection = true; - mDetailMaturity->setVisible(true); - mParcelGlobal = c_info->pos_global; - mDetailTitle->setValue(c_info->name); - mDetailDesc->setValue(c_info->description); - mDetailSnapshotParcel->setValue(c_info->snapshot_id); - mDetailAux1->setValue(getString("string.listing_price", map)); - mDetailLocation->setValue(getString("string.slurl", map)); - childSetVisible("teleport_btn", true); - childSetVisible("map_btn", true); - setLoadingProgress(false); - } -} - -bool FSFloaterSearch::displayEventDetails(LLEventStruct event) -{ - if (event.flags == EVENT_FLAG_ADULT) - { - mDetailMaturity->setValue("Parcel_R_Dark"); - } - else if (event.flags == EVENT_FLAG_MATURE) - { - mDetailMaturity->setValue("Parcel_M_Dark"); - } - else - { - mDetailMaturity->setValue("Parcel_PG_Dark"); - } - - S32 region_x; - S32 region_y; - S32 region_z; - region_x = (S64)ll_round(event.globalPos.mdV[VX]) % REGION_WIDTH_UNITS; - region_y = (S64)ll_round(event.globalPos.mdV[VY]) % REGION_WIDTH_UNITS; - region_z = (S32)ll_round(event.globalPos.mdV[VZ]); - LLStringUtil::format_map_t map; - map["DURATION"] = llformat("%d:%.2d", event.duration / 60, event.duration % 60); - map["LOCATION"] = llformat("%s (%d, %d, %d)", event.simName.c_str(), region_x, region_y, region_z); - if (event.cover > 0) - { - map["COVERCHARGE"] = llformat("L$%d", event.cover); - mDetailAux2->setValue(getString("string.covercharge", map)); - } - - mParcelGlobal = event.globalPos; - mEventID = event.eventId; - mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_events"); - mHasSelection = true; - mDetailMaturity->setVisible(true); - mDetailTitle->setValue(event.eventName); - mDetailDesc->setValue(event.desc); - mDetailAux1->setValue(getString("string.duration", map)); - mDetailLocation->setValue(getString("string.location", map)); - mDetailSnapshotParcel->setValue(LLUUID::null); - childSetVisible("teleport_btn", true); - childSetVisible("map_btn", true); - childSetVisible("event_reminder_btn", true); - - LLWorldMapMessage::getInstance()->sendNamedRegionRequest(event.simName, boost::bind(&FSFloaterSearch::regionHandleCallback, this, _1, event.globalPos), "", false); - return true; -} - -void FSFloaterSearch::regionHandleCallback(U64 region_handle, LLVector3d pos_global) -{ - std::string url = gAgent.getRegionCapability("RemoteParcelRequest"); - if (!url.empty()) - { - auto region_origin = from_region_handle(region_handle); - LLVector3 pos_region(LLVector3(pos_global - region_origin)); - - LLRemoteParcelInfoProcessor::getInstance()->requestRegionParcelInfo(url, - LLUUID::null, pos_region, pos_global, mRemoteParcelEventLocationObserver->getObserverHandle()); - } - else - { - setLoadingProgress(false); - } -} - -void FSFloaterSearch::displayEventParcelImage(const LLParcelData& parcel_data) -{ - mDetailSnapshotParcel->setValue(parcel_data.snapshot_id); - setLoadingProgress(false); -} - -void FSFloaterSearch::avatarNameUpdatedCallback(const LLUUID& id, const LLAvatarName& av_name) -{ - if (id == getSelectedID()) - { - mDetailTitle->setValue(av_name.getCompleteName()); - setLoadingProgress(false); - } - // Otherwise possibly a request for an older selection, ignore it. -} - -void FSFloaterSearch::groupNameUpdatedCallback(const LLUUID& id, const std::string& name, bool is_group) -{ - if (id == getSelectedID()) - { - mDetailTitle->setValue( LLSD(name) ); - setLoadingProgress(false); - } - // Otherwise possibly a request for an older selection, ignore it. -} - -void FSFloaterSearch::setLoadingProgress(bool started) -{ - LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("loading"); - - indicator->setVisible(started); - - if (started) - { - indicator->start(); - } - else - { - indicator->stop(); - } -} - -void FSFloaterSearch::resetVerbs() -{ - childSetVisible("people_profile_btn", false); - childSetVisible("people_message_btn", false); - childSetVisible("people_friend_btn", false); - childSetVisible("group_profile_btn", false); - childSetVisible("group_message_btn", false); - childSetVisible("group_join_btn", false); - childSetVisible("event_reminder_btn", false); - childSetVisible("teleport_btn", false); - childSetVisible("map_btn", false); -} - -void FSFloaterSearch::flushDetails() -{ - LL_INFOS() << "flushDetails()" << LL_ENDL; - mDetailTitle->setValue(""); - mDetailDesc->setValue(""); - mDetailAux1->setValue(""); - mDetailAux2->setValue(""); - mDetailLocation->setValue(""); - mDetailSnapshot->setValue(LLSD()); - mDetailMaturity->setVisible(false); - mParcelGlobal.setZero(); -} - -void FSFloaterSearch::onBtnPeopleProfile() -{ - LLAvatarActions::showProfile(getSelectedID()); -} - -void FSFloaterSearch::onBtnPeopleIM() -{ - LLAvatarActions::startIM(getSelectedID()); -} - -void FSFloaterSearch::onBtnPeopleFriend() -{ - LLAvatarActions::requestFriendshipDialog(getSelectedID()); -} - -void FSFloaterSearch::onBtnGroupProfile() -{ - LLGroupActions::show(getSelectedID()); -} - -void FSFloaterSearch::onBtnGroupChat() -{ - LLGroupActions::startIM(getSelectedID()); -} - -void FSFloaterSearch::onBtnGroupJoin() -{ - LLGroupActions::join(getSelectedID()); -} - -void FSFloaterSearch::onBtnTeleport() -{ - if (!mParcelGlobal.isExactlyZero()) - { - gAgent.teleportViaLocationLookAt(mParcelGlobal); - LLFloaterWorldMap::getInstance()->trackLocation(mParcelGlobal); - /// <FS:CR> What should we do when when we teleport? The default (1) is to close the floater, - /// the user may elect to minimize the floater (2), or to do nothing (any other setting) - static LLCachedControl<U32> teleport_action(gSavedSettings, "FSLegacySearchActionOnTeleport"); - if (teleport_action == 1) - { - closeFloater(); - } - else if (teleport_action == 2) - { - setMinimized(TRUE); - } - } -} - -void FSFloaterSearch::onBtnMap() -{ - if (!mParcelGlobal.isExactlyZero()) - { - LLFloaterWorldMap::getInstance()->trackLocation(mParcelGlobal); - LLFloaterReg::showInstance("world_map", "center"); - } -} - -void FSFloaterSearch::onBtnEventReminder() -{ - gEventNotifier.add(mEventID); -} - -//////////////////////////////////////// -// People Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchPeople> t_panel_fs_search_people("panel_ls_people"); - -FSPanelSearchPeople::FSPanelSearchPeople() : FSSearchPanelBase() -, mQueryID(nullptr) -, mStartSearch(0) -, mResultsReceived(0) -, mResultsContent() -, mAvatarNameCallbackConnection() -{ -} - -FSPanelSearchPeople::~FSPanelSearchPeople() -{ - if (mAvatarNameCallbackConnection.connected()) - { - mAvatarNameCallbackConnection.disconnect(); - } -} - -bool FSPanelSearchPeople::postBuild() -{ - mSearchComboBox = findChild<LLSearchComboBox>("people_edit"); - mSearchResults = findChild<LLScrollListCtrl>("search_results_people"); - if (mSearchComboBox) - { - mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchPeople::onBtnFind, this)); - fillSearchComboBox(mSearchComboBox); - } - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchPeople::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - mSearchResults->setContextMenu(LLScrollListCtrl::MENU_AVATAR); - } - - childSetAction("people_next", boost::bind(&FSPanelSearchPeople::onBtnNext, this)); - childSetAction("people_back", boost::bind(&FSPanelSearchPeople::onBtnBack, this)); - getChildView("people_next")->setEnabled(FALSE); - getChildView("people_back")->setEnabled(FALSE); - - return TRUE; -} - -void FSPanelSearchPeople::focusDefaultElement() -{ - mSearchComboBox->focusTextEntry(); -} - -void FSPanelSearchPeople::find() -{ - std::string text = mSearchComboBox->getSimple(); - boost::trim(text); - - if (text.size() <= MIN_SEARCH_STRING_SIZE) - { - mSearchResults->setCommentText(LLTrans::getString("search_short")); - return; - } - - if (LLUUID::validate(text)) - { - LLUUID id(text); - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mResultsReceived = 0; - mNumResultsReturned = 0; - - if (mAvatarNameCallbackConnection.connected()) - { - mAvatarNameCallbackConnection.disconnect(); - } - mAvatarNameCallbackConnection = LLAvatarNameCache::get(id, boost::bind(&FSPanelSearchPeople::onAvatarNameCallback, this, _1, _2)); - - return; - } - - LLStringUtil::replaceChar(text, '.', ' '); - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessage("DirFindQuery"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgentID); - gMessageSystem->addUUID("SessionID", gAgentSessionID); - gMessageSystem->nextBlock("QueryData"); - gMessageSystem->addUUID("QueryID", getQueryID()); - gMessageSystem->addString("QueryText", text); - gMessageSystem->addU32("QueryFlags", DFQ_PEOPLE); - gMessageSystem->addS32("QueryStart", mStartSearch); - gAgent.sendReliableMessage(); - LL_INFOS("Search") << "Firing off search request: " << getQueryID() << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchPeople::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - std::string text = mSearchComboBox->getSimple(); - - if (!text.empty()) - { - LLSearchHistory::getInstance()->addEntry(text); - } - - resetSearch(); - - find(); -} - -void FSPanelSearchPeople::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("people_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchPeople::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("people_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchPeople::resetSearch() -{ - mStartSearch = 0; - getChildView("people_back")->setEnabled(FALSE); - getChildView("people_next")->setEnabled(FALSE); -} - -S32 FSPanelSearchPeople::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("people_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchPeople::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_AVATAR); - } -} - -// static -void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID query_id; - std::string first_name; - std::string last_name; - LLUUID agent_id; - - msg->getUUIDFast(_PREHASH_QueryData, _PREHASH_QueryID, query_id); - msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); - - // This result is not for us. - if (agent_id != gAgentID) - { - return; - } - LL_INFOS("Search") << "received search results - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchPeople* self = FSFloaterSearch::getSearchPanel<FSPanelSearchPeople>("panel_ls_people"); - - // floater is closed or these are not results from our last request - if (!self || query_id != self->getQueryID()) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_people"); - - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - - // Check for status messages - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_PLACES_FOUNDNONE) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - return; - } - else if (status & STATUS_SEARCH_PLACES_SHORTSTRING) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_short")); - return; - } - else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_banned")); - return; - } - else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - } - - bool found_one = false; - S32 num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - - self->mResultsReceived += num_new_rows; - num_new_rows = self->showNextButton(num_new_rows); - - for (S32 i = 0; i < num_new_rows; i++) - { - msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_FirstName, first_name, i); - msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_LastName, last_name, i); - msg->getUUIDFast( _PREHASH_QueryReplies, _PREHASH_AgentID, agent_id, i); - //msg->getU8Fast( _PREHASH_QueryReplies, _PREHASH_Online, online, i); - - if (agent_id.isNull()) - { - LL_INFOS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - else - { - LL_DEBUGS("Search") << "Got: " << first_name << " " << last_name << " AgentID: " << agent_id << LL_ENDL; - search_results->setEnabled(TRUE); - found_one = true; - - std::string avatar_name; - avatar_name = LLCacheName::buildFullName(first_name, last_name); - - LLSD content; - LLSD element; - - element["id"] = agent_id; - - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "icon_avatar_offline.tga"; - - element["columns"][1]["column"] = "username"; - element["columns"][1]["value"] = avatar_name; - - content["name"] = avatar_name; - - search_results->addElement(element, ADD_BOTTOM); - self->mResultsContent[agent_id.asString()] = content; - } - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -void FSPanelSearchPeople::onAvatarNameCallback(const LLUUID& id, const LLAvatarName& av_name) -{ - if (mAvatarNameCallbackConnection.connected()) - { - mAvatarNameCallbackConnection.disconnect(); - } - - LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("search_results_people"); - - if (av_name.getAccountName() != "(?\?\?).(?\?\?)") - { - LLSD content; - LLSD data; - data["id"] = id; - - data["columns"][0]["column"] = "icon"; - data["columns"][0]["type"] = "icon"; - data["columns"][0]["value"] = "icon_avatar_offline.tga"; - - data["columns"][1]["name"] = "username"; - data["columns"][1]["value"] = av_name.getUserName(); - - content["name"] = av_name.getUserName(); - - search_results->addElement(data); - - mResultsContent[id.asString()] = content; - mResultsReceived = 1; - mNumResultsReturned = 1; - - search_results->setEnabled(TRUE); - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - onSelectItem(); - } - else - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = getChild<LLUICtrl>("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } -} - -//////////////////////////////////////// -// Groups Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchGroups> t_panel_fs_search_groups("panel_ls_groups"); - -FSPanelSearchGroups::FSPanelSearchGroups() : FSSearchPanelBase() -, mQueryID(nullptr) -, mStartSearch(0) -, mResultsReceived(0) -, mResultsContent() -{ -} - -FSPanelSearchGroups::~FSPanelSearchGroups() -{ -} - -bool FSPanelSearchGroups::postBuild() -{ - mSearchComboBox = findChild<LLSearchComboBox>("groups_edit"); - mSearchResults = findChild<LLScrollListCtrl>("search_results_groups"); - if (mSearchComboBox) - { - mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchGroups::onBtnFind, this)); - fillSearchComboBox(mSearchComboBox); - } - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchGroups::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - } - - childSetAction("groups_next", boost::bind(&FSPanelSearchGroups::onBtnNext, this)); - childSetAction("groups_back", boost::bind(&FSPanelSearchGroups::onBtnBack, this)); - getChildView("groups_next")->setEnabled(FALSE); - getChildView("groups_back")->setEnabled(FALSE); - - lastRequestTime = std::chrono::system_clock::now(); - - return TRUE; -} - -void FSPanelSearchGroups::focusDefaultElement() -{ - mSearchComboBox->focusTextEntry(); -} - -void FSPanelSearchGroups::find() -{ - std::string text = filterShortWords(mSearchComboBox->getSimple()); - if (text.size() == 0) - { - mSearchResults->setCommentText(LLTrans::getString("search_short")); - return; - } - - static LLUICachedControl<bool> inc_pg("ShowPGSims", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureSims", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultSims", 0); - if (!(inc_pg || inc_mature || inc_adult)) - { - LLNotificationsUtil::add("NoContentToSearch"); - return; - } - U32 scope = 0; - if (gAgent.wantsPGOnly()) - { - scope |= DFQ_PG_SIMS_ONLY; - } - bool adult_enabled = gAgent.canAccessAdult(); - bool mature_enabled = gAgent.canAccessMature(); - if (inc_pg) - { - scope |= DFQ_INC_PG; - } - if (inc_mature && mature_enabled) - { - scope |= DFQ_INC_MATURE; - } - if (inc_adult && adult_enabled) - { - scope |= DFQ_INC_ADULT; - } - scope |= DFQ_GROUPS; - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessage("DirFindQuery"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgentID); - gMessageSystem->addUUID("SessionID", gAgentSessionID); - gMessageSystem->nextBlock("QueryData"); - gMessageSystem->addUUID("QueryID", getQueryID()); - gMessageSystem->addString("QueryText", text); - gMessageSystem->addU32("QueryFlags", scope); - gMessageSystem->addS32("QueryStart", mStartSearch); - gAgent.sendReliableMessage(); - LL_DEBUGS("Search") << "Firing off search request: " << getQueryID() << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchGroups::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - std::string text = mSearchComboBox->getSimple(); - if (!text.empty()) - { - LLSearchHistory::getInstance()->addEntry(text); - } - - resetSearch(); - - find(); -} - -void FSPanelSearchGroups::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("groups_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchGroups::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("groups_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchGroups::resetSearch() -{ - mStartSearch = 0; - getChildView("groups_back")->setEnabled(FALSE); - getChildView("groups_next")->setEnabled(FALSE); -} - -S32 FSPanelSearchGroups::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("groups_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchGroups::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_GROUP); - } -} - -// static -void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID query_id; - LLUUID group_id; - LLUUID agent_id; - std::string group_name; - S32 members; - F32 search_order; - - msg->getUUIDFast( _PREHASH_QueryData, _PREHASH_QueryID, query_id); - msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, agent_id); - - // Not for us - if (agent_id != gAgentID) - { - return; - } - LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchGroups* self = FSFloaterSearch::getSearchPanel<FSPanelSearchGroups>("panel_ls_groups"); - - // floater is closed or these are not results from our last request - if (!self || query_id != self->mQueryID) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_groups"); - - // Clear "Searching" label on first results - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - - // Check for status messages - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_PLACES_FOUNDNONE) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - return; - } - else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_short")); - return; - } - else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_banned")); - return; - } - else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - } - - bool found_one = false; - S32 num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - - self->mResultsReceived += num_new_rows; - num_new_rows = self->showNextButton(num_new_rows); - - for (S32 i = 0; i < num_new_rows; i++) - { - msg->getUUIDFast( _PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i); - msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i); - msg->getS32Fast( _PREHASH_QueryReplies, _PREHASH_Members, members, i); - msg->getF32Fast( _PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order,i); - if (group_id.isNull()) - { - LL_DEBUGS("Search") << "No results returned for QueryID: " << query_id << LL_ENDL; - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - else - { - LL_DEBUGS("Search") << "Got: " << group_name << " GroupID: " << group_id << LL_ENDL; - search_results->setEnabled(TRUE); - found_one = true; - - LLSD content; - LLSD element; - - element["id"] = group_id; - - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Group"; - - element["columns"][1]["column"] = "group_name"; - element["columns"][1]["value"] = group_name; - - element["columns"][2]["column"] = "members"; - element["columns"][2]["value"] = members; - - element["columns"][3]["column"] = "score"; - element["columns"][3]["value"] = search_order; - - content["name"] = group_name; - - search_results->addElement(element, ADD_BOTTOM); - self->mResultsContent[group_id.asString()] = content; - } - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -//////////////////////////////////////// -// Places Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchPlaces> t_panel_fs_search_places("panel_ls_places"); - -FSPanelSearchPlaces::FSPanelSearchPlaces() : FSSearchPanelBase() -, mQueryID(nullptr) -, mStartSearch(0) -, mResultsReceived(0) -, mResultsContent() -{ - mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchPlaces::find, this)); -} - -FSPanelSearchPlaces::~FSPanelSearchPlaces() -{ -} - -bool FSPanelSearchPlaces::postBuild() -{ - mSearchComboBox = findChild<LLSearchComboBox>("places_edit"); - mSearchResults = findChild<LLScrollListCtrl>("search_results_places"); - mPlacesCategory = findChild<LLComboBox>("places_category"); - if (mSearchComboBox) - { - mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchPlaces::onBtnFind, this)); - fillSearchComboBox(mSearchComboBox); - } - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchPlaces::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - } - if (mPlacesCategory) - { - mPlacesCategory->add(LLTrans::getString("all_categories"), LLSD("any")); - mPlacesCategory->addSeparator(); - for (int category = LLParcel::C_LINDEN; category < LLParcel::C_COUNT; category++) - { - LLParcel::ECategory eCategory = (LLParcel::ECategory)category; - mPlacesCategory->add(LLTrans::getString(LLParcel::getCategoryUIString(eCategory)), LLParcel::getCategoryString(eCategory)); - } - } - childSetAction("places_next", boost::bind(&FSPanelSearchPlaces::onBtnNext, this)); - childSetAction("places_back", boost::bind(&FSPanelSearchPlaces::onBtnBack, this)); - getChildView("places_next")->setEnabled(FALSE); - getChildView("places_back")->setEnabled(FALSE); - - return TRUE; -} - -void FSPanelSearchPlaces::focusDefaultElement() -{ - mSearchComboBox->focusTextEntry(); -} - -void FSPanelSearchPlaces::find() -{ - std::string text = filterShortWords(mSearchComboBox->getSimple()); - if (text.empty()) - { - mSearchResults->setCommentText(LLTrans::getString("search_short")); - return; - } - - static LLUICachedControl<bool> inc_pg("ShowPGSims", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureSims", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultSims", 0); - if (!(inc_pg || inc_mature || inc_adult)) - { - LLNotificationsUtil::add("NoContentToSearch"); - return; - } - S8 category; - std::string category_string = mPlacesCategory->getSelectedValue(); - if (category_string == "any") - { - category = LLParcel::C_ANY; - } - else - { - category = LLParcel::getCategoryFromString(category_string); - } - U32 scope = 0; - if (gAgent.wantsPGOnly()) - { - scope |= DFQ_PG_SIMS_ONLY; - } - bool adult_enabled = gAgent.canAccessAdult(); - bool mature_enabled = gAgent.canAccessMature(); - if (inc_pg) - { - scope |= DFQ_INC_PG; - } - if (inc_mature && mature_enabled) - { - scope |= DFQ_INC_MATURE; - } - if (inc_adult && adult_enabled) - { - scope |= DFQ_INC_ADULT; - } - scope |= DFQ_DWELL_SORT; - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessage("DirPlacesQuery"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgentID); - gMessageSystem->addUUID("SessionID", gAgentSessionID); - gMessageSystem->nextBlock("QueryData"); - gMessageSystem->addUUID("QueryID", getQueryID()); - gMessageSystem->addString("QueryText", text); - gMessageSystem->addU32("QueryFlags", scope); - gMessageSystem->addS8("Category", category); - // TODO: Search filter by region name. - gMessageSystem->addString("SimName", ""); - gMessageSystem->addS32("QueryStart", mStartSearch); - gAgent.sendReliableMessage(); - LL_INFOS("Search") << "Firing off places search request: " << getQueryID() << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchPlaces::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - std::string text = mSearchComboBox->getSimple(); - if (!text.empty()) - { - LLSearchHistory::getInstance()->addEntry(text); - } - - resetSearch(); - - find(); -} - -void FSPanelSearchPlaces::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("places_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchPlaces::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("places_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchPlaces::resetSearch() -{ - mStartSearch = 0; - getChildView("places_back")->setEnabled(FALSE); - getChildView("places_next")->setEnabled(FALSE); -} - -S32 FSPanelSearchPlaces::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("places_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchPlaces::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_PLACE); - } -} - -// static -void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID agent_id; - LLUUID query_id; - LLUUID parcel_id; - std::string name; - bool for_sale; - bool auction; - F32 dwell; - - msg->getUUID("AgentData", "AgentID", agent_id); - msg->getUUID("QueryData", "QueryID", query_id); - - // Not for us - if (agent_id != gAgentID) - { - return; - } - LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchPlaces* self = FSFloaterSearch::getSearchPanel<FSPanelSearchPlaces>("panel_ls_places"); - - // floater is closed or these are not results from our last request - if (!self || query_id != self->getQueryID()) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_places"); - - // Clear "Searching" label on first results - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - - // Check for status messages - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_PLACES_FOUNDNONE) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - return; - } - else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_short")); - return; - } - else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_banned")); - return; - } - else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - else if (status & STATUS_SEARCH_PLACES_ESTATEEMPTY) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - } - - bool found_one = false; - S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies"); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - - self->mResultsReceived += num_new_rows; - num_new_rows = self->showNextButton(num_new_rows); - - for (S32 i = 0; i < num_new_rows; i++) - { - msg->getUUID( "QueryReplies", "ParcelID", parcel_id, i); - msg->getString( "QueryReplies", "Name", name, i); - msg->getBOOL( "QueryReplies", "ForSale", for_sale,i); - msg->getBOOL( "QueryReplies", "Auction", auction, i); - msg->getF32( "QueryReplies", "Dwell", dwell, i); - if (parcel_id.isNull()) - { - LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - else - { - LL_DEBUGS("Search") << "Got: " << name << " ParcelID: " << parcel_id << LL_ENDL; - search_results->setEnabled(TRUE); - found_one = true; - - LLSD content; - LLSD element; - - element["id"] = parcel_id; - - if (auction) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Auction"; - } - else if (for_sale) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_For_Sale"; - } - else - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Place"; - } - - element["columns"][1]["column"] = "place_name"; - element["columns"][1]["value"] = name; - - content["name"] = name; - - std::string buffer = llformat("%.0f", (F64)dwell); - element["columns"][2]["column"] = "dwell"; - element["columns"][2]["value"] = buffer; - - search_results->addElement(element, ADD_BOTTOM); - self->mResultsContent[parcel_id.asString()] = content; - } - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -//////////////////////////////////////// -// Land Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchLand> t_panel_fs_search_land("panel_ls_land"); - -FSPanelSearchLand::FSPanelSearchLand() : FSSearchPanelBase() -, mQueryID(nullptr) -, mStartSearch(0) -, mResultsReceived(0) -, mResultsContent() -{ - mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchLand::find, this)); -} - -FSPanelSearchLand::~FSPanelSearchLand() -{ -} - -bool FSPanelSearchLand::postBuild() -{ - mSearchResults = getChild<LLScrollListCtrl>("search_results_land"); - mPriceEditor = findChild<LLLineEditor>("price_edit"); - mAreaEditor = findChild<LLLineEditor>("area_edit"); - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchLand::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - } - if (mPriceEditor) - { - mPriceEditor->setCommitOnFocusLost(false); - mPriceEditor->setCommitCallback(boost::bind(&FSPanelSearchLand::onBtnFind, this)); - } - if (mAreaEditor) - { - mAreaEditor->setCommitOnFocusLost(false); - mAreaEditor->setCommitCallback(boost::bind(&FSPanelSearchLand::find, this)); - } - childSetAction("land_find", boost::bind(&FSPanelSearchLand::onBtnFind, this)); - childSetAction("land_next", boost::bind(&FSPanelSearchLand::onBtnNext, this)); - childSetAction("land_back", boost::bind(&FSPanelSearchLand::onBtnBack, this)); - - getChildView("land_next")->setEnabled(FALSE); - getChildView("land_back")->setEnabled(FALSE); - - return TRUE; -} - -void FSPanelSearchLand::find() -{ - static LLUICachedControl<bool> inc_pg("ShowPGLand", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureLand", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultLand", 0); - static LLUICachedControl<bool> limit_price("FindLandPrice", 1); - static LLUICachedControl<bool> limit_area("FindLandArea", 1); - if (!(inc_pg || inc_mature || inc_adult)) - { - LLNotificationsUtil::add("NoContentToSearch"); - return; - } - - U32 category = ST_ALL; - const std::string& selection = findChild<LLComboBox>("land_category")->getSelectedValue().asString(); - if (!selection.empty()) - { - if (selection == "Auction") - { - category = ST_AUCTION; - } - else if (selection == "Mainland") - { - category = ST_MAINLAND; - } - else if (selection == "Estate") - { - category = ST_ESTATE; - } - } - - U32 scope = 0; - if (gAgent.wantsPGOnly()) - { - scope |= DFQ_PG_SIMS_ONLY; - } - bool mature_enabled = gAgent.canAccessMature(); - bool adult_enabled = gAgent.canAccessAdult(); - if (inc_pg) - { - scope |= DFQ_INC_PG; - } - if (inc_mature && mature_enabled) - { - scope |= DFQ_INC_MATURE; - } - if (inc_adult && adult_enabled) - { - scope |= DFQ_INC_ADULT; - } - const std::string& sort = findChild<LLComboBox>("land_sort_combo")->getSelectedValue().asString(); - if (!sort.empty()) - { - if (sort == "Name") - { - scope |= DFQ_NAME_SORT; - } - else if (sort == "Price") - { - scope |= DFQ_PRICE_SORT; - } - else if (sort == "PPM") - { - scope |= DFQ_PER_METER_SORT; - } - else if (sort == "Area") - { - scope |= DFQ_AREA_SORT; - } - } - else - { - scope |= DFQ_PRICE_SORT; - } - if (childGetValue("ascending_check").asBoolean()) - { - scope |= DFQ_SORT_ASC; - } - if (limit_price) - { - scope |= DFQ_LIMIT_BY_PRICE; - } - if (limit_area) - { - scope |= DFQ_LIMIT_BY_AREA; - } - S32 price = childGetValue("edit_price").asInteger(); - S32 area = childGetValue("edit_area").asInteger(); - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessage("DirLandQuery"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgentID); - gMessageSystem->addUUID("SessionID", gAgentSessionID); - gMessageSystem->nextBlock("QueryData"); - gMessageSystem->addUUID("QueryID", getQueryID()); - gMessageSystem->addU32("QueryFlags", scope); - gMessageSystem->addU32("SearchType", category); - gMessageSystem->addS32("Price", price); - gMessageSystem->addS32("Area", area); - gMessageSystem->addS32("QueryStart", mStartSearch); - gAgent.sendReliableMessage(); - LL_DEBUGS("Search") << "Firing off places search request: " << getQueryID() << category << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchLand::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - resetSearch(); - - find(); -} - -void FSPanelSearchLand::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("land_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchLand::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("land_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchLand::resetSearch() -{ - mStartSearch = 0; - getChildView("land_back")->setEnabled(FALSE); - getChildView("land_next")->setEnabled(FALSE); -} - -S32 FSPanelSearchLand::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("land_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchLand::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_PLACE); - } -} - -// static -void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID agent_id; - LLUUID query_id; - LLUUID parcel_id; - std::string name; - std::string land_sku; - std::string land_type; - bool auction; - bool for_sale; - S32 price; - S32 area; - - msg->getUUID("AgentData", "AgentID", agent_id); - msg->getUUID("QueryData", "QueryID", query_id); - - // Not for us - if (agent_id != gAgentID) - { - return; - } - LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchLand* self = FSFloaterSearch::getSearchPanel<FSPanelSearchLand>("panel_ls_land"); - - // floater is closed or these are not results from our last request - if (!self || query_id != self->mQueryID) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_land"); - // clear "Searching" label on first results - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - - static LLUICachedControl<bool> use_price("FindLandPrice", 1); - static LLUICachedControl<bool> use_area("FindLandArea", 1); - S32 limit_price = self->childGetValue("edit_price").asInteger(); - S32 limit_area = self->childGetValue("edit_area").asInteger(); - - bool found_one = false; - S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies"); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - self->mResultsReceived += num_new_rows; - - S32 not_auction = 0; - for (S32 i = 0; i < num_new_rows; i++) - { - msg->getUUID( "QueryReplies", "ParcelID", parcel_id, i); - msg->getString( "QueryReplies", "Name", name, i); - msg->getBOOL( "QueryReplies", "Auction", auction, i); - msg->getBOOL( "QueryReplies", "ForSale", for_sale, i); - msg->getS32( "QueryReplies", "SalePrice", price, i); - msg->getS32( "QueryReplies", "ActualArea", area, i); - if (parcel_id.isNull()) - { - LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("no_results")); - } - else - { - LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << parcel_id << LL_ENDL; - search_results->setEnabled(TRUE); - found_one = true; - if (msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0) - { - msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_ProductSKU, land_sku, i); - land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); - } - else - { - land_sku.clear(); - land_type = LLTrans::getString("land_type_unknown"); - } - if (parcel_id.isNull()) - { - continue; - } - if (use_price && (price > limit_price)) - { - continue; - } - if (use_area && (area < limit_area)) - { - continue; - } - - LLSD content; - LLSD element; - - element["id"] = parcel_id; - if (auction) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Auction"; - } - else if (for_sale) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_For_Sale"; - } - else - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Place"; - } - - element["columns"][1]["column"] = "land_name"; - element["columns"][1]["value"] = name; - - content["place_name"] = name; - - std::string buffer = "Auction"; - if (!auction) - { - buffer = llformat("%d", price); - not_auction++; - } - element["columns"][2]["column"] = "price"; - element["columns"][2]["value"] = price; - - element["columns"][3]["column"] = "area"; - element["columns"][3]["value"] = area; - if (!auction) - { - F32 ppm; - if (area > 0) - { - ppm = (F32)price / (F32)area; - } - else - { - ppm = 0.f; - } - std::string ppm_buffer = llformat("%.1f", ppm); - element["columns"][4]["column"] = "ppm"; - element["columns"][4]["value"] = ppm_buffer; - } - else - { - element["columns"][4]["column"] = "ppm"; - element["columns"][4]["value"] = "1.0"; - } - - element["columns"][5]["column"] = "land_type"; - element["columns"][5]["value"] = land_type; - - search_results->addElement(element, ADD_BOTTOM); - self->mResultsContent[parcel_id.asString()] = content; - } - // We test against non-auction properties because they don't count towards the page limit. - self->showNextButton(not_auction); - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -//////////////////////////////////////// -// Classifieds Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchClassifieds> t_panel_fs_search_classifieds("panel_ls_classifieds"); - -FSPanelSearchClassifieds::FSPanelSearchClassifieds() : FSSearchPanelBase() -, mQueryID(nullptr) -, mStartSearch(0) -, mResultsReceived(0) -, mResultsContent() -{ - mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchClassifieds::find, this)); -} - -FSPanelSearchClassifieds::~FSPanelSearchClassifieds() -{ -} - -bool FSPanelSearchClassifieds::postBuild() -{ - mSearchComboBox = findChild<LLSearchComboBox>("classifieds_edit"); - mSearchResults = getChild<LLScrollListCtrl>("search_results_classifieds"); - if (mSearchComboBox) - { - mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchClassifieds::onBtnFind, this)); - fillSearchComboBox(mSearchComboBox); - } - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchClassifieds::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - } - - mClassifiedsCategory = getChild<LLComboBox>("classifieds_category"); - if (mClassifiedsCategory) - { - LLClassifiedInfo::cat_map::iterator iter; - mClassifiedsCategory->add(LLTrans::getString("all_categories"), LLSD(0)); - mClassifiedsCategory->addSeparator(); - for (iter = LLClassifiedInfo::sCategories.begin(); - iter != LLClassifiedInfo::sCategories.end(); - iter++) - { - mClassifiedsCategory->add(LLTrans::getString(iter->second), LLSD((S32)iter->first)); - } - } - childSetAction("classifieds_next", boost::bind(&FSPanelSearchClassifieds::onBtnNext, this)); - childSetAction("classifieds_back", boost::bind(&FSPanelSearchClassifieds::onBtnBack, this)); - - getChildView("classifieds_next")->setEnabled(FALSE); - getChildView("classifieds_back")->setEnabled(FALSE); - - return TRUE; -} - -void FSPanelSearchClassifieds::focusDefaultElement() -{ - mSearchComboBox->focusTextEntry(); -} - -void FSPanelSearchClassifieds::find() -{ - std::string text = filterShortWords(mSearchComboBox->getSimple()); - if (text.size() == 0) - { - mSearchResults->setCommentText(LLTrans::getString("search_short")); - return; - } - - static LLUICachedControl<bool> inc_pg("ShowPGClassifieds", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureClassifieds", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultClassifieds", 0); - if (!(inc_pg || inc_mature || inc_adult)) - { - LLNotificationsUtil::add("NoContentToSearch"); - return; - } - U32 category = mClassifiedsCategory->getValue().asInteger(); - bool auto_renew = FALSE; - U32 flags = pack_classified_flags_request(auto_renew, inc_pg, inc_mature, inc_adult); - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessageFast(_PREHASH_DirClassifiedQuery); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - gMessageSystem->nextBlockFast(_PREHASH_QueryData); - gMessageSystem->addUUIDFast(_PREHASH_QueryID, getQueryID()); - gMessageSystem->addStringFast(_PREHASH_QueryText, text); - gMessageSystem->addU32Fast(_PREHASH_QueryFlags, flags); - gMessageSystem->addU32Fast(_PREHASH_Category, category); - gMessageSystem->addS32Fast(_PREHASH_QueryStart, mStartSearch); - gAgent.sendReliableMessage(); - LL_DEBUGS("Search") << "Firing off classified ad search request: " << getQueryID() << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchClassifieds::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - std::string text = mSearchComboBox->getSimple(); - if (!text.empty()) - { - LLSearchHistory::getInstance()->addEntry(text); - } - - resetSearch(); - - find(); -} - -void FSPanelSearchClassifieds::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("classifieds_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchClassifieds::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("classifieds_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchClassifieds::resetSearch() -{ - mStartSearch = 0; - getChildView("classifieds_back")->setEnabled(FALSE); - getChildView("classifieds_next")->setEnabled(FALSE); -} - -S32 FSPanelSearchClassifieds::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("classifieds_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchClassifieds::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_CLASSIFIED); - } -} - -// static -void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID agent_id; - LLUUID query_id; - LLUUID classified_id; - std::string name; - U32 creation_date; - U32 expiration_date; - S32 price_for_listing; - - msg->getUUID("AgentData", "AgentID", agent_id); - msg->getUUID("QueryData", "QueryID", query_id); - - // Not for us - if (agent_id != gAgentID) - { - return; - } - LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchClassifieds* self = FSFloaterSearch::getSearchPanel<FSPanelSearchClassifieds>("panel_ls_classifieds"); - - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD) - { - LLNotificationsUtil::add("SearchWordBanned"); - } - } - - // floater is closed or these are not results from our last request - if (!self || query_id != self->mQueryID) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_classifieds"); - - // Clear "Searching" label on first results - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - - // Check for status messages - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_PLACES_FOUNDNONE) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - return; - } - else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_short")); - return; - } - else if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_banned")); - return; - } - else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - } - - bool found_one = false; - S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies"); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - self->mResultsReceived += num_new_rows; - num_new_rows = self->showNextButton(num_new_rows); - - for (S32 i = 0; i < num_new_rows; i++) - { - msg->getUUID( "QueryReplies", "ClassifiedID", classified_id, i); - msg->getString( "QueryReplies", "Name", name, i); - msg->getU32( "QueryReplies", "CreationDate", creation_date, i); - msg->getU32( "QueryReplies", "ExpirationDate", expiration_date,i); - msg->getS32( "QueryReplies", "PriceForListing", price_for_listing,i); - if (classified_id.isNull()) - { - LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - else - { - LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << classified_id << LL_ENDL; - search_results->setEnabled(TRUE); - found_one = true; - - LLSD content; - LLSD element; - - element["id"] = classified_id; - - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "icon_top_pick.tga"; - - element["columns"][1]["column"] = "classified_name"; - element["columns"][1]["value"] = name; - - element["columns"][2]["column"] = "price"; - element["columns"][2]["value"] = price_for_listing; - - content["name"] = name; - - search_results->addElement(element, ADD_BOTTOM); - self->mResultsContent[classified_id.asString()] = content; - } - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -//////////////////////////////////////// -// Events Search Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchEvents> t_panel_fs_search_events("panel_ls_events"); - -FSPanelSearchEvents::FSPanelSearchEvents() : FSSearchPanelBase() -, mQueryID(nullptr) -, mResultsReceived(0) -, mStartSearch(0) -, mDay(0) -, mResultsContent() -{ - mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchEvents::find, this)); -} - -FSPanelSearchEvents::~FSPanelSearchEvents() -{ -} - -bool FSPanelSearchEvents::postBuild() -{ - mSearchComboBox = findChild<LLSearchComboBox>("events_edit"); - mSearchResults = getChild<LLScrollListCtrl>("search_results_events"); - mEventsMode = findChild<LLRadioGroup>("events_search_mode"); - if (mSearchComboBox) - { - mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchEvents::onBtnFind, this)); - fillSearchComboBox(mSearchComboBox); - } - if (mSearchResults) - { - mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchEvents::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); - mSearchResults->setCommentText(LLTrans::getString("no_results")); - } - if (mEventsMode) - { - mEventsMode->setCommitCallback(boost::bind(&FSPanelSearchEvents::onSearchModeChanged, this)); - mEventsMode->selectFirstItem(); - } - - childSetAction("events_next", boost::bind(&FSPanelSearchEvents::onBtnNext, this)); - childSetAction("events_back", boost::bind(&FSPanelSearchEvents::onBtnBack, this)); - childSetAction("events_tomorrow", boost::bind(&FSPanelSearchEvents::onBtnTomorrow, this)); - childSetAction("events_yesterday", boost::bind(&FSPanelSearchEvents::onBtnYesterday, this)); - childSetAction("events_today", boost::bind(&FSPanelSearchEvents::onBtnToday, this)); - - getChildView("events_next")->setEnabled(FALSE); - getChildView("events_back")->setEnabled(FALSE); - getChildView("events_tomorrow")->setEnabled(FALSE); - getChildView("events_yesterday")->setEnabled(FALSE); - getChildView("events_today")->setEnabled(FALSE); - setDay(0); - - return TRUE; -} - -void FSPanelSearchEvents::focusDefaultElement() -{ - mSearchComboBox->focusTextEntry(); -} - -void FSPanelSearchEvents::find() -{ - std::string text = filterShortWords(mSearchComboBox->getSimple()); - - static LLUICachedControl<bool> inc_pg("ShowPGEvents", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureEvents", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultEvents", 0); - if (!(inc_pg || inc_mature || inc_adult)) - { - LLNotificationsUtil::add("NoContentToSearch"); - return; - } - - U32 category = findChild<LLComboBox>("events_category")->getSelectedValue().asInteger(); - U32 scope = DFQ_DATE_EVENTS; - if (gAgent.wantsPGOnly()) - { - scope |= DFQ_PG_SIMS_ONLY; - } - bool mature_enabled = gAgent.canAccessMature(); - bool adult_enabled = gAgent.canAccessAdult(); - if (inc_pg) - { - scope |= DFQ_INC_PG; - } - if (inc_mature && mature_enabled) - { - scope |= DFQ_INC_MATURE; - } - if (inc_adult && adult_enabled) - { - scope |= DFQ_INC_ADULT; - } - - std::ostringstream string; - - if ("current" == childGetValue("events_search_mode").asString()) - { - string << "u|"; - } - else - { - string << mDay << "|"; - } - string << category << "|"; - string << text; - - mResultsReceived = 0; - if (mQueryID.notNull()) - { - mQueryID.setNull(); - } - mQueryID.generate(); - - if (mStartSearch < 0) - { - mStartSearch = 0; - } - - gMessageSystem->newMessage("DirFindQuery"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgentID); - gMessageSystem->addUUID("SessionID", gAgentSessionID); - gMessageSystem->nextBlock("QueryData"); - gMessageSystem->addUUID("QueryID", getQueryID()); - gMessageSystem->addString("QueryText", string.str()); - gMessageSystem->addU32("QueryFlags", scope); - gMessageSystem->addS32("QueryStart", mStartSearch); - gAgent.sendReliableMessage(); - LL_INFOS("Search") << "Firing off search request: " << getQueryID() << " Search Text: " << string.str() << LL_ENDL; - - mSearchResults->deleteAllItems(); - mSearchResults->setCommentText(LLTrans::getString("searching")); - mNumResultsReturned = 0; -} - -void FSPanelSearchEvents::onBtnFind() -{ - std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now(); - auto elapsed = now - lastRequestTime; - U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); - if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return; - lastRequestTime = now; - - std::string text = mSearchComboBox->getSimple(); - if (!text.empty()) - { - LLSearchHistory::getInstance()->addEntry(text); - } - - resetSearch(); - - find(); -} - -void FSPanelSearchEvents::onBtnNext() -{ - mStartSearch += RESULT_PAGE_SIZE; - getChildView("events_back")->setEnabled(TRUE); - - find(); -} - -void FSPanelSearchEvents::onBtnBack() -{ - mStartSearch -= RESULT_PAGE_SIZE; - getChildView("events_back")->setEnabled(mStartSearch > 0); - - find(); -} - -void FSPanelSearchEvents::onBtnTomorrow() -{ - resetSearch(); - setDay(mDay + 1); - - find(); -} - -void FSPanelSearchEvents::onBtnYesterday() -{ - resetSearch(); - setDay(mDay - 1); - - find(); -} - -void FSPanelSearchEvents::onBtnToday() -{ - resetSearch(); - setDay(0); - - find(); -} - -void FSPanelSearchEvents::resetSearch() -{ - mStartSearch = 0; - getChildView("events_back")->setEnabled(FALSE); - getChildView("events_next")->setEnabled(FALSE); -} - -void FSPanelSearchEvents::onSearchModeChanged() -{ - if (mEventsMode->getValue().asString() == "current") - { - getChildView("events_yesterday")->setEnabled(FALSE); - getChildView("events_tomorrow")->setEnabled(FALSE); - getChildView("events_today")->setEnabled(FALSE); - } - else - { - getChildView("events_yesterday")->setEnabled(TRUE); - getChildView("events_tomorrow")->setEnabled(TRUE); - getChildView("events_today")->setEnabled(TRUE); - } -} - -void FSPanelSearchEvents::setDay(S32 day) -{ - mDay = day; - struct tm* internal_time; - - time_t utc = time_corrected(); - utc += day * 24 * 60 * 60; - internal_time = utc_to_pacific_time(utc, is_daylight_savings()); - std::string buffer = llformat("%d/%d", 1 + internal_time->tm_mon, internal_time->tm_mday); - childSetValue("events_date", buffer); -} - -S32 FSPanelSearchEvents::showNextButton(S32 rows) -{ - bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE); - getChildView("events_next")->setEnabled(show_next_button); - if (show_next_button) - { - rows -= (mResultsReceived - RESULT_PAGE_SIZE); - } - return rows; -} - -void FSPanelSearchEvents::onSelectItem() -{ - if (!mSearchResults) - { - return; - } - S32 event_id = mSearchResults->getSelectedValue(); - FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search"); - if (search_instance) - { - search_instance->FSFloaterSearch::onSelectedEvent(event_id); - } -} - -// static -void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) -{ - LLUUID agent_id; - LLUUID query_id; - LLUUID owner_id; - std::string name; - std::string date; - - msg->getUUID("AgentData", "AgentID", agent_id); - msg->getUUID("QueryData", "QueryID", query_id); - - // Not for us - if (agent_id != gAgentID) - { - return; - } - LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL; - - FSPanelSearchEvents* self = FSFloaterSearch::getSearchPanel<FSPanelSearchEvents>("panel_ls_events"); - - // floater is closed or these are not results from our last request - if (!self || query_id != self->mQueryID) - { - return; - } - - LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_events"); - - // Clear "Searching" label on first results - if (self->mNumResultsReturned++ == 0) - { - search_results->deleteAllItems(); - } - // Check for status messages - if (msg->getNumberOfBlocks("StatusData")) - { - U32 status; - msg->getU32("StatusData", "Status", status); - if (status & STATUS_SEARCH_EVENTS_FOUNDNONE) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - return; - } - else if(status & STATUS_SEARCH_EVENTS_SHORTSTRING) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_short")); - return; - } - else if (status & STATUS_SEARCH_EVENTS_BANNEDWORD) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_banned")); - return; - } - else if (status & STATUS_SEARCH_EVENTS_SEARCHDISABLED) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_disabled")); - return; - } - else if (status & STATUS_SEARCH_EVENTS_NODATEOFFSET) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_no_date_offset")); - return; - } - else if (status & STATUS_SEARCH_EVENTS_NOCATEGORY) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_no_events_category")); - return; - } - else if (status & STATUS_SEARCH_EVENTS_NOQUERY) - { - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("search_no_query")); - return; - } - } - - S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies"); - if (num_new_rows == 0 && self->mResultsReceived == 0) - { - LLStringUtil::format_map_t map; - map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); - search_results->setCommentText(LLTrans::getString("not_found", map)); - } - - self->mResultsReceived += num_new_rows; - num_new_rows = self->showNextButton(num_new_rows); - static LLUICachedControl<bool> inc_pg("ShowPGEvents", 1); - static LLUICachedControl<bool> inc_mature("ShowMatureEvents", 0); - static LLUICachedControl<bool> inc_adult("ShowAdultEvents", 0); - bool found_one = false; - - for (S32 i = 0; i < num_new_rows; i++) - { - U32 event_id; - U32 unix_time; - U32 event_flags; - - msg->getUUID( "QueryReplies", "OwnerID", owner_id, i); - msg->getString( "QueryReplies", "Name", name, i); - msg->getU32( "QueryReplies", "EventID", event_id, i); - msg->getString( "QueryReplies", "Date", date, i); - msg->getU32( "QueryReplies", "UnixTime", unix_time, i); - msg->getU32( "QueryReplies", "EventFlags", event_flags,i); - - // Skip empty events... - if (owner_id.isNull()) - { - LL_INFOS("Search") << "Skipped " << event_id << " because of a nullptr owner result" << LL_ENDL; - continue; - } - // Skips events that don't match our scope... - if (((event_flags & (EVENT_FLAG_ADULT | EVENT_FLAG_MATURE)) == EVENT_FLAG_NONE) && !inc_pg) - { - LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL; - continue; - } - if ((event_flags & EVENT_FLAG_MATURE) && !inc_mature) - { - LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL; - continue; - } - if ((event_flags & EVENT_FLAG_ADULT) && !inc_adult) - { - LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL; - continue; - } - search_results->setEnabled(TRUE); - found_one = true; - - LLSD content; - LLSD element; - - element["id"] = llformat("%u", event_id); - - if (event_flags == EVENT_FLAG_ADULT) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Legacy_Event_Adult"; - } - else if (event_flags == EVENT_FLAG_MATURE) - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Legacy_Event_Mature"; - } - else - { - element["columns"][0]["column"] = "icon"; - element["columns"][0]["type"] = "icon"; - element["columns"][0]["value"] = "Icon_Legacy_Event_PG"; - } - element["columns"][1]["column"] = "name"; - element["columns"][1]["value"] = name; - - element["columns"][2]["column"] = "date"; - element["columns"][2]["value"] = date; - - element["columns"][3]["column"] = "time"; - element["columns"][3]["value"] = llformat("%u", unix_time); - - content["name"] = name; - content["event_id"] = (S32)event_id; - - search_results->addElement(element, ADD_BOTTOM); - std::string event = llformat("%u", event_id); - self->mResultsContent[event] = content; - } - if (found_one) - { - search_results->selectFirstItem(); - search_results->setFocus(TRUE); - self->onSelectItem(); - } -} - -//////////////////////////////////////// -// WebSearch Panel // -//////////////////////////////////////// - -static LLPanelInjector<FSPanelSearchWeb> t_panel_fs_search_web("panel_ls_web"); - -FSPanelSearchWeb::FSPanelSearchWeb() : FSSearchPanelBase() -, mWebBrowser(nullptr) -, mResetFocusOnLoad(false) -{ - // Second Life grids use a different URL format now - mCategoryPaths = LLSD::emptyMap(); - if (LLGridManager::getInstance()->isInSecondlife()) - { - // declare a map that transforms a category name into - // the parameter list that is used to search that category - mCategoryPaths["people"] = "collection_chosen=people"; - mCategoryPaths["places"] = "collection_chosen=places"; - mCategoryPaths["events"] = "collection_chosen=events"; - mCategoryPaths["groups"] = "collection_chosen=groups"; - mCategoryPaths["destinations"] = "collection_chosen=destinations"; - - mCategoryPaths["classifieds"] = "search_type=classified"; - mCategoryPaths["wiki"] = "search/wiki"; // not sure if this is still a thing in the new search - - mCategoryPaths["all"] = mCategoryPaths["people"].asString() + "&" + - mCategoryPaths["places"].asString() + "&" + - mCategoryPaths["events"].asString() + "&" + - mCategoryPaths["groups"].asString() + "&" + - mCategoryPaths["destinations"].asString(); - } - // OpenSim currently still uses the old URL format - else - { - // declare a map that transforms a category name into - // the URL suffix that is used to search that category - mCategoryPaths["all"] = "search"; - mCategoryPaths["people"] = "search/people"; - mCategoryPaths["places"] = "search/places"; - mCategoryPaths["events"] = "search/events"; - mCategoryPaths["groups"] = "search/groups"; - mCategoryPaths["wiki"] = "search/wiki"; - mCategoryPaths["destinations"] = "destinations"; - mCategoryPaths["classifieds"] = "classifieds"; - } -} - -bool FSPanelSearchWeb::postBuild() -{ - mWebBrowser = getChild<LLMediaCtrl>("search_browser"); - return TRUE; -} - -void FSPanelSearchWeb::loadURL(const SearchQuery &p) -{ - if (!mWebBrowser || !p.validateBlock()) - { - return; - } - - // CATEGORY is no longer used as part of the path on Second Life grids - LLSD subs = LLSD().with("CATEGORY", ""); - - // on OpenSim grids it probably is currently still being used, so keep the old behavior - if (!LLGridManager::getInstance()->isInSecondlife()) - { - // work out the subdir to use based on the requested category - LLSD subs = LLSD().with("CATEGORY", (mCategoryPaths.has(p.category.getValue()) ? mCategoryPaths[p.category.getValue()].asString() : mCategoryPaths["all"].asString())); - } - - // add the search query string - subs["QUERY"] = LLURI::escape(p.query.getValue()); - - // add the permissions token that login.cgi gave us - // We use "search_token", and fallback to "auth_token" if not present. - LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - if (search_token.asString().empty()) - { - search_token = LLLoginInstance::getInstance()->getResponse("auth_token"); - } - subs["AUTH_TOKEN"] = search_token.asString(); - - // add the user's preferred maturity (can be changed via prefs) - std::string maturity; - - // on Second Life grids, the maturity level is now a "&maturity" parameter that's not in the provided search URL - if (LLGridManager::getInstance()->isInSecondlife()) - { - if (gAgent.prefersAdult()) - { - maturity = "gma"; // PG,Mature,Adult - } - else if (gAgent.prefersMature()) - { - maturity = "gm"; // PG,Mature - } - else - { - maturity = "g"; // PG - } - - // not used on the SL search anymore, so clear out the respective parameter - subs["MATURITY"] = ""; - } - // OpenSim probably still uses the old maturity variant, so keep the old behavior here - else - { - if (gAgent.prefersAdult()) - { - maturity = "42"; // PG,Mature,Adult - } - else if (gAgent.prefersMature()) - { - maturity = "21"; // PG,Mature - } - else - { - maturity = "13"; // PG - } - subs["MATURITY"] = maturity; - } - - // add the user's god status - subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; - - // Get the search URL and expand all of the substitutions - // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - - // add the maturity and category variables to the new Second Life search URL - //std::string url = gAgent.getRegion() != nullptr ? gAgent.getRegion()->getSearchServerURL() : gSavedSettings.getString(LLGridManager::getInstance()->isInOpenSim() ? "OpenSimSearchURL" : "SearchURL"); - - std::string url = gSavedSettings.getString("SearchURL"); - - if (LLGridManager::getInstance()->isInSecondlife()) - { - url.append("&maturity=" + maturity + "&" + mCategoryPaths[p.category.getValue()].asString()); - } - - url = LLWeb::expandURLSubstitutions(url, subs); - - // Finally, load the URL in the webpanel - mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); -} - -void FSPanelSearchWeb::focusDefaultElement() -{ - mWebBrowser->setFocus(TRUE); -} - -void FSPanelSearchWeb::draw() -{ - if (mResetFocusOnLoad) - { - focusDefaultElement(); - mResetFocusOnLoad = false; - } - - FSSearchPanelBase::draw(); -} - -//////////////////////////////////////// -// Local functions // -//////////////////////////////////////// - -std::string filterShortWords(std::string query_string) -{ - if (query_string.length() < 1) - { - return ""; - } - - std::string final_query; - bool filtered = false; - boost::char_separator<char> sep(" "); - boost::tokenizer<boost::char_separator<char> > tokens(query_string, sep); - boost::tokenizer<boost::char_separator<char> >::iterator iter = tokens.begin(); - boost::tokenizer<boost::char_separator<char> >::iterator last = tokens.end(); - boost::tokenizer<boost::char_separator<char> >::iterator temp; - for (; iter != last; ++iter) - { - if ((*iter).length() > MIN_SEARCH_STRING_SIZE) - { - final_query.append((*iter)); - temp = iter; ++temp; - if (temp != last) - { - final_query.append(" "); - } - } - else - { - filtered = true; - } - } - - if (filtered) - { - LLSD args = LLSD().with("FINALQUERY", final_query); - LLNotificationsUtil::add("SeachFilteredOnShortWords", args); - } - - return final_query; -} - -void fillSearchComboBox(LLSearchComboBox* search_combo) -{ - if (search_combo == nullptr) - { - return; - } - - LLSearchHistory::getInstance()->load(); - - LLSearchHistory::search_history_list_t search_list = - LLSearchHistory::getInstance()->getSearchHistoryList(); - LLSearchHistory::search_history_list_t::const_iterator it = search_list.begin(); - for ( ; search_list.end() != it; ++it) - { - LLSearchHistory::LLSearchHistoryItem item = *it; - search_combo->add(item.search_query); - } -} diff --git a/indra/newview/fsfloatersearch.h b/indra/newview/fsfloatersearch.h deleted file mode 100644 index 90e2a8cb89..0000000000 --- a/indra/newview/fsfloatersearch.h +++ /dev/null @@ -1,404 +0,0 @@ -/** - * @file fsfloatersearch.h - * @brief Firestorm search definitions - * - * $LicenseInfo:firstyear=2012&license=fsviewerlgpl$ - * Phoenix Firestorm Viewer Source Code - * Copyright (C) 2012, Cinder Roxley <cinder.roxley@phoenixviewer.com> - * - * 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 - * - * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA - * http://www.firestormviewer.org - * $/LicenseInfo$ - */ - -#ifndef FS_FLOATERSEARCH_H -#define FS_FLOATERSEARCH_H - -#include "llfloater.h" -#include "lliconctrl.h" -#include "lltexteditor.h" -#include "lltexturectrl.h" -#include "llremoteparcelrequest.h" -#include "llavatarpropertiesprocessor.h" -#include "llgroupmgr.h" -#include "llavatarnamecache.h" -#include "llmediactrl.h" -#include "llradiogroup.h" -#include "llsearchcombobox.h" -#include "llscrolllistctrl.h" -#include "lltabcontainer.h" -#include "lleventnotifier.h" - -class FSSearchRemoteParcelInfoObserver; -class LLAvatarPropertiesObserver; -class LLGroupMgrObserver; -class LLSearchEditor; -class LLSearchComboBox; -class FSFloaterSearch; -class LLPanelProfile; -class FSScrollListCtrl; - -struct SearchQuery : public LLInitParam::Block<SearchQuery> -{ - Optional<std::string> category; - Optional<std::string> query; - - SearchQuery(); -}; - -/////////////////////////////// -// Search Panels // -/////////////////////////////// - -class FSSearchPanelBase : public LLPanel -{ -public: - FSSearchPanelBase() : LLPanel() { } - virtual ~FSSearchPanelBase() = default; - virtual void focusDefaultElement() { } -}; - -class FSPanelSearchPeople : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchPeople(); - static void processSearchReply(LLMessageSystem* msg, void**); - - /*virtual*/ void focusDefaultElement(); - -protected: - const S32& getNumResultsReturned() const { return mNumResultsReturned; }; - const S32& getNumResultsReceived() const { return mResultsReceived; }; - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchPeople(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - - void find(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - void onAvatarNameCallback(const LLUUID& id, const LLAvatarName& av_name); - - typedef boost::signals2::connection avatar_name_callback_connection_t; - avatar_name_callback_connection_t mAvatarNameCallbackConnection; - - S32 mNumResultsReturned; - S32 mStartSearch; - S32 mResultsReceived; - LLSD mResultsContent; - LLUUID mQueryID; - - LLSearchComboBox* mSearchComboBox; - LLScrollListCtrl* mSearchResults; -}; - -class FSPanelSearchGroups : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchGroups(); - static void processSearchReply(LLMessageSystem* msg, void**); - - /*virtual*/ void focusDefaultElement(); - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchGroups(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - - void find(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - S32 mNumResultsReturned; - S32 mStartSearch; - S32 mResultsReceived; - LLSD mResultsContent; - LLUUID mQueryID; - - LLSearchComboBox* mSearchComboBox; - LLScrollListCtrl* mSearchResults; -}; - -class FSPanelSearchPlaces : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchPlaces(); - static void processSearchReply(LLMessageSystem* msg, void**); - - /*virtual*/ void focusDefaultElement(); - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchPlaces(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - - void find(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - S32 mNumResultsReturned; - S32 mStartSearch; - S32 mResultsReceived; - LLSD mResultsContent; - LLUUID mQueryID; - - LLSearchComboBox* mSearchComboBox; - LLScrollListCtrl* mSearchResults; - LLComboBox* mPlacesCategory; -}; - -class FSPanelSearchLand : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchLand(); - static void processSearchReply(LLMessageSystem* msg, void**); - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchLand(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - - void find(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - S32 mNumResultsReturned; - S32 mStartSearch; - S32 mResultsReceived; - LLSD mResultsContent; - LLUUID mQueryID; - - LLLineEditor* mPriceEditor; - LLLineEditor* mAreaEditor; - LLScrollListCtrl* mSearchResults; -}; - -class FSPanelSearchClassifieds : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchClassifieds(); - static void processSearchReply(LLMessageSystem* msg, void**); - - /*virtual*/ void focusDefaultElement(); - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchClassifieds(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - - void find(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - S32 mNumResultsReturned; - S32 mStartSearch; - S32 mResultsReceived; - LLSD mResultsContent; - LLUUID mQueryID; - - LLSearchComboBox* mSearchComboBox; - LLScrollListCtrl* mSearchResults; - LLComboBox* mClassifiedsCategory; -}; - -class FSPanelSearchEvents : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchEvents(); - static void processSearchReply(LLMessageSystem* msg, void**); - - /*virtual*/ void focusDefaultElement(); - -private: - /*virtual*/ bool postBuild(); - virtual ~FSPanelSearchEvents(); - - void onBtnFind(); - void onSelectItem(); - void onBtnNext(); - void onBtnBack(); - void onBtnTomorrow(); - void onBtnYesterday(); - void onBtnToday(); - - void find(); - void setDay(S32 day); - void onSearchModeChanged(); - void resetSearch(); - S32 showNextButton(S32); - - const LLUUID& getQueryID() const { return mQueryID; } - - S32 mNumResultsReturned; - S32 mResultsReceived; - S32 mStartSearch; - S32 mDay; - LLSD mResultsContent; - LLUUID mQueryID; - - LLSearchComboBox* mSearchComboBox; - LLScrollListCtrl* mSearchResults; - LLRadioGroup* mEventsMode; -}; - -class FSPanelSearchWeb : public FSSearchPanelBase -{ - LOG_CLASS(FSFloaterSearch); -public: - FSPanelSearchWeb(); - /*virtual*/ bool postBuild(); - void loadURL(const SearchQuery &query); - /*virtual*/ void focusDefaultElement(); - /*virtual*/ void draw(); - void resetFocusOnLoad() { mResetFocusOnLoad = true; } - -private: - virtual ~FSPanelSearchWeb() {}; - - LLMediaCtrl* mWebBrowser; - LLSD mCategoryPaths; - - bool mResetFocusOnLoad; -}; - -class FSFloaterSearch : public LLFloater -{ - LOG_CLASS(FSFloaterSearch); -public: - typedef enum e_search_category - { - SC_AVATAR, - SC_GROUP, - SC_PLACE, - SC_CLASSIFIED - } ESearchCategory; - - struct _Params : public LLInitParam::Block<_Params, LLFloater::Params> - { - Optional<SearchQuery> search; - }; - - typedef LLSDParamAdapter<_Params> Params; - - FSFloaterSearch(const Params& key); - ~FSFloaterSearch(); - void onOpen(const LLSD& key); - bool postBuild(); - - void avatarNameUpdatedCallback(const LLUUID& id, const LLAvatarName& av_name); - void groupNameUpdatedCallback(const LLUUID& id, const std::string& name, bool is_group); - void onSelectedItem(const LLUUID& selected_item, ESearchCategory type); - void onSelectedEvent(const S32 selected_event); - void displayParcelDetails(const LLParcelData& parcel_data); - void displayClassifiedDetails(LLAvatarClassifiedInfo*& c_info); - void displayAvatarDetails(LLAvatarData* avatar_data); - void displayGroupDetails(LLGroupMgrGroupData*& group_data); - bool displayEventDetails(LLEventStruct event); - void displayEventParcelImage(const LLParcelData& parcel_data); - void setLoadingProgress(bool started); - - template <class T> - static T* getSearchPanel(const std::string& panel_name); - -private: - virtual void onClose(bool app_quitting); - const LLUUID& getSelectedID() { return mSelectedID; } - LLVector3d mParcelGlobal; - LLUUID mSelectedID; - U32 mEventID; - bool mHasSelection; - - void resetVerbs(); - void flushDetails(); - void onTabChange(); - void onBtnPeopleProfile(); - void onBtnPeopleIM(); - void onBtnPeopleFriend(); - void onBtnGroupProfile(); - void onBtnGroupChat(); - void onBtnGroupJoin(); - void onBtnEventReminder(); - void onBtnTeleport(); - void onBtnMap(); - - void regionHandleCallback(U64 region_handle, LLVector3d pos_global); - - FSSearchRemoteParcelInfoObserver* mRemoteParcelObserver; - FSSearchRemoteParcelInfoObserver* mRemoteParcelEventLocationObserver; - LLAvatarPropertiesObserver* mAvatarPropertiesObserver; - LLGroupMgrObserver* mGroupPropertiesRequest; - boost::signals2::connection mEventNotifierConnection; - - FSPanelSearchPeople* mPanelPeople; - FSPanelSearchGroups* mPanelGroups; - FSPanelSearchPlaces* mPanelPlaces; - FSPanelSearchEvents* mPanelEvents; - FSPanelSearchLand* mPanelLand; - FSPanelSearchClassifieds* mPanelClassifieds; - FSPanelSearchWeb* mPanelWeb; - - LLPanel* mDetailsPanel; - LLTextEditor* mDetailTitle; - LLTextEditor* mDetailDesc; - LLTextEditor* mDetailAux1; - LLTextEditor* mDetailAux2; - LLTextEditor* mDetailLocation; - LLTextureCtrl* mDetailSnapshot; - LLTextureCtrl* mDetailSnapshotParcel; - LLIconCtrl* mDetailMaturity; - LLTabContainer* mTabContainer; -}; - -#endif // FS_FLOATERSEARCH_H diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index f7a5a20872..d44aa9d72c 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -33,10 +33,11 @@ #include "../llviewertexturelist.h" #include "../pipeline.h" #include "buffer_util.h" -#include <boost/url.hpp> #include "llimagejpeg.h" #include "../llskinningutil.h" +#include <future> + using namespace LL::GLTF; using namespace boost::json; @@ -961,9 +962,41 @@ LLViewerFetchedTexture* fetch_texture(const LLUUID& id); bool Image::prep(Asset& asset, bool loadIntoVRAM) { mLoadIntoTexturePipe = loadIntoVRAM; + LLUUID id; if (mUri.size() == UUID_STR_SIZE && LLUUID::parseUUID(mUri, &id) && id.notNull()) { // loaded from an asset, fetch the texture from the asset system + LL_DEBUGS("GLTF") << "Loading image from an id" << id<< LL_ENDL; + } + else if (mUri.find("data:") == 0) + { // embedded in a data URI, load the texture from the URI + LL_WARNS("GLTF") << "Data URIs not yet supported" << LL_ENDL; + return false; + } + + // Image::prepImpl containes code that must run on the main thread + std::promise<bool> prep_promise; + std::future<bool> prep_future = prep_promise.get_future(); + + LLAppViewer::instance()->postToMainCoro([this, &asset, id, &prep_promise]() mutable { + try { + bool result = prepImpl(asset, id); + prep_promise.set_value(result); + } + catch (...) { + // Propagate exception to the waiting thread + prep_promise.set_exception(std::current_exception()); + } + }); + + // Block until prep is done on the main thread + return prep_future.get(); +} + +bool Image::prepImpl(Asset& asset, const LLUUID& id) +{ + if (id.notNull()) + { // loaded from an asset, fetch the texture from the asset system mTexture = fetch_texture(id); } else if (mUri.find("data:") == 0) @@ -994,6 +1027,12 @@ bool Image::prep(Asset& asset, bool loadIntoVRAM) std::string dir = gDirUtilp->getDirName(asset.mFilename); std::string img_file = dir + gDirUtilp->getDirDelimiter() + mUri; + if (!gDirUtilp->fileExists(img_file)) + { + // URI might be escaped, unescape. + img_file = dir + gDirUtilp->getDirDelimiter() + LLURI::unescape(mUri); + } + LLUUID tracking_id = LLLocalBitmapMgr::getInstance()->addUnit(img_file); if (tracking_id.notNull() && mLoadIntoTexturePipe) { diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h index b9554d753c..2802664ed3 100644 --- a/indra/newview/gltf/asset.h +++ b/indra/newview/gltf/asset.h @@ -320,6 +320,8 @@ namespace LL void clearData(Asset& asset); bool prep(Asset& asset, bool loadIntoVRAM); + private: + bool prepImpl(Asset& asset, const LLUUID& id); }; // Render Batch -- vertex buffer and list of primitives to render using diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h index c231443a9e..53dee98cd1 100644 --- a/indra/newview/gltf/buffer_util.h +++ b/indra/newview/gltf/buffer_util.h @@ -141,6 +141,42 @@ namespace LL } template<> + inline void copyScalar<U32, LLVector4a>(U32* src, LLVector4a& dst) + { + dst.set((F32)*src, 0.f, 0.f, 0.f); + } + + template<> + inline void copyScalar<U16, LLVector4a>(U16* src, LLVector4a& dst) + { + dst.set((F32)*src, 0.f, 0.f, 0.f); + } + + template<> + inline void copyScalar<U8, LLVector4a>(U8* src, LLVector4a& dst) + { + dst.set((F32)*src, 0.f, 0.f, 0.f); + } + + template<> + inline void copyScalar<U32, LLVector2>(U32* src, LLVector2& dst) + { + dst.set((F32)*src, 0.f); + } + + template<> + inline void copyScalar<U16, LLVector2>(U16* src, LLVector2& dst) + { + dst.set((F32)*src, 0.f); + } + + template<> + inline void copyScalar<U8, LLVector2>(U8* src, LLVector2& dst) + { + dst.set((F32)*src, 0.f); + } + + template<> inline void copyVec2<F32, LLVector2>(F32* src, LLVector2& dst) { dst.set(src[0], src[1]); @@ -221,6 +257,12 @@ namespace LL } template<> + inline void copyVec4<U32, LLVector4a>(U32* src, LLVector4a& dst) + { + dst.set((F32)src[0], (F32)src[1], (F32)src[2], (F32)src[3]); + } + + template<> inline void copyVec4<U16, LLVector4a>(U16* src, LLVector4a& dst) { dst.set(src[0], src[1], src[2], src[3]); @@ -373,7 +415,7 @@ namespace LL } else { - LL_ERRS("GLTF") << "Unsupported accessor type" << LL_ENDL; + LL_ERRS("GLTF") << "Unsupported accessor type " << (S32)accessor.mType << LL_ENDL; } } diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp index 4f8f80129d..5a94a2c6c6 100644 --- a/indra/newview/gltf/llgltfloader.cpp +++ b/indra/newview/gltf/llgltfloader.cpp @@ -440,7 +440,25 @@ void LLGLTFLoader::processNodeHierarchy(S32 node_idx, std::map<std::string, S32> (LLModel::NO_ERRORS == pModel->getStatus()) && validate_model(pModel)) { - mTransform.setIdentity(); + // Build the scene transform. + // Non-skinned meshes: scene transform carries coord rotation + hierarchy, + // preserving the object's rotation/position/scale for upload. + // Skinned meshes: transform is already baked into vertices, so scene is identity. + if (node.mSkin >= 0) + { + mTransform.setIdentity(); + } + else + { + glm::mat4 hierarchy_transform; + computeCombinedNodeTransform(mGLTFAsset, node_idx, hierarchy_transform); + glm::mat4 combined = coord_system_rotation * hierarchy_transform; + if (mApplyXYRotation) + { + combined = coord_system_rotationxy * combined; + } + mTransform = LLMatrix4(glm::value_ptr(combined)); + } transformation = mTransform; // adjust the transformation to compensate for mesh normalization @@ -602,11 +620,12 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in if (material->mPbrMetallicRoughness.mBaseColorTexture.mIndex >= 0) { S32 texIndex = material->mPbrMetallicRoughness.mBaseColorTexture.mIndex; - std::string filename = processTexture(texIndex, "base_color", material->mName); + std::string full_path; + std::string filename = processTexture(full_path, texIndex, "base_color", material->mName); if (!filename.empty()) { - impMat.mDiffuseMapFilename = filename; + impMat.mDiffuseMapFilename = full_path; impMat.mDiffuseMapLabel = material->mName.empty() ? filename : material->mName; // Check if the texture is already loaded @@ -637,7 +656,7 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in return cachedMat; } -std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name) +std::string LLGLTFLoader::processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name) { S32 sourceIndex; if (!validateTextureIndex(texture_index, sourceIndex)) @@ -661,6 +680,12 @@ std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& t { // Uri might be escaped filename = LLURI::unescape(filename); + full_path = dir + gDirUtilp->getDirDelimiter() + filename; + } + + if (gDirUtilp->fileExists(full_path)) + { + full_path_out = full_path; } LL_INFOS("GLTF_IMPORT") << "Found texture: " << filename << " for material: " << material_name << LL_ENDL; @@ -677,7 +702,12 @@ std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& t // Process embedded textures if (image.mBufferView >= 0) { - return extractTextureToTempFile(texture_index, texture_type); + std::string temp_path = extractTextureToTempFile(texture_index, texture_type); + if (!temp_path.empty()) + { + full_path_out = temp_path; + } + return temp_path; } return ""; @@ -727,23 +757,47 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const std::string& bas S32 skinIdx = nodeno.mSkin; - // Compute final combined transform matrix (hierarchy + coordinate rotation) + // Compute the vertex transform for this mesh. + // Non-skinned meshes: vertices are left untransformed; the node's hierarchy transform + // (rotation, translation, scale) is stored in the scene transform instead, matching + // the DAE loader. This ensures the uploaded object's bounding box and transform + // properties are correct. See: https://github.com/secondlife/viewer/issues/5431 + // Skinned meshes: coord rotation + hierarchy are baked into vertex positions because + // inverse bind matrices and skin weights are already computed in that space. + // TODO: consider aligning skinned meshes with the DAE loader (scene transform instead + // of vertex baking), which would require adjusting inverse bind matrices, bind shape + // matrix, and weight keying to match. S32 node_index = static_cast<S32>(&nodeno - &mGLTFAsset.mNodes[0]); glm::mat4 hierarchy_transform; computeCombinedNodeTransform(mGLTFAsset, node_index, hierarchy_transform); - // Combine transforms: coordinate rotation applied to hierarchy transform - glm::mat4 final_transform = coord_system_rotation * hierarchy_transform; - if (mApplyXYRotation) + glm::mat4 vertex_transform; + if (skinIdx >= 0) + { + // Skinned mesh: bake coord rotation + hierarchy into vertices. + // Inverse bind matrices and skin weights depend on this transform being applied. + vertex_transform = coord_system_rotation * hierarchy_transform; + if (mApplyXYRotation) + { + vertex_transform = coord_system_rotationxy * vertex_transform; + } + } + else { - final_transform = coord_system_rotationxy * final_transform; + // Non-skinned mesh: don't apply any transform to vertices. + // The hierarchy transform will be stored in the scene transform matrix. + vertex_transform = glm::mat4(1.0f); // identity } // Check if we have a negative scale (flipped coordinate system) - bool hasNegativeScale = glm::determinant(final_transform) < 0.0f; + // coord_system_rotation and coord_system_rotationxy are pure rotations (det=1), + // so negative scale depends only on the hierarchy transform. + bool hasNegativeScale = glm::determinant(hierarchy_transform) < 0.0f; + + bool hasVertexTransform = (vertex_transform != glm::mat4(1.0f)); // Pre-compute normal transform matrix (transpose of inverse of upper-left 3x3) - const glm::mat3 normal_transform = glm::transpose(glm::inverse(glm::mat3(final_transform))); + const glm::mat3 normal_transform = glm::transpose(glm::inverse(glm::mat3(vertex_transform))); // Mark unsuported joints with '-1' so that they won't get added into weights // GLTF maps all joints onto all meshes. Gather use count per mesh to cut unused ones. @@ -796,30 +850,49 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const std::string& bas return false; // Skip this primitive } - // Apply the global scale and center offset to all vertices + // Apply vertex transform (if any) to all vertices. + // Skinned meshes: this bakes coord rotation + hierarchy into vertices. + // Non-skinned meshes: vertex_transform is identity (no baking). for (U32 i = 0; i < prim.getVertexCount(); i++) { - // Use pre-computed final_transform - glm::vec4 pos(prim.mPositions[i][0], prim.mPositions[i][1], prim.mPositions[i][2], 1.0f); - glm::vec4 transformed_pos = final_transform * pos; - GLTFVertex vert; - vert.position = glm::vec3(transformed_pos); - if (!prim.mNormals.empty()) + if (hasVertexTransform) { - // Use pre-computed normal_transform - glm::vec3 normal_vec(prim.mNormals[i][0], prim.mNormals[i][1], prim.mNormals[i][2]); - vert.normal = glm::normalize(normal_transform * normal_vec); + glm::vec4 pos(prim.mPositions[i][0], prim.mPositions[i][1], prim.mPositions[i][2], 1.0f); + glm::vec4 transformed_pos = vertex_transform * pos; + vert.position = glm::vec3(transformed_pos); + + if (!prim.mNormals.empty()) + { + glm::vec3 normal_vec(prim.mNormals[i][0], prim.mNormals[i][1], prim.mNormals[i][2]); + vert.normal = glm::normalize(normal_transform * normal_vec); + } + else + { + vert.normal = glm::normalize(normal_transform * glm::vec3(0.0f, 0.0f, 1.0f)); + LL_DEBUGS("GLTF_IMPORT") << "No normals found for primitive, using default normal." << LL_ENDL; + } } else { - // Use default normal (pointing up in model space) - vert.normal = glm::normalize(normal_transform * glm::vec3(0.0f, 0.0f, 1.0f)); - LL_DEBUGS("GLTF_IMPORT") << "No normals found for primitive, using default normal." << LL_ENDL; + // No transform: store raw GLTF positions and normals. + // The scene transform will carry coord rotation + hierarchy. + vert.position = glm::vec3(prim.mPositions[i][0], prim.mPositions[i][1], prim.mPositions[i][2]); + + if (!prim.mNormals.empty()) + { + vert.normal = glm::vec3(prim.mNormals[i][0], prim.mNormals[i][1], prim.mNormals[i][2]); + } + else + { + vert.normal = glm::vec3(0.0f, 0.0f, 1.0f); + LL_DEBUGS("GLTF_IMPORT") << "No normals found for primitive, using default normal." << LL_ENDL; + } } - vert.uv0 = glm::vec2(prim.mTexCoords0[i][0], -prim.mTexCoords0[i][1]); + // Flip texture V coordinate + vert.uv0 = glm::vec2(prim.mTexCoords0[i][0], 1.f - prim.mTexCoords0[i][1]); if (skinIdx >= 0) { diff --git a/indra/newview/gltf/llgltfloader.h b/indra/newview/gltf/llgltfloader.h index 7aa1a94c20..a847e567a6 100644 --- a/indra/newview/gltf/llgltfloader.h +++ b/indra/newview/gltf/llgltfloader.h @@ -149,7 +149,7 @@ private: void processNodeHierarchy(S32 node_idx, std::map<std::string, S32>& mesh_name_counts, U32 submodel_limit, const LLVolumeParams& volume_params); bool addJointToModelSkin(LLMeshSkinInfo& skin_info, S32 gltf_skin_idx, size_t gltf_joint_idx); LLGLTFImportMaterial processMaterial(S32 material_index, S32 fallback_index); - std::string processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name); + std::string processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name); bool validateTextureIndex(S32 texture_index, S32& source_index); std::string generateMaterialName(S32 material_index, S32 fallback_index = -1); bool populateModelFromMesh(LLModel* pModel, const std::string& base_name, const LL::GLTF::Mesh &mesh, const LL::GLTF::Node &node, material_map& mats); diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 0e36698018..07ed0d0824 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -767,8 +767,21 @@ Function un.UserSettingsFiles StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade
-# Ask if user wants to keep data files or not
-MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
+ClearErrors
+Push $0
+${GetParameters} $COMMANDLINE
+${GetOptionsS} $COMMANDLINE "/clrusrfiles" $0
+# GetOptionsS returns an error if option does not exist, jump past Goto.
+IfErrors +3 0
+ Pop $0
+ Goto Remove
+
+Pop $0
+ClearErrors
+
+ifSilent Keep 0
+ # Ask if user wants to keep data files or not
+ MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
Remove:
Push $0
@@ -864,11 +877,25 @@ RMDir "$INSTDIR" IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER
FOLDERFOUND:
+ifSilent NOFOLDER 0
MessageBox MB_OK $(DeleteProgramFilesMB) /SD IDOK IDOK NOFOLDER
NOFOLDER:
-MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete
+ClearErrors
+Push $0
+${GetParameters} $COMMANDLINE
+${GetOptionsS} $COMMANDLINE "/clearreg" $0
+# GetOptionsS returns an error if option does not exist, jump past Goto.
+IfErrors +3 0
+ Pop $0
+ Goto DeleteKeys
+
+Pop $0
+ClearErrors
+
+ifSilent NoDelete 0
+ MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete
DeleteKeys:
DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\x-grid-location-info"
@@ -912,21 +939,7 @@ Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch.
StrCmp $SKIP_AUTORUN "true" +2;
- # Assumes SetOutPath $INSTDIR
- # Run INSTEXE (our updater), passing VIEWER_EXE plus the command-line
- # arguments built into our shortcuts. This gives the updater a chance
- # to verify that the viewer we just installed is appropriate for the
- # running system -- or, if not, to download and install a different
- # viewer. For instance, if a user running 32-bit Windows installs a
- # 64-bit viewer, it cannot run on this system. But since the updater
- # is a 32-bit executable even in the 64-bit viewer package, the
- # updater can detect the problem and adapt accordingly.
- # Once everything is in order, the updater will run the specified
- # viewer with the specified params.
- # Quote the updater executable and the viewer executable because each
- # must be a distinct command-line token, but DO NOT quote the language
- # string because it must decompose into separate command-line tokens.
- Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
+ Exec '"$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
#
FunctionEnd
diff --git a/indra/newview/licenses-linux.txt b/indra/newview/licenses-linux.txt index e83989b4a7..d443bd3385 100644 --- a/indra/newview/licenses-linux.txt +++ b/indra/newview/licenses-linux.txt @@ -196,50 +196,6 @@ Redistribution and use in source and binary forms, with or Cass Everitt - cass@r3.nu -================ -OpenJPEG License -================ - -/* - * The copyright in this software is being made available under the 2-clauses - * BSD License, included below. This software may be subject to other third - * party and contributor rights, including patent rights, and no such rights - * are granted under this license. - * - * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2014, Professor Benoit Macq - * Copyright (c) 2003-2014, Antonin Descampe - * Copyright (c) 2003-2009, Francois-Olivier Devaux - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France - * Copyright (c) 2012, CS Systemes d'Information, France - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - =============== OpenSSL License diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index 54d8ceb85a..b30fe16c58 100644 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -53,8 +53,8 @@ void LLAccountingCostManager::accountingCostCoro(std::string url, LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AccountingCost", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("accountingCostCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); try { diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index abea7926ee..23647487b0 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -430,6 +430,7 @@ LLAgent::LLAgent() : mIsDoNotDisturb(false), mControlFlags(0x00000000), + mLastJumpInputTime(0.0), mAutoPilot(false), mAutoPilotFlyOnStop(false), @@ -441,8 +442,8 @@ LLAgent::LLAgent() : mAutoPilotTargetDist(0.f), mAutoPilotNoProgressFrameCount(0), mAutoPilotRotationThreshold(0.f), - mAutoPilotFinishedCallback(NULL), - mAutoPilotCallbackData(NULL), + mAutoPilotFinishedCallback(nullptr), + mAutoPilotCallbackData(nullptr), mMovementKeysLocked(false), @@ -459,8 +460,8 @@ LLAgent::LLAgent() : mVoiceConnected(false), - mMouselookModeInSignal(NULL), - mMouselookModeOutSignal(NULL) + mMouselookModeInSignal(nullptr), + mMouselookModeOutSignal(nullptr) { for (U32 i = 0; i < TOTAL_CONTROLS; i++) { @@ -468,7 +469,7 @@ LLAgent::LLAgent() : mControlsTakenPassedOnCount[i] = 0; } - mListener.reset(new LLAgentListener(*this)); + mListener = std::make_shared<LLAgentListener>(*this); addParcelChangedCallback(&setCanEditParcel); @@ -784,6 +785,10 @@ void LLAgent::moveUp(S32 direction) if (direction > 0) { + if (!getFlying()) + { + mLastJumpInputTime = LLTimer::getTotalSeconds(); + } setControlFlags(AGENT_CONTROL_UP_POS | AGENT_CONTROL_FAST_UP); } else if (direction < 0) @@ -2677,7 +2682,21 @@ void LLAgent::onAnimStop(const LLUUID& id) } else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND) { - setControlFlags(AGENT_CONTROL_FINISH_ANIM); + // FIRE-34049/FIRE-34273/https://github.com/secondlife/viewer/issues/4218 + // Avoid forcing AGENT_CONTROL_FINISH_ANIM, which can short-circuit the next pre-jump + // during rapid successive jumps. + // TODO: a more robust fix would require knowing which specific animation finished, + // information that is not currently provided by the simulator. + const bool up_pos = (mControlFlags & AGENT_CONTROL_UP_POS) != 0; + const F64 now = LLTimer::getTotalSeconds(); + const F64 elapsed = now - mLastJumpInputTime; + static LLCachedControl<F32> recent_jump_threshold_secs(gSavedSettings, "RecentJumpThresholdSecs"); + const bool recent_jump = (mLastJumpInputTime > 0.0) && (elapsed < recent_jump_threshold_secs); + + if (!up_pos && !recent_jump) + { + setControlFlags(AGENT_CONTROL_FINISH_ANIM); + } } } @@ -4714,9 +4733,9 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); @@ -4774,9 +4793,9 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_ { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); @@ -4864,6 +4883,8 @@ const std::string& LLAgent::getTeleportStateName() const void LLAgent::parseTeleportMessages(const std::string& xml_filename) { + LL_PROFILE_ZONE_SCOPED; + LLXMLNodePtr root; bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a2d2ecea9f..ddaa8dd68c 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -39,9 +39,10 @@ #include "httprequest.h" #include "llcorehttputil.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> +#include <functional> + extern const bool ANIMATE; extern const U8 AGENT_STATE_TYPING; // Typing indication extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected @@ -257,7 +258,7 @@ public: void changeParcels(); // called by LLViewerParcelMgr when we cross a parcel boundary // Register a boost callback to be called when the agent changes parcels - typedef boost::function<void()> parcel_changed_callback_t; + typedef std::function<void()> parcel_changed_callback_t; boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t); private: @@ -499,6 +500,7 @@ private: S32 mControlsTakenCount[TOTAL_CONTROLS]; S32 mControlsTakenPassedOnCount[TOTAL_CONTROLS]; U32 mControlFlags; // Replacement for the mFooKey's + F64 mLastJumpInputTime; // Time of last jump input (key-down) in seconds from LLTimer::getTotalSeconds() //-------------------------------------------------------------------- // Animations @@ -769,7 +771,7 @@ public: void requestEnterGodMode(); void requestLeaveGodMode(); - typedef boost::function<void (U8)> god_level_change_callback_t; + typedef std::function<void(U8)> god_level_change_callback_t; typedef boost::signals2::signal<void (U8)> god_level_change_signal_t; typedef boost::signals2::connection god_level_change_slot_t; @@ -977,8 +979,8 @@ public: /// Utilities for allowing the the agent sub managers to post and get via /// HTTP using the agent's policy settings and headers. - bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); - bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); + bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr); + bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr); LLCore::HttpRequest::policy_t getAgentPolicy() const { return mHttpPolicy; } diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index b6d31c0cae..369a6d3697 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -975,6 +975,10 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction) new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM); } } + else + { + new_distance = llmin(new_distance, getCameraMaxZoomDistance()); + } mCameraFocusOffsetTarget = new_distance * camera_offset_unit; } @@ -1035,6 +1039,10 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters) new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM); } } + else + { + new_distance = llmin(new_distance, getCameraMaxZoomDistance()); + } // Compute new camera offset mCameraFocusOffsetTarget = new_distance * camera_offset_unit; diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp index 265e4060ff..4a5c037f1f 100644 --- a/indra/newview/llagentpicksinfo.cpp +++ b/indra/newview/llagentpicksinfo.cpp @@ -53,7 +53,7 @@ public: LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgent.getID()); } - typedef boost::function<void(LLAvatarData*)> server_respond_callback_t; + typedef std::function<void(LLAvatarData*)> server_respond_callback_t; void setServerRespondCallback(const server_respond_callback_t& cb) { diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 1e118ffa98..70da86805c 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -189,11 +189,11 @@ public: // Signals //-------------------------------------------------------------------- public: - typedef boost::function<void()> loading_started_callback_t; + typedef std::function<void()> loading_started_callback_t; typedef boost::signals2::signal<void()> loading_started_signal_t; boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb); - typedef boost::function<void()> loaded_callback_t; + typedef std::function<void()> loaded_callback_t; typedef boost::signals2::signal<void()> loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 5114ac8a08..f67f2688a1 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -861,8 +861,8 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht return; } - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOptions->setTimeout(HTTP_TIMEOUT); @@ -950,7 +950,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht LL_DEBUGS("Inventory", "AIS3") << "Result: " << result << LL_ENDL; onUpdateReceived(result, type, body); - if (callback && !callback.empty()) + if (callback != nullptr) { bool needs_callback = true; LLUUID id(LLUUID::null); @@ -1019,6 +1019,9 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht } //------------------------------------------------------------------------- +U32 AISUpdate::sBatchFrameCount = 0; +LLTimer AISUpdate::sBatchTimer; + AISUpdate::AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD& request_body) : mType(type) { @@ -1036,8 +1039,16 @@ AISUpdate::AISUpdate(const LLSD& update, AISAPI::COMMAND_TYPE type, const LLSD& mFetchDepth = request_body["depth"].asInteger(); } - mTimer.setTimerExpirySec(AIS_EXPIRY_SECONDS); - mTimer.start(); + mTaskTimer.setTimerExpirySec(AIS_TASK_EXPIRY_SECONDS); + mTaskTimer.start(); + + U32 current_frame = LLFrameTimer::getFrameCount(); + if (sBatchFrameCount != current_frame) + { + sBatchTimer.setTimerExpirySec(AIS_BATCH_EXPIRY_SECONDS); + sBatchTimer.start(); + sBatchFrameCount = current_frame; + } parseUpdate(update); } @@ -1058,11 +1069,25 @@ void AISUpdate::clearParseResults() void AISUpdate::checkTimeout() { - if (mTimer.hasExpired()) + if (mTaskTimer.hasExpired() || sBatchTimer.hasExpired()) { - llcoro::suspend(); + // If we are taking too long, don't starve other tasks, + // yield to mainloop. + // If we use normal suspend(), there will be a chance of + // waking up from other suspends, before main coro had + // a chance, so wait for a frame tick instead. + llcoro::suspendUntilNextFrame(); LLCoros::checkStop(); - mTimer.setTimerExpirySec(AIS_EXPIRY_SECONDS); + mTaskTimer.setTimerExpirySec(AIS_TASK_EXPIRY_SECONDS); + + U32 current_frame = LLFrameTimer::getFrameCount(); + if (sBatchFrameCount != current_frame) + { + // To give other tasks a chance batch timer + // has a longer delay. + sBatchTimer.setTimerExpirySec(AIS_BATCH_EXPIRY_SECONDS); + sBatchFrameCount = current_frame; + } } } diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index dd490c8268..1dab0dd1f9 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -44,7 +44,7 @@ public: LIBRARY } ITEM_TYPE; - typedef boost::function<void(const LLUUID &invItem)> completion_t; + typedef std::function<void(const LLUUID& invItem)> completion_t; static bool isAvailable(); static void getCapNames(LLSD& capNames); @@ -89,7 +89,7 @@ private: static const std::string INVENTORY_CAP_NAME; static const std::string LIBRARY_CAP_NAME; - typedef boost::function < LLSD (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t, + typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t, const std::string, LLSD, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t; static void EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc); @@ -130,9 +130,13 @@ private: void clearParseResults(); void checkTimeout(); - // Fetch can return large packets of data, throttle it to not cause lags - // Todo: make throttle work over all fetch requests isntead of per-request - const F32 AIS_EXPIRY_SECONDS = 0.008f; + // Fetches can return large packets of data, + // throttle them individually to not get stuck + // on a single large task. And throttle sum total + // to not cause lags when multiple large fetches + // returned results. + const F32 AIS_TASK_EXPIRY_SECONDS = 0.008f; + const F32 AIS_BATCH_EXPIRY_SECONDS = 0.010f; typedef std::map<LLUUID,size_t> uuid_int_map_t; uuid_int_map_t mCatDescendentDeltas; @@ -154,7 +158,9 @@ private: uuid_list_t mCategoryIds; bool mFetch; S32 mFetchDepth; - LLTimer mTimer; + LLTimer mTaskTimer; + static LLTimer sBatchTimer; + static U32 sBatchFrameCount; AISAPI::COMMAND_TYPE mType; }; diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index f4f19906f1..ece18fb5cc 100644 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -144,9 +144,11 @@ LLAppCoreHttp::~LLAppCoreHttp() void LLAppCoreHttp::init() { + LL_PROFILE_ZONE_SCOPED; + LLCoreHttpUtil::setPropertyMethods( - boost::bind(&LLControlGroup::getBOOL, boost::ref(gSavedSettings), _1), - boost::bind(&LLControlGroup::declareBOOL, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_NONDFT)); + std::bind(&LLControlGroup::getBOOL, std::ref(gSavedSettings), std::placeholders::_1), + std::bind(&LLControlGroup::declareBOOL, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_NONDFT)); LLCore::LLHttp::initialize(); diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index af18dca185..0b3d0355a2 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -28,9 +28,11 @@ #if defined(LL_BUGSPLAT) #include <boost/filesystem.hpp> #include <vector> -@import BugsplatMac; +@import CrashReporter; +@import HockeySDK; +@import BugSplatMac; // derived from BugsplatMac's BugsplatTester/AppDelegate.m -@interface LLAppDelegate () <BugsplatStartupManagerDelegate> +@interface LLAppDelegate () <BugSplatDelegate> @end #endif #include "llwindowmacosx-objc.h" @@ -68,13 +70,22 @@ #if defined(LL_BUGSPLAT) infos("bugsplat setup"); - // Engage BugsplatStartupManager *before* calling initViewer() to handle + // Engage BugSplat *before* calling initViewer() to handle // any crashes during initialization. // https://www.bugsplat.com/docs/platforms/os-x#initialization - [BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES; - [BugsplatStartupManager sharedManager].askUserDetails = NO; - [BugsplatStartupManager sharedManager].delegate = self; - [[BugsplatStartupManager sharedManager] start]; + + // Initialize BugSplat + [[BugSplat shared] setDelegate:self]; + [[BugSplat shared] setAutoSubmitCrashReport:YES]; + [[BugSplat shared] setPersistUserDetails:NO]; + [[BugSplat shared] setAskUserDetails:NO]; + [BugSplat shared].expirationTimeInterval = 0; + [[BugSplat shared] start]; + + // Optionally, add some attributes to your crash reports. + // Attributes are artibrary key/value pairs that are searchable in the BugSplat dashboard. + // [[BugSplat shared] setValue:@"Value of Plain Attribute" forAttribute:@"PlainAttribute"]; + #endif infos("post-bugsplat setup"); @@ -213,9 +224,54 @@ return true; } +- (void) setBugsplatValue:(nullable NSString *)value forAttribute:(NSString *)attribute +{ +#if defined(LL_BUGSPLAT) + //[[BugSplat shared] setValue:@"Value of not so plain <value> Attribute" forAttribute:@"NotSoPlainAttribute"]; + [[BugSplat shared] setValue:value forAttribute:attribute]; +#endif // LL_BUGSPLAT +} + #if defined(LL_BUGSPLAT) -- (NSString *)applicationLogForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager +- (void)bugSplatWillSendCrashReport:(BugSplat *)bugSplat +{ + infos("bugSplatWillSendCrashReport"); +} + +- (void)bugSplatWillSendCrashReportsAlways:(BugSplat *)bugSplat +{ + infos("bugSplatWillSendCrashReportsAlways"); +} + +- (void)bugSplatDidFinishSendingCrashReport:(BugSplat *)bugSplat +{ + infos("bugSplatDidFinishSendingCrashReport"); + + if(!secondLogPath.empty()) + { + boost::filesystem::remove(secondLogPath); + } + clearDumpLogsDir(); +} + +- (void)bugSplatWillCancelSendingCrashReport:(BugSplat *)bugSplat +{ + infos("bugSplatWillCancelSendingCrashReport"); +} + +- (void)bugSplatWillShowSubmitCrashReportAlert:(BugSplat *)bugSplat +{ + infos("bugSplatWillShowSubmitCrashReportAlert"); +} + +- (void)bugSplat:(BugSplat *)bugSplat didFailWithError:(NSError *)error +{ + std::string error_str([[error localizedDescription] UTF8String]); + infos("bugSplat:didFailWithError: " + error_str); +} + +- (NSString *)applicationLogForBugSplat:(BugSplat *)bugSplat; { CrashMetadata& meta(CrashMetadata_instance()); // As of BugsplatMac 1.0.6, userName and userEmail properties are now @@ -226,16 +282,21 @@ // report we are about to send. infos("applicationLogForBugsplatStartupManager setting userName = '" + meta.agentFullname + '"'); - bugsplatStartupManager.userName = + bugSplat.userName = [NSString stringWithCString:meta.agentFullname.c_str() encoding:NSUTF8StringEncoding]; // Use the email field for OS version, just as we do on Windows, until // BugSplat provides more metadata fields. infos("applicationLogForBugsplatStartupManager setting userEmail = '" + meta.OSInfo + '"'); - bugsplatStartupManager.userEmail = + bugSplat.userEmail = [NSString stringWithCString:meta.OSInfo.c_str() encoding:NSUTF8StringEncoding]; + + //bugSplat.userID = + // [NSString stringWithCString:meta.regionName.c_str() + // encoding:NSUTF8StringEncoding]; + // This strangely-named override method's return value contributes the // User Description metadata field. infos("applicationLogForBugsplatStartupManager -> '" + meta.fatalMessage + "'"); @@ -243,7 +304,8 @@ encoding:NSUTF8StringEncoding]; } -- (NSString *)applicationKeyForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason { +- (NSString *)applicationKeyForBugSplat:(BugSplat *)bugSplat signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason +{ // TODO: exceptionName, exceptionReason // Windows sends location within region as well, but that's because @@ -258,27 +320,6 @@ encoding:NSUTF8StringEncoding]; } -- (NSString *)defaultUserNameForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager { - std::string agentFullname(CrashMetadata_instance().agentFullname); - infos("defaultUserNameForBugsplatStartupManager -> '" + agentFullname + "'"); - return [NSString stringWithCString:agentFullname.c_str() - encoding:NSUTF8StringEncoding]; -} - -- (NSString *)defaultUserEmailForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager { - // Use the email field for OS version, just as we do on Windows, until - // BugSplat provides more metadata fields. - std::string OSInfo(CrashMetadata_instance().OSInfo); - infos("defaultUserEmailForBugsplatStartupManager -> '" + OSInfo + "'"); - return [NSString stringWithCString:OSInfo.c_str() - encoding:NSUTF8StringEncoding]; -} - -- (void)bugsplatStartupManagerWillSendCrashReport:(BugsplatStartupManager *)bugsplatStartupManager -{ - infos("bugsplatStartupManagerWillSendCrashReport"); -} - struct AttachmentInfo { AttachmentInfo(const std::string& path, const std::string& type): @@ -290,7 +331,7 @@ struct AttachmentInfo std::string pathname, basename, mimetype; }; -- (NSArray<BugsplatAttachment *> *)attachmentsForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager +- (NSArray<BugSplatAttachment *> *)attachmentsForBugSplat:(BugSplat *)bugSplat { const CrashMetadata& metadata(CrashMetadata_instance()); @@ -311,12 +352,12 @@ struct AttachmentInfo info.push_back(AttachmentInfo(secondLogPath, "text/xml")); } - // We "happen to know" that info[0].basename is "SecondLife.old" -- due to + // We "happen to know" that info[0].basename is "SecondLife.crash" -- due to // the fact that BugsplatMac only notices a crash during the viewer run // following the crash. // The Bugsplat service doesn't respect the MIME type above when returning // the log data to a browser, so take this opportunity to rename the file - // from <base>.old to <base>_log.txt + // from <base>.crash to <base>_log.txt info[0].basename = boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt"; infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename); @@ -334,8 +375,8 @@ struct AttachmentInfo encoding:NSUTF8StringEncoding]; NSData *nsdata = [NSData dataWithContentsOfFile:nspathname]; - BugsplatAttachment *attachment = - [[BugsplatAttachment alloc] initWithFilename:nsbasename + BugSplatAttachment *attachment = + [[BugSplatAttachment alloc] initWithFilename:nsbasename attachmentData:nsdata contentType:nsmimetype]; @@ -346,23 +387,6 @@ struct AttachmentInfo return attachments; } -- (void)bugsplatStartupManagerDidFinishSendingCrashReport:(BugsplatStartupManager *)bugsplatStartupManager -{ - infos("Sent crash report to BugSplat"); - - if(!secondLogPath.empty()) - { - boost::filesystem::remove(secondLogPath); - } - clearDumpLogsDir(); -} - -- (void)bugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager didFailWithError:(NSError *)error -{ - // TODO: message string from NSError - infos("Could not send crash report to BugSplat"); -} - #endif // LL_BUGSPLAT @end diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index cb352ac3e5..614d9fdeb1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3908,7 +3908,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL; bRetry = false; - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure")) { @@ -4381,8 +4381,8 @@ LLAppearanceMgr::LLAppearanceMgr(): outfit_observer.addCOFSavedCallback(boost::bind( &LLAppearanceMgr::setOutfitLocked, this, false)); - mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32( - "OutfitOperationsTimeout"))); + mUnlockOutfitTimer = std::make_unique<LLOutfitUnLockTimer>((F32)gSavedSettings.getS32( + "OutfitOperationsTimeout")); gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL); gIdleCallbacks.addFunction(&LLAppearanceMgr::onIdle, NULL); //sheduling appearance update requests diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 0a41a91750..131b6817ed 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -235,7 +235,7 @@ public: void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; } std::string getAppearanceServiceURL() const; - typedef boost::function<void ()> attachments_changed_callback_t; + typedef std::function<void()> attachments_changed_callback_t; typedef boost::signals2::signal<void ()> attachments_changed_signal_t; boost::signals2::connection setAttachmentsChangedCallback(attachments_changed_callback_t cb); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c34441932d..c74c0db08c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -98,6 +98,11 @@ #include "llurlmatch.h" #include "lltextutil.h" #include "lllogininstance.h" +#include "llvvmquery.h" + +#if LL_VELOPACK +#include "llvelopack.h" +#endif #include "llprogressview.h" #include "llvocache.h" #include "lldiskcache.h" @@ -220,7 +225,6 @@ #include "llfloatersimplesnapshot.h" #include "llfloatersnapshot.h" #include "llsidepanelinventory.h" -#include "llatmosphere.h" // includes for idle() idleShutdown() #include "llviewercontrol.h" @@ -357,9 +361,6 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; S32 gPendingMetricsUploads = 0; - -bool gDisconnected = false; - // Used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; bool gRestoreGL = false; @@ -394,12 +395,9 @@ const std::string MARKER_FILE_NAME("SecondLife.exec_marker"); const std::string START_MARKER_FILE_NAME("SecondLife.start_marker"); const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker"); +const std::string WATCHDOG_MARKER_FILE_NAME("SecondLife.watchdog_marker"); static std::string gLaunchFileOnQuit; -// Used on Win32 for other apps to identify our window (eg, win_setup) -const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; - - //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -680,7 +678,6 @@ LLAppViewer::LLAppViewer() mPurgeCacheOnExit(false), mPurgeUserDataOnExit(false), mSecondInstance(false), - mUpdaterNotFound(false), mSavedFinalSnapshot(false), mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded. mQuitRequested(false), @@ -759,6 +756,8 @@ public: bool LLAppViewer::init() { + LL_PROFILE_ZONE_SCOPED; + setupErrorHandling(mSecondInstance); // @@ -960,6 +959,7 @@ bool LLAppViewer::init() // Early out from user choice. LL_WARNS("InitInfo") << "initHardwareTest() failed." << LL_ENDL; // quit immediately + LL_PROFILER_FRAME_END; return false; } LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ; @@ -978,12 +978,14 @@ bool LLAppViewer::init() OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK); LL_WARNS("InitInfo") << "Failed to init cache" << LL_ENDL; // quit immediately + LL_PROFILER_FRAME_END; return false; } LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ; // Initialize event recorder LLViewerEventRecorder::createInstance(); + LLWatchdog::createInstance(); // // Initialize the window @@ -1013,6 +1015,7 @@ bool LLAppViewer::init() // Already handled with a MBVideoDrvErr LL_WARNS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL; // quit immediately + LL_PROFILER_FRAME_END; return false; } @@ -1026,6 +1029,7 @@ bool LLAppViewer::init() OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK); LL_WARNS("InitInfo") << "SSE2 is not supported" << LL_ENDL; // quit immediately + LL_PROFILER_FRAME_END; return false; } #endif @@ -1136,68 +1140,17 @@ bool LLAppViewer::init() gGLActive = false; -#if 0 // LL_RELEASE_FOR_DOWNLOAD && !LL_LINUX - // Skip updater if this is a non-interactive instance +//#if LL_RELEASE_FOR_DOWNLOAD + // Launch VVM update check if (!gSavedSettings.getBOOL("CmdLineSkipUpdater") && !gNonInteractive) { - LLProcess::Params updater; - updater.desc = "updater process"; - // Because it's the updater, it MUST persist beyond the lifespan of the - // viewer itself. - updater.autokill = false; - std::string updater_file; -#if LL_WINDOWS - updater_file = "SLVersionChecker.exe"; - updater.executable = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, updater_file); -#elif LL_DARWIN - updater_file = "SLVersionChecker"; - updater.executable = gDirUtilp->add(gDirUtilp->getAppRODataDir(), "updater", updater_file); -#else - updater_file = "SLVersionChecker"; - updater.executable = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, updater_file); -#endif - // add LEAP mode command-line argument to whichever of these we selected - updater.args.add("leap"); - // UpdaterServiceSettings - if (gSavedSettings.getBOOL("FirstLoginThisInstall")) - { - // Befor first login, treat this as 'manual' updates, - // updater won't install anything, but required updates - updater.args.add("0"); - } - else - { - updater.args.add(stringize(gSavedSettings.getU32("UpdaterServiceSetting"))); - } - // channel - updater.args.add(LLVersionInfo::instance().getChannel()); - // testok - updater.args.add(stringize(gSavedSettings.getBOOL("UpdaterWillingToTest"))); - // ForceAddressSize - updater.args.add(stringize(gSavedSettings.getU32("ForceAddressSize"))); - - try - { - // Run the updater. An exception from launching the updater should bother us. - LLLeap::create(updater, true); - mUpdaterNotFound = false; - } - catch (...) - { - LLUIString details = LLNotifications::instance().getGlobalString("LLLeapUpdaterFailure"); - details.setArg("[UPDATER_APP]", updater_file); - OSMessageBox( - details.getString(), - LLStringUtil::null, - OSMB_OK); - mUpdaterNotFound = true; - } + initVVMUpdateCheck(); } else { LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL; } -#endif //LL_RELEASE_FOR_DOWNLOAD +//#endif //LL_RELEASE_FOR_DOWNLOAD { // Iterate over --leap command-line options. But this is a bit tricky: if @@ -1255,15 +1208,15 @@ bool LLAppViewer::init() /// Tell the Coprocedure manager how to discover and store the pool sizes // what I wanted LLCoprocedureManager::getInstance()->setPropertyMethods( - boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1), - boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS)); + std::bind(&LLControlGroup::getU32, std::ref(gSavedSettings), std::placeholders::_1), + std::bind(&LLControlGroup::declareU32, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_ALWAYS)); // TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement // some other protection to make sure we don't use network before initializng proxy /*----------------------------------------------------------------------*/ // nat 2016-06-29 moved the following here from the former mainLoop(). - mMainloopTimeout = new LLWatchdogTimeout(); + mMainloopTimeout = new LLWatchdogTimeout("mainloop"); // Create IO Pump to use for HTTP Requests. gServicePump = new LLPumpIO(gAPRPoolp); @@ -1296,7 +1249,7 @@ bool LLAppViewer::init() gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath()); } #endif - + LL_PROFILER_FRAME_END; return true; } @@ -1374,6 +1327,8 @@ bool LLAppViewer::frame() bool LLAppViewer::doFrame() { + resumeMainloopTimeout("Main:doFrameStart"); + U32 fpsLimitMaxFps = (U32)gSavedSettings.getU32("MaxFPS"); if(fpsLimitMaxFps > 120) fpsLimitMaxFps = 0; @@ -1464,12 +1419,14 @@ bool LLAppViewer::doFrame() { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df mainloop"); + pingMainloopTimeout("df mainloop"); // canonical per-frame event mainloop.post(newFrame); } { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df suspend"); + pingMainloopTimeout("df suspend"); // give listeners a chance to run llcoro::suspend(); // if one of our coroutines threw an uncaught exception, rethrow it now @@ -1505,6 +1462,7 @@ bool LLAppViewer::doFrame() { { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df pauseMainloopTimeout"); + pingMainloopTimeout("df idle"); // So that it will be aware of last state. pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds! } @@ -1516,7 +1474,7 @@ bool LLAppViewer::doFrame() { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df resumeMainloopTimeout"); - resumeMainloopTimeout(); + resumeMainloopTimeout("df idle"); } } @@ -1531,7 +1489,7 @@ bool LLAppViewer::doFrame() } disconnectViewer(); - resumeMainloopTimeout(); + resumeMainloopTimeout("df snapshot n disconnect"); } // Render scene. @@ -1696,17 +1654,20 @@ bool LLAppViewer::doFrame() if (LLApp::isExiting()) { + pingMainloopTimeout("Main:qSnapshot"); // Save snapshot for next time, if we made it through initialization if (STATE_STARTED == LLStartUp::getStartupState()) { saveFinalSnapshot(); } + pingMainloopTimeout("Main:TerminateVoice"); if (LLVoiceClient::instanceExists()) { LLVoiceClient::getInstance()->terminate(); } + pingMainloopTimeout("Main:TerminatePump"); delete gServicePump; gServicePump = NULL; @@ -1715,6 +1676,11 @@ bool LLAppViewer::doFrame() LL_INFOS() << "Exiting main_loop" << LL_ENDL; } }LLPerfStats::StatsRecorder::endFrame(); + + // Not viewer's fault if something outside frame + // pauses viewer (ex: macOS doesn't call oneFrame), + // so stop tracking on exit. + pauseMainloopTimeout(); LL_PROFILER_FRAME_END; return ! LLApp::isRunning(); @@ -1758,7 +1724,15 @@ void LLAppViewer::flushLFSIO() bool LLAppViewer::cleanup() { - LLAtmosphere::cleanupClass(); +#if LL_VELOPACK + // Apply any pending Velopack update before shutdown + if (velopack_is_update_pending()) + { + LL_INFOS("AppInit") << "Applying pending Velopack update on shutdown..." << LL_ENDL; + velopack_apply_pending_update(velopack_should_restart_after_update()); + } + velopack_cleanup(); +#endif //ditch LLVOAvatarSelf instance gAgentAvatarp = NULL; @@ -2255,6 +2229,8 @@ void LLAppViewer::initGeneralThread() bool LLAppViewer::initThreads() { + LL_PROFILE_ZONE_SCOPED; + static const bool enable_threads = true; LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); @@ -2365,7 +2341,22 @@ void errorHandler(const std::string& title_string, const std::string& message_st } if (!message_string.empty()) { - OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); + if (on_main_thread()) + { + // Prevent watchdog from killing us while dialog is up. + // Can't do pauseMainloopTimeout, since this may be called + // from threads and we are not going to need watchdog now. + LLAppViewer::instance()->pauseMainloopTimeout(); + + // todo: might want to have non-crashing timeout for OOM cases + // and needs a way to pause main loop. + OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); + LLAppViewer::instance()->resumeMainloopTimeout(); + } + else + { + OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); + } } } @@ -2519,7 +2510,10 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file.file_name()); } - if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent)) + // Be softer for files in the user's folders, user can't just reinstall those + bool error_when_no_comment = !set_defaults && location_key != "User"; + + if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent, error_when_no_comment)) { // success! LL_INFOS("Settings") << "Loaded settings file " << full_settings_path << LL_ENDL; } @@ -3084,6 +3078,8 @@ bool LLAppViewer::initConfiguration() // keeps growing, necessitating a method all its own. void LLAppViewer::initStrings() { + LL_PROFILE_ZONE_SCOPED; + std::string strings_file = "strings.xml"; std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file); if (strings_path_full.empty() || !LLFile::isfile(strings_path_full)) @@ -3173,6 +3169,7 @@ void LLAppViewer::sendOutOfDiskSpaceNotification() bool LLAppViewer::initWindow() { + LL_PROFILE_ZONE_SCOPED; LL_INFOS("AppInit") << "Initializing window..." << LL_ENDL; // store setting in a global for easy access and modification @@ -3184,7 +3181,7 @@ bool LLAppViewer::initWindow() LLViewerWindow::Params window_params; window_params .title(gWindowTitle) - .name(VIEWER_WINDOW_CLASSNAME) + .name(sWindowClass) .x(gSavedSettings.getS32("WindowX")) .y(gSavedSettings.getS32("WindowY")) .width(gSavedSettings.getU32("WindowWidth")) @@ -3209,7 +3206,7 @@ bool LLAppViewer::initWindow() // Need to load feature table before cheking to start watchdog. bool use_watchdog = false; - int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); + S32 watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); if (watchdog_enabled_setting == -1) { use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled"); @@ -3226,9 +3223,60 @@ bool LLAppViewer::initWindow() << " (setting = " << watchdog_enabled_setting << ")" << LL_ENDL; - if (use_watchdog) + // Watchdog reports to statistics via marker files, that is + // pointless without ability to write (!mSecondInstance) those files. + // If use_watchdog is set, watchdog also reports to bugspat. + if (use_watchdog || !mSecondInstance) { - LLWatchdog::getInstance()->init(); + LLWatchdog::getInstance()->init( + [](bool final_marker) + { + LLAppViewer* app = LLAppViewer::instance(); + // Without watchdog everything will be counted as + // either 'unknown' (no crash marker) or based of present crash marker + if (final_marker) + { + // watchdog is going to crash viewer, so crate a 'crash' marker + if (app->logoutRequestSent()) + { + app->createErrorMarker(LAST_EXEC_LOGOUT_FROZE); + } + else + { + app->createErrorMarker(LAST_EXEC_FROZE); + } + } + else + { + // not going to crash, just create a 'watchdog' marker + app->createWatchdogMarker(); + } + }, + []() + { + LLAppViewer* app = LLAppViewer::instance(); + // in case process recovered from freeze, remove watchdog marker. + app->removeWatchdogMarker(); + }, + [](std::string &desc) + { +#if LL_WINDOWS && LL_BUGSPLAT + LLAppViewer* app = LLAppViewer::instance(); + app->writeDebugInfo(); + return app->reportCustomToBugsplat(desc); +#else + return false; +#endif + }, + []() + { + LLAppViewer* app = LLAppViewer::instance(); + app->sendLogoutRequest(); + // Might be better to ask user if user wants to terminate the app or wait. + OSMessageBox(LLTrans::getString("MBFreezeDetected"), LLTrans::getString("MBFatalError"), OSMB_OK); + }, + use_watchdog); + } LLNotificationsUI::LLNotificationManager::getInstance(); @@ -3298,16 +3346,6 @@ bool LLAppViewer::initWindow() return true; } -bool LLAppViewer::isUpdaterMissing() -{ - return mUpdaterNotFound; -} - -bool LLAppViewer::waitForUpdater() -{ - return !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !mUpdaterNotFound && !gNonInteractive; -} - void LLAppViewer::writeDebugInfo(bool isStatic) { #if LL_WINDOWS && LL_BUGSPLAT @@ -3684,10 +3722,15 @@ void LLAppViewer::writeSystemInfo() if (! gDebugInfo.has("Dynamic") ) gDebugInfo["Dynamic"] = LLSD::emptyMap(); -#if LL_WINDOWS && !LL_BUGSPLAT +#if LL_DARWIN + // crash processing in CrashMetadataSingleton reads SLLog + gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.crash"); +#elif LL_WINDOWS && !LL_BUGSPLAT gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log"); #else - //Not ideal but sufficient for good reporting. + // Far from ideal, especially when multiple instances get involved. + // Note that attachmentsForBugSplat expects .old extendion. + // Todo: improve. gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.old"); //LLError::logFileName(); #endif @@ -4007,13 +4050,8 @@ void LLAppViewer::processMarkerFiles() { // the file existed, is ours, and matched our version, so we can report on what it says LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found; last exec crashed or froze" << LL_ENDL; -#if LL_WINDOWS && LL_BUGSPLAT - // bugsplat will set correct state in bugsplatSendLog - // Might be more accurate to rename this one into 'unknown' - gLastExecEvent = LAST_EXEC_FROZE; -#else - gLastExecEvent = LAST_EXEC_OTHER_CRASH; -#endif // LL_WINDOWS + // App terminated unexpectedly or froze, we don't know the cause yet. + gLastExecEvent = LAST_EXEC_UNKNOWN; } else @@ -4056,7 +4094,8 @@ void LLAppViewer::processMarkerFiles() { if (markerIsSameVersion(logout_marker_file)) { - gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; + // Either froze, got killed or somehow crash was not caught + gLastExecEvent = LAST_EXEC_LOGOUT_UNKNOWN; LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "', changing LastExecEvent to LOGOUT_FROZE" << LL_ENDL; } else @@ -4065,23 +4104,29 @@ void LLAppViewer::processMarkerFiles() } LLAPRFile::remove(logout_marker_file); } - // and last refine based on whether or not a marker created during a non-llerr crash is found + // Refine based on whether or not a marker created during + // a crash is found or if wathdog caught a freeze. + // Bugsplat will set correct state in bugsplatSendLog. std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); + std::string watchdog_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, WATCHDOG_MARKER_FILE_NAME); if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) { S32 marker_code = getMarkerErrorCode(error_marker_file); if (marker_code >= 0) { - if (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) - { - gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; - LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL; - } - else if (marker_code > 0 && marker_code < (S32)LAST_EXEC_COUNT) + if (marker_code > 0 && marker_code < (S32)LAST_EXEC_COUNT) { + // If we have a code, it takes precendence gLastExecEvent = (eLastExecEvent)marker_code; LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; } + // if we have the marker, even without a code, it's a crash. + else if (gLastExecEvent == LAST_EXEC_LOGOUT_UNKNOWN + || gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) + { + gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; + LL_INFOS("MarkerFile") << "Error marker '" << error_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL; + } else { gLastExecEvent = LAST_EXEC_OTHER_CRASH; @@ -4093,7 +4138,50 @@ void LLAppViewer::processMarkerFiles() LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL; } LLAPRFile::remove(error_marker_file); + if (LLAPRFile::isExist(watchdog_marker_file, NULL, LL_APR_RB)) + { + // If viewer crashed after a freeze was detected, + // crash still takes precendence. Just clear watchdog. + removeWatchdogMarker(); + } } + else + { + // so only check watchdog marker if there is no error marker. + if (LLAPRFile::isExist(watchdog_marker_file, NULL, LL_APR_RB)) + { + if (LAST_EXEC_UNKNOWN == gLastExecEvent + || LAST_EXEC_LOGOUT_UNKNOWN == gLastExecEvent) + { + // watchdog marker gets created if we detect a freeze, + // so if viwer did not stop gracefully, and we know it wasn't a crash, + // we have no other info, check watchdog. + if (markerIsSameVersion(watchdog_marker_file)) + { + gLastExecEvent = LAST_EXEC_UNKNOWN == gLastExecEvent ? LAST_EXEC_FROZE : LAST_EXEC_LOGOUT_FROZE; + LL_INFOS("MarkerFile") << "Watchdog marker '" << watchdog_marker_file << "' found, setting LastExecEvent to FROZE" + << LL_ENDL; + } + } + removeWatchdogMarker(); + } + } + +#if LL_DARWIN + if (!mSecondInstance && gLastExecEvent != LAST_EXEC_NORMAL) + { + // While windows reports crashes immediately, mac reports next run and + // may take a while to trigger crash report so it has a special file. + // Remove .crash file if exists + std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + "SecondLife.old"); + std::string crash_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + "SecondLife.crash"); + LLFile::remove(crash_log_file); + // Rename ".old" log file to ".crash" + LLFile::rename(old_log_file, crash_log_file); + } +#endif } void LLAppViewer::removeMarkerFiles() @@ -4121,6 +4209,7 @@ void LLAppViewer::removeMarkerFiles() { LL_WARNS("MarkerFile") << "logout marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL; } + removeWatchdogMarker(); } else { @@ -4187,6 +4276,7 @@ void LLAppViewer::requestQuit() return; } + pingMainloopTimeout("Main:qMetrics"); // Try to send metrics back to the grid metricsSend(!gDisconnected); @@ -4202,6 +4292,7 @@ void LLAppViewer::requestQuit() LLHUDManager::getInstance()->sendEffects(); effectp->markDead() ;//remove it. + pingMainloopTimeout("Main:qFloaters"); // Attempt to close all floaters that might be // editing things. if (gFloaterView) @@ -4210,6 +4301,7 @@ void LLAppViewer::requestQuit() gFloaterView->closeAllChildren(true); mClosingFloaters = true; } + pingMainloopTimeout("Main:qStats"); // Send preferences once, when exiting bool include_preferences = true; @@ -4217,6 +4309,7 @@ void LLAppViewer::requestQuit() gLogoutTimer.reset(); mQuitRequested = true; + pingMainloopTimeout("Main:LoggingOut"); } static bool finish_quit(const LLSD& notification, const LLSD& response) @@ -4378,6 +4471,7 @@ U32 LLAppViewer::getObjectCacheVersion() bool LLAppViewer::initCache() { + LL_PROFILE_ZONE_SCOPED; mPurgeCache = false; bool read_only = mSecondInstance; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; @@ -4448,6 +4542,8 @@ bool LLAppViewer::initCache() LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; gSavedSettings.setString("CacheLocation", ""); gSavedSettings.setString("CacheLocationTopFolder", ""); + gSavedSettings.setString("NewCacheLocation", ""); + gSavedSettings.setString("NewCacheLocationTopFolder", ""); } const std::string cache_dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, cache_dir_name); @@ -4469,19 +4565,22 @@ bool LLAppViewer::initCache() if (mPurgeCache) { - LLSplashScreen::update(LLTrans::getString("StartupClearingCache")); - purgeCache(); + LLSplashScreen::update(LLTrans::getString("StartupClearingCache")); + purgeCache(); // clear the new C++ file system based cache LLDiskCache::getInstance()->clearCache(); - } - else + } + else if (gSavedSettings.getBOOL("PurgeDiskCacheOnStartup")) { // purge excessive files from the new file system based cache LLDiskCache::getInstance()->purge(); } + + // Start disk cache purge thread to + // purge excessive files from the file system based cache + LLAppViewer::getPurgeDiskCacheThread()->start(); } - LLAppViewer::getPurgeDiskCacheThread()->start(); LLSplashScreen::update(LLTrans::getString("StartupInitializingTextureCache")); @@ -4500,7 +4599,7 @@ bool LLAppViewer::initCache() return true; } -void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb) +void LLAppViewer::addOnIdleCallback(const std::function<void()>& cb) { gMainloopWork.post(cb); } @@ -4524,15 +4623,69 @@ void LLAppViewer::loadKeyBindings() // As per GHI #4498, remove old, stale CEF cache folders from previous sessions void LLAppViewer::purgeCefStaleCaches() { + LL_PROFILE_ZONE_SCOPED; // TODO: we really shouldn't use a hard coded name for the cache folder here... const std::string browser_parent_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); - if (LLFile::isdir(browser_parent_cache)) + if (!LLFile::isdir(browser_parent_cache)) { - // This is a sledgehammer approach - nukes the cef_cache dir entirely - // which is then recreated the first time a CEF instance creates an - // individual cache folder. If we ever decide to retain some folders - // e.g. Search UI cache - then we will need a more granular approach. - gDirUtilp->deleteDirAndContents(browser_parent_cache); + return; + } + // We are using a fixed name to not leave stale folders + // around in case something goes wrong on startup. + const std::string holder_cache_name = browser_parent_cache + "_rename"; + + // Try to rename the entire directory first + if (LLFile::rename(browser_parent_cache, holder_cache_name) == 0) + { + LL_DEBUGS("AppInit") << "Successfully renamed CEF cache folder for deletion" << LL_ENDL; + } + else + { + // Rename failed (likely another instance has files open in the cache) + // Create holder folder and move individual subfolders instead + LL_DEBUGS("AppInit") << "Could not rename CEF cache folder (may be in use), moving individual folders" << LL_ENDL; + + if (!LLFile::isdir(holder_cache_name) && LLFile::mkdir(holder_cache_name) != 0) + { + LL_WARNS() << "Failed to create holder folder: " << holder_cache_name << LL_ENDL; + // Attept normal cleanup + gDirUtilp->deleteDirAndContents(browser_parent_cache); + return; + } + + // Iterate through subdirectories in the cache folder + LLDirIterator dir_iter(browser_parent_cache, "*"); + std::string subfolder_name; + while (dir_iter.next(subfolder_name)) + { + if (subfolder_name == "." || subfolder_name == "..") + { + continue; + } + + std::string source_path = browser_parent_cache + gDirUtilp->getDirDelimiter() + subfolder_name; + std::string dest_path = holder_cache_name + gDirUtilp->getDirDelimiter() + subfolder_name; + + // If folder is in use, move will fail, don't delete it. + LLFile::rename(source_path, dest_path); + } + } + + // Post deletion task to the General work queue to avoid blocking the main thread + if (auto queue = LL::WorkQueue::getInstance("General")) + { + // Alternatively throw it at LLPurgeDiskCacheThread to clean + // it during periodic purges. + queue->post([holder_cache_name]() + { + LL_PROFILE_ZONE_NAMED("cef_cache_cleanup"); + gDirUtilp->deleteDirAndContents(holder_cache_name); + }); + } + else + { + LL_WARNS() << "Failed to get General work queue, deleting CEF cache synchronously" << LL_ENDL; + gDirUtilp->deleteDirAndContents(holder_cache_name); } } @@ -4551,7 +4704,19 @@ void LLAppViewer::purgeCacheImmediate() { LL_INFOS("AppCache") << "Purging Object Cache and Texture Cache immediately..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE, false); - LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); + if (LLVOCache::instanceExists()) + { + LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); + } + else if (!mSecondInstance) + { + // LLVOCache requires parameters to be initialized, if it's not there, try manually + std::string mask = "*"; + std::string cache_dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "objectcache"); + LL_INFOS() << "Removing cache at " << cache_dir << LL_ENDL; + gDirUtilp->deleteFilesInDir(cache_dir, mask); //delete all files + LLFile::rmdir(cache_dir); + } } std::string LLAppViewer::getSecondLifeTitle() const @@ -4719,6 +4884,8 @@ std::string get_name_cache_filename(const std::string &base_file, const std::str void LLAppViewer::loadNameCache() { + LL_PROFILE_ZONE_SCOPED; + // display names cache std::string filename = get_name_cache_filename("avatar_name_cache", "xml"); LL_INFOS("AvNameCache") << filename << LL_ENDL; @@ -5483,6 +5650,30 @@ bool LLAppViewer::errorMarkerExists() const return LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB); } +void LLAppViewer::createWatchdogMarker() const +{ + if (!mSecondInstance) + { + std::string error_marker = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, WATCHDOG_MARKER_FILE_NAME); + + LLAPRFile file; + file.open(error_marker, LL_APR_WB); + if (file.getFileHandle()) + { + recordMarkerVersion(file); + file.close(); + } + } +} +void LLAppViewer::removeWatchdogMarker() const +{ + if (!mSecondInstance) + { + std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, WATCHDOG_MARKER_FILE_NAME); + LLFile::remove(error_marker_file); + } +} + void LLAppViewer::outOfMemorySoftQuit() { if (!mQuitRequested) @@ -5495,6 +5686,7 @@ void LLAppViewer::outOfMemorySoftQuit() LLLFSThread::sLocal->pause(); gLogoutTimer.reset(); mQuitRequested = true; + destroyMainloopTimeout(); LLError::LLUserWarningMsg::showOutOfMemory(); } @@ -5860,12 +6052,12 @@ void LLAppViewer::forceExceptionThreadCrash() thread->start(); } -void LLAppViewer::initMainloopTimeout(std::string_view state, F32 secs) +void LLAppViewer::initMainloopTimeout(std::string_view state) { if (!mMainloopTimeout) { - mMainloopTimeout = new LLWatchdogTimeout(); - resumeMainloopTimeout(state, secs); + mMainloopTimeout = new LLWatchdogTimeout("mainloop"); + resumeMainloopTimeout(state); } } @@ -5878,17 +6070,11 @@ void LLAppViewer::destroyMainloopTimeout() } } -void LLAppViewer::resumeMainloopTimeout(std::string_view state, F32 secs) +void LLAppViewer::resumeMainloopTimeout(std::string_view state) { if (mMainloopTimeout) { - if (secs < 0.0f) - { - static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60.f); - secs = mainloop_timeout; - } - - mMainloopTimeout->setTimeout(secs); + mMainloopTimeout->setTimeout(getMainloopTimeoutSec()); mMainloopTimeout->start(state); } } @@ -5901,27 +6087,48 @@ void LLAppViewer::pauseMainloopTimeout() } } -void LLAppViewer::pingMainloopTimeout(std::string_view state, F32 secs) +void LLAppViewer::pingMainloopTimeout(std::string_view state) { LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; if (mMainloopTimeout) { - if (secs < 0.0f) - { - static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60); - secs = mainloop_timeout; - } - - mMainloopTimeout->setTimeout(secs); + mMainloopTimeout->setTimeout(getMainloopTimeoutSec()); mMainloopTimeout->ping(state); } } + +F32 LLAppViewer::getMainloopTimeoutSec() const +{ + if (isQuitting() || mQuitRequested) + { + constexpr F32 QUITTING_SECONDS = 240.f; + return QUITTING_SECONDS; + } + if (LLStartUp::getStartupState() == STATE_STARTED + && gAgent.getTeleportState() == LLAgent::TELEPORT_NONE) + { + // consider making this value match 'disconnected' timout. + static LLCachedControl<F32> mainloop_started(gSavedSettings, "MainloopTimeoutStarted", 60.f); + return mainloop_started(); + } + else + { + static LLCachedControl<F32> mainloop_default(gSavedSettings, "MainloopTimeoutDefault", 120.f); + return mainloop_default(); + } +} + void LLAppViewer::handleLoginComplete() { gLoggedInTime.start(); initMainloopTimeout("Mainloop Init"); + LLWindow* viewer_window = gViewerWindow->getWindow(); + if (viewer_window) // in case of a headless client + { + viewer_window->initWatchdog(); + } // Store some data to DebugInfo in case of a freeze. gDebugInfo["ClientInfo"]["Name"] = LLVersionInfo::instance().getChannel(); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 4f2583cb16..d76e5015e9 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -77,6 +77,8 @@ typedef enum LAST_EXEC_BAD_ALLOC, LAST_EXEC_MISSING_FILES, LAST_EXEC_GRAPHICS_INIT, + LAST_EXEC_UNKNOWN, + LAST_EXEC_LOGOUT_UNKNOWN, LAST_EXEC_COUNT } eLastExecEvent; @@ -115,9 +117,6 @@ public: bool quitRequested() { return mQuitRequested; } bool logoutRequestSent() { return mLogoutRequestSent; } bool isSecondInstance() { return mSecondInstance; } - bool isUpdaterMissing(); // In use by tests - bool waitForUpdater(); - void writeDebugInfo(bool isStatic=true); void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; } @@ -204,11 +203,13 @@ public: // For thread debugging. // llstartup needs to control init. // llworld, send_agent_pause() also controls pause/resume. - void initMainloopTimeout(std::string_view state, F32 secs = -1.0f); + void initMainloopTimeout(std::string_view state); void destroyMainloopTimeout(); void pauseMainloopTimeout(); - void resumeMainloopTimeout(std::string_view state = "", F32 secs = -1.0f); - void pingMainloopTimeout(std::string_view state, F32 secs = -1.0f); + void resumeMainloopTimeout(std::string_view state = ""); + void pingMainloopTimeout(std::string_view state); + + F32 getMainloopTimeoutSec() const; // Handle the 'login completed' event. // *NOTE:Mani Fix this for login abstraction!! @@ -222,7 +223,7 @@ public: return mOnLoginCompleted.connect(cb); } - void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle + void addOnIdleCallback(const std::function<void()>& cb); // add a callback to fire (once) when idle void initGeneralThread(); void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; } @@ -253,6 +254,9 @@ public: void createErrorMarker(eLastExecEvent error_code) const; bool errorMarkerExists() const; + void createWatchdogMarker() const; + void removeWatchdogMarker() const; + // Attempt a 'soft' quit with disconnect and saving of settings/cache. // Intended to be thread safe. // Good chance of viewer crashing either way, but better than alternatives. @@ -283,6 +287,14 @@ protected: virtual void sendOutOfDiskSpaceNotification(); +protected: + + // NSIS relies on this to detect if viewer is up. + // NSIS's method is somewhat unreliable since window + // can close long before cleanup is done. + // sendURLToOtherInstance also relies on this to detect if viewer is up. + static constexpr const char* sWindowClass = "Second Life"; + private: bool doFrame(); @@ -323,7 +335,6 @@ private: static LLAppViewer* sInstance; bool mSecondInstance; // Is this a second instance of the app? - bool mUpdaterNotFound; // True when attempt to start updater failed std::string mMarkerFileName; LLAPRFile mMarkerFile; // A file created to indicate the app is running. @@ -413,8 +424,6 @@ extern S32 gPendingMetricsUploads; extern F32 gSimLastTime; extern F32 gSimFrames; -extern bool gDisconnected; - extern LLFrameTimer gRestoreGLTimer; extern bool gRestoreGL; extern bool gUseWireframe; diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h index 5ade3d3e04..8686d6522e 100644 --- a/indra/newview/llappviewerlistener.h +++ b/indra/newview/llappviewerlistener.h @@ -30,7 +30,7 @@ #define LL_LLAPPVIEWERLISTENER_H #include "lleventapi.h" -#include <boost/function.hpp> +#include <functional> class LLAppViewer; class LLSD; @@ -39,7 +39,7 @@ class LLSD; class LLAppViewerListener: public LLEventAPI { public: - typedef boost::function<LLAppViewer*(void)> LLAppViewerGetter; + typedef std::function<LLAppViewer*(void)> LLAppViewerGetter; /// Bind the LLAppViewer instance to use (e.g. LLAppViewer::instance()). LLAppViewerListener(const LLAppViewerGetter& getter); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index bd1a08798b..8975abffd7 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -76,6 +76,11 @@ #include <fstream> #include <exception> +// Velopack installer and update framework +#if LL_VELOPACK +#include "llvelopack.h" +#endif + // Bugsplat (http://bugsplat.com) crash reporting tool #ifdef LL_BUGSPLAT #include "BugSplat.h" @@ -118,6 +123,7 @@ namespace // MiniDmpSender pointer. As things stand, though, we must define an // actual function and store the pointer statically. static MiniDmpSender *sBugSplatSender = nullptr; + static std::string sBugsplatDescriptionField; bool bugsplatSendLog(UINT nCode, LPVOID lpVal1, LPVOID lpVal2) { @@ -154,8 +160,21 @@ namespace WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); } - // LL_ERRS message, when there is one - sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage())); + if (!sBugsplatDescriptionField.empty()) + { + // Can be set by watchdog or other code that detects a problem + // and wants to add some context to the crash report. + // Will be visible in the BugSplat web UI. + sBugSplatSender->setDefaultUserDescription(WCSTR(sBugsplatDescriptionField)); + // This type of crash is not necessarily a crash, or final. + // Prepare for the next one. + sBugsplatDescriptionField.clear(); + } + else + { + // LL_ERRS message, when there is one + sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage())); + } sBugSplatSender->setAttribute(WCSTR(L"OS"), WCSTR(LLOSInfo::instance().getOSStringSimple())); // In case we ever stop using email for this sBugSplatSender->setAttribute(WCSTR(L"AppState"), WCSTR(LLStartUp::getStartupStateString())); @@ -180,7 +199,7 @@ namespace LLAppViewer* app = LLAppViewer::instance(); if (!app->isSecondInstance() && !app->errorMarkerExists()) { - // If marker doesn't exist, create a marker with 'other' code for next launch + // If marker doesn't exist, create a marker with 'other' or 'logout' code for next launch // otherwise don't override existing file // Any unmarked crashes will be considered as freezes if (app->logoutRequestSent()) @@ -224,7 +243,6 @@ LONG WINAPI catchallCrashHandler(EXCEPTION_POINTERS * /*ExceptionInfo*/) return 0; } -const std::string LLAppViewerWin32::sWindowClass = "Second Life"; #if !_M_ARM64 /* @@ -432,6 +450,17 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, PWSTR pCmdLine, int nCmdShow) { +#if LL_VELOPACK + // Velopack MUST be initialized first - it may handle install/uninstall + // commands and exit the process before we do anything else. + if (!velopack_initialize()) + { + // Obsolete? Always return true + // Velopack handled the invocation (install/uninstall hook) + return 0; + } +#endif + // Call Tracy first thing to have it allocate memory // https://github.com/wolfpld/tracy/issues/196 LL_PROFILER_FRAME_END; @@ -849,6 +878,38 @@ bool LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo) return false; } +#if defined(LL_BUGSPLAT) +static int reportCustomToBugsplatFilter(EXCEPTION_POINTERS* pExcepInfo) +{ + if (sBugSplatSender) + { + sBugSplatSender->createReport(pExcepInfo); + } + return EXCEPTION_EXECUTE_HANDLER; +} +#endif + +bool LLAppViewerWin32::reportCustomToBugsplat(const std::string &description) +{ +#if defined(LL_BUGSPLAT) + if (sBugSplatSender) + { + sBugsplatDescriptionField = description; + + __try + { + // Generate a custom exception code + RaiseException(0xE0000001, 0, 0, NULL); + } + __except (reportCustomToBugsplatFilter(GetExceptionInformation())) + { + } + return true; + } +#endif // LL_BUGSPLAT + return false; +} + bool LLAppViewerWin32::initWindow() { // This is a workaround/hotfix for a change in Windows 11 24H2 (and possibly later) @@ -949,7 +1010,7 @@ bool LLAppViewerWin32::restoreErrorTrap() bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url) { wchar_t window_class[256]; /* Flawfinder: ignore */ // Assume max length < 255 chars. - mbstowcs(window_class, sWindowClass.c_str(), 255); + mbstowcs(window_class, sWindowClass, 255); window_class[255] = 0; // Use the class instead of the window name. HWND other_window = FindWindow(window_class, NULL); diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h index 3fad53ec72..53177f7f95 100644 --- a/indra/newview/llappviewerwin32.h +++ b/indra/newview/llappviewerwin32.h @@ -44,6 +44,7 @@ public: bool cleanup() override; bool reportCrashToBugsplat(void* pExcepInfo) override; + bool reportCustomToBugsplat(const std::string& description) override; protected: bool initWindow() override; // Override to initialize the viewer's window. @@ -59,8 +60,6 @@ protected: std::string generateSerialNumber(); - static const std::string sWindowClass; - private: void disableWinErrorReporting(); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 6f6b89ea81..fb1426a235 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -29,8 +29,6 @@ #include "llavataractions.h" -#include "boost/lambda/lambda.hpp" // for lambda::constant - #include "llavatarnamecache.h" // IDEVO #include "llsd.h" #include "llnotifications.h" diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index f6bc59c748..409952c496 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -47,7 +47,7 @@ S32 LLAvatarListItem::sLeftPadding = 0; S32 LLAvatarListItem::sNameRightPadding = 0; S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT]; -static LLWidgetNameRegistry::StaticRegistrar sRegisterAvatarListItemParams(&typeid(LLAvatarListItem::Params), "avatar_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterAvatarListItemParams(typeid(LLAvatarListItem::Params), "avatar_list_item"); LLAvatarListItem::Params::Params() : default_style("default_style"), diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index a2e81ed255..9d9948731f 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -269,11 +269,11 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAvatarPropertiesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAvatarPropertiesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + avatar_id.asString(); @@ -473,8 +473,6 @@ void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* ms // Request processed, no longer pending self->removePendingRequest(c_info.creator_id, APT_CLASSIFIED_INFO); self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO); - self->removePendingRequest(c_info.classified_id, APT_CLASSIFIED_INFO); - self->notifyObservers(c_info.classified_id, &c_info, APT_CLASSIFIED_INFO); } diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index a490f3da10..1592629fca 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -52,9 +52,6 @@ enum EAvatarProcessorType { APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request (Truncates data!!!) APT_PROPERTIES, // APT_PROPERTIES via http request - APT_NOTES, - APT_GROUPS, - APT_PICKS, APT_PICK_INFO, APT_TEXTURES, APT_CLASSIFIEDS, @@ -108,24 +105,6 @@ struct LLAvatarData typedef std::pair<LLUUID, std::string> pick_data_t; typedef std::list< pick_data_t> picks_list_t; picks_list_t picks_list; - BOOL allow_publish; - LLAvatarData() = default; - LLAvatarData(const LLAvatarLegacyData& legacy_data) - { - agent_id = legacy_data.agent_id; - avatar_id = legacy_data.avatar_id; - image_id = legacy_data.image_id; - fl_image_id = legacy_data.fl_image_id; - partner_id = legacy_data.partner_id; - about_text = legacy_data.about_text; - fl_about_text = legacy_data.fl_about_text; - born_on = legacy_data.born_on; - profile_url = legacy_data.profile_url; - caption_index = legacy_data.caption_index; - caption_text = legacy_data.caption_text; - customer_type = legacy_data.customer_type; - flags = legacy_data.flags; - } }; struct LLAvatarData::LLGroupData @@ -161,45 +140,6 @@ struct LLPickData LLUUID session_id; }; -struct LLAvatarPicks -{ - LLUUID agent_id; - LLUUID target_id; //target id - - typedef std::pair<LLUUID,std::string> pick_data_t; - typedef std::list< pick_data_t> picks_list_t; - picks_list_t picks_list; -}; - -struct LLAvatarNotes -{ - LLUUID agent_id; - LLUUID target_id; //target id - std::string notes; -}; - -struct LLAvatarGroups -{ - LLUUID agent_id; - LLUUID avatar_id; //target id - BOOL list_in_profile; - - struct LLGroupData; - typedef std::list<LLGroupData> group_list_t; - - group_list_t group_list; - - struct LLGroupData - { - U64 group_powers; - BOOL accept_notices; - std::string group_title; - LLUUID group_id; - std::string group_name; - LLUUID group_insignia_id; - }; -}; - struct LLAvatarClassifieds { LLUUID agent_id; diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 44f35981b0..309bed6f8b 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -77,9 +77,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); // Going to request each 15 seconds either way, so don't wait // too long and don't repeat @@ -194,9 +194,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); // Going to request each 60+ seconds, timeout is 30s. // Don't repeat too often, will be sending newer data soon diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 76e308a966..2c9d74ed97 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -680,6 +680,8 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg) LLNotifications::instance().add("RevokedModifyRights",args, payload); } } + // update modify permissions flags for affected objects + LLViewerObject::markObjectsForUpdate(agent_id); (mBuddyInfo[agent_id])->setRightsFrom(new_rights); } } diff --git a/indra/newview/llcapabilityprovider.h b/indra/newview/llcapabilityprovider.h index 484bd2ef04..acc752588d 100644 --- a/indra/newview/llcapabilityprovider.h +++ b/indra/newview/llcapabilityprovider.h @@ -37,12 +37,12 @@ class LLCapabilityProvider { public: - virtual ~LLCapabilityProvider() {} + virtual ~LLCapabilityProvider() = default; /** * Get a capability URL, given a capability name. Returns empty string if * no such capability is defined on this provider. */ - virtual std::string getCapability(const std::string& name) const = 0; + virtual std::string getCapability(std::string_view name) const = 0; /** * Get host to which to send that capability request. */ diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 5114c97beb..c19f7dc1c1 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -187,7 +187,7 @@ public: /*virtual*/ boost::signals2::connection setLeftButtonClickCallback( const commit_callback_t& cb); - typedef boost::function<void (LLChiclet* ctrl, const LLSD& param)> + typedef std::function<void(LLChiclet* ctrl, const LLSD& param)> chiclet_size_changed_callback_t; /** diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 47803edc73..6bd15d4b61 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -647,7 +647,7 @@ void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by for (U32 type = LLWearableType::WT_SHIRT; type < LLWearableType::WT_COUNT; type++) { - if (clothing_by_type[type].empty()) + if (!clothing_by_type[type].empty()) continue; LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type); diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 6f0e97a98b..b349f35921 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -54,7 +54,7 @@ public: LLCOFCallbacks() {}; virtual ~LLCOFCallbacks() {}; - typedef boost::function<void ()> cof_callback_t; + typedef std::function<void()> cof_callback_t; cof_callback_t mAddWearable; cof_callback_t mMoveWearableCloser; diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 97d2345778..ce236dec66 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -200,13 +200,14 @@ void LLColorSwatchCtrl::draw() F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); mBorder->setKeyboardFocusHighlight(hasFocus()); - // Draw border - LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mLabelHeight ); - gl_rect_2d( border, mBorderColor.get(), false ); - LLRect interior = border; + LLRect gl_border(0, getRect().getHeight(), getRect().getWidth(), mLabelHeight); + LLColor4 gl_border_color = mBorderColor.get(); + LLRect interior = gl_border; interior.stretch( -1 ); + bool show_border_ctrl = true; + // Check state if ( mValid ) { @@ -239,7 +240,9 @@ void LLColorSwatchCtrl::draw() { if (mFallbackImage.notNull()) { - mFallbackImage->draw(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), LLColor4::white % alpha); + mFallbackImage->draw(interior.mLeft - 1, interior.mBottom - 1, mFallbackImage->getWidth(), mFallbackImage->getHeight(), LLColor4::white % alpha); + gl_border_color = LLUIColorTable::instance().getColor("ColorSwatchBorderColorGray").get(); + show_border_ctrl = false; } else { @@ -250,6 +253,11 @@ void LLColorSwatchCtrl::draw() } } + mBorder->setVisible(show_border_ctrl); + + // Draw border + gl_rect_2d(gl_border, gl_border_color, false); + LLUICtrl::draw(); } diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index f21bae9805..0734b12531 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -32,7 +32,6 @@ #include <boost/lexical_cast.hpp> #include <boost/bind.hpp> #include <boost/tokenizer.hpp> -#include <boost/assign/list_of.hpp> #include "llsdserialize.h" #include "llerror.h" @@ -61,14 +60,7 @@ namespace // List of command-line switches that can't map-to settings variables. // Going forward, we want every new command-line switch to map-to some // settings variable. This list is used to validate that. - const std::set<std::string> unmapped_options = boost::assign::list_of - ("help") - ("set") - ("setdefault") - ("settings") - ("sessionsettings") - ("usersessionsettings") - ; + const std::set<std::string> unmapped_options = { "help", "set", "setdefault", "settings", "sessionsettings", "usersessionsettings" }; po::options_description gOptionsDesc; po::positional_options_description gPositionalOptions; @@ -101,7 +93,7 @@ class LLCLPValue : public po::value_semantic_codecvt_helper<char> unsigned mMinTokens; unsigned mMaxTokens; bool mIsComposing; - typedef boost::function1<void, const LLCommandLineParser::token_vector_t&> notify_callback_t; + typedef std::function<void(const LLCommandLineParser::token_vector_t&)> notify_callback_t; notify_callback_t mNotifyCallback; bool mLastOption; @@ -226,7 +218,7 @@ protected: // LLCommandLineParser defintions //---------------------------------------------------------------------------- void LLCommandLineParser::addOptionDesc(const std::string& option_name, - boost::function1<void, const token_vector_t&> notify_callback, + std::function<void(const token_vector_t&)> notify_callback, unsigned int token_count, const std::string& description, const std::string& short_name, @@ -255,7 +247,7 @@ void LLCommandLineParser::addOptionDesc(const std::string& option_name, value_desc, description.c_str())); - if(!notify_callback.empty()) + if(notify_callback) { value_desc->setNotifyCallback(notify_callback); } @@ -693,7 +685,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG last_option = option_params["last_option"].asBoolean(); } - boost::function1<void, const token_vector_t&> callback; + std::function<void(const token_vector_t&)> callback; if (! option_params.has("map-to")) { // If this option isn't mapped to a settings variable, is it diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h index 5279d02c0a..984bcfbad0 100644 --- a/indra/newview/llcommandlineparser.h +++ b/indra/newview/llcommandlineparser.h @@ -27,7 +27,7 @@ #ifndef LL_LLCOMMANDLINEPARSER_H #define LL_LLCOMMANDLINEPARSER_H -#include <boost/function/function1.hpp> +#include <functional> // *NOTE:Mani The following is a forward decl of // boost::program_options::command_line_parser @@ -58,7 +58,7 @@ public: */ void addOptionDesc( const std::string& option_name, - boost::function1<void, const token_vector_t&> notify_callback = 0, + std::function<void(const token_vector_t&)> notify_callback = nullptr, unsigned int num_tokens = 0, const std::string& description = LLStringUtil::null, const std::string& short_name = LLStringUtil::null, @@ -121,7 +121,7 @@ public: * The parser_func takes an input string, and should return a * name/value pair as the result. */ - typedef boost::function1<std::pair<std::string, std::string>, const std::string&> parser_func; + typedef std::function<std::pair<std::string, std::string>(const std::string&)> parser_func; void setCustomParser(parser_func f) { mExtraParser = f; } private: diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 552ea75559..e0236ca618 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -467,7 +467,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat std::string url = object->getRegion()->getCapability("UpdateScriptTask"); { - LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(object->getID(), + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLQueuedScriptAssetUpload>(object->getID(), inventory->getUUID(), assetId, monocompile ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2, @@ -475,7 +475,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat inventory->getName(), LLUUID(), experienceId, - boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4))); + boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4)); LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 951d4800e8..bcbb166c58 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -98,7 +98,7 @@ protected: std::string mStartString; bool mMono; - typedef boost::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; + typedef std::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, object_data_list_t objectList, fnQueueAction_t func); }; diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 65a068e08d..4a4985d8ac 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -157,7 +157,10 @@ void LLConversation::setListenIMFloaterOpened() // if floater is already opened or this conversation doesn't have unread offline messages if (mHasOfflineIMs && !offline_ims_visible) { - mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1)); + mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id) + { + onIMFloaterShown(session_id); + }); } else { diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index 20d5b0175b..e21a772f67 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -53,7 +53,10 @@ LLConversationLogListItem::LLConversationLogListItem(const LLConversation* conve if (mConversation->hasOfflineMessages() && !ims_are_read) { - mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1)); + mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id) + { + onIMFloaterShown(session_id); + }); } } diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 99d770b6e2..2297fddf0c 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -59,11 +59,18 @@ public: virtual void onChange(EStatusType status, const LLSD& channelInfo, bool proximal) { + bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); conversation->showVoiceIndicator(conversation && status != STATUS_JOINING && status != STATUS_LEFT_CHANNEL - && LLVoiceClient::getInstance()->voiceEnabled() - && LLVoiceClient::getInstance()->isVoiceWorking()); + && voice_enabled); + + static bool s_voice_enabled(false); + if (s_voice_enabled != voice_enabled) + { + s_voice_enabled = voice_enabled; + conversation->updateConversationIndicators(); + } } private: @@ -509,11 +516,25 @@ void LLConversationViewSession::refresh() // Update all speaking indicators LLSpeakingIndicatorManager::updateSpeakingIndicators(); + updateConversationIndicators(); + + requestArrange(); + if (vmi) + { + // Do the regular upstream refresh + LLFolderViewFolder::refresh(); + } +} + +void LLConversationViewSession::updateConversationIndicators() +{ + bool is_active_channel = isInActiveVoiceChannel(); + // we should show indicator for specified voice session only if this is current channel. EXT-5562. if (mSpeakingIndicator) { - mSpeakingIndicator->setIsActiveChannel(mIsInActiveVoiceChannel); - mSpeakingIndicator->setShowParticipantsSpeaking(mIsInActiveVoiceChannel); + mSpeakingIndicator->setIsActiveChannel(is_active_channel); + mSpeakingIndicator->setShowParticipantsSpeaking(is_active_channel); } LLConversationViewParticipant* participant = NULL; @@ -523,16 +544,9 @@ void LLConversationViewSession::refresh() participant = dynamic_cast<LLConversationViewParticipant*>(*iter); if (participant) { - participant->allowSpeakingIndicator(mIsInActiveVoiceChannel); + participant->allowSpeakingIndicator(is_active_channel); } } - - requestArrange(); - if (vmi) - { - // Do the regular upstream refresh - LLFolderViewFolder::refresh(); - } } void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& session_id) @@ -543,7 +557,7 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi { bool old_value = mIsInActiveVoiceChannel; mIsInActiveVoiceChannel = vmi->getUUID() == session_id; - mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel && !LLVoiceChannel::isSuspended()); + mCallIconLayoutPanel->setVisible(isInActiveVoiceChannel() && !LLVoiceChannel::isSuspended()); if (old_value != mIsInActiveVoiceChannel) { refresh(); @@ -567,6 +581,13 @@ bool LLConversationViewSession::highlightFriendTitle(LLConversationItem* vmi) return false; } +bool LLConversationViewSession::isInActiveVoiceChannel() +{ + return mIsInActiveVoiceChannel && + LLVoiceClient::getInstance()->voiceEnabled() && + LLVoiceClient::getInstance()->isVoiceWorking(); +} + // // Implementation of conversations list participant (avatar) widgets // diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index a6d240ed84..5844041127 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -94,7 +94,8 @@ public: void setHighlightState(bool hihglight_state); LLFloater* getSessionFloater(); - bool isInActiveVoiceChannel() { return mIsInActiveVoiceChannel; } + bool isInActiveVoiceChannel(); + void updateConversationIndicators(); bool highlightFriendTitle(LLConversationItem* vmi); diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 277c2aad69..d503b367e1 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -47,7 +47,7 @@ public: LLDragAndDropButton(const Params& params); - typedef boost::function<bool ( + typedef std::function<bool ( S32 /*x*/, S32 /*y*/, MASK /*mask*/, bool /*drop*/, EDragAndDropType /*cargo_type*/, void* /*cargo_data*/, diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 9d212cfe8b..da9378ad12 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -723,9 +723,13 @@ F32 LLDrawable::updateXform(bool undamped) mXform.setRotation(target_rot); mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!) mXform.updateMatrix(); - if (isRoot() && mVObjp->isAnimatedObject() && mVObjp->getControlAvatar()) + if (isRoot() && mVObjp->isAnimatedObject()) { - mVObjp->getControlAvatar()->matchVolumeTransform(); + LLControlAvatar* cav = mVObjp->getControlAvatar(); + if (cav) + { + cav->matchVolumeTransform(); + } } if (mSpatialBridge) @@ -925,7 +929,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } return; } } @@ -936,7 +943,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) pos -= camera.getOrigin(); mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } } } @@ -948,6 +958,11 @@ void LLDrawable::updateTexture() return; } + if (!mVObjp) + { + return; + } + if (getNumFaces() != mVObjp->getNumTEs()) { //drawable is transitioning its face count return; diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index a7ac9da618..6f6faf9909 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -67,17 +67,8 @@ class LLDrawable public: typedef std::vector<LLFace*> face_list_t; - LLDrawable(const LLDrawable& rhs) - : LLViewerOctreeEntryData(rhs) - { - *this = rhs; - } - - const LLDrawable& operator=(const LLDrawable& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLDrawable(const LLDrawable& rhs) = delete; + const LLDrawable& operator=(const LLDrawable& rhs) = delete; static void initClass(); diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 87b6ce6cb3..9d1b11880b 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -267,7 +267,7 @@ void LLDrawPoolAlpha::forwardRender(bool rigged) gGL.setColorMask(true, false); - if (!rigged) + if (!rigged && getType() == LLDrawPoolAlpha::POOL_ALPHA_POST_WATER) { //render "highlight alpha" on final non-rigged pass // NOTE -- hacky call here protected by !rigged instead of alongside "forwardRender" // so renderDebugAlpha is executed while gls_pipeline_alpha and depth GL state @@ -278,7 +278,7 @@ void LLDrawPoolAlpha::forwardRender(bool rigged) void LLDrawPoolAlpha::renderDebugAlpha() { - if (sShowDebugAlpha) + if (sShowDebugAlpha && !gCubeSnapshot) { gHighlightProgram.bind(); gGL.diffuseColor4f(1, 0, 0, 1); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 90ee95d424..f0f589e7f4 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -794,7 +794,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) return; } - if ((sShaderLevel >= SHADER_LEVEL_CLOTH)) + if (LLPipeline::RenderAvatarCloth) { LLMatrix4 rot_mat; LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat); diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 1a53861a03..87a87e225e 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -46,12 +46,6 @@ class LLDrawPoolAvatar : public LLFacePool public: enum { - SHADER_LEVEL_BUMP = 2, - SHADER_LEVEL_CLOTH = 3 - }; - - enum - { VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0 | diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index ea2bc74daa..1affef18db 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -55,8 +55,6 @@ // static LLStandardBumpmap gStandardBumpmapList[TEM_BUMPMAP_COUNT]; -LL::WorkQueue::weak_t LLBumpImageList::sMainQueue; -LL::WorkQueue::weak_t LLBumpImageList::sTexUpdateQueue; LLRenderTarget LLBumpImageList::sRenderTarget; // static @@ -629,8 +627,6 @@ void LLBumpImageList::init() llassert( mDarknessEntries.size() == 0 ); LLStandardBumpmap::restoreGL(); - sMainQueue = LL::WorkQueue::getInstance("mainloop"); - sTexUpdateQueue = LL::WorkQueue::getInstance("LLImageGL"); // Share work queue with tex loader. } void LLBumpImageList::clear() diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h index 15976884ca..e1a468cd18 100644 --- a/indra/newview/lldrawpoolbump.h +++ b/indra/newview/lldrawpoolbump.h @@ -152,8 +152,6 @@ private: typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t; bump_image_map_t mBrightnessEntries; bump_image_map_t mDarknessEntries; - static LL::WorkQueue::weak_t sMainQueue; - static LL::WorkQueue::weak_t sTexUpdateQueue; static LLRenderTarget sRenderTarget; }; diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 305215f541..e6d0b036e0 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -32,7 +32,6 @@ #include "llface.h" #include "llimage.h" #include "llrender.h" -#include "llatmosphere.h" #include "llenvironment.h" #include "llglslshader.h" #include "llgl.h" diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 875dac103c..d942715fff 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -54,7 +54,6 @@ #include "llregioninfomodel.h" -#include "llatmosphere.h" #include "llagent.h" #include "roles_constants.h" #include "llestateinfomodel.h" @@ -965,54 +964,6 @@ LLSettingsWater::ptr_t LLEnvironment::getCurrentWater() const return pwater; } -void LayerConfigToDensityLayer(const LLSD& layerConfig, DensityLayer& layerOut) -{ - layerOut.constant_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal(); - layerOut.exp_scale = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal(); - layerOut.exp_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal(); - layerOut.linear_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal(); - layerOut.width = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal(); -} - -void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky) -{ - settingsOut.m_skyBottomRadius = psky->getSkyBottomRadius(); - settingsOut.m_skyTopRadius = psky->getSkyTopRadius(); - settingsOut.m_sunArcRadians = psky->getSunArcRadians(); - settingsOut.m_mieAnisotropy = psky->getMieAnisotropy(); - - LLSD rayleigh = psky->getRayleighConfigs(); - settingsOut.m_rayleighProfile.clear(); - for (LLSD::array_iterator itf = rayleigh.beginArray(); itf != rayleigh.endArray(); ++itf) - { - DensityLayer layer; - LLSD& layerConfig = (*itf); - LayerConfigToDensityLayer(layerConfig, layer); - settingsOut.m_rayleighProfile.push_back(layer); - } - - LLSD mie = psky->getMieConfigs(); - settingsOut.m_mieProfile.clear(); - for (LLSD::array_iterator itf = mie.beginArray(); itf != mie.endArray(); ++itf) - { - DensityLayer layer; - LLSD& layerConfig = (*itf); - LayerConfigToDensityLayer(layerConfig, layer); - settingsOut.m_mieProfile.push_back(layer); - } - settingsOut.m_mieAnisotropy = psky->getMieAnisotropy(); - - LLSD absorption = psky->getAbsorptionConfigs(); - settingsOut.m_absorptionProfile.clear(); - for (LLSD::array_iterator itf = absorption.beginArray(); itf != absorption.endArray(); ++itf) - { - DensityLayer layer; - LLSD& layerConfig = (*itf); - LayerConfigToDensityLayer(layerConfig, layer); - settingsOut.m_absorptionProfile.push_back(layer); - } -} - bool LLEnvironment::canAgentUpdateParcelEnvironment() const { LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel()); @@ -2022,8 +1973,8 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -2070,8 +2021,8 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -2186,8 +2137,8 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -2743,13 +2694,6 @@ bool LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky) mSky->update(); mBlenderSky.reset(); - if (gAtmosphere) - { - AtmosphericModelSettings settings; - LLEnvironment::getAtmosphericModelSettings(settings, psky); - gAtmosphere->configureAtmosphericModel(settings); - } - return changed; } @@ -3418,8 +3362,8 @@ namespace { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("testExperiencesOnParcelCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testExperiencesOnParcelCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = gAgent.getRegionCapability("ExperienceQuery"); if (url.empty()) diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index e56548d618..559a34bc47 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -38,8 +38,6 @@ #include "llsettingswater.h" #include "llsettingsdaycycle.h" -#include "llatmosphere.h" - #include "llglslshader.h" #include <boost/signals2.hpp> @@ -133,8 +131,6 @@ public: LLSettingsSky::ptr_t getCurrentSky() const; LLSettingsWater::ptr_t getCurrentWater() const; - static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky); - void update(const LLViewerCamera * cam); static void updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting); diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index a7d18d85ce..54be045c3d 100644 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -138,8 +138,8 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EstateChangeInfo", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EstateChangeInfo", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD body; body["estate_name"] = getName(); diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index 16897e9ebd..66a922e288 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -166,28 +166,19 @@ bool LLEventNotifier::handleResponse(U32 eventId, const LLSD& notification, cons return true; } -bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName) +bool LLEventNotifier::add(LLEventInfo event) { - LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName); - - LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL; - if(!new_enp->isValid()) - { - delete new_enp; + if (mEventInfoSignal(event)) return false; - } - - mEventNotifications[new_enp->getEventID()] = new_enp; - return true; + return add(event.mID, event.mUnixTime, event.mTimeStr, event.mName); } -bool LLEventNotifier::add(const LLEventStruct& event) +bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName) { - if (mNewEventSignal(event)) return false; - LLEventNotification *new_enp = new LLEventNotification(event.eventId, event.eventEpoch, event.eventDateStr, event.eventName); + LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName); - LL_INFOS() << "Add event " << event.eventName << " id " << event.eventId << " date " << event.eventDateStr << LL_ENDL; + LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL; if(!new_enp->isValid()) { delete new_enp; @@ -215,34 +206,9 @@ void LLEventNotifier::add(U32 eventId) //static void LLEventNotifier::processEventInfoReply(LLMessageSystem *msg, void **) { - // extract the agent id - LLUUID agent_id; - U32 event_id; - std::string event_name; - std::string eventd_date; - U32 event_time_utc; - - msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); - msg->getU32("EventData", "EventID", event_id); - msg->getString("EventData", "Name", event_name); - msg->getString("EventData", "Date", eventd_date); - msg->getU32("EventData", "DateUTC", event_time_utc); - - //gEventNotifier.add(event_id, (F64)event_time_utc, eventd_date, event_name); - - LLEventStruct event(event_id, (F64)event_time_utc, eventd_date, event_name); - msg->getString("EventData", "Creator", event.creator); - msg->getString("EventData", "Category", event.category); - msg->getString("EventData", "Desc", event.desc); - msg->getU32("EventData", "Duration", event.duration); - msg->getU32("EventData", "Cover", event.cover); - msg->getU32("EventData", "Amount", event.amount); - msg->getString("EventData", "SimName", event.simName); - msg->getVector3d("EventData", "GlobalPos", event.globalPos); - msg->getU32("EventData", "EventFlags", event.flags); - - gEventNotifier.add(event); - + LLEventInfo info; + info.unpack(msg); + gEventNotifier.add(info); } @@ -280,15 +246,11 @@ void LLEventNotifier::load(const LLSD& event_options) substitution["datetime"] = date; LLStringUtil::format(dateStr, substitution); - //add(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString()); - LLEventStruct event(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString()); - add(event); + add(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString()); } else { - //add(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString()); - LLEventStruct event(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString()); - add(event); + add(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString()); } } } @@ -322,21 +284,67 @@ void LLEventNotifier::remove(const U32 event_id) void LLEventNotifier::serverPushRequest(U32 event_id, bool add) { // Push up a message to tell the server we have this notification. - gMessageSystem->newMessageFast(add ? _PREHASH_EventNotificationAddRequest : _PREHASH_EventNotificationRemoveRequest); + gMessageSystem->newMessage(add?"EventNotificationAddRequest":"EventNotificationRemoveRequest"); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->nextBlockFast(_PREHASH_EventData); - gMessageSystem->addU32Fast(_PREHASH_EventID, event_id); + gMessageSystem->nextBlock("EventData"); + gMessageSystem->addU32("EventID", event_id); gAgent.sendReliableMessage(); } +void LLEventInfo::unpack(LLMessageSystem* msg) +{ + U32 event_id; + msg->getU32("EventData", "EventID", event_id); + mID = event_id; + + msg->getString("EventData", "Name", mName); + + msg->getString("EventData", "Category", mCategoryStr); + + msg->getString("EventData", "Date", mTimeStr); + + U32 duration; + msg->getU32("EventData", "Duration", duration); + mDuration = duration; + + U32 date; + msg->getU32("EventData", "DateUTC", date); + mUnixTime = date; + + msg->getString("EventData", "Desc", mDesc); + + std::string buffer; + msg->getString("EventData", "Creator", buffer); + mRunByID = LLUUID(buffer); + + U32 foo; + msg->getU32("EventData", "Cover", foo); + + mHasCover = foo ? true : false; + if (mHasCover) + { + U32 cover; + msg->getU32("EventData", "Amount", cover); + mCover = cover; + } + + msg->getString("EventData", "SimName", mSimName); + + msg->getVector3d("EventData", "GlobalPos", mPosGlobal); + + // Mature content + U32 event_flags; + msg->getU32("EventData", "EventFlags", event_flags); + mEventFlags = event_flags; +} -LLEventNotification::LLEventNotification(U32 eventId, F64 eventEpoch, std::string eventDateStr, std::string eventName) : +LLEventNotification::LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName) : mEventID(eventId), - mEventName(std::move(eventName)), + mEventName(eventName), mEventDateEpoch(eventEpoch), - mEventDateStr(std::move(eventDateStr)) + mEventDateStr(eventDateStr) { } diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h index f013f6d02e..2a9295129d 100644 --- a/indra/newview/lleventnotifier.h +++ b/indra/newview/lleventnotifier.h @@ -27,31 +27,30 @@ #ifndef LL_LLEVENTNOTIFIER_H #define LL_LLEVENTNOTIFIER_H -#include <utility> #include "llframetimer.h" #include "v3dmath.h" class LLEventNotification; class LLMessageSystem; -typedef struct event_st{ - U32 eventId = 0; - F64 eventEpoch = 0.0; - std::string eventDateStr; - std::string eventName; - std::string creator; - std::string category; - std::string desc; - U32 duration = 0; - U32 cover = 0; - U32 amount = 0; - std::string simName; - LLVector3d globalPos; - U32 flags = 0; - event_st(U32 id, F64 epoch, std::string date_str, std::string name) - : eventId(id), eventEpoch(epoch), eventDateStr(std::move(date_str)), eventName(std::move(name)){} - event_st() = default; -} LLEventStruct; +struct LLEventInfo +{ + void unpack(LLMessageSystem* msg); + + std::string mName; + U32 mID; + std::string mDesc; + std::string mCategoryStr; + U32 mDuration; + std::string mTimeStr; + LLUUID mRunByID; + std::string mSimName; + LLVector3d mPosGlobal; + F64 mUnixTime; // seconds from 1970 + BOOL mHasCover; + U32 mCover; + U32 mEventFlags; +}; class LLEventNotifier { @@ -60,8 +59,8 @@ public: virtual ~LLEventNotifier(); void update(); // Notify the user of the event if it's coming up - bool add(const LLEventStruct& event); bool add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName); + bool add(LLEventInfo event); void add(U32 eventId); @@ -76,23 +75,20 @@ public: static void processEventInfoReply(LLMessageSystem *msg, void **); - typedef boost::signals2::signal<bool(LLEventStruct event)> new_event_signal_t; - new_event_signal_t mNewEventSignal; - boost::signals2::connection setNewEventCallback(const new_event_signal_t::slot_type& cb) - { - return mNewEventSignal.connect(cb); - }; + typedef boost::signals2::signal<bool(LLEventInfo event)> info_received_signal_t; + boost::signals2::connection setEventInfoCallback(const info_received_signal_t::slot_type& cb) { return mEventInfoSignal.connect(cb); }; protected: en_map mEventNotifications; - LLFrameTimer mNotificationTimer; + LLFrameTimer mNotificationTimer; + info_received_signal_t mEventInfoSignal; }; class LLEventNotification { public: - LLEventNotification(U32 eventId, F64 eventEpoch, std::string eventDateStr, std::string eventName); + LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName); U32 getEventID() const { return mEventID; } diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 86c58a3497..9eddec55c5 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -56,6 +56,7 @@ namespace Details private: void eventPollCoro(std::string url); + void handleMessage(const std::string& msg_name, const LLSD& body); void handleMessage(const LLSD &content); bool mDone; @@ -72,9 +73,9 @@ namespace Details // We will wait RETRY_SECONDS + (errorCount * RETRY_SECONDS_INC) before retrying after an error. // This means we attempt to recover relatively quickly but back off giving more time to recover // until we finally give up after MAX_EVENT_POLL_HTTP_ERRORS attempts. - constexpr F32 EVENT_POLL_ERROR_RETRY_SECONDS = 15.f; // ~ half of a normal timeout. - constexpr F32 EVENT_POLL_ERROR_RETRY_SECONDS_INC = 5.f; // ~ half of a normal timeout. - constexpr S32 MAX_EVENT_POLL_HTTP_ERRORS = 10; // ~5 minutes, by the above rules. + constexpr F32 EVENT_POLL_ERROR_RETRY_SECONDS = 1.f; + constexpr F32 EVENT_POLL_ERROR_RETRY_SECONDS_INC = 3.f; + constexpr S32 MAX_EVENT_POLL_ERRORS = 15; // ~5 minutes, by the above rules. constexpr F64 MIN_SECONDS_PASSED = 10.0; // Minimum time we expect the server to hold the request. int LLEventPollImpl::sNextCounter = 1; @@ -90,26 +91,28 @@ namespace Details { LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest); + mHttpRequest = std::make_shared<LLCore::HttpRequest>(); mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_LONG_POLL); mSenderIp = sender.getIPandPort(); } + void LLEventPollImpl::handleMessage(const std::string &msg_name, const LLSD &body) + { + LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; + LLSD message; + message["sender"] = mSenderIp; + message["body"] = body; + + LLMessageSystem::dispatch(msg_name, message); + } + void LLEventPollImpl::handleMessage(const LLSD& content) { LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; std::string msg_name = content["message"].asString(); LLSD message; - try - { - message["sender"] = mSenderIp; - message["body"] = content["body"]; - } - catch (std::bad_alloc&) - { - LLError::LLUserWarningMsg::showOutOfMemory(); - LL_ERRS("LLCoros") << "Bad memory allocation on message: " << msg_name << LL_ENDL; - } + message["sender"] = mSenderIp; + message["body"] = content["body"]; LLMessageSystem::dispatch(msg_name, message); } @@ -144,7 +147,7 @@ namespace Details void LLEventPollImpl::eventPollCoro(std::string url) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EventPoller", mHttpPolicy)); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EventPoller", mHttpPolicy); LLSD acknowledge; int errorCount = 0; int counter = mCounter; // saved on the stack for logging. @@ -156,7 +159,7 @@ namespace Details // This is a loop with its own waitToRetry implementation, // so disable retries. - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setRetries(0); LL::WorkQueue::ptr_t main_queue = nullptr; @@ -194,7 +197,7 @@ namespace Details break; } - LLSD httpResults = result["http_result"]; + LLSD &httpResults = result["http_result"]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); if (!status) @@ -235,23 +238,26 @@ namespace Details } else if (!status.isHttpStatus()) { - /// Some LLCore or LIBCurl error was returned. This is unlikely to be recoverable - LL_WARNS("LLEventPollImpl") << "<" << counter << "> Critical error from poll request returned from libraries. Canceling coroutine." << LL_ENDL; - break; + // Some LLCore or LIBCurl error was returned. + LL_WARNS("LLEventPollImpl") << "<" << counter << "> Error from poll request returned from libraries. " << status.toTerseString() << LL_ENDL; + } + else + { + LL_WARNS("LLEventPollImpl") << "<" << counter << "> Error result from LLCoreHttpUtil::HttpCoroHandler. Code " + << status.toTerseString() << ": '" << httpResults["message"] << "'" << LL_ENDL; } - LL_WARNS("LLEventPollImpl") << "<" << counter << "> Error result from LLCoreHttpUtil::HttpCoroHandler. Code " - << status.toTerseString() << ": '" << httpResults["message"] << "'" << LL_ENDL; - if (errorCount < MAX_EVENT_POLL_HTTP_ERRORS) + if (errorCount < MAX_EVENT_POLL_ERRORS) { // An unanticipated error has been received from our poll // request. Calculate a timeout and wait for it to expire(sleep) - // before trying again. The sleep time is increased by 5 seconds + // before trying again. The sleep time is increased by 3 seconds // for each consecutive error. - ++errorCount; F32 waitToRetry = EVENT_POLL_ERROR_RETRY_SECONDS + errorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC; + ++errorCount; + LL_WARNS("LLEventPollImpl") << "<" << counter << "> Retrying in " << waitToRetry << " seconds, error count is now " << errorCount << LL_ENDL; @@ -299,7 +305,7 @@ namespace Details } acknowledge = result["id"]; - LLSD events = result["events"]; + LLSD &events = result["events"]; if (acknowledge.isUndefined()) { @@ -310,20 +316,37 @@ namespace Details LL_DEBUGS("LLEventPollImpl") << " <" << counter << "> " << events.size() << "events (id " << acknowledge << ")" << LL_ENDL; - LLSD::array_const_iterator i = events.beginArray(); - LLSD::array_const_iterator end = events.endArray(); + LLSD::array_iterator i = events.beginArray(); + LLSD::array_iterator end = events.endArray(); for (; i != end; ++i) { if (i->has("message")) { if (main_queue) - { // shuttle to a sensible spot in the main thread instead + { + // Shuttle copy to a sensible spot in the main thread instead // of wherever this coroutine happens to be executing - const LLSD& msg = *i; - main_queue->post([this, msg]() + + LL::WorkQueue::Work work; + { + // LLSD is too smart for it's own good and may act like a smart + // pointer for the content of (*i), so instead of passing (*i) + // pass a prepared name and move ownership of "body", + // as we are not going to need "body" anywhere else. + std::string msg_name = (*i)["message"].asString(); + + // WARNING: This is a shallow copy! + // If something still retains the data (like in httpAdapter?) this might still + // result in a crash, if it does appear to be the case, make a deep copy or + // convert data to string and pass that string. + const LLSD body = (*i)["body"]; + (*i)["body"].clear(); + work = [this, msg_name, body]() { - handleMessage(msg); - }); + handleMessage(msg_name, body); + }; + } + main_queue->post(work); } else { diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp index ce10fba2ca..b86474c5ca 100644 --- a/indra/newview/llexperiencelog.cpp +++ b/indra/newview/llexperiencelog.cpp @@ -279,6 +279,6 @@ void LLExperienceLog::setNotifyNewEvent( bool val ) } else if( val && !mNotifyConnection.connected()) { - mNotifyConnection = addUpdateSignal(boost::function<void(LLSD&)>(LLExperienceLog::notify)); + mNotifyConnection = addUpdateSignal(std::function<void(LLSD&)>(LLExperienceLog::notify)); } } diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 3decd15bbd..cc4e8973c4 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -44,8 +44,26 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env std::string cmd = findCommand(env_var, override); if (cmd.empty()) { - LL_WARNS() << "Editor command is empty or not set" << LL_ENDL; - return EC_NOT_SPECIFIED; + LL_INFOS() << "Editor command is empty or not set, falling back to OS open handler" << LL_ENDL; +#if LL_WINDOWS + std::string os_cmd = LLStringUtil::getenv("SystemRoot", ""); + if (!os_cmd.empty()) + { + os_cmd.append("\\explorer.exe \"%s\""); + } +#elif LL_DARWIN + static const std::string os_cmd = "/usr/bin/open -t \"%s\""; +#elif LL_LINUX + static const std::string os_cmd = "/usr/bin/xdg-open \"%s\""; +#elif __FreeBSD__ + static const std::string os_cmd = "/usr/local/bin/xdg-open \"%s\""; +#endif + cmd = findCommand("", os_cmd); + if (cmd.empty()) + { + LL_WARNS() << "Failed to find OS open handler \"" << cmd << "\"" << LL_ENDL; + return EC_NOT_SPECIFIED; + } } string_vec_t tokens; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d2b862eb58..20cc89b7bd 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1071,6 +1071,91 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs return true; } +F32 dot_product(const LLVector3& a, const LLVector3& b) +{ + return a.mV[VX] * b.mV[VX] + a.mV[VY] * b.mV[VY] + a.mV[VZ] * b.mV[VZ]; +} + +bool LLFace::calcAlignedPlanarGLTF( + const LLFace* align_to, + LLVector2* res_st_offset, + LLVector2* res_st_scale, + F32* res_st_rot, + S32 gltf_info_index) const +{ + if (!align_to) + { + return false; + } + + const LLTextureEntry* orig_tep = align_to->getTextureEntry(); + const LLTextureEntry* tep = getTextureEntry(); + if (!orig_tep || !tep) + { + return false; + } + + // Only support planar mapping for now + if (orig_tep->getTexGen() != LLTextureEntry::TEX_GEN_PLANAR || + tep->getTexGen() != LLTextureEntry::TEX_GEN_PLANAR) + { + return false; + } + + LLGLTFMaterial* orig_mat = orig_tep->getGLTFRenderMaterial(); + LLGLTFMaterial* this_mat = tep->getGLTFRenderMaterial(); + if (!orig_mat || !this_mat) + { + return false; + } + + // Get the original GLTF transform for the specified channel + const auto& orig_tt = orig_mat->mTextureTransform[gltf_info_index]; + + // Convert GLTF transform to legacy TE transform + F32 map_scaleS, map_scaleT, map_offsS, map_offsT, map_rot; + LLGLTFMaterial::convertPBRTransformToTexture( + orig_tt.mScale, + orig_tt.mOffset, + orig_tt.mRotation, + map_scaleS, map_scaleT, map_offsS, map_offsT, map_rot); + + // Calculate aligments + LLVector3 orig_pos, this_pos; + LLQuaternion orig_face_rot, this_face_rot; + F32 orig_proj_scale, this_proj_scale; + align_to->getPlanarProjectedParams(&orig_face_rot, &orig_pos, &orig_proj_scale); + getPlanarProjectedParams(&this_face_rot, &this_pos, &this_proj_scale); + + // The rotation of "this face's" texture: + LLQuaternion orig_st_rot = LLQuaternion(map_rot, LLVector3::z_axis) * orig_face_rot; + LLQuaternion this_st_rot = orig_st_rot * ~this_face_rot; + F32 x_ang, y_ang, z_ang; + this_st_rot.getEulerAngles(&x_ang, &y_ang, &z_ang); + + // Offset and scale of "this face's" texture: + LLVector3 centers_dist = (this_pos - orig_pos) * ~orig_st_rot; + LLVector3 st_scale(map_scaleS, map_scaleT, 1.f); + st_scale *= orig_proj_scale; + centers_dist.scaleVec(st_scale); + LLVector2 orig_st_offset(map_offsS, map_offsT); + + LLVector2 tex_res_st_offset = orig_st_offset + (LLVector2)centers_dist; + tex_res_st_offset.mV[VX] -= (S32)tex_res_st_offset.mV[VX]; + tex_res_st_offset.mV[VY] -= (S32)tex_res_st_offset.mV[VY]; + + st_scale /= this_proj_scale; + + // Convert aligned legacy TE transform back to GLTF transform + LLGLTFMaterial::convertTextureTransformToPBR( + st_scale.mV[0], st_scale.mV[1], + tex_res_st_offset.mV[0], tex_res_st_offset.mV[1], + z_ang, + *res_st_scale, *res_st_offset, *res_st_rot); + + return true; +} + void LLFace::updateRebuildFlags() { if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME)) @@ -1405,11 +1490,11 @@ bool LLFace::getGeometryVolume(const LLVolume& volume, // They are used only to display a face selection marker // (white square with a rounded cross at the center) const auto& tt = gltf_mat->mTextureTransform[gltf_info_index]; - r = -tt.mRotation * 2; - ms = tt.mScale[VX]; - mt = tt.mScale[VY]; - os += tt.mOffset[VX] + (ms - 1) / 2; - ot -= tt.mOffset[VY] + (mt - 1) / 2; + LLGLTFMaterial::convertPBRTransformToTexture( + tt.mScale, + tt.mOffset, + tt.mRotation, + ms, mt, os, ot, r); } else { @@ -2382,7 +2467,11 @@ F32 LLFace::adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius //the above calculation is too expensive //the below is a good estimation: bounding box of the bounding sphere: - F32 alpha = 0.5f * (radius + screen_radius - d) / radius ; + F32 alpha = 1.f; + if (!is_approx_zero(radius)) // radius can be something like -1e-10 + { + alpha = 0.5f * (radius + screen_radius - d) / radius; + } alpha = llclamp(alpha, 0.f, 1.f) ; return alpha * alpha ; } diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 65637fbf85..6e9d23c3a2 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -58,16 +58,8 @@ class alignas(16) LLFace { LL_ALIGN_NEW public: - LLFace(const LLFace& rhs) - { - *this = rhs; - } - - const LLFace& operator=(const LLFace& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLFace(const LLFace& rhs) = delete; + const LLFace& operator=(const LLFace& rhs) = delete; enum EMasks { @@ -111,6 +103,8 @@ public: LLVector3 getPositionAgent() const; LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal); void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const; + bool calcAlignedPlanarGLTF(const LLFace* align_to, LLVector2* res_st_offset, + LLVector2* res_st_scale, F32* res_st_rot, S32 gltf_info_index = 0) const; bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset, LLVector2* st_scale, F32* st_rot, LLRender::eTexIndex map = LLRender::DIFFUSE_MAP) const; @@ -127,7 +121,7 @@ public: void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; } void setWorldMatrix(const LLMatrix4& mat); - const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); } + const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; } LLFacePool* getPool() const { return mDrawPoolp; } U32 getPoolType() const { return mPoolType; } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 377710c170..98b3ca820b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1395,6 +1395,19 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata) { return !LLAgentPicksInfo::getInstance()->isPickLimitReached(); } + else if (param == "copy_slurl" + || param == "show_on_map") + { + LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID); + if (nullptr == item) + return false; // shouldn't happen as it is selected from existing items + + const LLUUID& asset_id = item->getAssetUUID(); + + // Favorites are supposed to be loaded first, it should be here already + LLLandmark* landmark = gLandmarkList.getAsset(asset_id, NULL /*callback*/); + return nullptr != landmark; + } return false; } @@ -1425,10 +1438,17 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) LLVector3d posGlobal; LLLandmarkActions::getLandmarkGlobalPos(mSelectedItemID, posGlobal); + // inventory item and asset exist, otherwise + // enableSelected wouldn't have let it get here, + // only need to check location validity if (!posGlobal.isExactlyZero()) { LLLandmarkActions::getSLURLfromPosGlobal(posGlobal, copy_slurl_to_clipboard_cb); } + else + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + } } else if (action == "show_on_map") { @@ -1437,10 +1457,20 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) LLVector3d posGlobal; LLLandmarkActions::getLandmarkGlobalPos(mSelectedItemID, posGlobal); - if (!posGlobal.isExactlyZero() && worldmap_instance) + if (worldmap_instance) { - worldmap_instance->trackLocation(posGlobal); - LLFloaterReg::showInstance("world_map", "center"); + // inventory item and asset exist, otherwise + // enableSelected wouldn't have let it get here, + // only need to check location validity + if (!posGlobal.isExactlyZero()) + { + worldmap_instance->trackLocation(posGlobal); + LLFloaterReg::showInstance("world_map", "center"); + } + else + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + } } } else if (action == "create_pick") diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 9e69fcef29..68443dfc5b 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -30,7 +30,6 @@ #include <fstream> #include <boost/regex.hpp> -#include <boost/assign/list_of.hpp> #include "llfeaturemanager.h" #include "lldir.h" @@ -184,15 +183,15 @@ void LLFeatureList::dump() } } -static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of - ("Low") - ("LowMid") - ("Mid") - ("MidHigh") - ("High") - ("HighUltra") - ("Ultra") -; +static const std::vector<std::string> sGraphicsLevelNames = { + "Low", + "LowMid", + "Mid", + "MidHigh", + "High", + "HighUltra", + "Ultra" +}; U32 LLFeatureManager::getMaxGraphicsLevel() const { @@ -496,7 +495,9 @@ bool LLFeatureManager::loadGPUClass() { mGPUClass = GPU_CLASS_2; } - else if (gbps <= class1_gbps*4.f) + else if ((gbps <= class1_gbps*4.f) + // Cap silicon's GPUs at med+ as they have high throughput, low capability + || gGLManager.mIsApple) { mGPUClass = GPU_CLASS_3; } diff --git a/indra/newview/llfilepicker_mac.h b/indra/newview/llfilepicker_mac.h index 77cc8540bc..d0374c5a08 100644 --- a/indra/newview/llfilepicker_mac.h +++ b/indra/newview/llfilepicker_mac.h @@ -42,6 +42,9 @@ std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::string>* allowed_types, unsigned int flags); +// doLoadDialogModeless if window does not exists creates a modeless +// window, if it does exist, creates a 'sheet' that does not block +// thread but blocks window interractions void doLoadDialogModeless(const std::vector<std::string>* allowed_types, unsigned int flags, void (*callback)(bool, std::vector<std::string>&, void*), diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm index 6cb7c4ad51..99e93bafbf 100644 --- a/indra/newview/llfilepicker_mac.mm +++ b/indra/newview/llfilepicker_mac.mm @@ -114,38 +114,73 @@ void doLoadDialogModeless(const std::vector<std::string>* allowed_types, @autoreleasepool { - // Note: might need to return and save this panel - // so that it does not close immediately NSOpenPanel *panel = init_panel(allowed_types,flags); + NSWindow *mainWindow = [NSApp mainWindow]; - [panel beginWithCompletionHandler:^(NSModalResponse result) + if (mainWindow) { - std::vector<std::string> outfiles; - if (result == NSModalResponseOK) + [panel beginSheetModalForWindow:mainWindow + completionHandler:^(NSModalResponse result) { - NSArray *filesToOpen = [panel URLs]; - int i, count = [filesToOpen count]; - - if (count > 0) + std::vector<std::string> outfiles; + if (result == NSModalResponseOK) { + NSArray *filesToOpen = [panel URLs]; + int i, count = [filesToOpen count]; - for (i=0; i<count; i++) { - NSString *aFile = [[filesToOpen objectAtIndex:i] path]; - std::string *afilestr = new std::string([aFile UTF8String]); - outfiles.push_back(*afilestr); + if (count > 0) + { + + for (i=0; i<count; i++) { + NSString *aFile = [[filesToOpen objectAtIndex:i] path]; + std::string *afilestr = new std::string([aFile UTF8String]); + outfiles.push_back(*afilestr); + } + callback(true, outfiles, userdata); + } + else // no valid result + { + callback(false, outfiles, userdata); } - callback(true, outfiles, userdata); } - else // no valid result + else // cancel { callback(false, outfiles, userdata); } - } - else // cancel + }]; + } + else + { + //present as modeless window + [panel beginWithCompletionHandler:^(NSModalResponse result) { - callback(false, outfiles, userdata); - } - }]; + std::vector<std::string> outfiles; + if (result == NSModalResponseOK) + { + NSArray *filesToOpen = [panel URLs]; + int i, count = [filesToOpen count]; + + if (count > 0) + { + + for (i=0; i<count; i++) { + NSString *aFile = [[filesToOpen objectAtIndex:i] path]; + std::string *afilestr = new std::string([aFile UTF8String]); + outfiles.push_back(*afilestr); + } + callback(true, outfiles, userdata); + } + else // no valid result + { + callback(false, outfiles, userdata); + } + } + else // cancel + { + callback(false, outfiles, userdata); + } + }]; + } } } @@ -206,8 +241,13 @@ void doSaveDialogModeless(const std::string* file, NSURL* url = [NSURL fileURLWithPath:fileName]; [panel setNameFieldStringValue: fileName]; - [panel setDirectoryURL: url]; + NSURL *last_url = [[NSUserDefaults standardUserDefaults] URLForKey:@"NSNavLastRootDirectory"]; + if(!last_url) + { + NSURL *downloads_url = [[NSFileManager defaultManager] URLsForDirectory:NSDownloadsDirectory inDomains:NSUserDomainMask].firstObject; + [panel setDirectoryURL:downloads_url]; + } [panel beginWithCompletionHandler:^(NSModalResponse result) { diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 25970f8a08..ed07d49ac1 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -403,7 +403,7 @@ void LLFloater360Capture::suspendForAFrame() U32 curr_frame_count = LLFrameTimer::getFrameCount(); while (LLFrameTimer::getFrameCount() <= curr_frame_count + frame_count_delta) { - llcoro::suspend(); + llcoro::suspendUntilNextFrame(); } } @@ -716,7 +716,7 @@ void LLFloater360Capture::onSaveLocalBtn() { // region name and URL std::string region_name; // no sensible default - std::string region_url("http://secondlife.com"); + std::string region_url("https://secondlife.com"); LLViewerRegion* region = gAgent.getRegion(); if (region) { diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index a6419f5ad4..05f6c4a867 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -105,7 +105,7 @@ private: static const std::string sCheckUpdateListenerName; static void startFetchServerReleaseNotes(); - static void fetchServerReleaseNotesCoro(const std::string& cap_url); + static void fetchServerReleaseNotesCoro(const std::string cap_url); static void handleServerReleaseNotes(LLSD results); }; @@ -227,12 +227,12 @@ void LLFloaterAbout::startFetchServerReleaseNotes() } /*static*/ -void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url) +void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string cap_url) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 08a54b7369..c7851013c7 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -34,6 +34,7 @@ #include "llfloaterreg.h" #include "llimview.h" // for gIMMgr #include "lltooldraganddrop.h" // for LLToolDragAndDrop +#include "lltrans.h" #include "llviewercontrol.h" #include "llviewerregion.h" // getCapability() #include "llworld.h" @@ -405,15 +406,50 @@ bool LLFloaterAvatarPicker::visibleItemsSelected() const } /*static*/ -void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::string name) +void LLFloaterAvatarPicker::findByIdCoro(std::string url, LLUUID query_id, LLUUID agent_id, std::string floater_key) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByIdCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); - LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; + httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT); + + LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts); + + LL_DEBUGS("Agent") << result << LL_ENDL; + + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + + if (status || (status == LLCore::HttpStatus(HTTP_BAD_REQUEST))) + { + result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); + } + else + { + result["failure_reason"] = status.toString(); + } + + LLFloaterAvatarPicker* floater = + LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker", floater_key); + if (floater) + { + floater->processResponse(query_id, result); + } +} + +/*static*/ +void LLFloaterAvatarPicker::findByNameCoro(std::string url, LLUUID queryID, std::string name) +{ + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByNameCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + + LL_INFOS("HttpCoroutineAdapter", "genericPostCoro", "Agent") << "Generic POST for " << url << LL_ENDL; httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT); @@ -447,6 +483,7 @@ void LLFloaterAvatarPicker::find() std::string text = getChild<LLUICtrl>("Edit")->getValue().asString(); + LLUUID agent_id; size_t separator_index = text.find_first_of(" ._"); if (separator_index != text.npos) { @@ -458,51 +495,92 @@ void LLFloaterAvatarPicker::find() text = first; } } + else if (!text.empty()) + { + agent_id.set(text); + } mQueryID.generate(); + mNumResultsReturned = 0; - std::string url; - url.reserve(128); // avoid a memory allocation or two + getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems(); + getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching")); + getChildView("ok_btn")->setEnabled(false); - LLViewerRegion* region = gAgent.getRegion(); - if(region) + if (agent_id.notNull()) { - url = region->getCapability("AvatarPickerSearch"); - // Prefer use of capabilities to search on both SLID and display name - if (!url.empty()) + // Search by uuid + // While cache could have been nicer, it neither has a failure callback, nor + // can cleanup in case of an invalid uuid. So we go directly to the capability. + LLViewerRegion* region = gAgent.getRegion(); + if (region) { - // capability urls don't end in '/', but we need one to parse - // query parameters correctly - if (url.size() > 0 && url[url.size()-1] != '/') + std::string url; + url.reserve(128); + url = region->getCapability("GetDisplayNames"); + if (!url.empty()) { - url += "/"; - } - url += "?page_size=100&names="; - std::replace(text.begin(), text.end(), '.', ' '); - url += LLURI::escape(text); - LL_INFOS() << "avatar picker " << url << LL_ENDL; + // capability urls don't end in '/', but we need one to parse + // query parameters correctly + if (url[url.size() - 1] != '/') + { + url += "/"; + } + url += "?ids="; + url += agent_id.asString(); + LL_DEBUGS("Agent") << "avatar picker " << url << LL_ENDL; - LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro", - boost::bind(&LLFloaterAvatarPicker::findCoro, url, mQueryID, getKey().asString())); + LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro", + boost::bind(&LLFloaterAvatarPicker::findByIdCoro, url, mQueryID, agent_id, getKey().asString())); + } + else + { + LLSD content; + content["failure_reason"] = LLTrans::getString("ServerUnavailable"); + processResponse(mQueryID, content); + } } - else + } + else + { + std::string url; + url.reserve(128); // avoid a memory allocation or two + + LLViewerRegion* region = gAgent.getRegion(); + if (region) { - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("AvatarPickerRequest"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - msg->addUUID("QueryID", mQueryID); // not used right now - msg->nextBlock("Data"); - msg->addString("Name", text); - gAgent.sendReliableMessage(); + url = region->getCapability("AvatarPickerSearch"); + // Prefer use of capabilities to search on both SLID and display name + if (!url.empty()) + { + // capability urls don't end in '/', but we need one to parse + // query parameters correctly + if (url.size() > 0 && url[url.size() - 1] != '/') + { + url += "/"; + } + url += "?page_size=100&names="; + std::replace(text.begin(), text.end(), '.', ' '); + url += LLURI::escape(text); + LL_DEBUGS("Agent") << "avatar picker " << url << LL_ENDL; + + LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro", + boost::bind(&LLFloaterAvatarPicker::findByNameCoro, url, mQueryID, getKey().asString())); + } + else + { + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("AvatarPickerRequest"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->addUUID("QueryID", mQueryID); // not used right now + msg->nextBlock("Data"); + msg->addString("Name", text); + gAgent.sendReliableMessage(); + } } } - getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems(); - getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching")); - - getChildView("ok_btn")->setEnabled(false); - mNumResultsReturned = 0; } void LLFloaterAvatarPicker::setAllowMultiple(bool allow_multiple) diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 330f1a1226..1761497f83 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -43,7 +43,7 @@ public: typedef validate_signal_t::slot_type validate_callback_t; // The callback function will be called with an avatar name and UUID. - typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t; + typedef std::function<void(const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t; // Call this to select an avatar. static LLFloaterAvatarPicker* show(select_callback_t callback, bool allow_multiple = false, @@ -86,7 +86,8 @@ private: void populateFriend(); bool visibleItemsSelected() const; // Returns true if any items in the current tab are selected. - static void findCoro(std::string url, LLUUID mQueryID, std::string mName); + static void findByIdCoro(std::string url, LLUUID query_id, LLUUID agent_id, std::string floater_key); + static void findByNameCoro(std::string url, LLUUID mQueryID, std::string mName); void find(); void setAllowMultiple(bool allow_multiple); LLScrollListCtrl* getActiveList(); diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h index 4793b524f7..0f8944a56a 100644 --- a/indra/newview/llfloaterbanduration.h +++ b/indra/newview/llfloaterbanduration.h @@ -31,7 +31,7 @@ class LLFloaterBanDuration : public LLFloater { - typedef boost::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t; + typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t; public: LLFloaterBanDuration(const LLSD& target); diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp deleted file mode 100644 index ba682494bb..0000000000 --- a/indra/newview/llfloaterbigpreview.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** -* @file llfloaterbigpreview.cpp -* @brief Display of extended (big) preview for snapshots and SL Share -* @author merov@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, 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 "llfloaterbigpreview.h" -#include "llsnapshotlivepreview.h" - -/////////////////////// -//LLFloaterBigPreview// -/////////////////////// - -LLFloaterBigPreview::LLFloaterBigPreview(const LLSD& key) : LLFloater(key), - mPreviewPlaceholder(NULL), - mFloaterOwner(NULL) -{ -} - -LLFloaterBigPreview::~LLFloaterBigPreview() -{ - if (mPreviewHandle.get()) - { - mPreviewHandle.get()->die(); - } -} - -void LLFloaterBigPreview::onCancel() -{ - closeFloater(); -} - -void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) -{ - if (isFloaterOwner(floaterp)) - { - closeFloater(); - } -} - -bool LLFloaterBigPreview::postBuild() -{ - mPreviewPlaceholder = getChild<LLUICtrl>("big_preview_placeholder"); - return LLFloater::postBuild(); -} - -void LLFloaterBigPreview::draw() -{ - LLFloater::draw(); - - LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); - - // Display the preview if one is available - if (previewp && previewp->getBigThumbnailImage()) - { - // Get the preview rect - const LLRect& preview_rect = mPreviewPlaceholder->getRect(); - - // Get the preview texture size - S32 thumbnail_w = previewp->getBigThumbnailWidth(); - S32 thumbnail_h = previewp->getBigThumbnailHeight(); - - // Compute the scaling ratio and the size of the final texture in the rect: we want to prevent anisotropic scaling (distorted in x and y) - F32 ratio = llmax((F32)(thumbnail_w)/(F32)(preview_rect.getWidth()), (F32)(thumbnail_h)/(F32)(preview_rect.getHeight())); - thumbnail_w = (S32)((F32)(thumbnail_w)/ratio); - thumbnail_h = (S32)((F32)(thumbnail_h)/ratio); - - // Compute the preview offset within the preview rect: we want to center that preview in the available rect - const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; - const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; - - // Compute preview offset within the floater rect - S32 offset_x = preview_rect.mLeft + local_offset_x; - S32 offset_y = preview_rect.mBottom + local_offset_y; - - gGL.matrixMode(LLRender::MM_MODELVIEW); - // Apply floater transparency to the texture unless the floater is focused. - F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); - LLColor4 color = LLColor4::white; - - // Draw the preview texture - gl_draw_scaled_image(offset_x, offset_y, - thumbnail_w, thumbnail_h, - previewp->getBigThumbnailImage(), color % alpha); - } -} - diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h deleted file mode 100644 index 1d5804acf5..0000000000 --- a/indra/newview/llfloaterbigpreview.h +++ /dev/null @@ -1,54 +0,0 @@ -/** -* @file llfloaterbigpreview.h -* @brief Display of extended (big) preview for snapshots -* @author merov@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, 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_LLFLOATERBIGPREVIEW_H -#define LL_LLFLOATERBIGPREVIEW_H - -#include "llfloater.h" - -class LLFloaterBigPreview : public LLFloater -{ -public: - LLFloaterBigPreview(const LLSD& key); - ~LLFloaterBigPreview(); - - bool postBuild(); - void draw(); - void onCancel(); - - void setPreview(LLView* previewp) { mPreviewHandle = previewp->getHandle(); } - void setFloaterOwner(LLFloater* floaterp) { mFloaterOwner = floaterp; } - bool isFloaterOwner(LLFloater* floaterp) const { return (mFloaterOwner == floaterp); } - void closeOnFloaterOwnerClosing(LLFloater* floaterp); - -private: - LLHandle<LLView> mPreviewHandle; - LLUICtrl* mPreviewPlaceholder; - LLFloater* mFloaterOwner; -}; - -#endif // LL_LLFLOATERBIGPREVIEW_H - diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp index b898cb28b6..d11e9949f6 100644 --- a/indra/newview/llfloaterbulkupload.cpp +++ b/indra/newview/llfloaterbulkupload.cpp @@ -41,6 +41,7 @@ LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key) mUploadCost = key["upload_cost"].asInteger(); mUploadCount = key["upload_count"].asInteger(); mHas2kTextures = key["has_2k_textures"].asBoolean(); + mDestinationFolderId = key["dest"]; if (key["files"].isArray()) { const LLSD& files = key["files"]; @@ -125,7 +126,7 @@ void LLFloaterBulkUpload::onUpload2KCheckBox() void LLFloaterBulkUpload::onClickUpload() { - do_bulk_upload(mFiles, mAllow2kTextures); + do_bulk_upload(mFiles, mAllow2kTextures, mDestinationFolderId); closeFloater(); } diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h index d07dc8eabe..3d3004d84d 100644 --- a/indra/newview/llfloaterbulkupload.h +++ b/indra/newview/llfloaterbulkupload.h @@ -59,6 +59,7 @@ private: std::vector<std::string> mFiles; bool mAllow2kTextures = true; bool mHas2kTextures = false; + LLUUID mDestinationFolderId; S32 mUploadCost = 0; S32 mUploadCount = 0; }; diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 392079efe4..3acf28044c 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -1021,7 +1021,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) std::string desc = floaterp->getChild<LLUICtrl>("description_form")->getValue().asString(); S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost(); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>( floaterp->mTransactionID, LLAssetType::AT_ANIMATION, name, desc, 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, @@ -1029,7 +1029,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost, - floaterp->mDestinationFolderId)); + floaterp->mDestinationFolderId); upload_new_resource(assetUploadInfo); } diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp new file mode 100644 index 0000000000..e062ca7ac6 --- /dev/null +++ b/indra/newview/llfloaterdirectory.cpp @@ -0,0 +1,100 @@ +/** + * @file llfloaterdirectory.cpp + * @brief The legacy "Search" floater + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llfloaterdirectory.h" + +#include "llpaneldirevents.h" +#include "llpaneleventinfo.h" +#include "llpaneldirland.h" +#include "llpaneldirpeople.h" +#include "llpaneldirgroups.h" +#include "llpaneldirplaces.h" +#include "llpaneldirclassified.h" +#include "llpaneldirweb.h" +#include "llscrollbar.h" +#include "llviewercontrol.h" +#include "llpanelavatar.h" +#include "llpanelclassified.h" +#include "llpanelgroup.h" +#include "llpanelplaces.h" +#include "llpanelprofile.h" + +LLFloaterDirectory::LLFloaterDirectory(const std::string& name) +: LLFloater(name), + mPanelAvatarp(nullptr), + mPanelGroupp(nullptr), + mPanelPlacep(nullptr), + mPanelClassifiedp(nullptr), + mPanelEventp(nullptr) +{ +} + +LLFloaterDirectory::~LLFloaterDirectory() +{ +} + +bool LLFloaterDirectory::postBuild() +{ + const std::vector<std::string> panel_names = { + "panel_dir_classified", + "panel_dir_events", + "panel_dir_places", + "panel_dir_land", + "panel_dir_people", + "panel_dir_groups" }; + + for (const std::string& panel_name : panel_names) + { + if (LLPanelDirBrowser* panel_tab = findChild<LLPanelDirBrowser>(panel_name)) + { + panel_tab->setFloaterDirectory(this); + } + } + findChild<LLPanelDirWeb>("panel_dir_web")->setFloaterDirectory(this); + + mPanelAvatarp = findChild<LLPanelProfileSecondLife>("panel_profile_secondlife"); + mPanelAvatarp->setAllowEdit(false); + mPanelGroupp = findChild<LLPanelGroup>("panel_group_info_sidetray"); + mPanelGroupp->hideBackBtn(); + mPanelPlacep = findChild<LLPanelPlaces>("panel_places"); + mPanelPlacep->hideBackBtn(); + mPanelClassifiedp = findChild<LLPanelClassifiedInfo>("panel_classified_info"); + mPanelClassifiedp->setBackgroundVisible(false); + mPanelEventp = findChild<LLPanelEventInfo>("panel_event_info"); + + return true; +} + +void LLFloaterDirectory::hideAllDetailPanels() +{ + if (mPanelAvatarp) mPanelAvatarp->setVisible(false); + if (mPanelGroupp) mPanelGroupp->setVisible(false); + if (mPanelPlacep) mPanelPlacep->setVisible(false); + if (mPanelClassifiedp) mPanelClassifiedp->setVisible(false); + if (mPanelEventp) mPanelEventp->setVisible(false); +} diff --git a/indra/newview/llfloaterdirectory.h b/indra/newview/llfloaterdirectory.h new file mode 100644 index 0000000000..de788443be --- /dev/null +++ b/indra/newview/llfloaterdirectory.h @@ -0,0 +1,81 @@ +/** + * @file llfloaterdirectory.h + * @brief The legacy "Search" floater + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLFLOATERDIRECTORY_H +#define LL_LLFLOATERDIRECTORY_H + +#include "llfloater.h" +#include "lltabcontainer.h" + +#include "llpaneldirevents.h" +#include "llpaneldirland.h" +#include "llpaneldirpeople.h" +#include "llpaneldirgroups.h" +#include "llpaneldirplaces.h" +#include "llpaneldirclassified.h" + +class LLDirectoryCore; +class LLPanelDirBrowser; + +class LLPanelDirAdvanced; +class LLPanelDirClassified; +class LLPanelDirEvents; +class LLPanelDirGroups; +class LLPanelDirLand; +class LLPanelDirPeople; +class LLPanelDirPlaces; + +class LLPanelProfileSecondLife; +class LLPanelEventInfo; +class LLPanelGroup; +class LLPanelPlaces; +class LLPanelClassifiedInfo; + +// Floater to find people, places, things +class LLFloaterDirectory : public LLFloater +{ +public: + LLFloaterDirectory(const std::string& name); + /*virtual*/ ~LLFloaterDirectory(); + + void hideAllDetailPanels(); + + bool postBuild() override; + +public: + LLPanelProfileSecondLife* mPanelAvatarp; + LLPanelEventInfo* mPanelEventp; + LLPanelGroup* mPanelGroupp; + LLPanelPlaces* mPanelPlacep; + LLPanelClassifiedInfo* mPanelClassifiedp; + +private: + static LLFloaterDirectory *sInstance; +}; + +//extern BOOL gDisplayEventHack; + +#endif // LL_LLDIRECTORYFLOATER_H diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp index a42c94f049..bc1f3045bb 100644 --- a/indra/newview/llfloatereditenvironmentbase.cpp +++ b/indra/newview/llfloatereditenvironmentbase.cpp @@ -262,7 +262,7 @@ void LLFloaterEditEnvironmentBase::onSaveAsCommit(const LLSD& notification, cons } else if (mInventoryItem) { - const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); LLUUID parent_id = mInventoryItem->getParentUUID(); if (marketplacelistings_id == parent_id || gInventory.isObjectDescendentOf(mInventoryItem->getUUID(), gInventory.getLibraryRootFolderID())) { diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h index b807adb67d..88d288b141 100644 --- a/indra/newview/llfloateremojipicker.h +++ b/indra/newview/llfloateremojipicker.h @@ -40,8 +40,8 @@ class LLFloaterEmojiPicker : public LLFloater public: // The callback function will be called with an emoji char. - typedef boost::function<void (llwchar)> pick_callback_t; - typedef boost::function<void ()> close_callback_t; + typedef std::function<void(llwchar)> pick_callback_t; + typedef std::function<void ()> close_callback_t; LLFloaterEmojiPicker(const LLSD& key); diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h index 0a001478f1..d0fb611bd4 100644 --- a/indra/newview/llfloaterexperiencepicker.h +++ b/indra/newview/llfloaterexperiencepicker.h @@ -38,9 +38,9 @@ class LLFloaterExperiencePicker : public LLFloater { public: - typedef boost::function<void (const uuid_vec_t&)> select_callback_t; + typedef std::function<void(const uuid_vec_t&)> select_callback_t; // filter function for experiences, return true if the experience should be hidden. - typedef boost::function<bool (const LLSD&)> filter_function; + typedef std::function<bool(const LLSD&)> filter_function; typedef std::vector<filter_function> filter_list; static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin); diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index e79055fdae..79d74093a2 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -171,7 +171,7 @@ void LLFloaterExperiences::onOpen( const LLSD& key ) refreshContents(); return; } - region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this)); + mCapsReceivedConnection = region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this)); return; } } @@ -231,6 +231,7 @@ bool LLFloaterExperiences::updatePermissions( const LLSD& permission ) void LLFloaterExperiences::onClose( bool app_quitting ) { + mCapsReceivedConnection.disconnect(); LLEventPumps::instance().obtain("experience_permission").stopListening("LLFloaterExperiences"); LLFloater::onClose(app_quitting); } @@ -365,10 +366,10 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("retrieveExperienceListCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("retrieveExperienceListCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); if (url.empty()) @@ -384,8 +385,11 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url, if (!status) { + LL_WARNS("Experience") << "Failed to retrieve list. Error: " << status.toTerseString() + << ". Type: " << errorNotify << " Message: " << status.getMessage() << LL_ENDL; + LLSD subs; - subs["ERROR_MESSAGE"] = status.getType(); + subs["ERROR_MESSAGE"] = llformat(" %d\n %s", (S32)status.getType(), status.getMessage().c_str()); LLNotificationsUtil::add(errorNotify, subs); return; @@ -406,7 +410,7 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url, { const LLSD& ids = result[it->first]; tab->setExperienceList(ids); - if (!cback.empty()) + if (cback != nullptr) { cback(tab, result); } diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h index 5e657767d2..ec5f52d2f7 100644 --- a/indra/newview/llfloaterexperiences.h +++ b/indra/newview/llfloaterexperiences.h @@ -43,7 +43,7 @@ public: static LLFloaterExperiences* findInstance(); protected: typedef std::map<std::string, std::string> NameMap_t; - typedef boost::function<void(LLPanelExperiences*, const LLSD&)> Callback_t; + typedef std::function<void(LLPanelExperiences*, const LLSD&)> Callback_t; void clearFromRecent(const LLSD& ids); void resizeToTabs(); @@ -65,12 +65,13 @@ protected: const std::string &errorNotify, Callback_t cback); private: - typedef boost::function < LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t, + typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t, const std::string, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t; static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent, NameMap_t tabMapping, std::string errorNotify, Callback_t cback, invokationFn_t invoker); std::vector<LLUUID> mPrepurchaseIds; + boost::signals2::scoped_connection mCapsReceivedConnection; }; #endif //LL_LLFLOATEREXPERIENCES_H diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 936096d8fe..21ae98d380 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -320,15 +320,29 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur if (gesture) { + element["columns"][0]["column"] = "active"; + element["columns"][0]["type"] = "icon"; if (gesture->mPlaying) { font_style = "BOLD"; + element["columns"][0]["value"] = "Activate_Checkmark"; } + + // Only add "playing" if we've got the name, less confusing. JC item_name = gesture->mName; - element["columns"][0]["column"] = "trigger"; - element["columns"][0]["value"] = gesture->mTrigger; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; + if (item && gesture->mPlaying) + { + item_name += " " + getString("playing"); + } + element["columns"][1]["column"] = "name"; + element["columns"][1]["value"] = item_name; + element["columns"][1]["font"]["name"] = "SANSSERIF"; + element["columns"][1]["font"]["style"] = font_style; + + element["columns"][2]["column"] = "trigger"; + element["columns"][2]["value"] = gesture->mTrigger; + element["columns"][2]["font"]["name"] = "SANSSERIF"; + element["columns"][2]["font"]["style"] = font_style; std::string key_string; std::string buffer; @@ -345,45 +359,38 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur gesture->mKey); } - element["columns"][1]["column"] = "shortcut"; - element["columns"][1]["value"] = buffer; - element["columns"][1]["font"]["name"] = "SANSSERIF"; - element["columns"][1]["font"]["style"] = font_style; - // hidden column for sorting - element["columns"][2]["column"] = "key"; - element["columns"][2]["value"] = key_string; - element["columns"][2]["font"]["name"] = "SANSSERIF"; - element["columns"][2]["font"]["style"] = font_style; - - // Only add "playing" if we've got the name, less confusing. JC - if (item && gesture->mPlaying) - { - item_name += " " + getString("playing"); - } - element["columns"][3]["column"] = "name"; - element["columns"][3]["value"] = item_name; + element["columns"][3]["column"] = "key"; + element["columns"][3]["value"] = key_string; element["columns"][3]["font"]["name"] = "SANSSERIF"; element["columns"][3]["font"]["style"] = font_style; + + element["columns"][4]["column"] = "shortcut"; + element["columns"][4]["value"] = buffer; + element["columns"][4]["font"]["name"] = "SANSSERIF"; + element["columns"][4]["font"]["style"] = font_style; } else { - element["columns"][0]["column"] = "trigger"; + element["columns"][0]["column"] = "active"; + element["columns"][0]["type"] = "icon"; element["columns"][0]["value"] = ""; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; - element["columns"][1]["column"] = "shortcut"; - element["columns"][1]["value"] = "---"; + element["columns"][1]["column"] = "name"; + element["columns"][1]["value"] = item_name; element["columns"][1]["font"]["name"] = "SANSSERIF"; element["columns"][1]["font"]["style"] = font_style; - element["columns"][2]["column"] = "key"; - element["columns"][2]["value"] = "~~~"; + element["columns"][2]["column"] = "trigger"; + element["columns"][2]["value"] = ""; element["columns"][2]["font"]["name"] = "SANSSERIF"; element["columns"][2]["font"]["style"] = font_style; - element["columns"][3]["column"] = "name"; - element["columns"][3]["value"] = item_name; + element["columns"][3]["column"] = "key"; + element["columns"][3]["value"] = "~~~"; element["columns"][3]["font"]["name"] = "SANSSERIF"; element["columns"][3]["font"]["style"] = font_style; + element["columns"][4]["column"] = "shortcut"; + element["columns"][4]["value"] = "---"; + element["columns"][4]["font"]["name"] = "SANSSERIF"; + element["columns"][4]["font"]["style"] = font_style; } LL_DEBUGS("Gesture") << "Added gesture [" << item_name << "]" << LL_ENDL; @@ -391,9 +398,18 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM); if(sl_item) { - LLFontGL::StyleFlags style = LLGestureMgr::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL; - // *TODO find out why ["font"]["style"] does not affect font style - ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(style); + if (LLGestureMgr::getInstance()->isGestureActive(item_id)) + { + // If gesture was not yet loaded, will have to set active state here + ((LLScrollListIcon*)sl_item->getColumn(0))->setValue("Activate_Checkmark"); + ((LLScrollListIcon*)sl_item->getColumn(0))->setIconSize(10); + ((LLScrollListText*)sl_item->getColumn(1))->setFontStyle(LLFontGL::BOLD); + } + else + { + ((LLScrollListIcon*)sl_item->getColumn(0))->setValue(""); + ((LLScrollListText*)sl_item->getColumn(1))->setFontStyle(LLFontGL::NORMAL); + } } } diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index b6b844b307..e8e36b5c93 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -90,10 +90,10 @@ void LLFloaterGridStatus::getGridStatusRSSCoro() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getGridStatusRSSCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h index be6ced40bf..93a6deb0a3 100644 --- a/indra/newview/llfloatergroups.h +++ b/indra/newview/llfloatergroups.h @@ -40,8 +40,9 @@ #include "lluuid.h" #include "llfloater.h" +#include "llevent.h" + #include <map> -#include <boost/function.hpp> #include <boost/signals2.hpp> class LLUICtrl; diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index c924807273..bbff3e4c86 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -280,7 +280,7 @@ void LLFloaterImagePreview::onBtnOK() LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); fmt_file.write(formatted->getData(), formatted->getDataSize()); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>( tid, LLAssetType::AT_TEXTURE, getChild<LLUICtrl>("name_form")->getValue().asString(), getChild<LLUICtrl>("description_form")->getValue().asString(), @@ -289,8 +289,9 @@ void LLFloaterImagePreview::onBtnOK() LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost - )); + expected_upload_cost, + mDestinationFolderId + ); upload_new_resource(assetUploadInfo); } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 143781a225..04327e30bd 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -57,6 +57,8 @@ #include "llsdserialize.h" #include "llviewermenu.h" // is_agent_mappable #include "llviewerobjectlist.h" +#include "llvoavatar.h" +#include "llnearbyvoicemoderation.h" const S32 EVENTS_PER_IDLE_LOOP_CURRENT_SESSION = 80; @@ -90,6 +92,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param mAutoResize = false; LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); + LLNearbyVoiceModeration::getInstance(); } LLFloaterIMContainer::~LLFloaterIMContainer() @@ -530,6 +533,33 @@ void LLFloaterIMContainer::idleUpdate() mGeneralTitleInUse = !needs_override; setTitle(needs_override ? conversation_floaterp->getTitle() : mGeneralTitle); } + const LLConversationItem* nearby_session = getSessionModel(LLUUID()); + if (nearby_session) + { + LLSpeakerMgr* speaker_mgr = (LLSpeakerMgr*)(LLLocalSpeakerMgr::getInstance()); + + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = nearby_session->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = nearby_session->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = + dynamic_cast<LLConversationItemParticipant*>((*current_participant_model).get()); + if (participant_model) + { + bool show_moderator_options = LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator(); + LLUUID participant_id = participant_model->getUUID(); + if (participant_id != gAgentID) + { + // Don't show moderator options if participant is not connected to the same spatial channel + LLSpeaker* speakerp = speaker_mgr->findSpeaker(participant_id).get(); + show_moderator_options &= speakerp && speakerp->isInVoiceChannel(); + } + participant_model->setModeratorOptionsVisible(show_moderator_options); + } + + current_participant_model++; + } + } } mParticipantRefreshTimer.setTimerExpirySec(1.0f); @@ -1693,6 +1723,10 @@ bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) { return isMuted(conversation_item->getUUID()); } + else if ("can_allow_text_chat" == item) + { + return !isNearbyChatSpeakerSelected(); + } return true; } @@ -2022,9 +2056,27 @@ LLConversationViewParticipant* LLFloaterIMContainer::createConversationViewParti bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& userdata, bool is_self) { - // only group moderators can perform actions related to this "enable callback" - if (!isGroupModerator()) + if (LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator() && isNearbyChatSpeakerSelected()) { + // Determine here which actions are allowed + if ("can_moderate_voice" == userdata) + { + return true; + } + else if (("can_mute" == userdata)) + { + return !is_self; + } + else if ("can_unmute" == userdata) + { + return true; + } + + return false; + } + else if (!isGroupModerator()) + { + // only group moderators can perform actions related to this "enable callback" return false; } @@ -2157,7 +2209,35 @@ void LLFloaterIMContainer::banSelectedMember(const LLUUID& participant_uuid) void LLFloaterIMContainer::moderateVoice(const std::string& command, const LLUUID& userID) { - if (!gAgent.getRegion()) return; + if (!gAgent.getRegion()) + { + return; + } + + if (isNearbyChatSpeakerSelected()) + { + if ("selected" == command) + { + // Request a mute/unmute using a capability request via the simulator + LLNearbyVoiceModeration::getInstance()->requestMuteIndividual(userID, !isMuted(userID)); + } + else + if ("mute_all" == command) + { + // Send the mute_all request to the server + const bool mute_state = true; + LLNearbyVoiceModeration::getInstance()->requestMuteAll(mute_state); + } + else + if ("unmute_all" == command) + { + // Send the unmute_all request to the server + const bool mute_state = false; + LLNearbyVoiceModeration::getInstance()->requestMuteAll(mute_state); + } + + return; + } if (command.compare("selected")) { @@ -2275,6 +2355,31 @@ LLSpeaker * LLFloaterIMContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr * return speaker_managerp->findSpeaker(participant_itemp->getUUID()); } +bool LLFloaterIMContainer::isNearbyChatSpeakerSelected() +{ + LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem(); + if (!selectedItem) + { + LL_WARNS() << "Current selected item is null" << LL_ENDL; + return NULL; + } + + conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin(); + conversations_widgets_map::const_iterator end = mConversationsWidgets.end(); + const LLUUID * conversation_uuidp = NULL; + while(iter != end) + { + if (iter->second == selectedItem || iter->second == selectedItem->getParentFolder()) + { + conversation_uuidp = &iter->first; + break; + } + ++iter; + } + // Nearby chat ID is LLUUID::null + return conversation_uuidp->isNull(); +} + void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid) { LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant()); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 30eed8be36..9f1690a9b9 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -178,6 +178,7 @@ private: void banSelectedMember(const LLUUID& participant_uuid); void openNearbyChat(); bool isParticipantListExpanded(); + bool isNearbyChatSpeakerSelected(); void idleUpdate(); // for convenience (self) from static idle void idleProcessEvents(); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index b649514bff..f0d696361a 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -907,7 +907,7 @@ class LLChatCommandHandler : public LLCommandHandler { public: // not allowed from outside the app - LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { } + LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_CLICK_ONLY) { } // Your code here bool handle(const LLSD& tokens, diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index c920a3c898..ec9458ea9b 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -87,7 +87,7 @@ public: void addChat (LLSD& chat); void arrangeToasts (); - typedef boost::function<LLFloaterIMNearbyChatToastPanel* (void )> create_toast_panel_callback_t; + typedef std::function<LLFloaterIMNearbyChatToastPanel*(void)> create_toast_panel_callback_t; void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;} void onToastDestroyed (LLToast* toast, bool app_quitting); diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 84a9fad708..73bce6f2fd 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -142,7 +142,7 @@ void LLFloaterIMSession::onClickCloseBtn(bool app_qutting) { if (app_qutting) { - LLFloaterIMSessionTab::onClickCloseBtn(); + LLFloaterIMSessionTab::onClickCloseBtn(app_qutting); return; } @@ -1056,7 +1056,7 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body) if (moderator_muted_text) label = LLTrans::getString("IM_muted_text_label"); else - label = LLTrans::getString("IM_to_label") + " " + LLIMModel::instance().getName(mSessionID); + label = LLIMModel::instance().getName(mSessionID); mInputEditor->setLabel(label); if (moderator_muted_text) diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 48360f30d4..3445b0a7cf 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -48,6 +48,7 @@ #include "llfloaterimnearbychat.h" #include "llgroupiconctrl.h" #include "lllayoutstack.h" +#include "llnotificationsutil.h" #include "llpanelemojicomplete.h" #include "lltoolbarview.h" @@ -936,7 +937,7 @@ void LLFloaterIMSessionTab::hideOrShowTitle() void LLFloaterIMSessionTab::updateSessionName(const std::string& name) { - mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + name); + mInputEditor->setLabel(name); } void LLFloaterIMSessionTab::updateChatIcon(const LLUUID& id) @@ -1419,3 +1420,20 @@ bool LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) } return handled; } + +void LLFloaterIMSessionTab::onClickCloseBtn(bool app_quitting) +{ + bool is_ad_hoc = (mSession ? mSession->isAdHocSessionType() : false); + if (is_ad_hoc && !app_quitting) + { + LLNotificationsUtil::add("ConfirmLeaveAdhoc", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response) + { + if (0 == LLNotificationsUtil::getSelectedOption(notification, response)) + closeFloater(); + }); + } + else + { + closeFloater(); + } +} diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index 6d04d622e1..b27ac1b8f9 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -85,6 +85,8 @@ public: void closeFloater(bool app_quitting = false) override; void deleteAllChildren() override; + virtual void onClickCloseBtn(bool app_quitting = false) override; + // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); void removeConversationViewParticipant(const LLUUID& participant_id); diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index c961070787..33e054aab9 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -225,6 +225,21 @@ void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> fl << " - description update = " << (needs_description_update ? "true" : "false") << LL_NEWLINE << " - outfit_folder_id = " << outfit_folder_id.asString() << LL_ENDL; + std::string old_description; + if (needs_wearable_ordering_update) + { + LLViewerInventoryItem* old_item = gInventory.getItem(old_item_id); + LLViewerInventoryItem* target_item = gInventory.getItem(target_item_id); + if (old_item && target_item && + old_item->getType() == LLAssetType::AT_CLOTHING && + target_item->getType() == LLAssetType::AT_CLOTHING && + old_item->getWearableType() == target_item->getWearableType()) + { + // Preserve the original description, which contains ordering info + old_description = old_item->getActualDescription(); + } + } + // If we are replacing an object, bodypart or gesture link within an outfit folder, // we need to change the actual description of the link itself. LLAppearanceMgr *should* // have created COF links that will be used to save the outfit with an empty description. @@ -246,7 +261,14 @@ void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> fl { LLPointer<LLViewerInventoryItem> item = *it; - if ((item->getType() == LLAssetType::AT_BODYPART || + if (item->getType() == LLAssetType::AT_CLOTHING && !old_description.empty()) + { + // Use the old description to set ordering info + LLSD updates; + updates["desc"] = old_description; + update_inventory_item(item->getUUID(), updates, LLPointer<LLInventoryCallback>(NULL)); + } + else if ((item->getType() == LLAssetType::AT_BODYPART || item->getType() == LLAssetType::AT_OBJECT || item->getType() == LLAssetType::AT_GESTURE) && !item->getActualDescription().empty()) @@ -347,12 +369,9 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items) bool is_outfit_folder = gInventory.isObjectDescendentOf(source_item->getParentUUID(), outfit_folder_id); // If either the new or old item in the COF is a wearable, we need to update wearable ordering after the link has been replaced bool needs_wearable_ordering_update = (is_outfit_folder && source_item->getType() == LLAssetType::AT_CLOTHING) || target_item->getType() == LLAssetType::AT_CLOTHING; - // Other items in the COF need a description update (description of the actual link item must be empty) - bool needs_description_update = is_outfit_folder && target_item->getType() != LLAssetType::AT_CLOTHING; LL_DEBUGS() << "is_outfit_folder = " << (is_outfit_folder ? "true" : "false") << LL_NEWLINE - << "needs_wearable_ordering_update = " << (needs_wearable_ordering_update ? "true" : "false") << LL_NEWLINE - << "needs_description_update = " << (needs_description_update ? "true" : "false") << LL_ENDL; + << "needs_wearable_ordering_update = " << (needs_wearable_ordering_update ? "true" : "false") << LL_ENDL; LLInventoryObject::const_object_list_t obj_array; obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item)); @@ -361,7 +380,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items) source_item->getUUID(), target_item->getUUID(), needs_wearable_ordering_update, - needs_description_update, + is_outfit_folder, (is_outfit_folder ? source_item->getParentUUID() : LLUUID::null) )); link_inventory_array(source_item->getParentUUID(), obj_array, cb); } diff --git a/indra/newview/llfloatermarketplace.cpp b/indra/newview/llfloatermarketplace.cpp index 7316d7617d..bb2378d864 100644 --- a/indra/newview/llfloatermarketplace.cpp +++ b/indra/newview/llfloatermarketplace.cpp @@ -39,6 +39,27 @@ LLFloaterMarketplace::~LLFloaterMarketplace() { } +void LLFloaterMarketplace::onOpen(const LLSD& key) +{ + Params params(key); + + if (!params.validateBlock()) + { + closeFloater(); + return; + } + + if (params.url().empty()) + { + openMarketplace(); + } + else + { + openMarketplaceURL(params.url); + set_current_url(params.url); // Fix looping back to previous url when using the viewer navigation bar + } +} + // just to override LLFloaterWebContent void LLFloaterMarketplace::onClose(bool app_quitting) { @@ -68,3 +89,18 @@ void LLFloaterMarketplace::openMarketplace() mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } } + +void LLFloaterMarketplace::openMarketplaceURL(const std::string& url) +{ + if (mCurrentURL != url) + { + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } +} + +// static +bool LLFloaterMarketplace::isMarketplaceURL(const std::string& url) +{ + static LLCachedControl<std::string> marketplace_url(gSavedSettings, "MarketplaceURL", "https://marketplace.secondlife.com/"); + return url.starts_with(marketplace_url()); +} diff --git a/indra/newview/llfloatermarketplace.h b/indra/newview/llfloatermarketplace.h index 9524c94eee..17979dae90 100644 --- a/indra/newview/llfloatermarketplace.h +++ b/indra/newview/llfloatermarketplace.h @@ -36,11 +36,14 @@ class LLFloaterMarketplace: public: void openMarketplace(); + void openMarketplaceURL(const std::string& url); + bool static isMarketplaceURL(const std::string& url); private: LLFloaterMarketplace(const LLSD& key); ~LLFloaterMarketplace(); bool postBuild() override; + void onOpen(const LLSD& key) override; void onClose(bool app_quitting) override; }; diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index f20fea01c5..dfd023e424 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -29,6 +29,7 @@ #include "llfloatermarketplacelistings.h" +#include "llcallbacklist.h" #include "llfloaterreg.h" #include "llfiltereditor.h" #include "llfolderview.h" @@ -231,7 +232,7 @@ void LLPanelMarketplaceListings::onTabChange() void LLPanelMarketplaceListings::onAddButtonClicked() { - LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + LLUUID marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); llassert(marketplacelistings_id.notNull()); LLFolderType::EType preferred_type = LLFolderType::lookup("category"); LLHandle<LLPanel> handle = getHandle(); @@ -351,7 +352,15 @@ public: if (added_category_type == LLFolderType::FT_MARKETPLACE_LISTINGS) { - mMarketplaceListingsFloater->initializeMarketPlace(); + LLHandle<LLFloater> handle = mMarketplaceListingsFloater->getHandle(); + doOnIdleOneTime([handle]() + { + LLFloaterMarketplaceListings* floater = (LLFloaterMarketplaceListings*)handle.get(); + if (floater) + { + floater->initializeMarketPlace(); + } + }); } } } @@ -415,7 +424,7 @@ bool LLFloaterMarketplaceListings::postBuild() // Fetch aggressively so we can interact with listings as soon as possible if (!fetchContents()) { - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); LLInventoryModelBackgroundFetch::instance().start(marketplacelistings_id, true); } @@ -513,8 +522,6 @@ void LLFloaterMarketplaceListings::setRootFolder() return; } - mRootFolderCreating = false; - // No longer need to observe new category creation if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver)) { @@ -524,6 +531,8 @@ void LLFloaterMarketplaceListings::setRootFolder() } llassert(!mCategoryAddedObserver); + mRootFolderCreating = false; + if (marketplacelistings_id == mRootFolderId) { LL_WARNS("SLM") << "Inventory warning: Marketplace listings folder already set" << LL_ENDL; @@ -566,7 +575,8 @@ void LLFloaterMarketplaceListings::setPanels() void LLFloaterMarketplaceListings::initializeMarketPlace() { - LLMarketplaceData::instance().initializeSLM(boost::bind(&LLFloaterMarketplaceListings::updateView, this)); + if (!mRootFolderCreating) + LLMarketplaceData::instance().initializeSLM(boost::bind(&LLFloaterMarketplaceListings::updateView, this)); } S32 LLFloaterMarketplaceListings::getFolderCount() @@ -909,7 +919,7 @@ void LLFloaterMarketplaceValidation::onOpen(const LLSD& key) LLUUID cat_id(key.asUUID()); if (cat_id.isNull()) { - cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + cat_id = gInventory.getMarketplaceListingsUUID(); } // Validates the folder diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp index ec4f7593ca..dd53d0ffcf 100644 --- a/indra/newview/llfloatermodeluploadbase.cpp +++ b/indra/newview/llfloatermodeluploadbase.cpp @@ -66,8 +66,8 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(std::string url { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("MeshUploadFlag", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("MeshUploadFlag", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp index 0283855f15..8685243867 100644 --- a/indra/newview/llfloatermyscripts.cpp +++ b/indra/newview/llfloatermyscripts.cpp @@ -93,8 +93,8 @@ void LLFloaterMyScripts::getAttachmentLimitsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index fa491a4b27..bd8530abd7 100644 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -208,7 +208,7 @@ void LLFloaterObjectWeights::draw() toggleRenderLoadingIndicators(false); } mTrianglesShown->setText(llformat("%d", total_tris)); - mPixelArea->setText(llformat("%d", pixel_area)); + mPixelArea->setText(llformat("%ld", (S64)pixel_area)); // value capped at 10M } LLFloater::draw(); } diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index e4e7c4ee39..e497fb0914 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -127,8 +127,8 @@ const S32 PAY_AMOUNT_NOTIFICATION = 200; LLFloaterPay::LLFloaterPay(const LLSD& key) : LLFloater(key), mCallbackData(), - mCallback(NULL), - mObjectNameText(NULL), + mCallback(nullptr), + mObjectNameText(nullptr), mTargetUUID(key.asUUID()), mTargetIsGroup(false), mHaveName(false) @@ -154,7 +154,7 @@ bool LLFloaterPay::postBuild() { S32 i = 0; - give_money_ptr info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0)); + give_money_ptr info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_0); mCallbackData.push_back(info); childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info)); @@ -164,7 +164,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1)); + info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_1); mCallbackData.push_back(info); childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info)); @@ -174,7 +174,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2)); + info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_2); mCallbackData.push_back(info); childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info)); @@ -184,7 +184,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3)); + info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_3); mCallbackData.push_back(info); childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info)); @@ -502,7 +502,7 @@ void LLFloaterPay::onGive(give_money_ptr info) amount = atoi(text_field->getValue().asString().c_str()); } - if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) + if (amount > PAY_AMOUNT_NOTIFICATION) { LLUUID payee_id = LLUUID::null; bool is_group = false; diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 7311f0deb6..4c3578119e 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -209,8 +209,8 @@ void LLFloaterPermsDefault::updateCapCoro(std::string url) std::string previousReason; LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateCapCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData = LLSD::emptyMap(); postData["default_object_perm_masks"]["Group"] = diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp deleted file mode 100644 index 616c13cdc7..0000000000 --- a/indra/newview/llfloaterpostprocess.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/** - * @file llfloaterpostprocess.cpp - * @brief LLFloaterPostProcess class definition - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llfloaterpostprocess.h" - -#include "llsliderctrl.h" -#include "llcheckboxctrl.h" -#include "llnotificationsutil.h" -#include "lluictrlfactory.h" -#include "llviewerdisplay.h" -#include "llpostprocess.h" -#include "llcombobox.h" -#include "lllineeditor.h" -#include "llviewerwindow.h" - - -LLFloaterPostProcess::LLFloaterPostProcess(const LLSD& key) - : LLFloater(key) -{ -} - -LLFloaterPostProcess::~LLFloaterPostProcess() -{ - - -} -bool LLFloaterPostProcess::postBuild() -{ - /// Color Filter Callbacks - childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); - //childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, &(gPostProcess->tweaks.gamma())); - childSetCommitCallback("ColorFilterBrightness", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness"); - childSetCommitCallback("ColorFilterSaturation", &LLFloaterPostProcess::onFloatControlMoved, (char*)"saturation"); - childSetCommitCallback("ColorFilterContrast", &LLFloaterPostProcess::onFloatControlMoved, (char*)"contrast"); - - childSetCommitCallback("ColorFilterBaseR", &LLFloaterPostProcess::onColorControlRMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseG", &LLFloaterPostProcess::onColorControlGMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseB", &LLFloaterPostProcess::onColorControlBMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseI", &LLFloaterPostProcess::onColorControlIMoved, (char*)"contrast_base"); - - /// Night Vision Callbacks - childSetCommitCallback("NightVisionToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_night_vision"); - childSetCommitCallback("NightVisionBrightMult", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness_multiplier"); - childSetCommitCallback("NightVisionNoiseSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_size"); - childSetCommitCallback("NightVisionNoiseStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_strength"); - - /// Bloom Callbacks - childSetCommitCallback("BloomToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_bloom"); - childSetCommitCallback("BloomExtract", &LLFloaterPostProcess::onFloatControlMoved, (char*)"extract_low"); - childSetCommitCallback("BloomSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_width"); - childSetCommitCallback("BloomStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_strength"); - - // Effect loading and saving. - LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo"); - getChild<LLComboBox>("PPLoadEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onLoadEffect, this, comboBox)); - comboBox->setCommitCallback(boost::bind(&LLFloaterPostProcess::onChangeEffectName, this, _1)); - - LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor"); - getChild<LLComboBox>("PPSaveEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onSaveEffect, this, editBox)); - - syncMenu(); - return true; -} - -// Bool Toggle -void LLFloaterPostProcess::onBoolToggle(LLUICtrl* ctrl, void* userData) -{ - char const * boolVariableName = (char const *)userData; - - // check the bool - LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl); - gPostProcess->tweaks[boolVariableName] = cbCtrl->getValue(); -} - -// Float Moved -void LLFloaterPostProcess::onFloatControlMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - gPostProcess->tweaks[floatVariableName] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlRMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - gPostProcess->tweaks[floatVariableName][0] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlGMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - gPostProcess->tweaks[floatVariableName][1] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlBMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - gPostProcess->tweaks[floatVariableName][2] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlIMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - gPostProcess->tweaks[floatVariableName][3] = sldrCtrl->getValue(); -} - -void LLFloaterPostProcess::onLoadEffect(LLComboBox* comboBox) -{ - LLSD::String effectName(comboBox->getSelectedValue().asString()); - - gPostProcess->setSelectedEffect(effectName); - - syncMenu(); -} - -void LLFloaterPostProcess::onSaveEffect(LLLineEditor* editBox) -{ - std::string effectName(editBox->getValue().asString()); - - if (gPostProcess->mAllEffects.has(effectName)) - { - LLSD payload; - payload["effect_name"] = effectName; - LLNotificationsUtil::add("PPSaveEffectAlert", LLSD(), payload, boost::bind(&LLFloaterPostProcess::saveAlertCallback, this, _1, _2)); - } - else - { - gPostProcess->saveEffect(effectName); - syncMenu(); - } -} - -void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl) -{ - // get the combo box and name - LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor"); - - // set the parameter's new name - editBox->setValue(ctrl->getValue()); -} - -bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - // if they choose save, do it. Otherwise, don't do anything - if (option == 0) - { - gPostProcess->saveEffect(notification["payload"]["effect_name"].asString()); - - syncMenu(); - } - return false; -} - -void LLFloaterPostProcess::syncMenu() -{ - // add the combo boxe contents - LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo"); - - comboBox->removeall(); - - LLSD::map_const_iterator currEffect; - for(currEffect = gPostProcess->mAllEffects.beginMap(); - currEffect != gPostProcess->mAllEffects.endMap(); - ++currEffect) - { - comboBox->add(currEffect->first); - } - - // set the current effect as selected. - comboBox->selectByValue(gPostProcess->getSelectedEffect()); - - /// Sync Color Filter Menu - getChild<LLUICtrl>("ColorFilterToggle")->setValue(gPostProcess->tweaks.useColorFilter()); - //getChild<LLUICtrl>("ColorFilterGamma")->setValue(gPostProcess->tweaks.gamma()); - getChild<LLUICtrl>("ColorFilterBrightness")->setValue(gPostProcess->tweaks.brightness()); - getChild<LLUICtrl>("ColorFilterSaturation")->setValue(gPostProcess->tweaks.saturation()); - getChild<LLUICtrl>("ColorFilterContrast")->setValue(gPostProcess->tweaks.contrast()); - getChild<LLUICtrl>("ColorFilterBaseR")->setValue(gPostProcess->tweaks.contrastBaseR()); - getChild<LLUICtrl>("ColorFilterBaseG")->setValue(gPostProcess->tweaks.contrastBaseG()); - getChild<LLUICtrl>("ColorFilterBaseB")->setValue(gPostProcess->tweaks.contrastBaseB()); - getChild<LLUICtrl>("ColorFilterBaseI")->setValue(gPostProcess->tweaks.contrastBaseIntensity()); - - /// Sync Night Vision Menu - getChild<LLUICtrl>("NightVisionToggle")->setValue(gPostProcess->tweaks.useNightVisionShader()); - getChild<LLUICtrl>("NightVisionBrightMult")->setValue(gPostProcess->tweaks.brightMult()); - getChild<LLUICtrl>("NightVisionNoiseSize")->setValue(gPostProcess->tweaks.noiseSize()); - getChild<LLUICtrl>("NightVisionNoiseStrength")->setValue(gPostProcess->tweaks.noiseStrength()); - - /// Sync Bloom Menu - getChild<LLUICtrl>("BloomToggle")->setValue(LLSD(gPostProcess->tweaks.useBloomShader())); - getChild<LLUICtrl>("BloomExtract")->setValue(gPostProcess->tweaks.extractLow()); - getChild<LLUICtrl>("BloomSize")->setValue(gPostProcess->tweaks.bloomWidth()); - getChild<LLUICtrl>("BloomStrength")->setValue(gPostProcess->tweaks.bloomStrength()); -} diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h deleted file mode 100644 index 50b48d8410..0000000000 --- a/indra/newview/llfloaterpostprocess.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file llfloaterpostprocess.h - * @brief LLFloaterPostProcess class definition - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLFLOATERPOSTPROCESS_H -#define LL_LLFLOATERPOSTPROCESS_H - -#include "llfloater.h" - -class LLButton; -class LLComboBox; -class LLLineEditor; -class LLSliderCtrl; -class LLTabContainer; -class LLPanelPermissions; -class LLPanelObject; -class LLPanelVolume; -class LLPanelContents; -class LLPanelFace; - -/** - * Menu for adjusting the post process settings of the world - */ -class LLFloaterPostProcess : public LLFloater -{ -public: - - LLFloaterPostProcess(const LLSD& key); - virtual ~LLFloaterPostProcess(); - bool postBuild(); - - /// post process callbacks - static void onBoolToggle(LLUICtrl* ctrl, void* userData); - static void onFloatControlMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlRMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlGMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlBMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlIMoved(LLUICtrl* ctrl, void* userData); - void onLoadEffect(LLComboBox* comboBox); - void onSaveEffect(LLLineEditor* editBox); - void onChangeEffectName(LLUICtrl* ctrl); - - /// prompts a user when overwriting an effect - bool saveAlertCallback(const LLSD& notification, const LLSD& response); - - /// sync up sliders - void syncMenu(); -}; - -#endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index aa36782942..cb708050fd 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -410,11 +410,11 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + gAgentID.asString(); @@ -474,7 +474,8 @@ bool LLFloaterPreference::postBuild() getChild<LLUICtrl>("log_path_string")->setEnabled(false); // make it read-only but selectable - getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); + mLanguageCombobox = getChild<LLComboBox>("language_combobox"); + mLanguageCombobox->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); mTimeFormatCombobox = getChild<LLComboBox>("time_format_combobox"); mTimeFormatCombobox->setCommitCallback(boost::bind(&LLFloaterPreference::onTimeFormatChange, this)); @@ -516,18 +517,18 @@ bool LLFloaterPreference::postBuild() std::map<std::string, std::string>::iterator iter = labels.find(system_lang); if (iter != labels.end()) { - getChild<LLComboBox>("language_combobox")->add(iter->second, LLSD("default"), ADD_TOP, true); + mLanguageCombobox->add(iter->second, LLSD("default"), ADD_TOP, true); } else { LL_WARNS() << "Language \"" << system_lang << "\" is not in default_languages.xml" << LL_ENDL; - getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true); + mLanguageCombobox->add("System default", LLSD("default"), ADD_TOP, true); } } else { LL_WARNS() << "Failed to load labels from " << user_filename << ". Using default." << LL_ENDL; - getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true); + mLanguageCombobox->add("System default", LLSD("default"), ADD_TOP, true); } #ifndef LL_DISCORD @@ -619,8 +620,6 @@ void LLFloaterPreference::apply() std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); setCacheLocation(cache_location); - LLViewerMedia::getInstance()->setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue()); - if (hasChild("web_proxy_enabled", true) &&hasChild("web_proxy_editor", true) && hasChild("web_proxy_port", true)) { bool proxy_enable = getChild<LLUICtrl>("web_proxy_enabled")->getValue(); @@ -774,9 +773,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionViews(); -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ // Lixux doesn't support automatic mode - LLComboBox* combo = getChild<LLComboBox>("double_click_action_combo"); + LLComboBox* combo = getChild<LLComboBox>("mouse_warp_combo"); S32 mode = gSavedSettings.getS32("MouseWarpMode"); if (mode == 0) { @@ -1340,6 +1339,12 @@ void LLFloaterPreference::refresh() updateClickActionViews(); mTimeFormatCombobox->selectByValue(gSavedSettings.getBOOL("Use24HourClock") ? "1" : "0"); + + std::string current_language = gSavedSettings.getString("Language"); + if (current_language != "default" && !current_language.empty()) + { + mLanguageCombobox->selectByValue(LLSD(current_language)); + } } void LLFloaterPreference::onCommitWindowedMode() @@ -1735,6 +1740,22 @@ void LLFloaterPreference::onChangeMaturity() || sim_access == SIM_ACCESS_ADULT); getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); + + // Update Legacy Search maturity settings + bool can_access_mature = gAgent.canAccessMature(); + bool can_access_adult = gAgent.canAccessAdult(); + if (!can_access_mature) + { + gSavedSettings.setBOOL("ShowMatureSims", false); + gSavedSettings.setBOOL("ShowMatureLand", false); + gSavedSettings.setBOOL("ShowMatureClassifieds", false); + } + if (!can_access_adult) + { + gSavedSettings.setBOOL("ShowAdultSims", false); + gSavedSettings.setBOOL("ShowAdultLand", false); + gSavedSettings.setBOOL("ShowAdultClassifieds", false); + } } void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue) @@ -2068,7 +2089,7 @@ class LLPanelPreference::Updater : public LLEventTimer public: - typedef boost::function<bool(const LLSD&)> callback_t; + typedef std::function<bool(const LLSD&)> callback_t; Updater(callback_t cb, F32 period) :LLEventTimer(period), @@ -3680,7 +3701,7 @@ void LLFloaterPreference::collectSearchableItems() LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" ); if( mFilterEdit && pRoot ) { - mSearchData.reset(new ll::prefs::SearchData() ); + mSearchData = std::make_unique<ll::prefs::SearchData>(); ll::prefs::TabContainerDataPtr pRootTabcontainer = ll::prefs::TabContainerDataPtr( new ll::prefs::TabContainerData ); pRootTabcontainer->mTabContainer = pRoot; diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 8d3f1ed6b0..33ba28d0dc 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -237,6 +237,7 @@ private: LLButton* mEnablePopupBtn = nullptr; LLButton* mDisablePopupBtn = nullptr; LLComboBox* mTimeFormatCombobox = nullptr; + LLComboBox* mLanguageCombobox = nullptr; std::unique_ptr< ll::prefs::SearchData > mSearchData; bool mSearchDataDirty; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 7673c2bacd..45f2abf011 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -94,7 +94,6 @@ #include "llmeshrepository.h" #include "llfloaterregionrestarting.h" #include "llpanelexperiencelisteditor.h" -#include <boost/function.hpp> #include "llpanelexperiencepicker.h" #include "llexperiencecache.h" #include "llpanelexperiences.h" @@ -539,6 +538,18 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); panel->setCtrlsEnabled(allow_modify); + panel->getChild<LLLineEditor>("estate_id")->setValue((S32)region_info.mEstateID); + + if (region) + { + panel->getChild<LLLineEditor>("grid_position_x")->setValue((S32)(region->getOriginGlobal()[VX] / 256)); + panel->getChild<LLLineEditor>("grid_position_y")->setValue((S32)(region->getOriginGlobal()[VY] / 256)); + } + else + { + panel->getChild<LLLineEditor>("grid_position_x")->setDefaultText(); + panel->getChild<LLLineEditor>("grid_position_y")->setDefaultText(); + } // DEBUG PANEL panel = tab->getChild<LLPanel>("Debug"); @@ -903,6 +914,9 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) getChildView("apply_btn")->setEnabled(false); getChildView("access_text")->setEnabled(allow_modify); // getChildView("access_combo")->setEnabled(allow_modify); + getChildView("estate_id")->setEnabled(false); + getChildView("grid_position_x")->setEnabled(false); + getChildView("grid_position_y")->setEnabled(false); // now set in processRegionInfo for teen grid detection getChildView("kick_btn")->setEnabled(allow_modify); getChildView("kick_all_btn")->setEnabled(allow_modify); @@ -4048,8 +4062,8 @@ void LLPanelEstateAccess::updateLists() void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestEstateGetAccessoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestEstateGetAccessoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloaterregionrestartschedule.cpp b/indra/newview/llfloaterregionrestartschedule.cpp index 59bcb22dce..cd699efd5b 100644 --- a/indra/newview/llfloaterregionrestartschedule.cpp +++ b/indra/newview/llfloaterregionrestartschedule.cpp @@ -272,9 +272,9 @@ void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -367,9 +367,9 @@ void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLS { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleSetter", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index e2c6305f4f..7e7eb91636 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -417,8 +417,8 @@ void LLFloaterReporter::requestAbuseCategoriesCoro(std::string url, LLHandle<LLF { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAbuseCategoriesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAbuseCategoriesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -860,7 +860,7 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url if(!sshot_url.empty()) { // try to upload screenshot - LLResourceUploadInfo::ptr_t uploadInfo(new LLARScreenShotUploader(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType)); + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLARScreenShotUploader>(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType); LLViewerAssetUpload::EnqueueInventoryUpload(sshot_url, uploadInfo); } else diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index b3452a25c5..58d624a7d0 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -178,8 +178,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(std::string url { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptResourcesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptResourcesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; @@ -222,8 +222,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptSummaryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptSummaryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -274,8 +274,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptDetailsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptDetailsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -487,13 +487,13 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) names_requested.push_back(owner_id); if (is_group_owned) { - gCacheName->getGroup(owner_id, + mGroupNameCacheConnection = gCacheName->getGroup(owner_id, boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, this, _1, _2)); } else { - LLAvatarNameCache::get(owner_id, + mAvatarNameCacheConnection = LLAvatarNameCache::get(owner_id, boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache, this, _1, _2)); } diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index e1eb8cb079..fe96bfbf3a 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -136,6 +136,9 @@ private: std::vector<LLSD> mObjectListItems; + boost::signals2::scoped_connection mAvatarNameCacheConnection; + boost::signals2::scoped_connection mGroupNameCacheConnection; + void getLandScriptResourcesCoro(std::string url); void getLandScriptSummaryCoro(std::string url); void getLandScriptDetailsCoro(std::string url); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 9b7a4e5134..3c84f5b459 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -123,19 +123,32 @@ void LLFloaterSearch::initiateSearch(const LLSD& tokens) subs["COLLECTION"] = ""; if (subs["TYPE"] == "standard") { + std::string collection_args; if (mCollectionType.find(collection) != mCollectionType.end()) { - subs["COLLECTION"] = "&collection_chosen=" + std::string(collection); + collection_args = "&collection_chosen=" + std::string(collection); } - else + else if (tokens.has("collections") && tokens["collections"].isArray()) + { + const LLSD &sd = tokens["collections"]; + for (LLSD::array_const_iterator it = sd.beginArray(); + it != sd.endArray(); + ++it) + { + if (mCollectionType.find(it->asString()) != mCollectionType.end()) + { + collection_args += "&collection_chosen=" + std::string(*it); + } + } + } + if (collection_args.empty()) { - std::string collection_args(""); for (std::set<std::string>::iterator it = mCollectionType.begin(); it != mCollectionType.end(); ++it) { collection_args += "&collection_chosen=" + std::string(*it); } - subs["COLLECTION"] = collection_args; } + subs["COLLECTION"] = collection_args; } // Default to PG diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index c0de8ab811..55b39d9193 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -54,11 +54,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders); @@ -87,9 +87,9 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L // Upload the image - LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>(); + LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>(); S64 length; { diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h index 487e77469c..5620a15d87 100644 --- a/indra/newview/llfloatersimplesnapshot.h +++ b/indra/newview/llfloatersimplesnapshot.h @@ -63,7 +63,7 @@ public: void postSave(); - typedef boost::function<void(const LLUUID& asset_id)> completion_t; + typedef std::function<void(const LLUUID& asset_id)> completion_t; void setComplectionCallback(completion_t callback) { mUploadCompletionCallback = callback; } static void uploadThumbnail(const std::string &file_path, const LLUUID &inventory_id, diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index faf7ed0d8c..83d7a92846 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1043,7 +1043,7 @@ bool LLFloaterSnapshot::postBuild() getChild<LLComboBox>("profile_size_combo")->selectNthItem(0); getChild<LLComboBox>("postcard_size_combo")->selectNthItem(0); getChild<LLComboBox>("texture_size_combo")->selectNthItem(0); - getChild<LLComboBox>("local_size_combo")->selectNthItem(8); + getChild<LLComboBox>("local_size_combo")->selectNthItem(0); getChild<LLComboBox>("local_format_combo")->selectNthItem(0); impl->mPreviewHandle = previewp->getHandle(); diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp deleted file mode 100644 index f11c5c0ad8..0000000000 --- a/indra/newview/llfloatersounddevices.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file llfloatersounddevices.cpp - * @author Leyla Farazha - * @brief Sound Preferences used for minimal skin - * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llfloatersounddevices.h" - -#include "lldraghandle.h" - -#include "llpanelvoicedevicesettings.h" - -// Library includes -#include "indra_constants.h" - -// protected -LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key) -: LLTransientDockableFloater(NULL, false, key) -{ - LLTransientFloaterMgr::getInstance()->addControlView(this); - - // force docked state since this floater doesn't save it between recreations - setDocked(true); -} - -LLFloaterSoundDevices::~LLFloaterSoundDevices() -{ - LLTransientFloaterMgr::getInstance()->removeControlView(this); -} - -// virtual -bool LLFloaterSoundDevices::postBuild() -{ - LLTransientDockableFloater::postBuild(); - - updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) - - LLPanelVoiceDeviceSettings* panel = findChild<LLPanelVoiceDeviceSettings>("device_settings_panel"); - if (panel) - { - panel->setUseTuningMode(false); - getChild<LLUICtrl>("voice_input_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - getChild<LLUICtrl>("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - getChild<LLUICtrl>("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - } - return true; -} - -//virtual -void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/) -{ - LLTransientDockableFloater::setDocked(docked, pop_on_undock); -} - -// virtual -void LLFloaterSoundDevices::setFocus(bool b) -{ - LLTransientDockableFloater::setFocus(b); - - // Force using active floater transparency - // We have to override setFocus() for because selecting an item of the - // combobox causes the floater to lose focus and thus become transparent. - updateTransparency(TT_ACTIVE); -} diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 63ba51e559..1ccb25f5df 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -250,9 +250,9 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string u { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testSiteIsAliveCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); httpOpts->setHeadersOnly(true); diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 3bec4da58d..82a8c8ac5a 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -30,7 +30,6 @@ #include "llmodaldialog.h" #include "llassetstorage.h" #include "llmediactrl.h" -#include <boost/function.hpp> #include "lleventcoro.h" #include "llcoros.h" diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 2f1857ec61..9696c3d3f8 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -201,10 +201,10 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMediaTypeCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); httpOpts->setHeadersOnly(true); diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp deleted file mode 100644 index 9f7c9aba87..0000000000 --- a/indra/newview/llfloatervoiceeffect.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/** - * @file llfloatervoiceeffect.cpp - * @author Aimee - * @brief Selection and preview of voice effect. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llfloatervoiceeffect.h" - -#include "llscrolllistctrl.h" -#include "lltrans.h" -#include "llweb.h" - -LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) - : LLFloater(key) -{ - mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this)); - mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); - mCommitCallbackRegistrar.add("VoiceEffect.Stop", boost::bind(&LLFloaterVoiceEffect::onClickStop, this)); -// mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); -} - -// virtual -LLFloaterVoiceEffect::~LLFloaterVoiceEffect() -{ - if(LLVoiceClient::instanceExists()) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->removeObserver(this); - } - } -} - -// virtual -bool LLFloaterVoiceEffect::postBuild() -{ - setDefaultBtn("record_btn"); - getChild<LLButton>("record_btn")->setFocus(true); - getChild<LLUICtrl>("voice_morphing_link")->setTextArg("[URL]", LLTrans::getString("voice_morphing_url")); - - mVoiceEffectList = getChild<LLScrollListCtrl>("voice_effect_list"); - if (mVoiceEffectList) - { - mVoiceEffectList->setCommitCallback(boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); -// mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); - } - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->addObserver(this); - - // Disconnect from the current voice channel ready to record a voice sample for previewing - effect_interface->enablePreviewBuffer(true); - } - - refreshEffectList(); - updateControls(); - - return true; -} - -// virtual -void LLFloaterVoiceEffect::onClose(bool app_quitting) -{ - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->enablePreviewBuffer(false); - } -} - -void LLFloaterVoiceEffect::refreshEffectList() -{ - if (!mVoiceEffectList) - { - return; - } - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) - { - mVoiceEffectList->setEnabled(false); - return; - } - - LL_DEBUGS("Voice")<< "Rebuilding Voice Morph list."<< LL_ENDL; - - // Preserve selected items and scroll position - S32 scroll_pos = mVoiceEffectList->getScrollPos(); - uuid_vec_t selected_items; - std::vector<LLScrollListItem*> items = mVoiceEffectList->getAllSelected(); - for(std::vector<LLScrollListItem*>::const_iterator it = items.begin(); it != items.end(); it++) - { - selected_items.push_back((*it)->getUUID()); - } - - mVoiceEffectList->deleteAllItems(); - - { - // Add the "No Voice Morph" entry - LLSD element; - - element["id"] = LLUUID::null; - element["columns"][NAME_COLUMN]["column"] = "name"; - element["columns"][NAME_COLUMN]["value"] = getString("no_voice_effect"); - element["columns"][NAME_COLUMN]["font"]["style"] = "BOLD"; - - LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); - // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( - if(sl_item) - { - ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(LLFontGL::BOLD); - } - } - - // Add each Voice Morph template, if there are any (template list includes all usable effects) - const voice_effect_list_t& template_list = effect_interface->getVoiceEffectTemplateList(); - if (!template_list.empty()) - { - for (voice_effect_list_t::const_iterator it = template_list.begin(); it != template_list.end(); ++it) - { - const LLUUID& effect_id = it->second; - - std::string localized_effect = "effect_" + it->first; - std::string effect_name = hasString(localized_effect) ? getString(localized_effect) : it->first; // XML contains localized effects names - - LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id); - - // Tag the active effect. - if (effect_id == LLVoiceClient::instance().getVoiceEffectDefault()) - { - effect_name += " " + getString("active_voice_effect"); - } - - // Tag available effects that are new this session - if (effect_properties["is_new"].asBoolean()) - { - effect_name += " " + getString("new_voice_effect"); - } - - LLDate expiry_date = effect_properties["expiry_date"].asDate(); - bool is_template_only = effect_properties["template_only"].asBoolean(); - - std::string font_style = "NORMAL"; - if (!is_template_only) - { - font_style = "BOLD"; - } - - LLSD element; - element["id"] = effect_id; - - element["columns"][NAME_COLUMN]["column"] = "name"; - element["columns"][NAME_COLUMN]["value"] = effect_name; - element["columns"][NAME_COLUMN]["font"]["style"] = font_style; - - element["columns"][1]["column"] = "expires"; - if (!is_template_only) - { - element["columns"][DATE_COLUMN]["value"] = expiry_date; - element["columns"][DATE_COLUMN]["type"] = "date"; - } - else { - element["columns"][DATE_COLUMN]["value"] = getString("unsubscribed_voice_effect"); - } -// element["columns"][DATE_COLUMN]["font"]["style"] = "NORMAL"; - - LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); - // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( - if(sl_item) - { - LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; - LLScrollListText* slt = dynamic_cast<LLScrollListText*>(sl_item->getColumn(0)); - llassert(slt); - if (slt) - { - slt->setFontStyle(style); - } - } - } - } - - // Re-select items that were selected before, and restore the scroll position - for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) - { - mVoiceEffectList->selectByID(*it); - } - mVoiceEffectList->setScrollPos(scroll_pos); - mVoiceEffectList->setEnabled(true); -} - -void LLFloaterVoiceEffect::updateControls() -{ - bool recording = false; - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - recording = effect_interface->isPreviewRecording(); - } - - getChild<LLButton>("record_btn")->setVisible(!recording); - getChild<LLButton>("record_stop_btn")->setVisible(recording); -} - -// virtual -void LLFloaterVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) -{ - if (effect_list_updated) - { - refreshEffectList(); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickRecord() -{ - LL_DEBUGS("Voice") << "Record clicked" << LL_ENDL; - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->recordPreviewBuffer(); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickPlay() -{ - LL_DEBUGS("Voice") << "Play clicked" << LL_ENDL; - if (!mVoiceEffectList) - { - return; - } - - const LLUUID& effect_id = mVoiceEffectList->getCurrentID(); - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->playPreviewBuffer(effect_id); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickStop() -{ - LL_DEBUGS("Voice") << "Stop clicked" << LL_ENDL; - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->stopPreviewBuffer(); - } - updateControls(); -} - -//void LLFloaterVoiceEffect::onClickActivate() -//{ -// LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); -// if (effect_interface && mVoiceEffectList) -// { -// effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); -// } -//} - diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h deleted file mode 100644 index 323beb64ae..0000000000 --- a/indra/newview/llfloatervoiceeffect.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file llfloatervoiceeffect.h - * @author Aimee - * @brief Selection and preview of voice effects. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLFLOATERVOICEEFFECT_H -#define LL_LLFLOATERVOICEEFFECT_H - -#include "llfloater.h" -#include "llvoiceclient.h" - -class LLButton; -class LLScrollListCtrl; - -class LLFloaterVoiceEffect - : public LLFloater - , public LLVoiceEffectObserver -{ -public: - LOG_CLASS(LLFloaterVoiceEffect); - - LLFloaterVoiceEffect(const LLSD& key); - virtual ~LLFloaterVoiceEffect(); - - bool postBuild() override; - void onClose(bool app_quitting) override; - -private: - enum ColumnIndex - { - NAME_COLUMN = 0, - DATE_COLUMN = 1, - }; - - void refreshEffectList(); - void updateControls(); - - /// Called by voice effect provider when voice effect list is changed. - virtual void onVoiceEffectChanged(bool effect_list_updated) override; - - void onClickRecord(); - void onClickPlay(); - void onClickStop(); -// void onClickActivate(); - - LLUUID mSelectedID; - LLScrollListCtrl* mVoiceEffectList; -}; - -#endif diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 5300627cec..b9f19b5247 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -136,7 +136,7 @@ bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryIte class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver { public: - typedef boost::function<void()> callback_t; + typedef std::function<void()> callback_t; LLInitialFriendCardsFetch(const LLUUID& folder_id, callback_t cb) : diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index e3bd25aae7..f6c0a991bc 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -96,7 +96,7 @@ public: void syncFriendCardsFolders(); private: - typedef boost::function<void()> callback_t; + typedef std::function<void()> callback_t; diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 1bbeba43ec..550af7af53 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -71,7 +71,7 @@ LLGestureMgr::LLGestureMgr() mLoadingCount(0) { gInventory.addObserver(this); - mListener.reset(new LLGestureListener()); + mListener = std::make_shared<LLGestureListener>(); } diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index 8db36c6d89..e10bc8bbb4 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -54,7 +54,7 @@ class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchIt ~LLGestureMgr(); public: - typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t; + typedef std::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t; // Maps inventory item_id to gesture typedef std::map<LLUUID, LLMultiGesture*> item_map_t; typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t; diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index fffc520d9c..807ba1b3ed 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -900,6 +900,39 @@ private: }; +F32 shader_timer_benchmark(std::vector<LLRenderTarget> & dest, TextureHolder & texHolder, U32 textures_count, LLVertexBuffer * buff, F32 &seconds) +{ + // run GPU timer benchmark + + //number of samples to take + const S32 samples = 64; + + { + ShaderProfileHelper initProfile; + dest[0].bindTarget("benchmark", 1); + gBenchmarkProgram.bind(); + for (S32 c = 0; c < samples; ++c) + { + for (U32 i = 0; i < textures_count; ++i) + { + texHolder.bind(i); + buff->setBuffer(); + buff->drawArrays(LLRender::TRIANGLES, 0, 3); + } + } + gBenchmarkProgram.unbind(); + dest[0].flush(); + } + + F32 ms = gBenchmarkProgram.mTimeElapsed / 1000000.f; + seconds = ms / 1000.f; + + F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn; + F64 gpixels_drawn = samples_drawn / 1000000000.0; + F32 samples_sec = (F32)(gpixels_drawn / seconds); + return samples_sec * 4; // 4 bytes per sample +} + //----------------------------------------------------------------------------- // gpu_benchmark() // returns measured memory bandwidth of GPU in gigabytes per second @@ -941,9 +974,6 @@ F32 gpu_benchmark() //number of textures const U32 count = 32; - //number of samples to take - const S32 samples = 64; - //time limit, allocation operations shouldn't take longer then 30 seconds, same for actual benchmark. const F32 time_limit = 30; @@ -1033,33 +1063,15 @@ F32 gpu_benchmark() LLGLSLShader::unbind(); - // run GPU timer benchmark - { - ShaderProfileHelper initProfile; - dest[0].bindTarget("benchmark", 1); - gBenchmarkProgram.bind(); - for (S32 c = 0; c < samples; ++c) - { - for (U32 i = 0; i < count; ++i) - { - texHolder.bind(i); - buff->setBuffer(); - buff->drawArrays(LLRender::TRIANGLES, 0, 3); - } - } - gBenchmarkProgram.unbind(); - dest[0].flush(); - } + // run GPU timer benchmark twice + F32 seconds = 0; + F32 gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds); - F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f; - F32 seconds = ms/1000.f; + LL_INFOS("Benchmark") << "Memory bandwidth, 1st run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; - F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn; - F64 gpixels_drawn = samples_drawn / 1000000000.0; - F32 samples_sec = (F32)(gpixels_drawn/seconds); - F32 gbps = samples_sec*4; // 4 bytes per sample + gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds); - LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; + LL_INFOS("Benchmark") << "Memory bandwidth, final run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL; return gbps; } diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 3e4aadc381..b784419780 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -170,7 +170,7 @@ namespace void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::string& data_in) { - std::istringstream str(data_in); + boost::iostreams::stream<boost::iostreams::array_source> str(data_in.data(), data_in.size()); LLSD data; @@ -723,9 +723,9 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyMaterialCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyMaterialCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp index 02b6751307..4712b5a5e0 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.cpp +++ b/indra/newview/llgltfmaterialpreviewmgr.cpp @@ -464,7 +464,7 @@ bool LLGLTFPreviewTexture::render() // Set up camera and viewport const LLVector3 origin(0.0, 0.0, 0.0); camera.lookAt(origin, object_position); - camera.setAspect((F32)(mFullHeight / mFullWidth)); + camera.setAspect((F32)(mFullWidth / mFullHeight)); const LLRect texture_rect(0, mFullHeight, mFullWidth, 0); camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), false, camera.getNear(), MAX_FAR_CLIP*2.f); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 7659e5f082..074cda1683 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -317,7 +317,7 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL // virtual bool LLGroupList::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - // Why is "new group" sufficient? + // "new group" is sufficient because update_group_floaters always calls that on group changes if (event->desc() == "new group") { setDirty(); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index d53b36e59f..e0da762279 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1975,8 +1975,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string finalUrl = url + "?group_id=" + group_id.asString(); @@ -2004,10 +2004,10 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>(); httpOptions->setFollowRedirects(false); @@ -2141,9 +2141,9 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p << ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL; LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLSD postData = LLSD::emptyMap(); postData["group_id"] = group_id; diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 11f049564a..4327d281e5 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -301,7 +301,7 @@ void LLHUDNameTag::renderText() const S32 label_height = ll_round((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f))); label_top_rect.mBottom = label_top_rect.mTop - label_height; LLColor4 label_top_color = text_color; - label_top_color.mV[VALPHA] = gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor; + label_top_color.mV[VALPHA] = bubble_opacity() * alpha_factor; mRoundedRectTopImgp->draw3D(render_position, x_pixel_vec, y_pixel_vec, label_top_rect, label_top_color); } diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 7cd0171a37..779ed725ac 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -202,9 +202,19 @@ void inventory_offer_handler(LLOfferInfo* info) auto indx = msg.find(" ( http://slurl.com/secondlife/"); if (indx == std::string::npos) { - // try to find new slurl host + // https + indx = msg.find(" ( https://slurl.com/secondlife/"); + } + if (indx == std::string::npos) + { + // try to find new slurl http host indx = msg.find(" ( http://maps.secondlife.com/secondlife/"); } + if (indx == std::string::npos) + { + // try to find new slurl https host + indx = msg.find(" ( https://maps.secondlife.com/secondlife/"); + } if (indx >= 0) { LLStringUtil::truncate(msg, indx); @@ -1551,8 +1561,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestOfflineMessagesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestOfflineMessagesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 67b62433f8..f3cef660f6 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -431,8 +431,8 @@ void startConferenceCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceChatStart", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceChatStart", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; postData["method"] = "start conference"; @@ -480,8 +480,8 @@ void startConferenceCoro(std::string url, void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUUID otherParticipantId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("StartP2PVoiceCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("StartP2PVoiceCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; postData["method"] = "start p2p voice"; @@ -520,8 +520,8 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceInviteStart", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceInviteStart", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; postData["method"] = "accept invitation"; @@ -638,8 +638,8 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from, { // if parameters from, message and timestamp have values, they are a message that opened chat LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ChatHistory", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ChatHistory", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; postData["method"] = "fetch history"; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1ec7ec85c9..5d41cac5e1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -336,7 +336,7 @@ bool LLInvFVBridge::cutToClipboard() const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) { - const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID &marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); const bool cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id); if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) || @@ -1378,7 +1378,7 @@ bool LLInvFVBridge::isInboxFolder() const bool LLInvFVBridge::isMarketplaceListingsFolder() const { - const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID folder_id = gInventory.getMarketplaceListingsUUID(); if (folder_id.isNull()) { @@ -1686,7 +1686,7 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const { std::string error_msg; LLInventoryModel* model = getInventoryModel(); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID &marketplacelistings_id = model->getMarketplaceListingsUUID(); if (marketplacelistings_id.notNull()) { LLViewerInventoryCategory * master_folder = model->getCategory(marketplacelistings_id); @@ -1845,7 +1845,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) { LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); // Note: For a single item, if it's not a copy, then it's a move move_item_to_marketplacelistings(itemp, marketplacelistings_id, ("copy_to_marketplace_listings" == action)); } @@ -1860,7 +1860,14 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) { LLVector3d global_pos; landmark->getGlobalPos(global_pos); - LLLandmarkActions::getSLURLfromPosGlobal(global_pos, ©_slurl_to_clipboard_callback_inv, true); + if (!global_pos.isExactlyZero()) + { + LLLandmarkActions::getSLURLfromPosGlobal(global_pos, ©_slurl_to_clipboard_callback_inv, true); + } + else + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + } } } } @@ -2678,7 +2685,7 @@ bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); const LLUUID from_folder_uuid = inv_cat->getParentUUID(); const bool move_is_into_current_outfit = (mUUID == current_outfit_id); @@ -3316,7 +3323,7 @@ bool move_inv_category_world_to_agent(const LLUUID& object_id, if (drop && accept) { - std::shared_ptr<LLMoveInv> move_inv(new LLMoveInv); + std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>(); move_inv->mObjectID = object_id; move_inv->mCategoryID = category_id; move_inv->mCallback = callback; @@ -3758,7 +3765,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) { LLInventoryCategory * cat = gInventory.getCategory(mUUID); if (!cat) return; - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); move_folder_to_marketplacelistings(cat, marketplacelistings_id, ("move_to_marketplace_listings" != action), (("copy_or_move_to_marketplace_listings" == action))); } else if ("copy_folder_uuid" == action) @@ -4012,7 +4019,7 @@ void LLFolderBridge::pasteFromClipboard() LLInventoryModel* model = getInventoryModel(); if (model && isClipboardPasteable()) { - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID &marketplacelistings_id = model->getMarketplaceListingsUUID(); const bool paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); bool cut_from_marketplacelistings = false; @@ -4074,7 +4081,7 @@ void LLFolderBridge::perform_pasteFromClipboard() if (model && isClipboardPasteable()) { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); @@ -4371,7 +4378,7 @@ void LLFolderBridge::pasteLinkFromClipboard() if(model) { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const bool move_is_into_current_outfit = (mUUID == current_outfit_id); @@ -4471,7 +4478,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); const LLUUID &favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - const LLUUID &marketplace_listings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplace_listings_id = model->getMarketplaceListingsUUID(); const LLUUID &outfits_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); if (outfits_id == mUUID) @@ -5710,7 +5717,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID from_folder_uuid = inv_item->getParentUUID(); @@ -5991,7 +5998,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (accept && drop) { LLUUID item_id = inv_item->getUUID(); - std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv()); + std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>(); move_inv->mObjectID = inv_item->getParentUUID(); two_uuids_t item_pair(mUUID, item_id); move_inv->mMoveList.push_back(item_pair); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index d96adbd1d2..decb2c0528 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -239,7 +239,7 @@ public: const LLUUID& uuid) : LLInvFVBridge(inventory, root, uuid) {} - typedef boost::function<void(std::string& slurl)> slurl_callback_t; + typedef std::function<void(std::string& slurl)> slurl_callback_t; virtual void performAction(LLInventoryModel* model, std::string action); virtual void selectItem(); @@ -833,7 +833,7 @@ void rez_attachment(LLViewerInventoryItem* item, bool move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, bool drop, - std::function<void(S32, void*, const LLMoveInv *)> callback = NULL, + std::function<void(S32, void*, const LLMoveInv *)> callback = nullptr, void* user_data = NULL, LLInventoryFilter* filter = NULL); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index e6b33453d5..7522ea4907 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -405,7 +405,7 @@ void update_all_marketplace_count(const LLUUID& cat_id) void update_all_marketplace_count() { // Get the marketplace root and launch the recursive exploration - const LLUUID marketplace_listings_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplace_listings_uuid = gInventory.getMarketplaceListingsUUID(); if (!marketplace_listings_uuid.isNull()) { update_all_marketplace_count(marketplace_listings_uuid); @@ -1050,11 +1050,7 @@ void open_marketplace_listings() S32 depth_nesting_in_marketplace(LLUUID cur_uuid) { - // Get the marketplace listings root, exit with -1 (i.e. not under the marketplace listings root) if none - // Todo: findCategoryUUIDForType is somewhat expensive with large - // flat root folders yet we use depth_nesting_in_marketplace at - // every turn, find a way to correctly cache this id. - const LLUUID marketplace_listings_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplace_listings_uuid = gInventory.getMarketplaceListingsUUID(); if (marketplace_listings_uuid.isNull()) { return -1; @@ -1758,7 +1754,7 @@ bool sort_alpha(const LLViewerInventoryCategory* cat1, const LLViewerInventoryCa // The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders. // @pending_callbacks - how many callbacks we are waiting for, must be inited before use // @result - true if things validate, false if issues are raised, must be inited before use -typedef boost::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t; +typedef std::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t; void validate_marketplacelistings( LLInventoryCategory* cat, validation_result_callback_t cb_result, @@ -2559,7 +2555,7 @@ bool get_is_favorite(const LLUUID& obj_id) return obj && obj->getIsFavorite(); } - return object->getIsFavorite(); + return object && object->getIsFavorite(); } void set_favorite(const LLUUID& obj_id, bool favorite) @@ -3420,7 +3416,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root if ("delete" == action) { - const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID &marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); bool marketplacelistings_item = false; bool has_worn = false; bool needs_replacement = false; @@ -3601,7 +3597,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root if (action == "wear" || action == "wear_add") { const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - const LLUUID mp_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID mp_id = gInventory.getMarketplaceListingsUUID(); std::copy_if(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids), @@ -4011,7 +4007,7 @@ void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root) // target listing *and* the original listing. So we need to keep track of both. // Note: do not however put the marketplace listings root itself in this list or the whole marketplace data will be rebuilt. sMarketplaceFolders.clear(); - const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.isNull()) { return; diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 77a2a18877..eba67be313 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -151,13 +151,13 @@ class LLMarketplaceValidator: public LLSingleton<LLMarketplaceValidator> LOG_CLASS(LLMarketplaceValidator); public: - typedef boost::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t; - typedef boost::function<void(bool result)> validation_done_callback_t; + typedef std::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t; + typedef std::function<void(bool result)> validation_done_callback_t; void validateMarketplaceListings( const LLUUID &category_id, - validation_done_callback_t cb_done = NULL, - validation_msg_callback_t cb_msg = NULL, + validation_done_callback_t cb_done = nullptr, + validation_msg_callback_t cb_msg = nullptr, bool fix_hierarchy = true, S32 depth = -1); diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index c54af7d9f1..24b0866041 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1726,7 +1726,7 @@ bool is_category_removable(const LLUUID& folder_id, bool check_worn) } } - const LLUUID mp_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID mp_id = gInventory.getMarketplaceListingsUUID(); if (mp_id.notNull() && gInventory.isObjectDescendentOf(folder_id, mp_id)) { return false; @@ -1768,7 +1768,7 @@ void LLInventoryGallery::paste() return; } - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (mSelectedItemIDs.size() == 1 && gInventory.isObjectDescendentOf(*mSelectedItemIDs.begin(), marketplacelistings_id)) { return; @@ -1816,8 +1816,8 @@ void LLInventoryGallery::paste(const LLUUID& dest, const LLUUID& marketplacelistings_id) { LLHandle<LLPanel> handle = getHandle(); - std::function <void(const LLUUID)> on_copy_callback = NULL; - LLPointer<LLInventoryCallback> cb = NULL; + std::function<void(const LLUUID)> on_copy_callback = nullptr; + LLPointer<LLInventoryCallback> cb = nullptr; if (dest == mFolderID) { on_copy_callback = [handle](const LLUUID& inv_item) @@ -2114,7 +2114,7 @@ void LLInventoryGallery::pasteAsLink() } const LLUUID& current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); const LLUUID& my_outifts_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); std::vector<LLUUID> objects; @@ -3333,7 +3333,7 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const bool move_is_into_current_outfit = (folder_id == current_outfit_id); @@ -3582,12 +3582,12 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, if (accept && drop) { - std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv()); + std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>(); move_inv->mObjectID = inv_item->getParentUUID(); std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID()); move_inv->mMoveList.push_back(item_pair); - move_inv->mCallback = NULL; - move_inv->mUserData = NULL; + move_inv->mCallback = nullptr; + move_inv->mUserData = nullptr; if (is_move) { warn_move_inventory(object, move_inv); @@ -3727,7 +3727,7 @@ bool dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = model->getMarketplaceListingsUUID(); //const LLUUID from_folder_uuid = inv_cat->getParentUUID(); const bool move_is_into_current_outfit = (dest_id == current_outfit_id); const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id); diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7f53f9998d..a53637a477 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -44,14 +44,14 @@ class LLGalleryGestureObserver; class LLInventoryGalleryContextMenu; -typedef boost::function<void()> callback_t; +typedef std::function<void()> callback_t; class LLInventoryGallery : public LLPanel, public LLEditMenuHandler { public: typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t; - typedef boost::function<void(const LLUUID&)> selection_change_callback_t; + typedef std::function<void(const LLUUID&)> selection_change_callback_t; typedef std::deque<LLUUID> selection_deque; struct Params diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 6bea648380..ff7cab0ee3 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -340,14 +340,21 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) { LLVector3d global_pos; landmark->getGlobalPos(global_pos); - boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl) + if (!global_pos.isExactlyZero()) { - gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl)); - LLSD args; - args["SLURL"] = slurl; - LLNotificationsUtil::add("CopySLURL", args); - }; - LLLandmarkActions::getSLURLfromPosGlobal(global_pos, copy_slurl_to_clipboard_cb, true); + boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl) + { + gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl)); + LLSD args; + args["SLURL"] = slurl; + LLNotificationsUtil::add("CopySLURL", args); + }; + LLLandmarkActions::getSLURLfromPosGlobal(global_pos, copy_slurl_to_clipboard_cb, true); + } + else + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + } }; LLLandmark* landmark = LLLandmarkActions::getLandmark(mUUIDs.front(), copy_slurl_cb); if (landmark) @@ -364,7 +371,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) } else if ("show_on_map" == action) { - boost::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark) + std::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark) { LLVector3d landmark_global_pos; if (landmark->getGlobalPos(landmark_global_pos)) @@ -402,7 +409,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) if (can_copy) { - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (itemp) { move_item_to_marketplacelistings(itemp, marketplacelistings_id, copy_operation); @@ -421,7 +428,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) // option == 0 Move no copy item(s) // option == 1 Don't move no copy item(s) (leave them behind) bool copy_and_move = option == 0; - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); // main inventory only allows one item? LLViewerInventoryItem* itemp = gInventory.getItem(lamdba_list.front()); @@ -556,7 +563,7 @@ bool can_list_on_marketplace(const LLUUID &id) if (can_list) { std::string error_msg; - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.notNull()) { LLViewerInventoryCategory* master_folder = gInventory.getCategory(marketplacelistings_id); @@ -1058,7 +1065,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men // Marketplace bool can_list = false; - const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.notNull() && !is_inbox && !obj->getIsLinkType()) { if (is_folder) diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 73cc953692..15735ebde3 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -51,6 +51,7 @@ LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p : LLFlatListViewEx(p) , mRefreshState(REFRESH_COMPLETE) , mForceRefresh(false) +, mNeedsArrange(true) { // TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView // but reset to true in all derived classes. This settings might need to @@ -144,6 +145,7 @@ void LLInventoryItemsList::updateSelection() bool LLInventoryItemsList::doIdle() { if (mRefreshState == REFRESH_COMPLETE) return true; // done + LL_PROFILE_ZONE_SCOPED; if (isInVisibleChain() || mForceRefresh || !getFilterSubString().empty()) { @@ -165,7 +167,7 @@ void LLInventoryItemsList::idle(void* user_data) using namespace std::chrono; auto start = steady_clock::now(); - const milliseconds time_limit = milliseconds(3); + const milliseconds time_limit = milliseconds(2); const auto end_time = start + time_limit; S32 max_update_count = 50; @@ -218,8 +220,6 @@ void LLInventoryItemsList::refresh() mRefreshState = REFRESH_LIST_SORT; } - rearrangeItems(); - notifyParentItemsRectChanged(); break; } case REFRESH_LIST_ERASE: @@ -229,10 +229,21 @@ void LLInventoryItemsList::refresh() for (; mRemovedItems.end() != it; ++it) { // don't filter items right away - removeItemByUUID(*it, false); + removeItemByUUID(*it, false /*don't rearrange*/); } mRemovedItems.clear(); - mRefreshState = REFRESH_LIST_SORT; // fix visibility and arrange + mRefreshState = REFRESH_LIST_SORT; // fix visibility + + // Assume that visible items were removed. + if (getVisible()) + { + rearrangeItems(); + notifyParentItemsRectChanged(); + } + else + { + mNeedsArrange = true; + } break; } case REFRESH_LIST_APPEND: @@ -275,18 +286,25 @@ void LLInventoryItemsList::refresh() LLSD action; action.with("match_filter", cur_filter); + bool new_visible_items = false; pairs_const_iterator_t pair_it = panel_list.begin(); for (; pair_it != panel_list.end(); ++pair_it) { item_pair_t* item_pair = *pair_it; if (item_pair->first->getParent() != NULL) { - updateItemVisibility(item_pair->first, action); + new_visible_items |= updateItemVisibility(item_pair->first, action); } } - rearrangeItems(); - notifyParentItemsRectChanged(); + mNeedsArrange |= new_visible_items; + if (mNeedsArrange && getVisible()) + { + // show changes now + rearrangeItems(); + notifyParentItemsRectChanged(); + mNeedsArrange = false; + } if (mAddedItems.size() > 0) { @@ -304,16 +322,33 @@ void LLInventoryItemsList::refresh() { LL_PROFILE_ZONE_NAMED("items_refresh_sort"); // Filter, sort, rearrange and notify parent about shape changes - filterItems(true, true); + if (filterItems(true, true)) + { + mNeedsArrange = false; // just rearranged + } if (mAddedItems.size() == 0) { + if (mNeedsArrange) + { + // Done, last chance to rearrange + rearrangeItems(); + notifyParentItemsRectChanged(); + mNeedsArrange = false; + } // After list building completed, select items that had been requested to select before list was build updateSelection(); mRefreshState = REFRESH_COMPLETE; } else { + if (mNeedsArrange && getVisible()) + { + // show changes now + rearrangeItems(); + notifyParentItemsRectChanged(); + mNeedsArrange = false; + } mRefreshState = REFRESH_LIST_APPEND; } break; @@ -347,6 +382,7 @@ void LLInventoryItemsList::computeDifference( LLPanel* LLInventoryItemsList::createNewItem(LLViewerInventoryItem* item) { + LL_PROFILE_ZONE_SCOPED; if (!item) { LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL; diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index b20c27eec8..f80d6b31b8 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -117,6 +117,7 @@ protected: }; ERefreshStates mRefreshState; + bool mNeedsArrange = true; private: uuid_vec_t mIDs; // IDs of items that were added in refreshList(). diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 5fb5b0f23f..aa6ba6d023 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -41,7 +41,7 @@ #include "llinventorymodel.h" #include "llviewerinventory.h" -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelInventoryListItemBaseParams(&typeid(LLPanelInventoryListItemBase::Params), "inventory_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelInventoryListItemBaseParams(typeid(LLPanelInventoryListItemBase::Params), "inventory_list_item"); constexpr S32 WIDGET_SPACING = 3; constexpr S32 FAVORITE_IMAGE_SIZE = 14; @@ -69,6 +69,7 @@ LLPanelInventoryListItemBase::Params::Params() LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLPanelInventoryListItemBase* list_item = NULL; if (item) { @@ -189,6 +190,7 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) bool LLPanelInventoryListItemBase::postBuild() { + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLViewerInventoryItem* inv_item = getItem(); if (inv_item) { diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 943f41b6a7..a8bc3b361e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -975,6 +975,15 @@ const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::ETyp return findCategoryUUIDForTypeInRoot(preferred_type, gInventory.getLibraryRootFolderID()); } +const LLUUID LLInventoryModel::getMarketplaceListingsUUID() +{ + if (mMarketplaceListingsUUID.isNull()) + { + mMarketplaceListingsUUID = findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + } + return mMarketplaceListingsUUID; +} + // Convenience function to create a new category. You could call // updateCategory() with a newly generated UUID category, but this // version will take care of details like what the name should be @@ -1037,7 +1046,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id, { if (new_category.isNull()) { - if (callback && !callback.empty()) + if (callback) { callback(new_category); } @@ -1064,7 +1073,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id, updateCategory(cat); } - if (callback && !callback.empty()) + if (callback) { callback(new_category); } @@ -1107,9 +1116,9 @@ void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inv { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("createNewCategoryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createNewCategoryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -1692,7 +1701,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32 mask |= LLInventoryObserver::LABEL; } // Under marketplace, category labels are quite complex and need extra upate - const LLUUID marketplace_id = findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplace_id = getMarketplaceListingsUUID(); if (marketplace_id.notNull() && isObjectDescendentOf(cat->getUUID(), marketplace_id)) { mask |= LLInventoryObserver::LABEL; @@ -3257,11 +3266,11 @@ void LLInventoryModel::initHttpRequest() mHttpRequestFG = new LLCore::HttpRequest; mHttpRequestBG = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared<LLCore::HttpOptions>(); mHttpOptions->setTransferTimeout(300); mHttpOptions->setUseRetryAfter(true); // mHttpOptions->setTrace(2); // Do tracing of requests - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_INVENTORY); @@ -3416,6 +3425,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, LLSD inventory; if (!is_cache_obsolete) { + LL_PROFILE_ZONE_NAMED("inventory load from file - llsd parse"); LLPointer<LLSDParser> parser = new LLSDBinaryParser(); if (parser->parse(file, inventory, LLSDSerialize::SIZE_UNLIMITED) == LLSDParser::PARSE_FAILURE) @@ -3427,56 +3437,61 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, if (!is_cache_obsolete) { - const LLSD& llsd_cats = inventory["categories"]; - if (llsd_cats.isArray()) { - LLSD::array_const_iterator iter = llsd_cats.beginArray(); - LLSD::array_const_iterator end = llsd_cats.endArray(); - for (; iter != end; ++iter) + LL_PROFILE_ZONE_NAMED("inventory load from file - categories"); + const LLSD& llsd_cats = inventory["categories"]; + if (llsd_cats.isArray()) { - LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null); - if (inv_cat->importLLSDMap(*iter)) + LLSD::array_const_iterator iter = llsd_cats.beginArray(); + LLSD::array_const_iterator end = llsd_cats.endArray(); + for (; iter != end; ++iter) { - categories.push_back(inv_cat); + LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null); + if (inv_cat->importLLSDMap(*iter)) + { + categories.push_back(inv_cat); + } } } } - const LLSD& llsd_items = inventory["items"]; - if (llsd_items.isArray()) { - LLSD::array_const_iterator iter = llsd_items.beginArray(); - LLSD::array_const_iterator end = llsd_items.endArray(); - for (; iter != end; ++iter) + LL_PROFILE_ZONE_NAMED("inventory load from file - items"); + const LLSD& llsd_items = inventory["items"]; + if (llsd_items.isArray()) { - LLPointer<LLViewerInventoryItem> inv_item = new LLViewerInventoryItem; - if (inv_item->fromLLSD(*iter)) + LLSD::array_const_iterator iter = llsd_items.beginArray(); + LLSD::array_const_iterator end = llsd_items.endArray(); + for (; iter != end; ++iter) { - if (inv_item->getUUID().isNull()) - { - LL_DEBUGS(LOG_INV) << "Ignoring inventory with null item id: " - << inv_item->getName() << LL_ENDL; - } - else + LLPointer<LLViewerInventoryItem> inv_item = new LLViewerInventoryItem; + if (inv_item->fromLLSD(*iter)) { - if (inv_item->getType() == LLAssetType::AT_UNKNOWN) + if (inv_item->getUUID().isNull()) { - cats_to_update.insert(inv_item->getParentUUID()); + LL_DEBUGS(LOG_INV) << "Ignoring inventory with null item id: " << inv_item->getName() << LL_ENDL; } else { - items.push_back(inv_item); + if (inv_item->getType() == LLAssetType::AT_UNKNOWN) + { + cats_to_update.insert(inv_item->getParentUUID()); + } + else + { + items.push_back(inv_item); + } } } - } - // TODO(brad) - figure out how to reenable this without breaking everything else - // static constexpr U64 BATCH_SIZE = 512U; - // if ((++lines_count % BATCH_SIZE) == 0) - // { - // // SL-19968 - make sure message system code gets a chance to run every so often - // pump_idle_startup_network(); - // } + // TODO(brad) - figure out how to reenable this without breaking everything else + // static constexpr U64 BATCH_SIZE = 512U; + // if ((++lines_count % BATCH_SIZE) == 0) + // { + // // SL-19968 - make sure message system code gets a chance to run every so often + // pump_idle_startup_network(); + // } + } } } } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index d28743357e..05ada9121a 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -122,9 +122,8 @@ public: FetchItemHttpHandler(const LLSD & request_sd); virtual ~FetchItemHttpHandler(); - protected: - FetchItemHttpHandler(const FetchItemHttpHandler &); // Not defined - void operator=(const FetchItemHttpHandler &); // Not defined + FetchItemHttpHandler(const FetchItemHttpHandler&) = delete; + FetchItemHttpHandler& operator=(const FetchItemHttpHandler&) = delete; public: virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); @@ -202,13 +201,13 @@ private: // the inventory using several different identifiers. // mInventory member data is the 'master' list of inventory, and // mCategoryMap and mItemMap store uuid->object mappings. - typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; - typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t; + typedef std::unordered_map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t; + typedef std::unordered_map<LLUUID, LLPointer<LLViewerInventoryItem>> item_map_t; cat_map_t mCategoryMap; item_map_t mItemMap; // This last set of indices is used to map parents to children. - typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; - typedef std::map<LLUUID, item_array_t*> parent_item_map_t; + typedef std::unordered_map<LLUUID, cat_array_t*> parent_cat_map_t; + typedef std::unordered_map<LLUUID, item_array_t*> parent_item_map_t; parent_cat_map_t mParentChildCategoryTree; parent_item_map_t mParentChildItemTree; @@ -330,6 +329,8 @@ public: // user specified one or it does not exist, creates default category if it is missing. const LLUUID findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type) const; + const LLUUID getMarketplaceListingsUUID(); + // Get whatever special folder this object is a child of, if any. const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; @@ -362,6 +363,8 @@ public: private: mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups + LLUUID mMarketplaceListingsUUID; + //-------------------------------------------------------------------- // Count //-------------------------------------------------------------------- @@ -489,7 +492,7 @@ public: void createNewCategory(const LLUUID& parent_id, LLFolderType::EType preferred_type, const std::string& name, - inventory_func_type callback = NULL, + inventory_func_type callback = nullptr, const LLUUID& thumbnail_id = LLUUID::null); protected: // Internal methods that add inventory and make sure that all of diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 2cf1554957..82eefb50ac 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -125,9 +125,8 @@ public: LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); } -protected: - BGItemHttpHandler(const BGItemHttpHandler&); // Not defined - void operator=(const BGItemHttpHandler&); // Not defined + BGItemHttpHandler(const BGItemHttpHandler&) = delete; + BGItemHttpHandler& operator=(const BGItemHttpHandler&) = delete; }; @@ -159,8 +158,8 @@ public: } protected: - BGFolderHttpHandler(const BGFolderHttpHandler&); // Not defined - void operator=(const BGFolderHttpHandler&); // Not defined + BGFolderHttpHandler(const BGFolderHttpHandler&) = delete; + BGFolderHttpHandler& operator=(const BGFolderHttpHandler&) = delete; public: virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response); @@ -829,7 +828,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis() // Intent is for marketplace request to happen after // main inventory is done, unless requested by floater mRecursiveMarketplaceFetchStarted = true; - const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID& marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.notNull()) { mFetchFolderQueue.emplace_front(marketplacelistings_id, FT_FOLDER_AND_CONTENT); @@ -886,31 +885,34 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc static LLCachedControl<S32> ais_batch(gSavedSettings, "BatchSizeAIS3", 20); S32 batch_limit = llclamp(ais_batch(), 1, 40); - for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); - it != categories->end(); - ++it) + if (categories) { - LLViewerInventoryCategory* child_cat = (*it); - if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion() - || child_cat->getFetching() >= target_state) + for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); + it != categories->end(); + ++it) { - continue; - } + LLViewerInventoryCategory* child_cat = (*it); + if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion() + || child_cat->getFetching() >= target_state) + { + continue; + } - if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS) - { - // special case, marketplace will fetch that as needed - continue; - } + if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS) + { + // special case, marketplace will fetch that as needed + continue; + } - children.emplace_back(child_cat->getUUID()); - mExpectedFolderIds.emplace_back(child_cat->getUUID()); - child_cat->setFetching(target_state); + children.emplace_back(child_cat->getUUID()); + mExpectedFolderIds.emplace_back(child_cat->getUUID()); + child_cat->setFetching(target_state); - if (children.size() >= batch_limit) - { - content_done = false; - break; + if (children.size() >= batch_limit) + { + content_done = false; + break; + } } } @@ -940,14 +942,17 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc // This will have a bit of overlap with onAISContentCalback, // but something else might have downloaded folders, so verify // every child that is complete has it's children done as well - for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); - it != categories->end(); - ++it) + if (categories) { - LLViewerInventoryCategory* child_cat = (*it); - if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion()) + for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); + it != categories->end(); + ++it) { - mFetchFolderQueue.emplace_back(child_cat->getUUID(), FT_RECURSIVE); + LLViewerInventoryCategory* child_cat = (*it); + if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion()) + { + mFetchFolderQueue.emplace_back(child_cat->getUUID(), FT_RECURSIVE); + } } } } @@ -998,12 +1003,15 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc LLInventoryModel::cat_array_t* categories(NULL); LLInventoryModel::item_array_t* items(NULL); gInventory.getDirectDescendentsOf(cat_id, categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) + if (categories) { - // not emplace_front to not cause an infinite loop - mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + // not emplace_front to not cause an infinite loop + mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE); + } } } } @@ -1208,7 +1216,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() if (! url.empty()) { - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body, recursive_cats); gInventory.requestPost(false, url, folder_request_body, handler, "Inventory Folder"); } } @@ -1219,7 +1227,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() if (! url.empty()) { - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body_lib, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body_lib, recursive_cats); gInventory.requestPost(false, url, folder_request_body_lib, handler, "Library Folder"); } } @@ -1235,7 +1243,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() { LLSD body; body["items"] = item_request_body; - LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body); gInventory.requestPost(false, url, body, handler, "Inventory Item"); } } @@ -1248,7 +1256,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() { LLSD body; body["items"] = item_request_body_lib; - LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body); gInventory.requestPost(false, url, body, handler, "Library Item"); } } @@ -1534,7 +1542,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http { LLSD request_body; request_body["folders"] = folders; - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats); gInventory.requestPost(false, url, request_body, handler, "Inventory Folder"); recursive_cats.clear(); folders.clear(); @@ -1544,7 +1552,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http LLSD request_body; request_body["folders"] = folders; - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats); gInventory.requestPost(false, url, request_body, handler, "Inventory Folder"); return; } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 2e9f69ee29..ef6fa06e9f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -53,7 +53,7 @@ public: void scheduleFolderFetch(const LLUUID& cat_id, bool forced = false); void scheduleItemFetch(const LLUUID& item_id, bool forced = false); - typedef boost::function<void()> nullary_func_t; + typedef std::function<void()> nullary_func_t; // AIS3 only, Fetches folder and everything links inside the folder point to // Intended for outfits void fetchFolderAndLinks(const LLUUID& cat_id, nullary_func_t callback); @@ -78,7 +78,7 @@ public: bool isBulkFetchProcessingComplete() const; void setAllFoldersFetched(); - typedef boost::function<void()> folders_fetched_callback_t; + typedef std::function<void()> folders_fetched_callback_t; boost::signals2::connection setFetchCompletionCallback(folders_fetched_callback_t cb); void addRequestAtFront(const LLUUID& id, bool recursive, bool is_category); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index ac22be9d5a..a50d6b579e 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -249,7 +249,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd) if (!url.empty()) { body[i]["agent_id"] = gAgent.getID(); - LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body[i])); + LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body[i]); gInventory.requestPost(true, url, body[i], handler, (i ? "Library Item" : "Inventory Item")); continue; } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 12d6c44521..99cb9ec811 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -258,7 +258,7 @@ protected: class LLInventoryCategoriesObserver : public LLInventoryObserver { public: - typedef boost::function<void()> callback_t; + typedef std::function<void()> callback_t; LLInventoryCategoriesObserver() {}; virtual void changed(U32 mask); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4b436e894a..039567ea76 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -113,7 +113,7 @@ protected: class LLInvPanelComplObserver : public LLInventoryCompletionObserver { public: - typedef boost::function<void()> callback_t; + typedef std::function<void()> callback_t; LLInvPanelComplObserver(callback_t cb) : mCallback(cb) @@ -628,7 +628,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve // This could be anything. For now, just refresh the item. if (mask & LLInventoryObserver::INTERNAL) { - if (view_item) + if (view_item && view_item->getViewModelItem()) { view_item->refresh(); } @@ -647,7 +647,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve if (mask & LLInventoryObserver::UPDATE_FAVORITE) { - if (view_item) + if (view_item && view_item->getViewModelItem()) { view_item->refresh(); LLFolderViewFolder* parent = view_item->getParentFolder(); @@ -1596,7 +1596,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_foc setSelectionByID(obj_id, take_keyboard_focus); } -void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb) +void LLInventoryPanel::setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb) { if (mFolderRoot.get()) { @@ -1855,6 +1855,7 @@ void LLInventoryPanel::purgeSelectedItems() { if (!mFolderRoot.get()) return; + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; LLSD args; @@ -1864,12 +1865,17 @@ void LLInventoryPanel::purgeSelectedItems() it != end_it; ++it) { + // Selection allows items outside trash folder, only count the ones inside. LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID(); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); - count += items.size() + cats.size(); - selected_items.push_back(item_id); + LLInventoryObject* obj = gInventory.getObject(item_id); + if (obj->getParentUUID() == trash_id) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); + count += items.size() + cats.size(); + selected_items.push_back(item_id); + } } args["COUNT"] = static_cast<S32>(count); LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(callbackPurgeSelectedItems, _1, _2, selected_items)); @@ -2125,8 +2131,7 @@ LLFolderViewItem* LLInventoryPanel::getItemByID(const LLUUID& id) { LL_PROFILE_ZONE_SCOPED; - std::map<LLUUID, LLFolderViewItem*>::iterator map_it; - map_it = mItemMap.find(id); + auto map_it = mItemMap.find(id); if (map_it != mItemMap.end()) { return map_it->second; @@ -2768,7 +2773,7 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot() mFolderRoot.get()->setFollowsAll(); mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox); - if (!mSelectionCallback.empty()) + if (mSelectionCallback != nullptr) { mFolderRoot.get()->setSelectCallback(mSelectionCallback); } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 5a73df54b0..a17817c764 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -37,6 +37,7 @@ #include "llinventorymodel.h" #include "llscrollcontainer.h" #include "lluictrlfactory.h" +#include <functional> #include <set> class LLInvFVBridge; @@ -182,7 +183,7 @@ public: // Call this method to set the selection. void openAllFolders(); void setSelection(const LLUUID& obj_id, bool take_keyboard_focus); - void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb); + void setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb); void clearSelection(); selected_items_t getSelectedItems() const; @@ -300,7 +301,7 @@ protected: LLPointer<LLFolderViewGroupedItemBridge> mGroupedItemBridge; Params mParams; // stored copy of parameter block - std::map<LLUUID, LLFolderViewItem*> mItemMap; + std::unordered_map<LLUUID, LLFolderViewItem*> mItemMap; /** * Pointer to LLInventoryFolderViewModelBuilder. * @@ -375,7 +376,7 @@ protected: virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop); virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge); - boost::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback; + std::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback; // buildViewsTree does not include some checks and is meant // for recursive use, use buildNewViews() for first call @@ -437,7 +438,7 @@ public: std::list<LLUUID> getNavBackwardList() { return mBackwardFolders; } std::list<LLUUID> getNavForwardList() { return mForwardFolders; } - typedef boost::function<void()> root_changed_callback_t; + typedef std::function<void()> root_changed_callback_t; boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb); protected: diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 73425e9f4c..9b90e41549 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -80,6 +80,40 @@ public: } }; +class LLFetchFirstLandmarkByPos : public LLInventoryCollectFunctor +{ +private: + LLVector3d mPos; + bool mFound = false; +public: + LLFetchFirstLandmarkByPos(const LLVector3d& pos) : + mPos(pos), mFound(false) + { + } + + /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (mFound || !item || item->getType() != LLAssetType::AT_LANDMARK) + return false; + + LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID()); + if (!landmark) // the landmark not been loaded yet + return false; + + LLVector3d landmark_global_pos; + if (!landmark->getGlobalPos(landmark_global_pos)) + return false; + //we have to round off each coordinates to compare positions properly + mFound = ll_round(mPos.mdV[VX]) == ll_round(landmark_global_pos.mdV[VX]) + && ll_round(mPos.mdV[VY]) == ll_round(landmark_global_pos.mdV[VY]) + && ll_round(mPos.mdV[VZ]) == ll_round(landmark_global_pos.mdV[VZ]); + return mFound; + } + + // only care about first found landmark, so stop when found + /*virtual*/ bool exceedsLimit() { return mFound; } +}; + class LLFetchLandmarksByName : public LLInventoryCollectFunctor { private: @@ -155,6 +189,9 @@ public: mFounded = LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos); return mFounded; } + + // only care about first found landmark, so stop when found + /*virtual*/ bool exceedsLimit() { return mFounded; } }; static void fetch_landmarks(LLInventoryModel::cat_array_t& cats, @@ -197,23 +234,61 @@ bool LLLandmarkActions::landmarkAlreadyExists() //static bool LLLandmarkActions::hasParcelLandmark() { + static LLUUID sLastItemID; + static S32 sLastFrame = -1; + if (sLastItemID.notNull()) + { + LLInventoryItem* item = gInventory.getItem(sLastItemID); + if (item) + { + LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID()); + if (landmark) + { + LLVector3d landmark_global_pos; + if (landmark->getGlobalPos(landmark_global_pos) + && LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos)) + { + return true; + } + } + } + // Cached landmark does not match current parcel anymore, + // repeat inventory search to find a replacement landmark + // or to make sure there are none. + sLastItemID.setNull(); + sLastFrame = -1; + } + + if (sLastFrame == LLFrameTimer::getFrameCount()) + { + // Ideally this should also check parcel change and landmark additions, + // not just frame change. + // But should be sufficient to check only frame as this is used + // after inventory and parcel operations. + return false; + } + sLastFrame = LLFrameTimer::getFrameCount(); + LLFirstAgentParcelLandmark get_first_agent_landmark; LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; fetch_landmarks(cats, items, get_first_agent_landmark); - return !items.empty(); - + if (!items.empty()) + { + sLastItemID = items[0]->getUUID(); + return true; + } + return false; } -// *TODO: This could be made more efficient by only fetching the FIRST -// landmark that meets the criteria LLViewerInventoryItem* LLLandmarkActions::findLandmarkForGlobalPos(const LLVector3d &pos) { // Determine whether there are landmarks pointing to the current parcel. + // Will stop after first found landmark. LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - LLFetchlLandmarkByPos is_current_pos_landmark(pos); - fetch_landmarks(cats, items, is_current_pos_landmark); + LLFetchFirstLandmarkByPos get_landmark_from_pos(pos); + fetch_landmarks(cats, items, get_landmark_from_pos); if(items.empty()) { @@ -385,12 +460,24 @@ void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItem { LLVector3d global_pos; landmark->getGlobalPos(global_pos); - LLLandmarkActions::getSLURLfromPosGlobal(global_pos,©_slurl_to_clipboard_callback,true); + if (!global_pos.isExactlyZero()) + { + LLLandmarkActions::getSLURLfromPosGlobal(global_pos, ©_slurl_to_clipboard_callback, true); + } + else + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + } } } void copy_slurl_to_clipboard_callback(const std::string& slurl) { + if (slurl.empty()) + { + LLNotificationsUtil::add("LandmarkLocationUnknown"); + return; + } gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl)); LLSD args; args["SLURL"] = slurl; diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index 1abf10e110..0996dfed29 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -39,8 +39,8 @@ class LLLandmark; class LLLandmarkActions { public: - typedef boost::function<void(std::string& slurl)> slurl_callback_t; - typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t; + typedef std::function<void(std::string& slurl)> slurl_callback_t; + typedef std::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t; /** * @brief Fetches landmark LLViewerInventoryItems for the given landmark name. @@ -107,7 +107,7 @@ public: * * @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist or wasn't loaded. */ - static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = NULL); + static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = nullptr); /** * @brief Performs standard action of copying of SLURL from landmark to user's clipboard. diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 3fa0ab99f3..b25a42a938 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -147,29 +147,66 @@ void LLLandmarkList::processGetAssetReply( else { // failed to parse, shouldn't happen + LL_WARNS("Landmarks") << "Failed to parse landmark " << uuid << LL_ENDL; gLandmarkList.eraseCallbacks(uuid); } } else { // got a good status, but no file, shouldn't happen + LL_WARNS("Landmarks") << "Empty buffer for landmark " << uuid << LL_ENDL; gLandmarkList.eraseCallbacks(uuid); } + + // We got this asset, remove it from retry and bad lists. + gLandmarkList.mRetryList.erase(uuid); + gLandmarkList.mBadList.erase(uuid); } else { - // SJB: No use case for a notification here. Use LL_DEBUGS() instead - if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) + if (LL_ERR_NO_CAP == status) + { + // A problem with asset cap, always allow retrying. + // Todo: should this reschedule? + gLandmarkList.mRequestedList.erase(uuid); + gLandmarkList.eraseCallbacks(uuid); + // If there was a previous request, it likely failed due to an obsolete cap + // so clear the retry marker to allow multiple retries. + gLandmarkList.mRetryList.erase(uuid); + return; + } + if (gLandmarkList.mBadList.find(uuid) != gLandmarkList.mBadList.end()) + { + // Already on the 'bad' list, ignore + gLandmarkList.mRequestedList.erase(uuid); + gLandmarkList.eraseCallbacks(uuid); + return; + } + if (LL_ERR_ASSET_REQUEST_FAILED == status + && gLandmarkList.mRetryList.find(uuid) == gLandmarkList.mRetryList.end()) + { + // There is a number of reasons why an asset request can fail, + // like a cap being obsolete due to user teleporting. + // Let viewer rerequest at least once more. + // Todo: should this reshchedule? + gLandmarkList.mRetryList.emplace(uuid); + gLandmarkList.mRequestedList.erase(uuid); + gLandmarkList.eraseCallbacks(uuid); + return; + } + + if (LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status) { - LL_WARNS("Landmarks") << "Missing Landmark" << LL_ENDL; - //LLNotificationsUtil::add("LandmarkMissing"); + LL_WARNS("Landmarks") << "Missing Landmark " << uuid << LL_ENDL; } else { - LL_WARNS("Landmarks") << "Unable to load Landmark" << LL_ENDL; - //LLNotificationsUtil::add("UnableToLoadLandmark"); + LL_WARNS("Landmarks") << "Unable to load Landmark " << uuid + << ". asset status: " << status + << ". Extended status: " << (S64)ext_status << LL_ENDL; } + gLandmarkList.mRetryList.erase(uuid); gLandmarkList.mBadList.insert(uuid); gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests gLandmarkList.eraseCallbacks(uuid); diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index 508148abde..76b5b97211 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -27,7 +27,7 @@ #ifndef LL_LLLANDMARKLIST_H #define LL_LLLANDMARKLIST_H -#include <boost/function.hpp> +#include <functional> #include <map> #include "lllandmark.h" #include "lluuid.h" @@ -40,7 +40,7 @@ class LLInventoryItem; class LLLandmarkList { public: - typedef boost::function<void(LLLandmark*)> loaded_callback_t; + typedef std::function<void(LLLandmark*)> loaded_callback_t; LLLandmarkList() {} ~LLLandmarkList(); @@ -50,7 +50,7 @@ public: //const LLLandmark* getNext() { return mList.getNextData(); } bool assetExists(const LLUUID& asset_uuid); - LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL); + LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = nullptr); static void processGetAssetReply( const LLUUID& uuid, LLAssetType::EType type, @@ -72,6 +72,7 @@ protected: typedef std::set<LLUUID> landmark_uuid_list_t; landmark_uuid_list_t mBadList; + landmark_uuid_list_t mRetryList; typedef std::map<LLUUID,F32> landmark_requested_list_t; landmark_requested_list_t mRequestedList; diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h index 4b515a3b26..cb2ca5260f 100644 --- a/indra/newview/lllistcontextmenu.h +++ b/indra/newview/lllistcontextmenu.h @@ -63,7 +63,7 @@ public: virtual void hide(); protected: - typedef boost::function<void (const LLUUID& id)> functor_t; + typedef std::function<void (const LLUUID& id)> functor_t; virtual LLContextMenu* createMenu() = 0; diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 6e56aac270..1329b1308d 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -596,7 +596,7 @@ void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel) if (object->isSculpted() && object->getVolume() && object->getVolume()->getParams().getSculptID() == old_id) { - LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams* old_params = object->getSculptParams(); LLSculptParams new_params(*old_params); new_params.setSculptTexture(new_id, (*old_params).getSculptType()); object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, true); diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h index ca9b81457c..34cb83367f 100644 --- a/indra/newview/lllocationhistory.h +++ b/indra/newview/lllocationhistory.h @@ -29,10 +29,9 @@ #include "llsingleton.h" // for LLSingleton +#include <functional> #include <vector> #include <string> -#include <map> -#include <boost/function.hpp> #include <boost/signals2.hpp> class LLSD; @@ -115,7 +114,7 @@ public: }; typedef std::vector<LLLocationHistoryItem> location_list_t; - typedef boost::function<void(EChangeType event)> history_changed_callback_t; + typedef std::function<void(EChangeType event)> history_changed_callback_t; typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 41cec4f074..0358233637 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -80,7 +80,7 @@ std::string construct_start_string(); LLLoginInstance::LLLoginInstance() : - mLoginModule(new LLLogin()), + mLoginModule(std::make_unique<LLLogin>()), mNotifications(NULL), mLoginState("offline"), mSaveMFA(true), @@ -277,11 +277,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia mRequestData["params"] = request_params; mRequestData["options"] = requested_options; mRequestData["http_params"] = http_params; -#if LL_RELEASE_FOR_DOWNLOAD - mRequestData["wait_for_updater"] = LLAppViewer::instance()->waitForUpdater(); -#else - mRequestData["wait_for_updater"] = false; -#endif } bool LLLoginInstance::handleLoginEvent(const LLSD& event) @@ -316,13 +311,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) // Login has failed. // Figure out why and respond... LLSD response = event["data"]; - LLSD updater = response["updater"]; - - // Always provide a response to the updater, if in fact the updater - // contacted us, if in fact the ping contains a 'reply' key. Most code - // paths tell it not to proceed with updating. - ResponsePtr resp(std::make_shared<LLEventAPI::Response> - (LLSDMap("update", false), updater)); std::string reason_response = response["reason"].asString(); std::string message_response = response["message"].asString(); @@ -385,26 +373,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } else if(reason_response == "update") { - // This can happen if the user clicked Login quickly, before we heard - // back from the Viewer Version Manager, but login failed because - // login.cgi is insisting on a required update. We were called with an - // event that bundles both the login.cgi 'response' and the - // synchronization event from the 'updater'. + // login.cgi rejected login and requires an update. Since Velopack + // handles updates now, the best we can do here is tell the user + // to download the update manually via the release notes URL. std::string login_version = response["message_args"]["VERSION"]; - std::string vvm_version = updater["VERSION"]; - std::string relnotes = updater["URL"]; LL_WARNS("LLLogin") << "Login failed because an update to version " << login_version << " is required." << LL_ENDL; - // vvm_version might be empty because we might not have gotten - // SLVersionChecker's LoginSync handshake. But if it IS populated, it - // should (!) be the same as the version we got from login.cgi. - if ((! vvm_version.empty()) && vvm_version != login_version) - { - LL_WARNS("LLLogin") << "VVM update version " << vvm_version - << " differs from login version " << login_version - << "; presenting VVM version to match release notes URL" - << LL_ENDL; - login_version = vvm_version; - } + + // Try to use the release notes URL from the VVM query if available, + // otherwise fall back to constructing one from the version. + std::string relnotes = LLVersionInfo::instance().getReleaseNotes(); if (relnotes.empty() || relnotes.find("://") == std::string::npos) { relnotes = LLTrans::getString("RELEASE_NOTES_BASE_URL"); @@ -420,32 +397,11 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) args["VERSION"] = login_version; args["URL"] = relnotes; - if (updater.isUndefined()) - { - // If the updater failed to shake hands, better advise the user to - // download the update him/herself. - LLNotificationsUtil::add( - "RequiredUpdate", - args, - updater, - boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); - } - else - { - // If we've heard from the updater that an update is required, - // then display the prompt that assures the user we'll take care - // of it. This is the one case in which we bind 'resp': - // instead of destroying our Response object (and thus sending a - // negative reply to the updater) as soon as we exit this - // function, bind our shared_ptr so it gets passed into - // syncWithUpdater. That ensures that the response is delayed - // until the user has responded to the notification. - LLNotificationsUtil::add( - "PauseForUpdate", - args, - updater, - boost::bind(&LLLoginInstance::syncWithUpdater, this, resp, _1, _2)); - } + LLNotificationsUtil::add( + "RequiredUpdate", + args, + LLSD(), + boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); } else if(reason_response == "mfa_challenge") { @@ -479,19 +435,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } } -void LLLoginInstance::syncWithUpdater(ResponsePtr resp, const LLSD& notification, const LLSD& response) -{ - LL_INFOS("LLLogin") << "LLLoginInstance::syncWithUpdater" << LL_ENDL; - // 'resp' points to an instance of LLEventAPI::Response that will be - // destroyed as soon as we return and the notification response functor is - // unregistered. Modify it so that it tells the updater to go ahead and - // perform the update. Naturally, if we allowed the user a choice as to - // whether to proceed or not, this assignment would reflect the user's - // selection. - (*resp)["update"] = true; - attemptComplete(); -} - void LLLoginInstance::handleLoginDisallowed(const LLSD& notification, const LLSD& response) { attemptComplete(); diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index 941b378b14..551ad92d33 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -28,9 +28,6 @@ #define LL_LLLOGININSTANCE_H #include "lleventdispatcher.h" -#include "lleventapi.h" -#include <boost/function.hpp> -#include <memory> // std::shared_ptr #include "llsecapi.h" class LLLogin; class LLEventStream; @@ -73,10 +70,7 @@ public: void saveMFAHash(LLSD const& response); private: - typedef std::shared_ptr<LLEventAPI::Response> ResponsePtr; void constructAuthParams(LLPointer<LLCredential> user_credentials); - void updateApp(bool mandatory, const std::string& message); - bool updateDialogCallback(const LLSD& notification, const LLSD& response); bool handleLoginEvent(const LLSD& event); void handleLoginFailure(const LLSD& event); @@ -84,7 +78,6 @@ private: void handleDisconnect(const LLSD& event); void handleIndeterminate(const LLSD& event); void handleLoginDisallowed(const LLSD& notification, const LLSD& response); - void syncWithUpdater(ResponsePtr resp, const LLSD& notification, const LLSD& response); bool handleTOSResponse(bool v, const std::string& key); void showMFAChallange(const std::string& message); diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index 51c38aba3a..0a90cf0699 100644 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -398,6 +398,8 @@ bool getSerialNumber(unsigned char *unique_id, size_t len) S32 LLMachineID::init() { + LL_PROFILE_ZONE_SCOPED; + size_t len = sizeof(static_unique_id); memset(static_unique_id, 0, len); S32 ret_code = 0; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 0888f630e8..9bcfd9e2c0 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -695,24 +695,28 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // handle attachments in local space if (object->isAttachment() && object->mDrawable.notNull()) { - // calculate local version of relative move - LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation(); - objWorldRotation.transQuat(); + LLXform* object_xform_parent = object->mDrawable->mXform.getParent(); + if (object_xform_parent) + { + // calculate local version of relative move + LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation(); + objWorldRotation.transQuat(); - LLVector3 old_position_local = object->getPosition(); - LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); + LLVector3 old_position_local = object->getPosition(); + LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation); - //RN: I forget, but we need to do this because of snapping which doesn't often result - // in position changes even when the mouse moves - object->setPosition(new_position_local); - rebuild(object); - gAgentAvatarp->clampAttachmentPositions(); - new_position_local = object->getPosition(); + //RN: I forget, but we need to do this because of snapping which doesn't often result + // in position changes even when the mouse moves + object->setPosition(new_position_local); + rebuild(object); + gAgentAvatarp->clampAttachmentPositions(); + new_position_local = object->getPosition(); - if (selectNode->mIndividualSelection) - { - // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_local - new_position_local, true); + if (selectNode->mIndividualSelection) + { + // counter-translate child objects if we are moving the root as an individual + object->resetChildrenPosition(old_position_local - new_position_local, true); + } } } else diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 7b8211ded8..30f634f6d4 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -206,10 +206,10 @@ namespace LLMarketplaceImport { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplacePostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplacePostCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(true); @@ -267,17 +267,17 @@ namespace LLMarketplaceImport { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplaceGetCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplaceGetCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(!sMarketplaceCookie.empty()); if (buildHeaders) { - httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); httpHeaders->append(HTTP_OUT_HEADER_COOKIE, sMarketplaceCookie); @@ -783,9 +783,9 @@ void LLMarketplaceData::getMerchantStatusCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); @@ -850,7 +850,7 @@ void LLMarketplaceData::setDataFetchedSignal(const status_updated_signal_t::slot // Get/Post/Put requests to the SLM Server using the SLM API void LLMarketplaceData::getSLMListings() { - const LLUUID marketplaceFolderId = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplaceFolderId = gInventory.getMarketplaceListingsUUID(); setUpdating(marketplaceFolderId, true); LLCoros::instance().launch("getSLMListings", @@ -861,9 +861,9 @@ void LLMarketplaceData::getSLMListingsCoro(LLUUID folderId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSLMListingsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -926,9 +926,9 @@ void LLMarketplaceData::getSingleListingCoro(S32 listingId, LLUUID folderId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSingleListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -997,9 +997,9 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1071,9 +1071,9 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1166,9 +1166,9 @@ void LLMarketplaceData::associateSLMListingCoro(LLUUID folderId, S32 listingId, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("associateSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1247,9 +1247,9 @@ void LLMarketplaceData::deleteSLMListingCoro(S32 listingId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("deleteSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1757,7 +1757,7 @@ bool LLMarketplaceData::isUpdating(const LLUUID& folder_id, S32 depth) } else { - const LLUUID marketplace_listings_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplace_listings_uuid = gInventory.getMarketplaceListingsUUID(); std::set<LLUUID>::iterator it = mPendingUpdateSet.find(marketplace_listings_uuid); if (it != mPendingUpdateSet.end()) { diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 281743c1d6..07ed667b0a 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -28,15 +28,11 @@ #ifndef LL_LLMARKETPLACEFUNCTIONS_H #define LL_LLMARKETPLACEFUNCTIONS_H - -#include <llsd.h> -#include <boost/function.hpp> -#include <boost/signals2.hpp> - +#include "llsd.h" #include "llsingleton.h" #include "llstring.h" - +#include <boost/signals2.hpp> namespace MarketplaceErrorCodes { diff --git a/indra/newview/llmarketplacenotifications.h b/indra/newview/llmarketplacenotifications.h index a602b930de..0b03bde16c 100644 --- a/indra/newview/llmarketplacenotifications.h +++ b/indra/newview/llmarketplacenotifications.h @@ -30,7 +30,7 @@ #include <llsd.h> -#include <boost/function.hpp> +#include <functional> // @@ -48,7 +48,7 @@ namespace LLMarketplaceInventoryNotifications { void update(); - typedef boost::function<void (const LLSD&)> NoCopyCallbackFunction; + typedef std::function<void (const LLSD&)> NoCopyCallbackFunction; void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb); }; diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index cac72bb085..4e14f416e9 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -494,7 +494,7 @@ bool LLMaterialEditor::postBuild() refreshUploadCost(); } - boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData) + std::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData) { const U32 *flag = (const U32*)userData; markChangesUnsaved(*flag); @@ -1987,12 +1987,14 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind { // Prespecified material LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); + me->mUploadFolder = dest_folder; me->loadMaterial(model_in, filename, index); } else if (model_in.materials.size() == 1) { // Only one material, just load it LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); + me->mUploadFolder = dest_folder; me->loadMaterial(model_in, filename, 0); } else @@ -2018,11 +2020,12 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind material_list.push_back(LLTrans::getString("material_batch_import_text")); LLFloaterComboOptions::showUI( - [model_in, filename](const std::string& option, S32 index) + [model_in, filename, dest_folder](const std::string& option, S32 index) { if (index >= 0) // -1 on cancel { LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); + me->mUploadFolder = dest_folder; me->loadMaterial(model_in, filename, index); } }, @@ -2448,7 +2451,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std:: if (index == model_in.materials.size()) { // bulk upload all the things - upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, LLUUID::null); + upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, mUploadFolder); return; } diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index ee5e5b438e..723f834d6f 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -67,7 +67,7 @@ class LLMaterialHttpHandler : public LLHttpSDHandler { public: - typedef boost::function<void(bool, const LLSD&)> CallbackFunction; + typedef std::function<void(bool, const LLSD&)> CallbackFunction; typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t; LLMaterialHttpHandler(const std::string& method, CallbackFunction cback); @@ -137,9 +137,9 @@ LLMaterialMgr::LLMaterialMgr(): { LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest()); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + mHttpRequest = std::make_shared<LLCore::HttpRequest>(); + mHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); + mHttpOptions = std::make_shared<LLCore::HttpOptions>(); mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_MATERIALS); mMaterials.insert(std::pair<LLMaterialID, LLMaterialPtr>(LLMaterialID::null, LLMaterialPtr(NULL))); @@ -684,9 +684,9 @@ void LLMaterialMgr::processGetQueue() LLSD postData = LLSD::emptyMap(); postData[MATERIALS_CAP_ZIP_FIELD] = materialBinary; - LLCore::HttpHandler::ptr_t handler(new LLMaterialHttpHandler("POST", + LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("POST", boost::bind(&LLMaterialMgr::onGetResponse, this, _1, _2, region_id) - )); + ); LL_DEBUGS("Materials") << "POSTing to region '" << regionp->getName() << "' at '" << capURL << " for " << materialsData.size() << " materials." << "\ndata: " << ll_pretty_print_sd(materialsData) << LL_ENDL; @@ -864,9 +864,9 @@ void LLMaterialMgr::processGetAllQueueCoro(LLUUID regionId) LL_DEBUGS("Materials") << "GET all for region " << regionId << "url " << capURL << LL_ENDL; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, capURL); @@ -973,9 +973,9 @@ void LLMaterialMgr::processPutQueue() LL_DEBUGS("Materials") << "put for " << itRequest->second.size() << " faces to region " << itRequest->first->getName() << LL_ENDL; - LLCore::HttpHandler::ptr_t handler (new LLMaterialHttpHandler("PUT", + LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("PUT", boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2) - )); + ); LLCore::HttpHandle handle = LLCoreHttpUtil::requestPutWithLLSD( mHttpRequest, mHttpPolicy, capURL, diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h index 1279b77ad4..c04f874923 100644 --- a/indra/newview/llmaterialmgr.h +++ b/indra/newview/llmaterialmgr.h @@ -33,9 +33,42 @@ #include "httprequest.h" #include "httpheaders.h" #include "httpoptions.h" +#include <boost/container_hash/hash.hpp> class LLViewerRegion; +// struct for TE-specific material ID query +class TEMaterialPair +{ +public: + U32 te; + LLMaterialID materialID; + + bool operator==(const TEMaterialPair& b) const { return (materialID == b.materialID) && (te == b.te); } +}; + +inline bool operator<(const TEMaterialPair& lhs, const TEMaterialPair& rhs) +{ + return (lhs.te < rhs.te) ? true : (lhs.materialID < rhs.materialID); +} + +// std::hash implementation for TEMaterialPair +namespace std +{ + template<> + struct hash<TEMaterialPair> + { + inline size_t operator()(const TEMaterialPair& p) const noexcept + { + // Utilize boost::hash_combine to generate a good hash + size_t seed = 0; + boost::hash_combine(seed, p.te + 1); + boost::hash_combine(seed, p.materialID); + return seed; + } + }; +} // namespace std + class LLMaterialMgr : public LLSingleton<LLMaterialMgr> { LLSINGLETON(LLMaterialMgr); @@ -83,29 +116,6 @@ private: void onRegionRemoved(LLViewerRegion* regionp); private: - // struct for TE-specific material ID query - class TEMaterialPair - { - public: - - U32 te; - LLMaterialID materialID; - - bool operator==(const TEMaterialPair& b) const { return (materialID == b.materialID) && (te == b.te); } - }; - - // definitions follow class - friend std::hash<TEMaterialPair>; - friend size_t hash_value(const TEMaterialPair&) noexcept; - - friend inline bool operator<( - const LLMaterialMgr::TEMaterialPair& lhs, - const LLMaterialMgr::TEMaterialPair& rhs) - { - return (lhs.te < rhs.te) ? true : - (lhs.materialID < rhs.materialID); - } - typedef std::set<LLMaterialID> material_queue_t; typedef std::map<LLUUID, material_queue_t> get_queue_t; typedef std::pair<const LLUUID, LLMaterialID> pending_material_t; @@ -113,7 +123,7 @@ private: typedef std::map<LLMaterialID, get_callback_t*> get_callback_map_t; - typedef boost::unordered_map<TEMaterialPair, get_callback_te_t*> get_callback_te_map_t; + typedef std::unordered_map<TEMaterialPair, get_callback_te_t*> get_callback_te_map_t; typedef std::set<LLUUID> getall_queue_t; typedef std::map<LLUUID, F64> getall_pending_map_t; typedef std::map<LLUUID, getall_callback_t*> getall_callback_map_t; @@ -142,23 +152,5 @@ private: U32 getMaxEntries(const LLViewerRegion* regionp); }; -// std::hash implementation for TEMaterialPair -namespace std -{ - template<> struct hash<LLMaterialMgr::TEMaterialPair> - { - inline size_t operator()(const LLMaterialMgr::TEMaterialPair& p) const noexcept - { - return size_t((p.te + 1) * p.materialID.getDigest64()); - } - }; -} - -// For use with boost containers. -inline size_t hash_value(const LLMaterialMgr::TEMaterialPair& p) noexcept -{ - return size_t((p.te + 1) * p.materialID.getDigest64()); -} - #endif // LL_LLMATERIALMGR_H diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 83a6e66019..50236587ac 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -172,9 +172,9 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay, F32 retry_timer_dela mMaxSortedQueueSize(max_sorted_queue_size), mMaxRoundRobinQueueSize(max_round_robin_queue_size), mQueueTimerIsRunning(false), - mHttpRequest(new LLCore::HttpRequest()), - mHttpHeaders(new LLCore::HttpHeaders()), - mHttpOpts(new LLCore::HttpOptions()), + mHttpRequest(std::make_shared<LLCore::HttpRequest>()), + mHttpHeaders(std::make_shared<LLCore::HttpHeaders>()), + mHttpOpts(std::make_shared<LLCore::HttpOptions>()), mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID) { // *TODO: Look up real Policy ID @@ -660,7 +660,7 @@ void LLMediaDataClient::Handler::onFailure(LLCore::HttpResponse * response, LLCo void LLObjectMediaDataClient::fetchMedia(LLMediaDataClientObject *object) { // Create a get request and put it in the queue. - enqueue(Request::ptr_t(new RequestGet(object, this))); + enqueue(std::make_shared<RequestGet>(object, this)); } const char *LLObjectMediaDataClient::getCapabilityName() const @@ -880,14 +880,14 @@ LLSD LLObjectMediaDataClient::RequestGet::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestGet::createHandler() { - return LLCore::HttpHandler::ptr_t(new LLObjectMediaDataClient::Handler(shared_from_this())); + return std::make_shared<LLObjectMediaDataClient::Handler>(shared_from_this()); } void LLObjectMediaDataClient::updateMedia(LLMediaDataClientObject *object) { // Create an update request and put it in the queue. - enqueue(Request::ptr_t(new RequestUpdate(object, this))); + enqueue(std::make_shared<RequestUpdate>(object, this)); } LLObjectMediaDataClient::RequestUpdate::RequestUpdate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc): @@ -917,7 +917,7 @@ LLSD LLObjectMediaDataClient::RequestUpdate::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestUpdate::createHandler() { // This just uses the base class's responder. - return LLCore::HttpHandler::ptr_t(new LLMediaDataClient::Handler(shared_from_this())); + return std::make_shared<LLMediaDataClient::Handler>(shared_from_this()); } void LLObjectMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content) @@ -1037,7 +1037,7 @@ void LLObjectMediaNavigateClient::navigate(LLMediaDataClientObject *object, U8 t // LL_INFOS("LLMediaDataClient") << "navigate() initiated: " << ll_print_sd(sd_payload) << LL_ENDL; // Create a get request and put it in the queue. - enqueue(Request::ptr_t(new RequestNavigate(object, this, texture_index, url))); + enqueue(std::make_shared<RequestNavigate>(object, this, texture_index, url)); } LLObjectMediaNavigateClient::RequestNavigate::RequestNavigate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc, U8 texture_index, const std::string &url): @@ -1058,7 +1058,7 @@ LLSD LLObjectMediaNavigateClient::RequestNavigate::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaNavigateClient::RequestNavigate::createHandler() { - return LLCore::HttpHandler::ptr_t(new LLObjectMediaNavigateClient::Handler(shared_from_this())); + return std::make_shared<LLObjectMediaNavigateClient::Handler>(shared_from_this()); } void LLObjectMediaNavigateClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 413f02b723..fb6ecedcbf 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -654,12 +654,10 @@ public: mRequestedBytes(requested_bytes) {} - virtual ~LLMeshHandlerBase() - {} + virtual ~LLMeshHandlerBase() = default; -protected: - LLMeshHandlerBase(const LLMeshHandlerBase &); // Not defined - void operator=(const LLMeshHandlerBase &); // Not defined + LLMeshHandlerBase(const LLMeshHandlerBase &) = delete; + LLMeshHandlerBase& operator=(const LLMeshHandlerBase&) = delete; public: virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); @@ -693,9 +691,8 @@ public: } virtual ~LLMeshHeaderHandler(); -protected: - LLMeshHeaderHandler(const LLMeshHeaderHandler &); // Not defined - void operator=(const LLMeshHeaderHandler &); // Not defined + LLMeshHeaderHandler(const LLMeshHeaderHandler&) = delete; + LLMeshHeaderHandler& operator=(const LLMeshHeaderHandler&) = delete; public: virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size); @@ -719,9 +716,8 @@ public: } virtual ~LLMeshLODHandler(); -protected: - LLMeshLODHandler(const LLMeshLODHandler &); // Not defined - void operator=(const LLMeshLODHandler &); // Not defined + LLMeshLODHandler(const LLMeshLODHandler&) = delete; + LLMeshLODHandler& operator=(const LLMeshLODHandler&) = delete; public: virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size); @@ -750,9 +746,8 @@ public: } virtual ~LLMeshSkinInfoHandler(); -protected: - LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler &); // Not defined - void operator=(const LLMeshSkinInfoHandler &); // Not defined + LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler&) = delete; + LLMeshSkinInfoHandler& operator=(const LLMeshSkinInfoHandler&) = delete; void processSkin(U8* data, S32 data_size); @@ -778,9 +773,8 @@ public: {} virtual ~LLMeshDecompositionHandler(); -protected: - LLMeshDecompositionHandler(const LLMeshDecompositionHandler &); // Not defined - void operator=(const LLMeshDecompositionHandler &); // Not defined + LLMeshDecompositionHandler(const LLMeshDecompositionHandler&) = delete; + LLMeshDecompositionHandler& operator=(const LLMeshDecompositionHandler&) = delete; public: virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size); @@ -804,9 +798,8 @@ public: {} virtual ~LLMeshPhysicsShapeHandler(); -protected: - LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler &); // Not defined - void operator=(const LLMeshPhysicsShapeHandler &); // Not defined + LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler&) = delete; + LLMeshPhysicsShapeHandler& operator=(const LLMeshPhysicsShapeHandler&) = delete; public: virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size); @@ -943,20 +936,20 @@ LLMeshRepoThread::LLMeshRepoThread() mSkinMapMutex = new LLMutex(); mSignal = new LLCondition(); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared<LLCore::HttpOptions>(); mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT); mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); - mHttpLargeOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpLargeOptions = std::make_shared<LLCore::HttpOptions>(); mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT); mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_VND_LL_MESH); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH2); mHttpLargePolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_LARGE_MESH); // Lod processing is expensive due to the number of requests // and a need to do expensive cacheOptimize(). - mMeshThreadPool.reset(new LL::ThreadPool("MeshLodProcessing", 2)); + mMeshThreadPool = std::make_unique<LL::ThreadPool>("MeshLodProcessing", 2); mMeshThreadPool->start(); } @@ -1653,7 +1646,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshSkinInfoHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshSkinInfoHandler>(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1761,7 +1754,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshDecompositionHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshDecompositionHandler>(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1860,7 +1853,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshPhysicsShapeHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshPhysicsShapeHandler>(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1988,7 +1981,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params) //within the first 4KB //NOTE -- this will break of headers ever exceed 4KB - LLMeshHandlerBase::ptr_t handler(new LLMeshHeaderHandler(mesh_params, 0, MESH_HEADER_SIZE)); + LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshHeaderHandler>(mesh_params, 0, MESH_HEADER_SIZE); LLCore::HttpHandle handle = getByteRange(http_url, 0, MESH_HEADER_SIZE, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -2164,7 +2157,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod) { LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL; - LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshLODHandler>(mesh_params, lod, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -2611,11 +2604,11 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list_t& data mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut"); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared<LLCore::HttpOptions>(); mHttpOptions->setTransferTimeout(mMeshUploadTimeOut); mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS); } @@ -2854,8 +2847,44 @@ void LLMeshUploadThread::packModelIntance( texture_index.find(texture) == texture_index.end()) { texture_index[texture] = texture_num; - std::string str = texture_str.str(); - res["texture_list"][texture_num] = LLSD::Binary(str.begin(), str.end()); + if (include_textures) + { + std::string str = texture_str.str(); + res["texture_list"][texture_num] = LLSD::Binary(str.begin(), str.end()); + } + else + { // When not including the whole texture, we need to send some metadata about the image + // to ensure accurate price estimation. If not included, the server will assume all + // textures are 1024 x 1024, which could lead to a low estimate. + LLSD info = LLSD::emptyMap(); + + S32 texture_width = 0; + S32 texture_height = 0; + if (texture->hasSavedRawImage()) + { + LLImageDataLock lock(texture->getSavedRawImage()); + + LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage()); + + if (!upload_file.isNull() && upload_file->getDataSize() && !upload_file->isBufferInvalid()) + { + texture_width = upload_file->getWidth(); + texture_height = upload_file->getHeight(); + } + } + + if ((texture_width <= 0) || (texture_height <= 0)) + { + // Fall back to the texture's stored dimensions if we can't get dimensions from the raw image. + texture_width = texture->getFullWidth(); + texture_height = texture->getFullHeight(); + } + + info["width"] = texture_width; + info["height"] = texture_height; + res["texture_info"][texture_num] = info; + res["texture_list"][texture_num] = LLSD::Binary(); // empty binary to indicate texture is not included, for older server compatibility + } // store indexes for error handling; texture_list_dest.push_back(material.mDiffuseMapFilename); texture_num++; @@ -2888,8 +2917,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, std::vector<std::string>& LLSD res; if (mDestinationFolderId.isNull()) { - result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); - result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); + result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); } else { @@ -3338,6 +3367,8 @@ void LLMeshRepoThread::notifyLoadedMeshes() loaded_queue.swap(mLoadedQ); mLoadedMutex->unlock(); + LL_PROFILE_ZONE_NAMED("notify loaded meshes"); + update_metrics = true; // Process the elements free of the lock @@ -3369,6 +3400,8 @@ void LLMeshRepoThread::notifyLoadedMeshes() unavil_queue.swap(mUnavailableQ); mLoadedMutex->unlock(); + LL_PROFILE_ZONE_NAMED("notify unavail meshes"); + update_metrics = true; // Process the elements free of the lock @@ -3387,6 +3420,7 @@ void LLMeshRepoThread::notifyLoadedMeshes() { if (mLoadedMutex->trylock()) { + LL_PROFILE_ZONE_NAMED("notify misc meshes"); std::deque<LLPointer<LLMeshSkinInfo>> skin_info_q; std::deque<UUIDBasedRequest> skin_info_unavail_q; std::list<LLModel::Decomposition*> decomp_q; @@ -4278,20 +4312,63 @@ S32 LLMeshRepository::update() return static_cast<S32>(size); } -void LLMeshRepository::unregisterMesh(LLVOVolume* vobj) +void LLMeshRepository::unregisterMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail) { - for (auto& lod : mLoadingMeshes) + LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; + + llassert((mesh_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH); + llassert(mesh_params.getSculptID().notNull()); + auto& lod = mLoadingMeshes[detail]; + auto param_iter = lod.find(mesh_params.getSculptID()); + if (param_iter != lod.end()) + { + param_iter->second.mVolumes.erase(vobj); + llassert(!param_iter->second.mVolumes.contains(vobj)); + if (param_iter->second.mVolumes.empty()) + { + lod.erase(param_iter); + } + } +} + +void LLMeshRepository::unregisterSkinInfo(const LLUUID& mesh_id, LLVOVolume* vobj) +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; + + llassert(mesh_id.notNull()); + auto skin_pair_iter = mLoadingSkins.find(mesh_id); + if (skin_pair_iter != mLoadingSkins.end()) { - for (auto& param : lod) + skin_pair_iter->second.mVolumes.erase(vobj); + llassert(!skin_pair_iter->second.mVolumes.contains(vobj)); + if (skin_pair_iter->second.mVolumes.empty()) { - vector_replace_with_last(param.second.mVolumes, vobj); + mLoadingSkins.erase(skin_pair_iter); } } +} - for (auto& skin_pair : mLoadingSkins) +// Lots of dead objects make expensive calls to +// LLMeshRepository::unregisterMesh which may delay shutdown. Avoid this by +// preemptively unregistering all meshes. +// We can also do this safely if all objects are confirmed dead for some other +// reason. +void LLMeshRepository::unregisterAllMeshes() +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; + + // The size of mLoadingMeshes and mLoadingSkins may be large and thus + // expensive to iterate over in LLVOVolume::~LLVOVolume. + // This is unnecessary during shutdown, so we ignore the referenced objects in the + // least expensive way which is still safe: by clearing these containers. + // Clear now and not in LLMeshRepository::shutdown because + // LLMeshRepository::notifyLoadedMeshes could (depending on invocation + // order) reference a pointer to an object after it has been deleted. + for (auto& lod : mLoadingMeshes) { - vector_replace_with_last(skin_pair.second.mVolumes, vobj); + lod.clear(); } + mLoadingSkins.clear(); } S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 new_lod, S32 last_lod) @@ -4313,7 +4390,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para mesh_load_map::iterator iter = mLoadingMeshes[new_lod].find(mesh_id); if (iter != mLoadingMeshes[new_lod].end()) { //request pending for this mesh, append volume id to list - auto it = std::find(iter->second.mVolumes.begin(), iter->second.mVolumes.end(), vobj); + auto it = iter->second.mVolumes.find(vobj); if (it == iter->second.mVolumes.end()) { iter->second.addVolume(vobj); } @@ -4321,7 +4398,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para else { //first request for this mesh - std::shared_ptr<PendingRequestBase> request(new PendingRequestLOD(mesh_params, new_lod)); + std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestLOD>(mesh_params, new_lod); mPendingRequests.emplace_back(request); mLoadingMeshes[new_lod][mesh_id].initData(vobj, request); LLMeshRepository::sLODPending++; @@ -4811,7 +4888,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOV skin_load_map::iterator iter = mLoadingSkins.find(mesh_id); if (iter != mLoadingSkins.end()) { //request pending for this mesh, append volume id to list - auto it = std::find(iter->second.mVolumes.begin(), iter->second.mVolumes.end(), requesting_obj); + auto it = iter->second.mVolumes.find(requesting_obj); if (it == iter->second.mVolumes.end()) { iter->second.addVolume(requesting_obj); } @@ -4819,7 +4896,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOV else { //first request for this mesh - std::shared_ptr<PendingRequestBase> request(new PendingRequestUUID(mesh_id, MESH_REQUEST_SKIN)); + std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestUUID>(mesh_id, MESH_REQUEST_SKIN); mLoadingSkins[mesh_id].initData(requesting_obj, request); mPendingRequests.emplace_back(request); } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 01b51e753e..061b4b5428 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -290,7 +290,7 @@ private: class MeshLoadData { public: - MeshLoadData() {} + MeshLoadData() = default; ~MeshLoadData() { if (std::shared_ptr<PendingRequestBase> request = mRequest.lock()) @@ -300,19 +300,19 @@ public: } void initData(LLVOVolume* vol, std::shared_ptr<PendingRequestBase>& request) { - mVolumes.push_back(vol); + mVolumes.insert(vol); request->trackData(this); mRequest = request; } void addVolume(LLVOVolume* vol) { - mVolumes.push_back(vol); + mVolumes.insert(vol); if (std::shared_ptr<PendingRequestBase> request = mRequest.lock()) { request->setScoreDirty(); } } - std::vector<LLVOVolume*> mVolumes; + std::unordered_set<LLVOVolume*> mVolumes; private: std::weak_ptr<PendingRequestBase> mRequest; }; @@ -442,7 +442,7 @@ public: LLCondition* mSignal; //map of known mesh headers - typedef boost::unordered_map<LLUUID, LLMeshHeader> mesh_header_map; // pair is header_size and data + typedef std::unordered_map<LLUUID, LLMeshHeader> mesh_header_map; // pair is header_size and data mesh_header_map mMeshHeader; class HeaderRequest : public RequestStats @@ -862,10 +862,12 @@ public: LLMeshRepository(); void init(); + void unregisterAllMeshes(); void shutdown(); S32 update(); - void unregisterMesh(LLVOVolume* volume); + void unregisterMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail); + void unregisterSkinInfo(const LLUUID& mesh_id, LLVOVolume* vobj); //mesh management functions S32 loadMesh(LLVOVolume* volume, const LLVolumeParams& mesh_params, S32 new_lod = 0, S32 last_lod = -1); diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 6a7c25ec0f..d3f28b3c18 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3461,7 +3461,7 @@ bool LLModelPreview::render() LLViewerCamera::getInstance()->setAspect(aspect); - LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); + LLViewerCamera::getInstance()->setViewNoBroadcast(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); LLVector3 offset = mCameraOffset; LLVector3 target_pos = mPreviewTarget + offset; diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index f6d635f51f..b7bba02b9d 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -190,7 +190,7 @@ LLMuteList::~LLMuteList() void LLMuteList::cleanupSingleton() { - LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL); + LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(nullptr); } bool LLMuteList::isLinden(const std::string& name) @@ -582,6 +582,8 @@ std::vector<LLMute> LLMuteList::getMutes() const //----------------------------------------------------------------------------- bool LLMuteList::loadFromFile(const std::string& filename) { + LL_PROFILE_ZONE_SCOPED; + if(!filename.size()) { LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL; @@ -803,6 +805,10 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**) std::string unclean_filename; msg->getStringFast(_PREHASH_MuteData, _PREHASH_Filename, unclean_filename); std::string filename = LLDir::getScrubbedFileName(unclean_filename); + if (filename.empty()) + { + LL_WARNS() << "Received empty mute list filename." << LL_ENDL; + } LLMuteList* mute_list = getInstance(); mute_list->mLoadState = ML_REQUESTED; @@ -835,16 +841,16 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**) void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status) { - LL_INFOS() << "LLMuteList::processMuteListFile()" << LL_ENDL; - std::string* local_filename_and_path = (std::string*)user_data; if(local_filename_and_path && !local_filename_and_path->empty() && (error_code == 0)) { + LL_INFOS() << "Received mute list from server" << LL_ENDL; LLMuteList::getInstance()->loadFromFile(*local_filename_and_path); LLFile::remove(*local_filename_and_path); } else { + LL_INFOS() << "LLMuteList xfer failed with code " << error_code << LL_ENDL; LLMuteList::getInstance()->mLoadState = ML_FAILED; } delete local_filename_and_path; @@ -962,6 +968,8 @@ bool LLRenderMuteList::saveToFile() bool LLRenderMuteList::loadFromFile() { + LL_PROFILE_ZONE_SCOPED; + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "render_mute_settings.txt"); LLFILE* fp = LLFile::fopen(filename, "rb"); if (!fp) diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index dde85f4d29..ffff21c95c 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -210,12 +210,12 @@ private: boost::signals2::signal<void(const LLUUID &)> mIconClickedSignal; public: - boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback) + boost::signals2::connection setOnNameListCompleteCallback(std::function<void(bool)> onNameListCompleteCallback) { return mNameListCompleteSignal.connect(onNameListCompleteCallback); } - boost::signals2::connection setIconClickedCallback(boost::function<void(const LLUUID &)> cb) + boost::signals2::connection setIconClickedCallback(std::function<void(const LLUUID&)> cb) { return mIconClickedSignal.connect(cb); } diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index dfead5ee8a..9a0612e9f9 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -712,7 +712,14 @@ void LLNavigationBar::resizeLayoutPanel() } void LLNavigationBar::invokeSearch(std::string search_text) { - LLFloaterReg::showInstance("search", LLSD().with("category", "standard").with("query", LLSD(search_text))); + LLSD key; + key["category"] = "standard"; + key["query"] = search_text; + LLSD collections = LLSD::emptyArray(); + collections.append("destinations"); + collections.append("places"); + key["collections"] = collections; + LLFloaterReg::showInstance("search", key); } void LLNavigationBar::clearHistoryCache() diff --git a/indra/newview/llnearbyvoicemoderation.cpp b/indra/newview/llnearbyvoicemoderation.cpp new file mode 100644 index 0000000000..a5ee0e9423 --- /dev/null +++ b/indra/newview/llnearbyvoicemoderation.cpp @@ -0,0 +1,220 @@ +/** + * @file llnearbyvoicemoderation.cpp + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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 "llagent.h" +#include "llnotificationsutil.h" +#include "llviewerregion.h" +#include "llvoavatar.h" +#include "llvoicechannel.h" +#include "llvoiceclient.h" +#include "llviewerobjectlist.h" +#include "llviewerparcelmgr.h" +#include "roles_constants.h" + +#include "llnearbyvoicemoderation.h" + +LLNearbyVoiceModeration::LLNearbyVoiceModeration() +{ +} + +LLNearbyVoiceModeration::~LLNearbyVoiceModeration() +{ +} + +LLVOAvatar* LLNearbyVoiceModeration::getVOAvatarFromId(const LLUUID& agent_id) +{ + LLViewerObject *obj = gObjectList.findObject(agent_id); + while (obj && obj->isAttachment()) + { + obj = (LLViewerObject*)obj->getParent(); + } + + if (obj && obj->isAvatar()) + { + return (LLVOAvatar*)obj; + } + else + { + return NULL; + } +} + +const std::string LLNearbyVoiceModeration::getCapUrlFromRegion(LLViewerRegion* region) +{ + if (! region || ! region->capabilitiesReceived()) + { + return std::string(); + } + + std::string url = region->getCapability("SpatialVoiceModerationRequest"); + if (url.empty()) + { + LL_INFOS() << "Capability URL for region " << region->getName() << " is empty" << LL_ENDL; + return std::string(); + } + LL_INFOS() << "Capability URL for region " << region->getName() << " is " << url << LL_ENDL; + + return url; +} + +void LLNearbyVoiceModeration::requestMuteIndividual(const LLUUID& agent_id, bool mute) +{ + LLVOAvatar* avatar = getVOAvatarFromId(agent_id); + if (avatar) + { + const std::string cap_url = getCapUrlFromRegion(avatar->getRegion()); + if (cap_url.length()) + { + const std::string operand = mute ? "mute" : "unmute"; + + LLSD body; + body["operand"] = operand; + body["agent_id"] = agent_id; + + const std::string agent_name = avatar->getFullname(); + LL_INFOS() << "Resident " << agent_name + << " (" << agent_id << ")" << " applying " << operand << LL_ENDL; + + std::string success_msg = + STRINGIZE("Resident " << agent_name + << " (" << agent_id << ")" << " nearby voice was set to " << operand); + + std::string failure_msg = + STRINGIZE("Unable to change voice muting for resident " + << agent_name << " (" << agent_id << ")"); + + LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost( + cap_url, + body, + success_msg, + failure_msg); + } + } +} + +void LLNearbyVoiceModeration::requestMuteAll(bool mute) +{ + // Use our own avatar to get the region name + LLViewerRegion* region = gAgent.getRegion(); + + const std::string cap_url = getCapUrlFromRegion(region); + if (cap_url.length()) + { + const std::string operand = mute ? "mute_all" : "unmute_all"; + + LLSD body; + body["operand"] = operand; + + LL_INFOS() << "For all residents in this region, applying: " << operand << LL_ENDL; + + std::string success_msg = + STRINGIZE("Nearby voice for all residents was set to: " << operand); + + std::string failure_msg = + STRINGIZE("Unable to set nearby voice for all residents to: " << operand); + + LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost( + cap_url, + body, + success_msg, + failure_msg); + } +} + +void LLNearbyVoiceModeration::setMutedInfo(const std::string& channelID, bool mute) +{ + auto it = mChannelMuteMap.find(channelID); + if (it == mChannelMuteMap.end()) + { + if (mute) + { + // Channel is new and being muted + showMutedNotification(true); + } + mChannelMuteMap[channelID] = mute; + } + else + { + if (it->second != mute) + { + // Flag changed + showMutedNotification(mute); + it->second = mute; + } + } + if (mute && LLVoiceClient::getInstance()->getUserPTTState()) + { + LLVoiceClient::getInstance()->setUserPTTState(false); + } +} + +bool LLNearbyVoiceModeration::showNotificationIfNeeded() +{ + if (LLVoiceClient::getInstance()->inProximalChannel() && + LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID)) + { + return showMutedNotification(true); + } + return false; +} + +bool LLNearbyVoiceModeration::showMutedNotification(bool is_muted) +{ + // Check if the current voice channel is nearby chat + if (LLVoiceClient::getInstance()->inProximalChannel()) + { + LLNotificationsUtil::add(is_muted ? "NearbyVoiceMutedByModerator" : "NearbyVoiceUnmutedByModerator"); + return true; + } + return false; +} + +bool LLNearbyVoiceModeration::isNearbyChatModerator() +{ + // Region doesn't support WebRTC voice + if (!gAgent.getRegion() || !gAgent.getRegion()->isRegionWebRTCEnabled()) + { + return false; + } + + // Only show moderator options when connected to spatial voice chat + LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (!channel || channel->getSessionID().notNull() || !LLAgent::isActionAllowed("speak")) + { + return false; + } + + if (LLViewerParcelMgr::getInstance()->isVoiceRestricted()) + { + // Only the parcel owner should have access to moderate parcel voice space + return LLViewerParcelMgr::getInstance()->allowVoiceModeration(); + } + else + { + return gAgent.canManageEstate(); + } +} diff --git a/indra/newview/llnearbyvoicemoderation.h b/indra/newview/llnearbyvoicemoderation.h new file mode 100644 index 0000000000..619f169883 --- /dev/null +++ b/indra/newview/llnearbyvoicemoderation.h @@ -0,0 +1,50 @@ +/** + * @file llnearbyvoicemoderation.h + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + +#pragma once + +class LLVOAvatar; + +class LLNearbyVoiceModeration : public LLSingleton <LLNearbyVoiceModeration> { + LLSINGLETON(LLNearbyVoiceModeration); + ~LLNearbyVoiceModeration(); + + public: + void requestMuteIndividual(const LLUUID& userID, bool mute); + void requestMuteAll(bool mute); + + void setMutedInfo(const std::string& channelID, bool mute); + bool showMutedNotification(bool is_muted); + bool showNotificationIfNeeded(); + + bool isNearbyChatModerator(); + + private: + LLVOAvatar* getVOAvatarFromId(const LLUUID& id); + const std::string getCapUrlFromRegion(LLViewerRegion* region); + + boost::signals2::connection mParcelCallbackConnection; + std::map<std::string, bool> mChannelMuteMap; +}; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index af472c4259..63ec43458b 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -47,6 +47,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llappviewer.h" // for gDisconnected +#include "llavataractions.h" #include "llcallingcard.h" // LLAvatarTracker #include "llfloaterland.h" #include "llfloaterworldmap.h" @@ -397,20 +398,41 @@ void LLNetMap::draw() LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal()); - // Draw avatars + std::vector<std::pair<U32, bool>> indexed_avatars; + indexed_avatars.reserve(avatar_ids.size()); for (U32 i = 0; i < avatar_ids.size(); i++) { - LLUUID uuid = avatar_ids[i]; + indexed_avatars.emplace_back(i, LLAvatarActions::isFriend(avatar_ids[i])); + } + + // Sort avatars so non-friends are drawn first and friend dots will appear on top + std::sort(indexed_avatars.begin(), indexed_avatars.end(), + [](const auto& a, const auto& b) { return a.second < b.second; }); + + uuid_vec_t sorted_avatar_ids; + std::vector<LLVector3d> sorted_positions; + sorted_avatar_ids.reserve(avatar_ids.size()); + sorted_positions.reserve(positions.size()); + + // Reorder avatar_ids and positions based on sorted indices + for (const auto& indexed_avatar : indexed_avatars) + { + sorted_avatar_ids.push_back(avatar_ids[indexed_avatar.first]); + sorted_positions.push_back(positions[indexed_avatar.first]); + } + + // Draw avatars + for (U32 i = 0; i < sorted_avatar_ids.size(); i++) + { + LLUUID uuid = sorted_avatar_ids[i]; // Skip self, we'll draw it later if (uuid == gAgent.getID()) continue; - pos_map = globalPosToView(positions[i]); - - bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL); + pos_map = globalPosToView(sorted_positions[i]); - LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color; + LLColor4 color = LLAvatarActions::isFriend(uuid) ? map_avatar_friend_color : map_avatar_color; - unknown_relative_z = positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z && + unknown_relative_z = sorted_positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z && camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z; LLWorldMapView::drawAvatar( diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 9a33bcb1b9..4939cd5fbb 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -175,13 +175,15 @@ void LLNotificationListItem::onMouseEnter(S32 x, S32 y, MASK mask) { mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" )); mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" )); + mNoticeTextExp->setBgReadOnlyColor(LLUIColorTable::instance().getColor("SelectedBgReadOnlyColor")); } void LLNotificationListItem::onMouseLeave(S32 x, S32 y, MASK mask) { mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); -} + mNoticeTextExp->setBgReadOnlyColor(LLUIColorTable::instance().getColor("TextBgReadOnlyColor")); + } //static LLNotificationListItem* LLNotificationListItem::create(const Params& p) diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 2ed90e31b2..b3283ca642 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -84,7 +84,7 @@ public: virtual void onMouseLeave(S32 x, S32 y, MASK mask); //callbacks - typedef boost::function<void (LLNotificationListItem* item)> item_callback_t; + typedef std::function<void (LLNotificationListItem* item)> item_callback_t; typedef boost::signals2::signal<void (LLNotificationListItem* item)> item_signal_t; item_signal_t mOnItemClose; item_signal_t mOnItemClick; @@ -156,8 +156,8 @@ protected: LLTextBox* mGroupNameBoxExp; private: - LLGroupNotificationListItem(const LLGroupNotificationListItem &); - LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &); + LLGroupNotificationListItem(const LLGroupNotificationListItem&) = delete; + LLGroupNotificationListItem& operator=(LLGroupNotificationListItem&) = delete; void setGroupName(std::string name); bool updateFromCache(); @@ -175,8 +175,8 @@ public: private: friend class LLNotificationListItem; LLGroupInviteNotificationListItem(const Params& p); - LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &); - LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &); + LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem&) = delete; + LLGroupInviteNotificationListItem& operator=(LLGroupInviteNotificationListItem&) = delete; void setFee(S32 fee); @@ -202,8 +202,8 @@ public: private: friend class LLNotificationListItem; LLGroupNoticeNotificationListItem(const Params& p); - LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &); - LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &); + LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem&) = delete; + LLGroupNoticeNotificationListItem& operator=(LLGroupNoticeNotificationListItem&) = delete; void setSender(std::string sender); void onClickAttachment(); @@ -226,8 +226,8 @@ public: private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); - LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); - LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); + LLTransactionNotificationListItem(const LLTransactionNotificationListItem&) = delete; + LLTransactionNotificationListItem& operator=(LLTransactionNotificationListItem&) = delete; LLAvatarIconCtrl* mAvatarIcon; LLAvatarIconCtrl* mAvatarIconExp; }; @@ -239,8 +239,8 @@ public: private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); - LLSystemNotificationListItem(const LLSystemNotificationListItem &); - LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); + LLSystemNotificationListItem(const LLSystemNotificationListItem&) = delete; + LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &) = delete; LLIconCtrl* mSystemNotificationIcon; LLIconCtrl* mSystemNotificationIconExp; bool mIsCaution; diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 505f276f8c..29f11f7ca6 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -60,7 +60,7 @@ void LLNotificationManager::init() mChannels.emplace_back(new LLBrowserNotification()); mChannels.emplace_back(new LLIMHandler()); - mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler()); + mChatHandler = std::make_shared<LLFloaterIMNearbyChatHandler>(); } //-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 75bafb8785..5cec35fc88 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -41,7 +41,7 @@ #include "llregistry.h" #include "llviewermessage.h" -typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)> responder_constructor_t; +typedef std::function<LLNotificationResponderInterface*(const LLSD& pParams)> responder_constructor_t; class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, LLResponderRegistry> { diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 8589afae06..852f2dab21 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -850,7 +850,12 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id) // Start observing changes in "My Outfits" category. mCategoriesObserver->addCategory(cat_id, - boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true); + [this, cat_id]() + { + mPendingOutfitRefreshes.insert(cat_id); + startIdleLoop(cat_id); + }, + true); outfit_category->fetch(); refreshOutfit(cat_id); @@ -901,6 +906,18 @@ void LLOutfitGallery::updateChangedCategoryName(LLViewerInventoryCategory *cat, } } +bool LLOutfitGallery::updateOneOutfit() +{ + if (mPendingOutfitRefreshes.empty()) + return false; + + auto it = mPendingOutfitRefreshes.begin(); + LLUUID outfit_id = *it; + mPendingOutfitRefreshes.erase(it); + refreshOutfit(outfit_id); + return true; +} + void LLOutfitGallery::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) { if (mOutfitMenu && cat_id.notNull()) diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 5801a32a39..183b6ea9d5 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -98,6 +98,7 @@ public: /*virtual*/ void updateAddedCategory(LLUUID cat_id); /*virtual*/ void updateRemovedCategory(LLUUID cat_id); /*virtual*/ void updateChangedCategoryName(LLViewerInventoryCategory *cat, std::string name); + /*virtual*/ bool updateOneOutfit(); // bulk processing, scheduled by observer when updates are needed /*virtual*/ bool hasItemSelected(); /*virtual*/ bool canWearSelected(); @@ -190,6 +191,7 @@ private: typedef item_num_map_t::value_type item_numb_map_value_t; item_num_map_t mItemIndexMap; std::map<S32, LLOutfitGalleryItem*> mIndexToItemMap; + std::set<LLUUID> mPendingOutfitRefreshes; LLInventoryCategoriesObserver* mOutfitsObserver; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 58cd9fab83..7db79c7010 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -54,7 +54,7 @@ #include "llvoavatarself.h" #include "llwearableitemslist.h" -static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y); +static bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y); static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR; static const LLOutfitTabFavComparator OUTFIT_TAB_FAV_COMPARATOR; @@ -246,7 +246,10 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id) list->setCommitCallback(boost::bind(&LLOutfitsList::onListSelectionChange, this, _1)); // Setting list refresh callback to apply filter on list change. - list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onRefreshComplete, this, _1)); + list->setRefreshCompleteCallback([this, tab](LLUICtrl* ctrl, const LLSD& sd) + { + onRefreshComplete(ctrl, tab); + }); list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3)); @@ -294,7 +297,7 @@ void LLOutfitsList::updateRemovedCategory(LLUUID cat_id) if (outfits_iter != mOutfitsMap.end()) { const LLUUID& outfit_id = outfits_iter->first; - LLAccordionCtrlTab* tab = outfits_iter->second; + LLOutfitAccordionCtrlTab* tab = outfits_iter->second; // An outfit is removed from the list. Do the following: // 1. Remove outfit category from observer to stop monitoring its changes. @@ -322,11 +325,11 @@ void LLOutfitsList::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id) { if (mOutfitsMap[prev_id]) { - ((LLOutfitAccordionCtrlTab*)mOutfitsMap[prev_id])->setOutfitSelected(false); + mOutfitsMap[prev_id]->setOutfitSelected(false); } if (mOutfitsMap[base_id]) { - ((LLOutfitAccordionCtrlTab*)mOutfitsMap[base_id])->setOutfitSelected(true); + mOutfitsMap[base_id]->setOutfitSelected(true); } } @@ -370,7 +373,7 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid) { if (outfit_uuid == iter->first) { - LLAccordionCtrlTab* tab = iter->second; + LLOutfitAccordionCtrlTab* tab = iter->second; if (!tab) continue; LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); @@ -464,7 +467,7 @@ void LLOutfitsList::onCollapseAllFolders() iter != mOutfitsMap.end(); ++iter) { - LLAccordionCtrlTab* tab = iter->second; + LLOutfitAccordionCtrlTab* tab = iter->second; if(tab && tab->isExpanded()) { tab->changeOpenClose(true); @@ -478,7 +481,7 @@ void LLOutfitsList::onExpandAllFolders() iter != mOutfitsMap.end(); ++iter) { - LLAccordionCtrlTab* tab = iter->second; + LLOutfitAccordionCtrlTab* tab = iter->second; if(tab && !tab->isExpanded()) { tab->changeOpenClose(false); @@ -501,7 +504,7 @@ void LLOutfitsList::updateChangedCategoryName(LLViewerInventoryCategory *cat, st if (outfits_iter != mOutfitsMap.end()) { // Update tab name with the new category name. - LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*) outfits_iter->second; + LLOutfitAccordionCtrlTab* tab = outfits_iter->second; if (tab) { tab->setName(name); @@ -554,7 +557,7 @@ void LLOutfitsList::deselectOutfit(const LLUUID& category_id) LLOutfitListBase::deselectOutfit(category_id); } -void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id) +void LLOutfitsList::restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id) { // Try restoring outfit selection after filtering. if (mAccordion->getSelectedTab() == tab) @@ -563,23 +566,21 @@ void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID } } -void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl) +void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab) { if (!ctrl || getFilterSubString().empty()) return; - for (outfits_map_t::iterator - iter = mOutfitsMap.begin(), - iter_end = mOutfitsMap.end(); - iter != iter_end; ++iter) + LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); + if (list != ctrl) { - LLAccordionCtrlTab* tab = iter->second; - if (!tab) continue; - - LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); - if (list != ctrl) continue; - - applyFilterToTab(iter->first, tab, getFilterSubString()); + llassert(false); + LL_WARNS() << "LLOutfitsList::onRefreshComplete: ctrl does not match tab's list!" << LL_ENDL; + return; + } + if (tab->getFilterGeneration() != getFilterGeneration()) + { + applyFilterToTab(tab->getFolderID(), tab, getFilterSubString()); } } @@ -592,7 +593,7 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons while (iter != iter_end) { const LLUUID& category_id = iter->first; - LLAccordionCtrlTab* tab = iter++->second; + LLOutfitAccordionCtrlTab* tab = iter++->second; if (!tab) continue; LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); @@ -631,9 +632,10 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons void LLOutfitsList::applyFilterToTab( const LLUUID& category_id, - LLAccordionCtrlTab* tab, + LLOutfitAccordionCtrlTab* tab, const std::string& filter_substring) { + LL_PROFILE_ZONE_SCOPED; if (!tab) return; LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); if (!list) return; @@ -645,6 +647,7 @@ void LLOutfitsList::applyFilterToTab( LLStringUtil::toUpper(cur_filter); tab->setTitle(tab->getTitle(), cur_filter); + tab->setFilterGeneration(getFilterGeneration()); if (std::string::npos == title.find(cur_filter)) { @@ -768,7 +771,7 @@ void LLOutfitsList::onCOFChanged() outfits_map_t::iterator map_iter = mOutfitsMap.begin(), map_end = mOutfitsMap.end(); while (map_iter != map_end) { - LLAccordionCtrlTab* tab = (map_iter++)->second; + LLOutfitAccordionCtrlTab* tab = (map_iter++)->second; if (!tab) continue; LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView()); @@ -799,7 +802,7 @@ void LLOutfitsList::sortOutfits() void LLOutfitsList::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) { - LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); + LLOutfitAccordionCtrlTab* tab = dynamic_cast<LLOutfitAccordionCtrlTab*>(ctrl); if (mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull()) { // Focus tab header to trigger tab selection change. @@ -822,7 +825,7 @@ void LLOutfitsList::handleInvFavColorChange() ++iter) { if (!iter->second) continue; - LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*)iter->second; + LLOutfitAccordionCtrlTab* tab = iter->second; // refresh font color tab->setFavorite(tab->getFavorite()); @@ -849,7 +852,7 @@ void LLOutfitsList::onChangeSortOrder(const LLSD& userdata) { for (outfits_map_t::value_type& outfit : mOutfitsMap) { - LLAccordionCtrlTab* tab = outfit.second; + LLOutfitAccordionCtrlTab* tab = outfit.second; const LLUUID& category_id = outfit.first; if (!tab) continue; @@ -890,7 +893,7 @@ LLOutfitListGearMenuBase* LLOutfitsList::createGearMenu() } -bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y) +bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y) { if(!tab || !tab->getHeaderVisible()) return false; @@ -1052,6 +1055,15 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id) } } +void LLOutfitListBase::startIdleLoop(const LLUUID cat_id) +{ + if (mRefreshListState.CategoryUUID.isNull()) + { + mRefreshListState.CategoryUUID = cat_id; + gIdleCallbacks.addFunction(onIdle, this); + } +} + // static void LLOutfitListBase::onIdle(void* userdata) { @@ -1126,6 +1138,14 @@ void LLOutfitListBase::onIdleRefreshList() return; } + // Let derived classes process their own updates. + while (updateOneOutfit()) + { + curent_time = LLTimer::getTotalSeconds(); + if (curent_time >= end_time) + return; + } + sortOutfits(); highlightBaseOutfit(); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 0bf5becb05..408ff07116 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -38,14 +38,13 @@ #include "lltoggleablemenu.h" #include "llviewermenu.h" -class LLAccordionCtrlTab; +class LLOutfitAccordionCtrlTab; class LLInventoryCategoriesObserver; class LLOutfitListGearMenuBase; class LLOutfitListSortMenuBase; class LLWearableItemsList; class LLListContextMenu; - /** * @class LLOutfitTabNameComparator * @@ -76,7 +75,7 @@ public: class LLOutfitListBase : public LLPanelAppearanceTab { public: - typedef boost::function<void(const LLUUID&)> selection_change_callback_t; + typedef std::function<void(const LLUUID&)> selection_change_callback_t; typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t; LLOutfitListBase(); @@ -96,6 +95,17 @@ public: virtual void updateAddedCategory(LLUUID cat_id) = 0; virtual void updateRemovedCategory(LLUUID cat_id) = 0; virtual void updateChangedCategoryName(LLViewerInventoryCategory *cat, std::string name) = 0; + + /* + * Optional hook for derived classes to perform additional processing. + * This is called by the outfit list update logic after the core + * bookkeeping for an outfit has been handled. + * + * @return true if update processing should continue, + * false if no additional work is required. + * The base implementation returns false. + */ + virtual bool updateOneOutfit() { return false; }; virtual void sortOutfits(); void removeSelected(); @@ -139,6 +149,7 @@ protected: bool isOutfitFolder(LLViewerInventoryCategory* cat) const; + void startIdleLoop(const LLUUID cat_id); static void onIdle(void* userdata); void onIdleRefreshList(); @@ -151,6 +162,7 @@ protected: uuid_vec_t::const_iterator RemovedIterator; } mRefreshListState; std::set<LLUUID> mChangedItems; + std::set<LLUUID> mPendingOutfitRefreshes; bool mIsInitialized; LLInventoryCategoriesObserver* mCategoriesObserver; @@ -266,7 +278,10 @@ public: void setFavorite(bool is_favorite); bool getFavorite() const { return mIsFavorite; } + LLUUID getFolderID() const { return mFolderID; } void setOutfitSelected(bool val); + U32 getFilterGeneration() const { return mFilterGeneration; } + void setFilterGeneration(U32 generation) { mFilterGeneration = generation; } static LLUIImage* sFavoriteIcon; static LLUIColor sFgColor; @@ -284,6 +299,7 @@ public: LLUUID mFolderID; bool mIsFavorite = false; bool mIsSelected = false; + U32 mFilterGeneration = 0; }; /** * @class LLOutfitsList @@ -386,20 +402,20 @@ private: * * A tab may be hidden if it doesn't match current filter. */ - void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id); + void restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id); /** * Called upon list refresh event to update tab visibility depending on * the results of applying filter to the title and list items of the tab. */ - void onRefreshComplete(LLUICtrl* ctrl); + void onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab); /** * Applies filter to the given tab * * @see applyFilter() */ - void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring); + void applyFilterToTab(const LLUUID& category_id, LLOutfitAccordionCtrlTab* tab, const std::string& filter_substring); /** * Returns true if all selected items can be worn. @@ -426,7 +442,7 @@ private: typedef wearables_lists_map_t::value_type wearables_lists_map_value_t; wearables_lists_map_t mSelectedListsMap; - typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t; + typedef std::map<LLUUID, LLOutfitAccordionCtrlTab*> outfits_map_t; typedef outfits_map_t::value_type outfits_map_value_t; outfits_map_t mOutfitsMap; diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp index 3ee4ab8e51..ef04d7f13f 100644 --- a/indra/newview/llpanelappearancetab.cpp +++ b/indra/newview/llpanelappearancetab.cpp @@ -40,6 +40,7 @@ void LLPanelAppearanceTab::setFilterSubString(const std::string& new_string) { std::string old_string = mFilterSubString; mFilterSubString = new_string; + mFilterGeneration++; onFilterSubStringChanged(mFilterSubString, old_string); } @@ -52,6 +53,7 @@ void LLPanelAppearanceTab::checkFilterSubString() { std::string old_string = mFilterSubString; mFilterSubString = sRecentFilterSubString; + mFilterGeneration++; onFilterSubStringChanged(mFilterSubString, old_string); } } diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h index e088c3e6f0..936fe2aec7 100644 --- a/indra/newview/llpanelappearancetab.h +++ b/indra/newview/llpanelappearancetab.h @@ -48,6 +48,7 @@ public: virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {} const std::string& getFilterSubString() { return mFilterSubString; } + U32 getFilterGeneration() { return mFilterGeneration; } virtual void updateMenuItemsVisibility() = 0; virtual LLToggleableMenu* getGearMenu() = 0; @@ -63,6 +64,7 @@ protected: private: std::string mFilterSubString; + U32 mFilterGeneration = 0; static std::string sRecentFilterSubString; }; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 0e72771bd8..35624436b3 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -126,11 +126,11 @@ static void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLS { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + agent_id.asString(); diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 7d55ba3265..69f51b03b6 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -263,7 +263,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text) // Constructor/Destructor LLFloaterGetBlockedObjectName::LLFloaterGetBlockedObjectName(const LLSD& key) : LLFloater(key) -, mGetObjectNameCallback(NULL) +, mGetObjectNameCallback(nullptr) { } diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index 1f470199ce..782a44bc5b 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -95,7 +95,7 @@ class LLFloaterGetBlockedObjectName : public LLFloater { friend class LLFloaterReg; public: - typedef boost::function<void (const std::string&)> get_object_name_callback_t; + typedef std::function<void(const std::string&)> get_object_name_callback_t; bool postBuild() override; diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 449a670de9..aefda39fb9 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -153,8 +153,10 @@ void LLPanelClassifiedInfo::reshape(S32 width, S32 height, bool called_from_pare void LLPanelClassifiedInfo::onOpen(const LLSD& key) { + bool from_search = key.has("from_search") ? key["from_search"].asBoolean() : false; + LLUUID avatar_id = key["classified_creator_id"]; - if(avatar_id.isNull()) + if(avatar_id.isNull() && !from_search) { return; } diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp new file mode 100644 index 0000000000..69329c4ea4 --- /dev/null +++ b/indra/newview/llpaneldirbrowser.cpp @@ -0,0 +1,1145 @@ +/** + * @file llpaneldirbrowser.cpp + * @brief Base class for panels in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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$ + */ + +// Base class for the various search panels/results browsers +// in the Find floater. For example, Find > Popular Places +// is derived from this. + +#include "llviewerprecompiledheaders.h" + +#include "llpaneldirbrowser.h" + +// linden library includes +#include "lldir.h" +#include "lleventflags.h" +#include "llqueryflags.h" +#include "message.h" + +// viewer project includes +#include "llagent.h" +#include "llbutton.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lllineeditor.h" +#include "llnotificationsutil.h" +#include "llpanelavatar.h" +#include "llpanelgroup.h" +#include "llpanelclassified.h" +#include "llpaneldirevents.h" +#include "llpaneldirland.h" +#include "llproductinforequest.h" +#include "llscrolllistctrl.h" +#include "lltextbox.h" +#include "lltrans.h" +#include "llviewercontrol.h" +#include "llfloaterdirectory.h" +#include "llpanelprofile.h" +#include "llpanelplaces.h" +#include "llpaneleventinfo.h" + + +std::map<LLUUID, LLPanelDirBrowser*> gDirBrowserInstances; + +LLPanelDirBrowser::LLPanelDirBrowser() +: LLPanel(), + mSearchID(), + mWantSelectID(), + mCurrentSortColumn("name"), + mCurrentSortAscending(true), + mSearchStart(0), + mResultsPerPage(RESULTS_PER_PAGE_DEFAULT), + mResultsReceived(0), + mMinSearchChars(1), + mResultsContents(), + mHaveSearchResults(false), + mDidAutoSelect(true), + mLastResultTimer(), + mFloaterDirectory(nullptr) +{ +} + +bool LLPanelDirBrowser::postBuild() +{ + childSetCommitCallback("results", onCommitList, this); + + mPrevPageBtn = getChild<LLButton>("prev_btn"); + mNextPageBtn = getChild<LLButton>("next_btn"); + + mPrevPageBtn->setClickedCallback([this](LLUICtrl*, const LLSD&){ prevPage(); }); + mPrevPageBtn->setVisible(false); + + mNextPageBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { nextPage(); }); + mNextPageBtn->setVisible(false); + + return true; +} + +LLPanelDirBrowser::~LLPanelDirBrowser() +{ + // Children all cleaned up by default view destructor. + gDirBrowserInstances.erase(mSearchID); +} + +// virtual +void LLPanelDirBrowser::draw() +{ + // HACK: If the results panel has data, we want to select the first + // item. Unfortunately, we don't know when the find is actually done, + // so only do this if it's been some time since the last packet of + // results was received. + if (mLastResultTimer.getElapsedTimeF32() > 0.5) + { + if (!mDidAutoSelect && + !childHasFocus("results")) + { + LLCtrlListInterface *list = childGetListInterface("results"); + if (list) + { + if (list->getCanSelect()) + { + list->selectFirstItem(); // select first item by default + childSetFocus("results", true); + } + // Request specific data from the server + onCommitList(NULL, this); + } + } + mDidAutoSelect = true; + } + + LLPanel::draw(); +} + + +// virtual +void LLPanelDirBrowser::nextPage() +{ + mSearchStart += mResultsPerPage; + mPrevPageBtn->setVisible(true); + + performQuery(); +} + + +// virtual +void LLPanelDirBrowser::prevPage() +{ + mSearchStart -= mResultsPerPage; + mPrevPageBtn->setVisible(mSearchStart > 0); + + performQuery(); +} + + +void LLPanelDirBrowser::resetSearchStart() +{ + mSearchStart = 0; + mNextPageBtn->setVisible(false); + mPrevPageBtn->setVisible(false); +} + +// protected +void LLPanelDirBrowser::updateResultCount() +{ + LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); + + S32 result_count = list->getItemCount(); + std::string result_text; + + if (!mHaveSearchResults) result_count = 0; + + if (mNextPageBtn && mNextPageBtn->getVisible()) + { + // Item count be off by a few if bogus items sent from database + // Just use the number of results per page. JC + result_text = llformat(">%d found", mResultsPerPage); + } + else + { + result_text = llformat("%d found", result_count); + } + + childSetValue("result_text", result_text); + + if (result_count == 0) + { + // add none found response + if (list->getItemCount() == 0) + { + list->setCommentText(std::string("None found.")); // *TODO: Translate + list->operateOnAll(LLCtrlListInterface::OP_DESELECT); + } + } + else + { + childEnable("results"); + } +} + +// static +std::string LLPanelDirBrowser::filterShortWords(const std::string source_string, int shortest_word_length, bool& was_filtered) +{ + // degenerate case + if ( source_string.length() < 1 ) + return ""; + + std::stringstream codec( source_string ); + std::string each_word; + std::vector< std::string > all_words; + + while( codec >> each_word ) + all_words.push_back( each_word ); + + std::ostringstream dest_string( "" ); + + was_filtered = false; + + std::vector< std::string >::iterator iter = all_words.begin(); + while( iter != all_words.end() ) + { + if ( (int)(*iter).length() >= shortest_word_length ) + { + dest_string << *iter; + dest_string << " "; + } + else + { + was_filtered = true; + } + + ++iter; + }; + + return dest_string.str(); +} + +void LLPanelDirBrowser::selectByUUID(const LLUUID& id) +{ + LLCtrlListInterface *list = childGetListInterface("results"); + if (!list) return; + bool found = list->setCurrentByID(id); + if (found) + { + // we got it, don't wait for network + // Don't bother looking for this in the draw loop. + mWantSelectID.setNull(); + // Make sure UI updates. + onCommitList(NULL, this); + } + else + { + // waiting for this item from the network + mWantSelectID = id; + } +} + +void LLPanelDirBrowser::selectEventByID(S32 event_id) +{ + if (mFloaterDirectory) + { + if (mFloaterDirectory->mPanelEventp) + { + mFloaterDirectory->mPanelEventp->setVisible(true); + mFloaterDirectory->mPanelEventp->setEventID(event_id); + } + } +} + +void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type) +{ + LLCtrlListInterface *list = childGetListInterface("results"); + if (!list) return; + + LLSD id_sd = childGetValue("results"); + + *id = id_sd.asUUID(); + + std::string id_str = id_sd.asString(); + *type = mResultsContents[id_str]["type"]; +} + + +// static +void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data) +{ + LLPanelDirBrowser* self = (LLPanelDirBrowser*)data; + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + // Start with everyone invisible + if (self->mFloaterDirectory) + { + self->mFloaterDirectory->hideAllDetailPanels(); + } + + if (!list->getCanSelect()) + { + return; + } + + std::string id_str = self->childGetValue("results").asString(); + if (id_str.empty()) + { + return; + } + + LLSD item_id = list->getCurrentID(); + S32 type = self->mResultsContents[id_str]["type"]; + if (type == EVENT_CODE) + { + // all but events use the UUID above + item_id = self->mResultsContents[id_str]["event_id"]; + } + //std::string name = self->mResultsContents[id_str]["name"].asString(); + self->showDetailPanel(type, item_id); +} + +void LLPanelDirBrowser::showDetailPanel(S32 type, LLSD id) +{ + switch(type) + { + case AVATAR_CODE: + if (mFloaterDirectory && mFloaterDirectory->mPanelAvatarp) + { + mFloaterDirectory->mPanelAvatarp->setVisible(true); + mFloaterDirectory->mPanelAvatarp->onOpen(id); + mFloaterDirectory->mPanelAvatarp->updateData(); + } + break; + case GROUP_CODE: + if (mFloaterDirectory && mFloaterDirectory->mPanelGroupp) + { + mFloaterDirectory->mPanelGroupp->setVisible(true); + mFloaterDirectory->mPanelGroupp->onOpen(LLSD().with("group_id", id)); + } + break; + case PLACE_CODE: + case FOR_SALE_CODE: + case AUCTION_CODE: + if (mFloaterDirectory && mFloaterDirectory->mPanelPlacep) + { + mFloaterDirectory->mPanelPlacep->setVisible(true); + LLSD key; + key["type"] = "remote_place"; + key["id"]= id; + mFloaterDirectory->mPanelPlacep->onOpen(key); + } + break; + case CLASSIFIED_CODE: + if (mFloaterDirectory && mFloaterDirectory->mPanelClassifiedp) + { + mFloaterDirectory->mPanelClassifiedp->setVisible(true); + LLSD key; + key["classified_id"] = id; + key["from_search"] = true; + mFloaterDirectory->mPanelClassifiedp->onOpen(key); + } + break; + case EVENT_CODE: + { + U32 event_id = (U32)id.asInteger(); + showEvent(event_id); + } + break; + default: + { + LL_WARNS() << "Unknown event type!" << LL_ENDL; + } + break; + } +} + + +void LLPanelDirBrowser::showEvent(const U32 event_id) +{ + // Start with everyone invisible + if (mFloaterDirectory) + { + mFloaterDirectory->hideAllDetailPanels(); + if (mFloaterDirectory->mPanelEventp) + { + mFloaterDirectory->mPanelEventp->setVisible(true); + mFloaterDirectory->mPanelEventp->setEventID(event_id); + } + } +} + +void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**) +{ + LLUUID query_id; + std::string first_name; + std::string last_name; + LLUUID agent_id; + + msg->getUUIDFast(_PREHASH_QueryData,_PREHASH_QueryID, query_id); + + LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!self) + { + // data from an old query + return; + } + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + S32 rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies); + self->mResultsReceived += rows; + + rows = self->showNextButton(rows); + + for (S32 i = 0; i < rows; i++) + { + msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_FirstName, first_name, i); + msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_LastName, last_name, i); + msg->getUUIDFast( _PREHASH_QueryReplies,_PREHASH_AgentID, agent_id, i); + // msg->getU8Fast( _PREHASH_QueryReplies,_PREHASH_Online, online, i); + // unused + // msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_Group, group, i); + // msg->getS32Fast( _PREHASH_QueryReplies,_PREHASH_Reputation, reputation, i); + + if (agent_id.isNull()) + { + continue; + } + + LLSD content; + + LLSD row; + row["id"] = agent_id; + + // We don't show online status in the finder anymore, + // so just use the 'offline' icon as the generic 'person' icon + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_avatar_offline.tga"; + + content["type"] = AVATAR_CODE; + + std::string fullname = first_name + " " + last_name; + row["columns"][1]["column"] = "name"; + row["columns"][1]["value"] = fullname; + row["columns"][1]["font"] = "SANSSERIF"; + + content["name"] = fullname; + + list->addElement(row); + self->mResultsContents[agent_id.asString()] = content; + } + + list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending); + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + + +void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**) +{ + LLUUID agent_id; + LLUUID query_id; + LLUUID parcel_id; + std::string name; + bool is_for_sale = false; + bool is_auction = false; + F32 dwell; + + msg->getUUID("AgentData", "AgentID", agent_id); + msg->getUUID("QueryData", "QueryID", query_id ); + + if (msg->getNumberOfBlocks("StatusData")) + { + U32 status; + msg->getU32("StatusData", "Status", status); + if (status & STATUS_SEARCH_PLACES_BANNEDWORD) + { + LLNotificationsUtil::add("SearchWordBanned"); + } + } + + LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!self) + { + // data from an old query + return; + } + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + S32 count = msg->getNumberOfBlocks("QueryReplies"); + self->mResultsReceived += count; + + count = self->showNextButton(count); + + for (S32 i = 0; i < count ; i++) + { + msg->getUUID("QueryReplies", "ParcelID", parcel_id, i); + msg->getString("QueryReplies", "Name", name, i); + msg->getBOOL("QueryReplies", "ForSale", is_for_sale, i); + msg->getBOOL("QueryReplies", "Auction", is_auction, i); + msg->getF32("QueryReplies", "Dwell", dwell, i); + + if (parcel_id.isNull()) + { + continue; + } + + LLSD content; + S32 type; + + LLSD row = self->createLandSale(parcel_id, is_auction, is_for_sale, name, &type); + + content["type"] = type; + content["name"] = name; + + std::string buffer = llformat("%.0f", (F64)dwell); + row["columns"][2]["column"] = "dwell"; + row["columns"][2]["value"] = buffer; + row["columns"][2]["font"] = "SansSerifSmall"; + + list->addElement(row); + self->mResultsContents[parcel_id.asString()] = content; + } + + list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending); + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + + +void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) +{ + LLUUID agent_id; + LLUUID query_id; + LLUUID owner_id; + std::string name; + std::string date; + + msg->getUUID("AgentData", "AgentID", agent_id); + msg->getUUID("QueryData", "QueryID", query_id ); + + LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!self) + { + return; + } + + if (msg->getNumberOfBlocks("StatusData")) + { + U32 status; + msg->getU32("StatusData", "Status", status); + if (status & STATUS_SEARCH_EVENTS_BANNEDWORD) + { + LLNotificationsUtil::add("SearchWordBanned"); + } + } + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + S32 rows = msg->getNumberOfBlocks("QueryReplies"); + self->mResultsReceived += rows; + + rows = self->showNextButton(rows); + + for (S32 i = 0; i < rows; i++) + { + U32 event_id; + U32 unix_time; + U32 event_flags; + + msg->getUUID("QueryReplies", "OwnerID", owner_id, i); + msg->getString("QueryReplies", "Name", name, i); + msg->getU32("QueryReplies", "EventID", event_id, i); + msg->getString("QueryReplies", "Date", date, i); + msg->getU32("QueryReplies", "UnixTime", unix_time, i); + msg->getU32("QueryReplies", "EventFlags", event_flags, i); + + // Skip empty events + if (owner_id.isNull()) + { + //RN: should this check event_id instead? + LL_WARNS() << "skipped event due to owner_id null, event_id " << event_id << LL_ENDL; + continue; + } + LLSD content; + + content["type"] = EVENT_CODE; + content["name"] = name; + content["event_id"] = (S32)event_id; + + LLSD row; + row["id"] = llformat("%u", event_id); + + // Column 0 - event icon + LLUUID image_id; + if (event_flags == EVENT_FLAG_ADULT) + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_event_adult.tga"; + } + else if (event_flags == EVENT_FLAG_MATURE) + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_event_mature.tga"; + } + else + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_event.tga"; + } + + row["columns"][1]["column"] = "name"; + row["columns"][1]["value"] = name; + row["columns"][1]["font"] = "SANSSERIF"; + + row["columns"][2]["column"] = "date"; + row["columns"][2]["value"] = date; + row["columns"][2]["font"] = "SansSerifSmall"; + + row["columns"][3]["column"] = "time"; + row["columns"][3]["value"] = llformat("%u", unix_time); + row["columns"][3]["font"] = "SansSerifSmall"; + + list->addElement(row, ADD_TOP /*ADD_SORTED*/); + + std::string id_str = llformat("%u", event_id); + self->mResultsContents[id_str] = content; + } + + list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending); + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + + +// static +void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**) +{ + S32 i; + + LLUUID query_id; + LLUUID group_id; + std::string group_name; + S32 members; + F32 search_order; + + msg->getUUIDFast(_PREHASH_QueryData,_PREHASH_QueryID, query_id ); + + LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!self) + { + return; + } + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + S32 rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies); + self->mResultsReceived += rows; + + rows = self->showNextButton(rows); + + for (i = 0; i < rows; i++) + { + msg->getUUIDFast(_PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i ); + msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i); + msg->getS32Fast(_PREHASH_QueryReplies, _PREHASH_Members, members, i ); + msg->getF32Fast(_PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order, i ); + + if (group_id.isNull()) + { + continue; + } + + LLSD content; + content["type"] = GROUP_CODE; + content["name"] = group_name; + + LLSD row; + row["id"] = group_id; + + LLUUID image_id; + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_group.tga"; + + row["columns"][1]["column"] = "name"; + row["columns"][1]["value"] = group_name; + row["columns"][1]["font"] = "SANSSERIF"; + + row["columns"][2]["column"] = "members"; + row["columns"][2]["value"] = members; + row["columns"][2]["font"] = "SansSerifSmall"; + + row["columns"][3]["column"] = "score"; + row["columns"][3]["value"] = search_order; + + list->addElement(row); + self->mResultsContents[group_id.asString()] = content; + } + list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending); + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + + +// static +void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**) +{ + S32 i; + S32 num_new_rows; + + LLUUID agent_id; + LLUUID query_id; + + msg->getUUID("AgentData", "AgentID", agent_id); + if (agent_id != gAgent.getID()) + { + LL_WARNS() << "Message for wrong agent " << agent_id + << " in processDirClassifiedReply" << LL_ENDL; + return; + } + + msg->getUUID("QueryData", "QueryID", query_id); + LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!self) + { + return; + } + + if (msg->getNumberOfBlocks("StatusData")) + { + U32 status; + msg->getU32("StatusData", "Status", status); + if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD) + { + LLNotificationsUtil::add("SearchWordBanned"); + } + } + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies); + self->mResultsReceived += num_new_rows; + + num_new_rows = self->showNextButton(num_new_rows); + for (i = 0; i < num_new_rows; i++) + { + LLUUID classified_id; + std::string name; + U32 creation_date = 0; // unix timestamp + U32 expiration_date = 0; // future use + S32 price_for_listing = 0; + msg->getUUID("QueryReplies", "ClassifiedID", classified_id, i); + msg->getString("QueryReplies", "Name", name, i); + msg->getU32("QueryReplies","CreationDate",creation_date,i); + msg->getU32("QueryReplies","ExpirationDate",expiration_date,i); + msg->getS32("QueryReplies","PriceForListing",price_for_listing,i); + + if ( classified_id.notNull() ) + { + self->addClassified(list, classified_id, name, creation_date, price_for_listing); + + LLSD content; + content["type"] = CLASSIFIED_CODE; + content["name"] = name; + self->mResultsContents[classified_id.asString()] = content; + } + } + // The server does the initial sort, by price paid per listing and date. JC + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + +void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) +{ + LLUUID agent_id; + LLUUID query_id; + LLUUID parcel_id; + std::string name; + std::string land_sku; + std::string land_type; + bool auction = false; + bool for_sale = false; + S32 sale_price; + S32 actual_area; + + msg->getUUID("AgentData", "AgentID", agent_id); + msg->getUUID("QueryData", "QueryID", query_id ); + + LLPanelDirBrowser* browser = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL); + if (!browser) + { + // data from an old query + return; + } + + // Only handled by LLPanelDirLand + LLPanelDirLand* self = (LLPanelDirLand*)browser; + + self->mHaveSearchResults = true; + + LLCtrlListInterface *list = self->childGetListInterface("results"); + if (!list) return; + + if (!list->getCanSelect()) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + self->mResultsContents = LLSD(); + } + + bool use_price = gSavedSettings.getBOOL("FindLandPrice"); + S32 limit_price = self->childGetValue("priceedit").asInteger(); + + bool use_area = gSavedSettings.getBOOL("FindLandArea"); + S32 limit_area = self->childGetValue("areaedit").asInteger(); + + S32 i; + S32 count = msg->getNumberOfBlocks("QueryReplies"); + self->mResultsReceived += count; + + S32 non_auction_count = 0; + for (i = 0; i < count; i++) + { + msg->getUUID("QueryReplies", "ParcelID", parcel_id, i); + msg->getString("QueryReplies", "Name", name, i); + msg->getBOOL("QueryReplies", "Auction", auction, i); + msg->getBOOL("QueryReplies", "ForSale", for_sale, i); + msg->getS32("QueryReplies", "SalePrice", sale_price, i); + msg->getS32("QueryReplies", "ActualArea", actual_area, i); + + if ( msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0 ) + { + msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_ProductSKU, land_sku, i); + land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); + } + else + { + land_sku.clear(); + land_type = LLTrans::getString("land_type_unknown"); + } + + if (parcel_id.isNull()) continue; + + if (use_price && (sale_price > limit_price)) continue; + + if (use_area && (actual_area < limit_area)) continue; + + LLSD content; + S32 type; + + LLSD row = self->createLandSale(parcel_id, auction, for_sale, name, &type); + + content["type"] = type; + content["name"] = name; + content["landtype"] = land_type; + + std::string buffer = "Auction"; + if (!auction) + { + buffer = llformat("%d", sale_price); + non_auction_count++; + } + row["columns"][2]["column"] = "price"; + row["columns"][2]["value"] = buffer; + row["columns"][2]["font"] = "SansSerifSmall"; + + buffer = llformat("%d", actual_area); + row["columns"][3]["column"] = "area"; + row["columns"][3]["value"] = buffer; + row["columns"][3]["font"] = "SansSerifSmall"; + + if (!auction) + { + F32 price_per_meter; + if (actual_area > 0) + { + price_per_meter = (F32)sale_price / (F32)actual_area; + } + else + { + price_per_meter = 0.f; + } + // Prices are usually L$1 - L$10 / meter + buffer = llformat("%.1f", price_per_meter); + row["columns"][4]["column"] = "per_meter"; + row["columns"][4]["value"] = buffer; + row["columns"][4]["font"] = "SansSerifSmall"; + } + else + { + // Auctions start at L$1 per meter + row["columns"][4]["column"] = "per_meter"; + row["columns"][4]["value"] = "1.0"; + row["columns"][4]["font"] = "SansSerifSmall"; + } + + row["columns"][5]["column"] = "landtype"; + row["columns"][5]["value"] = land_type; + row["columns"][5]["font"] = "SansSerifSmall"; + + list->addElement(row); + self->mResultsContents[parcel_id.asString()] = content; + } + + // All auction results are shown on the first page + // But they don't count towards the 100 / page limit + // So figure out the next button here, when we know how many aren't auctions + count = self->showNextButton(non_auction_count); + + self->updateResultCount(); + + // Poke the result received timer + self->mLastResultTimer.reset(); + self->mDidAutoSelect = false; +} + +void LLPanelDirBrowser::addClassified(LLCtrlListInterface *list, const LLUUID& pick_id, const std::string& name, const U32 creation_date, const S32 price_for_listing) +{ + std::string type = llformat("%d", CLASSIFIED_CODE); + + LLSD row; + row["id"] = pick_id; + + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_top_pick.tga"; + + row["columns"][1]["column"] = "name"; + row["columns"][1]["value"] = name; + row["columns"][1]["font"] = "SANSSERIF"; + + row["columns"][2]["column"] = "price"; + row["columns"][2]["value"] = price_for_listing; + row["columns"][2]["font"] = "SansSerifSmall"; + + list->addElement(row); +} + +LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, bool is_auction, bool is_for_sale, const std::string& name, S32 *type) +{ + LLSD row; + row["id"] = parcel_id; + LLUUID image_id; + + // Icon and type + if(is_auction) + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_auction.tga"; + + *type = AUCTION_CODE; + } + else if (is_for_sale) + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_for_sale.tga"; + + *type = FOR_SALE_CODE; + } + else + { + row["columns"][0]["column"] = "icon"; + row["columns"][0]["type"] = "icon"; + row["columns"][0]["value"] = "icon_place.tga"; + + *type = PLACE_CODE; + } + + row["columns"][1]["column"] = "name"; + row["columns"][1]["value"] = name; + row["columns"][1]["font"] = "SANSSERIF"; + + return row; +} + +void LLPanelDirBrowser::setupNewSearch() +{ + LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); + + gDirBrowserInstances.erase(mSearchID); + // Make a new query ID + mSearchID.generate(); + + gDirBrowserInstances.emplace(mSearchID, this); + + // ready the list for results + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + list->setCommentText(LLTrans::getString("Searching")); + list->setEnabled(false); + + mResultsReceived = 0; + mHaveSearchResults = false; + + // Set all panels to be invisible + mFloaterDirectory->hideAllDetailPanels(); + + updateResultCount(); +} + + +// static +// called from calssifieds, events, groups, land, people, and places +void LLPanelDirBrowser::onClickSearchCore(void* userdata) +{ + LLPanelDirBrowser* self = (LLPanelDirBrowser*)userdata; + if (!self) return; + + self->resetSearchStart(); + self->performQuery(); +} + + +// static +void LLPanelDirBrowser::sendDirFindQuery( + LLMessageSystem* msg, + const LLUUID& query_id, + const std::string& text, + U32 flags, + S32 query_start) +{ + msg->newMessage("DirFindQuery"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("QueryData"); + msg->addUUID("QueryID", query_id); + msg->addString("QueryText", text); + msg->addU32("QueryFlags", flags); + msg->addS32("QueryStart", query_start); + gAgent.sendReliableMessage(); +} + + +void LLPanelDirBrowser::onKeystrokeName(LLLineEditor* line, void* data) +{ + LLPanelDirBrowser *self = (LLPanelDirBrowser*)data; + if (line->getLength() >= (S32)self->mMinSearchChars) + { + self->setDefaultBtn( "Search" ); + self->childEnable("Search"); + } + else + { + self->setDefaultBtn(); + self->childDisable("Search"); + } +} + +// setup results when shown +void LLPanelDirBrowser::onVisibilityChange(bool new_visibility) +{ + if (new_visibility) + { + onCommitList(NULL, this); + } + LLPanel::onVisibilityChange(new_visibility); +} + +S32 LLPanelDirBrowser::showNextButton(S32 rows) +{ + // HACK: This hack doesn't work for llpaneldirfind (ALL) + // because other data is being returned as well. + if ( getName() != "find_all_old_panel") + { + // HACK: The (mResultsPerPage)+1th entry indicates there are 'more' + bool show_next = (mResultsReceived > mResultsPerPage); + mNextPageBtn->setVisible(show_next); + if (show_next) + { + rows -= (mResultsReceived - mResultsPerPage); + } + } + else + { + // Hide page buttons + mNextPageBtn->setVisible(false); + mPrevPageBtn->setVisible(false); + } + return rows; +} diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h new file mode 100644 index 0000000000..f422affc4b --- /dev/null +++ b/indra/newview/llpaneldirbrowser.h @@ -0,0 +1,167 @@ +/** + * @file llpaneldirbrowser.h + * @brief Base class for panels in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIRBROWSER_H +#define LL_LLPANELDIRBROWSER_H + +#include "llpanel.h" + +#include "llframetimer.h" + +class LLMessageSystem; +class LLFloaterDirectory; +class LLLineEditor; + +class LLPanelDirBrowser: public LLPanel +{ +public: + LLPanelDirBrowser(); + virtual ~LLPanelDirBrowser(); + + bool postBuild() override; + void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; } + + // Use to get periodic updates. + void draw() override; + + void onVisibilityChange(bool curVisibilityIn) override; + + // Redo your search for the prev/next page of results + virtual void prevPage(); + virtual void nextPage(); + void resetSearchStart(); + // Do the current query (used by prevPage/nextPage) + virtual void performQuery() {}; + + const LLUUID& getSearchID() const { return mSearchID; } + + // Select the line in the scroll list control with this ID, + // either now or when data arrives from the server. + void selectByUUID(const LLUUID& id); + + void selectEventByID(S32 event_id); + + void getSelectedInfo(LLUUID* id, S32 *type); + + void showDetailPanel(S32 type, LLSD item_id); + // type is EVENT_CODE, PLACE_CODE, etc. from below. + // item_id is integer for events, UUID for all others. + + // from llpaneldirbase + void setupNewSearch(); + + // default handler for clicking the search button resets the + // next/prev state and performs the query. + // Expects a pointer to an LLPanelDirBrowser object. + static void onClickSearchCore(void* userdata); + + // query_start indicates the first result row to + // return, usually 0 or 100 or 200 because the searches + // return a max of 100 rows + static void sendDirFindQuery( + LLMessageSystem* msg, + const LLUUID& query_id, + const std::string& text, + U32 flags, + S32 query_start); + + void showEvent(const U32 event_id); + + static void onCommitList(LLUICtrl* ctrl, void* data); + + static void processDirPeopleReply(LLMessageSystem* msg, void**); + static void processDirPlacesReply(LLMessageSystem* msg, void**); + static void processDirEventsReply(LLMessageSystem* msg, void**); + static void processDirGroupsReply(LLMessageSystem* msg, void**); + static void processDirClassifiedReply(LLMessageSystem* msg, void**); + static void processDirLandReply(LLMessageSystem *msg, void**); + + std::string filterShortWords( const std::string source_string, int shortest_word_length, bool& was_filtered ); + +protected: + void updateResultCount(); + + void addClassified(LLCtrlListInterface *list, const LLUUID& classified_id, const std::string& name, const U32 creation_date, const S32 price_for_listing); + LLSD createLandSale(const LLUUID& parcel_id, bool is_auction, bool is_for_sale, const std::string& name, S32 *type); + + static void onKeystrokeName(LLLineEditor* line, void* data); + + // If this is a search for a panel like "people_panel" (and not the "all" panel) + // optionally show the "Next" button. Return the actual number of + // rows to display. + S32 showNextButton(S32 rows); + +protected: + LLUUID mSearchID; // Unique ID for a pending search + LLUUID mWantSelectID; // scroll item to select on arrival + std::string mCurrentSortColumn; + bool mCurrentSortAscending; + // Some searches return a max of 100 items per page, so we can + // start the search from the 100th item rather than the 0th, etc. + S32 mSearchStart; + // Places is 100 per page, events is 200 per page + S32 mResultsPerPage; + S32 mResultsReceived; + + U32 mMinSearchChars; + + LLSD mResultsContents; + + bool mHaveSearchResults; + bool mDidAutoSelect; + LLFrameTimer mLastResultTimer; + + LLFloaterDirectory* mFloaterDirectory; + LLButton* mPrevPageBtn; + LLButton* mNextPageBtn; +}; + +constexpr S32 RESULTS_PER_PAGE_DEFAULT = 100; +constexpr S32 RESULTS_PER_PAGE_EVENTS = 200; + +// Codes used for sorting by type. +const S32 INVALID_CODE = -1; +const S32 EVENT_CODE = 0; +const S32 PLACE_CODE = 1; +// We no longer show online vs. offline in search result icons. +//const S32 ONLINE_CODE = 2; +//const S32 OFFLINE_CODE = 3; +const S32 AVATAR_CODE = 3; +const S32 GROUP_CODE = 4; +const S32 CLASSIFIED_CODE = 5; +const S32 FOR_SALE_CODE = 6; // for sale place +const S32 AUCTION_CODE = 7; // for auction place +const S32 POPULAR_CODE = 8; // popular by dwell + +// mask values for search flags +const S32 SEARCH_NONE = 0; // should try not to send this to the search engine +const S32 SEARCH_PG = 1; +const S32 SEARCH_MATURE = 2; +const S32 SEARCH_ADULT = 4; + +extern std::map<LLUUID, LLPanelDirBrowser*> gDirBrowserInstances; + +#endif // LL_LLPANELDIRBROWSER_H diff --git a/indra/newview/llpaneldirclassified.cpp b/indra/newview/llpaneldirclassified.cpp new file mode 100644 index 0000000000..ca625b956b --- /dev/null +++ b/indra/newview/llpaneldirclassified.cpp @@ -0,0 +1,109 @@ +/** + * @file llpaneldirclassified.cpp + * @brief Classified panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirclassified.h" + +#include "llclassifiedflags.h" + +#include "llfontgl.h" +#include "message.h" +#include "llqueryflags.h" + +#include "llagent.h" +#include "llbutton.h" +#include "llcontrol.h" +#include "llcombobox.h" +#include "llclassifiedinfo.h" +#include "lluiconstants.h" +#include "llpaneldirbrowser.h" +#include "lltextbox.h" + +#include "llcheckboxctrl.h" +#include "llfloaterdirectory.h" +#include "lllineeditor.h" +#include "llsearcheditor.h" +#include "llviewermenu.h" +#include "llnotificationsutil.h" + +static LLPanelInjector<LLPanelDirClassified> t_panel_dir_classified("panel_dir_classified"); + +LLPanelDirClassified::LLPanelDirClassified() +: LLPanelDirBrowser() +{ +} + +bool LLPanelDirClassified::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + childSetAction("Search", onClickSearchCore, this); + setDefaultBtn("Search"); + return true; +} + +LLPanelDirClassified::~LLPanelDirClassified() +{ +} + +void LLPanelDirClassified::performQuery() +{ + static LLUICachedControl<bool> inc_pg("ShowPGClassifieds", true); + static LLUICachedControl<bool> inc_mature("ShowMatureClassifieds", false); + static LLUICachedControl<bool> inc_adult("ShowAdultClassifieds", false); + + if (!(inc_pg || inc_mature || inc_adult)) + { + LLNotificationsUtil::add("NoContentToSearch"); + return; + } + + // This sets mSearchID and clears the list of results + setupNewSearch(); + + // send the message + LLMessageSystem *msg = gMessageSystem; + msg->newMessageFast(_PREHASH_DirClassifiedQuery); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + bool filter_auto_renew = false; + U32 query_flags = pack_classified_flags_request(filter_auto_renew, inc_pg, + inc_mature && gAgent.canAccessMature(), + inc_adult && gAgent.canAccessAdult()); + U32 category = childGetValue("Category").asInteger(); + + msg->nextBlockFast(_PREHASH_QueryData); + msg->addUUIDFast(_PREHASH_QueryID, mSearchID ); + msg->addStringFast(_PREHASH_QueryText, childGetValue("name").asString()); + msg->addU32Fast(_PREHASH_QueryFlags, query_flags); + msg->addU32Fast(_PREHASH_Category, category); + msg->addS32Fast(_PREHASH_QueryStart,mSearchStart); + + gAgent.sendReliableMessage(); +} diff --git a/indra/newview/llpaneldirclassified.h b/indra/newview/llpaneldirclassified.h new file mode 100644 index 0000000000..6682f73929 --- /dev/null +++ b/indra/newview/llpaneldirclassified.h @@ -0,0 +1,55 @@ +/** + * @file llpaneldirclassified.h + * @brief Classified panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIRCLASSIFIED_H +#define LL_LLPANELDIRCLASSIFIED_H + +#include "llpaneldirbrowser.h" + +// UI class forward declarations +class LLButton; +class LLCheckBoxCtrl; +class LLComboBox; +class LLLineEditor; +class LLScrollListCtrl; + +class LLPanelDirClassified : public LLPanelDirBrowser +{ +public: + LLPanelDirClassified(); + /*virtual*/ ~LLPanelDirClassified(); + + bool postBuild(); + + // Request the classifieds from the database + void performQuery(); + +protected: + // onClickNext and onClickPrev are special case searches + static void onClickSearch(void *userdata); +}; + +#endif diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp new file mode 100644 index 0000000000..7ac1229637 --- /dev/null +++ b/indra/newview/llpaneldirevents.cpp @@ -0,0 +1,247 @@ +/** + * @file llpaneldirevents.cpp + * @brief Events panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirevents.h" + +#include <sstream> + +// linden library includes +#include "message.h" +#include "llqueryflags.h" + +// viewer project includes +#include "llagent.h" +#include "llviewercontrol.h" +#include "llnotificationsutil.h" +#include "llpaneldirbrowser.h" +#include "llresmgr.h" +#include "lluiconstants.h" +#include "llappviewer.h" + +static LLPanelInjector<LLPanelDirEvents> t_panel_dir_events("panel_dir_events"); + +constexpr S32 DAY_TO_SEC = 24 * 60 * 60; + +LLPanelDirEvents::LLPanelDirEvents() + : LLPanelDirBrowser(), + mDay(0) +{ + // more results per page for this + mResultsPerPage = RESULTS_PER_PAGE_EVENTS; +} + +bool LLPanelDirEvents::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + childSetCommitCallback("date_mode", onDateModeCallback, this); + + childSetAction("back_btn", onBackBtn, this); + childSetAction("forward_btn", onForwardBtn, this); + + childSetCommitCallback("mature", onCommitMature, this); + + childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); + setDefaultBtn("Search"); + + onDateModeCallback(NULL, this); + + mCurrentSortColumn = "time"; + + setDay(0); // for today + + return true; +} + +LLPanelDirEvents::~LLPanelDirEvents() +{ +} + +void LLPanelDirEvents::setDay(S32 day) +{ + mDay = day; + + // Get time UTC + time_t utc_time = time_corrected(); + + // Correct for offset + utc_time += day * DAY_TO_SEC; + + // There's only one internal tm buffer. + struct tm* internal_time; + + // Convert to Pacific, based on server's opinion of whether + // it's daylight savings time there. + internal_time = utc_to_pacific_time(utc_time, is_daylight_savings()); + + std::string buffer = llformat("%d/%d", + 1 + internal_time->tm_mon, // Jan = 0 + internal_time->tm_mday); // 2001 = 101 + childSetValue("date_text", buffer); +} + +// virtual +void LLPanelDirEvents::performQuery() +{ + // event_id 0 will perform no delete action. + performQueryOrDelete(0); +} + +void LLPanelDirEvents::performQueryOrDelete(U32 event_id) +{ + S32 relative_day = mDay; + // Update the date field to show the date IN THE SERVER'S + // TIME ZONE, as that is what will be displayed in each event + + // Get time UTC + time_t utc_time = time_corrected(); + + // Correct for offset + utc_time += relative_day * DAY_TO_SEC; + + // There's only one internal tm buffer. + struct tm* internal_time; + + // Convert to Pacific, based on server's opinion of whether + // it's daylight savings time there. + internal_time = utc_to_pacific_time(utc_time, is_daylight_savings()); + + std::string buffer = llformat("%d/%d", + 1 + internal_time->tm_mon, // Jan = 0 + internal_time->tm_mday); // 2001 = 101 + childSetValue("date_text", buffer); + + // Record the relative day so back and forward buttons + // offset from this day. + mDay = relative_day; + + static LLUICachedControl<bool> incpg("ShowPGEvents", true); + static LLUICachedControl<bool> incmature("ShowMatureEvents", false); + static LLUICachedControl<bool> incadult("ShowAdultEvents", false); + if (!(incpg || incmature || incadult)) + { + LLNotificationsUtil::add("NoContentToSearch"); + return; + } + + U32 scope = DFQ_DATE_EVENTS; + if (incpg) scope |= DFQ_INC_PG; + if (incmature && gAgent.canAccessMature()) scope |= DFQ_INC_MATURE; + if (incadult && gAgent.canAccessAdult()) scope |= DFQ_INC_ADULT; + + setupNewSearch(); + + std::ostringstream params; + + // Date mode for the search + if ("current" == childGetValue("date_mode").asString()) + { + params << "u|"; + } + else + { + params << mDay << "|"; + } + + // Categories are stored in the database in table indra.event_category + // XML must match. + U32 cat_id = childGetValue("category_combo").asInteger(); + + params << cat_id << "|"; + params << childGetValue("event_search_text").asString(); + + // send the message + if (0 == event_id) + { + sendDirFindQuery(gMessageSystem, mSearchID, params.str(), scope, mSearchStart); + } + else + { + // This delete will also perform a query. + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventGodDelete); + + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, event_id); + + msg->nextBlockFast(_PREHASH_QueryData); + msg->addUUIDFast(_PREHASH_QueryID, mSearchID); + msg->addStringFast(_PREHASH_QueryText, params.str()); + msg->addU32Fast(_PREHASH_QueryFlags, scope); + msg->addS32Fast(_PREHASH_QueryStart, mSearchStart); + gAgent.sendReliableMessage(); + } +} + +// static +void LLPanelDirEvents::onDateModeCallback(LLUICtrl* ctrl, void *data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + if (self->childGetValue("date_mode").asString() == "date") + { + self->childEnable("forward_btn"); + self->childEnable("back_btn"); + } + else + { + self->childDisable("forward_btn"); + self->childDisable("back_btn"); + } +} + +// static +void LLPanelDirEvents::onBackBtn(void* data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + self->resetSearchStart(); + self->setDay(self->mDay - 1); + self->performQuery(); +} + + +// static +void LLPanelDirEvents::onForwardBtn(void* data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + self->resetSearchStart(); + self->setDay(self->mDay + 1); + self->performQuery(); +} + + +// static +void LLPanelDirEvents::onCommitMature(LLUICtrl* ctrl, void* data) +{ + // just perform another search + onClickSearchCore(data); +} diff --git a/indra/newview/llpaneldirevents.h b/indra/newview/llpaneldirevents.h new file mode 100644 index 0000000000..596abc5f0e --- /dev/null +++ b/indra/newview/llpaneldirevents.h @@ -0,0 +1,61 @@ +/** + * @file llpaneldirevents.h + * @brief Events panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIREVENTS_H +#define LL_LLPANELDIREVENTS_H + +#include "llpaneldirbrowser.h" + +class LLUICtrl; +class LLPanelDirBrowser; + +class LLPanelDirEvents : public LLPanelDirBrowser +{ +public: + LLPanelDirEvents(); + virtual ~LLPanelDirEvents(); + + bool postBuild() override; + + /*virtual*/ void performQuery() override; + + void performQueryOrDelete(U32 event_id); + + // pass 0 for today, 1 for tomorrow + void setDay(S32 day); + +protected: + static void onDateModeCallback(LLUICtrl* ctrl, void *data); + static void onBackBtn(void* data); + static void onForwardBtn(void* data); + static void onCommitMature(LLUICtrl* ctrl, void* data); + +protected: + S32 mDay; // 0 = today, 1 = tomorrow +}; + + +#endif diff --git a/indra/newview/llpaneldirgroups.cpp b/indra/newview/llpaneldirgroups.cpp new file mode 100644 index 0000000000..992d92091c --- /dev/null +++ b/indra/newview/llpaneldirgroups.cpp @@ -0,0 +1,90 @@ +/** + * @file llpaneldirgroups.cpp + * @brief Groups panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirgroups.h" + +#include "llagent.h" +#include "llqueryflags.h" +#include "llviewercontrol.h" +#include "llsearcheditor.h" + +static LLPanelInjector<LLPanelDirGroups> t_panel_dir_groups("panel_dir_groups"); + +LLPanelDirGroups::LLPanelDirGroups() + : LLPanelDirBrowser() +{ + mMinSearchChars = 3; +} + + +bool LLPanelDirGroups::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL); + + childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this); + setDefaultBtn( "Search" ); + + return true; +} + +LLPanelDirGroups::~LLPanelDirGroups() +{ +} + +// virtual +void LLPanelDirGroups::performQuery() +{ + if (childGetValue("name").asString().length() < mMinSearchChars) + { + return; + } + + setupNewSearch(); + + // groups + U32 scope = DFQ_GROUPS; + + // Check group mature filter. + if ( !gSavedSettings.getBOOL("ShowMatureGroups") || gAgent.isTeen() ) + { + scope |= DFQ_FILTER_MATURE; + } + + mCurrentSortColumn = "score"; + mCurrentSortAscending = false; + + // send the message + sendDirFindQuery( + gMessageSystem, + mSearchID, + childGetValue("name").asString(), + scope, + mSearchStart); +} diff --git a/indra/newview/llpaneldirgroups.h b/indra/newview/llpaneldirgroups.h new file mode 100644 index 0000000000..1e10353e2a --- /dev/null +++ b/indra/newview/llpaneldirgroups.h @@ -0,0 +1,45 @@ +/** + * @file llpaneldirgroups.h + * @brief Groups panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 LLPANELDIRGROUPS_H +#define LLPANELDIRGROUPS_H + +#include "llpaneldirbrowser.h" + +class LLPanelDirGroups : public LLPanelDirBrowser +{ +public: + LLPanelDirGroups(); + virtual ~LLPanelDirGroups(); + + /*virtual*/ bool postBuild(); + + /*virtual*/ void performQuery(); + + static void onClickSearch(void *userdata); +}; + +#endif diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp new file mode 100644 index 0000000000..f85a8b948e --- /dev/null +++ b/indra/newview/llpaneldirland.cpp @@ -0,0 +1,233 @@ +/** + * @file llpaneldirland.cpp + * @brief Land panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirland.h" + +#include "llagent.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lllineeditor.h" +#include "llnotificationsutil.h" +#include "llqueryflags.h" +#include "llscrolllistctrl.h" +#include "llstatusbar.h" +#include "lltextbox.h" +#include "llviewercontrol.h" +#include "llviewermessage.h" + +//----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +static const char FIND_ALL[] = "All Types"; +static const char FIND_AUCTION[] = "Auction"; +static const char FIND_MAINLANDSALES[] = "Mainland Sales"; +static const char FIND_ESTATESALES[] = "Estate Sales"; + +static LLPanelInjector<LLPanelDirLand> t_panel_dir_land("panel_dir_land"); + +LLPanelDirLand::LLPanelDirLand() + : LLPanelDirBrowser() +{ +} + +bool LLPanelDirLand::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + childSetValue("type", gSavedSettings.getString("FindLandType")); + + childSetCommitCallback("pricecheck", onCommitPrice, this); + childSetCommitCallback("areacheck", onCommitArea, this); + + if (gStatusBar) + { + childSetValue("priceedit", gStatusBar->getBalance()); + } + childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice")); + LLLineEditor* priceedit = getChild<LLLineEditor>("priceedit"); + priceedit->setPrevalidateInput(LLTextValidate::validateNonNegativeS32); + + childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea")); + LLLineEditor* areaedit = getChild<LLLineEditor>("areaedit"); + areaedit->setPrevalidateInput(LLTextValidate::validateNonNegativeS32); + + childSetAction("Search", onClickSearchCore, this); + setDefaultBtn("Search"); + + mCurrentSortColumn = "per_meter"; + + LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results"); + if (results) + { + results->setSortChangedCallback(boost::bind(&LLPanelDirLand::onClickSort, this)); + results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending); + } + + return true; +} + +LLPanelDirLand::~LLPanelDirLand() +{ + // Children all cleaned up by default view destructor. +} + +void LLPanelDirLand::onClickSort() +{ + performQuery(); +} + +// static +void LLPanelDirLand::onCommitPrice(LLUICtrl* ctrl, void* data) +{ + LLPanelDirLand* self = (LLPanelDirLand*)data; + LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; + + if (!self || !check) return; + self->childSetEnabled("priceedit", check->get()); +} + +// static +void LLPanelDirLand::onCommitArea(LLUICtrl* ctrl, void* data) +{ + LLPanelDirLand* self = (LLPanelDirLand*)data; + LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; + + if (!self || !check) return; + self->childSetEnabled("areaedit", check->get()); +} + +void LLPanelDirLand::performQuery() +{ + static LLUICachedControl<bool> inc_pg("ShowPGLand", true); + static LLUICachedControl<bool> inc_mature("ShowMatureLand", false); + static LLUICachedControl<bool> inc_adult("ShowAdultLand", false); + if (!(inc_pg || inc_mature || inc_adult)) + { + LLNotificationsUtil::add("NoContentToSearch"); + return; + } + + LLMessageSystem* msg = gMessageSystem; + + setupNewSearch(); + + // We could change the UI to allow arbitrary combinations of these options + U32 search_type = ST_ALL; + const std::string& type = childGetValue("type").asString(); + if(!type.empty()) + { + if (FIND_AUCTION == type) search_type = ST_AUCTION; + else if(FIND_MAINLANDSALES == type) search_type = ST_MAINLAND; + else if(FIND_ESTATESALES == type) search_type = ST_ESTATE; + } + + U32 query_flags = 0x0; + if (gAgent.wantsPGOnly()) query_flags |= DFQ_PG_SIMS_ONLY; + + bool adult_enabled = gAgent.canAccessAdult(); + bool mature_enabled = gAgent.canAccessMature(); + + if (inc_pg) + { + query_flags |= DFQ_INC_PG; + } + + if (inc_mature && mature_enabled) + { + query_flags |= DFQ_INC_MATURE; + } + + if (inc_adult && adult_enabled) + { + query_flags |= DFQ_INC_ADULT; + } + + // Add old flags in case we are talking to an old dataserver + if (inc_pg && !inc_mature) + { + query_flags |= DFQ_PG_SIMS_ONLY; + } + + if (!inc_pg && inc_mature) + { + query_flags |= DFQ_MATURE_SIMS_ONLY; + } + + LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results"); + if (list) + { + std::string sort_name = list->getSortColumnName(); + BOOL sort_asc = list->getSortAscending(); + + if (sort_name == "name") + { + query_flags |= DFQ_NAME_SORT; + } + else if (sort_name == "price") + { + query_flags |= DFQ_PRICE_SORT; + } + else if (sort_name == "per_meter") + { + query_flags |= DFQ_PER_METER_SORT; + } + else if (sort_name == "area") + { + query_flags |= DFQ_AREA_SORT; + } + + if (sort_asc) + { + query_flags |= DFQ_SORT_ASC; + } + } + + if (childGetValue("pricecheck").asBoolean()) + { + query_flags |= DFQ_LIMIT_BY_PRICE; + } + + if (childGetValue("areacheck").asBoolean()) + { + query_flags |= DFQ_LIMIT_BY_AREA; + } + + msg->newMessage("DirLandQuery"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("QueryData"); + msg->addUUID("QueryID", getSearchID()); + msg->addU32("QueryFlags", query_flags); + msg->addU32("SearchType", search_type); + msg->addS32("Price", childGetValue("priceedit").asInteger()); + msg->addS32("Area", childGetValue("areaedit").asInteger()); + msg->addS32Fast(_PREHASH_QueryStart,mSearchStart); + gAgent.sendReliableMessage(); +} diff --git a/indra/newview/llpaneldirland.h b/indra/newview/llpaneldirland.h new file mode 100644 index 0000000000..197c4cdc3d --- /dev/null +++ b/indra/newview/llpaneldirland.h @@ -0,0 +1,53 @@ +/** + * @file llpaneldirland.h + * @brief Land panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIRLAND_H +#define LL_LLPANELDIRLAND_H + +#include "llpaneldirbrowser.h" + +class LLUICtrl; +class LLPanelDirBrowser; + +class LLPanelDirLand : public LLPanelDirBrowser +{ +public: + LLPanelDirLand(); + /*virtual*/ ~LLPanelDirLand(); + + bool postBuild(); + + void performQuery(); + +protected: + void onClickSort(); + static void onCommitPrice(LLUICtrl* ctrl, void* data); + static void onCommitArea(LLUICtrl* ctrl, void* data); + +}; + + +#endif diff --git a/indra/newview/llpaneldirpeople.cpp b/indra/newview/llpaneldirpeople.cpp new file mode 100644 index 0000000000..6a55e3bc7c --- /dev/null +++ b/indra/newview/llpaneldirpeople.cpp @@ -0,0 +1,105 @@ +/** + * @file llpaneldirpeople.cpp + * @brief People panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirpeople.h" +#include "llviewerwindow.h" +#include "llsearcheditor.h" + +// viewer project includes +#include "llqueryflags.h" +#include "llnotificationsutil.h" + +static LLPanelInjector<LLPanelDirPeople> t_panel_dir_people("panel_dir_people"); + +LLPanelDirPeople::LLPanelDirPeople() +: LLPanelDirBrowser() +{ + mMinSearchChars = 3; +} + +bool LLPanelDirPeople::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL); + + childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this); + setDefaultBtn( "Search" ); + + return true; +} + +LLPanelDirPeople::~LLPanelDirPeople() +{ +} + +// virtual +void LLPanelDirPeople::performQuery() +{ + if (childGetValue("name").asString().length() < mMinSearchChars) + { + return; + } + + // filter short words out of the query string + // and indidate if we did have to filter it + // The shortest username is 2 characters long. + const S32 SHORTEST_WORD_LEN = 2; + bool query_was_filtered = false; + std::string query_string = LLPanelDirBrowser::filterShortWords( + childGetValue("name").asString(), + SHORTEST_WORD_LEN, + query_was_filtered ); + + // possible we threw away all the short words in the query so check length + if ( query_string.length() < mMinSearchChars ) + { + LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty"); + return; + }; + + // if we filtered something out, display a popup + if ( query_was_filtered ) + { + LLSD args; + args["FINALQUERY"] = query_string; + LLNotificationsUtil::add("SeachFilteredOnShortWords", args); + }; + + setupNewSearch(); + + U32 scope = DFQ_PEOPLE; + + // send the message + sendDirFindQuery( + gMessageSystem, + mSearchID, + query_string, + scope, + mSearchStart); +} diff --git a/indra/newview/llpaneldirpeople.h b/indra/newview/llpaneldirpeople.h new file mode 100644 index 0000000000..a8a7d17cb2 --- /dev/null +++ b/indra/newview/llpaneldirpeople.h @@ -0,0 +1,48 @@ +/** + * @file llpaneldirpeople.h + * @brief People panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIRPEOPLE_H +#define LL_LLPANELDIRPEOPLE_H + +#include "llpaneldirbrowser.h" +class LLLineEditor; +class LLFloaterDirectory; + +class LLPanelDirPeople : public LLPanelDirBrowser +{ +public: + LLPanelDirPeople(); + virtual ~LLPanelDirPeople(); + + /*virtual*/ bool postBuild(); + + /*virtual*/ void performQuery(); + + static void onClickSearch(void *userdata); + static void onKeystrokeName(LLLineEditor* line, void* data); +}; + +#endif diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp new file mode 100644 index 0000000000..3501baf697 --- /dev/null +++ b/indra/newview/llpaneldirplaces.cpp @@ -0,0 +1,184 @@ +/** + * @file llpaneldirplaces.cpp + * @brief Places panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirplaces.h" + +#include "message.h" +#include "llparcel.h" +#include "llregionflags.h" +#include "llqueryflags.h" + +#include "llagent.h" +#include "llbutton.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "llfloaterdirectory.h" +#include "lllineeditor.h" +#include "llnotificationsutil.h" +#include "llpaneldirbrowser.h" +#include "llsearcheditor.h" +#include "lltextbox.h" +#include "llviewercontrol.h" + +static LLPanelInjector<LLPanelDirPlaces> t_panel_dir_people("panel_dir_places"); + +LLPanelDirPlaces::LLPanelDirPlaces() + : LLPanelDirBrowser() +{ + mMinSearchChars = 3; +} + +bool LLPanelDirPlaces::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL); + + childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this); + setDefaultBtn("Search"); + + mCurrentSortColumn = "dwell"; + mCurrentSortAscending = false; + + return true; +} + +LLPanelDirPlaces::~LLPanelDirPlaces() +{ +} + +// virtual +void LLPanelDirPlaces::performQuery() +{ + std::string place_name = childGetValue("name").asString(); + if (place_name.length() < mMinSearchChars) + { + return; + } + + // "hi " is three chars but not a long-enough search + std::string query_string = place_name; + LLStringUtil::trim( query_string ); + bool query_was_filtered = (query_string != place_name); + + // possible we threw away all the short words in the query so check length + if ( query_string.length() < mMinSearchChars ) + { + LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty"); + return; + }; + + // if we filtered something out, display a popup + if ( query_was_filtered ) + { + LLSD args; + args["FINALQUERY"] = query_string; + LLNotificationsUtil::add("SeachFilteredOnShortWords", args); + }; + + std::string catstring = childGetValue("Category").asString(); + + // Because LLParcel::C_ANY is -1, must do special check + S32 category = 0; + if (catstring == "any") + { + category = LLParcel::C_ANY; + } + else + { + category = LLParcel::getCategoryFromString(catstring); + } + + U32 flags = 0x0; + bool adult_enabled = gAgent.canAccessAdult(); + bool mature_enabled = gAgent.canAccessMature(); + + static LLUICachedControl<bool> inc_pg("ShowPGSims", true); + static LLUICachedControl<bool> inc_mature("ShowMatureSims", false); + static LLUICachedControl<bool> inc_adult("ShowAdultSims", false); + if (!(inc_pg || inc_mature || inc_adult)) + { + LLNotificationsUtil::add("NoContentToSearch"); + return; + } + + if (inc_pg) + { + flags |= DFQ_INC_PG; + } + + if (inc_mature && mature_enabled) + { + flags |= DFQ_INC_MATURE; + } + + if (inc_adult && adult_enabled) + { + flags |= DFQ_INC_ADULT; + } + + queryCore(query_string, category, flags); +} + +void LLPanelDirPlaces::initialQuery() +{ + // All Linden locations in PG/Mature sims, any name. + U32 flags = DFQ_INC_PG | DFQ_INC_MATURE; + queryCore(LLStringUtil::null, LLParcel::C_LINDEN, flags); +} + +void LLPanelDirPlaces::queryCore(const std::string& name, S32 category, U32 flags) +{ + setupNewSearch(); + +// JC: Sorting by dwell severely impacts the performance of the query. +// Instead of sorting on the dataserver, we sort locally once the results +// are received. +// IW: Re-enabled dwell sort based on new 3-character minimum description +// Hopefully we'll move to next-gen Find before this becomes a big problem + + flags |= DFQ_DWELL_SORT; + + LLMessageSystem* msg = gMessageSystem; + + msg->newMessage("DirPlacesQuery"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("QueryData"); + msg->addUUID("QueryID", getSearchID()); + msg->addString("QueryText", name); + msg->addU32("QueryFlags", flags); + msg->addS8("Category", (S8)category); + // No longer support queries by region name, too many regions + // for combobox, no easy way to do autocomplete. JC + msg->addString("SimName", ""); + msg->addS32Fast(_PREHASH_QueryStart,mSearchStart); + gAgent.sendReliableMessage(); +} + diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llpaneldirplaces.h index 9b21b62747..069414ebf5 100644 --- a/indra/newview/llfloatersounddevices.h +++ b/indra/newview/llpaneldirplaces.h @@ -1,11 +1,10 @@ /** - * @file llfloatersounddevices.h - * @author Leyla Farazha - * @brief Sound Preferences used for minimal skin + * @file llpaneldirplaces.h + * @brief Places panel in the legacy Search directory. * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2025, 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 @@ -25,25 +24,28 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERSOUNDDEVICES_H -#define LL_LLFLOATERSOUNDDEVICES_H +#ifndef LL_LLPANELDIRPLACES_H +#define LL_LLPANELDIRPLACES_H -#include "lltransientdockablefloater.h" +#include "llpaneldirbrowser.h" -class LLFloaterSoundDevices : public LLTransientDockableFloater +class LLLineEditor; + +class LLPanelDirPlaces : public LLPanelDirBrowser { public: - - LOG_CLASS(LLFloaterSoundDevices); - - LLFloaterSoundDevices(const LLSD& key); - ~LLFloaterSoundDevices(); + LLPanelDirPlaces(); + virtual ~LLPanelDirPlaces(); bool postBuild() override; - void setDocked(bool docked, bool pop_on_undock = true) override; - void setFocus(bool b) override; -}; + void performQuery() override; + + // Initially fill in some data for the panel. + void initialQuery(); -#endif //LL_LLFLOATERSOUNDDEVICES_H +private: + void queryCore(const std::string& name, S32 category, U32 flags); +}; +#endif diff --git a/indra/newview/llpaneldirweb.cpp b/indra/newview/llpaneldirweb.cpp new file mode 100644 index 0000000000..9e76bb81a6 --- /dev/null +++ b/indra/newview/llpaneldirweb.cpp @@ -0,0 +1,148 @@ +/** + * @file llpaneldirweb.cpp + * @brief Web panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneldirweb.h" + +#include "llagent.h" +#include "llbutton.h" +#include "llfloaterdirectory.h" +#include "lltextbox.h" +#include "llviewercontrol.h" +#include "llweb.h" + +static LLPanelInjector<LLPanelDirWeb> t_panel_dir_web("panel_dir_web"); + +LLPanelDirWeb::LLPanelDirWeb() +: LLPanel(), + mFloaterDirectory(nullptr), + mWebBrowser(nullptr) +{ +} + +bool LLPanelDirWeb::postBuild() +{ + childSetAction("home_btn", onClickHome, this); + + mBtnBack = getChild<LLButton>("back_btn"); + mBtnForward = getChild<LLButton>("forward_btn"); + mStatusBarText = getChild<LLTextBox>("statusbartext"); + + mBtnBack->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateBack(); }); + mBtnForward->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateForward(); }); + + mWebBrowser = findChild<LLMediaCtrl>("web_search"); + navigateToDefaultPage(); + mWebBrowser->addObserver(this); + + return true; +} + +void LLPanelDirWeb::draw() +{ + // Asynchronous so we need to keep checking + mBtnBack->setEnabled(mWebBrowser->canNavigateBack()); + mBtnForward->setEnabled(mWebBrowser->canNavigateForward()); + + LLPanel::draw(); +} + +LLPanelDirWeb::~LLPanelDirWeb() +{ +} + +// When we show any browser-based view, we want to hide all +// the right-side XUI detail panels. +// virtual +void LLPanelDirWeb::onVisibilityChange(bool new_visibility) +{ + if (new_visibility && mFloaterDirectory) + { + mFloaterDirectory->hideAllDetailPanels(); + } + LLPanel::onVisibilityChange(new_visibility); +} + +void LLPanelDirWeb::navigateToDefaultPage() +{ + std::string url = gSavedSettings.getString("SearchURL"); + + LLSD subs; + subs["QUERY"] = ""; + subs["TYPE"] = "standard"; + // Default to PG + std::string maturity = "g"; + if (gAgent.prefersAdult()) + { + // PG,Mature,Adult + maturity = "gma"; + } + else if (gAgent.prefersMature()) + { + // PG,Mature + maturity = "gm"; + } + subs["MATURITY"] = maturity; + url = LLWeb::expandURLSubstitutions(url, subs); + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); +} + +// static +void LLPanelDirWeb::onClickHome( void* data ) +{ + LLPanelDirWeb* self = (LLPanelDirWeb*)data; + if (!self) + return; + self->navigateToDefaultPage(); +} + +void LLPanelDirWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) +{ + if (event == MEDIA_EVENT_LOCATION_CHANGED) + { + const std::string url = self->getLocation(); + if (url.length()) + mStatusBarText->setText(url); + } + else if (event == MEDIA_EVENT_NAVIGATE_COMPLETE) + { + // we populate the status bar with URLs as they change so clear it now we're done + const std::string end_str = ""; + mStatusBarText->setText(end_str); + } + else if (event == MEDIA_EVENT_STATUS_TEXT_CHANGED) + { + const std::string text = self->getStatusText(); + if (text.length()) + mStatusBarText->setText(text); + } + else if (event == MEDIA_EVENT_LINK_HOVERED) + { + const std::string link = self->getHoverLink(); + mStatusBarText->setText(link); + } +} diff --git a/indra/newview/llpaneldirweb.h b/indra/newview/llpaneldirweb.h new file mode 100644 index 0000000000..db7bdc4a6a --- /dev/null +++ b/indra/newview/llpaneldirweb.h @@ -0,0 +1,63 @@ +/** + * @file llpaneldirweb.h + * @brief Web panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELDIRWEB_H +#define LL_LLPANELDIRWEB_H + +#include "llpanel.h" +#include "llmediactrl.h" + +class LLTextBox; +class LLFloaterDirectory; +class LLWebBrowserCtrlObserver; + +class LLPanelDirWeb : public LLPanel, public LLViewerMediaObserver +{ +public: + LLPanelDirWeb(); + ~LLPanelDirWeb(); + + bool postBuild() override; + void onVisibilityChange(bool new_visibility) override; + void draw() override; + + void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override; + + void navigateToDefaultPage(); + + void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; } + +protected: + static void onClickHome( void* data ); + + LLButton* mBtnBack; + LLButton* mBtnForward; + LLTextBox* mStatusBarText; + LLFloaterDirectory* mFloaterDirectory; + LLMediaCtrl* mWebBrowser; +}; + +#endif diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 3d376251ff..578206a768 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -35,7 +35,6 @@ #include "llvirtualtrackball.h" #include "llsettingssky.h" #include "llenvironment.h" -#include "llatmosphere.h" #include "llviewercontrol.h" namespace @@ -926,13 +925,6 @@ void LLPanelSettingsSkyDensityTab::updateProfile() mSkySettings->setAbsorptionConfigs(absorption_config); mSkySettings->update(); setIsDirty(); - - if (gAtmosphere) - { - AtmosphericModelSettings atmospheric_settings; - LLEnvironment::getAtmosphericModelSettings(atmospheric_settings, mSkySettings); - gAtmosphere->configureAtmosphericModel(atmospheric_settings); - } } void LLPanelSettingsSkyDensityTab::onRayleighExponentialChanged() diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 282b6d4a0a..8bcb6e9ec3 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -438,7 +438,7 @@ template <typename T> const LLEditWearableDictionary::PickerControlEntry* get_picker_entry (const ETextureIndex index) { return NULL; } -typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t; +typedef std::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t; typedef struct PickerControlEntryNamePredicate { diff --git a/indra/newview/llpaneleventinfo.cpp b/indra/newview/llpaneleventinfo.cpp new file mode 100644 index 0000000000..43b20b3851 --- /dev/null +++ b/indra/newview/llpaneleventinfo.cpp @@ -0,0 +1,195 @@ +/** + * @file llpaneleventinfo.cpp + * @brief Info panel for events in the legacy Search + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llpaneleventinfo.h" + +#include "llagent.h" +#include "llbutton.h" +#include "lleventflags.h" +#include "llfloaterreg.h" +#include "llfloaterworldmap.h" +#include "lltextbox.h" +#include "llviewertexteditor.h" +#include "llworldmap.h" + +static LLPanelInjector<LLPanelEventInfo> t_panel_event_info("panel_event_info"); + +LLPanelEventInfo::LLPanelEventInfo() + : LLPanel() +{ +} + +LLPanelEventInfo::~LLPanelEventInfo() +{ + if (mEventInfoConnection.connected()) + { + mEventInfoConnection.disconnect(); + } +} + +bool LLPanelEventInfo::postBuild() +{ + mTBName = getChild<LLTextBox>("event_name"); + + mTBCategory = getChild<LLTextBox>("event_category"); + mTBDate = getChild<LLTextBox>("event_date"); + mTBDuration = getChild<LLTextBox>("event_duration"); + mTBDesc = getChild<LLTextEditor>("event_desc"); + mTBDesc->setWordWrap(true); + + mTBRunBy = getChild<LLTextBox>("event_runby"); + mTBLocation = getChild<LLTextBox>("event_location"); + mTBCover = getChild<LLTextBox>("event_cover"); + + mTeleportBtn = getChild<LLButton>( "teleport_btn"); + mTeleportBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickTeleport, this)); + + mMapBtn = getChild<LLButton>( "map_btn"); + mMapBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickMap, this)); + + mNotifyBtn = getChild<LLButton>( "notify_btn"); + mNotifyBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickNotify, this)); + + mEventInfoConnection = gEventNotifier.setEventInfoCallback(boost::bind(&LLPanelEventInfo::processEventInfoReply, this, _1)); + + return true; +} + +void LLPanelEventInfo::setEventID(const U32 event_id) +{ + mEventID = event_id; + + if (event_id != 0) + { + sendEventInfoRequest(); + } +} + +void LLPanelEventInfo::sendEventInfoRequest() +{ + LLMessageSystem *msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventInfoRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, mEventID); + gAgent.sendReliableMessage(); +} + +bool LLPanelEventInfo::processEventInfoReply(LLEventInfo event) +{ + if (event.mID != getEventID()) + return false; + + mTBName->setText(event.mName); + mTBName->setToolTip(event.mName); + mTBCategory->setText(event.mCategoryStr); + mTBDate->setText(event.mTimeStr); + mTBDesc->setText(event.mDesc); + mTBRunBy->setText(LLSLURL("agent", event.mRunByID, "inspect").getSLURLString()); + + mTBDuration->setText(llformat("%d:%.2d", event.mDuration / 60, event.mDuration % 60)); + + if (!event.mHasCover) + { + mTBCover->setText(getString("none")); + } + else + { + mTBCover->setText(llformat("%d", event.mCover)); + } + + mTBLocation->setText(LLSLURL(event.mSimName, event.mPosGlobal).getSLURLString()); + + if (event.mEventFlags & EVENT_FLAG_MATURE) + { + childSetVisible("event_mature_yes", true); + childSetVisible("event_mature_no", false); + } + else + { + childSetVisible("event_mature_yes", false); + childSetVisible("event_mature_no", true); + } + + if (event.mUnixTime < time_corrected()) + { + mNotifyBtn->setEnabled(false); + } + else + { + mNotifyBtn->setEnabled(true); + } + + if (gEventNotifier.hasNotification(event.mID)) + { + mNotifyBtn->setLabel(getString("dont_notify")); + } + else + { + mNotifyBtn->setLabel(getString("notify")); + } + mEventInfo = event; + return true; +} + +void LLPanelEventInfo::onClickTeleport() +{ + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) + { + world_map->trackLocation(mEventInfo.mPosGlobal); + gAgent.teleportViaLocation(mEventInfo.mPosGlobal); + } +} + +void LLPanelEventInfo::onClickMap() +{ + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) + { + world_map->trackLocation(mEventInfo.mPosGlobal); + LLFloaterReg::showInstance("world_map", "center"); + } +} + +void LLPanelEventInfo::onClickNotify() +{ + if (!gEventNotifier.hasNotification(mEventID)) + { + gEventNotifier.add(mEventInfo.mID, mEventInfo.mUnixTime, mEventInfo.mTimeStr, mEventInfo.mName); + mNotifyBtn->setLabel(getString("dont_notify")); + } + else + { + gEventNotifier.remove(mEventInfo.mID); + mNotifyBtn->setLabel(getString("notify")); + } +} diff --git a/indra/newview/llpaneleventinfo.h b/indra/newview/llpaneleventinfo.h new file mode 100644 index 0000000000..4f0e547493 --- /dev/null +++ b/indra/newview/llpaneleventinfo.h @@ -0,0 +1,76 @@ +/** + * @file llpaneleventinfo.h + * @brief Info panel for events in the legacy Search + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLPANELEVENTINFO_H +#define LL_LLPANELEVENTINFO_H + +#include "lleventnotifier.h" + +class LLTextBox; +class LLTextEditor; +class LLButton; + +class LLPanelEventInfo : public LLPanel +{ +public: + LLPanelEventInfo(); + /*virtual*/ ~LLPanelEventInfo(); + + /*virtual*/ bool postBuild() override; + + void setEventID(const U32 event_id); + void sendEventInfoRequest(); + + bool processEventInfoReply(LLEventInfo event); + + U32 getEventID() { return mEventID; } + +protected: + void onClickTeleport(); + void onClickMap(); + void onClickNotify(); + +protected: + LLTextBox* mTBName; + LLTextBox* mTBCategory; + LLTextBox* mTBDate; + LLTextBox* mTBDuration; + LLTextEditor* mTBDesc; + + LLTextBox* mTBRunBy; + LLTextBox* mTBLocation; + LLTextBox* mTBCover; + + LLButton* mTeleportBtn; + LLButton* mMapBtn; + LLButton* mNotifyBtn; + + U32 mEventID; + LLEventInfo mEventInfo; + boost::signals2::connection mEventInfoConnection; +}; + +#endif // LL_LLPANELEVENTINFO_H diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h index 7ff1ddac5a..70bc2ecd3c 100644 --- a/indra/newview/llpanelexperiencelisteditor.h +++ b/indra/newview/llpanelexperiencelisteditor.h @@ -42,7 +42,7 @@ public: typedef boost::signals2::signal<void (const LLUUID&) > list_changed_signal_t; // filter function for experiences, return true if the experience should be hidden. - typedef boost::function<bool (const LLSD&)> experience_function; + typedef std::function<bool(const LLSD&)> experience_function; typedef std::vector<experience_function> filter_list; typedef LLHandle<LLFloaterExperiencePicker> PickerHandle; LLPanelExperienceListEditor(); diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index 72c0b1b74d..5cde0a03fb 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -39,9 +39,9 @@ public: friend class LLExperienceSearchResponder; friend class LLFloaterExperiencePicker; - typedef boost::function<void (const uuid_vec_t&)> select_callback_t; + typedef std::function<void(const uuid_vec_t&)> select_callback_t; // filter function for experiences, return true if the experience should be hidden. - typedef boost::function<bool (const LLSD&)> filter_function; + typedef std::function<bool(const LLSD&)> filter_function; typedef std::vector<filter_function> filter_list; LLPanelExperiencePicker(); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index fc5c468297..e8cb53d263 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -852,6 +852,27 @@ struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); } + + // Also align GLTF material if any + S32 gltf_info_index = 0; // base texture + LLVector2 gltf_offset, gltf_scale; + F32 gltf_rot; + if (facep->calcAlignedPlanarGLTF(mCenterFace, &gltf_offset, &gltf_scale, &gltf_rot, gltf_info_index)) + { + LLGLTFMaterial new_override; + const LLTextureEntry* tep = object->getTE(te); + if (tep && tep->getGLTFMaterialOverride()) + { + new_override = *tep->getGLTFMaterialOverride(); + } + + LLGLTFMaterial::TextureTransform& transform = new_override.mTextureTransform[gltf_info_index]; + transform.mOffset.set(gltf_offset.mV[0], gltf_offset.mV[1]); + transform.mScale.set(gltf_scale.mV[0], gltf_scale.mV[1]); + transform.mRotation = gltf_rot; + + LLGLTFMaterialList::queueModify(object, te, &new_override); + } } if (!set_aligned) { @@ -1166,26 +1187,22 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bool missing_asset = false; { LLGLenum image_format = GL_RGB; + bool has_alpha = false; bool identical_image_format = false; - LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset); + LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset); if (!missing_asset) { - mIsAlpha = false; + mIsAlpha = has_alpha; switch (image_format) { case GL_RGBA: case GL_ALPHA: - { - mIsAlpha = true; - } - break; - case GL_RGB: break; default: { - LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL; + LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL; } break; } @@ -1205,7 +1222,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) // See if that's been overridden by a material setting for same... // - LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode, mIsAlpha); + LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode); // it is invalid to have any alpha mode other than blend if transparency is greater than zero ... // Want masking? Want emissive? Tough! You get BLEND! @@ -1215,6 +1232,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode); + mComboAlphaMode->setTentative(!identical_alpha_mode); + if (!identical_alpha_mode) + { + std::string multiple = LLTrans::getString("multiple_textures"); + mComboAlphaMode->setLabel(multiple); + } updateAlphaControls(); mExcludeWater &= (LLMaterial::DIFFUSE_ALPHA_MODE_BLEND == alpha_mode); @@ -1904,7 +1927,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) if (mColorSwatch) { mColorSwatch->setEnabled( false ); - mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") ); + mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image") ); mColorSwatch->setValid(false); } @@ -3292,23 +3315,22 @@ void LLPanelFace::onSelectTexture() sendTexture(); LLGLenum image_format; + bool has_alpha; bool identical_image_format = false; bool missing_asset = false; - LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset); + LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset); - U32 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE; if (!missing_asset) { + U32 alpha_mode = has_alpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; switch (image_format) { case GL_RGBA: case GL_ALPHA: - alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND; - break; case GL_RGB: break; default: - LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL; + LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL; break; } @@ -5258,12 +5280,13 @@ void LLPanelFace::LLSelectedTE::getFace(LLFace*& face_to_return, bool& identical identical_face = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_te_face_func, face_to_return, false, (LLFace*)nullptr); } -void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset) +void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset) { struct LLSelectedTEGetmatId : public LLSelectedTEFunctor { LLSelectedTEGetmatId() : mImageFormat(GL_RGB) + , mHasAlpha(false) , mIdentical(true) , mMissingAsset(false) , mFirstRun(true) @@ -5278,6 +5301,10 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, { format = image->getPrimaryFormat(); missing = image->isMissingAsset(); + if (format == GL_RGBA || format == GL_ALPHA) + { + mHasAlpha = true; + } } if (mFirstRun) @@ -5294,6 +5321,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, return true; } LLGLenum mImageFormat; + bool mHasAlpha; bool mIdentical; bool mMissingAsset; bool mFirstRun; @@ -5301,6 +5329,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func); image_format_to_return = func.mImageFormat; + has_alpha = func.mHasAlpha; identical_face = func.mIdentical; missing_asset = func.mMissingAsset; } @@ -5482,32 +5511,40 @@ void LLPanelFace::LLSelectedTEMaterial::getMaxNormalRepeats(F32& repeats, bool& identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &max_norm_repeats_func, repeats); } -void LLPanelFace::LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha) +void LLPanelFace::LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical) { struct LLSelectedTEGetDiffuseAlphaMode : public LLSelectedTEGetFunctor<U8> { - LLSelectedTEGetDiffuseAlphaMode() : _isAlpha(false) {} - LLSelectedTEGetDiffuseAlphaMode(bool diffuse_texture_has_alpha) : _isAlpha(diffuse_texture_has_alpha) {} + LLSelectedTEGetDiffuseAlphaMode() {} virtual ~LLSelectedTEGetDiffuseAlphaMode() {} U8 get(LLViewerObject* object, S32 face) { - U8 diffuse_mode = _isAlpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; - LLTextureEntry* tep = object->getTE(face); if (tep) { LLMaterial* mat = tep->getMaterialParams().get(); if (mat) { - diffuse_mode = mat->getDiffuseAlphaMode(); + return mat->getDiffuseAlphaMode(); + } + } + + bool has_alpha = false; + LLViewerTexture* image = object->getTEImage(face); + if (image) + { + LLGLenum format = image->getPrimaryFormat(); + if (format == GL_RGBA || format == GL_ALPHA) + { + has_alpha = true; } } + U8 diffuse_mode = has_alpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; return diffuse_mode; } - bool _isAlpha; // whether or not the diffuse texture selected contains alpha information - } get_diff_mode(diffuse_texture_has_alpha); + } get_diff_mode; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &get_diff_mode, diffuse_alpha_mode); } diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 0911378582..86d5282518 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -652,7 +652,7 @@ public: static void getCurrent(LLMaterialPtr& material_ptr, bool& identical_material); static void getMaxSpecularRepeats(F32& repeats, bool& identical); static void getMaxNormalRepeats(F32& repeats, bool& identical); - static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha); + static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical); static void selectionNormalScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter); static void selectionSpecularScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter); @@ -697,7 +697,7 @@ public: { public: static void getFace(class LLFace*& face_to_return, bool& identical_face); - static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset); + static void getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset); static void getTexId(LLUUID& id, bool& identical); static void getPbrMaterialId(LLUUID& id, bool& identical, bool& has_pbr, bool& has_faces_without_pbr); static void getObjectScaleS(F32& scale_s, bool& identical); diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index bc2b28269f..1b5228713e 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -43,5 +43,13 @@ LLPanelGenericTip::LLPanelGenericTip( S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count); + + // Check if notification should respond to mouse clicks + if (notification->getPayload().has("respond_on_mousedown") + && notification->getPayload()["respond_on_mousedown"]) + { + setMouseDownCallback(boost::bind(&LLNotification::respond, + notification, notification->getResponseTemplate())); + } } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 65aa1876b0..ad65293b98 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -191,6 +191,13 @@ bool LLPanelGroup::postBuild() mButtonJoin->setCommitCallback(boost::bind(&LLPanelGroup::onBtnJoin,this)); mJoinText = panel_general->getChild<LLUICtrl>("join_cost_text"); + + mButtonActivate = panel_general->getChild<LLButton>("btn_activate"); + mButtonActivate->setVisible(false); + mButtonActivate->setEnabled(gAgent.getGroupID() != mID); + mButtonActivate->setCommitCallback(boost::bind(&LLPanelGroup::onBtnActivate, this)); + + gAgent.addListener(this, "new group"); } LLVoiceClient::addObserver(this); @@ -231,6 +238,12 @@ void LLPanelGroup::onBackBtnClick() } } +void LLPanelGroup::hideBackBtn() +{ + childSetVisible("back", false); + setBackgroundVisible(false); +} + void LLPanelGroup::onBtnRefresh(void* user_data) { LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data); @@ -261,6 +274,7 @@ void LLPanelGroup::onBtnJoin() if (LLGroupActions::isInGroup(mID)) { LLGroupActions::leave(mID); + mButtonActivate->setVisible(false); } else { @@ -269,6 +283,12 @@ void LLPanelGroup::onBtnJoin() } } +void LLPanelGroup::onBtnActivate() +{ + LLGroupActions::activate(mID); + mButtonActivate->setEnabled(false); +} + void LLPanelGroup::changed(LLGroupChange gc) { for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) @@ -306,6 +326,8 @@ void LLPanelGroup::update(LLGroupChange gc) bool join_btn_visible = is_member || gdatap->mOpenEnrollment; mButtonJoin->setVisible(join_btn_visible); + mButtonActivate->setEnabled(gAgent.getGroupID() != mID); + mButtonActivate->setVisible(is_member); mJoinText->setVisible(join_btn_visible); if (is_member) @@ -378,6 +400,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(mButtonJoin) mButtonJoin->setVisible(false); + if (mButtonActivate) + mButtonActivate->setVisible(false); if(is_null_group_id)//creating new group @@ -592,4 +616,20 @@ void LLPanelGroup::showNotice(const std::string& subject, } +bool LLPanelGroup::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + if (event->desc() == "new group") + { + mButtonActivate->setEnabled(gAgent.getGroupID() != mID); + return true; + } + + if (event->desc() == "value_changed") + { + mButtonActivate->setEnabled(gAgent.getGroupID() != mID); + return true; + } + + return false; +} diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index fa0e1d4104..d3550264a0 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -26,6 +26,7 @@ #ifndef LL_LLPANELGROUP_H #define LL_LLPANELGROUP_H +#include "llevent.h" #include "llgroupmgr.h" #include "llpanel.h" #include "lltimer.h" @@ -44,7 +45,8 @@ class LLAgent; class LLPanelGroup : public LLPanel, public LLGroupMgrObserver, - public LLVoiceClientStatusObserver + public LLVoiceClientStatusObserver, + public LLOldEvents::LLSimpleListener { public: LLPanelGroup(); @@ -87,12 +89,14 @@ public: const std::string& inventory_name, LLOfferInfo* inventory_offer); + void hideBackBtn(); protected: virtual void update(LLGroupChange gc); void onBackBtnClick(); void onBtnJoin(); + void onBtnActivate(); static void onBtnApply(void*); static void onBtnRefresh(void*); @@ -119,11 +123,15 @@ protected: LLUICtrl* mGroupNameCtrl = nullptr; LLButton* mButtonJoin = nullptr; + LLButton* mButtonActivate = nullptr; LLButton* mButtonApply = nullptr; LLButton* mButtonCall = nullptr; LLButton* mButtonChat = nullptr; LLButton* mButtonRefresh = nullptr; LLUICtrl* mJoinText; + +private: + bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); // for agent group list changes }; class LLPanelGroupTab : public LLPanel diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ed80c8b732..15cc8b421c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -37,6 +37,9 @@ #include "llappviewer.h" #include "llbutton.h" +#if LL_VELOPACK +#include "llvelopack.h" +#endif #include "llcheckboxctrl.h" #include "llcommandhandler.h" // for secondlife:///app/login/ #include "llcombobox.h" @@ -48,6 +51,7 @@ #include "llstartup.h" #include "lltextbox.h" #include "llui.h" +#include "llframetimer.h" #include "lluiconstants.h" #include "llslurl.h" #include "llversioninfo.h" @@ -174,6 +178,19 @@ public: }; LLLoginLocationAutoHandler gLoginLocationAutoHandler; +std::string getShortGridLabel(const std::string& slurl_grid) +{ + if (slurl_grid == MAINGRID) + { + return LLTrans::getString("AgniGridLabelShort"); + } + if (slurl_grid == BETAGRID) + { + return LLTrans::getString("AditiGridLabelShort"); + } + return LLGridManager::getInstance()->getGridLabel(slurl_grid); +} + //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -183,12 +200,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, : LLPanel(), mCallback(callback), mCallbackData(cb_data), - mListener(new LLPanelLoginListener(this)), - mFirstLoginThisInstall(gSavedSettings.getBOOL("FirstLoginThisInstall")), + mListener(std::make_unique<LLPanelLoginListener>(this)), mUsernameLength(0), mPasswordLength(0), mLocationLength(0), - mShowFavorites(false) + mShowFavorites(false), + mAlertNotif(false) { setBackgroundVisible(false); setBackgroundOpaque(true); @@ -203,15 +220,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, login_holder->addChild(this); } - if (mFirstLoginThisInstall) - { - buildFromFile( "panel_login_first.xml"); - } - else - { - buildFromFile( "panel_login.xml"); - } - + buildFromFile( "panel_login.xml"); reshape(rect.getWidth(), rect.getHeight()); LLLineEditor* password_edit(getChild<LLLineEditor>("password_edit")); @@ -219,13 +228,20 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // STEAM-14: When user presses Enter with this field in focus, initiate login password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); + childSetAction("connect_btn", onClickConnect, this); + childSetAction("sign_btn", onClickSignUp, this); + + mLoginBtn = getChild<LLButton>("connect_btn"); + setDefaultBtn(mLoginBtn); + // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - sendChildToBack(getChildView("sign_up_text")); + + mLoginStack = getChild<LLLayoutStack>("login_stack"); + mGridPanel = getChild<LLLayoutPanel>("grid_panel"); std::string current_grid = LLGridManager::getInstance()->getGrid(); - if (!mFirstLoginThisInstall) - { + LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); @@ -245,17 +261,16 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, if (!grid_choice->first.empty() && current_grid != grid_choice->first) { LL_DEBUGS("AppInit") << "adding " << grid_choice->first << LL_ENDL; - server_choice_combo->add(grid_choice->second, grid_choice->first); + server_choice_combo->add(getShortGridLabel(grid_choice->first), grid_choice->first); } } server_choice_combo->sortByName(); LL_DEBUGS("AppInit") << "adding current " << current_grid << LL_ENDL; - server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), + server_choice_combo->add(getShortGridLabel(current_grid), current_grid, ADD_TOP); server_choice_combo->selectFirstItem(); - } LLSLURL start_slurl(LLStartUp::getStartSLURL()); // The StartSLURL might have been set either by an explicit command-line @@ -295,11 +310,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, onUpdateStartSLURL(start_slurl); // updates grid if needed } - childSetAction("connect_btn", onClickConnect, this); - - LLButton* def_btn = getChild<LLButton>("connect_btn"); - setDefaultBtn(def_btn); - std::string channel = LLVersionInfo::instance().getChannel(); std::string version = stringize(LLVersionInfo::instance().getShortVersion(), " (", LLVersionInfo::instance().getBuild(), ')'); @@ -307,12 +317,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* sign_up_text = getChild<LLTextBox>("sign_up_text"); - sign_up_text->setClickedCallback(onClickSignUp, NULL); - // get the web browser control - LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); - web_browser->addObserver(this); + mWebBrowser = getChild<LLMediaCtrl>("login_html"); + mWebBrowser->addObserver(this); loadLoginPage(); @@ -327,19 +334,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name"); remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this)); getChild<LLCheckBoxCtrl>("remember_password")->setCommitCallback(boost::bind(&LLPanelLogin::onRememberPasswordCheck, this)); + + mAlertListener = LLNotifications::instance().getChannel("Alerts")->connectChanged([this](const LLSD& notify){ return onUpdateNotification(notify); }); } void LLPanelLogin::addFavoritesToStartLocation() { - if (mFirstLoginThisInstall) - { - // first login panel has no favorites, just update name length and buttons - std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); - mUsernameLength = static_cast<unsigned int>(user_defined_name.length()); - updateLoginButtons(); - return; - } - // Clear the combo. LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); if (!combo) return; @@ -409,7 +409,7 @@ void LLPanelLogin::addFavoritesToStartLocation() gSavedSettings.setBOOL("RememberPassword", save_password); if (!save_password) { - getChild<LLButton>("connect_btn")->setEnabled(false); + mLoginBtn->setEnabled(false); } update_password_setting = false; } @@ -559,16 +559,8 @@ void LLPanelLogin::resetFields() // function is used to reset list in case of changes by external sources return; } - if (sInstance->mFirstLoginThisInstall) - { - // no list to populate - LL_WARNS() << "Shouldn't happen, user should have no ability to modify list on first install" << LL_ENDL; - } - else - { - LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - sInstance->populateUserList(cred); - } + LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); + sInstance->populateUserList(cred); } // static @@ -749,6 +741,11 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { server_combo->setVisible(show_server); } + if (LLTextBox* grid_txt = sInstance->getChild<LLTextBox>("grid_text")) + { + grid_txt->setVisible(show_server); + } + sInstance->collapseGridPanel(!show_server); } } @@ -784,7 +781,7 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) // update the grid selector to match the slurl LLComboBox* server_combo = sInstance->getChild<LLComboBox>("server_combo"); - std::string server_label(LLGridManager::getInstance()->getGridLabel(slurl_grid)); + std::string server_label(getShortGridLabel(slurl_grid)); server_combo->setSimple(server_label); updateServer(); // to change the links and splash screen @@ -857,11 +854,9 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh) { if (sInstance && LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) { - LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - - if (web_browser) + if (sInstance->mWebBrowser) { - web_browser->setAlwaysRefresh(refresh); + sInstance->mWebBrowser->setAlwaysRefresh(refresh); } } } @@ -918,16 +913,35 @@ void LLPanelLogin::loadLoginPage() gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); - LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - if (web_browser->getCurrentNavUrl() != login_uri.asString()) + if (sInstance->mWebBrowser) { - LL_DEBUGS("AppInit") << "loading: " << login_uri << LL_ENDL; - web_browser->navigateTo( login_uri.asString(), "text/html" ); + if (sInstance->mWebBrowser->getCurrentNavUrl() != login_uri.asString()) + { + LL_DEBUGS("AppInit") << "loading: " << login_uri << LL_ENDL; + sInstance->mWebBrowser->navigateTo(login_uri.asString(), "text/html"); + } + } + else + { + LL_WARNS("AppInit") << "No web browser control for login panel" << LL_ENDL; } } -void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) +void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) { + constexpr F32 REFRESH_DELAY = 2.f; + switch (event) + { + case MEDIA_EVENT_SIZE_CHANGED: + { + mForceRefreshTimer.reset(); + mForceRefreshTimer.setTimerExpirySec(REFRESH_DELAY); + mForceRefresh = true; + break; + } + default: + break; + } } //--------------------------------------------------------------------------- @@ -936,7 +950,20 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev // static void LLPanelLogin::onClickConnect(bool commit_fields) { - if (sInstance && sInstance->mCallback) +#if LL_VELOPACK + // In theory, you should never be able to get here. + // If there's a required update, try as you might you're not supposed to actually close the downloading update dialog. + // But just in case... + if (velopack_is_required_update_in_progress()) + { + LLSD args; + args["VERSION"] = velopack_get_required_update_version(); + LLNotificationsUtil::add("DownloadingUpdate", args); + return; + } +#endif + + if (sInstance && sInstance->mCallback && !sInstance->mAlertNotif) { if (commit_fields) { @@ -1081,8 +1108,7 @@ void LLPanelLogin::onRememberUserCheck(void*) LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo")); bool remember = remember_name->getValue().asBoolean(); - if (!sInstance->mFirstLoginThisInstall - && user_combo->getCurrentIndex() != -1 + if (user_combo->getCurrentIndex() != -1 && !remember) { remember = true; @@ -1193,21 +1219,16 @@ void LLPanelLogin::updateServer() void LLPanelLogin::updateLoginButtons() { - LLButton* login_btn = getChild<LLButton>("connect_btn"); + mLoginBtn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0 && !mAlertNotif); - login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0); - - if (!mFirstLoginThisInstall) + LLComboBox* user_combo = getChild<LLComboBox>("username_combo"); + LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name"); + if (user_combo->getCurrentIndex() != -1) { - LLComboBox* user_combo = getChild<LLComboBox>("username_combo"); - LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name"); - if (user_combo->getCurrentIndex() != -1) - { - remember_name->setValue(true); - LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>("remember_password"); - remember_pass->setEnabled(true); - } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user - } + remember_name->setValue(true); + LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>("remember_password"); + remember_pass->setEnabled(true); + } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user } void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential) @@ -1367,3 +1388,48 @@ std::string LLPanelLogin::getUserName(LLPointer<LLCredential> &cred) return "unknown"; } +bool LLPanelLogin::onUpdateNotification(const LLSD& notify) +{ + // disable Login button while alert notification is displayed + LLNotificationPtr notifyp = LLNotifications::instance().find(notify["id"].asUUID()); + if (notifyp && notifyp->getName() == "PromptOptionalUpdate") + { + std::string sigtype = notify["sigtype"].asString(); + if (sigtype == "add") + { + mAlertNotif = true; + } + else if (sigtype == "delete") + { + mAlertNotif = false; + } + updateLoginButtons(); + } + return false; +} + +void LLPanelLogin::collapseGridPanel(bool collapse) +{ + if (mGridPanel->isCollapsed() == collapse) + { + return; + } + mLoginStack->collapsePanel(mGridPanel, collapse); + mLoginStack->updateLayout(); +} + +void LLPanelLogin::draw() +{ + LLPanel::draw(); + + // Workaround for the black screen issue (see #5607) + // Should be removed after the proper fix for resizing is implemented + if (mForceRefresh && mForceRefreshTimer.hasExpired()) + { + if (mWebBrowser->getMediaPlugin()) + { + mWebBrowser->getMediaPlugin()->forceRenderRefresh(); + } + mForceRefresh = false; + } +} diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index a1bf25fb05..a00081795e 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -48,6 +48,8 @@ public: void *callback_data); ~LLPanelLogin(); + void draw(); + virtual void setFocus( bool b ); static void show(const LLRect &rect, @@ -87,6 +89,8 @@ public: // extract name from cred in a format apropriate for username field static std::string getUserName(LLPointer<LLCredential> &cred); + void collapseGridPanel(bool collapse); + private: friend class LLPanelLoginListener; void addFavoritesToStartLocation(); @@ -105,8 +109,11 @@ private: static void onRememberPasswordCheck(void*); static void onPassKey(LLLineEditor* caller, void* user_data); + bool onUpdateNotification(const LLSD& notify); + private: std::unique_ptr<LLPanelLoginListener> mListener; + LLTempBoundListener mAlertListener; void updateLoginButtons(); void populateUserList(LLPointer<LLCredential> credential); @@ -119,13 +126,22 @@ private: static LLPanelLogin* sInstance; static bool sCapslockDidNotification; - bool mFirstLoginThisInstall; static bool sCredentialSet; unsigned int mUsernameLength; unsigned int mPasswordLength; unsigned int mLocationLength; + + LLTimer mForceRefreshTimer; + bool mForceRefresh {false}; + + bool mAlertNotif; + LLButton* mLoginBtn; + LLLayoutPanel* mGridPanel; + LLLayoutStack* mLoginStack; + + LLMediaCtrl* mWebBrowser; }; #endif diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index ad7aa57842..04eebcefc1 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -216,14 +216,14 @@ bool LLPanelMainInventory::postBuild() mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2)); } - LLInventoryPanel* favorites_panel = getChild<LLInventoryPanel>(FAVORITES); - if (favorites_panel) + mFavoritesPanel = getChild<LLInventoryPanel>(FAVORITES); + if (mFavoritesPanel) { - favorites_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); - LLInventoryFilter& favorites_filter = favorites_panel->getFilter(); + mFavoritesPanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); + LLInventoryFilter& favorites_filter = mFavoritesPanel->getFilter(); favorites_filter.setEmptyLookupMessage("InventoryNoMatchingFavorites"); favorites_filter.markDefault(); - favorites_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, favorites_panel, _1, _2)); + mFavoritesPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mFavoritesPanel, _1, _2)); } mSearchTypeCombo = getChild<LLComboBox>("search_type"); @@ -319,6 +319,10 @@ bool LLPanelMainInventory::postBuild() menu->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); } + mFilterTabs->setTabVisibility(mRecentPanel, gSavedSettings.getBOOL("InventoryShowRecentTab")); + mFilterTabs->setTabVisibility(mWornItemsPanel, gSavedSettings.getBOOL("InventoryShowWornTab")); + mFilterTabs->setTabVisibility(mFavoritesPanel, gSavedSettings.getBOOL("InventoryShowFavoritesTab")); + // Trigger callback for focus received so we can deselect items in inbox/outbox LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this)); @@ -1613,8 +1617,10 @@ void LLPanelMainInventory::initSingleFolderRoot(const LLUUID& start_folder_id) void LLPanelMainInventory::initInventoryViews() { mAllItemsPanel->initializeViewBuilding(); - mRecentPanel->initializeViewBuilding(); - mWornItemsPanel->initializeViewBuilding(); + if (gSavedSettings.getBOOL("InventoryShowRecentTab")) + mRecentPanel->initializeViewBuilding(); + if (gSavedSettings.getBOOL("InventoryShowWornTab")) + mWornItemsPanel->initializeViewBuilding(); } void LLPanelMainInventory::toggleViewMode() @@ -2056,6 +2062,27 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { setViewMode(MODE_COMBINATION); } + + if (command_name == "toggle_recent_tab") + { + bool visibility = !gSavedSettings.getBOOL("InventoryShowRecentTab"); + gSavedSettings.setBOOL("InventoryShowRecentTab", visibility); + mFilterTabs->setTabVisibility(mRecentPanel, visibility); + mRecentPanel->initializeViewBuilding(); + } + if (command_name == "toggle_worn_tab") + { + bool visibility = !gSavedSettings.getBOOL("InventoryShowWornTab"); + gSavedSettings.setBOOL("InventoryShowWornTab", visibility); + mFilterTabs->setTabVisibility(mWornItemsPanel, visibility); + mWornItemsPanel->initializeViewBuilding(); + } + if (command_name == "toggle_favorites_tab") + { + bool visibility = !gSavedSettings.getBOOL("InventoryShowFavoritesTab"); + gSavedSettings.setBOOL("InventoryShowFavoritesTab", visibility); + mFilterTabs->setTabVisibility(mFavoritesPanel, visibility); + } } void LLPanelMainInventory::onVisibilityChange( bool new_visibility ) @@ -2283,6 +2310,19 @@ bool LLPanelMainInventory::isActionChecked(const LLSD& userdata) return isCombinationViewMode(); } + if (command_name == "recent_tab") + { + return mFilterTabs->getTabVisibility(mRecentPanel); + } + if (command_name == "worn_tab") + { + return mFilterTabs->getTabVisibility(mWornItemsPanel); + } + if (command_name == "favorites_tab") + { + return mFilterTabs->getTabVisibility(mFavoritesPanel); + } + return false; } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index a78c0c0fad..03650e7fc1 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -199,6 +199,7 @@ private: LLInventoryPanel* mAllItemsPanel = nullptr; LLInventoryPanel* mRecentPanel = nullptr; LLInventoryPanel* mWornItemsPanel = nullptr; + LLInventoryPanel* mFavoritesPanel = nullptr; bool mResortActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index 6e4e9f426d..68e2808a83 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -220,7 +220,7 @@ const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string& if ( candidate_url.scheme().empty() ) { // build a URL comprised of default scheme and the original fragment - const std::string default_scheme( "http://" ); + const std::string default_scheme( "https://" ); return default_scheme + src_url; }; diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 23e6a9fbcf..69be65d9c9 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -625,7 +625,7 @@ void LLPanelObject::getState( ) } - if (objectp->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) + if (objectp->getSculptParams()) { selected_item = MI_SCULPT; //LLFirstUse::useSculptedPrim(); @@ -1078,7 +1078,7 @@ void LLPanelObject::getState( ) LLUUID id; - LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = objectp->getSculptParams(); if (sculpt_params) // if we have a legal sculpt param block for this object: @@ -1246,13 +1246,13 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) if (selected_type == MI_SCULPT) { self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, true, true); - LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = self->mObject->getSculptParams(); if (sculpt_params) volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType()); } else { - LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = self->mObject->getSculptParams(); if (sculpt_params) self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true); } @@ -2264,24 +2264,21 @@ void LLPanelObject::onCopyParams() mClipboardParams["volume_params"] = params.asLLSD(); // Sculpted Prim - if (objectp->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) + LLSculptParams *sculpt_params = objectp->getSculptParams(); + if (sculpt_params) { - LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); - if (sculpt_params) + LLUUID texture_id = sculpt_params->getSculptTexture(); + if (get_can_copy_texture(texture_id)) { - LLUUID texture_id = sculpt_params->getSculptTexture(); - if (get_can_copy_texture(texture_id)) - { - LL_DEBUGS("FloaterTools") << "Recording texture" << LL_ENDL; - mClipboardParams["sculpt"]["id"] = texture_id; - } - else - { - mClipboardParams["sculpt"]["id"] = SCULPT_DEFAULT_TEXTURE; - } - - mClipboardParams["sculpt"]["type"] = sculpt_params->getSculptType(); + LL_DEBUGS("FloaterTools") << "Recording texture" << LL_ENDL; + mClipboardParams["sculpt"]["id"] = texture_id; } + else + { + mClipboardParams["sculpt"]["id"] = SCULPT_DEFAULT_TEXTURE; + } + + mClipboardParams["sculpt"]["type"] = sculpt_params->getSculptType(); } } @@ -2304,7 +2301,7 @@ void LLPanelObject::onPasteParams() } else { - LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = objectp->getSculptParams(); if (sculpt_params) { objectp->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index a31a54bb67..d27ce81e4f 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1830,7 +1830,7 @@ void LLPanelObjectInventory::onFocusReceived() LLFolderViewItem* LLPanelObjectInventory::getItemByID( const LLUUID& id ) { - std::map<LLUUID, LLFolderViewItem*>::iterator map_it = mItemMap.find(id); + auto map_it = mItemMap.find(id); if (map_it != mItemMap.end()) { return map_it->second; diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 154639e4bb..13e27b489c 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -109,7 +109,7 @@ protected: bool isSelectionRemovable(); private: - std::map<LLUUID, LLFolderViewItem*> mItemMap; + std::unordered_map<LLUUID, LLFolderViewItem*> mItemMap; LLScrollContainer* mScroller; LLFolderView* mFolders; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 42c40fe404..54ce205fb0 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -252,7 +252,7 @@ static LLPanelInjector<LLPanelPeople> t_people("panel_people"); class LLPanelPeople::Updater { public: - typedef boost::function<void()> callback_t; + typedef std::function<void()> callback_t; Updater(callback_t cb) : mCallback(cb) { diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index cbf5819fda..cff09b0778 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -786,7 +786,9 @@ void LLPanelPermissions::refresh() getChildView("Edit Cost")->setEnabled(change_sale_allowed && !is_for_sale_mixed); // Set the checkbox to tentative if the prices of each object selected // are not the same. - getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed); + // If object is marked for sale yet is not transferable, mark as tentative, + // as it is in a state where it can't be sold + getChild<LLUICtrl>("checkbox for sale")->setTentative((!can_transfer && num_for_sale) || is_for_sale_mixed); getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed); getChildView("Next owner can:")->setEnabled(true); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 87f05f2028..c380b6860f 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -517,7 +517,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, std::string parcel_owner = LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString(); mParcelOwner->setText(parcel_owner); - LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText)); + mAvatarNameCacheConnection = LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText)); mRegionGroupText->setText( getString("none_text")); } @@ -548,7 +548,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); if(auth_buyer_id.notNull()) { - LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText)); + mAvatarNameCacheConnection = LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText)); // Show sales info to a specific person or a group he belongs to. if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id)) diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index f562be0f5d..0c161198f8 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -118,6 +118,8 @@ private: LLTextEditor* mResaleText; LLTextBox* mSaleToText; LLAccordionCtrl* mAccordionCtrl; + + boost::signals2::scoped_connection mAvatarNameCacheConnection; }; #endif // LL_LLPANELPLACEPROFILE_H diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 7deb1d9fd4..5435a79e16 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -651,7 +651,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi void LLPanelPlaces::onTabSelected() { mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel()); - if (!mActivePanel) + if (!mActivePanel || !mTabsCreated) return; onFilterEdit(mActivePanel->getFilterSubString(), true); @@ -1335,6 +1335,13 @@ LLPanelPlaceInfo* LLPanelPlaces::getCurrentInfoPanel() return NULL; } +void LLPanelPlaces::hideBackBtn() +{ + mPlaceProfileBackBtn->setVisible(false); + setBackgroundVisible(false); + mPlaceProfile->setBackgroundVisible(false); +} + static bool is_agent_in_selected_parcel(LLParcel* parcel) { LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index fc04d8d45d..8360380b22 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -81,6 +81,8 @@ public: /*virtual*/ S32 notifyParent(const LLSD& info); + void hideBackBtn(); + private: void onLandmarkLoaded(LLLandmark* landmark); void onFilterEdit(const std::string& search_string, bool force_filter); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 24a6875d5a..758ca0b0fa 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -106,11 +106,11 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setFollowRedirects(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders); @@ -138,9 +138,9 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri } // Upload the image - LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>(); + LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>(); S64 length; { @@ -693,6 +693,7 @@ LLPanelProfileSecondLife::LLPanelProfileSecondLife() , mWaitingForImageUpload(false) , mAllowPublish(false) , mHideAge(false) + , mAllowEdit(true) { } @@ -709,6 +710,10 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife() { mAvatarNameCacheConnection.disconnect(); } + if (mMenuNameCacheConnection.connected()) + { + mMenuNameCacheConnection.disconnect(); + } } bool LLPanelProfileSecondLife::postBuild() @@ -757,14 +762,15 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) LLUUID avatar_id = getAvatarId(); bool own_profile = getSelfProfile(); + bool allow_edit = own_profile && mAllowEdit; mGroupList->setShowNone(!own_profile); - childSetVisible("notes_panel", !own_profile); - childSetVisible("settings_panel", own_profile); - childSetVisible("about_buttons_panel", own_profile); + childSetVisible("notes_panel", !allow_edit); + childSetVisible("settings_panel", allow_edit); + childSetVisible("about_buttons_panel", allow_edit); - if (own_profile) + if (allow_edit) { // Group list control cannot toggle ForAgent loading // Less than ideal, but viewing own profile via search is edge case @@ -789,7 +795,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) mAgentActionMenuButton->setMenu("menu_profile_other.xml", LLMenuButton::MP_BOTTOM_RIGHT); } - mDescriptionEdit->setParseHTML(!own_profile); + mDescriptionEdit->setParseHTML(!allow_edit); if (!own_profile) { @@ -1022,7 +1028,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data) if (getSelfProfile()) { mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH; - mShowInSearchCombo->setValue(mAllowPublish); + mShowInSearchCombo->setValue(mAllowPublish ? LLSD::Integer(1) : LLSD::Integer(0)); } } @@ -1280,7 +1286,7 @@ void LLPanelProfileSecondLife::setLoaded() { mHideAgeCombo->setEnabled(true); } - mDescriptionEdit->setEnabled(true); + mDescriptionEdit->setEnabled(mAllowEdit); } } @@ -1461,7 +1467,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) } else if (item_name == "edit_display_name") { - LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2)); + mMenuNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2)); LLFirstUse::setDisplayName(false); } else if (item_name == "edit_partner") diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index c207a4162a..c993ec547a 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -111,6 +111,8 @@ public: void processProperties(void* data, EAvatarProcessorType type) override; + void setAllowEdit(bool allow_edit) { mAllowEdit = allow_edit; } + protected: /** * Process profile related data received from server. @@ -207,8 +209,10 @@ private: bool mWaitingForImageUpload; bool mAllowPublish; bool mHideAge; + bool mAllowEdit; std::string mDescriptionText; boost::signals2::connection mAvatarNameCacheConnection; + boost::signals2::connection mMenuNameCacheConnection; }; diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h index 2e6b7c4428..1c58fa6cfa 100644 --- a/indra/newview/llpanelprofileclassifieds.h +++ b/indra/newview/llpanelprofileclassifieds.h @@ -324,11 +324,8 @@ private: S32 mPriceForListing; -public: static void handleSearchStatResponse(LLUUID classifiedId, LLSD result); -private: - typedef std::list<LLPanelProfileClassified*> panel_list_t; static panel_list_t sAllPanels; diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index b81b891685..7396f079b0 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -110,7 +110,11 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) { - bool current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3); + LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName()); + // Current window likely won't ever change position from being the penultimate item + // Custom window is last item + S32 curent_window_index = combo->getItemCount() - 2; + bool current_window_selected = (combo->getCurrentIndex() == curent_window_index); getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected); getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected); } diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp deleted file mode 100644 index a0129b2cb1..0000000000 --- a/indra/newview/llpanelvoiceeffect.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @file llpanelvoiceeffect.cpp - * @author Aimee - * @brief Panel to select Voice Morphs. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llpanelvoiceeffect.h" - -#include "llcombobox.h" -#include "llfloaterreg.h" -#include "llpanel.h" -#include "lltrans.h" -#include "lltransientfloatermgr.h" -#include "llvoiceclient.h" -#include "llweb.h" - -static LLPanelInjector<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect"); - -LLPanelVoiceEffect::LLPanelVoiceEffect() - : mVoiceEffectCombo(NULL) -{ - mCommitCallbackRegistrar.add("Voice.CommitVoiceEffect", boost::bind(&LLPanelVoiceEffect::onCommitVoiceEffect, this)); -} - -LLPanelVoiceEffect::~LLPanelVoiceEffect() -{ - LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); - LLTransientFloaterMgr::getInstance()->removeControlView(combo_list_view); - - if(LLVoiceClient::instanceExists()) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->removeObserver(this); - } - } -} - -// virtual -bool LLPanelVoiceEffect::postBuild() -{ - mVoiceEffectCombo = getChild<LLComboBox>("voice_effect"); - - // Need to tell LLTransientFloaterMgr about the combo list, otherwise it can't - // be clicked while in a docked floater as it extends outside the floater area. - LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); - LLTransientFloaterMgr::getInstance()->addControlView(combo_list_view); - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->addObserver(this); - } - - update(true); - - return true; -} - -////////////////////////////////////////////////////////////////////////// -/// PRIVATE SECTION -////////////////////////////////////////////////////////////////////////// - -void LLPanelVoiceEffect::onCommitVoiceEffect() -{ - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) - { - mVoiceEffectCombo->setEnabled(false); - return; - } - - LLSD value = mVoiceEffectCombo->getValue(); - if (value.asInteger() == PREVIEW_VOICE_EFFECTS) - { - // Open the Voice Morph preview floater - LLFloaterReg::showInstance("voice_effect"); - } - else if (value.asInteger() == GET_VOICE_EFFECTS) - { - // Open the voice morphing info web page - LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); - } - else - { - effect_interface->setVoiceEffect(value.asUUID()); - } - - mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); -} - -// virtual -void LLPanelVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) -{ - update(effect_list_updated); -} - -void LLPanelVoiceEffect::update(bool list_updated) -{ - if (mVoiceEffectCombo) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) return; - if (list_updated) - { - // Add the default "No Voice Morph" entry. - mVoiceEffectCombo->removeall(); - mVoiceEffectCombo->add(getString("no_voice_effect"), LLUUID::null); - mVoiceEffectCombo->addSeparator(); - - // Add entries for each Voice Morph. - const voice_effect_list_t& effect_list = effect_interface->getVoiceEffectList(); - if (!effect_list.empty()) - { - for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) - { - mVoiceEffectCombo->add(it->first, it->second, ADD_BOTTOM); - } - - mVoiceEffectCombo->addSeparator(); - } - - // Add the fixed entries to go to the preview floater or marketing page. - mVoiceEffectCombo->add(getString("preview_voice_effects"), PREVIEW_VOICE_EFFECTS); - mVoiceEffectCombo->add(getString("get_voice_effects"), GET_VOICE_EFFECTS); - } - - if (effect_interface && LLVoiceClient::instance().isVoiceWorking()) - { - // Select the current Voice Morph. - mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); - mVoiceEffectCombo->setEnabled(true); - } - else - { - // If voice isn't working or Voice Effects are not supported disable the control. - mVoiceEffectCombo->setValue(LLUUID::null); - mVoiceEffectCombo->setEnabled(false); - } - } -} diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h deleted file mode 100644 index f920e41081..0000000000 --- a/indra/newview/llpanelvoiceeffect.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file llpanelvoiceeffect.h - * @author Aimee - * @brief Panel to select Voice Effects. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_PANELVOICEEFFECT_H -#define LL_PANELVOICEEFFECT_H - -#include "llpanel.h" -#include "llvoiceclient.h" - -class LLComboBox; - -class LLPanelVoiceEffect - : public LLPanel - , public LLVoiceEffectObserver -{ -public: - LOG_CLASS(LLPanelVoiceEffect); - - LLPanelVoiceEffect(); - virtual ~LLPanelVoiceEffect(); - - bool postBuild() override; - -private: - void onCommitVoiceEffect(); - void update(bool list_updated); - - /// Called by voice effect provider when voice effect list is changed. - void onVoiceEffectChanged(bool effect_list_updated) override; - - // Fixed entries in the Voice Morph list - typedef enum e_voice_effect_combo_items - { - NO_VOICE_EFFECT = 0, - PREVIEW_VOICE_EFFECTS = 1, - GET_VOICE_EFFECTS = 2 - } EVoiceEffectComboItems; - - LLComboBox* mVoiceEffectCombo; -}; - - -#endif //LL_PANELVOICEEFFECT_H diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 5916163f60..94864797d5 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -532,7 +532,7 @@ void LLPanelVolume::getState( ) getChildView("FlexForceY")->setEnabled(true); getChildView("FlexForceZ")->setEnabled(true); - LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + LLFlexibleObjectData *attributes = objectp->getFlexibleObjectData(); getChild<LLUICtrl>("FlexNumSections")->setValue((F32)attributes->getSimulateLOD()); getChild<LLUICtrl>("FlexGravity")->setValue(attributes->getGravity()); @@ -643,7 +643,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->add(getString("None"), LLSD(1)); bool isMesh = false; - LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = objectp->getSculptParams(); if (sculpt_params) { U8 sculpt_type = sculpt_params->getSculptType(); @@ -1043,7 +1043,7 @@ void LLPanelVolume::onCopyFeatures() // Flexi Prim if (volobjp && volobjp->isFlexible()) { - LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + LLFlexibleObjectData *attributes = objectp->getFlexibleObjectData(); if (attributes) { clipboard["flex"]["lod"] = attributes->getSimulateLOD(); @@ -1141,7 +1141,7 @@ void LLPanelVolume::onPasteFeatures() objectp->setClickAction(CLICK_ACTION_NONE); } - LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + LLFlexibleObjectData *attributes = objectp->getFlexibleObjectData(); if (attributes) { LLFlexibleObjectData new_attributes; @@ -1568,7 +1568,7 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) return; } - LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + LLFlexibleObjectData *attributes = objectp->getFlexibleObjectData(); if (attributes) { LLFlexibleObjectData new_attributes; diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 3aedde74c6..4fcce50df1 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -466,8 +466,8 @@ void LLPanelWearing::getAttachmentLimitsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 9ef9c26411..c6a88dbada 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -41,7 +41,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model) : LLConversationItemSession(data_source->getSessionID(), root_view_model), mSpeakerMgr(data_source), - mValidateSpeakerCallback(NULL) + mValidateSpeakerCallback(nullptr) { mSpeakerAddListener = new SpeakerAddListener(*this); mSpeakerRemoveListener = new SpeakerRemoveListener(*this); diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 7cb29a6211..4b4334c6f9 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -27,8 +27,8 @@ #ifndef LL_PARTICIPANTLIST_H #define LL_PARTICIPANTLIST_H -#include "llviewerprecompiledheaders.h" #include "llconversationmodel.h" +#include "llevent.h" class LLSpeakerMgr; class LLUICtrl; @@ -38,7 +38,7 @@ class LLParticipantList : public LLConversationItemSession LOG_CLASS(LLParticipantList); public: - typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; + typedef std::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model); ~LLParticipantList(); diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 1366ba6c6f..8e03492381 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -65,7 +65,7 @@ void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterLi continue; const std::string& uuid(characterDataIter->first); const LLSD& characterData = characterDataIter->second; - LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData)); + LLPathfindingObjectPtr character = std::make_shared<LLPathfindingCharacter>(uuid, characterData); objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, character)); } } diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp index 2012d7a094..81efb0a6fc 100644 --- a/indra/newview/llpathfindinglinksetlist.cpp +++ b/indra/newview/llpathfindinglinksetlist.cpp @@ -206,7 +206,7 @@ void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData const LLSD& linksetData = linksetDataIter->second; if(linksetData.size() != 0) { - LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData)); + LLPathfindingObjectPtr linksetPtr = std::make_shared<LLPathfindingLinkset>(uuid, linksetData); objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, linksetPtr)); } } diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 84a62b3cbf..412e25a7b1 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -34,7 +34,6 @@ #include <map> #include <boost/bind.hpp> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llagent.h" @@ -451,8 +450,8 @@ void LLPathfindingManager::navMeshStatusRequestCoro(std::string url, U64 regionH { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshStatusRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshStatusRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLViewerRegion *region = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!region) @@ -541,8 +540,8 @@ void LLPathfindingManager::navAgentStateRequestCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavAgentStateRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavAgentStateRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -569,8 +568,8 @@ void LLPathfindingManager::navMeshRebakeCoro(std::string url, rebake_navmesh_cal { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshRebake", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshRebake", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData = LLSD::emptyMap(); @@ -598,8 +597,8 @@ void LLPathfindingManager::linksetObjectsCoro(std::string url, LinksetsResponder { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetObjects", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetObjects", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result; @@ -634,8 +633,8 @@ void LLPathfindingManager::linksetTerrainCoro(std::string url, LinksetsResponder { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetTerrain", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result; @@ -669,8 +668,8 @@ void LLPathfindingManager::charactersCoro(std::string url, request_id_t requestI { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("charactersCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index 663cb3cf34..d209266467 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -27,10 +27,10 @@ #ifndef LL_LLPATHFINDINGMANAGER_H #define LL_LLPATHFINDINGMANAGER_H +#include <functional> #include <string> #include <map> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llpathfindinglinkset.h" @@ -76,21 +76,21 @@ public: void requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly); typedef U32 request_id_t; - typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t; + typedef std::function<void(request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t; void requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const; void requestSetLinksets(request_id_t pRequestId, const LLPathfindingObjectListPtr &pLinksetListPtr, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD, object_request_callback_t pLinksetsCallback) const; void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const; - typedef boost::function<void (bool)> agent_state_callback_t; + typedef std::function<void(bool)> agent_state_callback_t; typedef boost::signals2::signal<void (bool)> agent_state_signal_t; typedef boost::signals2::connection agent_state_slot_t; agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback); void requestGetAgentState(); - typedef boost::function<void (bool)> rebake_navmesh_callback_t; + typedef std::function<void(bool)> rebake_navmesh_callback_t; void requestRebakeNavMesh(rebake_navmesh_callback_t pRebakeNavMeshCallback); protected: diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h index d838a1a51c..44397c9118 100644 --- a/indra/newview/llpathfindingnavmesh.h +++ b/indra/newview/llpathfindingnavmesh.h @@ -27,9 +27,9 @@ #ifndef LL_LLPATHFINDINGNAVMESH_H #define LL_LLPATHFINDINGNAVMESH_H +#include <functional> #include <string> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llpathfindingnavmeshstatus.h" @@ -54,7 +54,7 @@ public: kNavMeshRequestError } ENavMeshRequestStatus; - typedef boost::function<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_callback_t; + typedef std::function<void(ENavMeshRequestStatus, const LLPathfindingNavMeshStatus&, const LLSD::Binary&)> navmesh_callback_t; typedef boost::signals2::signal<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_signal_t; typedef boost::signals2::connection navmesh_slot_t; diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h index e770efa0d0..8f7750d4c5 100644 --- a/indra/newview/llpathfindingnavmeshzone.h +++ b/indra/newview/llpathfindingnavmeshzone.h @@ -27,9 +27,9 @@ #ifndef LL_LLPATHFINDINGNAVMESHZONE_H #define LL_LLPATHFINDINGNAVMESHZONE_H +#include <functional> #include <vector> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llpathfindingnavmesh.h" @@ -62,7 +62,7 @@ public: kNavMeshZoneComplete } ENavMeshZoneStatus; - typedef boost::function<void (ENavMeshZoneRequestStatus)> navmesh_zone_callback_t; + typedef std::function<void(ENavMeshZoneRequestStatus)> navmesh_zone_callback_t; typedef boost::signals2::signal<void (ENavMeshZoneRequestStatus)> navmesh_zone_signal_t; typedef boost::signals2::connection navmesh_zone_slot_t; @@ -81,7 +81,7 @@ public: protected: private: - typedef boost::function<void (void)> navmesh_location_callback_t; + typedef std::function<void(void)> navmesh_location_callback_t; class NavMeshLocation { public: diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 79a796dd60..bf27f114f5 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -27,9 +27,9 @@ #ifndef LL_LLPATHFINDINGOBJECT_H #define LL_LLPATHFINDINGOBJECT_H +#include <functional> #include <string> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llavatarname.h" @@ -61,7 +61,7 @@ public: inline bool isGroupOwned() const {return mIsGroupOwned;}; inline const LLVector3& getLocation() const {return mLocation;}; - typedef boost::function<void (const LLPathfindingObject *)> name_callback_t; + typedef std::function<void(const LLPathfindingObject*)> name_callback_t; typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t; typedef boost::signals2::connection name_connection_t; diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index 61791492e7..57f4aefadf 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -30,7 +30,6 @@ #include "llpathfindingpathtool.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llagent.h" diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 189b9d4954..f6b4500f0f 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -27,7 +27,7 @@ #ifndef LL_LLPATHFINDINGPATHTOOL_H #define LL_LLPATHFINDINGPATHTOOL_H -#include <boost/function.hpp> +#include <functional> #include <boost/signals2.hpp> #include "llpathinglib.h" @@ -62,7 +62,7 @@ public: kCharacterTypeD } ECharacterType; - typedef boost::function<void (void)> path_event_callback_t; + typedef std::function<void(void)> path_event_callback_t; typedef boost::signals2::signal<void (void)> path_event_signal_t; typedef boost::signals2::connection path_event_slot_t; diff --git a/indra/newview/llpbrterrainfeatures.cpp b/indra/newview/llpbrterrainfeatures.cpp index bb771c6963..d652e23dd5 100644 --- a/indra/newview/llpbrterrainfeatures.cpp +++ b/indra/newview/llpbrterrainfeatures.cpp @@ -86,9 +86,9 @@ void LLPBRTerrainFeatures::queryRegionCoro(std::string cap_url, LLUUID region_id { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("queryRegionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("queryRegionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); @@ -159,9 +159,9 @@ void LLPBRTerrainFeatures::modifyRegionCoro(std::string cap_url, LLSD updates, v { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyRegionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyRegionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); diff --git a/indra/newview/llperfstats.h b/indra/newview/llperfstats.h index 1a2098ec7e..38deb87237 100644 --- a/indra/newview/llperfstats.h +++ b/indra/newview/llperfstats.h @@ -223,7 +223,7 @@ namespace LLPerfStats static void updateMeanFrameTime(U64 tot_frame_time_raw); // StatsArray is a uint64_t for each possible statistic type. using StatsArray = std::array<uint64_t, static_cast<size_t>(LLPerfStats::StatType_t::STATS_COUNT)>; - using StatsMap = std::unordered_map<LLUUID, StatsArray, boost::hash<LLUUID>>; + using StatsMap = std::unordered_map<LLUUID, StatsArray>; using StatsTypeMatrix = std::array<StatsMap, static_cast<size_t>(LLPerfStats::ObjType_t::OT_COUNT)>; using StatsSummaryArray = std::array<StatsArray, static_cast<size_t>(LLPerfStats::ObjType_t::OT_COUNT)>; diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index e06d025f59..1cc311e1b5 100644 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -141,7 +141,7 @@ void LLPersistentNotificationStorage::loadNotifications() ++notification_it) { LLSD notification_params = *notification_it; - LLNotificationPtr notification(new LLNotification(notification_params)); + LLNotificationPtr notification = std::make_shared<LLNotification>(notification_params); LLNotificationResponderPtr responder(createResponder(notification_params["name"], notification_params["responder"])); notification->setResponseFunctor(responder); diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index cc55b3c8db..16149b7e33 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -94,8 +94,8 @@ void LLPopupView::draw() LLPanel::draw(); } -bool LLPopupView::handleMouseEvent(boost::function<bool(LLView*, S32, S32)> func, - boost::function<bool(LLView*)> predicate, +bool LLPopupView::handleMouseEvent(std::function<bool(LLView*, S32, S32)> func, + std::function<bool(LLView*)> predicate, S32 x, S32 y, bool close_popups) { diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h index 4a88866185..8c0db623ac 100644 --- a/indra/newview/llpopupview.h +++ b/indra/newview/llpopupview.h @@ -55,7 +55,7 @@ public: popup_list_t getCurrentPopups() { return mPopups; } private: - bool handleMouseEvent(boost::function<bool(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups); + bool handleMouseEvent(std::function<bool(LLView*, S32, S32)>, std::function<bool(LLView*)>, S32 x, S32 y, bool close_popups); popup_list_t mPopups; }; #endif //LL_LLROOTVIEW_H diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h index cfe6f3951d..11178aa027 100644 --- a/indra/newview/llpostcard.h +++ b/indra/newview/llpostcard.h @@ -40,7 +40,7 @@ class LLPostCard LOG_CLASS(LLPostCard); public: - typedef boost::function<void(bool ok)> result_callback_t; + typedef std::function<void(bool ok)> result_callback_t; static void setPostResultCallback(result_callback_t cb) { mResultCallback = cb; } static void reportPostResult(bool ok); diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index afd58af056..84455bb679 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -26,8 +26,6 @@ #include "llviewerprecompiledheaders.h" -#include <boost/assign/list_of.hpp> - #include "llpresetsmanager.h" #include "lldiriterator.h" @@ -250,17 +248,17 @@ void LLPresetsManager::settingChanged() void LLPresetsManager::getControlNames(std::vector<std::string>& names) { - const std::vector<std::string> camera_controls = boost::assign::list_of + const std::vector<std::string> camera_controls = { // From panel_preferences_move.xml - ("CameraAngle") - ("CameraOffsetScale") + "CameraAngle", + "CameraOffsetScale", // From llagentcamera.cpp - ("CameraOffsetBuild") - ("TrackFocusObject") - ("CameraOffsetRearView") - ("FocusOffsetRearView") - ("AvatarSitRotation") - ; + "CameraOffsetBuild", + "TrackFocusObject", + "CameraOffsetRearView", + "FocusOffsetRearView", + "AvatarSitRotation", + }; names = camera_controls; } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 9a991727b2..eefd19e153 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -79,6 +79,7 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, LLPreviewNotecard::~LLPreviewNotecard() { delete mLiveFile; + mEditor = nullptr; } bool LLPreviewNotecard::postBuild() @@ -166,7 +167,7 @@ bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) // virtual bool LLPreviewNotecard::canClose() { - if(mForceClose || mEditor->isPristine()) + if(mForceClose || !mEditor || mEditor->isPristine()) { return true; } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 0bbe540207..a56697117a 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -58,7 +58,7 @@ class LLScriptMovedObserver; class LLLiveLSLFile : public LLLiveFile { public: - typedef boost::function<bool(const std::string& filename)> change_callback_t; + typedef std::function<bool(const std::string& filename)> change_callback_t; LLLiveLSLFile(std::string file_path, change_callback_t change_cb); ~LLLiveLSLFile(); diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp index 728cb22431..d962622dfd 100644 --- a/indra/newview/llproductinforequest.cpp +++ b/indra/newview/llproductinforequest.cpp @@ -70,8 +70,8 @@ void LLProductInfoRequestManager::getLandDescriptionsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandDescriptionsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index d0aa1af2f3..f89afd38ab 100644 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -201,8 +201,8 @@ void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RemoteParcelRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RemoteParcelRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD bodyData; diff --git a/indra/newview/llscriptruntimeperms.h b/indra/newview/llscriptruntimeperms.h index 300304c21b..6350b61d08 100644 --- a/indra/newview/llscriptruntimeperms.h +++ b/indra/newview/llscriptruntimeperms.h @@ -24,10 +24,7 @@ * $/LicenseInfo$ */ -#ifndef LL_LLSCRIPTRUNTIME_PERMS_H -#define LL_LLSCRIPTRUNTIME_PERMS_H - -#include <boost/array.hpp> +#pragma once typedef struct _script_perm { std::string question; @@ -37,12 +34,12 @@ typedef struct _script_perm { question(q), permbit(b), caution(c) {} } script_perm_t; -const U32 NUM_SCRIPT_PERMISSIONS = 18; +const U32 NUM_SCRIPT_PERMISSIONS = 19; const S32 SCRIPT_PERMISSION_DEBIT = 0; const S32 SCRIPT_PERMISSION_TRIGGER_ANIMATION = 3; const S32 SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS = 14; -static const boost::array<script_perm_t, NUM_SCRIPT_PERMISSIONS> SCRIPT_PERMISSIONS = {{ +static const std::array<script_perm_t, NUM_SCRIPT_PERMISSIONS> SCRIPT_PERMISSIONS = {{ _script_perm("ScriptTakeMoney", (0x1 << 1), true), _script_perm("ActOnControlInputs", (0x1 << 2), false), _script_perm("RemapControlInputs", (0x1 << 3), false), @@ -60,7 +57,7 @@ static const boost::array<script_perm_t, NUM_SCRIPT_PERMISSIONS> SCRIPT_PERMISSI _script_perm("OverrideYourAnimations", (0x1 << 15), false), _script_perm("ScriptReturnObjects", (0x1 << 16), false), _script_perm("ForceSitAvatar", (0x1 << 17), false), - _script_perm("ChangeEnvSettings", (0x1 << 18), false) + _script_perm("ChangeEnvSettings", (0x1 << 18), false), + _script_perm("PrivilegedLandAccess",(0x1 << 19), true) } }; -#endif // LL_LLSCRIPTRUNTIME_PERMS_H diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h index 17787ca5e6..e0162bac80 100644 --- a/indra/newview/llsearchcombobox.h +++ b/indra/newview/llsearchcombobox.h @@ -61,11 +61,6 @@ public: ~LLSearchComboBox(); - /** - * Sets focus to text box - */ - void focusTextEntry(); - protected: LLSearchComboBox(const Params&p); @@ -98,6 +93,11 @@ protected: */ void onSelectionCommit(); + /** + * Sets focus to text box + */ + void focusTextEntry(); + LLButton* mSearchButton; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 758e91f6c9..86c9818c4e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6193,6 +6193,15 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use node->mCategory = category; node->mName.assign(name); node->mDescription.assign(desc); + + LLViewerObject* obj = node->getObject(); + if (obj && LLViewerObject::isObjectInPendingUpdate(owner_id, obj)) + { + // current response doesn't return modify permissions flags, + // so we should request it separately if needed + obj->requestObjectUpdate(); + } + } dialog_refresh_all(); diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 5dbd579b45..2790705fd8 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -40,7 +40,7 @@ class LLSetKeyBindDialog::Updater : public LLEventTimer { public: - typedef boost::function<void(MASK)> callback_t; + typedef std::function<void(MASK)> callback_t; Updater(callback_t cb, F32 period, MASK mask) :LLEventTimer(period), diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f1731af3be..6e5d9a6c77 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1064,11 +1064,11 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name) LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; LLInventoryType::EType inv_type = outfit_snapshot ? LLInventoryType::IT_NONE : LLInventoryType::IT_SNAPSHOT; - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>( tid, LLAssetType::AT_TEXTURE, res_name, res_desc, 0, folder_type, inv_type, PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost, LLUUID::null, !outfit_snapshot)); + expected_upload_cost, LLUUID::null, !outfit_snapshot); upload_new_resource(assetUploadInfo); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index a147cb4657..d2c7c5e5ce 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -135,9 +135,13 @@ void LLSpatialGroup::clearDrawMap() mDrawMap.clear(); } -bool LLSpatialGroup::isHUDGroup() +bool LLSpatialGroup::isHUDGroup() const { - return getSpatialPartition() && getSpatialPartition()->isHUDPartition() ; + if (hasState(DEAD)) + return false; + + LLSpatialPartition* part = (LLSpatialPartition*)mSpatialPartition; + return part && part->isHUDPartition(); } void LLSpatialGroup::validate() diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 3aaa3d60e8..4b312b1597 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -71,16 +71,8 @@ protected: ~LLDrawInfo(); public: - LLDrawInfo(const LLDrawInfo& rhs) - { - *this = rhs; - } - - const LLDrawInfo& operator=(const LLDrawInfo& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLDrawInfo(const LLDrawInfo& rhs) = delete; + const LLDrawInfo& operator=(const LLDrawInfo& rhs) = delete; // return a hash of this LLDrawInfo as a debug color LLColor4U getDebugColor() const; @@ -206,16 +198,8 @@ class LLSpatialGroup : public LLOcclusionCullingGroup friend class LLOctreeStateCheck; public: - LLSpatialGroup(const LLSpatialGroup& rhs) : LLOcclusionCullingGroup(rhs) - { - *this = rhs; - } - - const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) - { - LL_ERRS() << "Illegal operation!" << LL_ENDL; - return *this; - } + LLSpatialGroup(const LLSpatialGroup& rhs) = delete; + const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) = delete; static U32 sNodeCount; static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true @@ -280,7 +264,7 @@ public: LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part); - bool isHUDGroup() ; + bool isHUDGroup() const; void clearDrawMap(); void validate(); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index b49c0119ed..f079c70c6c 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -76,7 +76,7 @@ void LLSpeaker::lookupName() { if (mDisplayName.empty()) { - LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? + mAvatarNameCacheConnection = LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group??? } } @@ -867,9 +867,9 @@ void LLIMSpeakerMgr::moderationActionCoro(std::string url, LLSD action) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("moderationActionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("moderationActionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index ad2461f60f..c3773d2c33 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -80,6 +80,9 @@ public: bool mIsModerator; bool mModeratorMutedVoice; bool mModeratorMutedText; + +private: + boost::signals2::scoped_connection mAvatarNameCacheConnection; }; class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent @@ -138,7 +141,7 @@ private: class LLSpeakerActionTimer : public LLEventTimer { public: - typedef boost::function<bool(const LLUUID&)> action_callback_t; + typedef std::function<bool(const LLUUID&)> action_callback_t; typedef std::map<LLUUID, LLSpeakerActionTimer*> action_timers_map_t; typedef action_timers_map_t::value_type action_value_t; typedef action_timers_map_t::const_iterator action_timer_const_iter_t; diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index 6c252ed31f..140b63c84d 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -118,7 +118,7 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl) hideButtons(); // call the callback if it exists - if(!mSelectionCallback.empty()) + if(mSelectionCallback != nullptr) { mSelectionCallback(this, ctrl->getName()); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c3c7945763..98a97b9457 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -29,6 +29,11 @@ #include "llappviewer.h" #include "llstartup.h" +#if LL_VELOPACK && LL_WINDOWS +#include "llvelopack.h" +#include <shellapi.h> +#endif + #if LL_WINDOWS # include <process.h> // _spawnl() #else @@ -126,6 +131,7 @@ #include "llpanellogin.h" #include "llmutelist.h" #include "llavatarpropertiesprocessor.h" +#include "llpaneldirbrowser.h" #include "llpanelgrouplandmoney.h" #include "llpanelgroupnotices.h" #include "llparcel.h" @@ -216,8 +222,6 @@ #include "lldxhardware.h" #endif -#include "fsfloatersearch.h" - // // exported globals // @@ -272,6 +276,7 @@ std::unique_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats::P void login_show(); void login_callback(S32 option, void* userdata); +void uninstall_nsis_if_required(); void show_release_notes_if_required(); void show_first_run_dialog(); bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); @@ -464,6 +469,32 @@ bool idle_startup() LLStringOps::sAM = LLTrans::getString("dateTimeAM"); LLStringOps::sPM = LLTrans::getString("dateTimePM"); } + else + { + std::wstring utf16str = ll_convert<std::wstring>(val); + if (utf16str.size() > 4) + { + LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" " + << "has impracitcally long AM/PM time format" << LL_ENDL; + // fallback to declarations in strings.xml + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } + } + } + + // Some locales (as well some of our own dateTimeAM/PM) return long + // strings for AM/PM which aren't practical to display in the UI. + // Hardcode to "AM"/"PM" in those cases. + std::wstring utf16str = ll_convert<std::wstring>(LLStringOps::sAM); + if (utf16str.size() > 4) + { + LLStringOps::sAM = "AM"; + } + utf16str = ll_convert<std::wstring>(LLStringOps::sPM); + if (utf16str.size() > 4) + { + LLStringOps::sPM = "PM"; } } @@ -921,6 +952,7 @@ bool idle_startup() LL_DEBUGS("AppInit") << "PeekMessage processed" << LL_ENDL; #endif do_startup_frame(); + uninstall_nsis_if_required(); timeout.reset(); return false; } @@ -2588,9 +2620,9 @@ void release_notes_coro(const std::string url) LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("releaseNotesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that @@ -2607,6 +2639,68 @@ void release_notes_coro(const std::string url) LLWeb::loadURLInternal(url); } +/** +* Check if this is a fresh velopack install and +* if uninstallation of old viewer is needed. +*/ +void uninstall_nsis_if_required() +{ +#if LL_VELOPACK && LL_WINDOWS + bool checked_for_legacy_install = gSavedSettings.getBOOL("PreviousInstallChecked"); + if (checked_for_legacy_install) + { + return; + } + gSavedSettings.setBOOL("PreviousInstallChecked", true); + + LL_INFOS() << "Looking for previous NSIS installs" << LL_ENDL; + + S32 found_major = 0; + S32 found_minor = 0; + S32 found_patch = 0; + U64 found_build = 0; + std::string nsis_path; + + if (!get_nsis_version(found_major, found_minor, found_patch, found_build, nsis_path)) + { + return; + } + + LLVersionInfo* ver_inst = LLVersionInfo::getInstance(); + + if (found_major > ver_inst->getMajor()) + { + LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL; + return; + } + + if (found_major == ver_inst->getMajor() + && found_minor > ver_inst->getMinor()) + { + LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL; + return; + } + + if (found_major == ver_inst->getMajor() + && found_minor == ver_inst->getMinor() + && found_patch > ver_inst->getPatch()) + { + LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL; + return; + } + + // Assume that nsis is going to be something like x.x.x, while velopack is x.x.(x+1), + // so there is no point to check build. + LL_INFOS() << "Found NSIS install " << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL; + + clear_nsis_links(nsis_path); + + LLSD args; + args["VERSION"] = llformat("%d.%d.%d", found_major, found_minor, found_patch); + LLNotificationsUtil::add("FoundLegacyNsisInstallation", args); +#endif +} + void validate_release_notes_coro(const std::string url) { LLVersionInfo& versionInfo(LLVersionInfo::instance()); @@ -2640,15 +2734,24 @@ void show_release_notes_if_required() // below. If viewer release notes stop working, might be because that // LLEventMailDrop got moved out of LLVersionInfo and hasn't yet been // instantiated. - if (!release_notes_shown && (LLVersionInfo::instance().getChannelAndVersion() != gLastRunVersion) - && LLVersionInfo::instance().getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds - && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") - && !gSavedSettings.getBOOL("FirstLoginThisInstall")) + if (release_notes_shown + || LLVersionInfo::instance().getChannelAndVersion() == gLastRunVersion + || gSavedSettings.getBOOL("FirstLoginThisInstall")) // New users don't need to see release notes + { + return; + } + S32 mode = gSavedSettings.getS32("UpdaterShowReleaseNotes"); + if (mode == 0) + { + return; + } + if (mode == 2 // Show even for test builds + || LLVersionInfo::instance().getViewerMaturity() != LLVersionInfo::TEST_VIEWER) // don't show Release Notes for the test builds + { #if LL_RELEASE_FOR_DOWNLOAD - if (!gSavedSettings.getBOOL("CmdLineSkipUpdater") - && !LLAppViewer::instance()->isUpdaterMissing()) + if (!gSavedSettings.getBOOL("CmdLineSkipUpdater")) { // Instantiate a "relnotes" listener which assumes any arriving event // is the release notes URL string. Since "relnotes" is an @@ -2900,13 +3003,12 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFunc("AvatarPickerReply", LLFloaterAvatarPicker::processAvatarPickerReply); - // directory search - msg->setHandlerFuncFast(_PREHASH_DirPeopleReply, FSPanelSearchPeople::processSearchReply); - msg->setHandlerFuncFast(_PREHASH_DirPlacesReply, FSPanelSearchPlaces::processSearchReply); - msg->setHandlerFuncFast(_PREHASH_DirGroupsReply, FSPanelSearchGroups::processSearchReply); - msg->setHandlerFuncFast(_PREHASH_DirEventsReply, FSPanelSearchEvents::processSearchReply); - msg->setHandlerFuncFast(_PREHASH_DirLandReply, FSPanelSearchLand::processSearchReply); - msg->setHandlerFuncFast(_PREHASH_DirClassifiedReply, FSPanelSearchClassifieds::processSearchReply); + msg->setHandlerFunc("DirPlacesReply", LLPanelDirBrowser::processDirPlacesReply); + msg->setHandlerFunc("DirPeopleReply", LLPanelDirBrowser::processDirPeopleReply); + msg->setHandlerFunc("DirEventsReply", LLPanelDirBrowser::processDirEventsReply); + msg->setHandlerFunc("DirGroupsReply", LLPanelDirBrowser::processDirGroupsReply); + msg->setHandlerFunc("DirClassifiedReply", LLPanelDirBrowser::processDirClassifiedReply); + msg->setHandlerFunc("DirLandReply", LLPanelDirBrowser::processDirLandReply); msg->setHandlerFunc("MapBlockReply", LLWorldMapMessage::processMapBlockReply); msg->setHandlerFunc("MapItemReply", LLWorldMapMessage::processMapItemReply); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index c456c74f77..ff7692e5e9 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -333,7 +333,9 @@ void LLStatusBar::refresh() time_t utc_time; utc_time = time_corrected(); - std::string timeStr = getString("time"); + static bool use_24h = gSavedSettings.getBOOL("Use24HourClock"); + std::string timeStr = use_24h ? getString("time") : getString("time_ampm"); + LLSD substitution; substitution["datetime"] = (S32) utc_time; LLStringUtil::format (timeStr, substitution); @@ -747,7 +749,7 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM { LLMenuItemGL *pMenu = aMenu->getItem( i ); - ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem ); + ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>(); pItem->mCtrl = pMenu; pItem->mMenu = pMenu; pItem->mLabel = utf8str_to_wstring( pMenu->ll::ui::SearchableControl::getSearchText() ); @@ -763,8 +765,8 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM void LLStatusBar::collectSearchableItems() { - mSearchData.reset( new ll::statusbar::SearchData ); - ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem ); + mSearchData = std::make_unique<ll::statusbar::SearchData>(); + ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>(); mSearchData->mRootMenu = pItem; collectChildren( gMenuBarView, pItem ); } diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 5114ee3672..f89ae00c5b 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -120,8 +120,8 @@ void LLSyntaxIdLSL::fetchKeywordsFileCoro(std::string url, std::string fileSpec) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchKeywordsFileCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::pair<std::set<std::string>::iterator, bool> insrt = mInflightFetches.insert(fileSpec); if (!insrt.second) diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h index 0a4e26cb98..2ad5de816b 100644 --- a/indra/newview/llsyswellitem.h +++ b/indra/newview/llsyswellitem.h @@ -60,7 +60,7 @@ public: virtual void onMouseLeave(S32 x, S32 y, MASK mask); //callbacks - typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t; + typedef std::function<void (LLSysWellItem* item)> syswell_item_callback_t; typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t; syswell_item_signal_t mOnItemClose; syswell_item_signal_t mOnItemClick; diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h index b534b136b0..76bd65e7a9 100644 --- a/indra/newview/llteleporthistory.h +++ b/indra/newview/llteleporthistory.h @@ -29,9 +29,9 @@ #include "llsingleton.h" // for LLSingleton +#include <functional> #include <vector> #include <string> -#include <boost/function.hpp> #include <boost/signals2.hpp> #include "llteleporthistorystorage.h" @@ -80,7 +80,7 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory> public: typedef std::vector<LLTeleportHistoryItem> slurl_list_t; - typedef boost::function<void()> history_callback_t; + typedef std::function<void()> history_callback_t; typedef boost::signals2::signal<void()> history_signal_t; /** diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h index 643c4a6bfc..07da596aab 100644 --- a/indra/newview/llteleporthistorystorage.h +++ b/indra/newview/llteleporthistorystorage.h @@ -77,7 +77,7 @@ public: typedef std::vector<LLTeleportHistoryPersistentItem> slurl_list_t; // removed_index is index of removed item, which replaced by more recent - typedef boost::function<void(S32 removed_index)> history_callback_t; + typedef std::function<void(S32 removed_index)> history_callback_t; typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t; /** diff --git a/indra/newview/llterrainpaintmap.cpp b/indra/newview/llterrainpaintmap.cpp index 8cb926a110..eeebab1ddb 100644 --- a/indra/newview/llterrainpaintmap.cpp +++ b/indra/newview/llterrainpaintmap.cpp @@ -108,7 +108,7 @@ bool LLTerrainPaintMap::bakeHeightNoiseIntoPBRPaintMapRGB(const LLViewerRegion& const LLVector3 region_center = LLVector3(region_half_width, region_half_width, 0.0) + region.getOriginAgent(); const LLVector3 camera_origin = LLVector3(0.0f, 0.0f, region_camera_height) + region_center; camera.lookAt(camera_origin, region_center, LLVector3::y_axis); - camera.setAspect(F32(scratch_target.getHeight()) / F32(scratch_target.getWidth())); + camera.setAspect(F32(scratch_target.getWidth()) / F32(scratch_target.getHeight())); const LLRect texture_rect(0, scratch_target.getHeight(), scratch_target.getWidth(), 0); glViewport(texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight()); // Manually get modelview matrix from camera orientation. diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 1a7ce74ccc..8c8734b52f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -875,7 +875,7 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id) //debug bool LLTextureCache::isInCache(const LLUUID& id) { - LLMutexLock lock(&mHeaderMutex); + LLMutexLock lock(&mHeaderIDMapMutex); id_map_t::const_iterator iter = mHeaderIDMap.find(id); return (iter != mHeaderIDMap.end()) ; @@ -991,6 +991,8 @@ void LLTextureCache::setReadOnly(bool read_only) // Returns the unused amount of max_size if any S64 LLTextureCache::initCache(ELLPath location, S64 max_size, bool texture_cache_mismatch) { + LL_PROFILE_ZONE_SCOPED; + llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. S64 entries_size = (max_size * 36) / 100; //0.36 * max_size @@ -1115,10 +1117,13 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create { S32 idx = -1; - id_map_t::iterator iter1 = mHeaderIDMap.find(id); - if (iter1 != mHeaderIDMap.end()) { - idx = iter1->second; + LLMutexLock lock(&mHeaderIDMapMutex); + id_map_t::iterator iter1 = mHeaderIDMap.find(id); + if (iter1 != mHeaderIDMap.end()) + { + idx = iter1->second; + } } if (idx < 0) @@ -1146,10 +1151,19 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create // Erase entry from LRU regardless mLRU.erase(curiter2); // Look up entry and use it if it is valid - id_map_t::iterator iter3 = mHeaderIDMap.find(oldid); - if (iter3 != mHeaderIDMap.end() && iter3->second >= 0) + + S32 found_idx = -1; { - idx = iter3->second; + LLMutexLock lock(&mHeaderIDMapMutex); + id_map_t::iterator iter3 = mHeaderIDMap.find(oldid); + if (iter3 != mHeaderIDMap.end() && iter3->second >= 0) + { + found_idx = iter3->second; + } + } + if (found_idx >= 0) + { + idx = found_idx; removeCachedTexture(oldid) ;//remove the existing cached texture to release the entry index. break; } @@ -1285,7 +1299,10 @@ bool LLTextureCache::updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 bool update_header = false ; if(entry.mImageSize < 0) //is a brand-new entry { - mHeaderIDMap[entry.mID] = idx; + { + LLMutexLock lock(&mHeaderIDMapMutex); + mHeaderIDMap[entry.mID] = idx; + } mTexturesSizeMap[entry.mID] = new_body_size ; mTexturesSizeTotal += new_body_size ; @@ -1323,8 +1340,8 @@ bool LLTextureCache::updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) { + LLMutexLock lock(&mHeaderIDMapMutex); U32 num_entries = mHeaderEntriesInfo.mEntries; - mHeaderIDMap.clear(); mTexturesSizeMap.clear(); mFreeList.clear(); @@ -1618,7 +1635,10 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) LLFile::rmdir(mTexturesDirName); } } - mHeaderIDMap.clear(); + { + LLMutexLock lock(&mHeaderIDMapMutex); + mHeaderIDMap.clear(); + } mTexturesSizeMap.clear(); mTexturesSizeTotal = 0; mFreeList.clear(); @@ -1665,6 +1685,7 @@ void LLTextureCache::purgeTexturesLazy(F32 time_limit_sec) { if (iter1->second > 0) { + LLMutexLock lock(&mHeaderIDMapMutex); id_map_t::iterator iter2 = mHeaderIDMap.find(iter1->first); if (iter2 != mHeaderIDMap.end()) { @@ -1706,8 +1727,13 @@ void LLTextureCache::purgeTexturesLazy(F32 time_limit_sec) Entry entry = mPurgeEntryList.back().second; mPurgeEntryList.pop_back(); // make sure record is still valid - id_map_t::iterator iter_header = mHeaderIDMap.find(entry.mID); - if (iter_header != mHeaderIDMap.end() && iter_header->second == idx) + bool remove_entry = false; + { + LLMutexLock lock(&mHeaderIDMapMutex); + id_map_t::iterator iter_header = mHeaderIDMap.find(entry.mID); + remove_entry = (iter_header != mHeaderIDMap.end() && iter_header->second == idx); + } + if (remove_entry) { std::string tex_filename = getTextureFileName(entry.mID); removeEntry(idx, entry, tex_filename); @@ -1750,6 +1776,7 @@ void LLTextureCache::purgeTextures(bool validate) { if (iter1->second > 0) { + LLMutexLock lock(&mHeaderIDMapMutex); id_map_t::iterator iter2 = mHeaderIDMap.find(iter1->first); if (iter2 != mHeaderIDMap.end()) { @@ -2004,7 +2031,7 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d { U32 offset; { - LLMutexLock lock(&mHeaderMutex); + LLMutexLock lock(&mHeaderIDMapMutex); id_map_t::const_iterator iter = mHeaderIDMap.find(id); if(iter == mHeaderIDMap.end()) { @@ -2018,9 +2045,10 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d U8* data; S32 head[4]; { + LL_PROFILE_ZONE_NAMED("Read fast cache"); LLMutexLock lock(&mFastCacheMutex); - openFastCache(); + openFastCache(); // only reopens if needed, lasts 10 seconds mFastCachep->seek(APR_SET, offset); @@ -2051,7 +2079,9 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d closeFastCache(); } - LLPointer<LLImageRaw> raw = new LLImageRaw(data, head[0], head[1], head[2], true); + + // directly construct image from new buffer. + LLPointer<LLImageRaw> raw = new LLImageRaw(data, head[0], head[1], head[2], true /*take ownership*/); return raw; } @@ -2229,7 +2259,10 @@ void LLTextureCache::removeCachedTexture(const LLUUID& id) mTexturesSizeTotal -= mTexturesSizeMap[id] ; mTexturesSizeMap.erase(id); } - mHeaderIDMap.erase(id); + { + LLMutexLock lock(&mHeaderIDMapMutex); + mHeaderIDMap.erase(id); + } // We are inside header's mutex so mHeaderAPRFilePoolp is safe to use, // but getLocalAPRFilePool() is not safe, it might be in use by worker LLAPRFile::remove(getTextureFileName(id), mHeaderAPRFilePoolp); @@ -2260,7 +2293,10 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename) entry.mImageSize = -1; entry.mBodySize = 0; - mHeaderIDMap.erase(entry.mID); + { + LLMutexLock lock(&mHeaderIDMapMutex); + mHeaderIDMap.erase(entry.mID); + } mTexturesSizeMap.erase(entry.mID); mFreeList.insert(idx); } diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index faf722dc8f..a09bcc1572 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -148,7 +148,7 @@ public: U32 getMaxEntries() { return sCacheMaxEntries; }; bool isInCache(const LLUUID& id) ; bool isInLocal(const LLUUID& id) ; //not thread safe at the moment - + LLMutex* getFastCacheMutex() { return &mFastCacheMutex; } protected: // Accessed by LLTextureCacheWorker std::string getLocalFileName(const LLUUID& id); @@ -194,6 +194,7 @@ private: // Internal LLMutex mWorkersMutex; LLMutex mHeaderMutex; + LLMutex mHeaderIDMapMutex; // To avoid deadlocks, never lock mFastCacheMutex after mHeaderIDMapMutex. LLMutex mListMutex; LLMutex mFastCacheMutex; LLAPRFile* mHeaderAPRFile; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index b2f2509e80..52ec8c17c1 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -166,10 +166,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mBlankImageAssetID(blank_image_asset_id), mAllowNoTexture(allow_no_texture), mLabel(label), - mTentativeLabel(NULL), - mResolutionLabel(NULL), + mTentativeLabel(nullptr), + mResolutionLabel(nullptr), mActive( true ), - mFilterEdit(NULL), + mFilterEdit(nullptr), mImmediateFilterPermMask(immediate_filter_perm_mask), mDnDFilterPermMask(dnd_filter_perm_mask), mContextConeOpacity(0.f), @@ -180,10 +180,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mMaxDim(S32_MAX), mMinDim(0), mPreviewSettingChanged(false), - mOnFloaterCommitCallback(NULL), - mOnFloaterCloseCallback(NULL), - mSetImageAssetIDCallback(NULL), - mOnUpdateImageStatsCallback(NULL), + mOnFloaterCommitCallback(nullptr), + mOnFloaterCloseCallback(nullptr), + mSetImageAssetIDCallback(nullptr), + mOnUpdateImageStatsCallback(nullptr), mBakeTextureEnabled(false), mLocalTextureEnabled(false), mNoCopyTextureSelected(false), @@ -1090,7 +1090,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem mNoCopyTextureSelected = false; if (itemp) { - if (!mTextureSelectedCallback.empty()) + if (mTextureSelectedCallback != nullptr) { mTextureSelectedCallback(itemp); } @@ -1683,11 +1683,11 @@ static LLDefaultChildRegistry::Register<LLTextureCtrl> r("texture_picker"); LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) : LLUICtrl(p), - mDragCallback(NULL), - mDropCallback(NULL), - mOnCancelCallback(NULL), - mOnCloseCallback(NULL), - mOnSelectCallback(NULL), + mDragCallback(nullptr), + mDropCallback(nullptr), + mOnCancelCallback(nullptr), + mOnCloseCallback(nullptr), + mOnSelectCallback(nullptr), mBorderColor( p.border_color() ), mAllowNoTexture( p.allow_no_texture ), mAllowLocalTexture( true ), diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 467b8d1091..e0060474ce 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -50,8 +50,8 @@ class LLViewerFetchedTexture; class LLFetchedGLTFMaterial; // used for setting drag & drop callbacks. -typedef boost::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback; -typedef boost::function<void (LLInventoryItem*)> texture_selected_callback; +typedef std::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback; +typedef std::function<void (LLInventoryItem*)> texture_selected_callback; // Helper functions for UI that work with picker bool get_is_predefined_texture(LLUUID asset_id); @@ -299,10 +299,10 @@ private: ////////////////////////////////////////////////////////////////////////////////////////// // LLFloaterTexturePicker -typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback; -typedef boost::function<void()> floater_close_callback; -typedef boost::function<void(const LLUUID& asset_id)> set_image_asset_id_callback; -typedef boost::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback; +typedef std::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback; +typedef std::function<void()> floater_close_callback; +typedef std::function<void(const LLUUID& asset_id)> set_image_asset_id_callback; +typedef std::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback; class LLFloaterTexturePicker : public LLFloater { diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f7cb0ee7ed..51ade60827 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -743,10 +743,10 @@ public: : LLTextureFetch::TFRequest(), mRegionHandle(region_handle) {} - TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined + TFReqSetRegion(const TFReqSetRegion&) = delete; + TFReqSetRegion& operator=(const TFReqSetRegion&) = delete; - virtual ~TFReqSetRegion() - {} + virtual ~TFReqSetRegion() = default; virtual bool doWork(LLTextureFetch * fetcher); @@ -793,7 +793,9 @@ public: const LLUUID & session_id, const LLUUID & agent_id, LLSD& stats_sd); - TFReqSendMetrics & operator=(const TFReqSendMetrics &); // Not defined + + TFReqSendMetrics(const TFReqSendMetrics&) = delete; + TFReqSendMetrics& operator=(const TFReqSendMetrics&) = delete; virtual ~TFReqSendMetrics(); @@ -2462,13 +2464,13 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); - mHttpOptionsWithHeaders = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared<LLCore::HttpOptions>(); + mHttpOptionsWithHeaders = std::make_shared<LLCore::HttpOptions>(); mHttpOptionsWithHeaders->setWantHeaders(true); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared<LLCore::HttpHeaders>(); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE); - mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpMetricsHeaders = std::make_shared<LLCore::HttpHeaders>(); mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING); mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER; @@ -3572,7 +3574,7 @@ TFReqSendMetrics::TFReqSendMetrics(const std::string & caps_url, mSessionID(session_id), mAgentID(agent_id), mStatsSD(stats_sd), - mHandler(new AssetReportHandler) + mHandler(std::make_shared<AssetReportHandler>()) {} diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 0f871dc1bb..3c939a88e5 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -117,7 +117,7 @@ LLToast::LLToast(const LLToast::Params& p) mIsFading(false), mIsHovered(false) { - mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); + mTimer = std::make_unique<LLToastLifeTimer>(this, p.lifetime_secs); buildFromFile("panel_toast.xml"); @@ -140,7 +140,7 @@ LLToast::LLToast(const LLToast::Params& p) } // init callbacks if present - if(!p.on_delete_toast().empty()) + if (p.on_delete_toast() != nullptr) { mOnDeleteToastSignal.connect(p.on_delete_toast()); } diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index cf116bfadf..a73f7820ba 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -75,7 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast> friend class LLToastLifeTimer; public: - typedef boost::function<void (LLToast* toast)> toast_callback_t; + typedef std::function<void (LLToast* toast)> toast_callback_t; typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t; typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 6c0b3bfa13..0c4a9c81c2 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,7 +46,7 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding -S32 BUTTON_WIDTH = 90; +const S32 BUTTON_WIDTH = 90; //static @@ -58,7 +58,8 @@ LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, const LLRect& rect, bool show_images) : LLCheckBoxToastPanel(notification) , LLInstanceTracker<LLToastNotifyPanel, LLUUID, LLInstanceTrackerReplaceOnCollision>(notification->getID()) -, mTextBox(NULL) +, mTextBox(NULL), + mButtonWidth(BUTTON_WIDTH) { init(rect, show_images); } @@ -69,9 +70,9 @@ void LLToastNotifyPanel::addDefaultButton() LLButton* ok_btn = createButton(form_element, false); LLRect new_btn_rect(ok_btn->getRect()); - new_btn_rect.setOriginAndSize(llabs(getRect().getWidth() - BUTTON_WIDTH)/ 2, BOTTOM_PAD, + new_btn_rect.setOriginAndSize(llabs(getRect().getWidth() - mButtonWidth) / 2, BOTTOM_PAD, //auto_size for ok button makes it very small, so let's make it wider - BUTTON_WIDTH, new_btn_rect.getHeight()); + mButtonWidth, new_btn_rect.getHeight()); ok_btn->setRect(new_btn_rect); addChild(ok_btn, -1); mNumButtons = 1; @@ -98,7 +99,7 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, bool is_opt p.font = font; p.rect.height = BTN_HEIGHT; p.click_callback.function(boost::bind(&LLToastNotifyPanel::onClickButton, userdata)); - p.rect.width = BUTTON_WIDTH; + p.rect.width = mButtonWidth; p.auto_resize = false; p.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); p.enabled = !form_element.has("enabled") || form_element["enabled"].asBoolean(); @@ -108,7 +109,7 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, bool is_opt p.image_color_disabled(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); } // for the scriptdialog buttons we use fixed button size. This is a limit! - if (!mIsScriptDialog && font->getWidth(form_element["text"].asString()) > (BUTTON_WIDTH-2*HPAD)) + if (!mIsScriptDialog && font->getWidth(form_element["text"].asString()) > (mButtonWidth - 2 * HPAD)) { p.rect.width = 1; p.auto_resize = true; @@ -273,7 +274,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) mInfoPanel = getChild<LLPanel>("info_panel"); mControlPanel = getChild<LLPanel>("control_panel"); - BUTTON_WIDTH = gSavedSettings.getS32("ToastButtonWidth"); + // customize panel's attributes // is it intended for displaying a tip? mIsTip = mNotification->getType() == "notifytip"; @@ -282,6 +283,10 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) // is it a script dialog? mIsScriptDialog = (notif_name == "ScriptDialog" || notif_name == "ScriptDialogGroup"); + static LLCachedControl<S32> btn_width(gSavedSettings, "ToastButtonWidth", 90); + static LLCachedControl<S32> script_button_width(gSavedSettings, "ScriptToastButtonWidth", 110); + mButtonWidth = mIsScriptDialog ? script_button_width : btn_width; + bool is_content_trusted = (notif_name != "LoadWebPage"); // is it a caution? // @@ -362,8 +367,21 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) } else { - const S32 button_panel_width = mControlPanel->getRect().getWidth();// do not change width of the panel + S32 button_panel_width = mControlPanel->getRect().getWidth();// get initial width from XML S32 button_panel_height = mControlPanel->getRect().getHeight(); + + // Script dialog has wider buttons so it requires wider layout to ensure proper spacing + if (mIsScriptDialog) + { + // width for 3 columns: 3 buttons + 2 gaps + S32 min_width_required = 3 * mButtonWidth + 2 * (2 * HPAD); + if (min_width_required > button_panel_width) + { + button_panel_width = min_width_required; + S32 width_increase = button_panel_width - mControlPanel->getRect().getWidth(); + reshape(getRect().getWidth() + width_increase, getRect().getHeight()); + } + } //try get an average h_pad to spread out buttons S32 h_pad = (button_panel_width - buttons_width) / (S32(buttons.size())); if(h_pad < 2*HPAD) @@ -373,8 +391,8 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) * for a scriptdialog toast h_pad can be < 2*HPAD if we have a lot of buttons. * In last case set default h_pad to avoid heaping of buttons */ - S32 button_per_row = button_panel_width / BUTTON_WIDTH; - h_pad = (button_panel_width % BUTTON_WIDTH) / (button_per_row - 1);// -1 because we do not need space after last button in a row + S32 button_per_row = button_panel_width / mButtonWidth; + h_pad = (button_panel_width % mButtonWidth) / (button_per_row - 1);// -1 because we do not need space after last button in a row if(h_pad < 2*HPAD) // still not enough space between buttons ? { h_pad = 2*HPAD; @@ -385,7 +403,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) // we are using default width for script buttons so we can determinate button_rows // to get a number of rows we divide the required width of the buttons to button_panel_width // buttons.size() is reduced by -2 due to presence of ignore button which is calculated independently a bit lower - S32 button_rows = llceil(F32(buttons.size() - 2) * (BUTTON_WIDTH + h_pad) / (button_panel_width + h_pad)); + S32 button_rows = llceil(F32(buttons.size() - 2) * (mButtonWidth + h_pad) / (button_panel_width + h_pad)); //reserve one row for the ignore_btn button_rows++; //calculate required panel height for scripdialog notification. diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index d694513aba..71b9eaf8f5 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -134,6 +134,8 @@ protected: S32 mNumOptions { 0 }; S32 mNumButtons { 0 }; + S32 mButtonWidth; + static const std::string sFontDefault; static const std::string sFontScript; }; diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index 25dc0982b8..55e178e084 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -48,7 +48,12 @@ bool LLToastScriptQuestion::postBuild() LLTextBox* mFooter = getChild<LLTextBox>("bottom_info_message"); mMessage->setValue(mNotification->getMessage()); - mFooter->setValue(mNotification->getFooter()); + std::string footer = mNotification->getFooter(); + mFooter->setValue(footer); + if (footer.empty()) + { + mFooter->setVisible(false); + } snapToMessageHeight(); @@ -78,21 +83,69 @@ void LLToastScriptQuestion::snapToMessageHeight() if (mMessage->getVisible() && mFooter->getVisible()) { - S32 heightDelta = 0; - S32 maxTextHeight = (mMessage->getFont()->getLineHeight() * MAX_LINES_COUNT) + S32 height_delta = 0; + S32 max_text_height = (mMessage->getFont()->getLineHeight() * MAX_LINES_COUNT) + (mFooter->getFont()->getLineHeight() * MAX_LINES_COUNT); - LLRect messageRect = mMessage->getRect(); - LLRect footerRect = mFooter->getRect(); + LLRect message_rect = mMessage->getRect(); + + S32 old_message_height = message_rect.getHeight(); + S32 new_message_height = mMessage->getTextBoundingRect().getHeight(); + S32 new_footer_height = mFooter->getTextBoundingRect().getHeight(); + + constexpr S32 FOOTER_PADDING = 8; // new height should include padding for newly added footer + S32 required_text_height = new_message_height + new_footer_height + FOOTER_PADDING; + S32 new_text_height = llmin(required_text_height, max_text_height); + + // Footer was invisible, so use old_message_height for old height + height_delta = new_text_height - old_message_height; + + reshape( getRect().getWidth(), llmax(getRect().getHeight() + height_delta, MIN_PANEL_HEIGHT)); + + // Floater was resized, now resize and shift children + // Message follows top, so it's top is in a correct position, but needs to be resized down + S32 message_delta = new_message_height - old_message_height; + message_rect = mMessage->getRect(); // refresh since it might have changed after reshape + message_rect.mBottom = message_rect.mBottom - message_delta; + mMessage->setRect(message_rect); + mMessage->needsReflow(); + // Button panel should stay the same size, just translate it + LLPanel* panel = getChild<LLPanel>("buttons_panel"); + panel->translate(0, -message_delta); + // Footer should be both moved and resized + LLRect footer_rect = mFooter->getRect(); + footer_rect.mTop = footer_rect.mTop - message_delta; + footer_rect.mBottom = footer_rect.mTop - new_footer_height; + mFooter->setRect(footer_rect); + mFooter->needsReflow(); + } + else if (mMessage->getVisible()) + { + S32 height_delta = 0; + S32 max_text_height = (mMessage->getFont()->getLineHeight() * MAX_LINES_COUNT); + + LLRect message_rect = mMessage->getRect(); + + S32 old_message_height = message_rect.getHeight(); + S32 new_message_height = mMessage->getTextBoundingRect().getHeight(); - S32 oldTextHeight = messageRect.getHeight() + footerRect.getHeight(); + S32 new_text_height = llmin(new_message_height, max_text_height); - S32 requiredTextHeight = mMessage->getTextBoundingRect().getHeight() + mFooter->getTextBoundingRect().getHeight(); - S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); + // Footer was invisible, so use old_message_height for old height + height_delta = new_text_height - old_message_height; - heightDelta = newTextHeight - oldTextHeight - heightDelta; + reshape(getRect().getWidth(), llmax(getRect().getHeight() + height_delta, MIN_PANEL_HEIGHT)); - reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + // Floater was resized, now resize and shift children + // Message follows top, so it's top is in a correct position, but needs to be resized down + S32 message_delta = new_message_height - old_message_height; + message_rect = mMessage->getRect(); // refresh since it might have changed after reshape + message_rect.mBottom = message_rect.mBottom - message_delta; + mMessage->setRect(message_rect); + mMessage->needsReflow(); + // Button panel should stay the same size, just translate it + LLPanel* panel = getChild<LLPanel>("buttons_panel"); + panel->translate(0, -message_delta); } } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index f78ff2226c..5e2d91d31e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -775,7 +775,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, bool drop, if (!handled) { // Disallow drag and drop to 3D from the marketplace - const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.notNull()) { for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h index 0f1574f2d5..6c79674d76 100644 --- a/indra/newview/lltoolpipette.h +++ b/indra/newview/lltoolpipette.h @@ -34,7 +34,6 @@ #include "lltool.h" #include "lltextureentry.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> class LLViewerObject; diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 5ccda7d4eb..3bd459f5b0 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -55,17 +55,17 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) : LLTool( std::string("Select"), composite ), mIgnoreGroup( false ) { - } +} // True if you selected an object. bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - bool pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects"); - bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); + static LLCachedControl<bool> select_invisible_objects(gSavedSettings, "SelectInvisibleObjects"); + static LLCachedControl<bool> select_reflection_probes(gSavedSettings, "SelectReflectionProbes"); - mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, false, true, pick_reflection_probe); + mPick = gViewerWindow->pickImmediate(x, y, select_invisible_objects, pick_rigged, false, true, select_reflection_probes); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); @@ -73,7 +73,6 @@ bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) return mPick.getObject().notNull(); } - // static LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root) { diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 72e30bd765..dcd1582eb9 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -155,10 +155,10 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); std::string user_agent = stringize( @@ -199,7 +199,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD bOk = false; } - if (!fnc.empty()) + if (fnc != nullptr) { fnc(service, bOk, parseResult); } @@ -210,10 +210,10 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); std::string user_agent = stringize( @@ -275,7 +275,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s LLStringUtil::replaceString(translation, "&", "&"); LLStringUtil::replaceString(translation, "'", "'"); - if (!success.empty()) + if (success != nullptr) success(translation, detected_lang); } else @@ -291,7 +291,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s } LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL; - if (!failure.empty()) + if (failure != nullptr) failure(status, err_msg); } } diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index 0ad769b27f..14372cf406 100644 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -28,10 +28,10 @@ #define LL_LLTRANSLATE_H #include "llbufferstream.h" -#include <boost/function.hpp> - #include "llsingleton.h" +#include <functional> + class LLTranslationAPIHandler; /** * Entry point for machine translation services. @@ -59,9 +59,9 @@ public : SERVICE_DEEPL, } EService; - typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn; - typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn; - typedef boost::function<void(int, std::string)> TranslationFailure_fn; + typedef std::function<void(EService, bool, S32)> KeyVerificationResult_fn; + typedef std::function<void(std::string, std::string)> TranslationSuccess_fn; + typedef std::function<void(int, std::string)> TranslationFailure_fn; /** * Translate given text. diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index de0ed645eb..871bf36ed3 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -84,7 +84,9 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; // *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335). - if (LLStringUtil::startsWith(unescaped_text, "http://") || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL + if (LLStringUtil::startsWith(unescaped_text, "https://") + || LLStringUtil::startsWith(unescaped_text, "http://") + || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); else // human-readable location text_to_copy = utf8str_to_wstring(unescaped_text); diff --git a/indra/newview/llvelopack.cpp b/indra/newview/llvelopack.cpp new file mode 100644 index 0000000000..6a667925b3 --- /dev/null +++ b/indra/newview/llvelopack.cpp @@ -0,0 +1,1414 @@ +/** + * @file llvelopack.cpp + * @brief Velopack installer and update framework integration + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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$ + */ + +#if LL_VELOPACK + +#include "llviewerprecompiledheaders.h" +#include "llvelopack.h" +#include "llstring.h" +#include "llcorehttputil.h" +#include "llversioninfo.h" + +#include <boost/json.hpp> +#include <fstream> +#include <unordered_map> +#include "llnotificationsutil.h" +#include "llviewercontrol.h" +#include "llappviewer.h" +#include "llcoros.h" + +#include "Velopack.h" + +#if LL_WINDOWS +#include <windows.h> +#include <shlobj.h> +#include <shobjidl.h> +#include <shlwapi.h> +#include <objbase.h> +#include <filesystem> + +#pragma comment(lib, "shlwapi.lib") +#pragma comment(lib, "ole32.lib") +#pragma comment(lib, "shell32.lib") +#endif // LL_WINDOWS + +// Common state +static std::string sUpdateUrl; +static std::function<void(int)> sProgressCallback; +static vpkc_update_manager_t* sUpdateManager = nullptr; +static vpkc_update_info_t* sPendingUpdate = nullptr; // Downloaded, ready to apply +static vpkc_update_info_t* sPendingCheckInfo = nullptr; // Checked, awaiting user response +static vpkc_update_source_t* sUpdateSource = nullptr; +static LLNotificationPtr sDownloadingNotification; +static bool sRestartAfterUpdate = false; +static bool sIsRequired = false; // Is the pending check a required update? +static std::string sReleaseNotesUrl; +static std::string sTargetVersion; // Velopack's actual target version + +// Forward declarations +static void show_required_update_prompt(); +static void show_downloading_notification(const std::string& version); +static void ensure_update_manager(bool allow_downgrade); +static void velopack_download_pending_update(); +static std::unordered_map<std::string, std::string> sAssetUrlMap; // basename -> original absolute URL + +// +// Custom update source helpers +// + +static std::string extract_basename(const std::string& url) +{ + // Strip query params / fragment + std::string path = url; + auto qpos = path.find('?'); + if (qpos != std::string::npos) path = path.substr(0, qpos); + auto fpos = path.find('#'); + if (fpos != std::string::npos) path = path.substr(0, fpos); + + auto spos = path.rfind('/'); + if (spos != std::string::npos && spos + 1 < path.size()) + return path.substr(spos + 1); + return path; +} + +static void rewrite_asset_urls(boost::json::value& jv) +{ + if (jv.is_object()) + { + auto& obj = jv.as_object(); + auto it = obj.find("FileName"); + if (it != obj.end() && it->value().is_string()) + { + std::string filename(it->value().as_string()); + if (filename.find("://") != std::string::npos) + { + std::string basename = extract_basename(filename); + sAssetUrlMap[basename] = filename; + it->value() = basename; + LL_DEBUGS("Velopack") << "Rewrote FileName: " << basename << LL_ENDL; + } + } + for (auto& kv : obj) + { + rewrite_asset_urls(kv.value()); + } + } + else if (jv.is_array()) + { + for (auto& elem : jv.as_array()) + { + rewrite_asset_urls(elem); + } + } +} + +static std::string rewrite_release_feed(const std::string& json_str) +{ + boost::json::value jv = boost::json::parse(json_str); + rewrite_asset_urls(jv); + return boost::json::serialize(jv); +} + +static std::string download_url_raw(const std::string& url) +{ + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + auto httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VelopackSource", httpPolicy); + auto httpRequest = std::make_shared<LLCore::HttpRequest>(); + auto httpOpts = std::make_shared<LLCore::HttpOptions>(); + httpOpts->setFollowRedirects(true); + + LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts); + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + if (!status) + { + LL_WARNS("Velopack") << "HTTP request failed for " << url << ": " << status.toString() << LL_ENDL; + return {}; + } + + const LLSD::Binary& rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); + return std::string(rawBody.begin(), rawBody.end()); +} + +static bool download_url_to_file(const std::string& url, const std::string& local_path) +{ + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + auto httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VelopackDownload", httpPolicy); + auto httpRequest = std::make_shared<LLCore::HttpRequest>(); + auto httpOpts = std::make_shared<LLCore::HttpOptions>(); + httpOpts->setFollowRedirects(true); + httpOpts->setTransferTimeout(1200); + + LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts); + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + if (!status) + { + LL_WARNS("Velopack") << "Download failed for " << url << ": " << status.toString() << LL_ENDL; + return false; + } + + const LLSD::Binary& rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); + llofstream outFile(local_path, std::ios::binary | std::ios::trunc); + if (!outFile.is_open()) + { + LL_WARNS("Velopack") << "Failed to open file for writing: " << local_path << LL_ENDL; + return false; + } + outFile.write(reinterpret_cast<const char*>(rawBody.data()), rawBody.size()); + outFile.close(); + return true; +} + +// +// Custom source callbacks +// + +static char* custom_get_release_feed(void* user_data, const char* releases_name) +{ + std::string base = sUpdateUrl; + if (!base.empty() && base.back() == '/') + base.pop_back(); + std::string url = base + "/" + releases_name; + LL_INFOS("Velopack") << "Fetching release feed: " << url << LL_ENDL; + + std::string json_str = download_url_raw(url); + if (json_str.empty()) + { + return nullptr; + } + + try + { + std::string rewritten = rewrite_release_feed(json_str); + char* result = static_cast<char*>(malloc(rewritten.size() + 1)); + if (result) + { + memcpy(result, rewritten.c_str(), rewritten.size() + 1); + } + return result; + } + catch (const std::exception& e) + { + LL_WARNS("Velopack") << "Failed to parse/rewrite release feed: " << e.what() << LL_ENDL; + // Return original unmodified feed as fallback + char* result = static_cast<char*>(malloc(json_str.size() + 1)); + if (result) + { + memcpy(result, json_str.c_str(), json_str.size() + 1); + } + return result; + } +} + +static void custom_free_release_feed(void* user_data, char* feed) +{ + free(feed); +} + +static std::string sPreDownloadedAssetPath; + +static bool custom_download_asset(void* user_data, + const vpkc_asset_t* asset, + const char* local_path, + size_t progress_callback_id) +{ + // The asset has already been downloaded at the coroutine level (before vpkc_download_updates). + // This callback just copies the pre-downloaded file to where Velopack expects it. + // We cannot use getRawAndSuspend here — coroutine context is lost through the Rust FFI boundary. + if (sPreDownloadedAssetPath.empty()) + { + LL_WARNS("Velopack") << "No pre-downloaded asset available" << LL_ENDL; + return false; + } + + std::string filename = asset->FileName ? asset->FileName : ""; + LL_INFOS("Velopack") << "Download asset callback: filename=" << filename + << " local_path=" << local_path + << " size=" << asset->Size << LL_ENDL; + vpkc_source_report_progress(progress_callback_id, 0); + + std::ifstream src(sPreDownloadedAssetPath, std::ios::binary); + llofstream dst(local_path, std::ios::binary | std::ios::trunc); + if (!src.is_open() || !dst.is_open()) + { + LL_WARNS("Velopack") << "Failed to open files for copy" << LL_ENDL; + return false; + } + + dst << src.rdbuf(); + dst.close(); + src.close(); + + vpkc_source_report_progress(progress_callback_id, 100); + LL_INFOS("Velopack") << "Asset copy complete" << LL_ENDL; + return true; +} + +// +// Platform-specific helpers and hooks +// + +#if LL_WINDOWS + +static const wchar_t* PROTOCOL_SECONDLIFE = L"secondlife"; +static const wchar_t* PROTOCOL_GRID_INFO = L"x-grid-location-info"; +static std::wstring get_viewer_exe_name() +{ + return ll_convert<std::wstring>(gDirUtilp->getExecutableFilename()); +} + +static std::wstring get_install_dir() +{ + wchar_t path[MAX_PATH]; + GetModuleFileNameW(NULL, path, MAX_PATH); + PathRemoveFileSpecW(path); + return path; +} + +static std::wstring get_app_name() +{ + // Match viewer_manifest.py app_name() logic: release channel uses "Viewer" + // suffix instead of "Release" for display purposes (shortcuts, uninstall, etc.) + std::wstring channel = LL_TO_WSTRING(LL_VIEWER_CHANNEL); + std::wstring release_suffix = L" Release"; + if (channel.size() >= release_suffix.size() && + channel.compare(channel.size() - release_suffix.size(), release_suffix.size(), release_suffix) == 0) + { + channel.replace(channel.size() - release_suffix.size(), release_suffix.size(), L" Viewer"); + } + return channel; +} + +static std::wstring get_app_name_oneword() +{ + std::wstring name = get_app_name(); + name.erase(std::remove(name.begin(), name.end(), L' '), name.end()); + return name; +} + +static std::wstring get_start_menu_path() +{ + wchar_t path[MAX_PATH]; + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROGRAMS, NULL, 0, path))) + { + return path; + } + return L""; +} + +static std::wstring get_desktop_path() +{ + wchar_t path[MAX_PATH]; + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY, NULL, 0, path))) + { + return path; + } + return L""; +} + +static HRESULT create_shortcut(const std::wstring& shortcut_path, + const std::wstring& target_path, + const std::wstring& arguments, + const std::wstring& description, + const std::wstring& icon_path) +{ + HRESULT hr = CoInitialize(NULL); + if (FAILED(hr)) return hr; + + IShellLinkW* shell_link = nullptr; + hr = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLinkW, (void**)&shell_link); + if (SUCCEEDED(hr)) + { + shell_link->SetPath(target_path.c_str()); + shell_link->SetArguments(arguments.c_str()); + shell_link->SetDescription(description.c_str()); + shell_link->SetIconLocation(icon_path.c_str(), 0); + + wchar_t work_dir[MAX_PATH]; + wcscpy_s(work_dir, target_path.c_str()); + PathRemoveFileSpecW(work_dir); + shell_link->SetWorkingDirectory(work_dir); + + IPersistFile* persist_file = nullptr; + hr = shell_link->QueryInterface(IID_IPersistFile, (void**)&persist_file); + if (SUCCEEDED(hr)) + { + hr = persist_file->Save(shortcut_path.c_str(), TRUE); + persist_file->Release(); + } + shell_link->Release(); + } + + CoUninitialize(); + return hr; +} + +static void register_protocol_handler(const std::wstring& protocol, + const std::wstring& description, + const std::wstring& exe_path) +{ + std::wstring key_path = L"SOFTWARE\\Classes\\" + protocol; + HKEY hkey; + + if (RegCreateKeyExW(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) + { + RegSetValueExW(hkey, NULL, 0, REG_SZ, + (BYTE*)description.c_str(), (DWORD)((description.size() + 1) * sizeof(wchar_t))); + RegSetValueExW(hkey, L"URL Protocol", 0, REG_SZ, (BYTE*)L"", sizeof(wchar_t)); + RegCloseKey(hkey); + } + + std::wstring icon_key_path = key_path + L"\\DefaultIcon"; + if (RegCreateKeyExW(HKEY_CURRENT_USER, icon_key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) + { + std::wstring icon_value = L"\"" + exe_path + L"\""; + RegSetValueExW(hkey, NULL, 0, REG_SZ, + (BYTE*)icon_value.c_str(), (DWORD)((icon_value.size() + 1) * sizeof(wchar_t))); + RegCloseKey(hkey); + } + + std::wstring cmd_key_path = key_path + L"\\shell\\open\\command"; + if (RegCreateKeyExW(HKEY_CURRENT_USER, cmd_key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) + { + std::wstring cmd_value = L"\"" + exe_path + L"\" -url \"%1\""; + RegSetValueExW(hkey, NULL, 0, REG_EXPAND_SZ, + (BYTE*)cmd_value.c_str(), (DWORD)((cmd_value.size() + 1) * sizeof(wchar_t))); + RegCloseKey(hkey); + } +} + +static bool get_shortcut_target(const std::wstring& lnk_path, std::wstring& target_path_str) +{ + // Resolve the shortcut to check its target + wchar_t target_path[MAX_PATH] = { 0 }; + HRESULT hr = CoInitialize(NULL); + bool res = false; + if (SUCCEEDED(hr)) + { + IShellLinkW* psl = nullptr; + hr = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (void**)&psl); + if (SUCCEEDED(hr)) + { + IPersistFile* ppf = nullptr; + hr = psl->QueryInterface(IID_IPersistFile, (void**)&ppf); + if (SUCCEEDED(hr)) + { + hr = ppf->Load(lnk_path.c_str(), STGM_READ); + if (SUCCEEDED(hr)) + { + // Resolve() in theory may retarget to a different executable, + // but we should be fine as long as folder stays the same, + // otherwise we shouldn't clear it. + hr = psl->Resolve(NULL, SLR_NO_UI | SLR_NOUPDATE | SLR_ANY_MATCH); + if (SUCCEEDED(hr)) + { + hr = psl->GetPath(target_path, MAX_PATH, nullptr, 0); + if (SUCCEEDED(hr)) + { + target_path_str = std::wstring(target_path); + res = true; + } + } + } + ppf->Release(); + } + psl->Release(); + } + CoUninitialize(); + } + return res; +} + +static bool paths_are_equal(const std::wstring& path1, const std::wstring& path2) +{ + try + { + std::error_code ec1, ec2; + std::filesystem::path p1(path1); + std::filesystem::path p2(path2); + + // Get canonical (absolute, normalized) paths + auto canonical1 = std::filesystem::canonical(p1, ec1); + auto canonical2 = std::filesystem::canonical(p2, ec2); + + // If either path doesn't exist, fall back to string comparison + if (ec1 || ec2) + { + // Normalize case for comparison + std::wstring lower1 = path1; + std::wstring lower2 = path2; + std::transform(lower1.begin(), lower1.end(), lower1.begin(), ::towlower); + std::transform(lower2.begin(), lower2.end(), lower2.begin(), ::towlower); + while (!lower1.empty() && (lower1.back() == L'\\' || lower1.back() == L'/')) + { + lower1.pop_back(); + } + while (!lower2.empty() && (lower2.back() == L'\\' || lower2.back() == L'/')) + { + lower2.pop_back(); + } + return lower1 == lower2; + } + + // Use filesystem::equivalent which handles all path variations + return std::filesystem::equivalent(canonical1, canonical2, ec1); + } + catch (const std::filesystem::filesystem_error&) + { + // Fallback to case-insensitive string comparison + std::wstring lower1 = path1; + std::wstring lower2 = path2; + std::transform(lower1.begin(), lower1.end(), lower1.begin(), ::towlower); + std::transform(lower2.begin(), lower2.end(), lower2.begin(), ::towlower); + while (!lower1.empty() && (lower1.back() == L'\\' || lower1.back() == L'/')) + { + lower1.pop_back(); + } + while (!lower2.empty() && (lower2.back() == L'\\' || lower2.back() == L'/')) + { + lower2.pop_back(); + } + return lower1 == lower2; + } +} + +static void update_taskbar_shortcut(const std::string& nsis_folder_path, const std::wstring& appdata_path, const std::wstring& app_name, const std::wstring& link_name) +{ + std::wstring taskbar_path = appdata_path; + taskbar_path += L"\\Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar\\"; + taskbar_path += link_name; + + if (!PathFileExistsW(taskbar_path.c_str())) + { + // User didn't create one + return; + } + + // Verify we are removing or updating the right thing. + // It is not warranteed that the shortcut points to NSIS. + std::wstring target_path; + if (get_shortcut_target(taskbar_path, target_path)) + { + // Strip the filename part to get just the folder path + std::filesystem::path trim_path(target_path); + if (trim_path.has_filename()) + { + target_path = trim_path.parent_path().wstring(); + } + std::wstring nsis_path_w = ll_convert<std::wstring>(nsis_folder_path); + if (!paths_are_equal(nsis_path_w, target_path)) + { + // Shortcut points to something else, don't mess with it + LL_INFOS("Velopack") << "Found a matching shortcut, but it points to a different channel. Expected: " + << ll_convert_wide_to_string(nsis_path_w) + << ", actual: " << ll_convert_wide_to_string(target_path) + << LL_ENDL; + return; + } + } + + // First try to overwrite shortcut + std::wstring current_exe = ll_convert<std::wstring>(gDirUtilp->getExecutablePathAndName()); + HRESULT hr = create_shortcut(taskbar_path, current_exe, L"", app_name, current_exe); + if (SUCCEEDED(hr)) + { + LL_INFOS("Velopack") << "Successfully updated taskbar shortcut to point to current exe" << LL_ENDL; + return; + } + + // Try deleting and if possible, recreating separately. We should not leave hanging shortcuts behind. + if (!DeleteFileW(taskbar_path.c_str())) + { + DWORD error = GetLastError(); + if (error != ERROR_FILE_NOT_FOUND) + { + LL_WARNS("Velopack") << "Failed to delete NSIS taskbar shortcut: " + << ll_convert_wide_to_string(taskbar_path) + << " (error: " << error << ")" << LL_ENDL; + } + } + else + { + // Deleted user created link, recreate it with new target if possible. + LL_INFOS("Velopack") << "Updating taskbar shortcut to point to current exe" << LL_ENDL; + HRESULT hr = create_shortcut(taskbar_path, current_exe, L"", app_name, current_exe); + if (FAILED(hr)) + { + LL_WARNS("Velopack") << "Failed to re-create taskbar shortcut, error: " << std::hex << hr << ", NSIS shortcut was removed" << LL_ENDL; + } + } +} + +void clear_nsis_links(const std::string& nsis_folder_path) +{ + wchar_t path[MAX_PATH]; + std::wstring app_name = get_app_name(); + + // 1. The 'start' shortcuts set by nsis would be global, like app shortcut: + // C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Second Life Viewer\Second Life Viewer.lnk + // But it isn't just one link, it's a whole directory that needs to be removed. + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_COMMON_PROGRAMS, NULL, 0, path))) + { + std::wstring start_menu_path = path; + std::wstring folder_path = start_menu_path + L"\\" + app_name; + + std::error_code ec; + std::filesystem::path dir(folder_path); + if (std::filesystem::exists(dir, ec)) + { + std::filesystem::remove_all(dir, ec); + if (ec) + { + LL_WARNS("Velopack") << "Failed to remove NSIS start menu directory: " + << ll_convert_wide_to_string(folder_path) << LL_ENDL; + } + } + } + + // 2. Desktop link, also a global one. + // C:\Users\Public\Desktop\Second Life Viewer.lnk + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_COMMON_DESKTOPDIRECTORY, NULL, 0, path))) + { + std::wstring desktop_path = path; + std::wstring shortcut_path = desktop_path + L"\\" + app_name + L".lnk"; + if (!DeleteFileW(shortcut_path.c_str())) + { + DWORD error = GetLastError(); + if (error != ERROR_FILE_NOT_FOUND) + { + LL_WARNS("Velopack") << "Failed to delete NSIS desktop shortcut: " + << ll_convert_wide_to_string(shortcut_path) + << " (error: " << error << ")" << LL_ENDL; + } + } + } + + // 3. Taskbar links, which are user-specific and located at: + // %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\ + // Note that it can be a link to velopack already or to a different NSIS viewer. + // Name might also be different based on method of creation. + if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, path))) + { + update_taskbar_shortcut(nsis_folder_path, path, app_name, L"Second Life.lnk"); // Window class name + update_taskbar_shortcut(nsis_folder_path, path, app_name, L"Second Life(1).lnk"); // Just in case user somehow did it twice and removed first + update_taskbar_shortcut(nsis_folder_path, path, app_name, L"SecondLifeViewer.lnk"); // Executable name + update_taskbar_shortcut(nsis_folder_path, path, app_name, L"secondlife-bin.lnk"); // Debug builds + update_taskbar_shortcut(nsis_folder_path, path, app_name, app_name + L".lnk"); // Default name + } +} + +static void parse_version(const wchar_t* version_str, int& major, int& minor, int& patch, uint64_t& build) +{ + major = minor = patch = 0; + build = 0; + if (!version_str) return; + // Use swscanf for wide strings + swscanf(version_str, L"%d.%d.%d.%llu", &major, &minor, &patch, &build); +} + +bool get_nsis_version( + int& nsis_major, + int& nsis_minor, + int& nsis_patch, + uint64_t& nsis_build, + std::string& nsis_path) +{ + // Test for presence of NSIS viewer registration, then + // attempt to read uninstall info + std::wstring app_name_oneword = get_app_name_oneword(); + std::wstring uninstall_key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + app_name_oneword; + HKEY hkey; + LONG result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, uninstall_key_path.c_str(), 0, KEY_READ, &hkey); + if (result != ERROR_SUCCESS) + { + return false; + } + + // Read DisplayVersion + wchar_t version_buf[64] = { 0 }; + DWORD version_buf_size = sizeof(version_buf); + DWORD type = 0; + LONG ver_rv = RegGetValueW(hkey, nullptr, L"DisplayVersion", RRF_RT_REG_SZ, &type, version_buf, &version_buf_size); + + if (ver_rv != ERROR_SUCCESS) + { + RegCloseKey(hkey); + return false; + } + + parse_version(version_buf, nsis_major, nsis_minor, nsis_patch, nsis_build); + + // Make sure it actually exists and not a dead entry. + wchar_t path_buffer[MAX_PATH] = { 0 }; + DWORD path_buf_size = sizeof(path_buffer); + LONG rv = RegGetValueW(hkey, nullptr, L"UninstallString", RRF_RT_REG_SZ, &type, path_buffer, &path_buf_size); + RegCloseKey(hkey); + if (rv != ERROR_SUCCESS) + { + return false; + } + size_t len = wcslen(path_buffer); + if (len > 0) + { + if (path_buffer[0] == L'\"') + { + // Likely to contain leading " + memmove(path_buffer, path_buffer + 1, len * sizeof(wchar_t)); + } + wchar_t* pos = wcsstr(path_buffer, L"uninst.exe"); + if (pos) + { + // Likely to contain trailing " + pos[wcslen(L"uninst.exe")] = L'\0'; + } + } + std::error_code ec; + std::filesystem::path path(path_buffer); + // check if uninstaller exists + if (!std::filesystem::exists(path, ec)) + { + return false; + } + + // We found a valid NSIS installation, trim the path to get the folder + wchar_t* pos = wcsstr(path_buffer, L"uninst.exe"); + if (pos) + { + // Trim uninst.exe from the path by setting null terminator before it + *pos = L'\0'; + } + // Note that it has a trailing backslash. + nsis_path = ll_convert_wide_to_string(path_buffer); + + return true; +} + +static void unregister_protocol_handler(const std::wstring& protocol) +{ + std::wstring key_path = L"SOFTWARE\\Classes\\" + protocol; + RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str()); +} + +static void register_uninstall_info(const std::wstring& install_dir, + const std::wstring& app_name, + const std::wstring& version) +{ + std::wstring app_name_oneword = get_app_name_oneword(); + // Clears velopack's recently created 'uninstall' registry entry. + // We are going to use a custom one. + // Note that velopack doesn't know about our custom entry. + std::wstring key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + app_name_oneword; + RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str()); + // Use a unique key name to avoid conflicts with any existing NSIS-based uninstall info, + // which can cause only one of the two entries to show up in the Add/Remove Programs list. + // The UI will show DisplayName, so the key name itself is not important to be user-friendly. + key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vlpk" + app_name_oneword; + HKEY hkey; + + if (RegCreateKeyExW(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) + { + std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name(); + // Update.exe lives one level above the current\ directory where the viewer exe runs + std::filesystem::path update_exe = std::filesystem::path(install_dir).parent_path() / L"Update.exe"; + std::wstring uninstall_cmd = L"\"" + update_exe.wstring() + L"\" --uninstall"; + + RegSetValueExW(hkey, L"DisplayName", 0, REG_SZ, + (BYTE*)app_name.c_str(), (DWORD)((app_name.size() + 1) * sizeof(wchar_t))); + RegSetValueExW(hkey, L"DisplayVersion", 0, REG_SZ, + (BYTE*)version.c_str(), (DWORD)((version.size() + 1) * sizeof(wchar_t))); + RegSetValueExW(hkey, L"Publisher", 0, REG_SZ, + (BYTE*)L"Linden Research, Inc.", 44); + RegSetValueExW(hkey, L"UninstallString", 0, REG_SZ, + (BYTE*)uninstall_cmd.c_str(), (DWORD)((uninstall_cmd.size() + 1) * sizeof(wchar_t))); + RegSetValueExW(hkey, L"DisplayIcon", 0, REG_SZ, + (BYTE*)exe_path.c_str(), (DWORD)((exe_path.size() + 1) * sizeof(wchar_t))); + + std::wstring link_url = L"https://support.secondlife.com/contact-support/"; + RegSetValueExW(hkey, L"HelpLink", 0, REG_SZ, + (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t))); + + link_url = L"https://secondlife.com/whatis/"; + RegSetValueExW(hkey, L"URLInfoAbout", 0, REG_SZ, + (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t))); + + link_url = L"https://secondlife.com/support/downloads/"; + RegSetValueExW(hkey, L"URLUpdateInfo", 0, REG_SZ, + (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t))); + + DWORD no_modify = 1; + RegSetValueExW(hkey, L"NoModify", 0, REG_DWORD, (BYTE*)&no_modify, sizeof(DWORD)); + RegSetValueExW(hkey, L"NoRepair", 0, REG_DWORD, (BYTE*)&no_modify, sizeof(DWORD)); + + // Format YYYYMMDD + wchar_t dateStr[9]; + time_t t = time(NULL); + struct tm tm; + localtime_s(&tm, &t); + wcsftime(dateStr, 9, L"%Y%m%d", &tm); + RegSetValueExW(hkey, L"InstallDate", 0, REG_SZ, (BYTE*)dateStr, (DWORD)((wcslen(dateStr) + 1) * sizeof(wchar_t))); // Let Windows fill in the install date + + // 800 MB, inaccurate, but for a rough idea. + // We can check folder size here, but it would take time and + // information is of low importance. + DWORD estimated_size = 800000; + RegSetValueExW(hkey, L"EstimatedSize", 0, REG_DWORD, (BYTE*)&estimated_size, sizeof(DWORD)); + + RegCloseKey(hkey); + } +} + +static void unregister_uninstall_info() +{ + std::wstring app_name_oneword = get_app_name_oneword(); + std::wstring key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vlpk" + app_name_oneword; + RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str()); +} + +static void create_shortcuts(const std::wstring& install_dir, const std::wstring& app_name) +{ + std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name(); + std::wstring start_menu_dir = get_start_menu_path() + L"\\" + app_name; + std::wstring desktop_path = get_desktop_path(); + + CreateDirectoryW(start_menu_dir.c_str(), NULL); + + create_shortcut(start_menu_dir + L"\\" + app_name + L".lnk", + exe_path, L"", app_name, exe_path); + + create_shortcut(desktop_path + L"\\" + app_name + L".lnk", + exe_path, L"", app_name, exe_path); +} + +static void remove_shortcuts(const std::wstring& app_name) +{ + std::wstring start_menu_dir = get_start_menu_path() + L"\\" + app_name; + std::wstring desktop_path = get_desktop_path(); + + DeleteFileW((start_menu_dir + L"\\" + app_name + L".lnk").c_str()); + RemoveDirectoryW(start_menu_dir.c_str()); + DeleteFileW((desktop_path + L"\\" + app_name + L".lnk").c_str()); +} + +static void on_first_run(void* p_user_data, const char* app_version) +{ + // Velopack first executes 'after install' hook, then writes registry, + // then executes 'on first run' hook. + // As we need to clear velopack's 'uninstall' registry entry and use + // our own, clean it here instead of on_after_install. + + std::wstring install_dir = get_install_dir(); + std::wstring app_name = get_app_name(); + + int len = MultiByteToWideChar(CP_UTF8, 0, app_version, -1, NULL, 0); + std::wstring version(len, 0); + MultiByteToWideChar(CP_UTF8, 0, app_version, -1, &version[0], len); + + register_uninstall_info(install_dir, app_name, version); + + // Drop install related settings + // Unfortunately gDirUtilp is not initialized yet and it's shouldn't + // be possible to change location of the settings. For now it's simpler + // to hardcode the location. + std::optional<std::string> app_data = LLStringUtil::getoptenv("APPDATA"); + if (app_data) + { + // Strip trailing delimiter if present + std::string app_data_path = *app_data; + if (!app_data_path.empty() && (app_data_path.back() == '\\' || app_data_path.back() == '/')) + { + app_data_path.pop_back(); + } + + std::string user_settings_path = app_data_path + "\\SecondLife\\user_settings\\settings.xml"; + LLControlGroup settings("global"); + if (settings.loadFromFile(user_settings_path)) + { + // If user reinstalls or updates, we want to recheck for nsis leftovers. + if (settings.controlExists("PreviousInstallChecked")) + { + settings.setBOOL("PreviousInstallChecked", false); + } + settings.saveToFile(user_settings_path, true); + } + } +} + +static void on_after_install(void* user_data, const char* app_version) +{ + std::wstring install_dir = get_install_dir(); + std::wstring app_name = get_app_name(); + std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name(); + + register_protocol_handler(PROTOCOL_SECONDLIFE, L"URL:Second Life", exe_path); + register_protocol_handler(PROTOCOL_GRID_INFO, L"URL:Second Life", exe_path); + create_shortcuts(install_dir, app_name); +} + +static void on_before_uninstall(void* user_data, const char* app_version) +{ + std::wstring app_name = get_app_name(); + + unregister_protocol_handler(PROTOCOL_SECONDLIFE); + unregister_protocol_handler(PROTOCOL_GRID_INFO); + unregister_uninstall_info(); + remove_shortcuts(app_name); +} + +static void on_log_message(void* user_data, const char* level, const char* message) +{ + OutputDebugStringA("[Velopack] "); + OutputDebugStringA(level); + OutputDebugStringA(": "); + OutputDebugStringA(message); + OutputDebugStringA("\n"); +} + +#elif LL_DARWIN + +// macOS-specific hooks +// TODO: Implement protocol handler registration via Launch Services +// TODO: Implement app bundle management + +static void on_first_run(void* user_data, const char* app_version) +{ +} + +static void on_after_install(void* user_data, const char* app_version) +{ + // macOS handles protocol registration via Info.plist CFBundleURLTypes + // No additional registration needed at runtime + LL_INFOS("Velopack") << "macOS post-install hook called for version: " << app_version << LL_ENDL; +} + +static void on_before_uninstall(void* user_data, const char* app_version) +{ + LL_INFOS("Velopack") << "macOS pre-uninstall hook called for version: " << app_version << LL_ENDL; +} + +static void on_log_message(void* user_data, const char* level, const char* message) +{ + LL_INFOS("Velopack") << "[" << level << "] " << message << LL_ENDL; +} + +#endif // LL_WINDOWS / LL_DARWIN + +// +// Common progress callback +// + +static void on_progress(void* user_data, size_t progress) +{ + if (sProgressCallback) + { + sProgressCallback(static_cast<int>(progress)); + } +} + +static void on_vpk_log(void* p_user_data, + const char* psz_level, + const char* psz_message) +{ + LL_DEBUGS("Velopack") << ll_safe_string(psz_message) << LL_ENDL; +} + +// +// Version comparison helper +// + +// Compare running version against a VVM version string "major.minor.patch.build". +// Returns -1 if running < vvm, 0 if equal, 1 if running > vvm. +static int compare_running_version(const std::string& vvm_version) +{ + S32 major = 0, minor = 0, patch = 0; + U64 build = 0; + sscanf(vvm_version.c_str(), "%d.%d.%d.%llu", &major, &minor, &patch, &build); + + const LLVersionInfo& vi = LLVersionInfo::instance(); + S32 cur_major = vi.getMajor(); + S32 cur_minor = vi.getMinor(); + S32 cur_patch = vi.getPatch(); + U64 cur_build = vi.getBuild(); + + if (cur_major != major) return cur_major < major ? -1 : 1; + if (cur_minor != minor) return cur_minor < minor ? -1 : 1; + if (cur_patch != patch) return cur_patch < patch ? -1 : 1; + if (cur_build != build) return cur_build < build ? -1 : 1; + return 0; +} + +// +// Update manager lifecycle +// + +static void ensure_update_manager(bool allow_downgrade) +{ + if (sUpdateManager) + return; + + vpkc_update_options_t options = {}; + options.AllowVersionDowngrade = allow_downgrade; + options.ExplicitChannel = nullptr; + + if (!sUpdateSource) + { + sUpdateSource = vpkc_new_source_custom_callback( + custom_get_release_feed, + custom_free_release_feed, + custom_download_asset, + nullptr); + } + + vpkc_locator_config_t* locator_ptr = nullptr; + +#if LL_DARWIN + // Try auto-detection first (works when the app bundle was packaged by vpk + // and has UpdateMac + sq.version already present) + if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, nullptr, &sUpdateManager)) + { + char err[512]; + vpkc_get_last_error(err, sizeof(err)); + LL_INFOS("Velopack") << "Auto-detect failed (" << ll_safe_string(err) + << "), falling back to explicit locator" << LL_ENDL; + + // Auto-detection failed — construct an explicit locator. + // This handles legacy DMG installs that don't have Velopack's + // install state (UpdateMac, sq.version) in the bundle. + vpkc_locator_config_t locator = {}; + + // The executable lives at <bundle>/Contents/MacOS/<exe> + // The app bundle root is two levels up from the executable directory. + std::string exe_dir = gDirUtilp->getExecutableDir(); + std::string bundle_root = exe_dir + "/../.."; + char resolved[PATH_MAX]; + if (realpath(bundle_root.c_str(), resolved)) + { + bundle_root = resolved; + } + + // Construct a version string in Velopack SemVer format: major.minor.patch-build + const LLVersionInfo& vi = LLVersionInfo::instance(); + std::string current_version = llformat("%d.%d.%d-%llu", + vi.getMajor(), vi.getMinor(), vi.getPatch(), vi.getBuild()); + + // Create a minimal sq.version manifest so Velopack knows our version. + // Proper vpk-packaged builds have this in the bundle already. + std::string manifest_path = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, "sq.version"); + { + std::string app_name = LLVersionInfo::instance().getChannel(); + std::string pack_id = app_name; + pack_id.erase(std::remove(pack_id.begin(), pack_id.end(), ' '), pack_id.end()); + + std::string nuspec = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<package xmlns=\"http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd\">\n" + " <metadata>\n" + " <id>" + pack_id + "</id>\n" + " <version>" + current_version + "</version>\n" + " <title>" + app_name + "</title>\n" + " </metadata>\n" + "</package>\n"; + + llofstream manifest_file(manifest_path, std::ios::trunc); + if (manifest_file.is_open()) + { + manifest_file << nuspec; + manifest_file.close(); + } + } + + std::string packages_dir = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, "velopack-packages"); + LLFile::mkdir(packages_dir); + + locator.RootAppDir = const_cast<char*>(bundle_root.c_str()); + locator.CurrentBinaryDir = const_cast<char*>(exe_dir.c_str()); + locator.ManifestPath = const_cast<char*>(manifest_path.c_str()); + locator.PackagesDir = const_cast<char*>(packages_dir.c_str()); + locator.UpdateExePath = nullptr; + locator.IsPortable = false; + + locator_ptr = &locator; + + LL_INFOS("Velopack") << "Explicit locator: RootAppDir=" << bundle_root + << " CurrentBinaryDir=" << exe_dir + << " Version=" << current_version << LL_ENDL; + + if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, locator_ptr, &sUpdateManager)) + { + char err2[512]; + vpkc_get_last_error(err2, sizeof(err2)); + LL_WARNS("Velopack") << "Failed to create update manager: " << ll_safe_string(err2) << LL_ENDL; + } + } + return; +#endif + + // Windows: Velopack auto-detection works because the viewer is installed + // by Velopack's Setup.exe which creates the proper install structure. + if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, nullptr, &sUpdateManager)) + { + char err[512]; + vpkc_get_last_error(err, sizeof(err)); + LL_WARNS("Velopack") << "Failed to create update manager: " << ll_safe_string(err) << LL_ENDL; + } +} + +// +// Public API - Cross-platform +// + +bool velopack_initialize() +{ + vpkc_set_logger(on_log_message, nullptr); + vpkc_app_set_auto_apply_on_startup(false); + +#if LL_WINDOWS || LL_DARWIN + vpkc_app_set_hook_first_run(on_first_run); + vpkc_app_set_hook_after_install(on_after_install); + vpkc_app_set_hook_before_uninstall(on_before_uninstall); +#endif + + vpkc_app_run(nullptr); + return true; +} + +// Downloads the update that was found during the check phase. +// Operates on sPendingCheckInfo which was set by velopack_check_for_updates. +static void velopack_download_pending_update() +{ + if (!sUpdateManager || !sPendingCheckInfo) + { + LL_WARNS("Velopack") << "No pending check info to download" << LL_ENDL; + return; + } + + LL_DEBUGS("Velopack") << "Setting up detailed logging"; + vpkc_set_logger(on_vpk_log, nullptr); + LL_CONT << LL_ENDL; + LL_INFOS("Velopack") << "Downloading update..." << LL_ENDL; + + // Pre-download the nupkg at the coroutine level where getRawAndSuspend works. + // The download callback inside the Rust FFI cannot use coroutine HTTP. + std::string asset_filename = sPendingCheckInfo->TargetFullRelease->FileName + ? sPendingCheckInfo->TargetFullRelease->FileName : ""; + std::string asset_url; + auto url_it = sAssetUrlMap.find(asset_filename); + if (url_it != sAssetUrlMap.end()) + { + asset_url = url_it->second; + } + else + { + std::string base = sUpdateUrl; + if (!base.empty() && base.back() == '/') + base.pop_back(); + asset_url = base + "/" + asset_filename; + } + + sPreDownloadedAssetPath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, asset_filename); + LL_INFOS("Velopack") << "Pre-downloading " << asset_url + << " to " << sPreDownloadedAssetPath << LL_ENDL; + + if (!download_url_to_file(asset_url, sPreDownloadedAssetPath)) + { + LL_WARNS("Velopack") << "Failed to pre-download update asset" << LL_ENDL; + sPreDownloadedAssetPath.clear(); + return; + } + + LL_INFOS("Velopack") << "Pre-download complete, handing to Velopack" << LL_ENDL; + if (vpkc_download_updates(sUpdateManager, sPendingCheckInfo, on_progress, nullptr)) + { + if (sPendingUpdate) + { + vpkc_free_update_info(sPendingUpdate); + } + sPendingUpdate = sPendingCheckInfo; + sPendingCheckInfo = nullptr; // Ownership transferred + LL_INFOS("Velopack") << "Update downloaded and pending" << LL_ENDL; + } + else + { + char descr[512]; + vpkc_get_last_error(descr, sizeof(descr)); + LL_WARNS("Velopack") << "Failed to download update: " << ll_safe_string((const char*)descr) << LL_ENDL; + } +} + +static void on_downloading_closed(const LLSD& notification, const LLSD& response) +{ + sDownloadingNotification = nullptr; + if (sIsRequired) + { + // User closed the downloading dialog during a required update — re-show it + show_downloading_notification(sTargetVersion); + } +} + +static void show_downloading_notification(const std::string& version) +{ + LLSD args; + args["VERSION"] = version; + sDownloadingNotification = LLNotificationsUtil::add("DownloadingUpdate", args, LLSD(), on_downloading_closed); +} + +static void dismiss_downloading_notification() +{ + if (sDownloadingNotification) + { + LLNotificationsUtil::cancel(sDownloadingNotification); + sDownloadingNotification = nullptr; + } +} + +static void on_required_update_response(const LLSD& notification, const LLSD& response) +{ + LL_INFOS("Velopack") << "Required update acknowledged, starting download" << LL_ENDL; + show_downloading_notification(sTargetVersion); + LLCoros::instance().launch("VelopackRequiredUpdate", []() + { + velopack_download_pending_update(); + dismiss_downloading_notification(); + if (velopack_is_update_pending()) + { + LL_INFOS("Velopack") << "Required update downloaded, quitting to apply" << LL_ENDL; + velopack_request_restart_after_update(); + LLAppViewer::instance()->requestQuit(); + } + }); +} + +static void on_optional_update_response(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) // "Install" + { + LL_INFOS("Velopack") << "User accepted optional update, starting download" << LL_ENDL; + show_downloading_notification(sTargetVersion); + LLCoros::instance().launch("VelopackOptionalUpdate", []() + { + velopack_download_pending_update(); + dismiss_downloading_notification(); + if (velopack_is_update_pending()) + { + LL_INFOS("Velopack") << "Optional update downloaded, quitting to apply" << LL_ENDL; + velopack_request_restart_after_update(); + LLAppViewer::instance()->requestQuit(); + } + }); + } + else + { + LL_INFOS("Velopack") << "User declined optional update (option=" << option << ")" << LL_ENDL; + // Free the check info since user declined + if (sPendingCheckInfo) + { + vpkc_free_update_info(sPendingCheckInfo); + sPendingCheckInfo = nullptr; + } + } +} + +static void show_required_update_prompt() +{ + LLSD args; + args["VERSION"] = sTargetVersion; + args["URL"] = sReleaseNotesUrl; + LLNotificationsUtil::add("PauseForUpdate", args, LLSD(), on_required_update_response); +} + +void velopack_check_for_updates(const std::string& required_version, const std::string& relnotes_url) +{ + if (sUpdateUrl.empty()) + { + LL_DEBUGS("Velopack") << "No update URL set, skipping update check" << LL_ENDL; + return; + } + + // Allow downgrades only for rollbacks: VVM requires a version that's + // strictly lower than what we're running (e.g., a retracted build). + bool has_required = !required_version.empty(); + int ver_cmp = has_required ? compare_running_version(required_version) : 0; + bool allow_downgrade = ver_cmp > 0; // running > required → rollback scenario + ensure_update_manager(allow_downgrade); + if (!sUpdateManager) + return; + + // Ask Velopack to check its feed — this is the source of truth + vpkc_update_info_t* update_info = nullptr; + vpkc_update_check_t result = vpkc_check_for_updates(sUpdateManager, &update_info); + + if (result != UPDATE_AVAILABLE || !update_info) + { + LL_INFOS("Velopack") << "No update available from feed (result=" << result << ")" << LL_ENDL; + return; + } + + // Extract the actual target version from Velopack's feed + std::string target_version = update_info->TargetFullRelease->Version + ? update_info->TargetFullRelease->Version : ""; + LL_INFOS("Velopack") << "Update available: " << target_version + << " (required_version=" << required_version << ")" << LL_ENDL; + + // Store state for the prompt/download phase + sReleaseNotesUrl = relnotes_url; + sTargetVersion = target_version; + if (sPendingCheckInfo) + { + vpkc_free_update_info(sPendingCheckInfo); + } + sPendingCheckInfo = update_info; + + // Determine if this is mandatory: running version is below VVM's required floor + bool is_required = ver_cmp < 0; // running < required → must update + sIsRequired = is_required; + + if (is_required) + { + LL_INFOS("Velopack") << "Required update (running below " << required_version + << "), prompting user for " << target_version << LL_ENDL; + show_required_update_prompt(); + return; + } + + // Optional update — check user preference + U32 updater_setting = gSavedSettings.getU32("UpdaterServiceSetting"); + + if (updater_setting == 3) + { + // "Install each update automatically" — download silently, apply on quit + LL_INFOS("Velopack") << "Optional update to " << target_version + << ", downloading automatically (UpdaterServiceSetting=3)" << LL_ENDL; + velopack_download_pending_update(); + return; + } + + // Default / value 1: "Ask me when an optional update is ready to install" + LL_INFOS("Velopack") << "Optional update available (" << target_version << "), prompting user" << LL_ENDL; + LLSD args; + args["VERSION"] = target_version; + args["URL"] = relnotes_url; + LLNotificationsUtil::add("PromptOptionalUpdate", args, LLSD(), on_optional_update_response); +} + +std::string velopack_get_current_version() +{ + if (!sUpdateManager) + { + return ""; + } + + char version[64]; + size_t len = vpkc_get_current_version(sUpdateManager, version, sizeof(version)); + if (len > 0) + { + return std::string(version, len); + } + return ""; +} + +bool velopack_is_update_pending() +{ + return sPendingUpdate != nullptr; +} + +bool velopack_is_required_update_in_progress() +{ + return sIsRequired && sPendingCheckInfo != nullptr; +} + +std::string velopack_get_required_update_version() +{ + return sTargetVersion; +} + +bool velopack_should_restart_after_update() +{ + return sRestartAfterUpdate; +} + +void velopack_request_restart_after_update() +{ + sRestartAfterUpdate = true; +} + +void velopack_apply_pending_update(bool restart) +{ + if (!sUpdateManager || !sPendingUpdate || !sPendingUpdate->TargetFullRelease) + { + LL_WARNS("Velopack") << "Cannot apply update: no pending update or manager" << LL_ENDL; + return; + } + + LL_INFOS("Velopack") << "Applying pending update (restart=" << restart << ")" << LL_ENDL; + vpkc_wait_exit_then_apply_updates(sUpdateManager, + sPendingUpdate->TargetFullRelease, + false, + restart, + nullptr, 0); +} + +void velopack_cleanup() +{ + if (sUpdateManager) + { + vpkc_free_update_manager(sUpdateManager); + sUpdateManager = nullptr; + } + if (sUpdateSource) + { + vpkc_free_source(sUpdateSource); + sUpdateSource = nullptr; + } + if (sPendingUpdate) + { + vpkc_free_update_info(sPendingUpdate); + sPendingUpdate = nullptr; + } + if (sPendingCheckInfo) + { + vpkc_free_update_info(sPendingCheckInfo); + sPendingCheckInfo = nullptr; + } + sAssetUrlMap.clear(); +} + +void velopack_set_update_url(const std::string& url) +{ + sUpdateUrl = url; + LL_INFOS("Velopack") << "Update URL set to: " << url << LL_ENDL; +} + +void velopack_set_progress_callback(std::function<void(int)> callback) +{ + sProgressCallback = callback; +} + +#endif // LL_VELOPACK diff --git a/indra/newview/llvelopack.h b/indra/newview/llvelopack.h new file mode 100644 index 0000000000..449330f68d --- /dev/null +++ b/indra/newview/llvelopack.h @@ -0,0 +1,60 @@ +/** + * @file llvelopack.h + * @brief Velopack installer and update framework integration + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLVELOPACK_H +#define LL_LLVELOPACK_H + +#if LL_VELOPACK + +#include <string> +#include <functional> + +bool velopack_initialize(); +void velopack_check_for_updates(const std::string& required_version, const std::string& relnotes_url); +std::string velopack_get_current_version(); +bool velopack_is_update_pending(); +bool velopack_is_required_update_in_progress(); +std::string velopack_get_required_update_version(); +bool velopack_should_restart_after_update(); +void velopack_request_restart_after_update(); +void velopack_apply_pending_update(bool restart = true); +void velopack_set_update_url(const std::string& url); +void velopack_set_progress_callback(std::function<void(int)> callback); +void velopack_cleanup(); + +#if LL_WINDOWS +void clear_nsis_links(const std::string& nsis_folder_path); +bool get_nsis_version( + int& nsis_major, + int& nsis_minor, + int& nsis_patch, + uint64_t& nsis_build, + std::string& nsis_folder_path); +#endif + +#endif // LL_VELOPACK +#endif +// EOF diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index b7ea95c694..eb0ec14259 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -54,7 +54,7 @@ LLVersionInfo::LLVersionInfo(): mWorkingChannelName(LL_TO_STRING(LL_VIEWER_CHANNEL)), build_configuration(LLBUILD_CONFIG), // set in indra/cmake/BuildVersion.cmake // instantiate an LLEventMailDrop with canonical name to listen for news - // from SLVersionChecker + // from the Viewer Version Manager mPump{new LLEventMailDrop("relnotes")}, // immediately listen on mPump, store arriving URL into mReleaseNotes mStore{new LLStoreListener<std::string>(*mPump, mReleaseNotes)} diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 237b37a084..a2b93597e6 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -112,8 +112,8 @@ private: std::string mReleaseNotes; // Store unique_ptrs to the next couple things so we don't have to explain // to every consumer of this header file all the details of each. - // mPump is the LLEventMailDrop on which we listen for SLVersionChecker to - // post the release-notes URL from the Viewer Version Manager. + // mPump is the LLEventMailDrop on which we listen for the + // release-notes URL from the Viewer Version Manager. std::unique_ptr<LLEventMailDrop> mPump; // mStore is an adapter that stores the release-notes URL in mReleaseNotes. std::unique_ptr<LLStoreListener<std::string>> mStore; diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index de395da285..297d0a70ff 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -182,7 +182,7 @@ public: LLViewerAssetStats(const LLViewerAssetStats &); // Default destructor is correct. - LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined + LLViewerAssetStats& operator=(const LLViewerAssetStats&) = delete; // Clear all metrics data. This leaves the currently-active region // in place but with zero'd data for all metrics. All other regions diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 255cfc998a..fd462fb225 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -42,6 +42,7 @@ #include "llcoproceduremanager.h" #include "lleventcoro.h" #include "llsdutil.h" +#include "llstartup.h" #include "llworld.h" ///---------------------------------------------------------------------------- @@ -68,7 +69,7 @@ public: { } - LLViewerAssetRequest & operator=(const LLViewerAssetRequest &); // Not defined + LLViewerAssetRequest& operator=(const LLViewerAssetRequest&) = delete; // Default assignment operator valid // virtual @@ -460,28 +461,78 @@ void LLViewerAssetStorage::assetRequestCoro( if (!gAgent.getRegion()) { - LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: no region set" << LL_ENDL; - result_code = LL_ERR_ASSET_REQUEST_FAILED; - ext_status = LLExtStat::NONE; - removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0); - return; + if (STATE_WORLD_INIT <= LLStartUp::getStartupState()) + { + // Viewer isn't ready, wait for region to become available + LL_INFOS_ONCE("ViewerAsset") << "Waiting for agent region to be set" << LL_ENDL; + + LLEventStream region_init("waitForRegion", true); + std::string pump_name = region_init.getName(); + + boost::signals2::connection region_conn = + gAgent.addRegionChangedCallback([pump_name]() + { + LLEventPumps::instance().obtain(pump_name).post(LLSD()); + }); + F32Seconds timeout_seconds(LL_ASSET_STORAGE_TIMEOUT); + llcoro::suspendUntilEventOnWithTimeout(region_init, timeout_seconds, LLSDMap("timeout", LLSD::Boolean(true))); + gAgent.removeRegionChangedCallback(region_conn); + region_conn.disconnect(); + + if (LLApp::isExiting() || !gAssetStorage) + { + return; + } + + // recheck region whether suspend ended on timeout or not + if (!gAgent.getRegion()) + { + LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: timeout reached while waiting for region" << LL_ENDL; + result_code = LL_ERR_NO_CAP; + ext_status = LLExtStat::NONE; + removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0); + return; + } + } + else + { + LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: no region set" << LL_ENDL; + result_code = LL_ERR_NO_CAP; + ext_status = LLExtStat::NONE; + removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0); + return; + } } - else if (!gAgent.getRegion()->capabilitiesReceived()) + + if (!gAgent.getRegion()->capabilitiesReceived()) { LL_WARNS_ONCE("ViewerAsset") << "Waiting for capabilities" << LL_ENDL; LLEventStream capsRecv("waitForCaps", true); - gAgent.getRegion()->setCapabilitiesReceivedCallback( - boost::bind(&LLViewerAssetStorage::capsRecvForRegion, this, _1, capsRecv.getName())); + boost::signals2::connection caps_conn = + gAgent.getRegion()->setCapabilitiesReceivedCallback( + boost::bind(&LLViewerAssetStorage::capsRecvForRegion, this, _1, capsRecv.getName())); - llcoro::suspendUntilEventOn(capsRecv); + F32Seconds timeout_seconds(LL_ASSET_STORAGE_TIMEOUT); // from minutes to seconds, by default 5 minutes + LLSD result = llcoro::suspendUntilEventOnWithTimeout(capsRecv, timeout_seconds, LLSDMap("timeout", LLSD::Boolean(true))); + caps_conn.disconnect(); if (LLApp::isExiting() || !gAssetStorage) { return; } + if (result.has("timeout")) + { + // Caps failed to arrive in 5 minutes + LL_WARNS_ONCE("ViewerAsset") << "Asset " << uuid << " request fails : capabilities took too long to arrive" << LL_ENDL; + result_code = LL_ERR_NO_CAP; + ext_status = LLExtStat::NONE; + removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0); + return; + } + LL_WARNS_ONCE("ViewerAsset") << "capsRecv got event" << LL_ENDL; LL_WARNS_ONCE("ViewerAsset") << "region " << gAgent.getRegion() << " mViewerAssetUrl " << mViewerAssetUrl << LL_ENDL; } @@ -492,7 +543,7 @@ void LLViewerAssetStorage::assetRequestCoro( if (mViewerAssetUrl.empty()) { LL_WARNS_ONCE("ViewerAsset") << "asset request fails: caps received but no viewer asset cap found" << LL_ENDL; - result_code = LL_ERR_ASSET_REQUEST_FAILED; + result_code = LL_ERR_NO_CAP; ext_status = LLExtStat::NONE; removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0); return; @@ -502,9 +553,9 @@ void LLViewerAssetStorage::assetRequestCoro( LLCore::HttpRequest::policy_t httpPolicy(LLAppCoreHttp::AP_TEXTURE); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("assetRequestCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("assetRequestCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 7d5386110d..65a69acc88 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -300,17 +300,19 @@ void LLResourceUploadInfo::assignDefaults() { mDescription = "(No Description)"; } - - if (mAssetType == LLAssetType::AT_GLTF || - mAssetType == LLAssetType::AT_GLTF_BIN) + if (mFolderId.isNull()) // don't overwrite if destination is already specified { - mFolderId = LLUUID::null; - } - else - { - mFolderId = gInventory.findUserDefinedCategoryUUIDForType( - (mDestinationFolderType == LLFolderType::FT_NONE) ? - (LLFolderType::EType)mAssetType : mDestinationFolderType); + if (mAssetType == LLAssetType::AT_GLTF || + mAssetType == LLAssetType::AT_GLTF_BIN) + { + mFolderId = LLUUID::null; + } + else + { + mFolderId = gInventory.findUserDefinedCategoryUUIDForType( + (mDestinationFolderType == LLFolderType::FT_NONE) ? + (LLFolderType::EType)mAssetType : mDestinationFolderType); + } } } @@ -862,8 +864,8 @@ LLUUID LLViewerAssetUpload::EnqueueInventoryUpload(const std::string &url, const void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id, std::string url, LLResourceUploadInfo::ptr_t uploadInfo) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>(); httpOptions->setTimeout(LL_ASSET_UPLOAD_TIMEOUT_SEC); LLSD result = uploadInfo->prepareUpload(); diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index aa0cbac91f..a7441febd9 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -398,18 +398,12 @@ void init_audio() void audio_update_volume(bool force_update) { - F32 master_volume = gSavedSettings.getF32("AudioLevelMaster"); - bool mute_audio = gSavedSettings.getBOOL("MuteAudio"); - - LLProgressView* progress = gViewerWindow->getProgressView(); - bool progress_view_visible = false; - - if (progress) - { - progress_view_visible = progress->getVisible(); - } + static LLCachedControl<F32> master_volume(gSavedSettings, "AudioLevelMaster"); + static LLCachedControl<bool> mute_audio_setting(gSavedSettings, "MuteAudio"); + static LLCachedControl<bool> mute_when_minimized(gSavedSettings, "MuteWhenMinimized"); + bool mute_audio = mute_audio_setting(); - if (!gViewerWindow->getActive() && gSavedSettings.getBOOL("MuteWhenMinimized")) + if (!gViewerWindow->getActive() && mute_when_minimized()) { mute_audio = true; } @@ -419,7 +413,7 @@ void audio_update_volume(bool force_update) { // Sound Effects - gAudiop->setMasterGain ( master_volume ); + gAudiop->setMasterGain (master_volume()); const F32 AUDIO_LEVEL_DOPPLER = 1.f; gAudiop->setDopplerFactor(AUDIO_LEVEL_DOPPLER); @@ -435,6 +429,7 @@ void audio_update_volume(bool force_update) gAudiop->setRolloffFactor(AUDIO_LEVEL_UNDERWATER_ROLLOFF); } + bool progress_view_visible = gViewerWindow->getShowProgress(); gAudiop->setMuted(mute_audio || progress_view_visible); //Play any deferred sounds when unmuted @@ -448,13 +443,21 @@ void audio_update_volume(bool force_update) audio_update_wind(true); } + static LLCachedControl<bool> mute_sounds(gSavedSettings, "MuteSounds"); + static LLCachedControl<bool> mute_ui(gSavedSettings, "MuteUI"); + static LLCachedControl<bool> mute_ambient(gSavedSettings, "MuteAmbient"); + static LLCachedControl<bool> mute_music(gSavedSettings, "MuteMusic"); + static LLCachedControl<F32> al_sfx(gSavedSettings, "AudioLevelSFX"); + static LLCachedControl<F32> al_ui(gSavedSettings, "AudioLevelUI"); + static LLCachedControl<F32> al_ambient(gSavedSettings, "AudioLevelAmbient"); + static LLCachedControl<F32> al_music(gSavedSettings, "AudioLevelMusic"); // handle secondary gains gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_SFX, - gSavedSettings.getBOOL("MuteSounds") ? 0.f : gSavedSettings.getF32("AudioLevelSFX")); + mute_sounds() ? 0.f : al_sfx()); gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_UI, - gSavedSettings.getBOOL("MuteUI") ? 0.f : gSavedSettings.getF32("AudioLevelUI")); + mute_ui() ? 0.f : al_ui()); gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_AMBIENT, - gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient")); + mute_ambient() ? 0.f : al_ambient()); // Streaming Music @@ -464,31 +467,29 @@ void audio_update_volume(bool force_update) LLViewerAudio::getInstance()->setForcedTeleportFade(false); } - F32 music_volume = gSavedSettings.getF32("AudioLevelMusic"); - bool music_muted = gSavedSettings.getBOOL("MuteMusic"); F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume(); - music_volume = mute_volume * master_volume * music_volume * fade_volume; - gAudiop->setInternetStreamGain (music_muted ? 0.f : music_volume); + F32 music_volume = mute_volume * master_volume * al_music() * fade_volume; + gAudiop->setInternetStreamGain (mute_music() ? 0.f : music_volume); } // Streaming Media - F32 media_volume = gSavedSettings.getF32("AudioLevelMedia"); - bool media_muted = gSavedSettings.getBOOL("MuteMedia"); - media_volume = mute_volume * master_volume * media_volume; - LLViewerMedia::getInstance()->setVolume( media_muted ? 0.0f : media_volume ); + static LLCachedControl<bool> media_muted(gSavedSettings, "MuteMedia"); + static LLCachedControl<F32> media_volume(gSavedSettings, "AudioLevelMedia"); + LLViewerMedia::getInstance()->setVolume( media_muted() ? 0.0f : (mute_volume * master_volume() * media_volume())); // Voice, this is parametric singleton, it gets initialized when ready if (LLVoiceClient::instanceExists()) { - F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice"); - voice_volume = mute_volume * master_volume * voice_volume; - bool voice_mute = gSavedSettings.getBOOL("MuteVoice"); + static LLCachedControl<bool> voice_mute(gSavedSettings, "MuteVoice"); + static LLCachedControl<F32> voice_volume_setting(gSavedSettings, "AudioLevelVoice"); + static LLCachedControl<F32> voice_mic_setting(gSavedSettings, "AudioLevelMic"); + F32 voice_volume = mute_volume * master_volume() * voice_volume_setting(); LLVoiceClient *voice_inst = LLVoiceClient::getInstance(); - voice_inst->setVoiceVolume(voice_mute ? 0.f : voice_volume); - voice_inst->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); + voice_inst->setVoiceVolume(voice_mute() ? 0.f : voice_volume); + voice_inst->setMicGain(voice_mute() ? 0.f : voice_mic_setting()); - if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) + if (!gViewerWindow->getActive() && mute_when_minimized()) { voice_inst->setMuteMic(true); } diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 2ca2c5c07d..a9aa63e68f 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -200,7 +200,7 @@ LLFontGL* LLViewerChat::getChatFont() break; default: case 1: - fontp = LLFontGL::getFontSansSerif(); + fontp = LLFontGL::getFontSansSerifMedium(); break; case 2: fontp = LLFontGL::getFontSansSerifBig(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index c15fa52aa4..6d42cf2347 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -814,6 +814,7 @@ void setting_setup_signal_listener(LLControlGroup& group, const std::string& set void settings_setup_listeners() { + LL_PROFILE_ZONE_SCOPED; setting_setup_signal_listener(gSavedSettings, "FirstPersonAvatarVisible", handleRenderAvatarMouselookChanged); setting_setup_signal_listener(gSavedSettings, "RenderFarClip", handleRenderFarClipChanged); setting_setup_signal_listener(gSavedSettings, "RenderTerrainScale", handleTerrainScaleChanged); @@ -872,6 +873,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged); + setting_setup_signal_listener(gSavedSettings, "RenderAvatarCloth", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged); setting_setup_signal_listener(gSavedSettings, "ConsoleMaxLines", handleConsoleMaxLinesChanged); setting_setup_signal_listener(gSavedSettings, "UploadBakedTexOld", handleUploadBakedTexOldChanged); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 314e32bffd..fe2d44a401 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -576,9 +576,9 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) LLImageGL::updateStats(gFrameTimeSeconds); static LLCachedControl<S32> avatar_name_tag_mode(gSavedSettings, "AvatarNameTagMode", 1); - static LLCachedControl<bool> name_tag_show_group_titles(gSavedSettings, "NameTagShowGroupTitles", true); + static LLCachedControl<S32> name_tag_show_group_titles(gSavedSettings, "GroupTitlesTagMode", 2 /*all group tags*/); LLVOAvatar::sRenderName = avatar_name_tag_mode; - LLVOAvatar::sRenderGroupTitles = name_tag_show_group_titles && avatar_name_tag_mode > 0; + LLVOAvatar::sRenderGroupTitles = avatar_name_tag_mode > 0 ? name_tag_show_group_titles : 0; gPipeline.mBackfaceCull = true; gFrameCount++; @@ -1109,7 +1109,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) if (gShaderProfileFrame) { gShaderProfileFrame = false; - boost::json::value stats{ boost::json::object_kind }; + boost::json::value stats( boost::json::object_kind ); getProfileStatsContext(stats.as_object()); LLGLSLShader::finishProfile(stats); diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index 243d4dec0e..c174c495ec 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -104,9 +104,9 @@ void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const L { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("SetDisplayNameCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); // People API can return localized error messages. Indicate our // language preference via header. diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b65ad3b3ec..50cc2442cb 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -44,7 +44,6 @@ #include "llfloateravatarrendersettings.h" #include "llfloateravatartextures.h" #include "llfloaterbanduration.h" -#include "llfloaterbigpreview.h" #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" @@ -67,6 +66,7 @@ #include "llfloatercreatelandmark.h" #include "llfloaterdeleteprefpreset.h" #include "llfloaterdestinations.h" +#include "llfloaterdirectory.h" #include "llfloaterdisplayname.h" #include "llfloatereditextdaycycle.h" #include "llfloateremojipicker.h" @@ -120,7 +120,6 @@ #include "llfloaterpay.h" #include "llfloaterperformance.h" #include "llfloaterperms.h" -#include "llfloaterpostprocess.h" #include "llfloaterpreference.h" #include "llfloaterpreferencesgraphicsadvanced.h" #include "llfloaterpreferenceviewadvanced.h" @@ -143,7 +142,6 @@ #include "llfloatersidepanelcontainer.h" #include "llfloaterslapptest.h" #include "llfloatersnapshot.h" -#include "llfloatersounddevices.h" #include "llfloaterspellchecksettings.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" @@ -154,7 +152,6 @@ #include "llfloatertoybox.h" #include "llfloatertranslationsettings.h" #include "llfloateruipreview.h" -#include "llfloatervoiceeffect.h" #include "llfloaterwebcontent.h" #include "llfloatervoicevolume.h" #include "llfloaterwhitelistentry.h" @@ -182,8 +179,6 @@ #include "llsyswellwindow.h" #include "rlvfloaters.h" -#include "fsfloatersearch.h" - // *NOTE: Please add files in alphabetical order to keep merges easy. // handle secondlife:///app/openfloater/{NAME} URLs @@ -235,7 +230,8 @@ public: "upload_model", "upload_script", "upload_sound", - "bulk_upload" + "bulk_upload", + "legacy_search" }; return std::find(blacklist_clicked.begin(), blacklist_clicked.end(), fl_name) == blacklist_clicked.end(); } @@ -287,7 +283,8 @@ public: "upload_script", "upload_sound", "bulk_upload", - "slapp_test" + "slapp_test", + "legacy_search" }; return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end(); } @@ -371,7 +368,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("emoji_picker", "floater_emoji_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEmojiPicker>); LLFloaterReg::add("emoji_complete", "floater_emoji_complete.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEmojiComplete>); - LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>); LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentWater>); LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentSky>); @@ -504,21 +500,18 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_color", "floater_settings_color.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsColor>); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); - LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>); LLFloaterReg::add("scene_load_stats", "floater_scene_load_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSceneLoadStats>); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>); LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>); LLFloaterReg::add("simple_snapshot", "floater_simple_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSimpleSnapshot>); - LLFloaterReg::add("search", "floater_fs_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterSearch>); - //LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>); + LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>); + LLFloaterReg::add("legacy_search", "floater_directory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDirectory>); LLFloaterReg::add("profile", "floater_profile.xml",(LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterProfile>); LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>); LLFloaterReg::add("slapp_test", "floater_test_slapp.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSLappTest>); - LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>); - LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBvhPreview>, "upload"); LLFloaterReg::add("upload_anim_anim", "floater_animation_anim_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload"); @@ -527,8 +520,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptPreview>, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); - LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); - LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterReg::add("window_size", "floater_window_size.xml", &LLFloaterReg::build<LLFloaterWindowSize>); diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index ffcbd1b4d8..3c79f0b21c 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -48,9 +48,6 @@ #include "llinitparam.h" #include "llselectmgr.h" -#include "llfloaterwebcontent.h" -#include "fsfloatersearch.h" - // // Constants // @@ -66,13 +63,13 @@ const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true); struct LLKeybindFunctionData { - LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global) + LLKeybindFunctionData(std::function<bool(EKeystate keystate)> function, bool global) : mFunction(function), mIsGlobal(global) { } - boost::function<bool(EKeystate keystate)> mFunction; + std::function<bool(EKeystate keystate)> mFunction; // todo: might be good idea to make this into enum, like: global/inworld/menu bool mIsGlobal; }; @@ -651,12 +648,6 @@ bool start_chat( EKeystate s ) bool start_gesture( EKeystate s ) { - LLFloater* focused_floater = gFloaterView->getFocusedFloater(); - if (focused_floater && (dynamic_cast<LLFloaterWebContent*>(focused_floater) || dynamic_cast<FSFloaterSearch*>(focused_floater))) - { - return true; - } - LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); if (KEYSTATE_UP == s && ! (focus_ctrlp && focus_ctrlp->acceptsTextInput())) @@ -1174,8 +1165,8 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name) { size_t index; - typedef boost::function<bool(EKeystate)> function_t; - function_t function = NULL; + typedef std::function<bool(EKeystate)> function_t; + function_t function = nullptr; std::string name; // Allow remapping of F2-F12 @@ -1264,8 +1255,8 @@ bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name) { size_t index; - typedef boost::function<bool(EKeystate)> function_t; - function_t function = NULL; + typedef std::function<bool(EKeystate)> function_t; + function_t function = nullptr; if (mouse == CLICK_LEFT && mask == MASK_NONE diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 50b2c4ab9f..80ba99e201 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -38,7 +38,7 @@ class LLWindow; class LLNamedFunction { public: - LLNamedFunction() : mFunction(NULL) { }; + LLNamedFunction() : mFunction(nullptr) { }; ~LLNamedFunction() { }; std::string mName; diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ec5381ddfc..efa3f5cd1e 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -491,7 +491,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const body["items"][0]["owner_id"] = mPermissions.getOwner(); body["items"][0]["item_id"] = mUUID; - LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body); gInventory.requestPost(true, url, body, handler, "Inventory Item"); } } @@ -1712,7 +1712,7 @@ void create_new_item(const std::string& name, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, U32 next_owner_perm, - std::function<void(const LLUUID&)> created_cb = NULL) + std::function<void(const LLUUID&)> created_cb = nullptr) { std::string desc; LLViewerAssetType::generateDescriptionFor(asset_type, desc); @@ -1836,7 +1836,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L parent_id = gInventory.getRootFolderID(); } - std::function<void(const LLUUID&)> callback_cat_created = NULL; + std::function<void(const LLUUID&)> callback_cat_created = nullptr; if (panel) { LLHandle<LLPanel> handle = panel->getHandle(); diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 0dfbf0cced..a42bdaa2b0 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -284,9 +284,9 @@ private: LLUUID mTargetLandmarkId; }; -typedef boost::function<void(const LLUUID&)> inventory_func_type; -typedef boost::function<void(const LLSD&)> llsd_func_type; -typedef boost::function<void()> nullary_func_type; +typedef std::function<void(const LLUUID&)> inventory_func_type; +typedef std::function<void(const LLSD&)> llsd_func_type; +typedef std::function<void()> nullary_func_type; void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func void no_op_llsd_func(const LLSD&); // likewise for LLSD @@ -470,7 +470,7 @@ void menu_create_inventory_item(LLInventoryPanel* root, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null); -void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = NULL); +void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = nullptr); void slam_inventory_folder(const LLUUID& folder_id, const LLSD& contents, diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 8edb21956f..c4d87d7e16 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -36,7 +36,6 @@ #include "lltoolmgr.h" #include "llselectmgr.h" #include "llviewermenu.h" -#include "llviewerwindow.h" #include "llwindow.h" #include "llagent.h" #include "llagentcamera.h" @@ -1161,7 +1160,7 @@ void LLViewerJoystick::moveAvatar(bool reset) void LLViewerJoystick::moveFlycam(bool reset) { static LLQuaternion sFlycamRotation; - static LLVector3 sFlycamPosition; + static LLVector3d sFlycamPosition; static F32 sFlycamZoom; if (!gFocusMgr.getAppHasFocus() || mDriverState != JDS_INITIALIZED @@ -1184,7 +1183,7 @@ void LLViewerJoystick::moveFlycam(bool reset) bool in_build_mode = LLToolMgr::getInstance()->inBuildMode(); if (reset || mResetFlag) { - sFlycamPosition = LLViewerCamera::getInstance()->getOrigin(); + sFlycamPosition = gAgentCamera.getCameraPositionGlobal(); sFlycamRotation = LLViewerCamera::getInstance()->getQuaternion(); sFlycamZoom = LLViewerCamera::getInstance()->getView(); @@ -1287,7 +1286,7 @@ void LLViewerJoystick::moveFlycam(bool reset) } } - sFlycamPosition += LLVector3(sDelta) * sFlycamRotation; + sFlycamPosition += LLVector3d(sDelta[VX], sDelta[VY], sDelta[VZ]) * sFlycamRotation; LLMatrix3 rot_mat(sDelta[3], sDelta[4], sDelta[5]); sFlycamRotation = LLQuaternion(rot_mat)*sFlycamRotation; @@ -1322,7 +1321,8 @@ void LLViewerJoystick::moveFlycam(bool reset) LLMatrix3 mat(sFlycamRotation); LLViewerCamera::getInstance()->setView(sFlycamZoom); - LLViewerCamera::getInstance()->setOrigin(sFlycamPosition); + LLVector3 new_camera_pos = gAgent.getPosAgentFromGlobal(sFlycamPosition); + LLViewerCamera::getInstance()->setOrigin(new_camera_pos); LLViewerCamera::getInstance()->mXAxis = LLVector3(mat.mMatrix[0]); LLViewerCamera::getInstance()->mYAxis = LLVector3(mat.mMatrix[1]); LLViewerCamera::getInstance()->mZAxis = LLVector3(mat.mMatrix[2]); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 77ec31fd9d..6448dd6ba5 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -663,9 +663,10 @@ void LLViewerMedia::updateMedia(void *dummy_arg) LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE); llassert(!gCubeSnapshot); + static LLCachedControl<bool> use_read_thread(gSavedSettings, "PluginUseReadThread", true); // Enable/disable the plugin read thread - LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); + LLPluginProcessParent::setUseReadThread(use_read_thread()); // SL-16418 We can't call LLViewerMediaImpl->update() if we are in the state of shutting down. if(LLApp::isExiting()) @@ -1223,7 +1224,7 @@ bool LLViewerMedia::parseRawCookie(const std::string raw_cookie, std::string& na ///////////////////////////////////////////////////////////////////////////////////////// LLCore::HttpHeaders::ptr_t LLViewerMedia::getHttpHeaders() { - LLCore::HttpHeaders::ptr_t headers(new LLCore::HttpHeaders); + LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>(); headers->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); headers->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML); @@ -1299,10 +1300,10 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getOpenIDCookieCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getOpenIDCookieCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpOpts->setFollowRedirects(true); httpOpts->setWantHeaders(true); @@ -1441,10 +1442,10 @@ void LLViewerMedia::openIDSetupCoro(std::string openidUrl, std::string openidTok { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("openIDSetupCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("openIDSetupCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpOpts->setWantHeaders(true); @@ -2206,16 +2207,19 @@ void LLViewerMediaImpl::updateVolume() if (mProximityCamera > 0) { - if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMax")) + static LLCachedControl<F32> media_rolloff_min(gSavedSettings, "MediaRollOffMin"); + static LLCachedControl<F32> media_rolloff_max(gSavedSettings, "MediaRollOffMax"); + static LLCachedControl<F32> media_rolloff_rate(gSavedSettings, "MediaRollOffRate"); + if (mProximityCamera > media_rolloff_max()) { volume = 0; } - else if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMin")) + else if (mProximityCamera > media_rolloff_min()) { // attenuated_volume = 1 / (roll_off_rate * (d - min))^2 // the +1 is there so that for distance 0 the volume stays the same - F64 adjusted_distance = mProximityCamera - gSavedSettings.getF32("MediaRollOffMin"); - F64 attenuation = 1.0 + (gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance); + F64 adjusted_distance = mProximityCamera - media_rolloff_min(); + F64 attenuation = 1.0 + (media_rolloff_rate() * adjusted_distance); attenuation = 1.0 / (attenuation * attenuation); // the attenuation multiplier should never be more than one since that would increase volume volume = volume * (F32)llmin(1.0, attenuation); @@ -2732,10 +2736,10 @@ void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("mimeDiscoveryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("mimeDiscoveryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); // Increment our refcount so that we do not go away while the coroutine is active. this->ref(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 374a2ae075..8dab1e42d0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -77,7 +77,6 @@ #include "llfloaterpay.h" #include "llfloaterreporter.h" #include "llfloatersearch.h" -#include "fsfloatersearch.h" #include "llfloaterscriptdebug.h" #include "llfloatersnapshot.h" #include "llfloatertools.h" @@ -145,7 +144,7 @@ #include "llwindow.h" #include "llpathfindingmanager.h" #include "llstartup.h" -#include "boost/unordered_map.hpp" +#include <unordered_map> #include <boost/regex.hpp> #include <boost/algorithm/string.hpp> #include <boost/json.hpp> @@ -159,7 +158,7 @@ using namespace LLAvatarAppearanceDefines; typedef LLPointer<LLViewerObject> LLViewerObjectPtr; -static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels; +static std::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels; LLVOAvatar* find_avatar_from_object(LLViewerObject* object); LLVOAvatar* find_avatar_from_object(const LLUUID& object_id); @@ -419,7 +418,23 @@ static LLSLMMenuUpdater* gSLMMenuUpdater = NULL; LLSLMMenuUpdater::LLSLMMenuUpdater() { - mMarketplaceListingsItem = gMenuHolder->getChild<LLView>("MarketplaceListings")->getHandle(); + LLView* me_menu = gMenuHolder->findChild<LLView>("Me"); + if (!me_menu) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Me' menu in 'menu_viewer'" << LL_ENDL; + return; + } + + LLView* marketplace_listings = me_menu->findChild<LLView>("MarketplaceListings"); + if (!marketplace_listings) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'MarketplaceListings' in 'Me' menu" << LL_ENDL; + return; + } + + mMarketplaceListingsItem = marketplace_listings->getHandle(); } void LLSLMMenuUpdater::setMerchantMenu() { @@ -431,7 +446,7 @@ void LLSLMMenuUpdater::setMerchantMenu() LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); gToolBarView->enableCommand(command->id(), true); - const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); + const LLUUID marketplacelistings_id = gInventory.getMarketplaceListingsUUID(); if (marketplacelistings_id.isNull()) { U32 mkt_status = LLMarketplaceData::instance().getSLMStatus(); @@ -479,6 +494,8 @@ void check_merchant_status(bool force) void init_menus() { + LL_PROFILE_ZONE_SCOPED; + // Initialize actions initialize_menus(); @@ -555,7 +572,29 @@ void init_menus() color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } - LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder"); + LLView* menu_stack = gViewerWindow->getMainView()->findChildView("menu_stack"); + if (!menu_stack) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find menu_stack in main_view" << LL_ENDL; + return; + } + + LLView* status_bar_container = menu_stack->findChildView("status_bar_container"); + if (!status_bar_container) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find status_bar_container in main_view" << LL_ENDL; + return; + } + + LLView* menu_bar_holder = status_bar_container->findChildView("menu_bar_holder"); + if (!menu_bar_holder) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find status_bar_container in main_view" << LL_ENDL; + return; + } gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gMenuBarView->setRect(LLRect(0, menu_bar_holder->getRect().mTop, 0, menu_bar_holder->getRect().mTop - MENU_BAR_HEIGHT)); @@ -569,8 +608,33 @@ void init_menus() // *TODO:Also fix cost in llfolderview.cpp for Inventory menus const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); - gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); - gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); + + LLView* main_upload_menu = gMenuHolder->findChild<LLView>("Upload"); + if (!main_upload_menu) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload' menu in 'menu_viewer'" << LL_ENDL; + return; + } + + LLView* upload_sound = main_upload_menu->findChild<LLView>("Upload Sound"); + if (!upload_sound) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload Sound' menu item in 'Upload' menu" << LL_ENDL; + return; + } + upload_sound->setLabelArg("[COST]", sound_upload_cost_str); + + LLView* upload_anim = main_upload_menu->findChild<LLView>("Upload Animation"); + if (!upload_anim) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload Animation' menu item in 'Upload' menu" << LL_ENDL; + return; + } + upload_anim->setLabelArg("[COST]", animation_upload_cost_str); + gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); @@ -578,13 +642,6 @@ void init_menus() gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true); gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true); - // Don't display the Memory console menu if the feature is turned off - LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", true); - if (memoryMenu) - { - memoryMenu->setVisible(false); - } - gMenuBarView->createJumpKeys(); // Let land based option enable when parcel changes @@ -597,7 +654,7 @@ void init_menus() LLRect menuBarRect = gLoginMenuBarView->getRect(); menuBarRect.setLeftTopAndSize(0, menu_bar_holder->getRect().getHeight(), menuBarRect.getWidth(), menuBarRect.getHeight()); gLoginMenuBarView->setRect(menuBarRect); - gLoginMenuBarView->setBackgroundColor( color ); + gLoginMenuBarView->setBackgroundColor(LLColor4::black); menu_bar_holder->addChild(gLoginMenuBarView); // tooltips are on top of EVERYTHING, including menus @@ -2972,11 +3029,45 @@ void handle_object_show_original() show_item_original(object->getAttachmentItemID()); } +void handle_object_set_favorite(const LLSD& userdata) +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + if (!object) + { + return; + } + LLViewerObject *parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if(parent->isAvatar()) + { + break; + } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } + if (!object || object->isAvatar()) + { + return; + } + + LLUUID item_id = gInventory.getLinkedItemID(object->getAttachmentItemID()); + + std::string action = userdata.asString(); + if (action == "Add") + { + set_favorite(item_id, true); + } + if (action == "Remove") + { + set_favorite(item_id, false); + } +} static void init_default_item_label(LLUICtrl* ctrl) { const std::string& item_name = ctrl->getName(); - boost::unordered_map<std::string, LLStringExplicit>::iterator it = sDefaultItemLabels.find(item_name); + std::unordered_map<std::string, LLStringExplicit>::iterator it = sDefaultItemLabels.find(item_name); if (it == sDefaultItemLabels.end()) { // *NOTE: This will not work for items of type LLMenuItemCheckGL because they return boolean value @@ -2992,7 +3083,7 @@ static void init_default_item_label(LLUICtrl* ctrl) static LLStringExplicit get_default_item_label(const std::string& item_name) { LLStringExplicit res(""); - boost::unordered_map<std::string, LLStringExplicit>::iterator it = sDefaultItemLabels.find(item_name); + std::unordered_map<std::string, LLStringExplicit>::iterator it = sDefaultItemLabels.find(item_name); if (it != sDefaultItemLabels.end()) { res = it->second; @@ -3028,6 +3119,41 @@ bool enable_object_touch(LLUICtrl* ctrl) return new_value; }; +bool enable_object_favorite(const LLSD& userdata) +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + if (!object) + { + return false; + } + LLViewerObject* parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if (parent->isAvatar()) + { + break; + } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } + if (!object || object->isAvatar()) + { + return false; + } + + std::string action = userdata.asString(); + LLUUID item_id = gInventory.getLinkedItemID(object->getAttachmentItemID()); + if (action == "Add") + { + return !get_is_favorite(item_id); + } + if (action == "Remove") + { + return get_is_favorite(item_id); + } + return false; +} + //void label_touch(std::string& label, void*) //{ // LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); @@ -6730,11 +6856,8 @@ class LLAvatarEnableResetSkeleton : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())) - { - return true; - } - return false; + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + return obj && obj->getAvatar(); } }; @@ -8833,6 +8956,12 @@ LLVOAvatar* find_avatar_from_object(LLViewerObject* object) } else if( !object->isAvatar() ) { + // Check for animesh objects (animated objects with a control avatar) + LLVOAvatar* avatar = object->getAvatar(); + if (avatar) + { + return avatar; + } object = NULL; } } @@ -9117,6 +9246,17 @@ class LLViewHighlightTransparent : public view_listener_t } }; +class LLViewHighlightTransparentProbe : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + gSavedSettings.setBOOL("RenderReflectionProbeShowTransparent", !gSavedSettings.getBOOL("RenderReflectionProbeShowTransparent")); + // invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag + gPipeline.rebuildDrawInfo(); + return true; + } +}; + class LLViewCheckHighlightTransparent : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9603,17 +9743,6 @@ class LLWorldEnableEnvPreset : public view_listener_t } }; - -/// Post-Process callbacks -class LLWorldPostProcess : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterReg::showInstance("env_post_process"); - return true; - } -}; - class LLWorldCheckBanLines : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9796,6 +9925,8 @@ void initialize_spellcheck_menu() void initialize_menus() { + LL_PROFILE_ZONE_SCOPED; + // A parameterized event handler used as ctrl-8/9/0 zoom controls below. class LLZoomer : public view_listener_t { @@ -9860,6 +9991,7 @@ void initialize_menus() view_listener_t::addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); view_listener_t::addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); view_listener_t::addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); + view_listener_t::addMenu(new LLViewHighlightTransparentProbe(), "View.HighlightTransparentProbe"); view_listener_t::addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); view_listener_t::addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut"); @@ -9904,7 +10036,6 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldEnableEnvSettings(), "World.EnableEnvSettings"); view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset"); view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset"); - view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldCheckBanLines() , "World.CheckBanLines"); view_listener_t::addMenu(new LLWorldShowBanLines() , "World.ShowBanLines"); @@ -10220,6 +10351,7 @@ void initialize_menus() view_listener_t::addMenu(new LLObjectBuild(), "Object.Build"); commit.add("Object.Touch", boost::bind(&handle_object_touch)); commit.add("Object.ShowOriginal", boost::bind(&handle_object_show_original)); + commit.add("Object.SetFavorite", boost::bind(&handle_object_set_favorite, _2)); commit.add("Object.SitOrStand", boost::bind(&handle_object_sit_or_stand)); commit.add("Object.Delete", boost::bind(&handle_object_delete)); view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar"); @@ -10248,6 +10380,7 @@ void initialize_menus() enable.add("Object.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); + enable.add("Object.EnableFavorites", boost::bind(&enable_object_favorite, _2)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); enable.add("Object.EnableWear", boost::bind(&object_is_wearable)); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 801ff3c212..772abb0373 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -530,7 +530,7 @@ void upload_single_file( return; } -void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest) { for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { @@ -642,7 +642,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); fmt_file.write(formatted->getData(), formatted->getDataSize()); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>( tid, LLAssetType::AT_TEXTURE, asset_name, asset_name, 0, @@ -650,15 +650,16 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()) - )); + LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()), + dest + ); upload_new_resource(assetUploadInfo); } } else { - LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo( + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLNewFileResourceUploadInfo>( filename, asset_name, asset_name, 0, @@ -666,8 +667,8 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost); - LLResourceUploadInfo::ptr_t uploadInfo(info_p); + expected_upload_cost, + dest); upload_new_resource(uploadInfo); } @@ -687,14 +688,14 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) // Todo: // 1. Decouple bulk upload from material editor // 2. Take into account possiblity of identical textures - LLMaterialEditor::uploadMaterialFromModel(filename, model, i); + LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest); } } } } } -void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response, const LLUUID& dest) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) @@ -703,7 +704,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLS return; } - do_bulk_upload(filenames, allow_2k); + do_bulk_upload(filenames, allow_2k, dest); } bool get_bulk_upload_expected_cost( diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 8f7df48a2e..e40dd84bc9 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -72,7 +72,7 @@ bool get_bulk_upload_expected_cost( S32& bvh_count, S32& textures_2k_count); -void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k); +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID &dest_folder); void upload_single_file( const std::vector<std::string>& filenames, diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c54feba06b..b8515fd92b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -164,8 +164,8 @@ void accept_friendship_coro(std::string url, LLSD notification) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); if (url.empty()) { LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL; @@ -214,8 +214,8 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option) } LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD payload = notification["payload"]; url += "?from=" + payload["from_id"].asString(); @@ -572,8 +572,8 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("responseGroupInvitation", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("responseGroupInvitation", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD payload; payload["group"] = group_id; @@ -1560,6 +1560,7 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol if (mTransactionID.isNull()) { // Not provided, message won't work + LL_WARNS("Messaging") << "Missing transaction id, response for " << mIM << " won't work" << LL_ENDL; return; } @@ -1602,6 +1603,8 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1)); msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData), sizeof(destination_folder_id.mData)); + + LL_DEBUGS("Messaging") << "Processing" << (U8)(im + 1) << " with transaction id " << mTransactionID << LL_ENDL; } else { @@ -2016,7 +2019,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response) if (notification_ptr) { - LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm())); + LLNotificationFormPtr modified_form = std::make_shared<LLNotificationForm>(*notification_ptr->getForm()); modified_form->setElementEnabled("Teleport", false); modified_form->setElementEnabled("Cancel", false); notification_ptr->updateForm(modified_form); @@ -5768,28 +5771,40 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["NAME"] = clean_owner_name; S32 known_questions = 0; bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; + bool caution_enabled = gSavedSettings.getBOOL("PermissionsCautionEnabled"); // check the received permission flags against each permission + std::string warning_msg; for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS) { if (questions & script_perm.permbit) { - count++; known_questions |= script_perm.permbit; // check whether permission question should cause special caution dialog caution |= (script_perm.caution); - if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit) + // Cautions go into top part of the dialog, questions go into the footer + if (caution_enabled && script_perm.caution) + { + warning_msg += "\n" + LLTrans::getString(script_perm.question + "Caution") + "\n"; continue; + } if (LLTrans::getString(script_perm.question).empty()) { continue; } - script_question += " " + LLTrans::getString(script_perm.question) + "\n"; + count++; + script_question += "\n " + LLTrans::getString(script_perm.question); } } + if (!warning_msg.empty()) + { + LLStringUtil::format(warning_msg, args); + args["WARNINGS"] = warning_msg; + } + args["QUESTIONS"] = script_question; if (known_questions != questions) @@ -5814,12 +5829,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data) // check whether cautions are even enabled or not const char* notification = "ScriptQuestion"; - if(caution && gSavedSettings.getBOOL("PermissionsCautionEnabled")) + if(caution && caution_enabled) { - args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : ""; + args["FOOTERTEXT"] = (count > 0) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n" + script_question : ""; notification = "ScriptQuestionCaution"; } - else if(experienceid.notNull()) + else if (experienceid.notNull()) { payload["experience"]=experienceid; LLExperienceCache::instance().get(experienceid, boost::bind(process_script_experience_details, _1, args, payload)); diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 52f383faa9..00743909f0 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -36,9 +36,10 @@ #include "llnotifications.h" #include "llextendedstatus.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> +#include <functional> + // // Forward declarations // @@ -216,7 +217,7 @@ class LLViewerMessage : public LLSingleton<LLViewerMessage> { LLSINGLETON_EMPTY_CTOR(LLViewerMessage); public: - typedef boost::function<void()> teleport_started_callback_t; + typedef std::function<void()> teleport_started_callback_t; typedef boost::signals2::signal<void()> teleport_started_signal_t; boost::signals2::connection setTeleportStartedCallback(teleport_started_callback_t cb); @@ -264,7 +265,7 @@ private: std::string getSanitizedDescription(); void sendReceiveResponse(bool accept, const LLUUID &destination_folder_id); - typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t; + typedef std::function<bool (const LLSD&, const LLSD&)> respond_function_t; typedef std::map<std::string, respond_function_t> respond_function_map_t; respond_function_map_t mRespondFunctions; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index da2ca0aca4..8ec2a6d661 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -63,13 +63,13 @@ const std::string GRID_LOGIN_IDENTIFIER_TYPES = "login_identifier_types"; const std::string GRID_SLURL_BASE = "slurl_base"; const std::string GRID_APP_SLURL_BASE = "app_slurl_base"; -const std::string DEFAULT_LOGIN_PAGE = "https://viewer-splash.secondlife.com/"; +const std::string DEFAULT_LOGIN_PAGE = "https://viewer-splash-v2.secondlife.com/"; const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi"; const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update"; -const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/"; +const std::string MAIN_GRID_SLURL_BASE = "https://maps.secondlife.com/secondlife/"; const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app"; const std::string MAIN_GRID_WEB_PROFILE_URL = "https://my.secondlife.com/"; @@ -125,7 +125,7 @@ void LLGridManager::initialize(const std::string& grid_file) MAIN_GRID_WEB_PROFILE_URL, "Agni"); addSystemGrid(LLTrans::getString("AditiGridLabel"), - "util.aditi.lindenlab.com", + BETAGRID, "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", "https://secondlife.aditi.lindenlab.com/helpers/", DEFAULT_LOGIN_PAGE, @@ -281,7 +281,7 @@ bool LLGridManager::addGrid(LLSD& grid_data) // Populate to the default values if (!grid_data.has(GRID_LOGIN_PAGE_VALUE)) { - grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/"; + grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("https://") + grid + "/app/login/"; } if (!grid_data.has(GRID_HELPER_URI_VALUE)) { @@ -575,6 +575,7 @@ std::string LLGridManager::getGridLoginID() std::string LLGridManager::getUpdateServiceURL() { + auto env_update_service = LLStringUtil::getoptenv("SL_UPDATE_SERVICE"); std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");; if ( !update_url_base.empty() ) { @@ -582,6 +583,13 @@ std::string LLGridManager::getUpdateServiceURL() << "Update URL base overridden from command line: " << update_url_base << LL_ENDL; } + else if (env_update_service && env_update_service->find("http") != std::string::npos) + { + update_url_base = *env_update_service; + LL_INFOS("UpdaterService", "GridManager") + << "Update URL base overridden from SL_UPDATE_SERVICE environment variable: " << update_url_base + << LL_ENDL; + } else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) { update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString(); @@ -629,18 +637,6 @@ bool LLGridManager::isInProductionGrid() return mIsInProductionGrid; } -bool LLGridManager::isInSecondlife() -{ - //return (isInSLMain() || isInSLBeta()); - return true; -} - -bool LLGridManager::isInOpenSim() -{ - // FIX THIS TO SUPPORT OPENSIM - return false; -} - bool LLGridManager::isSystemGrid(const std::string& grid) { std::string grid_name = getGrid(grid); diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 7d9c70994c..0937425a18 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -30,6 +30,7 @@ // @TODO this really should be private, but is used in llslurl #define MAINGRID "util.agni.lindenlab.com" +#define BETAGRID "util.aditi.lindenlab.com" /// Exception thrown when a grid is not valid class LLInvalidGridName @@ -174,20 +175,6 @@ class LLGridManager : public LLSingleton<LLGridManager> //@} - typedef enum e_grid_platform { - NOPLATFORM = 0, - SLMAIN, - SLBETA, - OPENSIM, - HALCYON - } EGridPlatform; - - typedef enum e_add_grid { - ADD_MANUAL = 0, - ADD_HYPERGRID, - ADD_LINK - } EAddGridType; - /* ================================================================ * @name Selecting the current grid * @{ @@ -212,11 +199,6 @@ class LLGridManager : public LLSingleton<LLGridManager> /// Is the selected grid one of the hard-coded default grids (Agni or Aditi) bool isSystemGrid() { return isSystemGrid(mGrid); } - /// Is the selected grid Second Life? - bool isInSecondlife(); - - bool isInOpenSim(); - /// Is the selected grid a production grid? bool isInProductionGrid(); /** diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c13e541da0..607ffe32ee 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -130,6 +130,7 @@ F64Seconds LLViewerObject::sPhaseOutUpdateInterpolationTime(2.0); // For motio F64Seconds LLViewerObject::sMaxRegionCrossingInterpolationTime(1.0);// For motion interpolation: don't interpolate over this time on region crossing std::map<std::string, U32> LLViewerObject::sObjectDataMap; +std::unordered_map<LLUUID, std::vector<LLViewerObject*>> LLViewerObject::sPendingUpdatesByOwner; // The maximum size of an object extra parameters binary (packed) block #define MAX_OBJECT_PARAMS_SIZE 1024 @@ -311,6 +312,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mLastUpdateType(OUT_UNKNOWN), mLastUpdateCached(false), mLocked(false), + mExtraParameterList(LLNetworkData::PARAMS_MAX >> 4), mCachedMuteListUpdateTime(0), mCachedOwnerInMuteList(false), mRiggedAttachedWarned(false) @@ -368,15 +370,6 @@ LLViewerObject::~LLViewerObject() } // Delete memory associated with extra parameters. - std::unordered_map<U16, ExtraParameter*>::iterator iter; - for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) - { - if(iter->second != NULL) - { - delete iter->second->data; - delete iter->second; - } - } mExtraParameterList.clear(); for_each(mNameValuePairs.begin(), mNameValuePairs.end(), DeletePairedPointer()) ; @@ -530,6 +523,8 @@ void LLViewerObject::markDead() mReflectionProbe = nullptr; } + removeObjectFromPendingUpdate(this); + sNumZombieObjects++; } } @@ -1509,10 +1504,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, unpackParticleSource(block_num, owner_id); // Mark all extra parameters not used - std::unordered_map<U16, ExtraParameter*>::iterator iter; - for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) + for (auto& entry : mExtraParameterList) { - iter->second->in_use = false; + if (entry.in_use) *entry.in_use = false; } // Unpack extra parameters @@ -1544,12 +1538,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, delete[] buffer; } - for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) + for (size_t i = 0; i < mExtraParameterList.size(); ++i) { - if (!iter->second->in_use) + auto& entry = mExtraParameterList[i]; + if (entry.in_use && !*entry.in_use) { // Send an update message in case it was formerly in use - parameterChanged(iter->first, iter->second->data, false, false); + parameterChanged(((U16)i + 1) << 4, entry.data, false, false); } } @@ -1851,10 +1846,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } // Mark all extra parameters not used - std::unordered_map<U16, ExtraParameter*>::iterator iter; - for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) + for (auto& entry : mExtraParameterList) { - iter->second->in_use = false; + if (entry.in_use) *entry.in_use = false; } // Unpack extra params @@ -1872,12 +1866,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, unpackParameterEntry(param_type, &dp2); } - for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) + for (size_t i = 0; i < mExtraParameterList.size(); ++i) { - if (!iter->second->in_use) + auto& entry = mExtraParameterList[i]; + if (entry.in_use && !*entry.in_use) { // Send an update message in case it was formerly in use - parameterChanged(iter->first, iter->second->data, false, false); + parameterChanged(((U16)i + 1) << 4, entry.data, false, false); } } @@ -2989,8 +2984,8 @@ void LLViewerObject::fetchInventoryFromCapCoro(const LLUUID task_inv) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TaskInventoryRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("TaskInventoryRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); std::string url = obj->mRegionp->getCapability("RequestTaskInventory") + "?task_id=" + obj->mID.asString(); // If we already have a copy of the inventory then add it so the server won't re-send something we already have. // We expect this case to crop up in the case of failed inventory mutations, but it might happen otherwise as well. @@ -4184,7 +4179,7 @@ void LLViewerObject::boostTexturePriority(bool boost_children /* = true */) if (isSculpted() && !isMesh()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = getSculptParams(); if (sculpt_params) { LLUUID sculpt_id = sculpt_params->getSculptTexture(); @@ -4656,9 +4651,10 @@ const LLQuaternion LLViewerObject::getRenderRotation() const } else { - if (!mDrawable->isRoot()) + LLDrawable* parent = mDrawable->getParent(); + if (!mDrawable->isRoot() && parent) { - ret = getRotation() * LLQuaternion(mDrawable->getParent()->getWorldMatrix()); + ret = getRotation() * LLQuaternion(parent->getWorldMatrix()); } else { @@ -6495,7 +6491,7 @@ bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp) if (param) { param->data->unpack(*dp); - param->in_use = true; + *param->in_use = true; parameterChanged(param_type, param->data, true, false); return true; } @@ -6507,108 +6503,79 @@ bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp) LLViewerObject::ExtraParameter* LLViewerObject::createNewParameterEntry(U16 param_type) { - LLNetworkData* new_block = NULL; + LLNetworkData* new_block = nullptr; + bool* in_use = NULL; switch (param_type) { case LLNetworkData::PARAMS_FLEXIBLE: { - new_block = new LLFlexibleObjectData(); + mFlexibleObjectData = std::make_unique<LLFlexibleObjectData>(); + new_block = mFlexibleObjectData.get(); + in_use = &mFlexibleObjectDataInUse; break; } case LLNetworkData::PARAMS_LIGHT: { - new_block = new LLLightParams(); + mLightParams = std::make_unique<LLLightParams>(); + new_block = mLightParams.get(); + in_use = &mLightParamsInUse; break; } case LLNetworkData::PARAMS_SCULPT: { - new_block = new LLSculptParams(); + mSculptParams = std::make_unique<LLSculptParams>(); + new_block = mSculptParams.get(); + in_use = &mSculptParamsInUse; break; } case LLNetworkData::PARAMS_LIGHT_IMAGE: { - new_block = new LLLightImageParams(); + mLightImageParams = std::make_unique<LLLightImageParams>(); + new_block = mLightImageParams.get(); + in_use = &mLightImageParamsInUse; break; } case LLNetworkData::PARAMS_EXTENDED_MESH: { - new_block = new LLExtendedMeshParams(); + mExtendedMeshParams = std::make_unique<LLExtendedMeshParams>(); + new_block = mExtendedMeshParams.get(); + in_use = &mExtendedMeshParamsInUse; break; } case LLNetworkData::PARAMS_RENDER_MATERIAL: { - new_block = new LLRenderMaterialParams(); + mRenderMaterialParams = std::make_unique<LLRenderMaterialParams>(); + new_block = mRenderMaterialParams.get(); + in_use = &mRenderMaterialParamsInUse; break; } case LLNetworkData::PARAMS_REFLECTION_PROBE: { - new_block = new LLReflectionProbeParams(); + mReflectionProbeParams = std::make_unique<LLReflectionProbeParams>(); + new_block = mReflectionProbeParams.get(); + in_use = &mReflectionProbeParamsInUse; break; } default: { - LL_INFOS_ONCE() << "Unknown param type: " << param_type << LL_ENDL; + LL_INFOS_ONCE() << "Unknown param type. (" << llformat("0x%2x", param_type) << ")" << LL_ENDL; break; } }; + ExtraParameter& entry = mExtraParameterList[U32(param_type >> 4) - 1]; if (new_block) { - ExtraParameter* new_entry = new ExtraParameter; - new_entry->data = new_block; - new_entry->in_use = false; // not in use yet - llassert(mExtraParameterList[param_type] == nullptr); // leak -- redundantly allocated parameter entry - mExtraParameterList[param_type] = new_entry; - return new_entry; - } - return NULL; -} - -LLViewerObject::ExtraParameter* LLViewerObject::getExtraParameterEntry(U16 param_type) const -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER; - std::unordered_map<U16, ExtraParameter*>::const_iterator itor = mExtraParameterList.find(param_type); - if (itor != mExtraParameterList.end()) - { - return itor->second; - } - return NULL; -} - -LLViewerObject::ExtraParameter* LLViewerObject::getExtraParameterEntryCreate(U16 param_type) -{ - ExtraParameter* param = getExtraParameterEntry(param_type); - if (!param) - { - param = createNewParameterEntry(param_type); - } - return param; -} - -LLNetworkData* LLViewerObject::getParameterEntry(U16 param_type) const -{ - ExtraParameter* param = getExtraParameterEntry(param_type); - if (param) - { - return param->data; + entry.in_use = in_use; + *entry.in_use = false; // not in use yet + entry.data = new_block; + return &entry; } else { - return NULL; - } -} - -bool LLViewerObject::getParameterEntryInUse(U16 param_type) const -{ - ExtraParameter* param = getExtraParameterEntry(param_type); - if (param) - { - return param->in_use; - } - else - { - return false; + entry.is_invalid = true; } + return nullptr; } bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin) @@ -6616,11 +6583,11 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_ ExtraParameter* param = getExtraParameterEntryCreate(param_type); if (param) { - if (param->in_use && new_value == *(param->data)) + if (*(param->in_use) && new_value == *(param->data)) { return false; } - param->in_use = true; + *param->in_use = true; param->data->copy(new_value); parameterChanged(param_type, param->data, true, local_origin); return true; @@ -6636,22 +6603,28 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_ // Should always return true. bool LLViewerObject::setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin) { - ExtraParameter* param = getExtraParameterEntryCreate(param_type); - if (param && param->in_use != in_use) + if (param_type <= LLNetworkData::PARAMS_MAX) { - param->in_use = in_use; - parameterChanged(param_type, param->data, in_use, local_origin); - return true; + ExtraParameter* param = (in_use ? getExtraParameterEntryCreate(param_type) : &getExtraParameterEntry(param_type)); + if (param && param->data && *param->in_use != in_use) + { + *param->in_use = in_use; + parameterChanged(param_type, param->data, in_use, local_origin); + return true; + } } return false; } void LLViewerObject::parameterChanged(U16 param_type, bool local_origin) { - ExtraParameter* param = getExtraParameterEntry(param_type); - if (param) + if (param_type <= LLNetworkData::PARAMS_MAX) { - parameterChanged(param_type, param->data, param->in_use, local_origin); + const ExtraParameter& param = getExtraParameterEntry(param_type); + if (param.data) + { + parameterChanged(param_type, param.data, *param.in_use, local_origin); + } } } @@ -6699,7 +6672,7 @@ void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, bool { if (param_type == LLNetworkData::PARAMS_RENDER_MATERIAL) { - const LLRenderMaterialParams* params = in_use ? (LLRenderMaterialParams*)getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL) : nullptr; + const LLRenderMaterialParams* params = in_use ? getRenderMaterialParams() : nullptr; setRenderMaterialIDs(params, local_origin); } } @@ -7236,7 +7209,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender void LLStaticViewerObject::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); @@ -7470,9 +7443,10 @@ const std::string& LLViewerObject::getAttachmentItemName() const LLVOAvatar* LLViewerObject::getAvatar() const { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - if (getControlAvatar()) + LLControlAvatar* ca = getControlAvatar(); + if (ca) { - return getControlAvatar(); + return ca; } if (isAttachment()) { @@ -7491,7 +7465,7 @@ LLVOAvatar* LLViewerObject::getAvatar() const bool LLViewerObject::hasRenderMaterialParams() const { - return getParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL); + return mRenderMaterialParamsInUse; } void LLViewerObject::setHasRenderMaterialParams(bool has_materials) @@ -7513,7 +7487,7 @@ void LLViewerObject::setHasRenderMaterialParams(bool has_materials) const LLUUID& LLViewerObject::getRenderMaterialID(U8 te) const { - LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); + const LLRenderMaterialParams* param_block = getRenderMaterialParams(); if (param_block) { return param_block->getMaterial(te); @@ -7554,7 +7528,7 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat start_idx = llmax(start_idx, 0); end_idx = llmin(end_idx, (S32) getNumTEs()); - LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); + LLRenderMaterialParams* param_block = getRenderMaterialParams(); if (!param_block && id.notNull()) { // block doesn't exist, but it will need to param_block = (LLRenderMaterialParams*)createNewParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL)->data; @@ -7782,6 +7756,61 @@ bool LLViewerObject::isReachable() return false; } +void LLViewerObject::markObjectsForUpdate(const LLUUID& owner_id) +{ + sPendingUpdatesByOwner.erase(owner_id); + for (S32 i = 0; i < gObjectList.getNumObjects(); ++i) + { + LLViewerObject* obj = gObjectList.getObject(i); + if (!obj || obj->isDead() || obj->isAvatar() || obj->permYouOwner()) + { + continue; + } + sPendingUpdatesByOwner[owner_id].push_back(obj); + } +} + +void LLViewerObject::removeObjectFromPendingUpdate(LLViewerObject* obj) +{ + for (auto& [owner_id, objects] : sPendingUpdatesByOwner) + { + objects.erase(std::remove(objects.begin(), objects.end(), obj), objects.end()); + } +} + +bool LLViewerObject::isObjectInPendingUpdate(const LLUUID& owner_id, LLViewerObject* obj) +{ + if (!obj) + { + return false; + } + auto it = sPendingUpdatesByOwner.find(owner_id); + if (it != sPendingUpdatesByOwner.end()) + { + const auto& objects = it->second; + return std::find(objects.begin(), objects.end(), obj) != objects.end(); + } + return false; +} + +void LLViewerObject::requestObjectUpdate() +{ + if (LLViewerRegion* regionp = getRegion()) + { + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_RequestMultipleObjects); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ObjectData); + msg->addU8Fast(_PREHASH_CacheMissType, 0); + msg->addU32Fast(_PREHASH_ID, getLocalID()); + msg->sendReliable(regionp->getHost()); + + removeObjectFromPendingUpdate(this); + } +} + class ObjectPhysicsProperties : public LLHTTPNode { public: diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 6e26da74e7..8f23563c28 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -126,13 +126,15 @@ class LLViewerObject protected: virtual ~LLViewerObject(); // use unref() +private: // TomY: Provide for a list of extra parameter structures, mapped by structure name struct ExtraParameter { - bool in_use; - LLNetworkData *data; + bool is_invalid = false; + bool* in_use = nullptr; + LLNetworkData* data = nullptr; }; - std::unordered_map<U16, ExtraParameter*> mExtraParameterList; + std::vector<ExtraParameter> mExtraParameterList; public: typedef std::list<LLPointer<LLViewerObject> > child_list_t; @@ -620,6 +622,11 @@ public: void setPhysicsDensity(F32 density); void setPhysicsRestitution(F32 restitution); + static void markObjectsForUpdate(const LLUUID& owner_id); + static void removeObjectFromPendingUpdate(LLViewerObject* obj); + static bool isObjectInPendingUpdate(const LLUUID& owner_id, LLViewerObject* obj); + void requestObjectUpdate(); + virtual void dump() const; static U32 getNumZombieObjects() { return sNumZombieObjects; } @@ -630,10 +637,16 @@ public: void dirtySpatialGroup() const; virtual void dirtyMesh(); - virtual LLNetworkData* getParameterEntry(U16 param_type) const; - virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin); - virtual bool getParameterEntryInUse(U16 param_type) const; - virtual bool setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin); + LLFlexibleObjectData* getFlexibleObjectData() const { return mFlexibleObjectDataInUse ? mFlexibleObjectData.get() : nullptr; } + LLLightParams* getLightParams() const { return mLightParamsInUse ? mLightParams.get() : nullptr; } + LLSculptParams* getSculptParams() const { return mSculptParamsInUse ? mSculptParams.get() : nullptr; } + LLLightImageParams* getLightImageParams() const { return mLightImageParamsInUse ? mLightImageParams.get() : nullptr; } + LLExtendedMeshParams* getExtendedMeshParams() const { return mExtendedMeshParamsInUse ? mExtendedMeshParams.get() : nullptr; } + LLRenderMaterialParams* getRenderMaterialParams() const { return mRenderMaterialParamsInUse ? mRenderMaterialParams.get() : nullptr; } + LLReflectionProbeParams* getReflectionProbeParams() const { return mReflectionProbeParamsInUse ? mReflectionProbeParams.get() : nullptr; } + + bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin); + bool setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin); // Called when a parameter is changed virtual void parameterChanged(U16 param_type, bool local_origin); virtual void parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin); @@ -675,8 +688,31 @@ private: bool isAssetInInventory(LLViewerInventoryItem* item, LLAssetType::EType type); ExtraParameter* createNewParameterEntry(U16 param_type); - ExtraParameter* getExtraParameterEntry(U16 param_type) const; - ExtraParameter* getExtraParameterEntryCreate(U16 param_type); + const ExtraParameter& getExtraParameterEntry(U16 param_type) const + { + return mExtraParameterList[U32(param_type >> 4) - 1]; + } + ExtraParameter& getExtraParameterEntry(U16 param_type) + { + return mExtraParameterList[U32(param_type >> 4) - 1]; + } + ExtraParameter* getExtraParameterEntryCreate(U16 param_type) + { + if (param_type <= LLNetworkData::PARAMS_MAX) + { + ExtraParameter& param = getExtraParameterEntry(param_type); + if (!param.is_invalid) + { + if (!param.data) + { + ExtraParameter* new_entry = createNewParameterEntry(param_type); + return new_entry; + } + return ¶m; + } + } + return nullptr; + } bool unpackParameterEntry(U16 param_type, LLDataPacker *dp); // This function checks to see if the given media URL has changed its version @@ -749,7 +785,23 @@ private: // Grabbed from UPDATE_FLAGS U32 mFlags; + bool mFlexibleObjectDataInUse = false, + mLightParamsInUse = false, + mSculptParamsInUse = false, + mLightImageParamsInUse = false, + mExtendedMeshParamsInUse = false, + mRenderMaterialParamsInUse = false, + mReflectionProbeParamsInUse = false; + std::unique_ptr<LLFlexibleObjectData> mFlexibleObjectData; + std::unique_ptr<LLLightParams> mLightParams; + std::unique_ptr<LLSculptParams> mSculptParams; + std::unique_ptr<LLLightImageParams> mLightImageParams; + std::unique_ptr<LLExtendedMeshParams> mExtendedMeshParams; + std::unique_ptr<LLRenderMaterialParams> mRenderMaterialParams; + std::unique_ptr<LLReflectionProbeParams> mReflectionProbeParams; + static std::map<std::string, U32> sObjectDataMap; + static std::unordered_map<LLUUID, std::vector<LLViewerObject*>> sPendingUpdatesByOwner; public: // Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties U8 mPhysicsShapeType; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0a6197a67a..caabd66780 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -65,6 +65,7 @@ #include "lltoolmgr.h" #include "lltoolpie.h" #include "llkeyboard.h" +#include "llmeshrepository.h" #include "u64.h" #include "llviewertexturelist.h" #include "lldatapacker.h" @@ -173,7 +174,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(LLViewerObject* objectp) U32 local_id = objectp->mLocalID; U64 indexid = (((U64)objectp->mRegionIndex) << 32) | (U64)local_id; - std::map<U64, LLUUID>::iterator iter = mIndexAndLocalIDToUUID.find(indexid); + auto iter = mIndexAndLocalIDToUUID.find(indexid); if (iter == mIndexAndLocalIDToUUID.end()) { return false; @@ -1055,8 +1056,8 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchObjectCostsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); @@ -1179,8 +1180,8 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchPhisicsFlagsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD idList; U32 objectIndex = 0; @@ -1398,6 +1399,8 @@ void LLViewerObjectList::killAllObjects() llassert((objectp == gAgentAvatarp) || objectp->isDead()); } + gMeshRepo.unregisterAllMeshes(); + cleanDeadObjects(false); if(!mObjects.empty()) diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 547ef9fb2d..adc90a0483 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -204,7 +204,7 @@ protected: uuid_set_t mDeadObjects; - std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; + std::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; //set of objects that need to update their cost uuid_set_t mStaleObjectCost; @@ -221,7 +221,7 @@ protected: static U32 sSimulatorMachineIndex; std::map<U64, U32> mIPAndPortToIndex; - std::map<U64, LLUUID> mIndexAndLocalIDToUUID; + std::unordered_map<U64, LLUUID> mIndexAndLocalIDToUUID; friend class LLViewerObject; diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index 60e17a6f58..adfe709b04 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -316,7 +316,6 @@ public: //virtual bool isRecentlyVisible() const; - LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;} bool isAnyRecentlyVisible() const; static U32 getNewOcclusionQueryObjectName(); diff --git a/indra/newview/llviewerparcelaskplay.h b/indra/newview/llviewerparcelaskplay.h index 720daa2e5d..563fb13011 100644 --- a/indra/newview/llviewerparcelaskplay.h +++ b/indra/newview/llviewerparcelaskplay.h @@ -38,7 +38,7 @@ class LLViewerParcelAskPlay : public LLSingleton<LLViewerParcelAskPlay> void cleanupSingleton() override; public: // functor expects functor(region_id, parcel_id, url, play/stop) - typedef boost::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback; + typedef std::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback; void askToPlay(const LLUUID ®ion_id, const S32 &parcel_id, const std::string &url, ask_callback cb); void cancelNotification(); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 432da2e990..b794047135 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -702,6 +702,16 @@ bool LLViewerParcelMgr::allowAgentVoice() const return allowAgentVoice(gAgent.getRegion(), mAgentParcel); } +bool LLViewerParcelMgr::isVoiceRestricted() const +{ + return mAgentParcel && !mAgentParcel->getParcelFlagUseEstateVoiceChannel(); +} + +bool LLViewerParcelMgr::allowVoiceModeration() const +{ + return isVoiceRestricted() && isParcelOwnedByAgent(mAgentParcel, GP_SESSION_MODERATOR); +} + bool LLViewerParcelMgr::allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const { return region && region->isVoiceEnabled() @@ -881,7 +891,8 @@ LLParcel* LLViewerParcelMgr::getCollisionParcel() const void LLViewerParcelMgr::render() { - if (mSelected && mRenderSelection && gSavedSettings.getBOOL("RenderParcelSelection") && !gDisconnected) + static LLCachedControl<bool> render_parcel_selection(gSavedSettings, "RenderParcelSelection"); + if (mSelected && mRenderSelection && render_parcel_selection() && !gDisconnected) { // Rendering is done in agent-coordinates, so need to supply // an appropriate offset to the render code. diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 1925cd23ed..0d79496ccc 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -33,9 +33,10 @@ #include "llparcelselection.h" #include "llui.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> +#include <functional> + class LLUUID; class LLMessageSystem; class LLParcel; @@ -79,9 +80,9 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr> ~LLViewerParcelMgr(); public: - typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t; + typedef std::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t; typedef boost::signals2::signal<void (const LLVector3d&, const bool&)> teleport_finished_signal_t; - typedef boost::function<void()> teleport_failed_callback_t; + typedef std::function<void()> teleport_failed_callback_t; typedef boost::signals2::signal<void()> teleport_failed_signal_t; static void cleanupGlobals(); @@ -173,6 +174,12 @@ public: bool allowAgentVoice() const; bool allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const; + // Returns true if this parcel is using private voice channel + bool isVoiceRestricted() const; + + // Can this agent moderate Nearby voice chat on this parcel? + bool allowVoiceModeration() const; + // Can this agent start flying on this parcel? // Used for parcel property icons in nav bar. bool allowAgentFly(const LLViewerRegion* region, const LLParcel* parcel) const; diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index b556aef768..6dead0cf82 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -76,12 +76,12 @@ LLViewerPart::LLViewerPart() : mPartID(0), mLastUpdateTime(0.f), mSkipOffset(0.f), - mVPCallback(NULL), - mImagep(NULL) + mVPCallback(nullptr), + mImagep(nullptr) { - mPartSourcep = NULL; - mParent = NULL; - mChild = NULL; + mPartSourcep = nullptr; + mParent = nullptr; + mChild = nullptr; ++LLViewerPartSim::sParticleCount2 ; } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 5700d8b278..d33d426769 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -125,10 +125,7 @@ #include "llpanel.h" #include "llfloater.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> -#include <boost/unordered_set.hpp> -#include <boost/unordered_map.hpp> #include <boost/json.hpp> #include "glm/glm.hpp" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a085bc4d91..f31befd1ab 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -104,7 +104,7 @@ S32 LLViewerRegion::sLastCameraUpdated = 0; S32 LLViewerRegion::sNewObjectCreationThrottle = -1; LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup; -typedef std::map<std::string, std::string> CapabilityMap; +typedef std::unordered_map<std::string, std::string, ll::string_hash, std::equal_to<>> CapabilityMap; static void log_capabilities(const CapabilityMap &capmap); @@ -252,8 +252,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result; LLViewerRegion *regionp = NULL; @@ -406,8 +406,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result; LLViewerRegion *regionp = NULL; @@ -540,8 +540,8 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestSimulatorFeatureCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLViewerRegion *regionp = NULL; S32 attemptNumber = 0; @@ -3300,6 +3300,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("SetDisplayName"); capabilityNames.append("SimConsoleAsync"); capabilityNames.append("SimulatorFeatures"); + capabilityNames.append("SpatialVoiceModerationRequest"); capabilityNames.append("StartGroupProposal"); capabilityNames.append("TerrainNavMeshProperties"); capabilityNames.append("TextureStats"); @@ -3437,7 +3438,7 @@ void LLViewerRegion::setCapabilityDebug(const std::string& name, const std::stri } } -std::string LLViewerRegion::getCapabilityDebug(const std::string& name) const +std::string LLViewerRegion::getCapabilityDebug(std::string_view name) const { CapabilityMap::const_iterator iter = mImpl->mSecondCapabilitiesTracker.find(name); if (iter == mImpl->mSecondCapabilitiesTracker.end()) @@ -3448,15 +3449,14 @@ std::string LLViewerRegion::getCapabilityDebug(const std::string& name) const return iter->second; } - -bool LLViewerRegion::isSpecialCapabilityName(const std::string &name) +bool LLViewerRegion::isSpecialCapabilityName(std::string_view name) { return name == "EventQueueGet" || name == "UntrustedSimulatorMessage"; } -std::string LLViewerRegion::getCapability(const std::string& name) const +std::string LLViewerRegion::getCapability(std::string_view name) const { - if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia"))) + if (!capabilitiesReceived() && (name != "Seed") && (name != "ObjectMedia")) { LL_WARNS() << "getCapability called before caps received for " << name << LL_ENDL; } @@ -3464,21 +3464,20 @@ std::string LLViewerRegion::getCapability(const std::string& name) const CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name); if(iter == mImpl->mCapabilities.end()) { - return ""; + return {}; } return iter->second; } -bool LLViewerRegion::isCapabilityAvailable(const std::string& name) const +bool LLViewerRegion::isCapabilityAvailable(std::string_view name) const { - if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia"))) + if (!capabilitiesReceived() && (name != "Seed") && (name != "ObjectMedia")) { LL_WARNS() << "isCapabilityAvailable called before caps received for " << name << LL_ENDL; } - CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name); - if(iter == mImpl->mCapabilities.end()) + if (!mImpl->mCapabilities.contains(name)) { return false; } @@ -3734,9 +3733,14 @@ bool LLViewerRegion::avatarHoverHeightEnabled() const void log_capabilities(const CapabilityMap &capmap) { + // Copy into sorted map for ordered output + using SortedCapabilityMap = std::map<std::string, std::string>; + SortedCapabilityMap sorted_capmap; + sorted_capmap.insert(capmap.begin(), capmap.end()); + S32 count = 0; - CapabilityMap::const_iterator iter; - for (iter = capmap.begin(); iter != capmap.end(); ++iter, ++count) + SortedCapabilityMap::const_iterator iter; + for (iter = sorted_capmap.begin(); iter != sorted_capmap.end(); ++iter, ++count) { if (!iter->second.empty()) { @@ -3797,6 +3801,16 @@ std::string LLViewerRegion::getSimHostName() return std::string("..."); } + +bool LLViewerRegion::isRegionWebRTCEnabled() +{ + if (mSimulatorFeaturesReceived && mSimulatorFeatures.has("VoiceServerType")) + { + return mSimulatorFeatures["VoiceServerType"].asString() == "webrtc"; + } + return false; +} + void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index ca994c6b06..a086d45ec1 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -275,10 +275,10 @@ public: S32 getNumSeedCapRetries(); void setCapability(const std::string& name, const std::string& url); void setCapabilityDebug(const std::string& name, const std::string& url); - bool isCapabilityAvailable(const std::string& name) const; + bool isCapabilityAvailable(std::string_view name) const; // implements LLCapabilityProvider - virtual std::string getCapability(const std::string& name) const; - std::string getCapabilityDebug(const std::string& name) const; + virtual std::string getCapability(std::string_view name) const; + std::string getCapabilityDebug(std::string_view name) const; // has region received its final (not seed) capability list? @@ -288,7 +288,7 @@ public: void setCapabilitiesError(); boost::signals2::connection setCapabilitiesReceivedCallback(const caps_received_signal_t::slot_type& cb); - static bool isSpecialCapabilityName(const std::string &name); + static bool isSpecialCapabilityName(std::string_view name); void logActiveCapabilities() const; // Utilities to post and get via @@ -296,10 +296,10 @@ public: typedef LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t httpCallback_t; bool requestPostCapability(const std::string &capName, LLSD &postData, - httpCallback_t cbSuccess = NULL, - httpCallback_t cbFailure = NULL); - bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); - bool requestDelCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL); + httpCallback_t cbSuccess = nullptr, + httpCallback_t cbFailure = nullptr); + bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr); + bool requestDelCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr); /// implements LLCapabilityProvider /*virtual*/ const LLHost& getHost() const; @@ -425,6 +425,8 @@ public: std::string getSimHostName(); + bool isRegionWebRTCEnabled(); + static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;} // rebuild reflection probe list diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 23387d8613..eea0b37c43 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -37,7 +37,6 @@ #include "llrender.h" #include "llenvironment.h" #include "llerrorcontrol.h" -#include "llatmosphere.h" #include "llworld.h" #include "llsky.h" @@ -588,6 +587,7 @@ void LLViewerShaderMgr::setShaders() unloadShaders(); LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow"); + LLPipeline::RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth"); if (gViewerWindow) { @@ -2414,7 +2414,9 @@ bool LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER)); gDeferredAvatarProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + gDeferredAvatarProgram.clearPermutations(); add_common_permutations(&gDeferredAvatarProgram); + gDeferredAvatarProgram.addPermutation("AVATAR_CLOTH", LLPipeline::RenderAvatarCloth ? "1" : "0"); success = gDeferredAvatarProgram.createShader(); llassert(success); @@ -3634,7 +3636,7 @@ bool LLViewerShaderMgr::loadShadersInterface() std::string LLViewerShaderMgr::getShaderDirPrefix(void) { - return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders/class"); + return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders", "class"); } void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 59bb78f8f4..8312bf9e74 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -263,6 +263,20 @@ LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > HUDS_FRAME_PCT("huds_ LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > UI_FRAME_PCT("ui_frame_pct"); LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > SWAP_FRAME_PCT("swap_frame_pct"); LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > IDLE_FRAME_PCT("idle_frame_pct"); + + + +LLTrace::SampleStatHandle<U32> WEBRTC_PACKETS_IN_LOST("webrtc_packets_in_lost", "Lost incoming packets"), + WEBRTC_PACKETS_IN_RECEIVED("webrtc_packets_in_recv", "Incoming packets received"), + WEBRTC_PACKETS_OUT_SENT("webrtc_packets_out_sent", "Outgoing packets sent"), + WEBRTC_PACKETS_OUT_LOST("webrtc_packets_out_lost", "Lost outgoing packets"); + +LLTrace::SampleStatHandle<F32> WEBRTC_JITTER_OUT("webrtc_jitter_out", "Timing variation of outgoing audio"), + WEBRTC_JITTER_IN("webrtc_jitter_in", "Timing variation of incoming audio"), + WEBRTC_LATENCY("webrtc_latency", "Round-trip audio delay"), + WEBRTC_UPLOAD_BANDWIDTH("webrtc_upload_bandwidth", "Estimated upload bandwidth"), + WEBRTC_JITTER_BUFFER("webrtc_jitter_buffer", "Average delay added to smooth incoming audio"); + } LLViewerStats::LLViewerStats() @@ -783,7 +797,11 @@ void send_viewer_stats(bool include_preferences) fail["failed_resends"] = (S32) gMessageSystem->mFailedResendPackets; fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets; fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets; - fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing(); +#if LL_VELOPACK + fail["missing_updater"] = false; +#else + fail["missing_updater"] = true; +#endif LLSD &inventory = body["inventory"]; inventory["usable"] = gInventory.isInventoryUsable(); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 1ac8b2f66b..8ec0dd0024 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -232,6 +232,9 @@ extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT extern LLTrace::SampleStatHandle<F64> NOTRMALIZED_FRAMETIME_JITTER_SESSION; extern LLTrace::SampleStatHandle<F64> NORMALIZED_FRAMTIME_JITTER_PERIOD; +extern LLTrace::SampleStatHandle<U32> WEBRTC_PACKETS_IN_LOST, WEBRTC_PACKETS_IN_RECEIVED, WEBRTC_PACKETS_OUT_SENT, WEBRTC_PACKETS_OUT_LOST; +extern LLTrace::SampleStatHandle<F32> WEBRTC_JITTER_OUT, WEBRTC_JITTER_IN, WEBRTC_LATENCY, WEBRTC_UPLOAD_BANDWIDTH, WEBRTC_JITTER_BUFFER; + } class LLViewerStats : public LLSingleton<LLViewerStats> diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c7513ded62..05b71b65b2 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1488,7 +1488,9 @@ bool LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) // from local images, but this might become unsafe in case of changes to fetcher if (mBoostLevel == BOOST_PREVIEW) { - mRawImage->biasedScaleToPowerOfTwo(1024); + // A local file with a preview flag likely means mesh's texture upload + // which should follow normal upload scaling rules + mRawImage->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT); } else { // leave black border, do not scale image content @@ -1896,12 +1898,10 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre mRawDiscardLevel = INVALID_DISCARD_LEVEL; mIsFetching = false; mLastPacketTimer.reset(); + return false; } - else - { - mIsRawImageValid = true; - addToCreateTexture(); - } + + mIsRawImageValid = true; if (mBoostLevel == LLGLTexture::BOOST_ICON) { @@ -1914,7 +1914,11 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre // // BOOST_ICON gets scaling because profile icons can have a bunch of different formats, not just j2c // Might need another pass to use discard for j2c and scaling for everything else. - mRawImage = mRawImage->scaled(expected_width, expected_height); + LLPointer<LLImageRaw> scaled = mRawImage->scaled(expected_width, expected_height); + if (scaled.notNull()) + { + mRawImage = scaled; + } } } @@ -1929,10 +1933,16 @@ bool LLViewerFetchedTexture::processFetchResults(S32& desired_discard, S32 curre // // Todo: probably needs to be remade to use discard, all thumbnails are supposed to be j2c, // so no need to scale, should be posible to use discard to scale image down. - mRawImage = mRawImage->scaled(expected_width, expected_height); + LLPointer<LLImageRaw> scaled = mRawImage->scaled(expected_width, expected_height); + if (scaled.notNull()) + { + mRawImage = scaled; + } } } + addToCreateTexture(); + return true; } else @@ -2574,14 +2584,31 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() S32 best_raw_discard = gl_discard; // Current GL quality level S32 current_aux_discard = MAX_DISCARD_LEVEL + 1; S32 best_aux_discard = MAX_DISCARD_LEVEL + 1; + LLImageRaw *current_raw_image = nullptr; if (mIsRawImageValid) { - // If we have an existing raw image, we have a baseline for the raw and auxiliary quality levels. + // If we have an existing raw image, we have a baseline for the raw + // and auxiliary quality levels. + // Note: we call updateImagesCreateTextures before callbacks, which + // leads to destroyRawImage and deletes raw image. So this case + // might be rare or even never trigger as there is never a raw image, + // only a saved one. current_raw_discard = mRawDiscardLevel; best_raw_discard = llmin(best_raw_discard, mRawDiscardLevel); best_aux_discard = llmin(best_aux_discard, mRawDiscardLevel); // We always decode the aux when we decode the base raw current_aux_discard = llmin(current_aux_discard, best_aux_discard); + current_raw_image = mRawImage; + } + else if (mSavedRawImage.notNull()) + { + // We have a saved raw image, we can use that as our baseline for + // raw and auxiliary quality levels. + current_raw_discard = mSavedRawDiscardLevel; + best_raw_discard = llmin(best_raw_discard, mSavedRawDiscardLevel); + best_aux_discard = llmin(best_aux_discard, mSavedRawDiscardLevel); // We always decode the aux when we decode the base raw + current_aux_discard = llmin(current_aux_discard, best_aux_discard); + current_raw_image = mSavedRawImage; } else { @@ -2646,12 +2673,17 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (need_readback) { readbackRawImage(); + if (mIsRawImageValid) + { + current_raw_discard = mRawDiscardLevel; + current_raw_image = mRawImage; + } } // // Run raw/auxiliary data callbacks // - if (run_raw_callbacks && mIsRawImageValid && (mRawDiscardLevel <= getMaxDiscardLevel())) + if (run_raw_callbacks && current_raw_image != nullptr && (current_raw_discard <= getMaxDiscardLevel())) { // Do callbacks which require raw image data. //LL_INFOS() << "doLoadedCallbacks raw for " << getID() << LL_ENDL; @@ -2662,7 +2694,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() { callback_list_t::iterator curiter = iter++; LLLoadedCallbackEntry *entryp = *curiter; - if (entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > mRawDiscardLevel)) + if (entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > current_raw_discard)) { // If we've loaded all the data there is to load or we've loaded enough // to satisfy the interested party, then this is the last time that @@ -2673,11 +2705,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() { LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL; } - bool final = mRawDiscardLevel <= entryp->mDesiredDiscard; + bool final = current_raw_discard <= entryp->mDesiredDiscard; //LL_INFOS() << "Running callback for " << getID() << LL_ENDL; - //LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL; - entryp->mLastUsedDiscard = mRawDiscardLevel; - entryp->mCallback(true, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); + //LL_INFOS() << current_raw_image->getWidth() << "x" << current_raw_image->getHeight() << LL_ENDL; + entryp->mLastUsedDiscard = current_raw_discard; + entryp->mCallback(true, this, current_raw_image, mAuxRawImage, current_raw_discard, final, entryp->mUserData); if (final) { iter = mLoadedCallbackList.erase(curiter); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5bbcd8f09f..d9516de89d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1121,7 +1121,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->postCreateTexture(); imagep->mCreatePending = false; - mCreateTextureList.pop(); if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() && (imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL)) @@ -1133,6 +1132,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) imagep->scaleDown(); } + mCreateTextureList.pop(); + if (create_timer.getElapsedTimeF32() > max_time) { break; @@ -1202,15 +1203,19 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time) LLTimer timer; image_list_t::iterator enditer = mFastCacheList.begin(); - for (image_list_t::iterator iter = mFastCacheList.begin(); - iter != mFastCacheList.end();) { - image_list_t::iterator curiter = iter++; - enditer = iter; - LLViewerFetchedTexture *imagep = *curiter; - imagep->loadFromFastCache(); - if (timer.getElapsedTimeF32() > max_time) - break; + // prelock fast cache mutex to avoid waiting multiple times. + LLMutexLock cache_lock(LLAppViewer::getTextureCache()->getFastCacheMutex()); + for (image_list_t::iterator iter = mFastCacheList.begin(); + iter != mFastCacheList.end();) + { + image_list_t::iterator curiter = iter++; + enditer = iter; + LLViewerFetchedTexture* imagep = *curiter; + imagep->loadFromFastCache(); + if (timer.getElapsedTimeF32() > max_time) + break; + } } mFastCacheList.erase(mFastCacheList.begin(), enditer); return timer.getElapsedTimeF32(); diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index 583fb25330..50af9756a3 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -96,6 +96,7 @@ LLViewerWearable::~LLViewerWearable() // virtual LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_stream, LLAvatarAppearance* avatarp ) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // suppress texlayerset updates while wearables are being imported. Layersets will be updated // when the wearables are "worn", not loaded. Note state will be restored when this object is destroyed. LLOverrideBakedTextureUpdate stop_bakes(false); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ef24bcf598..c95a3c9578 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -34,7 +34,6 @@ #include <fstream> #include <algorithm> #include <boost/filesystem.hpp> -#include <boost/lambda/core.hpp> #include <boost/regex.hpp> #include "llagent.h" @@ -86,6 +85,7 @@ #include "raytrace.h" // newview includes +#include "llaccordionctrl.h" #include "llbox.h" #include "llchicletbar.h" #include "llconsole.h" @@ -1335,7 +1335,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi // Check the whitelist, if there's media (otherwise just show it) if (te->getMediaData() == NULL || te->getMediaData()->checkCandidateUrl(url)) { - if ( obj != mDragHoveredObject.get()) + if (obj != mDragHoveredObject) { // Highlight the dragged object LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject); @@ -1883,8 +1883,9 @@ LLViewerWindow::LLViewerWindow(const Params& p) // pass its value right now. Instead, pass it a nullary function that // will, when we later need it, return the value of gKeyboard. // boost::lambda::var() constructs such a functor on the fly. - mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); - mViewerWindowListener.reset(new LLViewerWindowListener(this)); + LLWindowListener::KeyboardGetter getter = [](){ return gKeyboard; }; + mWindowListener = std::make_unique<LLWindowListener>(this, getter); + mViewerWindowListener = std::make_unique<LLViewerWindowListener>(this); mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible")); @@ -2076,10 +2077,6 @@ void LLViewerWindow::initGLDefaults() gBox.prerender(); } -struct MainPanel : public LLPanel -{ -}; - void LLViewerWindow::initBase() { S32 height = getWindowHeightScaled(); @@ -2118,6 +2115,8 @@ void LLViewerWindow::initBase() main_view->setShape(full_window); getRootView()->addChild(main_view); + mMainView = main_view; + // placeholder widget that controls where "world" is rendered mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); mPopupView = main_view->getChild<LLPopupView>("popup_holder"); @@ -2333,14 +2332,22 @@ void LLViewerWindow::initWorldUI() physical_mem = LLMemory::getMaxMemKB(); } - if (!gNonInteractive && physical_mem > MIN_PHYSICAL_MEMORY) + if (!gNonInteractive) { - LL_INFOS() << "Preloading cef instances" << LL_ENDL; + if (physical_mem > MIN_PHYSICAL_MEMORY) + { + LL_INFOS() << "Preloading cef instances" << LL_ENDL; - LLFloaterReg::getInstance("destinations"); - LLFloaterReg::getInstance("avatar_welcome_pack"); - LLFloaterReg::getInstance("search"); - LLFloaterReg::getInstance("marketplace"); + LLFloaterReg::getInstance("destinations"); + LLFloaterReg::getInstance("avatar_welcome_pack"); + LLFloaterReg::getInstance("search"); + LLFloaterReg::getInstance("marketplace"); + } + else if (gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + // Preload the welcome pack for first-time login even on low end hardware + LLFloaterReg::getInstance("avatar_welcome_pack"); + } } } @@ -3330,7 +3337,7 @@ void LLViewerWindow::clearPopups() void LLViewerWindow::moveCursorToCenter() { bool mouse_warp = false; - LLCachedControl<S32> mouse_warp_mode(gSavedSettings, "MouseWarpMode", 1); + static LLCachedControl<S32> mouse_warp_mode(gSavedSettings, "MouseWarpMode", 1); switch (mouse_warp_mode()) { @@ -3403,13 +3410,11 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params) } } -static LLTrace::BlockTimerStatHandle ftm("Update UI"); - // Update UI based on stored mouse position from mouse-move // event processing. void LLViewerWindow::updateUI() { - LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(ftm); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; static std::string last_handle_msg; @@ -3427,10 +3432,15 @@ void LLViewerWindow::updateUI() } } - LLConsole::updateClass(); + { + LL_PROFILE_ZONE_NAMED("UI updateClass"); + LLConsole::updateClass(); - // animate layout stacks so we have up to date rect for world view - LLLayoutStack::updateClass(); + // execute postponed arrange calls + LLAccordionCtrl::updateClass(); + // animate layout stacks so we have up to date rect for world view + LLLayoutStack::updateClass(); + } // use full window for world view when not rendering UI bool world_view_uses_full_window = gAgentCamera.cameraMouselook() || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); @@ -3859,6 +3869,7 @@ void LLViewerWindow::updateUI() void LLViewerWindow::updateLayout() { + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLTool* tool = LLToolMgr::getInstance()->getCurrentTool(); if (gFloaterTools != NULL && tool != NULL @@ -4338,15 +4349,15 @@ void LLViewerWindow::pickAsync( S32 x, bool pick_unselectable, bool pick_reflection_probes) { + static LLCachedControl<bool> select_invisible_objects(gSavedSettings, "SelectInvisibleObjects"); // "Show Debug Alpha" means no object actually transparent bool in_build_mode = LLFloaterReg::instanceVisible("build"); - if (LLDrawPoolAlpha::sShowDebugAlpha - || (in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects"))) + if (LLDrawPoolAlpha::sShowDebugAlpha || (in_build_mode && select_invisible_objects)) { pick_transparent = true; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, false, pick_reflection_probes, pick_unselectable, true, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, false, pick_reflection_probes, true, pick_unselectable, callback); schedulePick(pick_info); } @@ -4370,7 +4381,6 @@ void LLViewerWindow::schedulePick(LLPickInfo& pick_info) mWindow->delayInputProcessing(); } - void LLViewerWindow::performPick() { if (!mPicks.empty()) @@ -4404,8 +4414,9 @@ void LLViewerWindow::returnEmptyPicks() // Performs the GL object/land pick. LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transparent, bool pick_rigged, bool pick_particle, bool pick_unselectable, bool pick_reflection_probe) { + static LLCachedControl<bool> select_invisible_objects(gSavedSettings, "SelectInvisibleObjects"); bool in_build_mode = LLFloaterReg::instanceVisible("build"); - if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha) + if ((in_build_mode && select_invisible_objects) || LLDrawPoolAlpha::sShowDebugAlpha) { // build mode allows interaction with all transparent objects // "Show Debug Alpha" means no object actually transparent @@ -4413,7 +4424,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transp } // shortcut queueing in mPicks and just update mLastPick in place - MASK key_mask = gKeyboard->currentMask(true); + MASK key_mask = gKeyboard->currentMask(true); mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, true, false, NULL); mLastPick.fetchResults(); @@ -4925,6 +4936,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save if (image->save(filepath)) { playSnapshotAnimAndSound(); + + // Show clickable notification with filepath + LLSD args; + args["FILEPATH"] = filepath; + + LLSD payload; + payload["filepath"] = filepath; + + LLNotificationsUtil::add("SnapshotSavedToComputer", + args, + payload.with("respond_on_mousedown", true), + boost::bind(&LLViewerWindow::onSnapshotNotificationClick, _1, _2)); + success_cb(); } else @@ -4939,6 +4963,16 @@ void LLViewerWindow::resetSnapshotLoc() } // static +void LLViewerWindow::onSnapshotNotificationClick(const LLSD& notification, const LLSD& response) +{ + std::string filepath = notification["payload"]["filepath"].asString(); + if (!filepath.empty()) + { + gDirUtilp->openDir(filepath); + } +} + +// static void LLViewerWindow::movieSize(S32 new_width, S32 new_height) { LLCoordWindow size; @@ -6136,7 +6170,7 @@ bool LLViewerWindow::getUIVisibility() // LLPickInfo::LLPickInfo() : mKeyMask(MASK_NONE), - mPickCallback(NULL), + mPickCallback(nullptr), mPickType(PICK_INVALID), mWantSurfaceInfo(false), mObjectFace(-1), @@ -6147,7 +6181,7 @@ LLPickInfo::LLPickInfo() mNormal(), mTangent(), mBinormal(), - mHUDIcon(NULL), + mHUDIcon(nullptr), mPickTransparent(false), mPickRigged(false), mPickParticle(false) @@ -6160,14 +6194,14 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, bool pick_rigged, bool pick_particle, bool pick_reflection_probe, - bool pick_uv_coords, + bool pick_surface_info, bool pick_unselectable, void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), mKeyMask(keyboard_mask), mPickCallback(pick_callback), mPickType(PICK_INVALID), - mWantSurfaceInfo(pick_uv_coords), + mWantSurfaceInfo(pick_surface_info), mObjectFace(-1), mUVCoords(-1.f, -1.f), mSTCoords(-1.f, -1.f), diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 61aa84394c..ec28a3fc4a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -48,9 +48,10 @@ #include "lltrace.h" #include "llsnapshotmodel.h" -#include <boost/function.hpp> #include <boost/signals2.hpp> +#include <functional> + class LLView; class LLViewerObject; class LLUUID; @@ -143,6 +144,10 @@ private: }; +struct MainPanel : public LLPanel +{ +}; + static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 7680; // max snapshot image size 7680 * 7680 UHDTV2 class LLViewerWindow : public LLWindowCallbacks @@ -238,7 +243,7 @@ public: const std::map<std::string, std::string>& args); // signal on update of WorldView rect - typedef boost::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t; + typedef std::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t; typedef boost::signals2::signal<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_signal_t; world_rect_signal_t mOnWorldViewRectUpdated; boost::signals2::connection setOnWorldViewRectUpdated(world_rect_callback_t cb) { return mOnWorldViewRectUpdated.connect(cb); } @@ -247,6 +252,7 @@ public: // ACCESSORS // LLRootView* getRootView() const; + MainPanel* getMainView() const { return mMainView; } // 3D world area in scaled pixels (via UI scale), use for most UI computations LLRect getWorldViewRectScaled() const; @@ -404,6 +410,7 @@ public: void resetSnapshotLoc(); void playSnapshotAnimAndSound(); + static void onSnapshotNotificationClick(const LLSD& notification, const LLSD& response); // draws selection boxes around selected objects, must call displayObjects first void renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud ); @@ -500,6 +507,7 @@ private: LLRect mWorldViewRectRaw; // area of screen for 3D world LLRect mWorldViewRectScaled; // area of screen for 3D world scaled by UI size LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views + MainPanel* mMainView; // a view of size mWindowRectRaw, directly containing the base elements of the ui tree LLView* mFloaterSnapRegion = nullptr; LLView* mNavBarContainer = nullptr; LLPanel* mStatusBarContainer = nullptr; diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp index c2bcd32921..f4c2c27cee 100644 --- a/indra/newview/llvlmanager.cpp +++ b/indra/newview/llvlmanager.cpp @@ -68,7 +68,11 @@ void LLVLManager::addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size) } else { - LL_ERRS() << "Unknown layer type!" << (S32)vl_datap->mType << LL_ENDL; + // Corrupted message? New feature? + LL_WARNS() << "Unknown layer type!" << (S32)vl_datap->mType + << " for region " << vl_datap->mRegionp->getName() << LL_ENDL; + delete vl_datap; // addLayerData took ownership + return; } mPacketData.push_back(vl_datap); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 910f711a9d..384b45ca4c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -218,6 +218,13 @@ enum ERenderName RENDER_NAME_FADE }; +enum ERenderGroupTitle +{ + RENDER_GROUP_TITLE_NEVER, + RENDER_GROUP_TITLE_SELF, + RENDER_GROUP_TITLE_ALWAYS +}; + #define JELLYDOLLS_SHOULD_IMPOSTOR //----------------------------------------------------------------------------- @@ -608,7 +615,7 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] = }; S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS; -bool LLVOAvatar::sRenderGroupTitles = true; +S32 LLVOAvatar::sRenderGroupTitles = RENDER_GROUP_TITLE_ALWAYS; S32 LLVOAvatar::sNumVisibleChatBubbles = 0; bool LLVOAvatar::sDebugInvisible = false; bool LLVOAvatar::sShowAttachmentPoints = false; @@ -3332,7 +3339,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() void LLVOAvatar::idleUpdateWindEffect() { // update wind effect - if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH)) + if (LLPipeline::RenderAvatarCloth) { F32 hover_strength = 0.f; F32 time_delta = mRippleTimer.getElapsedTimeF32() - mRippleTimeLast; @@ -3584,9 +3591,10 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) addNameTagLine(line, name_tag_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); } + bool render_title = (sRenderGroupTitles == RENDER_GROUP_TITLE_ALWAYS) || + (isSelf() && (sRenderGroupTitles == RENDER_GROUP_TITLE_SELF)); - if (sRenderGroupTitles - && title && title->getString() && title->getString()[0] != '\0') + if (render_title && title && title->getString() && title->getString()[0] != '\0') { std::string title_str = title->getString(); LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR); @@ -4454,10 +4462,10 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV ); - const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW = 60.0f; - const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_FAST = 2.0f; + static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0); + static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0); - F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW, AVATAR_PELVIS_ROTATE_THRESHOLD_FAST); + F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast); if (self_in_mouselook) { @@ -11451,12 +11459,17 @@ void LLVOAvatar::calculateUpdateRenderComplexity() LLPerfStats::tunables.userFPSTuningStrategy != LLPerfStats::TUNE_SCENE_ONLY && !isVisuallyMuted()) { - LLUUID id = getID(); // <== use id to make sure this avatar didn't get deleted between frames - LL::WorkQueue::getInstance("mainloop")->post([this, id]() + const LLUUID id = getID(); // <== use id to make sure this avatar didn't get deleted between frames + LL::WorkQueue::getInstance("mainloop")->post([id]() { - if (gObjectList.findObject(id) != nullptr) + LLViewerObject* obj = gObjectList.findObject(id); + if (obj + && !obj->isDead() + && obj->isAvatar() + && obj->mDrawable) { - gPipeline.profileAvatar(this); + LLVOAvatar* avatar = (LLVOAvatar*)obj; + gPipeline.profileAvatar(avatar); } }); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1e563c4869..fc3a97a25d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -354,7 +354,7 @@ public: //-------------------------------------------------------------------- public: static S32 sRenderName; - static bool sRenderGroupTitles; + static S32 sRenderGroupTitles; static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors * slider in panel_preferences_graphics1.xml */ static U32 sMaxNonImpostors; // affected by control "RenderAvatarMaxNonImpostors" @@ -1120,7 +1120,7 @@ private: bool mNameFriend; bool mNameCloud; F32 mNameAlpha; - bool mRenderGroupTitles; + S32 mRenderGroupTitles; //-------------------------------------------------------------------- // Display the name (then optionally fade it out) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 653c7e82eb..e5c14a34a5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2211,9 +2211,9 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("appearanceChangeMetrics", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("appearanceChangeMetrics", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); S32 currentSequence = mMetricSequence; if (S32_MAX == ++mMetricSequence) @@ -2735,7 +2735,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) // Dereferencing the previous callback will cause // updateAppearanceFromCOF to be called, whenever all refs // have resolved. - gAgentAvatarp->mEndCustomizeCallback = NULL; + gAgentAvatarp->mEndCustomizeCallback = nullptr; } } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index fdd39a0e30..86d08b8658 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -736,7 +736,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group) void LLVOGrass::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update - if (mDrawable.notNull()) + if (mDrawable.notNull() && mDrawable->getVObj()) { mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index fbe896ac27..0852258994 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -472,10 +472,6 @@ void LLVoiceChannelGroup::activate() } } } - - // Mic default state is OFF on initiating/joining Ad-Hoc/Group calls. It's on for P2P using the AdHoc infra. - - LLVoiceClient::getInstance()->setUserPTTState(mIsP2P); } } @@ -534,6 +530,10 @@ void LLVoiceChannelGroup::handleStatusChange(EStatusType type) case STATUS_JOINED: mRetries = 3; mIsRetrying = false; + + // Mic default state is OFF on initiating/joining Ad-Hoc/Group calls. It's on for P2P using the AdHoc infra. + LLVoiceClient::getInstance()->setUserPTTState(mIsP2P); + break; default: break; } @@ -610,8 +610,8 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceCallCapCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD postData; postData["method"] = "call"; diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index bf119638d3..18e1d60987 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -57,7 +57,7 @@ public: typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent, const LLUUID& session_id)> state_changed_signal_t; // on current channel changed signal - typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t; + typedef std::function<void(const LLUUID& session_id)> channel_changed_callback_t; typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t; static channel_changed_signal_t sCurrentVoiceChannelChangedSignal; static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 59e8db7752..4fd0a8e2b8 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -41,6 +41,7 @@ #include "llagent.h" #include "lltrans.h" #include "lluiusage.h" +#include "llnearbyvoicemoderation.h" const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; @@ -748,6 +749,9 @@ void LLVoiceClient::setUserPTTState(bool ptt) { if (ptt) { + // Nearby chat is muted by moderator, don't toggle PTT + if (!mUserPTTState && LLNearbyVoiceModeration::getInstance()->showNotificationIfNeeded()) + return; LLUIUsage::instance().logCommand("Agent.EnableMicrophone"); } mUserPTTState = ptt; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 40de236c90..f32bdfb75c 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1116,7 +1116,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() while (!sPump && !sShuttingDown) { // Can't use the pump until we have it available. - llcoro::suspend(); + llcoro::suspendUntilNextFrame(); } if (sShuttingDown) @@ -1173,9 +1173,9 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceAccountProvision", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceAccountProvision", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); int retryCount(0); LLSD result; @@ -1585,8 +1585,8 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("parcelVoiceInfoRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("parcelVoiceInfoRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, LLSD()); @@ -4629,7 +4629,7 @@ LLVivoxVoiceClient::participantStatePtr_t LLVivoxVoiceClient::sessionState::addP if(!result) { // participant isn't already in one list or the other. - result.reset(new participantState(useAlternateURI?mSIPURI:uri)); + result = std::make_shared<participantState>(useAlternateURI?mSIPURI:uri); mParticipantsByURI.insert(participantMap::value_type(result->mURI, result)); mParticipantsChanged = true; diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 447f1b652a..c6967a8743 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -61,10 +61,12 @@ #include "llrand.h" #include "llviewerwindow.h" #include "llviewercamera.h" +#include "llviewerstats.h" #include "llversioninfo.h" #include "llviewernetwork.h" #include "llnotificationsutil.h" +#include "llnearbyvoicemoderation.h" #include "llcorehttputil.h" #include "lleventfilter.h" @@ -80,6 +82,8 @@ const std::string WEBRTC_VOICE_SERVER_TYPE = "webrtc"; +const F32 STATS_TIMER_DELAY = 2.0; + namespace { const F32 MAX_AUDIO_DIST = 50.0f; @@ -699,6 +703,7 @@ void LLWebRTCVoiceClient::setCaptureDevice(const std::string& name) { if (mWebRTCDeviceInterface) { + LL_DEBUGS("Voice") << "new capture device is " << name << LL_ENDL; mWebRTCDeviceInterface->setCaptureDevice(name); } } @@ -727,6 +732,9 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi return; } LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE; + + LL_DEBUGS("Voice") << "Reiniting " << LL_ENDL; + std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); @@ -789,6 +797,7 @@ void LLWebRTCVoiceClient::setRenderDevice(const std::string& name) { if (mWebRTCDeviceInterface) { + LL_DEBUGS("Voice") << "new render device is " << name << LL_ENDL; mWebRTCDeviceInterface->setRenderDevice(name); } } @@ -1304,7 +1313,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::ad if (!result) { // participant isn't already in one list or the other. - result.reset(new participantState(agent_id, region)); + result = std::make_shared<participantState>(agent_id, region); mParticipantsByUUID.insert(participantUUIDMap::value_type(agent_id, result)); result->mAvatarID = agent_id; } @@ -2168,7 +2177,7 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates() // Only connect if the region supports WebRTC voice server type if (isRegionWebRTCEnabled(neighbor)) { - connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); + connectionPtr_t connection = std::make_shared<LLVoiceWebRTCSpatialConnection>(neighbor, INVALID_PARCEL_ID, mChannelID); mWebRTCConnections.push_back(connection); connection->setMuteMic(mMuted); // mute will be set for primary connection when that connection comes up @@ -2445,11 +2454,11 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -2491,17 +2500,18 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) // callback from llwebrtc void LLVoiceWebRTCConnection::OnOfferAvailable(const std::string &sdp) { + connectionPtr_t connection = shared_from_this(); LL::WorkQueue::postMaybe(mMainQueue, - [=, this] { - if (mShutDown) + [=] { + if (connection->mShutDown) { return; } LL_DEBUGS("Voice") << "On Offer Available." << LL_ENDL; - mChannelSDP = sdp; - if (mVoiceConnectionState == VOICE_STATE_WAIT_FOR_SESSION_START) + connection->mChannelSDP = sdp; + if (connection->mVoiceConnectionState == VOICE_STATE_WAIT_FOR_SESSION_START) { - mVoiceConnectionState = VOICE_STATE_REQUEST_CONNECTION; + connection->mVoiceConnectionState = VOICE_STATE_REQUEST_CONNECTION; } }); } @@ -2518,16 +2528,17 @@ void LLVoiceWebRTCConnection::OnOfferAvailable(const std::string &sdp) // callback from llwebrtc void LLVoiceWebRTCConnection::OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface* audio_interface) { + connectionPtr_t connection = shared_from_this(); LL::WorkQueue::postMaybe(mMainQueue, - [=, this] { - if (mShutDown) + [=] { + if (connection->mShutDown) { return; } LL_DEBUGS("Voice") << "On AudioEstablished." << LL_ENDL; - mWebRTCAudioInterface = audio_interface; - mWebRTCAudioInterface->setMute(true); // mute will be set appropriately later when we finish setting up. - setVoiceConnectionState(VOICE_STATE_SESSION_ESTABLISHED); + connection->mWebRTCAudioInterface = audio_interface; + connection->mWebRTCAudioInterface->setMute(true); // mute will be set appropriately later when we finish setting up. + connection->setVoiceConnectionState(VOICE_STATE_SESSION_ESTABLISHED); }); } @@ -2544,10 +2555,7 @@ void LLVoiceWebRTCConnection::OnRenegotiationNeeded() LL::WorkQueue::postMaybe(mMainQueue, [=, this] { LL_DEBUGS("Voice") << "Voice channel requires renegotiation." << LL_ENDL; - if (!mShutDown) - { - setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); - } + setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); mCurrentStatus = LLVoiceClientStatusObserver::ERROR_UNKNOWN; }); } @@ -2659,11 +2667,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connectio body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::breakVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); @@ -2728,11 +2736,11 @@ void LLVoiceWebRTCSpatialConnection::requestVoiceConnection() } body["channel_type"] = "local"; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts); @@ -2893,12 +2901,14 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() // this connection. // For spatial this connection will come up as muted, but will be set to the appropriate // value later on when we determine the regions we connect to. - if (!isSpatial()) + if (isSpatial()) { - mWebRTCAudioInterface->setMute(mMuted); + // we'll determine primary state later and set mute accordinly + mPrimary = false; } mWebRTCAudioInterface->setReceiveVolume(mSpeakerVolume); LLWebRTCVoiceClient::getInstance()->OnConnectionEstablished(mChannelID, mRegionID); + resetConnectionStats(); setVoiceConnectionState(VOICE_STATE_WAIT_FOR_DATA_CHANNEL); break; } @@ -2919,6 +2929,10 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() LLWebRTCVoiceClient::getInstance()->updatePosition(); LLWebRTCVoiceClient::getInstance()->sendPositionUpdate(true); } + else + { + mWebRTCAudioInterface->setMute(mMuted); + } } break; } @@ -2948,6 +2962,13 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() sendJoin(); } } + + static LLTimer stats_timer; + if (stats_timer.getElapsedTimeF32() > STATS_TIMER_DELAY) + { + mWebRTCPeerConnectionInterface->gatherConnectionStats(); + stats_timer.reset(); + } } break; } @@ -3079,6 +3100,13 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b LL_WARNS("Voice") << "Expected object from data channel:" << data << LL_ENDL; return; } + + bool is_primary_region = mPrimary; + if (!mPrimary && isSpatial() && gAgent.getRegion()) + { + is_primary_region = (mRegionID == gAgent.getRegion()->getRegionID()); + LL_WARNS() << "mPrimary is false, expected: " << is_primary_region << " connection state: " << getVoiceConnectionState() << LL_ENDL; + } boost::json::object voice_data = voice_data_parsed.as_object(); boost::json::object mute; boost::json::object user_gain; @@ -3164,12 +3192,63 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b if (participant_obj.contains("m") && participant_obj["m"].is_bool()) { - participant->mIsModeratorMuted = participant_obj["m"].as_bool(); + bool is_moderator_muted = participant_obj["m"].as_bool(); + if (isSpatial()) + { + // ignore muted flags from non-primary server + if (is_primary_region || primary) + { + participant->mIsModeratorMuted = is_moderator_muted; + if (gAgentID == agent_id) + { + LLNearbyVoiceModeration::getInstance()->setMutedInfo(mChannelID, is_moderator_muted); + } + } + } + else + { + participant->mIsModeratorMuted = is_moderator_muted; + } } } } - } + else + { + if (isSpatial() && (is_primary_region || primary)) + { + // mute info message can be received before join message, so try to mute again later + if (participant_obj.contains("m") && participant_obj["m"].is_bool()) + { + LL_WARNS() << "Mute info msg received: " << participant_obj["m"].as_bool() + << " but participant " << agent_id + << " was not found in channel " << mChannelID << LL_ENDL; + bool is_moderator_muted = participant_obj["m"].as_bool(); + std::string channel_id = mChannelID; + F32 delay { 1.5f }; + doAfterInterval( + [channel_id, agent_id, is_moderator_muted]() + { + LLWebRTCVoiceClient::participantStatePtr_t participant = + LLWebRTCVoiceClient::getInstance()->findParticipantByID(channel_id, agent_id); + if (participant) + { + participant->mIsModeratorMuted = is_moderator_muted; + LL_WARNS() << "Participant " << agent_id << " is found after delay, is_muted: " << is_moderator_muted << LL_ENDL; + if (gAgentID == agent_id) + { + LLNearbyVoiceModeration::getInstance()->setMutedInfo(channel_id, is_moderator_muted); + } + } + else + { + LL_WARNS() << "Participant " << agent_id << " is still not found in channel " << channel_id << LL_ENDL; + } + }, delay); + } + } + } + } // tell the simulator to set the mute and volume data for this // participant, if there are any updates. boost::json::object root; @@ -3200,17 +3279,18 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b // llwebrtc callback void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface) { + connectionPtr_t connection = shared_from_this(); LL::WorkQueue::postMaybe(mMainQueue, - [=, this] { - if (mShutDown) + [=] { + if (connection->mShutDown) { return; } if (data_interface) { - mWebRTCDataInterface = data_interface; - mWebRTCDataInterface->setDataObserver(this); + connection->mWebRTCDataInterface = data_interface; + connection->mWebRTCDataInterface->setDataObserver(connection.get()); } }); } @@ -3240,6 +3320,112 @@ void LLVoiceWebRTCConnection::sendJoin() mWebRTCDataInterface->sendData(json_data, false); } +void LLVoiceWebRTCConnection::OnStatsDelivered(const llwebrtc::LLWebRTCStatsMap& stats_data) +{ + LL::WorkQueue::postMaybe(mMainQueue, [=, this] + { + if (mShutDown) + { + return; + } + for (const auto& [stats_id, attributes] : stats_data) + { + if (attributes.contains("currentRoundTripTime")) + { + F32 rtt_seconds = 0.0f; + LLStringUtil::convertToF32(attributes.at("currentRoundTripTime"), rtt_seconds); + sample(LLStatViewer::WEBRTC_LATENCY, rtt_seconds * 1000.0f); + } + if (attributes.contains("availableOutgoingBitrate")) + { + F32 bitrate_bps = 0.0f; + LLStringUtil::convertToF32(attributes.at("availableOutgoingBitrate"), bitrate_bps); + sample(LLStatViewer::WEBRTC_UPLOAD_BANDWIDTH, bitrate_bps / 1000.0f); + } + + // Stat type detection below is heuristic-based. + // It's relied on specific fields to distinguish outbound-rtp, remote-inbound-rtp, and inbound-rtp. + // This approach works with current WebRTC stats but may need updating later. + + // Outbound RTP + if (attributes.contains("mediaSourceId")) + { + U32 out_packets_sent = 0; + LLStringUtil::convertToU32(attributes.at("packetsSent"), out_packets_sent); + sample(LLStatViewer::WEBRTC_PACKETS_OUT_SENT, out_packets_sent); + } + // Remote-Inbound RTP + else if (attributes.contains("localId")) + { + if (attributes.contains("packetsLost")) + { + U32 out_packets_lost = 0; + LLStringUtil::convertToU32(attributes.at("packetsLost"), out_packets_lost); + sample(LLStatViewer::WEBRTC_PACKETS_OUT_LOST, out_packets_lost); + } + if (attributes.contains("jitter")) + { + F32 jitter_seconds = 0.0f; + LLStringUtil::convertToF32(attributes.at("jitter"), jitter_seconds); + sample(LLStatViewer::WEBRTC_JITTER_OUT, jitter_seconds * 1000.0f); + } + } + // Inbound RTP + else if (attributes.contains("jitterBufferDelay")) + { + if (attributes.contains("packetsLost")) + { + U32 in_packets_lost = 0; + LLStringUtil::convertToU32(attributes.at("packetsLost"), in_packets_lost); + sample(LLStatViewer::WEBRTC_PACKETS_IN_LOST, in_packets_lost); + } + if (attributes.contains("packetsReceived")) + { + U32 in_packets_recv = 0; + LLStringUtil::convertToU32(attributes.at("packetsReceived"), in_packets_recv); + sample(LLStatViewer::WEBRTC_PACKETS_IN_RECEIVED, in_packets_recv); + } + if (attributes.contains("jitter")) + { + F32 jitter_seconds = 0.0f; + LLStringUtil::convertToF32(attributes.at("jitter"), jitter_seconds); + sample(LLStatViewer::WEBRTC_JITTER_IN, jitter_seconds * 1000.0f); + } + if (attributes.contains("jitterBufferDelay") && attributes.contains("jitterBufferEmittedCount")) + { + F32 total_delay_seconds = 0.0f; + F32 emitted_count_f = 0.0f; + + // total delay in seconds + LLStringUtil::convertToF32(attributes.at("jitterBufferDelay"), total_delay_seconds); + + // number of packets played out + LLStringUtil::convertToF32(attributes.at("jitterBufferEmittedCount"), emitted_count_f); + if (emitted_count_f > 0.0f) + { + F32 avg_delay_seconds = total_delay_seconds / emitted_count_f; + F32 avg_delay_ms = avg_delay_seconds * 1000.0f; + sample(LLStatViewer::WEBRTC_JITTER_BUFFER, avg_delay_seconds * 1000.0f); + } + } + } + } + }); +} + +void LLVoiceWebRTCConnection::resetConnectionStats() +{ + sample(LLStatViewer::WEBRTC_JITTER_BUFFER, 0); + sample(LLStatViewer::WEBRTC_JITTER_IN, 0); + sample(LLStatViewer::WEBRTC_JITTER_OUT, 0); + sample(LLStatViewer::WEBRTC_LATENCY, 0); + sample(LLStatViewer::WEBRTC_PACKETS_IN_LOST, 0); + sample(LLStatViewer::WEBRTC_PACKETS_IN_RECEIVED, 0); + sample(LLStatViewer::WEBRTC_PACKETS_OUT_SENT, 0); + sample(LLStatViewer::WEBRTC_PACKETS_OUT_LOST, 0); + sample(LLStatViewer::WEBRTC_UPLOAD_BANDWIDTH, 0); +} + ///////////////////////////// // WebRTC Spatial Connection @@ -3338,11 +3524,11 @@ void LLVoiceWebRTCAdHocConnection::requestVoiceConnection() body["channel_type"] = "multiagent"; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 0c658803db..033990f789 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -540,6 +540,8 @@ private: static bool sShuttingDown; LLEventMailDrop mWebRTCPump; + + LLSD mLastWebRTCStats; }; @@ -603,6 +605,8 @@ class LLVoiceWebRTCConnection : //@{ void OnDataReceived(const std::string &data, bool binary) override; void OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface) override; + + void OnStatsDelivered(const llwebrtc::LLWebRTCStatsMap& stats_data) override; //@} void OnDataReceivedImpl(const std::string &data, bool binary); @@ -638,6 +642,8 @@ class LLVoiceWebRTCConnection : void OnVoiceConnectionRequestSuccess(const LLSD &body); + void resetConnectionStats(); + protected: typedef enum e_voice_connection_state { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4f828cc0ff..d1feb7e875 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -250,10 +250,12 @@ LLVOVolume::~LLVOVolume() delete mVolumeImpl; mVolumeImpl = NULL; - gMeshRepo.unregisterMesh(this); + unregisterOldMeshAndSkin(); if(!mMediaImplList.empty()) { + LL_PROFILE_ZONE_NAMED_CATEGORY_MEDIA("delete volume media list"); + for(U32 i = 0 ; i < mMediaImplList.size() ; i++) { if(mMediaImplList[i].notNull()) @@ -351,7 +353,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, U8 sculpt_type = 0; if (isSculpted()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = getSculptParams(); if (sculpt_params) { sculpt_id = sculpt_params->getSculptTexture(); @@ -924,7 +926,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) if (getLightTextureID().notNull()) { - LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); + LLLightImageParams* params = getLightImageParams(); LLUUID id = params->getLightTexture(); mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE); if (mLightTexture.notNull()) @@ -1048,6 +1050,28 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) return mDrawable; } +// Inverse of gMeshRepo.loadMesh and gMeshRepo.getSkinInfo, combined into one function +// Assume a Collada mesh never changes after being set. +void LLVOVolume::unregisterOldMeshAndSkin() +{ + if (mVolumep) + { + const LLVolumeParams& params = mVolumep->getParams(); + if ((params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) + { + // object is being deleted, so it will no longer need to request + // meshes. + for (S32 lod = 0; lod != LLVolumeLODGroup::NUM_LODS; ++lod) + { + gMeshRepo.unregisterMesh(this, params, lod); + } + // This volume may or may not have a skin + gMeshRepo.unregisterSkinInfo(params.getSculptID(), this); + } + } +} + + bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; @@ -1082,7 +1106,7 @@ bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, false); if (!mVolumeImpl) { - LLFlexibleObjectData* data = (LLFlexibleObjectData*)getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + LLFlexibleObjectData* data = getFlexibleObjectData(); mVolumeImpl = new LLVolumeImplFlexible(this, data); } } @@ -1193,7 +1217,7 @@ void LLVOVolume::updateSculptTexture() if (isSculpted() && !isMesh()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLSculptParams *sculpt_params = getSculptParams(); if (sculpt_params) { LLUUID id = sculpt_params->getSculptTexture(); @@ -2693,10 +2717,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) if (mep && impl) { std::string url = mep->getCurrentURL(); - // Look for a ":", if not there, assume "http://" + // Look for a ":", if not there, assume "https://" if (!url.empty() && std::string::npos == url.find(':')) { - url = "http://" + url; + url = "https://" + url; } // If the url we're trying to "bounce back" to is either empty or not // allowed by the whitelist, try the home url. If *that* doesn't work, @@ -2704,10 +2728,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) if (url.empty() || !mep->checkCandidateUrl(url)) { url = mep->getHomeURL(); - // Look for a ":", if not there, assume "http://" + // Look for a ":", if not there, assume "https://" if (!url.empty() && std::string::npos == url.find(':')) { - url = "http://" + url; + url = "https://" + url; } } if (url.empty() || !mep->checkCandidateUrl(url)) @@ -3053,7 +3077,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) { old_texturep->removeVolume(LLRender::LIGHT_TEX, this); } - LLLightImageParams* param_block = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); + LLLightImageParams* param_block = getLightImageParams(); if (param_block && param_block->getLightTexture() != id) { param_block->setLightTexture(id); @@ -3083,7 +3107,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) void LLVOVolume::setSpotLightParams(LLVector3 params) { - LLLightImageParams* param_block = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); + LLLightImageParams* param_block = getLightImageParams(); if (param_block && param_block->getParams() != params) { param_block->setParams(params); @@ -3125,7 +3149,7 @@ void LLVOVolume::setLightSRGBColor(const LLColor3& color) void LLVOVolume::setLightLinearColor(const LLColor3& color) { - LLLightParams *param_block = (LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + LLLightParams *param_block = getLightParams(); if (param_block) { if (param_block->getLinearColor() != color) @@ -3140,7 +3164,7 @@ void LLVOVolume::setLightLinearColor(const LLColor3& color) void LLVOVolume::setLightIntensity(F32 intensity) { - LLLightParams *param_block = (LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + LLLightParams *param_block = getLightParams(); if (param_block) { if (param_block->getLinearColor().mV[3] != intensity) @@ -3153,7 +3177,7 @@ void LLVOVolume::setLightIntensity(F32 intensity) void LLVOVolume::setLightRadius(F32 radius) { - LLLightParams *param_block = (LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + LLLightParams *param_block = getLightParams(); if (param_block) { if (param_block->getRadius() != radius) @@ -3166,7 +3190,7 @@ void LLVOVolume::setLightRadius(F32 radius) void LLVOVolume::setLightFalloff(F32 falloff) { - LLLightParams *param_block = (LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + LLLightParams *param_block = getLightParams(); if (param_block) { if (param_block->getFalloff() != falloff) @@ -3179,7 +3203,7 @@ void LLVOVolume::setLightFalloff(F32 falloff) void LLVOVolume::setLightCutoff(F32 cutoff) { - LLLightParams *param_block = (LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + LLLightParams *param_block = getLightParams(); if (param_block) { if (param_block->getCutoff() != cutoff) @@ -3194,7 +3218,7 @@ void LLVOVolume::setLightCutoff(F32 cutoff) bool LLVOVolume::getIsLight() const { - mIsLight = getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT); + mIsLight = getLightParams() != nullptr; return mIsLight; } @@ -3210,7 +3234,7 @@ LLColor3 LLVOVolume::getLightSRGBBaseColor() const LLColor3 LLVOVolume::getLightLinearBaseColor() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return LLColor3(param_block->getLinearColor()); @@ -3223,7 +3247,7 @@ LLColor3 LLVOVolume::getLightLinearBaseColor() const LLColor3 LLVOVolume::getLightLinearColor() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return LLColor3(param_block->getLinearColor()) * param_block->getLinearColor().mV[3]; @@ -3241,33 +3265,27 @@ LLColor3 LLVOVolume::getLightSRGBColor() const return ret; } -LLUUID LLVOVolume::getLightTextureID() const +const LLUUID& LLVOVolume::getLightTextureID() const { - if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) + const LLLightImageParams *param_block = getLightImageParams(); + if (param_block) { - const LLLightImageParams *param_block = (const LLLightImageParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); - if (param_block) - { - return param_block->getLightTexture(); - } + return param_block->getLightTexture(); } return LLUUID::null; } -LLVector3 LLVOVolume::getSpotLightParams() const +const LLVector3& LLVOVolume::getSpotLightParams() const { - if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) + const LLLightImageParams *param_block = getLightImageParams(); + if (param_block) { - const LLLightImageParams *param_block = (const LLLightImageParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); - if (param_block) - { - return param_block->getParams(); - } + return param_block->getParams(); } - return LLVector3(); + return LLVector3::zero; } F32 LLVOVolume::getSpotLightPriority() const @@ -3304,8 +3322,8 @@ void LLVOVolume::updateSpotLightPriority() bool LLVOVolume::isLightSpotlight() const { - LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); - if (params && getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) + const LLLightImageParams* params = getLightImageParams(); + if (params) { return params->isLightSpotlight(); } @@ -3315,7 +3333,7 @@ bool LLVOVolume::isLightSpotlight() const LLViewerTexture* LLVOVolume::getLightTexture() { - LLUUID id = getLightTextureID(); + const LLUUID& id = getLightTextureID(); if (id.notNull()) { @@ -3326,7 +3344,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() } else { - mLightTexture = NULL; + mLightTexture = nullptr; } return mLightTexture; @@ -3334,7 +3352,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() F32 LLVOVolume::getLightIntensity() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return param_block->getLinearColor().mV[3]; @@ -3347,7 +3365,7 @@ F32 LLVOVolume::getLightIntensity() const F32 LLVOVolume::getLightRadius() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return param_block->getRadius(); @@ -3360,7 +3378,7 @@ F32 LLVOVolume::getLightRadius() const F32 LLVOVolume::getLightFalloff(const F32 fudge_factor) const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return param_block->getFalloff() * fudge_factor; @@ -3373,7 +3391,7 @@ F32 LLVOVolume::getLightFalloff(const F32 fudge_factor) const F32 LLVOVolume::getLightCutoff() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + const LLLightParams *param_block = getLightParams(); if (param_block) { return param_block->getCutoff(); @@ -3386,7 +3404,7 @@ F32 LLVOVolume::getLightCutoff() const bool LLVOVolume::isReflectionProbe() const { - return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE); + return getReflectionProbeParams() != nullptr; } bool LLVOVolume::setIsReflectionProbe(bool is_probe) @@ -3411,7 +3429,7 @@ bool LLVOVolume::setIsReflectionProbe(bool is_probe) bool LLVOVolume::setReflectionProbeAmbiance(F32 ambiance) { - LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { if (param_block->getAmbiance() != ambiance) @@ -3427,7 +3445,7 @@ bool LLVOVolume::setReflectionProbeAmbiance(F32 ambiance) bool LLVOVolume::setReflectionProbeNearClip(F32 near_clip) { - LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { if (param_block->getClipDistance() != near_clip) @@ -3443,7 +3461,7 @@ bool LLVOVolume::setReflectionProbeNearClip(F32 near_clip) bool LLVOVolume::setReflectionProbeIsBox(bool is_box) { - LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { if (param_block->getIsBox() != is_box) @@ -3459,7 +3477,7 @@ bool LLVOVolume::setReflectionProbeIsBox(bool is_box) bool LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic) { - LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { if (param_block->getIsDynamic() != is_dynamic) @@ -3475,7 +3493,7 @@ bool LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic) bool LLVOVolume::setReflectionProbeIsMirror(bool is_mirror) { - LLReflectionProbeParams *param_block = (LLReflectionProbeParams *) getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { if (param_block->getIsMirror() != is_mirror) @@ -3498,7 +3516,7 @@ bool LLVOVolume::setReflectionProbeIsMirror(bool is_mirror) F32 LLVOVolume::getReflectionProbeAmbiance() const { - const LLReflectionProbeParams* param_block = (const LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + const LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { return param_block->getAmbiance(); @@ -3511,7 +3529,7 @@ F32 LLVOVolume::getReflectionProbeAmbiance() const F32 LLVOVolume::getReflectionProbeNearClip() const { - const LLReflectionProbeParams* param_block = (const LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + const LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { return param_block->getClipDistance(); @@ -3524,7 +3542,7 @@ F32 LLVOVolume::getReflectionProbeNearClip() const bool LLVOVolume::getReflectionProbeIsBox() const { - const LLReflectionProbeParams* param_block = (const LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + const LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { return param_block->getIsBox(); @@ -3535,7 +3553,7 @@ bool LLVOVolume::getReflectionProbeIsBox() const bool LLVOVolume::getReflectionProbeIsDynamic() const { - const LLReflectionProbeParams* param_block = (const LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + const LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { return param_block->getIsDynamic(); @@ -3546,8 +3564,7 @@ bool LLVOVolume::getReflectionProbeIsDynamic() const bool LLVOVolume::getReflectionProbeIsMirror() const { - const LLReflectionProbeParams *param_block = - (const LLReflectionProbeParams *) getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE); + const LLReflectionProbeParams* param_block = getReflectionProbeParams(); if (param_block) { return param_block->getIsMirror(); @@ -3568,7 +3585,7 @@ U32 LLVOVolume::getVolumeInterfaceID() const bool LLVOVolume::isFlexible() const { - if (getParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE)) + if (getFlexibleObjectData()) { LLVolume* volume = getVolume(); if (volume && volume->getParams().getPathParams().getCurveType() != LL_PCODE_PATH_FLEXIBLE) @@ -3587,7 +3604,7 @@ bool LLVOVolume::isFlexible() const bool LLVOVolume::isSculpted() const { - if (getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) + if (getSculptParams()) { return true; } @@ -3599,7 +3616,7 @@ bool LLVOVolume::isMesh() const { if (isSculpted()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + const LLSculptParams *sculpt_params = getSculptParams(); if (sculpt_params) { U8 sculpt_type = sculpt_params->getSculptType(); @@ -3617,7 +3634,7 @@ bool LLVOVolume::isMesh() const bool LLVOVolume::hasLightTexture() const { - if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) + if (getLightImageParams()) { return true; } @@ -3737,8 +3754,7 @@ bool LLVOVolume::isRiggedMesh() const //---------------------------------------------------------------------------- U32 LLVOVolume::getExtendedMeshFlags() const { - const LLExtendedMeshParams *param_block = - (const LLExtendedMeshParams *)getParameterEntry(LLNetworkData::PARAMS_EXTENDED_MESH); + const LLExtendedMeshParams *param_block = getExtendedMeshParams(); if (param_block) { return param_block->getFlags(); @@ -3783,8 +3799,7 @@ void LLVOVolume::setExtendedMeshFlags(U32 flags) { bool in_use = true; setParameterEntryInUse(LLNetworkData::PARAMS_EXTENDED_MESH, in_use, true); - LLExtendedMeshParams *param_block = - (LLExtendedMeshParams *)getParameterEntry(LLNetworkData::PARAMS_EXTENDED_MESH); + LLExtendedMeshParams *param_block = (LLExtendedMeshParams *)getExtendedMeshParams(); if (param_block) { param_block->setFlags(flags); @@ -3842,11 +3857,12 @@ void LLVOVolume::onReparent(LLViewerObject *old_parent, LLViewerObject *new_pare } if (old_volp && old_volp->isAnimatedObject()) { - if (old_volp->getControlAvatar()) + LLControlAvatar* cav = old_volp->getControlAvatar(); + if (cav) { // We have been removed from an animated object, need to do cleanup. - old_volp->getControlAvatar()->updateAttachmentOverrides(); - old_volp->getControlAvatar()->updateAnimations(); + cav->updateAttachmentOverrides(); + cav->updateAnimations(); } } } @@ -5131,7 +5147,7 @@ U32 LLVOVolume::getPartitionType() const { return LLViewerRegion::PARTITION_HUD; } - if (isAnimatedObject() && getControlAvatar()) + if (isAnimatedObjectFast() && getControlAvatar()) { return LLViewerRegion::PARTITION_CONTROL_AV; } @@ -5757,11 +5773,18 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } // Standard rigged mesh attachments: - bool rigged = !vobj->isAnimatedObject() && skinInfo && vobj->isAttachment(); + bool is_animated = vobj->isAnimatedObject(); + bool rigged = !is_animated && skinInfo && vobj->isAttachment(); // Animated objects. Have to check for isRiggedMesh() to // exclude static objects in animated object linksets. - rigged = rigged || (vobj->isAnimatedObject() && vobj->isRiggedMesh() && - vobj->getControlAvatar() && vobj->getControlAvatar()->mPlaying); + if (!rigged && is_animated && vobj->isRiggedMesh()) + { + LLControlAvatar* cav = vobj->getControlAvatar(); + if (cav) + { + rigged = cav->mPlaying; + } + } bool any_rigged_face = false; @@ -5910,6 +5933,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } else { + static LLCachedControl<bool> render_reflection_object(gSavedSettings, "RenderReflectionProbeShowTransparent", false); F32 alpha; if (is_pbr) { @@ -5924,7 +5948,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) drawablep->setState(LLDrawable::HAS_ALPHA); add_face(sAlphaFaces, alpha_count, facep); } - else if (LLDrawPoolAlpha::sShowDebugAlpha || + else if ((LLDrawPoolAlpha::sShowDebugAlpha && (render_reflection_object || !vobj->isReflectionProbe())) || (gPipeline.sRenderHighlight && !drawablep->getParent() && //only root objects are highlighted with red color in this case drawablep->getVObj() && drawablep->getVObj()->flagScripted() && diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 97a5131260..b6044bc319 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -227,6 +227,7 @@ public: void setTexture(const S32 face); S32 getIndexInTex(U32 ch) const {return mIndexInTex[ch];} + void unregisterOldMeshAndSkin(); /*virtual*/ bool setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false) override; void updateSculptTexture(); void setIndexInTex(U32 ch, S32 index) { mIndexInTex[ch] = index ;} @@ -283,9 +284,9 @@ public: // Get the light color in sRGB color space scaled by intensity. LLColor3 getLightSRGBColor() const; - LLUUID getLightTextureID() const; + const LLUUID& getLightTextureID() const; bool isLightSpotlight() const; - LLVector3 getSpotLightParams() const; + const LLVector3& getSpotLightParams() const; void updateSpotLightPriority(); F32 getSpotLightPriority() const; diff --git a/indra/newview/llvvmquery.cpp b/indra/newview/llvvmquery.cpp new file mode 100644 index 0000000000..12dcc1d04d --- /dev/null +++ b/indra/newview/llvvmquery.cpp @@ -0,0 +1,189 @@ +/** + * @file llvvmquery.cpp + * @brief Query the Viewer Version Manager (VVM) for update information + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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 "llvvmquery.h" + +#include "llcorehttputil.h" +#include "llcoros.h" +#include "llevents.h" +#include "llviewernetwork.h" +#include "llversioninfo.h" +#include "llviewercontrol.h" +#include "llhasheduniqueid.h" +#include "lluri.h" +#include "llsys.h" + +#if LL_VELOPACK +#include "llvelopack.h" +#endif + +namespace +{ + std::string get_platform_string() + { +#if LL_WINDOWS + return "win64"; +#elif LL_DARWIN + return "mac64"; +#elif LL_LINUX + return "lnx64"; +#else + return "unknown"; +#endif + } + + std::string get_platform_version() + { + return LLOSInfo::instance().getOSVersionString(); + } + + std::string get_machine_id() + { + unsigned char id[MD5HEX_STR_SIZE]; + if (llHashedUniqueID(id)) + { + return std::string(reinterpret_cast<char*>(id)); + } + return "unknown"; + } + + void query_vvm_coro() + { + // Get base URL from grid manager + std::string base_url = LLGridManager::getInstance()->getUpdateServiceURL(); + + // We use this for dev testing when working with VVM and working on the updater. Not advisable to uncomment it. + //std::string base_url = "https://update.qa.secondlife.io/update"; + + if (base_url.empty()) + { + LL_WARNS("VVM") << "No update service URL configured" << LL_ENDL; + return; + } + + // Gather parameters for VVM query + std::string channel = LLVersionInfo::instance().getChannel(); + + // We use this for dev testing when working with VVM and working on the updater. Not advisable to uncomment it. + // std::string channel = "QA Target for Velopack"; + + std::string version = LLVersionInfo::instance().getVersion(); + std::string platform = get_platform_string(); + std::string platform_version = get_platform_version(); + std::string test_ok = gSavedSettings.getBOOL("UpdaterWillingToTest") ? "testok" : "testno"; + std::string machine_id = get_machine_id(); + + // Build URL: {base}/v1.2/{channel}/{version}/{platform}/{platform_version}/{testok}/{uuid} + std::string url = base_url + "/v1.2/" + + LLURI::escape(channel) + "/" + + LLURI::escape(version) + "/" + + platform + "/" + + LLURI::escape(platform_version) + "/" + + test_ok + "/" + + machine_id; + + LL_INFOS("VVM") << "Querying VVM: " << url << LL_ENDL; + + // Make HTTP GET request + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter = + std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VVMQuery", httpPolicy); + LLCore::HttpRequest::ptr_t request = std::make_shared<LLCore::HttpRequest>(); + + LLSD result = adapter->getAndSuspend(request, url); + + // Check HTTP status + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + + if (!status) + { + if (status.getType() == 404) + { + LL_INFOS("VVM") << "Unmanaged channel, no updates available" << LL_ENDL; + return; + } + LL_WARNS("VVM") << "VVM query failed: " << status.toString() << LL_ENDL; + return; + } + + // Read whether this update is required or optional + bool update_required = result["required"].asBoolean(); + std::string relnotes = result["more_info"].asString(); + + // Extract update URL for current platform + LLSD platforms = result["platforms"]; + if (platforms.has(platform)) + { + std::string update_url = platforms[platform]["url"].asString(); +#if LL_VELOPACK + std::string velopack_url = platforms[platform]["velopack_url"].asString(); + U32 updater_service = gSavedSettings.getU32("UpdaterServiceSetting"); + std::string required_version = update_required ? result["version"].asString() : ""; + // Skip network check if no required version AND user only wants mandatory updates + if (!velopack_url.empty() && (update_required || updater_service != 0)) + { + LL_INFOS("VVM") << "Velopack feed URL: " << velopack_url + << " required_version: " << required_version << LL_ENDL; + velopack_set_update_url(velopack_url); + + LLCoros::instance().launch("VelopackUpdateCheck", + [required_version, relnotes]() + { + velopack_check_for_updates(required_version, relnotes); + }); + } + else if (!velopack_url.empty()) + { + LL_INFOS("VVM") << "Optional update skipped (UpdaterServiceSetting=0)" << LL_ENDL; + } + else +#endif + if (!update_url.empty()) + { + LL_INFOS("VVM") << "Update available at: " << update_url << LL_ENDL; + } + } + else + { + LL_INFOS("VVM") << "No update available for platform: " << platform << LL_ENDL; + } + + // Post release notes URL to the relnotes event pump + if (!relnotes.empty()) + { + LL_INFOS("VVM") << "Release notes URL: " << relnotes << LL_ENDL; + LLEventPumps::instance().obtain("relnotes").post(relnotes); + } + } +} + +void initVVMUpdateCheck() +{ + LL_INFOS("VVM") << "Initializing VVM update check" << LL_ENDL; + LLCoros::instance().launch("VVMUpdateCheck", &query_vvm_coro); +} diff --git a/indra/newview/llvvmquery.h b/indra/newview/llvvmquery.h new file mode 100644 index 0000000000..977d82af64 --- /dev/null +++ b/indra/newview/llvvmquery.h @@ -0,0 +1,42 @@ +/** + * @file llvvmquery.h + * @brief Query the Viewer Version Manager (VVM) for update information + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, 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_LLVVMQUERY_H +#define LL_LLVVMQUERY_H + +/** + * Initialize the VVM update check. + * + * This launches a coroutine that queries the Viewer Version Manager (VVM) + * to check for available updates. If an update is available, it configures + * Velopack with the update URL and initiates the update check/download. + * + * The release notes URL from the VVM response is posted to the "relnotes" + * event pump for display. + */ +void initVVMUpdateCheck(); + +#endif // LL_LLVVMQUERY_H diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index cc593fe7b4..f639024228 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -82,7 +82,7 @@ LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item, co ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelWearableOutfitItem(&typeid(LLPanelWearableOutfitItem::Params), "wearable_outfit_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelWearableOutfitItem(typeid(LLPanelWearableOutfitItem::Params), "wearable_outfit_list_item"); LLPanelWearableOutfitItem::Params::Params() : add_btn("add_btn"), @@ -222,7 +222,7 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelClothingListItem(&typeid(LLPanelClothingListItem::Params), "clothing_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelClothingListItem(typeid(LLPanelClothingListItem::Params), "clothing_list_item"); LLPanelClothingListItem::Params::Params() @@ -309,7 +309,7 @@ bool LLPanelClothingListItem::postBuild() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelBodyPartsListItem(&typeid(LLPanelBodyPartsListItem::Params), "bodyparts_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelBodyPartsListItem(typeid(LLPanelBodyPartsListItem::Params), "bodyparts_list_item"); LLPanelBodyPartsListItem::Params::Params() @@ -380,7 +380,7 @@ bool LLPanelBodyPartsListItem::postBuild() return true; } -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); LLPanelDeletableWearableListItem::Params::Params() : delete_btn("delete_btn") @@ -467,7 +467,7 @@ void LLPanelAttachmentListItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDummyClothingListItem(&typeid(LLPanelDummyClothingListItem::Params), "dummy_clothing_list_item"); +static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDummyClothingListItem(typeid(LLPanelDummyClothingListItem::Params), "dummy_clothing_list_item"); LLPanelDummyClothingListItem::Params::Params() : add_panel("add_panel"), diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index a319aa00bc..f603274335 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -34,6 +34,7 @@ #include "llagent.h" #include "llappviewer.h" +#include "llfloatermarketplace.h" #include "llfloaterwebcontent.h" #include "llfloaterreg.h" #include "lllogininstance.h" @@ -74,12 +75,20 @@ void LLWeb::loadURL(const std::string& url, const std::string& target, const std } // static -// Explicitly open a Web URL using the Web content floater +// Explicitly open a Web URL using the Web content floater or Marketplace floater void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid, bool dev_mode) { LLFloaterWebContent::Params p; p.url(url).target(target).id(uuid).dev_mode(dev_mode); - LLFloaterReg::showInstance("web_content", p); + + if (LLFloaterMarketplace::isMarketplaceURL(url)) + { + LLFloaterReg::showInstance("marketplace", p); + } + else + { + LLFloaterReg::showInstance("web_content", p); + } } // static diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 4528ad012d..132cbf4fcd 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -83,7 +83,7 @@ void LLWebProfile::setAuthCookie(const std::string& cookie) /*static*/ LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders() { - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>(); LLSD headers = LLViewerMedia::getInstance()->getHeaders(); for (LLSD::map_iterator it = headers.beginMap(); it != headers.endMap(); ++it) @@ -100,9 +100,9 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("uploadImageCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>(); LLCore::HttpHeaders::ptr_t httpHeaders; if (dynamic_cast<LLImagePNG*>(image.get()) == 0) diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h index a9cfa102c0..5b3f3f2ce1 100644 --- a/indra/newview/llwebprofile.h +++ b/indra/newview/llwebprofile.h @@ -51,7 +51,7 @@ class LLWebProfile LOG_CLASS(LLWebProfile); public: - typedef boost::function<void(bool ok)> status_callback_t; + typedef std::function<void(bool ok)> status_callback_t; static void uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location); static void setAuthCookie(const std::string& cookie); diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp index ebcdd537a5..38e49d0750 100644 --- a/indra/newview/llwindowlistener.cpp +++ b/indra/newview/llwindowlistener.cpp @@ -41,9 +41,11 @@ #include "llrootview.h" #include "llsdutil.h" #include "stringize.h" +#include "llclipboard.h" +#include "lleditmenuhandler.h" +#include <functional> #include <typeinfo> #include <map> -#include <boost/bind.hpp> LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter) : LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"), @@ -54,7 +56,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& "Given [\"keysym\"], [\"keycode\"] or [\"char\"], inject the specified "; std::string keyExplain = "(integer keycode values, or keysym string from any addKeyName() call in\n" - "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llwindow/llkeyboard.cpp )\n"; + "https://github.com/secondlife/viewer/blob/develop/indra/llwindow/llkeyboard.cpp )\n"; std::string mask = "Specify optional [\"mask\"] as an array containing any of \"CTL\", \"ALT\",\n" "\"SHIFT\" or \"MAC_CONTROL\"; the corresponding modifier bits will be combined\n" @@ -69,7 +71,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& "(button values \"LEFT\", \"MIDDLE\", \"RIGHT\")\n"; std::string paramsExplain = "[\"path\"] is as for LLUI::getInstance()->resolvePath(), described in\n" - "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llui/llui.h\n" + "https://github.com/secondlife/viewer/blob/develop/indra/llui/llui.h\n" "If you omit [\"path\"], you must specify both [\"x\"] and [\"y\"].\n" "If you specify [\"path\"] without both [\"x\"] and [\"y\"], will synthesize (x, y)\n" "in the center of the LLView selected by [\"path\"].\n" @@ -89,7 +91,8 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& &LLWindowListener::getPaths, LLSDMap("reply", LLSD())); add("keyDown", - keySomething + "keypress event.\n" + keyExplain + mask, + keySomething + "keypress event.\n" + keyExplain + + "The [\"char\"] parameter detects and handles non-ASCII characters seperately\n" + mask, &LLWindowListener::keyDown); add("keyUp", keySomething + "key release event.\n" + keyExplain + mask, @@ -107,6 +110,10 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& "Given an integer number of [\"clicks\"], inject the requested mouse scroll event.\n" "(positive clicks moves downward through typical content)", &LLWindowListener::mouseScroll); + add("pasteText", + "Paste specified [\"text\"] into the current edit field\n" + "Optional [\"path\"] specifies target UI element (must be focusable).", + &LLWindowListener::pasteText); } template <typename MAPPED> @@ -264,6 +271,20 @@ void LLWindowListener::keyDown(LLSD const & evt) KEY key = getKEY(evt); MASK mask = getMask(evt); + bool is_non_ascii = false; + llwchar uni_char = 0; + + if (evt.has("char")) + { + LLWString wstr = utf8str_to_wstring(evt["char"].asString()); + if (!wstr.empty()) + { + uni_char = wstr[0]; + // If the Unicode code point is outside ASCII range, use Unicode-only handling + is_non_ascii = (uni_char >= 0x80); + } + } + if (evt.has("path")) { std::string path(evt["path"]); @@ -278,8 +299,17 @@ void LLWindowListener::keyDown(LLSD const & evt) response.setResponse(target_view->getInfo()); gFocusMgr.setKeyboardFocus(target_view); - gViewerInput.handleKey(key, mask, false); - if(key < 0x80) mWindow->handleUnicodeChar(key, mask); + + if (is_non_ascii) + { + // For non-ASCII characters, only send the Unicode event + mWindow->handleUnicodeChar(uni_char, mask); + } + else + { + gViewerInput.handleKey(key, mask, false); + if(key < 0x80) mWindow->handleUnicodeChar(key, mask); + } } else { @@ -290,8 +320,16 @@ void LLWindowListener::keyDown(LLSD const & evt) } else { - gViewerInput.handleKey(key, mask, false); - if(key < 0x80) mWindow->handleUnicodeChar(key, mask); + if (is_non_ascii) + { + // For non-ASCII characters, only send the Unicode event + mWindow->handleUnicodeChar(uni_char, mask); + } + else + { + gViewerInput.handleKey(key, mask, false); + if(key < 0x80) mWindow->handleUnicodeChar(key, mask); + } } } @@ -352,7 +390,7 @@ struct WhichButton: public StringLookup<Actions> }; static WhichButton buttons; -typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc; +typedef std::function<bool(LLCoordGL, MASK)> MouseFunc; // Wrap a function returning 'void' to return 'true' instead. I'm sure there's // a more generic way to accomplish this, but generically handling the @@ -363,7 +401,7 @@ typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc; // seem to overload comma the same way; or at least not with bind().) class MouseFuncTrue { - typedef boost::function<void(LLCoordGL, MASK)> MouseFuncVoid; + typedef std::function<void(LLCoordGL, MASK)> MouseFuncVoid; MouseFuncVoid mFunc; public: @@ -463,9 +501,9 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request) // Instantiate a TemporaryDrilldownFunc to route incoming mouse events // to the target LLView*. But put it on the heap since "path" is - // optional. Nonetheless, manage it with a boost::scoped_ptr so it + // optional. Nonetheless, manage it with a std::unique_ptr so it // will be destroyed when we leave. - tempfunc.reset(new LLView::TemporaryDrilldownFunc(llview::TargetEvent(target))); + tempfunc = std::make_unique<LLView::TemporaryDrilldownFunc>(llview::TargetEvent(target)); } // The question of whether the requested LLView actually handled the @@ -484,11 +522,11 @@ void LLWindowListener::mouseDown(LLSD const & request) if (actions.valid) { // Normally you can pass NULL to an LLWindow* without compiler - // complaint, but going through boost::bind() evidently + // complaint, but going through std::bind() evidently // bypasses that special case: it only knows you're trying to pass an // int to a pointer. Explicitly cast NULL to the desired pointer type. - mouseEvent(boost::bind(actions.down, mWindow, - static_cast<LLWindow*>(NULL), _1, _2), + mouseEvent(std::bind(actions.down, mWindow, + static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2), request); } } @@ -498,8 +536,7 @@ void LLWindowListener::mouseUp(LLSD const & request) Actions actions(buttons.lookup(request["button"])); if (actions.valid) { - mouseEvent(boost::bind(actions.up, mWindow, - static_cast<LLWindow*>(NULL), _1, _2), + mouseEvent(std::bind(actions.up, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2), request); } } @@ -511,8 +548,8 @@ void LLWindowListener::mouseMove(LLSD const & request) // void, whereas mouseEvent() accepts a function returning bool -- and // uses that bool return. Use MouseFuncTrue to construct a callable that // returns bool anyway. - mouseEvent(MouseFuncTrue(boost::bind(&LLWindowCallbacks::handleMouseMove, mWindow, - static_cast<LLWindow*>(NULL), _1, _2)), + mouseEvent(MouseFuncTrue(std::bind(&LLWindowCallbacks::handleMouseMove, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1, + std::placeholders::_2)), request); } @@ -522,3 +559,60 @@ void LLWindowListener::mouseScroll(LLSD const & request) mWindow->handleScrollWheel(NULL, clicks); } + +void LLWindowListener::pasteText(LLSD const & evt) +{ + Response response(LLSD(), evt); + + if (!evt.has("text")) + { + response.error(STRINGIZE(evt["op"].asString() << " request did not provide required \"text\" parameter")); + return; + } + + std::string text_to_paste = evt["text"].asString(); + if (evt.has("path")) + { + std::string path(evt["path"]); + LLView* target_view = LLUI::getInstance()->resolvePath(LLUI::getInstance()->getRootView(), path); + if (!target_view) + { + response.error(STRINGIZE(evt["op"].asString() << " request specified invalid \"path\": " << path)); + return; + } + else if(!target_view->isAvailable()) + { + response.error(STRINGIZE("Target view specified by \"path\": " << path << " is not visible")); + return; + } + else + { + // Focus the target view + gFocusMgr.setKeyboardFocus(target_view); + } + } + + // Check if edit menu handler is available + if (!LLEditMenuHandler::gEditMenuHandler) + { + response.error(STRINGIZE(evt["op"].asString() << " request failed: no edit menu handler available")); + return; + } + + // Save current clipboard contents + LLWString saved_clipboard; + LLClipboard::instance().pasteFromClipboard(saved_clipboard); + + LLClipboard::instance().copyToClipboard(utf8str_to_wstring(text_to_paste), 0, static_cast<S32>(text_to_paste.size())); + LLEditMenuHandler::gEditMenuHandler->paste(); + + // Restore original clipboard contents if there were any + if (!saved_clipboard.empty()) + { + LLClipboard::instance().copyToClipboard(saved_clipboard, 0, static_cast<S32>(saved_clipboard.size())); + } + else + { + LLClipboard::instance().reset(); + } +} diff --git a/indra/newview/llwindowlistener.h b/indra/newview/llwindowlistener.h index 207f64c8c0..d3a16cfde9 100644 --- a/indra/newview/llwindowlistener.h +++ b/indra/newview/llwindowlistener.h @@ -28,7 +28,7 @@ #define LL_LLWINDOWLISTENER_H #include "lleventapi.h" -#include <boost/function.hpp> +#include <functional> class LLKeyboard; class LLViewerWindow; @@ -36,7 +36,7 @@ class LLViewerWindow; class LLWindowListener : public LLEventAPI { public: - typedef boost::function<LLKeyboard*()> KeyboardGetter; + typedef std::function<LLKeyboard*()> KeyboardGetter; LLWindowListener(LLViewerWindow * window, const KeyboardGetter& kbgetter); void getInfo(LLSD const & evt); @@ -47,6 +47,7 @@ public: void mouseUp(LLSD const & evt); void mouseMove(LLSD const & evt); void mouseScroll(LLSD const & evt); + void pasteText(LLSD const & evt); private: LLViewerWindow * mWindow; diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 4e3a7a8788..aabcb2e514 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -101,8 +101,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url, LLEnvironment LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); S32 requestId = ++LLEnvironmentRequest::sLastRequest; LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -193,8 +193,8 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLE { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentApply", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentApply", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>(); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, content); diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 153bee3aef..1db36649fa 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -118,6 +118,7 @@ LLVector3d LLSimInfo::getGlobalOrigin() const { return from_region_handle(mHandle); } + LLVector3 LLSimInfo::getLocalPos(LLVector3d global_pos) const { LLVector3d sim_origin = from_region_handle(mHandle); diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index aab19a4d5f..91bc699708 100644 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -28,7 +28,6 @@ #define LL_LLWORLDMAP_H #include "llworldmipmap.h" -#include <boost/function.hpp> #include "v3dmath.h" #include "lluuid.h" @@ -38,18 +37,6 @@ #include "llviewertexture.h" #include "llgltexture.h" -// map item types -const U32 MAP_ITEM_TELEHUB = 0x01; -const U32 MAP_ITEM_PG_EVENT = 0x02; -const U32 MAP_ITEM_MATURE_EVENT = 0x03; -//const U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW -//const U32 MAP_ITEM_AGENT_COUNT = 0x05; -const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06; -const U32 MAP_ITEM_LAND_FOR_SALE = 0x07; -const U32 MAP_ITEM_CLASSIFIED = 0x08; -const U32 MAP_ITEM_ADULT_EVENT = 0x09; -const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a; - // Description of objects like hubs, events, land for sale, people and more (TBD). // Note: we don't store a "type" in there so we need to store instances of this class in // well known objects (i.e. list of objects which type is "well known"). diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index c60d075e0c..3264f8ae8b 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -33,7 +33,7 @@ #include "llagent.h" #include "llfloaterworldmap.h" -const U32 LAYER_FLAG = 2; +constexpr U32 LAYER_FLAG = 2; //--------------------------------------------------------------------------- // World Map Message Handling @@ -43,7 +43,7 @@ LLWorldMapMessage::LLWorldMapMessage() : mSLURLRegionName(), mSLURLRegionHandle(0), mSLURL(), - mSLURLCallback(0), + mSLURLCallback(nullptr), mSLURLTeleport(false) { } @@ -135,7 +135,11 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); U32 flags = LAYER_FLAG; - flags |= (return_nonexistent ? 0x10000 : 0); + if (return_nonexistent) + { + // overwrite LAYER_FLAG, otherwise server won't respond to missing regions + flags = MAP_SIM_RETURN_NULL_SIMS; + } msg->addU32Fast(_PREHASH_Flags, flags); msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim @@ -157,15 +161,17 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) U32 agent_flags; msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags); - // There's only one flag that we ever use here - if (agent_flags != LAYER_FLAG) + S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data); + + // There's only one flag that we ever use here, unless we also want an existence check. + if (agent_flags != LAYER_FLAG + && num_blocks != 1) // we check existence for a single region { LL_WARNS() << "Invalid map image type returned! layer = " << agent_flags << LL_ENDL; return; } - S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data); - //LL_INFOS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL; + LL_DEBUGS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL; bool found_null_sim = false; @@ -191,38 +197,43 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS; U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS; - // name shouldn't be empty, see EXT-4568 - llassert(!name.empty()); - - // Insert that region in the world map, if failure, flag it as a "null_sim" - if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags))) + // Name shouldn't be empty unless region doesn't exist + if (!name.empty()) { - found_null_sim = true; - } + // Insert that region in the world map, if failure, flag it as a "null_sim" + if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags))) + { + found_null_sim = true; + } - // If we hit a valid tracking location, do what needs to be done app level wise - if (LLWorldMap::getInstance()->isTrackingValidLocation()) - { - LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal(); - if (LLWorldMap::getInstance()->isTrackingDoubleClick()) + // If we hit a valid tracking location, do what needs to be done app level wise + if (LLWorldMap::getInstance()->isTrackingValidLocation()) { - // Teleport if the user double clicked - gAgent.teleportViaLocation(pos_global); + LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal(); + if (LLWorldMap::getInstance()->isTrackingDoubleClick()) + { + // Teleport if the user double clicked + gAgent.teleportViaLocation(pos_global); + } + // Update the "real" tracker information + gFloaterWorldMap->trackLocation(pos_global); } - // Update the "real" tracker information - gFloaterWorldMap->trackLocation(pos_global); + } + else + { + found_null_sim = true; } // Handle the SLURL callback if any url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback; - if(callback != NULL) + if (callback != nullptr) { U64 handle = to_region_handle(x_world, y_world); // Check if we reached the requested region if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0) || (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle)) { - LLWorldMapMessage::getInstance()->mSLURLCallback = NULL; + LLWorldMapMessage::getInstance()->mSLURLCallback = nullptr; LLWorldMapMessage::getInstance()->mSLURLRegionName.clear(); LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0; diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h index 357d31ccc1..87ae935bb9 100644 --- a/indra/newview/llworldmapmessage.h +++ b/indra/newview/llworldmapmessage.h @@ -27,7 +27,7 @@ #ifndef LL_LLWORLDMAPMESSAGE_H #define LL_LLWORLDMAPMESSAGE_H -#include "boost/function.hpp" +#include <functional> // Handling of messages (send and process) as well as SLURL callback if necessary class LLMessageSystem; @@ -38,7 +38,7 @@ class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage> ~LLWorldMapMessage(); public: - typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)> + typedef std::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)> url_callback_t; // Process incoming answers to map stuff requests diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 6b2bd3e6fb..1be6a6cfff 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -517,26 +517,38 @@ void LLWorldMapView::draw() // Draw the region name in the lower left corner if (mMapScale >= DRAW_TEXT_THRESHOLD) { - std::string mesg; + static LLCachedControl<bool> print_coords(gSavedSettings, "MapShowGridCoords"); + static LLFontGL* font = LLFontGL::getFontSansSerifSmallBold(); + + auto print = [&](std::string text, F32 x, F32 y, bool use_ellipses) + { + font->renderUTF8(text, 0, + (F32)llfloor(left + x), (F32)llfloor(bottom + y), + LLColor4::white, + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, + S32_MAX, //max_chars + (S32)mMapScale, //max_pixels + NULL, + use_ellipses); + }; + + std::string grid_name = info->getName(); if (info->isDown()) { - mesg = llformat( "%s (%s)", info->getName().c_str(), sStringsMap["offline"].c_str()); + grid_name += " (" + sStringsMap["offline"] + ")"; } - else + + if (print_coords) { - mesg = info->getName(); + print(grid_name, 3, 14, true); + // Obtain and print the grid map coordinates + LLVector3d region_pos = info->getGlobalOrigin(); + std::string grid_coords = llformat("[%.0f, %.0f]", region_pos[VX] / 256, region_pos[VY] / 256); + print(grid_coords, 3, 2, false); } - if (!mesg.empty()) + else { - LLFontGL::getFontSansSerifSmallBold()->renderUTF8( - mesg, 0, - (F32)llfloor(left + 3), (F32)llfloor(bottom + 2), - LLColor4::white, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, - S32_MAX, //max_chars - (S32)mMapScale, //max_pixels - NULL, - /*use_ellipses*/true); + print(grid_name, 3, 2, true); } } } diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 92e6c88752..758615a730 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -241,7 +241,7 @@ public: } LLSD http_params = command.get("http_params"); - mTransaction.reset(new LLXMLRPCTransaction(mUri, mMethod, request_params, http_params)); + mTransaction = std::make_unique<LLXMLRPCTransaction>(mUri, mMethod, request_params, http_params); mPreviousStatus = mTransaction->status(NULL); // Now ensure that we get regular callbacks to poll for completion. diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 7fbcb5fc04..7b0bf6f251 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -50,13 +50,6 @@ #include "llappviewer.h" #include "lltrans.h" -#include "boost/move/unique_ptr.hpp" - -namespace boost -{ - using ::boost::movelib::unique_ptr; // move unique_ptr into the boost namespace. -} - // Static instance of LLXMLRPCListener declared here so that every time we // bring in this code, we instantiate a listener. If we put the static // instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would @@ -194,11 +187,11 @@ LLXMLRPCTransaction::Impl::Impl if (!mHttpRequest) { - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest); + mHttpRequest = std::make_shared<LLCore::HttpRequest>(); } // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer - httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + httpOpts = std::make_shared<LLCore::HttpOptions>(); // Delay between repeats will start from 5 sec and grow to 20 sec with each repeat httpOpts->setMinBackoff((LLCore::HttpTime)5E6L); @@ -221,7 +214,7 @@ LLXMLRPCTransaction::Impl::Impl httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0); // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer - httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); + httpHeaders = std::make_shared<LLCore::HttpHeaders>(); httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); @@ -244,7 +237,7 @@ LLXMLRPCTransaction::Impl::Impl body->append(request.c_str(), request.size()); - mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler(mHttpRequest, this)); + mHandler = std::make_shared<Handler>(mHttpRequest, this); mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID, mURI, body.get(), httpOpts, httpHeaders, mHandler); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1415e40ed8..86f7a08233 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -218,6 +218,7 @@ S32 LLPipeline::RenderBufferVisualization; bool LLPipeline::RenderMirrors; S32 LLPipeline::RenderHeroProbeUpdateRate; S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier; +bool LLPipeline::RenderAvatarCloth; LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize"); const U32 LLPipeline::MAX_PREVIEW_WIDTH = 512; @@ -615,6 +616,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderMirrors"); connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate"); connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier"); + connectRefreshCachedSettingsSafe("RenderAvatarCloth"); LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers"); if (cntrl_ptr.notNull()) @@ -1192,6 +1194,7 @@ void LLPipeline::refreshCachedSettings() RenderMirrors = gSavedSettings.getBOOL("RenderMirrors"); RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate"); RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier"); + RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth"); sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled"); RenderSpotLight = nullptr; @@ -2808,6 +2811,10 @@ void LLPipeline::clearRebuildGroups() { LLSpatialGroup* group = *iter; + if (!group || group->isDead()) + { + continue; + } // If the group contains HUD objects, save the group if (group->isHUDGroup()) { @@ -3030,7 +3037,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - if (!drawablep || drawablep->isDead()) + if (!drawablep || drawablep->isDead() || !drawablep->getVObj()) { return; } @@ -3064,7 +3071,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) iter != mShiftList.end(); iter++) { LLDrawable *drawablep = *iter; - if (drawablep->isDead()) + if (drawablep->isDead() || !drawablep->getVObj()) { continue; } @@ -5690,7 +5697,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_ if (light->mDrawable.notNull() && light->mDrawable->isState(LLDrawable::ACTIVE)) { // moving lights get a little higher priority (too much causes artifacts) - dist = llmax(dist - light->getLightRadius()*0.25f, 0.f); + dist = llmax(dist - radius * 0.25f, 0.f); } return dist; } @@ -8757,34 +8764,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ bindReflectionProbes(shader); - if (gAtmosphere) - { - // bind precomputed textures necessary for calculating sun and sky luminance - channel = shader.enableTexture(LLShaderMgr::TRANSMITTANCE_TEX, LLTexUnit::TT_TEXTURE); - if (channel > -1) - { - shader.bindTexture(LLShaderMgr::TRANSMITTANCE_TEX, gAtmosphere->getTransmittance()); - } - - channel = shader.enableTexture(LLShaderMgr::SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D); - if (channel > -1) - { - shader.bindTexture(LLShaderMgr::SCATTER_TEX, gAtmosphere->getScattering()); - } - - channel = shader.enableTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D); - if (channel > -1) - { - shader.bindTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, gAtmosphere->getMieScattering()); - } - - channel = shader.enableTexture(LLShaderMgr::ILLUMINANCE_TEX, LLTexUnit::TT_TEXTURE); - if (channel > -1) - { - shader.bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance()); - } - } - /*if (gCubeSnapshot) { // we only really care about the first two values, but the shader needs increasing separation between clip planes shader.uniform4f(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1.f, 64.f, 128.f, 256.f); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 41e428fce9..60804eee9e 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -1105,6 +1105,7 @@ public: static bool RenderMirrors; static S32 RenderHeroProbeUpdateRate; static S32 RenderHeroProbeConservativeUpdateMultiplier; + static bool RenderAvatarCloth; }; void render_bbox(const LLVector3 &min, const LLVector3 &max); diff --git a/indra/newview/skins/classic/colors.xml b/indra/newview/skins/classic/colors.xml new file mode 100644 index 0000000000..699b727212 --- /dev/null +++ b/indra/newview/skins/classic/colors.xml @@ -0,0 +1,1022 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<colors> + + <!-- Named Colors --> + <color + name="EmphasisColor" + value="0.25 0.48 0.70 1" /> + <color + name="EmphasisColor_13" + value="0.25 0.48 0.70 0.13" /> + <color + name="EmphasisColor_35" + value="0.25 0.48 0.70 0.35" /> + <color + name="BeaconColor" + value="0.749 0.298 0 1" /> + <color + name="White" + value="1 1 1 1" /> + <color + name="White_05" + value="1 1 1 0.05" /> + <color + name="White_10" + value="1 1 1 0.1" /> + <color + name="White_25" + value="1 1 1 0.25" /> + <color + name="White_50" + value="1 1 1 0.5" /> + <color + name="LtGray" + value="0.75 0.75 0.75 1" /> + <color + name="LtGray_35" + value="0.75 0.75 0.75 0.35" /> + <color + name="LtGray_50" + value="0.75 0.75 0.75 0.50" /> + <color + name="Gray" + value="0.5 0.5 0.5 1" /> + <color + name="DkGray0" + value="0.27 0.27 0.27 1" /> + <color + name="DkGray" + value="0.125 0.125 0.125 1" /> + <color + name="DkGray_66" + value="0.125 0.125 0.125 .66" /> + <color + name="DkGray2" + value="0.169 0.169 0.169 1" /> + <color + name="MouseGray" + value="0.191 0.191 0.191 1" /> + <color + name="Black" + value="0 0 0 1" /> + <color + name="Black_10" + value="0 0 0 0.1" /> + <color + name="Black_25" + value="0 0 0 0.25" /> + <color + name="Black_50" + value="0 0 0 0.5" /> + <color + name="FrogGreen" + value="0.26 0.33 0.42 1" /> + <!-- ^(Not actually green) --> + <color + name="Red" + value="1 0 0 1" /> + <color + name="Blue" + value="0 0 1 1" /> + <color + name="Yellow" + value="1 1 0 1" /> + <color + name="Green" + value="0 1 0 1" /> + <color + name="Transparent" + value="0 0 0 0" /> + <color + name="Purple" + value="1 0 1 1" /> + <color + name="Lime" + value=".8 1 .73 1" /> + <color + name="LtYellow" + value="1 1 .79 1" /> + <color + name="DrYellow" + value="1 0.86 0 1" /> + <color + name="LtOrange" + value="1 .85 .73 1" /> + <color + name="MdBlue" + value=".07 .38 .51 1" /> + <color + name="DkBlue" + value=".06 .06 .3 1" /> + <color + name="LtRed" + value="1 0.2 0.2 1" /> + <color + name="LtGreen" + value="0.2 1 0.2 1" /> + <color + name="Red_80" + value="1 0 0 0.8" /> + <color + name="DkRed" + value="0.3 0.06 0.06 1" /> + <color + name="Green_80" + value="0 1 0 0.8" /> + <color + name="Blue_80" + value="0 0 1 0.8" /> + <color + name="Orange" + value="1 .82 .46 1" /> + + <!-- This color name makes potentially unused colors show up bright purple. + Leave this here until all Unused? are removed below, otherwise + the viewer generates many warnings on startup. --> + <color + name="Unused?" + value=".831 1 0 1" /> + + <!-- UI Definitions --> + + <color + name="AccordionHeaderTextColor" + reference="LtGray" /> + <color + name="AgentChatColor" + reference="White" /> + <color + name="AlertBoxColor" + value="0.24 0.24 0.24 1" /> + <color + name="AlertCautionBoxColor" + value="1 0.82 0.46 1" /> + <color + name="AlertCautionTextColor" + reference="LtYellow" /> + <color + name="AvatarListItemIconDefaultColor" + reference="White" /> + <color + name="AvatarListItemIconOnlineColor" + reference="White" /> + <color + name="AvatarListItemIconOfflineColor" + value="0.5 0.5 0.5 0.5" /> + <color + name="AvatarListItemIconVoiceInvitedColor" + reference="AvatarListItemIconOfflineColor" /> + <color + name="AvatarListItemIconVoiceJoinedColor" + reference="AvatarListItemIconOnlineColor" /> + <color + name="AvatarListItemIconVoiceLeftColor" + reference="AvatarListItemIconOfflineColor" /> + <color + name="BadgeImageColor" + value="1.0 0.40 0.0 1.0" /> + <color + name="BadgeBorderColor" + value="0.9 0.9 0.9 1.0" /> + <color + name="BadgeLabelColor" + reference="White" /> + <color + name="ButtonBorderColor" + reference="Unused?" /> + <color + name="ButtonCautionImageColor" + reference="Unused?" /> + <color + name="ButtonColor" + reference="Unused?" /> + <color + name="ButtonFlashBgColor" + reference="Unused?" /> + <color + name="ButtonImageColor" + reference="White" /> + <color + name="ButtonLabelColor" + reference="LtGray" /> + <color + name="ButtonLabelDisabledColor" + reference="White_25" /> + <color + name="ButtonLabelSelectedColor" + reference="White" /> + <color + name="ButtonLabelSelectedDisabledColor" + reference="White_25" /> + <color + name="ButtonSelectedBgColor" + reference="Unused?" /> + <color + name="ButtonSelectedColor" + reference="Unused?" /> + <color + name="ButtonUnselectedBgColor" + reference="Unused?" /> + <color + name="ButtonUnselectedFgColor" + reference="Unused?" /> + <color + name="ChatHistoryBgColor" + reference="Transparent" /> + <color + name="ChatHistoryTextColor" + reference="LtGray" /> + <color + name="ChicletFlashColor" + value="0.114 0.65 0.1" /> + <color + name="ColorDropShadow" + reference="Black_50" /> + <color + name="ColorPaletteEntry01" + reference="Black" /> + <color + name="ColorPaletteEntry02" + reference="Gray" /> + <color + name="ColorPaletteEntry03" + value="0.5 0 0 1" /> + <color + name="ColorPaletteEntry04" + value="0.5 0.5 0 1" /> + <color + name="ColorPaletteEntry05" + value="0 0.5 0 1" /> + <color + name="ColorPaletteEntry06" + value="0 0.5 0.5 1" /> + <color + name="ColorPaletteEntry07" + value="0 0 0.5 1" /> + <color + name="ColorPaletteEntry08" + value="0.5 0 0.5 1" /> + <color + name="ColorPaletteEntry09" + value="0.5 0.5 0 1" /> + <color + name="ColorPaletteEntry10" + value="0 0.25 0.25 1" /> + <color + name="ColorPaletteEntry11" + value="0 0.5 1 1" /> + <color + name="ColorPaletteEntry12" + value="0 0.25 0.5 1" /> + <color + name="ColorPaletteEntry13" + value="0.5 0 1 1" /> + <color + name="ColorPaletteEntry14" + value="0.5 0.25 0 1" /> + <color + name="ColorPaletteEntry15" + reference="White" /> + <color + name="ColorPaletteEntry16" + reference="LtYellow" /> + <color + name="ColorPaletteEntry17" + reference="White" /> + <color + name="ColorPaletteEntry18" + reference="LtGray" /> + <color + name="ColorPaletteEntry19" + reference="Red" /> + <color + name="ColorPaletteEntry20" + reference="Yellow" /> + <color + name="ColorPaletteEntry21" + reference="Green" /> + <color + name="ColorPaletteEntry22" + value="0 1 1 1" /> + <color + name="ColorPaletteEntry23" + reference="Blue" /> + <color + name="ColorPaletteEntry24" + reference="Purple" /> + <color + name="ColorPaletteEntry25" + value="1 1 0.5 1" /> + <color + name="ColorPaletteEntry26" + value="0 1 0.5 1" /> + <color + name="ColorPaletteEntry27" + value="0.5 1 1 1" /> + <color + name="ColorPaletteEntry28" + value="0.5 0.5 1 1" /> + <color + name="ColorPaletteEntry29" + value="1 0 0.5 1" /> + <color + name="ColorPaletteEntry30" + value="1 0.5 0 1" /> + <color + name="ColorPaletteEntry31" + reference="White" /> + <color + name="ColorPaletteEntry32" + reference="White" /> + <color + name="ComboListBgColor" + reference="DkGray" /> + <color + name="ConsoleBackground" + reference="Black" /> + <color + name="ContextSilhouetteColor" + reference="EmphasisColor" /> + <color + name="ConversationFriendColor" + value="0.5 0.7 0.85 1" /> + <color + name="DefaultHighlightDark" + reference="White_10" /> + <color + name="DefaultHighlightLight" + reference="White_25" /> + <color + name="DefaultShadowDark" + reference="Black_50" /> + <color + name="DefaultShadowLight" + reference="Black_50" /> + <color + name="EffectColor" + reference="White" /> + <color + name="FilterBackgroundColor" + reference="Black" /> + <color + name="FilterTextColor" + reference="EmphasisColor" /> + <color + name="FloaterButtonImageColor" + reference="LtGray" /> + <color + name="FloaterDefaultBackgroundColor" + reference="DkGray_66" /> + <color + name="FloaterFocusBackgroundColor" + reference="DkGray2" /> + <color + name="FloaterFocusBorderColor" + reference="Black_50" /> + <color + name="FloaterUnfocusBorderColor" + reference="Black_50" /> + <color + name="FocusColor" + reference="EmphasisColor" /> + <color + name="FolderViewLoadingMessageTextColor" + value="0.3344 0.545 0.645 1" /> + <color + name="FpsTextColor" + value="0.34 0.51 0.64 0.8" /> + <color + name="GridFocusPointColor" + reference="White_50" /> + <color + name="GridlineBGColor" + value="0.92 0.92 1 0.78" /> + <color + name="GridlineColor" + reference="White" /> + <color + name="GridlineShadowColor" + value="0 0 0 0.31" /> + <color + name="GroupNotifyBoxColor" + value="0.3344 0.5456 0.5159 1" /> + <color + name="GroupNotifyTextColor" + reference="White"/> + <color + name="GroupNotifyDimmedTextColor" + reference="LtGray" /> + <color + name="GroupOverTierColor" + value="0.43 0.06 0.06 1" /> + <color + name="HTMLLinkColor" + reference="EmphasisColor" /> + <color + name="HealthTextColor" + reference="White" /> + <color + name="HelpBgColor" + reference="Unused?" /> + <color + name="HelpFgColor" + reference="Unused?" /> + <color + name="HelpScrollHighlightColor" + reference="Unused?" /> + <color + name="HelpScrollShadowColor" + reference="Unused?" /> + <color + name="HelpScrollThumbColor" + reference="Unused?" /> + <color + name="HelpScrollTrackColor" + reference="Unused?" /> + <color + name="HighlightChildColor" + reference="Yellow" /> + <color + name="HighlightInspectColor" + value="1 0 1 1" /> + <color + name="HighlightParentColor" + value="0.5 0.65 0.8 1" /> + <color + name="IMHistoryBgColor" + reference="Unused?" /> + <color + name="IMHistoryTextColor" + reference="Unused?" /> + <color + name="IconDisabledColor" + reference="White_25" /> + <color + name="IconEnabledColor" + reference="White" /> + <color + name="InventoryBackgroundColor" + reference="DkGray2" /> + <color + name="InventoryFavoriteColor" + reference="Yellow" /> + <color + name="InventoryFocusOutlineColor" + reference="White_25" /> + <color + name="InventoryItemSuffixColor" + reference="White_25" /> + <color + name="InventoryItemLibraryColor" + reference="EmphasisColor" /> + <color + name="InventoryItemLinkColor" + reference="LtGray_50" /> + <color + name="InventoryMouseOverColor" + reference="LtGray_35" /> + <color + name="InventorySearchStatusColor" + reference="EmphasisColor" /> + <color + name="LabelDisabledColor" + reference="White_25" /> + <color + name="LabelSelectedColor" + reference="White" /> + <color + name="LabelSelectedDisabledColor" + reference="White_25" /> + <color + name="LabelTextColor" + reference="LtGray" /> + <color + name="LoginProgressBarBgColor" + reference="Unused?" /> + <color + name="LoginProgressBarFgColor" + reference="Unused?" /> + <color + name="LoginProgressBoxBorderColor" + value="0 0.12 0.24 0" /> + <color + name="LoginProgressBoxCenterColor" + value="0 0 0 0.78" /> + <color + name="LoginProgressBoxShadowColor" + value="0 0 0 0.78" /> + <color + name="LoginProgressBoxTextColor" + reference="White" /> + <color + name="MapAvatarColor" + reference="White" /> + <color + name="MapAvatarFriendColor" + value="0.5 0.7 0.85 1" /> + <color + name="MapAvatarSelfColor" + value="0.53125 0 0.498047 1" /> + <color + name="MapFrustumColor" + reference="White_10" /> + <color + name="MapParcelOutlineColor" + value="1 1 1 0.5" /> + <color + name="MapTrackColor" + reference="Red" /> + <color + name="MapTrackColorUnder" + reference="Blue" /> + <color + name="MapTrackDisabledColor" + value="0.5 0 0 1" /> + <color + name="MenuBarBgColor" + reference="MouseGray" /> + <color + name="MenuBarGodBgColor" + reference="FrogGreen" /> + <color + name="MenuDefaultBgColor" + reference="DkGray2" /> + <color + name="MenuItemDisabledColor" + reference="LtGray_50" /> + <color + name="MenuItemEnabledColor" + reference="LtGray" /> + <color + name="MenuItemHighlightBgColor" + reference="EmphasisColor_35" /> + <color + name="MenuItemFlashBgColor" + reference="BeaconColor" /> + <color + name="MenuItemHighlightFgColor" + reference="White" /> + <color + name="MenuNonProductionBgColor" + reference="Black" /> + <color + name="MenuNonProductionGodBgColor" + value="0.263 0.325 0.345 1" /> + <color + name="MenuPopupBgColor" + reference="DkGray2" /> + <color + name="ModelUploaderLabels" + value="1 0.6 0 1" /> + <color + name="MultiSliderDisabledThumbColor" + reference="Black" /> + <color + name="MultiSliderThumbCenterColor" + reference="White" /> + <color + name="MultiSliderThumbCenterSelectedColor" + reference="Green" /> + <color + name="MultiSliderThumbOutlineColor" + reference="Unused?" /> + <color + name="MultiSliderTrackColor" + reference="LtGray" /> + <color + name="MultiSliderTriangleColor" + reference="Yellow" /> + <!-- + <color + name="NameTagBackground" + value="0.85 0.85 0.85 0.80" /> + --> + <color + name="NameTagBackground" + value="0.101 0.101 0.101 0.6" /> + <color + name="NameTagChat" + reference="White" /> + <color + name="NameTagFriend" + value="0.5 0.7 0.85 1" /> + <color + name="NameTagLegacy" + reference="White" /> + <color + name="NameTagMatch" + reference="White" /> + <color + name="NameTagMismatch" + reference="White" /> + <color + name="NetMapBackgroundColor" + value="0 0 0 1" /> + <color + name="NetMapGroupOwnAboveWater" + value="0.85 0 0.85 1" /> + <color + name="NetMapGroupOwnBelowWater" + value="0.63 0 0.63 1" /> + <color + name="NetMapOtherOwnAboveWater" + value="0.24 0.24 0.24 1" /> + <color + name="NetMapOtherOwnBelowWater" + value="0.12 0.12 0.12 1" /> + <color + name="NetMapYouOwnAboveWater" + value="0 0.85 0.85 1" /> + <color + name="NetMapYouOwnBelowWater" + value="0 0.63 0.63 1" /> + <color + name="NotifyBoxColor" + value="LtGray" /> + <color + name="NotifyCautionBoxColor" + value="1 0.82 0.46 1" /> + <color + name="NotifyCautionWarnColor" + reference="White" /> + <color + name="NotifyTextColor" + reference="White" /> + <color + name="ObjectBubbleColor" + reference="DkGray_66" /> + <color + name="ObjectChatColor" + reference="LtYellow" /> + <color + name="OverdrivenColor" + reference="Red" /> + <color + name="PanelDefaultBackgroundColor" + reference="DkGray" /> + <color + name="PanelDefaultHighlightLight" + reference="White_50" /> + <color + name="PanelFocusBackgroundColor" + reference="DkGray2" /> + <color + name="PanelNotificationBackground" + value="1 0.3 0.3 0" /> + <color + name="ParcelHoverColor" + reference="White" /> + <color + name="PathfindingErrorColor" + reference="LtRed" /> + <color + name="PathfindingWarningColor" + reference="DrYellow" /> + <color + name="PathfindingGoodColor" + reference="LtGreen" /> + <color + name="MaterialErrorColor" + reference="LtRed" /> + <color + name="MaterialWarningColor" + reference="DrYellow" /> + <color + name="MaterialGoodColor" + reference="LtGreen" /> + <color + name="PathfindingDefaultBeaconColor" + reference="Red_80" /> + <color + name="PathfindingDefaultBeaconTextColor" + reference="White" /> + <color + name="PathfindingLinksetBeaconColor" + reference="Blue_80" /> + <color + name="PathfindingCharacterBeaconColor" + reference="Red_80" /> + <color + name="PieMenuBgColor" + value="0.24 0.24 0.24 0.59" /> + <color + name="PieMenuLineColor" + value="0 0 0 0.5" /> + <color + name="PieMenuSelectedColor" + value="0.72 0.72 0.74 0.3" /> + <color + name="PropertyColorAuction" + value="0.5 0 1 0.4" /> + <color + name="PropertyColorAvail" + reference="Transparent" /> + <color + name="PropertyColorForSale" + value="1 0.5 0 0.4" /> + <color + name="PropertyColorGroup" + value="0 0.72 0.72 0.4" /> + <color + name="PropertyColorOther" + value="1 0 0 0.4" /> + <color + name="PropertyColorSelf" + value="0 1 0 0.4" /> + <color + name="ScriptBgReadOnlyColor" + value="0.39 0.39 0.39 1" /> + <color + name="ScriptErrorColor" + reference="Red" /> + <color + name="ScrollBGStripeColor" + reference="Transparent" /> + <color + name="ScrollBgReadOnlyColor" + reference="Transparent" /> + <color + name="ScrollBgWriteableColor" + reference="White_05" /> + <color + name="ScrollDisabledColor" + reference="White_25" /> + <color + name="ScrollHighlightedColor" + reference="Unused?" /> + <color + name="ScrollHoveredColor" + reference="EmphasisColor_13" /> + <color + name="ScrollSelectedBGColor" + reference="EmphasisColor_35" /> + <color + name="ScrollSelectedFGColor" + reference="White" /> + <color + name="ScrollUnselectedColor" + reference="LtGray" /> + <color + name="ScrollbarThumbColor" + reference="White" /> + <color + name="ScrollbarTrackColor" + reference="Black" /> + <color + name="SelectedOutfitTextColor" + reference="EmphasisColor" /> + <color + name="SearchableControlHighlightFontColor" + value="1 0 0 1" /> + <color + name="SearchableControlHighlightBgColor" + value="0.5 0.1 0.1 1" /> + <color + name="SilhouetteChildColor" + value="0.13 0.42 0.77 1" /> + <color + name="SilhouetteParentColor" + reference="Yellow" /> + <color + name="SliderDisabledThumbColor" + reference="White_25" /> + <color + name="SliderThumbCenterColor" + reference="White" /> + <color + name="SliderThumbOutlineColor" + reference="White" /> + <color + name="SliderTrackColor" + reference="Unused?" /> + <color + name="SpeakingColor" + reference="FrogGreen" /> + <color + name="SystemChatColor" + reference="LtGray" /> + <color + name="TextBgFocusColor" + reference="White" /> + <color + name="TextBgReadOnlyColor" + reference="White_05" /> + <color + name="TextBgWriteableColor" + reference="LtGray" /> + <color + name="TextCursorColor" + reference="Black" /> + <color + name="TextDefaultColor" + reference="Black" /> + <color + name="TextEmbeddedItemColor" + value="0 0 0.5 1" /> + <color + name="TextEmbeddedItemReadOnlyColor" + reference="Unused?" /> + <color + name="TextFgColor" + value="0.102 0.102 0.102 1" /> + <color + name="TextFgReadOnlyColor" + reference="LtGray" /> + <color + name="TextFgTentativeColor" + value="0.4 0.4 0.4 1" /> + <color + name="TimeTextColor" + reference="LtGray" /> + <color + name="TitleBarFocusColor" + reference="White_10" /> + <color + name="ToastBackground" + value="0.3 0.3 0.3 0" /> + <color + name="ToolTipBgColor" + value="0.937 0.89 0.655 1" /> + <color + name="ToolTipBorderColor" + value="0.812 0.753 0.451 1" /> + <color + name="ToolTipTextColor" + reference="DkGray2" /> + <color + name="InspectorTipTextColor" + reference="LtGray" /> + <color + name="UserChatColor" + reference="White" /> + <color + name="llOwnerSayChatColor" + reference="LtOrange" /> + + <!-- New Colors --> + <color + name="OutputMonitorMutedColor" + reference="DkGray2" /> + <color + name="SysWellItemUnselected" + value="0 0 0 0" /> + <color + name="SysWellItemSelected" + value="0.3 0.3 0.3 1.0" /> + <color + name="ColorSwatchBorderColor" + value="0.45098 0.517647 0.607843 1"/> + <color + name="ChatTeleportSeparatorColor" + reference="Black" /> + <color + name="ChatTimestampColor" + reference="White" /> + <color + name="MenuBarBetaBgColor" + reference="DkBlue" /> + <color + name="MenuBarProjectBgColor" + reference="MdBlue" /> + <color + name="MenuBarTestBgColor" + reference="DkRed" /> + <color + name="MeshImportTableNormalColor" + value="1 1 1 1"/> + <color + name="MeshImportTableHighlightColor" + value="0.2 0.8 1 1"/> + + <color + name="DirectChatColor" + reference="LtOrange" /> + + <color + name="ToolbarDropZoneColor" + value=".48 .69 1 .5" /> + <color + name="PanelNotificationListItem" + value="0.3 0.3 0.3 .3" /> + + <!-- profiles --> + <color + name="StatusUserOnline" + reference="White" /> + <color + name="StatusUserOffline" + reference="LtGray_35" /> + <!-- Groups visible in own profiles --> + <color + name="GroupVisibleInProfile" + reference="TextBgFocusColor" /> + <color + name="GroupHiddenInProfile" + reference="Gray" /> + + + <!-- Generic color names (legacy) --> + <color + name="white" + value="1 1 1 1"/> + <color + name="black" + value="0 0 0 1"/> + <color + name="red" + value="1 0 0 1"/> + <color + name="green" + value="0 1 0 1"/> + <color + name="blue" + value="0 0 1 1"/> + + <!--Resize bar colors --> + + <color + name="ResizebarBorderLight" + value="0.231 0.231 0.231 1"/> + + <color + name="ResizebarBorderDark" + value="0.133 0.133 0.133 1"/> + + <color + name="ResizebarBody" + value="0.208 0.208 0.208 1"/> + + <!-- syntax highlighting (LSL Scripts) --> + <color + name="ScriptText" + reference="Black" /> + <color + name="ScriptBackground" + reference="White" /> + <color + name="ScriptCursorColor" + reference="Black" /> + <color + name="SyntaxLslComment" + value="0 0.5 0 1" /> + <color + name="SyntaxLslConstant" + value="0 0.6 0.6 1" /> + <color + name="SyntaxLslControlFlow" + value="0.4 0 0.8 1" /> + <color + name="SyntaxLslControlLabel" + value="0 0 0.8 1" /> + <color + name="SyntaxLslDataType" + value="0.8 0.4 0 1" /> + <color + name="SyntaxLslDeprecated" + value="0.9 0.0 0.66, 1" /> + <color + name="SyntaxLslEvent" + value="0 0.3 0.5 1" /> + <color + name="SyntaxLslFunction" + value="0.3 0 0.5 1" /> + <color + name="SyntaxLslGodMode" + value="0.7 .2 .35 1" /> + <color + name="SyntaxLslStringLiteral" + value="1 0.14 0 1" /> + <color + name="OutfitGalleryItemSelected" + reference="EmphasisColor_35" /> + <color + name="OutfitGalleryItemWorn" + reference="EmphasisColor_13" /> + <color + name="OutfitGalleryItemUnselected" + value="0.4 0.4 0.4 1" /> + <color + name="PanelGray" + value="0.27 0.27 0.27 1" /> + <color + name="PerformanceMid" + value="1 0.8 0 1" /> + <color + name="OutfitSnapshotMacMask" + value="0.115 0.115 0.115 1"/> + <color + name="OutfitSnapshotMacMask2" + value="0.1 0.1 0.1 1"/> + <color + name="ChatMentionFont" + value="0.3 0.82 1 1" /> + <color + name="ChatMentionHighlight" + value="0.82 0.91 0.98 0.15" /> + <color + name="ChatSelfMentionHighlight" + value="1 1 0 0.35" /> + <color + name="MentionFlashBgColor" + value="1 1 0 0.5" /> +</colors> diff --git a/indra/newview/skins/classic/textures/3p_icons/fmod_logo.png b/indra/newview/skins/classic/textures/3p_icons/fmod_logo.png Binary files differnew file mode 100644 index 0000000000..5a50e0ad34 --- /dev/null +++ b/indra/newview/skins/classic/textures/3p_icons/fmod_logo.png diff --git a/indra/newview/skins/classic/textures/3p_icons/havok_logo.png b/indra/newview/skins/classic/textures/3p_icons/havok_logo.png Binary files differnew file mode 100644 index 0000000000..ff1ea3a72e --- /dev/null +++ b/indra/newview/skins/classic/textures/3p_icons/havok_logo.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Avatar_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Avatar_Off.png Binary files differnew file mode 100644 index 0000000000..6b725e153a --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Avatar_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_FreeCam_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_FreeCam_Off.png Binary files differnew file mode 100644 index 0000000000..9f22080d13 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_FreeCam_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Orbit_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Orbit_Off.png Binary files differnew file mode 100644 index 0000000000..5b2a8eb339 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Orbit_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Pan_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Pan_Off.png Binary files differnew file mode 100644 index 0000000000..9acf7053d5 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Pan_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_Off.png Binary files differnew file mode 100644 index 0000000000..00158a7bc2 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_On.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_On.png Binary files differnew file mode 100644 index 0000000000..3748f5e190 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Back_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Eye_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Eye_Off.png Binary files differnew file mode 100644 index 0000000000..2b50986780 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Eye_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_Off.png Binary files differnew file mode 100644 index 0000000000..c49b8f9a27 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_On.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_On.png Binary files differnew file mode 100644 index 0000000000..bc8c4db04d --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Front_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_Off.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_Off.png Binary files differnew file mode 100644 index 0000000000..b919a0a152 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_On.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_On.png Binary files differnew file mode 100644 index 0000000000..de9da359a0 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Preset_Side_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Center.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Center.png Binary files differnew file mode 100644 index 0000000000..5f25281518 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Center.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_In.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_In.png Binary files differnew file mode 100644 index 0000000000..1df7618a2b --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_In.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Out.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Out.png Binary files differnew file mode 100644 index 0000000000..cc4e6f99ff --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Rotate_Out.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Center.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Center.png Binary files differnew file mode 100644 index 0000000000..82e6806af6 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Center.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_In.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_In.png Binary files differnew file mode 100644 index 0000000000..338062c083 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_In.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Out.png b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Out.png Binary files differnew file mode 100644 index 0000000000..cffead1703 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Cam_Tracking_Out.png diff --git a/indra/newview/skins/classic/textures/bottomtray/ChatBarHandle.png b/indra/newview/skins/classic/textures/bottomtray/ChatBarHandle.png Binary files differnew file mode 100644 index 0000000000..50239c8af8 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/ChatBarHandle.png diff --git a/indra/newview/skins/classic/textures/bottomtray/DownArrow.png b/indra/newview/skins/classic/textures/bottomtray/DownArrow.png Binary files differnew file mode 100644 index 0000000000..82f58b22b9 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/DownArrow.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_Off.png b/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_Off.png Binary files differnew file mode 100644 index 0000000000..8d32cad95f --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_On.png b/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_On.png Binary files differnew file mode 100644 index 0000000000..4c98e35868 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Mouselook_View_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Move_Fly_Off.png b/indra/newview/skins/classic/textures/bottomtray/Move_Fly_Off.png Binary files differnew file mode 100644 index 0000000000..fade065ce7 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Move_Fly_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Move_Run_Off.png b/indra/newview/skins/classic/textures/bottomtray/Move_Run_Off.png Binary files differnew file mode 100644 index 0000000000..e2eb38e12d --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Move_Run_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Move_Walk_Off.png b/indra/newview/skins/classic/textures/bottomtray/Move_Walk_Off.png Binary files differnew file mode 100644 index 0000000000..f314d4e001 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Move_Walk_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_Off.png Binary files differnew file mode 100644 index 0000000000..4dddc2b391 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_On.png Binary files differnew file mode 100644 index 0000000000..a2ac8bd8c6 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Backward_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Down_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Down_Off.png Binary files differnew file mode 100644 index 0000000000..2893c9a9f1 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Down_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Down_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Down_On.png Binary files differnew file mode 100644 index 0000000000..0cb73798b3 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Down_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_Off.png Binary files differnew file mode 100644 index 0000000000..80d227b6a7 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_On.png Binary files differnew file mode 100644 index 0000000000..83df78e8f3 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Forward_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Left_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Left_Off.png Binary files differnew file mode 100644 index 0000000000..3602efa9d9 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Left_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Left_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Left_On.png Binary files differnew file mode 100644 index 0000000000..be7366a2a8 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Left_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Right_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Right_Off.png Binary files differnew file mode 100644 index 0000000000..9c3fc37dfe --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Right_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Right_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Right_On.png Binary files differnew file mode 100644 index 0000000000..32bdb8a034 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Right_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_Off.png Binary files differnew file mode 100644 index 0000000000..282e8d62de --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_On.png Binary files differnew file mode 100644 index 0000000000..168af4bac5 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnLeft_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_Off.png Binary files differnew file mode 100644 index 0000000000..5039e57c32 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_On.png Binary files differnew file mode 100644 index 0000000000..803ce250e7 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_TurnRight_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Up_Off.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Up_Off.png Binary files differnew file mode 100644 index 0000000000..a49c43c2cf --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Up_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Movement_Up_On.png b/indra/newview/skins/classic/textures/bottomtray/Movement_Up_On.png Binary files differnew file mode 100644 index 0000000000..3b7f83fbab --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Movement_Up_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Notices_Unread.png b/indra/newview/skins/classic/textures/bottomtray/Notices_Unread.png Binary files differnew file mode 100644 index 0000000000..eb2f3dbaa4 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Notices_Unread.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Object_View_Off.png b/indra/newview/skins/classic/textures/bottomtray/Object_View_Off.png Binary files differnew file mode 100644 index 0000000000..e9dea7e17e --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Object_View_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Object_View_On.png b/indra/newview/skins/classic/textures/bottomtray/Object_View_On.png Binary files differnew file mode 100644 index 0000000000..7a348ba22e --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Object_View_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/PanOrbit_Off.png b/indra/newview/skins/classic/textures/bottomtray/PanOrbit_Off.png Binary files differnew file mode 100644 index 0000000000..53efa3a9a9 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/PanOrbit_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Snapshot_Off.png b/indra/newview/skins/classic/textures/bottomtray/Snapshot_Off.png Binary files differnew file mode 100644 index 0000000000..4ab4bbe4af --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Snapshot_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/Unread_Chiclet.png b/indra/newview/skins/classic/textures/bottomtray/Unread_Chiclet.png Binary files differnew file mode 100644 index 0000000000..e8fe243dc7 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/Unread_Chiclet.png diff --git a/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl1.png b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl1.png Binary files differnew file mode 100644 index 0000000000..438b4912f8 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl1.png diff --git a/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl2.png b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl2.png Binary files differnew file mode 100644 index 0000000000..693adc4781 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl2.png diff --git a/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl3.png b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl3.png Binary files differnew file mode 100644 index 0000000000..14ec77b99a --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Lvl3.png diff --git a/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Off.png b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Off.png Binary files differnew file mode 100644 index 0000000000..48be51e9af --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_Off.png diff --git a/indra/newview/skins/classic/textures/bottomtray/VoicePTT_On.png b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_On.png Binary files differnew file mode 100644 index 0000000000..818b34d40f --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/VoicePTT_On.png diff --git a/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit.png Binary files differnew file mode 100644 index 0000000000..84711ddc29 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit.png diff --git a/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit_Selected.png Binary files differnew file mode 100644 index 0000000000..9b9468c574 --- /dev/null +++ b/indra/newview/skins/classic/textures/bottomtray/WellButton_Lit_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cone.png b/indra/newview/skins/classic/textures/build/Object_Cone.png Binary files differnew file mode 100644 index 0000000000..5167f1a820 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cone.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cone_Selected.png b/indra/newview/skins/classic/textures/build/Object_Cone_Selected.png Binary files differnew file mode 100644 index 0000000000..0f04cb2f28 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cone_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cube.png b/indra/newview/skins/classic/textures/build/Object_Cube.png Binary files differnew file mode 100644 index 0000000000..e82af1ca82 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cube.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cube_Selected.png b/indra/newview/skins/classic/textures/build/Object_Cube_Selected.png Binary files differnew file mode 100644 index 0000000000..2a10237771 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cube_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cylinder.png b/indra/newview/skins/classic/textures/build/Object_Cylinder.png Binary files differnew file mode 100644 index 0000000000..fe1041d4c7 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cylinder.png diff --git a/indra/newview/skins/classic/textures/build/Object_Cylinder_Selected.png b/indra/newview/skins/classic/textures/build/Object_Cylinder_Selected.png Binary files differnew file mode 100644 index 0000000000..ee6db5d64e --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Cylinder_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Grass.png b/indra/newview/skins/classic/textures/build/Object_Grass.png Binary files differnew file mode 100644 index 0000000000..a88efd5f3e --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Grass.png diff --git a/indra/newview/skins/classic/textures/build/Object_Grass_Selected.png b/indra/newview/skins/classic/textures/build/Object_Grass_Selected.png Binary files differnew file mode 100644 index 0000000000..37f35f9339 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Grass_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Cone.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Cone.png Binary files differnew file mode 100644 index 0000000000..595f64d480 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Cone.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Cone_Selected.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Cone_Selected.png Binary files differnew file mode 100644 index 0000000000..ad6ba66bed --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Cone_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder.png Binary files differnew file mode 100644 index 0000000000..dd41d56fb3 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder_Selected.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder_Selected.png Binary files differnew file mode 100644 index 0000000000..03a47494f5 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Cylinder_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere.png Binary files differnew file mode 100644 index 0000000000..1489630624 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere.png diff --git a/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere_Selected.png b/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere_Selected.png Binary files differnew file mode 100644 index 0000000000..daefae7389 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Hemi_Sphere_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Prism.png b/indra/newview/skins/classic/textures/build/Object_Prism.png Binary files differnew file mode 100644 index 0000000000..51c6c161a0 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Prism.png diff --git a/indra/newview/skins/classic/textures/build/Object_Prism_Selected.png b/indra/newview/skins/classic/textures/build/Object_Prism_Selected.png Binary files differnew file mode 100644 index 0000000000..73470c7af9 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Prism_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Pyramid.png b/indra/newview/skins/classic/textures/build/Object_Pyramid.png Binary files differnew file mode 100644 index 0000000000..a147b59553 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Pyramid.png diff --git a/indra/newview/skins/classic/textures/build/Object_Pyramid_Selected.png b/indra/newview/skins/classic/textures/build/Object_Pyramid_Selected.png Binary files differnew file mode 100644 index 0000000000..361c915231 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Pyramid_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Ring.png b/indra/newview/skins/classic/textures/build/Object_Ring.png Binary files differnew file mode 100644 index 0000000000..a9790fd60c --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Ring.png diff --git a/indra/newview/skins/classic/textures/build/Object_Ring_Selected.png b/indra/newview/skins/classic/textures/build/Object_Ring_Selected.png Binary files differnew file mode 100644 index 0000000000..49b76d137e --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Ring_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Sphere.png b/indra/newview/skins/classic/textures/build/Object_Sphere.png Binary files differnew file mode 100644 index 0000000000..8e2dd92a82 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Sphere.png diff --git a/indra/newview/skins/classic/textures/build/Object_Sphere_Selected.png b/indra/newview/skins/classic/textures/build/Object_Sphere_Selected.png Binary files differnew file mode 100644 index 0000000000..473b90e867 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Sphere_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tetrahedron.png b/indra/newview/skins/classic/textures/build/Object_Tetrahedron.png Binary files differnew file mode 100644 index 0000000000..23e22b1796 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tetrahedron.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tetrahedron_Selected.png b/indra/newview/skins/classic/textures/build/Object_Tetrahedron_Selected.png Binary files differnew file mode 100644 index 0000000000..20278c8f6d --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tetrahedron_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Torus.png b/indra/newview/skins/classic/textures/build/Object_Torus.png Binary files differnew file mode 100644 index 0000000000..15c62423a9 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Torus.png diff --git a/indra/newview/skins/classic/textures/build/Object_Torus_Selected.png b/indra/newview/skins/classic/textures/build/Object_Torus_Selected.png Binary files differnew file mode 100644 index 0000000000..e6cad859fd --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Torus_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tree.png b/indra/newview/skins/classic/textures/build/Object_Tree.png Binary files differnew file mode 100644 index 0000000000..82c422419b --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tree.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tree_Selected.png b/indra/newview/skins/classic/textures/build/Object_Tree_Selected.png Binary files differnew file mode 100644 index 0000000000..52b4f535f8 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tree_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tube.png b/indra/newview/skins/classic/textures/build/Object_Tube.png Binary files differnew file mode 100644 index 0000000000..e47fce7511 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tube.png diff --git a/indra/newview/skins/classic/textures/build/Object_Tube_Selected.png b/indra/newview/skins/classic/textures/build/Object_Tube_Selected.png Binary files differnew file mode 100644 index 0000000000..4469814e1a --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Object_Tube_Selected.png diff --git a/indra/newview/skins/classic/textures/build/Tool_Create.png b/indra/newview/skins/classic/textures/build/Tool_Create.png Binary files differnew file mode 100644 index 0000000000..1f1097def5 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Tool_Create.png diff --git a/indra/newview/skins/classic/textures/build/Tool_Dozer.png b/indra/newview/skins/classic/textures/build/Tool_Dozer.png Binary files differnew file mode 100644 index 0000000000..61744666f4 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Tool_Dozer.png diff --git a/indra/newview/skins/classic/textures/build/Tool_Face.png b/indra/newview/skins/classic/textures/build/Tool_Face.png Binary files differnew file mode 100644 index 0000000000..5ab42a4ad6 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Tool_Face.png diff --git a/indra/newview/skins/classic/textures/build/Tool_Grab.png b/indra/newview/skins/classic/textures/build/Tool_Grab.png Binary files differnew file mode 100644 index 0000000000..5c58288d5e --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Tool_Grab.png diff --git a/indra/newview/skins/classic/textures/build/Tool_Zoom.png b/indra/newview/skins/classic/textures/build/Tool_Zoom.png Binary files differnew file mode 100644 index 0000000000..ad493b0d66 --- /dev/null +++ b/indra/newview/skins/classic/textures/build/Tool_Zoom.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Off.png b/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Off.png Binary files differnew file mode 100644 index 0000000000..19c842b816 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Press.png b/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Press.png Binary files differnew file mode 100644 index 0000000000..b9879dcc8a --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_ArrowClosed_Press.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Off.png b/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Off.png Binary files differnew file mode 100644 index 0000000000..d506cda5c9 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Press.png b/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Press.png Binary files differnew file mode 100644 index 0000000000..08f7493a02 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_ArrowOpened_Press.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_Off.png b/indra/newview/skins/classic/textures/containers/Accordion_Off.png Binary files differnew file mode 100644 index 0000000000..414f4509c6 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_Over.png b/indra/newview/skins/classic/textures/containers/Accordion_Over.png Binary files differnew file mode 100644 index 0000000000..5416d73310 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_Over.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_Press.png b/indra/newview/skins/classic/textures/containers/Accordion_Press.png Binary files differnew file mode 100644 index 0000000000..1578e0dfc5 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_Press.png diff --git a/indra/newview/skins/classic/textures/containers/Accordion_Selected.png b/indra/newview/skins/classic/textures/containers/Accordion_Selected.png Binary files differnew file mode 100644 index 0000000000..2222954332 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Accordion_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/Container.png b/indra/newview/skins/classic/textures/containers/Container.png Binary files differnew file mode 100644 index 0000000000..511eb94386 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Container.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Left_Off.png b/indra/newview/skins/classic/textures/containers/TabTop_Left_Off.png Binary files differnew file mode 100644 index 0000000000..c5b232d9ab --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Left_Off.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Left_Selected.png b/indra/newview/skins/classic/textures/containers/TabTop_Left_Selected.png Binary files differnew file mode 100644 index 0000000000..cd78651064 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Left_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Middle_Off.png b/indra/newview/skins/classic/textures/containers/TabTop_Middle_Off.png Binary files differnew file mode 100644 index 0000000000..be624ab273 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Middle_Off.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Middle_Selected.png b/indra/newview/skins/classic/textures/containers/TabTop_Middle_Selected.png Binary files differnew file mode 100644 index 0000000000..dba61903a6 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Middle_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Right_Flashing.png b/indra/newview/skins/classic/textures/containers/TabTop_Right_Flashing.png Binary files differnew file mode 100644 index 0000000000..fd13bb699d --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Right_Flashing.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Right_Off.png b/indra/newview/skins/classic/textures/containers/TabTop_Right_Off.png Binary files differnew file mode 100644 index 0000000000..db28e9e13a --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Right_Off.png diff --git a/indra/newview/skins/classic/textures/containers/TabTop_Right_Selected.png b/indra/newview/skins/classic/textures/containers/TabTop_Right_Selected.png Binary files differnew file mode 100644 index 0000000000..4da3bc232c --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/TabTop_Right_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Left_Flash.png b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Flash.png Binary files differnew file mode 100644 index 0000000000..9f1e2a469d --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Flash.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Left_Off.png b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Off.png Binary files differnew file mode 100644 index 0000000000..f347505772 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Left_Over.png b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Over.png Binary files differnew file mode 100644 index 0000000000..fd24e5b430 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Over.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Left_Selected.png b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Selected.png Binary files differnew file mode 100644 index 0000000000..dccf543a9a --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Left_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Flash.png b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Flash.png Binary files differnew file mode 100644 index 0000000000..dd73d655e9 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Flash.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Off.png b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Off.png Binary files differnew file mode 100644 index 0000000000..cf30330f1c --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Over.png b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Over.png Binary files differnew file mode 100644 index 0000000000..6ac1ce3ffb --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Over.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Selected.png b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Selected.png Binary files differnew file mode 100644 index 0000000000..8b40051c0b --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Middle_Selected.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Right_Flash.png b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Flash.png Binary files differnew file mode 100644 index 0000000000..f6b775c2a0 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Flash.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Right_Off.png b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Off.png Binary files differnew file mode 100644 index 0000000000..d4881e21d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Off.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Right_Over.png b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Over.png Binary files differnew file mode 100644 index 0000000000..bf2a72d6f4 --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Over.png diff --git a/indra/newview/skins/classic/textures/containers/Toolbar_Right_Selected.png b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Selected.png Binary files differnew file mode 100644 index 0000000000..c3833ad7fa --- /dev/null +++ b/indra/newview/skins/classic/textures/containers/Toolbar_Right_Selected.png diff --git a/indra/newview/skins/classic/textures/icons/AddItem_Disabled.png b/indra/newview/skins/classic/textures/icons/AddItem_Disabled.png Binary files differnew file mode 100644 index 0000000000..d21b72b973 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/AddItem_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/AddItem_Off.png b/indra/newview/skins/classic/textures/icons/AddItem_Off.png Binary files differnew file mode 100644 index 0000000000..64108d133a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/AddItem_Off.png diff --git a/indra/newview/skins/classic/textures/icons/AddItem_Press.png b/indra/newview/skins/classic/textures/icons/AddItem_Press.png Binary files differnew file mode 100644 index 0000000000..3168f51757 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/AddItem_Press.png diff --git a/indra/newview/skins/classic/textures/icons/AudioMute_Off.png b/indra/newview/skins/classic/textures/icons/AudioMute_Off.png Binary files differnew file mode 100644 index 0000000000..dd89920fae --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/AudioMute_Off.png diff --git a/indra/newview/skins/classic/textures/icons/AudioMute_Over.png b/indra/newview/skins/classic/textures/icons/AudioMute_Over.png Binary files differnew file mode 100644 index 0000000000..a4fbec4144 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/AudioMute_Over.png diff --git a/indra/newview/skins/classic/textures/icons/Audio_Off.png b/indra/newview/skins/classic/textures/icons/Audio_Off.png Binary files differnew file mode 100644 index 0000000000..4f6f5512c8 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Audio_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Audio_Press.png b/indra/newview/skins/classic/textures/icons/Audio_Press.png Binary files differnew file mode 100644 index 0000000000..0268a0f9fb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Audio_Press.png diff --git a/indra/newview/skins/classic/textures/icons/BackArrow_Off.png b/indra/newview/skins/classic/textures/icons/BackArrow_Off.png Binary files differnew file mode 100644 index 0000000000..3775690531 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/BackArrow_Off.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardMenu_Disabled.png b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Disabled.png Binary files differnew file mode 100644 index 0000000000..c219ac4446 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardMenu_Off.png b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Off.png Binary files differnew file mode 100644 index 0000000000..586f577181 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Off.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardMenu_Press.png b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Press.png Binary files differnew file mode 100644 index 0000000000..697bee3bbd --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardMenu_Press.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Disabled.png b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Disabled.png Binary files differnew file mode 100644 index 0000000000..12cc1857d4 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Off.png b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Off.png Binary files differnew file mode 100644 index 0000000000..7b40e33e11 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Off.png diff --git a/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Press.png b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Press.png Binary files differnew file mode 100644 index 0000000000..e030c44f01 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ClipboardSmallMenu_Press.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_log_inbox.png b/indra/newview/skins/classic/textures/icons/Conv_log_inbox.png Binary files differnew file mode 100644 index 0000000000..f4bbdc059d --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_log_inbox.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_add_person.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_add_person.png Binary files differnew file mode 100644 index 0000000000..acb3904e32 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_add_person.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_ne.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_ne.png Binary files differnew file mode 100644 index 0000000000..70dec7cad1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_ne.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_sw.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_sw.png Binary files differnew file mode 100644 index 0000000000..13d424832b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_arrow_sw.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_call_log.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_call_log.png Binary files differnew file mode 100644 index 0000000000..1866dd965c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_call_log.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_close.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_close.png Binary files differnew file mode 100644 index 0000000000..f4f2e2fd37 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_close.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_collapse.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_collapse.png Binary files differnew file mode 100644 index 0000000000..3c427a3cc5 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_collapse.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_expand.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_expand.png Binary files differnew file mode 100644 index 0000000000..6e8031b42c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_expand.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_hang_up.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_hang_up.png Binary files differnew file mode 100644 index 0000000000..887a3b8335 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_hang_up.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_open_call.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_open_call.png Binary files differnew file mode 100644 index 0000000000..fc0da5a810 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_open_call.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_plus.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_plus.png Binary files differnew file mode 100644 index 0000000000..6d45dbbff6 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_plus.png diff --git a/indra/newview/skins/classic/textures/icons/Conv_toolbar_sort.png b/indra/newview/skins/classic/textures/icons/Conv_toolbar_sort.png Binary files differnew file mode 100644 index 0000000000..e3e5f49741 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Conv_toolbar_sort.png diff --git a/indra/newview/skins/classic/textures/icons/Copy.png b/indra/newview/skins/classic/textures/icons/Copy.png Binary files differnew file mode 100644 index 0000000000..8448e70385 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Copy.png diff --git a/indra/newview/skins/classic/textures/icons/CopyBright.png b/indra/newview/skins/classic/textures/icons/CopyBright.png Binary files differnew file mode 100644 index 0000000000..ac65d68e0b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/CopyBright.png diff --git a/indra/newview/skins/classic/textures/icons/Default_Outfit_Photo.png b/indra/newview/skins/classic/textures/icons/Default_Outfit_Photo.png Binary files differnew file mode 100644 index 0000000000..1113b4effe --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Default_Outfit_Photo.png diff --git a/indra/newview/skins/classic/textures/icons/DownArrow_Off.png b/indra/newview/skins/classic/textures/icons/DownArrow_Off.png Binary files differnew file mode 100644 index 0000000000..2e1e2964a0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/DownArrow_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Edit_Wrench.png b/indra/newview/skins/classic/textures/icons/Edit_Wrench.png Binary files differnew file mode 100644 index 0000000000..2b9ba9dc10 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Edit_Wrench.png diff --git a/indra/newview/skins/classic/textures/icons/ExternalBrowser_Off.png b/indra/newview/skins/classic/textures/icons/ExternalBrowser_Off.png Binary files differnew file mode 100644 index 0000000000..dc4532b5a1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ExternalBrowser_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Facebook.png b/indra/newview/skins/classic/textures/icons/Facebook.png Binary files differnew file mode 100644 index 0000000000..9e51e3ac7f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Facebook.png diff --git a/indra/newview/skins/classic/textures/icons/Female.png b/indra/newview/skins/classic/textures/icons/Female.png Binary files differnew file mode 100644 index 0000000000..c9fef87b6e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Female.png diff --git a/indra/newview/skins/classic/textures/icons/ForSale_Badge.png b/indra/newview/skins/classic/textures/icons/ForSale_Badge.png Binary files differnew file mode 100644 index 0000000000..3b3a41c7c1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ForSale_Badge.png diff --git a/indra/newview/skins/classic/textures/icons/ForwardArrow_Off.png b/indra/newview/skins/classic/textures/icons/ForwardArrow_Off.png Binary files differnew file mode 100644 index 0000000000..c33320cf6e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ForwardArrow_Off.png diff --git a/indra/newview/skins/classic/textures/icons/ForwardArrow_Press.png b/indra/newview/skins/classic/textures/icons/ForwardArrow_Press.png Binary files differnew file mode 100644 index 0000000000..86eb39c43a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/ForwardArrow_Press.png diff --git a/indra/newview/skins/classic/textures/icons/Generic_Group.png b/indra/newview/skins/classic/textures/icons/Generic_Group.png Binary files differnew file mode 100644 index 0000000000..e96b7fc992 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Generic_Group.png diff --git a/indra/newview/skins/classic/textures/icons/Generic_Group_Large.png b/indra/newview/skins/classic/textures/icons/Generic_Group_Large.png Binary files differnew file mode 100644 index 0000000000..9396819bfb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Generic_Group_Large.png diff --git a/indra/newview/skins/classic/textures/icons/Generic_Object_Small.png b/indra/newview/skins/classic/textures/icons/Generic_Object_Small.png Binary files differnew file mode 100644 index 0000000000..142390e3f3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Generic_Object_Small.png diff --git a/indra/newview/skins/classic/textures/icons/Generic_Person.png b/indra/newview/skins/classic/textures/icons/Generic_Person.png Binary files differnew file mode 100644 index 0000000000..162735d979 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Generic_Person.png diff --git a/indra/newview/skins/classic/textures/icons/Generic_Person_Large.png b/indra/newview/skins/classic/textures/icons/Generic_Person_Large.png Binary files differnew file mode 100644 index 0000000000..5be82418c1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Generic_Person_Large.png diff --git a/indra/newview/skins/classic/textures/icons/Group_Notices.png b/indra/newview/skins/classic/textures/icons/Group_Notices.png Binary files differnew file mode 100644 index 0000000000..601502d374 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Group_Notices.png diff --git a/indra/newview/skins/classic/textures/icons/Hierarchy_View_Disabled.png b/indra/newview/skins/classic/textures/icons/Hierarchy_View_Disabled.png Binary files differnew file mode 100644 index 0000000000..6d8ea5fd93 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Hierarchy_View_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Hierarchy_View_On.png b/indra/newview/skins/classic/textures/icons/Hierarchy_View_On.png Binary files differnew file mode 100644 index 0000000000..24f5210286 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Hierarchy_View_On.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Attachment_Large.png b/indra/newview/skins/classic/textures/icons/Icon_Attachment_Large.png Binary files differnew file mode 100644 index 0000000000..fb57265dac --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Attachment_Large.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Attachment_Small.png b/indra/newview/skins/classic/textures/icons/Icon_Attachment_Small.png Binary files differnew file mode 100644 index 0000000000..907113cbb7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Attachment_Small.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Color_Palette.png b/indra/newview/skins/classic/textures/icons/Icon_Color_Palette.png Binary files differnew file mode 100644 index 0000000000..28906001ea --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Color_Palette.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Font_Size.png b/indra/newview/skins/classic/textures/icons/Icon_Font_Size.png Binary files differnew file mode 100644 index 0000000000..37bdde69aa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Font_Size.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_For_Sale.png b/indra/newview/skins/classic/textures/icons/Icon_For_Sale.png Binary files differnew file mode 100644 index 0000000000..57a376f1bf --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_For_Sale.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Notification_Condense.png b/indra/newview/skins/classic/textures/icons/Icon_Notification_Condense.png Binary files differnew file mode 100644 index 0000000000..3a19e79f82 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Notification_Condense.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Notification_Expand.png b/indra/newview/skins/classic/textures/icons/Icon_Notification_Expand.png Binary files differnew file mode 100644 index 0000000000..f5331feb02 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Notification_Expand.png diff --git a/indra/newview/skins/classic/textures/icons/Icon_Pointer.png b/indra/newview/skins/classic/textures/icons/Icon_Pointer.png Binary files differnew file mode 100644 index 0000000000..021942a8aa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Icon_Pointer.png diff --git a/indra/newview/skins/classic/textures/icons/Info.png b/indra/newview/skins/classic/textures/icons/Info.png Binary files differnew file mode 100644 index 0000000000..e05a585f0b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Info.png diff --git a/indra/newview/skins/classic/textures/icons/Info_Over.png b/indra/newview/skins/classic/textures/icons/Info_Over.png Binary files differnew file mode 100644 index 0000000000..6399cd6715 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Info_Over.png diff --git a/indra/newview/skins/classic/textures/icons/Info_Small.png b/indra/newview/skins/classic/textures/icons/Info_Small.png Binary files differnew file mode 100644 index 0000000000..c4ce13e132 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Info_Small.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Alpha.png b/indra/newview/skins/classic/textures/icons/Inv_Alpha.png Binary files differnew file mode 100644 index 0000000000..fdad36e2d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Alpha.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Animation.png b/indra/newview/skins/classic/textures/icons/Inv_Animation.png Binary files differnew file mode 100644 index 0000000000..6715c736e7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Animation.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_BodyShape.png b/indra/newview/skins/classic/textures/icons/Inv_BodyShape.png Binary files differnew file mode 100644 index 0000000000..cb908a39fb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_BodyShape.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_CallingCard.png b/indra/newview/skins/classic/textures/icons/Inv_CallingCard.png Binary files differnew file mode 100644 index 0000000000..ee87f8e595 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_CallingCard.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Clothing.png b/indra/newview/skins/classic/textures/icons/Inv_Clothing.png Binary files differnew file mode 100644 index 0000000000..430dca6b5e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Clothing.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Eye.png b/indra/newview/skins/classic/textures/icons/Inv_Eye.png Binary files differnew file mode 100644 index 0000000000..d715f135d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Eye.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Content.png b/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Content.png Binary files differnew file mode 100644 index 0000000000..b71b202234 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Content.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Full.png b/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Full.png Binary files differnew file mode 100644 index 0000000000..7d55fb5cfe --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Favorite_Star_Full.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_FolderClosed.png b/indra/newview/skins/classic/textures/icons/Inv_FolderClosed.png Binary files differnew file mode 100644 index 0000000000..ec99eaee9e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_FolderClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_FolderOpen.png b/indra/newview/skins/classic/textures/icons/Inv_FolderOpen.png Binary files differnew file mode 100644 index 0000000000..615a6ec11b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_FolderOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Gesture.png b/indra/newview/skins/classic/textures/icons/Inv_Gesture.png Binary files differnew file mode 100644 index 0000000000..9fee34915e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Gesture.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Gloves.png b/indra/newview/skins/classic/textures/icons/Inv_Gloves.png Binary files differnew file mode 100644 index 0000000000..aa151d5404 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Gloves.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Hair.png b/indra/newview/skins/classic/textures/icons/Inv_Hair.png Binary files differnew file mode 100644 index 0000000000..62b3ae81c2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Hair.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Invalid.png b/indra/newview/skins/classic/textures/icons/Inv_Invalid.png Binary files differnew file mode 100644 index 0000000000..6ab5ba5217 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Invalid.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Jacket.png b/indra/newview/skins/classic/textures/icons/Inv_Jacket.png Binary files differnew file mode 100644 index 0000000000..26514f1c0f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Jacket.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Landmark.png b/indra/newview/skins/classic/textures/icons/Inv_Landmark.png Binary files differnew file mode 100644 index 0000000000..338323fcee --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Landmark.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Link.png b/indra/newview/skins/classic/textures/icons/Inv_Link.png Binary files differnew file mode 100644 index 0000000000..28c5f3635a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Link.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LinkFolder.png b/indra/newview/skins/classic/textures/icons/Inv_LinkFolder.png Binary files differnew file mode 100644 index 0000000000..7c43ed3a43 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LinkFolder.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LinkItem.png b/indra/newview/skins/classic/textures/icons/Inv_LinkItem.png Binary files differnew file mode 100644 index 0000000000..7c43ed3a43 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LinkItem.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LookFolderClosed.png b/indra/newview/skins/classic/textures/icons/Inv_LookFolderClosed.png Binary files differnew file mode 100644 index 0000000000..46f2038279 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LookFolderClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LookFolderOpen.png b/indra/newview/skins/classic/textures/icons/Inv_LookFolderOpen.png Binary files differnew file mode 100644 index 0000000000..06a1b05983 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LookFolderOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LostClosed.png b/indra/newview/skins/classic/textures/icons/Inv_LostClosed.png Binary files differnew file mode 100644 index 0000000000..fc9a2a2156 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LostClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_LostOpen.png b/indra/newview/skins/classic/textures/icons/Inv_LostOpen.png Binary files differnew file mode 100644 index 0000000000..b15dc3cfa3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_LostOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Material.png b/indra/newview/skins/classic/textures/icons/Inv_Material.png Binary files differnew file mode 100644 index 0000000000..5cbb4fc5c9 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Material.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Mesh.png b/indra/newview/skins/classic/textures/icons/Inv_Mesh.png Binary files differnew file mode 100644 index 0000000000..69217d1cdc --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Mesh.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Notecard.png b/indra/newview/skins/classic/textures/icons/Inv_Notecard.png Binary files differnew file mode 100644 index 0000000000..96f45bc55e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Notecard.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Object.png b/indra/newview/skins/classic/textures/icons/Inv_Object.png Binary files differnew file mode 100644 index 0000000000..fe6b201570 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Object.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Object_Multi.png b/indra/newview/skins/classic/textures/icons/Inv_Object_Multi.png Binary files differnew file mode 100644 index 0000000000..3793594059 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Object_Multi.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Pants.png b/indra/newview/skins/classic/textures/icons/Inv_Pants.png Binary files differnew file mode 100644 index 0000000000..5673bc29ed --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Pants.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Physics.png b/indra/newview/skins/classic/textures/icons/Inv_Physics.png Binary files differnew file mode 100644 index 0000000000..43bd082d8a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Physics.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Script.png b/indra/newview/skins/classic/textures/icons/Inv_Script.png Binary files differnew file mode 100644 index 0000000000..68d2ac425f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Script.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Settings.png b/indra/newview/skins/classic/textures/icons/Inv_Settings.png Binary files differnew file mode 100644 index 0000000000..ca6cf10314 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Settings.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_SettingsDay.png b/indra/newview/skins/classic/textures/icons/Inv_SettingsDay.png Binary files differnew file mode 100644 index 0000000000..d0c4b2cdcd --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_SettingsDay.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_SettingsSky.png b/indra/newview/skins/classic/textures/icons/Inv_SettingsSky.png Binary files differnew file mode 100644 index 0000000000..5332404d37 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_SettingsSky.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_SettingsWater.png b/indra/newview/skins/classic/textures/icons/Inv_SettingsWater.png Binary files differnew file mode 100644 index 0000000000..88ff803756 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_SettingsWater.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Shape.png b/indra/newview/skins/classic/textures/icons/Inv_Shape.png Binary files differnew file mode 100644 index 0000000000..e5db447b36 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Shape.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Shirt.png b/indra/newview/skins/classic/textures/icons/Inv_Shirt.png Binary files differnew file mode 100644 index 0000000000..ffabff9c6c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Shirt.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Shoe.png b/indra/newview/skins/classic/textures/icons/Inv_Shoe.png Binary files differnew file mode 100644 index 0000000000..784d1d23a3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Shoe.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Skin.png b/indra/newview/skins/classic/textures/icons/Inv_Skin.png Binary files differnew file mode 100644 index 0000000000..a232c5ac67 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Skin.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Skirt.png b/indra/newview/skins/classic/textures/icons/Inv_Skirt.png Binary files differnew file mode 100644 index 0000000000..5970f39b1b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Skirt.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Snapshot.png b/indra/newview/skins/classic/textures/icons/Inv_Snapshot.png Binary files differnew file mode 100644 index 0000000000..9eaca9e7ef --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Snapshot.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Socks.png b/indra/newview/skins/classic/textures/icons/Inv_Socks.png Binary files differnew file mode 100644 index 0000000000..95a3a68de6 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Socks.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Sound.png b/indra/newview/skins/classic/textures/icons/Inv_Sound.png Binary files differnew file mode 100644 index 0000000000..138d4c5c36 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Sound.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_StockFolderClosed.png b/indra/newview/skins/classic/textures/icons/Inv_StockFolderClosed.png Binary files differnew file mode 100644 index 0000000000..c3aae7c736 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_StockFolderClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_StockFolderOpen.png b/indra/newview/skins/classic/textures/icons/Inv_StockFolderOpen.png Binary files differnew file mode 100644 index 0000000000..15fd8225fc --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_StockFolderOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_SysClosed.png b/indra/newview/skins/classic/textures/icons/Inv_SysClosed.png Binary files differnew file mode 100644 index 0000000000..2550cae0d4 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_SysClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_SysOpen.png b/indra/newview/skins/classic/textures/icons/Inv_SysOpen.png Binary files differnew file mode 100644 index 0000000000..5b56d86184 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_SysOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Tattoo.png b/indra/newview/skins/classic/textures/icons/Inv_Tattoo.png Binary files differnew file mode 100644 index 0000000000..af5a780685 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Tattoo.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Texture.png b/indra/newview/skins/classic/textures/icons/Inv_Texture.png Binary files differnew file mode 100644 index 0000000000..168a97515a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Texture.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/classic/textures/icons/Inv_Toolbar_SearchVisibility.png Binary files differnew file mode 100644 index 0000000000..c4b186c3de --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Toolbar_SearchVisibility.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_TrashClosed.png b/indra/newview/skins/classic/textures/icons/Inv_TrashClosed.png Binary files differnew file mode 100644 index 0000000000..89f0caa5a2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_TrashClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_TrashOpen.png b/indra/newview/skins/classic/textures/icons/Inv_TrashOpen.png Binary files differnew file mode 100644 index 0000000000..d1f1eeaf42 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_TrashOpen.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Underpants.png b/indra/newview/skins/classic/textures/icons/Inv_Underpants.png Binary files differnew file mode 100644 index 0000000000..77f8e55270 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Underpants.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Undershirt.png b/indra/newview/skins/classic/textures/icons/Inv_Undershirt.png Binary files differnew file mode 100644 index 0000000000..477d76cf11 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Undershirt.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_Universal.png b/indra/newview/skins/classic/textures/icons/Inv_Universal.png Binary files differnew file mode 100644 index 0000000000..65b2f88f02 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_Universal.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_UnknownObject.png b/indra/newview/skins/classic/textures/icons/Inv_UnknownObject.png Binary files differnew file mode 100644 index 0000000000..603a6d7aaa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_UnknownObject.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_VersionFolderClosed.png b/indra/newview/skins/classic/textures/icons/Inv_VersionFolderClosed.png Binary files differnew file mode 100644 index 0000000000..cd561d24ba --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_VersionFolderClosed.png diff --git a/indra/newview/skins/classic/textures/icons/Inv_VersionFolderOpen.png b/indra/newview/skins/classic/textures/icons/Inv_VersionFolderOpen.png Binary files differnew file mode 100644 index 0000000000..6dc9d451cc --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Inv_VersionFolderOpen.png diff --git a/indra/newview/skins/classic/textures/icons/List_View_Disabled.png b/indra/newview/skins/classic/textures/icons/List_View_Disabled.png Binary files differnew file mode 100644 index 0000000000..125034b0cb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/List_View_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/List_View_On.png b/indra/newview/skins/classic/textures/icons/List_View_On.png Binary files differnew file mode 100644 index 0000000000..fcf77f004f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/List_View_On.png diff --git a/indra/newview/skins/classic/textures/icons/Lock.png b/indra/newview/skins/classic/textures/icons/Lock.png Binary files differnew file mode 100644 index 0000000000..2db6ed0213 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Lock.png diff --git a/indra/newview/skins/classic/textures/icons/Locked_Icon.png b/indra/newview/skins/classic/textures/icons/Locked_Icon.png Binary files differnew file mode 100644 index 0000000000..4985af1be1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Locked_Icon.png diff --git a/indra/newview/skins/classic/textures/icons/MP_Logo.png b/indra/newview/skins/classic/textures/icons/MP_Logo.png Binary files differnew file mode 100644 index 0000000000..6aba54189f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/MP_Logo.png diff --git a/indra/newview/skins/classic/textures/icons/Male.png b/indra/newview/skins/classic/textures/icons/Male.png Binary files differnew file mode 100644 index 0000000000..803171f5c6 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Male.png diff --git a/indra/newview/skins/classic/textures/icons/Microphone_On.png b/indra/newview/skins/classic/textures/icons/Microphone_On.png Binary files differnew file mode 100644 index 0000000000..7a7d39d982 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Microphone_On.png diff --git a/indra/newview/skins/classic/textures/icons/MinusItem_Disabled.png b/indra/newview/skins/classic/textures/icons/MinusItem_Disabled.png Binary files differnew file mode 100644 index 0000000000..b62ed35182 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/MinusItem_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/MinusItem_Off.png b/indra/newview/skins/classic/textures/icons/MinusItem_Off.png Binary files differnew file mode 100644 index 0000000000..eb7b8838f7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/MinusItem_Off.png diff --git a/indra/newview/skins/classic/textures/icons/MinusItem_Press.png b/indra/newview/skins/classic/textures/icons/MinusItem_Press.png Binary files differnew file mode 100644 index 0000000000..2dc6081cb0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/MinusItem_Press.png diff --git a/indra/newview/skins/classic/textures/icons/MusicNote.png b/indra/newview/skins/classic/textures/icons/MusicNote.png Binary files differnew file mode 100644 index 0000000000..8d3534a94b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/MusicNote.png diff --git a/indra/newview/skins/classic/textures/icons/OptionsMenu_Disabled.png b/indra/newview/skins/classic/textures/icons/OptionsMenu_Disabled.png Binary files differnew file mode 100644 index 0000000000..5755315e23 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OptionsMenu_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/OptionsMenu_Off.png b/indra/newview/skins/classic/textures/icons/OptionsMenu_Off.png Binary files differnew file mode 100644 index 0000000000..2e9a5faa21 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OptionsMenu_Off.png diff --git a/indra/newview/skins/classic/textures/icons/OptionsMenu_Press.png b/indra/newview/skins/classic/textures/icons/OptionsMenu_Press.png Binary files differnew file mode 100644 index 0000000000..1b08648b51 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OptionsMenu_Press.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Disabled.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Disabled.png Binary files differnew file mode 100644 index 0000000000..1d2dbd6349 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Off.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Off.png Binary files differnew file mode 100644 index 0000000000..f8f3367c42 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Off.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_On.png b/indra/newview/skins/classic/textures/icons/OutboxPush_On.png Binary files differnew file mode 100644 index 0000000000..b1fd734100 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_On.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_On_Over.png b/indra/newview/skins/classic/textures/icons/OutboxPush_On_Over.png Binary files differnew file mode 100644 index 0000000000..e234400b72 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_On_Over.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Over.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Over.png Binary files differnew file mode 100644 index 0000000000..9e1b0e2dfc --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Over.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Press.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Press.png Binary files differnew file mode 100644 index 0000000000..14d9eacc52 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Press.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_1.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_1.png Binary files differnew file mode 100644 index 0000000000..85015fc913 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_1.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_2.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_2.png Binary files differnew file mode 100644 index 0000000000..6158242b68 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_2.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_3.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_3.png Binary files differnew file mode 100644 index 0000000000..7105380bff --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_3.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_4.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_4.png Binary files differnew file mode 100644 index 0000000000..0e65a60fc8 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_4.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_5.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_5.png Binary files differnew file mode 100644 index 0000000000..7acef05891 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_5.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_6.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_6.png Binary files differnew file mode 100644 index 0000000000..4f5b34a643 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Progress_6.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Selected.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected.png Binary files differnew file mode 100644 index 0000000000..d58826da67 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Disabled.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Disabled.png Binary files differnew file mode 100644 index 0000000000..cad9f118b1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Over.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Over.png Binary files differnew file mode 100644 index 0000000000..65d914c6b3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Over.png diff --git a/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Press.png b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..cd50d41903 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/OutboxPush_Selected_Press.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Dark.png Binary files differnew file mode 100644 index 0000000000..dd12d94ad2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Light.png Binary files differnew file mode 100644 index 0000000000..4739c501ad --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_BuildNo_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Build_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Build_Dark.png Binary files differnew file mode 100644 index 0000000000..9826491efd --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Build_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_DamageNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_DamageNo_Dark.png Binary files differnew file mode 100644 index 0000000000..7634e5fab0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_DamageNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Damage_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Damage_Dark.png Binary files differnew file mode 100644 index 0000000000..7ecd645df2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Damage_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Exp_Color.png b/indra/newview/skins/classic/textures/icons/Parcel_Exp_Color.png Binary files differnew file mode 100644 index 0000000000..a1b0faa008 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Exp_Color.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Dark.png Binary files differnew file mode 100644 index 0000000000..831c25a34b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Light.png Binary files differnew file mode 100644 index 0000000000..be829fb5ef --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_FlyNo_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Fly_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Fly_Dark.png Binary files differnew file mode 100644 index 0000000000..579bfe58f8 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Fly_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_ForSale_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_ForSale_Light.png Binary files differnew file mode 100644 index 0000000000..3f4ee0b482 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_ForSale_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Health_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Health_Dark.png Binary files differnew file mode 100644 index 0000000000..98618de927 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Health_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_M_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_M_Dark.png Binary files differnew file mode 100644 index 0000000000..ab5a1680a7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_M_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_M_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_M_Light.png Binary files differnew file mode 100644 index 0000000000..2db94e37c9 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_M_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_PG_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_PG_Dark.png Binary files differnew file mode 100644 index 0000000000..e1f7613d04 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_PG_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_PG_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_PG_Light.png Binary files differnew file mode 100644 index 0000000000..04d13027d2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_PG_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Dark.png Binary files differnew file mode 100644 index 0000000000..2867004014 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Light.png Binary files differnew file mode 100644 index 0000000000..a3a51973af --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_PushNo_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Push_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Push_Dark.png Binary files differnew file mode 100644 index 0000000000..e8487ca092 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Push_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_R_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_R_Dark.png Binary files differnew file mode 100644 index 0000000000..5c165c2fac --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_R_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_R_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_R_Light.png Binary files differnew file mode 100644 index 0000000000..dbf43152b3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_R_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_ScriptsNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_ScriptsNo_Dark.png Binary files differnew file mode 100644 index 0000000000..bfc55fc403 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_ScriptsNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Scripts_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Scripts_Dark.png Binary files differnew file mode 100644 index 0000000000..3477e0654c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Scripts_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Dark.png Binary files differnew file mode 100644 index 0000000000..eff089487e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Light.png Binary files differnew file mode 100644 index 0000000000..68f0b14d44 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOff_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Dark.png Binary files differnew file mode 100644 index 0000000000..200e04a59f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Light.png Binary files differnew file mode 100644 index 0000000000..14cafc5bd2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_SeeAVsOn_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Dark.png Binary files differnew file mode 100644 index 0000000000..ec316e822e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Light.png Binary files differnew file mode 100644 index 0000000000..de3532a70b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_VoiceNo_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Voice_Dark.png b/indra/newview/skins/classic/textures/icons/Parcel_Voice_Dark.png Binary files differnew file mode 100644 index 0000000000..329620fa69 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Voice_Dark.png diff --git a/indra/newview/skins/classic/textures/icons/Parcel_Voice_Light.png b/indra/newview/skins/classic/textures/icons/Parcel_Voice_Light.png Binary files differnew file mode 100644 index 0000000000..81e0fa7bc4 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Parcel_Voice_Light.png diff --git a/indra/newview/skins/classic/textures/icons/Pathfinding_Dirty.png b/indra/newview/skins/classic/textures/icons/Pathfinding_Dirty.png Binary files differnew file mode 100644 index 0000000000..d8fee0fef7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Pathfinding_Dirty.png diff --git a/indra/newview/skins/classic/textures/icons/Pathfinding_Disabled.png b/indra/newview/skins/classic/textures/icons/Pathfinding_Disabled.png Binary files differnew file mode 100644 index 0000000000..ea2ad79611 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Pathfinding_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Pause_Off.png b/indra/newview/skins/classic/textures/icons/Pause_Off.png Binary files differnew file mode 100644 index 0000000000..5d44412783 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Pause_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Pause_Over.png b/indra/newview/skins/classic/textures/icons/Pause_Over.png Binary files differnew file mode 100644 index 0000000000..d1609a144b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Pause_Over.png diff --git a/indra/newview/skins/classic/textures/icons/Pause_Press.png b/indra/newview/skins/classic/textures/icons/Pause_Press.png Binary files differnew file mode 100644 index 0000000000..6b918d1ae6 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Pause_Press.png diff --git a/indra/newview/skins/classic/textures/icons/Permission_Ungranted.png b/indra/newview/skins/classic/textures/icons/Permission_Ungranted.png Binary files differnew file mode 100644 index 0000000000..d206af4433 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Permission_Ungranted.png diff --git a/indra/newview/skins/classic/textures/icons/Person_Check.png b/indra/newview/skins/classic/textures/icons/Person_Check.png Binary files differnew file mode 100644 index 0000000000..39a63a70cf --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Person_Check.png diff --git a/indra/newview/skins/classic/textures/icons/Person_Star.png b/indra/newview/skins/classic/textures/icons/Person_Star.png Binary files differnew file mode 100644 index 0000000000..c4e625b3c1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Person_Star.png diff --git a/indra/newview/skins/classic/textures/icons/Play_Off.png b/indra/newview/skins/classic/textures/icons/Play_Off.png Binary files differnew file mode 100644 index 0000000000..dac2f2d6db --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Play_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Play_Over.png b/indra/newview/skins/classic/textures/icons/Play_Over.png Binary files differnew file mode 100644 index 0000000000..1d261efcda --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Play_Over.png diff --git a/indra/newview/skins/classic/textures/icons/Play_Press.png b/indra/newview/skins/classic/textures/icons/Play_Press.png Binary files differnew file mode 100644 index 0000000000..f7251ce549 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Play_Press.png diff --git a/indra/newview/skins/classic/textures/icons/Presets_Icon.png b/indra/newview/skins/classic/textures/icons/Presets_Icon.png Binary files differnew file mode 100644 index 0000000000..13642e88d1 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Presets_Icon.png diff --git a/indra/newview/skins/classic/textures/icons/Presets_Icon_Graphic.png b/indra/newview/skins/classic/textures/icons/Presets_Icon_Graphic.png Binary files differnew file mode 100644 index 0000000000..96d1021f81 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Presets_Icon_Graphic.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Friend_Offline.png b/indra/newview/skins/classic/textures/icons/Profile_Friend_Offline.png Binary files differnew file mode 100644 index 0000000000..55d922cda7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Friend_Offline.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Friend_Online.png b/indra/newview/skins/classic/textures/icons/Profile_Friend_Online.png Binary files differnew file mode 100644 index 0000000000..febe8e78fa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Friend_Online.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Disabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Disabled.png Binary files differnew file mode 100644 index 0000000000..2632eb173b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Enabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Enabled.png Binary files differnew file mode 100644 index 0000000000..fd8b152c12 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Find_Enabled.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Disabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Disabled.png Binary files differnew file mode 100644 index 0000000000..cef3ec4e5a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Enabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Enabled.png Binary files differnew file mode 100644 index 0000000000..5821566703 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Objects_Enabled.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Disabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Disabled.png Binary files differnew file mode 100644 index 0000000000..ea1b55eca0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Enabled.png b/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Enabled.png Binary files differnew file mode 100644 index 0000000000..eb3fc9e713 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Profile_Perm_Online_Enabled.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_1.png b/indra/newview/skins/classic/textures/icons/Progress_1.png Binary files differnew file mode 100644 index 0000000000..bc7a1e7e96 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_1.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_10.png b/indra/newview/skins/classic/textures/icons/Progress_10.png Binary files differnew file mode 100644 index 0000000000..acf4d21aba --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_10.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_11.png b/indra/newview/skins/classic/textures/icons/Progress_11.png Binary files differnew file mode 100644 index 0000000000..1842cd09d0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_11.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_12.png b/indra/newview/skins/classic/textures/icons/Progress_12.png Binary files differnew file mode 100644 index 0000000000..0ea9dda83e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_12.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_2.png b/indra/newview/skins/classic/textures/icons/Progress_2.png Binary files differnew file mode 100644 index 0000000000..29d6bbcbcb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_2.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_3.png b/indra/newview/skins/classic/textures/icons/Progress_3.png Binary files differnew file mode 100644 index 0000000000..52a03125e9 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_3.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_4.png b/indra/newview/skins/classic/textures/icons/Progress_4.png Binary files differnew file mode 100644 index 0000000000..4b2798519f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_4.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_5.png b/indra/newview/skins/classic/textures/icons/Progress_5.png Binary files differnew file mode 100644 index 0000000000..3f02b8f31a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_5.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_6.png b/indra/newview/skins/classic/textures/icons/Progress_6.png Binary files differnew file mode 100644 index 0000000000..04c8f716d4 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_6.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_7.png b/indra/newview/skins/classic/textures/icons/Progress_7.png Binary files differnew file mode 100644 index 0000000000..c96b4c08d6 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_7.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_8.png b/indra/newview/skins/classic/textures/icons/Progress_8.png Binary files differnew file mode 100644 index 0000000000..9463f50707 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_8.png diff --git a/indra/newview/skins/classic/textures/icons/Progress_9.png b/indra/newview/skins/classic/textures/icons/Progress_9.png Binary files differnew file mode 100644 index 0000000000..928a3e934e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Progress_9.png diff --git a/indra/newview/skins/classic/textures/icons/Refresh_Off.png b/indra/newview/skins/classic/textures/icons/Refresh_Off.png Binary files differnew file mode 100644 index 0000000000..e645a8159f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Refresh_Off.png diff --git a/indra/newview/skins/classic/textures/icons/SL_Logo.png b/indra/newview/skins/classic/textures/icons/SL_Logo.png Binary files differnew file mode 100644 index 0000000000..5e376c72f9 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/SL_Logo.png diff --git a/indra/newview/skins/classic/textures/icons/Search_Icon.png b/indra/newview/skins/classic/textures/icons/Search_Icon.png Binary files differnew file mode 100644 index 0000000000..0ea7b14f81 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Search_Icon.png diff --git a/indra/newview/skins/classic/textures/icons/Shirt_Large.png b/indra/newview/skins/classic/textures/icons/Shirt_Large.png Binary files differnew file mode 100644 index 0000000000..06fce6bbaa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Shirt_Large.png diff --git a/indra/newview/skins/classic/textures/icons/Shop.png b/indra/newview/skins/classic/textures/icons/Shop.png Binary files differnew file mode 100644 index 0000000000..93353cf2fe --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Shop.png diff --git a/indra/newview/skins/classic/textures/icons/SkipBackward_Off.png b/indra/newview/skins/classic/textures/icons/SkipBackward_Off.png Binary files differnew file mode 100644 index 0000000000..20fd2b8e22 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/SkipBackward_Off.png diff --git a/indra/newview/skins/classic/textures/icons/SkipForward_Off.png b/indra/newview/skins/classic/textures/icons/SkipForward_Off.png Binary files differnew file mode 100644 index 0000000000..30e28d3d31 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/SkipForward_Off.png diff --git a/indra/newview/skins/classic/textures/icons/StopReload_Off.png b/indra/newview/skins/classic/textures/icons/StopReload_Off.png Binary files differnew file mode 100644 index 0000000000..500a81d715 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/StopReload_Off.png diff --git a/indra/newview/skins/classic/textures/icons/StopReload_Over.png b/indra/newview/skins/classic/textures/icons/StopReload_Over.png Binary files differnew file mode 100644 index 0000000000..a065a37d14 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/StopReload_Over.png diff --git a/indra/newview/skins/classic/textures/icons/Stop_Off.png b/indra/newview/skins/classic/textures/icons/Stop_Off.png Binary files differnew file mode 100644 index 0000000000..2d00083e2e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Stop_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Disabled.png b/indra/newview/skins/classic/textures/icons/Sync_Disabled.png Binary files differnew file mode 100644 index 0000000000..7b39e7cd6f --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Enabled.png b/indra/newview/skins/classic/textures/icons/Sync_Enabled.png Binary files differnew file mode 100644 index 0000000000..0e7e5157cb --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Enabled.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_1.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_1.png Binary files differnew file mode 100644 index 0000000000..218edaa986 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_1.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_2.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_2.png Binary files differnew file mode 100644 index 0000000000..23cb9d63c0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_2.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_3.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_3.png Binary files differnew file mode 100644 index 0000000000..490826011a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_3.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_4.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_4.png Binary files differnew file mode 100644 index 0000000000..de1c815e90 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_4.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_5.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_5.png Binary files differnew file mode 100644 index 0000000000..2897b37382 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_5.png diff --git a/indra/newview/skins/classic/textures/icons/Sync_Progress_6.png b/indra/newview/skins/classic/textures/icons/Sync_Progress_6.png Binary files differnew file mode 100644 index 0000000000..862410e9e4 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Sync_Progress_6.png diff --git a/indra/newview/skins/classic/textures/icons/System_Notification_Large.png b/indra/newview/skins/classic/textures/icons/System_Notification_Large.png Binary files differnew file mode 100644 index 0000000000..01c6e31f41 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/System_Notification_Large.png diff --git a/indra/newview/skins/classic/textures/icons/System_Notification_Small.png b/indra/newview/skins/classic/textures/icons/System_Notification_Small.png Binary files differnew file mode 100644 index 0000000000..69b823d852 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/System_Notification_Small.png diff --git a/indra/newview/skins/classic/textures/icons/TrashItem_Disabled.png b/indra/newview/skins/classic/textures/icons/TrashItem_Disabled.png Binary files differnew file mode 100644 index 0000000000..800d9434d2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/TrashItem_Disabled.png diff --git a/indra/newview/skins/classic/textures/icons/TrashItem_Off.png b/indra/newview/skins/classic/textures/icons/TrashItem_Off.png Binary files differnew file mode 100644 index 0000000000..0cbff4f1d7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/TrashItem_Off.png diff --git a/indra/newview/skins/classic/textures/icons/TrashItem_Press.png b/indra/newview/skins/classic/textures/icons/TrashItem_Press.png Binary files differnew file mode 100644 index 0000000000..fac13226e7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/TrashItem_Press.png diff --git a/indra/newview/skins/classic/textures/icons/UnZoom_Off.png b/indra/newview/skins/classic/textures/icons/UnZoom_Off.png Binary files differnew file mode 100644 index 0000000000..34ec3f5de8 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/UnZoom_Off.png diff --git a/indra/newview/skins/classic/textures/icons/UpArrow_Off.png b/indra/newview/skins/classic/textures/icons/UpArrow_Off.png Binary files differnew file mode 100644 index 0000000000..d5ddc353e7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/UpArrow_Off.png diff --git a/indra/newview/skins/classic/textures/icons/Video_URL_Off.png b/indra/newview/skins/classic/textures/icons/Video_URL_Off.png Binary files differnew file mode 100644 index 0000000000..d37a189645 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Video_URL_Off.png diff --git a/indra/newview/skins/classic/textures/icons/VoiceMute_Off.png b/indra/newview/skins/classic/textures/icons/VoiceMute_Off.png Binary files differnew file mode 100644 index 0000000000..425ba267a5 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoiceMute_Off.png diff --git a/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl1.png b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl1.png Binary files differnew file mode 100644 index 0000000000..cc3407b57d --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl1.png diff --git a/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl2.png b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl2.png Binary files differnew file mode 100644 index 0000000000..49f58d7cd0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl2.png diff --git a/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl3.png b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl3.png Binary files differnew file mode 100644 index 0000000000..a4a171bd81 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoicePTT_Lvl3.png diff --git a/indra/newview/skins/classic/textures/icons/VoicePTT_Off.png b/indra/newview/skins/classic/textures/icons/VoicePTT_Off.png Binary files differnew file mode 100644 index 0000000000..533663a4fa --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoicePTT_Off.png diff --git a/indra/newview/skins/classic/textures/icons/VoicePTT_On.png b/indra/newview/skins/classic/textures/icons/VoicePTT_On.png Binary files differnew file mode 100644 index 0000000000..204c4a376e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/VoicePTT_On.png diff --git a/indra/newview/skins/classic/textures/icons/Web_Profile_Off.png b/indra/newview/skins/classic/textures/icons/Web_Profile_Off.png Binary files differnew file mode 100644 index 0000000000..cf8f9c8f94 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Web_Profile_Off.png diff --git a/indra/newview/skins/classic/textures/icons/YouAreHere_Badge.png b/indra/newview/skins/classic/textures/icons/YouAreHere_Badge.png Binary files differnew file mode 100644 index 0000000000..ed1805c096 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/YouAreHere_Badge.png diff --git a/indra/newview/skins/classic/textures/icons/Zoom_Off.png b/indra/newview/skins/classic/textures/icons/Zoom_Off.png Binary files differnew file mode 100644 index 0000000000..833e608201 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/Zoom_Off.png diff --git a/indra/newview/skins/classic/textures/icons/add_icon.png b/indra/newview/skins/classic/textures/icons/add_icon.png Binary files differnew file mode 100644 index 0000000000..b5b09ae6e0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/add_icon.png diff --git a/indra/newview/skins/classic/textures/icons/back_arrow_off.png b/indra/newview/skins/classic/textures/icons/back_arrow_off.png Binary files differnew file mode 100644 index 0000000000..c9c7bf5fec --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/back_arrow_off.png diff --git a/indra/newview/skins/classic/textures/icons/back_arrow_over.png b/indra/newview/skins/classic/textures/icons/back_arrow_over.png Binary files differnew file mode 100644 index 0000000000..ee6acc2653 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/back_arrow_over.png diff --git a/indra/newview/skins/classic/textures/icons/back_arrow_press.png b/indra/newview/skins/classic/textures/icons/back_arrow_press.png Binary files differnew file mode 100644 index 0000000000..9876b4eeb7 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/back_arrow_press.png diff --git a/indra/newview/skins/classic/textures/icons/check_mark.png b/indra/newview/skins/classic/textures/icons/check_mark.png Binary files differnew file mode 100644 index 0000000000..95ca9dbd6c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/check_mark.png diff --git a/indra/newview/skins/classic/textures/icons/collapse_to_one_line.png b/indra/newview/skins/classic/textures/icons/collapse_to_one_line.png Binary files differnew file mode 100644 index 0000000000..3730924ad8 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/collapse_to_one_line.png diff --git a/indra/newview/skins/classic/textures/icons/copy_clipboard.png b/indra/newview/skins/classic/textures/icons/copy_clipboard.png Binary files differnew file mode 100644 index 0000000000..9ce67d8547 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/copy_clipboard.png diff --git a/indra/newview/skins/classic/textures/icons/delete_icon.png b/indra/newview/skins/classic/textures/icons/delete_icon.png Binary files differnew file mode 100644 index 0000000000..5a80155d8b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/delete_icon.png diff --git a/indra/newview/skins/classic/textures/icons/edit_mine.png b/indra/newview/skins/classic/textures/icons/edit_mine.png Binary files differnew file mode 100644 index 0000000000..2fb10deba2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/edit_mine.png diff --git a/indra/newview/skins/classic/textures/icons/edit_theirs.png b/indra/newview/skins/classic/textures/icons/edit_theirs.png Binary files differnew file mode 100644 index 0000000000..586c08c181 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/edit_theirs.png diff --git a/indra/newview/skins/classic/textures/icons/emoji_picker_icon.png b/indra/newview/skins/classic/textures/icons/emoji_picker_icon.png Binary files differnew file mode 100644 index 0000000000..6c1a1a3c62 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/emoji_picker_icon.png diff --git a/indra/newview/skins/classic/textures/icons/expand_one_liner.png b/indra/newview/skins/classic/textures/icons/expand_one_liner.png Binary files differnew file mode 100644 index 0000000000..0d1a60547a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/expand_one_liner.png diff --git a/indra/newview/skins/classic/textures/icons/file_upload.png b/indra/newview/skins/classic/textures/icons/file_upload.png Binary files differnew file mode 100644 index 0000000000..78b75fdd72 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/file_upload.png diff --git a/indra/newview/skins/classic/textures/icons/hand.png b/indra/newview/skins/classic/textures/icons/hand.png Binary files differnew file mode 100644 index 0000000000..5fbdb70c2b --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/hand.png diff --git a/indra/newview/skins/classic/textures/icons/map_placeholder.png b/indra/newview/skins/classic/textures/icons/map_placeholder.png Binary files differnew file mode 100644 index 0000000000..80e5deac7e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/map_placeholder.png diff --git a/indra/newview/skins/classic/textures/icons/multi_folder_mode.png b/indra/newview/skins/classic/textures/icons/multi_folder_mode.png Binary files differnew file mode 100644 index 0000000000..b363848aba --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/multi_folder_mode.png diff --git a/indra/newview/skins/classic/textures/icons/nearby_chat_icon.png b/indra/newview/skins/classic/textures/icons/nearby_chat_icon.png Binary files differnew file mode 100644 index 0000000000..c5f52f010e --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/nearby_chat_icon.png diff --git a/indra/newview/skins/classic/textures/icons/object_icon.png b/indra/newview/skins/classic/textures/icons/object_icon.png Binary files differnew file mode 100644 index 0000000000..51bf0b0649 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/object_icon.png diff --git a/indra/newview/skins/classic/textures/icons/paste_clipboard.png b/indra/newview/skins/classic/textures/icons/paste_clipboard.png Binary files differnew file mode 100644 index 0000000000..ff8493d4ad --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/paste_clipboard.png diff --git a/indra/newview/skins/classic/textures/icons/pop_up_caution.png b/indra/newview/skins/classic/textures/icons/pop_up_caution.png Binary files differnew file mode 100644 index 0000000000..63b5cdfe83 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/pop_up_caution.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_beta.png b/indra/newview/skins/classic/textures/icons/profile_badge_beta.png Binary files differnew file mode 100644 index 0000000000..95e277aab0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_beta.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_beta_lifetime.png b/indra/newview/skins/classic/textures/icons/profile_badge_beta_lifetime.png Binary files differnew file mode 100644 index 0000000000..fb145901e2 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_beta_lifetime.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_lifetime.png b/indra/newview/skins/classic/textures/icons/profile_badge_lifetime.png Binary files differnew file mode 100644 index 0000000000..3f7fd343b3 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_lifetime.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_linden.png b/indra/newview/skins/classic/textures/icons/profile_badge_linden.png Binary files differnew file mode 100644 index 0000000000..6ab9fcebea --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_linden.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_pplus_lifetime.png b/indra/newview/skins/classic/textures/icons/profile_badge_pplus_lifetime.png Binary files differnew file mode 100644 index 0000000000..5c68ad40ce --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_pplus_lifetime.png diff --git a/indra/newview/skins/classic/textures/icons/profile_badge_premium_lifetime.png b/indra/newview/skins/classic/textures/icons/profile_badge_premium_lifetime.png Binary files differnew file mode 100644 index 0000000000..58957b7b96 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_badge_premium_lifetime.png diff --git a/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off.png b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off.png Binary files differnew file mode 100644 index 0000000000..331553492c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off.png diff --git a/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off_pressed.png b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off_pressed.png Binary files differnew file mode 100644 index 0000000000..e9e9c1b626 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_off_pressed.png diff --git a/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on.png b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on.png Binary files differnew file mode 100644 index 0000000000..4f5374d614 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on.png diff --git a/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on_pressed.png b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on_pressed.png Binary files differnew file mode 100644 index 0000000000..e8a64541ee --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/profile_group_visibility_eye_on_pressed.png diff --git a/indra/newview/skins/classic/textures/icons/remove_icon.png b/indra/newview/skins/classic/textures/icons/remove_icon.png Binary files differnew file mode 100644 index 0000000000..d8a45cc21c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/remove_icon.png diff --git a/indra/newview/skins/classic/textures/icons/see_me_online.png b/indra/newview/skins/classic/textures/icons/see_me_online.png Binary files differnew file mode 100644 index 0000000000..adc37f5528 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/see_me_online.png diff --git a/indra/newview/skins/classic/textures/icons/see_on_map.png b/indra/newview/skins/classic/textures/icons/see_on_map.png Binary files differnew file mode 100644 index 0000000000..73415b9afe --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/see_on_map.png diff --git a/indra/newview/skins/classic/textures/icons/see_them_on_map.png b/indra/newview/skins/classic/textures/icons/see_them_on_map.png Binary files differnew file mode 100644 index 0000000000..e5f2978dc0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/see_them_on_map.png diff --git a/indra/newview/skins/classic/textures/icons/see_them_online.png b/indra/newview/skins/classic/textures/icons/see_them_online.png Binary files differnew file mode 100644 index 0000000000..7ddd41f9a0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/see_them_online.png diff --git a/indra/newview/skins/classic/textures/icons/single_folder_back.png b/indra/newview/skins/classic/textures/icons/single_folder_back.png Binary files differnew file mode 100644 index 0000000000..b93bb2525a --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/single_folder_back.png diff --git a/indra/newview/skins/classic/textures/icons/single_folder_forward.png b/indra/newview/skins/classic/textures/icons/single_folder_forward.png Binary files differnew file mode 100644 index 0000000000..12a21b2bba --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/single_folder_forward.png diff --git a/indra/newview/skins/classic/textures/icons/single_folder_mode.png b/indra/newview/skins/classic/textures/icons/single_folder_mode.png Binary files differnew file mode 100644 index 0000000000..0fc8475917 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/single_folder_mode.png diff --git a/indra/newview/skins/classic/textures/icons/single_folder_up.png b/indra/newview/skins/classic/textures/icons/single_folder_up.png Binary files differnew file mode 100644 index 0000000000..c1c8c63870 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/single_folder_up.png diff --git a/indra/newview/skins/classic/textures/icons/snapshot_icon.png b/indra/newview/skins/classic/textures/icons/snapshot_icon.png Binary files differnew file mode 100644 index 0000000000..9b6ac6eeb0 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/snapshot_icon.png diff --git a/indra/newview/skins/classic/textures/icons/texture_icon.png b/indra/newview/skins/classic/textures/icons/texture_icon.png Binary files differnew file mode 100644 index 0000000000..f5c205208c --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/texture_icon.png diff --git a/indra/newview/skins/classic/textures/icons/thumbnail_fallback_icon.png b/indra/newview/skins/classic/textures/icons/thumbnail_fallback_icon.png Binary files differnew file mode 100644 index 0000000000..19629aba04 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/thumbnail_fallback_icon.png diff --git a/indra/newview/skins/classic/textures/icons/unknown_icon.png b/indra/newview/skins/classic/textures/icons/unknown_icon.png Binary files differnew file mode 100644 index 0000000000..9a4e7f8616 --- /dev/null +++ b/indra/newview/skins/classic/textures/icons/unknown_icon.png diff --git a/indra/newview/skins/classic/textures/megapahit/fps_button.png b/indra/newview/skins/classic/textures/megapahit/fps_button.png Binary files differnew file mode 100644 index 0000000000..fa436a620d --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/fps_button.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_blue_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_blue_bullet.png Binary files differnew file mode 100644 index 0000000000..1a27570786 --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_blue_bullet.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_green_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_green_bullet.png Binary files differnew file mode 100644 index 0000000000..f4c28e4bc9 --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_green_bullet.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_help_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_help_bullet.png Binary files differnew file mode 100644 index 0000000000..64c8933a78 --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_help_bullet.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_info_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_info_bullet.png Binary files differnew file mode 100644 index 0000000000..c90767b9ac --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_info_bullet.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_red_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_red_bullet.png Binary files differnew file mode 100644 index 0000000000..aeaa52b53b --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_red_bullet.png diff --git a/indra/newview/skins/classic/textures/megapahit/mp_yellow_bullet.png b/indra/newview/skins/classic/textures/megapahit/mp_yellow_bullet.png Binary files differnew file mode 100644 index 0000000000..026fbaf56d --- /dev/null +++ b/indra/newview/skins/classic/textures/megapahit/mp_yellow_bullet.png diff --git a/indra/newview/skins/classic/textures/model_wizard/progress_bar_bg.png b/indra/newview/skins/classic/textures/model_wizard/progress_bar_bg.png Binary files differnew file mode 100644 index 0000000000..7c6920205f --- /dev/null +++ b/indra/newview/skins/classic/textures/model_wizard/progress_bar_bg.png diff --git a/indra/newview/skins/classic/textures/model_wizard/progress_light.png b/indra/newview/skins/classic/textures/model_wizard/progress_light.png Binary files differnew file mode 100644 index 0000000000..2e64604a4d --- /dev/null +++ b/indra/newview/skins/classic/textures/model_wizard/progress_light.png diff --git a/indra/newview/skins/classic/textures/navbar/Arrow_Left_Off.png b/indra/newview/skins/classic/textures/navbar/Arrow_Left_Off.png Binary files differnew file mode 100644 index 0000000000..19569501fe --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Arrow_Left_Off.png diff --git a/indra/newview/skins/classic/textures/navbar/Arrow_Right_Off.png b/indra/newview/skins/classic/textures/navbar/Arrow_Right_Off.png Binary files differnew file mode 100644 index 0000000000..3648c42656 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Arrow_Right_Off.png diff --git a/indra/newview/skins/classic/textures/navbar/BuyArrow_Over.png b/indra/newview/skins/classic/textures/navbar/BuyArrow_Over.png Binary files differnew file mode 100644 index 0000000000..3d9c758574 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/BuyArrow_Over.png diff --git a/indra/newview/skins/classic/textures/navbar/BuyArrow_Press.png b/indra/newview/skins/classic/textures/navbar/BuyArrow_Press.png Binary files differnew file mode 100644 index 0000000000..69b0d43900 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/BuyArrow_Press.png diff --git a/indra/newview/skins/classic/textures/navbar/Favorite_Link_Over.png b/indra/newview/skins/classic/textures/navbar/Favorite_Link_Over.png Binary files differnew file mode 100644 index 0000000000..d4f126f969 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Favorite_Link_Over.png diff --git a/indra/newview/skins/classic/textures/navbar/Favorite_Star_Active.png b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Active.png Binary files differnew file mode 100644 index 0000000000..fce54942d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Active.png diff --git a/indra/newview/skins/classic/textures/navbar/Favorite_Star_Off.png b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Off.png Binary files differnew file mode 100644 index 0000000000..82d044d817 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Off.png diff --git a/indra/newview/skins/classic/textures/navbar/Favorite_Star_Over.png b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Over.png Binary files differnew file mode 100644 index 0000000000..8cc3f02c5a --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Over.png diff --git a/indra/newview/skins/classic/textures/navbar/Favorite_Star_Press.png b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Press.png Binary files differnew file mode 100644 index 0000000000..6670667022 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Favorite_Star_Press.png diff --git a/indra/newview/skins/classic/textures/navbar/FileMenu_Divider.png b/indra/newview/skins/classic/textures/navbar/FileMenu_Divider.png Binary files differnew file mode 100644 index 0000000000..5ab4abc5b8 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/FileMenu_Divider.png diff --git a/indra/newview/skins/classic/textures/navbar/Flag.png b/indra/newview/skins/classic/textures/navbar/Flag.png Binary files differnew file mode 100644 index 0000000000..df53c89224 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Flag.png diff --git a/indra/newview/skins/classic/textures/navbar/Help_Press.png b/indra/newview/skins/classic/textures/navbar/Help_Press.png Binary files differnew file mode 100644 index 0000000000..ed3695f9d5 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Help_Press.png diff --git a/indra/newview/skins/classic/textures/navbar/Home_Off.png b/indra/newview/skins/classic/textures/navbar/Home_Off.png Binary files differnew file mode 100644 index 0000000000..fe3bc63b77 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Home_Off.png diff --git a/indra/newview/skins/classic/textures/navbar/Info_Off.png b/indra/newview/skins/classic/textures/navbar/Info_Off.png Binary files differnew file mode 100644 index 0000000000..6399cd6715 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Info_Off.png diff --git a/indra/newview/skins/classic/textures/navbar/Info_Over.png b/indra/newview/skins/classic/textures/navbar/Info_Over.png Binary files differnew file mode 100644 index 0000000000..a296d2014f --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Info_Over.png diff --git a/indra/newview/skins/classic/textures/navbar/Info_Press.png b/indra/newview/skins/classic/textures/navbar/Info_Press.png Binary files differnew file mode 100644 index 0000000000..2afc4a9143 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Info_Press.png diff --git a/indra/newview/skins/classic/textures/navbar/Landmarks.png b/indra/newview/skins/classic/textures/navbar/Landmarks.png Binary files differnew file mode 100644 index 0000000000..2b35de913b --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Landmarks.png diff --git a/indra/newview/skins/classic/textures/navbar/Lock.png b/indra/newview/skins/classic/textures/navbar/Lock.png Binary files differnew file mode 100644 index 0000000000..cf569d6ad2 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Lock.png diff --git a/indra/newview/skins/classic/textures/navbar/NavBar_BG.png b/indra/newview/skins/classic/textures/navbar/NavBar_BG.png Binary files differnew file mode 100644 index 0000000000..6a91700ae0 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/NavBar_BG.png diff --git a/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoFav_Bevel.png b/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoFav_Bevel.png Binary files differnew file mode 100644 index 0000000000..c61dcde58c --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoFav_Bevel.png diff --git a/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoNav_Bevel.png b/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoNav_Bevel.png Binary files differnew file mode 100644 index 0000000000..9e3da34596 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/NavBar_BG_NoNav_Bevel.png diff --git a/indra/newview/skins/classic/textures/navbar/Row_Selection.png b/indra/newview/skins/classic/textures/navbar/Row_Selection.png Binary files differnew file mode 100644 index 0000000000..cfc31f8d32 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Row_Selection.png diff --git a/indra/newview/skins/classic/textures/navbar/Search.png b/indra/newview/skins/classic/textures/navbar/Search.png Binary files differnew file mode 100644 index 0000000000..4c29e57f7b --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/Search.png diff --git a/indra/newview/skins/classic/textures/navbar/separator.png b/indra/newview/skins/classic/textures/navbar/separator.png Binary files differnew file mode 100644 index 0000000000..c1d74e5a64 --- /dev/null +++ b/indra/newview/skins/classic/textures/navbar/separator.png diff --git a/indra/newview/skins/classic/textures/taskpanel/Activate_Checkmark.png b/indra/newview/skins/classic/textures/taskpanel/Activate_Checkmark.png Binary files differnew file mode 100644 index 0000000000..213acbe87b --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/Activate_Checkmark.png diff --git a/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Foreground.png b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Foreground.png Binary files differnew file mode 100644 index 0000000000..4e59042e33 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Foreground.png diff --git a/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Press.png b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Press.png Binary files differnew file mode 100644 index 0000000000..be7b298bb8 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Dock_Press.png diff --git a/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Foreground.png b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Foreground.png Binary files differnew file mode 100644 index 0000000000..1e234ff09b --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Foreground.png diff --git a/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Press.png b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Press.png Binary files differnew file mode 100644 index 0000000000..48c78b453d --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/Sidebar_Icon_Undock_Press.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Close_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Close_Off.png Binary files differnew file mode 100644 index 0000000000..bc4e00c646 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Close_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Home_Selected.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Home_Selected.png Binary files differnew file mode 100644 index 0000000000..293aeef5e6 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Home_Selected.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Me_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Me_Off.png Binary files differnew file mode 100644 index 0000000000..760db9360d --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Me_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Open_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Open_Off.png Binary files differnew file mode 100644 index 0000000000..4556602f58 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Open_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_People_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_People_Off.png Binary files differnew file mode 100644 index 0000000000..691b600510 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_People_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Places_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Places_Off.png Binary files differnew file mode 100644 index 0000000000..f5a5f7a846 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Places_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TabIcon_Things_Off.png b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Things_Off.png Binary files differnew file mode 100644 index 0000000000..e56eda9802 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TabIcon_Things_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Off.png b/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Off.png Binary files differnew file mode 100644 index 0000000000..4ed7a2b183 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Off.png diff --git a/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Selected.png b/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Selected.png Binary files differnew file mode 100644 index 0000000000..b3316386b9 --- /dev/null +++ b/indra/newview/skins/classic/textures/taskpanel/TaskPanel_Tab_Selected.png diff --git a/indra/newview/skins/classic/textures/textures.xml b/indra/newview/skins/classic/textures/textures.xml new file mode 100644 index 0000000000..a8fc8faa44 --- /dev/null +++ b/indra/newview/skins/classic/textures/textures.xml @@ -0,0 +1,931 @@ +<!-- +This file contains metadata about how to load, display, and scale textures for rendering in the UI. +Images do *NOT* have to appear in this file in order to use them as textures in the UI...simply refer +to them by filename (relative to textures directory). +NOTE: if you want to reuse an image file with different metadata, simply create a new texture entry +with the same filename but different name + +<texture + name="MyTexture" (mandatory) + - this is the name you reference the texture by in XUI. For example, <button image_unselected="MyTexture"/> + file_name="images/my_texture.png" (optional) + - this is the path to the actual file asset, relative to the current skins "textures" directory. + If not supplied, the filename will be taken from the texture name itself, "MyTexture" in this case. + NOTE: you need to provide an extension on the filename (".png", ".tga", ".jpg") for us to decode the image properly + preload="true" (optional, false by default) + - If true, we will attempt to load the image before displaying any UI. + If false, we will load in the background after initializing the UI. + use_mips="true" (currently unused) + scale.left="1" + scale.bottom="1" + scale.top="15" + scale.right="31" + - Specifies the segmentation for 9-slice image scaling. Specifically, the pixel offsets from the LOWER LEFT corner + that define the region of the image that is stretched to make the whole image fit in the required space. + In this example, if the source image is 32x16 pixels, we have defined a center region that starts one pixel up + and to the right from the bottom left corner and extends to 31 pixels right and 15 pixels up from the bottom left + corner. The end result is that the image will keep a 1 pixel border all around while stretching to fit the required + region. +--> + +<textures version="101"> + <!-- Please add new files alphabetically to prevent merge conflicts. JC --> + <texture name="Accordion_ArrowClosed_Off" file_name="containers/Accordion_ArrowClosed_Off.png" preload="false" /> + <texture name="Accordion_ArrowClosed_Press" file_name="containers/Accordion_ArrowClosed_Press.png" preload="false" /> + <texture name="Accordion_ArrowOpened_Off" file_name="containers/Accordion_ArrowOpened_Off.png" preload="false" /> + <texture name="Accordion_ArrowOpened_Press" file_name="containers/Accordion_ArrowOpened_Press.png" preload="false" /> + <texture name="Accordion_Off" file_name="containers/Accordion_Off.png" preload="false" /> + <texture name="Accordion_Press" file_name="containers/Accordion_Press.png" preload="false" /> + <texture name="Accordion_Over" file_name="containers/Accordion_Over.png" preload="false" /> + <texture name="Accordion_Selected" file_name="containers/Accordion_Selected.png" preload="false" /> + + <texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" /> + + <texture name="AddItem_Disabled" file_name="icons/AddItem_Disabled.png" preload="false" /> + <texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" /> + <texture name="AddItem_Press" file_name="icons/AddItem_Press.png" preload="false" /> + + <texture name="add_payment_image_center" file_name="windows/add_payment_image_center.png" preload="true" /> + <texture name="add_payment_image_left" file_name="windows/add_payment_image_left.png" preload="true" /> + <texture name="add_payment_image_right" file_name="windows/add_payment_image_right.png" preload="true" /> + + <texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true" /> + <texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" /> + + <texture name="Arrow_Small_Up" file_name="widgets/Arrow_Small_Up.png" preload="true" /> + <texture name="Arrow_Small_Left" file_name="widgets/Arrow_Small_Left.png" preload="true" /> + <texture name="Arrow_Small_Right" file_name="widgets/Arrow_Small_Right.png" preload="true" /> + + <texture name="Arrow_Down" file_name="widgets/Arrow_Down.png" preload="true" /> + <texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" /> + <texture name="Arrow_Left" file_name="widgets/Arrow_Left.png" preload="true" /> + <texture name="Arrow_Right" file_name="widgets/Arrow_Right.png" preload="true" /> + + <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" /> + <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" /> + <texture name="VoiceMute_Off" file_name="icons/VoiceMute_Off.png" preload="false" /> + + <texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" /> + <texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" /> + + <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" /> + + <texture name="BackButton_Off" file_name="icons/back_arrow_off.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> + <texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> + <texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" /> + + <texture name="Error_Tag_Background" file_name="widgets/Error_Tag_Background.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" /> + <texture name="New_Tag_Background" file_name="widgets/New_Tag_Background.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" /> + <texture name="New_Tag_Border" file_name="widgets/New_Tag_Border.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" /> + + <texture name="Badge_Background" file_name="widgets/Badge_Background.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="Badge_Border" file_name="widgets/Badge_Border.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + + <texture name="Blank" file_name="Blank.png" preload="false" /> + + <texture name="BreadCrumbBtn_Left_Disabled" file_name="widgets/BreadCrumbBtn_Left_Disabled.png" preload="false"/> + <texture name="BreadCrumbBtn_Left_Off" file_name="widgets/BreadCrumbBtn_Left_Off.png" preload="false"/> + <texture name="BreadCrumbBtn_Left_Over" file_name="widgets/BreadCrumbBtn_Left_Over.png" preload="false"/> + <texture name="BreadCrumbBtn_Left_Press" file_name="widgets/BreadCrumbBtn_Left_Press.png" preload="false"/> + + <texture name="BreadCrumbBtn_Middle_Disabled" file_name="widgets/BreadCrumbBtn_Middle_Disabled.png" preload="false"/> + <texture name="BreadCrumbBtn_Middle_Off" file_name="widgets/BreadCrumbBtn_Middle_Off.png" preload="false"/> + <texture name="BreadCrumbBtn_Middle_Over" file_name="widgets/BreadCrumbBtn_Middle_Over.png" preload="false"/> + <texture name="BreadCrumbBtn_Middle_Press" file_name="widgets/BreadCrumbBtn_Middle_Press.png" preload="false"/> + + <texture name="BreadCrumbBtn_Right_Disabled" file_name="widgets/BreadCrumbBtn_Right_Disabled.png" preload="false"/> + <texture name="BreadCrumbBtn_Right_Off" file_name="widgets/BreadCrumbBtn_Right_Off.png" preload="false"/> + <texture name="BreadCrumbBtn_Right_Over" file_name="widgets/BreadCrumbBtn_Right_Over.png" preload="false"/> + <texture name="BreadCrumbBtn_Right_Press" file_name="widgets/BreadCrumbBtn_Right_Press.png" preload="false"/> + + <texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="0" scale.top="1" scale.right="0" scale.bottom="0" /> + <texture name="BuyArrow_Press" file_name="navbar/BuyArrow_Press.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> + + <texture name="Cam_Avatar_Off" file_name="bottomtray/Cam_Avatar_Off.png" preload="true" /> + <texture name="Cam_FreeCam_Off" file_name="bottomtray/Cam_FreeCam_Off.png" preload="false" /> + <texture name="Cam_Orbit_Off" file_name="bottomtray/Cam_Orbit_Off.png" preload="false" /> + <texture name="Cam_Pan_Off" file_name="bottomtray/Cam_Pan_Off.png" preload="false" /> + + <texture name="Cam_Preset_Back_Off" file_name="bottomtray/Cam_Preset_Back_Off.png" preload="false" /> + <texture name="Cam_Preset_Back_On" file_name="bottomtray/Cam_Preset_Back_On.png" preload="false" /> + <texture name="Cam_Preset_Eye_Off" file_name="bottomtray/Cam_Preset_Eye_Off.png" preload="false" /> + <texture name="Cam_Preset_Front_Off" file_name="bottomtray/Cam_Preset_Front_Off.png" preload="false" /> + <texture name="Cam_Preset_Front_On" file_name="bottomtray/Cam_Preset_Front_On.png" preload="false" /> + <texture name="Cam_Preset_Side_Off" file_name="bottomtray/Cam_Preset_Side_Off.png" preload="false" /> + <texture name="Cam_Preset_Side_On" file_name="bottomtray/Cam_Preset_Side_On.png" preload="false" /> + + <texture name="Cam_Rotate_In" file_name="bottomtray/Cam_Rotate_In.png" preload="false" /> + <texture name="Cam_Rotate_Out" file_name="bottomtray/Cam_Rotate_Out.png" preload="false" /> + <texture name="Cam_Rotate_Center" file_name="bottomtray/Cam_Rotate_Center.png" preload="false" /> + <texture name="Cam_Tracking_In" file_name="bottomtray/Cam_Tracking_In.png" preload="false" /> + <texture name="Cam_Tracking_Out" file_name="bottomtray/Cam_Tracking_Out.png" preload="false" /> + <texture name="Cam_Tracking_Center" file_name="bottomtray/Cam_Tracking_Center.png" preload="false" /> + + <texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" /> + <texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" /> + <texture name="Checkbox_Off" file_name="widgets/Checkbox_Off.png" preload="true" /> + <texture name="Checkbox_On" file_name="widgets/Checkbox_On.png" preload="true" /> + <texture name="Checkbox_On_Press" file_name="widgets/Checkbox_On_Press.png" preload="true" /> + <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" /> + <texture name="Check_Mark" file_name="icons/check_mark.png" preload="true" /> + + <texture name="Checker" file_name="checker.png" preload="false" /> + + <texture name="Command_360_Capture_Icon" file_name="toolbar_icons/360_capture.png" preload="true" /> + <texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" /> + <texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" /> + <texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" /> + <texture name="Command_Build_Icon" file_name="toolbar_icons/build.png" preload="true" /> + <texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" /> + <texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" /> + <texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" /> + <texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" /> + <texture name="Command_Grid_Status_Icon" file_name="toolbar_icons/grid_status.png" preload="true" /> + <texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" /> + <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" /> + <texture name="Command_Map_Icon" file_name="toolbar_icons/map.png" preload="true" /> + <texture name="Command_Marketplace_Icon" file_name="toolbar_icons/marketplace.png" preload="true" /> + <texture name="Command_MktListings_Icon" file_name="toolbar_icons/mktlistings.png" preload="true" /> + <texture name="Command_MiniCart_Icon" file_name="toolbar_icons/mini_cart.png" preload="true" /> + <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" /> + <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" /> + <texture name="Command_Environments_Icon" file_name="toolbar_icons/environments.png" preload="true" /> + <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> + <texture name="Command_Performance_Icon" file_name="toolbar_icons/performance.png" preload="true" /> + <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" /> + <texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" /> + <texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" /> + <texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" /> + <texture name="Command_Report_Abuse_Icon" file_name="toolbar_icons/report_abuse.png" preload="true" /> + <texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" /> + <texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" /> + <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" /> + <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" /> + <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" /> + <texture name="Command_FavoriteFolder_Icon" file_name="toolbar_icons/favorite_folder.png" preload="true" /> + <texture name="Command_Resync_Animations" file_name="toolbar_icons/resync_animations.png" preload="true" /> + <texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" /> + <texture name="Caret_Right_Icon" file_name="toolbar_icons/caret_right.png" preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" /> + <texture name="Caret_Left_Icon" file_name="toolbar_icons/caret_left.png" preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" /> + + <texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_UpSelected" file_name="widgets/ComboButton_UpSelected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + + <texture name="Container" file_name="containers/Container.png" preload="false" /> + + <texture name="Conv_toolbar_add_person" file_name="icons/Conv_toolbar_add_person.png" preload="false" /> + <texture name="Conv_toolbar_arrow_ne" file_name="icons/Conv_toolbar_arrow_ne.png" preload="false" /> + <texture name="Conv_toolbar_arrow_sw" file_name="icons/Conv_toolbar_arrow_sw.png" preload="false" /> + <texture name="Conv_toolbar_call_log" file_name="icons/Conv_toolbar_call_log.png" preload="false" /> + <texture name="Conv_toolbar_close" file_name="icons/Conv_toolbar_close.png" preload="false" /> + <texture name="Conv_toolbar_collapse" file_name="icons/Conv_toolbar_collapse.png" preload="false" /> + <texture name="Conv_collapse_to_one_line" file_name="icons/collapse_to_one_line.png" preload="false" /> + <texture name="Conv_expand_one_line" file_name="icons/expand_one_liner.png" preload="false" /> + <texture name="Conv_toolbar_expand" file_name="icons/Conv_toolbar_expand.png" preload="false" /> + <texture name="Conv_toolbar_hang_up" file_name="icons/Conv_toolbar_hang_up.png" preload="false" /> + <texture name="Conv_toolbar_open_call" file_name="icons/Conv_toolbar_open_call.png" preload="false" /> + <texture name="Conv_toolbar_plus" file_name="icons/Conv_toolbar_plus.png" preload="false" /> + <texture name="Conv_toolbar_sort" file_name="icons/Conv_toolbar_sort.png" preload="false" /> + <texture name="Conv_log_inbox" file_name="icons/Conv_log_inbox.png" preload="false" /> + + <texture name="Copy" file_name="icons/Copy.png" preload="false" /> + <texture name="CopyBright" file_name="icons/CopyBright.png" preload="false" /> + + <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> + + <texture name="ChatBarHandle" file_name="bottomtray/ChatBarHandle.png" preload="false" /> + <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> + <texture name="DownArrow_Off" file_name="icons/DownArrow_Off.png" preload="false" /> + <texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" /> + + <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> + <texture name="DropDown_Press" file_name="widgets/DropDown_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> + <texture name="DropDown_On" file_name="widgets/DropDown_On.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> + <texture name="DropDown_Off" file_name="widgets/DropDown_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> + + <texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" /> + + <texture name="Emoji_Picker_Icon" file_name="icons/emoji_picker_icon.png" preload="true" /> + <texture name="ExternalBrowser_Off" file_name="icons/ExternalBrowser_Off.png" preload="false" /> + <texture name="Edit_Wrench" file_name="icons/Edit_Wrench.png" preload="false" /> + + <texture name="Presets_Icon" file_name="icons/Presets_Icon.png" preload="true" /> + + <texture name="Presets_Icon" file_name="icons/Presets_Icon.png" preload="true" /> + <texture name="Presets_Icon_Graphic" file_name="icons/Presets_Icon_Graphic.png" preload="true" /> + <texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" /> + <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" /> + <texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" /> + <texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" /> + <texture name="Favorite_Link_Over" file_name="navbar/Favorite_Link_Over.png" preload="false" /> + + + <texture name="Flag" file_name="navbar/Flag.png" preload="false" /> + + <texture name="Flyout_Left" file_name="windows/Flyout_Left.png" preload="false" /> + <texture name="Flyout_Pointer" file_name="windows/Flyout_Pointer.png" preload="false" /> + <texture name="Flyout_Right" file_name="windows/Flyout_Right.png" preload="false" /> + + <texture name="Folder_Arrow" file_name="folder_arrow.tga" preload="false" /> + <texture name="ForSale_Badge" file_name="icons/ForSale_Badge.png" preload="false" /> + <texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" /> + <texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" /> + + <texture name="Generic_Experience" file_name="Blank.png" preload="false" /> + <texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" /> + <texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" /> + <texture name="icon_group.tga" file_name="icons/Generic_Group.png" preload="false" /> + <texture name="Generic_Object_Small" file_name="icons/Generic_Object_Small.png" preload="false" /> + <texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" /> + <texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" /> + + <texture name="Group_Notices" file_name="icons/Group_Notices.png" preload="false" /> + + <texture name="Hand" file_name="icons/hand.png" preload="false" /> + + <texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" /> + + <texture name="Hierarchy_View_Disabled" file_name="icons/Hierarchy_View_Disabled.png" preload="false" /> + <texture name="Hierarchy_View_On" file_name="icons/Hierarchy_View_On.png" preload="false" /> + + + <texture name="Home_Off" file_name="navbar/Home_Off.png" preload="false" /> + <texture name="Horizontal Drag Handle" file_name="widgets/horizontal_drag_handle.png" scale.left="8" scale.right="120" scale.bottom="1" scale.top="6" scale_type="scale_outer"/> + + <texture name="Icon_Close_Foreground" file_name="windows/Icon_Close_Foreground.png" preload="true" /> + <texture name="Icon_Close_Press" file_name="windows/Icon_Close_Press.png" preload="true" /> + <texture name="Icon_Close_Toast" file_name="windows/Icon_Close_Toast.png" preload="true" /> + + <texture name="Icon_Copy" file_name="icons/copy_clipboard.png" preload="true" /> + + <texture name="Icon_Delete" file_name="icons/delete_icon.png" preload="true" /> + + <texture name="Icon_Dock_Foreground" file_name="windows/Icon_Dock_Foreground.png" preload="true" /> + <texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" /> + + <texture name="Icon_File_Upload" file_name="icons/file_upload.png" preload="true" /> + + <texture name="Icon_For_Sale" file_name="icons/Icon_For_Sale.png" preload="false" /> + + <texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="false" /> + <texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" /> + <texture name="Icon_Gear_Press" file_name="windows/Icon_Gear_Press.png" preload="false" /> + <texture name="Icon_Gear" file_name="windows/Icon_Gear.png" preload="false" /> + + <texture name="Icon_Help_Foreground" file_name="windows/Icon_Help_Foreground.png" preload="true" /> + <texture name="Icon_Help_Press" file_name="windows/Icon_Help_Press.png" preload="true" /> + + <texture name="Icon_Minimize_Foreground" file_name="windows/Icon_Minimize_Foreground.png" preload="true" /> + <texture name="Icon_Minimize_Press" file_name="windows/Icon_Minimize_Press.png" preload="true" /> + + <texture name="Icon_Paste" file_name="icons/paste_clipboard.png" preload="true" /> + + <texture name="Icon_Restore_Foreground" file_name="windows/Icon_Restore_Foreground.png" preload="false" /> + <texture name="Icon_Restore_Press" file_name="windows/Icon_Restore_Press.png" preload="false" /> + + <texture name="Icon_Snapshot" file_name="icons/snapshot_icon.png" preload="true" /> + + <texture name="Icon_Use_Texture" file_name="icons/texture_icon.png" preload="true" /> + + <texture name="Info" file_name="icons/Info.png" preload="false" /> + <texture name="Info_Small" file_name="icons/Info_Small.png" preload="false" /> + <texture name="Info_Off" file_name="navbar/Info_Off.png" preload="false" /> + <texture name="Info_Over" file_name="icons/Info_Over.png" preload="false" /> + <texture name="Info_Press" file_name="navbar/Info_Press.png" preload="false" /> + + <texture name="Inspector_Background" file_name="windows/Inspector_Background.png" preload="false" + scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" /> + <texture name="Inspector_Hover" file_name="windows/Inspector_Hover.png" preload="false" /> + <texture name="Inspector_I" file_name="windows/Inspector_I.png" preload="false" /> + + <texture name="Inv_Alpha" file_name="icons/Inv_Alpha.png" preload="false" /> + <texture name="Inv_Animation" file_name="icons/Inv_Animation.png" preload="false" /> + <texture name="Inv_BodyShape" file_name="icons/Inv_BodyShape.png" preload="false" /> + <texture name="Inv_CallingCard" file_name="icons/Inv_CallingCard.png" preload="false" /> + <texture name="Inv_Clothing" file_name="icons/Inv_Clothing.png" preload="false" /> + <texture name="Inv_Eye" file_name="icons/Inv_Eye.png" preload="false" /> + <texture name="Inv_Favorite_Star_Content" file_name="icons/Inv_Favorite_Star_Content.png" preload="false" /> + <texture name="Inv_Favorite_Star_Full" file_name="icons/Inv_Favorite_Star_Full.png" preload="false" /> + <texture name="Inv_FolderClosed" file_name="icons/Inv_FolderClosed.png" preload="false" /> + <texture name="Inv_FolderOpen" file_name="icons/Inv_FolderOpen.png" preload="false" /> + <texture name="Inv_Gesture" file_name="icons/Inv_Gesture.png" preload="false" /> + <texture name="Inv_Gloves" file_name="icons/Inv_Gloves.png" preload="false" /> + <texture name="Inv_Hair" file_name="icons/Inv_Hair.png" preload="false" /> + <texture name="Inv_LinkItem" file_name="icons/Inv_LinkItem.png" preload="false" /> + <texture name="Inv_LinkFolder" file_name="icons/Inv_LinkFolder.png" preload="false" /> + <texture name="Inv_Jacket" file_name="icons/Inv_Jacket.png" preload="false" /> + <texture name="Inv_LookFolderOpen" file_name="icons/Inv_LookFolderOpen.png" preload="false" /> + <texture name="Inv_LookFolderClosed" file_name="icons/Inv_LookFolderClosed.png" preload="false" /> + <texture name="Inv_LostClosed" file_name="icons/Inv_LostClosed.png" preload="false" /> + <texture name="Inv_LostOpen" file_name="icons/Inv_LostOpen.png" preload="false" /> + <texture name="Inv_Landmark" file_name="icons/Inv_Landmark.png" preload="false" /> + <texture name="Inv_Material" file_name="icons/Inv_Material.png" preload="false" /> + <texture name="Inv_Mesh" file_name="icons/Inv_Mesh.png" preload="false" /> + <texture name="Inv_Notecard" file_name="icons/Inv_Notecard.png" preload="false" /> + <texture name="Inv_Object" file_name="icons/Inv_Object.png" preload="false" /> + <texture name="Inv_Object_Multi" file_name="icons/Inv_Object_Multi.png" preload="false" /> + <texture name="Inv_Pants" file_name="icons/Inv_Pants.png" preload="false" /> + <texture name="Inv_Script" file_name="icons/Inv_Script.png" preload="false" /> + <texture name="Inv_Shirt" file_name="icons/Inv_Shirt.png" preload="false" /> + <texture name="Inv_Shoe" file_name="icons/Inv_Shoe.png" preload="false" /> + <texture name="Inv_Skin" file_name="icons/Inv_Skin.png" preload="false" /> + <texture name="Inv_Skirt" file_name="icons/Inv_Skirt.png" preload="false" /> + <texture name="Inv_Snapshot" file_name="icons/Inv_Snapshot.png" preload="false" /> + <texture name="Inv_Socks" file_name="icons/Inv_Socks.png" preload="false" /> + <texture name="Inv_Sound" file_name="icons/Inv_Sound.png" preload="false" /> + <texture name="Inv_StockFolderClosed" file_name="icons/Inv_StockFolderClosed.png" preload="false" /> + <texture name="Inv_StockFolderOpen" file_name="icons/Inv_StockFolderOpen.png" preload="false" /> + <texture name="Inv_SysClosed" file_name="icons/Inv_SysClosed.png" preload="false" /> + <texture name="Inv_SysOpen" file_name="icons/Inv_SysOpen.png" preload="false" /> + <texture name="Inv_Tattoo" file_name="icons/Inv_Tattoo.png" preload="false" /> + <texture name="Inv_Universal" file_name="icons/Inv_Universal.png" preload="false" /> + <texture name="Inv_Physics" file_name="icons/Inv_Physics.png" preload="false" /> + <texture name="Inv_Texture" file_name="icons/Inv_Texture.png" preload="false" /> + <texture name="Inv_TrashClosed" file_name="icons/Inv_TrashClosed.png" preload="false" /> + <texture name="Inv_TrashOpen" file_name="icons/Inv_TrashOpen.png" preload="false" /> + <texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" /> + <texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" /> + <texture name="Inv_Link" file_name="icons/Inv_Link.png" preload="false" /> + <texture name="Inv_Settings" file_name="icons/Inv_Settings.png" preload="false" /> + <texture name="Inv_SettingsSky" file_name="icons/Inv_SettingsSky.png" preload="false" /> + <texture name="Inv_SettingsWater" file_name="icons/Inv_SettingsWater.png" preload="false" /> + <texture name="Inv_SettingsDay" file_name="icons/Inv_SettingsDay.png" preload="false" /> + + <texture name="Inv_Invalid" file_name="icons/Inv_Invalid.png" preload="false" /> + <texture name="Inv_Unknown" file_name="icons/Inv_UnknownObject.png" preload="false" /> + <texture name="Inv_VersionFolderClosed" file_name="icons/Inv_VersionFolderClosed.png" preload="false" /> + <texture name="Inv_VersionFolderOpen" file_name="icons/Inv_VersionFolderOpen.png" preload="false" /> + + <texture name="Inv_Toolbar_SearchVisibility" file_name="icons/Inv_Toolbar_SearchVisibility.png" preload="false" /> + + <texture name="Landmarks_overlay" file_name="navbar/Landmarks.png" preload="false" /> + + <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/> + <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/> + + <texture name="ListItem_Select" file_name="widgets/ListItem_Select.png" preload="true" scale.left="2" scale.bottom="2" scale.top="22" scale.right="278" /> + <texture name="ListItem_Over" file_name="widgets/ListItem_Over.png" preload="true" scale.left="2" scale.bottom="2" scale.top="22" scale.right="278" /> + + <texture name="List_View_Disabled" file_name="icons/List_View_Disabled.png" preload="false" /> + <texture name="List_View_On" file_name="icons/List_View_On.png" preload="false" /> + + <texture name="Lock" file_name="icons/Lock.png" preload="false" /> + <texture name="Lock2" file_name="navbar/Lock.png" preload="false" /> + + <texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" /> + + <texture name="Map_Placeholder_Icon" file_name="icons/map_placeholder.png" preload="true" /> + + <texture name="Marketplace_Dropzone_Background" file_name="widgets/Marketplace_Dropzone_Background.png" preload="true" /> + <texture name="MarketplaceBtn_Off" file_name="widgets/MarketplaceBtn_Off.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" /> + <texture name="MarketplaceBtn_Selected" file_name="widgets/MarketplaceBtn_Selected.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" /> + + <texture name="Microphone_On" file_name="icons/Microphone_On.png" preload="false" /> + + <texture name="MinusItem_Disabled" file_name="icons/MinusItem_Disabled.png" preload="false" /> + <texture name="MinusItem_Off" file_name="icons/MinusItem_Off.png" preload="false" /> + <texture name="MinusItem_Press" file_name="icons/MinusItem_Press.png" preload="false" /> + + <texture name="menu_separator" file_name="navbar/FileMenu_Divider.png" scale.left="4" scale.top="166" scale.right="0" scale.bottom="0" /> + + <texture name="ModelImport_Status_Good" file_name="green_checkmark.png" preload="false"/> + <texture name="ModelImport_Status_Warning" file_name="lag_status_warning.tga" preload="false"/> + <texture name="ModelImport_Status_Error" file_name="red_x.png" preload="false"/> + + <texture name="MouseLook_View_Off" file_name="bottomtray/Mouselook_View_Off.png" preload="false" /> + <texture name="MouseLook_View_On" file_name="bottomtray/Mouselook_View_On.png" preload="false" /> + + <texture name="Move_Fly_Off" file_name="bottomtray/Move_Fly_Off.png" preload="false" /> + <texture name="Move_Run_Off" file_name="bottomtray/Move_Run_Off.png" preload="false" /> + <texture name="Move_Walk_Off" file_name="bottomtray/Move_Walk_Off.png" preload="false" /> + <texture name="Movement_Backward_Off" file_name="bottomtray/Movement_Backward_Off.png" preload="false" /> + <texture name="Movement_Backward_On" file_name="bottomtray/Movement_Backward_On.png" preload="false" /> + <texture name="Movement_Down_Off" file_name="bottomtray/Movement_Down_Off.png" preload="false" /> + <texture name="Movement_Down_On" file_name="bottomtray/Movement_Down_On.png" preload="false" /> + <texture name="Movement_Forward_Off" file_name="bottomtray/Movement_Forward_Off.png" preload="false" /> + <texture name="Movement_Forward_On" file_name="bottomtray/Movement_Forward_On.png" preload="false" /> + <texture name="Movement_Left_Off" file_name="bottomtray/Movement_Left_Off.png" preload="false" /> + <texture name="Movement_Left_On" file_name="bottomtray/Movement_Left_On.png" preload="false" /> + <texture name="Movement_Right_Off" file_name="bottomtray/Movement_Right_Off.png" preload="false" /> + <texture name="Movement_Right_On" file_name="bottomtray/Movement_Right_On.png" preload="false" /> + <texture name="Movement_TurnLeft_Off" file_name="bottomtray/Movement_TurnLeft_Off.png" preload="false" /> + <texture name="Movement_TurnLeft_On" file_name="bottomtray/Movement_TurnLeft_On.png" preload="false" /> + <texture name="Movement_TurnRight_Off" file_name="bottomtray/Movement_TurnRight_Off.png" preload="false" /> + <texture name="Movement_TurnRight_On" file_name="bottomtray/Movement_TurnRight_On.png" preload="false" /> + <texture name="Movement_Up_Off" file_name="bottomtray/Movement_Up_Off.png" preload="false" /> + <texture name="Movement_Up_On" file_name="bottomtray/Movement_Up_On.png" preload="false" /> + + <texture name="NavBar_BG" file_name="navbar/NavBar_BG.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> + <texture name="NavBar_BG_NoFav_Bevel" file_name="navbar/NavBar_BG_NoFav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> + <texture name="NavBar_BG_NoNav_Bevel" file_name="navbar/NavBar_BG_NoNav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> + + <texture name="Nearby_chat_icon" file_name="icons/nearby_chat_icon.png" preload="false" /> + + <texture name="Notices_Unread" file_name="bottomtray/Notices_Unread.png" preload="true" /> + + <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" /> + <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="false" /> + + <texture name="Object_Cone" file_name="build/Object_Cone.png" preload="false" /> + <texture name="Object_Cone_Selected" file_name="build/Object_Cone_Selected.png" preload="false" /> + <texture name="Object_Cube" file_name="build/Object_Cube.png" preload="false" /> + <texture name="Object_Cube_Selected" file_name="build/Object_Cube_Selected.png" preload="false" /> + <texture name="Object_Cylinder" file_name="build/Object_Cylinder.png" preload="false" /> + <texture name="Object_Cylinder_Selected" file_name="build/Object_Cylinder_Selected.png" preload="false" /> + <texture name="Object_Grass" file_name="build/Object_Grass.png" preload="false" /> + <texture name="Object_Grass_Selected" file_name="build/Object_Grass_Selected.png" preload="false" /> + <texture name="Object_Hemi_Cone" file_name="build/Object_Hemi_Cone.png" preload="false" /> + <texture name="Object_Hemi_Cone_Selected" file_name="build/Object_Hemi_Cone_Selected.png" preload="false" /> + <texture name="Object_Hemi_Cylinder" file_name="build/Object_Hemi_Cylinder.png" preload="false" /> + <texture name="Object_Hemi_Cylinder_Selected" file_name="build/Object_Hemi_Cylinder_Selected.png" preload="false" /> + <texture name="Object_Hemi_Sphere" file_name="build/Object_Hemi_Sphere.png" preload="false" /> + <texture name="Object_Hemi_Sphere_Selected" file_name="build/Object_Hemi_Sphere_Selected.png" preload="false" /> + <texture name="Object_Prism" file_name="build/Object_Prism.png" preload="false" /> + <texture name="Object_Prism_Selected" file_name="build/Object_Prism_Selected.png" preload="false" /> + <texture name="Object_Pyramid" file_name="build/Object_Pyramid.png" preload="false" /> + <texture name="Object_Pyramid_Selected" file_name="build/Object_Pyramid_Selected.png" preload="false" /> + <texture name="Object_Ring" file_name="build/Object_Ring.png" preload="false" /> + <texture name="Object_Ring_Selected" file_name="build/Object_Ring_Selected.png" preload="false" /> + <texture name="Object_Sphere" file_name="build/Object_Sphere.png" preload="false" /> + <texture name="Object_Sphere_Selected" file_name="build/Object_Sphere_Selected.png" preload="false" /> + <texture name="Object_Tetrahedron" file_name="build/Object_Tetrahedron.png" preload="false" /> + <texture name="Object_Tetrahedron_Selected" file_name="build/Object_Tetrahedron_Selected.png" preload="false" /> + <texture name="Object_Torus" file_name="build/Object_Torus.png" preload="false" /> + <texture name="Object_Torus_Selected" file_name="build/Object_Torus_Selected.png" preload="false" /> + <texture name="Object_Tree" file_name="build/Object_Tree.png" preload="false" /> + <texture name="Object_Tree_Selected" file_name="build/Object_Tree_Selected.png" preload="false" /> + <texture name="Object_Tube" file_name="build/Object_Tube.png" preload="false" /> + <texture name="Object_Tube_Selected" file_name="build/Object_Tube_Selected.png" preload="false" /> + + <texture name="Object_View_Off" file_name="bottomtray/Object_View_Off.png" preload="false" /> + <texture name="Object_View_On" file_name="bottomtray/Object_View_On.png" preload="false" /> + + <texture name="OptionsMenu_Disabled" file_name="icons/OptionsMenu_Disabled.png" preload="false" /> + <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" /> + <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" /> + + <texture name="ClipboardSmallMenu_Disabled" file_name="icons/ClipboardSmallMenu_Disabled.png" preload="false" /> + <texture name="ClipboardSmallMenu_Off" file_name="icons/ClipboardSmallMenu_Off.png" preload="false" /> + <texture name="ClipboardSmallMenu_Press" file_name="icons/ClipboardSmallMenu_Press.png" preload="false" /> + <texture name="ClipboardMenu_Disabled" file_name="icons/ClipboardMenu_Disabled.png" preload="false" /> + <texture name="ClipboardMenu_Off" file_name="icons/ClipboardMenu_Off.png" preload="false" /> + <texture name="ClipboardMenu_Press" file_name="icons/ClipboardMenu_Press.png" preload="false" /> + + <texture name="OutboxStatus_Success" file_name="green_checkmark.png" preload="false" /> + <texture name="OutboxStatus_Warning" file_name="icons/pop_up_caution.png" preload="false" /> + <texture name="OutboxStatus_Error" file_name="red_x.png" preload="false" /> + + <texture name="PanOrbit_Off" file_name="bottomtray/PanOrbit_Off.png" preload="false" /> + + <texture name="Parcel_Exp_Color" file_name="icons/Parcel_Exp_Color.png" preload="false" /> + + <texture name="Parcel_Build_Dark" file_name="icons/Parcel_Build_Dark.png" preload="false" /> + <texture name="Parcel_BuildNo_Dark" file_name="icons/Parcel_BuildNo_Dark.png" preload="false" /> + <texture name="Parcel_Damage_Dark" file_name="icons/Parcel_Damage_Dark.png" preload="false" /> + <texture name="Parcel_DamageNo_Dark" file_name="icons/Parcel_DamageNo_Dark.png" preload="false" /> + <texture name="Parcel_Fly_Dark" file_name="icons/Parcel_Fly_Dark.png" preload="false" /> + <texture name="Parcel_FlyNo_Dark" file_name="icons/Parcel_FlyNo_Dark.png" preload="false" /> + <texture name="Parcel_Health_Dark" file_name="icons/Parcel_Health_Dark.png" preload="false" /> + <texture name="Parcel_M_Dark" file_name="icons/Parcel_M_Dark.png" preload="false" /> + <texture name="Parcel_PG_Dark" file_name="icons/Parcel_PG_Dark.png" preload="false" /> + <texture name="Parcel_Push_Dark" file_name="icons/Parcel_Push_Dark.png" preload="false" /> + <texture name="Parcel_PushNo_Dark" file_name="icons/Parcel_PushNo_Dark.png" preload="false" /> + <texture name="Parcel_R_Dark" file_name="icons/Parcel_R_Dark.png" preload="false" /> + <texture name="Parcel_Scripts_Dark" file_name="icons/Parcel_Scripts_Dark.png" preload="false" /> + <texture name="Parcel_ScriptsNo_Dark" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" /> + <texture name="Parcel_Voice_Dark" file_name="icons/Parcel_Voice_Dark.png" preload="false" /> + <texture name="Parcel_VoiceNo_Dark" file_name="icons/Parcel_VoiceNo_Dark.png" preload="false" /> + <texture name="Parcel_SeeAVsOff_Dark" file_name="icons/Parcel_SeeAVsOff_Dark.png" preload="false" /> + <texture name="Parcel_SeeAVsOn_Dark" file_name="icons/Parcel_SeeAVsOn_Dark.png" preload="false" /> + <texture name="Parcel_SeeAVsOff_Light" file_name="icons/Parcel_SeeAVsOff_Light.png" preload="false" /> + <texture name="Parcel_SeeAVsOn_Light" file_name="icons/Parcel_SeeAVsOn_Light.png" preload="false" /> + + <texture name="Parcel_BuildNo_Light" file_name="icons/Parcel_BuildNo_Light.png" preload="false" /> + <texture name="Parcel_FlyNo_Light" file_name="icons/Parcel_FlyNo_Light.png" preload="false" /> + <texture name="Parcel_ForSale_Light" file_name="icons/Parcel_ForSale_Light.png" preload="false" /> + <texture name="Parcel_M_Light" file_name="icons/Parcel_M_Light.png" preload="false" /> + <texture name="Parcel_PG_Light" file_name="icons/Parcel_PG_Light.png" preload="false" /> + <texture name="Parcel_PushNo_Light" file_name="icons/Parcel_PushNo_Light.png" preload="false" /> + <texture name="Parcel_R_Light" file_name="icons/Parcel_R_Light.png" preload="false" /> + <texture name="Parcel_ScriptsNo_Light" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" /> + <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" /> + <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" /> + + <texture name="Pathfinding_Dirty" file_name="icons/Pathfinding_Dirty.png" preload="false" /> + <texture name="Pathfinding_Disabled" file_name="icons/Pathfinding_Disabled.png" preload="false" /> + + <texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" /> + <texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" /> + <texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" /> + <texture name="Person_Check" file_name="icons/Person_Check.png" preload="false" /> + <texture name="Person_Star" file_name="icons/Person_Star.png" preload="false" /> + + <texture name="Permission_Visible_Online" file_name="icons/see_me_online.png" preload="false" /> + <texture name="Permission_Visible_Map" file_name="icons/see_on_map.png" preload="false" /> + <texture name="Permission_Edit_Objects_Mine" file_name="icons/edit_mine.png" preload="false" /> + <texture name="Permission_Edit_Objects_Theirs" file_name="icons/edit_theirs.png" preload="false" /> + + <texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" /> + <texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" /> + <texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" /> + + <texture name="Profile_Badge_Beta" file_name="icons/profile_badge_beta.png" preload="true"/> + <texture name="Profile_Badge_Beta_Lifetime" file_name="icons/profile_badge_beta_lifetime.png" preload="true"/> + <texture name="Profile_Badge_Lifetime" file_name="icons/profile_badge_lifetime.png" preload="true"/> + <texture name="Profile_Badge_Linden" file_name="icons/profile_badge_linden.png" preload="true"/> + <texture name="Profile_Badge_Pplus_Lifetime" file_name="icons/profile_badge_pplus_lifetime.png" preload="true"/> + <texture name="Profile_Badge_Premium_Lifetime" file_name="icons/profile_badge_premium_lifetime.png" preload="true"/> + <texture name="Profile_Group_Visibility_Off" file_name="icons/profile_group_visibility_eye_off.png" preload="true"/> + <texture name="Profile_Group_Visibility_Off_Pressed" file_name="icons/profile_group_visibility_eye_off_pressed.png" preload="true"/> + <texture name="Profile_Group_Visibility_On" file_name="icons/profile_group_visibility_eye_on.png" preload="true"/> + <texture name="Profile_Group_Visibility_On_Pressed" file_name="icons/profile_group_visibility_eye_on_pressed.png" preload="true"/> + <texture name="Profile_Friend_Offline" file_name="icons/Profile_Friend_Offline.png" preload="true"/> + <texture name="Profile_Friend_Online" file_name="icons/Profile_Friend_Online.png" preload="true"/> + <texture name="Profile_Perm_Find_Disabled" file_name="icons/Profile_Perm_Find_Disabled.png" preload="true"/> + <texture name="Profile_Perm_Find_Enabled" file_name="icons/Profile_Perm_Find_Enabled.png" preload="true"/> + <texture name="Profile_Perm_Objects_Disabled" file_name="icons/Profile_Perm_Objects_Disabled.png" preload="true"/> + <texture name="Profile_Perm_Objects_Enabled" file_name="icons/Profile_Perm_Objects_Enabled.png" preload="true"/> + <texture name="Profile_Perm_Online_Disabled" file_name="icons/Profile_Perm_Online_Disabled.png" preload="true"/> + <texture name="Profile_Perm_Online_Enabled" file_name="icons/Profile_Perm_Online_Enabled.png" preload="true"/> + + <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="11" scale.right="48" scale.bottom="3" /> + <texture name="ProgressBarSolid" file_name="widgets/ProgressBarSolid.png" preload="true" scale.left="4" scale.top="11" scale.right="48" scale.bottom="3" /> + <texture name="ProgressTrack" file_name="widgets/ProgressTrack.png" preload="true" scale.left="4" scale.top="13" scale.right="148" scale.bottom="2" /> + + <texture name="PushButton_Disabled" file_name="widgets/PushButton_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Off" file_name="widgets/PushButton_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_On" file_name="widgets/PushButton_On.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_On_Selected" file_name="widgets/PushButton_On_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Over" file_name="widgets/PushButton_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Selected_Disabled" file_name="widgets/PushButton_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + + <texture name="PushButton_Login" file_name="widgets/PushButton_Login.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Login_Over" file_name="widgets/PushButton_Login_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Login_Pressed" file_name="widgets/PushButton_Login_Pressed.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + + + <texture name="RadioButton_Press" file_name="widgets/RadioButton_Press.png" preload="true" /> + <texture name="RadioButton_On_Press" file_name="widgets/RadioButton_On_Press.png" preload="true" /> + <texture name="RadioButton_Off" file_name="widgets/RadioButton_Off.png" preload="true" /> + <texture name="RadioButton_On" file_name="widgets/RadioButton_On.png" preload="true" /> + <texture name="RadioButton_Disabled" file_name="widgets/RadioButton_Disabled.png" preload="true" /> + <texture name="RadioButton_On_Disabled" file_name="widgets/RadioButton_On_Disabled.png" preload="true" /> + + + <texture name="Refresh_Off" file_name="icons/Refresh_Off.png" preload="true" /> + + <texture name="Resize_Corner" file_name="windows/Resize_Corner.png" preload="true" /> + + <texture name="Rounded_Rect" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="26" scale.right="58" scale.bottom="6" /> + <texture name="Rounded_Rect_Top" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="8" scale.right="58" scale.bottom="0" clip.left="0" clip.right="64" clip.bottom="16" clip.top="32" /> + <texture name="Rounded_Rect_Bottom" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="16" scale.right="58" scale.bottom="8" clip.left="0" clip.right="64" clip.bottom="0" clip.top="16" /> + <texture name="Rounded_Rect_Left" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="26" scale.right="32" scale.bottom="6" clip.left="0" clip.right="32" clip.bottom="0" clip.top="32" /> + <texture name="Rounded_Rect_Right" file_name="Rounded_Rect.png" preload="true" scale.left="0" scale.top="26" scale.right="26" scale.bottom="6" clip.left="32" clip.right="64" clip.bottom="0" clip.top="32" /> + <texture name="Rounded_Square" file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" /> + <texture name="Row_Selection" file_name="navbar/Row_Selection.png" preload="false" /> + + <texture name="ScrollArrow_Down" file_name="widgets/ScrollArrow_Down.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="ScrollArrow_Left" file_name="widgets/ScrollArrow_Left.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="ScrollArrow_Right" file_name="widgets/ScrollArrow_Right.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="ScrollArrow_Up" file_name="widgets/ScrollArrow_Up.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + + <texture name="ScrollThumb_Horiz" file_name="widgets/ScrollThumb_Horiz.png" preload="true" scale.left="4" scale.top="0" scale.bottom="0" scale.right="2" /> + <texture name="ScrollThumb_Vert" file_name="widgets/ScrollThumb_Vert.png" preload="true" scale.left="4" scale.top="53" scale.bottom="10" scale.right="4" /> + <texture name="ScrollTrack_Vert" file_name="widgets/ScrollTrack_Vert.png" preload="true" scale.left="2" scale.top="40" scale.bottom="13" scale.right="0" /> + <texture name="ScrollTrack_Horiz" file_name="widgets/ScrollTrack_Horiz.png" preload="true" scale.left="4" scale.top="0" scale.bottom="0" scale.right="2" /> + + + <texture name="Search" file_name="navbar/Search.png" preload="false" /> + + <texture name="Search_Icon" file_name="icons/Search_Icon.png" preload="false" /> + + <texture name="SegmentedBtn_Left_Off" file_name="widgets/SegmentedBtn_Left_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Over" file_name="widgets/SegmentedBtn_Left_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Press" file_name="widgets/SegmentedBtn_Left_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Disabled" file_name="widgets/SegmentedBtn_Left_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Selected" file_name="widgets/SegmentedBtn_Left_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Selected_Over" file_name="widgets/SegmentedBtn_Left_Selected_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Selected_Press" file_name="widgets/SegmentedBtn_Left_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Left_Selected_Disabled" file_name="widgets/SegmentedBtn_Left_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + + <texture name="SegmentedBtn_Middle_Disabled" file_name="widgets/SegmentedBtn_Middle_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Middle_Selected" file_name="widgets/SegmentedBtn_Middle_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Middle_Selected_Press" file_name="widgets/SegmentedBtn_Middle_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Middle_Selected_Disabled" file_name="widgets/SegmentedBtn_Middle_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + + <texture name="SegmentedBtn_Right_Off" file_name="widgets/SegmentedBtn_Right_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Over" file_name="widgets/SegmentedBtn_Right_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Press" file_name="widgets/SegmentedBtn_Right_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Disabled" file_name="widgets/SegmentedBtn_Right_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Selected" file_name="widgets/SegmentedBtn_Right_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Selected_Press" file_name="widgets/SegmentedBtn_Right_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + + <texture name="Shirt_Large" file_name="icons/Shirt_Large.png" preload="false" /> + + <texture name="Sidebar_Icon_Dock_Foreground" file_name="taskpanel/Sidebar_Icon_Dock_Foreground.png" preload="false" /> + <texture name="Sidebar_Icon_Dock_Press" file_name="taskpanel/Sidebar_Icon_Dock_Press.png" preload="false" /> + <texture name="Sidebar_Icon_Undock_Foreground" file_name="taskpanel/Sidebar_Icon_Undock_Foreground.png" preload="false" /> + <texture name="Sidebar_Icon_Undock_Press" file_name="taskpanel/Sidebar_Icon_Undock_Press.png" preload="false" /> + + <texture name="Shop" file_name="icons/Shop.png" preload="false" /> + + <texture name="SkipBackward_Off" file_name="icons/SkipBackward_Off.png" preload="false" /> + <texture name="SkipForward_Off" file_name="icons/SkipForward_Off.png" preload="false" /> + + <texture name="SliderTrack_Horiz" file_name="widgets/SliderTrack_Horiz.png" scale.left="4" scale.top="4" scale.right="100" scale.bottom="2" /> + <texture name="SliderTrack_Vert" file_name="widgets/SliderTrack_Vert.png" scale.left="2" scale.top="100" scale.right="4" scale.bottom="4" /> + <texture name="SliderThumb_Off" file_name="widgets/SliderThumb_Off.png" /> + <texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" /> + <texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" /> + + <texture name="SL_Logo" file_name="icons/MP_Logo.png" preload="true" /> + <texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" /> + <texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" /> + + <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="Snapshot_Download" file_name="snapshot_download.png" preload="false" /> + <texture name="Snapshot_Email" file_name="snapshot_email.png" preload="false" /> + <texture name="Snapshot_Inventory" file_name="toolbar_icons/inventory.png" preload="false" /> + <texture name="Snapshot_Profile" file_name="toolbar_icons/profile.png" preload="false" /> + <texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" /> + + <texture name="login_mp_logo" file_name="windows/login_mp_logo.png" preload="true" /> + <texture name="login_mp_logo_small" file_name="windows/login_mp_logo_small.png" preload="true" /> + <texture name="first_login_image" file_name="windows/first_login_image.jpg" preload="true" /> + + <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" /> + <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="false" /> + <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="false" /> + <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="false" /> + + <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="true" /> + <texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" /> + <texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" /> + + <texture name="Sync_Disabled" file_name="icons/Sync_Disabled.png" preload="true" /> + <texture name="Sync_Enabled" file_name="icons/Sync_Enabled.png" preload="true" /> + <texture name="Sync_Progress_1" file_name="icons/Sync_Progress_1.png" preload="true" /> + <texture name="Sync_Progress_2" file_name="icons/Sync_Progress_2.png" preload="true" /> + <texture name="Sync_Progress_3" file_name="icons/Sync_Progress_3.png" preload="true" /> + <texture name="Sync_Progress_4" file_name="icons/Sync_Progress_4.png" preload="true" /> + <texture name="Sync_Progress_5" file_name="icons/Sync_Progress_5.png" preload="true" /> + <texture name="Sync_Progress_6" file_name="icons/Sync_Progress_6.png" preload="true" /> + + <texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" /> + <texture name="TabIcon_Home_Selected" file_name="taskpanel/TabIcon_Home_Selected.png" preload="false" /> + <texture name="TabIcon_Me_Off" file_name="taskpanel/TabIcon_Me_Off.png" preload="false" /> + <texture name="TabIcon_Open_Off" file_name="taskpanel/TabIcon_Open_Off.png" preload="false" /> + <texture name="TabIcon_People_Off" file_name="taskpanel/TabIcon_People_Off.png" preload="false" /> + <texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="false" /> + <texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="false" /> + + <texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Right_Flashing" file_name="containers/TabTop_Right_Flashing.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Middle_Off" file_name="containers/TabTop_Middle_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9" /> + <texture name="TabTop_Middle_Selected" file_name="containers/TabTop_Middle_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9" /> + <texture name="TabTop_Left_Off" file_name="containers/TabTop_Left_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9" /> + <texture name="TabTop_Left_Selected" file_name="containers/TabTop_Left_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9" /> + + <texture name="TaskPanel_Tab_Off" file_name="taskpanel/TaskPanel_Tab_Off.png" preload="false" scale.left="4" scale.top="29" scale.right="36" scale.bottom="4" /> + <texture name="TaskPanel_Tab_Selected" file_name="taskpanel/TaskPanel_Tab_Selected.png" preload="false" scale.left="5" scale.top="30" scale.right="36" scale.bottom="5" /> + + <texture name="TextField_Search_Disabled" file_name="widgets/TextField_Search_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Off" file_name="widgets/TextField_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Search_Active" file_name="widgets/TextField_Search_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + + <texture name="Thumbnail_Fallback" file_name="icons/thumbnail_fallback_icon.png" preload="true" /> + + <texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" /> + <texture name="Toast_Background" file_name="windows/Toast_Background.png" preload="true" + scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" /> + <texture name="Toast_Over" file_name="windows/Toast_Over.png" preload="true" + scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" /> + + <texture name="Tool_Create" file_name="build/Tool_Create.png" preload="false" /> + <texture name="Tool_Dozer" file_name="build/Tool_Dozer.png" preload="false" /> + <texture name="Tool_Face" file_name="build/Tool_Face.png" preload="false" /> + <texture name="Tool_Grab" file_name="build/Tool_Grab.png" preload="false" /> + <texture name="Tool_Zoom" file_name="build/Tool_Zoom.png" preload="false" /> + + <texture name="Toolbar_Left_Flash" file_name="containers/Toolbar_Left_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Left_Off" file_name="containers/Toolbar_Left_Off.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Left_Over" file_name="containers/Toolbar_Left_Over.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Left_Selected" file_name="containers/Toolbar_Left_Selected.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Middle_Off" file_name="containers/Toolbar_Middle_Off.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Middle_Over" file_name="containers/Toolbar_Middle_Over.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Middle_Selected" file_name="containers/Toolbar_Middle_Selected.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Middle_Flash" file_name="containers/Toolbar_Middle_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> + <texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> + <texture name="Toolbar_Right_Over" file_name="containers/Toolbar_Right_Over.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> + <texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> + <texture name="Toolbar_Right_Flash" file_name="containers/Toolbar_Right_Flash.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> + + <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" /> + + <texture name="TrashItem_Disabled" file_name="icons/TrashItem_Disabled.png" preload="false" /> + <texture name="TrashItem_Off" file_name="icons/TrashItem_Off.png" preload="false" /> + <texture name="TrashItem_Press" file_name="icons/TrashItem_Press.png" preload="false" /> + + <texture name="Unread_Chiclet" file_name="bottomtray/Unread_Chiclet.png" preload="false" /> + + <texture name="UpArrow_Off" file_name="icons/UpArrow_Off.png" preload="false" /> + + <texture name="Video_URL_Off" file_name="icons/Video_URL_Off.png" preload="true" /> + + <texture name="Vertical Drag Handle" file_name="widgets/vertical_drag_handle.png" scale.left="2" scale.right="7" scale.bottom="8" scale.top="120" scale_type="scale_outer"/> + + <texture name="VirtualTrackball_Moon_Back" file_name="widgets/track_control_moon_back.png" /> + <texture name="VirtualTrackball_Moon_Front" file_name="widgets/track_control_moon_front.png" /> + <texture name="VirtualTrackball_Rotate_Bottom" file_name="widgets/track_control_rotate_bottom.png" /> + <texture name="VirtualTrackball_Rotate_Left" file_name="widgets/track_control_rotate_left_side.png" /> + <texture name="VirtualTrackball_Rotate_Right" file_name="widgets/track_control_rotate_right_side.png" /> + <texture name="VirtualTrackball_Rotate_Top" file_name="widgets/track_control_rotate_top.png" /> + <texture name="VirtualTrackball_Rotate_Bottom_Active" file_name="widgets/track_control_rotate_bottom_active.png" /> + <texture name="VirtualTrackball_Rotate_Left_Active" file_name="widgets/track_control_rotate_left_side_active.png" /> + <texture name="VirtualTrackball_Rotate_Right_Active" file_name="widgets/track_control_rotate_right_side_active.png" /> + <texture name="VirtualTrackball_Rotate_Top_Active" file_name="widgets/track_control_rotate_top_active.png" /> + <texture name="VirtualTrackball_Sphere" file_name="widgets/track_control_sphere.png" /> + <texture name="VirtualTrackball_Sun_Back" file_name="widgets/track_control_sun_back.png" /> + <texture name="VirtualTrackball_Sun_Front" file_name="widgets/track_control_sun_front.png" /> + + <texture name="Volume_Background" file_name="windows/Volume_Background.png" preload="false" + scale.left="6" scale.top="33" scale.right="63" scale.bottom="10" /> + + <texture name="VoicePTT_Lvl1" file_name="bottomtray/VoicePTT_Lvl1.png" preload="false" /> + <texture name="VoicePTT_Lvl2" file_name="bottomtray/VoicePTT_Lvl2.png" preload="false" /> + <texture name="VoicePTT_Lvl3" file_name="bottomtray/VoicePTT_Lvl3.png" preload="false" /> + <texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" /> + <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> + + <texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" /> + + <texture name="Add_Icon" file_name="icons/add_icon.png" preload="false" /> + <texture name="Remove_Icon" file_name="icons/remove_icon.png" preload="false" /> + + <texture name="Web_Profile_Off" file_name="icons/Web_Profile_Off.png" preload="false" /> + + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + + <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" + scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> + <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" + scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> + <texture name="Window_NoTitle_Background" file_name="windows/Window_Background.png" preload="true" + scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> + <texture name="Window_NoTitle_Foreground" file_name="windows/Window_Foreground.png" preload="true" + scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> + + <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> + + <texture name="Zoom_Off" file_name="icons/Zoom_Off.png" preload="false" /> + <texture name="UnZoom_Off" file_name="icons/UnZoom_Off.png" preload="false" /> + + <texture name="pixiesmall.j2c" use_mips="true" /> + <texture name="script_error.j2c" use_mips="true" /> + <texture name="silhouette.j2c" use_mips="true" /> + <texture name="foot_shadow.j2c" use_mips="true" /> + <texture name="cloud-particle.png" use_mips="true" /> + <texture name="transparent.j2c" use_mips="true" /> + + <!--WARNING OLD ART BELOW *do not use*--> + <texture name="icn_media_web.tga" preload="true" /> + <texture name="icn_media_movie.tga" preload="true" /> + + <texture name="jump_left_out.tga" file_name="widgets/jump_left_out.png" /> + <texture name="jump_left_in.tga" file_name="widgets/jump_left_in.png" /> + <texture name="jump_right_out.tga" file_name="widgets/jump_right_out.png" /> + <texture name="jump_right_in.tga" file_name="widgets/jump_right_in.png" /> + + <texture name="scrollbutton_left_out_blue.tga" file_name="widgets/ScrollArrow_Left_Opaque.png" /> + <texture name="scrollbutton_left_in_blue.tga" file_name="widgets/ScrollArrow_Left_Over_Opaque.png" /> + <texture name="scrollbutton_right_out_blue.tga" file_name="widgets/ScrollArrow_Right_Opaque.png" /> + <texture name="scrollbutton_right_in_blue.tga" file_name="widgets/ScrollArrow_Right_Over_Opaque.png" /> + <texture name="scrollbutton_up_out_blue.tga" file_name="widgets/ScrollArrow_Up_Opaque.png" /> + <texture name="scrollbutton_up_in_blue.tga" file_name="widgets/ScrollArrow_Up_Over_Opaque.png" /> + <texture name="scrollbutton_down_out_blue.tga" file_name="widgets/ScrollArrow_Down_Opaque.png" /> + <texture name="scrollbutton_down_in_blue.tga" file_name="widgets/ScrollArrow_Down_Over_Opaque.png" /> + + <texture name="up_arrow.tga" file_name="up_arrow.png" /> + <texture name="down_arrow.tga" file_name="down_arrow.png" /> + <texture name="arrow_down.tga" /> + + <texture name="tearoffbox.tga" /> + <texture name="tearoff_pressed.tga" /> + + <texture name="color_swatch_alpha.tga" preload="true" /> + + <texture name="button_anim_pause.tga" /> + <texture name="button_anim_pause_selected.tga" /> + <texture name="button_anim_play.tga" /> + <texture name="button_anim_play_selected.tga" /> + <texture name="crosshairs.tga" /> + <texture name="direction_arrow.tga" file_name="world/BeaconArrow.png" /> + + <texture name="icon_avatar_offline.tga" /> + <texture name="icon_avatar_online.tga" /> + <texture name="icon_diurnal.tga" /> + <texture name="icon_for_sale.tga" file_name="icons/Icon_For_Sale.png" /> + <texture name="icon_auction.tga"/> + <texture name="icon_place.tga"/> + <texture name="icon_top_pick.tga" /> + + <texture name="icon_event.tga"/> + <texture name="icon_event_adult.tga"/> + <texture name="icon_event_mature.tga" /> + + <texture name="lag_status_critical.tga" /> + <texture name="lag_status_good.tga" /> + <texture name="lag_status_warning.tga" /> + + <texture name="legend.tga" /> + + <texture name="map_avatar_16.tga" /> + <texture name="map_avatar_8.tga" /> + <texture name="map_event.tga" /> + <texture name="map_home.tga" /> + <texture name="map_infohub.tga" /> + <texture name="map_telehub.tga" /> + <texture name="map_track_16.tga" /> + <texture name="map_ui_collapse_icon.png" /> + <texture name="map_ui_expand_icon.png" /> + + <texture name="notify_caution_icon.tga" /> + + <texture name="default_land_picture.j2c" /> + <texture name="default_profile_picture.j2c" /> + <texture name="locked_image.j2c" /> + <texture name="badge_note.j2c" /> + <texture name="badge_warn.j2c" /> + <texture name="badge_ok.j2c" /> + <texture name="materials_ui_x_24.png" /> + + <texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" /> + <texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" /> + <texture name="Progress_3" file_name="icons/Progress_3.png" preload="true" /> + <texture name="Progress_4" file_name="icons/Progress_4.png" preload="true" /> + <texture name="Progress_5" file_name="icons/Progress_5.png" preload="true" /> + <texture name="Progress_6" file_name="icons/Progress_6.png" preload="true" /> + <texture name="Progress_7" file_name="icons/Progress_7.png" preload="true" /> + <texture name="Progress_8" file_name="icons/Progress_8.png" preload="true" /> + <texture name="Progress_9" file_name="icons/Progress_9.png" preload="true" /> + <texture name="Progress_10" file_name="icons/Progress_10.png" preload="true" /> + <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> + <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> + + <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="108" scale.bottom="2"/> + <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> + + <texture name="hint_background" file_name="windows/hint_background.png" preload="false" scale.left="8" scale.top="70" scale.right="195" scale.bottom="11"/> + <texture name="hint_arrow_left" file_name="windows/hint_arrow_left.png" preload="false"/> + <texture name="hint_arrow_right" file_name="windows/hint_arrow_right.png" preload="false"/> + <texture name="hint_arrow_up" file_name="windows/hint_arrow_up.png" preload="false"/> + <texture name="hint_arrow_down" file_name="windows/hint_arrow_down.png" preload="false"/> + <texture name="hint_arrow_lower_left" file_name="windows/hint_arrow_lower_left.png" preload="false"/> + + <texture name="Yellow_Gradient" file_name="windows/yellow_gradient.png"/> + <texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/> + <texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/> + <texture name="NavBar Separator" file_name="navbar/separator.png"/> + + <texture name="Default_Outfit_Photo" file_name="icons/Default_Outfit_Photo.png" preload="true"/> + <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true"/> + <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true"/> + <texture name="System_Notification" file_name="icons/MP_Logo.png" preload="true"/> + <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true"/> + <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true"/> + + <texture name="Single_Folder_Mode" file_name="icons/single_folder_mode.png" preload="true"/> + <texture name="Multi_Folder_Mode" file_name="icons/multi_folder_mode.png" preload="true"/> + <texture name="Single_Folder_Back" file_name="icons/single_folder_back.png" preload="true"/> + <texture name="Single_Folder_Forward" file_name="icons/single_folder_forward.png" preload="true"/> + <texture name="Single_Folder_Up" file_name="icons/single_folder_up.png" preload="true"/> + <texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/> + <texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/> + <texture name="Icon_Pointer" file_name="icons/Icon_Pointer.png" preload="false"/> + + <texture name="mp_fpsButton" file_name="megapahit/fps_button.png" preload="false" /> + + <texture name="mp_red_bullet" file_name="megapahit/mp_red_bullet.png" preload="false" /> + <texture name="mp_yellow_bullet" file_name="megapahit/mp_yellow_bullet.png" preload="false" /> + <texture name="mp_green_bullet" file_name="megapahit/mp_green_bullet.png" preload="false" /> + <texture name="mp_blue_bullet" file_name="megapahit/mp_blue_bullet.png" preload="false" /> + <texture name="mp_help_bullet" file_name="megapahit/mp_help_bullet.png" preload="false" /> + <texture name="mp_info_bullet" file_name="megapahit/mp_info_bullet.png" preload="false" /> + +</textures> diff --git a/indra/newview/skins/classic/textures/toolbar_icons/360_capture.png b/indra/newview/skins/classic/textures/toolbar_icons/360_capture.png Binary files differnew file mode 100644 index 0000000000..163cebe29f --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/360_capture.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/appearance.png b/indra/newview/skins/classic/textures/toolbar_icons/appearance.png Binary files differnew file mode 100644 index 0000000000..e6b1365388 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/appearance.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/avatars.png b/indra/newview/skins/classic/textures/toolbar_icons/avatars.png Binary files differnew file mode 100644 index 0000000000..8fa0600cee --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/avatars.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/build.png b/indra/newview/skins/classic/textures/toolbar_icons/build.png Binary files differnew file mode 100644 index 0000000000..e21ab3f0e4 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/build.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/caret_bottom.png b/indra/newview/skins/classic/textures/toolbar_icons/caret_bottom.png Binary files differnew file mode 100644 index 0000000000..5f6a01eaa1 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/caret_bottom.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/caret_left.png b/indra/newview/skins/classic/textures/toolbar_icons/caret_left.png Binary files differnew file mode 100644 index 0000000000..0b8090314c --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/caret_left.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/caret_right.png b/indra/newview/skins/classic/textures/toolbar_icons/caret_right.png Binary files differnew file mode 100644 index 0000000000..044751560f --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/caret_right.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/chat.png b/indra/newview/skins/classic/textures/toolbar_icons/chat.png Binary files differnew file mode 100644 index 0000000000..e0dbac495f --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/chat.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/destinations.png b/indra/newview/skins/classic/textures/toolbar_icons/destinations.png Binary files differnew file mode 100644 index 0000000000..e2325f083a --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/destinations.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/environments.png b/indra/newview/skins/classic/textures/toolbar_icons/environments.png Binary files differnew file mode 100644 index 0000000000..620db9f793 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/environments.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/facebook.png b/indra/newview/skins/classic/textures/toolbar_icons/facebook.png Binary files differnew file mode 100644 index 0000000000..ae524b643f --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/facebook.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/favorite_folder.png b/indra/newview/skins/classic/textures/toolbar_icons/favorite_folder.png Binary files differnew file mode 100644 index 0000000000..811efffc0b --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/favorite_folder.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/flickr.png b/indra/newview/skins/classic/textures/toolbar_icons/flickr.png Binary files differnew file mode 100644 index 0000000000..7fce9f0df2 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/flickr.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/gestures.png b/indra/newview/skins/classic/textures/toolbar_icons/gestures.png Binary files differnew file mode 100644 index 0000000000..2404bb4e25 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/gestures.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/grid_status.png b/indra/newview/skins/classic/textures/toolbar_icons/grid_status.png Binary files differnew file mode 100644 index 0000000000..b92b93cfb4 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/grid_status.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/highlighting.png b/indra/newview/skins/classic/textures/toolbar_icons/highlighting.png Binary files differnew file mode 100644 index 0000000000..093bace257 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/highlighting.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/highlighting_selected.png b/indra/newview/skins/classic/textures/toolbar_icons/highlighting_selected.png Binary files differnew file mode 100644 index 0000000000..ac75b22761 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/highlighting_selected.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/howto.png b/indra/newview/skins/classic/textures/toolbar_icons/howto.png Binary files differnew file mode 100644 index 0000000000..8594d71113 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/howto.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/inventory.png b/indra/newview/skins/classic/textures/toolbar_icons/inventory.png Binary files differnew file mode 100644 index 0000000000..ab3191255e --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/inventory.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/land.png b/indra/newview/skins/classic/textures/toolbar_icons/land.png Binary files differnew file mode 100644 index 0000000000..89ea7604a4 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/land.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/map.png b/indra/newview/skins/classic/textures/toolbar_icons/map.png Binary files differnew file mode 100644 index 0000000000..ed1049b7db --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/map.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/marketplace.png b/indra/newview/skins/classic/textures/toolbar_icons/marketplace.png Binary files differnew file mode 100644 index 0000000000..62bad20be6 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/marketplace.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/mini_cart.png b/indra/newview/skins/classic/textures/toolbar_icons/mini_cart.png Binary files differnew file mode 100644 index 0000000000..9eeb1d4e09 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/mini_cart.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/mini_map.png b/indra/newview/skins/classic/textures/toolbar_icons/mini_map.png Binary files differnew file mode 100644 index 0000000000..ab0a654056 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/mini_map.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/mktlistings.png b/indra/newview/skins/classic/textures/toolbar_icons/mktlistings.png Binary files differnew file mode 100644 index 0000000000..a6f90461d7 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/mktlistings.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/move.png b/indra/newview/skins/classic/textures/toolbar_icons/move.png Binary files differnew file mode 100644 index 0000000000..5c2ced7375 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/move.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/classic/textures/toolbar_icons/nearbyvoice.png Binary files differnew file mode 100644 index 0000000000..77a7cd5f44 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/nearbyvoice.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/outbox.png b/indra/newview/skins/classic/textures/toolbar_icons/outbox.png Binary files differnew file mode 100644 index 0000000000..0f3db1c47c --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/outbox.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/people.png b/indra/newview/skins/classic/textures/toolbar_icons/people.png Binary files differnew file mode 100644 index 0000000000..7228ae8e2f --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/people.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/performance.png b/indra/newview/skins/classic/textures/toolbar_icons/performance.png Binary files differnew file mode 100644 index 0000000000..91baf849c8 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/performance.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/picks.png b/indra/newview/skins/classic/textures/toolbar_icons/picks.png Binary files differnew file mode 100644 index 0000000000..befda04b42 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/picks.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/places.png b/indra/newview/skins/classic/textures/toolbar_icons/places.png Binary files differnew file mode 100644 index 0000000000..97d9fa066c --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/places.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/preferences.png b/indra/newview/skins/classic/textures/toolbar_icons/preferences.png Binary files differnew file mode 100644 index 0000000000..4ccd7b8ae1 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/preferences.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/profile.png b/indra/newview/skins/classic/textures/toolbar_icons/profile.png Binary files differnew file mode 100644 index 0000000000..32fe2bf8ac --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/profile.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/report_abuse.png b/indra/newview/skins/classic/textures/toolbar_icons/report_abuse.png Binary files differnew file mode 100644 index 0000000000..d5cb6ca259 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/report_abuse.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/resync_animations.png b/indra/newview/skins/classic/textures/toolbar_icons/resync_animations.png Binary files differnew file mode 100644 index 0000000000..dc9ee9c428 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/resync_animations.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/search.png b/indra/newview/skins/classic/textures/toolbar_icons/search.png Binary files differnew file mode 100644 index 0000000000..bcb11e950d --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/search.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/snapshot.png b/indra/newview/skins/classic/textures/toolbar_icons/snapshot.png Binary files differnew file mode 100644 index 0000000000..d26da9b1d2 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/snapshot.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/speak.png b/indra/newview/skins/classic/textures/toolbar_icons/speak.png Binary files differnew file mode 100644 index 0000000000..10cd354c5c --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/speak.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/twitter.png b/indra/newview/skins/classic/textures/toolbar_icons/twitter.png Binary files differnew file mode 100644 index 0000000000..0ad56f7802 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/twitter.png diff --git a/indra/newview/skins/classic/textures/toolbar_icons/view.png b/indra/newview/skins/classic/textures/toolbar_icons/view.png Binary files differnew file mode 100644 index 0000000000..ddf0df7c26 --- /dev/null +++ b/indra/newview/skins/classic/textures/toolbar_icons/view.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Down.png b/indra/newview/skins/classic/textures/widgets/Arrow_Down.png Binary files differnew file mode 100644 index 0000000000..8b592ed840 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Down.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Left.png b/indra/newview/skins/classic/textures/widgets/Arrow_Left.png Binary files differnew file mode 100644 index 0000000000..04416541b9 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Left.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Right.png b/indra/newview/skins/classic/textures/widgets/Arrow_Right.png Binary files differnew file mode 100644 index 0000000000..e57452a558 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Right.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Small_Down.png b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Down.png Binary files differnew file mode 100644 index 0000000000..8694cdf2d4 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Down.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Small_Left.png b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Left.png Binary files differnew file mode 100644 index 0000000000..a1b82d5101 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Left.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Small_Right.png b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Right.png Binary files differnew file mode 100644 index 0000000000..0e05d76852 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Right.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Small_Up.png b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Up.png Binary files differnew file mode 100644 index 0000000000..348bc4c019 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Small_Up.png diff --git a/indra/newview/skins/classic/textures/widgets/Arrow_Up.png b/indra/newview/skins/classic/textures/widgets/Arrow_Up.png Binary files differnew file mode 100644 index 0000000000..8b3da09d79 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Arrow_Up.png diff --git a/indra/newview/skins/classic/textures/widgets/Badge_Background.png b/indra/newview/skins/classic/textures/widgets/Badge_Background.png Binary files differnew file mode 100644 index 0000000000..5abc1bf489 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Badge_Background.png diff --git a/indra/newview/skins/classic/textures/widgets/Badge_Border.png b/indra/newview/skins/classic/textures/widgets/Badge_Border.png Binary files differnew file mode 100644 index 0000000000..57d3be2320 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Badge_Border.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Disabled.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Disabled.png Binary files differnew file mode 100644 index 0000000000..139d71ae2e --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Off.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Off.png Binary files differnew file mode 100644 index 0000000000..f7a6aaa275 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Over.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Over.png Binary files differnew file mode 100644 index 0000000000..48c21de265 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Press.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Press.png Binary files differnew file mode 100644 index 0000000000..3078c13d10 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Left_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Disabled.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Disabled.png Binary files differnew file mode 100644 index 0000000000..2cf3de24c0 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Off.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Off.png Binary files differnew file mode 100644 index 0000000000..fe2cfb3318 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Over.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Over.png Binary files differnew file mode 100644 index 0000000000..e0e05b19d0 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Press.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Press.png Binary files differnew file mode 100644 index 0000000000..2abb81e2b4 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Middle_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Disabled.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Disabled.png Binary files differnew file mode 100644 index 0000000000..d9c9692114 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Off.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Off.png Binary files differnew file mode 100644 index 0000000000..f1effe6ad5 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Over.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Over.png Binary files differnew file mode 100644 index 0000000000..f0109f1f78 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Press.png b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Press.png Binary files differnew file mode 100644 index 0000000000..3f2ea8737d --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/BreadCrumbBtn_Right_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_Disabled.png b/indra/newview/skins/classic/textures/widgets/Checkbox_Disabled.png Binary files differnew file mode 100644 index 0000000000..8439f82e29 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_Off.png b/indra/newview/skins/classic/textures/widgets/Checkbox_Off.png Binary files differnew file mode 100644 index 0000000000..cb9a04d84f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_On.png b/indra/newview/skins/classic/textures/widgets/Checkbox_On.png Binary files differnew file mode 100644 index 0000000000..0ec090504a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_On.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_On_Disabled.png b/indra/newview/skins/classic/textures/widgets/Checkbox_On_Disabled.png Binary files differnew file mode 100644 index 0000000000..5759f7de69 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_On_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_On_Press.png b/indra/newview/skins/classic/textures/widgets/Checkbox_On_Press.png Binary files differnew file mode 100644 index 0000000000..ba46e91c55 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_On_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/Checkbox_Press.png b/indra/newview/skins/classic/textures/widgets/Checkbox_Press.png Binary files differnew file mode 100644 index 0000000000..5f5a33d878 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Checkbox_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_Disabled.png b/indra/newview/skins/classic/textures/widgets/ComboButton_Disabled.png Binary files differnew file mode 100644 index 0000000000..ebeb813349 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_Hover.png b/indra/newview/skins/classic/textures/widgets/ComboButton_Hover.png Binary files differnew file mode 100644 index 0000000000..1377d35e1a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_Hover.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_Off.png b/indra/newview/skins/classic/textures/widgets/ComboButton_Off.png Binary files differnew file mode 100644 index 0000000000..8c315a9d25 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_On.png b/indra/newview/skins/classic/textures/widgets/ComboButton_On.png Binary files differnew file mode 100644 index 0000000000..368f907a1f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_On.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/classic/textures/widgets/ComboButton_Selected.png Binary files differnew file mode 100644 index 0000000000..15afcb04a1 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_UpOff.png b/indra/newview/skins/classic/textures/widgets/ComboButton_UpOff.png Binary files differnew file mode 100644 index 0000000000..34edea9421 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_UpOff.png diff --git a/indra/newview/skins/classic/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/classic/textures/widgets/ComboButton_UpSelected.png Binary files differnew file mode 100644 index 0000000000..9583f05507 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ComboButton_UpSelected.png diff --git a/indra/newview/skins/classic/textures/widgets/DisclosureArrow_Opened_Off.png b/indra/newview/skins/classic/textures/widgets/DisclosureArrow_Opened_Off.png Binary files differnew file mode 100644 index 0000000000..115ec7a11f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DisclosureArrow_Opened_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/DropDown_Disabled.png b/indra/newview/skins/classic/textures/widgets/DropDown_Disabled.png Binary files differnew file mode 100644 index 0000000000..9a69f7e0d9 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DropDown_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/DropDown_Off.png b/indra/newview/skins/classic/textures/widgets/DropDown_Off.png Binary files differnew file mode 100644 index 0000000000..b118e7a7d4 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DropDown_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/DropDown_On.png b/indra/newview/skins/classic/textures/widgets/DropDown_On.png Binary files differnew file mode 100644 index 0000000000..3613e42a3f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DropDown_On.png diff --git a/indra/newview/skins/classic/textures/widgets/DropDown_Press.png b/indra/newview/skins/classic/textures/widgets/DropDown_Press.png Binary files differnew file mode 100644 index 0000000000..ec0ffc2e88 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DropDown_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/DropTarget.png b/indra/newview/skins/classic/textures/widgets/DropTarget.png Binary files differnew file mode 100644 index 0000000000..01e7a88861 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/DropTarget.png diff --git a/indra/newview/skins/classic/textures/widgets/Error_Tag_Background.png b/indra/newview/skins/classic/textures/widgets/Error_Tag_Background.png Binary files differnew file mode 100644 index 0000000000..439fce3dd3 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Error_Tag_Background.png diff --git a/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Alert.png b/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Alert.png Binary files differnew file mode 100644 index 0000000000..76e078100f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Alert.png diff --git a/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Background.png b/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Background.png Binary files differnew file mode 100644 index 0000000000..6e71ef7b72 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Linden_Dollar_Background.png diff --git a/indra/newview/skins/classic/textures/widgets/ListItem_Over.png b/indra/newview/skins/classic/textures/widgets/ListItem_Over.png Binary files differnew file mode 100644 index 0000000000..8c80522232 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ListItem_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/ListItem_Select.png b/indra/newview/skins/classic/textures/widgets/ListItem_Select.png Binary files differnew file mode 100644 index 0000000000..b27e0ee787 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ListItem_Select.png diff --git a/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Off.png b/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Off.png Binary files differnew file mode 100644 index 0000000000..de71f763d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Selected.png b/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Selected.png Binary files differnew file mode 100644 index 0000000000..6020fadc5a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/MarketplaceBtn_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/Marketplace_Dropzone_Background.png b/indra/newview/skins/classic/textures/widgets/Marketplace_Dropzone_Background.png Binary files differnew file mode 100644 index 0000000000..9eb4a5c55d --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Marketplace_Dropzone_Background.png diff --git a/indra/newview/skins/classic/textures/widgets/New_Tag_Background.png b/indra/newview/skins/classic/textures/widgets/New_Tag_Background.png Binary files differnew file mode 100644 index 0000000000..3631d90825 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/New_Tag_Background.png diff --git a/indra/newview/skins/classic/textures/widgets/New_Tag_Border.png b/indra/newview/skins/classic/textures/widgets/New_Tag_Border.png Binary files differnew file mode 100644 index 0000000000..d9b78eeea4 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/New_Tag_Border.png diff --git a/indra/newview/skins/classic/textures/widgets/ProgressBar.png b/indra/newview/skins/classic/textures/widgets/ProgressBar.png Binary files differnew file mode 100644 index 0000000000..492d9b6fc4 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ProgressBar.png diff --git a/indra/newview/skins/classic/textures/widgets/ProgressBarSolid.png b/indra/newview/skins/classic/textures/widgets/ProgressBarSolid.png Binary files differnew file mode 100644 index 0000000000..59a798464d --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ProgressBarSolid.png diff --git a/indra/newview/skins/classic/textures/widgets/ProgressTrack.png b/indra/newview/skins/classic/textures/widgets/ProgressTrack.png Binary files differnew file mode 100644 index 0000000000..f4be9f5ccd --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ProgressTrack.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Disabled.png b/indra/newview/skins/classic/textures/widgets/PushButton_Disabled.png Binary files differnew file mode 100644 index 0000000000..e99ec4b14b --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Login.png b/indra/newview/skins/classic/textures/widgets/PushButton_Login.png Binary files differnew file mode 100644 index 0000000000..8e7d932ab1 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Login.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Login_Over.png b/indra/newview/skins/classic/textures/widgets/PushButton_Login_Over.png Binary files differnew file mode 100644 index 0000000000..038ba23be2 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Login_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Login_Pressed.png b/indra/newview/skins/classic/textures/widgets/PushButton_Login_Pressed.png Binary files differnew file mode 100644 index 0000000000..828aa1a139 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Login_Pressed.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Off.png b/indra/newview/skins/classic/textures/widgets/PushButton_Off.png Binary files differnew file mode 100644 index 0000000000..c74cea62d3 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_On.png b/indra/newview/skins/classic/textures/widgets/PushButton_On.png Binary files differnew file mode 100644 index 0000000000..e387c7e313 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_On.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_On_Selected.png b/indra/newview/skins/classic/textures/widgets/PushButton_On_Selected.png Binary files differnew file mode 100644 index 0000000000..ee1329e842 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_On_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Over.png b/indra/newview/skins/classic/textures/widgets/PushButton_Over.png Binary files differnew file mode 100644 index 0000000000..34a64a3ade --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Press.png b/indra/newview/skins/classic/textures/widgets/PushButton_Press.png Binary files differnew file mode 100644 index 0000000000..79fc601f27 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Selected.png b/indra/newview/skins/classic/textures/widgets/PushButton_Selected.png Binary files differnew file mode 100644 index 0000000000..7d9cb29a7b --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Disabled.png b/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Disabled.png Binary files differnew file mode 100644 index 0000000000..6332412692 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..e2818da352 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/PushButton_Selected_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_Disabled.png b/indra/newview/skins/classic/textures/widgets/RadioButton_Disabled.png Binary files differnew file mode 100644 index 0000000000..32ec25fe0e --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_Off.png b/indra/newview/skins/classic/textures/widgets/RadioButton_Off.png Binary files differnew file mode 100644 index 0000000000..5d267af5dc --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_On.png b/indra/newview/skins/classic/textures/widgets/RadioButton_On.png Binary files differnew file mode 100644 index 0000000000..e6bf0db157 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_On.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_On_Disabled.png b/indra/newview/skins/classic/textures/widgets/RadioButton_On_Disabled.png Binary files differnew file mode 100644 index 0000000000..72aae43618 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_On_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_On_Press.png b/indra/newview/skins/classic/textures/widgets/RadioButton_On_Press.png Binary files differnew file mode 100644 index 0000000000..f3883b82b3 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_On_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/RadioButton_Press.png b/indra/newview/skins/classic/textures/widgets/RadioButton_Press.png Binary files differnew file mode 100644 index 0000000000..0025256045 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/RadioButton_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down.png Binary files differnew file mode 100644 index 0000000000..768909d447 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Opaque.png Binary files differnew file mode 100644 index 0000000000..1c57521e9e --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Over_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Over_Opaque.png Binary files differnew file mode 100644 index 0000000000..3db7be9ffa --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Down_Over_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left.png Binary files differnew file mode 100644 index 0000000000..9ef73f48a5 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Opaque.png Binary files differnew file mode 100644 index 0000000000..0fb0671036 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Over_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Over_Opaque.png Binary files differnew file mode 100644 index 0000000000..464130c359 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Left_Over_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right.png Binary files differnew file mode 100644 index 0000000000..8a59274b8a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Opaque.png Binary files differnew file mode 100644 index 0000000000..ab1f1ac90b --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Over_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Over_Opaque.png Binary files differnew file mode 100644 index 0000000000..e5a94429a3 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Right_Over_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up.png Binary files differnew file mode 100644 index 0000000000..064580f0c8 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Opaque.png Binary files differnew file mode 100644 index 0000000000..2cc4857d27 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Over_Opaque.png b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Over_Opaque.png Binary files differnew file mode 100644 index 0000000000..2018b53af9 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollArrow_Up_Over_Opaque.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollThumb_Horiz.png b/indra/newview/skins/classic/textures/widgets/ScrollThumb_Horiz.png Binary files differnew file mode 100644 index 0000000000..9afc907c1c --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollThumb_Horiz.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollThumb_Vert.png b/indra/newview/skins/classic/textures/widgets/ScrollThumb_Vert.png Binary files differnew file mode 100644 index 0000000000..ede643e528 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollThumb_Vert.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollTrack_Horiz.png b/indra/newview/skins/classic/textures/widgets/ScrollTrack_Horiz.png Binary files differnew file mode 100644 index 0000000000..35da770073 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollTrack_Horiz.png diff --git a/indra/newview/skins/classic/textures/widgets/ScrollTrack_Vert.png b/indra/newview/skins/classic/textures/widgets/ScrollTrack_Vert.png Binary files differnew file mode 100644 index 0000000000..cf67c23133 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/ScrollTrack_Vert.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Disabled.png Binary files differnew file mode 100644 index 0000000000..ef50fb5d51 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Off.png Binary files differnew file mode 100644 index 0000000000..191dbf08fc --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Over.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Over.png Binary files differnew file mode 100644 index 0000000000..d5882bce85 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Press.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Press.png Binary files differnew file mode 100644 index 0000000000..ddaab1cfcd --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected.png Binary files differnew file mode 100644 index 0000000000..c8634b1294 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png Binary files differnew file mode 100644 index 0000000000..465ce8d7da --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Over.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Over.png Binary files differnew file mode 100644 index 0000000000..9ff1e05a52 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Press.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..4775dab43b --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Left_Selected_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Disabled.png Binary files differnew file mode 100644 index 0000000000..65d082b993 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected.png Binary files differnew file mode 100644 index 0000000000..12f55c599e --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png Binary files differnew file mode 100644 index 0000000000..6a023156c5 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..457644e69a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Middle_Selected_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Disabled.png Binary files differnew file mode 100644 index 0000000000..ccea8fc784 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Off.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Off.png Binary files differnew file mode 100644 index 0000000000..f90ede3b71 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_On_Selected.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_On_Selected.png Binary files differnew file mode 100644 index 0000000000..524d3b6bfd --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_On_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Over.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Over.png Binary files differnew file mode 100644 index 0000000000..cadcec085a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Over.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Press.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Press.png Binary files differnew file mode 100644 index 0000000000..889d06a690 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected.png Binary files differnew file mode 100644 index 0000000000..aa3906d236 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png Binary files differnew file mode 100644 index 0000000000..255fd1c415 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Press.png b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..a69d0b525f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SegmentedBtn_Right_Selected_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/classic/textures/widgets/SliderThumb_Disabled.png Binary files differnew file mode 100644 index 0000000000..5cfa3ae4e1 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SliderThumb_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/SliderThumb_Off.png b/indra/newview/skins/classic/textures/widgets/SliderThumb_Off.png Binary files differnew file mode 100644 index 0000000000..66cdcbeb94 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SliderThumb_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/SliderThumb_Press.png b/indra/newview/skins/classic/textures/widgets/SliderThumb_Press.png Binary files differnew file mode 100644 index 0000000000..0bf8e43e81 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SliderThumb_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/SliderTrack_Horiz.png b/indra/newview/skins/classic/textures/widgets/SliderTrack_Horiz.png Binary files differnew file mode 100644 index 0000000000..720830f83f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SliderTrack_Horiz.png diff --git a/indra/newview/skins/classic/textures/widgets/SliderTrack_Vert.png b/indra/newview/skins/classic/textures/widgets/SliderTrack_Vert.png Binary files differnew file mode 100644 index 0000000000..c01db44707 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/SliderTrack_Vert.png diff --git a/indra/newview/skins/classic/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/classic/textures/widgets/Stepper_Down_Off.png Binary files differnew file mode 100644 index 0000000000..ff21034095 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Stepper_Down_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/classic/textures/widgets/Stepper_Down_Press.png Binary files differnew file mode 100644 index 0000000000..e888e1e045 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Stepper_Down_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/classic/textures/widgets/Stepper_Up_Off.png Binary files differnew file mode 100644 index 0000000000..133845bdbc --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Stepper_Up_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/classic/textures/widgets/Stepper_Up_Press.png Binary files differnew file mode 100644 index 0000000000..dffd557bbd --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Stepper_Up_Press.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Active.png b/indra/newview/skins/classic/textures/widgets/TextField_Active.png Binary files differnew file mode 100644 index 0000000000..66c3867b81 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Active.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Disabled.png b/indra/newview/skins/classic/textures/widgets/TextField_Disabled.png Binary files differnew file mode 100644 index 0000000000..baf747f581 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Off.png b/indra/newview/skins/classic/textures/widgets/TextField_Off.png Binary files differnew file mode 100644 index 0000000000..a35562f950 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Search_Active.png b/indra/newview/skins/classic/textures/widgets/TextField_Search_Active.png Binary files differnew file mode 100644 index 0000000000..572535f1ab --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Search_Active.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Search_Disabled.png b/indra/newview/skins/classic/textures/widgets/TextField_Search_Disabled.png Binary files differnew file mode 100644 index 0000000000..94b4b158f7 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Search_Disabled.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/classic/textures/widgets/TextField_Search_Highlight.png Binary files differnew file mode 100644 index 0000000000..7768da04e8 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Search_Highlight.png diff --git a/indra/newview/skins/classic/textures/widgets/TextField_Search_Off.png b/indra/newview/skins/classic/textures/widgets/TextField_Search_Off.png Binary files differnew file mode 100644 index 0000000000..fccd38c807 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/TextField_Search_Off.png diff --git a/indra/newview/skins/classic/textures/widgets/Tooltip.png b/indra/newview/skins/classic/textures/widgets/Tooltip.png Binary files differnew file mode 100644 index 0000000000..1be53bdaa2 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/Tooltip.png diff --git a/indra/newview/skins/classic/textures/widgets/bevel_background.png b/indra/newview/skins/classic/textures/widgets/bevel_background.png Binary files differnew file mode 100644 index 0000000000..6304124aec --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/bevel_background.png diff --git a/indra/newview/skins/classic/textures/widgets/buy_off.png b/indra/newview/skins/classic/textures/widgets/buy_off.png Binary files differnew file mode 100644 index 0000000000..517e6f9e54 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/buy_off.png diff --git a/indra/newview/skins/classic/textures/widgets/buy_over.png b/indra/newview/skins/classic/textures/widgets/buy_over.png Binary files differnew file mode 100644 index 0000000000..c17395d2e7 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/buy_over.png diff --git a/indra/newview/skins/classic/textures/widgets/buy_press.png b/indra/newview/skins/classic/textures/widgets/buy_press.png Binary files differnew file mode 100644 index 0000000000..96f818e69f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/buy_press.png diff --git a/indra/newview/skins/classic/textures/widgets/horizontal_drag_handle.png b/indra/newview/skins/classic/textures/widgets/horizontal_drag_handle.png Binary files differnew file mode 100644 index 0000000000..631d653968 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/horizontal_drag_handle.png diff --git a/indra/newview/skins/classic/textures/widgets/jump_left_in.png b/indra/newview/skins/classic/textures/widgets/jump_left_in.png Binary files differnew file mode 100644 index 0000000000..073606628c --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/jump_left_in.png diff --git a/indra/newview/skins/classic/textures/widgets/jump_left_out.png b/indra/newview/skins/classic/textures/widgets/jump_left_out.png Binary files differnew file mode 100644 index 0000000000..71d5c5c36a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/jump_left_out.png diff --git a/indra/newview/skins/classic/textures/widgets/jump_right_in.png b/indra/newview/skins/classic/textures/widgets/jump_right_in.png Binary files differnew file mode 100644 index 0000000000..96f8501932 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/jump_right_in.png diff --git a/indra/newview/skins/classic/textures/widgets/jump_right_out.png b/indra/newview/skins/classic/textures/widgets/jump_right_out.png Binary files differnew file mode 100644 index 0000000000..9c02f5f649 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/jump_right_out.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_moon_back.png b/indra/newview/skins/classic/textures/widgets/track_control_moon_back.png Binary files differnew file mode 100644 index 0000000000..03d1e805e1 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_moon_back.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_moon_front.png b/indra/newview/skins/classic/textures/widgets/track_control_moon_front.png Binary files differnew file mode 100644 index 0000000000..cdc52fe08a --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_moon_front.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom.png Binary files differnew file mode 100644 index 0000000000..c08b54c269 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom_active.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom_active.png Binary files differnew file mode 100644 index 0000000000..a2b37d1b43 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_bottom_active.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side.png Binary files differnew file mode 100644 index 0000000000..3439e8717f --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side_active.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side_active.png Binary files differnew file mode 100644 index 0000000000..fa745175be --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_left_side_active.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side.png Binary files differnew file mode 100644 index 0000000000..f92fdb3d92 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side_active.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side_active.png Binary files differnew file mode 100644 index 0000000000..23571d6473 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_right_side_active.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_top.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_top.png Binary files differnew file mode 100644 index 0000000000..ae67084a7d --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_top.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_rotate_top_active.png b/indra/newview/skins/classic/textures/widgets/track_control_rotate_top_active.png Binary files differnew file mode 100644 index 0000000000..4e1d0ad096 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_rotate_top_active.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_sphere.png b/indra/newview/skins/classic/textures/widgets/track_control_sphere.png Binary files differnew file mode 100644 index 0000000000..b6592b5992 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_sphere.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_sun_back.png b/indra/newview/skins/classic/textures/widgets/track_control_sun_back.png Binary files differnew file mode 100644 index 0000000000..b3191ccc5d --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_sun_back.png diff --git a/indra/newview/skins/classic/textures/widgets/track_control_sun_front.png b/indra/newview/skins/classic/textures/widgets/track_control_sun_front.png Binary files differnew file mode 100644 index 0000000000..1cdcbf7861 --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/track_control_sun_front.png diff --git a/indra/newview/skins/classic/textures/widgets/vertical_drag_handle.png b/indra/newview/skins/classic/textures/widgets/vertical_drag_handle.png Binary files differnew file mode 100644 index 0000000000..d78e898a9c --- /dev/null +++ b/indra/newview/skins/classic/textures/widgets/vertical_drag_handle.png diff --git a/indra/newview/skins/classic/textures/windows/Dragbar.png b/indra/newview/skins/classic/textures/windows/Dragbar.png Binary files differnew file mode 100644 index 0000000000..3a998abdc3 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Dragbar.png diff --git a/indra/newview/skins/classic/textures/windows/Flyout_Left.png b/indra/newview/skins/classic/textures/windows/Flyout_Left.png Binary files differnew file mode 100644 index 0000000000..3110d7f6b5 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Flyout_Left.png diff --git a/indra/newview/skins/classic/textures/windows/Flyout_Pointer.png b/indra/newview/skins/classic/textures/windows/Flyout_Pointer.png Binary files differnew file mode 100644 index 0000000000..4076bb393e --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Flyout_Pointer.png diff --git a/indra/newview/skins/classic/textures/windows/Flyout_Right.png b/indra/newview/skins/classic/textures/windows/Flyout_Right.png Binary files differnew file mode 100644 index 0000000000..4c55cd6287 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Flyout_Right.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Close_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Close_Foreground.png Binary files differnew file mode 100644 index 0000000000..cb516886a2 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Close_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Close_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Close_Press.png Binary files differnew file mode 100644 index 0000000000..283981f6ea --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Close_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Close_Toast.png b/indra/newview/skins/classic/textures/windows/Icon_Close_Toast.png Binary files differnew file mode 100644 index 0000000000..b08ffbc742 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Close_Toast.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Dock_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Dock_Foreground.png Binary files differnew file mode 100644 index 0000000000..7508fcb25e --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Dock_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Dock_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Dock_Press.png Binary files differnew file mode 100644 index 0000000000..3f2c560398 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Dock_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Gear.png b/indra/newview/skins/classic/textures/windows/Icon_Gear.png Binary files differnew file mode 100644 index 0000000000..7cf85bece4 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Gear.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Gear_Background.png b/indra/newview/skins/classic/textures/windows/Icon_Gear_Background.png Binary files differnew file mode 100644 index 0000000000..09d83e62e4 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Gear_Background.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Gear_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Gear_Foreground.png Binary files differnew file mode 100644 index 0000000000..fa998eee5d --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Gear_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Gear_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Gear_Press.png Binary files differnew file mode 100644 index 0000000000..603fa2f388 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Gear_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Help_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Help_Foreground.png Binary files differnew file mode 100644 index 0000000000..1bde4c040a --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Help_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Help_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Help_Press.png Binary files differnew file mode 100644 index 0000000000..f3b885283f --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Help_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Minimize_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Minimize_Foreground.png Binary files differnew file mode 100644 index 0000000000..942efb40f7 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Minimize_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Minimize_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Minimize_Press.png Binary files differnew file mode 100644 index 0000000000..1fe37b7a2e --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Minimize_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Restore_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Restore_Foreground.png Binary files differnew file mode 100644 index 0000000000..7840deccb8 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Restore_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Restore_Press.png b/indra/newview/skins/classic/textures/windows/Icon_Restore_Press.png Binary files differnew file mode 100644 index 0000000000..33258a0bc5 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Restore_Press.png diff --git a/indra/newview/skins/classic/textures/windows/Icon_Undock_Foreground.png b/indra/newview/skins/classic/textures/windows/Icon_Undock_Foreground.png Binary files differnew file mode 100644 index 0000000000..df826226e6 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Icon_Undock_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/Inspector_Background.png b/indra/newview/skins/classic/textures/windows/Inspector_Background.png Binary files differnew file mode 100644 index 0000000000..3053269b84 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Inspector_Background.png diff --git a/indra/newview/skins/classic/textures/windows/Inspector_Hover.png b/indra/newview/skins/classic/textures/windows/Inspector_Hover.png Binary files differnew file mode 100644 index 0000000000..0cb846eba0 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Inspector_Hover.png diff --git a/indra/newview/skins/classic/textures/windows/Inspector_I.png b/indra/newview/skins/classic/textures/windows/Inspector_I.png Binary files differnew file mode 100644 index 0000000000..0d1719c66f --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Inspector_I.png diff --git a/indra/newview/skins/classic/textures/windows/Resize_Corner.png b/indra/newview/skins/classic/textures/windows/Resize_Corner.png Binary files differnew file mode 100644 index 0000000000..4a533011df --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Resize_Corner.png diff --git a/indra/newview/skins/classic/textures/windows/Toast_Background.png b/indra/newview/skins/classic/textures/windows/Toast_Background.png Binary files differnew file mode 100644 index 0000000000..00676350ca --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Toast_Background.png diff --git a/indra/newview/skins/classic/textures/windows/Toast_CloseBtn.png b/indra/newview/skins/classic/textures/windows/Toast_CloseBtn.png Binary files differnew file mode 100644 index 0000000000..f37d8d085d --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Toast_CloseBtn.png diff --git a/indra/newview/skins/classic/textures/windows/Toast_Over.png b/indra/newview/skins/classic/textures/windows/Toast_Over.png Binary files differnew file mode 100644 index 0000000000..5191e0858d --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Toast_Over.png diff --git a/indra/newview/skins/classic/textures/windows/Volume_Background.png b/indra/newview/skins/classic/textures/windows/Volume_Background.png Binary files differnew file mode 100644 index 0000000000..9f8680d079 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Volume_Background.png diff --git a/indra/newview/skins/classic/textures/windows/Wearables_Divider.png b/indra/newview/skins/classic/textures/windows/Wearables_Divider.png Binary files differnew file mode 100644 index 0000000000..8795ccd661 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Wearables_Divider.png diff --git a/indra/newview/skins/classic/textures/windows/Window_Background.png b/indra/newview/skins/classic/textures/windows/Window_Background.png Binary files differnew file mode 100644 index 0000000000..f19fb0300b --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Window_Background.png diff --git a/indra/newview/skins/classic/textures/windows/Window_Foreground.png b/indra/newview/skins/classic/textures/windows/Window_Foreground.png Binary files differnew file mode 100644 index 0000000000..15d2ff72b6 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/Window_Foreground.png diff --git a/indra/newview/skins/classic/textures/windows/add_payment_image_center.png b/indra/newview/skins/classic/textures/windows/add_payment_image_center.png Binary files differnew file mode 100644 index 0000000000..0b99a72f32 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/add_payment_image_center.png diff --git a/indra/newview/skins/classic/textures/windows/add_payment_image_left.png b/indra/newview/skins/classic/textures/windows/add_payment_image_left.png Binary files differnew file mode 100644 index 0000000000..a5b28d7023 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/add_payment_image_left.png diff --git a/indra/newview/skins/classic/textures/windows/add_payment_image_right.png b/indra/newview/skins/classic/textures/windows/add_payment_image_right.png Binary files differnew file mode 100644 index 0000000000..5724d39744 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/add_payment_image_right.png diff --git a/indra/newview/skins/classic/textures/windows/first_login_image.jpg b/indra/newview/skins/classic/textures/windows/first_login_image.jpg Binary files differnew file mode 100644 index 0000000000..30f31341ed --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/first_login_image.jpg diff --git a/indra/newview/skins/classic/textures/windows/hint_arrow_down.png b/indra/newview/skins/classic/textures/windows/hint_arrow_down.png Binary files differnew file mode 100644 index 0000000000..b449d3be7c --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_arrow_down.png diff --git a/indra/newview/skins/classic/textures/windows/hint_arrow_left.png b/indra/newview/skins/classic/textures/windows/hint_arrow_left.png Binary files differnew file mode 100644 index 0000000000..d93d621067 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_arrow_left.png diff --git a/indra/newview/skins/classic/textures/windows/hint_arrow_lower_left.png b/indra/newview/skins/classic/textures/windows/hint_arrow_lower_left.png Binary files differnew file mode 100644 index 0000000000..5e8def5a5b --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_arrow_lower_left.png diff --git a/indra/newview/skins/classic/textures/windows/hint_arrow_right.png b/indra/newview/skins/classic/textures/windows/hint_arrow_right.png Binary files differnew file mode 100644 index 0000000000..3524487fb3 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_arrow_right.png diff --git a/indra/newview/skins/classic/textures/windows/hint_arrow_up.png b/indra/newview/skins/classic/textures/windows/hint_arrow_up.png Binary files differnew file mode 100644 index 0000000000..aca440d712 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_arrow_up.png diff --git a/indra/newview/skins/classic/textures/windows/hint_background.png b/indra/newview/skins/classic/textures/windows/hint_background.png Binary files differnew file mode 100644 index 0000000000..d045bc5e29 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/hint_background.png diff --git a/indra/newview/skins/classic/textures/windows/login_mp_logo.png b/indra/newview/skins/classic/textures/windows/login_mp_logo.png Binary files differnew file mode 100644 index 0000000000..7526374ba2 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/login_mp_logo.png diff --git a/indra/newview/skins/classic/textures/windows/login_mp_logo_small.png b/indra/newview/skins/classic/textures/windows/login_mp_logo_small.png Binary files differnew file mode 100644 index 0000000000..779d8ff649 --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/login_mp_logo_small.png diff --git a/indra/newview/skins/classic/textures/windows/login_sl_logo.png b/indra/newview/skins/classic/textures/windows/login_sl_logo.png Binary files differnew file mode 100644 index 0000000000..e4d4eb3ebf --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/login_sl_logo.png diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png b/indra/newview/skins/classic/textures/windows/login_sl_logo_small.png Binary files differindex 36fb15de08..36fb15de08 100644 --- a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png +++ b/indra/newview/skins/classic/textures/windows/login_sl_logo_small.png diff --git a/indra/newview/skins/classic/textures/windows/startup_logo.png b/indra/newview/skins/classic/textures/windows/startup_logo.png Binary files differnew file mode 100644 index 0000000000..6a81a6451d --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/startup_logo.png diff --git a/indra/newview/skins/classic/textures/windows/yellow_gradient.png b/indra/newview/skins/classic/textures/windows/yellow_gradient.png Binary files differnew file mode 100644 index 0000000000..4a07282ecb --- /dev/null +++ b/indra/newview/skins/classic/textures/windows/yellow_gradient.png diff --git a/indra/newview/skins/classic/textures/world/BeaconArrow.png b/indra/newview/skins/classic/textures/world/BeaconArrow.png Binary files differnew file mode 100644 index 0000000000..54934f738a --- /dev/null +++ b/indra/newview/skins/classic/textures/world/BeaconArrow.png diff --git a/indra/newview/skins/classic/textures/world/CameraDragDot.png b/indra/newview/skins/classic/textures/world/CameraDragDot.png Binary files differnew file mode 100644 index 0000000000..2ccf098e0f --- /dev/null +++ b/indra/newview/skins/classic/textures/world/CameraDragDot.png diff --git a/indra/newview/skins/classic/textures/world/NoEntryLines.png b/indra/newview/skins/classic/textures/world/NoEntryLines.png Binary files differnew file mode 100644 index 0000000000..b295ba1281 --- /dev/null +++ b/indra/newview/skins/classic/textures/world/NoEntryLines.png diff --git a/indra/newview/skins/classic/textures/world/NoEntryPassLines.png b/indra/newview/skins/classic/textures/world/NoEntryPassLines.png Binary files differnew file mode 100644 index 0000000000..34900e2c02 --- /dev/null +++ b/indra/newview/skins/classic/textures/world/NoEntryPassLines.png diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 699b727212..838b6da5a8 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -1,905 +1,920 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <colors> - <!-- Named Colors --> - <color - name="EmphasisColor" - value="0.25 0.48 0.70 1" /> - <color - name="EmphasisColor_13" - value="0.25 0.48 0.70 0.13" /> - <color - name="EmphasisColor_35" - value="0.25 0.48 0.70 0.35" /> - <color - name="BeaconColor" - value="0.749 0.298 0 1" /> - <color - name="White" - value="1 1 1 1" /> - <color - name="White_05" - value="1 1 1 0.05" /> - <color - name="White_10" - value="1 1 1 0.1" /> - <color - name="White_25" - value="1 1 1 0.25" /> - <color - name="White_50" - value="1 1 1 0.5" /> - <color - name="LtGray" - value="0.75 0.75 0.75 1" /> - <color - name="LtGray_35" - value="0.75 0.75 0.75 0.35" /> - <color - name="LtGray_50" - value="0.75 0.75 0.75 0.50" /> - <color - name="Gray" - value="0.5 0.5 0.5 1" /> - <color - name="DkGray0" - value="0.27 0.27 0.27 1" /> - <color - name="DkGray" - value="0.125 0.125 0.125 1" /> - <color - name="DkGray_66" - value="0.125 0.125 0.125 .66" /> - <color - name="DkGray2" - value="0.169 0.169 0.169 1" /> - <color - name="MouseGray" - value="0.191 0.191 0.191 1" /> - <color - name="Black" - value="0 0 0 1" /> - <color - name="Black_10" - value="0 0 0 0.1" /> - <color - name="Black_25" - value="0 0 0 0.25" /> - <color - name="Black_50" - value="0 0 0 0.5" /> - <color - name="FrogGreen" - value="0.26 0.33 0.42 1" /> - <!-- ^(Not actually green) --> - <color - name="Red" - value="1 0 0 1" /> - <color - name="Blue" - value="0 0 1 1" /> - <color - name="Yellow" - value="1 1 0 1" /> - <color - name="Green" - value="0 1 0 1" /> - <color - name="Transparent" - value="0 0 0 0" /> - <color - name="Purple" - value="1 0 1 1" /> - <color - name="Lime" - value=".8 1 .73 1" /> - <color - name="LtYellow" - value="1 1 .79 1" /> - <color - name="DrYellow" - value="1 0.86 0 1" /> - <color - name="LtOrange" - value="1 .85 .73 1" /> - <color - name="MdBlue" - value=".07 .38 .51 1" /> - <color - name="DkBlue" - value=".06 .06 .3 1" /> - <color - name="LtRed" - value="1 0.2 0.2 1" /> - <color - name="LtGreen" - value="0.2 1 0.2 1" /> - <color - name="Red_80" - value="1 0 0 0.8" /> - <color - name="DkRed" - value="0.3 0.06 0.06 1" /> - <color - name="Green_80" - value="0 1 0 0.8" /> - <color - name="Blue_80" - value="0 0 1 0.8" /> - <color - name="Orange" - value="1 .82 .46 1" /> + <!-- Named Colors --> + <color + name="EmphasisColor" + value="0.25 0.48 0.70 1" /> + <color + name="EmphasisColor_35" + value="0.25 0.48 0.70 0.35" /> + <color + name="SelectionColor" + value="0.706 0.851 1 1" /> + <color + name="ScrollHoveredColor" + value="0.18 0.26 0.33 1" /> + <color + name="BeaconColor" + value="0.749 0.298 0 1" /> + <color + name="White" + value="1 1 1 1" /> + <color + name="White_05" + value="1 1 1 0.05" /> + <color + name="White_10" + value="1 1 1 0.1" /> + <color + name="White_25" + value="1 1 1 0.25" /> + <color + name="White_50" + value="1 1 1 0.5" /> + <color + name="LtGray" + value="0.75 0.75 0.75 1" /> + <color + name="LtGray_35" + value="0.75 0.75 0.75 0.35" /> + <color + name="LtGray_50" + value="0.75 0.75 0.75 0.50" /> + <color + name="Gray" + value="0.5 0.5 0.5 1" /> + <color + name="DkGray0" + value="0.27 0.27 0.27 1" /> + <color + name="DkGray" + value="0.125 0.125 0.125 1" /> + <color + name="DkGray_66" + value="0.125 0.125 0.125 .66" /> + <color + name="DkGray2" + value="0.169 0.169 0.169 1" /> + <color + name="DkGrayLogin" + value="0.129 0.133 0.137 1" /> + <color + name="MouseGray" + value="0.191 0.191 0.191 1" /> + <color + name="Black" + value="0 0 0 1" /> + <color + name="Black_10" + value="0 0 0 0.1" /> + <color + name="Black_25" + value="0 0 0 0.25" /> + <color + name="Black_50" + value="0 0 0 0.5" /> + <color + name="FrogGreen" + value="0.26 0.33 0.42 1" /> + <!-- ^(Not actually green) --> + <color + name="Red" + value="1 0 0 1" /> + <color + name="Blue" + value="0 0 1 1" /> + <color + name="Yellow" + value="1 1 0 1" /> + <color + name="Green" + value="0 1 0 1" /> + <color + name="Transparent" + value="0 0 0 0" /> + <color + name="Purple" + value="1 0 1 1" /> + <color + name="Lime" + value=".8 1 .73 1" /> + <color + name="LtYellow" + value="1 1 .79 1" /> + <color + name="DrYellow" + value="1 0.86 0 1" /> + <color + name="LtOrange" + value="1 .85 .73 1" /> + <color + name="MdBlue" + value=".07 .38 .51 1" /> + <color + name="DkBlue" + value=".06 .06 .3 1" /> + <color + name="LtRed" + value="1 0.2 0.2 1" /> + <color + name="LtGreen" + value="0.2 1 0.2 1" /> + <color + name="Red_80" + value="1 0 0 0.8" /> + <color + name="DkRed" + value="0.3 0.06 0.06 1" /> + <color + name="Green_80" + value="0 1 0 0.8" /> + <color + name="Blue_80" + value="0 0 1 0.8" /> + <color + name="Orange" + value="1 .82 .46 1" /> - <!-- This color name makes potentially unused colors show up bright purple. - Leave this here until all Unused? are removed below, otherwise - the viewer generates many warnings on startup. --> - <color - name="Unused?" - value=".831 1 0 1" /> + <!-- This color name makes potentially unused colors show up bright purple. + Leave this here until all Unused? are removed below, otherwise + the viewer generates many warnings on startup. --> + <color + name="Unused?" + value=".831 1 0 1" /> - <!-- UI Definitions --> + <!-- UI Definitions --> <color - name="AccordionHeaderTextColor" - reference="LtGray" /> + name="AccordionHeaderTextColor" + reference="LtGray" /> <color - name="AgentChatColor" - reference="White" /> + name="AgentChatColor" + reference="White" /> <color - name="AlertBoxColor" - value="0.24 0.24 0.24 1" /> + name="AlertBoxColor" + value="0.24 0.24 0.24 1" /> <color - name="AlertCautionBoxColor" - value="1 0.82 0.46 1" /> + name="AlertCautionBoxColor" + value="1 0.82 0.46 1" /> <color - name="AlertCautionTextColor" - reference="LtYellow" /> + name="AlertCautionTextColor" + reference="LtYellow" /> <color - name="AvatarListItemIconDefaultColor" - reference="White" /> + name="AvatarListItemIconDefaultColor" + reference="White" /> <color - name="AvatarListItemIconOnlineColor" - reference="White" /> + name="AvatarListItemIconOnlineColor" + reference="White" /> <color - name="AvatarListItemIconOfflineColor" - value="0.5 0.5 0.5 0.5" /> + name="AvatarListItemIconOfflineColor" + value="0.5 0.5 0.5 0.5" /> <color - name="AvatarListItemIconVoiceInvitedColor" - reference="AvatarListItemIconOfflineColor" /> + name="AvatarListItemIconVoiceInvitedColor" + reference="AvatarListItemIconOfflineColor" /> <color - name="AvatarListItemIconVoiceJoinedColor" - reference="AvatarListItemIconOnlineColor" /> + name="AvatarListItemIconVoiceJoinedColor" + reference="AvatarListItemIconOnlineColor" /> <color - name="AvatarListItemIconVoiceLeftColor" - reference="AvatarListItemIconOfflineColor" /> + name="AvatarListItemIconVoiceLeftColor" + reference="AvatarListItemIconOfflineColor" /> <color - name="BadgeImageColor" - value="1.0 0.40 0.0 1.0" /> + name="BadgeImageColor" + value="1.0 0.40 0.0 1.0" /> <color - name="BadgeBorderColor" - value="0.9 0.9 0.9 1.0" /> + name="BadgeBorderColor" + value="0.9 0.9 0.9 1.0" /> <color - name="BadgeLabelColor" - reference="White" /> + name="BadgeLabelColor" + reference="White" /> <color - name="ButtonBorderColor" - reference="Unused?" /> + name="ButtonBorderColor" + reference="Unused?" /> <color - name="ButtonCautionImageColor" - reference="Unused?" /> + name="ButtonCautionImageColor" + reference="Unused?" /> <color - name="ButtonColor" - reference="Unused?" /> + name="ButtonColor" + reference="Unused?" /> <color - name="ButtonFlashBgColor" - reference="Unused?" /> + name="ButtonFlashBgColor" + reference="Unused?" /> <color - name="ButtonImageColor" - reference="White" /> + name="ButtonImageColor" + reference="White" /> <color - name="ButtonLabelColor" - reference="LtGray" /> + name="ButtonLabelColor" + reference="LtGray" /> <color - name="ButtonLabelDisabledColor" - reference="White_25" /> + name="ButtonLabelDisabledColor" + reference="White_25" /> <color - name="ButtonLabelSelectedColor" - reference="White" /> + name="ButtonLabelSelectedColor" + reference="White" /> <color - name="ButtonLabelSelectedDisabledColor" - reference="White_25" /> + name="ButtonLabelSelectedDisabledColor" + reference="White_25" /> <color - name="ButtonSelectedBgColor" - reference="Unused?" /> + name="ButtonSelectedBgColor" + reference="Unused?" /> <color - name="ButtonSelectedColor" - reference="Unused?" /> + name="ButtonSelectedColor" + reference="Unused?" /> <color - name="ButtonUnselectedBgColor" - reference="Unused?" /> + name="ButtonUnselectedBgColor" + reference="Unused?" /> <color - name="ButtonUnselectedFgColor" - reference="Unused?" /> + name="ButtonUnselectedFgColor" + reference="Unused?" /> <color - name="ChatHistoryBgColor" - reference="Transparent" /> + name="ChatHistoryBgColor" + reference="Transparent" /> <color - name="ChatHistoryTextColor" - reference="LtGray" /> + name="ChatHistoryTextColor" + reference="LtGray" /> <color - name="ChicletFlashColor" - value="0.114 0.65 0.1" /> + name="ChicletFlashColor" + value="0.114 0.65 0.1" /> <color - name="ColorDropShadow" - reference="Black_50" /> + name="ColorDropShadow" + reference="Black_50" /> <color - name="ColorPaletteEntry01" - reference="Black" /> + name="ColorPaletteEntry01" + reference="Black" /> <color - name="ColorPaletteEntry02" - reference="Gray" /> + name="ColorPaletteEntry02" + reference="Gray" /> <color - name="ColorPaletteEntry03" - value="0.5 0 0 1" /> + name="ColorPaletteEntry03" + value="0.5 0 0 1" /> <color - name="ColorPaletteEntry04" - value="0.5 0.5 0 1" /> + name="ColorPaletteEntry04" + value="0.5 0.5 0 1" /> <color - name="ColorPaletteEntry05" - value="0 0.5 0 1" /> + name="ColorPaletteEntry05" + value="0 0.5 0 1" /> <color - name="ColorPaletteEntry06" - value="0 0.5 0.5 1" /> + name="ColorPaletteEntry06" + value="0 0.5 0.5 1" /> <color - name="ColorPaletteEntry07" - value="0 0 0.5 1" /> + name="ColorPaletteEntry07" + value="0 0 0.5 1" /> <color - name="ColorPaletteEntry08" - value="0.5 0 0.5 1" /> + name="ColorPaletteEntry08" + value="0.5 0 0.5 1" /> <color - name="ColorPaletteEntry09" - value="0.5 0.5 0 1" /> + name="ColorPaletteEntry09" + value="0.5 0.5 0 1" /> <color - name="ColorPaletteEntry10" - value="0 0.25 0.25 1" /> + name="ColorPaletteEntry10" + value="0 0.25 0.25 1" /> <color - name="ColorPaletteEntry11" - value="0 0.5 1 1" /> + name="ColorPaletteEntry11" + value="0 0.5 1 1" /> <color - name="ColorPaletteEntry12" - value="0 0.25 0.5 1" /> + name="ColorPaletteEntry12" + value="0 0.25 0.5 1" /> <color - name="ColorPaletteEntry13" - value="0.5 0 1 1" /> + name="ColorPaletteEntry13" + value="0.5 0 1 1" /> <color - name="ColorPaletteEntry14" - value="0.5 0.25 0 1" /> + name="ColorPaletteEntry14" + value="0.5 0.25 0 1" /> <color - name="ColorPaletteEntry15" - reference="White" /> + name="ColorPaletteEntry15" + reference="White" /> <color - name="ColorPaletteEntry16" - reference="LtYellow" /> + name="ColorPaletteEntry16" + reference="LtYellow" /> <color - name="ColorPaletteEntry17" - reference="White" /> + name="ColorPaletteEntry17" + reference="White" /> <color - name="ColorPaletteEntry18" - reference="LtGray" /> + name="ColorPaletteEntry18" + reference="LtGray" /> <color - name="ColorPaletteEntry19" - reference="Red" /> + name="ColorPaletteEntry19" + reference="Red" /> <color - name="ColorPaletteEntry20" - reference="Yellow" /> + name="ColorPaletteEntry20" + reference="Yellow" /> <color - name="ColorPaletteEntry21" - reference="Green" /> + name="ColorPaletteEntry21" + reference="Green" /> <color - name="ColorPaletteEntry22" - value="0 1 1 1" /> + name="ColorPaletteEntry22" + value="0 1 1 1" /> <color - name="ColorPaletteEntry23" - reference="Blue" /> + name="ColorPaletteEntry23" + reference="Blue" /> <color - name="ColorPaletteEntry24" - reference="Purple" /> + name="ColorPaletteEntry24" + reference="Purple" /> <color - name="ColorPaletteEntry25" - value="1 1 0.5 1" /> + name="ColorPaletteEntry25" + value="1 1 0.5 1" /> <color - name="ColorPaletteEntry26" - value="0 1 0.5 1" /> + name="ColorPaletteEntry26" + value="0 1 0.5 1" /> <color - name="ColorPaletteEntry27" - value="0.5 1 1 1" /> + name="ColorPaletteEntry27" + value="0.5 1 1 1" /> <color - name="ColorPaletteEntry28" - value="0.5 0.5 1 1" /> + name="ColorPaletteEntry28" + value="0.5 0.5 1 1" /> <color - name="ColorPaletteEntry29" - value="1 0 0.5 1" /> + name="ColorPaletteEntry29" + value="1 0 0.5 1" /> <color - name="ColorPaletteEntry30" - value="1 0.5 0 1" /> + name="ColorPaletteEntry30" + value="1 0.5 0 1" /> <color - name="ColorPaletteEntry31" - reference="White" /> + name="ColorPaletteEntry31" + reference="White" /> <color - name="ColorPaletteEntry32" - reference="White" /> + name="ColorPaletteEntry32" + reference="White" /> <color - name="ComboListBgColor" - reference="DkGray" /> + name="ComboListBgColor" + reference="DkGray" /> <color - name="ConsoleBackground" - reference="Black" /> + name="ConsoleBackground" + reference="Black" /> <color - name="ContextSilhouetteColor" - reference="EmphasisColor" /> + name="ContextSilhouetteColor" + reference="EmphasisColor" /> <color - name="ConversationFriendColor" - value="0.5 0.7 0.85 1" /> + name="ConversationFriendColor" + reference="SelectionColor" /> <color - name="DefaultHighlightDark" - reference="White_10" /> + name="DefaultHighlightDark" + reference="White_10" /> <color - name="DefaultHighlightLight" - reference="White_25" /> + name="DefaultHighlightLight" + reference="White_25" /> <color - name="DefaultShadowDark" - reference="Black_50" /> + name="DefaultShadowDark" + reference="Black_50" /> <color - name="DefaultShadowLight" - reference="Black_50" /> + name="DefaultShadowLight" + reference="Black_50" /> <color - name="EffectColor" - reference="White" /> - <color - name="FilterBackgroundColor" - reference="Black" /> + name="EffectColor" + reference="White" /> <color - name="FilterTextColor" - reference="EmphasisColor" /> - <color - name="FloaterButtonImageColor" - reference="LtGray" /> + name="FilterBackgroundColor" + reference="Black" /> <color - name="FloaterDefaultBackgroundColor" - reference="DkGray_66" /> + name="FilterTextColor" + reference="EmphasisColor" /> <color - name="FloaterFocusBackgroundColor" - reference="DkGray2" /> + name="FloaterButtonImageColor" + reference="LtGray" /> <color - name="FloaterFocusBorderColor" - reference="Black_50" /> + name="FloaterDefaultBackgroundColor" + reference="DkGray_66" /> <color - name="FloaterUnfocusBorderColor" - reference="Black_50" /> + name="FloaterFocusBackgroundColor" + reference="DkGray2" /> <color - name="FocusColor" - reference="EmphasisColor" /> + name="FloaterFocusBorderColor" + reference="Black_50" /> <color - name="FolderViewLoadingMessageTextColor" - value="0.3344 0.545 0.645 1" /> + name="FloaterUnfocusBorderColor" + reference="Black_50" /> <color - name="FpsTextColor" - value="0.34 0.51 0.64 0.8" /> + name="FocusColor" + value="0.7 0.7 0.7 1" /> <color - name="GridFocusPointColor" - reference="White_50" /> + name="FolderViewLoadingMessageTextColor" + value="0.3344 0.545 0.645 1" /> <color - name="GridlineBGColor" - value="0.92 0.92 1 0.78" /> + name="FpsTextColor" + value="0.34 0.51 0.64 0.8" /> <color - name="GridlineColor" - reference="White" /> + name="GridFocusPointColor" + reference="White_50" /> <color - name="GridlineShadowColor" - value="0 0 0 0.31" /> + name="GridlineBGColor" + value="0.92 0.92 1 0.78" /> <color - name="GroupNotifyBoxColor" - value="0.3344 0.5456 0.5159 1" /> + name="GridlineColor" + reference="White" /> <color - name="GroupNotifyTextColor" - reference="White"/> + name="GridlineShadowColor" + value="0 0 0 0.31" /> <color - name="GroupNotifyDimmedTextColor" - reference="LtGray" /> + name="GroupNotifyBoxColor" + value="0.3344 0.5456 0.5159 1" /> <color - name="GroupOverTierColor" - value="0.43 0.06 0.06 1" /> + name="GroupNotifyTextColor" + reference="White"/> <color - name="HTMLLinkColor" - reference="EmphasisColor" /> + name="GroupNotifyDimmedTextColor" + reference="LtGray" /> <color - name="HealthTextColor" - reference="White" /> + name="GroupOverTierColor" + value="0.43 0.06 0.06 1" /> <color - name="HelpBgColor" - reference="Unused?" /> + name="HTMLLinkColor" + reference="EmphasisColor" /> <color - name="HelpFgColor" - reference="Unused?" /> + name="HealthTextColor" + reference="White" /> <color - name="HelpScrollHighlightColor" - reference="Unused?" /> + name="HelpBgColor" + reference="Unused?" /> <color - name="HelpScrollShadowColor" - reference="Unused?" /> + name="HelpFgColor" + reference="Unused?" /> <color - name="HelpScrollThumbColor" - reference="Unused?" /> + name="HelpScrollHighlightColor" + reference="Unused?" /> <color - name="HelpScrollTrackColor" - reference="Unused?" /> + name="HelpScrollShadowColor" + reference="Unused?" /> <color - name="HighlightChildColor" - reference="Yellow" /> + name="HelpScrollThumbColor" + reference="Unused?" /> <color - name="HighlightInspectColor" - value="1 0 1 1" /> + name="HelpScrollTrackColor" + reference="Unused?" /> <color - name="HighlightParentColor" - value="0.5 0.65 0.8 1" /> + name="HighlightChildColor" + reference="Yellow" /> <color - name="IMHistoryBgColor" - reference="Unused?" /> + name="HighlightInspectColor" + value="1 0 1 1" /> <color - name="IMHistoryTextColor" - reference="Unused?" /> + name="HighlightParentColor" + value="0.5 0.65 0.8 1" /> <color - name="IconDisabledColor" - reference="White_25" /> + name="IMHistoryBgColor" + reference="Unused?" /> <color - name="IconEnabledColor" - reference="White" /> + name="IMHistoryTextColor" + reference="Unused?" /> <color - name="InventoryBackgroundColor" - reference="DkGray2" /> + name="IconDisabledColor" + reference="White_25" /> <color - name="InventoryFavoriteColor" - reference="Yellow" /> + name="IconEnabledColor" + reference="White" /> <color - name="InventoryFocusOutlineColor" - reference="White_25" /> + name="InventoryBackgroundColor" + reference="DkGray2" /> <color - name="InventoryItemSuffixColor" - reference="White_25" /> + name="InventoryFavoriteColor" + reference="Yellow" /> <color - name="InventoryItemLibraryColor" - reference="EmphasisColor" /> + name="InventoryFocusOutlineColor" + reference="White_25" /> <color - name="InventoryItemLinkColor" - reference="LtGray_50" /> + name="InventoryItemSuffixColor" + reference="White_25" /> <color - name="InventoryMouseOverColor" - reference="LtGray_35" /> + name="InventoryItemLibraryColor" + reference="EmphasisColor" /> <color - name="InventorySearchStatusColor" - reference="EmphasisColor" /> + name="InventoryItemLinkColor" + reference="LtGray_50" /> <color - name="LabelDisabledColor" - reference="White_25" /> + name="InventoryMouseOverColor" + reference="LtGray_35" /> <color - name="LabelSelectedColor" - reference="White" /> + name="InventorySearchStatusColor" + reference="EmphasisColor" /> <color - name="LabelSelectedDisabledColor" - reference="White_25" /> + name="LabelDisabledColor" + reference="White_25" /> <color - name="LabelTextColor" - reference="LtGray" /> + name="LabelSelectedColor" + reference="White" /> <color - name="LoginProgressBarBgColor" - reference="Unused?" /> + name="LabelSelectedDisabledColor" + reference="White_25" /> <color - name="LoginProgressBarFgColor" - reference="Unused?" /> + name="LabelTextColor" + reference="LtGray" /> <color - name="LoginProgressBoxBorderColor" - value="0 0.12 0.24 0" /> + name="LoginProgressBarBgColor" + reference="Unused?" /> <color - name="LoginProgressBoxCenterColor" - value="0 0 0 0.78" /> + name="LoginProgressBarFgColor" + reference="Unused?" /> <color - name="LoginProgressBoxShadowColor" - value="0 0 0 0.78" /> + name="LoginProgressBoxBorderColor" + value="0 0.12 0.24 0" /> <color - name="LoginProgressBoxTextColor" - reference="White" /> + name="LoginProgressBoxCenterColor" + value="0 0 0 0.78" /> <color - name="MapAvatarColor" - reference="White" /> + name="LoginProgressBoxShadowColor" + value="0 0 0 0.78" /> <color - name="MapAvatarFriendColor" - value="0.5 0.7 0.85 1" /> + name="LoginProgressBoxTextColor" + reference="White" /> <color - name="MapAvatarSelfColor" - value="0.53125 0 0.498047 1" /> + name="MapAvatarColor" + reference="White" /> <color - name="MapFrustumColor" - reference="White_10" /> + name="MapAvatarFriendColor" + value="0.5 0.7 0.85 1" /> <color - name="MapParcelOutlineColor" - value="1 1 1 0.5" /> + name="MapAvatarSelfColor" + value="0.53125 0 0.498047 1" /> <color - name="MapTrackColor" - reference="Red" /> + name="MapFrustumColor" + reference="White_10" /> <color - name="MapTrackColorUnder" - reference="Blue" /> + name="MapParcelOutlineColor" + value="1 1 1 0.5" /> <color - name="MapTrackDisabledColor" - value="0.5 0 0 1" /> + name="MapTrackColor" + reference="Red" /> <color - name="MenuBarBgColor" - reference="MouseGray" /> + name="MapTrackColorUnder" + reference="Blue" /> <color - name="MenuBarGodBgColor" - reference="FrogGreen" /> + name="MapTrackDisabledColor" + value="0.5 0 0 1" /> <color - name="MenuDefaultBgColor" - reference="DkGray2" /> + name="MenuBarBgColor" + reference="MouseGray" /> <color - name="MenuItemDisabledColor" - reference="LtGray_50" /> + name="MenuBarGodBgColor" + reference="FrogGreen" /> <color - name="MenuItemEnabledColor" - reference="LtGray" /> + name="MenuDefaultBgColor" + reference="DkGray2" /> <color - name="MenuItemHighlightBgColor" - reference="EmphasisColor_35" /> + name="MenuItemDisabledColor" + reference="LtGray_50" /> <color - name="MenuItemFlashBgColor" - reference="BeaconColor" /> + name="MenuItemEnabledColor" + reference="LtGray" /> <color - name="MenuItemHighlightFgColor" - reference="White" /> + name="MenuItemHighlightBgColor" + reference="EmphasisColor_35" /> <color - name="MenuNonProductionBgColor" - reference="Black" /> + name="MenuItemFlashBgColor" + reference="BeaconColor" /> <color - name="MenuNonProductionGodBgColor" - value="0.263 0.325 0.345 1" /> + name="MenuItemHighlightFgColor" + reference="White" /> <color - name="MenuPopupBgColor" - reference="DkGray2" /> + name="MenuNonProductionBgColor" + reference="Black" /> <color - name="ModelUploaderLabels" - value="1 0.6 0 1" /> + name="MenuNonProductionGodBgColor" + value="0.263 0.325 0.345 1" /> <color - name="MultiSliderDisabledThumbColor" - reference="Black" /> + name="MenuPopupBgColor" + reference="DkGray2" /> <color - name="MultiSliderThumbCenterColor" - reference="White" /> + name="ModelUploaderLabels" + value="1 0.6 0 1" /> <color - name="MultiSliderThumbCenterSelectedColor" - reference="Green" /> + name="MultiSliderDisabledThumbColor" + reference="Black" /> <color - name="MultiSliderThumbOutlineColor" - reference="Unused?" /> + name="MultiSliderThumbCenterColor" + reference="White" /> <color - name="MultiSliderTrackColor" - reference="LtGray" /> + name="MultiSliderThumbCenterSelectedColor" + reference="Green" /> <color - name="MultiSliderTriangleColor" - reference="Yellow" /> - <!-- + name="MultiSliderThumbOutlineColor" + reference="Unused?" /> <color - name="NameTagBackground" - value="0.85 0.85 0.85 0.80" /> - --> + name="MultiSliderTrackColor" + reference="LtGray" /> <color - name="NameTagBackground" - value="0.101 0.101 0.101 0.6" /> + name="MultiSliderTriangleColor" + reference="Yellow" /> + <!-- <color - name="NameTagChat" - reference="White" /> + name="NameTagBackground" + value="0.85 0.85 0.85 0.80" /> + --> <color - name="NameTagFriend" - value="0.5 0.7 0.85 1" /> + name="NameTagBackground" + value="0.101 0.101 0.101 0.6" /> <color - name="NameTagLegacy" - reference="White" /> + name="NameTagChat" + reference="White" /> <color - name="NameTagMatch" - reference="White" /> + name="NameTagFriend" + reference="SelectionColor" /> <color - name="NameTagMismatch" - reference="White" /> + name="NameTagLegacy" + reference="White" /> <color - name="NetMapBackgroundColor" - value="0 0 0 1" /> + name="NameTagMatch" + reference="White" /> <color - name="NetMapGroupOwnAboveWater" - value="0.85 0 0.85 1" /> + name="NameTagMismatch" + reference="White" /> <color - name="NetMapGroupOwnBelowWater" - value="0.63 0 0.63 1" /> + name="NetMapBackgroundColor" + value="0 0 0 1" /> <color - name="NetMapOtherOwnAboveWater" - value="0.24 0.24 0.24 1" /> + name="NetMapGroupOwnAboveWater" + value="0.85 0 0.85 1" /> <color - name="NetMapOtherOwnBelowWater" - value="0.12 0.12 0.12 1" /> + name="NetMapGroupOwnBelowWater" + value="0.63 0 0.63 1" /> <color - name="NetMapYouOwnAboveWater" - value="0 0.85 0.85 1" /> + name="NetMapOtherOwnAboveWater" + value="0.24 0.24 0.24 1" /> <color - name="NetMapYouOwnBelowWater" - value="0 0.63 0.63 1" /> + name="NetMapOtherOwnBelowWater" + value="0.12 0.12 0.12 1" /> <color - name="NotifyBoxColor" - value="LtGray" /> + name="NetMapYouOwnAboveWater" + value="0 0.85 0.85 1" /> <color - name="NotifyCautionBoxColor" - value="1 0.82 0.46 1" /> + name="NetMapYouOwnBelowWater" + value="0 0.63 0.63 1" /> <color - name="NotifyCautionWarnColor" - reference="White" /> + name="NotifyBoxColor" + value="LtGray" /> <color - name="NotifyTextColor" - reference="White" /> + name="NotifyCautionBoxColor" + value="1 0.82 0.46 1" /> <color - name="ObjectBubbleColor" - reference="DkGray_66" /> + name="NotifyCautionWarnColor" + reference="White" /> <color - name="ObjectChatColor" - reference="LtYellow" /> + name="NotifyTextColor" + reference="White" /> <color - name="OverdrivenColor" - reference="Red" /> + name="ObjectBubbleColor" + reference="DkGray_66" /> <color - name="PanelDefaultBackgroundColor" - reference="DkGray" /> + name="ObjectChatColor" + reference="LtYellow" /> <color - name="PanelDefaultHighlightLight" - reference="White_50" /> + name="OverdrivenColor" + reference="Red" /> <color - name="PanelFocusBackgroundColor" - reference="DkGray2" /> + name="PanelDefaultBackgroundColor" + reference="DkGray" /> <color - name="PanelNotificationBackground" - value="1 0.3 0.3 0" /> + name="PanelDefaultHighlightLight" + reference="White_50" /> <color - name="ParcelHoverColor" - reference="White" /> + name="PanelFocusBackgroundColor" + reference="DkGray2" /> <color - name="PathfindingErrorColor" - reference="LtRed" /> - <color - name="PathfindingWarningColor" - reference="DrYellow" /> - <color - name="PathfindingGoodColor" - reference="LtGreen" /> - <color - name="MaterialErrorColor" - reference="LtRed" /> - <color - name="MaterialWarningColor" - reference="DrYellow" /> - <color - name="MaterialGoodColor" - reference="LtGreen" /> - <color - name="PathfindingDefaultBeaconColor" - reference="Red_80" /> - <color - name="PathfindingDefaultBeaconTextColor" - reference="White" /> - <color - name="PathfindingLinksetBeaconColor" - reference="Blue_80" /> - <color - name="PathfindingCharacterBeaconColor" - reference="Red_80" /> - <color - name="PieMenuBgColor" - value="0.24 0.24 0.24 0.59" /> + name="PanelNotificationBackground" + value="1 0.3 0.3 0" /> <color - name="PieMenuLineColor" - value="0 0 0 0.5" /> + name="ParcelHoverColor" + reference="White" /> <color - name="PieMenuSelectedColor" - value="0.72 0.72 0.74 0.3" /> + name="PathfindingErrorColor" + reference="LtRed" /> <color - name="PropertyColorAuction" - value="0.5 0 1 0.4" /> + name="PathfindingWarningColor" + reference="DrYellow" /> <color - name="PropertyColorAvail" - reference="Transparent" /> + name="PathfindingGoodColor" + reference="LtGreen" /> <color - name="PropertyColorForSale" - value="1 0.5 0 0.4" /> + name="MaterialErrorColor" + reference="LtRed" /> <color - name="PropertyColorGroup" - value="0 0.72 0.72 0.4" /> + name="MaterialWarningColor" + reference="DrYellow" /> <color - name="PropertyColorOther" - value="1 0 0 0.4" /> + name="MaterialGoodColor" + reference="LtGreen" /> <color - name="PropertyColorSelf" - value="0 1 0 0.4" /> + name="PathfindingDefaultBeaconColor" + reference="Red_80" /> <color - name="ScriptBgReadOnlyColor" - value="0.39 0.39 0.39 1" /> + name="PathfindingDefaultBeaconTextColor" + reference="White" /> <color - name="ScriptErrorColor" - reference="Red" /> + name="PathfindingLinksetBeaconColor" + reference="Blue_80" /> <color - name="ScrollBGStripeColor" - reference="Transparent" /> + name="PathfindingCharacterBeaconColor" + reference="Red_80" /> <color - name="ScrollBgReadOnlyColor" - reference="Transparent" /> + name="PieMenuBgColor" + value="0.24 0.24 0.24 0.59" /> <color - name="ScrollBgWriteableColor" - reference="White_05" /> + name="PieMenuLineColor" + value="0 0 0 0.5" /> <color - name="ScrollDisabledColor" - reference="White_25" /> + name="PieMenuSelectedColor" + value="0.72 0.72 0.74 0.3" /> <color - name="ScrollHighlightedColor" - reference="Unused?" /> + name="PropertyColorAuction" + value="0.5 0 1 0.4" /> <color - name="ScrollHoveredColor" - reference="EmphasisColor_13" /> + name="PropertyColorAvail" + reference="Transparent" /> <color - name="ScrollSelectedBGColor" - reference="EmphasisColor_35" /> + name="PropertyColorForSale" + value="1 0.5 0 0.4" /> <color - name="ScrollSelectedFGColor" - reference="White" /> + name="PropertyColorGroup" + value="0 0.72 0.72 0.4" /> <color - name="ScrollUnselectedColor" - reference="LtGray" /> + name="PropertyColorOther" + value="1 0 0 0.4" /> <color - name="ScrollbarThumbColor" - reference="White" /> + name="PropertyColorSelf" + value="0 1 0 0.4" /> <color - name="ScrollbarTrackColor" - reference="Black" /> + name="ScriptBgReadOnlyColor" + value="0.39 0.39 0.39 1" /> <color - name="SelectedOutfitTextColor" - reference="EmphasisColor" /> + name="ScriptErrorColor" + reference="Red" /> <color - name="SearchableControlHighlightFontColor" - value="1 0 0 1" /> + name="ScrollBGStripeColor" + reference="Transparent" /> <color - name="SearchableControlHighlightBgColor" - value="0.5 0.1 0.1 1" /> + name="ScrollBgReadOnlyColor" + reference="Transparent" /> <color - name="SilhouetteChildColor" - value="0.13 0.42 0.77 1" /> + name="ScrollBgWriteableColor" + reference="White_05" /> <color - name="SilhouetteParentColor" - reference="Yellow" /> + name="ScrollDisabledColor" + reference="White_25" /> <color - name="SliderDisabledThumbColor" - reference="White_25" /> + name="ScrollHighlightedColor" + reference="Unused?" /> <color - name="SliderThumbCenterColor" - reference="White" /> + name="ScrollSelectedBGColor" + reference="EmphasisColor_35" /> <color - name="SliderThumbOutlineColor" - reference="White" /> + name="ScrollSelectedFGColor" + reference="White" /> <color - name="SliderTrackColor" - reference="Unused?" /> + name="ScrollUnselectedColor" + reference="LtGray" /> <color - name="SpeakingColor" - reference="FrogGreen" /> + name="ScrollbarThumbColor" + reference="White" /> <color - name="SystemChatColor" - reference="LtGray" /> + name="ScrollbarTrackColor" + reference="Black" /> <color - name="TextBgFocusColor" - reference="White" /> + name="SelectedOutfitTextColor" + reference="EmphasisColor" /> <color - name="TextBgReadOnlyColor" - reference="White_05" /> + name="WornOutfitTextColor" + value="0.54 0.73 0.87 1" /> <color - name="TextBgWriteableColor" - reference="LtGray" /> + name="SearchableControlHighlightFontColor" + value="1 0 0 1" /> <color - name="TextCursorColor" - reference="Black" /> + name="SearchableControlHighlightBgColor" + value="0.5 0.1 0.1 1" /> <color - name="TextDefaultColor" - reference="Black" /> + name="SilhouetteChildColor" + value="0.13 0.42 0.77 1" /> <color - name="TextEmbeddedItemColor" - value="0 0 0.5 1" /> + name="SilhouetteParentColor" + reference="Yellow" /> <color - name="TextEmbeddedItemReadOnlyColor" - reference="Unused?" /> + name="SliderDisabledThumbColor" + reference="White_25" /> <color - name="TextFgColor" - value="0.102 0.102 0.102 1" /> + name="SliderThumbCenterColor" + reference="White" /> + <color + name="SliderThumbOutlineColor" + reference="White" /> + <color + name="SliderTrackColor" + reference="Unused?" /> <color - name="TextFgReadOnlyColor" - reference="LtGray" /> + name="SpeakingColor" + reference="FrogGreen" /> + <color + name="SystemChatColor" + reference="LtGray" /> + <color + name="SelectedBgReadOnlyColor" + value="0.15 0.21 0.27 1" /> + <color + name="TextBgFocusColor" + reference="White" /> <color - name="TextFgTentativeColor" - value="0.4 0.4 0.4 1" /> + name="TextBgReadOnlyColor" + reference="White_05" /> <color - name="TimeTextColor" - reference="LtGray" /> + name="TextBgWriteableColor" + reference="LtGray" /> <color - name="TitleBarFocusColor" - reference="White_10" /> + name="TextCursorColor" + reference="Black" /> <color - name="ToastBackground" - value="0.3 0.3 0.3 0" /> + name="TextDefaultColor" + reference="Black" /> <color - name="ToolTipBgColor" - value="0.937 0.89 0.655 1" /> + name="TextEmbeddedItemColor" + value="0 0 0.5 1" /> <color - name="ToolTipBorderColor" - value="0.812 0.753 0.451 1" /> + name="TextEmbeddedItemReadOnlyColor" + reference="Unused?" /> <color - name="ToolTipTextColor" - reference="DkGray2" /> + name="TextFgColor" + value="0.102 0.102 0.102 1" /> <color - name="InspectorTipTextColor" - reference="LtGray" /> + name="TextFgReadOnlyColor" + reference="LtGray" /> <color - name="UserChatColor" - reference="White" /> + name="TextFgTentativeColor" + value="0.4 0.4 0.4 1" /> <color - name="llOwnerSayChatColor" - reference="LtOrange" /> + name="TimeTextColor" + reference="LtGray" /> + <color + name="TitleBarFocusColor" + reference="White_10" /> + <color + name="ToastBackground" + value="0.3 0.3 0.3 0" /> + <color + name="ToolTipBgColor" + value="0.937 0.89 0.655 1" /> + <color + name="ToolTipBorderColor" + value="0.812 0.753 0.451 1" /> + <color + name="ToolTipTextColor" + reference="DkGray2" /> + <color + name="InspectorTipTextColor" + reference="LtGray" /> + <color + name="UserChatColor" + reference="White" /> + <color + name="llOwnerSayChatColor" + reference="LtOrange" /> <!-- New Colors --> <color - name="OutputMonitorMutedColor" - reference="DkGray2" /> + name="OutputMonitorMutedColor" + reference="DkGray2" /> + <color + name="SysWellItemUnselected" + value="0 0 0 0" /> + <color + name="SysWellItemSelected" + value="0.3 0.3 0.3 1.0" /> + <color + name="ColorSwatchBorderColor" + value="0.45098 0.517647 0.607843 1"/> <color - name="SysWellItemUnselected" - value="0 0 0 0" /> + name="ColorSwatchBorderColorGray" + value="0.329 0.329 0.329 1"/> <color - name="SysWellItemSelected" - value="0.3 0.3 0.3 1.0" /> + name="ChatTeleportSeparatorColor" + reference="Black" /> <color - name="ColorSwatchBorderColor" - value="0.45098 0.517647 0.607843 1"/> + name="ChatTimestampColor" + reference="White" /> + <color + name="MenuBarStreamingBgColor" + reference="DkGray" /> <color - name="ChatTeleportSeparatorColor" - reference="Black" /> + name="MenuBarBetaBgColor" + reference="DkBlue" /> <color - name="ChatTimestampColor" - reference="White" /> + name="MenuBarProjectBgColor" + reference="MdBlue" /> <color - name="MenuBarBetaBgColor" - reference="DkBlue" /> - <color - name="MenuBarProjectBgColor" - reference="MdBlue" /> - <color - name="MenuBarTestBgColor" - reference="DkRed" /> + name="MenuBarTestBgColor" + reference="DkRed" /> <color - name="MeshImportTableNormalColor" - value="1 1 1 1"/> + name="MeshImportTableNormalColor" + value="1 1 1 1"/> <color - name="MeshImportTableHighlightColor" - value="0.2 0.8 1 1"/> + name="MeshImportTableHighlightColor" + value="0.2 0.8 1 1"/> <color - name="DirectChatColor" - reference="LtOrange" /> + name="DirectChatColor" + reference="LtOrange" /> <color - name="ToolbarDropZoneColor" - value=".48 .69 1 .5" /> + name="ToolbarDropZoneColor" + value=".48 .69 1 .5" /> <color - name="PanelNotificationListItem" - value="0.3 0.3 0.3 .3" /> + name="PanelNotificationListItem" + value="0.3 0.3 0.3 .3" /> - <!-- profiles --> + <!-- profiles --> <color name="StatusUserOnline" reference="White" /> @@ -913,110 +928,113 @@ <color name="GroupHiddenInProfile" reference="Gray" /> - - <!-- Generic color names (legacy) --> - <color - name="white" - value="1 1 1 1"/> - <color - name="black" - value="0 0 0 1"/> - <color - name="red" - value="1 0 0 1"/> - <color - name="green" - value="0 1 0 1"/> - <color - name="blue" - value="0 0 1 1"/> - <!--Resize bar colors --> + <!-- Generic color names (legacy) --> + <color + name="white" + value="1 1 1 1"/> + <color + name="black" + value="0 0 0 1"/> + <color + name="red" + value="1 0 0 1"/> + <color + name="green" + value="0 1 0 1"/> + <color + name="blue" + value="0 0 1 1"/> + + <!--Resize bar colors --> - <color - name="ResizebarBorderLight" - value="0.231 0.231 0.231 1"/> + <color + name="ResizebarBorderLight" + value="0.231 0.231 0.231 1"/> - <color - name="ResizebarBorderDark" - value="0.133 0.133 0.133 1"/> + <color + name="ResizebarBorderDark" + value="0.133 0.133 0.133 1"/> - <color - name="ResizebarBody" - value="0.208 0.208 0.208 1"/> + <color + name="ResizebarBody" + value="0.208 0.208 0.208 1"/> - <!-- syntax highlighting (LSL Scripts) --> - <color - name="ScriptText" - reference="Black" /> - <color - name="ScriptBackground" - reference="White" /> - <color - name="ScriptCursorColor" - reference="Black" /> - <color - name="SyntaxLslComment" - value="0 0.5 0 1" /> - <color - name="SyntaxLslConstant" - value="0 0.6 0.6 1" /> - <color - name="SyntaxLslControlFlow" - value="0.4 0 0.8 1" /> - <color - name="SyntaxLslControlLabel" - value="0 0 0.8 1" /> - <color - name="SyntaxLslDataType" - value="0.8 0.4 0 1" /> - <color - name="SyntaxLslDeprecated" - value="0.9 0.0 0.66, 1" /> - <color - name="SyntaxLslEvent" - value="0 0.3 0.5 1" /> - <color - name="SyntaxLslFunction" - value="0.3 0 0.5 1" /> - <color - name="SyntaxLslGodMode" - value="0.7 .2 .35 1" /> - <color - name="SyntaxLslStringLiteral" - value="1 0.14 0 1" /> - <color - name="OutfitGalleryItemSelected" - reference="EmphasisColor_35" /> - <color - name="OutfitGalleryItemWorn" - reference="EmphasisColor_13" /> - <color - name="OutfitGalleryItemUnselected" - value="0.4 0.4 0.4 1" /> - <color - name="PanelGray" - value="0.27 0.27 0.27 1" /> - <color - name="PerformanceMid" - value="1 0.8 0 1" /> - <color - name="OutfitSnapshotMacMask" - value="0.115 0.115 0.115 1"/> - <color - name="OutfitSnapshotMacMask2" - value="0.1 0.1 0.1 1"/> - <color - name="ChatMentionFont" - value="0.3 0.82 1 1" /> - <color - name="ChatMentionHighlight" - value="0.82 0.91 0.98 0.15" /> - <color - name="ChatSelfMentionHighlight" - value="1 1 0 0.35" /> - <color - name="MentionFlashBgColor" - value="1 1 0 0.5" /> -</colors> + <!-- syntax highlighting (LSL Scripts) --> + <color + name="ScriptText" + reference="Black" /> + <color + name="ScriptBackground" + reference="White" /> + <color + name="ScriptCursorColor" + reference="Black" /> + <color + name="SyntaxLslComment" + value="0 0.5 0 1" /> + <color + name="SyntaxLslConstant" + value="0 0.6 0.6 1" /> + <color + name="SyntaxLslControlFlow" + value="0.4 0 0.8 1" /> + <color + name="SyntaxLslControlLabel" + value="0 0 0.8 1" /> + <color + name="SyntaxLslDataType" + value="0.8 0.4 0 1" /> + <color + name="SyntaxLslDeprecated" + value="0.9 0.0 0.66, 1" /> + <color + name="SyntaxLslEvent" + value="0 0.3 0.5 1" /> + <color + name="SyntaxLslFunction" + value="0.3 0 0.5 1" /> + <color + name="SyntaxLslGodMode" + value="0.7 .2 .35 1" /> + <color + name="SyntaxLslStringLiteral" + value="1 0.14 0 1" /> + <color + name="OutfitGalleryItemSelected" + value="0.26 0.36 0.47 1"/> + <color + name="OutfitGalleryItemWorn" + reference="EmphasisColor_13" /> + <color + name="OutfitGalleryItemUnselected" + value="0.4 0.4 0.4 1" /> + <color + name="PanelGray" + value="0.27 0.27 0.27 1" /> + <color + name="PanelDark" + value="0.078 0.078 0.078 1" /> + <color + name="PerformanceMid" + value="1 0.8 0 1" /> + <color + name="OutfitSnapshotMacMask" + value="0.115 0.115 0.115 1"/> + <color + name="OutfitSnapshotMacMask2" + value="0.1 0.1 0.1 1"/> + <color + name="ChatMentionFont" + reference="EmphasisColor" /> + <color + name="ChatMentionHighlight" + value="0.82 0.91 0.98 0.10" /> + <color + name="ChatSelfMentionHighlight" + value="0.82 0.91 0.98 0.10" /> + <color + name="MentionFlashBgColor" + value="1 1 0 0.5" /> + </colors> diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png Binary files differindex 3b7f83fbab..512bd3b64e 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png Binary files differindex 438b4912f8..b1012e505e 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png Binary files differindex 693adc4781..49cdadded7 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png Binary files differindex 818b34d40f..9afe58dcd1 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png Binary files differindex 84711ddc29..01f187b372 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png Binary files differindex 9b9468c574..40a1d8faf4 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cone_Selected.png b/indra/newview/skins/default/textures/build/Object_Cone_Selected.png Binary files differindex 0f04cb2f28..051c85d05d 100644 --- a/indra/newview/skins/default/textures/build/Object_Cone_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cone_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cube_Selected.png b/indra/newview/skins/default/textures/build/Object_Cube_Selected.png Binary files differindex 2a10237771..3560b36ec6 100644 --- a/indra/newview/skins/default/textures/build/Object_Cube_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cube_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png b/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png Binary files differindex ee6db5d64e..8f752aaf4c 100644 --- a/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Grass_Selected.png b/indra/newview/skins/default/textures/build/Object_Grass_Selected.png Binary files differindex 37f35f9339..90844abe94 100644 --- a/indra/newview/skins/default/textures/build/Object_Grass_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Grass_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png Binary files differindex ad6ba66bed..66e1c45567 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png Binary files differindex 03a47494f5..48ae5969a1 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png Binary files differindex daefae7389..eff8a231d6 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Prism_Selected.png b/indra/newview/skins/default/textures/build/Object_Prism_Selected.png Binary files differindex 73470c7af9..ab7921b97d 100644 --- a/indra/newview/skins/default/textures/build/Object_Prism_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Prism_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png b/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png Binary files differindex 361c915231..446951d992 100644 --- a/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Ring_Selected.png b/indra/newview/skins/default/textures/build/Object_Ring_Selected.png Binary files differindex 49b76d137e..a23e6dba50 100644 --- a/indra/newview/skins/default/textures/build/Object_Ring_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Ring_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png b/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png Binary files differindex 473b90e867..daf39a658c 100644 --- a/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png b/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png Binary files differindex 20278c8f6d..28175f107e 100644 --- a/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Torus_Selected.png b/indra/newview/skins/default/textures/build/Object_Torus_Selected.png Binary files differindex e6cad859fd..049ca64f05 100644 --- a/indra/newview/skins/default/textures/build/Object_Torus_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Torus_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tree_Selected.png b/indra/newview/skins/default/textures/build/Object_Tree_Selected.png Binary files differindex 52b4f535f8..8b45d668aa 100644 --- a/indra/newview/skins/default/textures/build/Object_Tree_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tree_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tube_Selected.png b/indra/newview/skins/default/textures/build/Object_Tube_Selected.png Binary files differindex 4469814e1a..c94a984c41 100644 --- a/indra/newview/skins/default/textures/build/Object_Tube_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tube_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Accordion_Selected.png b/indra/newview/skins/default/textures/containers/Accordion_Selected.png Binary files differindex 2222954332..ab852007ab 100644 --- a/indra/newview/skins/default/textures/containers/Accordion_Selected.png +++ b/indra/newview/skins/default/textures/containers/Accordion_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabLeft_Flat_Off.png b/indra/newview/skins/default/textures/containers/TabLeft_Flat_Off.png Binary files differnew file mode 100644 index 0000000000..d6c6bc41ec --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabLeft_Flat_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabLeft_Flat_Selected.png b/indra/newview/skins/default/textures/containers/TabLeft_Flat_Selected.png Binary files differnew file mode 100644 index 0000000000..91e44a4ffe --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabLeft_Flat_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Off.png b/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Off.png Binary files differnew file mode 100644 index 0000000000..826d939954 --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Selected.png Binary files differnew file mode 100644 index 0000000000..c023486e3e --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_First_Flat_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Off.png Binary files differnew file mode 100644 index 0000000000..6996c3e065 --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Selected.png Binary files differnew file mode 100644 index 0000000000..c96a80b9eb --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_Last_Flat_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Off.png Binary files differnew file mode 100644 index 0000000000..6e5e6ba15d --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Selected.png Binary files differnew file mode 100644 index 0000000000..a6944e1952 --- /dev/null +++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Flat_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png Binary files differindex 9f1e2a469d..e979bd9417 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png Binary files differindex f347505772..3111cbc338 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png Binary files differindex fd24e5b430..f450347bc4 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png Binary files differindex dccf543a9a..0c65883e7f 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png Binary files differindex dd73d655e9..48f6615c30 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png Binary files differindex cf30330f1c..cd6d11c5a6 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png Binary files differindex 6ac1ce3ffb..f72cb1d20b 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png Binary files differindex 8b40051c0b..62f82879cf 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png Binary files differindex f6b775c2a0..20c6caf05b 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png Binary files differindex d4881e21d3..0c8e9f1a36 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png Binary files differindex bf2a72d6f4..1b0fcc944d 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png Binary files differindex c3833ad7fa..afd846735f 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png diff --git a/indra/newview/skins/default/textures/icon_auction.tga b/indra/newview/skins/default/textures/icon_auction.tga Binary files differindex baf7d0d000..d121833b47 100644 --- a/indra/newview/skins/default/textures/icon_auction.tga +++ b/indra/newview/skins/default/textures/icon_auction.tga diff --git a/indra/newview/skins/default/textures/icon_legacy_event.tga b/indra/newview/skins/default/textures/icon_event.tga Binary files differindex 7805dbce60..7805dbce60 100644 --- a/indra/newview/skins/default/textures/icon_legacy_event.tga +++ b/indra/newview/skins/default/textures/icon_event.tga diff --git a/indra/newview/skins/default/textures/icon_legacy_event_adult.tga b/indra/newview/skins/default/textures/icon_event_adult.tga Binary files differindex c344fb1e78..c344fb1e78 100644 --- a/indra/newview/skins/default/textures/icon_legacy_event_adult.tga +++ b/indra/newview/skins/default/textures/icon_event_adult.tga diff --git a/indra/newview/skins/default/textures/icon_legacy_event_mature.tga b/indra/newview/skins/default/textures/icon_event_mature.tga Binary files differindex 61c879bc92..61c879bc92 100644 --- a/indra/newview/skins/default/textures/icon_legacy_event_mature.tga +++ b/indra/newview/skins/default/textures/icon_event_mature.tga diff --git a/indra/newview/skins/default/textures/icon_group.tga b/indra/newview/skins/default/textures/icon_group.tga Binary files differdeleted file mode 100644 index 79cd71689d..0000000000 --- a/indra/newview/skins/default/textures/icon_group.tga +++ /dev/null diff --git a/indra/newview/skins/default/textures/icon_place.tga b/indra/newview/skins/default/textures/icon_place.tga Binary files differindex e10655c6ec..2170c98499 100644 --- a/indra/newview/skins/default/textures/icon_place.tga +++ b/indra/newview/skins/default/textures/icon_place.tga diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png Binary files differindex 6399cd6715..1d00c2c175 100644 --- a/indra/newview/skins/default/textures/icons/Info_Over.png +++ b/indra/newview/skins/default/textures/icons/Info_Over.png diff --git a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png Binary files differindex 2550cae0d4..19afa94cc4 100644 --- a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png +++ b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png diff --git a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png Binary files differindex 5b56d86184..7ca0f5a849 100644 --- a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png +++ b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_1.png b/indra/newview/skins/default/textures/icons/ProgressLarge_1.png Binary files differdeleted file mode 100644 index ff277fc431..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_1.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_10.png b/indra/newview/skins/default/textures/icons/ProgressLarge_10.png Binary files differdeleted file mode 100644 index 1c94e21d89..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_10.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_11.png b/indra/newview/skins/default/textures/icons/ProgressLarge_11.png Binary files differdeleted file mode 100644 index 89bea9b474..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_11.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_12.png b/indra/newview/skins/default/textures/icons/ProgressLarge_12.png Binary files differdeleted file mode 100644 index da38475ba4..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_12.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_2.png b/indra/newview/skins/default/textures/icons/ProgressLarge_2.png Binary files differdeleted file mode 100644 index c024275ebe..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_2.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_3.png b/indra/newview/skins/default/textures/icons/ProgressLarge_3.png Binary files differdeleted file mode 100644 index 87b931e72e..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_3.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_4.png b/indra/newview/skins/default/textures/icons/ProgressLarge_4.png Binary files differdeleted file mode 100644 index 6dbef74361..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_4.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_5.png b/indra/newview/skins/default/textures/icons/ProgressLarge_5.png Binary files differdeleted file mode 100644 index daccf9b375..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_5.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_6.png b/indra/newview/skins/default/textures/icons/ProgressLarge_6.png Binary files differdeleted file mode 100644 index cafddcb88d..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_6.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_7.png b/indra/newview/skins/default/textures/icons/ProgressLarge_7.png Binary files differdeleted file mode 100644 index 8acf6472d4..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_7.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_8.png b/indra/newview/skins/default/textures/icons/ProgressLarge_8.png Binary files differdeleted file mode 100644 index df0e825cef..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_8.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_9.png b/indra/newview/skins/default/textures/icons/ProgressLarge_9.png Binary files differdeleted file mode 100644 index 293a7b8f5c..0000000000 --- a/indra/newview/skins/default/textures/icons/ProgressLarge_9.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/SL_Logo.png b/indra/newview/skins/default/textures/icons/SL_Logo.png Binary files differindex 5e376c72f9..7b147df369 100644 --- a/indra/newview/skins/default/textures/icons/SL_Logo.png +++ b/indra/newview/skins/default/textures/icons/SL_Logo.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_off.png b/indra/newview/skins/default/textures/icons/back_arrow_off.png Binary files differindex c9c7bf5fec..de4b89c28b 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_off.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_off.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_over.png b/indra/newview/skins/default/textures/icons/back_arrow_over.png Binary files differindex ee6acc2653..21cc3c2781 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_over.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_over.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_press.png b/indra/newview/skins/default/textures/icons/back_arrow_press.png Binary files differindex 9876b4eeb7..de4b89c28b 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_press.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_press.png diff --git a/indra/newview/skins/default/textures/icons/check_mark.png b/indra/newview/skins/default/textures/icons/check_mark.png Binary files differindex 95ca9dbd6c..00ec32964d 100644 --- a/indra/newview/skins/default/textures/icons/check_mark.png +++ b/indra/newview/skins/default/textures/icons/check_mark.png diff --git a/indra/newview/skins/default/textures/icons/hand.png b/indra/newview/skins/default/textures/icons/hand.png Binary files differindex 5fbdb70c2b..6effb7c77d 100644 --- a/indra/newview/skins/default/textures/icons/hand.png +++ b/indra/newview/skins/default/textures/icons/hand.png diff --git a/indra/newview/skins/default/textures/icons/see_me_online.png b/indra/newview/skins/default/textures/icons/see_me_online.png Binary files differindex adc37f5528..51d369003c 100644 --- a/indra/newview/skins/default/textures/icons/see_me_online.png +++ b/indra/newview/skins/default/textures/icons/see_me_online.png diff --git a/indra/newview/skins/default/textures/locked_image_dark.png b/indra/newview/skins/default/textures/locked_image_dark.png Binary files differnew file mode 100644 index 0000000000..b952f2cfb0 --- /dev/null +++ b/indra/newview/skins/default/textures/locked_image_dark.png diff --git a/indra/newview/skins/default/textures/megapahit/icon_group.png b/indra/newview/skins/default/textures/megapahit/icon_group.png Binary files differdeleted file mode 100644 index f3872dea3f..0000000000 --- a/indra/newview/skins/default/textures/megapahit/icon_group.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/megapahit/icon_land_auction.png b/indra/newview/skins/default/textures/megapahit/icon_land_auction.png Binary files differdeleted file mode 100644 index 550703968f..0000000000 --- a/indra/newview/skins/default/textures/megapahit/icon_land_auction.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png b/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png Binary files differdeleted file mode 100644 index 209bb868ea..0000000000 --- a/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/megapahit/icon_place.png b/indra/newview/skins/default/textures/megapahit/icon_place.png Binary files differdeleted file mode 100644 index 60cf42424a..0000000000 --- a/indra/newview/skins/default/textures/megapahit/icon_place.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png Binary files differindex fce54942d3..cbb78cd514 100644 --- a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png +++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png Binary files differindex 8cc3f02c5a..6b4092bf49 100644 --- a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png +++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png diff --git a/indra/newview/skins/default/textures/navbar/Info_Off.png b/indra/newview/skins/default/textures/navbar/Info_Off.png Binary files differindex 6399cd6715..ff26c7f55d 100644 --- a/indra/newview/skins/default/textures/navbar/Info_Off.png +++ b/indra/newview/skins/default/textures/navbar/Info_Off.png diff --git a/indra/newview/skins/default/textures/navbar/Info_Over.png b/indra/newview/skins/default/textures/navbar/Info_Over.png Binary files differindex a296d2014f..a45a3849f7 100644 --- a/indra/newview/skins/default/textures/navbar/Info_Over.png +++ b/indra/newview/skins/default/textures/navbar/Info_Over.png diff --git a/indra/newview/skins/default/textures/navbar/Info_Press.png b/indra/newview/skins/default/textures/navbar/Info_Press.png Binary files differindex 2afc4a9143..8e1f64609e 100644 --- a/indra/newview/skins/default/textures/navbar/Info_Press.png +++ b/indra/newview/skins/default/textures/navbar/Info_Press.png diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png Binary files differindex c61dcde58c..19a73beef7 100644 --- a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png +++ b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png diff --git a/indra/newview/skins/default/textures/navbar/Row_Selection.png b/indra/newview/skins/default/textures/navbar/Row_Selection.png Binary files differindex cfc31f8d32..0eeb4f494c 100644 --- a/indra/newview/skins/default/textures/navbar/Row_Selection.png +++ b/indra/newview/skins/default/textures/navbar/Row_Selection.png diff --git a/indra/newview/skins/default/textures/square_selection.png b/indra/newview/skins/default/textures/square_selection.png Binary files differnew file mode 100644 index 0000000000..9f344c4842 --- /dev/null +++ b/indra/newview/skins/default/textures/square_selection.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 40ee205090..b84d9cf780 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -124,7 +124,9 @@ with the same filename but different name <texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" /> <texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" /> <texture name="Checkbox_Off" file_name="widgets/Checkbox_Off.png" preload="true" /> + <texture name="Checkbox_Slim_Off" file_name="widgets/Checkbox_Slim_Off.png" preload="true" /> <texture name="Checkbox_On" file_name="widgets/Checkbox_On.png" preload="true" /> + <texture name="Checkbox_Slim_On" file_name="widgets/Checkbox_Slim_On.png" preload="true" /> <texture name="Checkbox_On_Press" file_name="widgets/Checkbox_On_Press.png" preload="true" /> <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" /> <texture name="Check_Mark" file_name="icons/check_mark.png" preload="true" /> @@ -174,6 +176,8 @@ with the same filename but different name <texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_Arrow" file_name="widgets/ComboButton_Arrow.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> + <texture name="ComboButton_Transparent" file_name="widgets/ComboButton_Transparent.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="Container" file_name="containers/Container.png" preload="false" /> @@ -561,15 +565,16 @@ with the same filename but different name <texture name="PushButton_On" file_name="widgets/PushButton_On.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_On_Selected" file_name="widgets/PushButton_On_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Over" file_name="widgets/PushButton_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Selected" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected_Disabled" file_name="widgets/PushButton_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Login" file_name="widgets/PushButton_Login.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Login_Over" file_name="widgets/PushButton_Login_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Login_Pressed" file_name="widgets/PushButton_Login_Pressed.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - + <texture name="PushButton_Sign" file_name="widgets/PushButton_Sign.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Sign_Over" file_name="widgets/PushButton_Sign_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Sign_Pressed" file_name="widgets/PushButton_Sign_Pressed.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="RadioButton_Press" file_name="widgets/RadioButton_Press.png" preload="true" /> <texture name="RadioButton_On_Press" file_name="widgets/RadioButton_On_Press.png" preload="true" /> @@ -650,6 +655,8 @@ with the same filename but different name <texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" /> <texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" /> + <texture name="Square_Selection" file_name="square_selection.png" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" /> + <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="Snapshot_Download" file_name="snapshot_download.png" preload="false" /> <texture name="Snapshot_Email" file_name="snapshot_email.png" preload="false" /> @@ -658,6 +665,7 @@ with the same filename but different name <texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" /> <texture name="login_mp_logo" file_name="windows/login_mp_logo.png" preload="true" /> + <texture name="login_mp_logo_horizontal" file_name="windows/login_mp_logo_horizontal.png" preload="true" /> <texture name="login_mp_logo_small" file_name="windows/login_mp_logo_small.png" preload="true" /> <texture name="first_login_image" file_name="windows/first_login_image.jpg" preload="true" /> @@ -687,6 +695,15 @@ with the same filename but different name <texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="false" /> <texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="false" /> + <texture name="TabLeft_Flat_Off" file_name="containers/TabLeft_Flat_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="TabLeft_Flat_Selected" file_name="containers/TabLeft_Flat_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> + <texture name="TabTop_First_Flat_Off" file_name="containers/TabTop_First_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Last_Flat_Off" file_name="containers/TabTop_Last_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Middle_Flat_Off" file_name="containers/TabTop_Middle_Flat_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_First_Flat_Selected" file_name="containers/TabTop_First_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Last_Flat_Selected" file_name="containers/TabTop_Last_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Middle_Flat_Selected" file_name="containers/TabTop_Middle_Flat_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> + <texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> <texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> <texture name="TabTop_Right_Flashing" file_name="containers/TabTop_Right_Flashing.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> @@ -704,7 +721,9 @@ with the same filename but different name <texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Highlight" file_name="widgets/TextField_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Transparent" file_name="widgets/TextField_Transparent.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="Thumbnail_Fallback" file_name="icons/thumbnail_fallback_icon.png" preload="true" /> @@ -780,13 +799,13 @@ with the same filename but different name <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" + <texture name="Window_Background" file_name="windows/Window_NoTitle_Background.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" + <texture name="Window_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Background" file_name="windows/Window_Background.png" preload="true" + <texture name="Window_NoTitle_Background" file_name="windows/Window_NoTitle_Background.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Foreground" file_name="windows/Window_Foreground.png" preload="true" + <texture name="Window_NoTitle_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> @@ -839,8 +858,14 @@ with the same filename but different name <texture name="icon_avatar_online.tga" /> <texture name="icon_diurnal.tga" /> <texture name="icon_for_sale.tga" file_name="icons/Icon_For_Sale.png" /> + <texture name="icon_auction.tga"/> + <texture name="icon_place.tga"/> <texture name="icon_top_pick.tga" /> + <texture name="icon_event.tga"/> + <texture name="icon_event_adult.tga"/> + <texture name="icon_event_mature.tga" /> + <texture name="lag_status_critical.tga" /> <texture name="lag_status_good.tga" /> <texture name="lag_status_warning.tga" /> @@ -866,6 +891,7 @@ with the same filename but different name <texture name="badge_warn.j2c" /> <texture name="badge_ok.j2c" /> <texture name="materials_ui_x_24.png" /> + <texture name="locked_image" file_name="locked_image_dark.png" preload="true"/> <texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" /> <texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" /> @@ -911,28 +937,6 @@ with the same filename but different name <texture name="Single_Folder_Up" file_name="icons/single_folder_up.png" preload="true"/> <texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/> <texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/> - - <texture name="Icon_Place" file_name="megapahit/icon_place.png" preload="false" /> - <texture name="Icon_Auction" file_name="megapahit/icon_land_auction.png" preload="false" /> - <texture name="Icon_For_Sale" file_name="megapahit/icon_land_forsale.png" preload="false" /> - <texture name="Icon_Group" file_name="megapahit/icon_group.png" preload="false" /> - <texture name="Icon_Legacy_Event_PG" file_name="icons/Parcel_PG_Dark.png" preload="false" /> - <texture name="Icon_Legacy_Event_Mature" file_name="icons/Parcel_M_Dark.png" preload="false" /> - <texture name="Icon_Legacy_Event_Adult" file_name="icons/Parcel_R_Dark.png" preload="false" /> - - <texture name="ProgressLarge_1" file_name="icons/ProgressLarge_1.png" preload="true" /> - <texture name="ProgressLarge_2" file_name="icons/ProgressLarge_2.png" preload="true" /> - <texture name="ProgressLarge_3" file_name="icons/ProgressLarge_3.png" preload="true" /> - <texture name="ProgressLarge_4" file_name="icons/ProgressLarge_4.png" preload="true" /> - <texture name="ProgressLarge_5" file_name="icons/ProgressLarge_5.png" preload="true" /> - <texture name="ProgressLarge_6" file_name="icons/ProgressLarge_6.png" preload="true" /> - <texture name="ProgressLarge_7" file_name="icons/ProgressLarge_7.png" preload="true" /> - <texture name="ProgressLarge_8" file_name="icons/ProgressLarge_8.png" preload="true" /> - <texture name="ProgressLarge_9" file_name="icons/ProgressLarge_9.png" preload="true" /> - <texture name="ProgressLarge_10" file_name="icons/ProgressLarge_10.png" preload="true" /> - <texture name="ProgressLarge_11" file_name="icons/ProgressLarge_11.png" preload="true" /> - <texture name="ProgressLarge_12" file_name="icons/ProgressLarge_12.png" preload="true" /> - <texture name="Icon_Pointer" file_name="icons/Icon_Pointer.png" preload="false"/> <texture name="mp_fpsButton" file_name="megapahit/fps_button.png" preload="false" /> diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png Binary files differindex 8439f82e29..6852706a80 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png Binary files differindex cb9a04d84f..6c237f973a 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On.png b/indra/newview/skins/default/textures/widgets/Checkbox_On.png Binary files differindex 0ec090504a..de87071c05 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_On.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_On.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png Binary files differindex 5759f7de69..702351e03b 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png Binary files differindex ba46e91c55..7be2cac5e1 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png Binary files differindex 5f5a33d878..a533debf1e 100644 --- a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png +++ b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Slim_Off.png b/indra/newview/skins/default/textures/widgets/Checkbox_Slim_Off.png Binary files differnew file mode 100644 index 0000000000..99af0397d5 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/Checkbox_Slim_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Slim_On.png b/indra/newview/skins/default/textures/widgets/Checkbox_Slim_On.png Binary files differnew file mode 100644 index 0000000000..cabecf1467 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/Checkbox_Slim_On.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Arrow.png b/indra/newview/skins/default/textures/widgets/ComboButton_Arrow.png Binary files differnew file mode 100644 index 0000000000..7961967458 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Arrow.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png Binary files differindex ebeb813349..5b2bc7b163 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png Binary files differindex 8c315a9d25..71c16e8414 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png Binary files differindex 15afcb04a1..715b401ce5 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Transparent.png b/indra/newview/skins/default/textures/widgets/ComboButton_Transparent.png Binary files differnew file mode 100644 index 0000000000..4b978877e1 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Transparent.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png Binary files differindex 34edea9421..9e74524be4 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png Binary files differindex 9583f05507..aa8865c33d 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png Binary files differindex 9a69f7e0d9..fff0cfaff2 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Off.png b/indra/newview/skins/default/textures/widgets/DropDown_Off.png Binary files differindex b118e7a7d4..9f6a2313b9 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_Off.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_Off.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_On.png b/indra/newview/skins/default/textures/widgets/DropDown_On.png Binary files differindex 3613e42a3f..be40e7104c 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_On.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_On.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Press.png b/indra/newview/skins/default/textures/widgets/DropDown_Press.png Binary files differindex ec0ffc2e88..b6bf4d1c22 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_Press.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_Press.png diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Over.png b/indra/newview/skins/default/textures/widgets/ListItem_Over.png Binary files differindex 8c80522232..9316567e7b 100644 --- a/indra/newview/skins/default/textures/widgets/ListItem_Over.png +++ b/indra/newview/skins/default/textures/widgets/ListItem_Over.png diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Select.png b/indra/newview/skins/default/textures/widgets/ListItem_Select.png Binary files differindex b27e0ee787..cd65d347d6 100644 --- a/indra/newview/skins/default/textures/widgets/ListItem_Select.png +++ b/indra/newview/skins/default/textures/widgets/ListItem_Select.png diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png Binary files differindex de71f763d3..ea45cfe3b7 100644 --- a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png +++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png Binary files differindex 6020fadc5a..0e1fd747fc 100644 --- a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png +++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png Binary files differindex 492d9b6fc4..4d0d123987 100644 --- a/indra/newview/skins/default/textures/widgets/ProgressBar.png +++ b/indra/newview/skins/default/textures/widgets/ProgressBar.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png Binary files differindex e99ec4b14b..157b404c08 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login.png b/indra/newview/skins/default/textures/widgets/PushButton_Login.png Binary files differindex 8e7d932ab1..d6ba983674 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Login.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Login.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png Binary files differindex 038ba23be2..e3161b1a26 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Login_Over.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png b/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png Binary files differindex 828aa1a139..bd4174c3d4 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Login_Pressed.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Off.png b/indra/newview/skins/default/textures/widgets/PushButton_Off.png Binary files differindex c74cea62d3..daf448a6e1 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Off.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Off.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On.png b/indra/newview/skins/default/textures/widgets/PushButton_On.png Binary files differindex e387c7e313..5bfb126ea8 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_On.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_On.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Over.png Binary files differindex 34a64a3ade..c27178f061 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Over.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Over.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Press.png Binary files differindex 79fc601f27..45b55fa518 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Press.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Press.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png Binary files differindex e2818da352..062fcf9246 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Sign.png b/indra/newview/skins/default/textures/widgets/PushButton_Sign.png Binary files differnew file mode 100644 index 0000000000..f1c27f8c9b --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/PushButton_Sign.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Sign_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Sign_Over.png Binary files differnew file mode 100644 index 0000000000..efef8bebad --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/PushButton_Sign_Over.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Sign_Pressed.png b/indra/newview/skins/default/textures/widgets/PushButton_Sign_Pressed.png Binary files differnew file mode 100644 index 0000000000..ec3409e8b8 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/PushButton_Sign_Pressed.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png Binary files differindex 32ec25fe0e..d2a26f2bca 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png Binary files differindex 5d267af5dc..68c26b65b3 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On.png b/indra/newview/skins/default/textures/widgets/RadioButton_On.png Binary files differindex e6bf0db157..01bd9ba3be 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_On.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_On.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png Binary files differindex 72aae43618..d22ac0ec41 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png Binary files differindex f3883b82b3..11a0704aa8 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png Binary files differindex 0025256045..df29db100d 100644 --- a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png +++ b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png Binary files differindex 9afc907c1c..eb9563e0ee 100644 --- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png +++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png Binary files differindex ede643e528..144a7cba25 100644 --- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png +++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png Binary files differindex ef50fb5d51..26e2fe53aa 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png Binary files differindex 191dbf08fc..e9f15dbad4 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png Binary files differindex d5882bce85..d66d020587 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png Binary files differindex ddaab1cfcd..1104f6879d 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png Binary files differindex c8634b1294..753c38bdad 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png Binary files differindex 65d082b993..8ad008ba51 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png Binary files differindex 12f55c599e..ca5f84a088 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png Binary files differindex 6a023156c5..9b1531a11e 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png Binary files differindex 457644e69a..28f5bf37f7 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png Binary files differindex 5cfa3ae4e1..d2a26f2bca 100644 --- a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png Binary files differindex 66cdcbeb94..68c26b65b3 100644 --- a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png +++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png Binary files differindex 0bf8e43e81..df29db100d 100644 --- a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png +++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png Binary files differindex 720830f83f..65cfaf4c62 100644 --- a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png +++ b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png Binary files differindex ff21034095..2421b687f7 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png Binary files differindex e888e1e045..cbbacb6a5b 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png Binary files differindex 133845bdbc..691a8ff13f 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png Binary files differindex dffd557bbd..daea2b21f8 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Active.png Binary files differindex 66c3867b81..c3d9a645c6 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Active.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Active.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png Binary files differindex baf747f581..5355fa3223 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Highlight.png Binary files differnew file mode 100644 index 0000000000..f1658b9a87 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/TextField_Highlight.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Off.png Binary files differindex a35562f950..b830e6efeb 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Off.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Off.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png Binary files differindex 572535f1ab..270dd72823 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png Binary files differindex 94b4b158f7..ca531b2abc 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png Binary files differindex 7768da04e8..3869ccb7f2 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png Binary files differindex fccd38c807..958cea5c5f 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Transparent.png b/indra/newview/skins/default/textures/widgets/TextField_Transparent.png Binary files differnew file mode 100644 index 0000000000..1735184387 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/TextField_Transparent.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png Binary files differindex 03d1e805e1..1e2ce7bc83 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png +++ b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png Binary files differindex cdc52fe08a..25f2914ecc 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png +++ b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_sphere.png b/indra/newview/skins/default/textures/widgets/track_control_sphere.png Binary files differindex b6592b5992..adfb51edd2 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_sphere.png +++ b/indra/newview/skins/default/textures/widgets/track_control_sphere.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_sun_back.png b/indra/newview/skins/default/textures/widgets/track_control_sun_back.png Binary files differindex b3191ccc5d..98bae90332 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_sun_back.png +++ b/indra/newview/skins/default/textures/widgets/track_control_sun_back.png diff --git a/indra/newview/skins/default/textures/windows/Inspector_I.png b/indra/newview/skins/default/textures/windows/Inspector_I.png Binary files differindex 0d1719c66f..d51cf43051 100644 --- a/indra/newview/skins/default/textures/windows/Inspector_I.png +++ b/indra/newview/skins/default/textures/windows/Inspector_I.png diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png Binary files differindex f19fb0300b..5606af74b4 100644 --- a/indra/newview/skins/default/textures/windows/Window_Background.png +++ b/indra/newview/skins/default/textures/windows/Window_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png Binary files differindex 15d2ff72b6..28bab49869 100644 --- a/indra/newview/skins/default/textures/windows/Window_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png Binary files differnew file mode 100644 index 0000000000..6880008fff --- /dev/null +++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png Binary files differnew file mode 100644 index 0000000000..978b51f5a7 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/login_mp_logo.png b/indra/newview/skins/default/textures/windows/login_mp_logo.png Binary files differindex 7526374ba2..e2b472565b 100644 --- a/indra/newview/skins/default/textures/windows/login_mp_logo.png +++ b/indra/newview/skins/default/textures/windows/login_mp_logo.png diff --git a/indra/newview/skins/default/textures/windows/login_mp_logo_horizontal.png b/indra/newview/skins/default/textures/windows/login_mp_logo_horizontal.png Binary files differnew file mode 100644 index 0000000000..5bc7d77d15 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/login_mp_logo_horizontal.png diff --git a/indra/newview/skins/default/textures/windows/login_mp_logo_small.png b/indra/newview/skins/default/textures/windows/login_mp_logo_small.png Binary files differindex 779d8ff649..36c84f478a 100644 --- a/indra/newview/skins/default/textures/windows/login_mp_logo_small.png +++ b/indra/newview/skins/default/textures/windows/login_mp_logo_small.png diff --git a/indra/newview/skins/default/xui/da/floater_joystick.xml b/indra/newview/skins/default/xui/da/floater_joystick.xml index 49e1397e9f..c756bc6969 100644 --- a/indra/newview/skins/default/xui/da/floater_joystick.xml +++ b/indra/newview/skins/default/xui/da/floater_joystick.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="Joystick" title="JOYSTICK OPSÆTNING"> <check_box label="Aktiver Joystick:" name="enable_joystick"/> - <spinner label="X akse mapping" name="JoystickAxis1"/> - <spinner label="Y akse mapping" name="JoystickAxis2"/> - <spinner label="Z akse mapping" name="JoystickAxis0"/> - <spinner label="Hældning mapping" name="JoystickAxis4"/> - <spinner label="Drejning mapping" name="JoystickAxis5"/> - <spinner label="Rulning mapping" name="JoystickAxis3"/> - <spinner label="Zoom mapping" name="JoystickAxis6"/> + <spinner label="X akse mapping" name="JoystickAxis1" label_width="115" width="155"/> + <spinner label="Y akse mapping" name="JoystickAxis2" label_width="115" width="155"/> + <spinner label="Z akse mapping" name="JoystickAxis0" label_width="115" width="155"/> + <spinner label="Hældning mapping" name="JoystickAxis4" label_width="115" width="155"/> + <spinner label="Drejning mapping" name="JoystickAxis5" label_width="115" width="155"/> + <spinner label="Rulning mapping" name="JoystickAxis3" label_width="115" width="155"/> + <spinner label="Zoom mapping" name="JoystickAxis6" label_width="115" width="155"/> <check_box label="Direkte zoom" name="ZoomDirect"/> <check_box label="3D Cursor" name="Cursor3D"/> <check_box label="Auto opret" name="AutoLeveling"/> diff --git a/indra/newview/skins/default/xui/da/floater_sound_devices.xml b/indra/newview/skins/default/xui/da/floater_sound_devices.xml deleted file mode 100644 index cb4cbba570..0000000000 --- a/indra/newview/skins/default/xui/da/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="Lyd enheder"> - <text name="voice_label"> - Stemme chat - </text> - <check_box label="Aktiveret" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/da/floater_voice_effect.xml b/indra/newview/skins/default/xui/da/floater_voice_effect.xml deleted file mode 100644 index 86ad251103..0000000000 --- a/indra/newview/skins/default/xui/da/floater_voice_effect.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Steder" name="voice_effects" title="STEMME MORPH"> - <string name="no_voice_effect"> - (Ingen stemme "morph") - </string> - <string name="active_voice_effect"> - (Aktiv) - </string> - <string name="unsubscribed_voice_effect"> - (Ikke aktiveret) - </string> - <string name="new_voice_effect"> - (Ny!) - </string> - <text name="preview_text"> - For at se - </text> - <text name="status_text"> - Optag en prøve, klik derefter på en stemme for at høre hvordan det vil lyde. - </text> - <button label="Optag" name="record_btn" tool_tip="Optag en stemmeprøve."/> - <button label="Stop" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Abonnér nu] - </text> - <scroll_list name="voice_effect_list" tool_tip="Optag en prøve med din stemme og klik på en effekt for at teste."> - <scroll_list.columns label="Stemme navn" name="name"/> - <scroll_list.columns label="Udløber" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/da/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/da/floater_whitelist_entry.xml index 443e84b64a..e05be4e310 100644 --- a/indra/newview/skins/default/xui/da/floater_whitelist_entry.xml +++ b/indra/newview/skins/default/xui/da/floater_whitelist_entry.xml @@ -3,7 +3,7 @@ <text name="media_label"> Indtast en URL eller et URL mønster for at tilføje til listen med godkendte domæner </text> - <line_editor name="whitelist_entry" tool_tip="Indtast en URL eller et URL mønster for at godkende side(r)"/> + <line_editor name="whitelist_entry" tool_tip="Indtast en URL eller et URL mønster for at godkende side(r)" bottom_delta="25"/> <button label="OK" name="ok_btn"/> <button label="Annullér" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/da/panel_preferences_alerts.xml index 7caa17d514..fa245416cf 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_alerts.xml @@ -4,6 +4,7 @@ Vis mig når: </text> <check_box label="Når jeg bruger eller får L$" name="notify_money_change_checkbox"/> + <check_box name="notify_money_spend_checkbox" left_delta="70"/> <check_box label="Når mine venner logger på eller af" name="friends_online_notify_checkbox"/> <text name="show_label"> Vis altid: diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml index 26d2ae4abd..acae39061b 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml @@ -30,7 +30,7 @@ <radio_item label="Avatar position" name="1"/> </radio_group> <check_box label="Bevæg avatar-læber når der snakkes" name="enable_lip_sync"/> - <check_box label="Skift tale tænd/sluk når jeg trykker:" name="push_to_talk_toggle_check" tool_tip="Når du er i skift-modus, vil hvert tryk tænde eller slukke din mikrofon. Når du ikke er i skift-modus, vil din mikrofon kun være tændt når knappen/tasten holdes nede (som en Walkie Talkie)"/> + <check_box label="Skift tale tænd/sluk når jeg trykker" name="push_to_talk_toggle_check" tool_tip="Når du er i skift-modus, vil hvert tryk tænde eller slukke din mikrofon. Når du ikke er i skift-modus, vil din mikrofon kun være tændt når knappen/tasten holdes nede (som en Walkie Talkie)"/> <line_editor label="Tryk-for-tale udløser" name="modifier_combo"/> <button label="Angiv taste" name="set_voice_hotkey_button"/> <button name="set_voice_middlemouse_button" tool_tip="Nulstil til midterste muse-knap"/> diff --git a/indra/newview/skins/default/xui/da/panel_status_bar.xml b/indra/newview/skins/default/xui/da/panel_status_bar.xml index 6e7bdfc188..a976c3f17a 100644 --- a/indra/newview/skins/default/xui/da/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/da/panel_status_bar.xml @@ -12,7 +12,7 @@ <panel.string name="bandwidth_tooltip"> Båndbredde </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/da/panel_voice_effect.xml b/indra/newview/skins/default/xui/da/panel_voice_effect.xml deleted file mode 100644 index 50f561ec7f..0000000000 --- a/indra/newview/skins/default/xui/da/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Voice Morphing Off - </string> - <string name="preview_voice_effects"> - Se stemme "morph" ▶ - </string> - <string name="get_voice_effects"> - Hente stemme "morph" ▶ - </string> - <combo_box name="voice_effect" tool_tip="Vælg en stemme "morph" for at ændre din stemme"> - <combo_box.item label="Stemme morph slukket" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/de/floater_big_preview.xml b/indra/newview/skins/default/xui/de/floater_big_preview.xml deleted file mode 100644 index c5ce56d1d9..0000000000 --- a/indra/newview/skins/default/xui/de/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="VORSCHAU"/> diff --git a/indra/newview/skins/default/xui/de/floater_post_process.xml b/indra/newview/skins/default/xui/de/floater_post_process.xml deleted file mode 100644 index a6ed8cc3df..0000000000 --- a/indra/newview/skins/default/xui/de/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="POST-PROCESSING-EINSTELLUNGEN"> - <tab_container name="Post-Process Tabs"> - <panel label="Farbfilter" name="wmiColorFilterPanel"> - <check_box label="Ein" name="wmiColorFilterToggle" /> - <text name="wmiColorFilterBrightnessText"> - Helligkeit - </text> - <text name="wmiColorFilterSaturationText"> - Sättigung - </text> - <text name="wmiColorFilterContrastText"> - Kontrast - </text> - <text name="wmiColorFilterBaseText"> - Kontrast-Grundfarbe - </text> - <slider label="R" name="wmiColorFilterBaseR" /> - <slider label="G" name="wmiColorFilterBaseG" /> - <slider label="B" name="wmiColorFilterBaseB" /> - <slider label="I" name="wmiColorFilterBaseI" /> - </panel> - <panel label="Nachtsicht" name="wmiNightVisionPanel"> - <check_box label="Ein" name="wmiNightVisionToggle" /> - <text name="wmiNightVisionBrightMultText"> - Lichtverstärkungsmultiplikator - </text> - <text name="wmiNightVisionNoiseSizeText"> - Rauschen-Größe - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Rauschen-Stärke - </text> - </panel> - <panel label="Bloom" name="wmiBloomPanel"> - <check_box label="Ein" name="wmiBloomToggle" /> - <text name="wmiBloomExtractText"> - Luminanz-Extraktion - </text> - <text name="wmiBloomSizeText"> - Bloom-Größe - </text> - <text name="wmiBloomStrengthText"> - Bloom-Stärke - </text> - </panel> - <panel label="Extras" name="Extras"> - <button label="Effekt laden" label_selected="Effekt laden" name="PPLoadEffect" /> - <button label="Effekt speichern" label_selected="Effekt speichern" name="PPSaveEffect" /> - <line_editor label="Effektname" name="PPEffectNameEditor" /> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_sound_devices.xml b/indra/newview/skins/default/xui/de/floater_sound_devices.xml deleted file mode 100644 index 22ccb2c1a2..0000000000 --- a/indra/newview/skins/default/xui/de/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="SOUNDGERÄTE"> - <text name="voice_label"> - Voice-Chat - </text> - <check_box label="Aktiviert" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_voice_effect.xml b/indra/newview/skins/default/xui/de/floater_voice_effect.xml deleted file mode 100644 index 8d37950480..0000000000 --- a/indra/newview/skins/default/xui/de/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Orte" name="voice_effects" title="VOICE-MORPHING-VORSCHAU"> - <string name="no_voice_effect"> - (Kein Voice-Morphing) - </string> - <string name="active_voice_effect"> - (Aktiv) - </string> - <string name="unsubscribed_voice_effect"> - (nicht abonniert) - </string> - <string name="new_voice_effect"> - (Neu!) - </string> - <string name="effect_Arena"> - Arena - </string> - <string name="effect_Beast"> - Bestie - </string> - <string name="effect_Buff"> - Muskulös - </string> - <string name="effect_Buzz"> - Buzz - </string> - <string name="effect_Camille"> - Camille - </string> - <string name="effect_Creepy"> - Unheimlich - </string> - <string name="effect_CreepyBot"> - UnheimlicherBot - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - TieferBot - </string> - <string name="effect_Demon"> - Dämon - </string> - <string name="effect_Female Elf"> - Weibliche Elfe - </string> - <string name="effect_Flirty"> - Kokett - </string> - <string name="effect_Foxy"> - Attraktiv - </string> - <string name="effect_Halloween 2010 Bonus"> - Bonus_Halloween_2010 - </string> - <string name="effect_Helium"> - Helium - </string> - <string name="effect_Husky"> - Rauchig - </string> - <string name="effect_Husky Whisper"> - Rauchiges Flüstern - </string> - <string name="effect_Intercom"> - Intercom - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Leises Trällern - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Modell - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Alptraum - </string> - <string name="effect_PopBot"> - PopBot - </string> - <string name="effect_Rachel"> - Rachel - </string> - <string name="effect_Radio"> - Radio - </string> - <string name="effect_Robot"> - Roboter - </string> - <string name="effect_Roxanne"> - Roxanne - </string> - <string name="effect_Rumble"> - Rumpeln - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samantha - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Shorty - </string> - <string name="effect_Smaller"> - Kleiner - </string> - <string name="effect_Sneaky"> - Hinterhältig - </string> - <string name="effect_Stallion"> - Hengst - </string> - <string name="effect_Sultry"> - Feurig - </string> - <string name="effect_Thunder"> - Donner - </string> - <string name="effect_Vixen"> - Erotisch - </string> - <string name="effect_WhinyBot"> - JammernderBot - </string> - <text name="preview_text"> - Zur Vorschau - </text> - <text name="status_text"> - Stimme aufnehmen und auf einen Effekt klicken, um diesen auf Ihre Stimme anzuwenden. - </text> - <button label="Aufnehmen" name="record_btn" tool_tip="Nehmen Sie Ihre Stimme auf."/> - <button label="Stopp" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Jetzt abonnieren] - </text> - <scroll_list name="voice_effect_list" tool_tip="Nehmen Sie Ihre Stimme auf und klicken Sie dann auf einen Effekt, um diesen auszuprobieren."> - <scroll_list.columns label="Bezeichnung" name="name"/> - <scroll_list.columns label="Gültig bis" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/de/panel_login_first.xml b/indra/newview/skins/default/xui/de/panel_login_first.xml deleted file mode 100644 index 038001157e..0000000000 --- a/indra/newview/skins/default/xui/de/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php?lang=de - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Benutzername" name="username_combo" tool_tip="Bei der Registrierung gewählter Benutzername wie „berndschmidt12“ oder „Liebe Sonne“"/> - <line_editor label="Kennwort" name="password_edit"/> - <button label="Anmelden" name="connect_btn"/> - <check_box label="Details speichern" name="remember_check"/> - <text name="forgot_password_text"> - Kennwort vergessen - </text> - <text name="sign_up_text"> - Registrieren - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Ihr erster Schritt ist Learning Island. Suchen Sie die Pforte! - </text> - <text name="image_caption_right"> - Erkunden Sie dann Social Island und lernen Sie andere Einwohner kennen! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml index 0829814220..7e305fb16b 100644 --- a/indra/newview/skins/default/xui/de/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Bandbreite </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/de/panel_voice_effect.xml b/indra/newview/skins/default/xui/de/panel_voice_effect.xml deleted file mode 100644 index 533deb8597..0000000000 --- a/indra/newview/skins/default/xui/de/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Voice-Morphing Aus - </string> - <string name="preview_voice_effects"> - Voice-Morphing ausprobieren ▶ - </string> - <string name="get_voice_effects"> - Voice-Morphing abonnieren ▶ - </string> - <combo_box name="voice_effect" tool_tip="Wählen Sie einen Voice-Morph-Effekt aus, um Ihre Stimme zu verändern."> - <combo_box.item label="Voice-Morphing Aus" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index c5b42b6dae..ffb9c0f78e 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -974,7 +974,7 @@ layout="topleft" left="28" name="Set to group:" - top_pad="5" + top_pad="9" width="176"> Set to group: </text> @@ -1022,7 +1022,7 @@ layout="topleft" left="28" name="Owned by others:" - top_pad="5" + top_pad="9" width="176"> Owned by others: </text> @@ -1593,7 +1593,7 @@ Only large parcels can be listed in search. left="10" name="with media:" top="10" - width="100"> + width="110"> Type: </text> <combo_box @@ -1620,7 +1620,7 @@ Only large parcels can be listed in search. layout="topleft" left="10" name="at URL:" - width="100" + width="110" top_pad="10"> Home Page: </text> @@ -1632,7 +1632,7 @@ Only large parcels can be listed in search. max_length_bytes="255" name="media_url" select_on_focus="true" - width="300" + width="290" top_delta="0"/> <button follows="left|top" @@ -1659,13 +1659,13 @@ Only large parcels can be listed in search. follows="left|top" height="20" layout="topleft" - left="110" + left="120" max_length_bytes="255" name="url_description" select_on_focus="true" tool_tip="Text displayed next to play/load button" top_delta="0" - width="300" /> + width="290" /> <text type="string" length="1" @@ -1685,7 +1685,7 @@ Only large parcels can be listed in search. follows="left|top" height="80" layout="topleft" - left="110" + left="120" name="media texture" tool_tip="Click to choose a picture" top_delta="0" @@ -1698,7 +1698,7 @@ Only large parcels can be listed in search. layout="topleft" left_pad="8" name="replace_texture_help" - width="300" + width="290" word_wrap="true" top_delta="0"> Objects using this texture will show the movie or web page after you click the play arrow. Select the thumbnail to choose a different texture. @@ -1707,7 +1707,7 @@ Only large parcels can be listed in search. height="16" label="Auto scale" layout="topleft" - left="107" + left="117" name="media_auto_scale" top_pad="-10" tool_tip="Checking this option will scale the content for this parcel automatically. It may be slightly slower and lower quality visually but no other texture scaling or alignment will be required." @@ -1721,7 +1721,7 @@ Only large parcels can be listed in search. left="10" name="media_size" tool_tip="Size to render Web media, leave 0 for default." - width="100" + width="110" top_pad="10"> Size: </text> @@ -1776,7 +1776,7 @@ Only large parcels can be listed in search. left="10" name="Options:" top_pad="10" - width="100"> + width="110"> Options: </text> <check_box @@ -1786,7 +1786,7 @@ Only large parcels can be listed in search. left_pad="-3" name="media_loop" tool_tip="Play media in a loop. When the media has finished playing, it will restart from the beginning." - top_delta="-1" + top_delta="1" width="200" /> </panel> <panel diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml index 870ddee554..308f4feb5a 100644 --- a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml +++ b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml @@ -50,7 +50,6 @@ follows="top|left|right" height="24" label="Get started" - font="SansSerifMedium" layout="topleft" left="320" name="continue_btn" @@ -59,6 +58,7 @@ image_hover_unselected="PushButton_Login_Over" label_color="White" top_pad ="15" + pad_bottom="1" width="140"/> <button follows="top|left|right" @@ -66,6 +66,7 @@ label="Later" layout="topleft" left_pad="9" + pad_bottom="1" name="close_btn" width="90"/> <icon @@ -97,7 +98,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" text_color="White" height="75" width="260" @@ -112,7 +112,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" text_color="White" height="75" width="260" @@ -126,7 +125,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" text_color="White" height="75" width="260" diff --git a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml index 889eeb5369..d6dc112dce 100644 --- a/indra/newview/skins/default/xui/en/floater_adjust_environment.xml +++ b/indra/newview/skins/default/xui/en/floater_adjust_environment.xml @@ -47,15 +47,15 @@ name="ambient_lbl" height="10" layout="topleft" - left="10" + left="7" top="5" - width="80">Ambient:</text> + width="80">Ambient</text> <color_swatch can_apply_immediately="true" follows="left|top" height="40" label_height="0" layout="topleft" - left_delta="0" + left_delta="3" name="ambient_light" top_pad="5" width="60"/> @@ -63,15 +63,15 @@ name="blue_horizon_lbl" height="10" layout="topleft" - left_delta="0" + left="7" top_pad="10" - width="80">Blue Horizon:</text> + width="80">Blue Horizon</text> <color_swatch can_apply_immediately="true" follows="left|top" height="40" label_height="0" layout="topleft" - left_delta="0" + left_delta="3" name="blue_horizon" top_pad="5" width="60"/> @@ -79,15 +79,15 @@ name="blue_density_lbl" height="10" layout="topleft" - left_delta="0" + left="7" top_pad="10" - width="80">Blue Density:</text> + width="80">Blue Density</text> <color_swatch can_apply_immediately="true" follows="left|top" height="40" label_height="0" layout="topleft" - left_delta="0" + left_delta="3" name="blue_density" top_pad="5" width="60"/> @@ -107,7 +107,7 @@ layout="topleft" right="-12" top="5" - width="60">Sun Color:</text> + width="60">Sun Color</text> <color_swatch can_apply_immediately="true" follows="left|top" height="10" @@ -123,7 +123,7 @@ layout="topleft" left_delta="0" top_pad="5" - width="80">Cloud Color:</text> + width="80">Cloud Color</text> <color_swatch can_apply_immediately="true" follows="left|top" height="10" @@ -139,7 +139,7 @@ left_delta="0" top_pad="10" name="cloud_map_label" - width="80">Cloud Image:</text> + width="80">Cloud Image</text> <texture_picker height="63" layout="topleft" left_delta="0" @@ -152,7 +152,7 @@ left_delta="0" top_pad="-13" name="water_map_label" - width="80">Water Image:</text> + width="80">Water Image</text> <texture_picker height="63" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index adbce0d982..0c82cbb00c 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -63,7 +63,7 @@ layout="topleft" left="10" name="InstructSearchResidentName" - top="8" + top="7" width="220"> Type part of a person's name: </text> @@ -76,7 +76,7 @@ height="23" left_delta="0" name="Edit" - top_pad="0" + top_pad="3" width="65" /> <button follows="top|right" diff --git a/indra/newview/skins/default/xui/en/floater_big_preview.xml b/indra/newview/skins/default/xui/en/floater_big_preview.xml deleted file mode 100644 index 362853d06f..0000000000 --- a/indra/newview/skins/default/xui/en/floater_big_preview.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - positioning="cascading" - can_close="true" - can_resize="true" - can_minimize="false" - help_topic="floater_big_preview" - layout="topleft" - name="floater_big_preview" - save_rect="true" - single_instance="true" - reuse_instance="true" - title="PREVIEW" - height="465" - width="770"> - <panel - height="450" - width="750" - visible="true" - name="big_preview_placeholder" - top="5" - follows="all" - left="10"> - </panel> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 7636284b4b..17631ad30c 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -29,7 +29,7 @@ control_name="BulkChangeIncludeAnimations" height="16" name="check_animation" - top="24" + top="30" left="10" width="16" /> <icon @@ -73,7 +73,7 @@ name="check_gesture" left="95" width="16" - top="25" /> + top="30" /> <icon height="16" image_name="Inv_Gesture" @@ -116,7 +116,7 @@ control_name="BulkChangeIncludeScripts" height="16" name="check_script" - top="25" + top="30" left="180" width="16" /> @@ -161,7 +161,7 @@ height="16" name="check_settings" left="245" - top="25" + top="30" width="16" /> <icon height="16" @@ -291,7 +291,7 @@ height="16" label="Copy" layout="topleft" - top_pad="0" + top_pad="3" name="next_owner_copy" tool_tip="Next owner can make unlimited copies of this object. Copies maintain creator information, and can never be more permissive than the item being copied." width="92"> @@ -302,7 +302,7 @@ control_name="BulkChangeNextOwnerTransfer" enabled_control="BulkChangeNextOwnerCopy" height="16" - top_pad="0" + top_pad="3" initial_value="true" label="Transfer" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index e8e83301be..5e0903a40f 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -93,7 +93,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" height="16" layout="topleft" left="20" @@ -105,7 +104,6 @@ <text type="string" length="1" - font="SansSerifMedium" follows="top|left" halign="right" height="16" @@ -128,7 +126,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" height="16" layout="topleft" left="20" @@ -140,7 +137,6 @@ <text type="string" length="1" - font="SansSerifMedium" follows="top|left" halign="right" height="16" @@ -163,7 +159,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" font.style="BOLD" height="16" layout="topleft" @@ -176,7 +171,6 @@ <text type="string" length="1" - font="SansSerifMedium" follows="top|left" halign="right" height="16" @@ -207,7 +201,6 @@ type="string" length="1" follows="top|left" - font="SansSerifMedium" height="16" top_pad="15" layout="topleft" @@ -217,7 +210,6 @@ Choose amount to buy </text> <text - font="SansSerifMedium" type="string" length="1" follows="left|top" @@ -233,7 +225,6 @@ type="string" max_length_bytes="10" halign="right" - font="SansSerifMedium" select_on_focus="true" follows="top|left" top_delta="-4" @@ -247,7 +238,6 @@ <text type="string" length="1" - font="SansSerifMedium" text_color="EmphasisColor" follows="top|left" halign="right" @@ -276,7 +266,6 @@ </text> <text type="string" - font="SansSerifMedium" length="1" follows="top|left" height="16" @@ -290,7 +279,6 @@ <text type="string" length="1" - font="SansSerifMedium" follows="top|left" top_delta="0" height="16" @@ -350,7 +338,6 @@ Re-enter amount to see the latest exchange rate. length="1" follows="top|left" layout="topleft" - font="SansSerifMedium" top="10" left="20" width="310" diff --git a/indra/newview/skins/default/xui/en/floater_directory.xml b/indra/newview/skins/default/xui/en/floater_directory.xml new file mode 100644 index 0000000000..3274474337 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_directory.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_close="true" + can_drag_on_left="false" + single_instance="true" + can_resize="true" + height="570" + min_height="570" + width="780" + min_width="780" + name="directory" + title="Search"> + <tab_container + top="0" + left="0" + follows="left|top|right|bottom" + height="550" + width="780" + mouse_opaque="false" + name="Directory Tabs" + tab_position="top"> + <panel + border="false" + label="People" + filename="panel_dir_people.xml" + class="panel_dir_people" + name="panel_dir_people" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Groups" + filename="panel_dir_groups.xml" + class="panel_dir_groups" + name="panel_dir_groups" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Places" + filename="panel_dir_places.xml" + class="panel_dir_places" + name="panel_dir_places" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Land Sales" + filename="panel_dir_land.xml" + class="panel_dir_land" + name="panel_dir_land" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Events" + filename="panel_dir_events.xml" + class="panel_dir_events" + name="panel_dir_events" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Classifieds" + filename="panel_dir_classified.xml" + class="panel_dir_classified" + name="panel_dir_classified" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> + <panel + border="false" + label="Web" + filename="panel_dir_web.xml" + class="panel_dir_web" + name="panel_dir_web" + follows="left|top|right" + layout="topleft" + left="0" + top="0" + bottom="-1" /> +</tab_container> + <panel + top="65" + follows="right|top" + height="486" + left="345" + visible="false" + name="panel_profile_secondlife" + class="panel_profile_secondlife" + filename="panel_profile_secondlife.xml" + width="425" /> + <panel + top="70" + follows="bottom|right|top" + height="482" + left="345" + visible="false" + name="panel_group_info_sidetray" + class="panel_group_info_sidetray" + filename="panel_group_info_sidetray.xml" + width="425" /> + <panel + top="70" + follows="bottom|right|top" + height="484" + left="345" + visible="false" + name="panel_places" + class="panel_places" + filename="panel_places.xml" + width="425" /> + <panel + top="70" + follows="bottom|right|top" + height="481" + left="345" + visible="false" + name="panel_classified_info" + class="panel_classified_info" + filename="panel_classified_info.xml" + width="425" /> + <panel + top="70" + follows="bottom|right|top" + height="480" + left="345" + visible="false" + name="panel_event_info" + class="panel_event_info" + filename="panel_event_info.xml" + width="425" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml index 787b2f8be4..b911e9b6f5 100644 --- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml @@ -290,7 +290,7 @@ <button follows="top|left" height="23" - width="110" + width="113" label="Clone Track From" left="10" top_pad="10" @@ -298,7 +298,7 @@ <button follows="top|left" height="23" - width="110" + width="113" label="Load Track From" top_pad="0" left_delta="0" @@ -306,7 +306,7 @@ <button follows="top|left" height="23" - width="110" + width="113" label="Clear Track" top_pad="0" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml index c831684594..41e8d3dc8a 100644 --- a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml @@ -5,7 +5,7 @@ can_minimize="true" can_close="true" can_resize="false" - height="80" + height="84" width="515" layout="topleft" name="HoverHeight" @@ -39,6 +39,6 @@ label="Bind Camera view" layout="topleft" name="BindCameraCheck" - top_pad="7" + top_pad="14" width="237"/> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_font_test.xml b/indra/newview/skins/default/xui/en/floater_font_test.xml index 61cb91e2f3..8070ed55e6 100644 --- a/indra/newview/skins/default/xui/en/floater_font_test.xml +++ b/indra/newview/skins/default/xui/en/floater_font_test.xml @@ -5,7 +5,7 @@ height="800" layout="topleft" min_height="175" - min_width="154" + min_width="390" name="contents" help_topic="contents" title="FONT TEST" diff --git a/indra/newview/skins/default/xui/en/floater_fs_search.xml b/indra/newview/skins/default/xui/en/floater_fs_search.xml deleted file mode 100644 index 2372bc03ba..0000000000 --- a/indra/newview/skins/default/xui/en/floater_fs_search.xml +++ /dev/null @@ -1,337 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - can_resize="true" - default_tab_group="1" - height="590" - help_topic="search" - layout="topleft" - legacy_header_height="0" - min_height="590" - min_width="660" - name="floater_search" - positioning="centered" - save_rect="true" - single_instance="true" - title="SEARCH" - width="780"> - <!-- Strings --> - <floater.string name="string.location"> - Location: [LOCATION] - </floater.string> - <floater.string name="string.traffic"> - Traffic: [DWELL] - </floater.string> - <floater.string name="string.area"> - Area: [AREA] - </floater.string> - <floater.string name="string.members"> - Members: [MEMBER_COUNT] - </floater.string> - <floater.string name="string.founder"> - Founder: [FOUNDER] - </floater.string> - <floater.string name="string.age"> - Age: [AGE] - </floater.string> - <floater.string name="string.partner"> - Partner: [PARTNER] - </floater.string> - <floater.string name="string.listing_price"> - Listing Price: [LISTING_PRICE] - </floater.string> - <floater.string name="string.slurl"> - [SLURL] - </floater.string> - <floater.string name="string.duration"> - Duration: [DURATION] - </floater.string> - <floater.string name="string.covercharge"> - Cover: [COVERCHARGE] - </floater.string> - <!-- Tab time --> - <tab_container - layout="topleft" - follows="all" - top="1" - left="0" - name="ls_tabs" - tab_min_width="90" - tab_position="top" - width="780" - height="585"> - <panel - class="panel_ls_web" - filename="panel_fs_search_legacy_web.xml" - label="Websearch" - layout="topleft" - name="panel_ls_web" /> - <panel - class="panel_ls_people" - filename="panel_fs_search_legacy_people.xml" - label="People" - layout="topleft" - name="panel_ls_people" /> - <panel - class="panel_ls_groups" - filename="panel_fs_search_legacy_groups.xml" - label="Groups" - layout="topleft" - name="panel_ls_groups" /> - <panel - class="panel_ls_places" - filename="panel_fs_search_legacy_places.xml" - label="Places" - layout="topleft" - name="panel_ls_places" /> - <panel - class="panel_ls_land" - filename="panel_fs_search_legacy_land.xml" - label="Land Sales" - layout="topleft" - name="panel_ls_land" /> - <panel - class="panel_ls_events" - filename="panel_fs_search_legacy_events.xml" - label="Events" - layout="topleft" - name="panel_ls_events" /> - <panel - class="panel_ls_classifieds" - filename="panel_fs_search_legacy_classifieds.xml" - label="Classifieds" - layout="topleft" - name="panel_ls_classifieds" /> - </tab_container> - <!-- Details/Action Panes --> - <panel - border="true" - follows="top|right|bottom" - height="508" - layout="topleft" - left="412" - top="80" - width="366" - name="panel_ls_details"> - <text_editor - left="12" - top="5" - height="24" - width="340" - layout="topleft" - follows="left|top|right" - name="title" - bg_visible="false" - border_visible="false" - allow_scroll="false" - h_pad="0" - v_pad="0" - halign="center" - enabled="false" - use_ellipses="true" - font="SansSerifHugeBold" - value="Undefined name" /> - <texture_picker - enabled="false" - fallback_image="Generic_Person_Large" - follows="left|top|right" - height="210" - layout="topleft" - left="78" - name="snapshot" - top_pad="4" - width="210"/> - <texture_picker - enabled="false" - fallback_image="default_land_picture.j2c" - follows="left|top|right" - height="210" - layout="topleft" - left_delta="0" - name="snapshot_parcel" - top_delta="0" - visible="false" - width="210"/> - <text_editor - left="20" - top_pad="2" - height="16" - width="180" - layout="topleft" - follows="left|top|right" - name="aux1" - bg_visible="false" - border_visible="false" - h_pad="0" - v_pad="0" - word_wrap="true" - enabled="false" - max_length="117" - allow_scroll="false" - parse_urls="true" - value="Auxilary info field 1"/> - <text_editor - left_pad="4" - top_delta="0" - height="16" - width="140" - layout="topleft" - follows="left|top|right" - name="aux2" - bg_visible="false" - border_visible="false" - h_pad="0" - v_pad="0" - word_wrap="true" - enabled="false" - max_length="117" - allow_scroll="false" - parse_urls="true" - value="Auxilary info field 2"/> - <icon - follows="top|right" - height="16" - image_name="Unknown_Icon" - layout="topleft" - left="20" - top_pad="2" - name="maturity_icon" - width="18" /> - <text_editor - left_pad="4" - top_delta="0" - height="28" - width="302" - layout="topleft" - follows="left|top|right" - name="location" - bg_visible="false" - border_visible="false" - h_pad="0" - v_pad="0" - word_wrap="true" - enabled="false" - max_length="117" - allow_scroll="false" - parse_urls="true" - value="Location info field"/> - <text_editor - left="20" - top_pad="12" - height="154" - width="324" - layout="topleft" - follows="left|top|right" - name="desc" - bg_visible="false" - border_visible="false" - h_pad="0" - v_pad="0" - word_wrap="true" - parse_urls="true" - enabled="false" - max_length="1000" - trusted_content="false" - value="You unlock this door with the key of imagination. Beyond it is another dimension: a dimension of sound, a dimension of sight, a dimension of mind. You're moving into a land of both shadow and substance, of things and ideas; you've just crossed over into the Twilight Zone. What you are about to see is real; the litigants on the screen are not actors. They are genuine citizens who, having filed their claims in a real small claims court, have been persuaded to drop their suits there and have them settled here, in this forum... the People's Court."/> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Open Profile" - name="people_profile_btn" - top="484" - left="3" - width="120" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Send Message" - name="people_message_btn" - width="120" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Add Friend" - name="people_friend_btn" - width="120" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Open Profile" - name="group_profile_btn" - top="484" - left="3" - width="120" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Join Chat" - name="group_message_btn" - width="120" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Join Group" - name="group_join_btn" - width="120" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Teleport" - name="teleport_btn" - top="484" - left="3" - width="120" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Show on Map" - name="map_btn" - width="120" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Remind me" - name="event_reminder_btn" - width="120" - left_pad="1" /> - <loading_indicator - left="134" - top="320" - follows="left|top|right" - mouse_opaque="false" - name="loading" - images_per_sec="1.0" - tab_stop="false" - height="100" - width="100" - visible="false" > - <images> - <image name="ProgressLarge_1"/> - <image name="ProgressLarge_2"/> - <image name="ProgressLarge_3"/> - <image name="ProgressLarge_4"/> - <image name="ProgressLarge_5"/> - <image name="ProgressLarge_6"/> - <image name="ProgressLarge_7"/> - <image name="ProgressLarge_8"/> - <image name="ProgressLarge_9"/> - <image name="ProgressLarge_10"/> - <image name="ProgressLarge_11"/> - <image name="ProgressLarge_12"/> - </images> - </loading_indicator> - </panel> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index 7fce91a2c3..4054e540c3 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -35,9 +35,13 @@ top="20" name="gesture_list"> <scroll_list.columns + label="" + name="active" + width="10" /> + <scroll_list.columns label="Name" name="name" - width="153" /> + width="143" /> <scroll_list.columns label="Chat" name="trigger" diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml index f8ec696af9..e94669bba4 100644 --- a/indra/newview/skins/default/xui/en/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml @@ -6,7 +6,7 @@ name="godtools floater" help_topic="godtools_floater" title="GOD TOOLS" - width="400"> + width="410"> <tab_container follows="left|top" height="364" @@ -15,7 +15,7 @@ name="GodTools Tabs" tab_position="top" top="20" - width="400"> + width="410"> <panel border="true" follows="left|top|right|bottom" @@ -72,11 +72,11 @@ follows="left|top|right" height="20" layout="topleft" - left_pad="0" + left_pad="5" max_length_bytes="63" name="region name" top_delta="0" - width="250"> + width="294"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -233,13 +233,13 @@ border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" - left_delta="108" + left_delta="90" max_length_bytes="10" name="estate" top_delta="0" - width="50" /> + width="100" /> <text type="string" length="1" @@ -249,7 +249,7 @@ layout="topleft" left="200" name="parent id" - top_pad="4" + top_pad="7" width="190"> Parent ID: </text> @@ -257,14 +257,14 @@ border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" - left_delta="108" + left_delta="90" max_length_bytes="10" name="parentestate" tool_tip="This is the parent estate for this region" top_delta="0" - width="50"> + width="100"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -276,22 +276,22 @@ layout="topleft" left="200" name="Grid Pos: " - top_pad="4" - width="190"> + top_pad="7" + width="90"> Grid Pos: </text> <line_editor border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" - left_delta="88" + left_pad="0" max_length_bytes="10" name="gridposx" tool_tip="This is the grid x position for this region" top_delta="0" - width="50"> + width="46"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -299,14 +299,14 @@ border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" - left_pad="10" + left_pad="8" max_length_bytes="10" name="gridposy" tool_tip="This is the grid y position for this region" top_delta="0" - width="40"> + width="46"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -318,20 +318,20 @@ layout="topleft" left="200" name="Redirect to Grid: " - top_pad="4" - width="88"> + top_pad="7" + width="90"> Redirect to Grid: </text> <line_editor border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" left_pad="0" max_length_bytes="10" name="redirectx" - width="50"> + width="46"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -339,13 +339,13 @@ border_style="line" border_thickness="1" follows="top|right" - height="16" + height="18" layout="topleft" - left_pad="10" + left_pad="8" max_length_bytes="10" name="redirecty" top_delta="0" - width="40"> + width="46"> <line_editor.commit_callback function="RegionTools.ChangeAnything" /> </line_editor> @@ -407,10 +407,10 @@ label="Refresh" label_selected="Refresh" layout="topleft" - left="278" + left="280" name="Refresh" tool_tip="Click here to refresh the above information" - top_pad="10" + top_pad="14" width="110"> <button.commit_callback function="RegionTools.Refresh" /> @@ -526,7 +526,7 @@ height="16" label="Disable Physics" layout="topleft" - left_delta="120" + left_delta="136" name="disable physics" tool_tip="Set this to disable all physics in this region" top_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml index a51e7a844a..5dd3dfa2bf 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml @@ -27,7 +27,6 @@ left_pad="12" top_delta="2" name="multi_folder_txt" - font="SansSerifMedium" text_color="White" width="300"> Double-click on folder in multi-folder view: @@ -37,7 +36,6 @@ follows="left|top" top_pad="8" layout="topleft" - font="SansSerifMedium" left="60" width="300" height="66" @@ -90,7 +88,6 @@ left_pad="12" top_delta="2" name="single_folder_txt" - font="SansSerifMedium" text_color="White" width="300"> Double-click on folder in single-folder view: @@ -100,7 +97,6 @@ follows="left|top" top_pad="8" layout="topleft" - font="SansSerifMedium" left="60" width="300" height="44" @@ -142,10 +138,9 @@ layout="topleft" left_pad="13" name="find_original_txt" - font="SansSerifMedium" text_color="White" top_delta="1" - width="300"> + width="310"> Clicking on "Show in inventory" or "Find original" </text> <radio_group @@ -153,7 +148,6 @@ follows="left|top" top_pad="8" layout="topleft" - font="SansSerifMedium" left="60" width="300" height="44" @@ -196,7 +190,6 @@ left_pad="12" top_delta="2" name="favorites_txt" - font="SansSerifMedium" text_color="White" width="300"> Favorites @@ -206,7 +199,6 @@ layout="topleft" follows="left|top" top_pad="8" - font="SansSerifMedium" left="60" width="300" height="18" @@ -219,7 +211,6 @@ follows="left|top" top_pad="5" layout="topleft" - font="SansSerifMedium" left="60" width="150" height="18" @@ -232,7 +223,6 @@ follows="left|top" top_pad="5" layout="topleft" - font="SansSerifMedium" left="60" width="150" height="18" @@ -276,7 +266,6 @@ left_pad="12" top_delta="2" name="single_folder_txt" - font="SansSerifMedium" text_color="White" width="300"> Pressing enter on an avatar attachment diff --git a/indra/newview/skins/default/xui/en/floater_live_material_editor.xml b/indra/newview/skins/default/xui/en/floater_live_material_editor.xml index fbd3c81bad..67831c2449 100644 --- a/indra/newview/skins/default/xui/en/floater_live_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_material_editor.xml @@ -4,9 +4,9 @@ can_resize="true" default_tab_group="1" height="790" - width="256" + width="267" min_height="500" - min_width="256" + min_width="267" layout="topleft" name="material editor" help_topic="material_editor" @@ -17,7 +17,7 @@ top="18" left="4" height="768" - width="250" + width="261" follows="all" layout="topleft" color="Transparent" diff --git a/indra/newview/skins/default/xui/en/floater_material_editor.xml b/indra/newview/skins/default/xui/en/floater_material_editor.xml index 21ceeafeea..f894e94622 100644 --- a/indra/newview/skins/default/xui/en/floater_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml @@ -4,9 +4,9 @@ can_resize="true" default_tab_group="1" height="891" - width="256" + width="267" min_height="500" - min_width="256" + min_width="267" layout="topleft" name="material editor" help_topic="material_editor" @@ -20,7 +20,7 @@ top="18" left="4" height="768" - width="250" + width="261" follows="all" layout="topleft" color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 39e9de0980..fb828b804a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -1407,7 +1407,7 @@ follows="top|left" height="15" layout="topleft" - left="220" + left="240" name="pelvis_offset_label" text_color="White" top="8" @@ -1421,12 +1421,13 @@ max_val="3.0" name="pelvis_offset" top_pad="10" + left="340" value="0.0" width="80"/> <text follows="top|left" height="17" - left="425" + left="435" name="skin_too_many_joints" text_color="Orange" top="7" @@ -1437,7 +1438,7 @@ <text follows="top|left" height="32" - left="425" + left="435" name="skin_unknown_joint" text_color="Orange" top="8" @@ -1879,7 +1880,7 @@ Analysed: top="5" left_pad="20" name="label_display" - width="50"> + width="53"> Display... </text> <check_box @@ -1889,7 +1890,7 @@ Analysed: layout="topleft" left_delta="0" name="show_edges" - top_pad="8"> + top_pad="10"> </check_box> <check_box follows="top|left" @@ -1897,7 +1898,7 @@ Analysed: label_text.text_color="White" layout="topleft" name="show_physics" - top_pad="8"> + top_pad="10"> </check_box> <check_box follows="top|left" @@ -1905,7 +1906,7 @@ Analysed: label_text.text_color="White" layout="topleft" name="show_textures" - top_pad="8"> + top_pad="10"> </check_box> <check_box follows="top|left" @@ -1913,7 +1914,7 @@ Analysed: label_text.text_color="White" layout="topleft" name="show_skin_weight" - top_pad="8"> + top_pad="10"> </check_box> <check_box follows="top|left" @@ -1923,7 +1924,7 @@ Analysed: width="130" layout="topleft" name="show_joint_overrides" - top_pad="8"> + top_pad="10"> </check_box> <check_box follows="top|left" @@ -1931,7 +1932,7 @@ Analysed: label_text.text_color="White" layout="topleft" name="show_joint_positions" - top_pad="17"> + top_pad="21"> </check_box> <text follows="top|left" diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml index dd0795305e..10e74e9a31 100644 --- a/indra/newview/skins/default/xui/en/floater_my_environments.xml +++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml @@ -41,6 +41,7 @@ mouse_opaque="true" name="icon_settingsdays" left="4" + top="9" width="16" /> <check_box height="16" @@ -48,7 +49,7 @@ layout="topleft" left_pad="2" name="chk_days" - top_delta="0" + top_delta="2" width="60" /> <icon height="16" @@ -57,6 +58,7 @@ mouse_opaque="true" name="icon_settingsskies" left_pad="10" + top="9" width="16" /> <check_box height="16" @@ -64,7 +66,7 @@ layout="topleft" left_pad="2" name="chk_skies" - top_delta="0" + top_delta="2" width="60" /> <icon height="16" @@ -73,6 +75,7 @@ mouse_opaque="true" name="icon_settingswater" left_pad="10" + top="9" width="16" /> <check_box height="16" @@ -80,7 +83,7 @@ layout="topleft" left_pad="2" name="chk_water" - top_delta="0" + top_delta="2" width="60" /> <filter_editor follows="left|top|right" @@ -89,7 +92,7 @@ layout="topleft" left="4" name="flt_search" - top_pad="6" + top_pad="4" right="-4" /> </layout_panel> <layout_panel diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml index 881c1f7469..def57abfe4 100644 --- a/indra/newview/skins/default/xui/en/floater_my_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml @@ -12,7 +12,7 @@ save_visibility="true" reuse_instance="true" title="INVENTORY" - width="418" > + width="424" > <panel class="sidepanel_inventory" name="main_panel" diff --git a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml index 9981e5d893..66c229e698 100644 --- a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml +++ b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater - height="130" + height="140" width="300" layout="topleft" name="floater_new_feature_notification" @@ -40,7 +40,7 @@ New feature text_color="White" layout="topleft" left="10" - height="40" + height="50" top_pad="14" right="-10" word_wrap="true" diff --git a/indra/newview/skins/default/xui/en/floater_performance.xml b/indra/newview/skins/default/xui/en/floater_performance.xml index dac8a71b2d..5fb9eeb2de 100644 --- a/indra/newview/skins/default/xui/en/floater_performance.xml +++ b/indra/newview/skins/default/xui/en/floater_performance.xml @@ -65,10 +65,10 @@ text_color="White" height="20" layout="topleft" - left="395" + left="392" top="7" name="fps_desc1_lbl" - width="150"> + width="153"> Allow 5-10 seconds for </text> <text @@ -78,7 +78,7 @@ layout="topleft" top_pad="-3" name="fps_desc2_lbl" - width="150"> + width="153"> changes to take full effect. </text> </panel> @@ -265,7 +265,7 @@ left="10" name="complexity_info" top_pad="0" - width="455"> + width="490"> Reduce the complexity of your avatar if you aren't satisfied with current FPS. </text> <icon diff --git a/indra/newview/skins/default/xui/en/floater_post_process.xml b/indra/newview/skins/default/xui/en/floater_post_process.xml deleted file mode 100644 index 37339f79c8..0000000000 --- a/indra/newview/skins/default/xui/en/floater_post_process.xml +++ /dev/null @@ -1,426 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - legacy_header_height="18" - height="400" - layout="topleft" - name="Post-Process Floater" - help_topic="post_process_floater" - title="POST-PROCESS SETTINGS" - width="400"> - <tab_container - follows="left|top" - height="400" - layout="topleft" - left="0" - name="Post-Process Tabs" - tab_position="top" - top="0" - width="400"> - <panel - border="true" - follows="left|top|right|bottom" - height="400" - label="Color Filter" - layout="topleft" - left="1" - mouse_opaque="false" - help_topic="post_process_color_filter_tab" - name="wmiColorFilterPanel" - top="0" - width="398"> - <check_box - control_name="wmiColorFilterToggle" - height="16" - label="Enable" - layout="topleft" - left="14" - name="wmiColorFilterToggle" - top="4" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiColorFilterBrightnessText" - top_pad="4" - width="355"> - Brightness - </text> - <slider - control_name="wmiColorFilterBrightness" - decimal_digits="2" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - layout="topleft" - left_delta="4" - max_val="4" - name="wmiColorFilterBrightness" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiColorFilterSaturationText" - top_pad="4" - width="355"> - Saturation - </text> - <slider - control_name="wmiColorFilterSaturation" - decimal_digits="2" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - layout="topleft" - left_delta="4" - max_val="2" - min_val="-1" - name="wmiColorFilterSaturation" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiColorFilterContrastText" - top_pad="4" - width="355"> - Contrast - </text> - <slider - control_name="wmiColorFilterContrast" - decimal_digits="2" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - layout="topleft" - left_delta="4" - max_val="4" - name="wmiColorFilterContrast" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiColorFilterBaseText" - top_pad="4" - width="355"> - Contrast Base Color - </text> - <slider - control_name="wmiColorFilterBaseR" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - label="R" - layout="topleft" - left_delta="4" - name="wmiColorFilterBaseR" - top_pad="20" - width="200" /> - <slider - control_name="wmiColorFilterBaseG" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - label="G" - layout="topleft" - left_delta="0" - name="wmiColorFilterBaseG" - top_pad="10" - width="200" /> - <slider - control_name="wmiColorFilterBaseB" - follows="left" - height="10" - increment="0.01" - initial_value="1.0" - label="B" - layout="topleft" - left_delta="0" - name="wmiColorFilterBaseB" - top_pad="10" - width="200" /> - <slider - control_name="wmiColorFilterBaseI" - follows="left" - height="10" - increment="0.01" - initial_value="0.5" - label="I" - layout="topleft" - left_delta="0" - name="wmiColorFilterBaseI" - top_pad="10" - width="200" /> - </panel> - <panel - border="true" - follows="left|top|right|bottom" - height="400" - label="Night Vision" - layout="topleft" - left_delta="0" - mouse_opaque="false" - help_topic="post_process_night_vision_tab" - name="wmiNightVisionPanel" - top_delta="-236" - width="398"> - <check_box - control_name="wmiNightVisionToggle" - height="16" - label="Enable" - layout="topleft" - left="14" - name="wmiNightVisionToggle" - top="4" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiNightVisionBrightMultText" - top_pad="5" - width="355"> - Light Amplification Multiple - </text> - <slider - control_name="wmiNightVisionBrightMult" - follows="left" - height="10" - increment="0.01" - initial_value="3.0" - layout="topleft" - left_delta="4" - max_val="10" - min_val="1" - name="wmiNightVisionBrightMult" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiNightVisionNoiseSizeText" - top_pad="4" - width="355"> - Noise Size - </text> - <slider - control_name="wmiNightVisionNoiseSize" - follows="left" - height="10" - initial_value="1" - layout="topleft" - left_delta="4" - max_val="100" - min_val="1" - name="wmiNightVisionNoiseSize" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiNightVisionNoiseStrengthText" - top_pad="4" - width="355"> - Noise Strength - </text> - <slider - control_name="wmiNightVisionNoiseStrength" - follows="left" - height="10" - increment="0.01" - initial_value="0.3" - layout="topleft" - left_delta="4" - name="wmiNightVisionNoiseStrength" - top_pad="20" - width="200" /> - </panel> - <panel - border="true" - follows="left|top|right|bottom" - height="400" - label="Bloom" - layout="topleft" - left_delta="0" - help_topic="post_process_bloom_tab" - name="wmiBloomPanel" - top_delta="-236" - width="398"> - <check_box - control_name="wmiBloomToggle" - height="16" - label="Enable" - layout="topleft" - left="14" - name="wmiBloomToggle" - top="4" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiBloomExtractText" - top_pad="5" - width="355"> - Luminosity Extraction - </text> - <slider - control_name="wmiBloomExtract" - follows="left" - height="10" - increment="0.01" - initial_value="0.9" - layout="topleft" - left_delta="4" - name="wmiBloomExtract" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiBloomSizeText" - top_pad="4" - width="355"> - Bloom Size - </text> - <slider - control_name="wmiBloomSize" - follows="left" - height="10" - increment="0.01" - initial_value="3.0" - layout="topleft" - left_delta="4" - max_val="20" - name="wmiBloomSize" - top_pad="20" - width="200" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerif" - height="16" - layout="topleft" - left_delta="-4" - name="wmiBloomStrengthText" - top_pad="4" - width="355"> - Bloom Strength - </text> - <slider - control_name="wmiBloomStrength" - follows="left" - height="10" - increment="0.01" - initial_value="1.2" - layout="topleft" - left_delta="4" - max_val="10" - name="wmiBloomStrength" - top_pad="20" - width="200" /> - </panel> - <panel - border="true" - follows="left|top|right|bottom" - height="400" - label="Extras" - layout="topleft" - left_delta="0" - mouse_opaque="false" - help_topic="post_process_extras_tab" - name="Extras" - top_delta="-236" - width="398"> - <button - height="20" - label="LoadEffect" - label_selected="LoadEffect" - layout="topleft" - left="15" - name="PPLoadEffect" - top="13" - width="100" /> - <button - height="20" - label="SaveEffect" - label_selected="SaveEffect" - layout="topleft" - left_delta="0" - name="PPSaveEffect" - top_pad="7" - width="100" /> - <combo_box - height="18" - layout="topleft" - left_delta="120" - name="PPEffectsCombo" - top="15" - width="150" /> - <line_editor - border_style="line" - border_thickness="1" - follows="left|right|bottom" - font="SansSerif" - height="20" - label="Effect Name" - layout="topleft" - left_delta="0" - max_length_bytes="40" - name="PPEffectNameEditor" - tab_group="1" - top_pad="22" - width="150" /> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 97ff1fd5a2..af3403d034 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -82,8 +82,8 @@ name="pref core" tab_group="1" tab_position="left" - tab_width="140" - tab_padding_right="0" + tab_width="136" + tab_padding_right="4" top="40" width="658"> <panel diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 0e37472990..3bb1a9f1e2 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -672,7 +672,7 @@ increment="8" initial_value="160" label="Sky:" - label_width="145" + label_width="164" layout="topleft" left="420" min_val="16" @@ -758,7 +758,7 @@ control_name="RenderShadowDetail" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="ShadowDetail" width="150"> @@ -812,7 +812,7 @@ control_name="RenderReflectionProbeDetail" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="ReflectionDetail" width="150"> @@ -848,7 +848,7 @@ control_name="RenderReflectionProbeLevel" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="ReflectionLevel" width="150"> @@ -880,7 +880,7 @@ name="ReflectionProbeCount" text_readonly_color="LabelDisabledColor" top_delta="22" - width="128"> + width="130"> Max Reflection Probes: </text> @@ -889,7 +889,7 @@ height="18" layout="topleft" label="Max. Reflection Probes:" - left_delta="130" + left_delta="175" top_delta="0" name="ProbeCount" width="150"> @@ -923,7 +923,7 @@ increment="0.1" initial_value="160" label="Exposure:" - label_width="145" + label_width="164" layout="topleft" left="420" min_val="0.5" @@ -967,7 +967,7 @@ control_name="RenderHeroProbeResolution" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="MirrorResolution" width="150"> @@ -1007,7 +1007,7 @@ control_name="RenderHeroProbeUpdateRate" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="HeroProbeUpdateRate" width="150"> @@ -1038,7 +1038,7 @@ increment="0.1" initial_value="160" label="Sharpening:" - label_width="145" + label_width="164" layout="topleft" left="420" min_val="0.0" @@ -1067,7 +1067,7 @@ control_name="RenderTonemapType" height="18" layout="topleft" - left_delta="130" + left_delta="175" top_delta="0" name="TonemapType" width="150"> @@ -1089,7 +1089,7 @@ initial_value="1" label="Tone Mapping Mix:" tool_tip="Mix between linear and tone mapped colors" - label_width="145" + label_width="164" layout="topleft" left="420" min_val="0.0" diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml deleted file mode 100644 index dec0e9b6c6..0000000000 --- a/indra/newview/skins/default/xui/en/floater_sound_devices.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - border_visible="false" - border="false" - legacy_header_height="18" - can_minimize="true" - can_resize="false" - can_close="false" - chrome="true" - save_dock_state="true" - save_visibility="true" - save_rect="true" - single_instance="true" - bevel_style="in" - height="164" - layout="topleft" - name="floater_sound_devices" - title="SOUND DEVICES" - width="490"> - <panel - layout="topleft" - follows="all" - filename="panel_sound_devices.xml" - name="device_settings_panel" - width="400" - left="10" - top="26" - class="panel_voice_device_settings"/> - <text - name="voice_label" - top="136" - left="12" - height="14" - width="80" - layout="topleft" - >Voice Chat</text> - <check_box - layout="topleft" - control_name="EnableVoiceChat" - follows="bottom|left" - top="138" - left="80" - name="enable_voice" - width="100" - height="14" - label="Enabled" - /> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index 1600c422c3..191db4f854 100644 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -418,6 +418,64 @@ </stat_view> </stat_view> </stat_view> + <stat_view name="voice" + label="Voice" + setting="OpenDebugStatVoice"> + <stat_bar + name="webrtc_latency" + label="Latency" + stat="webrtc_latency" + unit_label="ms" + decimal_digits="1"/> + <stat_bar + name="webrtc_upload_bandwidth" + label="Upload bandwidth" + stat="webrtc_upload_bandwidth" + unit_label="kbps" + decimal_digits="0"/> + <stat_view name="incoming_audio" + label="Incoming audio" + setting="OpenDebugStatVoiceIncoming"> + <stat_bar + name="incoming_packet_recv" + label="Packets received" + stat="webrtc_packets_in_recv"/> + <stat_bar + name="packets_in_lost" + label="Packets lost" + stat="webrtc_packets_in_lost"/> + <stat_bar + name="jitter_in" + label="Jitter" + stat="webrtc_jitter_in" + unit_label="ms" + decimal_digits="1"/> + <stat_bar + name="jitter_buffer" + label="Jitter buffer" + stat="webrtc_jitter_buffer" + unit_label="ms" + decimal_digits="1"/> + </stat_view> + <stat_view name="outgoing_audio" + label="Outgoing audio" + setting="OpenDebugStatVoiceOutgoing"> + <stat_bar + name="packets_out_sent" + label="Packets sent" + stat="webrtc_packets_out_sent"/> + <stat_bar + name="packets_out_lost" + label="Packets lost" + stat="webrtc_packets_out_lost"/> + <stat_bar + name="jitter_out" + label="Jitter" + stat="webrtc_jitter_out" + unit_label="ms" + decimal_digits="1"/> + </stat_view> + </stat_view> </container_view> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml index 9d4fb82ec6..7108005f00 100644 --- a/indra/newview/skins/default/xui/en/floater_telehub.xml +++ b/indra/newview/skins/default/xui/en/floater_telehub.xml @@ -2,7 +2,7 @@ <!-- Explicit left edge to avoid overlapping build tools --> <floater legacy_header_height="18" - height="250" + height="260" layout="topleft" name="telehub" help_topic="telehub" diff --git a/indra/newview/skins/default/xui/en/floater_test_combobox.xml b/indra/newview/skins/default/xui/en/floater_test_combobox.xml index 4211d624ac..0d75685223 100644 --- a/indra/newview/skins/default/xui/en/floater_test_combobox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_combobox.xml @@ -155,4 +155,36 @@ name="item3" value="tx" /> </combo_box> + <text + type="string" + length="1" + height="16" + layout="topleft" + left_delta="0" + top_pad="24" + width="200"> + Multiple columns: + </text> + <combo_box + name="multi_column_combo" + layout="topleft" + height="20" + width="150" + left_delta="0" + top_pad="4"> + <combo_item name="combo_item1" value="0"> + <column width="40" name="label" label="|Abc|" /> + <column name="longtext" label="Match full text" /> + </combo_item> + + <combo_item name="combo_item2" value="1"> + <column name="label" label="*Abc*" /> + <column name="longtext" label="Match substring" /> + </combo_item> + + <combo_item name="combo_item3" value="2"> + <column name="label" label="/ *. /" /> + <column name="longtext" label="Match regular expression" /> + </combo_item> + </combo_box> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_test_slapp.xml b/indra/newview/skins/default/xui/en/floater_test_slapp.xml index 5a13a0147e..35f5961285 100644 --- a/indra/newview/skins/default/xui/en/floater_test_slapp.xml +++ b/indra/newview/skins/default/xui/en/floater_test_slapp.xml @@ -17,7 +17,6 @@ follows="left|top|right" height="16" name="trusted_txt" - font="SansSerifMedium" text_color="white" layout="topleft" left="16"> diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml index 023df69f0f..e736fc58b2 100644 --- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml @@ -99,7 +99,7 @@ font.name="SansSerifSmall" name="test_text10" tool_tip="text"> - SansSerifSmall + SansSerif The 华文细黑 brown fox ヒラキjumped over the lazy dog. </text> <text @@ -111,7 +111,7 @@ font.name="SansSerifMedium" name="test_text11" tool_tip="text"> - SansSerif + SansSerifMedium The 华文细黑 brown fox ヒラキjumped over the lazy dog. </text> <text diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index dba323a9e1..e4dab5b7ac 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -84,11 +84,14 @@ left="10" name="button focus" tool_tip="Focus" - width="35"> - <button.commit_callback - function="BuildTool.setTool" - parameter="Focus" /> - </button> + width="35" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> + <button.commit_callback + function="BuildTool.setTool" + parameter="Focus" /> + </button> <button follows="left|top" height="25" @@ -99,7 +102,10 @@ left_pad="10" name="button move" tool_tip="Move" - width="35"> + width="35" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.setTool" parameter="Move" /> @@ -114,7 +120,10 @@ left_pad="10" name="button edit" tool_tip="Edit" - width="35"> + width="35" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.setTool" parameter="Edit" /> @@ -129,7 +138,10 @@ left_pad="10" name="button create" tool_tip="Create" - width="35"> + width="35" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.setTool" parameter="Create" /> @@ -144,7 +156,10 @@ left_pad="10" name="button land" tool_tip="Land" - width="35"> + width="35" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.setTool" parameter="Land" /> @@ -161,15 +176,19 @@ left="8" name="text status" top_pad="3" - width="285"> + width="285" + font="DejaVu" + font.size="LSmall"> Drag to move, shift-drag to copy </text> <radio_group layout="topleft" left="10" - height="70" - top="59" - name="focus_radio_group"> + height="70" + top="59" + name="focus_radio_group" + font="DejaVu" + font.size="LSmall" > <radio_item top_pad="6" label="Zoom" @@ -198,16 +217,20 @@ top_delta="-2" left_delta="100" name="slider zoom" - width="134"> + width="134" + font="DejaVu" + font.size="LSmall"> <slider_bar.commit_callback function="BuildTool.commitZoom"/> </slider_bar> <radio_group - left="10" - height="70" - top="59" + left="10" + height="70" + top="59" layout="topleft" - name="move_radio_group"> + name="move_radio_group" + font="DejaVu" + font.size="LSmall" > <radio_item top_pad="6" label="Move" @@ -232,7 +255,9 @@ top="55" height="70" layout="topleft" - name="edit_radio_group"> + name="edit_radio_group" + font="DejaVu" + font.size="LSmall" > <radio_item label="Move" layout="topleft" @@ -263,7 +288,9 @@ label="Edit linked" layout="topleft" name="checkbox edit linked parts" - top_pad="-18"> + top_pad="-18" + font="DejaVu" + font.size="LSmall"> <check_box.commit_callback function="BuildTool.selectComponent"/> </check_box> @@ -276,7 +303,10 @@ layout="topleft" left="143" name="link_btn" - width="50"> + width="50" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.LinkObjects"/> </button> @@ -287,7 +317,10 @@ layout="topleft" left_pad="2" name="unlink_btn" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" + pad_bottom="1"> <button.commit_callback function="BuildTool.UnlinkObjects"/> </button> @@ -298,10 +331,12 @@ layout="topleft" left="143" name="checkbox uniform" - top="48" + top="47" label_text.wrap="true" label_text.width="100" - width="134" /> + width="134" + font="DejaVu" + font.size="LSmall" /> <check_box control_name="ScaleStretchTextures" height="19" @@ -310,18 +345,22 @@ layout="topleft" left="143" name="checkbox stretch textures" - top_pad="-4" + top_pad="-2" follows="left|top" - width="134" /> + width="134" + font="DejaVu" + font.size="LSmall" /> <check_box control_name="SnapEnabled" height="18" initial_value="true" label="Snap" layout="topleft" - top_pad="0" + top_pad="-1" name="checkbox snap to grid" - width="134" /> + width="134" + font="DejaVu" + font.size="LSmall"/> <combo_box height="20" layout="topleft" @@ -331,7 +370,9 @@ top="83" left="195" top_pad="0" - width="60"> + width="60" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall"> <combo_box.item label="World" name="World" @@ -577,7 +618,7 @@ layout="topleft" left_delta="0" name="checkbox copy selection" - top_delta="15" + top_delta="17" width="134" /> <check_box control_name="CreateToolCopyCenters" @@ -587,7 +628,7 @@ layout="topleft" left_delta="18" name="checkbox copy centers" - top="85" + top="92" width="134" /> <check_box control_name="CreateToolCopyRotates" @@ -596,7 +637,7 @@ layout="topleft" left_delta="0" name="checkbox copy rotates" - top_delta="16" + top_delta="17" width="134" /> <radio_group height="105" @@ -604,7 +645,9 @@ left="4" name="land_radio_group" top="54" - width="114"> + width="114" + font="DejaVu" + font.size="LSmall" > <radio_item height="19" label="Select Land" @@ -746,7 +789,8 @@ length="1" height="16" follows="left|top" - font="SansSerifSmall" + font="DejaVu" + font.size="LSmall" layout="topleft" left="10" name="selection_empty" @@ -760,7 +804,8 @@ length="1" height="16" follows="left|top" - font="SansSerifSmall" + font="DejaVu" + font.size="LSmall" layout="topleft" left="10" name="selection_faces" @@ -775,7 +820,8 @@ length="1" height="16" follows="left|top" - font="SansSerifSmall" + font="DejaVu" + font.size="LSmall" layout="topleft" left="10" name="selection_count" @@ -830,7 +876,9 @@ tab_height="25" open_tabs_on_drag_and_drop="true" top="173" - width="295"> + width="295" + font="DejaVu" + font.size="LSmall"> <panel border="false" @@ -904,7 +952,9 @@ left="10" name="Name:" top="5" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall"> Name: </text> <line_editor @@ -923,7 +973,9 @@ left="10" name="Description:" top_pad="3" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall"> Description: </text> <line_editor @@ -945,7 +997,9 @@ layout="topleft" name="Creator:" top_pad="7" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall"> Creator: </text> <avatar_icon @@ -967,7 +1021,6 @@ height="29" layout="topleft" name="Creator Name" - font="SansSerifSmall" top_delta="-1" translate="false" width="170" @@ -984,7 +1037,9 @@ layout="topleft" name="Owner:" top_pad="3" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall"> Owner: </text> <avatar_icon @@ -1015,7 +1070,8 @@ height="29" layout="topleft" name="Owner Name" - font="SansSerifSmall" + font="DejaVu" + font.size="LSmall" left_pad="1" top_delta="-1" translate="false" @@ -1033,7 +1089,9 @@ height="18" name="Group:" top_pad="3" - width="75"> + width="75" + font="DejaVu" + font.size="LSmall"> Group: </text> <name_box @@ -1053,7 +1111,10 @@ name="button set group" tab_stop="false" tool_tip="Choose a group to share this object's permissions" - width="23" /> + width="23" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <check_box height="19" follows="left|top" @@ -1063,7 +1124,9 @@ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions." top_pad="5" left="100" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <button follows="top|left" height="23" @@ -1073,7 +1136,10 @@ name="button deed" left_pad="19" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer." - width="80" /> + width="80" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <text type="string" length="1" @@ -1083,7 +1149,9 @@ top_pad="10" left="10" name="label click action" - width="82"> + width="82" + font="DejaVu" + font.size="LSmall" > Click to: </text> <combo_box @@ -1093,7 +1161,9 @@ name="clickaction" width="130" left_pad="10" - tool_tip="A click action enables you to interact with an object with a single left click. Each click action has a special cursor indicating what it does. Some click actions have requirements to function. For example Touch and Pay require scripts" > + tool_tip="A click action enables you to interact with an object with a single left click. Each click action has a special cursor indicating what it does. Some click actions have requirements to function. For example Touch and Pay require scripts" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Touch (default)" name="Touch/grab(default)" @@ -1134,7 +1204,9 @@ name="checkbox for sale" left="7" width="97" - tool_tip="Lets people buy this object, its content or it copy inworld for specified price." /> + tool_tip="Lets people buy this object, its content or it copy inworld for specified price." + font="DejaVu" + font.size="LSmall" /> <!-- NEW PRICE SPINNER Objects are allowed to be for sale for L$0 to invoke buy UI behavior even though the user gets a free copy. @@ -1152,7 +1224,9 @@ even though the user gets a free copy. min_val="0" height="20" max_val="999999999" - tool_tip="Object cost." /> + tool_tip="Object cost." + font="DejaVu" + font.size="LSmall" /> <!-- NEW SALE TYPE COMBO BOX --> <combo_box left_pad="8" @@ -1166,7 +1240,9 @@ even though the user gets a free copy. mouse_opaque="true" name="sale type" width="89" - tool_tip="Select whether purchaser will receive a copy, copy of the content or item itself." > + tool_tip="Select whether purchaser will receive a copy, copy of the content or item itself." + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item name="Copy" label="Copy" @@ -1188,7 +1264,9 @@ even though the user gets a free copy. layout="topleft" left="7" name="search_check" - tool_tip="Let people see this object in search results" /> + tool_tip="Let people see this object in search results" + font="DejaVu" + font.size="LSmall" /> <panel border="false" follows="left|top" @@ -1212,7 +1290,9 @@ even though the user gets a free copy. follows="left|top|right" layout="topleft" name="perm_modify" - width="264"> + width="264" + font="DejaVu" + font.size="LSmall" > You can modify this object </text> <text @@ -1220,7 +1300,9 @@ even though the user gets a free copy. follows="left|top" name="Anyone can:" width="250" - left="10"> + left="10" + font="DejaVu" + font.size="LSmall" > Anyone: </text> <check_box @@ -1230,7 +1312,9 @@ even though the user gets a free copy. name="checkbox allow everyone move" tool_tip="Anyone can move the object." left="10" - width="85" /> + width="85" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Copy" @@ -1238,14 +1322,18 @@ even though the user gets a free copy. left_pad="0" name="checkbox allow everyone copy" tool_tip="Anyone can take a copy of the object. Object and all of its contents must be copy and transfer permissive." - width="90" /> + width="90" + font="DejaVu" + font.size="LSmall" /> <text type="string" follows="left|top" height="19" name="Next owner can:" width="250" - left="10"> + left="10" + font="DejaVu" + font.size="LSmall" > Next owner: </text> <check_box @@ -1256,7 +1344,9 @@ even though the user gets a free copy. height="10" name="checkbox next owner can modify" tool_tip="Next owner can edit properties like item name or scale of this object." - width="85" /> + width="85" + font="DejaVu" + font.size="LSmall" /> <check_box follows="left|top|right" height="19" @@ -1265,7 +1355,9 @@ even though the user gets a free copy. left_pad="0" name="checkbox next owner can copy" tool_tip="Next owner can make unlimited copies of this object. Copies maintain creator information, and can never be more permissive than the item being copied." - width="80" /> + width="80" + font="DejaVu" + font.size="LSmall" /> <check_box follows="left|top|right" height="19" @@ -1275,7 +1367,9 @@ even though the user gets a free copy. left_pad="0" top_delta="0" tool_tip="Next owner can give away or resell this object." - width="100" /> + width="100" + font="DejaVu" + font.size="LSmall" /> <!-- *NOTE: These "B/O/G/E/N/F fields may overlap "perm_modify" above, but that's OK, this is used only for debugging. --> <text @@ -1288,7 +1382,9 @@ even though the user gets a free copy. left="230" name="B:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > B: </text> <text @@ -1301,7 +1397,9 @@ even though the user gets a free copy. top_pad="2" name="O:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > O: </text> <text @@ -1314,7 +1412,9 @@ even though the user gets a free copy. top_pad="2" name="G:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > G: </text> <text @@ -1327,7 +1427,9 @@ even though the user gets a free copy. layout="topleft" name="E:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > E: </text> <text @@ -1340,7 +1442,9 @@ even though the user gets a free copy. top_pad="2" name="N:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > N: </text> <text @@ -1353,7 +1457,9 @@ even though the user gets a free copy. top_pad="2" name="F:" height="10" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > F: </text> </panel> @@ -1373,7 +1479,9 @@ even though the user gets a free copy. name="pathfinding_attributes_label" top_pad="4" width="150" - left="10"> + left="10" + font="DejaVu" + font.size="LSmall" > Pathfinding attributes: </text> <text @@ -1383,7 +1491,9 @@ even though the user gets a free copy. name="pathfinding_attributes_value" width="130" word_wrap="false" - left_pad="0"> + left_pad="0" + font="DejaVu" + font.size="LSmall" > </text> </panel> </panel> @@ -1408,7 +1518,9 @@ even though the user gets a free copy. tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits." top_pad="5" left="10" - width="123" /> + width="123" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Physical" @@ -1416,7 +1528,9 @@ even though the user gets a free copy. name="Physical Checkbox Ctrl" tool_tip="Allows object to be pushed and affected by gravity" top_pad="0" - width="123" /> + width="123" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Temporary" @@ -1424,7 +1538,9 @@ even though the user gets a free copy. name="Temporary Checkbox Ctrl" tool_tip="Causes object to be deleted 1 minute after creation" top_pad="0" - width="123" /> + width="123" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Phantom" @@ -1432,7 +1548,9 @@ even though the user gets a free copy. name="Phantom Checkbox Ctrl" tool_tip="Causes object to not collide with other objects or avatars" top_pad="0" - width="123" /> + width="123" + font="DejaVu" + font.size="LSmall" /> <view_border bevel_style="none" follows="top|left" @@ -1441,7 +1559,9 @@ even though the user gets a free copy. left_delta="0" name="object_horizontal" top_pad="10" - width="95" /> + width="95" + font="DejaVu" + font.size="LSmall" /> <menu_button menu_filename="menu_copy_paste_pos.xml" follows="top|left" @@ -1465,7 +1585,9 @@ even though the user gets a free copy. tool_tip="Position (meters)" left_pad="8" top_delta="0" - width="121"> + width="121" + font="DejaVu" + font.size="LSmall" > Position (m) </text> <spinner @@ -1482,7 +1604,9 @@ even though the user gets a free copy. name="Pos X" text_enabled_color="1 0 0.3 .7" top_pad="8" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1497,7 +1621,9 @@ even though the user gets a free copy. name="Pos Y" text_enabled_color="EmphasisColor" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1512,7 +1638,9 @@ even though the user gets a free copy. name="Pos Z" text_enabled_color="0 0.8 1 .65" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <menu_button menu_filename="menu_copy_paste_size.xml" follows="top|left" @@ -1525,7 +1653,7 @@ even though the user gets a free copy. top_pad="13" name="clipboard_size_btn" tool_tip="Paste options" - width="19"/> + width="19" /> <text type="string" length="1" @@ -1536,7 +1664,9 @@ even though the user gets a free copy. top_delta="0" name="label size" tool_tip="Size (meters)" - width="121"> + width="121" + font="DejaVu" + font.size="LSmall" > Size (m) </text> <spinner @@ -1553,7 +1683,9 @@ even though the user gets a free copy. name="Scale X" text_enabled_color="1 1 1 1" top_pad="8" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1568,7 +1700,9 @@ even though the user gets a free copy. name="Scale Y" text_enabled_color="1 1 1 1" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1583,7 +1717,9 @@ even though the user gets a free copy. name="Scale Z" text_enabled_color="1 1 1 1" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <menu_button menu_filename="menu_copy_paste_rot.xml" follows="top|left" @@ -1607,7 +1743,9 @@ even though the user gets a free copy. top_delta="0" name="label rotation" tool_tip="Rotation (degrees)" - width="121"> + width="121" + font="DejaVu" + font.size="LSmall" > Rotation (°) </text> <spinner @@ -1625,7 +1763,9 @@ even though the user gets a free copy. name="Rot X" text_enabled_color="1 1 1 1" top_pad="8" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -1641,7 +1781,9 @@ even though the user gets a free copy. name="Rot Y" text_enabled_color="1 1 1 1" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -1657,7 +1799,9 @@ even though the user gets a free copy. name="Rot Z" text_enabled_color="1 1 1 1" top_pad="3" - width="87" /> + width="87" + font="DejaVu" + font.size="LSmall" /> <!-- <text type="string" length="1" @@ -1686,7 +1830,9 @@ even though the user gets a free copy. name="comboBaseType" top="6" left="125" - width="125"> + width="125" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Box" name="Box" @@ -1742,7 +1888,9 @@ even though the user gets a free copy. left="125" name="text cut" top_pad="5" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Path Cut (begin/end) </text> <spinner @@ -1757,7 +1905,9 @@ even though the user gets a free copy. max_val="0.98" name="cut begin" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="16" @@ -1770,7 +1920,9 @@ even though the user gets a free copy. min_val="0.02" name="cut end" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -1780,7 +1932,9 @@ even though the user gets a free copy. left="125" name="text hollow" top_pad="7" - width="68"> + width="68" + font="DejaVu" + font.size="LSmall" > Hollow </text> <text @@ -1791,7 +1945,9 @@ even though the user gets a free copy. layout="topleft" left_pad="10" name="text skew" - width="63"> + width="63" + font="DejaVu" + font.size="LSmall" > Skew </text> <spinner @@ -1805,7 +1961,9 @@ even though the user gets a free copy. max_val="95" name="Scale 1" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -1818,7 +1976,9 @@ even though the user gets a free copy. min_val="-0.95" name="Skew" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -1828,7 +1988,9 @@ even though the user gets a free copy. left="125" name="Hollow Shape" top_pad="7" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Hollow Shape </text> <combo_box @@ -1837,7 +1999,9 @@ even though the user gets a free copy. left_delta="0" name="hole" top_pad="-2" - width="150"> + width="150" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Default" name="Default" @@ -1864,7 +2028,9 @@ even though the user gets a free copy. left_delta="0" name="text twist" top_pad="7" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Twist (begin/end) </text> <spinner @@ -1881,7 +2047,9 @@ even though the user gets a free copy. min_val="-180" name="Twist Begin" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="0" follows="left|top" @@ -1896,7 +2064,9 @@ even though the user gets a free copy. min_val="-180" name="Twist End" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -1906,7 +2076,9 @@ even though the user gets a free copy. left="125" name="scale_taper" top_pad="7" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Taper </text> <text @@ -1919,7 +2091,9 @@ even though the user gets a free copy. left_delta="0" name="scale_hole" top_delta="0" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Hole Size </text> <spinner @@ -1935,7 +2109,9 @@ even though the user gets a free copy. min_val="-1" name="Taper Scale X" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -1949,7 +2125,9 @@ even though the user gets a free copy. min_val="-1" name="Taper Scale Y" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -1959,7 +2137,9 @@ even though the user gets a free copy. left="125" name="text topshear" top_pad="5" - width="141"> + width="141" + font="DejaVu" + font.size="LSmall" > Top Shear </text> <spinner @@ -1976,7 +2156,9 @@ even though the user gets a free copy. min_val="-0.5" name="Shear X" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -1991,7 +2173,9 @@ even though the user gets a free copy. min_val="-0.5" name="Shear Y" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text visible="false" type="string" @@ -2002,7 +2186,9 @@ even though the user gets a free copy. left="125" name="advanced_cut" top_pad="7" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Profile Cut (begin/end) </text> <text @@ -2015,7 +2201,9 @@ even though the user gets a free copy. left_delta="0" name="advanced_dimple" top_delta="0" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Dimple (begin/end) </text> <text @@ -2027,7 +2215,9 @@ even though the user gets a free copy. left_delta="0" name="advanced_slice" top_delta="0" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Slice (begin/end) </text> <spinner @@ -2042,7 +2232,9 @@ even though the user gets a free copy. max_val="0.98" name="Path Limit Begin" top_pad="3" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2055,7 +2247,9 @@ even though the user gets a free copy. min_val="0.02" name="Path Limit End" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text visible="false" type="string" @@ -2066,7 +2260,9 @@ even though the user gets a free copy. left="125" name="text taper2" top_pad="7" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Taper </text> <spinner @@ -2083,7 +2279,9 @@ even though the user gets a free copy. min_val="-1" name="Taper X" top_pad="3" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner visible="false" decimal_digits="2" @@ -2098,7 +2296,9 @@ even though the user gets a free copy. min_val="-1" name="Taper Y" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <text visible="false" type="string" @@ -2109,7 +2309,9 @@ even though the user gets a free copy. left="125" name="text radius delta" top_pad="7" - width="78"> + width="78" + font="DejaVu" + font.size="LSmall" > Radius </text> <text @@ -2121,7 +2323,9 @@ even though the user gets a free copy. layout="topleft" left_delta="78" name="text revolutions" - width="68"> + width="68" + font="DejaVu" + font.size="LSmall" > Revolutions </text> <spinner @@ -2135,7 +2339,9 @@ even though the user gets a free copy. min_val="-1" name="Radius Offset" top_pad="4" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <spinner visible="false" decimal_digits="2" @@ -2148,7 +2354,9 @@ even though the user gets a free copy. min_val="1" name="Revolutions" top_delta="0" - width="68" /> + width="68" + font="DejaVu" + font.size="LSmall" /> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2161,7 +2369,9 @@ even though the user gets a free copy. tool_tip="Click to choose a picture" top="70" visible="false" - width="145" /> + width="145" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <check_box height="19" label="Mirror" @@ -2171,7 +2381,9 @@ even though the user gets a free copy. tool_tip="Flips sculpted prim along the X axis" top_pad="8" visible="false" - width="130" /> + width="130" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Inside-out" @@ -2181,7 +2393,9 @@ even though the user gets a free copy. tool_tip="Inverts the sculpted prims normals, making it appear inside-out" top_pad="4" visible="false" - width="121" /> + width="121" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -2192,7 +2406,9 @@ even though the user gets a free copy. name="label sculpt type" top_pad="10" visible="false" - width="130"> + width="130" + font="DejaVu" + font.size="LSmall" > Stitching type </text> <combo_box @@ -2202,7 +2418,9 @@ even though the user gets a free copy. name="sculpt type control" top_pad="4" visible="false" - width="150"> + width="150" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Sphere" name="Sphere" @@ -2259,7 +2477,9 @@ even though the user gets a free copy. name="select_single" top="5" width="252" - word_wrap="true"> + word_wrap="true" + font="DejaVu" + font.size="LSmall" > Select only one primitive to edit features. </text> <text @@ -2271,7 +2491,9 @@ even though the user gets a free copy. left="10" name="edit_object" top="5" - width="252"> + width="252" + font="DejaVu" + font.size="LSmall" > Edit object features: </text> <check_box @@ -2282,7 +2504,9 @@ even though the user gets a free copy. name="Animated Mesh Checkbox Ctrl" tool_tip="Allows rigged mesh objects to be animated independently" top_pad="10" - width="121" /> + width="121" + font="DejaVu" + font.size="LSmall" /> <check_box height="10" label="Flexible Path" @@ -2292,7 +2516,9 @@ even though the user gets a free copy. name="Flexible1D Checkbox Ctrl" tool_tip="Allows object to flex about the Z axis (Client-side only)" top_pad="15" - width="121" /> + width="121" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2305,7 +2531,9 @@ even though the user gets a free copy. max_val="3" name="FlexNumSections" top_pad="10" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2319,7 +2547,9 @@ even though the user gets a free copy. min_val="-10" name="FlexGravity" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2332,7 +2562,9 @@ even though the user gets a free copy. max_val="10" name="FlexFriction" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2345,7 +2577,9 @@ even though the user gets a free copy. max_val="10" name="FlexWind" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2358,7 +2592,9 @@ even though the user gets a free copy. max_val="10" name="FlexTension" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2372,7 +2608,9 @@ even though the user gets a free copy. min_val="-10" name="FlexForceX" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2386,7 +2624,9 @@ even though the user gets a free copy. min_val="-10" name="FlexForceY" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -2400,7 +2640,9 @@ even though the user gets a free copy. min_val="-10" name="FlexForceZ" top_pad="4" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <view_border bevel_style="none" follows="top|left" @@ -2409,7 +2651,9 @@ even though the user gets a free copy. left="8" name="object_horizontal" top_pad="10" - width="278" /> + width="278" + font="DejaVu" + font.size="LSmall" /> <check_box height="16" label="Light" @@ -2418,7 +2662,9 @@ even though the user gets a free copy. name="Light Checkbox Ctrl" tool_tip="Causes object to emit light" top_pad="8" - width="60" /> + width="60" + font="DejaVu" + font.size="LSmall" /> <color_swatch can_apply_immediately="true" color="0.5 0.5 0.5 1" @@ -2430,7 +2676,9 @@ even though the user gets a free copy. top_pad="-17" name="colorswatch" tool_tip="Click to open color picker" - width="40" /> + width="40" + font="DejaVu" + font.size="LSmall" /> <texture_picker allow_no_texture="true" top_delta="0" @@ -2443,7 +2691,9 @@ even though the user gets a free copy. mouse_opaque="true" name="light texture control" tool_tip="Click to choose a projection image (only has effect with deferred rendering enabled)" - width="32" /> + width="32" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <menu_button menu_filename="menu_copy_paste_light.xml" follows="top|left" @@ -2467,7 +2717,9 @@ even though the user gets a free copy. left="10" name="Light Intensity" top_pad="26" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner bottom_delta="0" decimal_digits="3" follows="left|top" @@ -2481,7 +2733,9 @@ even though the user gets a free copy. min_val="0" mouse_opaque="true" name="Light FOV" - width="120" /> + width="120" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" initial_value="5" @@ -2492,7 +2746,9 @@ even though the user gets a free copy. max_val="20" name="Light Radius" top_pad="3" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner bottom_delta="0" decimal_digits="3" follows="left|top" @@ -2506,7 +2762,9 @@ even though the user gets a free copy. min_val="-20" mouse_opaque="true" name="Light Focus" - width="120" /> + width="120" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" increment="0.25" @@ -2518,7 +2776,9 @@ even though the user gets a free copy. max_val="2" name="Light Falloff" top_pad="3" - width="128" /> + width="128" + font="DejaVu" + font.size="LSmall" /> <spinner bottom_delta="0" decimal_digits="3" follows="left|top" @@ -2532,7 +2792,9 @@ even though the user gets a free copy. min_val="0" mouse_opaque="true" name="Light Ambiance" - width="120" /> + width="120" + font="DejaVu" + font.size="LSmall" /> <check_box height="16" label="Reflection Probe" @@ -2541,15 +2803,19 @@ even though the user gets a free copy. name="Reflection Probe" tool_tip="Adjusts how objects within this volume receive reflections when PBR is enabled" top_pad="10" - width="60" /> + width="60" + font="DejaVu" + font.size="LSmall" /> <combo_box height="19" top_delta="0" - left="144" + left="144" follows="left|top" name="Probe Volume Type" tool_tip="Choose the probe influence volume" - width="140"> + width="140" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Sphere" name="Sphere" @@ -2568,7 +2834,9 @@ even though the user gets a free copy. name="Probe Dynamic" tool_tip="When enabled, Avatars will appear in reflections within this probe's influence volume." bottom_delta="19" - width="60" /> + width="60" + font="DejaVu" + font.size="LSmall" /> <text bottom_delta="-8" @@ -2580,7 +2848,9 @@ even though the user gets a free copy. left="10" name="Probe Update Label" text_readonly_color="LabelDisabledColor" - width="100"> + width="100" + font="DejaVu" + font.size="LSmall" > Probe Update </text> <combo_box @@ -2590,7 +2860,9 @@ even though the user gets a free copy. follows="left|top" name="Probe Update Type" tool_tip="Determines how the probe updates. Static updates the slowest and without avatars. Dynamic updates more frequently, with avatars visible in the probes. Mirror (Environment) turns this probe into a realtime planar projected probe that only reflects the environment, but does not calculate ambiance. Mirror (Everything) is similar to Mirror (Environment), but it reflects particles and avatars." - width="140"> + width="140" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Static" name="Static" @@ -2621,7 +2893,9 @@ even though the user gets a free copy. min_val="0" mouse_opaque="true" name="Probe Ambiance" - width="120" /> + width="120" + font="DejaVu" + font.size="LSmall" /> <spinner bottom_delta="0" decimal_digits="3" follows="left|top" @@ -2635,7 +2909,9 @@ even though the user gets a free copy. min_val="0" mouse_opaque="true" name="Probe Near Clip" - width="120" /> + width="120" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -2644,7 +2920,9 @@ even though the user gets a free copy. layout="topleft" name="label physicsshapetype" top="38" - width="121"> + width="121" + font="DejaVu" + font.size="LSmall" > Physics Shape Type: </text> <combo_box @@ -2654,13 +2932,17 @@ even though the user gets a free copy. follows="left|top" name="Physics Shape Type Combo Ctrl" tool_tip="Choose the physics shape type" - width="108"/> + width="108" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" /> <combo_box height="19" layout="topleft" name="material" top_pad="5" - width="150"> + width="150" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Stone" name="Stone" @@ -2703,7 +2985,9 @@ even though the user gets a free copy. max_val="28" name="Physics Gravity" top_pad="10" - width="132" /> + width="132" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" @@ -2718,7 +3002,9 @@ even though the user gets a free copy. min_val="0" name="Physics Friction" top_pad="4" - width="132" /> + width="132" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" @@ -2734,7 +3020,9 @@ even though the user gets a free copy. min_val="1" name="Physics Density" top_pad="4" - width="132" /> + width="132" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" @@ -2749,7 +3037,9 @@ even though the user gets a free copy. min_val="0" name="Physics Restitution" top_pad="8" - width="132" /> + width="132" + font="DejaVu" + font.size="LSmall" /> </panel> <panel label="Texture" @@ -2777,7 +3067,10 @@ even though the user gets a free copy. left="8" name="button new script" top="10" - width="134" /> + width="134" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <button follows="left|top" height="23" @@ -2785,7 +3078,10 @@ even though the user gets a free copy. layout="topleft" left_pad="8" name="button permissions" - width="134" /> + width="134" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <filter_editor follows="left|top|right" label="Enter filter text" @@ -2822,7 +3118,8 @@ even though the user gets a free copy. <text type="string" length="1" - font="SansSerifBig" + font="DejaVu" + font.size="Small" follows="left|top" height="19" layout="topleft" @@ -2841,7 +3138,9 @@ even though the user gets a free copy. left="30" name="label_area_price" top="48" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Price: L$[PRICE] for [AREA] m² </text> <text @@ -2853,7 +3152,9 @@ even though the user gets a free copy. left_delta="0" name="label_area" top_delta="0" - width="150"> + width="150" + font="DejaVu" + font.size="LSmall" > Area: [AREA] m² </text> <button @@ -2865,7 +3166,10 @@ even though the user gets a free copy. left_delta="0" name="button about land" top_pad="4" - width="125" /> + width="125" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <check_box control_name="ShowParcelOwners" height="19" @@ -2875,11 +3179,14 @@ even though the user gets a free copy. name="checkbox show owners" tool_tip="Colorize the parcels according to the type of owner: Green = Your land Aqua = Your group's land Red = Owned by others Yellow = For sale Purple = For auction Grey = Public" top_pad="8" - width="205" /> + width="205" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" - font="SansSerifBig" + font="DejaVu" + font.size="Small" follows="left|top" height="19" layout="topleft" @@ -2898,7 +3205,10 @@ even though the user gets a free copy. left="30" name="button subdivide land" top="172" - width="125" /> + width="125" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <button follows="left|top" height="23" @@ -2908,11 +3218,15 @@ even though the user gets a free copy. left_delta="0" name="button join land" top_pad="4" - width="125" /> + width="125" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <text type="string" length="1" - font="SansSerifBig" + font="DejaVu" + font.size="Small" follows="left|top" height="19" layout="topleft" @@ -2931,7 +3245,10 @@ even though the user gets a free copy. left="30" name="button buy land" top="276" - width="125" /> + width="125" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> <button follows="left|top" height="23" @@ -2941,7 +3258,10 @@ even though the user gets a free copy. left_delta="0" name="button abandon land" top_pad="4" - width="125" /> + width="125" + font="DejaVu" + font.size="LSmall" + pad_bottom="1" /> </panel> <!-- end of tabs --> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 7fe9830d23..d75d2e0db7 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -16,7 +16,6 @@ width="650"> <text follows="left|top" - font="SansSerifMedium" valign="top" halign="left" height="20" @@ -31,7 +30,6 @@ </text> <text follows="left|top" - font="SansSerifMedium" valign="top" halign="left" height="20" @@ -49,7 +47,7 @@ button_display_mode="icons_with_text" follows="all" left="20" - button_icon_and_text.button_width.max="140" + button_icon_and_text.button_width.max="172" button_icon_and_text.button_width.min="70" name="toybox_toolbar" pad_left="5" diff --git a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml index c0d260ef59..279a05748d 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml @@ -22,7 +22,7 @@ increment="0.025" initial_value="0.5" label="Voice Chat" - label_width="60" + label_width="62" layout="topleft" left="15" top="50" diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml deleted file mode 100644 index d037bdb813..0000000000 --- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml +++ /dev/null @@ -1,162 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - legacy_header_height="27" - can_resize="true" - height="500" - name="voice_effects" - help_topic="voice_effects" - title="VOICE MORPHING PREVIEW" - background_visible="true" - label="Places" - layout="topleft" - min_height="360" - min_width="200" - save_rect="true" - width="300"> - <string name="no_voice_effect"> - (No Voice Morph) - </string> - <string name="active_voice_effect"> - (Active) - </string> - <string name="unsubscribed_voice_effect"> - (Unsubscribed) - </string> - <string name="new_voice_effect"> - (New!) - </string> - - <!-- effect names begin --> - <string name="effect_Arena">Arena</string> - <string name="effect_Beast">Beast</string> - <string name="effect_Buff">Buff</string> - <string name="effect_Buzz">Buzz</string> - <string name="effect_Camille">Camille</string> - <string name="effect_Creepy">Creepy</string> - <string name="effect_CreepyBot">CreepyBot</string> - <string name="effect_Cyber">Cyber</string> - <string name="effect_DeepBot">DeepBot</string> - <string name="effect_Demon">Demon</string> - <string name="effect_Female Elf">Female Elf</string> - <string name="effect_Flirty">Flirty</string> - <string name="effect_Foxy">Foxy</string> - <string name="effect_Halloween 2010 Bonus">Halloween_2010_Bonus</string> - <string name="effect_Helium">Helium</string> - <string name="effect_Husky">Husky</string> - <string name="effect_Husky Whisper">Husky Whisper</string> - <string name="effect_Intercom">Intercom</string> - <string name="effect_Julia">Julia</string> - <string name="effect_Lo Lilt">Lo Lilt</string> - <string name="effect_Macho">Macho</string> - <string name="effect_Micro">Micro</string> - <string name="effect_Mini">Mini</string> - <string name="effect_Model">Model</string> - <string name="effect_Nano">Nano</string> - <string name="effect_Nightmare">Nightmare</string> - <string name="effect_PopBot">PopBot</string> - <string name="effect_Rachel">Rachel</string> - <string name="effect_Radio">Radio</string> - <string name="effect_Robot">Robot</string> - <string name="effect_Roxanne">Roxanne</string> - <string name="effect_Rumble">Rumble</string> - <string name="effect_Sabrina">Sabrina</string> - <string name="effect_Samantha">Samantha</string> - <string name="effect_Sexy">Sexy</string> - <string name="effect_Shorty">Shorty</string> - <string name="effect_Smaller">Smaller</string> - <string name="effect_Sneaky">Sneaky</string> - <string name="effect_Stallion">Stallion</string> - <string name="effect_Sultry">Sultry</string> - <string name="effect_Thunder">Thunder</string> - <string name="effect_Vixen">Vixen</string> - <string name="effect_WhinyBot">WhinyBot</string> - <!-- effect names end --> - - <text - height="16" - word_wrap="true" - use_ellipses="true" - type="string" - follows="left|top|right" - layout="topleft" - font="SansSerifBold" - color="White" - left="10" - name="preview_text" - right="-10" - top="27">To Preview - </text> - <text - height="23" - word_wrap="true" - use_ellipses="true" - type="string" - follows="left|top|right" - layout="topleft" - left="10" - name="status_text" - right="-5" - top_pad="0"> -Record a sample, then click on a voice to hear how it will sound. - </text> - <button - follows="left|top" - height="23" - label="Record" - layout="topleft" - left="10" - name="record_btn" - tool_tip="Record a sample of your voice." - top_pad="5" - width="100"> - <button.commit_callback - function="VoiceEffect.Record" /> - </button> - <button - follows="left|top" - height="23" - label="Stop" - layout="topleft" - left_delta="0" - name="record_stop_btn" - top_delta="0" - width="100"> - <button.commit_callback - function="VoiceEffect.Stop" /> - </button> - <text - height="23" - halign="right" - use_ellipses="true" - type="string" - follows="left|top|right" - layout="topleft" - left_pad="10" - top_delta="10" - name="voice_morphing_link" - right="-10"> - [[URL] Subscribe Now] - </text> - <scroll_list - bottom="-10" - draw_heading="true" - follows="all" - layout="topleft" - left="10" - multi_select="false" - name="voice_effect_list" - right="-10" - tool_tip="Record a sample of your voice, then click an effect to preview." - top="95"> - <scroll_list.columns - label="Voice Name" - name="name" - relative_width="0.60" /> - <scroll_list.columns - dynamic_width="true" - label="Expires" - name="expires" - relative_width="0.30" /> - </scroll_list> - -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml index 4e75b2b29c..fdc1e64e05 100644 --- a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml +++ b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml @@ -10,12 +10,12 @@ title="WHITELIST ENTRY" width="390"> - <text type="string" length="1" bottom="20" follows="top|left" height="15" layout="topleft" - left="10" name="media_label" top="20"> + <text type="string" length="1" follows="top|left|right" height="30" layout="topleft" + left="10" name="media_label" top="20" right="-10" word_wrap="true"> Enter a URL or URL pattern to add to the list of allowed domains </text> - <line_editor bottom_delta="40" enabled="true" follows="left|top" font="SansSerif" + <line_editor bottom_delta="15" enabled="true" follows="left|top" font="SansSerif" height="20" left="10" name="whitelist_entry" tool_tip="Enter a URL or URL pattern to White List" width="350" /> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 7d094ec613..6535a9a079 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -89,7 +89,7 @@ height="22" width="238" follows="right|top" - top="6" + top="6" background_visible="false" bg_alpha_color="DkGray2"> <text @@ -109,7 +109,7 @@ </panel> <panel follows="right|top" - height="126" + height="150" top_pad="4" width="238" left="1" @@ -167,7 +167,7 @@ follows="top|right" halign="left" height="16" - top_delta="-2" + top_delta="-5" left_pad="7" layout="topleft" name="person_label" @@ -181,9 +181,9 @@ layout="topleft" left="3" name="infohub_chk" - top_pad="3" + top_pad="7" width="22" /> - <icon + <icon follows="top|right" height="16" image_name="map_infohub.tga" @@ -191,7 +191,7 @@ left_pad="0" mouse_opaque="true" name="infohub" - top_delta="0" + top_delta="-3" width="16" /> <text type="string" @@ -199,7 +199,7 @@ follows="top|right" halign="left" height="16" - top_delta="2" + top_delta="0" left_pad="3" layout="topleft" name="infohub_label" @@ -213,7 +213,7 @@ layout="topleft" left="3" name="land_for_sale_chk" - top_pad="2" + top_pad="8" width="22" /> <icon follows="top|right" @@ -222,16 +222,16 @@ layout="topleft" mouse_opaque="true" name="landforsale" - top_delta="0" + top_delta="-3" left_pad="0" width="16" /> - <text + <text type="string" length="1" follows="top|right" halign="left" height="16" - top_delta="2" + top_delta="1" left_pad="3" layout="topleft" name="land_sale_label" @@ -257,7 +257,7 @@ layout="topleft" left_pad="0" name="auction_label" - top_delta="3" + top_delta="1" width="170"> land auction </text> @@ -270,7 +270,7 @@ mouse_opaque="true" name="square2_owner" left="20" - top_pad="-5" + top_pad="-2" width="16" /> <text type="string" @@ -280,11 +280,35 @@ layout="topleft" left_pad="0" name="by_owner_label" - top_delta="3" + top_delta="0" width="100"> by owner </text> + <check_box + name="grid_coords_chk" + control_name="MapShowGridCoords" + layout="topleft" + follows="top|right" + top_pad="5" + left="3" + height="16" + width="22" + /> + <text + name="grid_coords_label" + type="string" + layout="topleft" + follows="top|right" + top_delta="-2" + left_pad="2" + height="16" + width="220" + halign="left" + length="1" > + Show grid map coordinates + </text> + <button follows="top|right" height="22" @@ -333,7 +357,7 @@ height="16" layout="topleft" left="135" - top_pad="1" + top_pad="5" name="event_chk" width="22" /> <icon @@ -343,6 +367,7 @@ layout="topleft" mouse_opaque="true" name="event" + top_delta="-2" left_pad="0" width="18" /> <text @@ -351,7 +376,7 @@ follows="top|right" halign="left" height="16" - top_delta="2" + top_delta="0" left_pad="3" layout="topleft" name="pg_label" @@ -367,7 +392,7 @@ layout="topleft" left="135" name="events_mature_chk" - top_pad="3" + top_pad="7" width="22" /> <icon follows="top|right" @@ -376,16 +401,16 @@ layout="topleft" mouse_opaque="true" name="events_mature_icon" - top_delta="0" + top_delta="-2" left_pad="0" width="18" /> - <text + <text type="string" length="1" follows="top|right" halign="left" height="16" - top_delta="2" + top_delta="0" left_pad="3" layout="topleft" name="events_mature_label" @@ -400,7 +425,7 @@ layout="topleft" left="135" name="events_adult_chk" - top_pad="3" + top_pad="7" width="22" /> <icon follows="top|right" @@ -410,15 +435,15 @@ left_pad="0" mouse_opaque="true" name="events_adult_icon" - top_delta="0" + top_delta="-2" width="18" /> - <text + <text type="string" length="1" follows="top|right" halign="left" height="16" - top_delta="2" + top_delta="0" left_pad="3" layout="topleft" name="events_adult_label" @@ -455,7 +480,7 @@ <panel follows="right|top|bottom" - height="235" + height="220" top_pad="0" width="238" name="layout_panel_4"> @@ -573,7 +598,7 @@ draw_stripes="false" bg_writeable_color="0.75 0.75 0.75 0.15" follows="all" - height="145" + height="130" layout="topleft" left="28" name="search_results" @@ -612,7 +637,7 @@ Location: </text> <spinner - control_name="teleport_coordinate_x" + control_name="Teleport_Coordinate_X" decimal_digits="0" follows="right|bottom" height="23" @@ -624,11 +649,11 @@ min_val="0" name="teleport_coordinate_x" width="44" > - <spinner.commit_callback + <spinner.commit_callback function="WMap.Coordinates" /> </spinner> <spinner - control_name="teleport_coordinate_y" + control_name="Teleport_Coordinate_Y" decimal_digits="0" follows="right|bottom" height="23" @@ -644,7 +669,7 @@ function="WMap.Coordinates" /> </spinner> <spinner - control_name="teleport_coordinate_z" + control_name="Teleport_Coordinate_Z" decimal_digits="0" follows="right|bottom" height="23" diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index 45ec1e27f1..1ad01ee120 100644 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <fonts> - <font name="default" comment="default font files (global fallbacks)"> - <file>DejaVuSans.ttf</file> + <font + name="default" + comment="default font files (global fallbacks)"> + <file load_collection="true" font_weight="400">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans.ttf</file> <file functor="is_emoji">TwemojiSVG.ttf</file> <os name="Windows"> <file>meiryo.TTC</file> @@ -31,9 +34,11 @@ </os> </font> - <font name="SansSerifBold" - comment="Name of bold sans-serif font"> - <file>DejaVuSans-Bold.ttf</file> + <font + name="SansSerifBold" + comment="Name of bold sans-serif font"> + <file load_collection="true" flags="bold" font_weight="700">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> <os name="Windows"> <file>arialbd.ttf</file> </os> @@ -42,8 +47,11 @@ </os> </font> - <font name="SansSerif" comment="Name of san-serif font (Truetype file name)"> - <file>DejaVuSans.ttf</file> + <font + name="SansSerif" + comment="Name of san-serif font (Truetype file name)"> + <file load_collection="true" font_weight="400">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans.ttf</file> <os name="Windows"> <file>arial.ttf</file> </os> @@ -52,31 +60,38 @@ </os> </font> - <font name="SansSerif" - comment="Name of bold sans-serif font" - font_style="BOLD"> - <file>DejaVuSans-Bold.ttf</file> + <font + name="SansSerif" + comment="Name of bold sans-serif font" + font_style="BOLD"> + <file load_collection="true" flags="bold" font_weight="700">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> </font> - <font name="SansSerif" - comment="Name of italic sans-serif font" - font_style="ITALIC"> - <file>DejaVuSans-Oblique.ttf</file> + <font + name="SansSerif" + comment="Name of italic sans-serif font" + font_style="ITALIC"> + <file load_collection="true" font_weight="400">InterItalicVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-Oblique.ttf</file> </font> - <font name="SansSerif" - comment="Name of bold italic sans-serif font" - font_style="BOLD|ITALIC"> - <file>DejaVuSans-BoldOblique.ttf</file> + <font + name="SansSerif" + comment="Name of bold italic sans-serif font" + font_style="BOLD|ITALIC"> + <file load_collection="true" flags="bold" font_weight="700">InterItalicVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file> </font> <font name="Emoji" comment="Name of emoji font"> <file>TwemojiSVG.ttf</file> </font> - - <font name="Monospace" - comment="Name of monospace font"> + + <font + name="Monospace" + comment="Name of monospace font"> <file>DejaVuSansMono.ttf</file> </font> @@ -103,9 +118,11 @@ <file>DejaVuSans-BoldOblique.ttf</file> </font> - <font name="Helvetica" - comment="Name of Helvetica font"> - <file>DejaVuSans.ttf</file> + <font + name="Helvetica" + comment="Name of Helvetica font"> + <file font_weight="400">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans.ttf</file> <os name="Windows"> <file>arial.ttf</file> </os> @@ -114,10 +131,12 @@ </os> </font> - <font name="Helvetica" - comment="Name of Helvetica font (bold)" - font_style="BOLD"> - <file>DejaVuSans-Bold.ttf</file> + <font + name="Helvetica" + comment="Name of Helvetica font (bold)" + font_style="BOLD"> + <file flags="bold" font_weight="700">InterVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-Bold.ttf</file> <os name="Windows"> <file>arialbd.ttf</file> </os> @@ -126,10 +145,12 @@ </os> </font> - <font name="Helvetica" - comment="Name of Helvetica font (italic)" - font_style="ITALIC"> - <file>DejaVuSans-Oblique.ttf</file> + <font + name="Helvetica" + comment="Name of Helvetica font (italic)" + font_style="ITALIC"> + <file font_weight="400">InterItalicVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-Oblique.ttf</file> <os name="Windows"> <file>ariali.ttf</file> </os> @@ -138,10 +159,12 @@ </os> </font> - <font name="Helvetica" - comment="Name of Helvetica font (bold italic)" - font_style="BOLD|ITALIC"> - <file>DejaVuSans-BoldOblique.ttf</file> + <font + name="Helvetica" + comment="Name of Helvetica font (bold italic)" + font_style="BOLD|ITALIC"> + <file font_weight="800">InterItalicVariableFont.ttf</file> + <file size_delta="-0.5">DejaVuSans-BoldOblique.ttf</file> <os name="Windows"> <file>arialbi.ttf</file> </os> @@ -150,33 +173,38 @@ </os> </font> - <font name="OverrideTest" - comment="Name of font to test overriding"> + <font + name="OverrideTest" + comment="Name of font to test overriding"> <file>times.ttf</file> - <file>DejaVuSans.ttf</file> + <file font_weight="400">InterVariableFont.ttf</file> </font> <font_size name="Monospace" - comment="Size for monospaced font (points, or 1/72 of an inch)" - size="8.0" - /> + comment="Size for monospaced font (points, or 1/72 of an inch)" + size="8.0" + /> <font_size name="Huge" - comment="Size of huge font (points, or 1/72 of an inch)" - size="16.0" - /> + comment="Size of huge font (points, or 1/72 of an inch)" + size="16.0" + /> <font_size name="Large" - comment="Size of large font (points, or 1/72 of an inch)" - size="10.6" - /> + comment="Size of large font (points, or 1/72 of an inch)" + size="11.0" + /> <font_size name="Medium" - comment="Size of medium font (points, or 1/72 of an inch)" - size="8.6" - /> + comment="Size of medium font (points, or 1/72 of an inch)" + size="10" + /> <font_size name="Small" - comment="Size of small font (points, or 1/72 of an inch)" - size="7.6" - /> - <font_size name="SmallLSL" + comment="Size of small font (points, or 1/72 of an inch)" + size="9" + /> + <font_size name="LSmall" + comment="Legacy size of small font (points, or 1/72 of an inch)" + size="7.6" + /> +<font_size name="SmallLSL" comment="Size of small font for LSL editor (points, or 1/72 of an inch)" size="7" /> diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index c190d9610f..226454df7c 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -9,7 +9,7 @@ bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="158" + height="188" layout="topleft" name="inspect_group" single_instance="true" @@ -47,7 +47,7 @@ </text> <text follows="all" - height="45" + height="65" left="8" name="group_details" use_ellipses="true" @@ -80,7 +80,7 @@ L$123 to join height="23" label="Join" left="8" - top="125" + top="156" name="join_btn" width="103" commit_callback.function="InspectGroup.Join"/> @@ -89,7 +89,7 @@ L$123 to join height="23" label="Leave" left="8" - top="125" + top="156" name="leave_btn" width="103" commit_callback.function="InspectGroup.Leave"/> @@ -98,7 +98,7 @@ L$123 to join height="23" label="View Profile" name="view_profile_btn" - top="125" + top="156" left="117" width="103" commit_callback.function="InspectGroup.ViewProfile" /> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index d978619355..c9adf46ad7 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -48,6 +48,28 @@ <menu_item_call.on_click function="Object.ShowOriginal" /> </menu_item_call> + <menu_item_call + label="Add to favorites" + layout="topleft" + name="Add to favorites"> + <menu_item_call.on_click + function="Object.SetFavorite" + parameter="Add" /> + <menu_item_call.on_visible + function="Object.EnableFavorites" + parameter="Add"/> + </menu_item_call> + <menu_item_call + label="Remove from favorites" + layout="topleft" + name="Remove from favorites"> + <menu_item_call.on_click + function="Object.SetFavorite" + parameter="Remove" /> + <menu_item_call.on_visible + function="Object.EnableFavorites" + parameter="Remove" /> + </menu_item_call> <menu_item_separator layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index 62cdaa5886..5a28f0dde5 100644 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -176,57 +176,60 @@ <on_click function="Group.DoToSelected" parameter="leave_group"/> <on_enable function="Avatar.EnableItem" parameter="can_leave_group" /> </menu_item_call> - <menu_item_separator layout="topleft" name="Moderator Options Separator"/> - <context_menu - label="Moderator Options" - layout="topleft" - name="Moderator Options"> - <menu_item_check - label="Allow text chat" - layout="topleft" - name="AllowTextChat"> - <on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" /> - <on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" /> - <on_enable function="Avatar.EnableItem" parameter="can_allow_text_chat" /> - </menu_item_check> - <menu_item_separator layout="topleft" name="moderate_voice_separator" /> - <menu_item_call - label="Mute this participant" - layout="topleft" - name="ModerateVoiceMuteSelected"> - <on_click function="Avatar.DoToSelected" parameter="selected" /> - <on_enable function="Avatar.EnableItem" parameter="can_mute" /> - <on_visible function="Avatar.VisibleItem" parameter="show_mute" /> - </menu_item_call> + <menu_item_separator layout="topleft" name="Moderator Options Separator"/> + <context_menu + label="Moderator Options" + layout="topleft" + name="Moderator Options"> + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" /> + <on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" /> + <on_enable function="Avatar.EnableItem" parameter="can_allow_text_chat" /> + <on_visible function="Avatar.VisibleItem" parameter="can_allow_text_chat" /> + </menu_item_check> + <menu_item_separator layout="topleft" name="moderate_voice_separator"> + <on_visible function="Avatar.VisibleItem" parameter="can_allow_text_chat" /> + </menu_item_separator> + <menu_item_call + label="Mute this participant" + layout="topleft" + name="ModerateVoiceMuteSelected"> + <on_click function="Avatar.DoToSelected" parameter="selected" /> + <on_enable function="Avatar.EnableItem" parameter="can_mute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_mute" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click function="Avatar.DoToSelected" parameter="selected" /> + <on_enable function="Avatar.EnableItem" parameter="can_unmute" /> + <on_visible function="Avatar.VisibleItem" parameter="show_unmute" /> + </menu_item_call> + <menu_item_call + label="Mute everyone" + layout="topleft" + name="ModerateVoiceMute"> + <on_click function="Avatar.DoToSelected" parameter="mute_all" /> + <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone" + layout="topleft" + name="ModerateVoiceUnmute"> + <on_click function="Avatar.DoToSelected" parameter="unmute_all" /> + <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> + </menu_item_call> + </context_menu> + <menu_item_separator layout="topleft" name="Group Ban Separator"/> <menu_item_call - label="Unmute this participant" - layout="topleft" - name="ModerateVoiceUnMuteSelected"> - <on_click function="Avatar.DoToSelected" parameter="selected" /> - <on_enable function="Avatar.EnableItem" parameter="can_unmute" /> - <on_visible function="Avatar.VisibleItem" parameter="show_unmute" /> - </menu_item_call> - <menu_item_call - label="Mute everyone" - layout="topleft" - name="ModerateVoiceMute"> - <on_click function="Avatar.DoToSelected" parameter="mute_all" /> - <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute everyone" - layout="topleft" - name="ModerateVoiceUnmute"> - <on_click function="Avatar.DoToSelected" parameter="unmute_all" /> - <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" /> - </menu_item_call> - </context_menu> - <menu_item_separator layout="topleft" name="Group Ban Separator"/> - <menu_item_call - label="Ban member" - layout="topleft" - name="BanMember"> - <on_click function="Avatar.DoToSelected" parameter="ban_member" /> - <on_enable function="Avatar.EnableItem" parameter="can_ban_member" /> - </menu_item_call> + label="Ban member" + layout="topleft" + name="BanMember"> + <on_click function="Avatar.DoToSelected" parameter="ban_member" /> + <on_enable function="Avatar.EnableItem" parameter="can_ban_member" /> + </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_favorites.xml b/indra/newview/skins/default/xui/en/menu_favorites.xml index 6345394b46..f82f705fb7 100644 --- a/indra/newview/skins/default/xui/en/menu_favorites.xml +++ b/indra/newview/skins/default/xui/en/menu_favorites.xml @@ -35,6 +35,9 @@ <menu_item_call.on_click function="Favorites.DoToSelected" parameter="show_on_map" /> + <menu_item_call.on_enable + function="Favorites.EnableSelected" + parameter="show_on_map" /> </menu_item_call> <menu_item_call label="Copy SLurl" @@ -43,6 +46,9 @@ <menu_item_call.on_click function="Favorites.DoToSelected" parameter="copy_slurl" /> + <menu_item_call.on_enable + function="Favorites.EnableSelected" + parameter="copy_slurl" /> </menu_item_call> <menu_item_call label="Create Pick" diff --git a/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml index 97f53d3a17..f85f897700 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml @@ -53,11 +53,7 @@ function="Inventory.GearDefault.Visible" parameter="multi_folder_view" /> </menu_item_check> - <menu_item_separator> - <menu_item_separator.on_visible - function="Inventory.GearDefault.Visible" - parameter="single_folder_view" /> - </menu_item_separator> + <menu_item_separator/> <menu_item_check label="List view" layout="topleft" @@ -100,4 +96,46 @@ function="Inventory.GearDefault.Visible" parameter="single_folder_view" /> </menu_item_check> + <menu_item_check + label="Recent tab" + layout="topleft" + name="recent_tab"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="toggle_recent_tab" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="recent_tab" /> + <on_visible + function="Inventory.GearDefault.Visible" + parameter="multi_folder_view" /> + </menu_item_check> + <menu_item_check + label="Worn tab" + layout="topleft" + name="worn_tab"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="toggle_worn_tab" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="worn_tab" /> + <on_visible + function="Inventory.GearDefault.Visible" + parameter="multi_folder_view" /> + </menu_item_check> + <menu_item_check + label="Favorites tab" + layout="topleft" + name="favorites_tab"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="toggle_favorites_tab" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="favorites_tab" /> + <on_visible + function="Inventory.GearDefault.Visible" + parameter="multi_folder_view" /> + </menu_item_check> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 36f9ae070f..5335e0f8bd 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -132,7 +132,6 @@ </menu_item_call> <menu_item_separator/> - <menu_item_call label="Preferences..." name="Preferences" @@ -710,6 +709,13 @@ <menu_item_check.on_click function="Avatar.ToggleSearch"/> </menu_item_check> + <menu_item_call + label="Legacy Search..." + name="LegacySearch"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="legacy_search" /> + </menu_item_call> <menu_item_separator/> <menu_item_call label="Teleport home" @@ -740,8 +746,7 @@ <menu_item_call label="360 snapshot" - name="Capture 360" - shortcut="control|alt|shift|s"> + name="Capture 360"> <menu_item_call.on_click function="Floater.Show" parameter="360capture" /> @@ -977,7 +982,8 @@ </menu_item_check> <menu_item_check label="Midday (Legacy)" - name="legacy noon"> + name="legacy noon" + shortcut="control|shift|T"> <menu_item_check.on_click function="World.EnvSettings" parameter="legacy noon" /> @@ -1009,8 +1015,8 @@ </menu_item_check> <menu_item_check label="Use Shared Environment" - shortcut="control|shift|X" - name="Use Shared Environment"> + name="Use Shared Environment" + shortcut="control|shift|X"> <menu_item_check.on_click function="World.EnvSettings" parameter="region" /> @@ -1574,6 +1580,18 @@ function="World.EnvPreset" <menu_item_check.on_click function="View.HighlightTransparent" /> </menu_item_check> + <menu_item_check + label="Highlight Transparent Probes" + name="Highlight Transparent Probes" + shortcut="alt|shift|T"> + <menu_item_check.on_check + function="CheckControl" + parameter="RenderReflectionProbeShowTransparent" /> + <menu_item_check.on_click + function="View.HighlightTransparentProbe" /> + <menu_item_check.on_enable + function="View.CheckHighlightTransparent"/> + </menu_item_check> <menu_item_separator/> <menu_item_check @@ -2362,6 +2380,7 @@ function="World.EnvPreset" </menu_item_check> <menu_item_check label="PBR" + shortcut="control|alt|shift|]" name="Rendering Type PBR"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -2677,18 +2696,6 @@ function="World.EnvPreset" parameter="fast timers" /> </menu_item_check> <menu_item_check - label="Memory" - name="Memory" - shortcut="control|shift|0" - use_mac_ctrl="true"> - <menu_item_check.on_check - function="Advanced.CheckConsole" - parameter="memory view" /> - <menu_item_check.on_click - function="Advanced.ToggleConsole" - parameter="memory view" /> - </menu_item_check> - <menu_item_check label="Scene Statistics" name="Scene Statistics"> <menu_item_check.on_check @@ -3452,8 +3459,7 @@ function="World.EnvPreset" </menu_item_check> <menu_item_check label="Object-Object Occlusion" - name="Object-Object Occlusion" - shortcut="control|shift|O"> + name="Object-Object Occlusion"> <menu_item_check.on_check function="CheckControl" parameter="UseOcclusion" /> @@ -3580,6 +3586,16 @@ function="World.EnvPreset" parameter="RenderAttachedParticles" /> </menu_item_check> <menu_item_check + label="Render Avatar Cloth" + name="Render Avatar Cloth"> + <menu_item_check.on_check + function="CheckControl" + parameter="RenderAvatarCloth" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="RenderAvatarCloth" /> + </menu_item_check> + <menu_item_check label="Collect Font Vertex Buffers" name="Collect Font Vertex Buffers"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5b9144e535..facf9b7e46 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -202,6 +202,16 @@ No tutorial is currently available. <notification icon="alertmodal.tga" + name="FoundLegacyNsisInstallation" + type="alertmodal"> + [APP_NAME] found an installation of an older version [VERSION]. To uninstall the older version, please follow [https://community.secondlife.com/knowledgebase/english/how-to-uninstall-and-reinstall-second-life-r524 this manual]. + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="LoginFailedNoNetwork" type="alertmodal"> <tag>fail</tag> @@ -2466,6 +2476,17 @@ You already have a landmark for this location. </notification> <notification + icon="alert.tga" + name="LandmarkLocationUnknown" + type="alert"> +Viewer wasn't able to get region's location. Region might be temporarily unavailable, was removed or landmark failed to load. + <usetemplate + name="okbutton" + yestext="OK"/> + <tag>fail</tag> + </notification> + + <notification icon="alertmodal.tga" name="CannotCreateLandmarkNotOwner" type="alertmodal"> @@ -4412,6 +4433,14 @@ Click OK to download and install. <notification icon="alertmodal.tga" + name="DownloadingUpdate" + type="alertmodal"> +Downloading update [VERSION]... +The viewer will restart once the download is complete. + </notification> + + <notification + icon="alertmodal.tga" name="OptionalUpdateReady" type="alertmodal"> Version [VERSION] has been downloaded and is ready to install. @@ -4425,9 +4454,9 @@ Click OK to install. </notification> <notification - icon="alertmodal.tga" + icon="alert.tga" name="PromptOptionalUpdate" - type="alertmodal"> + type="alert"> Version [VERSION] has been downloaded and is ready to install. Release notes: [URL] @@ -8585,10 +8614,10 @@ Scripts associated with this experience will be able to do the following on regi priority="critical" persist="true" type="notify"> -Warning: The object '<nolink>[OBJECTNAME]</nolink>' wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings. - -Do not allow access if you do not fully understand why it wants access to your account. +Warning: +[WARNINGS] +Do not allow access if you do not fully understand why it wants access to your account. <tag>confirm</tag> <form name="form"> <button @@ -8601,9 +8630,7 @@ Do not allow access if you do not fully understand why it wants access to your a name="Deny" text="Deny"/> </form> - <footer> -[FOOTERTEXT] - </footer> + <footer>[FOOTERTEXT]</footer> </notification> <notification @@ -9118,6 +9145,14 @@ Failed to save snapshot to [PATH]: Disk is full. [NEED_MEMORY]KB is required but Failed to save snapshot to [PATH]: Directory does not exist. </notification> + <notification icon="notifytip.tga" + name="SnapshotSavedToComputer" type="notifytip"> +Screenshot saved to: + [FILEPATH] + +Click to open folder. + </notification> + <notification icon="notifytip.tga" name="PresetNotSaved" @@ -9193,6 +9228,23 @@ Your voice has been muted by moderator. </notification> <notification + icon="notifytip.tga" + name="NearbyVoiceMutedByModerator" + type="notifytip"> + The moderator has muted your voice chat. +People in this location will not hear you if you speak. + <tag>voice</tag> + </notification> + + <notification + icon="notifytip.tga" + name="NearbyVoiceUnmutedByModerator" + type="notifytip"> + Your voice chat can now be heard by people in this location. + <tag>voice</tag> + </notification> + + <notification icon="alertmodal.tga" name="FailedToGetBenefits" type="alertmodal"> @@ -9677,6 +9729,22 @@ Are you sure you want to leave this call? <notification icon="alertmodal.tga" + name="ConfirmLeaveAdhoc" + type="alertmodal"> +Are you sure you want to leave this conference chat? + <tag>confirm</tag> + <tag>voice</tag> + <usetemplate + ignoretext="Confirm before I leave conference chat" + name="okcancelignore" + notext="No" + yestext="Yes"> + <unique/> + </usetemplate> + </notification> + + <notification + icon="alertmodal.tga" name="ConfirmMuteAll" type="alert"> You have selected to mute all participants in a group call. diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 970c6ad2f5..2b5682bf06 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -61,7 +61,7 @@ left_pad="5" name="avatar_name" parse_urls="false" - top="6" + top="5" use_ellipses="true" value="(loading)" width="0" /> diff --git a/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml index 5ac0bf54de..6b4312a22a 100644 --- a/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml @@ -65,7 +65,7 @@ left_pad="5" name="item_name" parse_urls="false" - top="6" + top="4" use_ellipses="true" width="180" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 4f48911376..dde2df7128 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -23,7 +23,7 @@ <text parse_urls="false" allow_scroll="false" - v_pad = "6" + v_pad = "4" read_only = "true" follows="left|right" font.style="BOLD" @@ -49,7 +49,7 @@ left_pad="5" name="time_box" right="-5" - top="7" + top="5" value="23:30" width="110" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml index 5406497930..c43f82c0f1 100644 --- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml @@ -109,7 +109,7 @@ image_overlay_alignment="center" image_pressed="WellButton_Lit" image_pressed_selected="WellButton_Lit_Selected" - image_selected="PushButton_Press" + image_selected="PushButton_Selected" label_color="Black" left="0" name="Unread" diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index afd3f9410b..b05904cd28 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -344,7 +344,6 @@ width="290" height="215"> <text - auto_resize="false" follows="left|top" font.style="BOLD" height="10" diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml index 7902588598..90e367543e 100644 --- a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml @@ -78,7 +78,7 @@ left="5" name="conversation_title" parse_urls="false" - top="6" + top="4" use_ellipses="true" value="(loading)" width="35" /> @@ -86,6 +86,7 @@ auto_update="true" follows="top|right" draw_border="false" + top="6" height="16" layout="topleft" left_pad="5" diff --git a/indra/newview/skins/default/xui/en/panel_dir_classified.xml b/indra/newview/skins/default/xui/en/panel_dir_classified.xml new file mode 100644 index 0000000000..f4d3ccf748 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_classified.xml @@ -0,0 +1,215 @@ +<panel + border="true" + top="30" + follows="left|top|right|bottom" + height="533" + label="Classifieds" + left="1" + left_delta="68" + mouse_opaque="false" + name="panel_dir_classified" + width="778"> + <string name="searching_text"> + Searching... + </string> + <string name="not_found_text"> + None Found. + </string> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + v_pad="0" + width="150"> + Enter search terms: + </text> + <combo_box + allow_text_entry="false" + top_delta="0" + left="525" + layout="topleft" + follows="right|top" + height="18" + max_chars="20" + mouse_opaque="true" + name="Category" + width="128"> + <combo_item name="AnyCategory" value="0" label="Any Category"/> + <combo_item name="Shopping" value="1" label="Shopping"/> + <combo_item name="LandRental" value="2" label="Land Rental"/> + <combo_item name="PropertyRental" value="3" label="Property Rental"/> + <combo_item name="SpecialAttraction" value="4" label="Special Attraction"/> + <combo_item name="NewProducts" value="5" label="New Products"/> + <combo_item name="Employment" value="6" label="Employment"/> + <combo_item name="Wanted" value="7" label="Wanted"/> + <combo_item name="Service" value="8" label="Service"/> + <combo_item name="Personal" value="9" label="Personal"/> + </combo_box> + <check_box + left_pad="5" + control_name="ShowPGClassifieds" + follows="right|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incpg" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_PG_Dark" + tool_tip="General" + layout="topleft" + left_pad="2" + name="rating_icon_general" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowMatureClassifieds" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incmature" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_M_Dark" + tool_tip="Moderate" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowAdultClassifieds" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="false" + label="" + mouse_opaque="true" + name="incadult" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_R_Dark" + tool_tip="Adult" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="16"/> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + top_pad="3" + follows="left|right|top" + layout="topleft" + font="SansSerif" + height="18" + left="5" + max_length="63" + mouse_opaque="true" + name="name" + width="650" /> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + halign="center" + height="20" + label="Search" + top_delta="0" + left_pad="5" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" /> + <column label="" name="type" width="-1" /> + <column label="Name" name="name" width="225" /> + <column label="Price" name="price" width="55" /> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" + halign="left" + height="16" + left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="80" /> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_events.xml b/indra/newview/skins/default/xui/en/panel_dir_events.xml new file mode 100644 index 0000000000..b194ce5646 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_events.xml @@ -0,0 +1,300 @@ +<panel + border="true" + top="30" + default_tab_group="1" + follows="left|top|right|bottom" + height="533" + label="Events" + left="1" + mouse_opaque="false" + name="panel_dir_events" + width="778"> + <string name="searching_text"> + Searching... + </string> + <string name="not_found_text"> + None Found. + </string> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + width="150"> + Enter search terms: + </text> + <combo_box + allow_text_entry="false" + top_delta="0" + left="525" + layout="topleft" + follows="right|top" + height="18" + max_chars="20" + mouse_opaque="true" + name="category_combo" + width="128"> + <combo_item name="All" value="0" label="Any Category"/> + <combo_item name="Discussion" value="18" label="Discussion"/> + <combo_item name="Sports" value="19" label="Sports"/> + <combo_item name="LiveMusic" value="20" label="Live Music"/> + <combo_item name="LiveDJ" value="30" label="Live DJ"/> + <combo_item name="Commercial" value="22" label="Commercial"/> + <combo_item name="Nightlife/Entertainment" value="23" label="Nightlife/Entertainment"/> + <combo_item name="Games/Contests" value="24" label="Games/Contests"/> + <combo_item name="Pageants" value="25" label="Pageants"/> + <combo_item name="Education" value="26" label="Education"/> + <combo_item name="ArtsandCulture" value="27" label="Arts and Culture"/> + <combo_item name="Charity/SupportGroups" value="28" label="Charity/Support Groups"/> + <combo_item name="Miscellaneous" value="29" label="Miscellaneous"/> + </combo_box> + <check_box + left_pad="5" + control_name="ShowPGEvents" + follows="right|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incpg" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_PG_Dark" + tool_tip="General" + layout="topleft" + left_pad="2" + name="rating_icon_general" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowMatureEvents" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incmature" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_M_Dark" + tool_tip="Moderate" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowAdultEvents" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="false" + label="" + mouse_opaque="true" + name="incadult" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_R_Dark" + tool_tip="Adult" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="16"/> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + top_pad="3" + follows="left|right|top" + layout="topleft" + font="SansSerif" + height="18" + left="5" + max_length="63" + mouse_opaque="true" + name="event_search_text" + width="650" /> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + halign="center" + height="20" + label="Search" + top_delta="0" + left_pad="5" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" /> + <column label="" name="type" width="-1" /> + <column dynamicwidth="true" label="Name" name="name" /> + <column label="Time (PT)" name="date" sort="time" width="106" /> + <column label="" name="event_id" width="-1" /> + <column label="Time" name="time" width="-1" /> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + drop_shadow_visible="true" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" + halign="left" + height="16" + left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="80" /> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> + <radio_group + top="5" + draw_border="false" + follows="top|left" + layout="topleft" + height="16" + left="160" + mouse_opaque="true" + name="date_mode" + initial_value="current" + width="200"> + <radio_item + layout="topleft" + left="3" + top="0" + follows="left|top" + height="20" + mouse_opaque="true" + name="current" + width="170" + label="In-Progress & Upcoming"/> + <radio_item + layout="topleft" + follows="left|top" + height="20" + top_delta="0" + left_delta="151" + mouse_opaque="true" + name="date" + width="56" + label="Date"/> + </radio_group> + <button + top="6" + left_pad="15" + layout="topleft" + follows="left|top" + font="SansSerif" + halign="center" + height="20" + label="<<" + label_selected="<<" + left_delta="54" + mouse_opaque="true" + name="back_btn" + tool_tip="Go back a day" + width="20" /> + <text + top="8" + bg_visible="false" + border_visible="false" + left_pad="1" + layout="topleft" + drop_shadow_visible="true" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="center" + height="14" + mouse_opaque="true" + name="date_text" + v_pad="0" + width="48"> + 6/6 + </text> + <button + top="6" + left_pad="1" + layout="topleft" + follows="left|top" + font="SansSerif" + halign="center" + height="20" + label=">>" + label_selected=">>" + left_delta="50" + mouse_opaque="true" + name="forward_btn" + tool_tip="Go forward a day" + width="20" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_groups.xml b/indra/newview/skins/default/xui/en/panel_dir_groups.xml new file mode 100644 index 0000000000..ed3f709005 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_groups.xml @@ -0,0 +1,129 @@ +<panel + border="true" + top="30" + follows="left|top|right|bottom" + height="533" + label="Groups" + left="1" + mouse_opaque="false" + name="panel_dir_groups" + width="778"> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + v_pad="0" + width="150"> + Enter search terms: + </text> + <check_box + top_delta="0" + control_name="ShowMatureGroups" + follows="right|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="false" + label="Include Mature groups" + left="510" + mouse_opaque="true" + name="incmature" + width="100" /> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + top_pad="5" + follows="left|right|top" + font="SansSerif" + height="18" + left="5" + max_length="63" + mouse_opaque="true" + name="name" + width="650" /> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + halign="center" + height="20" + label="Search" + top_delta="0" + left_pad="5" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" sort="score" sort_ascending="false" /> + <column label="" name="type" width="-1" /> + <column label="Name" name="name" dynamicwidth="true" /> + <column label="Members" name="members" width="100" halign="left" sort_ascending="false" /> + <column label="" name="score" width="-1"/> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" halign="left" + height="16" left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="328" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_land.xml b/indra/newview/skins/default/xui/en/panel_dir_land.xml new file mode 100644 index 0000000000..61629f3033 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_land.xml @@ -0,0 +1,268 @@ +<panel border="true" top="30" follows="left|top|right|bottom" height="533" + label="Land Sales" left="1" mouse_opaque="false" name="panel_dir_land" + width="778"> + <string name="searching_text"> + Searching... + </string> + <string name="not_found_text"> + None Found. + </string> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + width="150"> + Enter search terms: + </text> + <combo_box + allow_text_entry="false" + follows="top|right" + layout="topleft" + height="18" + top_delta="0" + left="525" + max_chars="20" + mouse_opaque="true" + name="type" + width="128"> + <combo_item name="AllTypes" value="All Types" label="All Types"/> + <combo_item name="Auction" value="Auction" label="Auction"/> + <combo_item name="MainlandSales" value="Mainland Sales" label="For Sale - Mainland"/> + <combo_item name="EstateSales" value="Estate Sales" label="For Sale - Estate"/> + </combo_box> + <check_box + left_pad="5" + control_name="ShowPGLand" + follows="right|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incpg" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_PG_Dark" + tool_tip="General" + layout="topleft" + left_pad="2" + name="rating_icon_general" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowMatureLand" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incmature" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_M_Dark" + tool_tip="Moderate" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowAdultLand" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="false" + label="" + mouse_opaque="true" + name="incadult" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_R_Dark" + tool_tip="Adult" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="16"/> + <check_box + top_pad="3" + layout="topleft" + control_name="FindLandPrice" + follows="left|top" + font="SansSerifSmall" + height="16" + initial_value="true" + label="Price ≤ " + left="5" + mouse_opaque="true" + name="pricecheck" + width="60" /> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + follows="left|top" + layout="topleft" + font="SansSerifSmall" + height="16" + left_pad="1" + max_length="10" + mouse_opaque="true" + name="priceedit" + width="50" /> + <text + bg_visible="false" + border_visible="false" + follows="left|top" + layout="topleft" + font="SansSerifSmall" + halign="left" + height="16" + left_pad="3" + mouse_opaque="true" + name="pricecheck_symbol" + width="15"> + L$ + </text> + <check_box + control_name="FindLandArea" + follows="left|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="true" + label="Area ≥ " + left_pad="10" + mouse_opaque="true" + name="areacheck" + width="60" /> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + follows="left|top" + layout="topleft" + font="SansSerifSmall" + height="16" + left_pad="1" + max_length="10" + mouse_opaque="true" + name="areaedit" + width="50" /> + <text + bg_visible="false" + border_visible="false" + follows="left|top" + layout="topleft" + left_pad="3" + font="SansSerifSmall" + halign="left" + height="16" + mouse_opaque="true" + name="areacheck_symbol" + width="15"> + m² + </text> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + halign="center" + height="20" + label="Search" + top_delta="0" + left="660" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" /> + <column dynamicwidth="true" label="Name" name="name" /> + <column label="Type" name="landtype" width="50" /> + <column label="L$ Price" name="price" width="65" /> + <column label="Area" name="area" width="50" /> + <column label="L$/m²" name="per_meter" width="65" /> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + drop_shadow_visible="true" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" + halign="left" + height="16" + left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="328" /> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_people.xml b/indra/newview/skins/default/xui/en/panel_dir_people.xml new file mode 100644 index 0000000000..fe1a7e9d94 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_people.xml @@ -0,0 +1,120 @@ +<panel + border="true" + top="30" + follows="left|top|right|bottom" + height="533" + label="People" + left="1" + mouse_opaque="false" + name="panel_dir_people" + width="778"> + <string name="searching_text"> + Searching... + </string> + <string name="not_found_text"> + None Found. + </string> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + width="150"> + Enter search terms: + </text> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + top_pad="5" + follows="left|right|top" + font="SansSerif" + height="18" + left="5" + max_length="63" + mouse_opaque="true" + name="name" + width="650" /> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + top_delta="0" + left_pad="5" + height="20" + label="Search" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" /> + <column label="" name="type" width="-1" /> + <column label="Name" name="name" width="274" /> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" + halign="left" + height="16" + left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="328" /> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_places.xml b/indra/newview/skins/default/xui/en/panel_dir_places.xml new file mode 100644 index 0000000000..d337f3addf --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_places.xml @@ -0,0 +1,215 @@ +<panel + border="true" + top="30" + follows="left|top|right|bottom" + height="533" + label="Places" + left="1" + mouse_opaque="false" + name="panel_dir_places" + width="778"> + <string name="searching_text"> + Searching... + </string> + <string name="not_found_text"> + None Found. + </string> + <text + bg_visible="false" + border_visible="false" + top="8" + layout="topleft" + follows="left|top" + font="SansSerif" + h_pad="0" + halign="left" + height="16" + left="5" + mouse_opaque="true" + name="find" + width="150"> + Enter search terms: + </text> + <combo_box + allow_text_entry="false" + follows="right|top" + layout="topleft" + height="18" + top_delta="0" + left="525" + max_chars="20" + mouse_opaque="true" + name="Category" + width="128"> + <combo_item name="AnyCategory" value="any" label="Any Category"/> + <combo_item name="LindenLocation" value="linden" label="Linden Location"/> + <combo_item name="Arts&Culture" value="arts" label="Arts & Culture"/> + <combo_item name="Business" value="store" label="Business"/> + <combo_item name="Educational" value="educational" label="Educational"/> + <combo_item name="Gaming" value="game" label="Gaming"/> + <combo_item name="Hangout" value="gather" label="Hangout"/> + <combo_item name="NewcomerFriendly" value="newcomer" label="Newcomer Friendly"/> + <combo_item name="Parks&Nature" value="park" label="Parks & Nature"/> + <combo_item name="Residential" value="home" label="Residential"/> + <combo_item name="Shopping" value="shopping" label="Shopping"/> + <combo_item name="Adult" value="adult" label="Adult"/> + <combo_item name="Other" value="other" label="Other"/> + </combo_box> + <check_box + left_pad="5" + control_name="ShowPGSims" + follows="right|top" + layout="topleft" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incpg" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_PG_Dark" + tool_tip="General" + layout="topleft" + left_pad="2" + name="rating_icon_general" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowMatureSims" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="true" + label="" + mouse_opaque="true" + name="incmature" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_M_Dark" + tool_tip="Moderate" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="16"/> + <check_box + left_pad="4" + top_delta="1" + layout="topleft" + control_name="ShowAdultSims" + follows="right|top" + font="SansSerifSmall" + height="16" + initial_value="false" + label="" + mouse_opaque="true" + name="incadult" + width="15" /> + <icon + follows="right|top" + height="16" + top_delta="-1" + image_name="Parcel_R_Dark" + tool_tip="Adult" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="16"/> + <line_editor + bevel_style="in" + border_style="line" + border_thickness="1" + top_pad="3" + follows="left|right|top" + layout="topleft" + font="SansSerif" + height="18" + left="5" + max_length="63" + mouse_opaque="true" + name="name" + width="650" /> + <button + follows="right|top" + layout="topleft" + font="SansSerif" + halign="center" + height="20" + label="Search" + top_delta="0" + left_pad="5" + mouse_opaque="true" + name="Search" + width="105" /> + <scroll_list + background_visible="true" + layout="topleft" + top_pad="3" + column_padding="0" + draw_border="true" + draw_heading="true" + follows="left|top|right|bottom" + height="450" + left="5" + mouse_opaque="true" + multi_select="false" + name="results" + search_column="2" + width="336"> + <column label="" name="icon" width="24" /> + <column dynamicwidth="true" label="Name" name="name" /> + <column label="Traffic" name="dwell" width="75" /> + </scroll_list> + <text + bg_visible="false" + border_visible="false" + bottom_delta="-20" + follows="left|bottom" + font="SansSerifSmall" + h_pad="0" + halign="left" + height="16" + left="4" + mouse_opaque="true" + name="result_text" + v_pad="0" + width="328" /> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Previous page" + follows="right|bottom" + height="22" + right="305" + bottom="-533" + name="prev_btn" + width="32" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Next page" + follows="right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="next_btn" + top_delta="0" + width="32"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_dir_web.xml b/indra/newview/skins/default/xui/en/panel_dir_web.xml new file mode 100644 index 0000000000..0dde67681a --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_dir_web.xml @@ -0,0 +1,76 @@ +<panel + border="true" + top="30" + follows="all" + height="543" + label="Web" + left="1" + mouse_opaque="false" + name="panel_dir_web" + width="778"> + <web_browser + top="0" + left="0" + height="515" + width="778" + follows="all" + layout="topleft" + name="web_search" + trusted_content="true"/> + <button + image_overlay="Arrow_Left_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + hover_glow_amount="0.15" + tool_tip="Navigate back" + follows="left|bottom" + height="22" + layout="topleft" + left="5" + name="back_btn" + top_pad="7" + width="22" /> + <button + image_overlay="Arrow_Right_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + chrome="true" + tool_tip="Navigate forward" + follows="left|bottom" + height="22" + layout="topleft" + left_pad="5" + name="forward_btn" + top_delta="0" + width="22"/> + <button + name="home_btn" + follows="left|bottom" + image_overlay="Home_Off" + image_disabled="PushButton_Disabled" + image_disabled_selected="PushButton_Disabled" + image_selected="PushButton_Selected" + image_unselected="PushButton_Off" + layout="topleft" + tool_tip="Search page" + left_pad="5" + height="22" + width="22"/> + <text + type="string" + length="200" + follows="bottom|left" + height="20" + layout="topleft" + left_pad="20" + top_delta="5" + name="statusbartext" + parse_urls="false" + text_color="0.4 0.4 0.4 1" + width="495"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index bd0335df6e..7c528c5319 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -15,7 +15,7 @@ <string name="height_value_label_color" translate="false">White</string> <text follows="top|left|right" - font="SansSerifSmallBold" + font="SansSerifSmall" halign="right" height="12" layout="topleft" @@ -36,7 +36,7 @@ layout="topleft" left="10" name="accordion_panel" - top_pad="0" + top_pad="5" width="313"> <accordion layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_event_info.xml b/indra/newview/skins/default/xui/en/panel_event_info.xml new file mode 100644 index 0000000000..b31918b919 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_event_info.xml @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + border="false" + follows="all" + height="570" + left="0" + top="0" + name="panel_event_info" + title="Event" + width="330"> + <string name="none"> + none + </string> + <string name="notify"> + Notify + </string> + <string name="dont_notify"> + Don't Notify + </string> + <text + top="4" + follows="top|left" + layout="topleft" + font="SansSerifBig" + left="5" + width="417" + height="18" + use_ellipses="true" + name="event_name"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_category_label"> + Type: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_category"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_mature_label"> + Mature Content: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_mature_yes" + visible="false"> + Yes + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_mature_no" + visible="false"> + No + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_date_label"> + Date: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_date"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_duration_label"> + Event Duration: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_duration"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_runby_label"> + Run By: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="116" + name="event_runby"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_location_label"> + Location: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_location"> + (none) + </text> + <text + top_pad="10" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_cover_label"> + Cover Charge: + </text> + <text + top_delta="0" + follows="top|left" + layout="topleft" + font="SansSerif" + left="120" + name="event_cover"> + (none) + </text> + <text + top_pad="20" + follows="top|left" + layout="topleft" + font="SansSerif" + left="20" + name="event_desc_label"> + Description: + </text> + <text_editor + top_pad="10" + follows="left|top" + layout="topleft" + height="220" + left="20" + enabled="false" + max_length="1024" + name="event_desc" + width="400" /> + <button + bottom_delta="-24" + follows="left|top" + height="20" + label="Teleport" + left="20" + name="teleport_btn" + width="130" /> + <button + bottom_delta="0" + follows="left|top" + height="20" + label="Show on Map" + left="155" + name="map_btn" + width="130" /> + <button + bottom_delta="0" + follows="left|top" + height="20" + label="Notify" + left="290" + name="notify_btn" + width="130" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_experience_search.xml b/indra/newview/skins/default/xui/en/panel_experience_search.xml index bb07476ad0..7867361623 100644 --- a/indra/newview/skins/default/xui/en/panel_experience_search.xml +++ b/indra/newview/skins/default/xui/en/panel_experience_search.xml @@ -47,12 +47,14 @@ <text name="lbl name part" left="0" + top_pad="1" follows="top|left|right" right="-1"> Enter part of the name: </text> <line_editor left="0" + top_pad="9" follows="left|top|right" name="edit" height="18" @@ -121,7 +123,7 @@ draw_heading="true" left="0" right="-1" - height="239" + height="236" top_pad="4" follows="all" column_padding="5" diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml deleted file mode 100644 index cdbfd4ac56..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml +++ /dev/null @@ -1,169 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="Classifieds" - name="panel_ls_classifieds"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <text - type="string" - length="1" - follows="left|top" - top_pad="5" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="156"> - Enter search terms: - </text> - <search_combo_box - layout="topleft" - follows="left|top|right" - height="23" - left_delta="0" - name="classifieds_edit" - top="29" - width="650" /> - <combo_box - follows="right|top" - layout="topleft" - height="23" - allow_text_entry="false" - top_delta="0" - left_pad="1" - name="classifieds_category" - width="120"> - <combo_box.commit_callback - function="CommitSearch" /> - </combo_box> - <check_box - control_name="ShowPGClassifieds" - follows="right|top" - height="16" - label="" - layout="topleft" - left="660" - name="pg_all" - top="12" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_PG_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_general" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowMatureClassifieds" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="mature_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_M_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_moderate" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowAdultClassifieds" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="adult_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_R_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_adult" - top_delta="-1" - width="18"/> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_classifieds" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Name" - name="classified_name" - relwidth="0.70" /> - <columns - label="Listing Price" - name="price" - relwidth="0.3"/> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Back" - name="classifieds_back" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Next" - name="classifieds_next" - width="100" - left_pad="1" /> - </panel> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml deleted file mode 100644 index 00f5de5ed4..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml +++ /dev/null @@ -1,258 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="Events" - name="panel_ls_events"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <text - type="string" - length="1" - follows="left|top" - top_pad="5" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="156"> - Enter search terms: - </text> - <radio_group - left_pad="20" - height="16" - width="300" - layout="topleft" - name="events_search_mode"> - <radio_item - height="16" - label="Ongoing and Upcoming" - layout="topleft" - name="current" - value="current" - top_pad="0" - width="120" /> - <radio_item - height="16" - label="By Date" - layout="topleft" - name="date" - value="date" - left_pad="70" - width="120" /> - <radio_group.commit_callback - function="CommitSearch" /> - </radio_group> - <text - type="string" - length="1" - follows="left|top" - top_delta="0" - layout="topleft" - left_pad="5" - name="events_date" - font.style="BOLD" - height="16" - width="80"> - 4/20 - </text> - <search_combo_box - layout="topleft" - follows="left|top|right" - height="23" - left="6" - name="events_edit" - top="29" - width="650" /> - <combo_box - follows="right|top" - layout="topleft" - height="23" - top_delta="0" - left_pad="1" - name="events_category" - width="120"> - <combo_box.item label="Any Category" name="any" value="0" /> - <combo_box.item label="" value="filter_separator" enabled="false" /> - <combo_box.item label="Discussion" name="discussion" value="18" /> - <combo_box.item label="Sports" name="sports" value="19" /> - <combo_box.item label="Live DJ" name="dj" value="30" /> - <combo_box.item label="Live Music" name="music" value="20" /> - <!-- <combo_box.item label="???" name="mystery_category" value="21" /> --> - <combo_box.item label="Commercial" name="commercial" value="22" /> - <combo_box.item label="Nightlife/Entertainment" name="nightlife" value="23" /> - <combo_box.item label="Games/Contests" name="games" value="24" /> - <combo_box.item label="Pageants" name="pageants" value="25" /> - <combo_box.item label="Education" name="education" value="26" /> - <combo_box.item label="Arts and Culture" name="arts" value="27" /> - <combo_box.item label="Charity/Support Groups" name="charity" value="28" /> - <combo_box.item label="Miscellaneous" name="misc" value="29" /> - <combo_box.commit_callback - function="CommitSearch" /> - </combo_box> - <check_box - control_name="ShowPGEvents" - follows="right|top" - height="16" - label="" - layout="topleft" - left="660" - name="pg_all" - top="12" - width="15" > - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_PG_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_general" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowMatureEvents" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="mature_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_M_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_moderate" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowAdultEvents" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="adult_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_R_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_adult" - top_delta="-1" - width="18"/> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_events" - sort_ascending="true" - sort_column="3" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Event Name" - name="name" - relwidth="0.72" /> - <columns - label="Date/Time" - name="date" - sort_column="time" - relwidth="0.28" /> - <columns - label="Time" - name="time" - width="0"/> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Yesterday" - name="events_yesterday" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Today" - name="events_today" - width="100" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Tomorrow" - name="events_tomorrow" - width="100" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - image_bottom_pad="2" - image_overlay="Arrow_Left_Off" - image_overlay_alignment="left" - label="Back" - name="events_back" - width="25" - left_pad="1" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - image_bottom_pad="2" - image_overlay="Arrow_Right_Off" - image_overlay_alignment="left" - label="Next" - name="events_next" - width="25" - left_pad="1" /> - </panel> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml deleted file mode 100644 index 90001952f7..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="Groups" - name="panel_ls_groups"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <text - type="string" - length="1" - follows="left|top" - top_pad="5" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="156"> - Enter search terms: - </text> - <search_combo_box - layout="topleft" - follows="left|top|right" - height="23" - left_delta="0" - name="groups_edit" - top="29" - width="770"> - </search_combo_box> - <check_box - control_name="ShowPGGroups" - follows="right|top" - height="16" - label="" - layout="topleft" - left="660" - name="pg_all" - top="12" - width="15" - visible="false"/> - <icon - follows="right|top" - height="16" - image_name="Parcel_PG_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_general" - top_delta="-1" - width="18" - visible="false"/> - <check_box - control_name="ShowMatureGroups" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="mature_all" - top_delta="1" - width="15" - visible="false"/> - <icon - follows="right|top" - height="16" - image_name="Parcel_M_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_moderate" - top_delta="-1" - width="18" - visible="false"/> - <check_box - control_name="ShowAdultGroups" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="adult_all" - top_delta="1" - width="15" - visible="false"/> - <icon - follows="right|top" - height="16" - image_name="Parcel_R_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_adult" - top_delta="-1" - width="18" - visible="false"/> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_groups" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Group Name" - name="group_name" - relwidth="0.72" /> - <columns - label="Members" - name="members" - relwidth="0.25" /> - <columns - label="Score" - name="score" - width="0" /> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Back" - name="groups_back" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Next" - name="groups_next" - width="100" - left_pad="1" /> - </panel> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml deleted file mode 100644 index bb03a1e999..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml +++ /dev/null @@ -1,281 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="Land Sales" - name="panel_ls_land"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <check_box - control_name="ShowPGLand" - follows="right|top" - height="16" - label="" - layout="topleft" - left="660" - name="pg_all" - top="12" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_PG_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_general" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowMatureLand" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="mature_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_M_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_moderate" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowAdultLand" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="adult_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_R_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_adult" - top_delta="-1" - width="18"/> - <text - type="string" - length="1" - follows="left|top" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="256"> - Enter search terms: - </text> - <combo_box - control_name="FindLandType" - follows="left|top" - layout="topleft" - height="23" - allow_text_entry="false" - top_pad="2" - left="6" - name="land_category" - width="122"> - <combo_box.item label="All Categories" name="All" value="All"/> - <combo_box.item label="Auction" name="Auction" value="Auction"/> - <combo_box.item label="Mainland Sales" name="Mainland" value="Mainland"/> - <combo_box.item label="Estate Sales" name="Estate" value="Estate"/> - <combo_box.commit_callback - function="CommitSearch" /> - </combo_box> - <check_box - control_name="FindLandPrice" - follows="left|top" - height="16" - label="Price <" - layout="topleft" - left_pad="3" - name="price_check" - top_delta="3" - width="40" > - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <line_editor - enabled_control="FindLandPrice" - bevel_style="none" - border_style="line" - border.border_thickness="0" - commit_on_focus_lost="false" - follows="left|top" - height="18" - left_pad="20" - name="edit_price" - top_delta="-1" - width="40" > - <line_editor.commit_callback - function="CommitSearch" /> - </line_editor> - <check_box - control_name="FindLandArea" - follows="left|top" - height="16" - label="Area >" - layout="topleft" - left_pad="3" - name="area_check" - top_delta="1" - width="40" > - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <line_editor - enabled_control="FindLandArea" - bevel_style="none" - border_style="line" - border.border_thickness="0" - commit_on_focus_lost="false" - follows="left|top" - height="18" - left_pad="20" - name="edit_area" - top_delta="-1" - width="40" > - <line_editor.commit_callback - function="CommitSearch" /> - </line_editor> - <text - type="string" - length="1" - follows="left|top" - layout="topleft" - left="365" - name="sort_text" - top="12" - height="16" - width="98"> - Sort results by: - </text> - <check_box - follows="left|top" - height="16" - label="Ascending" - layout="topleft" - left_pad="3" - name="ascending_check" - width="100" > - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <combo_box - follows="left|top" - layout="topleft" - height="23" - allow_text_entry="false" - left_delta="-102" - top_pad="1" - name="land_sort_combo" - width="118"> - <combo_box.item label="Name" name="Name_item" value="Name"/> - <combo_box.item label="Price" name="Price_item" value="Price"/> - <combo_box.item label="Price per meter" name="PPM_item" value="PPM"/> - <combo_box.item label="Area" name="Area_item" value="Area"/> - <combo_box.commit_callback - function="CommitSearch" /> - </combo_box> - <button - follows="top|right" - height="23" - label="Search" - layout="topleft" - left="678" - top_delta="0" - name="land_find" - width="100" /> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_land" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Name" - name="land_name" - relwidth="0.45" /> - <columns - label="Price" - name="price" - relwidth="0.1" /> - <columns - label="Area" - name="area" - relwidth="0.1" /> - <columns - label="L$/m" - name="ppm" - relwidth="0.1" /> - <columns - label="Type" - name="land_type" - relwidth="0.2" /> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Back" - name="land_back" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Next" - name="land_next" - width="100" - left_pad="1" /> - </panel> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml deleted file mode 100644 index 28df02a7e3..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="People" - name="panel_ls_people"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <text - type="string" - length="1" - follows="left|top" - top_pad="5" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="156"> - Enter search terms: - </text> - <search_combo_box - layout="topleft" - follows="left|top|right" - height="23" - left_delta="0" - name="people_edit" - top="29" - width="770"> - </search_combo_box> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - content_type="Agents" - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_people" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Name" - name="username" - relwidth="1" /> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Back" - name="people_back" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Next" - name="people_next" - width="100" - left_pad="1" /> - </panel> -</panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml deleted file mode 100644 index c63818f8e3..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml +++ /dev/null @@ -1,169 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - border="false" - follows="all" - height="566" - layout="topleft" - left="1" - width="780" - label="Places" - name="panel_ls_places"> - <panel - border="false" - follows="top|left|right" - height="53" - layout="topleft" - left="0" - width="780" - name="panel_ls_input"> - <text - type="string" - length="1" - follows="left|top" - top_pad="5" - layout="topleft" - left="6" - name="search_text" - top="12" - height="16" - width="156"> - Enter search terms: - </text> - <search_combo_box - layout="topleft" - follows="left|top|right" - height="23" - left_delta="0" - name="places_edit" - top="29" - width="650" /> - <combo_box - follows="right|top" - layout="topleft" - height="23" - allow_text_entry="false" - top_delta="0" - left_pad="1" - name="places_category" - width="120"> - <combo_box.commit_callback - function="CommitSearch" /> - </combo_box> - <check_box - control_name="ShowPGSims" - follows="right|top" - height="16" - label="" - layout="topleft" - left="660" - name="pg_all" - top="12" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_PG_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_general" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowMatureSims" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="mature_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_M_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_moderate" - top_delta="-1" - width="18"/> - <check_box - control_name="ShowAdultSims" - follows="right|top" - height="16" - label="" - layout="topleft" - left_pad="2" - name="adult_all" - top_delta="1" - width="15"> - <check_box.commit_callback - function="CommitSearch" /> - </check_box> - <icon - follows="right|top" - height="16" - image_name="Parcel_R_Dark" - layout="topleft" - left_pad="2" - name="rating_icon_adult" - top_delta="-1" - width="18"/> - </panel> - <!-- Search Pane --> - <panel - border="true" - follows="all" - height="510" - layout="topleft" - left="1" - width="410" - top_pad="1" - name="panel_ls_scrolllist"> - <scroll_list - draw_heading="true" - follows="all" - height="485" - layout="topleft" - left="0" - name="search_results_places" - top="0" - width="410"> - <columns - label="" - name="icon" - width="20" /> - <columns - label="Name" - name="place_name" - relwidth="0.81" /> - <columns - label="Traffic" - name="dwell" - relwidth="0.16" /> - </scroll_list> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Back" - name="places_back" - top_pad="2" - left="3" - width="100" /> - <button - layout="topleft" - follows="left|bottom" - height="23" - label="Next" - name="places_next" - width="100" - left_pad="1" /> - </panel> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml deleted file mode 100644 index 382a5e8945..0000000000 --- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel -border="false" -follows="all" -height="566" -layout="topleft" -left="1" -width="780" -label="Websearch" -name="panel_ls_web"> - <web_browser - top="5" - bottom="-1" - left="5" - right="-5" - layout="topleft" - follows="all" - name="search_browser" - trusted_content="true" - start_url="about:blank" /> -</panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_gltf_material.xml b/indra/newview/skins/default/xui/en/panel_gltf_material.xml index 45df40bc05..697c6e60b7 100644 --- a/indra/newview/skins/default/xui/en/panel_gltf_material.xml +++ b/indra/newview/skins/default/xui/en/panel_gltf_material.xml @@ -7,7 +7,7 @@ top="0" left="0" height="768" - width="247"> + width="257"> <check_box follows="left|top" layout="topleft" @@ -20,7 +20,7 @@ <panel border="true" follows="left|top" - width="246" + width="256" height="196" layout="topleft" left="1" @@ -175,7 +175,7 @@ <panel border="true" follows="left|top" - width="246" + width="256" height="175" layout="topleft" left="1" @@ -252,7 +252,7 @@ layout="topleft" left_delta="0" top_pad="5" - width="96" + width="105" name="roughness_factor_lbl"> Roughness Factor </text> @@ -273,7 +273,7 @@ <panel border="true" follows="left|top" - width="246" + width="256" height="175" layout="topleft" left="1" @@ -343,7 +343,7 @@ <panel border="true" follows="left|top" - width="246" + width="256" height="175" layout="topleft" left="1" diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index aac4037bb3..d97411f5ab 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -64,8 +64,7 @@ Hover your mouse over the options for more help. use_ellipses="true" width="168" /> <text - font="SansSerifMedium" - text_color="white" + text_color="white" type="string" follows="left|top" height="16" @@ -86,6 +85,15 @@ Hover your mouse over the options for more help. name="btn_join" visible="true" width="120" /> + <button + follows="left|top" + left_pad="6" + top_delta="0" + height="23" + label="Activate" + name="btn_activate" + visible="true" + width="120" /> </panel> <text_editor type="string" diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index ad9ce8f37e..ed6f98fb2b 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -67,23 +67,23 @@ <scroll_list.columns label="Parcel" name="name" - relative_width="0.2" /> + relative_width="0.25" /> <scroll_list.columns label="Region" name="location" - relative_width="0.2" /> + relative_width="0.25" /> <scroll_list.columns label="Type" name="type" - relative_width="0.2" /> + relative_width="0.25" /> <scroll_list.columns label="Area" name="area" - relative_width="0.2" /> + relative_width="0.25" /> <scroll_list.columns label="Hidden" name="hidden" - relative_width="0.2" /> + width="-1" /> </scroll_list> <text type="string" diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index ff6af88707..dff00e4e60 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -44,7 +44,7 @@ layout="topleft" left_pad="5" name="group_name" - top="6" + top="4" use_ellipses="true" value="Unknown" width="242" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 1162dcf20d..2ecc4585ba 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -28,7 +28,7 @@ You can turn off Notices on the General tab. left="5" name="lbl2" right="-1" - top="5" + top="3" width="300"> Notices are kept for 14 days. Maximum 200 per group daily @@ -42,7 +42,7 @@ Maximum 200 per group daily left="0" right="-1" name="notice_list" - top_pad="0" + top_pad="6" width="304"> <scroll_list.columns label="" @@ -276,7 +276,6 @@ Maximum 200 per group daily width="313"> <text type="string" - font="SansSerifMedium" height="16" layout="topleft" left="10" diff --git a/indra/newview/skins/default/xui/en/panel_hint.xml b/indra/newview/skins/default/xui/en/panel_hint.xml index 7442136761..741ed5af41 100644 --- a/indra/newview/skins/default/xui/en/panel_hint.xml +++ b/indra/newview/skins/default/xui/en/panel_hint.xml @@ -3,7 +3,6 @@ width="205" height="34"> <text name="hint_title" - font="SansSerifMedium" left="8" right="180" top="8" diff --git a/indra/newview/skins/default/xui/en/panel_hint_image.xml b/indra/newview/skins/default/xui/en/panel_hint_image.xml index d712245df8..3e3205531f 100644 --- a/indra/newview/skins/default/xui/en/panel_hint_image.xml +++ b/indra/newview/skins/default/xui/en/panel_hint_image.xml @@ -4,7 +4,6 @@ height="40" layout="topleft"> <text name="hint_title" - font="SansSerifMedium" left="8" right="290" top="8" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 0682a5d680..d856b3f66c 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -6,7 +6,7 @@ name="panel_login" focus_root="true" background_visible="true" - bg_opaque_color="0.0 0.0 0.0 1" + bg_opaque_color="DkGrayLogin" background_opaque="true" width="1024"> <panel.string @@ -18,182 +18,379 @@ https://join.secondlife.com/ </panel.string> <layout_stack - follows="left|right|top" - height="172" - left="0" - name="ui_stack" - orientation="horizontal" - top="10" - width="1024"> + follows="all" + layout="topleft" + orientation="horizontal" + name="main_stack" + border_size="0" + animate="false" + top="0" + left="0" + height="768" + width="1024"> + <layout_panel + auto_resize="true" + user_resize="false" + layout="topleft" + name="left_spacer" + background_visible="false" + min_width="0" + expanded_min_dim="0" + width="1"> + </layout_panel> <layout_panel - height="172" - auto_resize="true" - name="ui_elastic_pad_left" - width="32" /> + auto_resize="false" + user_resize="false" + layout="topleft" + name="center_stage" + background_visible="true" + bg_opaque_color="DkGrayLogin" + background_opaque="true" + width="1008" + height="768"> + <layout_stack + follows="all" + layout="topleft" + orientation="horizontal" + name="ui_stack" + border_size="0" + animate="false" + top="0" + left="0" + height="768" + width="1008"> + <layout_panel + auto_resize="false" + user_resize="false" + layout="topleft" + name="ui_container" + width="300" + height="768" + background_visible="true" + bg_opaque_color="PanelDark" + background_opaque="true"> + <icon + height="77" + width="160" + image_name="login_mp_logo_horizontal" + layout="topleft" + follows="left|top" + left="70" + top="39" + name="mp_logo_small" /> + <icon + left="40" + top_pad="30" + width="220" + height="28" + image_name="TextField_Active" + layout="topleft" + follows="left|top" + name="text_field_bg1" /> + <combo_box + left="40" + top_delta="0" + allow_text_entry="true" + follows="left|top" + layout="topleft" + height="28" + label="Username" + combo_editor.font="SansSerifLarge" + max_chars="128" + combo_editor.commit_on_focus_lost="false" + combo_editor.prevalidator="ascii" + tool_tip="The username you chose when you registered, like bobsmith12 or Steller Sunshine" + name="username_combo" + width="220"> + <combo_box.combo_button + image_overlay="ComboButton_Arrow" + image_overlay_right_delta="10" + image_unselected="ComboButton_Transparent" + hover_glow_amount="0" + image_selected="ComboButton_Transparent" + image_disabled="ComboButton_Transparent" /> + <combo_box.combo_editor + background_image="TextField_Transparent" + background_image_disabled="TextField_Transparent" + background_image_focused="TextField_Transparent" + draw_focus_border="false" + text_pad_left="8" + bg_image_always_focused="true"/> + </combo_box> + <check_box + follows="left|top" + font="SansSerifMedium" + label_text.text_color="White" + top_pad="3" + layout="topleft" + height="24" + label="Remember username" + word_wrap="down" + check_button.bottom="3" + name="remember_name" + tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." + width="198"> + <check_box.label_text left="23"/> + <check_box.check_button + image_selected="Checkbox_Slim_On" + image_unselected="Checkbox_Slim_Off" + image_pressed="Checkbox_Slim_Off" + image_pressed_selected="Checkbox_Slim_Off"/> + </check_box> + <line_editor + follows="left|top" + height="28" + top_pad="20" + max_length_chars="16" + text_pad_left="8" + name="password_edit" + label="Password" + bg_image_always_focused="true" + font="SansSerifLarge" + is_password="true" + select_on_focus="true" + draw_focus_border="false" + commit_on_focus_lost="false" + width="220" /> + <check_box + control_name="RememberPassword" + follows="left|top" + font="SansSerifMedium" + label_text.text_color="White" + height="24" + top_pad="3" + label="Remember password" + word_wrap="down" + check_button.bottom="3" + name="remember_password" + width="165"> + <check_box.label_text left="23"/> + <check_box.check_button + image_selected="Checkbox_Slim_On" + image_unselected="Checkbox_Slim_Off" + image_pressed="Checkbox_Slim_Off" + image_pressed_selected="Checkbox_Slim_Off"/> + </check_box> + <text + follows="left|top" + font="SansSerif" + text_color="White" + height="12" + name="location_text" + top_pad="18" + width="120" + valign="center"> + Start here + </text> + <icon + top_pad="6" + width="220" + height="28" + image_name="TextField_Active" + layout="topleft" + follows="left|top" + name="text_field_bg2" /> + <combo_box + allow_text_entry="true" + control_name="NextLoginLocation" + follows="left|top" + label="My favorite places" + height="28" + max_chars="128" + combo_editor.font="SansSerifLarge" + top_delta="0" + name="start_location_combo" + width="220" + combo_button.scale_image="true"> + <combo_box.combo_button + image_overlay="ComboButton_Arrow" + hover_glow_amount="0" + image_overlay_right_delta="10" + image_unselected="ComboButton_Transparent" + image_selected="ComboButton_Transparent" + image_disabled="ComboButton_Transparent" /> + <combo_box.combo_editor + background_image="TextField_Transparent" + background_image_disabled="TextField_Transparent" + background_image_focused="TextField_Transparent" + draw_focus_border="false" + text_pad_left="8" + bg_image_always_focused="true"/> + <combo_box.item + label="My last location" + name="MyLastLocation" + value="last" /> + <combo_box.item + label="My home" + name="MyHome" + value="home" /> + </combo_box> + <layout_stack + follows="left|top" + layout="topleft" + orientation="vertical" + name="login_stack" + border_size="0" + animate="false" + top_pad="0" + left="0" + height="218" + width="300"> + <layout_panel + auto_resize="false" + user_resize="false" + layout="topleft" + name="grid_panel" + background_visible="false" + height="64" + width="300"> + <text + follows="left|top" + font="SansSerif" + text_color="white" + height="12" + name="grid_text" + top="18" + left="40" + width="120" + valign="center"> + Grid + </text> + <combo_box + allow_text_entry="false" + font="SansSerifTiny" + follows="left|top" + height="28" + top_pad="6" + left="40" + max_chars="128" + label="Select grid" + layout="topleft" + name="server_combo" + width="220"> + <combo_box.drop_down_button + pad_bottom="1" + pad_left="10" + font="SansSerifLarge" + label_color="Black" + label_color_selected="Black" + draw_focus_border="false" + image_overlay="ComboButton_Arrow" + image_overlay_right_delta="10" + image_unselected="TextField_Active" + image_selected="TextField_Active" + image_pressed="TextField_Active" + image_pressed_selected="TextField_Active"/> + </combo_box> + </layout_panel> + <layout_panel + auto_resize="false" + user_resize="false" + layout="topleft" + name="login_panel" + background_visible="false" + height="172" + width="300"> + <button + follows="left|top" + image_unselected="PushButton_Login" + image_pressed="PushButton_Login_Pressed" + image_hover_unselected="PushButton_Login_Over" + label="Log in" + label_color="Black" + label_color_disabled="Black" + font="SansSerifLarge" + font.style="BOLD" + name="connect_btn" + draw_focus_border="false" + hover_hand_cursor="true" + enabled="true" + width="220" + height="30" + left="40" + top="25" + pad_bottom="1" /> + <text + follows="left|top" + font="SansSerifMedium" + text_color="EmphasisColor" + height="15" + name="forgot_password_text" + left="60" + top_pad="9" + width="180" + halign="center"> + Need help logging in? + </text> + <button + follows="left|top" + image_unselected="PushButton_Sign" + image_pressed="PushButton_Sign_Pressed" + image_hover_unselected="PushButton_Sign_Over" + label="Create account" + label_color="White" + label_color_disabled="Black" + font="SansSerifMedium" + font.style="BOLD" + name="sign_btn" + draw_focus_border="false" + hover_hand_cursor="true" + width="220" + height="35" + left="40" + top_pad="25" + pad_bottom="1" /> + </layout_panel> + </layout_stack> + </layout_panel> + <layout_panel + auto_resize="false" + user_resize="false" + layout="topleft" + name="middle_gutter" + min_width="18" + max_width="18" + expanded_min_dim="18" + width="18" + height="768" + background_visible="true" + bg_opaque_color="DkGrayLogin" + background_opaque="true"> + </layout_panel> + <layout_panel + auto_resize="false" + user_resize="false" + layout="topleft" + name="web_container" + width="690" + height="768" + background_visible="true" + bg_opaque_color="DkGrayLogin" + background_opaque="true"> + <web_browser + tab_stop="false" + trusted_content="true" + bg_opaque_color="DkGrayLogin" + border_visible="false" + follows="all" + left="0" + top="0" + right="-1" + bottom="-1" + name="login_html" + start_url="" /> + </layout_panel> + </layout_stack> + </layout_panel> <layout_panel - auto_resize="false" - follows="left|right|top" - name="ui_container" - width="1011" - left="0" - top="0" - height="172"> - <icon - height="73" - width="165" - image_name="login_mp_logo" - left="0" - top="25" - name="sl_logo_small" /> - <combo_box - left_pad="22" - bottom_delta="-7" - allow_text_entry="true" - follows="left|top" - height="32" - label="Username" - combo_editor.font="SansSerifLarge" - max_chars="128" - combo_editor.commit_on_focus_lost="false" - combo_editor.prevalidator="ascii" - tool_tip="The username you chose when you registered, like bobsmith12 or Steller Sunshine" - name="username_combo" - width="206"> - <combo_box.combo_editor - text_pad_left="8" - bg_image_always_focused="true"/> - </combo_box> - <line_editor - follows="left|top" - height="32" - left_pad="15" - max_length_chars="16" - text_pad_left="8" - name="password_edit" - label="Password" - bg_image_always_focused="true" - font="SansSerifLarge" - is_password="true" - select_on_focus="true" - commit_on_focus_lost="false" - bottom_delta="0" - width="165" /> - <combo_box - allow_text_entry="true" - control_name="NextLoginLocation" - follows="left|top" - label="My favorite places" - height="32" - max_chars="128" - combo_editor.font="SansSerifLarge" - left_pad="15" - bottom_delta="0" - name="start_location_combo" - width="175" - combo_button.scale_image="true"> - <combo_box.combo_editor - bg_image_always_focused="true" - text_pad_left="8"/> - <combo_box.item - label="My last location" - name="MyLastLocation" - value="last" /> - <combo_box.item - label="My home" - name="MyHome" - value="home" /> - </combo_box> - <button - follows="left|top" - image_unselected="PushButton_Login" - image_pressed="PushButton_Login_Pressed" - image_hover_unselected="PushButton_Login_Over" - label="Log In" - label_color="White" - font="SansSerifMedium" - name="connect_btn" - enabled="true" - width="120" - height="32" - left_pad="15" - bottom_delta="0" /> - <text - follows="left|top" - font="SansSerifLarge" - font.style="BOLD" - text_color="EmphasisColor" - height="34" - name="sign_up_text" - left_pad="10" - width="200" - valign="center"> - Sign up - </text> - <check_box - follows="left|top" - font="SansSerifMedium" - left="185" - bottom_delta="21" - height="24" - label="Remember me" - word_wrap="down" - check_button.bottom="3" - name="remember_name" - tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." - width="198" /> - <check_box - control_name="RememberPassword" - follows="left|top" - font="SansSerifMedium" - height="24" - left="408" - bottom_delta="0" - label="Remember password" - word_wrap="down" - check_button.bottom="3" - name="remember_password" - width="165" /> - <combo_box - allow_text_entry="false" - font="SansSerifTiny" - follows="left|top" - height="26" - left="588" - bottom_delta="8" - max_chars="128" - label="Select grid" - layout="topleft" - name="server_combo" - width="149" /> - <text - follows="left|top" - font="SansSerifMedium" - text_color="EmphasisColor" - height="16" - name="forgot_password_text" - left="778" - bottom_delta="-8" - width="120" - halign="center"> - Password help - </text> - </layout_panel> - <layout_panel - height="172" - auto_resize="true" - name="ui_elastic_pad_right" - width="32" /> + auto_resize="true" + user_resize="false" + layout="topleft" + name="right_spacer" + background_visible="false" + min_width="0" + expanded_min_dim="0" + width="1"> + </layout_panel> </layout_stack> - <web_browser - tab_stop="false" - trusted_content="true" - bg_opaque_color="Black" - border_visible="false" - follows="all" - left="0" - name="login_html" - start_url="" - top="154" - height="600" - width="1024" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml deleted file mode 100644 index d6ac71db94..0000000000 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ /dev/null @@ -1,262 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel - follows="all" - height="768" - layout="topleft" - name="panel_login" - focus_root="true" - background_visible="true" - bg_opaque_color="0.16 0.16 0.16 1" - background_opaque="true" - width="1024"> - <panel.string - name="forgot_password_url"> - http://secondlife.com/account/request.php - </panel.string> - <panel.string - name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack - follows="left|right|top|bottom" - width="1024" - height="768" - left="0" - name="logo_stack" - orientation="vertical" - top="0"> - <layout_panel - height="18" - auto_resize="false" - name="page_top" - width="1024" /> - <!-- start of logo stack --> - <layout_panel - height="130" - min_height="10" - auto_resize="false" - name="parent_panel" - width="1024"> - <layout_stack - follows="left|right|top|bottom" - height="100" - left="0" - name="logo_stack" - orientation="horizontal" - top="0" - width="1024"> - <layout_panel - height="110" - min_height="10" - auto_resize="true" - name="logo_left" - width="300" /> - <layout_panel - auto_resize="false" - follows="left|right|top" - name="logo_container" - width="225" - left="0" - top="0" - height="105"> - <icon - height="94" - image_name="login_sl_logo" - left="0" - name="sl_logo" - top="0" /> - </layout_panel> - <layout_panel - height="100" - name="logo_right" - auto_resize="true" - width="300" /> - </layout_stack> - </layout_panel> - <!-- end of logo stack --> - <!-- start of widget stack --> - <layout_panel - height="100" - min_height="10" - auto_resize="false" - name="parent_panel2" - width="1024"> - <layout_stack - follows="left|right|top|bottom" - height="80" - left="0" - name="widget_stack" - orientation="horizontal" - top="0" - width="1024"> - <layout_panel - height="80" - min_height="10" - auto_resize="true" - name="widget_left" - width="200" /> - <layout_panel - auto_resize="false" - follows="left|right|top" - name="widget_container" - width="730" - left="0" - top="0" - height="80"> - <combo_box - allow_text_entry="true" - follows="left|bottom" - height="32" - left="42" - label="Username" - combo_editor.font="SansSerifLarge" - max_chars="128" - top="0" - combo_editor.prevalidator="ascii" - tool_tip="The username you chose when you registered, like bobsmith12 or Steller Sunshine" - name="username_combo" - width="232"> - <combo_box.combo_editor - text_pad_left="8" /> - <combo_box.combo_button - visible ="false"/> - <combo_box.drop_down_button - visible ="false"/> - </combo_box> - <line_editor - follows="left|top" - width="200" - height="32" - left="262" - max_length_chars="16" - name="password_edit" - label="Password" - text_pad_left="8" - font="SansSerifLarge" - is_password="true" - select_on_focus="true" - commit_on_focus_lost="false" - top="0" /> - <button - follows="left|top" - image_unselected="PushButton_Login" - image_pressed="PushButton_Login_Pressed" - image_hover_unselected="PushButton_Login_Over" - label="Log In" - label_color="White" - font="SansSerifLarge" - name="connect_btn" - left_pad="15" - width="120" - height="32" - top="0" /> - <text - follows="left|top" - font="SansSerifLarge" - font.style="BOLD" - text_color="EmphasisColor" - height="34" - name="sign_up_text" - left_pad="10" - top="0" - width="200" - valign="center"> - Sign up - </text> - <check_box - follows="left|top" - font="SansSerifLarge" - left="42" - top="32" - height="24" - label="Remember me" - word_wrap="down" - check_button.bottom="3" - name="remember_name" - tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." - width="198" /> - <check_box - control_name="RememberPassword" - follows="left|top" - font="SansSerifLarge" - height="24" - left="262" - bottom_delta="0" - label="Remember password" - word_wrap="down" - check_button.bottom="3" - name="remember_password" - width="198" /> - <text - follows="left|top" - font="SansSerifLarge" - text_color="EmphasisColor" - height="16" - name="forgot_password_text" - left="492" - top="34" - width="200"> - Forgotten password - </text> - </layout_panel> - <layout_panel - height="100" - name="widget_right" - auto_resize="true" - width="200" /> - </layout_stack> - </layout_panel> - <!-- end of widget stack --> - <!-- start of images stack --> - <layout_panel - height="500" - min_height="10" - auto_resize="false" - name="parent_panel3" - width="1024"> - <layout_stack - follows="left|right|top|bottom" - height="500" - left="0" - name="images_stack" - orientation="horizontal" - top="0" - width="1024"> - <layout_panel - height="500" - min_height="10" - auto_resize="true" - name="images_left" - width="96" /> - <layout_panel - auto_resize="false" - follows="left|right|top" - name="images_container" - width="675" - left="0" - top="0" - height="500"> - <icon - height="450" - width="675" - image_name="first_login_image" - left="0" - name="image_left" - top="0" /> - </layout_panel> - <layout_panel - height="100" - name="images_right" - auto_resize="true" - width="96" /> - </layout_stack> - </layout_panel> - <!-- end of images stack --> - <layout_panel - height="400" - min_height="10" - auto_resize="true" - name="page_bottom" - width="1024" /> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 6e1e6facbe..a302d44e83 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -34,7 +34,6 @@ left="12" right="-12" name="ItemcountText" - font="SansSerifMedium" text_color="InventoryItemLinkColor" use_ellipses="true" top_pad="0"> diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml index 61cd6a83d4..371147b28a 100644 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml @@ -108,7 +108,6 @@ left="2" width="306" halign="center" - font="SansSerifMedium" font_shadow="hard" valign="top"> Drop folders here to create new listings diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 95787c16c5..9cdbf68e72 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -89,7 +89,7 @@ image_hover_unselected="PushButton_Over" image_bottom_pad="1" layout="topleft" - left="10" + left="9" name="back_btn" tool_tip="Go back to previous location" top="2" @@ -102,7 +102,7 @@ image_hover_unselected="PushButton_Over" image_bottom_pad="1" layout="topleft" - left_pad="0" + left_pad="1" name="forward_btn" tool_tip="Go forward one location" top_delta="0" diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index bfe738f472..eaf638d35f 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -49,7 +49,7 @@ embedded_items="false" enabled="false" follows="left|right|top|bottom" - height="85" + height="85" layout="topleft" left="10" mouse_opaque="false" @@ -67,16 +67,16 @@ <panel background_visible="false" follows="left|right|bottom" - height="30" + height="30" width="290" label="control_panel" layout="topleft" left="10" name="control_panel" top_pad="5"> - <!-- + <!-- Notes: - This panel holds buttons of notification. Change of its size can affect the layout of buttons. + This panel holds buttons of notification. Change of its size can affect the layout of buttons. --> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 80db209b59..c6e2c124d1 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -63,7 +63,8 @@ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + <!-- Old DejaVu font is used to avoid overlapping with sender name --> + <text allow_scroll="false" font="DejaVu" font.size="LSmall" top="0" right="-5" width="100" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time" value="2014/12/24 23:30" /> </panel> </panel> @@ -105,7 +106,8 @@ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + <!-- Old DejaVu font is used to avoid overlapping with sender name --> + <text allow_scroll="false" font="DejaVu" font.size="LSmall" top="0" right="-1" width="100" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time_exp" value="2014/12/24 23:30" /> </panel> <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="all" layout="topleft" name="notification_text_panel_exp" visible="true"> diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index dc8ac425b6..352eb790a3 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -216,7 +216,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap <button follows="left|bottom" height="22" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" is_toggle="true" @@ -251,7 +251,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="bottom|right" height="22" image_overlay="Search_Icon" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" is_toggle="true" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 0766cc06ee..9657d80fc2 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -183,6 +183,7 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip increment="1" follows="left|top" left="5" + top_pad="5" min_val="0" max_val="4096" label="Range:" @@ -199,13 +200,13 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip <layout_stack clip="false" follows="all" - height="410" + height="406" layout="topleft" left="0" mouse_opaque="false" orientation="vertical" right="-1" - top_pad="0"> + top_pad="3"> <layout_panel height="142" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml b/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml index 9f930d1557..1bea605d91 100644 --- a/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml +++ b/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml @@ -144,7 +144,7 @@ <button follows="top|left" height="22" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" label="Auto-adjust now" @@ -157,7 +157,7 @@ <button follows="top|left" height="22" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" label="Cancel" @@ -183,7 +183,7 @@ follows="top|left" height="20" initial_value="true" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" is_toggle="true" diff --git a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml index a412543251..07da9b4794 100644 --- a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml +++ b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml @@ -91,7 +91,7 @@ layout="topleft" left_pad="40" name="fastest_lbl" - width="40"> + width="42"> Fastest </text> <radio_group @@ -240,7 +240,7 @@ left_pad="10" top_delta="1" name="farther_lbl" - width="40"> + width="45"> Farther </text> <text @@ -284,7 +284,7 @@ top_delta="0" left="160" name="enhancements_desc" - width="350"> + width="375"> Shadows significantly improve visual quality but can reduce speed. </text> <text @@ -307,7 +307,8 @@ left_delta="150" top_delta="0" name="ShadowDetail" - width="150"> + width="153"> + <combo_box.drop_down_button pad_right="20" /> <combo_box.item label="None" name="0" @@ -417,7 +418,7 @@ top_delta="3" left_pad="10" name="photo_dist_det_desc" - width="180"> + width="192"> (Enter value between 0.0 and 4.0) </text> <text @@ -426,7 +427,7 @@ height="18" layout="topleft" top="80" - left="213" + left="215" name="0_lbl" width="7"> 0 @@ -446,7 +447,7 @@ font="SansSerifSmall" height="18" layout="topleft" - left_pad="30" + left_pad="29" name="2_lbl" width="7"> 2 @@ -468,7 +469,7 @@ layout="topleft" left_pad="30" name="4_lbl" - width="7"> + width="8"> 4 </text> <text @@ -476,7 +477,7 @@ font="SansSerifSmall" height="18" layout="topleft" - left_pad="30" + left_pad="29" name="5_lbl" width="7"> 5 diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index b27b6dd73a..86ec799996 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -13,18 +13,6 @@ name="aspect_ratio_text"> [NUM]:[DEN] </panel.string> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - left="33" - name="Cache:" - top_pad="10" - width="100"> - Cache: - </text> <spinner control_name="CacheSize" decimal_digits="0" @@ -33,14 +21,14 @@ increment="64" initial_value="1024" label="Cache size (896 - 32768MB)" - label_width="150" + label_width="170" layout="topleft" - left="80" + left="33" max_val="32768" min_val="896" top_pad="10" name="cachesizespinner" - width="210" /> + width="230" /> <text type="string" length="1" @@ -59,7 +47,7 @@ label="Clear Cache" label_selected="Clear Cache" layout="topleft" - left_pad="20" + left_pad="25" name="clear_cache" top_delta="0" width="100"> @@ -72,7 +60,7 @@ follows="left|top" height="10" layout="topleft" - left="80" + left="33" name="Cache location" top_pad="5" width="300"> @@ -86,7 +74,7 @@ font="SansSerif" height="23" layout="topleft" - left="80" + left="33" max_length_bytes="4096" name="cache_location" top_pad="5" @@ -113,7 +101,7 @@ left_pad="3" name="default_cache_location" top_delta="0" - width="100"> + width="104"> <button.commit_callback function="Pref.ResetCache" /> </button> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index df9f467fca..0ff4ef42ce 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -520,12 +520,21 @@ value="default" width="75" /> <radio_item - label="gold" + label="classic" left_pad="0" layout="topleft" top_delta="0" height="16" name="radio2" + value="classic" + width="75" /> + <radio_item + label="gold" + left_pad="0" + layout="topleft" + top_delta="0" + height="16" + name="radio3" value="gold" width="75" /> <radio_item @@ -534,7 +543,7 @@ layout="topleft" top_delta="0" height="16" - name="radio3" + name="radio4" value="contrast" width="75" /> <radio_item @@ -543,7 +552,7 @@ layout="topleft" top_delta="0" height="16" - name="radio2" + name="radio5" value="contrast_gold" width="75" /> <radio_group.commit_callback diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ddddb4855f..6d1b952639 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -110,10 +110,11 @@ left="255" max_chars="135" name="time_format_combobox" - width="70"> + width="71"> + <combo_box.drop_down_button pad_right="22" /> <combo_box.item enabled="true" - label="1:00 AM" + label="1:00 PM" name="12H" value="0" /> <combo_box.item @@ -244,7 +245,7 @@ height="20" layout="topleft" left="35" - top_pad="0" + top_pad="5" name="Name_Tag_Preference"> <radio_item label="Off" @@ -295,16 +296,16 @@ tool_tip="Show username, like bobsmith123" top_delta="0" /> <check_box - control_name="NameTagShowGroupTitles" - enabled_control="AvatarNameTagMode" + control_name="UseDisplayNames" + follows="top|left" height="16" - label="Group titles" + label="Display names" layout="topleft" left="35" - width="100" - name="show_all_title_checkbox1" - tool_tip="Show group titles, like Officer or Member" - top_pad="3" /> + name="display_names_check" + width="100" + tool_tip="Check to use display names in chat, IM, name tags, etc." + top_pad="5"/> <check_box control_name="NameTagShowFriends" enabled_control="AvatarNameTagMode" @@ -313,19 +314,29 @@ layout="topleft" left_pad="50" name="show_friends" - tool_tip="Highlight the name tags of your friends"/> - <check_box - control_name="UseDisplayNames" - follows="top|left" - height="16" - label="View Display Names" - layout="topleft" - left="35" - name="display_names_check" - width="237" - tool_tip="Check to use display names in chat, IM, name tags, etc." - top_pad="3"/> - + tool_tip="Highlight the name tags of your friends"/> + <combo_box + height="23" + layout="topleft" + control_name="GroupTitlesTagMode" + enabled_control="AvatarNameTagMode" + left="38" + top_pad="3" + name="group_title" + width="130"> + <combo_box.item + label="No group tags" + name="no_tags" + value="0" /> + <combo_box.item + label="Only my group tag" + name="my_tag" + value="1" /> + <combo_box.item + label="All group tags" + name="all_tags" + value="2" /> + </combo_box> <text type="string" length="1" @@ -334,7 +345,7 @@ layout="topleft" left="30" name="inworld_typing_rg_label" - top_pad="1" + top_pad="5" width="400"> Pressing letter keys: </text> @@ -343,7 +354,7 @@ height="34" layout="topleft" left="35" - top_pad="0" + top_pad="5" name="inworld_typing_preference"> <radio_item label="Starts local chat" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index c78575cf82..9d55db27b8 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -104,7 +104,7 @@ layout="topleft" left="65" name="FasterText" - top_pad="4" + top_pad="10" width="80"> Faster </text> @@ -114,14 +114,14 @@ follows="left|top" height="12" layout="topleft" - left_delta="360" + left_delta="363" name="BetterText" top_delta="0" width="100"> Better </text> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -130,7 +130,7 @@ top_delta="-2" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -138,7 +138,7 @@ name="LowMidGraphicsDivet" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -147,7 +147,7 @@ top_delta="0" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -156,7 +156,7 @@ top_delta="0" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -165,7 +165,7 @@ top_delta="0" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -174,7 +174,7 @@ top_delta="0" width="2" /> <icon - color="DkGray" + color="DkGray0" height="14" image_name="Rounded_Square" layout="topleft" @@ -216,15 +216,15 @@ min_val="8" max_val="512" name="DrawDistance" - top_delta="40" - width="427" /> + top_delta="34" + width="428" /> <text type="string" length="1" follows="left|top" height="12" layout="topleft" - left_delta="427" + left_delta="425" name="DrawDistanceMeterText2" top_delta="0" width="128"> @@ -286,7 +286,7 @@ initial_value="101" increment="1" label="Avatar maximum complexity:" - label_width="165" + label_width="187" layout="topleft" left="30" min_val="1" @@ -294,7 +294,7 @@ name="IndirectMaxComplexity" show_text="false" top_delta="28" - width="300"> + width="394"> <slider.commit_callback function="Pref.UpdateIndirectMaxComplexity" parameter="IndirectMaxComlexityText" /> @@ -306,7 +306,7 @@ height="16" layout="topleft" top_delta="0" - left_delta="304" + left_delta="398" text_readonly_color="LabelDisabledColor" name="IndirectMaxComplexityText" width="65"> @@ -329,7 +329,7 @@ label_width="240" left="30" top_delta="20" - width="393"> + width="394"> <slider.commit_callback function="Pref.UpdateIndirectMaxNonImpostors" parameter="IndirectNonImpostorsText" /> @@ -341,7 +341,7 @@ height="16" layout="topleft" top_delta="0" - left_delta="397" + left_delta="398" text_readonly_color="LabelDisabledColor" name="IndirectMaxNonImpostorsText" width="65"> @@ -369,7 +369,7 @@ increment="0.1" initial_value="160" label="Brightness (exposure)" - label_width="145" + label_width="187" layout="topleft" left="30" min_val="0.5" @@ -377,7 +377,7 @@ name="RenderExposure" show_text="true" top_pad="14" - width="260"> + width="424"> </slider> <!-- End of Basic Settings block --> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 258c49785e..2036ed75ca 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -170,7 +170,7 @@ left="30" name="Software updates:" mouse_opaque="false" - top_pad="5" + top_pad="8" width="300"> Software updates: </text> @@ -180,7 +180,7 @@ height="23" layout="topleft" left_delta="50" - top_pad="5" + top_pad="10" name="updater_service_combobox" width="300"> <combo_box.item @@ -197,29 +197,29 @@ value="0" /> </combo_box> <check_box - top_delta="4" + top_pad="10" enabled="true" follows="left|top" + layout="topleft" height="14" control_name="UpdaterWillingToTest" label="Willing to update to Beta" left_delta="0" mouse_opaque="true" name="update_willing_to_test" - width="400" - top_pad="5"/> + width="400"/> <check_box - top_delta="4" + top_pad="8" enabled="true" follows="left|top" + layout="topleft" height="14" control_name="UpdaterShowReleaseNotes" label="Show Release Notes after update" left_delta="0" mouse_opaque="true" name="update_show_release_notes" - width="400" - top_pad="5"/> + width="400"/> <text type="string" length="1" @@ -229,7 +229,7 @@ left="30" name="Proxy Settings:" mouse_opaque="false" - top_pad="5" + top_pad="8" width="300"> Proxy Settings: </text> @@ -242,8 +242,7 @@ layout="topleft" left_delta="50" name="set_proxy" - top_pad="5" - > + top_pad="10" > <button.commit_callback function="Pref.Proxy" /> </button> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 52413abe74..1dcbf4e666 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -319,7 +319,7 @@ top_delta="25" name="Listen media from" height="15" - width="165" + width="180" halign="right"> Hear media and sounds from </text> @@ -327,7 +327,7 @@ control_name="MediaSoundsEarLocation" follows="left|top" layout="topleft" - left_pad="5" + left_pad="10" width="130" height="23" top_delta="-4" @@ -346,7 +346,7 @@ layout="topleft" height="15" left="23" - width="165" + width="180" name="media_autoplay_label" halign="right"> Auto-play media @@ -357,7 +357,7 @@ follows="left|top" layout="topleft" height="23" - left_delta="170" + left_delta="190" top_delta="-4" name="media_auto_play_combo" width="130"> @@ -379,7 +379,7 @@ layout="topleft" height="15" left="23" - width="165" + width="180" name="media_firstinteract_label" halign="right"> Media first-interact @@ -390,11 +390,12 @@ follows="left|top" layout="topleft" height="23" - left_delta="170" + left_delta="190" top_delta="-4" width="130" name="media_first_interact_combo" tool_tip="This setting controls which media (once loaded) does not require a first click to focus before interaction can begin. This allows clicks to be passed directly to media bypassing the focus click requirement. Each option also inherits the previous ones."> + <combo_box.drop_down_button pad_right="19" /> <item label="Disabled" name="media_first_click_none" @@ -457,7 +458,7 @@ layout="topleft" follows="left" height="15" - width="165" + width="187" name="noise_suppression_label" left="23" top_delta="22" @@ -469,7 +470,7 @@ enabled_control="EnableVoiceChat" follows="left|top" layout="topleft" - left_delta="170" + left_delta="190" top_delta="-6" width="130" height="23" @@ -503,7 +504,7 @@ left="23" top_delta="30" name="Listen from" - width="165" + width="180" height="15" halign="right"> Hear voice from @@ -513,7 +514,7 @@ control_name="VoiceEarLocation" follows="left|top" layout="topleft" - left_delta="170" + left_delta="190" top_delta="-6" width="130" height="23" @@ -545,7 +546,7 @@ tool_tip="Check to enable voice echo cancellation" label="Echo Cancellation" layout="topleft" - left="260" + left="275" name="enable_echo_cancellation" top_pad="-15" width="200"/> @@ -558,7 +559,7 @@ layout="topleft" left="20" name="push_to_talk_toggle_check" - width="237" + width="245" tool_tip="When in toggle mode, press and release the trigger key ONCE to switch your microphone on or off. When not in toggle mode, the microphone broadcasts your voice only while the trigger is being held down." top_pad="5"/> <check_box @@ -569,7 +570,7 @@ label="Automatic Gain Control" layout="topleft" name="voice_automatic_gain_control" - left="260" + left="275" top_pad="-15" width="200"/> <check_box @@ -591,7 +592,7 @@ label="Show voice dot above avatars" layout="topleft" name="voice_dot_visualizer" - left="260" + left="275" top_pad="-15" width="200"/> <button @@ -603,7 +604,7 @@ label="Voice Input/Output devices" layout="topleft" left="20" - top_pad="0" + top_pad="1" name="device_settings_btn" width="200"> </button> diff --git a/indra/newview/skins/default/xui/en/panel_region_experiences.xml b/indra/newview/skins/default/xui/en/panel_region_experiences.xml index 199dca4853..5e9ebabba7 100644 --- a/indra/newview/skins/default/xui/en/panel_region_experiences.xml +++ b/indra/newview/skins/default/xui/en/panel_region_experiences.xml @@ -13,7 +13,6 @@ <panel.string name="trusted_estate_text"> Any Experience may be Key. - Key Experiences have permission to run on this estate. Additionally, if the estate does not allow public access, Residents participating in any Key Experience may enter the estate and can remain as long as they are in a Key Experience. diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 6ef1b6e44a..4e624276cc 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -33,6 +33,28 @@ unknown </text> <text + follows="right|top" + font="SansSerif" + height="20" + layout="topleft" + top_delta="0" + right="-100" + name="estate_id_lbl" + width="80"> + Estate ID: + </text> + <line_editor + follows="right|top" + font="SansSerif" + height="20" + layout="topleft" + top_delta="0" + name="estate_id" + enabled="false" + right="-10" + initial_value="unknown" + width="85" /> + <text follows="left|top" font="SansSerif" height="20" @@ -45,16 +67,49 @@ </text> <text follows="left|top" - font="SansSerif" + font="SansSerifSmall" height="20" layout="topleft" - left_delta="50" + left_delta="53" name="version_channel_text" - top_delta="0" + top_delta="1" width="400"> unknown </text> <text + follows="right|top" + font="SansSerif" + height="20" + layout="topleft" + top_delta="-1" + right="-100" + name="grid_position_lbl" + width="80"> + Grid Position: + </text> + <line_editor + follows="right|top" + font="SansSerif" + height="20" + layout="topleft" + right="-55" + name="grid_position_x" + enabled="false" + top_delta="0" + default_text="n/a" + width="40" /> + <line_editor + follows="right|top" + font="SansSerif" + height="20" + layout="topleft" + right="-10" + name="grid_position_y" + enabled="false" + top_delta="0" + default_text="n/a" + width="40" /> + <text follows="left|top" font="SansSerif" height="20" diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml index 73e0a1000f..dd9907dc1f 100644 --- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml @@ -42,7 +42,7 @@ max_val="100" name="water_height_spin" top="40" - width="180" /> + width="190" /> <spinner follows="left|top" height="20" @@ -54,7 +54,7 @@ max_val="100" name="terrain_raise_spin" top="40" - width="180" /> + width="190" /> <spinner follows="left|top" height="20" @@ -67,7 +67,7 @@ min_val="-100" name="terrain_lower_spin" top="60" - width="180" /> + width="190" /> <view_border bevel_style="none" follows="top|left" @@ -330,7 +330,7 @@ follows="left|top" height="20" layout="topleft" - left_pad="10" + left_pad="15" name="height_text_lbl7" top_delta="0" width="100"> @@ -349,7 +349,7 @@ min_val="-500" name="height_start_spin_1" top_delta="15" - width="100" /> + width="105" /> <!-- northeast low--> <spinner follows="left|top" @@ -363,7 +363,7 @@ min_val="-500" name="height_start_spin_3" top_delta="0" - width="100" /> + width="105" /> <!-- northwest high--> <spinner follows="left|top" @@ -377,7 +377,7 @@ min_val="-500" name="height_range_spin_1" top_delta="20" - width="100" /> + width="105" /> <!-- northeast high--> <spinner follows="left|top" @@ -391,7 +391,7 @@ min_val="-500" name="height_range_spin_3" top_delta="0" - width="100" /> + width="105" /> <text follows="left|top" height="20" @@ -406,7 +406,7 @@ follows="left|top" height="20" layout="topleft" - left_pad="10" + left_pad="15" name="height_text_lbl9" top_delta="0" width="100"> @@ -425,7 +425,7 @@ min_val="-500" name="height_start_spin_0" top_delta="15" - width="100" /> + width="105" /> <!-- southeast low--> <spinner follows="left|top" @@ -439,7 +439,7 @@ min_val="-500" name="height_start_spin_2" top_delta="0" - width="100" /> + width="105" /> <!--southwest high--> <spinner follows="left|top" @@ -453,7 +453,7 @@ min_val="-500" name="height_range_spin_0" top_delta="20" - width="100" /> + width="105" /> <!-- southeast high--> <spinner follows="left|top" @@ -467,7 +467,7 @@ min_val="-500" name="height_range_spin_2" top_delta="0" - width="100" /> + width="105" /> <!-- Terrain Download/Upload/Bake buttons --> <button follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_script_question_toast.xml b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml index 1b1e31165a..9045e6a8ae 100644 --- a/indra/newview/skins/default/xui/en/panel_script_question_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml @@ -6,7 +6,7 @@ bg_alpha_color="PanelNotificationBackground" bg_opaque_color="PanelNotificationBackground" chrome="true" - height="270" + height="220" label="script_question_panel" layout="topleft" left="0" @@ -39,9 +39,9 @@ width="285"> </panel> <text - follows="all" + follows="left|right|top" font="SansSerifBold" - height="55" + height="15" layout="topleft" mouse_opaque="false" name="bottom_info_message" diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml index a29cdb5b41..c03d6a9745 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml @@ -35,7 +35,7 @@ layout="topleft" left_delta="15" top_pad="15" - width="80"> + width="86"> Ambient Color: </text> <color_swatch @@ -53,9 +53,9 @@ follows="left" height="10" layout="topleft" - left_delta="90" + left_delta="110" top_delta="-15" - width="80"> + width="86"> Blue Horizon: </text> <color_swatch @@ -73,9 +73,9 @@ follows="left" height="10" layout="topleft" - left_delta="90" + left_delta="110" top_delta="-15" - width="80"> + width="86"> Blue Density: </text> <color_swatch @@ -166,7 +166,7 @@ layout="topleft" left_delta="-5" top_delta="25" - width="80"> + width="90"> Moisture Level: </text> <slider @@ -190,7 +190,7 @@ layout="topleft" left_delta="-5" top_delta="25" - width="80"> + width="90"> Droplet Radius: </text> <slider diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml index 0cac1b410f..90bdea93fa 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml @@ -60,6 +60,10 @@ name="Large(512x512)" value="[i512,i512]" /> <combo_box.item + label="Huge (1024x1024)" + name="Huge(1024x1024)" + value="[i1024,i1024]" /> + <combo_box.item label="Current Window" name="CurrentWindow" value="[i0,i0]" /> diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index ef77698e0d..6045c58e21 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -21,10 +21,14 @@ Bandwidth </panel.string> <panel.string - name="time"> + name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string + name="time"> + [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt] + </panel.string> + <panel.string name="timeTooltip"> [weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt] </panel.string> @@ -87,7 +91,7 @@ left="0" name="balance" tool_tip="L$ [AMT] Click to refresh your L$ balance. Double-click to display or hide your L$ balance." - v_pad="4" + v_pad="2" top="0" wrap="false" value="L$??" @@ -98,7 +102,7 @@ follows="right|top|bottom" image_hover_unselected="PushButton_Over" image_unselected="PushButton_Off" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" height="18" label="Buy L$" label_color="White" @@ -118,7 +122,7 @@ image_overlay_alignment="left" image_hover_unselected="PushButton_Over" image_unselected="PushButton_Off" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" height="18" label="Shop" label_color="White" @@ -136,7 +140,7 @@ follows="right|top" halign="right" height="16" - top="5" + top="3" layout="topleft" left_pad="0" name="TimeText" diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 1c70383bf9..5ff02de6f6 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -51,7 +51,9 @@ name="color label" text_readonly_color="LabelDisabledColor" top="6" - width="64"> + width="64" + font="DejaVu" + font.size="LSmall" > Color </text> <!-- label is blank because control places it below the box --> @@ -77,7 +79,9 @@ name="color trans" text_readonly_color="LabelDisabledColor" top="6" - width="110"> + width="110" + font="DejaVu" + font.size="LSmall" > Transparency % </text> <spinner @@ -91,7 +95,9 @@ max_val="100" name="ColorTrans" top_pad="4" - width="80" /> + width="80" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -102,7 +108,9 @@ name="glow label" text_readonly_color="LabelDisabledColor" top="6" - width="80"> + width="80" + font="DejaVu" + font.size="LSmall" > Glow </text> <spinner @@ -114,7 +122,9 @@ left_delta="0" name="glow" top_pad="4" - width="77" /> + width="77" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Full Bright" @@ -122,7 +132,9 @@ left="7" name="checkbox fullbright" top_pad="4" - width="81" /> + width="81" + font="DejaVu" + font.size="LSmall" /> <check_box height="19" label="Hide water" @@ -130,7 +142,9 @@ left="172" top_delta="0" name="checkbox_hide_water" - width="81" /> + width="81" + font="DejaVu" + font.size="LSmall" /> <view_border bevel_style="none" follows="top|left" @@ -139,7 +153,9 @@ left="8" name="object_horizontal" top_pad="4" - width="278" /> + width="278" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -149,7 +165,9 @@ left="12" top_pad="12" name="label_matmedia" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" > Material </text> <combo_box @@ -158,7 +176,9 @@ left="10" name="combobox matmedia" top_pad="5" - width="90"> + width="90" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Textures" name="Materials" @@ -179,7 +199,9 @@ top_delta="-20" width="150" visible = "false" - name="radio_material_type"> + name="radio_material_type" + font="DejaVu" + font.size="LSmall" > <radio_item label="Texture (diffuse)" name="Texture (diffuse)" @@ -209,7 +231,9 @@ top_delta="0" width="150" visible = "false" - name="radio_pbr_type"> + name="radio_pbr_type" + font="DejaVu" + font.size="LSmall" > <radio_item label="Complete material" name="Complete material" @@ -270,7 +294,9 @@ name="checkbox_sync_settings" tool_tip="Adjust all maps repeats simultaneously" top_pad="19" - width="160" /> + width="160" + font="DejaVu" + font.size="LSmall" /> <texture_picker can_apply_immediately="true" allow_no_texture="true" @@ -282,7 +308,9 @@ name="pbr_control" tool_tip="Click to choose a pbr material" top_pad="5" - width="64" /> + width="64" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <button follows="left|top" height="23" @@ -291,7 +319,9 @@ top_delta="0" name="pbr_from_inventory" label="Choose from inventory" - width="140"/> + width="140" + font="DejaVu" + font.size="LSmall" /> <text visible="false" type="string" @@ -303,7 +333,9 @@ left_delta="0" name="material_permissions_loading_label" text_readonly_color="LabelDisabledColor" - width="160"> + width="160" + font="DejaVu" + font.size="LSmall" > Loading contents... </text> <button @@ -314,7 +346,9 @@ top_delta="0" name="edit_selected_pbr" label="Edit Selected" - width="140"/> + width="140" + font="DejaVu" + font.size="LSmall" /> <button follows="left|top" height="23" @@ -323,7 +357,9 @@ top_pad="4" name="save_selected_pbr" label="Save to inventory" - width="140"/> + width="140" + font="DejaVu" + font.size="LSmall" /> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -336,7 +372,9 @@ name="texture control" tool_tip="Click to choose a picture" top_delta="-54" - width="64" /> + width="64" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <text type="string" length="1" @@ -347,7 +385,9 @@ name="label alphamode" text_readonly_color="LabelDisabledColor" top_delta="0" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" > Alpha mode </text> <combo_box @@ -356,7 +396,9 @@ left_delta="0" name="combobox alphamode" top_pad="4" - width="120"> + width="120" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall"> <combo_box.item label="None" name="None" @@ -384,7 +426,9 @@ name="label maskcutoff" text_readonly_color="LabelDisabledColor" top_pad="4" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" > Mask cutoff </text> <spinner @@ -399,7 +443,9 @@ left_delta="0" increment="1" name="maskcutoff" - width="80" /> + width="80" + font="DejaVu" + font.size="LSmall" /> <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -413,7 +459,9 @@ name="bumpytexture control" tool_tip="Click to choose a picture" top_delta="-55" - width="64" /> + width="64" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <text type="string" length="1" @@ -424,7 +472,9 @@ name="label bumpiness" text_readonly_color="LabelDisabledColor" top_delta="0" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" > Bumpiness </text> <combo_box @@ -433,7 +483,9 @@ left_delta="0" name="combobox bumpiness" top_pad="4" - width="90"> + width="90" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="None" name="None" @@ -527,7 +579,9 @@ name="shinytexture control" tool_tip="Click to choose a picture" top_delta="-14" - width="64" /> + width="64" + caption_text.font="DejaVu" + caption_text.font.size="LSmall" /> <text type="string" length="1" @@ -538,7 +592,9 @@ left_pad="10" text_readonly_color="LabelDisabledColor" top_delta="4" - width="90"> + width="90" + font="DejaVu" + font.size="LSmall" > Shininess </text> <combo_box @@ -547,7 +603,9 @@ left_pad="10" name="combobox shininess" top_delta="-6" - width="90"> + width="90" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="None" name="None" @@ -582,7 +640,9 @@ name="label glossiness" text_readonly_color="LabelDisabledColor" top_pad="7" - width="116"> + width="116" + font="DejaVu" + font.size="LSmall" > Glossiness </text> <spinner @@ -597,7 +657,9 @@ top_delta="-4" left_pad="10" name="glossiness" - width="64" /> + width="64" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -608,7 +670,9 @@ name="label environment" text_readonly_color="LabelDisabledColor" top_pad="8" - width="116"> + width="116" + font="DejaVu" + font.size="LSmall" > Environment </text> <spinner @@ -623,7 +687,9 @@ top_delta="-4" left_pad="10" name="environment" - width="64" /> + width="64" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -634,7 +700,9 @@ name="label shinycolor" text_readonly_color="LabelDisabledColor" top_pad="8" - width="116"> + width="116" + font="DejaVu" + font.size="LSmall" > Color </text> <!-- label is blank because control places it below the box --> @@ -658,7 +726,9 @@ use_ellipses="true" read_only="true" name="media_info" - width="280"> + width="280" + font="DejaVu" + font.size="LSmall" > URL of chosen media, if any, goes here </text> <button @@ -670,7 +740,9 @@ top_pad="4" tool_tip="Add Media" label="Choose..." - width="85"/> + width="85" + font="DejaVu" + font.size="LSmall" /> <button follows="top|left" height="18" @@ -680,7 +752,9 @@ tool_tip="Delete this media texture" top_delta="0" label="Remove" - width="85"/> + width="85" + font="DejaVu" + font.size="LSmall" /> <button follows="left|top" height="18" @@ -691,7 +765,9 @@ name="button align" top_delta="0" tool_tip="Align media texture (must load first)" - width="85" /> + width="85" + font="DejaVu" + font.size="LSmall" /> <text type="string" length="1" @@ -702,7 +778,9 @@ name="tex gen" text_readonly_color="LabelDisabledColor" top_pad="46" - width="140"> + width="140" + font="DejaVu" + font.size="LSmall" > Mapping </text> <combo_box @@ -711,7 +789,9 @@ left_pad="0" name="combobox texgen" top_pad="-13" - width="125"> + width="125" + drop_down_button.font="DejaVu" + drop_down_button.font.size="LSmall" > <combo_box.item label="Default" name="Default" @@ -733,7 +813,9 @@ max_val="10000" name="TexScaleU" top_pad="5" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -745,7 +827,9 @@ min_val="-10000" max_val="10000" name="TexScaleV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="1" follows="left|top" @@ -758,7 +842,9 @@ max_val="100" min_val="-100" name="rptctrl" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -772,7 +858,9 @@ max_val="360" min_val="-360" name="TexRot" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -784,7 +872,9 @@ min_val="-1" max_val="1" name="TexOffsetU" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -796,7 +886,9 @@ min_val="-1" max_val="1" name="TexOffsetV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -809,7 +901,9 @@ max_val="10000" name="bumpyScaleU" top_delta="-115" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -821,7 +915,9 @@ min_val="-10000" max_val="10000" name="bumpyScaleV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -836,7 +932,9 @@ max_val="360" min_val="-360" name="bumpyRot" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -848,7 +946,9 @@ min_val="-1" max_val="1" name="bumpyOffsetU" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -860,7 +960,9 @@ min_val="-1" max_val="1" name="bumpyOffsetV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -873,7 +975,9 @@ max_val="10000" name="shinyScaleU" top_delta="-115" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -885,7 +989,9 @@ min_val="-10000" max_val="10000" name="shinyScaleV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="2" follows="left|top" @@ -900,7 +1006,9 @@ max_val="360" min_val="-360" name="shinyRot" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -912,7 +1020,9 @@ min_val="-1" max_val="1" name="shinyOffsetU" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -924,7 +1034,9 @@ min_val="-1" max_val="1" name="shinyOffsetV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <check_box follows="top|left" height="16" @@ -935,7 +1047,9 @@ name="checkbox planar align" tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping." top_delta="20" - width="260" /> + width="260" + font="DejaVu" + font.size="LSmall" /> <button follows="left|top" layout="topleft" @@ -946,7 +1060,9 @@ label_selected="Align current texture layers" name="button align textures" tool_tip="Align current texture layers" - width="66" /> + width="66" + font="DejaVu" + font.size="LSmall" /> <web_browser visible="false" enabled="false" @@ -972,7 +1088,9 @@ max_val="10000" name="gltfTextureScaleU" top_delta="34" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -984,7 +1102,9 @@ min_val="-10000" max_val="10000" name="gltfTextureScaleV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner decimal_digits="1" follows="left|top" @@ -997,7 +1117,9 @@ max_val="100" min_val="-100" name="gltfRptctrl" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1009,7 +1131,9 @@ min_val="-360" max_val="360" name="gltfTextureRotation" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1021,7 +1145,9 @@ min_val="-999" max_val="999" name="gltfTextureOffsetU" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <spinner follows="left|top" height="19" @@ -1033,6 +1159,8 @@ min_val="-999" max_val="999" name="gltfTextureOffsetV" - width="265" /> + width="265" + font="DejaVu" + font.size="LSmall" /> <!-- END PBR Material texture transform parameters --> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml deleted file mode 100644 index 42cd510efd..0000000000 --- a/indra/newview/skins/default/xui/en/panel_voice_effect.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel - follows="all" - height="26" - layout="topleft" - name="panel_voice_effect" - width="200"> - <string name="no_voice_effect"> - Voice Morphing Off - </string> - <string name="preview_voice_effects"> - Preview Voice Morphing ▶ - </string> - <string name="get_voice_effects"> - Get Voice Morphing ▶ - </string> - <combo_box - enabled="false" - follows="left|top|right" - height="23" - name="voice_effect" - tool_tip="Select a Voice Morph to change your voice" - top_pad="0" - width="200"> - <combo_box.item - label="Voice Morphing Off" - name="no_voice_effect" - top_pad="0" - value="0" /> - <combo_box.commit_callback - function="Voice.CommitVoiceEffect" /> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 3e9efb6f8b..c067c86ba7 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -29,7 +29,7 @@ width="333"> background_visible="false" bg_opaque_color="DkGray2" left="10" - top="5" + top="0" follows="left|top|right" layout="topleft" width="307" @@ -50,25 +50,15 @@ width="333"> layout="topleft" name="openoutfit_btn" visible="false" /> - <icon - follows="top|left" - height="31" - image_name="Shirt_Large" - name="outfit_icon" - mouse_opaque="false" - visible="true" - left="1" - top="0" - width="31" /> <text - font="SansSerifSmall" + font="SansSerifSmallBold" text_color="EmphasisColor" width="300" height="13" follows="top|left|right" layout="topleft" - left="35" - top="3" + left="5" + top="0" mouse_opaque="false" name="currentlook_status" > (Status) @@ -76,7 +66,7 @@ width="333"> <text font="SansSerifLargeBold" height="20" - left="35" + left="5" parse_urls="false" text_color="White" top="15" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index de47e05291..3fc22d69ca 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -69,7 +69,6 @@ <button control_name="InventoryInboxToggleState" label="Received items" - font="SansSerifMedium" name="inbox_btn" height="35" image_unselected="MarketplaceBtn_Off" @@ -92,7 +91,6 @@ top="10" right="-20" name="inbox_fresh_new_count" - font="SansSerifMedium" halign="right" top_pad="0"> [NUM] new diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 25827fa236..6e48577064 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -117,6 +117,8 @@ Voice Server Version: [VOICE_VERSION] <string name="AgniGridLabel">Second Life Main Grid (Agni)</string> <string name="AditiGridLabel">Second Life Beta Test Grid (Aditi)</string> + <string name="AgniGridLabelShort">Agni (production)</string> + <string name="AditiGridLabelShort">Aditi (beta)</string> <string name="ViewerDownloadURL">http://secondlife.com/download</string> <string name="LoginFailedViewerNotPermitted"> @@ -328,6 +330,7 @@ are allowed. <!-- searching - generic --> <string name="Searching">Searching...</string> <string name="NoneFound">None found.</string> + <string name="ServerUnavailable">Service not available.</string> <!-- Indicates that an avatar name or other similar datum is being retrieved. General usage. --> <string name="RetrievingData">Retrieving...</string> @@ -518,6 +521,8 @@ http://secondlife.com/support for help fixing this problem. <string name="reconnect_nearby">You will now be reconnected to Nearby Voice Chat</string> <string name="ScriptQuestionCautionChatGranted">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS].</string> <string name="ScriptQuestionCautionChatDenied">'[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS].</string> + <string name="ScriptTakeMoneyCaution">The object '<nolink>[OBJECTNAME]</nolink>' wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings.</string> + <string name="PrivilegedLandAccessCaution">The object '<nolink>[OBJECTNAME]</nolink>' wants privileged access to your land. If you allow access it may sell your land with no additional warnings.</string> <string name="AdditionalPermissionsRequestHeader">If you allow access to your account, you will also be allowing the object to:</string> <string name="ScriptTakeMoney">Take Linden dollars (L$) from you</string> <string name="ActOnControlInputs">Act on your control inputs</string> @@ -535,6 +540,7 @@ http://secondlife.com/support for help fixing this problem. <string name="ChangeYourDefaultAnimations">Change your default animations</string> <string name="ForceSitAvatar">Force your avatar to sit</string> <string name="ChangeEnvSettings">Change your environment settings</string> + <string name="PrivilegedLandAccess">Sell land on your behalf.</string> <string name="NotConnected">Not Connected</string> <string name="AgentNameSubst">(You)</string> <!-- Substitution for agent name --> @@ -2943,13 +2949,13 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .anim <string name="None">None</string> <string name="Linden Location">Linden Location</string> <string name="Adult">Adult</string> - <string name="Arts and Culture">Arts and Culture</string> + <string name="Arts&Culture">Arts & Culture</string> <string name="Business">Business</string> <string name="Educational">Educational</string> <string name="Gaming">Gaming</string> <string name="Hangout">Hangout</string> <string name="Newcomer Friendly">Newcomer Friendly</string> - <string name="Parks and Nature">Parks and Nature</string> + <string name="Parks&Nature">Parks & Nature</string> <string name="Residential">Residential</string> <!--<string name="Shopping">Shopping</string> --> <string name="Stage">Stage</string> @@ -3004,6 +3010,9 @@ If this message persists, restart your computer. [APP_NAME] appears to have frozen or crashed on the previous run. Would you like to send a crash report? </string> + <string name="MBFreezeDetected"> + [APP_NAME] appears to have frozen. If this issue occurs regularly, please contact support at https://support.secondlife.com. + </string> <string name="MBAlert">Notification</string> <string name="MBNoDirectX"> [APP_NAME] is unable to detect DirectX 9.0b or greater. @@ -4389,21 +4398,6 @@ and report the problem. [https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3 Knowledge Base] </string> - <!-- megapahit strings --> - <string name="not_found">'[TEXT]' not found</string> - <string name="no_results">No results</string> - <string name="searching">Searching...</string> - <string name="all_categories">All Categories</string> - <string name="search_banned">Some terms in your search query were excluded due to content restrictions as clarified in the Community Standards.</string> - <string name="search_short">Your search terms were too short so no search was performed.</string> - <string name="search_disabled">Legacy Search has been disabled in this region.</string> - <string name="NotifyIncomingMessage">Incoming message from [NAME]...</string> - <string name="NearbyChatTitleChannel">Nearby chat (on channel [CHANNEL])</string> - <string name="AvatarTyping">Typing</string> - <string name="UnknownAvatar">Unknown Avatar</string> - <string name="NotAvailableOnPlatform">Not available on this platform</string> - <string name="NowPlaying">Now Playing</string> - <string name="GridInfoTitle">GRID INFO</string> <!-- RLVa --> <string name="RlvConsoleDisable">RLVa is disabled</string> <string name="RlvConsoleInvalidCmd">Invalid command</string> @@ -4430,5 +4424,4 @@ and report the problem. <string name="RlvReturnCodeBlocked">blocked object</string> <string name="RlvReturnCodeThrottled">throttled</string> <string name="RlvReturnCodeNoProcessor">no command processor found</string> - </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index 090447a6a2..c7669e81af 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -11,7 +11,7 @@ image_top_pad="0" image_bottom_pad="0" imgoverlay_label_space="1" - label_color="ButtonLabelColor" + label_color="White" label_color_selected="ButtonLabelSelectedColor" label_color_disabled="ButtonLabelDisabledColor" label_color_disabled_selected="ButtonLabelSelectedDisabledColor" @@ -21,9 +21,10 @@ font="SansSerifSmall" hover_glow_amount="0.15" halign="center" - pad_bottom="1" + pad_bottom="2" height="23" scale_image="true" + label_shadow="false" handle_right_mouse="true" use_draw_context_alpha="true" held_down_delay.seconds="0.5" diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml index cf995e5833..ebe2fa07e2 100644 --- a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml @@ -9,7 +9,7 @@ left_pad="0" icon_pad="10" icon_width="20" - text_pad="7" + text_pad="5" text_pad_right="4" arrow_size="12" max_folder_item_overlap="2" diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml index 604f62b099..3a0f43de3d 100644 --- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml @@ -7,10 +7,10 @@ select_on_focus="true" text_tentative_color="TextFgTentativeColor" highlight_text_field="true" - background_image="TextField_Search_Off" - background_image_disabled="TextField_Search_Disabled" - background_image_focused="TextField_Search_Active" - background_image_highlight="TextField_Search_Highlight"> + background_image="TextField_Off" + background_image_disabled="TextField_Disabled" + background_image_focused="TextField_Active" + background_image_highlight="TextField_Highlight"> <search_button label="" top_pad="4" left_pad="4" diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml index 11758556d6..73c6dc5d7a 100644 --- a/indra/newview/skins/default/xui/en/widgets/floater.xml +++ b/indra/newview/skins/default/xui/en/widgets/floater.xml @@ -9,7 +9,9 @@ bg_alpha_image="Window_Background" background_visible="true" background_opaque="false" + header_font="SansSerif" header_height="25" + header_vpad="5" close_image="Icon_Close_Foreground" restore_image="Icon_Restore_Foreground" minimize_image="Icon_Minimize_Foreground" diff --git a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml index 50c5285e04..671cb37ca3 100644 --- a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml @@ -3,16 +3,21 @@ folder_arrow_image="Folder_Arrow" favorite_image="Inv_Favorite_Star_Full" favorite_content_image="Inv_Favorite_Star_Content" - folder_indentation="8" - item_height="20" + folder_indentation="10" + item_height="21" item_top_pad="4" selection_image="Rounded_Square" mouse_opaque="true" follows="left|top|right" left_pad="5" - icon_pad="2" + icon_pad="4" icon_width="16" - text_pad="1" + text_pad="5" text_pad_right="4" + text_pad_top="0" arrow_size="12" max_folder_item_overlap="2"/> + +<!-- Potential properties not included above: + arrow_pad_top +--> diff --git a/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml b/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml index 14cd3e159c..499152f060 100644 --- a/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml +++ b/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml @@ -10,7 +10,7 @@ mouse_opaque="false" scale_image="true" image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_unselected="PushButton_Off" image_disabled="PushButton_Disabled" diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml index 865c145022..41ef9d2b8a 100644 --- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml +++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml @@ -6,7 +6,7 @@ folder_indentation="8" item_height="20" item_top_pad="4" - selection_image="Rounded_Square" + selection_image="Square_Selection" left_pad="5" icon_pad="2" icon_width="16" diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml index 09cbb1d3ab..ad4249da4e 100644 --- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml @@ -2,7 +2,7 @@ <inbox_folder_view_item item_height="20" item_top_pad="4" - selection_image="Rounded_Square" + selection_image="Square_Selection" > <new_badge label="New" diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml index ce36a39a21..b00b8a241b 100644 --- a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml @@ -17,7 +17,7 @@ <worn_style font="SansSerifSmall" font.style="BOLD" - color="EmphasisColor" /> + color="WornOutfitTextColor" /> <item_icon height="16" follows="top|left" diff --git a/indra/newview/skins/default/xui/en/widgets/line_editor.xml b/indra/newview/skins/default/xui/en/widgets/line_editor.xml index ae642e1da5..cf6dc0a8c0 100644 --- a/indra/newview/skins/default/xui/en/widgets/line_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/line_editor.xml @@ -11,7 +11,7 @@ text_pad_left="2" text_readonly_color="TextFgReadOnlyColor" text_tentative_color="TextFgTentativeColor" - highlight_color="EmphasisColor" + highlight_color="SelectionColor" preedit_bg_color="White" mouse_opaque="true" name="line_editor" diff --git a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml index ea49b750d1..6824080b49 100644 --- a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml @@ -55,7 +55,6 @@ width="30" /> <panel_camera_item.text follows="top|left|right" - font="SansSerifMedium" height="15" layout="topleft" left ="38" diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml index 51144c92b6..8294b96799 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml @@ -8,10 +8,10 @@ select_on_focus="true" text_tentative_color="TextFgTentativeColor" highlight_text_field="true" - background_image="TextField_Search_Off" - background_image_disabled="TextField_Search_Disabled" - background_image_focused="TextField_Search_Active" - background_image_highlight="TextField_Search_Highlight"> + background_image="TextField_Off" + background_image_disabled="TextField_Disabled" + background_image_focused="TextField_Active" + background_image_highlight="TextField_Highlight"> <search_button top_pad="4" left_pad="4" diff --git a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml index b99010e17a..041470d0d2 100644 --- a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml @@ -15,12 +15,12 @@ default_color="TextDefaultColor" text_color="TextFgColor" text_readonly_color="TextFgReadOnlyColor" - text_selected_color="White" + text_selected_color="Black" h_pad="6" v_pad="4" bg_visible="true" bg_readonly_color="TextBgReadOnlyColor" bg_writeable_color="TextBgWriteableColor" - bg_selected_color="EmphasisColor" + bg_selected_color="SelectionColor" bg_focus_color="TextBgFocusColor"> </simple_text_editor> diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index f565161794..523833d437 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -6,11 +6,12 @@ label_pad_left - padding to the left of tab button labels <tab_container name="tab_container" mouse_opaque="false" tab_min_width="60" - tab_max_width="150" + tab_max_width="160" use_custom_icon_ctrl="false" halign="center" - font="SansSerifSmall" - tab_height="22" + font="SansSerif" + font.size="Small" + tab_height="24" label_pad_bottom="1" label_pad_left="4"> <!-- @@ -19,22 +20,22 @@ label_pad_left - padding to the left of tab button labels tab_left_image_flash tab_top_image_flash --> - <first_tab tab_top_image_unselected="TabTop_Left_Off" - tab_top_image_selected="TabTop_Left_Selected" + <first_tab tab_top_image_unselected="TabTop_First_Flat_Off" + tab_top_image_selected="TabTop_First_Flat_Selected" tab_bottom_image_unselected="Toolbar_Left_Off" tab_bottom_image_selected="Toolbar_Left_Selected" - tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> - <middle_tab tab_top_image_unselected="TabTop_Middle_Off" - tab_top_image_selected="TabTop_Middle_Selected" + tab_left_image_unselected="TabLeft_Flat_Off" + tab_left_image_selected="TabLeft_Flat_Selected"/> + <middle_tab tab_top_image_unselected="TabTop_Middle_Flat_Off" + tab_top_image_selected="TabTop_Middle_Flat_Selected" tab_bottom_image_unselected="Toolbar_Middle_Off" tab_bottom_image_selected="Toolbar_Middle_Selected" - tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> - <last_tab tab_top_image_unselected="TabTop_Right_Off" - tab_top_image_selected="TabTop_Right_Selected" + tab_left_image_unselected="TabLeft_Flat_Off" + tab_left_image_selected="TabLeft_Flat_Selected"/> + <last_tab tab_top_image_unselected="TabTop_Last_Flat_Off" + tab_top_image_selected="TabTop_Last_Flat_Selected" tab_bottom_image_unselected="Toolbar_Right_Off" tab_bottom_image_selected="Toolbar_Right_Selected" - tab_left_image_unselected="SegmentedBtn_Left_Disabled" - tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/> + tab_left_image_unselected="TabLeft_Flat_Off" + tab_left_image_selected="TabLeft_Flat_Selected"/> </tab_container> diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 51852dd6dd..0447c18a33 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -15,16 +15,17 @@ <button_icon_and_text imgoverlay_label_space="7" label_color_selected="White" halign="left" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" image_disabled_selected="PushButton_Selected_Disabled" image_disabled="PushButton_Disabled" button_width.min="70" - button_width.max="140" + button_width.max="172" desired_height="24" pad_left="10" pad_right="10" + pad_bottom="1" follows="left|top" chrome="true" image_overlay_alignment="left" @@ -37,7 +38,7 @@ pad_right="10" image_bottom_pad="10" image_top_pad="10" - image_pressed="PushButton_Press" + image_pressed="PushButton_Selected" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" image_disabled_selected="PushButton_Selected_Disabled" diff --git a/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml index aa235e103b..a0b119ed72 100644 --- a/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <inventory_list_item follows="top|right|left" - height="20" + height="21" name="inventory_item" tab_stop="false" hover_image="ListItem_Over" @@ -17,7 +17,7 @@ <worn_style font="SansSerifSmall" font.style="BOLD" - color="EmphasisColor" /> + color="WornOutfitTextColor" /> <item_icon height="16" follows="top|left" @@ -25,18 +25,18 @@ layout="topleft" left="0" name="item_icon" - top="0" + top="1" width="16" /> <item_name follows="left|right" - height="20" + height="21" layout="topleft" left="21" parse_urls="false" use_ellipses="true" name="item_name" text_color="white" - top="4" + top="2" value="..." width="359" /> <add_btn diff --git a/indra/newview/skins/default/xui/es/floater_big_preview.xml b/indra/newview/skins/default/xui/es/floater_big_preview.xml deleted file mode 100644 index b112243d7a..0000000000 --- a/indra/newview/skins/default/xui/es/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="VISTA PREVIA"/> diff --git a/indra/newview/skins/default/xui/es/floater_post_process.xml b/indra/newview/skins/default/xui/es/floater_post_process.xml deleted file mode 100644 index 5c62ccde36..0000000000 --- a/indra/newview/skins/default/xui/es/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="CONFIGURACIÓN DEL PROCESAMIENTO"> - <tab_container name="Post-Process Tabs"> - <panel label="Color del filtro" name="wmiColorFilterPanel"> - <check_box label="Activar" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - Brillo - </text> - <text name="wmiColorFilterSaturationText"> - Saturación - </text> - <text name="wmiColorFilterContrastText"> - Contraste - </text> - <text name="wmiColorFilterBaseText"> - Color base del contraste - </text> - <slider label="R" name="wmiColorFilterBaseR"/> - <slider label="V" name="wmiColorFilterBaseG"/> - <slider label="A" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="Visión nocturna" name="wmiNightVisionPanel"> - <check_box label="Activar" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - Amplificación de luz - </text> - <text name="wmiNightVisionNoiseSizeText"> - Cantidad de ruido - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Intensidad del ruido - </text> - </panel> - <panel label="Bloom" name="wmiBloomPanel"> - <check_box label="Activar" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - Extracción de la luminosidad - </text> - <text name="wmiBloomSizeText"> - Bloom: cantidad - </text> - <text name="wmiBloomStrengthText"> - Bloom: intensidad - </text> - </panel> - <panel label="Extras" name="Extras"> - <button label="Cargar efecto" label_selected="Cargar efecto" name="PPLoadEffect"/> - <button label="Guardar efecto" label_selected="Guardar efecto" name="PPSaveEffect"/> - <line_editor label="Nombre del efecto" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_sound_devices.xml b/indra/newview/skins/default/xui/es/floater_sound_devices.xml deleted file mode 100644 index 0291f9e796..0000000000 --- a/indra/newview/skins/default/xui/es/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="DISPOSITIVOS DE SONIDO"> - <text name="voice_label"> - Chat de voz - </text> - <check_box label="Activados" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/es/floater_voice_effect.xml b/indra/newview/skins/default/xui/es/floater_voice_effect.xml deleted file mode 100644 index 02ebe80ff7..0000000000 --- a/indra/newview/skins/default/xui/es/floater_voice_effect.xml +++ /dev/null @@ -1,138 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Lugares" name="voice_effects" title="PROBAR TRANSFORMACIÓN DE VOZ"> - <string name="no_voice_effect"> - (Sin transformación de voz) - </string> - <string name="active_voice_effect"> - (Activo) - </string> - <string name="unsubscribed_voice_effect"> - (Suscripción cancelada) - </string> - <string name="new_voice_effect"> - (¡Nuevo!) - </string> - <string name="effect_Arena"> - Campo - </string> - <string name="effect_Beast"> - Bestia - </string> - <string name="effect_Buff"> - Musculoso - </string> - <string name="effect_Buzz"> - Murmullo - </string> - <string name="effect_Camille"> - Camila - </string> - <string name="effect_Creepy"> - Aterrador - </string> - <string name="effect_CreepyBot"> - Robot aterrador - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - Robot profundo - </string> - <string name="effect_Demon"> - Diablo - </string> - <string name="effect_Flirty"> - Coqueta - </string> - <string name="effect_Foxy"> - Astuto - </string> - <string name="effect_Halloween_2010_Bonus"> - Halloween_2010_Bonus - </string> - <string name="effect_Helium"> - Helio - </string> - <string name="effect_Husky"> - Corpulento - </string> - <string name="effect_Intercom"> - Intercom - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Pesadilla - </string> - <string name="effect_PopBot"> - Robot pop - </string> - <string name="effect_Rachel"> - Raquel - </string> - <string name="effect_Radio"> - Radio - </string> - <string name="effect_Robot"> - Robot - </string> - <string name="effect_Roxanne"> - Roxana - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samanta - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Bajito - </string> - <string name="effect_Sneaky"> - Furtivo - </string> - <string name="effect_Stallion"> - Mujeriego - </string> - <string name="effect_Sultry"> - Sensual - </string> - <string name="effect_Thunder"> - Trueno - </string> - <string name="effect_Vixen"> - Tigresa - </string> - <string name="effect_WhinyBot"> - Robot llorica - </string> - <text name="preview_text"> - Para probarla - </text> - <text name="status_text"> - Graba una muestra y pulsa en una voz para escuchar cómo suena. - </text> - <button label="Grabar" name="record_btn" tool_tip="Graba una muestra de tu voz."/> - <button label="Parar" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Suscríbete ahora] - </text> - <scroll_list name="voice_effect_list" tool_tip="Graba una muestra de tu voz y pulsa en un efecto para ver cómo suena."> - <scroll_list.columns label="Nombre de la voz" name="name"/> - <scroll_list.columns label="Caduca" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/es/panel_login_first.xml b/indra/newview/skins/default/xui/es/panel_login_first.xml deleted file mode 100644 index ccb6858351..0000000000 --- a/indra/newview/skins/default/xui/es/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php?lang=es - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Nombre de usuario" name="username_combo" tool_tip="El nombre de usuario que elegiste al registrarte, como bobsmith12 o Steller Sunshine"/> - <line_editor label="Contraseña" name="password_edit"/> - <button label="Iniciar sesión" name="connect_btn"/> - <check_box label="Recordarme" name="remember_check"/> - <text name="forgot_password_text"> - Contraseña olvidada - </text> - <text name="sign_up_text"> - Regístrate - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Tu primer destino es la Isla de aprendizaje. ¡Encuentra el portal de salida! - </text> - <text name="image_caption_right"> - A continuación, puedes explorar la Isla social y hablar con otros residentes nuevos. - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml index bdedd04cc8..1e304e9c05 100644 --- a/indra/newview/skins/default/xui/es/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Ancho de banda </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/es/panel_voice_effect.xml b/indra/newview/skins/default/xui/es/panel_voice_effect.xml deleted file mode 100644 index 94a0428941..0000000000 --- a/indra/newview/skins/default/xui/es/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Transformación de voz desactivada - </string> - <string name="preview_voice_effects"> - Probar transformación de voz ▶ - </string> - <string name="get_voice_effects"> - Obtener transformación de voz ▶ - </string> - <combo_box name="voice_effect" tool_tip="Selecciona una transformación de voz para cambiar tu voz"> - <combo_box.item label="Transformación de voz desactivada" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/fr/floater_big_preview.xml b/indra/newview/skins/default/xui/fr/floater_big_preview.xml deleted file mode 100644 index 0c09a4c188..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="APERÇU"/> diff --git a/indra/newview/skins/default/xui/fr/floater_post_process.xml b/indra/newview/skins/default/xui/fr/floater_post_process.xml deleted file mode 100644 index a22c7512e5..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_post_process.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="PARAMÈTRES POST-TRAITEMENT"> - <tab_container name="Post-Process Tabs"> - <panel label="Filtre couleur" name="wmiColorFilterPanel"> - <check_box label="Activer" name="wmiColorFilterToggle" /> - <text name="wmiColorFilterBrightnessText"> - Luminosité - </text> - <text name="wmiColorFilterSaturationText"> - Saturation - </text> - <text name="wmiColorFilterContrastText"> - Contraste - </text> - <text name="wmiColorFilterBaseText"> - Couleur de base du contraste - </text> - <slider label="R" name="wmiColorFilterBaseR" /> - <slider label="V" name="wmiColorFilterBaseG" /> - <slider label="B" name="wmiColorFilterBaseB" /> - <slider label="I" name="wmiColorFilterBaseI" /> - </panel> - <panel label="Vision de nuit" name="wmiNightVisionPanel"> - <check_box label="Activer" name="wmiNightVisionToggle" /> - <text name="wmiNightVisionBrightMultText"> - Multiple d'amplificateur de lumière - </text> - <text name="wmiNightVisionNoiseSizeText"> - Taille du bruit - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Force du bruit - </text> - </panel> - <panel label="Éclat" name="wmiBloomPanel"> - <check_box label="Activer" name="wmiBloomToggle" /> - <text name="wmiBloomExtractText"> - Extraction de la luminosité - </text> - <text name="wmiBloomSizeText"> - Taille de l'éclat - </text> - <text name="wmiBloomStrengthText"> - Force de l'éclat - </text> - </panel> - <panel label="Extras" name="Extras"> - <button label="Charger effet" label_selected="Charger effet" name="PPLoadEffect" /> - <button label="Enregistrer effet" label_selected="Enregistrer effet" - name="PPSaveEffect" /> - <line_editor label="Nom de l'effet" name="PPEffectNameEditor" /> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_sound_devices.xml b/indra/newview/skins/default/xui/fr/floater_sound_devices.xml deleted file mode 100644 index 080ade9dd4..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="PERIPHERIQUES AUDIO"> - <text name="voice_label"> - Chat vocal - </text> - <check_box label="Activé" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_voice_effect.xml b/indra/newview/skins/default/xui/fr/floater_voice_effect.xml deleted file mode 100644 index f9a76d127e..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Endroits" name="voice_effects" title="APERÇU DES EFFETS DE VOIX"> - <string name="no_voice_effect"> - (Aucun effet de voix) - </string> - <string name="active_voice_effect"> - (Actif) - </string> - <string name="unsubscribed_voice_effect"> - (Pas d'abonnement) - </string> - <string name="new_voice_effect"> - (Nouveau !) - </string> - <string name="effect_Arena"> - Stade - </string> - <string name="effect_Beast"> - Brute - </string> - <string name="effect_Buff"> - Nasal - </string> - <string name="effect_Buzz"> - Friture - </string> - <string name="effect_Camille"> - Camille - </string> - <string name="effect_Creepy"> - Effrayant - </string> - <string name="effect_CreepyBot"> - BotEffrayant - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - BotGrave - </string> - <string name="effect_Demon"> - Démon - </string> - <string name="effect_Female Elf"> - Femme elfe - </string> - <string name="effect_Flirty"> - Flirt - </string> - <string name="effect_Foxy"> - Séduction - </string> - <string name="effect_Halloween 2010 Bonus"> - Halloween_2010_Bonus - </string> - <string name="effect_Helium"> - Hélium - </string> - <string name="effect_Husky"> - Rauque - </string> - <string name="effect_Husky Whisper"> - Murmure rauque - </string> - <string name="effect_Intercom"> - Interphone - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Mélodieux - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Modèle - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Cauchemar - </string> - <string name="effect_PopBot"> - BotPop - </string> - <string name="effect_Rachel"> - Rachel - </string> - <string name="effect_Radio"> - Radio - </string> - <string name="effect_Robot"> - Robot - </string> - <string name="effect_Roxanne"> - Roxanne - </string> - <string name="effect_Rumble"> - Grondement - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samantha - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Petite voix - </string> - <string name="effect_Smaller"> - Plus faible - </string> - <string name="effect_Sneaky"> - Sournois - </string> - <string name="effect_Stallion"> - Étalon - </string> - <string name="effect_Sultry"> - Sensuel - </string> - <string name="effect_Thunder"> - Tonnerre - </string> - <string name="effect_Vixen"> - Mégère - </string> - <string name="effect_WhinyBot"> - BotPleurnichard - </string> - <text name="preview_text"> - Aperçu - </text> - <text name="status_text"> - Enregistrez un extrait et cliquez sur un effet pour obtenir un aperçu. - </text> - <button label="Enregistrer" name="record_btn" tool_tip="Enregistrez un extrait de votre voix."/> - <button label="Arrêter" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] S'abonner] - </text> - <scroll_list name="voice_effect_list" tool_tip="Enregistrez un extrait de votre voix, puis cliquez sur un effet pour obtenir un aperçu."> - <scroll_list.columns label="Nom de l'effet" name="name"/> - <scroll_list.columns label="Date d'expiration" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/fr/panel_login_first.xml b/indra/newview/skins/default/xui/fr/panel_login_first.xml deleted file mode 100644 index 8f40d0230c..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php?lang=fr - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Nom d'utilisateur" name="username_combo" tool_tip="Nom d'utilisateur que vous avez choisi lors de votre inscription (par exemple, bobsmith12 ou Steller Sunshine)."/> - <line_editor label="Mot de passe" name="password_edit"/> - <button label="Connexion" name="connect_btn"/> - <check_box font="SansSerifSmall" label="Mémoriser mes informations" name="remember_check"/> - <text name="forgot_password_text"> - Mot de passe oublié - </text> - <text name="sign_up_text"> - S'inscrire - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Votre première étape est Learning Island. Trouvez le portail de sortie. - </text> - <text name="image_caption_right"> - Puis explorez Social Island et faites la connaissance d'autres résidents. - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml index 84c6dda4b4..227525a608 100644 --- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Bande passante </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/fr/panel_voice_effect.xml b/indra/newview/skins/default/xui/fr/panel_voice_effect.xml deleted file mode 100644 index a134854706..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Effet de voix désactivé - </string> - <string name="preview_voice_effects"> - Aperçu des effets de voix ▶ - </string> - <string name="get_voice_effects"> - Obtenir un effet de voix ▶ - </string> - <combo_box name="voice_effect" tool_tip="Sélectionner un effet pour modifier le son de votre voix"> - <combo_box.item label="Effet de voix désactivé" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/it/floater_big_preview.xml b/indra/newview/skins/default/xui/it/floater_big_preview.xml deleted file mode 100644 index 7bc50a6d39..0000000000 --- a/indra/newview/skins/default/xui/it/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="ANTEPRIMA"/> diff --git a/indra/newview/skins/default/xui/it/floater_post_process.xml b/indra/newview/skins/default/xui/it/floater_post_process.xml deleted file mode 100644 index 3aa8b29101..0000000000 --- a/indra/newview/skins/default/xui/it/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="IMPOSTAZIONI DI POST-PRODUZIONE"> - <tab_container name="Post-Process Tabs"> - <panel label="Filtro Colore" name="wmiColorFilterPanel"> - <check_box label="Abilita" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - Luminosità - </text> - <text name="wmiColorFilterSaturationText"> - Saturazione - </text> - <text name="wmiColorFilterContrastText"> - Contrasto - </text> - <text name="wmiColorFilterBaseText"> - Colore Base Contrasto - </text> - <slider label="R" name="wmiColorFilterBaseR"/> - <slider label="G" name="wmiColorFilterBaseG"/> - <slider label="B" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="Visione Notturna" name="wmiNightVisionPanel"> - <check_box label="Abilita" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - Amplificazione Multipla Luce - </text> - <text name="wmiNightVisionNoiseSizeText"> - Ampiezza disturbo - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Forza disturbo - </text> - </panel> - <panel label="Raggiatura" name="wmiBloomPanel"> - <check_box label="Abilita" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - Estrazione luminosità - </text> - <text name="wmiBloomSizeText"> - Dimensione raggiatura - </text> - <text name="wmiBloomStrengthText"> - Forza raggiatura - </text> - </panel> - <panel label="Extra" name="Extras"> - <button label="Carica effetto" label_selected="Carica effetto" name="PPLoadEffect"/> - <button label="Salva effetto" label_selected="Salva effetto" name="PPSaveEffect"/> - <line_editor label="Nome Effetto" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_sound_devices.xml b/indra/newview/skins/default/xui/it/floater_sound_devices.xml deleted file mode 100644 index 9799b48d89..0000000000 --- a/indra/newview/skins/default/xui/it/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="DISPOSITIVI AUDIO"> - <text name="voice_label"> - Chat vocale - </text> - <check_box label="Abilitato" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_voice_effect.xml b/indra/newview/skins/default/xui/it/floater_voice_effect.xml deleted file mode 100644 index f102622f5d..0000000000 --- a/indra/newview/skins/default/xui/it/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Luoghi" name="voice_effects" title="ANTEPRIMA MANIPOLAZIONE VOCE"> - <string name="no_voice_effect"> - (Nessuna manipolazione voce) - </string> - <string name="active_voice_effect"> - (Attivato) - </string> - <string name="unsubscribed_voice_effect"> - (Iscrizione annullata) - </string> - <string name="new_voice_effect"> - (Nuovo!) - </string> - <string name="effect_Arena"> - Arena - </string> - <string name="effect_Beast"> - Bestia - </string> - <string name="effect_Buff"> - Appassionato - </string> - <string name="effect_Buzz"> - Euforia - </string> - <string name="effect_Camille"> - Camilla - </string> - <string name="effect_Creepy"> - Terrificante - </string> - <string name="effect_CreepyBot"> - TerrificanteBot - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - ProfondoBot - </string> - <string name="effect_Demon"> - Demonio - </string> - <string name="effect_Female Elf"> - Elfo donna - </string> - <string name="effect_Flirty"> - Civettuolo - </string> - <string name="effect_Foxy"> - Scaltro - </string> - <string name="effect_Halloween 2010 Bonus"> - Halloween_2010_Bonus - </string> - <string name="effect_Helium"> - Elio - </string> - <string name="effect_Husky"> - Fusto - </string> - <string name="effect_Husky Whisper"> - Sospiro rauco - </string> - <string name="effect_Intercom"> - Interfono - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Inflessione bassa - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Modella - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Incubo - </string> - <string name="effect_PopBot"> - PopBot - </string> - <string name="effect_Rachel"> - Rachele - </string> - <string name="effect_Radio"> - Radio - </string> - <string name="effect_Robot"> - Robot - </string> - <string name="effect_Roxanne"> - Rosanna - </string> - <string name="effect_Rumble"> - Rombo - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samanta - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Bassotto - </string> - <string name="effect_Smaller"> - Più piccolo - </string> - <string name="effect_Sneaky"> - Vile - </string> - <string name="effect_Stallion"> - Stallone - </string> - <string name="effect_Sultry"> - Focoso - </string> - <string name="effect_Thunder"> - Tuono - </string> - <string name="effect_Vixen"> - Maliziosa - </string> - <string name="effect_WhinyBot"> - PiangiBot - </string> - <text name="preview_text"> - Per l'anteprima - </text> - <text name="status_text"> - Registra un campione di voce, quindi fai clic su un effetto per ascoltare il risultato. - </text> - <button label="Registra" name="record_btn" tool_tip="Registra un campione della tua voce."/> - <button label="Ferma" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Subscribe Now] - </text> - <scroll_list name="voice_effect_list" tool_tip="Registra un campione della tua voce, quindi fai clic su uno degli effetti per un'anteprima del risultato."> - <scroll_list.columns label="Nome effetto" name="name"/> - <scroll_list.columns label="Scade il" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/it/panel_login_first.xml b/indra/newview/skins/default/xui/it/panel_login_first.xml deleted file mode 100644 index 5b04fd411a..0000000000 --- a/indra/newview/skins/default/xui/it/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php?lang=it - </panel.string> - <panel.string name="sign_up_url"> - http://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Nome utente" name="username_combo" tool_tip="Il nome utente che hai scelto durante la registrazione, come roby12 o Stella Solare"/> - <line_editor label="Password" name="password_edit"/> - <button label="Accedi" name="connect_btn"/> - <check_box label="Ricordami" name="remember_check"/> - <text name="forgot_password_text"> - Password dimenticata - </text> - <text name="sign_up_text"> - Registrati - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Il primo passo è a Learning Island. Trova il portale di uscita! - </text> - <text name="image_caption_right"> - Quindi esplora Social Island e incontra altri nuovi residenti. - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/it/panel_status_bar.xml b/indra/newview/skins/default/xui/it/panel_status_bar.xml index 160fd4e180..04d61c2973 100644 --- a/indra/newview/skins/default/xui/it/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/it/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Larghezza di banda </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/it/panel_voice_effect.xml b/indra/newview/skins/default/xui/it/panel_voice_effect.xml deleted file mode 100644 index b43f766e5e..0000000000 --- a/indra/newview/skins/default/xui/it/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Disattiva manipolazione voce - </string> - <string name="preview_voice_effects"> - Anteprima manipolazione voce ▶ - </string> - <string name="get_voice_effects"> - Ottieni manipolazione voce ▶ - </string> - <combo_box name="voice_effect" tool_tip="Scegli un effetto di manipolazione per modificare il suono della tua voce"> - <combo_box.item label="Disattiva manipolazione voce" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/ja/floater_big_preview.xml b/indra/newview/skins/default/xui/ja/floater_big_preview.xml deleted file mode 100644 index e88d6fc488..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="プレビュー"/>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/ja/floater_post_process.xml b/indra/newview/skins/default/xui/ja/floater_post_process.xml deleted file mode 100644 index 91ecbb73a2..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="ポストプロセス設定"> - <tab_container name="Post-Process Tabs"> - <panel label="カラー・フィルタ" name="wmiColorFilterPanel"> - <check_box label="有効" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - 明度 - </text> - <text name="wmiColorFilterSaturationText"> - 彩度 - </text> - <text name="wmiColorFilterContrastText"> - 輝度 - </text> - <text name="wmiColorFilterBaseText"> - 輝度の基準色 - </text> - <slider label="赤" name="wmiColorFilterBaseR"/> - <slider label="緑" name="wmiColorFilterBaseG"/> - <slider label="青" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="暗視" name="wmiNightVisionPanel"> - <check_box label="有効" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - 光の増幅(マルチ) - </text> - <text name="wmiNightVisionNoiseSizeText"> - ノイズ・サイズ - </text> - <text name="wmiNightVisionNoiseStrengthText"> - ノイズ強度 - </text> - </panel> - <panel label="ブルーム" name="wmiBloomPanel"> - <check_box label="有効" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - 明度の抽出 - </text> - <text name="wmiBloomSizeText"> - ブルーム・サイズ - </text> - <text name="wmiBloomStrengthText"> - ブルーム強度 - </text> - </panel> - <panel label="その他" name="Extras"> - <button label="効果読み込み" label_selected="効果読み込み" name="PPLoadEffect"/> - <button label="効果保存" label_selected="効果保存" name="PPSaveEffect"/> - <line_editor label="効果名" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_sound_devices.xml b/indra/newview/skins/default/xui/ja/floater_sound_devices.xml deleted file mode 100644 index 28d2388bed..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="サウンドデバイス"> - <text name="voice_label"> - ボイスチャット - </text> - <check_box label="有効" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_voice_effect.xml b/indra/newview/skins/default/xui/ja/floater_voice_effect.xml deleted file mode 100644 index b38ea9331a..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="場所" name="voice_effects" title="ボイスモーフィングのプレビュー"> - <string name="no_voice_effect"> - (ボイスモーフィングなし) - </string> - <string name="active_voice_effect"> - (アクティブ) - </string> - <string name="unsubscribed_voice_effect"> - (取消し済み) - </string> - <string name="new_voice_effect"> - (新登場!) - </string> - <string name="effect_Arena"> - アリーナ - </string> - <string name="effect_Beast"> - 野獣 - </string> - <string name="effect_Buff"> - がっしり - </string> - <string name="effect_Buzz"> - ブザー - </string> - <string name="effect_Camille"> - カミール - </string> - <string name="effect_Creepy"> - 気味の悪い - </string> - <string name="effect_CreepyBot"> - 気味わるボット - </string> - <string name="effect_Cyber"> - サイバー - </string> - <string name="effect_DeepBot"> - ディープボット - </string> - <string name="effect_Demon"> - デーモン - </string> - <string name="effect_Female Elf"> - 女性のエルフ - </string> - <string name="effect_Flirty"> - 気のありそうな - </string> - <string name="effect_Foxy"> - 魅惑的 - </string> - <string name="effect_Halloween 2010 Bonus"> - ハロウィン_2010_ボーナス - </string> - <string name="effect_Helium"> - ヘリウム - </string> - <string name="effect_Husky"> - ハスキー - </string> - <string name="effect_Husky Whisper"> - スモーキーウィスパー - </string> - <string name="effect_Intercom"> - インターホン - </string> - <string name="effect_Julia"> - ジュリア - </string> - <string name="effect_Lo Lilt"> - 軽快 - </string> - <string name="effect_Macho"> - マッチョ - </string> - <string name="effect_Micro"> - ミクロ - </string> - <string name="effect_Mini"> - ミニ - </string> - <string name="effect_Model"> - モデル - </string> - <string name="effect_Nano"> - ナノ - </string> - <string name="effect_Nightmare"> - 悪夢 - </string> - <string name="effect_PopBot"> - ポップボット - </string> - <string name="effect_Rachel"> - レイチェル - </string> - <string name="effect_Radio"> - ラジオ - </string> - <string name="effect_Robot"> - ロボット - </string> - <string name="effect_Roxanne"> - ロクサン - </string> - <string name="effect_Rumble"> - ランブル - </string> - <string name="effect_Sabrina"> - サブリナ - </string> - <string name="effect_Samantha"> - サマンサ - </string> - <string name="effect_Sexy"> - セクシー - </string> - <string name="effect_Shorty"> - チビ - </string> - <string name="effect_Smaller"> - 小さめ - </string> - <string name="effect_Sneaky"> - コソコソ - </string> - <string name="effect_Stallion"> - 雄馬 - </string> - <string name="effect_Sultry"> - 艶かしい - </string> - <string name="effect_Thunder"> - サンダー - </string> - <string name="effect_Vixen"> - 性悪な - </string> - <string name="effect_WhinyBot"> - 不機嫌ボット - </string> - <text name="preview_text"> - プレビュー - </text> - <text name="status_text"> - 声をテスト録音してからボイスエフェクトを1つクリックして聞いてみます。 - </text> - <button label="録音" name="record_btn" tool_tip="あなたの声を録音します。"/> - <button label="停止" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] 今すぐ申し込む] - </text> - <scroll_list name="voice_effect_list" tool_tip="声を録音してボイスモーフィングを1つクリックすると、そのエフェクトをプレビューできます。"> - <scroll_list.columns label="ボイス名" name="name"/> - <scroll_list.columns label="有効期限" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/ja/fonts.xml b/indra/newview/skins/default/xui/ja/fonts.xml index 2085e916c8..7abb3593b6 100644 --- a/indra/newview/skins/default/xui/ja/fonts.xml +++ b/indra/newview/skins/default/xui/ja/fonts.xml @@ -2,11 +2,9 @@ <fonts> <font name="default" comment="default font files (global fallbacks)"> <file> - NotoSansCJKjp-Medium.otf - </file> - <file> - DejaVuSans.ttf + NotoSansCJKjp-SemiBold.otf </file> + <file load_collection="true" font_weight="400">InterVariableFont.ttf</file> <os name="Windows"> <file load_collection="true"> YuGothM.ttc @@ -41,7 +39,7 @@ </os> <os name="Mac"> <file> - YuGothic-Medium.otf + YuGothic-SemiBold.otf </file> <file> ヒラギノ角ゴシック W3.ttc @@ -82,9 +80,7 @@ <file> NotoSansCJKjp-Bold.otf </file> - <file> - DejaVuSans-Bold.ttf - </file> + <file load_collection="true" font_weight="700" flags="bold">InterVariableFont.ttf</file> <os name="Windows"> <file load_collection="true"> YuGothB.ttc @@ -104,11 +100,9 @@ </font> <font name="SansSerif" comment="Name of san-serif font (Truetype file name)"> <file> - NotoSansCJKjp-Bold.otf - </file> - <file> - DejaVuSans.ttf + NotoSansCJKjp-SemiBold.otf </file> + <file load_collection="true" font_weight="400">InterVariableFont.ttf</file> <os name="Windows"> <file> arial.ttf @@ -121,19 +115,13 @@ </os> </font> <font name="SansSerif" comment="Name of bold sans-serif font" font_style="BOLD"> - <file> - DejaVuSans-Bold.ttf - </file> + <file load_collection="true" font_weight="700" flags="bold">InterVariableFont.ttf</file> </font> <font name="SansSerif" comment="Name of italic sans-serif font" font_style="ITALIC"> - <file> - DejaVuSans-Oblique.ttf - </file> + <file load_collection="true" font_weight="400">InterItalicVariableFont.ttf</file> </font> <font name="SansSerif" comment="Name of bold italic sans-serif font" font_style="BOLD|ITALIC"> - <file> - DejaVuSans-BoldOblique.ttf - </file> + <file load_collection="true" flags="bold" font_weight="700">InterItalicVariableFont.ttf</file> </font> <font name="Monospace" comment="Name of monospace font"> <file> @@ -144,29 +132,25 @@ </file> </font> <font name="DejaVu" comment="Name of DejaVu font"> - <file> - DejaVuSans.ttf - </file> + <file>DejaVuSans.ttf</file> </font> <font name="DejaVu" comment="Name of DejaVu font (bold)" font_style="BOLD"> - <file> - DejaVuSans-Bold.ttf - </file> + <file> + DejaVuSans-Bold.ttf + </file> </font> <font name="DejaVu" comment="Name of DejaVu font (italic)" font_style="ITALIC"> - <file> - DejaVuSans-Oblique.ttf - </file> + <file> + DejaVuSans-Oblique.ttf + </file> </font> <font name="DejaVu" comment="Name of DejaVu font (bold italic)" font_style="BOLD|ITALIC"> - <file> - DejaVuSans-BoldOblique.ttf - </file> + <file> + DejaVuSans-BoldOblique.ttf + </file> </font> <font name="Helvetica" comment="Name of Helvetica font"> - <file> - DejaVuSans.ttf - </file> + <file load_collection="true" font_weight="400">InterVariableFont.ttf</file> <os name="Windows"> <file> arial.ttf @@ -179,9 +163,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (bold)" font_style="BOLD"> - <file> - DejaVuSans-Bold.ttf - </file> + <file load_collection="true" font_weight="700" flags="bold">InterVariableFont.ttf</file> <os name="Windows"> <file> arialbd.ttf @@ -194,9 +176,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (italic)" font_style="ITALIC"> - <file> - DejaVuSans-Oblique.ttf - </file> + <file load_collection="true" font_weight="400">InterItalicVariableFont.ttf</file> <os name="Windows"> <file> ariali.ttf @@ -209,9 +189,7 @@ </os> </font> <font name="Helvetica" comment="Name of Helvetica font (bold italic)" font_style="BOLD|ITALIC"> - <file> - DejaVuSans-BoldOblique.ttf - </file> + <file load_collection="true" flags="bold" font_weight="700">InterItalicVariableFont.ttf</file> <os name="Windows"> <file> arialbi.ttf @@ -227,13 +205,11 @@ <file> times.ttf </file> - <file> - DejaVuSans.ttf - </file> + <file font_weight="400">InterVariableFont.ttf</file> </font> <font_size name="Monospace" comment="Size for monospaced font (points, or 1/72 of an inch)" size="8.0"/> <font_size name="Huge" comment="Size of huge font (points, or 1/72 of an inch)" size="16.0"/> - <font_size name="Large" comment="Size of large font (points, or 1/72 of an inch)" size="10.6"/> - <font_size name="Medium" comment="Size of medium font (points, or 1/72 of an inch)" size="8.6"/> - <font_size name="Small" comment="Size of small font (points, or 1/72 of an inch)" size="7.6"/> + <font_size name="Large" comment="Size of large font (points, or 1/72 of an inch)" size="11"/> + <font_size name="Medium" comment="Size of medium font (points, or 1/72 of an inch)" size="9"/> + <font_size name="Small" comment="Size of small font (points, or 1/72 of an inch)" size="8"/> </fonts> diff --git a/indra/newview/skins/default/xui/ja/panel_login_first.xml b/indra/newview/skins/default/xui/ja/panel_login_first.xml deleted file mode 100644 index 0f987fc816..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_login_first.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - https://secondlife.com/my/account/request.php?lang=ja-JP - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/?lang=ja - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="page_top"/> - <layout_panel name="parent_panel"> - <layout_stack name="logo_stack"> - <layout_panel name="logo_left"/> - <layout_panel name="logo_container"> - <icon name="sl_logo"/> - </layout_panel> - <layout_panel auto_resize="true"/> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_left"/> - <layout_panel name="widget_container"> - <combo_box label="ユーザ名" tool_tip="登録時に自分で選んだユーザー名(例:bobsmith12、Steller Sunshineなど)" name="username_combo"> - <combo_box.combo_editor/> - <combo_box.combo_button/> - <combo_box.drop_down_button/> - </combo_box> - <line_editor name="password_edit" label="パスワード"/> - <button label="ログイン" name="connect_btn"/> - <text name="sign_up_text" valign="center"> - サインアップ - </text> - <check_box label="ユーザ名を記憶" name="remember_name" tool_tip="すでに記憶されているユーザーは、「私」>「初期設定」>「詳細設定」>「記憶されたユーザー名」から削除できます。"/> - <check_box label="パスワード記憶" name="remember_password"/> - <text name="forgot_password_text"> - パスワードを忘れましたか? - </text> - </layout_panel> - <layout_panel name="widget_right"/> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_left"/> - <layout_panel name="images_container"> - <icon name="image_left"/> - </layout_panel> - <layout_panel name="images_right"/> - </layout_stack> - </layout_panel> - <layout_panel name="page_bottom"/> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_status_bar.xml b/indra/newview/skins/default/xui/ja/panel_status_bar.xml index 2497b15548..bbb9d7daf1 100644 --- a/indra/newview/skins/default/xui/ja/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/ja/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> 帯域幅 </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [ampm, datetime, slt] [hour12, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/ja/panel_voice_effect.xml b/indra/newview/skins/default/xui/ja/panel_voice_effect.xml deleted file mode 100644 index 57a1bb7838..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - ボイスモーフィングなし - </string> - <string name="preview_voice_effects"> - ボイスモーフィングをプレビュー - </string> - <string name="get_voice_effects"> - ボイスモーフィングを取得 - </string> - <combo_box name="voice_effect" tool_tip="ボイスモーフィングを選択してボイスを変更"> - <combo_box.item label="ボイスモーフィングなし" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/pl/floater_big_preview.xml b/indra/newview/skins/default/xui/pl/floater_big_preview.xml deleted file mode 100644 index e730cff618..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<floater name="floater_big_preview" title="PODGLĄD" /> diff --git a/indra/newview/skins/default/xui/pl/floater_post_process.xml b/indra/newview/skins/default/xui/pl/floater_post_process.xml deleted file mode 100644 index 47c40d2315..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_post_process.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="Post-Process Floater" title="USTAWIENIA PRZETWARZANIA KOŃCOWEGO"> - <tab_container name="Post-Process Tabs"> - <panel label="Filtr koloru" name="wmiColorFilterPanel"> - <check_box label="Włącz" name="wmiColorFilterToggle" /> - <text name="wmiColorFilterBrightnessText"> - Jasność - </text> - <text name="wmiColorFilterSaturationText"> - Nasycenie - </text> - <text name="wmiColorFilterContrastText"> - Kontrast - </text> - <text name="wmiColorFilterBaseText"> - Kontrast koloru podstawowego - </text> - </panel> - <panel label="Noktowizja" name="wmiNightVisionPanel"> - <check_box label="Włącz" name="wmiNightVisionToggle" /> - <text name="wmiNightVisionBrightMultText"> - Wielokrotne wzmocnienie światła - </text> - <text name="wmiNightVisionNoiseSizeText"> - Rozmiar szumu - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Moc szumu - </text> - </panel> - <panel label="Poświata" name="wmiBloomPanel"> - <check_box label="Włącz" name="wmiBloomToggle" /> - <text name="wmiBloomExtractText"> - Ekstracja luminacji - </text> - <text name="wmiBloomSizeText"> - Rozmiar poświaty - </text> - <text name="wmiBloomStrengthText"> - Moc poświaty - </text> - </panel> - <panel label="Dodatki" name="Extras"> - <button label="Wczytaj efekt" label_selected="Wczytaj efekt" name="PPLoadEffect" /> - <button label="Zapisz efekt" label_selected="Zapisz efekt" name="PPSaveEffect" /> - <line_editor label="Nazwa efektu" name="PPEffectNameEditor" /> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/pl/floater_sound_devices.xml b/indra/newview/skins/default/xui/pl/floater_sound_devices.xml deleted file mode 100644 index 93a27f68a7..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="floater_sound_devices" title="URZĄDZENIA DŹWIĘKOWE"> - <text name="voice_label"> - Czat głos. - </text> - <check_box name="enable_voice" label="Włączone" /> -</floater> diff --git a/indra/newview/skins/default/xui/pl/floater_voice_effect.xml b/indra/newview/skins/default/xui/pl/floater_voice_effect.xml deleted file mode 100644 index b02266caa9..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_voice_effect.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater name="voice_effects" title="PODGLĄD PRZEKSZTAŁCANIA GŁOSU" label="Miejsca"> - <string name="no_voice_effect"> - (Bez Przekształcania) - </string> - <string name="active_voice_effect"> - (Aktywny) - </string> - <string name="unsubscribed_voice_effect"> - (Bez subskrybcji) - </string> - <string name="new_voice_effect"> - (Nowy!) - </string> - <string name="effect_Beast"> - Bestia - </string> - <string name="effect_Buzz"> - Brzęczenie - </string> - <string name="effect_Creepy"> - Przerażający - </string> - <string name="effect_Cyber"> - Cybernetyczny - </string> - <string name="effect_Female Elf"> - Kobiecy Elf - </string> - <string name="effect_Flirty"> - Flirt - </string> - <string name="effect_Foxy"> - Ponętny - </string> - <string name="effect_Helium"> - Hel - </string> - <string name="effect_Husky Whisper"> - Szept Husky - </string> - <string name="effect_Macho"> - Maczo - </string> - <string name="effect_Micro"> - Mikrus - </string> - <string name="effect_Mini"> - Miniaturowy - </string> - <string name="effect_Nano"> - Malutki - </string> - <string name="effect_Nightmare"> - Koszmar - </string> - <string name="effect_Rumble"> - Burczenie - </string> - <string name="effect_Sexy"> - Seksowny - </string> - <string name="effect_Shorty"> - Krótki - </string> - <string name="effect_Smaller"> - Mniejszy - </string> - <string name="effect_Sneaky"> - Podstępny - </string> - <string name="effect_Stallion"> - Ogier - </string> - <string name="effect_Sultry"> - Gorąco - </string> - <string name="effect_Thunder"> - Grzmot - </string> - <string name="effect_Vixen"> - Lisica - </string> - <text name="preview_text"> - Podgląd - </text> - <text name="status_text"> - Nagraj próbkę, a następnie kliknij na głos aby usłyszeć jego brzmienie. - </text> - <button label="Nagraj" name="record_btn" tool_tip="Nagraj próbkę swojego głosu." /> - <text name="voice_morphing_link"> - [[URL] Subskrybuj teraz] - </text> - <scroll_list name="voice_effect_list" tool_tip="Nagraj próbkę swojego głosu, a następnie kliknij na efekt aby odsłuchać podgląd."> - <scroll_list.columns label="Nazwa głosu" name="name" /> - <scroll_list.columns label="Wygasa" name="expires" /> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/pl/panel_login_first.xml b/indra/newview/skins/default/xui/pl/panel_login_first.xml deleted file mode 100644 index 0604ecbcff..0000000000 --- a/indra/newview/skins/default/xui/pl/panel_login_first.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="panel_login"> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Użytkownik" tool_tip="Nazwa użytkownika wybrana przy rejestracji, np. bobsmith12 lub Steller Sunshine" name="username_combo" /> - <line_editor name="password_edit" label="Hasło" /> - <button label="Zaloguj" name="connect_btn" /> - <check_box label="Zapamiętaj mnie" name="remember_check" /> - <text name="forgot_password_text"> - Zapomniałem/am hasła - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Wyspa Nauki to Twój pierwszy krok. Znajdź portal z wyjściem! - </text> - <text name="image_caption_right"> - Potem zwiedź Wyspę Towarzyską i poznaj innych nowych rezydentów! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/pl/panel_status_bar.xml b/indra/newview/skins/default/xui/pl/panel_status_bar.xml index d50ed3387c..12091225f7 100644 --- a/indra/newview/skins/default/xui/pl/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/pl/panel_status_bar.xml @@ -6,9 +6,6 @@ <panel.string name="bandwidth_tooltip"> Przepustowość </panel.string> - <panel.string name="time"> - [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt] - </panel.string> <panel.string name="buycurrencylabel"> [AMT] L$ </panel.string> diff --git a/indra/newview/skins/default/xui/pl/panel_voice_effect.xml b/indra/newview/skins/default/xui/pl/panel_voice_effect.xml deleted file mode 100644 index 94878943a1..0000000000 --- a/indra/newview/skins/default/xui/pl/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Wyłącz Przekształcanie - </string> - <string name="preview_voice_effects"> - Przeglądaj Przekształcania ▶ - </string> - <string name="get_voice_effects"> - Uzyskaj Przekształcanie ▶ - </string> - <combo_box name="voice_effect" tool_tip="Wybierz odpowienie Przekształcanie Głosu, aby zmienić brzmienie swojego głosu"> - <combo_box.item label="Wyłącz Przekształcanie" name="no_voice_effect" /> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/pt/floater_big_preview.xml b/indra/newview/skins/default/xui/pt/floater_big_preview.xml deleted file mode 100644 index 76ca176689..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="VISUALIZAR"/> diff --git a/indra/newview/skins/default/xui/pt/floater_post_process.xml b/indra/newview/skins/default/xui/pt/floater_post_process.xml deleted file mode 100644 index d4f2e96539..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="AJUSTES DE PÓS-PROCESSAMENTO"> - <tab_container name="Post-Process Tabs"> - <panel label="Filtro de Cor" name="wmiColorFilterPanel"> - <check_box label="Habilitar" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - Brilho - </text> - <text name="wmiColorFilterSaturationText"> - Saturação - </text> - <text name="wmiColorFilterContrastText"> - Contraste - </text> - <text name="wmiColorFilterBaseText"> - Cor Base do Contraste - </text> - <slider label="R" name="wmiColorFilterBaseR"/> - <slider label="G" name="wmiColorFilterBaseG"/> - <slider label="B" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="visão Noturna" name="wmiNightVisionPanel"> - <check_box label="Habilitar" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - Múltiplo de Amplificação de Luz - </text> - <text name="wmiNightVisionNoiseSizeText"> - Tamanho de Ruído - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Intensidade de Ruído - </text> - </panel> - <panel label="Florescência" name="wmiBloomPanel"> - <check_box label="Habilitar" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - Extração de Luminosidade - </text> - <text name="wmiBloomSizeText"> - Tamanho da florescência - </text> - <text name="wmiBloomStrengthText"> - Inensidade da florescência - </text> - </panel> - <panel label="Extras" name="Extras"> - <button label="CarregaEfeito" label_selected="CarregaEfeito" name="PPLoadEffect"/> - <button label="SalvaEfeito" label_selected="SalvaEfeito" name="PPSaveEffect"/> - <line_editor label="Nome do Efeito" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_sound_devices.xml b/indra/newview/skins/default/xui/pt/floater_sound_devices.xml deleted file mode 100644 index 948d727540..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="DISPOSITIVOS DE SOM"> - <text name="voice_label"> - Bate-papo de voz - </text> - <check_box label="Ativado" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_voice_effect.xml b/indra/newview/skins/default/xui/pt/floater_voice_effect.xml deleted file mode 100644 index 71d3c33ae5..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Lugares" name="voice_effects" title="AMOSTRA DE DISTORÇÃO DE VOZ"> - <string name="no_voice_effect"> - (Não distorcer voz) - </string> - <string name="active_voice_effect"> - (Ativo) - </string> - <string name="unsubscribed_voice_effect"> - (Cancelou) - </string> - <string name="new_voice_effect"> - (Novo!) - </string> - <string name="effect_Arena"> - Arena - </string> - <string name="effect_Beast"> - Fera - </string> - <string name="effect_Buff"> - Entusiasmado - </string> - <string name="effect_Buzz"> - Zumbido - </string> - <string name="effect_Camille"> - Camille - </string> - <string name="effect_Creepy"> - Assustador - </string> - <string name="effect_CreepyBot"> - RobôAssustador - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - RobôVozGrossa - </string> - <string name="effect_Demon"> - Demônio - </string> - <string name="effect_Female Elf"> - Elfa - </string> - <string name="effect_Flirty"> - Paquerador - </string> - <string name="effect_Foxy"> - Sensual - </string> - <string name="effect_Halloween 2010 Bonus"> - Bônus_Halloween_2010 - </string> - <string name="effect_Helium"> - Hélio - </string> - <string name="effect_Husky"> - Rouco - </string> - <string name="effect_Husky Whisper"> - Sussurro rouco - </string> - <string name="effect_Intercom"> - Interfone - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Cantarolado baixo - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Modelo - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Pesadelo - </string> - <string name="effect_PopBot"> - RobôPop - </string> - <string name="effect_Rachel"> - Rachel - </string> - <string name="effect_Radio"> - Rádio - </string> - <string name="effect_Robot"> - Robô - </string> - <string name="effect_Roxanne"> - Roxanne - </string> - <string name="effect_Rumble"> - Ronco - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samantha - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Baixinho - </string> - <string name="effect_Smaller"> - Menor - </string> - <string name="effect_Sneaky"> - Sorrateiro - </string> - <string name="effect_Stallion"> - Garanhão - </string> - <string name="effect_Sultry"> - Ardente - </string> - <string name="effect_Thunder"> - Trovão - </string> - <string name="effect_Vixen"> - Maliciosa - </string> - <string name="effect_WhinyBot"> - RobôReclamão - </string> - <text name="preview_text"> - Visualizar - </text> - <text name="status_text"> - Grave uma amostra da sua voz, depois clique em um efeito para ouvir o resultado. - </text> - <button label="Gravar" name="record_btn" tool_tip="Grave uma amostra da sua voz."/> - <button label="Parar" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Assine agora] - </text> - <scroll_list name="voice_effect_list" tool_tip="Grave sua voz por alguns instantes, depois clique num efeito para ouvir a distorção."> - <scroll_list.columns label="Nome da voz" name="name"/> - <scroll_list.columns label="Vence em" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/pt/panel_login_first.xml b/indra/newview/skins/default/xui/pt/panel_login_first.xml deleted file mode 100644 index 86c61163bc..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php?lang=pt - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Nome de usuário" name="username_combo" tool_tip="O nome de usuário que você escolheu ao fazer seu cadastro, como zecazc12 ou Magia Solar"/> - <line_editor label="Senha" name="password_edit"/> - <button label="Login" name="connect_btn"/> - <check_box label="Lembrar-me" name="remember_check"/> - <text name="forgot_password_text"> - Senha esquecida - </text> - <text name="sign_up_text"> - Cadastre-se - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Sua primeira parada é a Ilha da Educação. Encontre o portal de saída! - </text> - <text name="image_caption_right"> - Em seguida, explore a Ilha Social e encontre novos residentes! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/pt/panel_status_bar.xml b/indra/newview/skins/default/xui/pt/panel_status_bar.xml index 9e15f9a02c..47712ad28b 100644 --- a/indra/newview/skins/default/xui/pt/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Banda </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/pt/panel_voice_effect.xml b/indra/newview/skins/default/xui/pt/panel_voice_effect.xml deleted file mode 100644 index 1d7878408a..0000000000 --- a/indra/newview/skins/default/xui/pt/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Distorção de voz desligada - </string> - <string name="preview_voice_effects"> - Checar distorção de voz ▶ - </string> - <string name="get_voice_effects"> - Distorcer voz ▶ - </string> - <combo_box name="voice_effect" tool_tip="Selecione um efeito de distorção para mudar sua voz."> - <combo_box.item label="Distorção de voz desligada" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/ru/floater_big_preview.xml b/indra/newview/skins/default/xui/ru/floater_big_preview.xml deleted file mode 100644 index cdacebadef..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="ПРОСМОТР"/> diff --git a/indra/newview/skins/default/xui/ru/floater_post_process.xml b/indra/newview/skins/default/xui/ru/floater_post_process.xml deleted file mode 100644 index ae97670548..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="НАСТРОЙКИ ПОСЛЕДУЮЩЕЙ ОБРАБОТКИ"> - <tab_container name="Post-Process Tabs"> - <panel label="Цветовой фильтр" name="wmiColorFilterPanel"> - <check_box label="Вкл." name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - Яркость - </text> - <text name="wmiColorFilterSaturationText"> - Насыщенность - </text> - <text name="wmiColorFilterContrastText"> - Контрастность - </text> - <text name="wmiColorFilterBaseText"> - Основной цвет контрастности - </text> - <slider label="К" name="wmiColorFilterBaseR"/> - <slider label="З" name="wmiColorFilterBaseG"/> - <slider label="С" name="wmiColorFilterBaseB"/> - <slider label="И" name="wmiColorFilterBaseI"/> - </panel> - <panel label="Ночное видение" name="wmiNightVisionPanel"> - <check_box label="Вкл." name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - Коэффициент усиления света - </text> - <text name="wmiNightVisionNoiseSizeText"> - Размер искажений - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Мощность искажений - </text> - </panel> - <panel label="Ореол" name="wmiBloomPanel"> - <check_box label="Вкл." name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - Яркость света - </text> - <text name="wmiBloomSizeText"> - Размер ореола - </text> - <text name="wmiBloomStrengthText"> - Мощность ореола - </text> - </panel> - <panel label="Дополнительно" name="Extras"> - <button label="Загрузить эффект" label_selected="Загрузить эффект" name="PPLoadEffect"/> - <button label="Сохранить эффект" label_selected="Сохранить эффект" name="PPSaveEffect"/> - <line_editor label="Название эффекта" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_sound_devices.xml b/indra/newview/skins/default/xui/ru/floater_sound_devices.xml deleted file mode 100644 index fc8de858cd..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="ЗВУКОВЫЕ УСТРОЙСТВА"> - <text name="voice_label"> - Голосовой чат - </text> - <check_box label="Включен" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_voice_effect.xml b/indra/newview/skins/default/xui/ru/floater_voice_effect.xml deleted file mode 100644 index d3cef042a3..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Места" name="voice_effects" title="ПРОСМОТР ИЗМЕНЕНИЯ ГОЛОСА"> - <string name="no_voice_effect"> - (Нет изменения голоса) - </string> - <string name="active_voice_effect"> - (Активно) - </string> - <string name="unsubscribed_voice_effect"> - (Нет подписки) - </string> - <string name="new_voice_effect"> - (Новый!) - </string> - <string name="effect_Arena"> - Arena - </string> - <string name="effect_Beast"> - Beast - </string> - <string name="effect_Buff"> - Buff - </string> - <string name="effect_Buzz"> - Buzz - </string> - <string name="effect_Camille"> - Camille - </string> - <string name="effect_Creepy"> - Creepy - </string> - <string name="effect_CreepyBot"> - CreepyBot - </string> - <string name="effect_Cyber"> - Cyber - </string> - <string name="effect_DeepBot"> - DeepBot - </string> - <string name="effect_Demon"> - Demon - </string> - <string name="effect_Female Elf"> - Фея - </string> - <string name="effect_Flirty"> - Flirty - </string> - <string name="effect_Foxy"> - Foxy - </string> - <string name="effect_Halloween 2010 Bonus"> - Бонус_за_Хэллоуин_2010 - </string> - <string name="effect_Helium"> - Helium - </string> - <string name="effect_Husky"> - Husky - </string> - <string name="effect_Husky Whisper"> - Хриплый шепот - </string> - <string name="effect_Intercom"> - Внутренняя связь - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Напев - </string> - <string name="effect_Macho"> - Macho - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Модель - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Nightmare - </string> - <string name="effect_PopBot"> - PopBot - </string> - <string name="effect_Rachel"> - Rachel - </string> - <string name="effect_Radio"> - Radio - </string> - <string name="effect_Robot"> - Robot - </string> - <string name="effect_Roxanne"> - Roxanne - </string> - <string name="effect_Rumble"> - Урчание - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samantha - </string> - <string name="effect_Sexy"> - Sexy - </string> - <string name="effect_Shorty"> - Shorty - </string> - <string name="effect_Smaller"> - Меньше - </string> - <string name="effect_Sneaky"> - Sneaky - </string> - <string name="effect_Stallion"> - Stallion - </string> - <string name="effect_Sultry"> - Sultry - </string> - <string name="effect_Thunder"> - Thunder - </string> - <string name="effect_Vixen"> - Vixen - </string> - <string name="effect_WhinyBot"> - WhinyBot - </string> - <text name="preview_text"> - Прослушивание - </text> - <text name="status_text"> - Запишите образец, затем щелкните, чтобы услышать, как будет звучать голос. - </text> - <button label="Запись" name="record_btn" tool_tip="Записать образец вашего голоса."/> - <button label="Стоп" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Подписаться] - </text> - <scroll_list name="voice_effect_list" tool_tip="Запишите образец вашего голоса, затем щелкните, чтобы прослушать эффект."> - <scroll_list.columns label="Название голоса" name="name"/> - <scroll_list.columns label="Истекает" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/ru/panel_login_first.xml b/indra/newview/skins/default/xui/ru/panel_login_first.xml deleted file mode 100644 index 5db81ea7ca..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Имя пользователя" name="username_combo" tool_tip="Имя пользователя, которое вы выбрали при регистрации, например, «bobsmith12» или «Steller Sunshine»"/> - <line_editor label="Пароль" name="password_edit"/> - <button label="Войти" name="connect_btn"/> - <check_box label="Запомнить меня" name="remember_check"/> - <text name="forgot_password_text"> - Забытый пароль - </text> - <text name="sign_up_text"> - Регистрация - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Ваш первый шаг – Учебный остров. Найдите портал выхода! - </text> - <text name="image_caption_right"> - Затем исследуйте Социальный остров и познакомьтесь с другими новичками! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/ru/panel_status_bar.xml b/indra/newview/skins/default/xui/ru/panel_status_bar.xml index 124b8f2cff..1fd9b94406 100644 --- a/indra/newview/skins/default/xui/ru/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/ru/panel_status_bar.xml @@ -6,9 +6,6 @@ <panel.string name="bandwidth_tooltip"> Ширина канала </panel.string> - <panel.string name="time"> - [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt] - </panel.string> <panel.string name="timeTooltip"> [weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt] </panel.string> diff --git a/indra/newview/skins/default/xui/ru/panel_voice_effect.xml b/indra/newview/skins/default/xui/ru/panel_voice_effect.xml deleted file mode 100644 index de0b38198f..0000000000 --- a/indra/newview/skins/default/xui/ru/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Изменение голоса отключено - </string> - <string name="preview_voice_effects"> - Прослушать изменение голоса ▶ - </string> - <string name="get_voice_effects"> - Приобрести изменение голоса ▶ - </string> - <combo_box name="voice_effect" tool_tip="Выбор типа изменения для своего голоса"> - <combo_box.item label="Изменение голоса отключено" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/tr/floater_big_preview.xml b/indra/newview/skins/default/xui/tr/floater_big_preview.xml deleted file mode 100644 index c99a71d3c2..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="ÖNİZLEME"/> diff --git a/indra/newview/skins/default/xui/tr/floater_post_process.xml b/indra/newview/skins/default/xui/tr/floater_post_process.xml deleted file mode 100644 index 5e419f8ffa..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="İŞLEM SONRASI AYARLARI"> - <tab_container name="Post-Process Tabs"> - <panel label="Renk Filtresi" name="wmiColorFilterPanel"> - <check_box label="Etkinleştir" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - Parlaklık - </text> - <text name="wmiColorFilterSaturationText"> - Doygunluk - </text> - <text name="wmiColorFilterContrastText"> - Kontrast - </text> - <text name="wmiColorFilterBaseText"> - Kontrast Baz Rengi - </text> - <slider label="R" name="wmiColorFilterBaseR"/> - <slider label="G" name="wmiColorFilterBaseG"/> - <slider label="B" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="Gece Görüşü" name="wmiNightVisionPanel"> - <check_box label="Etkinleştir" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - Işık Yükseltme Çarpanı - </text> - <text name="wmiNightVisionNoiseSizeText"> - Gürültü Büyüklüğü - </text> - <text name="wmiNightVisionNoiseStrengthText"> - Gürültü Gücü - </text> - </panel> - <panel label="Işıma" name="wmiBloomPanel"> - <check_box label="Etkinleştir" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - Parlaklık Çıkarma - </text> - <text name="wmiBloomSizeText"> - Işıma Büyüklüğü - </text> - <text name="wmiBloomStrengthText"> - Işıma Gücü - </text> - </panel> - <panel label="Ekstralar" name="Extras"> - <button label="EfektYükle" label_selected="EfektYükle" name="PPLoadEffect"/> - <button label="EfektKaydet" label_selected="EfektKaydet" name="PPSaveEffect"/> - <line_editor label="Efekt Adı" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_sound_devices.xml b/indra/newview/skins/default/xui/tr/floater_sound_devices.xml deleted file mode 100644 index 470a222d7e..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="SES CİHAZLARI"> - <text name="voice_label"> - Sesli Sohbet - </text> - <check_box label="Etkin" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_voice_effect.xml b/indra/newview/skins/default/xui/tr/floater_voice_effect.xml deleted file mode 100644 index 7a157244cd..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="Yerler" name="voice_effects" title="SES ŞEKİLLENDİRME ÖNİZLEMESİ"> - <string name="no_voice_effect"> - (Ses Şekillendirme Yok) - </string> - <string name="active_voice_effect"> - (Etkin) - </string> - <string name="unsubscribed_voice_effect"> - (Abonelik İptal) - </string> - <string name="new_voice_effect"> - (Yeni!) - </string> - <string name="effect_Arena"> - Arena - </string> - <string name="effect_Beast"> - Yaratık - </string> - <string name="effect_Buff"> - Yapılı - </string> - <string name="effect_Buzz"> - Vızıltı - </string> - <string name="effect_Camille"> - Camille - </string> - <string name="effect_Creepy"> - Korkutucu - </string> - <string name="effect_CreepyBot"> - KorkutucuBot - </string> - <string name="effect_Cyber"> - Siber - </string> - <string name="effect_DeepBot"> - DerinBot - </string> - <string name="effect_Demon"> - İblis - </string> - <string name="effect_Female Elf"> - Dişi Cin - </string> - <string name="effect_Flirty"> - Cilveli - </string> - <string name="effect_Foxy"> - Alımlı - </string> - <string name="effect_Halloween 2010 Bonus"> - Halloween_2010_Bonus - </string> - <string name="effect_Helium"> - Helyum - </string> - <string name="effect_Husky"> - Güçlü - </string> - <string name="effect_Husky Whisper"> - Boğuk Fısıltı - </string> - <string name="effect_Intercom"> - İnterkom - </string> - <string name="effect_Julia"> - Julia - </string> - <string name="effect_Lo Lilt"> - Yavaş Mırıltı - </string> - <string name="effect_Macho"> - Maço - </string> - <string name="effect_Micro"> - Mikro - </string> - <string name="effect_Mini"> - Mini - </string> - <string name="effect_Model"> - Model - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - Kabus - </string> - <string name="effect_PopBot"> - PopBot - </string> - <string name="effect_Rachel"> - Rachel - </string> - <string name="effect_Radio"> - Radyo - </string> - <string name="effect_Robot"> - Robot - </string> - <string name="effect_Roxanne"> - Roxanne - </string> - <string name="effect_Rumble"> - Gurultu - </string> - <string name="effect_Sabrina"> - Sabrina - </string> - <string name="effect_Samantha"> - Samantha - </string> - <string name="effect_Sexy"> - Seksi - </string> - <string name="effect_Shorty"> - Bücür - </string> - <string name="effect_Smaller"> - Daha Küçük - </string> - <string name="effect_Sneaky"> - Sinsi - </string> - <string name="effect_Stallion"> - Maskülen - </string> - <string name="effect_Sultry"> - İhtiraslı - </string> - <string name="effect_Thunder"> - Gök gürültüsü - </string> - <string name="effect_Vixen"> - Çekici - </string> - <string name="effect_WhinyBot"> - AğlakBot - </string> - <text name="preview_text"> - Önizleme için - </text> - <text name="status_text"> - Bir örnek kaydettikten sonra sese tıklayarak nasıl olduğunu duyun. - </text> - <button label="Kaydet" name="record_btn" tool_tip="Sesinizin örneğini kaydedin."/> - <button label="Durdur" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] Hemen Abone Ol] - </text> - <scroll_list name="voice_effect_list" tool_tip="Sesinizin örneğini kaydettikten sonra önizleme için bir efekte tıklayın."> - <scroll_list.columns label="Ses Adı" name="name"/> - <scroll_list.columns label="Bitiş Tarihi" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/tr/panel_login_first.xml b/indra/newview/skins/default/xui/tr/panel_login_first.xml deleted file mode 100644 index 1fc80c2b97..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php - </panel.string> - <panel.string name="sign_up_url"> - https://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="Kullanıcı Adı" name="username_combo" tool_tip="Kaydolduğunuzda seçtiğiniz kullanıcı adı, örn. mustafayalcin12 veya Faruk Gungoren"/> - <line_editor label="Parola" name="password_edit"/> - <button label="Oturum Aç" name="connect_btn"/> - <check_box label="Beni hatırla" name="remember_check"/> - <text name="forgot_password_text"> - Parolamı unuttum - </text> - <text name="sign_up_text"> - Kaydol - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - Başlangıç yeriniz Eğitim Adası. Haydi çıkış portalını bulun! - </text> - <text name="image_caption_right"> - Sonra da Sosyal Ada'yı keşfe çıkın ve diğer LS sakinleriyle tanışın! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/tr/panel_status_bar.xml b/indra/newview/skins/default/xui/tr/panel_status_bar.xml index 616960ffb4..9ae5a251ec 100644 --- a/indra/newview/skins/default/xui/tr/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/tr/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> Bant genişliği </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/tr/panel_voice_effect.xml b/indra/newview/skins/default/xui/tr/panel_voice_effect.xml deleted file mode 100644 index b46833d7e6..0000000000 --- a/indra/newview/skins/default/xui/tr/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - Ses Şekillendirme Kapalı - </string> - <string name="preview_voice_effects"> - Ses Şekillendirme Önizleme ▶ - </string> - <string name="get_voice_effects"> - Ses Şekillendirmeyi Etkinleştir ▶ - </string> - <combo_box name="voice_effect" tool_tip="Sesinizi değiştirmek için bir Ses Şekli seçin"> - <combo_box.item label="Ses Şekillendirme Kapalı" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/skins/default/xui/zh/floater_big_preview.xml b/indra/newview/skins/default/xui/zh/floater_big_preview.xml deleted file mode 100644 index ae68cd7ddf..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_big_preview" title="預覽"/> diff --git a/indra/newview/skins/default/xui/zh/floater_post_process.xml b/indra/newview/skins/default/xui/zh/floater_post_process.xml deleted file mode 100644 index 2908f7c1d0..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Post-Process Floater" title="後處理設定:"> - <tab_container name="Post-Process Tabs"> - <panel label="顏色過濾" name="wmiColorFilterPanel"> - <check_box label="啟用" name="wmiColorFilterToggle"/> - <text name="wmiColorFilterBrightnessText"> - 亮度 - </text> - <text name="wmiColorFilterSaturationText"> - 飽和度 - </text> - <text name="wmiColorFilterContrastText"> - 對比 - </text> - <text name="wmiColorFilterBaseText"> - 對比基本色 - </text> - <slider label="R" name="wmiColorFilterBaseR"/> - <slider label="G" name="wmiColorFilterBaseG"/> - <slider label="B" name="wmiColorFilterBaseB"/> - <slider label="I" name="wmiColorFilterBaseI"/> - </panel> - <panel label="夜視" name="wmiNightVisionPanel"> - <check_box label="啟用" name="wmiNightVisionToggle"/> - <text name="wmiNightVisionBrightMultText"> - 光放大倍數 - </text> - <text name="wmiNightVisionNoiseSizeText"> - 噪音規模 - </text> - <text name="wmiNightVisionNoiseStrengthText"> - 噪音強度 - </text> - </panel> - <panel label="開花" name="wmiBloomPanel"> - <check_box label="啟用" name="wmiBloomToggle"/> - <text name="wmiBloomExtractText"> - 光度萃取 - </text> - <text name="wmiBloomSizeText"> - 開花大小 - </text> - <text name="wmiBloomStrengthText"> - 開花強度 - </text> - </panel> - <panel label="其他" name="Extras"> - <button label="LoadEffect" label_selected="LoadEffect" name="PPLoadEffect"/> - <button label="SaveEffect" label_selected="SaveEffect" name="PPSaveEffect"/> - <line_editor label="效果名稱" name="PPEffectNameEditor"/> - </panel> - </tab_container> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_sound_devices.xml b/indra/newview/skins/default/xui/zh/floater_sound_devices.xml deleted file mode 100644 index 0374c74f8f..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_sound_devices" title="聲音裝置"> - <text name="voice_label"> - 語音聊天 - </text> - <check_box label="已啟用" name="enable_voice"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml b/indra/newview/skins/default/xui/zh/floater_voice_effect.xml deleted file mode 100644 index aab5fa6028..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_voice_effect.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater label="地點" name="voice_effects" title="語音變聲試聽"> - <string name="no_voice_effect"> - (無變聲效果) - </string> - <string name="active_voice_effect"> - (使用中) - </string> - <string name="unsubscribed_voice_effect"> - (已停止訂用) - </string> - <string name="new_voice_effect"> - (新的!) - </string> - <string name="effect_Arena"> - 競技場 - </string> - <string name="effect_Beast"> - 野獸 - </string> - <string name="effect_Buff"> - Buff - </string> - <string name="effect_Buzz"> - Buzz - </string> - <string name="effect_Camille"> - 卡蜜兒 - </string> - <string name="effect_Creepy"> - 怪異 - </string> - <string name="effect_CreepyBot"> - 怪異機器人 - </string> - <string name="effect_Cyber"> - 科幻 - </string> - <string name="effect_DeepBot"> - 深沉機器人 - </string> - <string name="effect_Demon"> - 魔鬼 - </string> - <string name="effect_Female Elf"> - 女性 - 小精靈 - </string> - <string name="effect_Flirty"> - 調情 - </string> - <string name="effect_Foxy"> - 香豔 - </string> - <string name="effect_Halloween 2010 Bonus"> - 2010萬聖節加贈 - </string> - <string name="effect_Helium"> - 氦氣 - </string> - <string name="effect_Husky"> - 沙啞 - </string> - <string name="effect_Husky Whisper"> - 沙啞耳語 - </string> - <string name="effect_Intercom"> - 對講機 - </string> - <string name="effect_Julia"> - 茱莉亞 - </string> - <string name="effect_Lo Lilt"> - 輕微抑揚頓挫 - </string> - <string name="effect_Macho"> - 陽剛 - </string> - <string name="effect_Micro"> - Micro - </string> - <string name="effect_Mini"> - 迷你 - </string> - <string name="effect_Model"> - 模型 - </string> - <string name="effect_Nano"> - Nano - </string> - <string name="effect_Nightmare"> - 惡夢 - </string> - <string name="effect_PopBot"> - PopBot - </string> - <string name="effect_Rachel"> - 瑞秋 - </string> - <string name="effect_Radio"> - 收音機 - </string> - <string name="effect_Robot"> - 機器人 - </string> - <string name="effect_Roxanne"> - 蘿姍 - </string> - <string name="effect_Rumble"> - 低沉隆隆聲 - </string> - <string name="effect_Sabrina"> - 薩賓娜 - </string> - <string name="effect_Samantha"> - 姍曼莎 - </string> - <string name="effect_Sexy"> - 性感 - </string> - <string name="effect_Shorty"> - 矮個兒 - </string> - <string name="effect_Smaller"> - 較小 - </string> - <string name="effect_Sneaky"> - 鬼祟 - </string> - <string name="effect_Stallion"> - 種馬 - </string> - <string name="effect_Sultry"> - 勾魂 - </string> - <string name="effect_Thunder"> - 雷聲 - </string> - <string name="effect_Vixen"> - 潑婦 - </string> - <string name="effect_WhinyBot"> - 哭鬧機器人 - </string> - <text name="preview_text"> - 預覽 - </text> - <text name="status_text"> - 錄下一段樣本,再點按聲音檢查結果。 - </text> - <button label="錄音" name="record_btn" tool_tip="錄下一段你的聲音。"/> - <button label="停止" name="record_stop_btn"/> - <text name="voice_morphing_link"> - [[URL] 現在訂用] - </text> - <scroll_list name="voice_effect_list" tool_tip="錄下一段你的聲音,再點選一個效果試聽。"> - <scroll_list.columns label="語音名稱" name="name"/> - <scroll_list.columns label="過期" name="expires"/> - </scroll_list> -</floater> diff --git a/indra/newview/skins/default/xui/zh/panel_login_first.xml b/indra/newview/skins/default/xui/zh/panel_login_first.xml deleted file mode 100644 index 4d72fcdd03..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_login_first.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<panel name="panel_login"> - <panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php - </panel.string> - <panel.string name="sign_up_url"> - http://join.secondlife.com/ - </panel.string> - <layout_stack name="logo_stack"> - <layout_panel name="parent_panel2"> - <layout_stack name="widget_stack"> - <layout_panel name="widget_container"> - <combo_box label="使用者名稱" name="username_combo" tool_tip="使用者名稱是你註冊時所挑選的,例如 bobsmith12 或 Steller Sunshine"/> - <line_editor label="密碼" name="password_edit"/> - <button label="登入" name="connect_btn"/> - <check_box label="記得我" name="remember_check"/> - <text name="forgot_password_text"> - 忘記密碼 - </text> - <text name="sign_up_text"> - 註冊 - </text> - </layout_panel> - </layout_stack> - </layout_panel> - <layout_panel name="parent_panel3"> - <layout_stack name="images_stack"> - <layout_panel name="images_container"> - <text name="image_caption_left"> - 你在「學習島」的第一步。 找到離開的傳送門! - </text> - <text name="image_caption_right"> - 接著,到「社交島」探索,認識新的居民朋友! - </text> - </layout_panel> - </layout_stack> - </layout_panel> - </layout_stack> -</panel> diff --git a/indra/newview/skins/default/xui/zh/panel_status_bar.xml b/indra/newview/skins/default/xui/zh/panel_status_bar.xml index 0d6fcea451..90155fea86 100644 --- a/indra/newview/skins/default/xui/zh/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/zh/panel_status_bar.xml @@ -6,7 +6,7 @@ <panel.string name="bandwidth_tooltip"> 頻寬 </panel.string> - <panel.string name="time"> + <panel.string name="time_ampm"> [hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt] </panel.string> <panel.string name="timeTooltip"> diff --git a/indra/newview/skins/default/xui/zh/panel_voice_effect.xml b/indra/newview/skins/default/xui/zh/panel_voice_effect.xml deleted file mode 100644 index 6c8a452014..0000000000 --- a/indra/newview/skins/default/xui/zh/panel_voice_effect.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_voice_effect"> - <string name="no_voice_effect"> - 關閉變聲效果 - </string> - <string name="preview_voice_effects"> - 預覽變聲效果 ▶ - </string> - <string name="get_voice_effects"> - 取得變聲效果 ▶ - </string> - <combo_box name="voice_effect" tool_tip="選取一個變聲效果來改變你的聲音"> - <combo_box.item label="關閉變聲效果" name="no_voice_effect"/> - </combo_box> -</panel> diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index acbf019034..3e2e5e70a2 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -34,16 +34,16 @@ #include "lltrans.h" #include "llui.h" -#include <map> +#include <unordered_map> // Baked-in return values for getString() -std::map< std::string, std::string, std::less<>> gString; +std::unordered_map< std::string, std::string, ll::string_hash, std::equal_to<>> gString; // Baked-in return values for getCountString() // map of pairs of input xml_desc and integer count typedef std::pair< std::string, int > count_string_t; -std::map< count_string_t, std::string > gCountString; +std::map<count_string_t, std::string> gCountString; std::string LLTrans::getString(const std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string) { diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 29ca903256..b00b89b9fd 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -123,7 +123,7 @@ void LLCredential::authenticatorType(std::string &idType) LLNotificationPtr LLNotificationsUtil::add(const std::string& name, const LLSD& substitutions, const LLSD& payload, - boost::function<void (const LLSD&, const LLSD&)> functor) + std::function<void (const LLSD&, const LLSD&)> functor) { return LLNotificationPtr((LLNotification*)NULL); } @@ -223,8 +223,6 @@ bool llHashedUniqueID(unsigned char* id) //----------------------------------------------------------------------------- #include "../llappviewer.h" void LLAppViewer::forceQuit(void) {} -bool LLAppViewer::isUpdaterMissing() { return true; } -bool LLAppViewer::waitForUpdater() { return false; } LLAppViewer * LLAppViewer::sInstance = 0; //----------------------------------------------------------------------------- @@ -253,7 +251,7 @@ void LLProgressView::setMessage(std::string const &){} // LLNotifications class MockNotifications : public LLNotificationsInterface { - boost::function<void (const LLSD&, const LLSD&)> mResponder; + std::function<void (const LLSD&, const LLSD&)> mResponder; int mAddedCount; public: diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index fc9f5b707a..3ff38ea372 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -177,15 +177,15 @@ namespace tut LLSLURL slurl = LLSLURL(""); ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION); - slurl = LLSLURL("http://slurl.com/secondlife/myregion"); + slurl = LLSLURL("https://slurl.com/secondlife/myregion"); ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + "https://maps.secondlife.com/secondlife/myregion/128/128/0"); - slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3"); + slurl = LLSLURL("https://maps.secondlife.com/secondlife/myregion/1/2/3"); ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + "https://maps.secondlife.com/secondlife/myregion/1/2/3"); slurl = LLSLURL("secondlife://"); ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY); @@ -196,27 +196,27 @@ namespace tut slurl = LLSLURL("secondlife://myregion"); ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + "https://maps.secondlife.com/secondlife/myregion/128/128/0"); slurl = LLSLURL("secondlife://myregion/1/2/3"); ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + "https://maps.secondlife.com/secondlife/myregion/1/2/3"); slurl = LLSLURL("/myregion"); ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("/region slurl, region ", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/128/128/0"); + "https://maps.secondlife.com/secondlife/myregion/128/128/0"); slurl = LLSLURL("/myregion/1/2/3"); ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals("/ slurl, region + coords", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/myregion/1/2/3"); + "https://maps.secondlife.com/secondlife/myregion/1/2/3"); slurl = LLSLURL("my region/1/2/3"); ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals(" slurl, region + coords", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + "https://maps.secondlife.com/secondlife/my%20region/1/2/3"); LLGridManager::getInstance()->setGridChoice("my.grid.com"); slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3"); @@ -309,7 +309,7 @@ namespace tut slurl = LLSLURL("my region", LLVector3(1,2,3)); ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION); ensure_equals(" default grid/region/vector", slurl.getSLURLString(), - "http://maps.secondlife.com/secondlife/my%20region/1/2/3"); + "https://maps.secondlife.com/secondlife/my%20region/1/2/3"); LLGridManager::getInstance()->setGridChoice("MyGrid"); slurl = LLSLURL("my region", LLVector3(1,2,3)); diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index d9cb9e7538..1cbb8b50eb 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -236,7 +236,7 @@ namespace tut std::string("https://secondlife.com/helpers/")); ensure_equals("Agni login page", LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"), - std::string("https://viewer-splash.secondlife.com/")); + std::string("https://viewer-splash-v2.secondlife.com/")); ensure("Agni is a system grid", LLGridManager::getInstance()->isSystemGrid("util.agni.lindenlab.com")); @@ -261,7 +261,7 @@ namespace tut std::string("https://secondlife.aditi.lindenlab.com/helpers/")); ensure_equals("Aditi login page", LLGridManager::getInstance()->getLoginPage("util.aditi.lindenlab.com"), - std::string("https://viewer-splash.secondlife.com/")); + std::string("https://viewer-splash-v2.secondlife.com/")); ensure("Aditi is a system grid", LLGridManager::getInstance()->isSystemGrid("util.aditi.lindenlab.com")); } @@ -309,7 +309,7 @@ namespace tut std::string("https://secondlife.com/helpers/")); ensure_equals("Agni login page", LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"), - std::string("https://viewer-splash.secondlife.com/")); + std::string("https://viewer-splash-v2.secondlife.com/")); ensure("Agni is a system grid", LLGridManager::getInstance()->isSystemGrid("util.agni.lindenlab.com")); @@ -333,7 +333,7 @@ namespace tut std::string("https://secondlife.aditi.lindenlab.com/helpers/")); ensure_equals("Aditi login page", LLGridManager::getInstance()->getLoginPage("util.aditi.lindenlab.com"), - std::string("https://viewer-splash.secondlife.com/")); + std::string("https://viewer-splash-v2.secondlife.com/")); ensure("Aditi is a system grid", LLGridManager::getInstance()->isSystemGrid("util.aditi.lindenlab.com")); @@ -391,7 +391,7 @@ namespace tut std::string("https://minimal.long.name/helpers/")); ensure_equals("minimal grid login page", LLGridManager::getInstance()->getLoginPage("minimal.long.name"), - std::string("http://minimal.long.name/app/login/")); + std::string("https://minimal.long.name/app/login/")); } @@ -422,7 +422,7 @@ namespace tut std::string("https://secondlife.com/helpers/")); ensure_equals("getLoginPage", LLGridManager::getInstance()->getLoginPage(), - std::string("https://viewer-splash.secondlife.com/")); + std::string("https://viewer-splash-v2.secondlife.com/")); ensure_equals("update url base for Agni", // relies on agni being the default std::string("https://update.secondlife.com/update"), LLGridManager::getInstance()->getUpdateServiceURL()); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0ce89df914..3a0df626f1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -542,18 +542,6 @@ class Windows_x86_64_Manifest(ViewerManifest): '*.bat', '*.tar.xz'))) - with self.prefix(src=os.path.join(pkgdir, "VMP")): - # include the compiled launcher scripts so that it gets included in the file_list - self.path('SLVersionChecker.exe') - - with self.prefix(dst="vmp_icons"): - with self.prefix(src=self.icon_path()): - self.path("secondlife.ico") - #VMP Tkinter icons - with self.prefix(src="vmp_icons"): - self.path("*.png") - self.path("*.gif") - # Plugin host application self.path2basename(os.path.join(os.pardir, 'llplugin', 'slplugin', self.args['configuration']), @@ -767,6 +755,126 @@ class Windows_x86_64_Manifest(ViewerManifest): return '\n'.join(result) def package_finish(self): + # Check if we should use Velopack instead of NSIS + # Note: as of 2026.01's release, we will be building with Velopack's one click install. + # We maintain the legacy NSIS packaging mainly for TPVs at this point. + if self.args.get('velopack', 'OFF') == 'ON': + self.velopack_package_finish() + return + + # NSIS packaging (legacy) + self.nsis_package_finish() + + def velopack_package_finish(self): + # packId determines install folder: %LocalAppData%\{packId} + # Uses same naming as NSIS INSTNAME for channel separation + pack_id = self.app_name_oneword() # "SecondLife", "SecondLifeBeta", etc. + # Velopack requires SemVer2. Use major.minor.patch-buildnumber so that + # Velopack can distinguish builds and order them correctly. + pack_version = '.'.join(self.args['version'][:3]) + if len(self.args['version']) > 3 and self.args['version'][3]: + pack_version += '-' + self.args['version'][3] + pack_title = self.app_name() # Display name with spaces + pack_dir = self.get_dst_prefix() + main_exe = self.final_exe() + installer_base = self.installer_base_name() + exclude_pattern = r'.*\.pdb|.*\.map|.*\.bat|.*\.exp|.*\.lib|.*\.nsi|.*\.tar\.xz|secondlife-bin\..*|.*_Setup\.exe|.*-Setup\.exe' + + # Channel-specific icon for the Velopack installer. + # CMake copies icons/{channel}/secondlife.ico to res/ll_icon.ico at configure time. + # Try the CMake-generated copy first, fall back to the source icon. + icon_path = os.path.join(self.get_src_prefix(), 'res', 'll_icon.ico') + if not os.path.exists(icon_path): + icon_path = os.path.join(self.get_src_prefix(), self.icon_path(), 'secondlife.ico') + + # In CI, defer Velopack packaging to the sign step where Azure credentials + # are available. Emit metadata as GitHub outputs so the sign step can run + # vpk pack with --signTemplate, producing a package with signed executables. + if os.getenv('GITHUB_ACTIONS'): + # Copy the icon into pack_dir so it's included in the Windows-app artifact + icon_filename = '' + if os.path.exists(icon_path): + icon_filename = os.path.basename(icon_path) + icon_dest = os.path.join(pack_dir, icon_filename) + shutil.copy2(icon_path, icon_dest) + print("Copied icon %s to %s" % (icon_path, icon_dest)) + else: + print("WARNING: Icon not found at %s" % icon_path) + + # Emit metadata for the sign step + self.set_github_output('velopack_pack_id', pack_id) + self.set_github_output('velopack_pack_version', pack_version) + self.set_github_output('velopack_pack_title', pack_title) + self.set_github_output('velopack_main_exe', main_exe) + self.set_github_output('velopack_icon', icon_filename) + self.set_github_output('velopack_installer_base', installer_base) + self.set_github_output('velopack_exclude', exclude_pattern) + # Set package_file so llmanifest's touched.bat logic doesn't crash + self.package_file = installer_base + '_Setup.exe' + print("CI mode: Velopack packaging deferred to sign step") + return + + # Local builds: run vpk pack directly (unsigned) + vpk_args = [ + 'vpk', 'pack', + '--packId', pack_id, + '--packVersion', pack_version, + '--packDir', pack_dir, + '--mainExe', main_exe, + '--packTitle', pack_title, + '--exclude', exclude_pattern, + # Suppress Velopack's built-in shortcut creation; we create our own + # shortcuts in llvelopack.cpp on_after_install hook instead. + '--shortcuts', '', + ] + + # Add icon — CMake copies the channel-appropriate secondlife.ico to res/ll_icon.ico + if os.path.exists(icon_path): + print("Using icon: %s" % icon_path) + vpk_args.extend(['--icon', icon_path]) + else: + print("WARNING: Icon not found at %s — Setup.exe will have no icon" % icon_path) + + print("Running Velopack packaging: %s" % ' '.join(vpk_args)) + + # Run vpk command + import subprocess + result = subprocess.run(vpk_args, cwd=os.path.dirname(pack_dir), capture_output=True, text=True) + if result.stdout: + print("vpk stdout: %s" % result.stdout) + if result.stderr: + print("vpk stderr: %s" % result.stderr) + if result.returncode != 0: + raise ManifestError("Velopack packaging failed with code %d" % result.returncode) + + # Velopack outputs to a Releases directory + releases_dir = os.path.join(os.path.dirname(pack_dir), 'Releases') + + # Move the setup exe INTO pack_dir so it's included in the Windows-app artifact + # IMPORTANT: Use hyphen format (-Setup.exe) to avoid the *_Setup.exe exclusion pattern + # in viewer_app output (line ~538). The underscore pattern excludes NSIS installers + # which are rebuilt during signing, but Velopack installers are created here. + # Velopack creates: {packId}-win-Setup.exe + velopack_setup = os.path.join(releases_dir, '%s-win-Setup.exe' % pack_id) + self.package_file = installer_base + '_Setup.exe' + our_setup = os.path.join(pack_dir, self.package_file) + if os.path.exists(velopack_setup): + shutil.move(velopack_setup, our_setup) + print("Moved %s to %s" % (velopack_setup, our_setup)) + + # Rename the portable zip to include the version number + # Velopack creates: {packId}-win-Portable.zip + velopack_portable = os.path.join(releases_dir, '%s-win-Portable.zip' % pack_id) + if os.path.exists(velopack_portable): + our_portable = os.path.join(releases_dir, installer_base + '_Portable.zip') + shutil.move(velopack_portable, our_portable) + print("Moved %s to %s" % (velopack_portable, our_portable)) + + # Output the Releases directory path for artifact upload (contains nupkg, RELEASES for updates) + self.set_github_output('velopack_releases', releases_dir) + + def nsis_package_finish(self): + """Package the viewer using NSIS installer (legacy)""" # a standard map of strings for replacing in the templates substitution_strings = { 'version' : '.'.join(self.args['version']), @@ -783,7 +891,7 @@ class Windows_x86_64_Manifest(ViewerManifest): substitution_strings['installer_file'] = installer_file version_vars = """ - !define INSTEXE "SLVersionChecker.exe" + !define INSTEXE "%(final_exe)s" !define VERSION "%(version_short)s" !define VERSION_LONG "%(version)s" !define VERSION_DASHES "%(version_dashes)s" @@ -863,13 +971,12 @@ class Darwin_x86_64_Manifest(ViewerManifest): with self.prefix(src="", dst="Contents"): # everything goes in Contents bugsplat_db = self.args.get('bugsplat') if bugsplat_db: - # Inject BugsplatServerURL into Info.plist if provided. + # Inject Bugsplat's db into Info.plist if provided. Info_plist = self.dst_path_of("Info.plist") with open(Info_plist, 'rb') as f: Info = plistlib.load(f) # https://www.bugsplat.com/docs/platforms/os-x#configuration - Info["BugsplatServerURL"] = \ - "https://{}.bugsplat.com/".format(bugsplat_db) + Info["BugSplatDatabase"] = bugsplat_db self.put_in_file( plistlib.dumps(Info), os.path.basename(Info_plist), @@ -883,6 +990,8 @@ class Darwin_x86_64_Manifest(ViewerManifest): if self.args.get('bugsplat'): self.path2basename(relpkgdir, "BugsplatMac.framework") + self.path2basename(relpkgdir, "CrashReporter.framework") + self.path2basename(relpkgdir, "HockeySDK.framework") # OpenAL dylibs if self.args['openal'] == 'ON': @@ -922,6 +1031,24 @@ class Darwin_x86_64_Manifest(ViewerManifest): # work, we need the build to noisily fail! oldpath = subprocess.check_output( ['objdump', '--macho', '--dylib-id', '--non-verbose', + os.path.join(relpkgdir, "HockeySDK.framework", "HockeySDK")], + text=True + ).splitlines()[-1] # take the last line of output + self.run_command( + ['install_name_tool', '-change', oldpath, + '@executable_path/../Frameworks/HockeySDK.framework/HockeySDK', + executable]) + oldpath = subprocess.check_output( + ['objdump', '--macho', '--dylib-id', '--non-verbose', + os.path.join(relpkgdir, "CrashReporter.framework", "CrashReporter")], + text=True + ).splitlines()[-1] # take the last line of output + self.run_command( + ['install_name_tool', '-change', oldpath, + '@executable_path/../Frameworks/CrashReporter.framework/CrashReporter', + executable]) + oldpath = subprocess.check_output( + ['objdump', '--macho', '--dylib-id', '--non-verbose', os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")], text=True ).splitlines()[-1] # take the last line of output @@ -950,15 +1077,6 @@ class Darwin_x86_64_Manifest(ViewerManifest): with self.prefix(src=self.icon_path(), dst="") : self.path("secondlife.icns") - # Copy in the updater script and helper modules - self.path(src=os.path.join(pkgdir, 'VMP'), dst="updater") - - with self.prefix(src="", dst=os.path.join("updater", "icons")): - self.path2basename(self.icon_path(), "secondlife.ico") - with self.prefix(src="vmp_icons", dst=""): - self.path("*.png") - self.path("*.gif") - with self.prefix(src_dst="cursors_mac"): self.path("*.tif") @@ -1110,6 +1228,123 @@ class Darwin_x86_64_Manifest(ViewerManifest): arcname=self.app_name() + ".app") self.set_github_output_path('viewer_app', tarpath) + # Generate Velopack update packages if enabled + # This creates the nupkg and RELEASES files needed for auto-updates + # Distribution is still via DMG, but updates use Velopack + if self.args.get('velopack', 'OFF') == 'ON': + self.velopack_package_finish() + + def velopack_package_finish(self): + """Generate Velopack update packages for macOS. + + This creates the nupkg and releases.json files needed for auto-updates. + Distribution is still via DMG - Velopack only handles the update infrastructure. + """ + # packId determines install identification - same as Windows for consistency + pack_id = self.app_name_oneword() # "SecondLife", "SecondLifeBeta", etc. + # Velopack requires SemVer2. Use major.minor.patch-buildnumber so that + # Velopack can distinguish builds and order them correctly. + pack_version = '.'.join(self.args['version'][:3]) + if len(self.args['version']) > 3 and self.args['version'][3]: + pack_version += '-' + self.args['version'][3] + pack_title = self.app_name() # Display name with spaces + + # The .app bundle path (e.g., "/path/to/Second Life Release.app") + app_bundle = self.get_dst_prefix() + # Bundle ID from args (e.g., "com.secondlife.viewer") + bundle_id = self.args.get('bundleid', 'com.secondlife.indra.viewer') + + # Icon path for macOS + icon_path = os.path.join(self.get_src_prefix(), self.icon_path(), 'secondlife.icns') + + # The main executable inside Contents/MacOS/ is named after the channel + main_exe = self.channel() + + # In CI, defer Velopack packaging to the sign step where code signing + # credentials are available. Emit metadata as GitHub outputs so the + # sign step can run vpk pack after signing the app bundle. + if os.getenv('GITHUB_ACTIONS'): + self.set_github_output('velopack_mac_pack_id', pack_id) + self.set_github_output('velopack_mac_pack_version', pack_version) + self.set_github_output('velopack_mac_pack_title', pack_title) + self.set_github_output('velopack_mac_main_exe', main_exe) + self.set_github_output('velopack_mac_bundle_id', bundle_id) + print("CI mode: macOS Velopack packaging deferred to sign step") + return + + # Local builds: run vpk pack directly (unsigned) + + # Parent directory containing the .app bundle - this is where we run vpk from + # and where the Releases directory will be created + work_dir = os.path.dirname(app_bundle) + + # Output directory for releases - clean it first to avoid version conflicts + releases_dir = os.path.join(work_dir, 'Releases') + if os.path.exists(releases_dir): + print("Cleaning existing Releases directory: %s" % releases_dir) + shutil.rmtree(releases_dir) + + # Build vpk command for macOS + # See: https://docs.velopack.io/reference/cli/content/vpk-osx + vpk_args = [ + 'vpk', 'pack', + '--packId', pack_id, + '--packVersion', pack_version, + '--packDir', app_bundle, + '--packTitle', pack_title, + '--mainExe', main_exe, # Executable name inside Contents/MacOS/ + '--bundleId', bundle_id, + '--outputDir', releases_dir, + '--noInst', # Don't generate .pkg installer - we use DMG for distribution + '--verbose', # Show detailed output + ] + + # Add icon if exists + if os.path.exists(icon_path): + vpk_args.extend(['--icon', icon_path]) + + print("Running Velopack packaging for macOS:") + print(" Command: %s" % ' '.join(vpk_args)) + print(" Working directory: %s" % work_dir) + print(" App bundle: %s" % app_bundle) + print(" Main executable: %s" % main_exe) + + # Run vpk command + result = subprocess.run(vpk_args, cwd=work_dir, capture_output=True, text=True) + + # Always print output for debugging + if result.stdout: + print("vpk stdout:\n%s" % result.stdout) + if result.stderr: + print("vpk stderr:\n%s" % result.stderr) + + if result.returncode != 0: + raise ManifestError("Velopack packaging failed with code %d" % result.returncode) + + # Verify the Releases directory was created and contains expected files + if not os.path.exists(releases_dir): + raise ManifestError("Velopack releases directory not found: %s" % releases_dir) + + # List what was created + releases_contents = os.listdir(releases_dir) + print("Velopack releases directory contents: %s" % releases_contents) + + # Verify we have the expected files (nupkg and releases JSON) + nupkg_files = [f for f in releases_contents if f.endswith('.nupkg')] + json_files = [f for f in releases_contents if f.endswith('.json')] + + if not nupkg_files: + raise ManifestError("No .nupkg files found in releases directory") + if not json_files: + raise ManifestError("No releases JSON files found in releases directory") + + print("Generated %d nupkg file(s): %s" % (len(nupkg_files), nupkg_files)) + print("Generated %d JSON file(s): %s" % (len(json_files), json_files)) + + # Output the Releases directory path for artifact upload + self.set_github_output('velopack_releases', releases_dir) + print("Velopack releases directory: %s" % releases_dir) + class Darwin_arm64_Manifest(ViewerManifest): build_data_json_platform = 'mac' @@ -1745,6 +1980,7 @@ if __name__ == "__main__": dict(name='discord', description="""Indication discord social sdk libraries are needed""", default='OFF'), dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'), dict(name='tracy', description="""Indication tracy profiler is enabled""", default='OFF'), + dict(name='velopack', description="""Use Velopack installer instead of NSIS""", default='OFF'), ] try: main(extra=extra_arguments) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index f80286a630..246fc5e6f8 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -13,7 +13,6 @@ include(bugsplat) set(test_SOURCE_FILES io.cpp llapp_tut.cpp - llblowfish_tut.cpp llbuffer_tut.cpp lldoubledispatch_tut.cpp llevents_tut.cpp diff --git a/indra/test/blowfish.1.bin b/indra/test/blowfish.1.bin deleted file mode 100755 index 61286e45e3..0000000000 --- a/indra/test/blowfish.1.bin +++ /dev/null @@ -1 +0,0 @@ -.A3LE ``K@;M[B>C'
\ No newline at end of file diff --git a/indra/test/blowfish.2.bin b/indra/test/blowfish.2.bin Binary files differdeleted file mode 100755 index ef72d96bbf..0000000000 --- a/indra/test/blowfish.2.bin +++ /dev/null diff --git a/indra/test/blowfish.digits.txt b/indra/test/blowfish.digits.txt deleted file mode 100644 index fce1fed943..0000000000 --- a/indra/test/blowfish.digits.txt +++ /dev/null @@ -1 +0,0 @@ -01234567890123456789012345678901234 diff --git a/indra/test/blowfish.pl b/indra/test/blowfish.pl deleted file mode 100755 index 30f41dcd4c..0000000000 --- a/indra/test/blowfish.pl +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl -# -# Test Perl Crypt::CBC Blowfish algorithm and initial parameter settings -# for compatibility with OpenSSL's Blowfish algorithm/settings. -# -# Used by outbound LSL email (openssl C library) and mailglue (Perl library) -use strict; -use warnings; - -# *TODO: specify test count here -use Test::More qw(no_plan); - -use Crypt::CBC; -use MIME::Base64; - -my $init_vector = "\x00" x 8; -# my $key = pack("H*", "ef5a8376eb0c99fe0dafa487d15bec19cae63d1e25fe31d8d92f7ab0398246d70ee733108e47360e16359654571cf5bab6c3375b42cee4fa"); -# my $key = "d263eb8a78034e40"; - #"8d082918aa369174"; -my $key = "\x00" x 16; - -my $cipher = Crypt::CBC->new( { cipher => 'Blowfish', - regenerate_key => 0, - key => $key, - iv => $init_vector, - header => 'none', - prepend_iv => 0, - keysize => 16 } ); - -#my $blocks = $cipher->blocksize(); -#print "blocksize $blocks\n"; - -my $len; -my $input = "01234567890123456789012345678901234\n"; -#my $input = "a whale of a tale I tell you lad, a whale of a tale for me, a whale of a tale and the fiddlers three"; -$len = length($input); -is ($len, 36, "input length"); - -$len = length($key); -is ($len, 16, "key length"); - - -my $encrypted = $cipher->encrypt($input); -is (length($encrypted), 40, "encrypted length"); - -open(FH, "blowfish.1.bin"); -my $bin = scalar <FH>; -is ($encrypted, $bin, "matches openssl"); -close(FH); - -my $base64 = encode_base64($encrypted); -is ($base64, "LkGExDOMTNxFIGBg8gP43UvbQLz7xztNWwYF2kLrtwT4hD7LykOXJw==\n", - "base64 output"); - -my $unbase64 = decode_base64($base64); -is( $encrypted, $unbase64, "reverse base64" ); - -my $output = $cipher->decrypt($unbase64); -is ($input, $output, "reverse encrypt"); - -$key = pack("H[32]", "526a1e07a19dbaed84c4ff08a488d15e"); -$cipher = Crypt::CBC->new( { cipher => 'Blowfish', - regenerate_key => 0, - key => $key, - iv => $init_vector, - header => 'none', - prepend_iv => 0, - keysize => 16 } ); -$encrypted = $cipher->encrypt($input); -is (length($encrypted), 40, "uuid encrypted length"); -$output = $cipher->decrypt($encrypted); -is ($input, $output, "uuid reverse encrypt"); - -open(FH, "blowfish.2.bin"); -$bin = scalar <FH>; -close(FH); -is( $encrypted, $bin, "uuid matches openssl" ); - -print encode_base64($encrypted); diff --git a/indra/test/llblowfish_tut.cpp b/indra/test/llblowfish_tut.cpp deleted file mode 100644 index a8690ccb33..0000000000 --- a/indra/test/llblowfish_tut.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/** - * @file llblowfish_tut.cpp - * @author James Cook, james@lindenlab.com - * @date 2007-02-04 - * - * Data files generated with: - * openssl enc -bf-cbc -in blowfish.digits.txt -out blowfish.1.bin -K 00000000000000000000000000000000 -iv 0000000000000000 -p - * openssl enc -bf-cbc -in blowfish.digits.txt -out blowfish.2.bin -K 526a1e07a19dbaed84c4ff08a488d15e -iv 0000000000000000 -p - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "linden_common.h" -#include "lltut.h" - -#include "llblowfishcipher.h" - -#include "lluuid.h" - -namespace tut -{ - class LLData - { - public: - unsigned char* mInput; - int mInputSize; - - LLData() - { - // \n to make it easier to create text files - // for testing with command line openssl - mInput = (unsigned char*)"01234567890123456789012345678901234\n"; - mInputSize = 36; - } - - bool matchFile(const std::string& filename, - const std::string& data) - { - LLFILE* fp = LLFile::fopen(filename, "rb"); - if (!fp) - { - // sometimes test is run inside the indra directory - std::string path = "test/"; - path += filename; - fp = LLFile::fopen(path, "rb"); - } - if (!fp) - { - LL_WARNS() << "unable to open " << filename << LL_ENDL; - return false; - } - - std::string good; - good.resize(256); - size_t got = fread(&good[0], 1, 256, fp); - LL_DEBUGS() << "matchFile read " << got << LL_ENDL; - fclose(fp); - good.resize(got); - - return (good == data); - } - }; - typedef test_group<LLData> blowfish_test; - typedef blowfish_test::object blowfish_object; - // Create test with name that can be selected on - // command line of test app. - tut::blowfish_test blowfish("blowfish"); - - template<> template<> - void blowfish_object::test<1>() - { - LLUUID blank; - LLBlowfishCipher cipher(&blank.mData[0], UUID_BYTES); - - U32 dst_len = cipher.requiredEncryptionSpace(36); - ensure("encryption space 36", - (dst_len == 40) ); - - // Blowfish adds an additional 8-byte block if your - // input is an exact multiple of 8 - dst_len = cipher.requiredEncryptionSpace(8); - ensure("encryption space 8", - (dst_len == 16) ); - } - - template<> template<> - void blowfish_object::test<2>() - { - LLUUID blank; - LLBlowfishCipher cipher(&blank.mData[0], UUID_BYTES); - - std::string result; - result.resize(256); - U32 count = cipher.encrypt(mInput, mInputSize, - (U8*) &result[0], 256); - - ensure("encrypt output count", - (count == 40) ); - result.resize(count); - - ensure("encrypt null key", matchFile("blowfish.1.bin", result)); - } - - template<> template<> - void blowfish_object::test<3>() - { - // same as base64 test id - LLUUID id("526a1e07-a19d-baed-84c4-ff08a488d15e"); - LLBlowfishCipher cipher(&id.mData[0], UUID_BYTES); - - std::string result; - result.resize(256); - U32 count = cipher.encrypt(mInput, mInputSize, - (U8*) &result[0], 256); - - ensure("encrypt output count", - (count == 40) ); - result.resize(count); - - ensure("encrypt real key", matchFile("blowfish.2.bin", result)); - } -} diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp index bf5cd3f853..c5d5dcb9d4 100644 --- a/indra/test/llevents_tut.cpp +++ b/indra/test/llevents_tut.cpp @@ -44,15 +44,12 @@ #include <typeinfo> // external library headers #include <boost/bind.hpp> -#include <boost/assign/list_of.hpp> // other Linden headers #include "tests/listener.h" // must PRECEDE lltut.h #include "lltut.h" #include "catch_and_store_what_in.h" #include "stringize.h" -using boost::assign::list_of; - template<typename T> T make(const T& value) { @@ -178,7 +175,7 @@ void events_object::test<2>() LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop); LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call, // after listener0 - make<LLEventPump::NameList>(list_of(listener0.getName()))); + make<LLEventPump::NameList>(LLEventPump::NameList{ listener0.getName() })); ensure("enabled", per_frame.enabled()); ensure("connected 0", bound0.connected()); ensure("unblocked 0", !bound0.blocked()); @@ -278,24 +275,24 @@ void events_object::test<6>() button.listen("Mary", boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), // state that "Mary" must come after "checked" - make<NameList> (list_of("checked"))); + make<NameList>(NameList{ "checked" })); button.listen("checked", boost::bind(&Collect::add, boost::ref(collector), "checked", _1), // "checked" must come after "spot" - make<NameList> (list_of("spot"))); + make<NameList>(NameList{ "spot" })); button.listen("spot", boost::bind(&Collect::add, boost::ref(collector), "spot", _1)); button.post(1); - ensure_equals(collector.result, make<StringVec>(list_of("spot")("checked")("Mary"))); + ensure_equals(collector.result, make<StringVec>(StringVec{ "spot", "checked", "Mary" })); collector.clear(); button.stopListening("Mary"); button.listen("Mary", boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), LLEventPump::empty, // no after dependencies // now "Mary" must come before "spot" - make<NameList>(list_of("spot"))); + make<NameList>(NameList{ "spot" })); button.post(2); - ensure_equals(collector.result, make<StringVec>(list_of("Mary")("spot")("checked"))); + ensure_equals(collector.result, make<StringVec>(StringVec{ "Mary", "spot", "checked" })); collector.clear(); button.stopListening("spot"); std::string threw = catch_what<LLEventPump::Cycle>( @@ -303,7 +300,7 @@ void events_object::test<6>() button.listen("spot", boost::bind(&Collect::add, boost::ref(collector), "spot", _1), // after "Mary" and "checked" -- whoops! - make<NameList>(list_of("Mary")("checked"))); + make<NameList>(NameList{ "Mary", "checked" })); }); // Obviously the specific wording of the exception text can // change; go ahead and change the test to match. @@ -321,20 +318,18 @@ void events_object::test<6>() ensure_contains("cyclic dependencies", threw, "after (\"Mary\", \"checked\") -> \"spot\""); button.listen("yellow", - boost::bind(&Collect::add, boost::ref(collector), "yellow", _1), - make<NameList>(list_of("checked"))); + boost::bind(&Collect::add, boost::ref(collector), "yellow", _1), make<NameList>(NameList{ "checked" })); button.listen("shoelaces", - boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1), - make<NameList>(list_of("checked"))); + boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1), make<NameList>(NameList{ "checked" })); button.post(3); - ensure_equals(collector.result, make<StringVec>(list_of("Mary")("checked")("yellow")("shoelaces"))); + ensure_equals(collector.result, make<StringVec>(StringVec{ "Mary", "checked", "yellow", "shoelaces" })); collector.clear(); threw = catch_what<LLEventPump::OrderChange>( [&button, &collector](){ button.listen("of", boost::bind(&Collect::add, boost::ref(collector), "of", _1), - make<NameList>(list_of("shoelaces")), - make<NameList>(list_of("yellow"))); + make<NameList>(NameList{ "shoelaces" }), + make<NameList>(NameList{ "yellow" })); }); // Same remarks about the specific wording of the exception. Just // ensure that it contains enough information to clarify the @@ -347,7 +342,7 @@ void events_object::test<6>() ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces"); ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow"); button.post(4); - ensure_equals(collector.result, make<StringVec>(list_of("Mary")("checked")("yellow")("shoelaces"))); + ensure_equals(collector.result, make<StringVec>(StringVec{ "Mary", "checked", "yellow", "shoelaces" })); } template<> template<> diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 09147a65a3..f6f5b5a5fc 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -84,12 +84,14 @@ public: virtual void replay(std::ostream&) {} }; -class RecordToTempFile : public LLError::Recorder, public boost::noncopyable +class RecordToTempFile : public LLError::Recorder { public: + RecordToTempFile(const RecordToTempFile&) = delete; + RecordToTempFile& operator=(const RecordToTempFile&) = delete; + RecordToTempFile() : LLError::Recorder(), - boost::noncopyable(), mTempFile("log", ""), mFile(mTempFile.getName().c_str()) { @@ -128,12 +130,14 @@ private: llofstream mFile; }; -class LLReplayLogReal: public LLReplayLog, public boost::noncopyable +class LLReplayLogReal: public LLReplayLog { public: + LLReplayLogReal(const LLReplayLogReal&) = delete; + LLReplayLogReal& operator=(const LLReplayLogReal&) = delete; + LLReplayLogReal(LLError::ELevel level) : LLReplayLog(), - boost::noncopyable(), mOldSettings(LLError::saveAndResetSettings()), mRecorder(new RecordToTempFile()) { diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 425df0e0f9..144f807852 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -34,7 +34,6 @@ #include "llcoros.h" #include "llevents.h" -#include "lleventfilter.h" #include "lleventcoro.h" #include "llexception.h" #include "stringize.h" @@ -133,16 +132,6 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params) LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL; } -namespace -{ -// Instantiate this rendezvous point at namespace scope so it's already -// present no matter how early the updater might post to it. -// Use an LLEventMailDrop, which has future-like semantics: regardless of the -// relative order in which post() or listen() are called, it delivers each -// post() event to its listener(s) until one of them consumes that event. -static LLEventMailDrop sSyncPoint("LoginSync"); -} - void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params) { LLSD printable_params = hidePasswd(login_params); @@ -225,58 +214,7 @@ void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params) } else { - // Synchronize here with the updater. We synchronize here rather - // than in the fail.login handler, which actually examines the - // response from login.cgi, because here we are definitely in a - // coroutine and can definitely use suspendUntilBlah(). Whoever's - // listening for fail.login might not be. - - // If the reason for login failure is that we must install a - // required update, we definitely want to pass control to the - // updater to manage that for us. We'll handle any other login - // failure ourselves, as usual. We figure that no matter where you - // are in the world, or what kind of network you're on, we can - // reasonably expect the Viewer Version Manager to respond more or - // less as quickly as login.cgi. This synchronization is only - // intended to smooth out minor races between the two services. - // But what if the updater crashes? Use a timeout so that - // eventually we'll tire of waiting for it and carry on as usual. - // Given the above, it can be a fairly short timeout, at least - // from a human point of view. - - // Since sSyncPoint is an LLEventMailDrop, we DEFINITELY want to - // consume the posted event. - LLCoros::OverrideConsuming oc(true); LLSD responses(mAuthResponse["responses"]); - LLSD updater; - - if (printable_params["wait_for_updater"].asBoolean()) - { - std::string reason_response = responses["data"]["reason"].asString(); - // Timeout should produce the isUndefined() object passed here. - if (reason_response == "update") - { - LL_INFOS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL; - updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 10, LLSD()); - } - else - { - LL_DEBUGS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL; - updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 3, LLSD()); - } - if (updater.isUndefined()) - { - LL_WARNS("LLLogin") << "Failed to hear from updater, proceeding with fail.login" - << LL_ENDL; - } - else - { - LL_DEBUGS("LLLogin") << "Got responses from updater and login.cgi" << LL_ENDL; - } - } - - // Let the fail.login handler deal with empty updater response. - responses["updater"] = updater; sendProgressEvent("offline", "fail.login", responses); } return; // Done! @@ -345,7 +283,7 @@ void LLLogin::Impl::disconnect() //********************* // LLLogin LLLogin::LLLogin() : - mImpl(new LLLogin::Impl()) + mImpl(std::make_unique<LLLogin::Impl>()) { } diff --git a/indra/viewer_components/login/lllogin.h b/indra/viewer_components/login/lllogin.h index 45bcc2866f..1fdba129ea 100644 --- a/indra/viewer_components/login/lllogin.h +++ b/indra/viewer_components/login/lllogin.h @@ -26,8 +26,6 @@ #ifndef LL_LLLOGIN_H #define LL_LLLOGIN_H -#include <boost/scoped_ptr.hpp> - class LLSD; class LLEventPump; |
