diff --git a/.clang-format b/.clang-format
index ee8a8a8c92..90124fb04b 100644
--- a/.clang-format
+++ b/.clang-format
@@ -40,7 +40,7 @@ CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
-Cpp11BracedListStyle: true
+Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
@@ -87,7 +87,7 @@ PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
-PointerAlignment: Right
+PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
@@ -95,7 +95,7 @@ SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
-SpaceBeforeCpp11BracedList: true
+SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index a128bfdbe7..30f38ba3a3 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -202,23 +202,32 @@ jobs:
[[ "$arch" == "MINGW6" ]] && arch=CYGWIN
export AUTOBUILD="$(which autobuild)"
- # determine the viewer channel from the branch name
- branch=$AUTOBUILD_VCS_BRANCH
- IFS='/' read -ra ba <<< "$branch"
- prefix=${ba[0]}
- if [ "$prefix" == "project" ]; then
- IFS='_' read -ra prj <<< "${ba[1]}"
- # uppercase first letter of each word
- export viewer_channel="Second Life Project ${prj[*]^}"
- elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
+ # determine the viewer channel from the branch or tag name
+ # trigger an EDU build by including "edu" in the tag
+ edu=${{ github.ref_type == 'tag' && contains(github.ref_name, 'edu') }}
+ echo "ref_type=${{ github.ref_type }}, ref_name=${{ github.ref_name }}, edu='$edu'"
+ if [[ "$edu" == "true" ]]
then
- export viewer_channel="Second Life Release"
+ export viewer_channel="Second Life Release edu"
elif [[ "$branch" == "develop" ]];
then
export viewer_channel="Second Life Develop"
else
- export viewer_channel="Second Life Test"
+ branch=$AUTOBUILD_VCS_BRANCH
+ IFS='/' read -ra ba <<< "$branch"
+ prefix=${ba[0]}
+ if [ "$prefix" == "project" ]; then
+ IFS='_' read -ra prj <<< "${ba[1]}"
+ # uppercase first letter of each word
+ export viewer_channel="Second Life Project ${prj[*]^}"
+ elif [[ "$prefix" == "release" || "$prefix" == "main" ]];
+ then
+ export viewer_channel="Second Life Release"
+ else
+ export viewer_channel="Second Life Test"
+ fi
fi
+ echo "viewer_channel=$viewer_channel"
echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
# On windows we need to point the build to the correct python
# as neither CMake's FindPython nor our custom Python.cmake module
@@ -263,6 +272,7 @@ jobs:
# The other upload of nontrivial size is the symbol file. Use a distinct
# artifact for that too.
- name: Upload symbol file
+ if: steps.build.outputs.symbolfile
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.artifact }}-symbols"
diff --git a/autobuild.xml b/autobuild.xml
index 2c5efe67a6..58debe731d 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2200,24 +2200,24 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors
archive
name
windows64
license
- NVIDIA Corporation Software License Agreement – NVAPI SDK
+ MIT
license_file
- LICENSES/NVAPI_SDK_License_Agreement.pdf
+ LICENSES/nvapi.txt
copyright
- Copyright © 2012 NVIDIA Corporation. All rights reserved.
+ Copyright (c) 2024 NVIDIA CORPORATION and AFFILIATES. All rights reserved.
version
- 352.aac0e19
+ 560.0.0-r1
name
nvapi
description
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 9eaeac1653..4b74da600c 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -170,10 +170,6 @@ if(WINDOWS)
MESSAGE(STATUS "Redist lib ${release_msvc_file} not found")
endif()
endforeach()
- MESSAGE(STATUS "Will copy redist files for MSVC ${MSVC_VER}:")
- foreach(target ${third_party_targets})
- MESSAGE(STATUS "${target}")
- endforeach()
elseif(DARWIN)
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index 1f90504e8b..d49a7d1f36 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -326,7 +326,7 @@ int LLFile::rename(const std::string& filename, const std::string& newname, int
return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc, supress_error);
}
-bool LLFile::copy(const std::string from, const std::string to)
+bool LLFile::copy(const std::string& from, const std::string& to)
{
bool copied = false;
LLFILE* in = LLFile::fopen(from, "rb"); /* Flawfinder: ignore */
@@ -468,7 +468,7 @@ LLFILE * LLFile::_Fiopen(const std::string& filename,
if (valid[n] == 0)
return (0); // no valid mode
- else if (norepflag && mode & (ios_base::out || ios_base::app)
+ else if (norepflag && mode & (ios_base::out | ios_base::app)
&& (fp = LLFile::fopen(filename, "r")) != 0) /* Flawfinder: ignore */
{ // file must not exist, close and fail
fclose(fp);
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 74110343fc..1661cbeb55 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -77,7 +77,7 @@ public:
static int rmdir(const std::string& filename);
static int remove(const std::string& filename, int supress_error = 0);
static int rename(const std::string& filename,const std::string& newname, int supress_error = 0);
- static bool copy(const std::string from, const std::string to);
+ static bool copy(const std::string& from, const std::string& to);
static int stat(const std::string& filename,llstat* file_status);
static bool isdir(const std::string& filename);
@@ -160,7 +160,7 @@ private:
* Does The Right Thing when passed a non-ASCII pathname. Sadly, that isn't
* true of Microsoft's std::ifstream.
*/
-class LL_COMMON_API llifstream : public std::ifstream
+class LL_COMMON_API llifstream : public std::ifstream
{
// input stream associated with a C stream
public:
@@ -205,7 +205,7 @@ class LL_COMMON_API llifstream : public std::ifstream
* Right Thing when passed a non-ASCII pathname. Sadly, that isn't true of
* Microsoft's std::ofstream.
*/
-class LL_COMMON_API llofstream : public std::ofstream
+class LL_COMMON_API llofstream : public std::ofstream
{
public:
// Constructors:
@@ -241,7 +241,7 @@ class LL_COMMON_API llofstream : public std::ofstream
/**
- * @breif filesize helpers.
+ * @brief filesize helpers.
*
* The file size helpers are not considered particularly efficient,
* and should only be used for config files and the like -- not in a
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index a582acc5fa..725f04b1f2 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -54,7 +54,7 @@ std::string LLDiskCache::sCacheDir;
// Optimize asset simple disk cache
static const char* subdirs = "0123456789abcdef";
-LLDiskCache::LLDiskCache(const std::string cache_dir,
+LLDiskCache::LLDiskCache(const std::string& cache_dir,
const uintmax_t max_size_bytes,
const bool enable_cache_debug_info
// Add High/Low water mark support
@@ -326,59 +326,9 @@ void LLDiskCache::purge()
// } this bracket was moved up a few lines.
}
-const std::string LLDiskCache::assetTypeToString(LLAssetType::EType at)
+const std::string LLDiskCache::metaDataToFilepath(const LLUUID& id, LLAssetType::EType at)
{
- /**
- * Make use of the handy C++17 feature that allows
- * for inline initialization of an std::map<>
- */
- typedef std::map asset_type_to_name_t;
- asset_type_to_name_t asset_type_to_name =
- {
- { LLAssetType::AT_TEXTURE, "TEXTURE" },
- { LLAssetType::AT_SOUND, "SOUND" },
- { LLAssetType::AT_CALLINGCARD, "CALLINGCARD" },
- { LLAssetType::AT_LANDMARK, "LANDMARK" },
- { LLAssetType::AT_SCRIPT, "SCRIPT" },
- { LLAssetType::AT_CLOTHING, "CLOTHING" },
- { LLAssetType::AT_OBJECT, "OBJECT" },
- { LLAssetType::AT_NOTECARD, "NOTECARD" },
- { LLAssetType::AT_CATEGORY, "CATEGORY" },
- { LLAssetType::AT_LSL_TEXT, "LSL_TEXT" },
- { LLAssetType::AT_LSL_BYTECODE, "LSL_BYTECODE" },
- { LLAssetType::AT_TEXTURE_TGA, "TEXTURE_TGA" },
- { LLAssetType::AT_BODYPART, "BODYPART" },
- { LLAssetType::AT_SOUND_WAV, "SOUND_WAV" },
- { LLAssetType::AT_IMAGE_TGA, "IMAGE_TGA" },
- { LLAssetType::AT_IMAGE_JPEG, "IMAGE_JPEG" },
- { LLAssetType::AT_ANIMATION, "ANIMATION" },
- { LLAssetType::AT_GESTURE, "GESTURE" },
- { LLAssetType::AT_SIMSTATE, "SIMSTATE" },
- { LLAssetType::AT_LINK, "LINK" },
- { LLAssetType::AT_LINK_FOLDER, "LINK_FOLDER" },
- { LLAssetType::AT_MARKETPLACE_FOLDER, "MARKETPLACE_FOLDER" },
- { LLAssetType::AT_WIDGET, "WIDGET" },
- { LLAssetType::AT_PERSON, "PERSON" },
- { LLAssetType::AT_MESH, "MESH" },
- { LLAssetType::AT_SETTINGS, "SETTINGS" },
- { LLAssetType::AT_MATERIAL, "MATERIAL" },
- { LLAssetType::AT_GLTF, "GLTF" },
- { LLAssetType::AT_GLTF_BIN, "GLTF_BIN" },
- { LLAssetType::AT_UNKNOWN, "UNKNOWN" }
- };
-
- asset_type_to_name_t::iterator iter = asset_type_to_name.find(at);
- if (iter != asset_type_to_name.end())
- {
- return iter->second;
- }
-
- return std::string("UNKNOWN");
-}
-
-const std::string LLDiskCache::metaDataToFilepath(const std::string& id, LLAssetType::EType at)
-{
- return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.c_str());
+ return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.asString().c_str());
}
const std::string LLDiskCache::getCacheInfo()
@@ -418,7 +368,8 @@ void LLDiskCache::prepopulateCacheWithStatic()
from_asset_file = from_folder + gDirUtilp->getDirDelimiter() + from_asset_file;
// we store static assets as UUID.asset_type the asset_type is not used in the current simple cache format
auto uuid_as_string{ gDirUtilp->getBaseFileName(from_asset_file, true) };
- auto to_asset_file = metaDataToFilepath(uuid_as_string, LLAssetType::AT_UNKNOWN);
+ LLUUID uuid{ uuid_as_string };
+ auto to_asset_file = metaDataToFilepath(uuid, LLAssetType::AT_UNKNOWN);
if (!gDirUtilp->fileExists(to_asset_file))
{
if (mEnableCacheDebugInfo)
@@ -532,7 +483,7 @@ uintmax_t LLDiskCache::updateCacheSize(const uintmax_t newsize)
return mStoredCacheSize;
}
-uintmax_t LLDiskCache::dirFileSize(const std::string& dir, bool force )
+uintmax_t LLDiskCache::dirFileSize(const std::string& dir, bool force)
{
using namespace std::chrono;
const seconds cache_duration{ 120 };// A rather arbitrary number. it takes 5 seconds+ on a fast drive to scan 80K+ items. purge runs every minute and will update. so 120 should mean we never need a superfluous cache scan.
diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h
index c9856ff058..e288dfbc82 100644
--- a/indra/llfilesystem/lldiskcache.h
+++ b/indra/llfilesystem/lldiskcache.h
@@ -84,7 +84,7 @@ class LLDiskCache :
* a child of the main Viewer cache directory. Defined
* by the setting at 'DiskCacheDirName'
*/
- const std::string cache_dir,
+ const std::string& cache_dir,
/**
* The maximum size of the cache in bytes - Based on the
* setting at 'CacheSize' and 'DiskCachePercentOfTotal'
@@ -118,9 +118,7 @@ class LLDiskCache :
* so many things had to be pushed back there to accomodate it, that I
* decided to move it here. Still not sure that's completely right.
*/
- static const std::string metaDataToFilepath(const std::string& id,
- LLAssetType::EType at);
-
+ static const std::string metaDataToFilepath(const LLUUID& id, LLAssetType::EType at);
/**
* Purge the oldest items in the cache so that the combined size of all files
@@ -168,13 +166,7 @@ class LLDiskCache :
* before and after the cache purge
*/
uintmax_t updateCacheSize(const uintmax_t newsize); // enable time based caching of dirfilesize except when force is true.
- uintmax_t dirFileSize(const std::string& dir, bool force=false); // enable time based caching of dirfilesize except when force is true.
-
- /**
- * Utility function to convert an LLAssetType enum into a
- * string that we use as part of the cache file filename
- */
- const std::string assetTypeToString(LLAssetType::EType at);
+ uintmax_t dirFileSize(const std::string& dir, bool force = false); // enable time based caching of dirfilesize except when force is true.
/**
* cache the directory size cos it takes forever to calculate it
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 5b232f1f50..cacec55b79 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -36,10 +36,10 @@
#include "boost/filesystem.hpp"
-const S32 LLFileSystem::READ = 0x00000001;
-const S32 LLFileSystem::WRITE = 0x00000002;
-const S32 LLFileSystem::READ_WRITE = 0x00000003; // LLFileSystem::READ & LLFileSystem::WRITE
-const S32 LLFileSystem::APPEND = 0x00000006; // 0x00000004 & LLFileSystem::WRITE
+constexpr S32 LLFileSystem::READ = 0x00000001;
+constexpr S32 LLFileSystem::WRITE = 0x00000002;
+constexpr S32 LLFileSystem::READ_WRITE = 0x00000003; // LLFileSystem::READ & LLFileSystem::WRITE
+constexpr S32 LLFileSystem::APPEND = 0x00000006; // 0x00000004 & LLFileSystem::WRITE
static LLTrace::BlockTimerStatHandle FTM_VFILE_WAIT("VFile Wait");
@@ -57,9 +57,7 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
if (mode == LLFileSystem::READ)
{
// build the filename (TODO: we do this in a few places - perhaps we should factor into a single function)
- std::string id;
- mFileID.asString();
- const std::string filename = LLDiskCache::metaDataToFilepath(id, mFileType);
+ const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
// update the last access time for the file if it exists - this is required
// even though we are reading and not writing because this is the
@@ -73,17 +71,11 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
}
}
-LLFileSystem::~LLFileSystem()
-{
-}
-
// static
bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type)
{
LL_PROFILE_ZONE_SCOPED;
- std::string id_str;
- file_id.toString(id_str);
- const std::string filename = LLDiskCache::metaDataToFilepath(id_str, file_type);
+ const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
// IO-streams replacement
//llifstream file(filename, std::ios::binary);
@@ -106,9 +98,7 @@ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType fil
bool LLFileSystem::removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error /*= 0*/)
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
- std::string id_str;
- file_id.toString(id_str);
- const std::string filename = LLDiskCache::metaDataToFilepath(id_str, file_type);
+ const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
LLFile::remove(filename.c_str(), suppress_error);
@@ -120,13 +110,8 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
const LLUUID& new_file_id, const LLAssetType::EType new_file_type)
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
- std::string old_id_str;
- old_file_id.toString(old_id_str);
- const std::string old_filename = LLDiskCache::metaDataToFilepath(old_id_str, old_file_type);
-
- std::string new_id_str;
- new_file_id.toString(new_id_str);
- const std::string new_filename = LLDiskCache::metaDataToFilepath(new_id_str, new_file_type);
+ const std::string old_filename = LLDiskCache::metaDataToFilepath(old_file_id, old_file_type);
+ const std::string new_filename = LLDiskCache::metaDataToFilepath(new_file_id, new_file_type);
// Rename needs the new file to not exist.
LLFileSystem::removeFile(new_file_id, new_file_type, ENOENT);
@@ -137,7 +122,7 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
// failed but the original code does not and doing so seems to
// break a lot of things so we go with the flow...
//return false;
- LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_id_str << " reason: " << strerror(errno) << LL_ENDL;
+ LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_file_id << " reason: " << strerror(errno) << LL_ENDL;
}
return true;
@@ -147,9 +132,7 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type)
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
- std::string id_str;
- file_id.toString(id_str);
- const std::string filename = LLDiskCache::metaDataToFilepath(id_str, file_type);
+ const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
S32 file_size = 0;
// IO-streams replacement
@@ -174,9 +157,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
bool success = false;
- std::string id;
- mFileID.toString(id);
- const std::string filename = LLDiskCache::metaDataToFilepath(id, mFileType);
+ const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
// IO-streams replacement
//llifstream file(filename, std::ios::binary);
@@ -225,13 +206,13 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
return success;
}
-S32 LLFileSystem::getLastBytesRead()
+S32 LLFileSystem::getLastBytesRead() const
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
return mBytesRead;
}
-bool LLFileSystem::eof()
+bool LLFileSystem::eof() const
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
return mPosition >= getSize();
@@ -240,9 +221,7 @@ bool LLFileSystem::eof()
bool LLFileSystem::write(const U8* buffer, S32 bytes)
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
- std::string id_str;
- mFileID.toString(id_str);
- const std::string filename = LLDiskCache::metaDataToFilepath(id_str, mFileType);
+ const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
bool success = false;
@@ -254,12 +233,11 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
// {
// ofs.write((const char*)buffer, bytes);
- // mPosition = (S32)ofs.tellp(); // Fix asset caching
+ // mPosition = (S32)ofs.tellp();
// success = true;
// }
//}
- //// Fix asset caching
//else if (mMode == READ_WRITE)
//{
// // Don't truncate if file already exists
@@ -283,7 +261,6 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
// }
// }
//}
- ////
//else
//{
// llofstream ofs(filename, std::ios::binary);
@@ -385,13 +362,13 @@ S32 LLFileSystem::tell() const
return mPosition;
}
-S32 LLFileSystem::getSize()
+S32 LLFileSystem::getSize() const
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
return LLFileSystem::getFileSize(mFileID, mFileType);
}
-S32 LLFileSystem::getMaxSize()
+S32 LLFileSystem::getMaxSize() const
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
// offer up a huge size since we don't care what the max is
@@ -409,11 +386,10 @@ bool LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_typ
return true;
}
-bool LLFileSystem::remove()
+bool LLFileSystem::remove() const
{
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // measure cache performance
LLFileSystem::removeFile(mFileID, mFileType);
-
return true;
}
@@ -428,7 +404,7 @@ void LLFileSystem::updateFileAccessTime(const std::string& file_path)
*
* Let's start with 1 hour in time_t units and see how that unfolds
*/
- const std::time_t time_threshold = 1 * 60 * 60;
+ constexpr std::time_t time_threshold = 1 * 60 * 60;
// current time
const std::time_t cur_time = std::time(nullptr);
diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h
index 983e452981..10649b6920 100644
--- a/indra/llfilesystem/llfilesystem.h
+++ b/indra/llfilesystem/llfilesystem.h
@@ -38,20 +38,20 @@ class LLFileSystem
{
public:
LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_type, S32 mode = LLFileSystem::READ);
- ~LLFileSystem();
+ ~LLFileSystem() = default;
bool read(U8* buffer, S32 bytes);
- S32 getLastBytesRead();
- bool eof();
+ S32 getLastBytesRead() const;
+ bool eof() const;
bool write(const U8* buffer, S32 bytes);
bool seek(S32 offset, S32 origin = -1);
S32 tell() const;
- S32 getSize();
- S32 getMaxSize();
+ S32 getSize() const;
+ S32 getMaxSize() const;
bool rename(const LLUUID& new_id, const LLAssetType::EType new_type);
- bool remove();
+ bool remove() const;
/**
* Update the "last write time" of a file to "now". This must be called whenever a
@@ -78,8 +78,6 @@ class LLFileSystem
S32 mPosition;
S32 mMode;
S32 mBytesRead;
-//private:
-// static const std::string idToFilepath(const std::string id, LLAssetType::EType at);
};
#endif // LL_FILESYSTEM_H
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index a7167e3330..58266fc2d8 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -36,12 +36,12 @@
#include "boost/bind.hpp"
-static const S32 BORDER_MARGIN = 2;
-static const S32 PARENT_BORDER_MARGIN = 5;
-static const S32 VERTICAL_MULTIPLE = 16;
-static const F32 MIN_AUTO_SCROLL_RATE = 120.f;
-static const F32 MAX_AUTO_SCROLL_RATE = 500.f;
-static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
+static constexpr S32 BORDER_MARGIN = 2;
+static constexpr S32 PARENT_BORDER_MARGIN = 5;
+static constexpr S32 VERTICAL_MULTIPLE = 16;
+static constexpr F32 MIN_AUTO_SCROLL_RATE = 120.f;
+static constexpr F32 MAX_AUTO_SCROLL_RATE = 500.f;
+static constexpr F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
// LLAccordionCtrl =================================================================|
@@ -49,13 +49,7 @@ static LLDefaultChildRegistry::Register t2("accordion");
LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
, mFitParent(params.fit_parent)
- , mAutoScrolling( false )
- , mAutoScrollRate( 0.f )
- , mSelectedTab( NULL )
- , mTabComparator( NULL )
- , mNoVisibleTabsHelpText(NULL)
, mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString())
- , mSkipScrollToChild(false)
{
initNoTabsWidget(params.no_matched_tabs_text);
@@ -67,10 +61,6 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
}
LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
- , mAutoScrolling( false )
- , mAutoScrollRate( 0.f )
- , mSelectedTab( NULL )
- , mNoVisibleTabsHelpText(NULL)
{
initNoTabsWidget(LLTextBox::Params());
@@ -133,11 +123,10 @@ bool LLAccordionCtrl::postBuild()
mScrollbar->setFollowsBottom();
//if it was created from xml...
- std::vector accordion_tabs;
- for (child_list_const_iter_t it = getChildList()->begin();
- getChildList()->end() != it; ++it)
+ std::vector accordion_tabs;
+ for(LLView* viewp : *getChildList())
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(*it);
+ LLAccordionCtrlTab* accordion_tab = dynamic_cast(viewp);
if (accordion_tab == NULL)
continue;
if (std::find(mAccordionTabs.begin(), mAccordionTabs.end(), accordion_tab) == mAccordionTabs.end())
@@ -146,7 +135,7 @@ bool LLAccordionCtrl::postBuild()
}
}
- for (std::vector::reverse_iterator it = accordion_tabs.rbegin();
+ for (auto it = accordion_tabs.rbegin();
it < accordion_tabs.rend(); ++it)
{
addCollapsibleCtrl(*it);
@@ -294,11 +283,8 @@ void LLAccordionCtrl::hideScrollbar(S32 width, S32 height)
S32 LLAccordionCtrl::calcRecuiredHeight()
{
S32 rec_height = 0;
-
- std::vector::iterator panel;
- for(panel=mAccordionTabs.begin(); panel!=mAccordionTabs.end(); ++panel)
+ for(LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(*panel);
if(accordion_tab && accordion_tab->getVisible())
{
rec_height += accordion_tab->getRect().getHeight();
@@ -332,11 +318,10 @@ void LLAccordionCtrl::ctrlShiftVertical(LLView* panel, S32 delta)
// If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
// In that case we can avvoid calling arrange over and over and just call it once when finished.
-//void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
-void LLAccordionCtrl::addCollapsibleCtrl(LLView* view, bool aArrange)
+//void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
+void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab, bool aArrange)
//
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(view);
if (!accordion_tab)
return;
if (std::find(beginChild(), endChild(), accordion_tab) == endChild())
@@ -354,9 +339,8 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view, bool aArrange)
//
}
-void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
+void LLAccordionCtrl::removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(view);
if(!accordion_tab)
return;
@@ -374,7 +358,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
}
// if removed is selected - reset selection
- if (mSelectedTab == view)
+ if (mSelectedTab == accordion_tab)
{
mSelectedTab = NULL;
}
@@ -412,24 +396,20 @@ void LLAccordionCtrl::arrangeSingle()
S32 collapsed_height = 0;
- for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
-
if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
continue;
if (!accordion_tab->isExpanded() )
{
- collapsed_height+=mAccordionTabs[i]->getRect().getHeight();
+ collapsed_height += accordion_tab->getRect().getHeight();
}
}
S32 expanded_height = getRect().getHeight() - BORDER_MARGIN - collapsed_height;
- for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
-
if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
continue;
if (!accordion_tab->isExpanded() )
@@ -459,8 +439,8 @@ void LLAccordionCtrl::arrangeSingle()
// make sure at least header is shown
panel_height = llmax(panel_height, accordion_tab->getHeaderHeight());
- ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
- panel_top -= mAccordionTabs[i]->getRect().getHeight();
+ ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
+ panel_top -= accordion_tab->getRect().getHeight();
}
show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
@@ -474,17 +454,16 @@ void LLAccordionCtrl::arrangeMultiple()
S32 panel_width = getRect().getWidth() - 4;
//Calculate params
- for (size_t i = 0; i < mAccordionTabs.size(); i++ )
+ for (size_t i = 0, end = mAccordionTabs.size(); i < end; i++)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
-
+ LLAccordionCtrlTab* accordion_tab = static_cast(mAccordionTabs[i]);
if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
continue;
if (!accordion_tab->isExpanded() )
{
- ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, accordion_tab->getRect().getHeight());
- panel_top -= mAccordionTabs[i]->getRect().getHeight();
+ ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, accordion_tab->getRect().getHeight());
+ panel_top -= accordion_tab->getRect().getHeight();
}
else
{
@@ -506,13 +485,13 @@ void LLAccordionCtrl::arrangeMultiple()
}
// minimum tab height is equal to header height
- if (mAccordionTabs[i]->getHeaderHeight() > panel_height)
+ if (accordion_tab->getHeaderHeight() > panel_height)
{
- panel_height = mAccordionTabs[i]->getHeaderHeight();
+ panel_height = accordion_tab->getHeaderHeight();
}
}
- ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
+ ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
panel_top -= panel_height;
}
@@ -539,7 +518,7 @@ void LLAccordionCtrl::arrange()
S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
S32 panel_width = getRect().getWidth() - 4;
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[0]);
+ LLAccordionCtrlTab* accordion_tab = mAccordionTabs[0];
LLRect panel_rect = accordion_tab->getRect();
@@ -649,12 +628,12 @@ void LLAccordionCtrl::updateLayout(S32 width, S32 height)
panel_width -= scrollbar_size;
// set sizes for first panels and dragbars
- for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- if (!mAccordionTabs[i]->getVisible())
+ if (!accordion_tab->getVisible())
continue;
- LLRect panel_rect = mAccordionTabs[i]->getRect();
- ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
+ LLRect panel_rect = accordion_tab->getRect();
+ ctrlSetLeftTopAndSize(accordion_tab, panel_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
panel_top -= panel_rect.getHeight();
}
}
@@ -696,9 +675,8 @@ void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl)
void LLAccordionCtrl::onOpen(const LLSD& key)
{
- for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
LLPanel* panel = dynamic_cast(accordion_tab->getAccordionView());
if (panel != NULL)
{
@@ -722,7 +700,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
{
for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
+ LLAccordionCtrlTab* accordion_tab = static_cast(mAccordionTabs[i]);
if (accordion_tab->hasFocus())
{
while (++i < mAccordionTabs.size())
@@ -732,7 +710,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
if (i < mAccordionTabs.size())
{
- accordion_tab = dynamic_cast(mAccordionTabs[i]);
+ accordion_tab = static_cast(mAccordionTabs[i]);
accordion_tab->notify(LLSD().with("action","select_first"));
return 1;
}
@@ -745,7 +723,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
{
for (size_t i = 0; i < mAccordionTabs.size(); ++i)
{
- LLAccordionCtrlTab* accordion_tab = dynamic_cast(mAccordionTabs[i]);
+ LLAccordionCtrlTab* accordion_tab = static_cast(mAccordionTabs[i]);
if (accordion_tab->hasFocus() && i > 0)
{
bool prev_visible_tab_found = false;
@@ -760,7 +738,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
if (prev_visible_tab_found)
{
- accordion_tab = dynamic_cast(mAccordionTabs[i]);
+ accordion_tab = static_cast(mAccordionTabs[i]);
accordion_tab->notify(LLSD().with("action","select_last"));
return 1;
}
@@ -898,15 +876,12 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const
{
- typedef std::vector::const_iterator tabs_const_iterator;
-
- const LLAccordionCtrlTab* result = 0;
-
- for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i)
+ const LLAccordionCtrlTab* result = nullptr;
+ for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
{
- if ((*i)->isExpanded())
+ if (accordion_tab->isExpanded())
{
- result = *i;
+ result = accordion_tab;
break;
}
}
@@ -924,11 +899,11 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
S32 collapsed_tabs_height = 0;
S32 num_expanded = 0;
- for (size_t n = tab_index; n < mAccordionTabs.size(); ++n)
+ for (LLAccordionCtrlTab* tab : mAccordionTabs)
{
- if (!mAccordionTabs[n]->isExpanded())
+ if (!tab->isExpanded())
{
- collapsed_tabs_height += mAccordionTabs[n]->getHeaderHeight();
+ collapsed_tabs_height += tab->getHeaderHeight();
}
else
{
@@ -950,10 +925,8 @@ void LLAccordionCtrl::collapseAllTabs()
{
if (mAccordionTabs.size() > 0)
{
- for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+ for (LLAccordionCtrlTab* tab : mAccordionTabs)
{
- LLAccordionCtrlTab *tab = mAccordionTabs[i];
-
if (tab->getDisplayChildren())
{
tab->setDisplayChildren(false);
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 519f8c0f80..c4d7c276e1 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -57,8 +57,8 @@ public:
class LLTabComparator
{
public:
- LLTabComparator() {};
- virtual ~LLTabComparator() {};
+ LLTabComparator() = default;
+ virtual ~LLTabComparator() = default;
/** Returns true if tab1 < tab2, false otherwise */
virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
@@ -105,11 +105,10 @@ public:
// If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
// In that case we can avvoid calling arrange over and over and just call it once when finished.
- // void addCollapsibleCtrl(LLView* view);
- void addCollapsibleCtrl(LLView* view, bool aArrange = true /*Standard is true as to not mess with old code all over the place*/ );
+ // void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
+ void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab, bool aArrange = true /*Standard is true as to not mess with old code all over the place*/ );
//
-
- void removeCollapsibleCtrl(LLView* view);
+ void removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
void arrange();
@@ -185,20 +184,20 @@ private:
private:
LLRect mInnerRect;
- LLScrollbar* mScrollbar;
- bool mSingleExpansion;
- bool mFitParent;
- bool mAutoScrolling;
- F32 mAutoScrollRate;
- LLTextBox* mNoVisibleTabsHelpText;
+ LLScrollbar* mScrollbar = nullptr;
+ bool mSingleExpansion = false;
+ bool mFitParent = false;
+ bool mAutoScrolling = false;
+ F32 mAutoScrollRate = 0.f;
+ LLTextBox* mNoVisibleTabsHelpText = nullptr;
- bool mSkipScrollToChild;
+ bool mSkipScrollToChild = false;
std::string mNoMatchedTabsOrigString;
std::string mNoVisibleTabsOrigString;
- LLAccordionCtrlTab* mSelectedTab;
- const LLTabComparator* mTabComparator;
+ LLAccordionCtrlTab* mSelectedTab = nullptr;
+ const LLTabComparator* mTabComparator = nullptr;
};
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 37125b9e44..84f598aa67 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -122,7 +122,7 @@ void LLDebugView::draw()
{
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
LLRect debug_rect;
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 6359b6748f..75b9c0e052 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -166,7 +166,6 @@ protected:
toast_list_t m_toast_pool;
bool mStopProcessing;
- bool mChannelRect;
// Zi Ree's customizable nearby chat toast width
void reshapePanel(LLFloaterIMNearbyChatToastPanel* panel);
@@ -337,7 +336,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
LLRect channel_rect;
mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
@@ -433,7 +432,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (!getParent())
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index f49dc9f061..1f2d603de3 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -653,6 +653,14 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
bool LLFloaterPreference::postBuild()
{
+ mDeleteTranscriptsBtn = getChild("delete_transcripts");
+
+ // We don't have these buttons
+ //mEnabledPopups = getChild("enabled_popups");
+ //mDisabledPopups = getChild("disabled_popups");
+ //mEnablePopupBtn = getChild("enable_this_popup");
+ //mDisablePopupBtn = getChild("disable_this_popup");
+
// [FS communication UI]
//gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
@@ -883,7 +891,7 @@ void LLFloaterPreference::onShowGroupNoticesTopRightChanged()
void LLFloaterPreference::updateDeleteTranscriptsButton()
{
- getChild("delete_transcripts")->setEnabled(LLLogChat::transcriptFilesExist());
+ mDeleteTranscriptsBtn->setEnabled(LLLogChat::transcriptFilesExist());
}
void LLFloaterPreference::onDoNotDisturbResponseChanged()
@@ -943,11 +951,11 @@ LLFloaterPreference::~LLFloaterPreference()
// FIRE-19539 - Include the alert messages in Prefs>Notifications>Alerts in preference Search.
// void LLFloaterPreference::draw()
// {
-// bool has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL);
-// gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
+// bool has_first_selected = (mDisabledPopups->getFirstSelected()!=NULL);
+// mEnablePopupBtn->setEnabled(has_first_selected);
//
-// has_first_selected = (getChildRef("enabled_popups").getFirstSelected()!=NULL);
-// gSavedSettings.setBOOL("FirstSelectedEnabledPopups", has_first_selected);
+// has_first_selected = (mEnabledPopups.getFirstSelected()!=NULL);
+// mDisablePopupBtn->setEnabled(has_first_selected);
//
// LLFloater::draw();
//}
@@ -2040,13 +2048,8 @@ void LLFloaterPreference::refreshSkin(void* data)
// FIRE-19539 - Include the alert messages in Prefs>Notifications>Alerts in preference Search.
// void LLFloaterPreference::buildPopupLists()
// {
-// LLScrollListCtrl& disabled_popups =
-// getChildRef("disabled_popups");
-// LLScrollListCtrl& enabled_popups =
-// getChildRef("enabled_popups");
-//
-// disabled_popups.deleteAllItems();
-// enabled_popups.deleteAllItems();
+// mDisabledPopups.deleteAllItems();
+// mEnabledPopups.deleteAllItems();
//
// for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
// iter != LLNotifications::instance().templatesEnd();
@@ -2091,11 +2094,11 @@ void LLFloaterPreference::refreshSkin(void* data)
// }
// }
// }
-// item = disabled_popups.addElement(row);
+// item = mDisabledPopups.addElement(row);
// }
// else
// {
-// item = enabled_popups.addElement(row);
+// item = mEnabledPopups.addElement(row);
// }
//
// if (item)
@@ -2367,9 +2370,7 @@ void LLFloaterPreference::onClickPreviewUISound(const LLSD& ui_sound_id)
// FIRE-19539 - Include the alert messages in Prefs>Notifications>Alerts in preference Search.
// void LLFloaterPreference::onClickEnablePopup()
// {
-// LLScrollListCtrl& disabled_popups = getChildRef("disabled_popups");
-//
-// std::vector items = disabled_popups.getAllSelected();
+// std::vector items = mDisabledPopups.getAllSelected();
// std::vector::iterator itor;
// for (itor = items.begin(); itor != items.end(); ++itor)
// {
@@ -2388,9 +2389,7 @@ void LLFloaterPreference::onClickPreviewUISound(const LLSD& ui_sound_id)
// void LLFloaterPreference::onClickDisablePopup()
// {
-// LLScrollListCtrl& enabled_popups = getChildRef("enabled_popups");
-//
-// std::vector items = enabled_popups.getAllSelected();
+// std::vector items = mEnabledPopups.getAllSelected();
// std::vector::iterator itor;
// for (itor = items.begin(); itor != items.end(); ++itor)
// {
@@ -3004,11 +3003,9 @@ void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification,
void LLFloaterPreference::onLogChatHistorySaved()
{
- LLButton * delete_transcripts_buttonp = getChild("delete_transcripts");
-
- if (!delete_transcripts_buttonp->getEnabled())
+ if (!mDeleteTranscriptsBtn->getEnabled())
{
- delete_transcripts_buttonp->setEnabled(true);
+ mDeleteTranscriptsBtn->setEnabled(true);
}
}
@@ -3886,8 +3883,6 @@ bool LLPanelPreferenceGraphics::postBuild()
}
void LLPanelPreferenceGraphics::draw()
{
- // Graphic preset controls independent from XUI
- //setPresetText();
LLPanelPreference::draw();
}
@@ -4882,16 +4877,18 @@ void LLFloaterPreference::onUpdateFilterTerm(bool force)
pRoot->selectFirstTab();
}
-void LLFloaterPreference::filterIgnorableNotifications()
-{
- bool visible = getChildRef("enabled_popups").highlightMatchingItems(mFilterEdit->getValue());
- visible |= getChildRef("disabled_popups").highlightMatchingItems(mFilterEdit->getValue());
-
- if (visible)
- {
- getChildRef("pref core").setTabVisibility(getChild("msgs"), true);
- }
-}
+// Using different solution
+//void LLFloaterPreference::filterIgnorableNotifications()
+//{
+// bool visible = mEnabledPopups->highlightMatchingItems(mFilterEdit->getValue());
+// visible |= mDisabledPopups->highlightMatchingItems(mFilterEdit->getValue());
+//
+// if (visible)
+// {
+// getChildRef("pref core").setTabVisibility(getChild("msgs"), true);
+// }
+//}
+//
void collectChildren( LLView const *aView, ll::prefs::PanelDataPtr aParentPanel, ll::prefs::TabContainerDataPtr aParentTabContainer )
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index cecb93447c..ab8f20561d 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -323,7 +323,12 @@ private:
std::string mSavedGraphicsPreset;
LOG_CLASS(LLFloaterPreference);
- LLSearchEditor *mFilterEdit;
+ LLSearchEditor* mFilterEdit = nullptr;
+ LLScrollListCtrl* mEnabledPopups = nullptr;
+ LLScrollListCtrl* mDisabledPopups = nullptr;
+ LLButton* mDeleteTranscriptsBtn = nullptr;
+ LLButton* mEnablePopupBtn = nullptr;
+ LLButton* mDisablePopupBtn = nullptr;
std::unique_ptr< ll::prefs::SearchData > mSearchData;
bool mSearchDataDirty;
@@ -331,7 +336,7 @@ private:
void onUpdateFilterTerm( bool force = false );
void collectSearchableItems();
- void filterIgnorableNotifications();
+ //void filterIgnorableNotifications(); // Using different solution
std::map mIgnorableNotifs;
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index ffd0ce0ae6..53a27d0e2c 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -57,31 +57,39 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this);
}
+bool LLFloaterSidePanelContainer::postBuild()
+{
+ mMainPanel = getChild(sMainPanelName);
+ return true;
+}
+
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
{
- getChild(sMainPanelName)->onOpen(key);
+ mMainPanel->onOpen(key);
}
void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
{
- LLPanelOutfitEdit* panel_outfit_edit =
- dynamic_cast(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
- if (panel_outfit_edit)
+ if(getInstanceName() == "appearance")
{
- LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
- if (parent == this )
+ LLPanelOutfitEdit* panel_outfit_edit = findChild("panel_outfit_edit");
+ if (panel_outfit_edit)
{
- LLSidepanelAppearance* panel_appearance = dynamic_cast(getPanel("appearance"));
- if (panel_appearance)
+ LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
+ if (parent == this)
{
- LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
- if (edit_wearable_ptr)
+ LLSidepanelAppearance* panel_appearance = dynamic_cast(mMainPanel);
+ if (panel_appearance)
{
- edit_wearable_ptr->onClose();
- }
- if (!app_quitting)
- {
- panel_appearance->showOutfitsInventoryPanel();
+ LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
+ if (edit_wearable_ptr)
+ {
+ edit_wearable_ptr->onClose();
+ }
+ if(!app_quitting)
+ {
+ panel_appearance->showOutfitsInventoryPanel();
+ }
}
}
}
@@ -100,10 +108,9 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
void LLFloaterSidePanelContainer::onClickCloseBtn(bool app_quitting)
{
- if (!app_quitting)
+ if (!app_quitting && getInstanceName() == "appearance")
{
- LLPanelOutfitEdit* panel_outfit_edit =
- dynamic_cast(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_outfit_edit = findChild("panel_outfit_edit");
if (panel_outfit_edit)
{
LLFloater* parent = gFloaterView->getParentFloater(panel_outfit_edit);
@@ -241,10 +248,16 @@ void LLFloaterSidePanelContainer::showPanel(std::string_view floater_name, std::
LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, std::string_view panel_name)
{
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance(floater_name);
-
if (floaterp)
{
- return floaterp->findChild(panel_name, true);
+ if (panel_name == sMainPanelName)
+ {
+ return floaterp->mMainPanel;
+ }
+ else
+ {
+ return floaterp->findChild(panel_name, true);
+ }
}
return NULL;
@@ -253,10 +266,16 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, st
LLPanel* LLFloaterSidePanelContainer::findPanel(std::string_view floater_name, std::string_view panel_name)
{
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::findTypedInstance(floater_name);
-
if (floaterp)
{
- return floaterp->findChild(panel_name, true);
+ if (panel_name == sMainPanelName)
+ {
+ return floaterp->mMainPanel;
+ }
+ else
+ {
+ return floaterp->findChild(panel_name, true);
+ }
}
return NULL;
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 618cddb7a7..0eeaf5e096 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -49,6 +49,8 @@ public:
LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams());
~LLFloaterSidePanelContainer();
+ bool postBuild() override;
+
void onOpen(const LLSD& key) override;
void closeFloater(bool app_quitting = false) override;
@@ -82,6 +84,11 @@ public:
* @returns a pointer to the panel of given type T.
*/
template
+ static T* findPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName)
+ {
+ return dynamic_cast(findPanel(floater_name, panel_name));
+ }
+ template
static T* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName)
{
T* panel = dynamic_cast(getPanel(floater_name, panel_name));
@@ -92,24 +99,6 @@ public:
return panel;
}
- template
- static T* findPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName)
- {
- LLPanel* panel = findPanel(floater_name, panel_name);
- if (!panel)
- {
- return NULL;
- }
-
- T* res = dynamic_cast(panel);
- if (!res)
- {
- LL_WARNS() << "Child named \"" << panel_name << "\" is not of type " << typeid(T*).name() << LL_ENDL;
- }
- return res;
- }
- //
-
// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
// Used to determine whether a sidepanel can be shown
public:
@@ -121,6 +110,8 @@ private:
protected:
void onCloseMsgCallback(const LLSD& notification, const LLSD& response);
+
+ LLPanel* mMainPanel = nullptr;
};
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index b041ed731c..4537cdd864 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -426,10 +426,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
}
floater->getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
- floater->getChild("file_size_label")->setColor(
- shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
- && got_bytes
- && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" ));
+
+ LLUIColor color = LLUIColorTable::instance().getColor( "LabelTextColor" );
+ if (shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
+ && got_bytes
+ && previewp->getDataSize() > MAX_POSTCARD_DATASIZE)
+ {
+ color = LLUIColor(LLColor4::red);
+ }
+ if (shot_type == LLSnapshotModel::SNAPSHOT_WEB
+ && got_bytes
+ && previewp->getDataSize() > LLWebProfile::MAX_WEB_DATASIZE)
+ {
+ color = LLUIColor(LLColor4::red);
+ }
+
+ floater->getChild("file_size_label")->setColor(color);
// Update the width and height spinners based on the corresponding resolution combos. (?)
switch(shot_type)
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 00d31bcdd9..a43b6d60e7 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -340,6 +340,16 @@ bool LLFloaterTools::postBuild()
// FIRE-7802: Grass and tree selection in build tool
mTreeGrassCombo = getChild("tree_grass_combo");
+ mTextBulldozer = getChild("Bulldozer:");
+ mTextDozerSize = getChild("Dozer Size:");
+ mTextDozerStrength = getChild("Strength:");
+ mSliderZoom = getChild("slider zoom");
+
+ mTextSelectionCount = getChild("selection_count");
+ mTextSelectionEmpty = getChild("selection_empty");
+ // Improved build tools
+ //mTextSelectionFaces = getChild("selection_faces");
+
mCostTextBorder = getChild("cost_text_border");
mTab = getChild("Object Info Tabs");
@@ -380,6 +390,11 @@ bool LLFloaterTools::postBuild()
}
//
+ // Performance improvements
+ mTextLinkNumObjCount = getChild("link_num_obj_count");
+ mBtnCopyKeys = getChild("btnCopyKeys");
+ mTextMoreInfoLabel = getChild("more info label");
+
return true;
}
@@ -635,18 +650,18 @@ void LLFloaterTools::refresh()
{
enable_link_count = false;
}
- getChild("link_num_obj_count")->setTextArg("[DESC]", desc_string);
- getChild("link_num_obj_count")->setTextArg("[NUM]", num_string);
+ mTextLinkNumObjCount->setTextArg("[DESC]", desc_string);
+ mTextLinkNumObjCount->setTextArg("[NUM]", num_string);
//
#if 0
if (!gMeshRepo.meshRezEnabled())
{
std::string obj_count_string;
LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
- getChild("selection_count")->setTextArg("[OBJ_COUNT]", obj_count_string);
+ mTextSelectionCount->setTextArg("[OBJ_COUNT]", obj_count_string);
std::string prim_count_string;
LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
- getChild("selection_count")->setTextArg("[PRIM_COUNT]", prim_count_string);
+ mTextSelectionCount->setTextArg("[PRIM_COUNT]", prim_count_string);
// calculate selection rendering cost
if (sShowObjectCost)
@@ -660,7 +675,7 @@ void LLFloaterTools::refresh()
// disable the object and prim counts if nothing selected
bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty();
- getChildView("link_num_obj_count")->setEnabled(have_selection);
+ mTextLinkNumObjCount->setEnabled(have_selection);
//getChildView("obj_count")->setEnabled(have_selection);
// Was removed from floater_tools.xml as part of SH-1719
//getChildView("prim_count")->setEnabled(have_selection);
@@ -696,7 +711,7 @@ void LLFloaterTools::refresh()
else
{
const LLStringExplicit empty_str("");
- childSetTextArg("more info label", "[CAPACITY_STRING]", empty_str);
+ mTextMoreInfoLabel->setTextArg("[CAPACITY_STRING]", empty_str);
}
//
}
@@ -711,7 +726,7 @@ void LLFloaterTools::refresh()
// Selection crosses parcel bounds.
// We don't display remaining land capacity in this case.
const LLStringExplicit empty_str("");
- childSetTextArg("more info label", "[CAPACITY_STRING]", empty_str);
+ mTextMoreInfoLabel->setTextArg("[CAPACITY_STRING]", empty_str);
}
//
@@ -744,12 +759,12 @@ void LLFloaterTools::refresh()
// }
// }
- // childSetTextArg("selection_faces", "[FACES_STRING]", faces_str);
+ // mTextSelectionFaces->setTextArg("[FACES_STRING]", faces_str);
//}
//bool show_faces = (object_count == 1)
// && LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool();
- //getChildView("selection_faces")->setVisible(show_faces);
+ //mTextSelectionFaces->setVisible(show_faces);
//
LLStringUtil::format_map_t selection_args;
@@ -763,16 +778,12 @@ void LLFloaterTools::refresh()
//
selection_args["LAND_IMPACT"] = llformat("%.1d", (S32)link_cost);
- std::ostringstream selection_info;
-
- selection_info << getString("status_selectcount", selection_args);
-
- getChild("selection_count")->setText(selection_info.str());
+ mTextSelectionCount->setText(getString("status_selectcount", selection_args));
}
// disable the object and prim counts if nothing selected
bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty();
- getChildView("link_num_obj_count")->setEnabled(have_selection && enable_link_count);
+ mTextLinkNumObjCount->setEnabled(have_selection && enable_link_count);
//
// Refresh child tabs
@@ -804,7 +815,7 @@ void LLFloaterTools::refresh()
}
// Only enable Copy Keys when we have something selected
- getChild("btnCopyKeys")->setEnabled(have_selection);
+ mBtnCopyKeys->setEnabled(have_selection);
//
}
@@ -868,8 +879,9 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
mBtnFocus ->setToggleState( focus_visible );
mRadioGroupFocus->setVisible( focus_visible );
- getChildView("slider zoom")->setVisible( focus_visible);
- getChildView("slider zoom")->setEnabled(gCameraBtnZoom);
+
+ mSliderZoom->setVisible( focus_visible);
+ mSliderZoom->setEnabled(gCameraBtnZoom);
if (!gCameraBtnOrbit &&
!gCameraBtnPan &&
@@ -894,7 +906,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
}
// multiply by correction factor because volume sliders go [0, 0.5]
- getChild("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f);
+ mSliderZoom->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f);
// Move buttons
bool move_visible = (tool == LLToolGrab::getInstance());
@@ -1107,14 +1119,14 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
}
if (mSliderDozerSize)
{
- mSliderDozerSize ->setVisible( land_visible );
- getChildView("Bulldozer:")->setVisible( land_visible);
- getChildView("Dozer Size:")->setVisible( land_visible);
+ mSliderDozerSize->setVisible( land_visible );
+ mTextBulldozer->setVisible( land_visible);
+ mTextDozerSize->setVisible( land_visible);
}
if (mSliderDozerForce)
{
- mSliderDozerForce ->setVisible( land_visible );
- getChildView("Strength:")->setVisible( land_visible);
+ mSliderDozerForce->setVisible( land_visible );
+ mTextDozerStrength->setVisible( land_visible);
}
//
@@ -1127,11 +1139,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
//
getChildView("more info label")->setVisible(!land_visible && have_selection);
- getChildView("selection_count")->setVisible(!land_visible && have_selection);
+ mTextSelectionCount->setVisible(!land_visible && have_selection);
// We got this already
- //getChildView("selection_faces")->setVisible(LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()
+ //mTextSelectionFaces->setVisible(LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()
// && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1);
- getChildView("selection_empty")->setVisible(!land_visible && !have_selection);
+ mTextSelectionEmpty->setVisible(!land_visible && !have_selection);
//mTab->setVisible(!land_visible);
//mPanelLandInfo->setVisible(land_visible);
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 95ab1048c8..5ab67ae85f 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -186,6 +186,16 @@ public:
LLButton *mBtnDuplicate;
LLButton *mBtnDuplicateInPlace;
+ LLTextBox* mTextSelectionCount = nullptr;
+ LLTextBox* mTextSelectionEmpty = nullptr;
+ LLTextBox* mTextSelectionFaces = nullptr;
+ LLSlider* mSliderZoom = nullptr;
+
+ // Performance improvements
+ LLTextBox* mTextLinkNumObjCount = nullptr;
+ LLTextBox* mTextMoreInfoLabel = nullptr;
+ LLButton* mBtnCopyKeys = nullptr;
+
// FIRE-7802: Grass and tree selection in build tool
LLComboBox* mTreeGrassCombo;
@@ -196,9 +206,12 @@ public:
LLCheckBoxCtrl *mCheckCopyRotates;
// Land buttons
- LLRadioGroup* mRadioGroupLand;
- LLSlider *mSliderDozerSize;
- LLSlider *mSliderDozerForce;
+ LLRadioGroup* mRadioGroupLand = nullptr;
+ LLSlider *mSliderDozerSize = nullptr;
+ LLSlider *mSliderDozerForce = nullptr;
+ LLTextBox* mTextBulldozer = nullptr;
+ LLTextBox* mTextDozerSize = nullptr;
+ LLTextBox* mTextDozerStrength = nullptr;
LLButton *mBtnApplyToSelection;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index c1e2c3d7bb..68a36fe221 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -3972,11 +3972,11 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con
{
for (const LLUUID& id : item_deletion_list)
{
- remove_inventory_item(id, NULL);
+ gInventory.removeItem(id);
}
for (const LLUUID& id : cat_deletion_list)
{
- remove_inventory_category(id, NULL);
+ gInventory.removeCategory(id);
}
}, NULL, false);
}
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 7df083ba83..97ecfa302c 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -147,8 +147,6 @@ const LLInventoryGallery::Params& LLInventoryGallery::getDefaultParams()
bool LLInventoryGallery::postBuild()
{
mScrollPanel = getChild("gallery_scroll_panel");
- LLPanel::Params params = LLPanel::getDefaultParams();
- mGalleryPanel = LLUICtrlFactory::create(params);
mMessageTextBox = getChild("empty_txt");
mInventoryGalleryMenu = new LLInventoryGalleryContextMenu(this);
mRootGalleryMenu = new LLInventoryGalleryContextMenu(this);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 626c87118a..85c3766ee1 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3397,8 +3397,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
// only allocate as much space in the cache as is needed for the local cache
data_size = llmin(data_size, bytes);
- // Fix asset caching
- //LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::WRITE);
LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
if (file.getMaxSize() >= bytes)
{
@@ -3407,7 +3405,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
file.write(data, data_size);
- // Fix asset caching
S32 remaining = bytes - file.tell();
if (remaining > 0)
{
@@ -3419,7 +3416,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
delete[] block;
}
}
- //
}
}
else
@@ -3472,8 +3468,6 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * /* body */, S32 /* body
if (result == MESH_OK)
{
// good fetch from sim, write to cache
- // Fix asset caching
- //LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::WRITE);
LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
S32 offset = mOffset;
@@ -3537,8 +3531,6 @@ void LLMeshSkinInfoHandler::processData(LLCore::BufferArray * /* body */, S32 /*
&& gMeshRepo.mThread->skinInfoReceived(mMeshID, data, data_size))
{
// good fetch from sim, write to cache
- // Fix asset caching
- //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
S32 offset = mOffset;
@@ -3588,8 +3580,6 @@ void LLMeshDecompositionHandler::processData(LLCore::BufferArray * /* body */, S
&& gMeshRepo.mThread->decompositionReceived(mMeshID, data, data_size))
{
// good fetch from sim, write to cache
- // Fix asset caching
- //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
S32 offset = mOffset;
@@ -3637,8 +3627,6 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * /* body */, S3
&& gMeshRepo.mThread->physicsShapeReceived(mMeshID, data, data_size) == MESH_OK)
{
// good fetch from sim, write to cache for caching
- // Fix asset caching
- //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
S32 offset = mOffset;
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index e8e347ad50..09f9a3db97 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -109,8 +109,6 @@ bool LLOutfitGallery::postBuild()
{
bool rv = LLOutfitListBase::postBuild();
mScrollPanel = getChild("gallery_scroll_panel");
- LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel
- mGalleryPanel = LLUICtrlFactory::create(params);
mMessageTextBox = getChild("no_outfits_txt");
mOutfitGalleryMenu = new LLOutfitGalleryContextMenu(this);
return rv;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index b69250fece..c05550c8a2 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -353,6 +353,13 @@ bool LLPanelMainInventory::postBuild()
}
}
+ // Doesn't work
+ //mParentSidepanel = getParentSidepanelInventory();
+ //if (mParentSidepanel)
+ //{
+ // mInboxPanel = mParentSidepanel->getChild("marketplace_inbox");
+ //}
+ //
mFilterEditor = getChild("inventory search editor");
if (mFilterEditor)
@@ -423,31 +430,29 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
// for example, LLParamSDParser doesn't know about U64,
// so some FilterOps params should be revised.
LLSD filterRoot;
- LLInventoryPanel* all_items_panel = getChild(ALL_ITEMS);
- if (all_items_panel)
+ if (mAllItemsPanel)
{
LLSD filterState;
LLInventoryPanel::InventoryState p;
- all_items_panel->getFilter().toParams(p.filter);
- all_items_panel->getRootViewModel().getSorter().toParams(p.sort);
+ mAllItemsPanel->getFilter().toParams(p.filter);
+ mAllItemsPanel->getRootViewModel().getSorter().toParams(p.sort);
if (p.validateBlock(false))
{
LLParamSDParser().writeSD(filterState, p);
- filterRoot[all_items_panel->getName()] = filterState;
+ filterRoot[mAllItemsPanel->getName()] = filterState;
}
}
- LLInventoryPanel* panel = findChild(RECENT_ITEMS);
- if (panel)
+ if (mRecentPanel)
{
LLSD filterState;
LLInventoryPanel::InventoryState p;
- panel->getFilter().toParams(p.filter);
- panel->getRootViewModel().getSorter().toParams(p.sort);
+ mRecentPanel->getFilter().toParams(p.filter);
+ mRecentPanel->getRootViewModel().getSorter().toParams(p.sort);
if (p.validateBlock(false))
{
LLParamSDParser().writeSD(filterState, p);
- filterRoot[panel->getName()] = filterState;
+ filterRoot[mRecentPanel->getName()] = filterState;
}
}
@@ -954,14 +959,9 @@ void LLPanelMainInventory::onClearSearch()
mFilterSubString = "";
// FIRE-22509: Only apply inbox filter on primary inventory window
- //LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory();
- //if (sidepanel_inventory)
+ //if (mInboxPanel)
//{
- // LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild("marketplace_inbox");
- // if (inbox_panel)
- // {
- // inbox_panel->onClearSearch();
- // }
+ // mInboxPanel->onClearSearch();
//}
LLSidepanelInventory * sidepanel_inventory = getParentByType();
if (sidepanel_inventory && sidepanel_inventory->getInboxPanel())
@@ -1044,14 +1044,9 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
// Separate search for inventory tabs from Satomi Ahn (FIRE-913 & FIRE-6862)
// FIRE-22509: Only apply inbox filter on primary inventory window
- //LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory();
- //if (sidepanel_inventory)
+ //if (mInboxPanel)
//{
- // LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild("marketplace_inbox");
- // if (inbox_panel)
- // {
- // inbox_panel->onFilterEdit(search_string);
- // }
+ // mInboxPanel->onFilterEdit(search_string);
//}
LLSidepanelInventory * sidepanel_inventory = getParentByType();
if (sidepanel_inventory && sidepanel_inventory->getInboxPanel())
@@ -2008,17 +2003,13 @@ void LLPanelMainInventory::onAddButtonClick()
void LLPanelMainInventory::setActivePanel()
{
// Todo: should cover gallery mode in some way
- if(mSingleFolderMode && isListViewMode())
+ if(mSingleFolderMode && (isListViewMode() || isCombinationViewMode()))
{
- mActivePanel = getChild("comb_single_folder_inv");
- }
- else if(mSingleFolderMode && isCombinationViewMode())
- {
- mActivePanel = getChild("comb_single_folder_inv");
+ mActivePanel = mCombinationInventoryPanel;
}
else
{
- mActivePanel = (LLInventoryPanel*)getChild("inventory filter tabs")->getCurrentPanel();
+ mActivePanel = (LLInventoryPanel*)mFilterTabs->getCurrentPanel();
}
mViewModeBtn->setEnabled(mSingleFolderMode || (getAllItemsPanel() == getActivePanel()));
}
@@ -2059,6 +2050,18 @@ void LLPanelMainInventory::toggleViewMode()
updateTitle();
onFilterSelected();
+ // Doesn't work
+ //if (mParentSidepanel)
+ //{
+ // if(mSingleFolderMode)
+ // {
+ // mParentSidepanel->hideInbox();
+ // }
+ // else
+ // {
+ // mParentSidepanel->toggleInbox();
+ // }
+ //}
LLSidepanelInventory* sidepanel_inventory = getParentSidepanelInventory();
if (sidepanel_inventory)
{
@@ -2071,6 +2074,7 @@ void LLPanelMainInventory::toggleViewMode()
sidepanel_inventory->toggleInbox();
}
}
+ //
}
void LLPanelMainInventory::onViewModeClick()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index d35cc124c5..bfff337fa2 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -50,6 +50,8 @@ class LLSidepanelInventory;
class LLToggleableMenu;
class LLFloater;
class LLFloaterSidePanelContainer;
+class LLSidepanelInventory;
+class LLPanelMarketplaceInbox;
class LLComboBox; // Filter dropdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -300,6 +302,9 @@ protected:
void setUploadCostIfNeeded();
void disableAddIfNeeded();
private:
+ LLSidepanelInventory* mParentSidepanel = nullptr;
+ LLPanelMarketplaceInbox* mInboxPanel = nullptr;
+
LLDragAndDropButton* mTrashButton; // Keep better inventory layout
LLToggleableMenu* mMenuGearDefault;
LLToggleableMenu* mMenuViewDefault;
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 7a1a538693..a8b4cc147f 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -829,12 +829,14 @@ bool LLPanelPeople::postBuild()
// [/FS:CR]
// Friend list accordion replacement
- //LLAccordionCtrlTab* accordion_tab = getChild("tab_all");
- //accordion_tab->setDropDownStateChangedCallback(
+ //mFriendsAccordion = friends_tab->getChild("friends_accordion");
+
+ //mFriendsAllTab = mFriendsAccordion->getChild("tab_all");
+ //mFriendsAllTab->setDropDownStateChangedCallback(
// boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mAllFriendList));
- //accordion_tab = getChild("tab_online");
- //accordion_tab->setDropDownStateChangedCallback(
+ //mFriendsOnlineTab = mFriendsAccordion->getChild("tab_online");
+ //mFriendsOnlineTab->setDropDownStateChangedCallback(
// boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mOnlineFriendList));
// Friend list accordion replacement
@@ -1216,10 +1218,10 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
mOnlineFriendList->setNameFilter(filter);
mAllFriendList->setNameFilter(filter);
- // Friend list accordion replacement
- //setAccordionCollapsedByUser("tab_online", false);
- //setAccordionCollapsedByUser("tab_all", false);
- // Friend list accordion replacement
+ // Friend list accordion replacement
+ //setAccordionCollapsedByUser(mFriendsOnlineTab, false);
+ //setAccordionCollapsedByUser(mFriendsAllTab, false);
+ // Friend list accordion replacement
showFriendsAccordionsIfNeeded();
// restore accordion tabs state _after_ all manipulations
@@ -1262,15 +1264,14 @@ void LLPanelPeople::onGroupLimitInfo()
void LLPanelPeople::onTabSelected(const LLSD& param)
{
- std::string tab_name = getChild(param.asString())->getName();
updateButtons();
showFriendsAccordionsIfNeeded();
// Layout panels will not initialize at a constant size, force it here.
- if (tab_name == NEARBY_TAB_NAME)
+ if (mTabContainer->getCurrentPanel()->getName() == NEARBY_TAB_NAME)
{
- LLLayoutPanel* minilayout = (LLLayoutPanel*)getChildView("minimaplayout", true);
+ LLLayoutPanel* minilayout = (LLLayoutPanel*)mTabContainer->getCurrentPanel()->getChildView("minimaplayout", true);
if (minilayout->getVisible())
{
LLRect rec = minilayout->getRect();
@@ -1320,9 +1321,9 @@ void LLPanelPeople::onAvatarListCommitted(LLAvatarList* list)
uuid_vec_t selected_uuids;
getCurrentItemIDs(selected_uuids);
mMiniMap->setSelected(selected_uuids);
- } else
+ }
// Make sure only one of the friends lists (online/all) has selection.
- if (getActiveTabName() == FRIENDS_TAB_NAME)
+ else if (getActiveTabName() == FRIENDS_TAB_NAME)
{
if (list == mOnlineFriendList)
mAllFriendList->resetSelection(true);
@@ -1347,12 +1348,9 @@ void LLPanelPeople::onAddFriendButtonClicked()
bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
{
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
- for ( uuid_vec_t::const_iterator
- id = uuids.begin(),
- id_end = uuids.end();
- id != id_end; ++id )
+ for (const LLUUID& uuid : uuids)
{
- if (av_tracker.isBuddy (*id))
+ if (av_tracker.isBuddy(uuid))
{
return false;
}
@@ -1676,15 +1674,8 @@ bool LLPanelPeople::notifyChildren(const LLSD& info)
return LLPanel::notifyChildren(info);
}
-void LLPanelPeople::showAccordion(const std::string name, bool show)
+void LLPanelPeople::showAccordion(LLAccordionCtrlTab* tab, bool show)
{
- if(name.empty())
- {
- LL_WARNS() << "No name provided" << LL_ENDL;
- return;
- }
-
- LLAccordionCtrlTab* tab = getChild(name);
tab->setVisible(show);
if(show)
{
@@ -1703,14 +1694,13 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded()
{
// Friend list accordion replacement
// Expand and show accordions if needed, else - hide them
- //showAccordion("tab_online", mOnlineFriendList->filterHasMatches());
- //showAccordion("tab_all", mAllFriendList->filterHasMatches());
+ //showAccordion(mFriendsOnlineTab, mOnlineFriendList->filterHasMatches());
+ //showAccordion(mFriendsAllTab, mAllFriendList->filterHasMatches());
//// Rearrange accordions
- //LLAccordionCtrl* accordion = getChild("friends_accordion");
- //accordion->arrange();
+ //mFriendsAccordion->arrange();
- childSetVisible("friends_accordion", mAllFriendList->filterHasMatches());
+ mFriendsTabContainer->setVisible(mAllFriendList->filterHasMatches());
// Friend list accordion replacement
// *TODO: new no_matched_tabs_text attribute was implemented in accordion (EXT-7368).
@@ -1724,11 +1714,11 @@ void LLPanelPeople::onFriendListRefreshComplete(LLUICtrl*ctrl, const LLSD& param
{
if(ctrl == mOnlineFriendList)
{
- showAccordion("tab_online", param.asInteger());
+ showAccordion(mFriendsOnlineTab, param.asInteger());
}
else if(ctrl == mAllFriendList)
{
- showAccordion("tab_all", param.asInteger());
+ showAccordion(mFriendsAllTab, param.asInteger());
}
}
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 0824b9580a..279573e478 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -46,6 +46,8 @@ class LLGroupList;
class LLMenuButton;
class LLTabContainer;
class LLNetMap;
+class LLAccordionCtrl;
+class LLAccordionCtrlTab;
// Firestorm declarations
class LLMenuGL;
@@ -142,7 +144,7 @@ private:
void onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list);
- void showAccordion(const std::string name, bool show);
+ void showAccordion(LLAccordionCtrlTab* tab, bool show);
void showFriendsAccordionsIfNeeded();
@@ -167,6 +169,10 @@ private:
// FIRE-4740: Friend counter in people panel
LLTabContainer* mFriendsTabContainer;
+ LLAccordionCtrl* mFriendsAccordion = nullptr;
+ LLAccordionCtrlTab* mFriendsAllTab = nullptr;
+ LLAccordionCtrlTab* mFriendsOnlineTab = nullptr;
+
LLButton* mNearbyGearBtn = nullptr;
LLButton* mFriendsGearBtn = nullptr;
LLButton* mRecentGearBtn = nullptr;
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 78b4fd4412..c525d06674 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -73,8 +73,7 @@
// Default constructor
LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id,
- : LLPreview( key ),
- mLiveFile(NULL)
+ : LLPreview( key )
// FIRE-24306: Retain cursor position when saving notecards
,mCursorPos(0)
,mScrollPos(0)
@@ -113,27 +112,34 @@ bool LLPreviewNotecard::postBuild()
mEditor->setNotecardInfo(mItemUUID, mObjectID, getKey());
mEditor->makePristine();
- childSetAction("Save", onClickSave, this);
- getChildView("lock")->setVisible( false);
+ mSaveBtn = getChild("Save");
+ mSaveBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::saveIfNeeded, this, nullptr, true));
- childSetAction("Delete", onClickDelete, this);
- getChildView("Delete")->setEnabled(false);
+ mLockBtn = findChild("lock");
+ if (mLockBtn)
+ mLockBtn->setVisible(false);
- childSetAction("Edit", onClickEdit, this);
+ mDeleteBtn = getChild("Delete");
+ mDeleteBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::deleteNotecard, this));
+ mDeleteBtn->setEnabled(false);
+
+ mEditBtn = getChild("Edit");
+ mEditBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::openInExternalEditor, this));
// FIRE-13969: Search button
getChild("Search")->setClickedCallback(boost::bind(&LLPreviewNotecard::onSearchButtonClicked, this));
const LLInventoryItem* item = getItem();
- childSetCommitCallback("desc", LLPreview::onText, this);
+ mDescEditor = getChild("desc");
+ mDescEditor->setCommitCallback(boost::bind(&LLPreview::onText, mDescEditor, this));
if (item)
{
- getChild("desc")->setValue(item->getDescription());
+ mDescEditor->setValue(item->getDescription());
bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
- getChildView("Delete")->setEnabled(!source_library);
+ mDeleteBtn->setEnabled(!source_library);
}
- getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
+ mDescEditor->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
// FIRE-29425: User-selectable font and size for notecards
mFontNameChangedCallbackConnection = gSavedSettings.getControl("FSNotecardFontName")->getSignal()->connect(boost::bind(&LLPreviewNotecard::onFontChanged, this));
@@ -152,24 +158,30 @@ bool LLPreviewNotecard::saveItem()
void LLPreviewNotecard::setEnabled(bool enabled)
{
- LLViewerTextEditor* editor = findChild("Notecard Editor");
- // editor is part of xml, if it doesn't exists, nothing else does
- if (editor)
+ if (mEditor)
{
- editor->setEnabled(enabled);
- getChildView("lock")->setVisible( !enabled);
- getChildView("desc")->setEnabled(enabled);
- getChildView("Save")->setEnabled(enabled && (!editor->isPristine()));
+ mEditor->setEnabled(enabled);
+ }
+ if (mLockBtn)
+ {
+ mLockBtn->setVisible(!enabled);
+ }
+ if (mDescEditor)
+ {
+ mDescEditor->setEnabled(enabled);
+ }
+ if (mSaveBtn)
+ {
+ mSaveBtn->setEnabled(enabled && mEditor && (!mEditor->isPristine()));
}
}
void LLPreviewNotecard::draw()
{
- LLViewerTextEditor* editor = getChild("Notecard Editor");
- bool changed = !editor->isPristine();
+ bool changed = !mEditor->isPristine();
- getChildView("Save")->setEnabled(changed && getEnabled());
+ mSaveBtn->setEnabled(changed && getEnabled());
LLPreview::draw();
}
@@ -204,9 +216,7 @@ bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
// virtual
bool LLPreviewNotecard::canClose()
{
- LLViewerTextEditor* editor = getChild("Notecard Editor");
-
- if(mForceClose || editor->isPristine())
+ if(mForceClose || mEditor->isPristine())
{
return true;
}
@@ -227,20 +237,13 @@ void LLPreviewNotecard::setObjectID(const LLUUID& object_id)
{
LLPreview::setObjectID(object_id);
- LLViewerTextEditor* editor = getChild("Notecard Editor");
- editor->setNotecardObjectID(mObjectUUID);
- editor->makePristine();
+ mEditor->setNotecardObjectID(mObjectUUID);
+ mEditor->makePristine();
}
const LLInventoryItem* LLPreviewNotecard::getDragItem()
{
- LLViewerTextEditor* editor = getChild("Notecard Editor");
-
- if(editor)
- {
- return editor->getDragItem();
- }
- return NULL;
+ return mEditor->getDragItem();
}
// [SL:KB] - Patch: UI-FloaterSearchReplace | Checked: 2010-11-05 (Catznip-2.3.0a) | Added: Catznip-2.3.0a
@@ -252,10 +255,7 @@ LLTextEditor* LLPreviewNotecard::getEditor()
bool LLPreviewNotecard::hasEmbeddedInventory()
{
- LLViewerTextEditor* editor = NULL;
- editor = getChild("Notecard Editor");
- if (!editor) return false;
- return editor->hasEmbeddedInventory();
+ return mEditor->hasEmbeddedInventory();
}
void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id)
@@ -273,14 +273,9 @@ void LLPreviewNotecard::updateTitleButtons()
{
LLPreview::updateTitleButtons();
- // Fix XUI parser warning
- //LLUICtrl* lock_btn = getChild("lock");
- //if (lock_btn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
- LLUICtrl* lock_btn = findChild("lock");
- if(lock_btn && lock_btn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
- //
+ if(mLockBtn && mLockBtn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
{
- LLRect lock_rc = lock_btn->getRect();
+ LLRect lock_rc = mLockBtn->getRect();
LLRect buttons_rect = getDragHandle()->getButtonsRect();
buttons_rect.mLeft = lock_rc.mLeft;
getDragHandle()->setButtonsRect(buttons_rect);
@@ -291,11 +286,6 @@ void LLPreviewNotecard::loadAsset()
{
// request the asset.
const LLInventoryItem* item = getItem();
- LLViewerTextEditor* editor = getChild("Notecard Editor");
-
- if (!editor)
- return;
-
bool fail = false;
if(item)
@@ -311,9 +301,9 @@ void LLPreviewNotecard::loadAsset()
mAssetID = item->getAssetUUID();
if(mAssetID.isNull())
{
- editor->setText(LLStringUtil::null);
- editor->makePristine();
- editor->setEnabled(true);
+ mEditor->setText(LLStringUtil::null);
+ mEditor->makePristine();
+ mEditor->setEnabled(true);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -332,9 +322,9 @@ void LLPreviewNotecard::loadAsset()
// The object that we're trying to look at disappeared, bail.
LL_WARNS() << "Can't find object " << mObjectUUID << " associated with notecard." << LL_ENDL;
mAssetID.setNull();
- editor->setText(getString("no_object"));
- editor->makePristine();
- editor->setEnabled(false);
+ mEditor->setText(getString("no_object"));
+ mEditor->makePristine();
+ mEditor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
return;
}
@@ -363,22 +353,22 @@ void LLPreviewNotecard::loadAsset()
else
{
mAssetID.setNull();
- editor->setText(getString("not_allowed"));
- editor->makePristine();
- editor->setEnabled(false);
+ mEditor->setText(getString("not_allowed"));
+ mEditor->makePristine();
+ mEditor->setEnabled(false);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
if(!allow_modify)
{
- editor->setEnabled(false);
- getChildView("lock")->setVisible( true);
- getChildView("Edit")->setEnabled(false);
+ mEditor->setEnabled(false);
+ mLockBtn->setVisible( true);
+ mEditBtn->setEnabled(false);
}
if((allow_modify || is_owner) && !source_library)
{
- getChildView("Delete")->setEnabled(true);
+ mDeleteBtn->setEnabled(true);
}
}
else if (mObjectUUID.notNull() && mItemUUID.notNull())
@@ -407,9 +397,9 @@ void LLPreviewNotecard::loadAsset()
if (fail)
{
- editor->setText(LLStringUtil::null);
- editor->makePristine();
- editor->setEnabled(true);
+ mEditor->setText(LLStringUtil::null);
+ mEditor->makePristine();
+ mEditor->setEnabled(true);
// Don't set asset status here; we may not have set the item id yet
// (e.g. when this gets called initially)
//mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -439,7 +429,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
buffer[file_length] = 0;
- LLViewerTextEditor* previewEditor = preview->getChild("Notecard Editor");
+ LLViewerTextEditor* previewEditor = preview->mEditor;
if( (file_length > 19) && !strncmp( &buffer[0], "Linden text version", 19 ) )
{
@@ -491,38 +481,6 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
delete floater_key;
}
-// static
-void LLPreviewNotecard::onClickSave(void* user_data)
-{
- //LL_INFOS() << "LLPreviewNotecard::onBtnSave()" << LL_ENDL;
- LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
- if(preview)
- {
- preview->saveIfNeeded();
- }
-}
-
-
-// static
-void LLPreviewNotecard::onClickDelete(void* user_data)
-{
- LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
- if(preview)
- {
- preview->deleteNotecard();
- }
-}
-
-// static
-void LLPreviewNotecard::onClickEdit(void* user_data)
-{
- LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
- if (preview)
- {
- preview->openInExternalEditor();
- }
-}
-
struct LLSaveNotecardInfo
{
LLPreviewNotecard* mSelf;
@@ -589,27 +547,19 @@ void LLPreviewNotecard::finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUI
bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync)
{
- LLViewerTextEditor* editor = getChild("Notecard Editor");
-
- if(!editor)
- {
- LL_WARNS() << "Cannot get handle to the notecard editor." << LL_ENDL;
- return false;
- }
-
- if(!editor->isPristine())
+ if(!mEditor->isPristine())
{
std::string buffer;
- if (!editor->exportBuffer(buffer))
+ if (!mEditor->exportBuffer(buffer))
{
return false;
}
// FIRE-24306: Retain cursor position when saving notecards
- mCursorPos = editor->getCursorPos();
- mScrollPos = editor->getScrollContainer()->getScrollbar(LLScrollContainer::VERTICAL)->getDocPos();
+ mCursorPos = mEditor->getCursorPos();
+ mScrollPos = mEditor->getScrollContainer()->getScrollbar(LLScrollContainer::VERTICAL)->getDocPos();
- editor->makePristine();
+ mEditor->makePristine();
const LLInventoryItem* item = getItem();
// save it out to database
if (item)
@@ -773,11 +723,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
// Perform item copy to inventory
if (info->mCopyItem.notNull())
{
- LLViewerTextEditor* editor = info->mSelf->getChild("Notecard Editor");
- if (editor)
- {
- editor->copyInventory(info->mCopyItem);
- }
+ info->mSelf->mEditor->copyInventory(info->mCopyItem);
}
// Find our window and close it if requested.
@@ -812,7 +758,7 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
{
case 0: // "Yes"
mCloseAfterSave = true;
- LLPreviewNotecard::onClickSave((void*)this);
+ saveIfNeeded();
break;
case 1: // "No"
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 60db46ea53..3f010dec8b 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -41,6 +41,7 @@
class LLViewerTextEditor;
class LLButton;
+class LLLineEditor;
// [SL:KB] - Patch: UI-FloaterSearchReplace | Checked: 2010-11-05 (Catznip-2.3.0a) | Added: Catznip-2.3.0a
class LLTextEditor;
// [/SL:KB]
@@ -105,12 +106,6 @@ protected:
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
- static void onClickSave(void* data);
-
- static void onClickDelete(void* data);
-
- static void onClickEdit(void* data);
-
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
S32 status, LLExtStat ext_status);
@@ -136,14 +131,18 @@ protected:
//
protected:
- LLViewerTextEditor* mEditor;
- LLButton* mSaveBtn;
+ LLViewerTextEditor* mEditor = nullptr;
+ LLLineEditor* mDescEditor = nullptr;
+ LLButton* mSaveBtn = nullptr;
+ LLButton* mEditBtn = nullptr;
+ LLButton* mDeleteBtn = nullptr;
+ LLUICtrl* mLockBtn = nullptr;
LLUUID mAssetID;
LLUUID mObjectID;
- LLLiveLSLFile* mLiveFile;
+ LLLiveLSLFile* mLiveFile = nullptr;
// FIRE-24306: Retain cursor position when saving notecards
S32 mCursorPos;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 4801167449..c5a88b8ccc 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -522,7 +522,7 @@ void LLLiveLSLEditor::experienceChanged()
if(mScriptEd->getAssociatedExperience() != mExperiences->getSelectedValue().asUUID())
{
mScriptEd->enableSave(getIsModifiable());
- //getChildView("Save_btn")->setEnabled(true);
+ //mSaveBtn->setEnabled(true);
mScriptEd->setAssociatedExperience(mExperiences->getSelectedValue().asUUID());
updateExperiencePanel();
}
@@ -568,9 +568,8 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata )
bool LLScriptEdCore::postBuild()
{
- mLineCol=getChild("line_col");
+ mLineCol = getChild("line_col");
// Advanced Script Editor
- //mSaveBtn=getChildView("Save_btn");
mSaveBtn = getChild("save_btn");
mSaveBtn2 = getChild("save_btn_2"); // support extra save button
mCutBtn = getChild("cut_btn");
@@ -614,7 +613,8 @@ bool LLScriptEdCore::postBuild()
childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
// Advanced Script Editor
- //childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,false));
+ //mSaveBtn = getChild("Save_btn");
+ //mSaveBtn->setCommitCallback(boost::bind(&LLScriptEdCore::doSave, this, false));
childSetAction("prefs_btn", boost::bind(&LLScriptEdCore::onBtnPrefs, this));
//
childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this));
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 80588739c7..4833a302e3 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -247,11 +247,10 @@ private:
bool mScriptRemoved;
bool mSaveDialogShown;
LLUUID mAssetID;
+ LLTextBox* mLineCol = nullptr;
+ LLButton* mSaveBtn = nullptr;
- LLTextBox* mLineCol;
// Advanced Script Editor
- //LLView* mSaveBtn;
- LLButton* mSaveBtn;
LLButton* mSaveBtn2; // // support extra save button
LLButton* mCutBtn;
LLButton* mCopyBtn;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index dc3f62a378..602c09e674 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -175,6 +175,11 @@ void LLPreviewTexture::populateRatioList()
// virtual
bool LLPreviewTexture::postBuild()
{
+ mButtonsPanel = getChild("buttons_panel");
+ mDimensionsText = getChild("dimensions");
+ mAspectRatioText = getChild("aspect_ratio");
+ mDimensionsPanel = findChild("dimensions_panel"); // Texture preview mode
+
if (mCopyToInv)
{
getChild("Keep")->setLabel(getString("Copy"));
@@ -237,9 +242,6 @@ bool LLPreviewTexture::postBuild()
}
//
- // Performance improvement
- mDimensionsCtrl = getChild("dimensions");
-
// FIRE-20150: Add refresh button to texture preview
getChild("btn_refresh")->setClickedCallback(boost::bind(&LLPreviewTexture::onButtonRefresh, this));
@@ -530,23 +532,26 @@ void LLPreviewTexture::reshape(S32 width, S32 height, bool called_from_parent)
{
LLPreview::reshape(width, height, called_from_parent);
- LLRect dim_rect;
- // Ansariel: Need the rect of the dimensions_panel
- //LLView *pView = findChildView( "dimensions" );
- LLView *pView = findChildView( "dimensions_panel" );
-
- if( pView )
- dim_rect = pView->getRect();
-
S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
// add space for dimensions and aspect ratio
- S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD;
+ S32 info_height = CLIENT_RECT_VPAD;
// Texture preview mode
- //if (getChild("buttons_panel")->getVisible())
+ //if (mDimensionsText)
//{
- // info_height += getChild("buttons_panel")->getRect().getHeight();
+ // LLRect dim_rect(mDimensionsText->getRect());
+ // info_height += dim_rect.mTop;
//}
+
+ //if (mButtonsPanel->getVisible())
+ //{
+ // info_height += mButtonsPanel->getRect().getHeight();
+ //}
+ if (mDimensionsPanel)
+ {
+ LLRect dim_rect(mDimensionsPanel->getRect());
+ info_height += dim_rect.mTop;
+ }
//
LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0);
client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
@@ -616,7 +621,7 @@ void LLPreviewTexture::openToSave()
// getChildView("desc txt")->setVisible(false);
// getChildView("desc")->setVisible(false);
// getChild("preview_stack")->collapsePanel(getChild("buttons_panel"), true);
-// getChild("buttons_panel")->setVisible(false);
+// mButtonsPanel->setVisible(false);
// getChild("combo_aspect_ratio")->setCurrentByIndex(0); //unconstrained
// reshape(getRect().getWidth(), getRect().getHeight());
//}
@@ -779,15 +784,15 @@ void LLPreviewTexture::updateDimensions()
// Update the width/height display every time
// Performance improvement
- //getChild("dimensions")->setTextArg("[WIDTH]", llformat("%d", img_width));
- //getChild("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height));
+ //mDimensionsText->setTextArg("[WIDTH]", llformat("%d", img_width));
+ //mDimensionsText->setTextArg("[HEIGHT]", llformat("%d", img_height));
if (img_width != mLastWidth)
{
- mDimensionsCtrl->setTextArg("[WIDTH]", llformat("%d", img_width));
+ mDimensionsText->setTextArg("[WIDTH]", llformat("%d", img_width));
}
if (img_height != mLastHeight)
{
- mDimensionsCtrl->setTextArg("[HEIGHT]", llformat("%d", img_height));
+ mDimensionsText->setTextArg("[HEIGHT]", llformat("%d", img_height));
}
// Performance improvement
@@ -974,9 +979,9 @@ void LLPreviewTexture::updateDimensions()
gFloaterView->adjustToFitScreen(this, false);
// : Show image at full resolution if possible
- LLRect dim_rect(getChildView("dimensions")->getRect());
- LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
- getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
+ LLRect dim_rect(mDimensionsText->getRect());
+ LLRect aspect_label_rect(mAspectRatioText->getRect());
+ mAspectRatioText->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
// Asset UUID
if (mIsFullPerm)
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 4ca1d38dab..6f63f9ee49 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -37,6 +37,8 @@
class LLComboBox;
class LLImageRaw;
+class LLLayoutPanel;
+class LLPanel;
class LLPreviewTexture : public LLPreview
{
@@ -151,10 +153,14 @@ private:
LLAvatarNameCache::callback_connection_t mAvatarNameCallbackConnection;
LLUIString mUploaderDateTime;
- // Performance improvement
- LLUICtrl* mDimensionsCtrl;
-
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
std::vector mRatiosList;
+
+ LLLayoutPanel* mButtonsPanel = nullptr;
+ LLUICtrl* mDimensionsText = nullptr;
+ LLUICtrl* mAspectRatioText = nullptr;
+
+ // Texture preview mode
+ LLPanel* mDimensionsPanel = nullptr;
};
#endif // LL_LLPREVIEWTEXTURE_H
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index d200a2ab5e..e454bae595 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -57,26 +57,12 @@ LLRect LLScreenChannelBase::getChannelRect()
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (mChicletRegion == NULL)
{
- // Group notices, IMs and chiclets position:
- // Move the chiclet container to the bottom of its parent
- // and follow bottom instead of top
- //mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
- if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight"))
- {
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
- gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(false);
- }
- else
- {
- gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(false);
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container_bottom");
- }
- // Group notices, IMs and chiclets position
+ mChicletRegion = gViewerWindow->getChicletContainer();
}
LLRect channel_rect;
@@ -130,26 +116,12 @@ bool LLScreenChannelBase::postBuild()
{
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (mChicletRegion == NULL)
{
- // Group notices, IMs and chiclets position - Apparently
- // this never gets called, instead see
- // LLScreenChannelBase::getChannelRect()
- //mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
- if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight"))
- {
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
- gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(false);
- }
- else
- {
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container_bottom");
- gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(false);
- }
- //
+ mChicletRegion = gViewerWindow->getChicletContainer();
}
return true;
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 620080b18c..424eb214ff 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -1044,6 +1044,7 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
label = result["label"].asString();
}
+ LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
if (result.has("message"))
{
reason = result["message"].asString();
@@ -1054,6 +1055,12 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
{
case 404:
reason = LLTrans::getString("AssetUploadServerUnreacheble");
+ if (floater_snapshot
+ && floater_snapshot->isWaitingState()
+ && uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG)
+ {
+ label = "CannotUploadSnapshotEmailTooBig";
+ }
break;
case 499:
reason = LLTrans::getString("AssetUploadServerDifficulties");
@@ -1090,7 +1097,6 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
// Todo: move these floater specific actions into proper callbacks
// Let the Snapshot floater know we have failed uploading.
- LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
if (floater_snapshot && floater_snapshot->isWaitingState())
{
if (uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 69a1e979fb..79eb4281eb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -12959,7 +12959,6 @@ void initialize_menus()
commit.add("Object.Buy", boost::bind(&handle_buy));
commit.add("Object.Edit", boost::bind(&handle_object_edit));
- commit.add("Object.Edit", boost::bind(&handle_object_edit));
commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material));
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
commit.add("Object.Open", boost::bind(&handle_object_open));
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 23253559dc..cfa39b36c6 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2230,6 +2230,10 @@ void LLViewerWindow::initBase()
mPopupView = main_view->getChild("popup_holder");
mHintHolder = main_view->getChild("hint_holder")->getHandle();
mLoginPanelHolder = main_view->getChild("login_panel_holder")->getHandle();
+ mStatusBarContainer = main_view->getChild("status_bar_container");
+ // Improved menu and navigation bar
+ //mNavBarContainer = mStatusBarContainer->getChild("nav_bar_container");
+ //mTopInfoContainer = main_view->getChild("topinfo_bar_container");
// Create the toolbar view
// Get a pointer to the toolbar view holder
@@ -2245,6 +2249,20 @@ void LLViewerWindow::initBase()
// Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
gToolBarView->setVisible(false);
+ mFloaterSnapRegion = gToolBarView->getChild("floater_snap_region");
+ // Group notices, IMs and chiclets position
+ //mChicletContainer = gToolBarView->getChild("chiclet_container");
+ if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight"))
+ {
+ mChicletContainer = gToolBarView->getChild("chiclet_container");
+ gToolBarView->getChildView("chiclet_container_bottom")->setVisible(false);
+ }
+ else
+ {
+ gToolBarView->getChildView("chiclet_container")->setVisible(false);
+ mChicletContainer = gToolBarView->getChild("chiclet_container_bottom");
+ }
+ //
// initialize the utility bar (classic V1 style buttons next to the chat bar)
UtilityBar::instance().init();
@@ -2258,7 +2276,7 @@ void LLViewerWindow::initBase()
toolbarp->getCenterLayoutPanel()->setReshapeCallback(boost::bind(&LLFloaterView::setToolbarRect, gFloaterView, _1, _2));
}
}
- gFloaterView->setFloaterSnapView(main_view->getChild("floater_snap_region")->getHandle());
+ gFloaterView->setFloaterSnapView(mFloaterSnapRegion->getHandle());
gSnapshotFloaterView = main_view->getChild("Snapshot Floater View");
// Prevent floaters being dragged under main chat bar
@@ -2334,25 +2352,11 @@ void LLViewerWindow::initWorldUI()
if (!gNonInteractive)
{
- // Group notices, IMs and chiclets position
- //LLPanel* chiclet_container = getRootView()->getChild("chiclet_container");
- LLPanel* chiclet_container;
- if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight"))
- {
- chiclet_container = getRootView()->getChild("chiclet_container");
- getRootView()->getChildView("chiclet_container_bottom")->setVisible(false);
- }
- else
- {
- getRootView()->getChildView("chiclet_container")->setVisible(false);
- chiclet_container = getRootView()->getChild("chiclet_container_bottom");
- }
- // Group notices, IMs and chiclets position
LLChicletBar* chiclet_bar = LLChicletBar::getInstance();
- chiclet_bar->setShape(chiclet_container->getLocalRect());
+ chiclet_bar->setShape(mChicletContainer->getLocalRect());
chiclet_bar->setFollowsAll();
- chiclet_container->addChild(chiclet_bar);
- chiclet_container->setVisible(true);
+ mChicletContainer->addChild(chiclet_bar);
+ mChicletContainer->setVisible(true);
}
LLRect morph_view_rect = full_window;
@@ -2378,30 +2382,27 @@ void LLViewerWindow::initWorldUI()
//if (!gStatusBar)
//{
// // Status bar
- // LLPanel* status_bar_container = getRootView()->getChild("status_bar_container");
// gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
// gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
// gStatusBar->setShape(status_bar_container->getLocalRect());
// // sync bg color with menu bar
// gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor());
// // add InBack so that gStatusBar won't be drawn over menu
- // status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
- // status_bar_container->setVisible(true);
+ // mStatusBarContainer->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
+ // mStatusBarContainer->setVisible(true);
// // Navigation bar
// LLView* nav_bar_container = getRootView()->getChild("nav_bar_container");
// navbar->setShape(nav_bar_container->getLocalRect());
// navbar->setBackgroundColor(gMenuBarView->getBackgroundColor());
- // nav_bar_container->addChild(navbar);
- // nav_bar_container->setVisible(true);
+ // mNavBarContainer->addChild(navbar);
+ // mNavBarContainer->setVisible(true);
//}
//else
//{
- // LLPanel* status_bar_container = getRootView()->getChild("status_bar_container");
- // LLView* nav_bar_container = getRootView()->getChild("nav_bar_container");
- // status_bar_container->setVisible(true);
- // nav_bar_container->setVisible(true);
+ // mStatusBarContainerr_container->setVisible(true);
+ // mNavBarContainer->setVisible(true);
//}
//if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
@@ -2435,13 +2436,12 @@ void LLViewerWindow::initWorldUI()
// We don't have the mini location bar, so no topinfo_bar required
// // Top Info bar
- // LLPanel* topinfo_bar_container = getRootView()->getChild("topinfo_bar_container");
// LLPanelTopInfoBar* topinfo_bar = LLPanelTopInfoBar::getInstance();
- // topinfo_bar->setShape(topinfo_bar_container->getLocalRect());
+ // topinfo_bar->setShape(mTopInfoContainer->getLocalRect());
- // topinfo_bar_container->addChild(topinfo_bar);
- // topinfo_bar_container->setVisible(true);
+ // mTopInfoContainer->addChild(topinfo_bar);
+ // mTopInfoContainer->setVisible(true);
// if (!gSavedSettings.getBOOL("ShowMiniLocationPanel"))
// {
@@ -2462,7 +2462,7 @@ void LLViewerWindow::initWorldUI()
getRootView()->sendChildToBack(gHUDView);
}
- LLPanel* panel_ssf_container = getRootView()->getChild("state_management_buttons_container");
+ LLPanel* panel_ssf_container = gToolBarView->getChild("state_management_buttons_container");
LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
panel_ssf_container->addChild(panel_stand_stop_flying);
@@ -2865,12 +2865,11 @@ void LLViewerWindow::setNormalControlsVisible( bool visible )
}
// Is done inside XUI now, using visibility_control
- //LLNavigationBar* navbarp = LLUI::getInstance()->getRootView()->findChild("navigation_bar");
- //if (navbarp)
+ //if (mNavBarContainer)
//{
// // when it's time to show navigation bar we need to ensure that the user wants to see it
// // i.e. ShowNavbarNavigationPanel option is true
- // navbarp->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") );
+ // mNavBarContainer->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") );
//}
//
}
@@ -7259,40 +7258,35 @@ LLRect LLViewerWindow::getChatConsoleRect()
return console_rect;
}
-void LLViewerWindow::reshapeStatusBarContainer()
-{
- LLPanel* status_bar_container = getRootView()->getChild("status_bar_container");
- LLView* nav_bar_container = getRootView()->getChild("nav_bar_container");
-
- S32 new_height = status_bar_container->getRect().getHeight();
- S32 new_width = status_bar_container->getRect().getWidth();
-
- if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
- {
- // Navigation bar is outside visible area, expand status_bar_container to show it
- new_height += nav_bar_container->getRect().getHeight();
- }
- else
- {
- // collapse status_bar_container
- new_height -= nav_bar_container->getRect().getHeight();
- }
- status_bar_container->reshape(new_width, new_height, true);
-}
-
// Improved menu and navigation bar
+//void LLViewerWindow::reshapeStatusBarContainer()
+//{
+// S32 new_height = mStatusBarContainer->getRect().getHeight();
+// S32 new_width = mStatusBarContainer->getRect().getWidth();
+//
+// if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
+// {
+// // Navigation bar is outside visible area, expand status_bar_container to show it
+// new_height += mNavBarContainer->getRect().getHeight();
+// }
+// else
+// {
+// // collapse status_bar_container
+// new_height -= mNavBarContainer->getRect().getHeight();
+// }
+// mStatusBarContainer->reshape(new_width, new_height, true);
+//}
+
//void LLViewerWindow::resetStatusBarContainer()
//{
// LLNavigationBar* navbar = LLNavigationBar::getInstance();
// if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel") || navbar->getVisible())
// {
// // was previously showing navigation bar
-// LLView* nav_bar_container = getRootView()->getChild("nav_bar_container");
-// LLPanel* status_bar_container = getRootView()->getChild("status_bar_container");
-// S32 new_height = status_bar_container->getRect().getHeight();
-// S32 new_width = status_bar_container->getRect().getWidth();
-// new_height -= nav_bar_container->getRect().getHeight();
-// status_bar_container->reshape(new_width, new_height, true);
+// S32 new_height = mStatusBarContainer->getRect().getHeight();
+// S32 new_width = mStatusBarContainer->getRect().getWidth();
+// new_height -= mNavBarContainer->getRect().getHeight();
+// mStatusBarContainer->reshape(new_width, new_height, true);
// }
//}
//
@@ -7330,7 +7324,7 @@ void LLViewerWindow::setUIVisibility(bool visible)
//LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : false);
// We don't use the mini location panel in Firestorm
// LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : false);
- mRootView->getChildView("status_bar_container")->setVisible(visible);
+ mStatusBarContainer->setVisible(visible);
// hide utility bar if we are on a skin that uses it, e.g. Vintage
LLView* utilityBarStack = mRootView->findChildView("chat_bar_utility_bar_stack");
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 200009234a..e5b9627689 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -184,8 +184,8 @@ public:
bool getUIVisibility();
void handlePieMenu(S32 x, S32 y, MASK mask);
- void reshapeStatusBarContainer();
// Improved menu and navigation bar
+ //void reshapeStatusBarContainer();
//void resetStatusBarContainer(); // undo changes done by resetStatusBarContainer on initWorldUI()
bool handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool &is_toolmgr_action);
@@ -468,6 +468,9 @@ public:
static std::string getLastSnapshotDir();
+ LLView* getFloaterSnapRegion() { return mFloaterSnapRegion; }
+ LLPanel* getChicletContainer() { return mChicletContainer; }
+
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
@@ -496,6 +499,11 @@ 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
+ LLView* mFloaterSnapRegion = nullptr;
+ LLView* mNavBarContainer = nullptr;
+ LLPanel* mStatusBarContainer = nullptr;
+ LLPanel* mChicletContainer = nullptr;
+ LLPanel* mTopInfoContainer = nullptr;
LLVector2 mDisplayScale;
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 83e417633a..feb5ecb1fb 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -38,6 +38,7 @@
// newview
#include "llavataractions.h" // for getProfileURL()
#include "llviewermedia.h" // FIXME: don't use LLViewerMedia internals
+#include "llnotificationsutil.h"
#include "llcorehttputil.h"
@@ -132,6 +133,10 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin
if (!status)
{
+ if (image->getDataSize() > MAX_WEB_DATASIZE)
+ {
+ LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig");
+ }
LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL;
LLWebProfile::reportImageUploadStatus(false);
return;
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
index 335282bf13..a9cfa102c0 100644
--- a/indra/newview/llwebprofile.h
+++ b/indra/newview/llwebprofile.h
@@ -57,6 +57,8 @@ public:
static void setAuthCookie(const std::string& cookie);
static void setImageUploadResultCallback(status_callback_t cb) { mStatusCallback = cb; }
+ static constexpr S32 MAX_WEB_DATASIZE = 8 * 1024 * 1024; // 8MB
+
private:
static LLCore::HttpHeaders::ptr_t buildDefaultHeaders();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 19cfa36cfe..e7deb7d356 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10965,7 +10965,7 @@ bool LLPipeline::hasAnyRenderType(U32 type, ...) const
{
if (mRenderTypeEnabled[type])
{
- va_end(args); // Need to end varargs being returning.
+ va_end(args);
return true;
}
type = va_arg(args, U32);
diff --git a/indra/newview/skins/default/xui/az/panel_preferences_sound.xml b/indra/newview/skins/default/xui/az/panel_preferences_sound.xml
index 7ea84d21e5..ddc8261bc3 100644
--- a/indra/newview/skins/default/xui/az/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/az/panel_preferences_sound.xml
@@ -114,36 +114,6 @@ Avtomatik oxutma
-
-
- Susmaya görə
-
-
- Susmaya görə sistem cihazı
-
-
- Susmaya görə sistem cihazı
-
-
- Cihaz yoxdur
-
-
- Cihaz yoxdur
-
-
- Giriş
-
-
- Çıxış
-
-
- Səsin dərəcəsini:
-
-
-
- Xahiş edirik gözləyin
-
-
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index 6be9c2cad8..b6de029676 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -943,6 +943,16 @@ Erwartet wurde [VALIDS]
Datei [FILE] kann aus folgendem Grund nicht hochgeladen werden: [REASON]
Bitte versuchen Sie es erneut.
+
+
+ Schnappschuss [FILE] kann aus folgendem Grund nicht hochgeladen werden: [REASON]
+
+Die Datei ist möglicherweise zu groß. Versuchen Sie, die Auflösung oder Qualität zu verringern, oder versuchen Sie es erneut.
+
+
+ Schnappschuss nicht hochgeladen werden.
+
+Die Datei ist möglicherweise zu groß. Versuchen Sie, die Auflösung zu verringern oder versuchen Sie es erneut.
„[LANDMARK_NAME]“ wurde zum Ordner „[FOLDER_NAME]“ hinzugefügt.
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
index c739fbdb66..47b80a3362 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
@@ -147,30 +147,6 @@
-
-
- Standard
-
-
- Kein Gerät
-
-
- Standardsystemgerät
-
-
- Eingabe
-
-
- Ausgabe
-
-
- Meine Lautstärke:
-
-
-
- Bitte warten
-
-
diff --git a/indra/newview/skins/default/xui/de/panel_sound_devices.xml b/indra/newview/skins/default/xui/de/panel_sound_devices.xml
index c8c80ac99a..837defd6ab 100644
--- a/indra/newview/skins/default/xui/de/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/de/panel_sound_devices.xml
@@ -15,8 +15,8 @@
Ausgabe
-
- Mikrofonlautstärke:
+
+ Meine Lautstärke:
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d85be37d3a..d10dd9e3c8 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2483,6 +2483,26 @@ Unable to upload [FILE] due to the following reason: [REASON]
Please try again later.
fail
+
+
+Unable to upload snapshot [FILE] due to the following reason: [REASON]
+
+File might be too big, try reducing resolution, quality or try again later.
+ fail
+
+
+
+Unable to upload snapshot.
+
+File might be too big, try reducing resolution or try again later.
+ fail
+
-
- Default
-
-
- Default system device
-
-
- Default system device
-
-
- No device
-
-
- No device
-
-
-
-
- Input
-
-
-
-
- Output
-
-
-
- Input Volume:
-
-
-
- Please wait
-
-
-
-
-
-
-
-
+ top_pad="5"/>
diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
index 5dd7fc120b..cffa060b52 100644
--- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
@@ -28,10 +28,10 @@
follows="left|top"
height="18"
image_name="Microphone_On"
- left_delta="-5"
+ left_delta="4"
name="microphone_icon"
mouse_opaque="false"
- top="7"
+ top="4"
layout="topleft"
visible="true"
width="18" />
@@ -101,7 +101,7 @@
layout="topleft"
left_delta="-300"
name="My volume label"
- top_pad="14"
+ top_pad="8"
width="200">
Mic volume:
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
index 206d59673b..943fd27aa0 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
@@ -83,36 +83,6 @@
-
-
- Por defecto
-
-
- Dispositivo por defecto del sistema
-
-
- Dispositivo por defecto del sistema
-
-
- Ninguna
-
-
- Ninguna
-
-
- Entrada
-
-
- Salida
-
-
- Volumen de entrada:
-
-
-
- Por favor, espera...
-
-
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
index 7d62d22294..c100ae8121 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
@@ -91,18 +91,6 @@
-
- Par défaut
- Valeur par défaut du système
- Valeur par défaut du système
- Aucun appareil
- Aucun appareil
- Entrée
- Sortie
- Volume de la voix :
-
- Veuillez patienter
-
Vous pouvez modifier ici chaque son produit par l'interface ainsi que décider de l'activer ou non
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
index 855fe2128d..b7dafc8603 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
@@ -126,36 +126,6 @@
-
-
- Predefinita
-
-
- Periferica audio di sistema
-
-
- Periferica audio di sistema
-
-
- Nessuna periferica
-
-
- Nessuna periferica
-
-
- Ingresso
-
-
- Uscita
-
-
- Il mio volume:
-
-
-
- Attendere
-
-
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
index e34e87dce6..f2ef910f7a 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
@@ -11,11 +11,8 @@
-
-
-
@@ -61,11 +58,9 @@
出力機器
-
-
メディアの自動再生
@@ -95,7 +90,6 @@
-
@@ -117,10 +111,9 @@
-
+
-
@@ -137,49 +130,15 @@
-
-
- デフォルト
-
-
- デフォルトのシステム機器
-
-
- デフォルトのシステム機器
-
-
- なし
-
-
- なし
-
-
-
- 入力
-
-
- 出力
-
-
- 入力音量
-
-
-
- お待ち下さい
-
-
-
-
+
-
-
ここで(サウンドのUUIDを指定することで)デフォルトのインターフェイス・サウンドを変更したり、
有効、無効にすることができます。初期設定値を確認するにはマウスをUUIDフィールドの上に乗せて下さい。
-
+
デフォルトの警告音:
@@ -187,7 +146,7 @@
-
+
無効なキー打鍵:
@@ -195,7 +154,7 @@
-
+
マウス・ボタンのクリック:
@@ -203,7 +162,7 @@
-
+
マウス・ボタンのリリース:
@@ -211,7 +170,7 @@
-
+
女性のうめき声:
@@ -219,7 +178,7 @@
-
+
男性のうめき声:
@@ -227,7 +186,7 @@
-
+
リンデンドル残高減少:
@@ -235,7 +194,7 @@
-
+
リンデンドル残高増加:
@@ -243,7 +202,7 @@
-
+
IMを受信した時:
@@ -256,7 +215,7 @@
-
+
グループIMを受信した時:
@@ -269,7 +228,7 @@
-
+
カンファレンスIMを受信した時:
@@ -282,7 +241,7 @@
-
+
IM新規開始:
@@ -290,7 +249,7 @@
-
+
オブジェクト作成:
@@ -298,7 +257,7 @@
-
+
オブジェクト削除:
@@ -306,7 +265,7 @@
-
+
オブジェクトREZ:
@@ -314,7 +273,7 @@
-
+
オブジェクトDEREZ:
@@ -322,7 +281,7 @@
-
+
スナップショットを撮る:
@@ -330,7 +289,7 @@
-
+
テレポート:
@@ -338,18 +297,15 @@
-
-
+
-
-
ここで(サウンドのUUIDを指定することで)デフォルトのインターフェイス・サウンドを変更したり、
有効、無効にすることができます。初期設定値を確認するにはマウスをUUIDフィールドの上に乗せて下さい。
-
+
パイメニュー表示:
@@ -357,7 +313,7 @@
-
+
パイメニュー消去:
@@ -365,7 +321,7 @@
-
+
パイメニュー選択 1:
@@ -373,7 +329,7 @@
-
+
パイメニュー選択 2:
@@ -381,7 +337,7 @@
-
+
パイメニュー選択 3:
@@ -389,7 +345,7 @@
-
+
パイメニュー選択 4:
@@ -397,7 +353,7 @@
-
+
パイメニュー選択 5:
@@ -405,7 +361,7 @@
-
+
パイメニュー選択 6:
@@ -413,7 +369,7 @@
-
+
パイメニュー選択 7:
@@ -421,7 +377,7 @@
-
+
パイメニュー選択 8:
@@ -429,7 +385,7 @@
-
+
チャット入力:
@@ -437,7 +393,7 @@
-
+
ウィンドウを閉じる:
@@ -445,7 +401,7 @@
-
+
ウィンドウを開く:
@@ -453,7 +409,7 @@
-
+
スクリプト・ダイアログ:
@@ -461,7 +417,7 @@
-
+
フレンド・オンライン:
@@ -469,7 +425,7 @@
-
+
フレンド・オフライン:
@@ -477,7 +433,7 @@
-
+
フレンド申請:
@@ -485,7 +441,7 @@
-
+
テレポート受信:
@@ -493,18 +449,15 @@
-
-
+
-
-
ここで(サウンドのUUIDを指定することで)デフォルトのインターフェイス・サウンドを変更したり、
有効、無効にすることができます。初期設定値を確認するにはマウスをUUIDフィールドの上に乗せて下さい。
-
+
インベントリ受領:
@@ -512,7 +465,7 @@
-
+
ボイスコール受信:
@@ -520,7 +473,7 @@
-
+
グループ招待受信:
@@ -528,7 +481,7 @@
-
+
グループ通知受信:
@@ -536,7 +489,7 @@
-
+
新しい体験:
@@ -544,7 +497,7 @@
-
+
無効な操作:
@@ -552,7 +505,7 @@
-
+
ムーブメントロック:
@@ -560,7 +513,7 @@
-
+
デフォルトの足音:
@@ -568,7 +521,7 @@
-
+
追跡ビーコン:
@@ -576,7 +529,7 @@
-
+
SIM 再起動
@@ -584,7 +537,7 @@
-
+
SIM 再起動 (OpenSim):
@@ -592,8 +545,6 @@
-
-
-
+
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
index e183096f0c..b6e9fea9c8 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
@@ -126,36 +126,6 @@
-
-
- Domyślne
-
-
- Domyślne urządzenie systemowe
-
-
- Domyślne urządzenie systemowe
-
-
- Brak urządzenia
-
-
- Brak urządzenia
-
-
- Wejście
-
-
- Wyjście
-
-
- Moja głośność:
-
-
-
- Proszę czekać
-
-
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
index 39a192a3ee..343cd41478 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
@@ -131,36 +131,6 @@
-
-
- По умолчанию
-
-
- Системное устройство по умолчанию
-
-
- Системное устройство по умолчанию
-
-
- Нет устройства
-
-
- Нет устройства
-
-
- Ввод
-
-
- Вывод
-
-
- Моя громкость:
-
-
-
- Пожалуйста, подождите
-
-