Merge Firestorm LGPL
commit
2d6314182b
1
.hgtags
1
.hgtags
|
|
@ -566,3 +566,4 @@ cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release
|
|||
b4d76b5590fdf8bab72c64442353753a527cbc44 5.0.5-release
|
||||
3e5035dfd8af49bd4c0009f0a76ef46a15991a45 5.0.6-release
|
||||
abcab37e1b29414ab8c03af9ca2ab489d809788a 5.0.7-release
|
||||
505a492f30bd925bb48e2e093ae77c3c2b4c740f 5.0.8-release
|
||||
|
|
|
|||
|
|
@ -1046,9 +1046,9 @@ Nicholaz Beresford
|
|||
VWR-2682
|
||||
VWR-2684
|
||||
Nick Rhodes
|
||||
NickyD
|
||||
MAINT-873
|
||||
Nicky Dasmijn
|
||||
MAINT-873
|
||||
MAINT-7541
|
||||
VWR-29228
|
||||
MAINT-1392
|
||||
MAINT-873
|
||||
|
|
|
|||
|
|
@ -140,7 +140,8 @@ LLMotionController::LLMotionController()
|
|||
mTimeStep(0.f),
|
||||
mTimeStepCount(0),
|
||||
mLastInterp(0.f),
|
||||
mIsSelf(FALSE)
|
||||
mIsSelf(FALSE),
|
||||
mLastCountAfterPurge(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -239,10 +240,12 @@ void LLMotionController::purgeExcessMotions()
|
|||
}
|
||||
}
|
||||
|
||||
if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
|
||||
U32 loaded_count = mLoadedMotions.size();
|
||||
if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge)
|
||||
{
|
||||
LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL;
|
||||
LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL;
|
||||
}
|
||||
mLastCountAfterPurge = loaded_count;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ protected:
|
|||
F32 mLastInterp;
|
||||
|
||||
U8 mJointSignature[2][LL_CHARACTER_MAX_ANIMATED_JOINTS];
|
||||
private:
|
||||
U32 mLastCountAfterPurge; //for logging and debugging purposes
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -260,6 +260,70 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLApp::parseCommandOptions(int argc, wchar_t** wargv)
|
||||
{
|
||||
LLSD commands;
|
||||
std::string name;
|
||||
std::string value;
|
||||
for(int ii = 1; ii < argc; ++ii)
|
||||
{
|
||||
if(wargv[ii][0] != '-')
|
||||
{
|
||||
LL_INFOS() << "Did not find option identifier while parsing token: "
|
||||
<< wargv[ii] << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
int offset = 1;
|
||||
if(wargv[ii][1] == '-') ++offset;
|
||||
|
||||
#if LL_WINDOWS
|
||||
name.assign(utf16str_to_utf8str(&wargv[ii][offset]));
|
||||
#else
|
||||
name.assign(wstring_to_utf8str(&wargv[ii][offset]));
|
||||
#endif
|
||||
if(((ii+1) >= argc) || (wargv[ii+1][0] == '-'))
|
||||
{
|
||||
// we found another option after this one or we have
|
||||
// reached the end. simply record that this option was
|
||||
// found and continue.
|
||||
int flag = name.compare("logfile");
|
||||
if (0 == flag)
|
||||
{
|
||||
commands[name] = "log";
|
||||
}
|
||||
else
|
||||
{
|
||||
commands[name] = true;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
++ii;
|
||||
|
||||
#if LL_WINDOWS
|
||||
value.assign(utf16str_to_utf8str((wargv[ii])));
|
||||
#else
|
||||
value.assign(wstring_to_utf8str((wargv[ii])));
|
||||
#endif
|
||||
|
||||
#if LL_WINDOWS
|
||||
//Windows changed command line parsing. Deal with it.
|
||||
S32 slen = value.length() - 1;
|
||||
S32 start = 0;
|
||||
S32 end = slen;
|
||||
if (wargv[ii][start]=='"')start++;
|
||||
if (wargv[ii][end]=='"')end--;
|
||||
if (start!=0 || end!=slen)
|
||||
{
|
||||
value = value.substr (start,end);
|
||||
}
|
||||
#endif
|
||||
|
||||
commands[name] = value;
|
||||
}
|
||||
setOptionData(PRIORITY_COMMAND_LINE, commands);
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLApp::manageLiveFile(LLLiveFile* livefile)
|
||||
{
|
||||
|
|
@ -361,7 +425,7 @@ void LLApp::setupErrorHandling(bool second_instance, EMiniDumpType minidump_type
|
|||
std::wstring wpipe_name;
|
||||
wpipe_name = mCrashReportPipeStr + wstringize(getPid());
|
||||
|
||||
const std::wstring wdump_path(wstringize(mDumpPath));
|
||||
const std::wstring wdump_path(utf8str_to_utf16str(mDumpPath));
|
||||
|
||||
int retries = 30;
|
||||
for (; retries > 0; --retries)
|
||||
|
|
@ -539,12 +603,9 @@ void LLApp::setMiniDumpDir(const std::string &path)
|
|||
|
||||
if(mExceptionHandler == 0) return;
|
||||
#ifdef LL_WINDOWS
|
||||
// <FS:ND> Make sure to pass a proper unicode string to breapad. path is UTF8, not MBCS
|
||||
// wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
|
||||
// mbstowcs(buffer, mDumpPath.c_str(), MAX_MINDUMP_PATH_LENGTH);
|
||||
// mExceptionHandler->set_dump_path(std::wstring(buffer));
|
||||
mExceptionHandler->set_dump_path( utf8str_to_utf16str(mDumpPath) );
|
||||
// </FS:ND>
|
||||
std::wstring buffer(utf8str_to_utf16str(mDumpPath));
|
||||
if (buffer.size() > MAX_MINDUMP_PATH_LENGTH) buffer.resize(MAX_MINDUMP_PATH_LENGTH);
|
||||
mExceptionHandler->set_dump_path(buffer);
|
||||
#elif LL_LINUX
|
||||
//google_breakpad::MinidumpDescriptor desc("/tmp"); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
||||
google_breakpad::MinidumpDescriptor desc(mDumpPath); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
LLSD getOption(const std::string& name) const;
|
||||
|
||||
/**
|
||||
* @brief Parse command line options and insert them into
|
||||
* @brief Parse ASCII command line options and insert them into
|
||||
* application command line options.
|
||||
*
|
||||
* The name inserted into the option will have leading option
|
||||
|
|
@ -119,6 +119,20 @@ public:
|
|||
*/
|
||||
bool parseCommandOptions(int argc, char** argv);
|
||||
|
||||
/**
|
||||
* @brief Parse Unicode command line options and insert them into
|
||||
* application command line options.
|
||||
*
|
||||
* The name inserted into the option will have leading option
|
||||
* identifiers (a minus or double minus) stripped. All options
|
||||
* with values will be stored as a string, while all options
|
||||
* without values will be stored as true.
|
||||
* @param argc The argc passed into main().
|
||||
* @param wargv The wargv passed into main().
|
||||
* @return Returns true if the parse succeeded.
|
||||
*/
|
||||
bool parseCommandOptions(int argc, wchar_t** wargv);
|
||||
|
||||
/**
|
||||
* @brief Keep track of live files automatically.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -317,6 +317,13 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
|
|||
const NameList& after,
|
||||
const NameList& before)
|
||||
{
|
||||
if (!mSignal)
|
||||
{
|
||||
LL_WARNS() << "Can't connect listener" << LL_ENDL;
|
||||
// connect will fail, return dummy
|
||||
return LLBoundListener();
|
||||
}
|
||||
|
||||
float nodePosition = 1.0;
|
||||
|
||||
// if the supplied name is empty we are not interested in the ordering mechanism
|
||||
|
|
|
|||
|
|
@ -193,12 +193,7 @@ namespace LLInitParam
|
|||
{
|
||||
if (!silent)
|
||||
{
|
||||
std::string file_name = p.getCurrentFileName();
|
||||
if(!file_name.empty())
|
||||
{
|
||||
file_name = "in file: " + file_name;
|
||||
}
|
||||
p.parserWarning(llformat("Failed to parse parameter \"%s\" %s", p.getCurrentElementName().c_str(), file_name.c_str()));
|
||||
p.parserWarning(llformat("Failed to parse parameter \"%s\"", p.getCurrentElementName().c_str()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
|
|||
}
|
||||
|
||||
// Open baseline and current target, exit if one is inexistent
|
||||
std::ifstream base_is(baseline.c_str());
|
||||
std::ifstream target_is(target.c_str());
|
||||
llifstream base_is(baseline.c_str());
|
||||
llifstream target_is(target.c_str());
|
||||
if (!base_is.is_open() || !target_is.is_open())
|
||||
{
|
||||
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
|
||||
|
|
@ -151,7 +151,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std
|
|||
target_is.close();
|
||||
|
||||
//output comparision
|
||||
std::ofstream os(output.c_str());
|
||||
llofstream os(output.c_str());
|
||||
|
||||
os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n";
|
||||
for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ;
|
||||
|
|
@ -212,7 +212,7 @@ void LLMetricPerformanceTesterBasic::addMetric(std::string str)
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
|
||||
void LLMetricPerformanceTesterBasic::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
|
||||
{
|
||||
resetCurrentCount() ;
|
||||
|
||||
|
|
@ -254,14 +254,14 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD*
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current)
|
||||
void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current)
|
||||
{
|
||||
*os << llformat(" ,%s, %d, %d, %d, %.4f\n", metric_string.c_str(), v_base, v_current,
|
||||
v_current - v_base, (v_base != 0) ? 100.f * v_current / v_base : 0) ;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMetricPerformanceTesterBasic::compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current)
|
||||
void LLMetricPerformanceTesterBasic::compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current)
|
||||
{
|
||||
*os << llformat(" ,%s, %.4f, %.4f, %.4f, %.4f\n", metric_string.c_str(), v_base, v_current,
|
||||
v_current - v_base, (fabs(v_base) > 0.0001f) ? 100.f * v_current / v_base : 0.f ) ;
|
||||
|
|
@ -293,7 +293,7 @@ LLMetricPerformanceTesterWithSession::~LLMetricPerformanceTesterWithSession()
|
|||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current)
|
||||
void LLMetricPerformanceTesterWithSession::analyzePerformance(llofstream* os, LLSD* base, LLSD* current)
|
||||
{
|
||||
// Load the base session
|
||||
resetCurrentCount() ;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
* By default, compares the test results against the baseline one by one, item by item,
|
||||
* in the increasing order of the LLSD record counter, starting from the first one.
|
||||
*/
|
||||
virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
|
||||
virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
|
||||
|
||||
static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ;
|
||||
|
||||
|
|
@ -93,8 +93,8 @@ protected:
|
|||
* @param[in] v_base - Base value of the metric.
|
||||
* @param[in] v_current - Current value of the metric.
|
||||
*/
|
||||
virtual void compareTestResults(std::ofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
|
||||
virtual void compareTestResults(std::ofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
|
||||
virtual void compareTestResults(llofstream* os, std::string metric_string, S32 v_base, S32 v_current) ;
|
||||
virtual void compareTestResults(llofstream* os, std::string metric_string, F32 v_base, F32 v_current) ;
|
||||
|
||||
/**
|
||||
* @brief Reset internal record count. Count starts with 1.
|
||||
|
|
@ -181,7 +181,7 @@ public:
|
|||
* This will be loading the base and current sessions and compare them using the virtual
|
||||
* abstract methods loadTestSession() and compareTestSessions()
|
||||
*/
|
||||
virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
|
||||
virtual void analyzePerformance(llofstream* os, LLSD* base, LLSD* current) ;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
@ -205,7 +205,7 @@ protected:
|
|||
* @brief Compare the base session and the target session. Assumes base and current sessions have been loaded.
|
||||
* @param[out] os - The comparison result as a standard stream
|
||||
*/
|
||||
virtual void compareTestSessions(std::ofstream* os) = 0;
|
||||
virtual void compareTestSessions(llofstream* os) = 0;
|
||||
|
||||
LLTestSession* mBaseSessionp;
|
||||
LLTestSession* mCurrentSessionp;
|
||||
|
|
|
|||
|
|
@ -37,13 +37,14 @@
|
|||
//
|
||||
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
class LL_COMMON_API LLOSInfo
|
||||
class LL_COMMON_API LLOSInfo : public LLSingleton<LLOSInfo>
|
||||
{
|
||||
LLSINGLETON(LLOSInfo);
|
||||
public:
|
||||
LLOSInfo();
|
||||
void stream(std::ostream& s) const;
|
||||
|
||||
const std::string& getOSString() const;
|
||||
|
|
|
|||
|
|
@ -188,12 +188,22 @@ LLSD LLCrashLock::getProcessList()
|
|||
//static
|
||||
bool LLCrashLock::fileExists(std::string filename)
|
||||
{
|
||||
return boost::filesystem::exists(filename.c_str());
|
||||
#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
|
||||
boost::filesystem::path file_path(utf8str_to_utf16str(filename));
|
||||
#else
|
||||
boost::filesystem::path file_path(filename);
|
||||
#endif
|
||||
return boost::filesystem::exists(file_path);
|
||||
}
|
||||
|
||||
void LLCrashLock::cleanupProcess(std::string proc_dir)
|
||||
{
|
||||
boost::filesystem::remove_all(proc_dir);
|
||||
#ifdef LL_WINDOWS // or BOOST_WINDOWS_API
|
||||
boost::filesystem::path dir_path(utf8str_to_utf16str(proc_dir));
|
||||
#else
|
||||
boost::filesystem::path dir_path(proc_dir);
|
||||
#endif
|
||||
boost::filesystem::remove_all(dir_path);
|
||||
}
|
||||
|
||||
bool LLCrashLock::putProcessList(const LLSD& proc_sd)
|
||||
|
|
|
|||
|
|
@ -172,17 +172,8 @@ std::string getStartupStateFromLog(std::string& sllog)
|
|||
|
||||
bool LLCrashLogger::readFromXML(LLSD& dest, const std::string& filename )
|
||||
{
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
|
||||
// <FS:ND> Properly handle unicode path on Windows. Maybe could use a llifstream instead of ifdef?
|
||||
// std::ifstream log_file(db_file_name.c_str());
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
std::ifstream log_file( utf8str_to_utf16str( db_file_name ).c_str());
|
||||
#else
|
||||
std::ifstream log_file(db_file_name.c_str());
|
||||
#endif
|
||||
|
||||
// </FS:ND>
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
|
||||
llifstream log_file(db_file_name.c_str());
|
||||
|
||||
// Look for it in the given file
|
||||
if (log_file.is_open())
|
||||
|
|
@ -212,7 +203,7 @@ bool LLCrashLogger::readMinidump(std::string minidump_path)
|
|||
{
|
||||
size_t length=0;
|
||||
|
||||
std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
|
||||
llifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
|
||||
if(minidump_stream.is_open())
|
||||
{
|
||||
minidump_stream.seekg(0, std::ios::end);
|
||||
|
|
@ -321,7 +312,7 @@ void LLCrashLogger::gatherFiles()
|
|||
//if (!file.empty())
|
||||
//{
|
||||
// LL_DEBUGS("CRASHREPORT") << "trying to read " << itr->first << ": " << file << LL_ENDL;
|
||||
// std::ifstream f(file.c_str());
|
||||
// llifstream f(file.c_str());
|
||||
// if(f.is_open())
|
||||
// {
|
||||
// std::stringstream s;
|
||||
|
|
@ -377,7 +368,7 @@ void LLCrashLogger::gatherFiles()
|
|||
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
|
||||
{
|
||||
std::string fullname = pathname + *iter;
|
||||
std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
|
||||
llifstream fdat(fullname.c_str(), std::ifstream::binary);
|
||||
if (fdat)
|
||||
{
|
||||
char buf[5];
|
||||
|
|
@ -581,12 +572,7 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
|
|||
|
||||
updateApplication("Sending reports...");
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
std::ofstream out_file( utf8str_to_utf16str(report_file).c_str() );
|
||||
#else
|
||||
std::ofstream out_file(report_file.c_str());
|
||||
#endif
|
||||
|
||||
llofstream out_file(report_file.c_str());
|
||||
LLSDSerialize::toPrettyXML(post_data, out_file);
|
||||
out_file.flush();
|
||||
out_file.close();
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
|
|||
bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
||||
{
|
||||
S32 components = getComponents();
|
||||
if (! ((1 == components) || (3 == components) || (4 == components) ))
|
||||
if (components != 1 && components != 3 && components != 4)
|
||||
{
|
||||
LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
|
||||
return false;
|
||||
|
|
@ -1529,6 +1529,55 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
|||
return true ;
|
||||
}
|
||||
|
||||
LLPointer<LLImageRaw> LLImageRaw::scaled(S32 new_width, S32 new_height)
|
||||
{
|
||||
LLPointer<LLImageRaw> result;
|
||||
|
||||
S32 components = getComponents();
|
||||
if (components != 1 && components != 3 && components != 4)
|
||||
{
|
||||
LL_WARNS() << "Invalid getComponents value (" << components << ")" << LL_ENDL;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (isBufferInvalid())
|
||||
{
|
||||
LL_WARNS() << "Invalid image buffer" << LL_ENDL;
|
||||
return result;
|
||||
}
|
||||
|
||||
S32 old_width = getWidth();
|
||||
S32 old_height = getHeight();
|
||||
|
||||
if ((old_width == new_width) && (old_height == new_height))
|
||||
{
|
||||
result = new LLImageRaw(old_width, old_height, components);
|
||||
if (!result)
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
|
||||
return result;
|
||||
}
|
||||
memcpy(result->getData(), getData(), getDataSize());
|
||||
}
|
||||
else
|
||||
{
|
||||
S32 new_data_size = new_width * new_height * components;
|
||||
|
||||
if (new_data_size > 0)
|
||||
{
|
||||
result = new LLImageRaw(new_width, new_height, components);
|
||||
if (!result)
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate new image" << LL_ENDL;
|
||||
return result;
|
||||
}
|
||||
bilinear_scale(getData(), old_width, old_height, components, old_width*components, result->getData(), new_width, new_height, components, new_width*components);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void LLImageRaw::copyLineScaled( U8* in, U8* out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step )
|
||||
{
|
||||
const S32 components = getComponents();
|
||||
|
|
@ -1802,10 +1851,13 @@ static std::string find_file(std::string &name, S8 *codec)
|
|||
#endif
|
||||
EImageCodec LLImageBase::getCodecFromExtension(const std::string& exten)
|
||||
{
|
||||
for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++)
|
||||
if (!exten.empty())
|
||||
{
|
||||
if (exten == file_extensions[i].exten)
|
||||
return file_extensions[i].codec;
|
||||
for (int i = 0; i < (int)(NUM_FILE_EXTENSIONS); i++)
|
||||
{
|
||||
if (exten == file_extensions[i].exten)
|
||||
return file_extensions[i].codec;
|
||||
}
|
||||
}
|
||||
return IMG_CODEC_INVALID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,7 +222,8 @@ public:
|
|||
void expandToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
|
||||
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, bool scale_image = true);
|
||||
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
|
||||
bool scale( S32 new_width, S32 new_height, bool scale_image = true );
|
||||
bool scale(S32 new_width, S32 new_height, bool scale_image = true);
|
||||
LLPointer<LLImageRaw> scaled(S32 new_width, S32 new_height);
|
||||
|
||||
// Fill the buffer with a constant color
|
||||
void fill( const LLColor4U& color );
|
||||
|
|
|
|||
|
|
@ -5381,19 +5381,31 @@ void LLVolumeFace::cacheOptimize()
|
|||
S32 num_verts = mNumVertices;
|
||||
S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF;
|
||||
LLVector4a* pos = (LLVector4a*) ll_aligned_malloc<64>(sizeof(LLVector4a)*2*num_verts+size);
|
||||
if (pos == NULL)
|
||||
{
|
||||
LL_ERRS("LLVOLUME") << "Allocation of positions vector[" << sizeof(LLVector4a) * 2 * num_verts + size << "] failed. " << LL_ENDL;
|
||||
}
|
||||
LLVector4a* norm = pos + num_verts;
|
||||
LLVector2* tc = (LLVector2*) (norm + num_verts);
|
||||
|
||||
LLVector4a* wght = NULL;
|
||||
if (mWeights)
|
||||
{
|
||||
wght = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
|
||||
wght = (LLVector4a*)ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
|
||||
if (wght == NULL)
|
||||
{
|
||||
LL_ERRS("LLVOLUME") << "Allocation of weights[" << sizeof(LLVector4a) * num_verts << "] failed" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
LLVector4a* binorm = NULL;
|
||||
if (mTangents)
|
||||
{
|
||||
binorm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
|
||||
if (binorm == NULL)
|
||||
{
|
||||
LL_ERRS("LLVOLUME") << "Allocation of binormals[" << sizeof(LLVector4a)*num_verts << "] failed" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
//allocate mapping of old indices to new indices
|
||||
|
|
|
|||
|
|
@ -22,10 +22,9 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
#include "../llmath.h"
|
||||
#include "ndoctreelog.h"
|
||||
|
||||
#include "llfile.h"
|
||||
|
||||
namespace nd
|
||||
{
|
||||
|
|
@ -34,7 +33,7 @@ namespace nd
|
|||
namespace debug
|
||||
{
|
||||
U32 gOctreeDebug;
|
||||
std::ofstream *pLogStream;
|
||||
llofstream *pLogStream;
|
||||
std::string mOctreeLogFilename;
|
||||
|
||||
void setOctreeLogFilename( std::string const &aFilename )
|
||||
|
|
@ -55,7 +54,7 @@ namespace nd
|
|||
{
|
||||
if( !pLogStream && mOctreeLogFilename.size() )
|
||||
{
|
||||
pLogStream = new std::ofstream();
|
||||
pLogStream = new llofstream();
|
||||
pLogStream->open( mOctreeLogFilename.c_str(), std::ios::out );
|
||||
if( pLogStream->is_open() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
|
|||
static const std::string HEADLESS_RENDERER_STRING("Headless");
|
||||
static const std::string HEADLESS_VERSION_STRING("1.0");
|
||||
|
||||
std::ofstream gFailLog;
|
||||
llofstream gFailLog;
|
||||
|
||||
#if GL_ARB_debug_output
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
extern BOOL gDebugGL;
|
||||
extern BOOL gDebugSession;
|
||||
extern std::ofstream gFailLog;
|
||||
extern llofstream gFailLog;
|
||||
|
||||
#define LL_GL_ERRS LL_ERRS("RenderState")
|
||||
|
||||
|
|
|
|||
|
|
@ -28,22 +28,6 @@
|
|||
#include "llfontgl.h" // just for StyleFlags enum
|
||||
#include "llfolderview.h"
|
||||
|
||||
// <FS:ND> Reintegrate search by uuid/creator/descripting from Zi Ree after CHUI Merge
|
||||
// Interface to query extended object attributes,
|
||||
class FSFolderViewModelItem
|
||||
{
|
||||
public:
|
||||
virtual std::string getSearchableCreator( void ) const
|
||||
{ return ""; }
|
||||
virtual std::string getSearchableDescription( void ) const
|
||||
{ return ""; }
|
||||
virtual std::string getSearchableUUID( void ) const
|
||||
{ return ""; }
|
||||
virtual std::string getSearchableAll( void ) const
|
||||
{ return ""; }
|
||||
};
|
||||
// </FS:ND>
|
||||
|
||||
// These are grouping of inventory types.
|
||||
// Order matters when sorting system folders to the top.
|
||||
enum EInventorySortGroup
|
||||
|
|
@ -149,7 +133,7 @@ public:
|
|||
|
||||
// This is an abstract base class that users of the folderview classes
|
||||
// would use to bridge the folder view with the underlying data
|
||||
class LLFolderViewModelItem : public LLRefCount, public LLTrace::MemTrackable<LLFolderViewModelItem>, public FSFolderViewModelItem
|
||||
class LLFolderViewModelItem : public LLRefCount, public LLTrace::MemTrackable<LLFolderViewModelItem>
|
||||
{
|
||||
public:
|
||||
LLFolderViewModelItem()
|
||||
|
|
@ -163,6 +147,11 @@ public:
|
|||
virtual const std::string& getDisplayName() const = 0;
|
||||
virtual const std::string& getSearchableName() const = 0;
|
||||
|
||||
virtual std::string getSearchableDescription() const = 0;
|
||||
virtual std::string getSearchableCreatorName()const = 0;
|
||||
virtual std::string getSearchableUUIDString() const = 0;
|
||||
virtual std::string getSearchableAll() const = 0; // <FS:Ansariel> Zi's extended inventory search
|
||||
|
||||
virtual LLPointer<LLUIImage> getIcon() const = 0;
|
||||
virtual LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
|
||||
virtual LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ LLScrollContainer::Params::Params()
|
|||
hide_scrollbar("hide_scrollbar"),
|
||||
min_auto_scroll_rate("min_auto_scroll_rate", 100),
|
||||
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
|
||||
max_auto_scroll_zone("max_auto_scroll_zone", 16),
|
||||
reserve_scroll_corner("reserve_scroll_corner", false),
|
||||
size("size", -1)
|
||||
{}
|
||||
|
|
@ -88,6 +89,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
|
|||
mReserveScrollCorner(p.reserve_scroll_corner),
|
||||
mMinAutoScrollRate(p.min_auto_scroll_rate),
|
||||
mMaxAutoScrollRate(p.max_auto_scroll_rate),
|
||||
mMaxAutoScrollZone(p.max_auto_scroll_zone),
|
||||
mScrolledView(NULL),
|
||||
mSize(p.size)
|
||||
{
|
||||
|
|
@ -290,7 +292,21 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
|
||||
{
|
||||
if (mAutoScrolling)
|
||||
{
|
||||
return true; // already scrolling
|
||||
}
|
||||
return autoScroll(x, y, false);
|
||||
}
|
||||
|
||||
bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
||||
{
|
||||
return autoScroll(x, y, true);
|
||||
}
|
||||
|
||||
bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
|
||||
{
|
||||
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
|
||||
S32 scrollbar_size = (mSize == -1 ? scrollbar_size_control : mSize);
|
||||
|
|
@ -302,6 +318,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
|
||||
|
||||
LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
|
||||
// Note: Will also include scrollers as scroll zones, so opposite
|
||||
// scroll zones might have different size due to visible scrollers
|
||||
if( mScrollbar[HORIZONTAL]->getVisible() )
|
||||
{
|
||||
inner_rect_local.mBottom += scrollbar_size;
|
||||
|
|
@ -316,8 +334,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
|
||||
S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
|
||||
// autoscroll region should take up no more than one third of visible scroller area
|
||||
S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10);
|
||||
S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10);
|
||||
S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, (S32)mMaxAutoScrollZone);
|
||||
S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, (S32)mMaxAutoScrollZone);
|
||||
|
||||
if( mScrollbar[HORIZONTAL]->getVisible() )
|
||||
{
|
||||
|
|
@ -325,8 +343,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
left_scroll_rect.mRight = inner_rect_local.mLeft + auto_scroll_region_width;
|
||||
if( left_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() > 0) )
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed );
|
||||
mAutoScrolling = TRUE;
|
||||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
||||
|
|
@ -334,8 +355,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
right_scroll_rect.mLeft = inner_rect_local.mRight - auto_scroll_region_width;
|
||||
if( right_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() < mScrollbar[HORIZONTAL]->getDocPosMax()) )
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed );
|
||||
mAutoScrolling = TRUE;
|
||||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -345,8 +369,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
bottom_scroll_rect.mTop = inner_rect_local.mBottom + auto_scroll_region_height;
|
||||
if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() < mScrollbar[VERTICAL]->getDocPosMax()) )
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed );
|
||||
mAutoScrolling = TRUE;
|
||||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
|
||||
|
|
@ -354,8 +381,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
|
|||
top_scroll_rect.mBottom = inner_rect_local.mTop - auto_scroll_region_height;
|
||||
if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() > 0) )
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed );
|
||||
mAutoScrolling = TRUE;
|
||||
if (do_scroll)
|
||||
{
|
||||
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
|
||||
mAutoScrolling = TRUE;
|
||||
}
|
||||
scrolling = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public:
|
|||
hide_scrollbar;
|
||||
Optional<F32> min_auto_scroll_rate,
|
||||
max_auto_scroll_rate;
|
||||
Optional<U32> max_auto_scroll_zone;
|
||||
Optional<LLUIColor> bg_color;
|
||||
Optional<LLScrollbar::callback_t> scroll_callback;
|
||||
Optional<S32> size;
|
||||
|
|
@ -117,7 +118,8 @@ public:
|
|||
|
||||
virtual void draw();
|
||||
virtual bool addChild(LLView* view, S32 tab_group = 0);
|
||||
|
||||
|
||||
bool canAutoScroll(S32 x, S32 y);
|
||||
bool autoScroll(S32 x, S32 y);
|
||||
|
||||
S32 getSize() const { return mSize; }
|
||||
|
|
@ -131,6 +133,7 @@ private:
|
|||
virtual void scrollHorizontal( S32 new_pos );
|
||||
virtual void scrollVertical( S32 new_pos );
|
||||
void updateScroll();
|
||||
bool autoScroll(S32 x, S32 y, bool do_scroll);
|
||||
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
|
||||
|
||||
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
|
||||
|
|
@ -144,6 +147,7 @@ private:
|
|||
F32 mAutoScrollRate;
|
||||
F32 mMinAutoScrollRate;
|
||||
F32 mMaxAutoScrollRate;
|
||||
U32 mMaxAutoScrollZone;
|
||||
bool mHideScrollbar;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -58,10 +58,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
|
|||
|
||||
const char* NO_VALUE_MARKER = "no_value";
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
const S32 LINE_NUMBER_HERE = 0;
|
||||
#endif
|
||||
|
||||
struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
|
||||
{
|
||||
static void declareValues()
|
||||
|
|
@ -1313,22 +1309,14 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
|
|||
|
||||
void LLXUIParser::parserWarning(const std::string& message)
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
// use Visual Studio friendly formatting of output message for easy access to originating xml
|
||||
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
|
||||
#else
|
||||
Parser::parserWarning(message);
|
||||
#endif
|
||||
std::string warning_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
|
||||
Parser::parserWarning(warning_msg);
|
||||
}
|
||||
|
||||
void LLXUIParser::parserError(const std::string& message)
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
// use Visual Studio friendly formatting of output message for easy access to originating xml
|
||||
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
|
||||
#else
|
||||
Parser::parserError(message);
|
||||
#endif
|
||||
std::string error_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
|
||||
Parser::parserError(error_msg);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1641,22 +1629,14 @@ bool LLSimpleXUIParser::processText()
|
|||
|
||||
void LLSimpleXUIParser::parserWarning(const std::string& message)
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
// use Visual Studio friendly formatting of output message for easy access to originating xml
|
||||
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
|
||||
#else
|
||||
Parser::parserWarning(message);
|
||||
#endif
|
||||
std::string warning_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
|
||||
Parser::parserWarning(warning_msg);
|
||||
}
|
||||
|
||||
void LLSimpleXUIParser::parserError(const std::string& message)
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
// use Visual Studio friendly formatting of output message for easy access to originating xml
|
||||
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
|
||||
#else
|
||||
Parser::parserError(message);
|
||||
#endif
|
||||
std::string error_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
|
||||
Parser::parserError(error_msg);
|
||||
}
|
||||
|
||||
bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
5.0.8
|
||||
5.0.9
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@
|
|||
<string>CameraFocalLength</string>
|
||||
<string>CameraFocusTransitionTime</string>
|
||||
<string>CameraFNumber</string>
|
||||
<string>FramePerSecondLimit</string>
|
||||
<string>FSLimitFramerate</string>
|
||||
<string>FSRenderDoFUnderwater</string>
|
||||
<string>FSRenderVignette</string>
|
||||
<string>FSSimpleAvatarShadows</string>
|
||||
<string>FullScreen</string>
|
||||
<string>MaxFPS</string>
|
||||
<string>RenderAnisotropic</string>
|
||||
<string>RenderAttachedLights</string>
|
||||
<string>RenderAttachedParticles</string>
|
||||
|
|
|
|||
|
|
@ -2305,6 +2305,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FramePerSecondLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Controls upper limit of frames per second</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>120</integer>
|
||||
</map>
|
||||
<key>BackgroundYieldTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -6585,11 +6596,11 @@
|
|||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&sid=[SESSION_ID]</string>
|
||||
<string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&sid=[SESSION_ID]</string>
|
||||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
<!-- LL, possibly privacy leaking search string
|
||||
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD]</string>
|
||||
<string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD]</string>
|
||||
-->
|
||||
</map>
|
||||
<key>HighResSnapshot</key>
|
||||
|
|
@ -14514,7 +14525,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>SyncMaterialSettings</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>SyncMaterialSettings - DO NOT USE AND KEEP IT SET TO 0: Use FSSyncronizeTextureMaps instead!</string>
|
||||
<string>SyncMaterialSettings</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -17781,17 +17792,6 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MaxFPS</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Yield some time to the local host if we reach a threshold framerate.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>60.0</real>
|
||||
</map>
|
||||
<key>ForcePeriodicRenderingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -22783,7 +22783,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>FSSyncronizeTextureMaps</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Align texture maps (texture, bumpy, shiny) across the faces of a prim</string>
|
||||
<string>Deprecated - Leave this at ZERO and use SyncMaterialSettings instead. </string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -23250,7 +23250,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>FSLimitFramerate</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable framerate limitation defined by MaxFPS</string>
|
||||
<string>Enable framerate limitation defined by FramePerSecondLimit</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -377,22 +377,22 @@
|
|||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>MaxFPS</key>
|
||||
<key>FramePerSecondLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Yield some time to the local host if we reach a threshold framerate.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>45.0</real>
|
||||
<real>45</real>
|
||||
</map>
|
||||
|
||||
<key>FSLimitFramerate</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable framerate limitation defined by MaxFPS</string>
|
||||
<string>Enable framerate limitation defined by FramePerSecondLimit</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -199,8 +199,10 @@ void main()
|
|||
|
||||
// <FS> Fix weird water glow on edge of land due to broken alpha value
|
||||
//frag_data[0] = vec4(color.rgb, color); // diffuse
|
||||
//frag_data[1] = vec4(0); // speccolor, spec
|
||||
//frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), 0.05, 0);// normalxy, 0, 0
|
||||
frag_data[0] = vec4(color.rgb, color.a); // diffuse
|
||||
frag_data[1] = vec4(0.5, 0.5, 0.5, 0.75); // speccolor, spec
|
||||
frag_data[2] = vec4(encode_normal(screenspacewavef.xyz), 0.05, 0);// normalxy, 0, 0
|
||||
// </FS>
|
||||
frag_data[1] = vec4(0); // speccolor, spec
|
||||
frag_data[2] = vec4(encode_normal(screenspacewavef.xyz*0.5+0.5), 0.05, 0);// normalxy, 0, 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ void FSPanelLogin::loadLoginPage()
|
|||
params["grid"] = LLGridManager::getInstance()->getGridId();
|
||||
|
||||
// add OS info
|
||||
params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
params["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// sourceid
|
||||
params["sourceid"] = gSavedSettings.getString("sourceid");
|
||||
|
|
|
|||
|
|
@ -360,11 +360,6 @@ CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
|
|||
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
|
||||
'"$INSTDIR\uninst.exe"' ''
|
||||
|
||||
# Create *.bat file to specify lang params on first run from installer - see MAINT-5259
|
||||
FileOpen $9 "$INSTDIR\autorun.bat" w
|
||||
FileWrite $9 'start "$INSTDIR\$INSTEXE" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n'
|
||||
FileClose $9
|
||||
|
||||
# Write registry
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\The Phoenix Firestorm Project\$INSTPROG" "" "$INSTDIR"
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\The Phoenix Firestorm Project\$INSTPROG" "Version" "${VERSION_LONG}"
|
||||
|
|
@ -796,7 +791,7 @@ label_ask_launch:
|
|||
|
||||
label_launch:
|
||||
# Assumes SetOutPath $INSTDIR
|
||||
Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"'
|
||||
Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTSHORTCUT.lnk"'
|
||||
label_no_launch:
|
||||
Pop $R0
|
||||
# </FS:PP>
|
||||
|
|
|
|||
|
|
@ -1383,6 +1383,8 @@ static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t
|
|||
|
||||
//=========================================================================
|
||||
|
||||
const std::string LLAppearanceMgr::sExpectedTextureName = "OutfitPreview";
|
||||
|
||||
const LLUUID LLAppearanceMgr::getCOF() const
|
||||
{
|
||||
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
|
||||
|
|
@ -3648,9 +3650,26 @@ void update_base_outfit_after_ordering()
|
|||
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
|
||||
{
|
||||
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
|
||||
if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
if (linked_item != NULL)
|
||||
{
|
||||
app_mgr.setOutfitImage(linked_item->getLinkedUUID());
|
||||
if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
{
|
||||
app_mgr.setOutfitImage(linked_item->getLinkedUUID());
|
||||
if (linked_item->getName() == LLAppearanceMgr::sExpectedTextureName)
|
||||
{
|
||||
// Images with "appropriate" name take priority
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
{
|
||||
app_mgr.setOutfitImage(outfit_item->getUUID());
|
||||
if (outfit_item->getName() == LLAppearanceMgr::sExpectedTextureName)
|
||||
{
|
||||
// Images with "appropriate" name take priority
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,9 @@ public:
|
|||
BOOL getIsInCOF(const LLUUID& obj_id) const;
|
||||
// Is this in the COF and can the user delete it from the COF?
|
||||
BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
|
||||
|
||||
// Outfits will prioritize textures with such name to use for preview in gallery
|
||||
static const std::string sExpectedTextureName;
|
||||
};
|
||||
|
||||
class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
|
||||
|
|
|
|||
|
|
@ -353,8 +353,6 @@ F32SecondsImplicit gFrameIntervalSeconds = 0.f;
|
|||
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
|
||||
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
|
||||
U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
|
||||
U32 gFrameStalls = 0;
|
||||
const F64 FRAME_STALL_THRESHOLD = 1.0;
|
||||
|
||||
LLTimer gRenderStartTime;
|
||||
LLFrameTimer gForegroundTime;
|
||||
|
|
@ -717,7 +715,7 @@ public:
|
|||
|
||||
void run()
|
||||
{
|
||||
std::ofstream os(mFile.c_str());
|
||||
llofstream os(mFile.c_str());
|
||||
|
||||
while (!LLAppViewer::instance()->isQuitting())
|
||||
{
|
||||
|
|
@ -783,6 +781,7 @@ LLAppViewer::LLAppViewer()
|
|||
mUpdater(new LLUpdaterService()),
|
||||
mSettingsLocationList(NULL),
|
||||
mIsFirstRun(false),
|
||||
mMinMicroSecPerFrame(0.f),
|
||||
mSaveSettingsOnExit(true), // <FS:Zi> Backup Settings
|
||||
mPurgeTextures(false) // <FS:Ansariel> FIRE-13066
|
||||
{
|
||||
|
|
@ -823,7 +822,7 @@ LLAppViewer::LLAppViewer()
|
|||
//
|
||||
|
||||
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
|
||||
LLLoginInstance::instance().setPlatformInfo(gPlatform, LLOSInfo::instance().getOSVersionString(), LLOSInfo::instance().getOSStringSimple());
|
||||
}
|
||||
|
||||
LLAppViewer::~LLAppViewer()
|
||||
|
|
@ -1168,7 +1167,6 @@ bool LLAppViewer::init()
|
|||
// Early out from user choice.
|
||||
return false;
|
||||
}
|
||||
|
||||
LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ;
|
||||
|
||||
// Prepare for out-of-memory situations, during which we will crash on
|
||||
|
|
@ -1453,6 +1451,9 @@ bool LLAppViewer::init()
|
|||
joystick->setNeedsReset(true);
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
gSavedSettings.getControl("FramePerSecondLimit")->getSignal()->connect(boost::bind(&LLAppViewer::onChangeFrameLimit, this, _2));
|
||||
onChangeFrameLimit(gSavedSettings.getLLSD("FramePerSecondLimit"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1549,13 +1550,9 @@ bool LLAppViewer::frame()
|
|||
LLSD newFrame;
|
||||
|
||||
// <FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
//LLTimer frameTimer,idleTimer;
|
||||
LLTimer frameTimer,idleTimer,periodicRenderingTimer;
|
||||
// </FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
LLTimer debugTime;
|
||||
|
||||
// <FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
LLTimer periodicRenderingTimer;
|
||||
BOOL restore_rendering_masks = FALSE;
|
||||
// </FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
|
||||
//LLPrivateMemoryPoolTester::getInstance()->run(false) ;
|
||||
//LLPrivateMemoryPoolTester::getInstance()->run(true) ;
|
||||
|
|
@ -1624,14 +1621,6 @@ bool LLAppViewer::frame()
|
|||
gViewerWindow->getWindow()->gatherInput();
|
||||
}
|
||||
|
||||
#if 1 && !LL_RELEASE_FOR_DOWNLOAD
|
||||
// once per second debug info
|
||||
if (debugTime.getElapsedTimeF32() > 1.f)
|
||||
{
|
||||
debugTime.reset();
|
||||
}
|
||||
|
||||
#endif
|
||||
//memory leaking simulation
|
||||
LLFloaterMemLeak* mem_leak_instance =
|
||||
LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking");
|
||||
|
|
@ -1693,14 +1682,35 @@ bool LLAppViewer::frame()
|
|||
{
|
||||
pingMainloopTimeout("Main:Display");
|
||||
gGLActive = TRUE;
|
||||
|
||||
static U64 last_call = 0;
|
||||
// <FS:Ansariel> MaxFPS improvement
|
||||
//if (!gTeleportDisplay)
|
||||
static LLCachedControl<bool> fsLimitFramerate(gSavedSettings, "FSLimitFramerate");
|
||||
if (fsLimitFramerate && !gTeleportDisplay)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// Frame/draw throttling
|
||||
U64 elapsed_time = LLTimer::getTotalTime() - last_call;
|
||||
if (elapsed_time < mMinMicroSecPerFrame)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SLEEP);
|
||||
// llclamp for when time function gets funky
|
||||
U64 sleep_time = llclamp(mMinMicroSecPerFrame - elapsed_time, (U64)1, (U64)1e6);
|
||||
micro_sleep(sleep_time, 0);
|
||||
}
|
||||
}
|
||||
last_call = LLTimer::getTotalTime();
|
||||
|
||||
display();
|
||||
|
||||
pingMainloopTimeout("Main:Snapshot");
|
||||
LLFloaterSnapshot::update(); // take snapshots
|
||||
LLFloaterOutfitSnapshot::update();
|
||||
gGLActive = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pingMainloopTimeout("Main:Sleep");
|
||||
|
||||
pauseMainloopTimeout();
|
||||
|
|
@ -1730,7 +1740,8 @@ bool LLAppViewer::frame()
|
|||
|| !gFocusMgr.getAppHasFocus())
|
||||
{
|
||||
// Sleep if we're not rendering, or the window is minimized.
|
||||
S32 milliseconds_to_sleep = llclamp(gSavedSettings.getS32("BackgroundYieldTime"), 0, 1000);
|
||||
static LLCachedControl<S32> s_bacground_yeild_time(gSavedSettings, "BackgroundYieldTime", 40);
|
||||
S32 milliseconds_to_sleep = llclamp((S32)s_bacground_yeild_time, 0, 1000);
|
||||
// don't sleep when BackgroundYieldTime set to 0, since this will still yield to other threads
|
||||
// of equal priority on Windows
|
||||
if (milliseconds_to_sleep > 0)
|
||||
|
|
@ -1754,7 +1765,6 @@ bool LLAppViewer::frame()
|
|||
ms_sleep(500);
|
||||
}
|
||||
|
||||
idleTimer.reset();
|
||||
S32 total_work_pending = 0;
|
||||
S32 total_io_pending = 0;
|
||||
{
|
||||
|
|
@ -1762,7 +1772,7 @@ bool LLAppViewer::frame()
|
|||
S32 io_pending = 0;
|
||||
F32 max_time = llmin(gFrameIntervalSeconds.value() *10.f, 1.f);
|
||||
|
||||
work_pending += updateTextureThreads(max_time / 3.f); // <FS:Ansariel> 3 Threads in there that should share this amount of time, right?
|
||||
work_pending += updateTextureThreads(max_time);
|
||||
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_VFS);
|
||||
|
|
@ -1807,40 +1817,6 @@ bool LLAppViewer::frame()
|
|||
}
|
||||
}
|
||||
|
||||
if ((LLStartUp::getStartupState() >= STATE_CLEANUP) &&
|
||||
(frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD))
|
||||
{
|
||||
gFrameStalls++;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
// Limit FPS
|
||||
//F32 max_fps = gSavedSettings.getF32("MaxFPS");
|
||||
static LLCachedControl<F32> max_fps(gSavedSettings, "MaxFPS");
|
||||
// Only limit FPS when we are actually rendering something. Otherwise
|
||||
// logins, logouts and teleports take much longer to complete.
|
||||
// <FS:Ansariel> FIRE-11804: Expose MaxFPS
|
||||
//if (max_fps > F_APPROXIMATELY_ZERO &&
|
||||
static LLCachedControl<bool> fsLimitFramerate(gSavedSettings, "FSLimitFramerate");
|
||||
if (fsLimitFramerate && max_fps > F_APPROXIMATELY_ZERO &&
|
||||
// </FS:Ansariel>
|
||||
LLStartUp::getStartupState() == STATE_STARTED &&
|
||||
!gTeleportDisplay &&
|
||||
!logoutRequestSent())
|
||||
{
|
||||
// Sleep a while to limit frame rate.
|
||||
F32 min_frame_time = 1.f / max_fps;
|
||||
S32 milliseconds_to_sleep = llclamp((S32)((min_frame_time - frameTimer.getElapsedTimeF64()) * 1000.f), 0, 1000);
|
||||
if (milliseconds_to_sleep > 0)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_YIELD);
|
||||
ms_sleep(milliseconds_to_sleep);
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel> MaxFPS Viewer-Chui merge error
|
||||
|
||||
frameTimer.reset();
|
||||
|
||||
resumeMainloopTimeout();
|
||||
|
||||
pingMainloopTimeout("Main:End");
|
||||
|
|
@ -3694,7 +3670,7 @@ void LLAppViewer::initUpdater()
|
|||
mUpdater->initialize(channel,
|
||||
version,
|
||||
gPlatform,
|
||||
getOSInfo().getOSVersionString(),
|
||||
LLOSInfo::instance().getOSVersionString(),
|
||||
unique_id,
|
||||
willing_to_test
|
||||
);
|
||||
|
|
@ -3791,10 +3767,13 @@ bool LLAppViewer::initWindow()
|
|||
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
//Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
|
||||
if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7)
|
||||
if ( getOSInfo().mMinorVer == 6 && getOSInfo().mBuild < 8 )
|
||||
gViewerWindow->getWindow()->setOldResize(true);
|
||||
//Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
|
||||
LLOSInfo& os_info = LLOSInfo::instance();
|
||||
if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7)
|
||||
{
|
||||
if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 )
|
||||
gViewerWindow->getWindow()->setOldResize(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gSavedSettings.getBOOL("WindowMaximized"))
|
||||
|
|
@ -4008,7 +3987,7 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
info["CPU"] = gSysCPU.getCPUString();
|
||||
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());
|
||||
// Moved hack adjustment to Windows memory size into llsys.cpp
|
||||
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
|
||||
info["OS_VERSION"] = LLOSInfo::instance().getOSString();
|
||||
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
|
||||
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
|
||||
|
||||
|
|
@ -4058,7 +4037,7 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
|
||||
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
|
||||
bool want_fullname = true;
|
||||
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
|
||||
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : "Undefined";
|
||||
if(LLVoiceClient::getInstance()->voiceEnabled())
|
||||
{
|
||||
LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion();
|
||||
|
|
@ -4267,6 +4246,70 @@ std::string LLAppViewer::getViewerInfoString() const
|
|||
return support.str();
|
||||
}
|
||||
|
||||
std::string LLAppViewer::getShortViewerInfoString() const
|
||||
{
|
||||
std::ostringstream support;
|
||||
LLSD info(getViewerInfo());
|
||||
|
||||
support << LLTrans::getString("APP_NAME") << " " << info["VIEWER_VERSION_STR"].asString();
|
||||
support << " (" << info["CHANNEL"].asString() << ")";
|
||||
if (info.has("BUILD_CONFIG"))
|
||||
{
|
||||
support << "\n" << "Build Configuration " << info["BUILD_CONFIG"].asString();
|
||||
}
|
||||
if (info.has("REGION"))
|
||||
{
|
||||
support << "\n\n" << "You are at " << ll_vector3_from_sd(info["POSITION_LOCAL"]) << " in " << info["REGION"].asString();
|
||||
support << " located at " << info["HOSTNAME"].asString() << " (" << info["HOSTIP"].asString() << ")";
|
||||
support << "\n" << "SLURL: " << info["SLURL"].asString();
|
||||
support << "\n" << "(Global coordinates " << ll_vector3_from_sd(info["POSITION"]) << ")";
|
||||
support << "\n" << info["SERVER_VERSION"].asString();
|
||||
}
|
||||
|
||||
support << "\n\n" << "CPU: " << info["CPU"].asString();
|
||||
support << "\n" << "Memory: " << info["MEMORY_MB"].asString() << " MB";
|
||||
support << "\n" << "OS: " << info["OS_VERSION"].asString();
|
||||
support << "\n" << "Graphics Card: " << info["GRAPHICS_CARD"].asString() << " (" << info["GRAPHICS_CARD_VENDOR"].asString() << ")";
|
||||
|
||||
if (info.has("GRAPHICS_DRIVER_VERSION"))
|
||||
{
|
||||
support << "\n" << "Windows Graphics Driver Version: " << info["GRAPHICS_DRIVER_VERSION"].asString();
|
||||
}
|
||||
|
||||
support << "\n" << "OpenGL Version: " << info["OPENGL_VERSION"].asString();
|
||||
|
||||
support << "\n\n" << "Window size:" << info["WINDOW_WIDTH"].asString() << "x" << info["WINDOW_HEIGHT"].asString();
|
||||
support << "\n" << "Language: " << LLUI::getLanguage();
|
||||
support << "\n" << "Font Size Adjustment: " << info["FONT_SIZE_ADJUSTMENT"].asString() << "pt";
|
||||
support << "\n" << "UI Scaling: " << info["UI_SCALE"].asString();
|
||||
support << "\n" << "Draw distance: " << info["DRAW_DISTANCE"].asString();
|
||||
support << "\n" << "Bandwidth: " << info["NET_BANDWITH"].asString() << "kbit/s";
|
||||
support << "\n" << "LOD factor: " << info["LOD_FACTOR"].asString();
|
||||
support << "\n" << "Render quality: " << info["RENDER_QUALITY"].asString() << " / 7";
|
||||
support << "\n" << "ALM: " << info["GPU_SHADERS"].asString();
|
||||
support << "\n" << "Texture memory: " << info["TEXTURE_MEMORY"].asString() << "MB";
|
||||
support << "\n" << "VFS (cache) creation time: " << info["VFS_TIME"].asString();
|
||||
|
||||
support << "\n\n" << "J2C Decoder: " << info["J2C_VERSION"].asString();
|
||||
support << "\n" << "Audio Driver: " << info["AUDIO_DRIVER_VERSION"].asString();
|
||||
support << "\n" << "LLCEFLib/CEF: " << info["LLCEFLIB_VERSION"].asString();
|
||||
support << "\n" << "LibVLC: " << info["LIBVLC_VERSION"].asString();
|
||||
support << "\n" << "Voice Server: " << info["VOICE_VERSION"].asString();
|
||||
|
||||
if (info.has("PACKETS_IN"))
|
||||
{
|
||||
support << "\n" << "Packets Lost: " << info["PACKETS_LOST"].asInteger() << "/" << info["PACKETS_IN"].asInteger();
|
||||
F32 packets_pct = info["PACKETS_PCT"].asReal();
|
||||
support << " (" << ll_round(packets_pct, 0.001f) << "%)";
|
||||
}
|
||||
|
||||
LLSD substitution;
|
||||
substitution["datetime"] = (S32)time(NULL);
|
||||
support << "\n" << LLTrans::getString("AboutTime", substitution);
|
||||
|
||||
return support.str();
|
||||
}
|
||||
|
||||
void LLAppViewer::cleanupSavedSettings()
|
||||
{
|
||||
gSavedSettings.setBOOL("MouseSun", FALSE);
|
||||
|
|
@ -4364,7 +4407,7 @@ void LLAppViewer::writeSystemInfo()
|
|||
|
||||
gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value());
|
||||
gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits<LLUnits::Kilobytes>());
|
||||
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
|
||||
gDebugInfo["OSInfo"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// The user is not logged on yet, but record the current grid choice login url
|
||||
// which may have been the intended grid.
|
||||
|
|
@ -4406,8 +4449,8 @@ void LLAppViewer::writeSystemInfo()
|
|||
// query some system information
|
||||
LL_INFOS("SystemInfo") << "CPU info:\n" << gSysCPU << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS: " << LLOSInfo::instance().getOSStringSimple() << LL_ENDL;
|
||||
LL_INFOS("SystemInfo") << "OS info: " << LLOSInfo::instance() << LL_ENDL;
|
||||
|
||||
// <FS:ND> Breakpad merge. Only include SettingsFile if the user selected this in prefs. Path from Catznip
|
||||
// gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
|
||||
|
|
@ -4444,7 +4487,7 @@ void getFileList()
|
|||
if ( ( iter->length() > 30 ) && (iter->rfind(".dmp") == (iter->length()-4) ) )
|
||||
{
|
||||
std::string fullname = pathname + *iter;
|
||||
std::ifstream fdat( fullname.c_str(), std::ifstream::binary);
|
||||
llifstream fdat( fullname.c_str(), std::ifstream::binary);
|
||||
if (fdat)
|
||||
{
|
||||
char buf[5];
|
||||
|
|
@ -5161,6 +5204,7 @@ bool LLAppViewer::initCache()
|
|||
if (gSavedSettings.getBOOL("PurgeCacheOnStartup") ||
|
||||
gSavedSettings.getBOOL("PurgeCacheOnNextStartup"))
|
||||
{
|
||||
LL_INFOS("AppCache") << "Startup cache purge requested: " << (gSavedSettings.getBOOL("PurgeCacheOnStartup") ? "ALWAYS" : "ONCE") << LL_ENDL;
|
||||
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false);
|
||||
LL_INFOS("AppCache") << "Scheduling texture purge, based on PurgeCache* settings." << LL_ENDL;
|
||||
mPurgeCache = true;
|
||||
|
|
@ -5188,7 +5232,7 @@ bool LLAppViewer::initCache()
|
|||
if (new_cache_location != cache_location)
|
||||
{
|
||||
// AO: Don't automatically purge old cache location, has unwanted side effects with shared caches, upgrades
|
||||
//LL_WARNS() << new_cache_location << " is not the same as " << cache_location << ". PURGING." << LL_ENDL;
|
||||
//LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
|
||||
//gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
|
||||
//purgeCache(); // purge old cache
|
||||
gSavedSettings.setString("CacheLocation", new_cache_location);
|
||||
|
|
@ -5247,23 +5291,15 @@ bool LLAppViewer::initCache()
|
|||
// Init the texture cache
|
||||
// Allocate 80% of the cache size for textures
|
||||
const S32 MB = 1024 * 1024;
|
||||
const S64 MIN_CACHE_SIZE = 64 * MB;
|
||||
const S64 MIN_CACHE_SIZE = 256 * MB;
|
||||
const S64 MAX_CACHE_SIZE = 9984ll * MB;
|
||||
const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB
|
||||
|
||||
S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB;
|
||||
cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
|
||||
|
||||
S64 texture_cache_size = ((cache_size * 8) / 10);
|
||||
S64 vfs_size = cache_size - texture_cache_size;
|
||||
|
||||
if (vfs_size > MAX_VFS_SIZE)
|
||||
{
|
||||
// Give the texture cache more space, since the VFS can't be bigger than 1GB.
|
||||
// This happens when the user's CacheSize setting is greater than 5GB.
|
||||
vfs_size = MAX_VFS_SIZE;
|
||||
texture_cache_size = cache_size - MAX_VFS_SIZE;
|
||||
}
|
||||
S64 vfs_size = llmin((S64)((cache_size * 2) / 10), MAX_VFS_SIZE);
|
||||
S64 texture_cache_size = cache_size - vfs_size;
|
||||
|
||||
S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
|
||||
texture_cache_size -= extra;
|
||||
|
|
@ -6489,6 +6525,19 @@ void LLAppViewer::disconnectViewer()
|
|||
LLUrlEntryParcel::setDisconnected(gDisconnected);
|
||||
}
|
||||
|
||||
bool LLAppViewer::onChangeFrameLimit(LLSD const & evt)
|
||||
{
|
||||
if (evt.asInteger() > 0)
|
||||
{
|
||||
mMinMicroSecPerFrame = 1000000 / evt.asInteger();
|
||||
}
|
||||
else
|
||||
{
|
||||
mMinMicroSecPerFrame = 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorLLError()
|
||||
{
|
||||
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -98,11 +98,10 @@ public:
|
|||
|
||||
void writeDebugInfo(bool isStatic=true);
|
||||
|
||||
const LLOSInfo& getOSInfo() const { return mSysOSInfo; }
|
||||
|
||||
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
|
||||
LLSD getViewerInfo() const;
|
||||
std::string getViewerInfoString() const;
|
||||
std::string getShortViewerInfoString() const;
|
||||
|
||||
// Report true if under the control of a debugger. A null-op default.
|
||||
virtual bool beingDebugged() { return false; }
|
||||
|
|
@ -265,6 +264,8 @@ private:
|
|||
void sendLogoutRequest();
|
||||
void disconnectViewer();
|
||||
|
||||
bool onChangeFrameLimit(LLSD const & evt);
|
||||
|
||||
// *FIX: the app viewer class should be some sort of singleton, no?
|
||||
// Perhaps its child class is the singleton and this should be an abstract base.
|
||||
static LLAppViewer* sInstance;
|
||||
|
|
@ -284,8 +285,6 @@ private:
|
|||
//-TT The skin and theme we are using at startup. might want to make them static.
|
||||
std::string mCurrentSkin;
|
||||
std::string mCurrentSkinTheme;
|
||||
|
||||
LLOSInfo mSysOSInfo;
|
||||
bool mReportedCrash;
|
||||
|
||||
std::string mServerReleaseNotesURL;
|
||||
|
|
@ -336,6 +335,8 @@ private:
|
|||
LLAppCoreHttp mAppCoreHttp;
|
||||
|
||||
bool mIsFirstRun;
|
||||
U64 mMinMicroSecPerFrame; // frame throttling
|
||||
|
||||
//---------------------------------------------
|
||||
//*NOTE: Mani - legacy updater stuff
|
||||
// Still useable?
|
||||
|
|
@ -401,7 +402,6 @@ extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4
|
|||
extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
|
||||
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
|
||||
extern F32 gFrameDTClamped;
|
||||
extern U32 gFrameStalls;
|
||||
|
||||
extern LLTimer gRenderStartTime;
|
||||
extern LLFrameTimer gForegroundTime;
|
||||
|
|
|
|||
|
|
@ -781,10 +781,10 @@ void LLAppViewerWin32::initCrashReporting(bool reportFreeze)
|
|||
PROCESS_INFORMATION processInfo;
|
||||
|
||||
std::wstring exe_wstr;
|
||||
exe_wstr=wstringize(exe_path);
|
||||
exe_wstr = utf8str_to_utf16str(exe_path);
|
||||
|
||||
std::wstring arg_wstr;
|
||||
arg_wstr=wstringize(arg_str);
|
||||
arg_wstr = utf8str_to_utf16str(arg_str);
|
||||
|
||||
LL_INFOS("CrashReport") << "Creating crash reporter process " << exe_path << " with params: " << arg_str << LL_ENDL;
|
||||
if(CreateProcess(exe_wstr.c_str(),
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@ public:
|
|||
virtual const std::string& getName() const { return mName; }
|
||||
virtual const std::string& getDisplayName() const { return mName; }
|
||||
virtual const std::string& getSearchableName() const { return mName; }
|
||||
virtual std::string getSearchableDescription() const { return LLStringUtil::null; }
|
||||
virtual std::string getSearchableCreatorName() const { return LLStringUtil::null; }
|
||||
virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;}
|
||||
virtual std::string getSearchableAll() const { return LLStringUtil::null; } // <FS:Ansariel> Zi's extended inventory search
|
||||
virtual const LLUUID& getUUID() const { return mUUID; }
|
||||
virtual time_t getCreationDate() const { return 0; }
|
||||
virtual LLPointer<LLUIImage> getIcon() const { return NULL; }
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ void LLEstateInfoModel::notifyCommit()
|
|||
// tries to send estate info using a cap; returns true if it succeeded
|
||||
bool LLEstateInfoModel::commitEstateInfoCaps()
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
|
||||
std::string url = gAgent.getRegionCapability("EstateChangeInfo");
|
||||
|
||||
if (url.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
|
|||
|
||||
{ //read base log into memory
|
||||
S32 i = 0;
|
||||
std::ifstream is(base.c_str());
|
||||
llifstream is(base.c_str());
|
||||
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
|
||||
{
|
||||
base_data[i++] = cur;
|
||||
|
|
@ -532,7 +532,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
|
|||
|
||||
{ //read current log into memory
|
||||
S32 i = 0;
|
||||
std::ifstream is(target.c_str());
|
||||
llifstream is(target.c_str());
|
||||
while (!is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is))
|
||||
{
|
||||
cur_data[i++] = cur;
|
||||
|
|
@ -877,8 +877,8 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
|
|||
void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target, std::string output)
|
||||
{
|
||||
// Open baseline and current target, exit if one is inexistent
|
||||
std::ifstream base_is(baseline.c_str());
|
||||
std::ifstream target_is(target.c_str());
|
||||
llifstream base_is(baseline.c_str());
|
||||
llifstream target_is(target.c_str());
|
||||
if (!base_is.is_open() || !target_is.is_open())
|
||||
{
|
||||
LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL;
|
||||
|
|
@ -896,7 +896,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
|
|||
target_is.close();
|
||||
|
||||
//output comparison
|
||||
std::ofstream os(output.c_str());
|
||||
llofstream os(output.c_str());
|
||||
|
||||
LLSD::Real session_time = current["SessionTime"].asReal();
|
||||
os <<
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ void LLFeatureManager::fetchFeatureTableCoro(std::string tableName)
|
|||
|
||||
|
||||
#if LL_WINDOWS
|
||||
std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
std::string os_string = LLOSInfo::instance().getOSStringSimple();
|
||||
std::string filename;
|
||||
|
||||
if (os_string.find("Microsoft Windows XP") == 0)
|
||||
|
|
@ -782,7 +782,7 @@ void LLFeatureManager::applyBaseMasks()
|
|||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo();
|
||||
const LLOSInfo& osInfo = LLOSInfo::instance();
|
||||
if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7)
|
||||
{
|
||||
maskFeatures("OSX_10_6_8");
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@
|
|||
#include "llworld.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
static const F32 SEC_PER_FLEXI_FRAME = 1.f / 60.f; // 60 flexi updates per second
|
||||
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
|
||||
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
|
||||
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
|
||||
static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
|
||||
|
|
@ -56,7 +56,10 @@ static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
|
|||
// constructor
|
||||
//-----------------------------------------------
|
||||
LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectData* attributes) :
|
||||
mVO(vo), mAttributes(attributes)
|
||||
mVO(vo),
|
||||
mAttributes(attributes),
|
||||
mLastFrameNum(0),
|
||||
mLastUpdatePeriod(0)
|
||||
{
|
||||
static U32 seed = 0;
|
||||
mID = seed++;
|
||||
|
|
@ -64,7 +67,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
|
|||
mUpdated = FALSE;
|
||||
mInitializedRes = -1;
|
||||
mSimulateRes = 0;
|
||||
mFrameNum = 0;
|
||||
mCollisionSphereRadius = 0.f;
|
||||
mRenderRes = -1;
|
||||
|
||||
|
|
@ -75,7 +77,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
|
|||
|
||||
mInstanceIndex = sInstanceList.size();
|
||||
sInstanceList.push_back(this);
|
||||
sUpdateDelay.push_back(0);
|
||||
}//-----------------------------------------------
|
||||
|
||||
LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
||||
|
|
@ -86,28 +87,28 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
|||
{
|
||||
sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
|
||||
sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
|
||||
sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
|
||||
}
|
||||
|
||||
sInstanceList.pop_back();
|
||||
sUpdateDelay.pop_back();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLVolumeImplFlexible::updateClass()
|
||||
{
|
||||
std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
|
||||
LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
|
||||
|
||||
U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
|
||||
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
|
||||
iter != sInstanceList.end();
|
||||
++iter)
|
||||
{
|
||||
--(*delay_iter);
|
||||
if (*delay_iter <= 0)
|
||||
// Note: by now update period might have changed
|
||||
if ((*iter)->mRenderRes == -1
|
||||
|| (*iter)->mLastFrameNum + (*iter)->mLastUpdatePeriod <= virtual_frame_num
|
||||
|| (*iter)->mLastFrameNum > virtual_frame_num) //time issues, overflow
|
||||
{
|
||||
(*iter)->doIdleUpdate();
|
||||
}
|
||||
++delay_iter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -334,15 +335,12 @@ void LLVolumeImplFlexible::updateRenderRes()
|
|||
// updated every time step. In the future, perhaps there could be an
|
||||
// optimization similar to what Havok does for objects that are stationary.
|
||||
//---------------------------------------------------------------------------------
|
||||
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
|
||||
void LLVolumeImplFlexible::doIdleUpdate()
|
||||
{
|
||||
LLDrawable* drawablep = mVO->mDrawable;
|
||||
|
||||
if (drawablep)
|
||||
{
|
||||
//LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
|
||||
|
||||
//ensure drawable is active
|
||||
drawablep->makeActive();
|
||||
|
||||
|
|
@ -354,15 +352,20 @@ void LLVolumeImplFlexible::doIdleUpdate()
|
|||
{
|
||||
updateRenderRes();
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
sUpdateDelay[mInstanceIndex] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
F32 pixel_area = mVO->getPixelArea();
|
||||
|
||||
// Note: Flexies afar will be rarely updated, closer ones will be updated more frequently.
|
||||
// But frequency differences are extremely noticeable, so consider modifying update factor,
|
||||
// or at least clamping value a bit more from both sides.
|
||||
U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
|
||||
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
|
||||
update_period = llclamp(update_period, 0U, 32U);
|
||||
update_period = llclamp(update_period, 1U, 32U);
|
||||
|
||||
// We control how fast flexies update, buy splitting updates among frames
|
||||
U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
|
||||
|
||||
if (visible)
|
||||
{
|
||||
|
|
@ -370,42 +373,44 @@ void LLVolumeImplFlexible::doIdleUpdate()
|
|||
pixel_area > 256.f)
|
||||
{
|
||||
U32 id;
|
||||
|
||||
if (mVO->isRootEdit())
|
||||
{
|
||||
id = mID;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
|
||||
LLVOVolume* parent = (LLVOVolume*)mVO->getParent();
|
||||
id = parent->getVolumeInterfaceID();
|
||||
}
|
||||
|
||||
if (mVO->isRootEdit())
|
||||
{
|
||||
id = mID;
|
||||
|
||||
// Throttle flexies and spread load by preventing flexies from updating in same frame
|
||||
// Shows how many frames we need to wait before next update
|
||||
U64 throttling_delay = (virtual_frame_num + id) % update_period;
|
||||
|
||||
if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
|
||||
|| (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
|
||||
{
|
||||
// We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
|
||||
// If happened too late, subtract throttling_delay (it is zero otherwise)
|
||||
mLastFrameNum = virtual_frame_num - throttling_delay;
|
||||
|
||||
// Store update period for updateClass()
|
||||
// Note: Consider substituting update_period with mLastUpdatePeriod everywhere.
|
||||
mLastUpdatePeriod = update_period;
|
||||
|
||||
updateRenderRes();
|
||||
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
|
||||
id = parent->getVolumeInterfaceID();
|
||||
}
|
||||
|
||||
if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
|
||||
{
|
||||
sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
|
||||
|
||||
updateRenderRes();
|
||||
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
mLastFrameNum = virtual_frame_num;
|
||||
mLastUpdatePeriod = update_period;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sUpdateDelay[mInstanceIndex] = (S32) update_period;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ class LLVolumeImplFlexible : public LLVolumeInterface
|
|||
{
|
||||
private:
|
||||
static std::vector<LLVolumeImplFlexible*> sInstanceList;
|
||||
static std::vector<S32> sUpdateDelay;
|
||||
S32 mInstanceIndex;
|
||||
|
||||
public:
|
||||
|
|
@ -133,7 +132,8 @@ private:
|
|||
S32 mInitializedRes;
|
||||
S32 mSimulateRes;
|
||||
S32 mRenderRes;
|
||||
U32 mFrameNum;
|
||||
U64 mLastFrameNum;
|
||||
U32 mLastUpdatePeriod;
|
||||
LLVector3 mCollisionSpherePosition;
|
||||
F32 mCollisionSphereRadius;
|
||||
U32 mID;
|
||||
|
|
|
|||
|
|
@ -687,6 +687,18 @@ void LLFloaterAvatarPicker::find()
|
|||
|
||||
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
|
||||
|
||||
size_t separator_index = text.find_first_of(" ._");
|
||||
if (separator_index != text.npos)
|
||||
{
|
||||
std::string first = text.substr(0, separator_index);
|
||||
std::string last = text.substr(separator_index+1, text.npos);
|
||||
LLStringUtil::trim(last);
|
||||
if("Resident" == last)
|
||||
{
|
||||
text = first;
|
||||
}
|
||||
}
|
||||
|
||||
mQueryID.generate();
|
||||
|
||||
std::string url;
|
||||
|
|
@ -954,12 +966,13 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
|
|||
|
||||
if (search_results->isEmpty())
|
||||
{
|
||||
LLStringUtil::format_map_t map;
|
||||
map["[TEXT]"] = getChild<LLUICtrl>("Edit")->getValue().asString();
|
||||
std::string name = "'" + getChild<LLUICtrl>("Edit")->getValue().asString() + "'";
|
||||
LLSD item;
|
||||
item["id"] = LLUUID::null;
|
||||
item["columns"][0]["column"] = "name";
|
||||
item["columns"][0]["value"] = getString("not_found", map);
|
||||
item["columns"][0]["value"] = name;
|
||||
item["columns"][1]["column"] = "username";
|
||||
item["columns"][1]["value"] = getString("not_found_text");
|
||||
search_results->addElement(item);
|
||||
search_results->setEnabled(false);
|
||||
getChildView("ok_btn")->setEnabled(false);
|
||||
|
|
|
|||
|
|
@ -29,11 +29,13 @@
|
|||
|
||||
#include "llfloateravatarrendersettings.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llmenugl.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
|
@ -270,6 +272,11 @@ void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata)
|
|||
void LLFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting)
|
||||
{
|
||||
if (ids.empty()) return;
|
||||
if(ids[0] == gAgentID)
|
||||
{
|
||||
LLNotificationsUtil::add("AddSelfRenderExceptions");
|
||||
return;
|
||||
}
|
||||
setAvatarRenderSetting(ids[0], visual_setting);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -525,10 +525,7 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
// note: on region change this will not be re checked, should not matter on Agni as
|
||||
// 99% of the time all regions will return the same caps. In case of an erroneous setting
|
||||
// to enabled the floater will just throw an error when trying to get it's cap
|
||||
// <FS:Ansariel> Crash fix
|
||||
//std::string url = gAgent.getRegion()->getCapability("LandResources");
|
||||
std::string url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("LandResources") : LLStringUtil::null;
|
||||
// </FS:Ansariel>
|
||||
std::string url = gAgent.getRegionCapability("LandResources");
|
||||
if (!url.empty())
|
||||
{
|
||||
if(mBtnScriptLimits)
|
||||
|
|
@ -2375,17 +2372,8 @@ void LLPanelLandOptions::refreshSearch()
|
|||
&& region
|
||||
&& !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH));
|
||||
|
||||
// There is a bug with this panel whereby the Show Directory bit can be
|
||||
// slammed off by the Region based on an override. Since this data is cached
|
||||
// locally the change will not reflect in the panel, which could cause confusion
|
||||
// A workaround for this is to flip the bit off in the locally cached version
|
||||
// when we detect a mismatch case.
|
||||
if(!can_change && parcel->getParcelFlag(PF_SHOW_DIRECTORY))
|
||||
{
|
||||
parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
|
||||
}
|
||||
BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
|
||||
mCheckShowDirectory ->set(show_directory);
|
||||
mCheckShowDirectory->set(show_directory);
|
||||
|
||||
// Set by string in case the order in UI doesn't match the order by index.
|
||||
LLParcel::ECategory cat = parcel->getCategory();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLFloaterModelUploadBase::LLFloaterModelUploadBase(const LLSD& key)
|
|||
void LLFloaterModelUploadBase::requestAgentUploadPermissions()
|
||||
{
|
||||
std::string capability = "MeshUploadFlag";
|
||||
std::string url = gAgent.getRegion()->getCapability(capability);
|
||||
std::string url = gAgent.getRegionCapability(capability);
|
||||
|
||||
if (!url.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ BOOL LLFloaterRegionDebugConsole::postBuild()
|
|||
|
||||
mOutput = getChild<LLTextEditor>("region_debug_console_output");
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
if (url.empty())
|
||||
{
|
||||
// Fall back to see if the old API is supported.
|
||||
url = gAgent.getRegion()->getCapability("SimConsole");
|
||||
url = gAgent.getRegionCapability("SimConsole");
|
||||
if (url.empty())
|
||||
{
|
||||
mOutput->appendText(
|
||||
|
|
@ -139,11 +139,11 @@ void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param)
|
|||
LLLineEditor* input = static_cast<LLLineEditor*>(ctrl);
|
||||
std::string text = input->getText() + "\n";
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
if (url.empty())
|
||||
{
|
||||
// Fall back to the old API
|
||||
url = gAgent.getRegion()->getCapability("SimConsole");
|
||||
url = gAgent.getRegionCapability("SimConsole");
|
||||
if (url.empty())
|
||||
{
|
||||
text += CONSOLE_UNAVAILABLE + PROMPT;
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ BOOL LLFloaterRegionInfo::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if(!gAgent.getRegion()->getCapability("RegionExperiences").empty())
|
||||
if(!gAgent.getRegionCapability("RegionExperiences").empty())
|
||||
{
|
||||
panel = new LLPanelRegionExperiences;
|
||||
mInfoPanels.push_back(panel);
|
||||
|
|
@ -926,10 +926,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
|
|||
|
||||
void LLFloaterRegionInfo::requestMeshRezInfo()
|
||||
{
|
||||
// <FS:Ansariel> Crash fix
|
||||
//std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
|
||||
std::string sim_console_url = gAgent.getRegion() ? gAgent.getRegion()->getCapability("SimConsoleAsync") : LLStringUtil::null;
|
||||
// </FS:Ansariel>
|
||||
std::string sim_console_url = gAgent.getRegionCapability("SimConsoleAsync");
|
||||
|
||||
if (!sim_console_url.empty())
|
||||
{
|
||||
|
|
@ -964,7 +961,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
|
|||
|
||||
// First try using a Cap. If that fails use the old method.
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
|
||||
std::string url = gAgent.getRegionCapability("DispatchRegionInfo");
|
||||
if (!url.empty())
|
||||
{
|
||||
body["block_terraform"] = getChild<LLUICtrl>("block_terraform_check")->getValue();
|
||||
|
|
|
|||
|
|
@ -449,8 +449,8 @@ void LLFloaterReporter::onClickSend(void *userdata)
|
|||
|
||||
LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report"));
|
||||
// *TODO don't upload image if checkbox isn't checked
|
||||
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
|
||||
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
|
||||
std::string url = gAgent.getRegionCapability("SendUserReport");
|
||||
std::string sshot_url = gAgent.getRegionCapability("SendUserReportWithScreenshot");
|
||||
if(!url.empty() || !sshot_url.empty())
|
||||
{
|
||||
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
|
||||
|
|
|
|||
|
|
@ -78,7 +78,10 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
|
|||
{
|
||||
edit_wearable_ptr->onClose();
|
||||
}
|
||||
panel_appearance->showOutfitsInventoryPanel();
|
||||
if(!app_quitting)
|
||||
{
|
||||
panel_appearance->showOutfitsInventoryPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -383,8 +383,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
|
|||
}
|
||||
else
|
||||
{
|
||||
width_ctrl->setMaxValue(6016);
|
||||
height_ctrl->setMaxValue(6016);
|
||||
width_ctrl->setMaxValue(MAX_SNAPSHOT_IMAGE_SIZE);
|
||||
height_ctrl->setMaxValue(MAX_SNAPSHOT_IMAGE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4436,8 +4436,7 @@ public:
|
|||
}
|
||||
|
||||
//K now we want to accept the invitation
|
||||
std::string url = gAgent.getRegion()->getCapability(
|
||||
"ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
|
||||
if ( url != "" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -228,6 +228,68 @@ const std::string& LLInvFVBridge::getDisplayName() const
|
|||
return mDisplayName;
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableDescription() const
|
||||
{
|
||||
const LLInventoryModel* model = getInventoryModel();
|
||||
if (model)
|
||||
{
|
||||
const LLInventoryItem *item = model->getItem(mUUID);
|
||||
if(item)
|
||||
{
|
||||
std::string desc = item->getDescription();
|
||||
LLStringUtil::toUpper(desc);
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableCreatorName() const
|
||||
{
|
||||
const LLInventoryModel* model = getInventoryModel();
|
||||
if (model)
|
||||
{
|
||||
const LLInventoryItem *item = model->getItem(mUUID);
|
||||
if(item)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
|
||||
{
|
||||
std::string username = av_name.getUserName();
|
||||
LLStringUtil::toUpper(username);
|
||||
return username;
|
||||
}
|
||||
}
|
||||
}
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableUUIDString() const
|
||||
{
|
||||
const LLInventoryModel* model = getInventoryModel();
|
||||
if (model)
|
||||
{
|
||||
const LLViewerInventoryItem *item = model->getItem(mUUID);
|
||||
if(item /*&& (item->getIsFullPerm() || gAgent.isGodlikeWithoutAdminMenuFakery())*/) // Keep it FS-legacy style since we had it like this for ages
|
||||
{
|
||||
std::string uuid = item->getAssetUUID().asString();
|
||||
LLStringUtil::toUpper(uuid);
|
||||
return uuid;
|
||||
}
|
||||
}
|
||||
return LLStringUtil::null;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Zi's extended inventory search
|
||||
std::string LLInvFVBridge::getSearchableAll() const
|
||||
{
|
||||
return getSearchableName() + "+" +
|
||||
getSearchableCreatorName() + "+" +
|
||||
getSearchableDescription() + "+" +
|
||||
getSearchableUUIDString();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Folders have full perms
|
||||
PermissionMask LLInvFVBridge::getPermissionMask() const
|
||||
{
|
||||
|
|
@ -889,6 +951,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
|
|||
// disabled_items.push_back(std::string("Properties"));
|
||||
//}
|
||||
// </FS>
|
||||
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
|
||||
if (active_panel && (active_panel->getName() != "All Items"))
|
||||
{
|
||||
items.push_back(std::string("Show in Main Panel"));
|
||||
}
|
||||
}
|
||||
|
||||
void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
|
@ -1695,25 +1763,6 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
{
|
||||
gotoItem();
|
||||
}
|
||||
|
||||
// <FS:Sei> Find item in main inventory tab
|
||||
if ("find_in_main" == action)
|
||||
{
|
||||
// Go to the item. Similar to gotoItem() but with normal items, not links.
|
||||
LLInventoryObject *obj = getInventoryObject();
|
||||
|
||||
mInventoryPanel.get()->getParentByType<LLTabContainer>()->selectFirstTab();
|
||||
if (obj)
|
||||
{
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if (active_panel)
|
||||
{
|
||||
active_panel->setSelection(obj->getUUID(), TAKE_FOCUS_YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
// </FS:Sei>
|
||||
|
||||
if ("open" == action || "open_original" == action)
|
||||
{
|
||||
openItem();
|
||||
|
|
@ -1751,6 +1800,11 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(buffer));
|
||||
return;
|
||||
}
|
||||
else if ("show_in_main_panel" == action)
|
||||
{
|
||||
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
|
||||
return;
|
||||
}
|
||||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
|
|
@ -2017,13 +2071,19 @@ void LLItemBridge::buildDisplayName() const
|
|||
{
|
||||
mDisplayName.assign(LLStringUtil::null);
|
||||
}
|
||||
|
||||
S32 old_length = mSearchableName.length();
|
||||
S32 new_length = mDisplayName.length() + getLabelSuffix().length();
|
||||
|
||||
mSearchableName.assign(mDisplayName);
|
||||
mSearchableName.append(getLabelSuffix());
|
||||
LLStringUtil::toUpper(mSearchableName);
|
||||
|
||||
//Name set, so trigger a sort
|
||||
if(mParent)
|
||||
if ((old_length > new_length) && getInventoryFilter())
|
||||
{
|
||||
getInventoryFilter()->setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
|
||||
}
|
||||
//Name set, so trigger a sort
|
||||
if(mParent)
|
||||
{
|
||||
mParent->requestSort();
|
||||
}
|
||||
|
|
@ -3361,6 +3421,11 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
return;
|
||||
}
|
||||
// </FS:TT>
|
||||
else if ("show_in_main_panel" == action)
|
||||
{
|
||||
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
|
||||
return;
|
||||
}
|
||||
else if ("cut" == action)
|
||||
{
|
||||
cutToClipboard();
|
||||
|
|
@ -6872,10 +6937,6 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
if ( (rlv_handler_t::isEnabled()) && (!gRlvAttachmentLocks.canDetach(item)) )
|
||||
disabled_items.push_back(std::string("Detach From Yourself"));
|
||||
// [/RLVa:KB]
|
||||
// <FS:Sei> Add "Find in Main" option to Worn Items
|
||||
if (mInventoryPanel.get()->getName() == "Worn Items")
|
||||
items.push_back(std::string("Find in Main")); // This should appear only in Worn Items tab
|
||||
// </FS:Sei>
|
||||
}
|
||||
else if (!isItemInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing() && !isCOFFolder())
|
||||
{
|
||||
|
|
@ -7174,10 +7235,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
|
||||
disabled_items.push_back(std::string("Take Off"));
|
||||
// [/RLVa:KB]
|
||||
// <FS:Sei> Add "Find in Main" option to Worn Items
|
||||
if (mInventoryPanel.get()->getName() == "Worn Items")
|
||||
items.push_back(std::string("Find in Main"));
|
||||
// </FS:Sei>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7980,69 +8037,4 @@ LLInvFVBridge* LLWornInventoryBridgeBuilder::createBridge(
|
|||
return new_listener;
|
||||
|
||||
}
|
||||
|
||||
// <FS:ND> Reintegrate search by uuid/creator/descripting from Zi Ree after CHUI Merge
|
||||
std::string LLInvFVBridge::getSearchableCreator( void ) const
|
||||
{
|
||||
LLInventoryItem *pItem( dynamic_cast< LLInventoryItem* >( getInventoryObject() ) );
|
||||
|
||||
std::string strCreator;
|
||||
if(pItem)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(pItem->getCreatorUUID(), &av_name))
|
||||
{
|
||||
strCreator = av_name.getUserName();
|
||||
LLStringUtil::toUpper( strCreator );
|
||||
}
|
||||
}
|
||||
|
||||
return strCreator;
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableDescription( void ) const
|
||||
{
|
||||
LLInventoryItem *pItem( dynamic_cast< LLInventoryItem* >( getInventoryObject() ) );
|
||||
|
||||
std::string strDescr;
|
||||
|
||||
if(pItem)
|
||||
{
|
||||
if(!pItem->getDescription().empty() )
|
||||
{
|
||||
strDescr = pItem->getDescription();
|
||||
LLStringUtil::toUpper( strDescr );
|
||||
}
|
||||
}
|
||||
|
||||
return strDescr;
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableUUID( void ) const
|
||||
{
|
||||
LLInventoryItem *pItem( dynamic_cast< LLInventoryItem* >( getInventoryObject() ) );
|
||||
|
||||
std::string strUUID;
|
||||
if(pItem)
|
||||
{
|
||||
if(!pItem->getAssetUUID().isNull())
|
||||
{
|
||||
strUUID = pItem->getAssetUUID().asString();
|
||||
LLStringUtil::toUpper( strUUID );
|
||||
}
|
||||
|
||||
}
|
||||
return strUUID;
|
||||
|
||||
}
|
||||
|
||||
std::string LLInvFVBridge::getSearchableAll( void ) const
|
||||
{
|
||||
return getSearchableName() + "+" +
|
||||
getSearchableCreator() + "+" +
|
||||
getSearchableDescription() + "+" +
|
||||
getSearchableUUID();
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
// EOF
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@ public:
|
|||
virtual const std::string& getDisplayName() const;
|
||||
const std::string& getSearchableName() const { return mSearchableName; }
|
||||
|
||||
std::string getSearchableDescription() const;
|
||||
std::string getSearchableCreatorName() const;
|
||||
std::string getSearchableUUIDString() const;
|
||||
std::string getSearchableAll() const; // <FS:Ansariel> Zi's extended inventory search
|
||||
|
||||
virtual PermissionMask getPermissionMask() const;
|
||||
virtual LLFolderType::EType getPreferredType() const;
|
||||
virtual time_t getCreationDate() const;
|
||||
|
|
@ -206,14 +211,6 @@ protected:
|
|||
void purgeItem(LLInventoryModel *model, const LLUUID &uuid);
|
||||
void removeObject(LLInventoryModel *model, const LLUUID &uuid);
|
||||
virtual void buildDisplayName() const {}
|
||||
|
||||
// <FS:ND> Reintegrate search by uuid/creator/descripting from Zi Ree after CHUI Merge
|
||||
public:
|
||||
virtual std::string getSearchableCreator( void ) const;
|
||||
virtual std::string getSearchableDescription( void ) const;
|
||||
virtual std::string getSearchableUUID( void ) const;
|
||||
virtual std::string getSearchableAll( void ) const;
|
||||
// </FS:ND>
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "llinventoryfilter.h"
|
||||
|
||||
// viewer includes
|
||||
#include "llagent.h"
|
||||
#include "llfolderviewmodel.h"
|
||||
#include "llfolderviewitem.h"
|
||||
#include "llinventorymodel.h"
|
||||
|
|
@ -74,13 +75,14 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
|
|||
: mName(p.name),
|
||||
mFilterModified(FILTER_NONE),
|
||||
mEmptyLookupMessage("InventoryNoMatchingItems"),
|
||||
mFilterSubStringTarget(SUBST_TARGET_NAME), // <FS:Zi> Extended Inventory Search
|
||||
mFilterOps(p.filter_ops),
|
||||
mBackupFilterOps(mFilterOps),
|
||||
mFilterSubString(p.substring),
|
||||
mCurrentGeneration(0),
|
||||
mFirstRequiredGeneration(0),
|
||||
mFirstSuccessGeneration(0)
|
||||
mFirstSuccessGeneration(0),
|
||||
mSearchType(SEARCHTYPE_NAME),
|
||||
mFilterCreatorType(FILTERCREATOR_ALL)
|
||||
{
|
||||
// <FS:Zi> Begin Multi-substring inventory search
|
||||
mSubStringMatchOffsets.clear();
|
||||
|
|
@ -89,31 +91,10 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
|
|||
|
||||
// copy mFilterOps into mDefaultFilterOps
|
||||
markDefault();
|
||||
mUsername = gAgentUsername;
|
||||
LLStringUtil::toUpper(mUsername);
|
||||
}
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
void LLInventoryFilter::setFilterSubStringTarget(const std::string& targetName)
|
||||
{
|
||||
if (targetName == "name")
|
||||
mFilterSubStringTarget = SUBST_TARGET_NAME;
|
||||
else if (targetName == "creator")
|
||||
mFilterSubStringTarget = SUBST_TARGET_CREATOR;
|
||||
else if (targetName == "description")
|
||||
mFilterSubStringTarget = SUBST_TARGET_DESCRIPTION;
|
||||
else if (targetName == "uuid")
|
||||
mFilterSubStringTarget = SUBST_TARGET_UUID;
|
||||
else if (targetName == "all")
|
||||
mFilterSubStringTarget = SUBST_TARGET_ALL;
|
||||
else
|
||||
LL_WARNS("LLInventoryFilter") << "Unknown sub string target: " << targetName << LL_ENDL;
|
||||
}
|
||||
|
||||
LLInventoryFilter::EFilterSubstringTarget LLInventoryFilter::getFilterSubStringTarget() const
|
||||
{
|
||||
return mFilterSubStringTarget;
|
||||
}
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
|
||||
{
|
||||
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
|
||||
|
|
@ -126,30 +107,48 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
|
|||
}
|
||||
|
||||
// <FS:Zi> Multi-substring inventory search
|
||||
//bool passed = (mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) != std::string::npos : true);
|
||||
//std::string desc = listener->getSearchableCreatorName();
|
||||
//switch(mSearchType)
|
||||
//{
|
||||
// case SEARCHTYPE_CREATOR:
|
||||
// desc = listener->getSearchableCreatorName();
|
||||
// break;
|
||||
// case SEARCHTYPE_DESCRIPTION:
|
||||
// desc = listener->getSearchableDescription();
|
||||
// break;
|
||||
// case SEARCHTYPE_UUID:
|
||||
// desc = listener->getSearchableUUIDString();
|
||||
// break;
|
||||
// case SEARCHTYPE_NAME:
|
||||
// default:
|
||||
// desc = listener->getSearchableName();
|
||||
// break;
|
||||
//}
|
||||
|
||||
//bool passed = (mFilterSubString.size() ? desc.find(mFilterSubString) != std::string::npos : true);
|
||||
std::string::size_type string_offset = std::string::npos;
|
||||
if (mFilterSubStrings.size())
|
||||
{
|
||||
std::string searchLabel;
|
||||
switch (mFilterSubStringTarget)
|
||||
switch (mSearchType)
|
||||
{
|
||||
case SUBST_TARGET_NAME:
|
||||
case SEARCHTYPE_NAME:
|
||||
searchLabel = listener->getSearchableName();
|
||||
break;
|
||||
case SUBST_TARGET_CREATOR:
|
||||
searchLabel = listener->getSearchableCreator();
|
||||
break;
|
||||
case SUBST_TARGET_DESCRIPTION:
|
||||
case SEARCHTYPE_DESCRIPTION:
|
||||
searchLabel = listener->getSearchableDescription();
|
||||
break;
|
||||
case SUBST_TARGET_UUID:
|
||||
searchLabel = listener->getSearchableUUID();
|
||||
case SEARCHTYPE_CREATOR:
|
||||
searchLabel = listener->getSearchableCreatorName();
|
||||
break;
|
||||
case SUBST_TARGET_ALL:
|
||||
case SEARCHTYPE_UUID:
|
||||
searchLabel = listener->getSearchableUUIDString();
|
||||
break;
|
||||
case SEARCHTYPE_ALL:
|
||||
searchLabel = listener->getSearchableAll();
|
||||
break;
|
||||
default:
|
||||
LL_WARNS("LLInventoryFilter") << "Unknown search substring target: " << mFilterSubStringTarget << LL_ENDL;
|
||||
LL_WARNS("LLInventoryFilter") << "Unknown search substring target: " << mSearchType << LL_ENDL;
|
||||
searchLabel = listener->getSearchableName();
|
||||
break;
|
||||
}
|
||||
|
|
@ -184,6 +183,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
|
|||
passed = passed && checkAgainstFilterType(listener);
|
||||
passed = passed && checkAgainstPermissions(listener);
|
||||
passed = passed && checkAgainstFilterLinks(listener);
|
||||
passed = passed && checkAgainstCreator(listener);
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
|
@ -332,6 +332,32 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
|
|||
}
|
||||
}
|
||||
|
||||
// <FS>
|
||||
//if(filterTypes & FILTERTYPE_WORN)
|
||||
//{
|
||||
// if (!get_is_item_worn(object_id))
|
||||
// {
|
||||
// return FALSE;
|
||||
// }
|
||||
//}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// FILTERTYPE_WORN
|
||||
// Pass if this item is worn (hiding COF and Outfits folders)
|
||||
if (filterTypes & FILTERTYPE_WORN)
|
||||
{
|
||||
if (!object)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
const LLUUID& cat_id = object->getParentUUID();
|
||||
const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
|
||||
return !LLAppearanceMgr::instance().getIsInCOF(object_id) // Not a link in COF
|
||||
&& (!cat || cat->getPreferredType() != LLFolderType::FT_OUTFIT) // Not a link in an outfit folder
|
||||
&& get_is_item_worn(object_id);
|
||||
}
|
||||
// </FS>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// FILTERTYPE_UUID
|
||||
// Pass if this item is the target UUID or if it links to the target UUID
|
||||
|
|
@ -399,24 +425,6 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS>
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// FILTERTYPE_WORN
|
||||
// Pass if this item is worn (hiding COF and Outfits folders)
|
||||
if (filterTypes & FILTERTYPE_WORN)
|
||||
{
|
||||
if (!object)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
const LLUUID& cat_id = object->getParentUUID();
|
||||
const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
|
||||
return !LLAppearanceMgr::instance().getIsInCOF(object_id) // Not a link in COF
|
||||
&& (!cat || cat->getPreferredType() != LLFolderType::FT_OUTFIT) // Not a link in an outfit folder
|
||||
&& get_is_item_worn(object_id);
|
||||
}
|
||||
// </FS>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// FILTERTYPE_EMPTYFOLDERS
|
||||
// Pass if this item is a folder and is not a system folder that should be hidden
|
||||
|
|
@ -571,6 +579,24 @@ bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInven
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const
|
||||
{
|
||||
if (!listener) return TRUE;
|
||||
const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
|
||||
switch(mFilterCreatorType)
|
||||
{
|
||||
case FILTERCREATOR_SELF:
|
||||
if(is_folder) return FALSE;
|
||||
return (listener->getSearchableCreatorName() == mUsername);
|
||||
case FILTERCREATOR_OTHERS:
|
||||
if(is_folder) return FALSE;
|
||||
return (listener->getSearchableCreatorName() != mUsername);
|
||||
case FILTERCREATOR_ALL:
|
||||
default:
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
|
||||
{
|
||||
return mFilterSubString;
|
||||
|
|
@ -578,7 +604,17 @@ const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
|
|||
|
||||
std::string::size_type LLInventoryFilter::getStringMatchOffset(LLFolderViewModelItem* item) const
|
||||
{
|
||||
return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
|
||||
// <FS:Ansariel> Zi's extended inventory search
|
||||
//if (mSearchType == SEARCHTYPE_NAME)
|
||||
if (mSearchType == SEARCHTYPE_NAME || mSearchType == SEARCHTYPE_ALL)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos;
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::string::npos;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLInventoryFilter::isDefault() const
|
||||
|
|
@ -651,6 +687,24 @@ void LLInventoryFilter::updateFilterTypes(U64 types, U64& current_types)
|
|||
}
|
||||
}
|
||||
|
||||
void LLInventoryFilter::setSearchType(ESearchType type)
|
||||
{
|
||||
if(mSearchType != type)
|
||||
{
|
||||
mSearchType = type;
|
||||
setModified();
|
||||
}
|
||||
}
|
||||
|
||||
void LLInventoryFilter::setFilterCreator(EFilterCreatorType type)
|
||||
{
|
||||
if(mFilterCreatorType != type)
|
||||
{
|
||||
mFilterCreatorType = type;
|
||||
setModified();
|
||||
}
|
||||
}
|
||||
|
||||
void LLInventoryFilter::setFilterObjectTypes(U64 types)
|
||||
{
|
||||
updateFilterTypes(types, mFilterOps.mFilterObjectTypes);
|
||||
|
|
@ -674,6 +728,11 @@ void LLInventoryFilter::setFilterEmptySystemFolders()
|
|||
mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS;
|
||||
}
|
||||
|
||||
void LLInventoryFilter::setFilterWorn()
|
||||
{
|
||||
mFilterOps.mFilterTypes |= FILTERTYPE_WORN;
|
||||
}
|
||||
|
||||
void LLInventoryFilter::setFilterMarketplaceActiveFolders()
|
||||
{
|
||||
mFilterOps.mFilterTypes |= FILTERTYPE_MARKETPLACE_ACTIVE;
|
||||
|
|
@ -1041,21 +1100,6 @@ void LLInventoryFilter::setFindAllLinksMode(const std::string &search_name, cons
|
|||
setFilterLinks(FILTERLINK_ONLY_LINKS);
|
||||
}
|
||||
|
||||
// <FS>
|
||||
void LLInventoryFilter::setFilterWorn(BOOL worn)
|
||||
{
|
||||
setModified();
|
||||
if (worn)
|
||||
{
|
||||
mFilterOps.mFilterTypes |= FILTERTYPE_WORN;
|
||||
}
|
||||
else
|
||||
{
|
||||
mFilterOps.mFilterTypes &= ~FILTERTYPE_WORN;
|
||||
}
|
||||
}
|
||||
// </FS>
|
||||
|
||||
// <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
void LLInventoryFilter::setFilterTransferable(BOOL transferable)
|
||||
{
|
||||
|
|
@ -1317,7 +1361,6 @@ LLInventoryFilter& LLInventoryFilter::operator=( const LLInventoryFilter& othe
|
|||
setFilterPermissions(other.getFilterPermissions());
|
||||
setFilterSubString(other.getFilterSubString());
|
||||
setDateRangeLastLogoff(other.isSinceLogoff());
|
||||
setFilterWorn(other.getFilterWorn());
|
||||
// <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
setFilterTransferable(other.getFilterTransferable());
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public:
|
|||
FILTERTYPE_MARKETPLACE_UNASSOCIATED = 0x1 << 8, // pass if folder is a marketplace non associated (no market ID) folder
|
||||
FILTERTYPE_MARKETPLACE_LISTING_FOLDER = 0x1 << 9, // pass iff folder is a listing folder
|
||||
FILTERTYPE_NO_MARKETPLACE_ITEMS = 0x1 << 10, // pass iff folder is not under the marketplace
|
||||
FILTERTYPE_WORN = 0x1 << 11, // <FS> search by wearable type
|
||||
FILTERTYPE_WORN = 0x1 << 11, // pass if item is worn
|
||||
FILTERTYPE_TRANSFERABLE = 0x1 << 12 // <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
};
|
||||
|
||||
|
|
@ -84,16 +84,21 @@ public:
|
|||
SO_FOLDERS_BY_WEIGHT = 0x1 << 3, // Force folder sort by weight, usually, amount of some elements in their descendents
|
||||
};
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
enum EFilterSubstringTarget
|
||||
enum ESearchType
|
||||
{
|
||||
SUBST_TARGET_NAME = 0, // Classic search for item name
|
||||
SUBST_TARGET_CREATOR, // Search for creator name
|
||||
SUBST_TARGET_DESCRIPTION, // Search for item description
|
||||
SUBST_TARGET_UUID, // Search for asset UUID
|
||||
SUBST_TARGET_ALL // Search in all fields at the same time
|
||||
SEARCHTYPE_NAME,
|
||||
SEARCHTYPE_DESCRIPTION,
|
||||
SEARCHTYPE_CREATOR,
|
||||
SEARCHTYPE_UUID,
|
||||
SEARCHTYPE_ALL // <FS:Ansariel> Zi's extended inventory search
|
||||
};
|
||||
|
||||
enum EFilterCreatorType
|
||||
{
|
||||
FILTERCREATOR_ALL,
|
||||
FILTERCREATOR_SELF,
|
||||
FILTERCREATOR_OTHERS
|
||||
};
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
struct FilterOps
|
||||
{
|
||||
|
|
@ -191,6 +196,7 @@ public:
|
|||
void setFilterUUID(const LLUUID &object_id);
|
||||
void setFilterWearableTypes(U64 types);
|
||||
void setFilterEmptySystemFolders();
|
||||
void setFilterWorn();
|
||||
void removeFilterEmptySystemFolders(); // <FS:Ansariel> Optional hiding of empty system folders
|
||||
void setFilterMarketplaceActiveFolders();
|
||||
void setFilterMarketplaceInactiveFolders();
|
||||
|
|
@ -198,6 +204,10 @@ public:
|
|||
void setFilterMarketplaceListingFolders(bool select_only_listing_folders);
|
||||
void setFilterNoMarketplaceFolder();
|
||||
void updateFilterTypes(U64 types, U64& current_types);
|
||||
void setSearchType(ESearchType type);
|
||||
ESearchType getSearchType() { return mSearchType; }
|
||||
void setFilterCreator(EFilterCreatorType type);
|
||||
EFilterCreatorType getFilterCreator() { return mFilterCreatorType; }
|
||||
|
||||
void setFilterSubString(const std::string& string);
|
||||
const std::string& getFilterSubString(BOOL trim = FALSE) const;
|
||||
|
|
@ -231,9 +241,7 @@ public:
|
|||
void setFindAllLinksMode(const std::string &search_name, const LLUUID& search_id);
|
||||
|
||||
// <FS>
|
||||
void setFilterWorn(BOOL worn);
|
||||
BOOL getFilterWorn() const { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; }
|
||||
// </FS>
|
||||
|
||||
// <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
void setFilterTransferable(BOOL transferable);
|
||||
|
|
@ -252,11 +260,6 @@ public:
|
|||
|
||||
std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const;
|
||||
std::string::size_type getFilterStringSize() const;
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
void setFilterSubStringTarget(const std::string& targetName);
|
||||
EFilterSubstringTarget getFilterSubStringTarget() const;
|
||||
std::string getSearchableTarget(const LLFolderViewItem* item) const;
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
// +-------------------------------------------------------------------+
|
||||
// + Presentation
|
||||
|
|
@ -316,6 +319,7 @@ private:
|
|||
bool checkAgainstPermissions(const class LLFolderViewModelItemInventory* listener) const;
|
||||
bool checkAgainstPermissions(const LLInventoryItem* item) const;
|
||||
bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const;
|
||||
bool checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const;
|
||||
bool checkAgainstClipboard(const LLUUID& object_id) const;
|
||||
|
||||
FilterOps mFilterOps;
|
||||
|
|
@ -327,10 +331,10 @@ private:
|
|||
// <FS:Zi> Multi-substring inventory search
|
||||
std::vector<std::string::size_type> mSubStringMatchOffsets;
|
||||
std::vector<std::string> mFilterSubStrings;
|
||||
EFilterSubstringTarget mFilterSubStringTarget;
|
||||
// </FS:Zi> Multi-substring inventory search
|
||||
|
||||
std::string mFilterSubStringOrig;
|
||||
std::string mUsername;
|
||||
const std::string mName;
|
||||
|
||||
S32 mCurrentGeneration;
|
||||
|
|
@ -345,6 +349,9 @@ private:
|
|||
|
||||
std::string mFilterText;
|
||||
std::string mEmptyLookupMessage;
|
||||
|
||||
ESearchType mSearchType;
|
||||
EFilterCreatorType mFilterCreatorType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2429,7 +2429,8 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
{
|
||||
// <FS:Ansariel> Undo delete item confirmation per-session annoyance
|
||||
//static bool sDisplayedAtSession = false;
|
||||
|
||||
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
bool marketplacelistings_item = false;
|
||||
LLAllDescendentsPassedFilter f;
|
||||
for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
|
||||
{
|
||||
|
|
@ -2437,9 +2438,15 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
{
|
||||
folder->applyFunctorRecursively(f);
|
||||
}
|
||||
LLFolderViewModelItemInventory * viewModel = dynamic_cast<LLFolderViewModelItemInventory *>((*it)->getViewModelItem());
|
||||
if (viewModel && gInventory.isObjectDescendentOf(viewModel->getUUID(), marketplacelistings_id))
|
||||
{
|
||||
marketplacelistings_item = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Fall through to the generic confirmation if the user choose to ignore the specialized one
|
||||
if ( (!f.allDescendentsPassedFilter()) && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
|
||||
if ( (!f.allDescendentsPassedFilter()) && !marketplacelistings_item && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) )
|
||||
{
|
||||
LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,6 +382,11 @@ void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType
|
|||
getFilter().setFilterCategoryTypes(types);
|
||||
}
|
||||
|
||||
void LLInventoryPanel::setFilterWorn()
|
||||
{
|
||||
getFilter().setFilterWorn();
|
||||
}
|
||||
|
||||
U32 LLInventoryPanel::getFilterObjectTypes() const
|
||||
{
|
||||
return getFilter().getFilterObjectTypes();
|
||||
|
|
@ -408,18 +413,6 @@ void LLInventoryPanel::setFilterSubString(const std::string& string)
|
|||
getFilter().setFilterSubString(string);
|
||||
}
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
void LLInventoryPanel::setFilterSubStringTarget(const std::string& target)
|
||||
{
|
||||
getFilter().setFilterSubStringTarget(target);
|
||||
}
|
||||
|
||||
LLInventoryFilter::EFilterSubstringTarget LLInventoryPanel::getFilterSubStringTarget() const
|
||||
{
|
||||
return getFilter().getFilterSubStringTarget();
|
||||
}
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
const std::string LLInventoryPanel::getFilterSubString()
|
||||
{
|
||||
return getFilter().getFilterSubString();
|
||||
|
|
@ -470,12 +463,15 @@ U64 LLInventoryPanel::getFilterLinks()
|
|||
}
|
||||
// </FS:Zi> Filter Links Menu
|
||||
|
||||
// <FS>
|
||||
void LLInventoryPanel::setWorn(BOOL worn)
|
||||
void LLInventoryPanel::setSearchType(LLInventoryFilter::ESearchType type)
|
||||
{
|
||||
getFilter().setFilterWorn(worn);
|
||||
getFilter().setSearchType(type);
|
||||
}
|
||||
|
||||
LLInventoryFilter::ESearchType LLInventoryPanel::getSearchType()
|
||||
{
|
||||
return getFilter().getSearchType();
|
||||
}
|
||||
// </FS>
|
||||
|
||||
// <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
void LLInventoryPanel::setTransferable(BOOL transferable)
|
||||
|
|
@ -1520,9 +1516,14 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
|
|||
}
|
||||
|
||||
//static
|
||||
void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id)
|
||||
void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel)
|
||||
{
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
|
||||
LLInventoryPanel *active_panel;
|
||||
if (main_panel)
|
||||
{
|
||||
LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory")->selectAllItemsPanel();
|
||||
}
|
||||
active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
|
||||
|
||||
if (active_panel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -173,23 +173,21 @@ public:
|
|||
LLInventoryFilter& getFilter();
|
||||
const LLInventoryFilter& getFilter() const;
|
||||
void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT);
|
||||
void setFilterWorn();
|
||||
U32 getFilterObjectTypes() const;
|
||||
void setFilterPermMask(PermissionMask filter_perm_mask);
|
||||
U32 getFilterPermMask() const;
|
||||
void setFilterWearableTypes(U64 filter);
|
||||
void setFilterSubString(const std::string& string);
|
||||
const std::string getFilterSubString();
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
void setFilterSubStringTarget(const std::string& target);
|
||||
LLInventoryFilter::EFilterSubstringTarget getFilterSubStringTarget() const;
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
void setSinceLogoff(BOOL sl);
|
||||
void setHoursAgo(U32 hours);
|
||||
void setDateSearchDirection(U32 direction);
|
||||
BOOL getSinceLogoff();
|
||||
void setFilterLinks(U64 filter_links);
|
||||
U64 getFilterLinks(); // <FS:Zi> Filter Links Menu
|
||||
void setWorn(BOOL worn); // <FS>
|
||||
void setSearchType(LLInventoryFilter::ESearchType type);
|
||||
LLInventoryFilter::ESearchType getSearchType();
|
||||
void setTransferable(BOOL transferable); // <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
|
||||
void setShowFolderState(LLInventoryFilter::EFolderShow show);
|
||||
|
|
@ -232,7 +230,7 @@ public:
|
|||
// "Auto_open" determines if we open an inventory panel if none are open.
|
||||
static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
|
||||
|
||||
static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id);
|
||||
static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel = FALSE);
|
||||
|
||||
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
|
||||
void removeItemID(const LLUUID& id);
|
||||
|
|
|
|||
|
|
@ -59,12 +59,22 @@
|
|||
#include "llupdaterservice.h"
|
||||
#include "llevents.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <sstream>
|
||||
|
||||
const S32 LOGIN_MAX_RETRIES = 3;
|
||||
|
||||
// this can be removed once it is defined by the build for all forks
|
||||
#ifndef ADDRESS_SIZE
|
||||
#ifdef ND_BUILD64BIT_ARCH
|
||||
# define ADDRESS_SIZE 64
|
||||
#else
|
||||
# define ADDRESS_SIZE 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class LLLoginInstance::Disposable {
|
||||
public:
|
||||
virtual ~Disposable() {}
|
||||
|
|
@ -495,10 +505,12 @@ LLLoginInstance::LLLoginInstance() :
|
|||
}
|
||||
|
||||
void LLLoginInstance::setPlatformInfo(const std::string platform,
|
||||
const std::string platform_version)
|
||||
const std::string platform_version,
|
||||
const std::string platform_name)
|
||||
{
|
||||
mPlatform = platform;
|
||||
mPlatformVersion = platform_version;
|
||||
mPlatformVersionName = platform_name;
|
||||
}
|
||||
|
||||
LLLoginInstance::~LLLoginInstance()
|
||||
|
|
@ -567,7 +579,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
requested_options.append("event_notifications");
|
||||
requested_options.append("classified_categories");
|
||||
requested_options.append("adult_compliant");
|
||||
//requested_options.append("inventory-targets");
|
||||
requested_options.append("buddy-list");
|
||||
requested_options.append("newuser-config");
|
||||
requested_options.append("ui-config");
|
||||
|
|
@ -604,8 +615,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
#endif // OPENSIM // <FS:AW optional opensim support>
|
||||
// </FS:AW various patches>
|
||||
|
||||
// (re)initialize the request params with creds.
|
||||
LLSD request_params = user_credential->getLoginParams();
|
||||
LLSD request_params;
|
||||
|
||||
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
|
||||
if ( ! llHashedUniqueID(hashed_unique_id_string) )
|
||||
|
|
@ -622,11 +632,26 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
request_params["version"] = LLVersionInfo::getVersion();
|
||||
request_params["channel"] = LLVersionInfo::getChannel();
|
||||
request_params["platform"] = mPlatform;
|
||||
request_params["address_size"] = ADDRESS_SIZE;
|
||||
request_params["platform_version"] = mPlatformVersion;
|
||||
request_params["platform_string"] = mPlatformVersionName;
|
||||
request_params["id0"] = mSerialNumber;
|
||||
request_params["host_id"] = gSavedSettings.getString("HostID");
|
||||
request_params["extended_errors"] = true; // request message_id and message_args
|
||||
|
||||
// log request_params _before_ adding the credentials
|
||||
LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
|
||||
|
||||
// Copy the credentials into the request after logging the rest
|
||||
LLSD credentials(user_credential->getLoginParams());
|
||||
for (LLSD::map_const_iterator it = credentials.beginMap();
|
||||
it != credentials.endMap();
|
||||
it++
|
||||
)
|
||||
{
|
||||
request_params[it->first] = it->second;
|
||||
}
|
||||
|
||||
// Specify desired timeout/retry options
|
||||
LLSD http_params;
|
||||
http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout");
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public:
|
|||
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
|
||||
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
|
||||
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version);
|
||||
void setPlatformInfo(const std::string platform, const std::string platform_version, const std::string platform_name);
|
||||
|
||||
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
|
||||
LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
|
||||
|
|
@ -108,6 +108,7 @@ private:
|
|||
S32 mLastExecDuration;
|
||||
std::string mPlatform;
|
||||
std::string mPlatformVersion;
|
||||
std::string mPlatformVersionName;
|
||||
UpdaterLauncherCallback mUpdaterLauncher;
|
||||
LLEventDispatcher mDispatcher;
|
||||
LLUpdaterService * mUpdaterService;
|
||||
|
|
|
|||
|
|
@ -37,25 +37,28 @@ using namespace std;
|
|||
unsigned char static_unique_id[] = {0,0,0,0,0,0};
|
||||
bool static has_static_unique_id = false;
|
||||
|
||||
#if LL_WINDOWS
|
||||
class FSComInitialize
|
||||
{
|
||||
HRESULT mHR;
|
||||
public:
|
||||
FSComInitialize()
|
||||
{
|
||||
mHR = CoInitializeEx( 0, COINIT_MULTITHREADED );
|
||||
if( FAILED( mHR ) )
|
||||
LL_DEBUGS( "AppInit" ) << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
}
|
||||
#if LL_WINDOWS
|
||||
|
||||
~FSComInitialize()
|
||||
{
|
||||
if( SUCCEEDED( mHR ) )
|
||||
CoUninitialize();
|
||||
}
|
||||
class LLComInitialize
|
||||
{
|
||||
HRESULT mHR;
|
||||
public:
|
||||
LLComInitialize()
|
||||
{
|
||||
mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
if (FAILED(mHR))
|
||||
LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
}
|
||||
|
||||
~LLComInitialize()
|
||||
{
|
||||
if (SUCCEEDED(mHR))
|
||||
CoUninitialize();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //LL_WINDOWS
|
||||
|
||||
// get an unique machine id.
|
||||
// NOT THREAD SAFE - do before setting up threads.
|
||||
// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
|
||||
|
|
@ -78,18 +81,7 @@ S32 LLMachineID::init()
|
|||
// Step 1: --------------------------------------------------
|
||||
// Initialize COM. ------------------------------------------
|
||||
|
||||
// <FS:ND> Do not fail in case CoInitialize fails as it can be harmless
|
||||
|
||||
//hres = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
//if (FAILED(hres))
|
||||
//{
|
||||
// LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL;
|
||||
// return 1; // Program has failed.
|
||||
//}
|
||||
|
||||
FSComInitialize comInit;
|
||||
|
||||
// </FS:ND>
|
||||
LLComInitialize comInit;
|
||||
|
||||
// Step 2: --------------------------------------------------
|
||||
// Set general COM security levels --------------------------
|
||||
|
|
@ -114,7 +106,6 @@ S32 LLMachineID::init()
|
|||
if (FAILED(hres))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
return 1; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +123,6 @@ S32 LLMachineID::init()
|
|||
if (FAILED(hres))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
return 1; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +149,6 @@ S32 LLMachineID::init()
|
|||
{
|
||||
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
|
||||
pLoc->Release();
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
return 1; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +174,6 @@ S32 LLMachineID::init()
|
|||
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
|
||||
pSvc->Release();
|
||||
pLoc->Release();
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
return 1; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +194,6 @@ S32 LLMachineID::init()
|
|||
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
|
||||
pSvc->Release();
|
||||
pLoc->Release();
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
return 1; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +248,6 @@ S32 LLMachineID::init()
|
|||
pLoc->Release();
|
||||
if (pEnumerator)
|
||||
pEnumerator->Release();
|
||||
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
|
||||
ret_code=0;
|
||||
#else
|
||||
unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);
|
||||
|
|
|
|||
|
|
@ -1982,7 +1982,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
|
|||
mOrigin = gAgent.getPositionAgent();
|
||||
mHost = gAgent.getRegionHost();
|
||||
|
||||
mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
|
||||
mWholeModelFeeCapability = gAgent.getRegionCapability("NewFileAgentInventory");
|
||||
|
||||
mOrigin += gAgent.getAtAxis() * scale.magVec();
|
||||
|
||||
|
|
@ -2070,14 +2070,14 @@ void dump_llsd_to_file(const LLSD& content, std::string filename)
|
|||
{
|
||||
if (gSavedSettings.getBOOL("MeshUploadLogXML"))
|
||||
{
|
||||
std::ofstream of(filename.c_str());
|
||||
llofstream of(filename.c_str());
|
||||
LLSDSerialize::toPrettyXML(content,of);
|
||||
}
|
||||
}
|
||||
|
||||
LLSD llsd_from_file(std::string filename)
|
||||
{
|
||||
std::ifstream ifs(filename.c_str());
|
||||
llifstream ifs(filename.c_str());
|
||||
LLSD result;
|
||||
LLSDSerialize::fromXML(result,ifs);
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -702,13 +702,24 @@ void LLOutfitGalleryItem::draw()
|
|||
const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
|
||||
if (mTexturep)
|
||||
{
|
||||
LLRect interior = border;
|
||||
interior.stretch(-1);
|
||||
if (mImageUpdatePending && mTexturep->getDiscardLevel() >= 0)
|
||||
{
|
||||
mImageUpdatePending = false;
|
||||
if (mTexturep->getOriginalWidth() > MAX_OUTFIT_PHOTO_WIDTH || mTexturep->getOriginalHeight() > MAX_OUTFIT_PHOTO_HEIGHT)
|
||||
{
|
||||
setDefaultImage();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLRect interior = border;
|
||||
interior.stretch(-1);
|
||||
|
||||
gl_draw_scaled_image(interior.mLeft - 1, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
|
||||
gl_draw_scaled_image(interior.mLeft - 1, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
|
||||
|
||||
// Pump the priority
|
||||
mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight()));
|
||||
// Pump the priority
|
||||
mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -774,12 +785,19 @@ BOOL LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
return LLPanel::handleDoubleClick(x, y, mask);
|
||||
}
|
||||
|
||||
void LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
|
||||
bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
|
||||
{
|
||||
mImageAssetId = image_asset_id;
|
||||
mTexturep = LLViewerTextureManager::getFetchedTexture(image_asset_id, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
||||
getChildView("preview_outfit")->setVisible(FALSE);
|
||||
mDefaultImage = false;
|
||||
LLPointer<LLViewerFetchedTexture> texture = LLViewerTextureManager::getFetchedTexture(image_asset_id, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
||||
if (texture && texture->getOriginalWidth() <= MAX_OUTFIT_PHOTO_WIDTH && texture->getOriginalHeight() <= MAX_OUTFIT_PHOTO_HEIGHT)
|
||||
{
|
||||
mImageAssetId = image_asset_id;
|
||||
mTexturep = texture;
|
||||
getChildView("preview_outfit")->setVisible(FALSE);
|
||||
mDefaultImage = false;
|
||||
mImageUpdatePending = (texture->getDiscardLevel() == -1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID LLOutfitGalleryItem::getImageAssetId()
|
||||
|
|
@ -793,6 +811,7 @@ void LLOutfitGalleryItem::setDefaultImage()
|
|||
mImageAssetId.setNull();
|
||||
getChildView("preview_outfit")->setVisible(TRUE);
|
||||
mDefaultImage = true;
|
||||
mImageUpdatePending = false;
|
||||
}
|
||||
|
||||
LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
|
||||
|
|
@ -1037,13 +1056,28 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
|
|||
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
|
||||
{
|
||||
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
|
||||
if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
LLUUID asset_id, inv_id;
|
||||
std::string item_name;
|
||||
if (linked_item != NULL)
|
||||
{
|
||||
LLUUID asset_id = linked_item->getAssetUUID();
|
||||
mOutfitMap[category_id]->setImageAssetId(asset_id);
|
||||
photo_loaded = true;
|
||||
std::string linked_item_name = linked_item->getName();
|
||||
if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == linked_item_name)
|
||||
if (linked_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
{
|
||||
asset_id = linked_item->getAssetUUID();
|
||||
inv_id = linked_item->getUUID();
|
||||
item_name = linked_item->getName();
|
||||
}
|
||||
}
|
||||
else if (outfit_item->getActualType() == LLAssetType::AT_TEXTURE)
|
||||
{
|
||||
asset_id = outfit_item->getAssetUUID();
|
||||
inv_id = outfit_item->getUUID();
|
||||
item_name = outfit_item->getName();
|
||||
}
|
||||
if (asset_id.notNull())
|
||||
{
|
||||
photo_loaded |= mOutfitMap[category_id]->setImageAssetId(asset_id);
|
||||
// Rename links
|
||||
if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == item_name)
|
||||
{
|
||||
LLViewerInventoryCategory *outfit_cat = gInventory.getCategory(mOutfitRenamePending);
|
||||
LLStringUtil::format_map_t photo_string_args;
|
||||
|
|
@ -1051,7 +1085,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
|
|||
std::string new_name = getString("outfit_photo_string", photo_string_args);
|
||||
LLSD updates;
|
||||
updates["name"] = new_name;
|
||||
update_inventory_item(linked_item->getUUID(), updates, NULL);
|
||||
update_inventory_item(inv_id, updates, NULL);
|
||||
mOutfitRenamePending.setNull();
|
||||
LLFloater* inv_floater = LLFloaterReg::getInstance("inventory");
|
||||
if (inv_floater)
|
||||
|
|
@ -1064,7 +1098,11 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
|
|||
appearance_floater->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
if (item_name == LLAppearanceMgr::sExpectedTextureName)
|
||||
{
|
||||
// Images with "appropriate" name take priority
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!photo_loaded)
|
||||
{
|
||||
|
|
@ -1079,6 +1117,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
|
|||
}
|
||||
}
|
||||
|
||||
// Refresh linked textures from "textures" uploads folder
|
||||
void LLOutfitGallery::refreshTextures(const LLUUID& category_id)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ public:
|
|||
/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
|
||||
|
||||
void setDefaultImage();
|
||||
void setImageAssetId(LLUUID asset_id);
|
||||
bool setImageAssetId(LLUUID asset_id);
|
||||
LLUUID getImageAssetId();
|
||||
void setOutfitName(std::string name);
|
||||
void setOutfitWorn(bool value);
|
||||
|
|
@ -282,6 +282,7 @@ private:
|
|||
bool mSelected;
|
||||
bool mWorn;
|
||||
bool mDefaultImage;
|
||||
bool mImageUpdatePending;
|
||||
bool mHidden;
|
||||
std::string mOutfitName;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ BOOL LLPanelFace::postBuild()
|
|||
//childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureScaleX, this);
|
||||
//childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureScaleY, this);
|
||||
//childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureRot, this);
|
||||
//childSetCommitCallback("rptctrl",&LLPanelFace::onCommitRepeatsPerMeter, this);
|
||||
childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
|
||||
//childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureOffsetX, this);
|
||||
//childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureOffsetY, this);
|
||||
|
|
@ -161,59 +162,92 @@ BOOL LLPanelFace::postBuild()
|
|||
childSetCommitCallback("glossiness",&LLPanelFace::onCommitMaterialGloss, this);
|
||||
childSetCommitCallback("environment",&LLPanelFace::onCommitMaterialEnv, this);
|
||||
childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this);
|
||||
|
||||
|
||||
// <FS:CR>
|
||||
childSetCommitCallback("checkbox maps sync", &LLPanelFace::onClickMapsSync, this);
|
||||
childSetCommitCallback("checkbox_sync_settings", &LLPanelFace::onClickMapsSync, this);
|
||||
childSetAction("copytextures",&LLPanelFace::onClickCopy,this);
|
||||
childSetAction("pastetextures",&LLPanelFace::onClickPaste,this);
|
||||
|
||||
mCtrlTexScaleU = getChild<LLSpinCtrl>("TexScaleU");
|
||||
mCtrlTexScaleU->setCommitCallback(&LLPanelFace::onCommitTextureScaleX, this);
|
||||
|
||||
if (mCtrlTexScaleU)
|
||||
{
|
||||
mCtrlTexScaleU->setCommitCallback(&LLPanelFace::onCommitTextureScaleX, this);
|
||||
}
|
||||
mCtrlTexScaleV = getChild<LLSpinCtrl>("TexScaleV");
|
||||
mCtrlTexScaleV->setCommitCallback(&LLPanelFace::onCommitTextureScaleY, this);
|
||||
|
||||
if (mCtrlTexScaleV)
|
||||
{
|
||||
mCtrlTexScaleV->setCommitCallback(&LLPanelFace::onCommitTextureScaleY, this);
|
||||
}
|
||||
mCtrlBumpyScaleU = getChild<LLSpinCtrl>("bumpyScaleU");
|
||||
mCtrlBumpyScaleU->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyScaleX, this);
|
||||
|
||||
if (mCtrlBumpyScaleU)
|
||||
{
|
||||
mCtrlBumpyScaleU->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyScaleX, this);
|
||||
}
|
||||
mCtrlBumpyScaleV = getChild<LLSpinCtrl>("bumpyScaleV");
|
||||
mCtrlBumpyScaleV->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyScaleY, this);
|
||||
|
||||
if (mCtrlBumpyScaleV)
|
||||
{
|
||||
mCtrlBumpyScaleV->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyScaleY, this);
|
||||
}
|
||||
mCtrlShinyScaleU = getChild<LLSpinCtrl>("shinyScaleU");
|
||||
mCtrlShinyScaleU->setCommitCallback(&LLPanelFace::onCommitMaterialShinyScaleX, this);
|
||||
|
||||
if (mCtrlShinyScaleU)
|
||||
{
|
||||
mCtrlShinyScaleU->setCommitCallback(&LLPanelFace::onCommitMaterialShinyScaleX, this);
|
||||
}
|
||||
mCtrlShinyScaleV = getChild<LLSpinCtrl>("shinyScaleV");
|
||||
mCtrlShinyScaleV->setCommitCallback(&LLPanelFace::onCommitMaterialShinyScaleY, this);
|
||||
|
||||
if (mCtrlShinyScaleV)
|
||||
{
|
||||
mCtrlShinyScaleV->setCommitCallback(&LLPanelFace::onCommitMaterialShinyScaleY, this);
|
||||
}
|
||||
mCtrlTexOffsetU = getChild<LLSpinCtrl>("TexOffsetU");
|
||||
mCtrlTexOffsetU->setCommitCallback(&LLPanelFace::onCommitTextureOffsetX, this);
|
||||
|
||||
if (mCtrlTexOffsetU)
|
||||
{
|
||||
mCtrlTexOffsetU->setCommitCallback(&LLPanelFace::onCommitTextureOffsetX, this);
|
||||
}
|
||||
mCtrlTexOffsetV = getChild<LLSpinCtrl>("TexOffsetV");
|
||||
mCtrlTexOffsetV->setCommitCallback(&LLPanelFace::onCommitTextureOffsetY, this);
|
||||
|
||||
if (mCtrlTexOffsetV)
|
||||
{
|
||||
mCtrlTexOffsetV->setCommitCallback(&LLPanelFace::onCommitTextureOffsetY, this);
|
||||
}
|
||||
mCtrlBumpyOffsetU = getChild<LLSpinCtrl>("bumpyOffsetU");
|
||||
mCtrlBumpyOffsetU->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyOffsetX, this);
|
||||
|
||||
if (mCtrlBumpyOffsetU)
|
||||
{
|
||||
mCtrlBumpyOffsetU->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyOffsetX, this);
|
||||
}
|
||||
mCtrlBumpyOffsetV = getChild<LLSpinCtrl>("bumpyOffsetV");
|
||||
mCtrlBumpyOffsetV->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyOffsetY, this);
|
||||
|
||||
if (mCtrlBumpyOffsetV)
|
||||
{
|
||||
mCtrlBumpyOffsetV->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyOffsetY, this);
|
||||
}
|
||||
mCtrlShinyOffsetU = getChild<LLSpinCtrl>("shinyOffsetU");
|
||||
mCtrlShinyOffsetU->setCommitCallback(&LLPanelFace::onCommitMaterialShinyOffsetX, this);
|
||||
|
||||
if (mCtrlShinyOffsetU)
|
||||
{
|
||||
mCtrlShinyOffsetU->setCommitCallback(&LLPanelFace::onCommitMaterialShinyOffsetX, this);
|
||||
}
|
||||
mCtrlShinyOffsetV = getChild<LLSpinCtrl>("shinyOffsetV");
|
||||
mCtrlShinyOffsetV->setCommitCallback(&LLPanelFace::onCommitMaterialShinyOffsetY, this);
|
||||
|
||||
if (mCtrlShinyOffsetV)
|
||||
{
|
||||
mCtrlShinyOffsetV->setCommitCallback(&LLPanelFace::onCommitMaterialShinyOffsetY, this);
|
||||
}
|
||||
mCtrlTexRot = getChild<LLSpinCtrl>("TexRot");
|
||||
mCtrlTexRot->setCommitCallback(&LLPanelFace::onCommitTextureRot, this);
|
||||
|
||||
if (mCtrlTexRot)
|
||||
{
|
||||
mCtrlTexRot->setCommitCallback(&LLPanelFace::onCommitTextureRot, this);
|
||||
}
|
||||
mCtrlBumpyRot = getChild<LLSpinCtrl>("bumpyRot");
|
||||
mCtrlBumpyRot->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyRot, this);
|
||||
|
||||
if (mCtrlBumpyRot)
|
||||
{
|
||||
mCtrlBumpyRot->setCommitCallback(&LLPanelFace::onCommitMaterialBumpyRot, this);
|
||||
}
|
||||
mCtrlShinyRot = getChild<LLSpinCtrl>("shinyRot");
|
||||
mCtrlShinyRot->setCommitCallback(&LLPanelFace::onCommitMaterialShinyRot, this);
|
||||
|
||||
if (mCtrlShinyRot)
|
||||
{
|
||||
mCtrlShinyRot->setCommitCallback(&LLPanelFace::onCommitMaterialShinyRot, this);
|
||||
}
|
||||
mCtrlRpt = getChild<LLSpinCtrl>("rptctrl");
|
||||
mCtrlRpt->setCommitCallback(LLPanelFace::onCommitRepeatsPerMeter, this);
|
||||
if (mCtrlRpt)
|
||||
{
|
||||
mCtrlRpt->setCommitCallback(LLPanelFace::onCommitRepeatsPerMeter, this);
|
||||
}
|
||||
|
||||
changePrecision(gSavedSettings.getS32("FSBuildToolDecimalPrecision"));
|
||||
// </FS>
|
||||
|
|
@ -510,11 +544,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
|
|||
{
|
||||
BOOL valid;
|
||||
F32 value;
|
||||
//LLSpinCtrl* ctrlTexScaleS = mPanel->mCtrlTexScaleU;
|
||||
//LLSpinCtrl* ctrlTexScaleT = mPanel->mCtrlTexScaleV;
|
||||
//LLSpinCtrl* ctrlTexOffsetS = mPanel->mCtrlTexOffsetU;
|
||||
//LLSpinCtrl* ctrlTexOffsetT = mPanel->mCtrlTexOffsetV;
|
||||
//LLSpinCtrl* ctrlTexRotation = mPanel->mCtrlTexRot;
|
||||
//LLSpinCtrl* ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>("TexScaleU");
|
||||
//LLSpinCtrl* ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>("TexScaleV");
|
||||
//LLSpinCtrl* ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>("TexOffsetU");
|
||||
//LLSpinCtrl* ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>("TexOffsetV");
|
||||
//LLSpinCtrl* ctrlTexRotation = mPanel->getChild<LLSpinCtrl>("TexRot");
|
||||
LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen");
|
||||
llassert(comboTexGen);
|
||||
llassert(object);
|
||||
|
|
@ -696,7 +730,7 @@ void LLPanelFace::sendTextureInfo()
|
|||
if ((bool)childGetValue("checkbox planar align").asBoolean())
|
||||
{
|
||||
LLFace* last_face = NULL;
|
||||
bool identical_face = false;
|
||||
bool identical_face =false;
|
||||
LLSelectedTE::getFace(last_face, identical_face);
|
||||
LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
|
||||
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
|
||||
|
|
@ -730,14 +764,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
getChildView("button align")->setEnabled(editable);
|
||||
|
||||
// <FS>
|
||||
BOOL enable_material_controls = (!gSavedSettings.getBOOL("FSSyncronizeTextureMaps"));
|
||||
BOOL enable_material_controls = (!gSavedSettings.getBOOL("SyncMaterialSettings"));
|
||||
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
|
||||
BOOL single_volume = ((LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
|
||||
&& (selected_count == 1));
|
||||
getChildView("copytextures")->setEnabled(single_volume && editable);
|
||||
getChildView("pastetextures")->setEnabled(editable);
|
||||
// </FS>
|
||||
|
||||
|
||||
//LLComboBox* combobox_matmedia = getChild<LLComboBox>("combobox matmedia");
|
||||
if (mComboMatMedia)
|
||||
{
|
||||
|
|
@ -767,10 +801,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
}
|
||||
|
||||
mRadioMatType->setEnabled(editable);
|
||||
// <FS:Ansariel> Commented out because we already had this
|
||||
//getChildView("checkbox_sync_settings")->setEnabled(editable);
|
||||
//childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
|
||||
// </FS:Ansariel>
|
||||
getChildView("checkbox_sync_settings")->setEnabled(editable);
|
||||
childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
|
||||
updateVisibility();
|
||||
|
||||
bool identical = true; // true because it is anded below
|
||||
|
|
@ -1077,11 +1109,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
|||
mCtrlBumpyScaleU->setTentative(LLSD(norm_scale_tentative));
|
||||
|
||||
// <FS:CR> FIRE-11407 - Materials alignment
|
||||
// <FS:TS> FIRE-11911 - Synchronize materials doens't work with planar textures
|
||||
// Disable the checkbox if planar textures are in use
|
||||
getChildView("checkbox maps sync")->setEnabled(editable && (specmap_id.notNull() || normmap_id.notNull()) && !align_planar);
|
||||
// </FS:TS> FIRE-11911
|
||||
// </FS:CR>
|
||||
getChildView("checkbox_sync_settings")->setEnabled(editable && (specmap_id.notNull() || normmap_id.notNull()) && !align_planar);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -2233,12 +2261,6 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata )
|
|||
self->sendTextureInfo();
|
||||
// vertical scale and repeats per meter depends on each other, so force set on changes
|
||||
self->updateUI(true);
|
||||
// <FS:CR> Materials alignment
|
||||
if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps"))
|
||||
{
|
||||
alignMaterialsProperties(self);
|
||||
}
|
||||
// </FS:CR>
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -2839,7 +2861,10 @@ void LLPanelFace::onClickMapsSync(LLUICtrl* ctrl, void *userdata)
|
|||
LLPanelFace *self = (LLPanelFace*) userdata;
|
||||
llassert_always(self);
|
||||
self->getState();
|
||||
if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps"))
|
||||
// <FS:Beq> FIRE-21375 use LL setting name as part of the material sync changes (FIRE-21375)
|
||||
// if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps"))
|
||||
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
|
||||
// </FS:Beq>
|
||||
{
|
||||
alignMaterialsProperties(self);
|
||||
}
|
||||
|
|
@ -2942,7 +2967,11 @@ void LLPanelFace::onCommitFlip(const LLUICtrl* ctrl, const LLSD& user_data)
|
|||
{
|
||||
case MATTYPE_DIFFUSE:
|
||||
self->sendTextureInfo();
|
||||
if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps"))
|
||||
// <FS:Beq> FIRE-21375 use LL setting name as part of the material sync changes (FIRE-21375)
|
||||
// if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps"))
|
||||
|
||||
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
|
||||
// </FS:Beq>
|
||||
{
|
||||
alignMaterialsProperties(self);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ void LLPanelLogin::loadLoginPage()
|
|||
params["grid"] = LLGridManager::getInstance()->getGridId();
|
||||
|
||||
// add OS info
|
||||
params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
params["os"] = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
// sourceid
|
||||
params["sourceid"] = gSavedSettings.getString("sourceid");
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldndbutton.h"
|
||||
#include "lleconomy.h"
|
||||
|
|
@ -94,6 +95,9 @@ public:
|
|||
BOOL getCheckSinceLogoff();
|
||||
U32 getDateSearchDirection();
|
||||
|
||||
void onCreatorSelfFilterCommit();
|
||||
void onCreatorOtherFilterCommit();
|
||||
|
||||
static void onTimeAgo(LLUICtrl*, void *);
|
||||
static void onCloseBtn(void* user_data);
|
||||
static void selectAllTypes(void* user_data);
|
||||
|
|
@ -105,6 +109,8 @@ private:
|
|||
LLPanelMainInventory* mPanelMainInventory;
|
||||
LLSpinCtrl* mSpinSinceDays;
|
||||
LLSpinCtrl* mSpinSinceHours;
|
||||
LLCheckBoxCtrl* mCreatorSelf;
|
||||
LLCheckBoxCtrl* mCreatorOthers;
|
||||
LLInventoryFilter* mFilter;
|
||||
};
|
||||
|
||||
|
|
@ -115,11 +121,13 @@ private:
|
|||
LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
|
||||
: LLPanel(p),
|
||||
mActivePanel(NULL),
|
||||
mWornItemsPanel(NULL),
|
||||
mSavedFolderState(NULL),
|
||||
mFilterText(""),
|
||||
mMenuGearDefault(NULL),
|
||||
mMenuAddHandle(),
|
||||
mNeedUploadCost(true)
|
||||
mNeedUploadCost(true),
|
||||
mSearchTypeCombo(NULL) // <FS:Ansariel> Properly initialize this
|
||||
{
|
||||
// Menu Callbacks (non contex menus)
|
||||
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
|
||||
|
|
@ -138,8 +146,8 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
|
|||
// </FS:Zi> Filter Links Menu
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
mCommitCallbackRegistrar.add("Inventory.SearchTarget.Set", boost::bind(&LLPanelMainInventory::onSearchTargetChecked, this, _2));
|
||||
mEnableCallbackRegistrar.add("Inventory.SearchTarget.Check", boost::bind(&LLPanelMainInventory::isSearchTargetChecked, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.SearchType.Set", boost::bind(&LLPanelMainInventory::onSearchTypeChecked, this, _2));
|
||||
mEnableCallbackRegistrar.add("Inventory.SearchType.Check", boost::bind(&LLPanelMainInventory::isSearchTypeChecked, this, _2));
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
// <FS:Zi> Sort By menu handlers
|
||||
|
|
@ -226,30 +234,38 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
|
||||
}
|
||||
|
||||
// <FS:ND> Bring back worn items panel.
|
||||
LLInventoryPanel* worn_items_panel = getChild<LLInventoryPanel>("Worn Items");
|
||||
if (worn_items_panel)
|
||||
LLInventoryPanel* mWornItemsPanel = getChild<LLInventoryPanel>("Worn Items");
|
||||
if (mWornItemsPanel)
|
||||
{
|
||||
worn_items_panel->setWorn(TRUE);
|
||||
worn_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
|
||||
worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
LLInventoryFilter& worn_filter = worn_items_panel->getFilter();
|
||||
worn_filter.setFilterObjectTypes(0xffffffffffffffffULL & ~(0x1 << LLInventoryType::IT_GESTURE | 0x1 << LLInventoryType::IT_CATEGORY));
|
||||
worn_filter.markDefault();
|
||||
U32 filter_types = 0x0;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_WEARABLE;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_ATTACHMENT;
|
||||
filter_types |= 0x1 << LLInventoryType::IT_OBJECT;
|
||||
mWornItemsPanel->setFilterTypes(filter_types);
|
||||
mWornItemsPanel->setFilterWorn();
|
||||
mWornItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
mWornItemsPanel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS);
|
||||
mWornItemsPanel->getFilter().markDefault();
|
||||
mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2));
|
||||
|
||||
// <FS:ND> Do not go all crazy and recurse through the whole inventory
|
||||
// worn_items_panel->openAllFolders();
|
||||
if( worn_items_panel->getRootFolder() )
|
||||
// <FS:Ansariel> Firestorm additions
|
||||
mWornItemsPanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
|
||||
|
||||
if (mWornItemsPanel->getRootFolder())
|
||||
{
|
||||
worn_items_panel->getRootFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_NO);
|
||||
worn_items_panel->getRootFolder()->arrangeAll();
|
||||
mWornItemsPanel->getRootFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_NO);
|
||||
mWornItemsPanel->getRootFolder()->arrangeAll();
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
worn_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, worn_items_panel, _1, _2));
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
// <FS:Ansariel> Only if we actually have it!
|
||||
//mSearchTypeCombo = getChild<LLComboBox>("search_type");
|
||||
mSearchTypeCombo = findChild<LLComboBox>("search_type");
|
||||
// <FS:Ansariel>
|
||||
if(mSearchTypeCombo)
|
||||
{
|
||||
mSearchTypeCombo->setCommitCallback(boost::bind(&LLPanelMainInventory::onSelectSearchType, this));
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
// Now load the stored settings from disk, if available.
|
||||
std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME));
|
||||
LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL;
|
||||
|
|
@ -391,6 +407,16 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
delete mSavedFolderState;
|
||||
}
|
||||
|
||||
LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
|
||||
{
|
||||
return getChild<LLInventoryPanel>("All Items");
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::selectAllItemsPanel()
|
||||
{
|
||||
mFilterTabs->selectFirstTab();
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::startSearch()
|
||||
{
|
||||
// this forces focus to line editor portion of search editor
|
||||
|
|
@ -481,6 +507,55 @@ void LLPanelMainInventory::resetFilters()
|
|||
setFilterTextFromFilter();
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::onSelectSearchType()
|
||||
{
|
||||
std::string new_type = mSearchTypeCombo->getValue();
|
||||
if (new_type == "search_by_name")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_NAME);
|
||||
}
|
||||
if (new_type == "search_by_creator")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_CREATOR);
|
||||
}
|
||||
if (new_type == "search_by_description")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_DESCRIPTION);
|
||||
}
|
||||
if (new_type == "search_by_UUID")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_UUID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::updateSearchTypeCombo()
|
||||
{
|
||||
// <FS:Ansariel> Check if combo box is actually there
|
||||
if (!mSearchTypeCombo)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLInventoryFilter::ESearchType search_type = getActivePanel()->getSearchType();
|
||||
switch(search_type)
|
||||
{
|
||||
case LLInventoryFilter::SEARCHTYPE_CREATOR:
|
||||
mSearchTypeCombo->setValue("search_by_creator");
|
||||
break;
|
||||
case LLInventoryFilter::SEARCHTYPE_DESCRIPTION:
|
||||
mSearchTypeCombo->setValue("search_by_description");
|
||||
break;
|
||||
case LLInventoryFilter::SEARCHTYPE_UUID:
|
||||
mSearchTypeCombo->setValue("search_by_UUID");
|
||||
break;
|
||||
case LLInventoryFilter::SEARCHTYPE_NAME:
|
||||
default:
|
||||
mSearchTypeCombo->setValue("search_by_name");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// <FS:Zi> Sort By menu handlers
|
||||
void LLPanelMainInventory::setSortBy(const LLSD& userdata)
|
||||
{
|
||||
|
|
@ -572,7 +647,10 @@ void LLPanelMainInventory::onClearSearch()
|
|||
{
|
||||
BOOL initially_active = FALSE;
|
||||
LLFloater *finder = getFinder();
|
||||
// <FS:Ansariel> Worn inventory panel
|
||||
//if (mActivePanel && (getActivePanel() != mWornItemsPanel))
|
||||
if (mActivePanel)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// <FS:Ansariel> FIRE-5160: Don't reset inventory filter when clearing search term
|
||||
//initially_active = mActivePanel->getFilter().isNotDefault();
|
||||
|
|
@ -803,6 +881,13 @@ void LLPanelMainInventory::onFilterSelected()
|
|||
return;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Worn inventory panel; We do this at init and only once for performance reasons!
|
||||
//if (getActivePanel() == mWornItemsPanel)
|
||||
//{
|
||||
// mActivePanel->openAllFolders();
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
updateSearchTypeCombo();
|
||||
// <FS:Ansariel> Separate search for inventory tabs from Satomi Ahn (FIRE-913 & FIRE-6862)
|
||||
//setFilterSubString(mFilterSubString);
|
||||
if (!gSavedSettings.getBOOL("FSSplitInventorySearchOverTabs"))
|
||||
|
|
@ -843,7 +928,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
|||
{
|
||||
// Check to see if we are auto scrolling from the last frame
|
||||
// LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
|
||||
// BOOL needsToScroll = panel->getScrollableContainer()->autoScroll(x, y);
|
||||
// BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
|
||||
// if(mFilterTabs)
|
||||
// {
|
||||
// if(needsToScroll)
|
||||
|
|
@ -1036,6 +1121,11 @@ BOOL LLFloaterInventoryFinder::postBuild()
|
|||
mSpinSinceDays = getChild<LLSpinCtrl>("spin_days_ago");
|
||||
childSetCommitCallback("spin_days_ago", onTimeAgo, this);
|
||||
|
||||
mCreatorSelf = getChild<LLCheckBoxCtrl>("check_created_by_me");
|
||||
mCreatorOthers = getChild<LLCheckBoxCtrl>("check_created_by_others");
|
||||
mCreatorSelf->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorSelfFilterCommit, this));
|
||||
mCreatorOthers->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorOtherFilterCommit, this));
|
||||
|
||||
childSetAction("Close", onCloseBtn, this);
|
||||
|
||||
// <FS:Ansariel> FIRE-5160: Don't reset inventory filter when clearing search term
|
||||
|
|
@ -1082,15 +1172,15 @@ void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data)
|
|||
// <FS:Ansariel> FIRE-5160: Don't reset inventory filter when clearing search term
|
||||
void LLFloaterInventoryFinder::onResetBtn()
|
||||
{
|
||||
mFilter->resetDefault();
|
||||
LLInventoryPanel* panel = mPanelMainInventory->getPanel();
|
||||
panel->getFilter().resetDefault();
|
||||
if (panel->getName() == "All Items")
|
||||
{
|
||||
panel->setFilterTypes(0xffffffffffffffffULL);
|
||||
}
|
||||
|
||||
LLInventoryFilter &filter = panel->getFilter();
|
||||
mPanelMainInventory->updateFilterDropdown(&filter);
|
||||
mPanelMainInventory->updateFilterDropdown(mFilter);
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_ALL);
|
||||
|
||||
updateElementsFromFilter();
|
||||
}
|
||||
|
|
@ -1114,6 +1204,10 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
|
|||
U32 hours = mFilter->getHoursAgo();
|
||||
U32 date_search_direction = mFilter->getDateSearchDirection();
|
||||
|
||||
LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreator();
|
||||
bool show_created_by_me = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF));
|
||||
bool show_created_by_others = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS));
|
||||
|
||||
// update the ui elements
|
||||
// <FS:PP> Make floater title translatable
|
||||
// setTitle(mFilter->getName());
|
||||
|
|
@ -1135,6 +1229,10 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
|
|||
getChild<LLUICtrl>("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
|
||||
getChild<LLUICtrl>("check_transferable")->setValue(mFilter->getFilterTransferable()); // <FS:Ansariel> FIRE-19340: search inventory by transferable permission
|
||||
getChild<LLUICtrl>("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
|
||||
|
||||
getChild<LLUICtrl>("check_created_by_me")->setValue(show_created_by_me);
|
||||
getChild<LLUICtrl>("check_created_by_others")->setValue(show_created_by_others);
|
||||
|
||||
getChild<LLUICtrl>("check_since_logoff")->setValue(mFilter->isSinceLogoff());
|
||||
mSpinSinceHours->set((F32)(hours % 24));
|
||||
mSpinSinceDays->set((F32)(hours / 24));
|
||||
|
|
@ -1232,6 +1330,7 @@ void LLFloaterInventoryFinder::draw()
|
|||
mPanelMainInventory->getPanel()->setShowFolderState(getCheckShowEmpty() ?
|
||||
LLInventoryFilter::SHOW_ALL_FOLDERS : LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
mPanelMainInventory->getPanel()->setFilterTypes(filter);
|
||||
|
||||
if (getCheckSinceLogoff())
|
||||
{
|
||||
mSpinSinceDays->set(0);
|
||||
|
|
@ -1262,6 +1361,46 @@ void LLFloaterInventoryFinder::draw()
|
|||
LLPanel::draw();
|
||||
}
|
||||
|
||||
void LLFloaterInventoryFinder::onCreatorSelfFilterCommit()
|
||||
{
|
||||
bool show_creator_self = mCreatorSelf->getValue();
|
||||
bool show_creator_other = mCreatorOthers->getValue();
|
||||
|
||||
if(show_creator_self && show_creator_other)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_ALL);
|
||||
}
|
||||
else if(show_creator_self)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
|
||||
}
|
||||
else if(!show_creator_self || !show_creator_other)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
|
||||
mCreatorOthers->set(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInventoryFinder::onCreatorOtherFilterCommit()
|
||||
{
|
||||
bool show_creator_self = mCreatorSelf->getValue();
|
||||
bool show_creator_other = mCreatorOthers->getValue();
|
||||
|
||||
if(show_creator_self && show_creator_other)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_ALL);
|
||||
}
|
||||
else if(show_creator_other)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
|
||||
}
|
||||
else if(!show_creator_other || !show_creator_self)
|
||||
{
|
||||
mFilter->setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
|
||||
mCreatorSelf->set(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterInventoryFinder::getCheckShowEmpty()
|
||||
{
|
||||
return getChild<LLUICtrl>("check_show_empty")->getValue();
|
||||
|
|
@ -1775,43 +1914,59 @@ BOOL LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata)
|
|||
// </FS:Zi> Filter Links Menu
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
void LLPanelMainInventory::onSearchTargetChecked(const LLSD& userdata)
|
||||
void LLPanelMainInventory::onSearchTypeChecked(const LLSD& userdata)
|
||||
{
|
||||
getActivePanel()->setFilterSubStringTarget(userdata.asString());
|
||||
std::string new_type = userdata.asString();
|
||||
if (new_type == "search_by_name")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_NAME);
|
||||
}
|
||||
if (new_type == "search_by_creator")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_CREATOR);
|
||||
}
|
||||
if (new_type == "search_by_description")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_DESCRIPTION);
|
||||
}
|
||||
if (new_type == "search_by_UUID")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_UUID);
|
||||
}
|
||||
if (new_type == "search_by_all")
|
||||
{
|
||||
getActivePanel()->setSearchType(LLInventoryFilter::SEARCHTYPE_ALL);
|
||||
}
|
||||
resetFilters();
|
||||
}
|
||||
|
||||
LLInventoryFilter::EFilterSubstringTarget LLPanelMainInventory::getSearchTarget() const
|
||||
{
|
||||
return getActivePanel()->getFilterSubStringTarget();
|
||||
}
|
||||
|
||||
BOOL LLPanelMainInventory::isSearchTargetChecked(const LLSD& userdata)
|
||||
BOOL LLPanelMainInventory::isSearchTypeChecked(const LLSD& userdata)
|
||||
{
|
||||
LLInventoryFilter::ESearchType search_type = getActivePanel()->getSearchType();
|
||||
const std::string command_name = userdata.asString();
|
||||
if (command_name == "name")
|
||||
if (command_name == "search_by_name")
|
||||
{
|
||||
return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_NAME);
|
||||
return (search_type == LLInventoryFilter::SEARCHTYPE_NAME);
|
||||
}
|
||||
|
||||
if (command_name == "creator")
|
||||
if (command_name == "search_by_creator")
|
||||
{
|
||||
return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_CREATOR);
|
||||
return (search_type == LLInventoryFilter::SEARCHTYPE_CREATOR);
|
||||
}
|
||||
|
||||
if (command_name == "description")
|
||||
if (command_name == "search_by_description")
|
||||
{
|
||||
return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_DESCRIPTION);
|
||||
return (search_type == LLInventoryFilter::SEARCHTYPE_DESCRIPTION);
|
||||
}
|
||||
|
||||
if (command_name == "uuid")
|
||||
if (command_name == "search_by_UUID")
|
||||
{
|
||||
return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_UUID);
|
||||
return (search_type == LLInventoryFilter::SEARCHTYPE_UUID);
|
||||
}
|
||||
|
||||
if (command_name == "all")
|
||||
if (command_name == "search_by_all")
|
||||
{
|
||||
return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_ALL);
|
||||
return (search_type == LLInventoryFilter::SEARCHTYPE_ALL);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "llfolderview.h"
|
||||
|
||||
class LLComboBox;
|
||||
class LLFolderViewItem;
|
||||
class LLInventoryPanel;
|
||||
class LLSaveFolderState;
|
||||
|
|
@ -81,6 +82,8 @@ public:
|
|||
LLInventoryPanel* getPanel() { return mActivePanel; }
|
||||
LLInventoryPanel* getActivePanel() { return mActivePanel; }
|
||||
const LLInventoryPanel* getActivePanel() const { return mActivePanel; }
|
||||
LLInventoryPanel* getAllItemsPanel();
|
||||
void selectAllItemsPanel();
|
||||
// <FS:Ansariel> FIRE-19493: "Show Original" should open main inventory panel
|
||||
void showAllItemsPanel();
|
||||
void resetFilters();
|
||||
|
|
@ -148,6 +151,8 @@ protected:
|
|||
void onExpandButtonClicked();
|
||||
// </FS:Zi> Inventory Collapse and Expand Buttons
|
||||
void onFocusReceived();
|
||||
void onSelectSearchType();
|
||||
void updateSearchTypeCombo();
|
||||
|
||||
private:
|
||||
LLFloaterInventoryFinder* getFinder();
|
||||
|
|
@ -157,12 +162,14 @@ private:
|
|||
LLUICtrl* mCounterCtrl;
|
||||
LLHandle<LLFloater> mFinderHandle;
|
||||
LLInventoryPanel* mActivePanel;
|
||||
LLInventoryPanel* mWornItemsPanel;
|
||||
bool mResortActivePanel;
|
||||
LLSaveFolderState* mSavedFolderState;
|
||||
std::string mFilterText;
|
||||
std::string mFilterSubString;
|
||||
S32 mItemCount;
|
||||
std::string mItemCountString;
|
||||
LLComboBox* mSearchTypeCombo;
|
||||
|
||||
// <FS:Zi> Filter dropdown
|
||||
LLComboBox* mFilterComboBox;
|
||||
|
|
@ -189,9 +196,8 @@ protected:
|
|||
// </FS:Zi> Filter Links Menu
|
||||
|
||||
// <FS:Zi> Extended Inventory Search
|
||||
BOOL isSearchTargetChecked(const LLSD& userdata);
|
||||
void onSearchTargetChecked(const LLSD& userdata);
|
||||
LLInventoryFilter::EFilterSubstringTarget getSearchTarget() const;
|
||||
BOOL isSearchTypeChecked(const LLSD& userdata);
|
||||
void onSearchTypeChecked(const LLSD& userdata);
|
||||
// </FS:Zi> Extended Inventory Search
|
||||
|
||||
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
|
||||
|
|
|
|||
|
|
@ -2126,7 +2126,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
|
|||
if (mObject->isRootEdit())
|
||||
{
|
||||
// only offset by parent's translation
|
||||
mObject->resetChildrenPosition(LLVector3(-delta), TRUE) ;
|
||||
mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ;
|
||||
}
|
||||
|
||||
if(!btn_down)
|
||||
|
|
|
|||
|
|
@ -115,6 +115,11 @@ public:
|
|||
virtual const std::string& getDisplayName() const;
|
||||
virtual const std::string& getSearchableName() const;
|
||||
|
||||
virtual std::string getSearchableDescription() const {return LLStringUtil::null;}
|
||||
virtual std::string getSearchableCreatorName() const {return LLStringUtil::null;}
|
||||
virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;}
|
||||
virtual std::string getSearchableAll() const { return LLStringUtil::null; } // <FS:Ansariel> Zi's extended inventory search
|
||||
|
||||
virtual PermissionMask getPermissionMask() const { return PERM_NONE; }
|
||||
/*virtual*/ LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; }
|
||||
virtual const LLUUID& getUUID() const { return mUUID; }
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ bool LLPanelWearing::populateAttachmentsList(bool update)
|
|||
void LLPanelWearing::requestAttachmentDetails()
|
||||
{
|
||||
LLSD body;
|
||||
std::string url = gAgent.getRegion()->getCapability("AttachmentResources");
|
||||
std::string url = gAgent.getRegionCapability("AttachmentResources");
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLPanelWearing::getAttachmentLimitsCoro",
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ LLPreview::LLPreview(const LLSD& key)
|
|||
mUserResized(FALSE),
|
||||
mCloseAfterSave(FALSE),
|
||||
mAssetStatus(PREVIEW_ASSET_UNLOADED),
|
||||
mDirty(TRUE)
|
||||
mDirty(TRUE),
|
||||
mSaveDialogShown(FALSE)
|
||||
{
|
||||
mAuxItem = new LLInventoryItem;
|
||||
// don't necessarily steal focus on creation -- sometimes these guys pop up without user action
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ protected:
|
|||
// for LLInventoryObserver
|
||||
virtual void changed(U32 mask);
|
||||
BOOL mDirty;
|
||||
|
||||
BOOL mSaveDialogShown;
|
||||
|
||||
protected:
|
||||
LLUUID mItemUUID;
|
||||
|
||||
|
|
|
|||
|
|
@ -148,6 +148,12 @@ void LLPreviewAnim::draw()
|
|||
}
|
||||
if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
|
||||
{
|
||||
const LLInventoryItem *item = getItem();
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
|
||||
if (item && motion)
|
||||
{
|
||||
motion->setName(item->getName());
|
||||
}
|
||||
this->mDidStart = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,9 +234,13 @@ BOOL LLPreviewGesture::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
|
||||
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
|
||||
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -264,6 +268,7 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility )
|
|||
|
||||
bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch(option)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,9 +175,12 @@ BOOL LLPreviewNotecard::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
|
||||
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -679,6 +682,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
|
|||
|
||||
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch(option)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -429,7 +429,8 @@ LLScriptEdCore::LLScriptEdCore(
|
|||
// </FS:CR>
|
||||
mCompiling(false), //<FS:KC> Compile indicators, recompile button
|
||||
mHasScriptData(FALSE),
|
||||
mScriptRemoved(FALSE)
|
||||
mScriptRemoved(FALSE),
|
||||
mSaveDialogShown(FALSE)
|
||||
{
|
||||
setFollowsAll();
|
||||
setBorderVisible(FALSE);
|
||||
|
|
@ -1286,8 +1287,12 @@ BOOL LLScriptEdCore::canClose()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
|
||||
if(!mSaveDialogShown)
|
||||
{
|
||||
mSaveDialogShown = TRUE;
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1301,6 +1306,7 @@ void LLScriptEdCore::setEnableEditing(bool enable)
|
|||
|
||||
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
|
||||
{
|
||||
mSaveDialogShown = FALSE;
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch( option )
|
||||
{
|
||||
|
|
@ -1696,7 +1702,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data )
|
|||
|
||||
std::string filename = file_picker.getFirstFile();
|
||||
|
||||
std::ifstream fin(filename.c_str());
|
||||
llifstream fin(filename.c_str());
|
||||
|
||||
std::string line;
|
||||
std::string text;
|
||||
|
|
@ -1734,7 +1740,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata )
|
|||
{
|
||||
std::string filename = file_picker.getFirstFile();
|
||||
std::string scriptText=self->mEditor->getText();
|
||||
std::ofstream fout(filename.c_str());
|
||||
llofstream fout(filename.c_str());
|
||||
fout<<(scriptText);
|
||||
fout.close();
|
||||
// <FS:Ansariel> FIRE-7514: Script in external editor needs to be saved twice
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ private:
|
|||
LLLiveLSLFile* mLiveFile;
|
||||
LLUUID mAssociatedExperience;
|
||||
BOOL mScriptRemoved;
|
||||
BOOL mSaveDialogShown;
|
||||
LLTextBox* mLineCol;
|
||||
// <FS:CR> Advanced Script Editor
|
||||
//LLView* mSaveBtn;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ LLProductInfoRequestManager::LLProductInfoRequestManager():
|
|||
|
||||
void LLProductInfoRequestManager::initSingleton()
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("ProductInfoRequest");
|
||||
std::string url = gAgent.getRegionCapability("ProductInfoRequest");
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLProductInfoRequestManager::getLandDescriptionsCoro",
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
|
|||
|
||||
LL_INFOS("SceneMonitor") << "Saving scene load stats to " << file_name << LL_ENDL;
|
||||
|
||||
std::ofstream os(file_name.c_str());
|
||||
llofstream os(file_name.c_str());
|
||||
|
||||
os << std::setprecision(10);
|
||||
|
||||
|
|
|
|||
|
|
@ -746,6 +746,19 @@ LLInventoryPanel *LLSidepanelInventory::getActivePanel()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void LLSidepanelInventory::selectAllItemsPanel()
|
||||
{
|
||||
if (!getVisible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (mInventoryPanel->getVisible())
|
||||
{
|
||||
mPanelMainInventory->selectAllItemsPanel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
|
||||
{
|
||||
return mInventoryPanel->getVisible();
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public:
|
|||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
|
||||
void selectAllItemsPanel();
|
||||
LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox.get(); }
|
||||
|
||||
LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; }
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
|
|||
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
|
||||
if (!speakerp) return;
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "mute update";
|
||||
data["session-id"] = getSessionID();
|
||||
|
|
@ -850,7 +850,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
|
|||
// do not send voice moderation changes for avatars not in voice channel
|
||||
if (!is_in_voice) return;
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "mute update";
|
||||
data["session-id"] = getSessionID();
|
||||
|
|
@ -930,7 +930,7 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update)
|
|||
|
||||
void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice)
|
||||
{
|
||||
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
|
||||
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
|
||||
LLSD data;
|
||||
data["method"] = "session update";
|
||||
data["session-id"] = session_id;
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ bool idle_startup()
|
|||
const std::string delims (" ");
|
||||
std::string system;
|
||||
int begIdx, endIdx;
|
||||
std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
|
||||
std::string osString = LLOSInfo::instance().getOSStringSimple();
|
||||
|
||||
begIdx = osString.find_first_not_of (delims);
|
||||
endIdx = osString.find_first_of (delims, begIdx);
|
||||
|
|
@ -1213,7 +1213,8 @@ bool idle_startup()
|
|||
|
||||
// Don't do anything. Wait for the login view to call the login_callback,
|
||||
// which will push us to the next state.
|
||||
display_startup();
|
||||
|
||||
// display() function will be the one to run display_startup()
|
||||
// Sleep so we don't spin the CPU
|
||||
ms_sleep(1);
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "llapr.h"
|
||||
#include "lldir.h"
|
||||
#include "llimage.h"
|
||||
#include "llimagej2c.h" // for version control
|
||||
#include "lllfsthread.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
|
|
@ -938,6 +939,14 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id)
|
|||
F32 LLTextureCache::sHeaderCacheVersion = 1.7f;
|
||||
U32 LLTextureCache::sCacheMaxEntries = 1024 * 1024; //~1 million textures.
|
||||
S64 LLTextureCache::sCacheMaxTexturesSize = 0; // no limit
|
||||
std::string LLTextureCache::sHeaderCacheEncoderVersion = LLImageJ2C::getEngineInfo();
|
||||
|
||||
#if defined(ADDRESS_SIZE)
|
||||
U32 LLTextureCache::sHeaderCacheAddressSize = ADDRESS_SIZE;
|
||||
#else
|
||||
U32 LLTextureCache::sHeaderCacheAddressSize = 32;
|
||||
#endif
|
||||
|
||||
const char* entries_filename = "texture.entries";
|
||||
const char* cache_filename = "texture.cache";
|
||||
const char* old_textures_dirname = "textures";
|
||||
|
|
@ -1085,12 +1094,28 @@ void LLTextureCache::readEntriesHeader()
|
|||
}
|
||||
else //create an empty entries header.
|
||||
{
|
||||
mHeaderEntriesInfo.mVersion = sHeaderCacheVersion ;
|
||||
mHeaderEntriesInfo.mEntries = 0 ;
|
||||
setEntriesHeader();
|
||||
writeEntriesHeader() ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLTextureCache::setEntriesHeader()
|
||||
{
|
||||
if (sHeaderEncoderStringSize < sHeaderCacheEncoderVersion.size() + 1)
|
||||
{
|
||||
// For simplicity we use predefined size of header, so if version string
|
||||
// doesn't fit, either getEngineInfo() returned malformed string or
|
||||
// sHeaderEncoderStringSize need to be increased.
|
||||
// Also take into accout that c_str() returns additional null character
|
||||
LL_ERRS() << "Version string doesn't fit in header" << LL_ENDL;
|
||||
}
|
||||
|
||||
mHeaderEntriesInfo.mVersion = sHeaderCacheVersion;
|
||||
mHeaderEntriesInfo.mAdressSize = sHeaderCacheAddressSize;
|
||||
strcpy(mHeaderEntriesInfo.mEncoderVersion, sHeaderCacheEncoderVersion.c_str());
|
||||
mHeaderEntriesInfo.mEntries = 0;
|
||||
}
|
||||
|
||||
void LLTextureCache::writeEntriesHeader()
|
||||
{
|
||||
llassert_always(mHeaderAPRFile == NULL);
|
||||
|
|
@ -1444,10 +1469,13 @@ void LLTextureCache::readHeaderCache()
|
|||
|
||||
readEntriesHeader();
|
||||
|
||||
if (mHeaderEntriesInfo.mVersion != sHeaderCacheVersion)
|
||||
if (mHeaderEntriesInfo.mVersion != sHeaderCacheVersion
|
||||
|| mHeaderEntriesInfo.mAdressSize != sHeaderCacheAddressSize
|
||||
|| strcmp(mHeaderEntriesInfo.mEncoderVersion, sHeaderCacheEncoderVersion.c_str()) != 0)
|
||||
{
|
||||
if (!mReadOnly)
|
||||
{
|
||||
LL_INFOS() << "Texture Cache version mismatch, Purging." << LL_ENDL;
|
||||
purgeAllTextures(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1612,13 +1640,17 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
|
|||
}
|
||||
}
|
||||
// <FS:Ansariel> Only delete folder if it actually exist
|
||||
//if (purge_directories)
|
||||
if (purge_directories && LLFile::isdir(mTexturesDirName))
|
||||
// </FS:Ansariel>
|
||||
if (LLFile::isdir(mTexturesDirName))
|
||||
{
|
||||
// </FS:Ansariel>
|
||||
gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); // headers, fast cache
|
||||
if (purge_directories)
|
||||
{
|
||||
gDirUtilp->deleteFilesInDir(mTexturesDirName, mask);
|
||||
LLFile::rmdir(mTexturesDirName);
|
||||
}
|
||||
// <FS:Ansariel> Only delete folder if it actually exist
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
mHeaderIDMap.clear();
|
||||
|
|
@ -1629,8 +1661,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories)
|
|||
mUpdatedEntryMap.clear();
|
||||
|
||||
// Info with 0 entries
|
||||
mHeaderEntriesInfo.mVersion = sHeaderCacheVersion;
|
||||
mHeaderEntriesInfo.mEntries = 0;
|
||||
setEntriesHeader();
|
||||
writeEntriesHeader();
|
||||
|
||||
LL_INFOS() << "The entire texture cache is cleared." << LL_ENDL ;
|
||||
|
|
@ -1998,15 +2029,13 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
|
|||
if(w * h *c > 0) //valid
|
||||
{
|
||||
//make a duplicate to keep the original raw image untouched.
|
||||
raw = raw->duplicate();
|
||||
raw = raw->scaled(w, h);
|
||||
if (raw->isBufferInvalid())
|
||||
{
|
||||
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
raw->scale(w, h) ;
|
||||
|
||||
discardlevel += i ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,13 @@ class LLTextureCache : public LLWorkerThread
|
|||
|
||||
private:
|
||||
// Entries
|
||||
static const U32 sHeaderEncoderStringSize = 32;
|
||||
struct EntriesInfo
|
||||
{
|
||||
EntriesInfo() : mVersion(0.f), mEntries(0) {}
|
||||
EntriesInfo() : mVersion(0.f), mAdressSize(0), mEntries(0) { memset(mEncoderVersion, 0, sHeaderEncoderStringSize); }
|
||||
F32 mVersion;
|
||||
U32 mAdressSize;
|
||||
char mEncoderVersion[sHeaderEncoderStringSize];
|
||||
U32 mEntries;
|
||||
};
|
||||
struct Entry
|
||||
|
|
@ -156,6 +159,7 @@ private:
|
|||
LLAPRFile* openHeaderEntriesFile(bool readonly, S32 offset);
|
||||
void closeHeaderEntriesFile();
|
||||
void readEntriesHeader();
|
||||
void setEntriesHeader();
|
||||
void writeEntriesHeader();
|
||||
S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create);
|
||||
bool updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 new_body_size);
|
||||
|
|
@ -226,6 +230,8 @@ private:
|
|||
|
||||
// Statics
|
||||
static F32 sHeaderCacheVersion;
|
||||
static U32 sHeaderCacheAddressSize;
|
||||
static std::string sHeaderCacheEncoderVersion;
|
||||
static U32 sCacheMaxEntries;
|
||||
static S64 sCacheMaxTexturesSize;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2580,7 +2580,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
|
|||
mTextureInfoMainThread(false)
|
||||
{
|
||||
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
|
||||
mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold")));
|
||||
mTextureInfo.setLogging(true);
|
||||
|
||||
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
|
||||
mHttpRequest = new LLCore::HttpRequest;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,19 @@
|
|||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llmeshrepository.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lltextureinfo.h"
|
||||
#include "lltexturecache.h"
|
||||
#include "lltexturefetch.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltrace.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llvocache.h"
|
||||
#include "llworld.h"
|
||||
|
||||
static LLTrace::CountStatHandle<S32> sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated");
|
||||
static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed");
|
||||
|
|
@ -37,10 +46,8 @@ static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_
|
|||
static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures");
|
||||
|
||||
LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
|
||||
mLogTextureDownloadsToViewerLog(false),
|
||||
mLogTextureDownloadsToSimulator(false),
|
||||
mTextureDownloadProtocol("NONE"),
|
||||
mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100))
|
||||
mLoggingEnabled(false),
|
||||
mTextureDownloadProtocol("NONE")
|
||||
{
|
||||
if (!postponeStartRecoreder)
|
||||
{
|
||||
|
|
@ -48,11 +55,9 @@ LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
|
|||
}
|
||||
}
|
||||
|
||||
void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold)
|
||||
void LLTextureInfo::setLogging(bool log_info)
|
||||
{
|
||||
mLogTextureDownloadsToViewerLog = writeToViewerLog;
|
||||
mLogTextureDownloadsToSimulator = sendToSim;
|
||||
mTextureLogThreshold = U32Bytes(textureLogThreshold);
|
||||
mLoggingEnabled = log_info;
|
||||
}
|
||||
|
||||
LLTextureInfo::~LLTextureInfo()
|
||||
|
|
@ -147,36 +152,80 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
|
|||
break;
|
||||
}
|
||||
|
||||
if (mLogTextureDownloadsToViewerLog)
|
||||
if (mLoggingEnabled)
|
||||
{
|
||||
LL_INFOS() << "texture=" << id
|
||||
<< " start=" << details.mStartTime
|
||||
<< " end=" << details.mCompleteTime
|
||||
<< " size=" << details.mSize
|
||||
<< " offset=" << details.mOffset
|
||||
<< " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime)
|
||||
<< " protocol=" << protocol
|
||||
<< LL_ENDL;
|
||||
}
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings, "LogTextureDownloadsToViewerLog", false);
|
||||
static LLCachedControl<bool> log_to_simulator(gSavedSettings, "LogTextureDownloadsToSimulator", false);
|
||||
static LLCachedControl<U32> texture_log_threshold(gSavedSettings, "TextureLoggingThreshold", 1);
|
||||
|
||||
if(mLogTextureDownloadsToSimulator)
|
||||
{
|
||||
add(sTextureDataDownloaded, details.mSize);
|
||||
add(sTexureDownloadTime, details.mCompleteTime - details.mStartTime);
|
||||
add(sTextureDownloadsCompleted, 1);
|
||||
mTextureDownloadProtocol = protocol;
|
||||
if (mRecording.getSum(sTextureDataDownloaded) >= mTextureLogThreshold)
|
||||
if (log_to_viewer_log)
|
||||
{
|
||||
LLSD texture_data;
|
||||
std::stringstream startTime;
|
||||
startTime << mCurrentStatsBundleStartTime;
|
||||
texture_data["start_time"] = startTime.str();
|
||||
std::stringstream endTime;
|
||||
endTime << completeTime;
|
||||
texture_data["end_time"] = endTime.str();
|
||||
texture_data["averages"] = getAverages();
|
||||
send_texture_stats_to_sim(texture_data);
|
||||
resetTextureStatistics();
|
||||
LL_INFOS() << "texture=" << id
|
||||
<< " start=" << details.mStartTime
|
||||
<< " end=" << details.mCompleteTime
|
||||
<< " size=" << details.mSize
|
||||
<< " offset=" << details.mOffset
|
||||
<< " length=" << U32Milliseconds(details.mCompleteTime - details.mStartTime)
|
||||
<< " protocol=" << protocol
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
if(log_to_simulator)
|
||||
{
|
||||
add(sTextureDataDownloaded, details.mSize);
|
||||
add(sTexureDownloadTime, details.mCompleteTime - details.mStartTime);
|
||||
add(sTextureDownloadsCompleted, 1);
|
||||
mTextureDownloadProtocol = protocol;
|
||||
if (mRecording.getSum(sTextureDataDownloaded) >= U32Bytes(texture_log_threshold))
|
||||
{
|
||||
LLSD texture_data;
|
||||
std::stringstream startTime;
|
||||
startTime << mCurrentStatsBundleStartTime;
|
||||
texture_data["start_time"] = startTime.str();
|
||||
std::stringstream endTime;
|
||||
endTime << completeTime;
|
||||
texture_data["end_time"] = endTime.str();
|
||||
texture_data["averages"] = getAverages();
|
||||
|
||||
// Texture cache
|
||||
LLSD texture_cache;
|
||||
U32 cache_read = 0, cache_write = 0, res_wait = 0;
|
||||
F64 cache_hit_rate = 0;
|
||||
LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
|
||||
if (cache_read > 0 || cache_write > 0)
|
||||
{
|
||||
cache_hit_rate = cache_read / (cache_read + cache_write);
|
||||
}
|
||||
texture_cache["cache_read"] = LLSD::Integer(cache_read);
|
||||
texture_cache["cache_write"] = LLSD::Integer(cache_write);
|
||||
texture_cache["hit_rate"] = LLSD::Real(cache_hit_rate);
|
||||
texture_cache["entries"] = LLSD::Integer(LLAppViewer::getTextureCache()->getEntries());
|
||||
texture_cache["space_max"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getMaxUsage().value()); // bytes
|
||||
texture_cache["space_used"] = ll_sd_from_U64((U64)LLAppViewer::getTextureCache()->getUsage().value()); // bytes
|
||||
texture_data["texture_cache"] = texture_cache;
|
||||
|
||||
// VO and mesh cache
|
||||
LLSD object_cache;
|
||||
object_cache["vo_entries_max"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntriesMax());
|
||||
object_cache["vo_entries_curent"] = LLSD::Integer(LLVOCache::getInstance()->getCacheEntries());
|
||||
object_cache["vo_active_entries"] = LLSD::Integer(LLWorld::getInstance()->getNumOfActiveCachedObjects());
|
||||
U64 region_hit_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheHitCount() : 0;
|
||||
U64 region_miss_count = gAgent.getRegion() != NULL ? gAgent.getRegion()->getRegionCacheMissCount() : 0;
|
||||
F64 region_vocache_hit_rate = 0;
|
||||
if (region_hit_count > 0 || region_miss_count > 0)
|
||||
{
|
||||
region_vocache_hit_rate = region_hit_count / (region_hit_count + region_miss_count);
|
||||
}
|
||||
object_cache["vo_region_hitcount"] = ll_sd_from_U64(region_hit_count);
|
||||
object_cache["vo_region_misscount"] = ll_sd_from_U64(region_miss_count);
|
||||
object_cache["vo_region_hitrate"] = LLSD::Real(region_vocache_hit_rate);
|
||||
object_cache["mesh_reads"] = LLSD::Integer(LLMeshRepository::sCacheReads);
|
||||
object_cache["mesh_writes"] = LLSD::Integer(LLMeshRepository::sCacheWrites);
|
||||
texture_data["object_cache"] = object_cache;
|
||||
|
||||
send_texture_stats_to_sim(texture_data);
|
||||
resetTextureStatistics();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
LLTextureInfo(bool postponeStartRecoreder = true);
|
||||
~LLTextureInfo();
|
||||
|
||||
void setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold);
|
||||
void setLogging(bool log_info);
|
||||
bool has(const LLUUID& id);
|
||||
void setRequestStartTime(const LLUUID& id, U64 startTime);
|
||||
void setRequestSize(const LLUUID& id, U32 size);
|
||||
|
|
@ -61,12 +61,11 @@ private:
|
|||
|
||||
std::map<LLUUID, LLTextureInfoDetails *> mTextures;
|
||||
LLSD mAverages;
|
||||
bool mLogTextureDownloadsToViewerLog,
|
||||
mLogTextureDownloadsToSimulator;
|
||||
bool mLoggingEnabled;
|
||||
std::string mTextureDownloadProtocol;
|
||||
U32Bytes mTextureLogThreshold;
|
||||
U64Microseconds mCurrentStatsBundleStartTime;
|
||||
LLTrace::Recording mRecording;
|
||||
|
||||
};
|
||||
|
||||
#endif // LL_LLTEXTUREINFO_H
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llagent.h"
|
||||
#include "lltexturefetch.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llcorehttputil.h"
|
||||
|
||||
|
|
@ -45,6 +46,8 @@ void send_texture_stats_to_sim(const LLSD &texture_stats)
|
|||
LLUUID agent_id = gAgent.getID();
|
||||
texture_stats_report["agent_id"] = agent_id;
|
||||
texture_stats_report["region_id"] = gAgent.getRegion()->getRegionID();
|
||||
texture_stats_report["viewer_channel"] = LLVersionInfo::getChannel();
|
||||
texture_stats_report["viewer_version"] = LLVersionInfo::getVersion();
|
||||
texture_stats_report["stats_data"] = texture_stats;
|
||||
|
||||
std::string texture_cap_url = gAgent.getRegion()->getCapability("TextureStats");
|
||||
|
|
|
|||
|
|
@ -526,7 +526,8 @@ void LLToolPie::walkToClickedLocation()
|
|||
mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
|
||||
mAutoPilotDestination->setDuration(3.f);
|
||||
|
||||
handle_go_to();
|
||||
LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
|
||||
gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE);
|
||||
}
|
||||
|
||||
// When we get object properties after left-clicking on an object
|
||||
|
|
|
|||
|
|
@ -1780,67 +1780,64 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
|
|||
LLPointer<LLViewerInventoryCategory> cat = gInventory.getCategory(id);
|
||||
if (cat.notNull())
|
||||
{
|
||||
if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode())
|
||||
if (LLClipboard::instance().hasContents())
|
||||
{
|
||||
// Something on the clipboard is in "cut mode" and needs to be preserved
|
||||
LL_DEBUGS(LOG_INV) << "purge_descendents_of clipboard case " << cat->getName()
|
||||
<< " iterate and purge non hidden items" << LL_ENDL;
|
||||
LLInventoryModel::cat_array_t* categories;
|
||||
LLInventoryModel::item_array_t* items;
|
||||
// Get the list of direct descendants in tha categoy passed as argument
|
||||
gInventory.getDirectDescendentsOf(id, categories, items);
|
||||
std::vector<LLUUID> list_uuids;
|
||||
// Make a unique list with all the UUIDs of the direct descendants (items and categories are not treated differently)
|
||||
// Note: we need to do that shallow copy as purging things will invalidate the categories or items lists
|
||||
for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); it != categories->end(); ++it)
|
||||
// Remove items from clipboard or it will remain active even if there is nothing to paste/copy
|
||||
LLInventoryModel::cat_array_t categories;
|
||||
LLInventoryModel::item_array_t items;
|
||||
gInventory.collectDescendents(id, categories, items, TRUE);
|
||||
|
||||
for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it)
|
||||
{
|
||||
list_uuids.push_back((*it)->getUUID());
|
||||
}
|
||||
for (LLInventoryModel::item_array_t::const_iterator it = items->begin(); it != items->end(); ++it)
|
||||
{
|
||||
list_uuids.push_back((*it)->getUUID());
|
||||
}
|
||||
// Iterate through the list and only purge the UUIDs that are not on the clipboard
|
||||
for (std::vector<LLUUID>::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it)
|
||||
{
|
||||
if (!LLClipboard::instance().isOnClipboard(*it))
|
||||
if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
|
||||
{
|
||||
remove_inventory_object(*it, NULL);
|
||||
// No sense in removing single items, partial 'paste' will result in confusion only
|
||||
LLClipboard::instance().reset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (LLClipboard::instance().hasContents())
|
||||
{
|
||||
for (LLInventoryModel::item_array_t::const_iterator it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
|
||||
{
|
||||
LLClipboard::instance().reset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (AISAPI::isAvailable())
|
||||
{
|
||||
if (AISAPI::isAvailable())
|
||||
if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
|
||||
{
|
||||
if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
|
||||
{
|
||||
LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
|
||||
}
|
||||
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
|
||||
AISAPI::PurgeDescendents(id, cr);
|
||||
LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
|
||||
}
|
||||
else // no cap
|
||||
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
|
||||
AISAPI::PurgeDescendents(id, cr);
|
||||
}
|
||||
else // no cap
|
||||
{
|
||||
// Fast purge
|
||||
LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
|
||||
|
||||
// send it upstream
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("PurgeInventoryDescendents");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", gAgent.getID());
|
||||
msg->addUUID("SessionID", gAgent.getSessionID());
|
||||
msg->nextBlock("InventoryData");
|
||||
msg->addUUID("FolderID", id);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
// Update model immediately because there is no callback mechanism.
|
||||
gInventory.onDescendentsPurgedFromServer(id);
|
||||
if (cb)
|
||||
{
|
||||
// Fast purge
|
||||
LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
|
||||
|
||||
// send it upstream
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessage("PurgeInventoryDescendents");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", gAgent.getID());
|
||||
msg->addUUID("SessionID", gAgent.getSessionID());
|
||||
msg->nextBlock("InventoryData");
|
||||
msg->addUUID("FolderID", id);
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
// Update model immediately because there is no callback mechanism.
|
||||
gInventory.onDescendentsPurgedFromServer(id);
|
||||
if (cb)
|
||||
{
|
||||
cb->fire(id);
|
||||
}
|
||||
cb->fire(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
gDebugView->mDebugConsolep->setVisible(TRUE);
|
||||
std::string info_type = userdata.asString();
|
||||
if ("region" == info_type)
|
||||
{
|
||||
|
|
@ -10081,7 +10082,7 @@ void handle_report_bug(const LLSD& param)
|
|||
|
||||
LLStringUtil::format_map_t replace;
|
||||
// <FS:Ansariel> FIRE-14001: JIRA report is being cut off when using Help -> Report Bug
|
||||
//replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString());
|
||||
//replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getShortViewerInfoString());
|
||||
LLSD sysinfo = FSData::getSystemInfo();
|
||||
replace["[ENVIRONMENT]"] = LLURI::escape(sysinfo["Part1"].asString().substr(1) + sysinfo["Part2"].asString().substr(1));
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
|
|
@ -1100,7 +1100,7 @@ void upload_new_resource(
|
|||
// uploadInfo->setTransactionId(tid);
|
||||
|
||||
|
||||
std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory");
|
||||
std::string url = gAgent.getRegionCapability("NewFileAgentInventory");
|
||||
|
||||
if ( !url.empty() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4531,7 +4531,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(from_id, &av_name))
|
||||
{
|
||||
chat.mFromName = av_name.getDisplayName();
|
||||
chat.mFromName = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -8857,14 +8857,10 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
|
|||
// Get the message ID
|
||||
msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id);
|
||||
big_reason = LLAgent::sTeleportErrorMessages[message_id];
|
||||
if ( big_reason.size() > 0 )
|
||||
{ // Substitute verbose reason from the local map
|
||||
args["REASON"] = big_reason;
|
||||
}
|
||||
else
|
||||
{ // Nothing found in the map - use what the server returned in the original message block
|
||||
if ( big_reason.size() <= 0 )
|
||||
{
|
||||
// Nothing found in the map - use what the server returned in the original message block
|
||||
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason);
|
||||
args["REASON"] = big_reason;
|
||||
}
|
||||
|
||||
LLSD llsd_block;
|
||||
|
|
@ -8879,6 +8875,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(llsd_block.has("REGION_NAME"))
|
||||
{
|
||||
std::string region_name = llsd_block["REGION_NAME"].asString();
|
||||
if(!region_name.empty())
|
||||
{
|
||||
LLStringUtil::format_map_t name_args;
|
||||
name_args["[REGION_NAME]"] = region_name;
|
||||
LLStringUtil::format(big_reason, name_args);
|
||||
}
|
||||
}
|
||||
// change notification name in this special case
|
||||
if (handle_teleport_access_blocked(llsd_block, message_id, args["REASON"]))
|
||||
{
|
||||
|
|
@ -8890,7 +8896,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
args["REASON"] = big_reason;
|
||||
}
|
||||
else
|
||||
{ // Extra message payload not found - use what the simulator sent
|
||||
|
|
|
|||
|
|
@ -6321,7 +6321,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater
|
|||
}
|
||||
|
||||
//counter-translation
|
||||
void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified)
|
||||
void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified, BOOL skip_avatar_child)
|
||||
{
|
||||
if(mChildList.empty())
|
||||
{
|
||||
|
|
@ -6351,6 +6351,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
|
|||
iter != mChildList.end(); iter++)
|
||||
{
|
||||
LLViewerObject* childp = *iter;
|
||||
|
||||
if (!childp->isSelected() && childp->mDrawable.notNull())
|
||||
{
|
||||
if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
|
||||
|
|
@ -6360,14 +6361,16 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
|
|||
}
|
||||
else //avatar
|
||||
{
|
||||
LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
|
||||
if(!skip_avatar_child)
|
||||
{
|
||||
LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ;
|
||||
|
||||
((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
|
||||
((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
|
||||
|
||||
LLManip::rebuild(childp);
|
||||
}
|
||||
}
|
||||
((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos);
|
||||
((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos);
|
||||
LLManip::rebuild(childp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ;
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ public:
|
|||
|
||||
public:
|
||||
//counter-translation
|
||||
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ;
|
||||
void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ;
|
||||
//counter-rotation
|
||||
void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations,
|
||||
const std::vector<LLVector3>& positions) ;
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
|
|||
// *TODO: I can not find any active code where this method is called...
|
||||
void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
|
||||
{
|
||||
std::string region_url = gAgent.getRegion()->getCapability("ParcelNavigateMedia");
|
||||
std::string region_url = gAgent.getRegionCapability("ParcelNavigateMedia");
|
||||
if (!region_url.empty())
|
||||
{
|
||||
// send navigate event to sim for link sharing
|
||||
|
|
|
|||
|
|
@ -546,6 +546,8 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
|||
mLastVisitedEntry(NULL),
|
||||
mInvisibilityCheckHistory(-1),
|
||||
mPaused(FALSE),
|
||||
mRegionCacheHitCount(0),
|
||||
mRegionCacheMissCount(0),
|
||||
// <FS:CR> Aurora Sim
|
||||
mWidth(region_width_meters),
|
||||
mWidthScaleFactor(region_width_meters / REGION_WIDTH_METERS) // <FS:Ansariel> FIRE-19563: Scaling for OpenSim VarRegions
|
||||
|
|
@ -2627,6 +2629,7 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id, bool valid)
|
|||
|
||||
void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type)
|
||||
{
|
||||
mRegionCacheMissCount++;
|
||||
#if 0
|
||||
mCacheMissList.insert(CacheMissItem(id, miss_type));
|
||||
#else
|
||||
|
|
@ -2678,6 +2681,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
|
|||
if (entry->getCRC() == crc)
|
||||
{
|
||||
// Record a hit
|
||||
mRegionCacheHitCount++;
|
||||
entry->recordHit();
|
||||
cache_miss_type = CACHE_MISS_TYPE_NONE;
|
||||
entry->setUpdateFlags(flags);
|
||||
|
|
|
|||
|
|
@ -363,6 +363,8 @@ public:
|
|||
LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
|
||||
LLVOCacheEntry* getCacheEntry(U32 local_id, bool valid = true);
|
||||
bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type);
|
||||
U64 getRegionCacheHitCount() { return mRegionCacheHitCount; }
|
||||
U64 getRegionCacheMissCount() { return mRegionCacheMissCount; }
|
||||
void requestCacheMisses();
|
||||
void addCacheMissFull(const U32 local_id);
|
||||
//update object cache if the object receives a full-update or terse update
|
||||
|
|
@ -574,7 +576,9 @@ private:
|
|||
typedef std::list<CacheMissItem> cache_miss_list_t;
|
||||
};
|
||||
CacheMissItem::cache_miss_list_t mCacheMissList;
|
||||
|
||||
U64 mRegionCacheHitCount;
|
||||
U64 mRegionCacheMissCount;
|
||||
|
||||
caps_received_signal_t mCapabilitiesReceivedSignal;
|
||||
caps_received_signal_t mSimulatorFeaturesReceivedSignal;
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue