From 1ec7de1b5760b5fc1ebda1d244784e3bc4596eb1 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 29 Jun 2010 14:51:26 -0700 Subject: Generate windows minidump files on crash for developer (not release for download) builds. SL crash reporter still enabled. --- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 2 +- indra/newview/llappviewerwin32.cpp | 8 ++ indra/newview/llwindebug.cpp | 188 +++++++++++++++++++++++++++++++++++++ indra/newview/llwindebug.h | 49 ++++++++++ 5 files changed, 248 insertions(+), 1 deletion(-) create mode 100644 indra/newview/llwindebug.cpp create mode 100644 indra/newview/llwindebug.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ce42cb6038..92f701551b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1150,10 +1150,12 @@ endif (LINUX) if (WINDOWS) list(APPEND viewer_SOURCE_FILES llappviewerwin32.cpp + llwindebug.cpp ) list(APPEND viewer_HEADER_FILES llappviewerwin32.h + llwindebug.h ) # precompiled header configuration diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1ed63555b0..1b5b73e3dd 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4133,7 +4133,7 @@ void LLAppViewer::forceErrorBreakpoint() void LLAppViewer::forceErrorBadMemoryAccess() { S32* crash = NULL; - *crash = 0xDEADBEEF; + *crash = 0xDEADBEEF; return; } diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index e3ef04d03d..8c9fd09dcb 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -64,6 +64,10 @@ #include "llcommandlineparser.h" #include "lltrans.h" +#ifndef LL_RELEASE_FOR_DOWNLOAD +#include "llwindebug.h" +#endif + // *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib // The lib was compiled under VS2005 - in VS2003 we need to remap assert #ifdef LL_DEBUG @@ -342,6 +346,10 @@ bool LLAppViewerWin32::init() llinfos << "Turning off Windows error reporting." << llendl; disableWinErrorReporting(); +#ifndef LL_RELEASE_FOR_DOWNLOAD + LLWinDebug::instance().init(); +#endif + return LLAppViewer::init(); } diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp new file mode 100644 index 0000000000..ba33a56ad0 --- /dev/null +++ b/indra/newview/llwindebug.cpp @@ -0,0 +1,188 @@ +/** + * @file llwindebug.cpp + * @brief Windows debugging functions + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llwindebug.h" +#include "lldir.h" + + +// based on dbghelp.h +typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, + CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, + CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, + CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam + ); + +MINIDUMPWRITEDUMP f_mdwp = NULL; + + +class LLMemoryReserve { +public: + LLMemoryReserve(); + ~LLMemoryReserve(); + void reserve(); + void release(); +protected: + unsigned char *mReserve; + static const size_t MEMORY_RESERVATION_SIZE; +}; + +LLMemoryReserve::LLMemoryReserve() : + mReserve(NULL) +{ +}; + +LLMemoryReserve::~LLMemoryReserve() +{ + release(); +} + +// I dunno - this just seemed like a pretty good value. +const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024; + +void LLMemoryReserve::reserve() +{ + if(NULL == mReserve) + mReserve = new unsigned char[MEMORY_RESERVATION_SIZE]; +}; + +void LLMemoryReserve::release() +{ + delete [] mReserve; + mReserve = NULL; +}; + +static LLMemoryReserve gEmergencyMemoryReserve; + + +LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) +{ + LLWinDebug::instance().generateMinidump(exception_infop); + return EXCEPTION_CONTINUE_SEARCH; +} + +// static +void LLWinDebug::init() +{ + static bool s_first_run = true; + // Load the dbghelp dll now, instead of waiting for the crash. + // Less potential for stack mangling + + if (s_first_run) + { + // First, try loading from the directory that the app resides in. + std::string local_dll_name = gDirUtilp->findFile("dbghelp.dll", gDirUtilp->getWorkingDir(), gDirUtilp->getExecutableDir()); + + HMODULE hDll = NULL; + hDll = LoadLibraryA(local_dll_name.c_str()); + if (!hDll) + { + hDll = LoadLibrary(L"dbghelp.dll"); + } + + if (!hDll) + { + LL_WARNS("AppInit") << "Couldn't find dbghelp.dll!" << LL_ENDL; + } + else + { + f_mdwp = (MINIDUMPWRITEDUMP) GetProcAddress(hDll, "MiniDumpWriteDump"); + + if (!f_mdwp) + { + FreeLibrary(hDll); + hDll = NULL; + } + } + + gEmergencyMemoryReserve.reserve(); + + s_first_run = false; + + // Add this exeption hanlder to save windows style minidump. + AddVectoredExceptionHandler(0, &vectoredHandler); + } +} + +void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) +{ + if(f_mdwp == NULL || gDirUtilp == NULL) + { + return; + } + else + { + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); + + HANDLE hFile = CreateFileA(dump_path.c_str(), + GENERIC_WRITE, + FILE_SHARE_WRITE, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + + if (hFile != INVALID_HANDLE_VALUE) + { + // Write the dump, ignoring the return value + f_mdwp(GetCurrentProcess(), + GetCurrentProcessId(), + hFile, + type, + ExInfop, + NULL, + NULL); + + CloseHandle(hFile); + } + + } +} + +// static +void LLWinDebug::generateMinidump(struct _EXCEPTION_POINTERS *exception_infop) +{ + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + "SecondLifeException"); + if (exception_infop) + { + // Since there is exception info... Release the hounds. + gEmergencyMemoryReserve.release(); + + _MINIDUMP_EXCEPTION_INFORMATION ExInfo; + + ExInfo.ThreadId = ::GetCurrentThreadId(); + ExInfo.ExceptionPointers = exception_infop; + ExInfo.ClientPointers = NULL; + writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLife.dmp"); + } +} diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h new file mode 100644 index 0000000000..809d1b8cc3 --- /dev/null +++ b/indra/newview/llwindebug.h @@ -0,0 +1,49 @@ +/** + * @file llwindebug.h + * @brief LLWinDebug class header file + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLWINDEBUG_H +#define LL_LLWINDEBUG_H + +#include "stdtypes.h" +#include + +class LLWinDebug: + public LLSingleton +{ +public: + static void init(); + static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); +private: + static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); +}; + +#endif // LL_LLWINDEBUG_H -- cgit v1.2.3 From 4e6580bf52c0d1bac7584bbce205fda35c811e4a Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 29 Jun 2010 15:04:52 -0700 Subject: DOS 2 UNIX line endings. --- indra/newview/llwindebug.cpp | 376 +++++++++++++++++++++---------------------- 1 file changed, 188 insertions(+), 188 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index ba33a56ad0..502fefd4ef 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -1,188 +1,188 @@ -/** - * @file llwindebug.cpp - * @brief Windows debugging functions - * - * $LicenseInfo:firstyear=2004&license=viewergpl$ - * - * Copyright (c) 2004-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ -#include "llviewerprecompiledheaders.h" - -#include "llwindebug.h" -#include "lldir.h" - - -// based on dbghelp.h -typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam - ); - -MINIDUMPWRITEDUMP f_mdwp = NULL; - - -class LLMemoryReserve { -public: - LLMemoryReserve(); - ~LLMemoryReserve(); - void reserve(); - void release(); -protected: - unsigned char *mReserve; - static const size_t MEMORY_RESERVATION_SIZE; -}; - -LLMemoryReserve::LLMemoryReserve() : - mReserve(NULL) -{ -}; - -LLMemoryReserve::~LLMemoryReserve() -{ - release(); -} - -// I dunno - this just seemed like a pretty good value. -const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024; - -void LLMemoryReserve::reserve() -{ - if(NULL == mReserve) - mReserve = new unsigned char[MEMORY_RESERVATION_SIZE]; -}; - -void LLMemoryReserve::release() -{ - delete [] mReserve; - mReserve = NULL; -}; - -static LLMemoryReserve gEmergencyMemoryReserve; - - -LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) -{ - LLWinDebug::instance().generateMinidump(exception_infop); - return EXCEPTION_CONTINUE_SEARCH; -} - -// static -void LLWinDebug::init() -{ - static bool s_first_run = true; - // Load the dbghelp dll now, instead of waiting for the crash. - // Less potential for stack mangling - - if (s_first_run) - { - // First, try loading from the directory that the app resides in. - std::string local_dll_name = gDirUtilp->findFile("dbghelp.dll", gDirUtilp->getWorkingDir(), gDirUtilp->getExecutableDir()); - - HMODULE hDll = NULL; - hDll = LoadLibraryA(local_dll_name.c_str()); - if (!hDll) - { - hDll = LoadLibrary(L"dbghelp.dll"); - } - - if (!hDll) - { - LL_WARNS("AppInit") << "Couldn't find dbghelp.dll!" << LL_ENDL; - } - else - { - f_mdwp = (MINIDUMPWRITEDUMP) GetProcAddress(hDll, "MiniDumpWriteDump"); - - if (!f_mdwp) - { - FreeLibrary(hDll); - hDll = NULL; - } - } - - gEmergencyMemoryReserve.reserve(); - - s_first_run = false; - - // Add this exeption hanlder to save windows style minidump. - AddVectoredExceptionHandler(0, &vectoredHandler); - } -} - -void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) -{ - if(f_mdwp == NULL || gDirUtilp == NULL) - { - return; - } - else - { - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - - HANDLE hFile = CreateFileA(dump_path.c_str(), - GENERIC_WRITE, - FILE_SHARE_WRITE, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (hFile != INVALID_HANDLE_VALUE) - { - // Write the dump, ignoring the return value - f_mdwp(GetCurrentProcess(), - GetCurrentProcessId(), - hFile, - type, - ExInfop, - NULL, - NULL); - - CloseHandle(hFile); - } - - } -} - -// static -void LLWinDebug::generateMinidump(struct _EXCEPTION_POINTERS *exception_infop) -{ - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, - "SecondLifeException"); - if (exception_infop) - { - // Since there is exception info... Release the hounds. - gEmergencyMemoryReserve.release(); - - _MINIDUMP_EXCEPTION_INFORMATION ExInfo; - - ExInfo.ThreadId = ::GetCurrentThreadId(); - ExInfo.ExceptionPointers = exception_infop; - ExInfo.ClientPointers = NULL; - writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLife.dmp"); - } -} +/** + * @file llwindebug.cpp + * @brief Windows debugging functions + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llwindebug.h" +#include "lldir.h" + + +// based on dbghelp.h +typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, + CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, + CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, + CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam + ); + +MINIDUMPWRITEDUMP f_mdwp = NULL; + + +class LLMemoryReserve { +public: + LLMemoryReserve(); + ~LLMemoryReserve(); + void reserve(); + void release(); +protected: + unsigned char *mReserve; + static const size_t MEMORY_RESERVATION_SIZE; +}; + +LLMemoryReserve::LLMemoryReserve() : + mReserve(NULL) +{ +}; + +LLMemoryReserve::~LLMemoryReserve() +{ + release(); +} + +// I dunno - this just seemed like a pretty good value. +const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024; + +void LLMemoryReserve::reserve() +{ + if(NULL == mReserve) + mReserve = new unsigned char[MEMORY_RESERVATION_SIZE]; +}; + +void LLMemoryReserve::release() +{ + delete [] mReserve; + mReserve = NULL; +}; + +static LLMemoryReserve gEmergencyMemoryReserve; + + +LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) +{ + LLWinDebug::instance().generateMinidump(exception_infop); + return EXCEPTION_CONTINUE_SEARCH; +} + +// static +void LLWinDebug::init() +{ + static bool s_first_run = true; + // Load the dbghelp dll now, instead of waiting for the crash. + // Less potential for stack mangling + + if (s_first_run) + { + // First, try loading from the directory that the app resides in. + std::string local_dll_name = gDirUtilp->findFile("dbghelp.dll", gDirUtilp->getWorkingDir(), gDirUtilp->getExecutableDir()); + + HMODULE hDll = NULL; + hDll = LoadLibraryA(local_dll_name.c_str()); + if (!hDll) + { + hDll = LoadLibrary(L"dbghelp.dll"); + } + + if (!hDll) + { + LL_WARNS("AppInit") << "Couldn't find dbghelp.dll!" << LL_ENDL; + } + else + { + f_mdwp = (MINIDUMPWRITEDUMP) GetProcAddress(hDll, "MiniDumpWriteDump"); + + if (!f_mdwp) + { + FreeLibrary(hDll); + hDll = NULL; + } + } + + gEmergencyMemoryReserve.reserve(); + + s_first_run = false; + + // Add this exeption hanlder to save windows style minidump. + AddVectoredExceptionHandler(0, &vectoredHandler); + } +} + +void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) +{ + if(f_mdwp == NULL || gDirUtilp == NULL) + { + return; + } + else + { + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); + + HANDLE hFile = CreateFileA(dump_path.c_str(), + GENERIC_WRITE, + FILE_SHARE_WRITE, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + + if (hFile != INVALID_HANDLE_VALUE) + { + // Write the dump, ignoring the return value + f_mdwp(GetCurrentProcess(), + GetCurrentProcessId(), + hFile, + type, + ExInfop, + NULL, + NULL); + + CloseHandle(hFile); + } + + } +} + +// static +void LLWinDebug::generateMinidump(struct _EXCEPTION_POINTERS *exception_infop) +{ + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + "SecondLifeException"); + if (exception_infop) + { + // Since there is exception info... Release the hounds. + gEmergencyMemoryReserve.release(); + + _MINIDUMP_EXCEPTION_INFORMATION ExInfo; + + ExInfo.ThreadId = ::GetCurrentThreadId(); + ExInfo.ExceptionPointers = exception_infop; + ExInfo.ClientPointers = NULL; + writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLife.dmp"); + } +} -- cgit v1.2.3 From 5fd6887477b61e10ffd29086b9330a54b3a571d2 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 1 Jul 2010 17:30:19 -0700 Subject: Watchdog thread configurable though feature table; user config value will still take precedence. --- indra/newview/app_settings/settings.xml | 4 +-- indra/newview/featuretable.txt | 2 ++ indra/newview/featuretable_linux.txt | 1 + indra/newview/featuretable_mac.txt | 1 + indra/newview/featuretable_solaris.txt | 2 ++ indra/newview/llappviewer.cpp | 46 ++++++++++++++++----------------- 6 files changed, 30 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b493f38d76..d51498f6d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11404,9 +11404,9 @@ Persist 0 Type - Boolean + S32 Value - 0 + -1 WaterEditPresets diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index e8591ca086..1c763453dc 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -58,6 +58,8 @@ Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 RenderShaderLightingMaxLevel 1 3 SkyUseClassicClouds 1 1 +WatchdogDisabled 1 1 + // // Low Graphics Settings diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 779490c9f7..45de51f3cf 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -57,6 +57,7 @@ Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 1.0 SkyUseClassicClouds 1 1 +WatchdogDisabled 1 1 // // Low Graphics Settings diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 47033efc47..e89b0cc49d 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -59,6 +59,7 @@ RenderTextureMemoryMultiple 1 0.5 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 SkyUseClassicClouds 1 1 +WatchdogDisabled 1 1 // // Low Graphics Settings diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt index 6edd280686..0ae463332c 100644 --- a/indra/newview/featuretable_solaris.txt +++ b/indra/newview/featuretable_solaris.txt @@ -37,6 +37,8 @@ VertexShaderEnable 1 1 RenderTextureMemoryMultiple 1 1.0 UseOcclusion 1 1 RenderCubeMap 1 1 +WatchdogDisabled 1 1 + // // Class 0 Hardware (Unknown or just old) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1b5b73e3dd..dc514eafe7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,7 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" - +#include "llfeaturemanager.h" #include "llweb.h" #include "llsecondlifeurls.h" @@ -379,14 +379,8 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue) const S32 NEVER_SUBMIT_REPORT = 2; if(cb == NEVER_SUBMIT_REPORT) { -// LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog thread is unsafe LLAppViewer::instance()->destroyMainloopTimeout(); } - else if(gSavedSettings.getBOOL("WatchdogEnabled") == TRUE) - { - // Don't re-enable the watchdog when we change the setting; this may get called before it's started -// LLWatchdog::getInstance()->init(); - } return true; } @@ -1689,14 +1683,6 @@ bool LLAppViewer::initThreads() static const bool enable_threads = true; #endif - const S32 NEVER_SUBMIT_REPORT = 2; - bool use_watchdog = gSavedSettings.getBOOL("WatchdogEnabled"); - bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; - if(use_watchdog && send_reports) - { - LLWatchdog::getInstance()->init(watchdog_killer_callback); - } - LLVFSThread::initClass(enable_threads && false); LLLFSThread::initClass(enable_threads && false); @@ -1925,18 +1911,11 @@ bool LLAppViewer::initConfiguration() } #endif - //*FIX:Mani - Set default to disabling watchdog mainloop - // timeout for mac and linux. There is no call stack info - // on these platform to help debug. #ifndef LL_RELEASE_FOR_DOWNLOAD - gSavedSettings.setBOOL("WatchdogEnabled", FALSE); gSavedSettings.setBOOL("QAMode", TRUE ); + gSavedSettings.setS32("WatchdogEnabled", 0); #endif - -#ifndef LL_WINDOWS - gSavedSettings.setBOOL("WatchdogEnabled", FALSE); -#endif - + gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2)); // These are warnings that appear on the first experience of that condition. @@ -2364,6 +2343,25 @@ bool LLAppViewer::initWindow() gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), FALSE, ignorePixelDepth); + // Need to load feature table before cheking to start watchdog. + const S32 NEVER_SUBMIT_REPORT = 2; + bool use_watchdog = false; + int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); + if(watchdog_enabled_setting == -1){ + use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled"); + } + else + { + // The user has explicitly set this setting; always use that value. + use_watchdog = bool(watchdog_enabled_setting); + } + + bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; + if(use_watchdog && send_reports) + { + LLWatchdog::getInstance()->init(watchdog_killer_callback); + } + LLNotificationsUI::LLNotificationManager::getInstance(); if (gSavedSettings.getBOOL("WindowMaximized")) -- cgit v1.2.3 From edcf44ad5905b633acf07bd00437ceeaf8fe8d1b Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Fri, 2 Jul 2010 14:56:24 +0300 Subject: EXT-7473 FIXED ("Share" button was added to "gear" menu in Inventory SP.) Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/678/ --HG-- branch : product-engine --- indra/newview/llpanelmaininventory.cpp | 8 ++++++++ indra/newview/llsidepanelinventory.h | 5 +++-- .../skins/default/xui/en/menu_inventory_gear_default.xml | 11 +++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9eece81861..7412812c62 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -53,6 +53,8 @@ #include "lltooldraganddrop.h" #include "llviewermenu.h" #include "llviewertexturelist.h" +#include "llsidepanelinventory.h" +#include "llsidetray.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -1158,6 +1160,12 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) return FALSE; } + if (command_name == "share") + { + LLSidepanelInventory* parent = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + return parent ? parent->canShare() : FALSE; + } + return TRUE; } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 951fdd630c..f2f2509f9a 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -58,6 +58,9 @@ public: void showTaskInfoPanel(); void showInventoryPanel(); + // checks can share selected item(s) + bool canShare(); + protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); @@ -65,8 +68,6 @@ protected: void onSelectionChange(const std::deque &items, BOOL user_action); // "wear", "teleport", etc. void performActionOnSelection(const std::string &action); - bool canShare(); - void updateVerbs(); // diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 62365f7cc2..c394700081 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -81,6 +81,17 @@ function="Inventory.GearDefault.Enable" parameter="save_texture" /> + + + + Date: Fri, 2 Jul 2010 15:07:33 +0300 Subject: EXT-8145 FIXED disabled committing on selection change when list's selection is restored (panel edit outfit) turning off committing on selection change for the COF Wearables flat lists while restoring selection between refreshes/updates Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/683/ --HG-- branch : product-engine --- indra/newview/llcofwearables.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 472d2ccf24..f278fb6a7b 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -372,6 +372,11 @@ void LLCOFWearables::refresh() iter != iter_end; ++iter) { LLFlatListView* list = iter->first; + if (!list) continue; + + //restoring selection should not fire commit callbacks + list->setCommitOnSelectionChange(false); + const values_vector_t& values = iter->second; for (values_vector_t::const_iterator value_it = values.begin(), @@ -385,6 +390,8 @@ void LLCOFWearables::refresh() list->selectItemByValue(*value_it); } } + + list->setCommitOnSelectionChange(true); } } -- cgit v1.2.3 From 9388a14e47c61cb5745494982b588a93e4f9d811 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Fri, 2 Jul 2010 15:07:33 +0300 Subject: EXT-8136 FIXED (Accordion order in outfit editor was corrected. (Attachment / Clothing / Body). -> (Clothing / Attachment / Body).) Reviewed by Vadim Savchuk and Neal Orman https://codereview.productengine.com/secondlife/r/671/ --HG-- branch : product-engine --- .../skins/default/xui/en/panel_cof_wearables.xml | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index d5943ea156..f438e3d42d 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -22,40 +22,40 @@ width="311"> + name="tab_clothing" + title="Clothing"> - - + width="311" /> + name="tab_attachments" + title="Attachments"> + width="311"> + + Date: Fri, 2 Jul 2010 15:23:05 +0300 Subject: EXT-5692 FIX Add callback to create widget segment with LLAvatarIconCtrl (or LLGroupIconCtrl) based on url match id. reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/610/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1ed63555b0..cc28f41fa1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,6 +81,8 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" +#include "llurlmatch.h" +#include "lltextutil.h" #include "llweb.h" @@ -192,6 +194,7 @@ #include "llviewerthrottle.h" #include "llparcel.h" #include "llavatariconctrl.h" +#include "llgroupiconctrl.h" // Include for security api initialization #include "llsecapi.h" @@ -351,6 +354,45 @@ static void ui_audio_callback(const LLUUID& uuid) } } +bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) +{ + if(!match || !base) + return false; + + LLUUID match_id = match->getID(); + + LLIconCtrl* icon; + + if(gAgent.isInGroup(match_id, TRUE)) + { + LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams(); + icon_params.group_id = match_id; + icon_params.rect = LLRect(0, 16, 16, 0); + icon_params.visible = true; + icon = LLUICtrlFactory::instance().createWidget(icon_params); + } + else + { + LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams(); + icon_params.avatar_id = match_id; + icon_params.rect = LLRect(0, 16, 16, 0); + icon_params.visible = true; + icon = LLUICtrlFactory::instance().createWidget(icon_params); + } + + LLInlineViewSegment::Params params; + params.force_newline = false; + params.view = icon; + params.left_pad = 4; + params.right_pad = 4; + params.top_pad = 2; + params.bottom_pad = 2; + + base->appendWidget(params," ",false); + + return true; +} + void request_initial_instant_messages() { static BOOL requested = FALSE; @@ -893,6 +935,7 @@ bool LLAppViewer::init() } LLViewerMedia::initClass(); + LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; //EXT-7013 - On windows for some locale (Japanese) standard //datetime formatting functions didn't support some parameters such as "weekday". -- cgit v1.2.3 From 589619d8ccdcc9dfb5b575e602a657c7c59b0b4a Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 2 Jul 2010 16:46:25 +0300 Subject: EXT-7304 Disable "Share", "Pay", "Call", etc buttons in IM window when viewer gets disconnected. I haven't found a better way to do that than binding to focus received signal (borrowed the idea from the nearby chat input field implementation). Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/686/ --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 12 +++++++++++- indra/newview/llpanelimcontrolpanel.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 709bb83fe4..b79a4f359a 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -37,6 +37,7 @@ #include "llpanelimcontrolpanel.h" #include "llagent.h" +#include "llappviewer.h" // for gDisconnected #include "llavataractions.h" #include "llavatariconctrl.h" #include "llbutton.h" @@ -163,7 +164,7 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild("avatar_icon")->getAvatarId())); - + setFocusReceivedCallback(boost::bind(&LLPanelIMControlPanel::onFocusReceived, this)); return LLPanelChatControlPanel::postBuild(); } @@ -194,6 +195,15 @@ void LLPanelIMControlPanel::onShareButtonClicked() LLAvatarActions::share(mAvatarID); } +void LLPanelIMControlPanel::onFocusReceived() +{ + // Disable all the buttons (Call, Teleport, etc) if disconnected. + if (gDisconnected) + { + setAllChildrenEnabled(FALSE); + } +} + void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) { LLPanelChatControlPanel::setSessionId(session_id); diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index ce8fc58e56..0a1fd70c08 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -95,6 +95,7 @@ private: void onShareButtonClicked(); void onTeleportButtonClicked(); void onPayButtonClicked(); + void onFocusReceived(); LLUUID mAvatarID; }; -- cgit v1.2.3 From 41ac3f8f220f32cd36dd61a026d61345a6b9c424 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 2 Jul 2010 17:33:33 +0300 Subject: EXT-8134 FIXED added filtering wearables depending on expanded outfit (panel outfit edit) Add More is clicked -> list view is shown filtered depending on the expanded tab (if no item is selected), default filtering when nothing is selected and all tabs are collapsed - by clothing Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/689/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ffd879dfd7..a7e901cbfa 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -726,24 +726,36 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) bool more_than_one_selected = ids.size() > 1; bool is_dummy_item = (ids.size() && dynamic_cast(mCOFWearables->getSelectedItem())); - //resetting selection if no item is selected or than one item is selected - if (nothing_selected || more_than_one_selected) + //expanded accordion tab determines filtering when no item is selected + if (nothing_selected) { - if (nothing_selected) - { - showWearablesFolderView(); - applyFolderViewFilter(FVIT_ALL); - } + showWearablesListView(); - if (more_than_one_selected) + switch (mCOFWearables->getExpandedAccordionAssetType()) { - showWearablesListView(); - applyListViewFilter(LVIT_ALL); + case LLAssetType::AT_OBJECT: + applyListViewFilter(LVIT_ATTACHMENT); + break; + case LLAssetType::AT_BODYPART: + applyListViewFilter(LVIT_BODYPART); + break; + case LLAssetType::AT_CLOTHING: + default: + applyListViewFilter(LVIT_CLOTHING); + break; } return; } + //resetting selection if more than one item is selected + if (more_than_one_selected) + { + showWearablesListView(); + applyListViewFilter(LVIT_ALL); + return; + } + //filter wearables by a type represented by a dummy item if (one_selected && is_dummy_item) -- cgit v1.2.3 From 018ff76192fe13dcc1410f66833a07f6876db3b0 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 2 Jul 2010 17:41:42 +0300 Subject: EXT-8127 FIXED Provided attachment list item name on outfit edit panel even if it unworn. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/688/ --HG-- branch : product-engine --- indra/newview/llwearableitemslist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 868322699e..9a76b01853 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -269,13 +269,13 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt void LLPanelAttachmentListItem::updateItem(const std::string& name, EItemState item_state) { - std::string title_joint; + std::string title_joint = name; LLViewerInventoryItem* inv_item = getItem(); if (inv_item && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(inv_item->getLinkedUUID())) { std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(inv_item->getLinkedUUID())); - title_joint = name + " (" + joint + ")"; + title_joint = title_joint + " (" + joint + ")"; } LLPanelInventoryListItemBase::updateItem(title_joint, item_state); -- cgit v1.2.3 From 655c3dbe1b711389c1f581f4ccae07dafb5cdefd Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 2 Jul 2010 11:42:31 -0400 Subject: EXT-8204 FIXED Can't "Copy and Wear" items when object with contents is first opened EXT-3278 REVERT "Copy and wear" exists for landmarks in object inventory Fixed issue that was causing copy and wear to always be greyed out on first opening of object. --- indra/newview/llfloateropenobject.cpp | 46 ++++++++--------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 71bfae316a..d39ed77491 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -105,49 +105,23 @@ void LLFloaterOpenObject::refresh() mPanelInventoryObject->refresh(); std::string name = ""; - - // Enable the copy || copy & wear buttons only if we have something we can copy or copy & wear (respectively). - bool copy_enabled = false; - bool wear_enabled = false; + BOOL enabled = FALSE; LLSelectNode* node = mObjectSelection->getFirstRootNode(); if (node) { name = node->mName; - copy_enabled = true; - - LLViewerObject* object = node->getObject(); - if (object) - { - // this folder is coming from an object, as there is only one folder in an object, the root, - // we need to collect the entire contents and handle them as a group - LLInventoryObject::object_list_t inventory_objects; - object->getInventoryContents(inventory_objects); - - if (!inventory_objects.empty()) - { - for (LLInventoryObject::object_list_t::iterator it = inventory_objects.begin(); - it != inventory_objects.end(); - ++it) - { - LLInventoryItem* item = static_cast ((LLInventoryObject*)(*it)); - LLInventoryType::EType type = item->getInventoryType(); - if (type == LLInventoryType::IT_OBJECT - || type == LLInventoryType::IT_ATTACHMENT - || type == LLInventoryType::IT_WEARABLE - || type == LLInventoryType::IT_GESTURE) - { - wear_enabled = true; - break; - } - } - } - } + enabled = TRUE; } - + else + { + name = ""; + enabled = FALSE; + } + childSetTextArg("object_name", "[DESC]", name); - childSetEnabled("copy_to_inventory_button", copy_enabled); - childSetEnabled("copy_and_wear_button", wear_enabled); + childSetEnabled("copy_to_inventory_button", enabled); + childSetEnabled("copy_and_wear_button", enabled); } -- cgit v1.2.3 From daec4f6bb75634c6355f58d9fa5ef60f50a2e73f Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 2 Jul 2010 21:43:33 +0300 Subject: EXT-3919 FIXED Added resize corner button to the right bottom corner of the SL window. - Added resize corner icon into main_view.xml to the bottom right of the popup view. Added small dummy icon to the right part of bottom tray to avoid well buttons overlapping it. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/690/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/main_view.xml | 10 +++++++++- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 72ab6195bc..a1ca910cbb 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -199,7 +199,15 @@ mouse_opaque="false" name="popup_holder" class="popup_holder" - width="1024"/> + width="1024"> + + + -- cgit v1.2.3 From e78f96b2fbf7a535b7bc5fe4a0338f354cdae7ed Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 2 Jul 2010 15:55:49 -0400 Subject: EXT-8213 FIX users cannot replace their shape if it does not load Removed checking for wearables loaded on replacing or adding individual items. After reviewing the code in depth, we believe this is safe to do, particularly since we allow the user to replace their outfit from the same state. Filed a followup issue for later investigation EXT-8231 Code reviewed by Vir and Seraph --- indra/newview/llappearancemgr.cpp | 10 ++-------- indra/newview/llinventorybridge.cpp | 24 +++--------------------- indra/newview/lltooldraganddrop.cpp | 17 +++-------------- indra/newview/llwearableitemslist.cpp | 5 +---- 4 files changed, 9 insertions(+), 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b5ad5c7a11..8ef3fa200b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -991,14 +991,8 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up } } case LLAssetType::AT_BODYPART: - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return false; - } - + // TODO: investigate wearables may not be loaded at this point EXT-8231 + // Remove the existing wearables of the same type. // Remove existing body parts anyway because we must not be able to wear e.g. two skins. if (item_to_wear->getType() == LLAssetType::AT_BODYPART) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 96dba5717a..735e14de9e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4482,13 +4482,7 @@ void LLWearableBridge::onWearOnAvatar(void* user_data) void LLWearableBridge::wearOnAvatar() { - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 LLViewerInventoryItem* item = getItem(); if(item) @@ -4499,13 +4493,7 @@ void LLWearableBridge::wearOnAvatar() void LLWearableBridge::wearAddOnAvatar() { - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 LLViewerInventoryItem* item = getItem(); if(item) @@ -5063,13 +5051,7 @@ BOOL LLWearableBridgeAction::isAgentInventory() const void LLWearableBridgeAction::wearOnAvatar() { - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 LLViewerInventoryItem* item = getItem(); if(item) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c862c02b82..3f34fc174c 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1871,13 +1871,8 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( if (drop) { - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return ACCEPT_NO; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(),true, !(mask & MASK_CONTROL)); } return ACCEPT_YES_MULTI; @@ -1949,13 +1944,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( if (drop) { - // Don't wear anything until initial wearables are loaded, can - // destroy clothing items. - if (!gAgentWearables.areWearablesLoaded()) - { - LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); - return ACCEPT_NO; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 } if (mSource == SOURCE_AGENT) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 868322699e..d24bd8499d 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -783,10 +783,7 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id) // static bool LLWearableItemsList::ContextMenu::canAddWearable(const LLUUID& item_id) { - if (!gAgentWearables.areWearablesLoaded()) - { - return false; - } + // TODO: investigate wearables may not be loaded at this point EXT-8231 LLViewerInventoryItem* item = gInventory.getItem(item_id); if (!item || item->getType() != LLAssetType::AT_CLOTHING) -- cgit v1.2.3 From a05c48cf140f483546828fa264c8904d190d46bc Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sat, 3 Jul 2010 10:52:00 +0100 Subject: minor comment typo that was bugging me. --- indra/newview/llcallfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 60a2392d87..b494470cbc 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -449,7 +449,7 @@ void LLCallFloater::updateAgentModeratorState() if(gAgent.isInGroup(mSpeakerManager->getSessionID())) { // This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO - // in this case there are no any speakers yet. + // in this case there are not any speakers yet. if (mSpeakerManager->findSpeaker(gAgentID)) { // Agent is Moderator -- cgit v1.2.3 From f954db02638e32677d5fe61abdf0079b434d725c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 11:54:50 +0100 Subject: Checker: FORWARD_NULL Function: LLChatHistory::appendMessage(const LLChat &, const LLSD &, const LLStyle::Params &) File: /indra/newview/llchathistory.cpp --- indra/newview/llchathistory.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ac12bffdfb..c0fa910f86 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -557,11 +557,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); - if(mEditor) + llassert(mEditor); + if (!mEditor) { - mEditor->setPlainText(use_plain_text_chat_history); + return; } + mEditor->setPlainText(use_plain_text_chat_history); + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -740,7 +743,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mIsLastMessageFromLog = message_from_log; } - if (chat.mNotifId.notNull()) + if (chat.mNotifId.notNull()) { LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) @@ -832,6 +835,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mEditor->appendText(message, FALSE, style_params); } + mEditor->blockUndo(); // automatically scroll to end when receiving chat from myself -- cgit v1.2.3 From 014c2a508934e18c347b70d905c004955cd23613 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 11:57:45 +0100 Subject: Checker: NULL_RETURNS Function: LLPanelVoiceEffect::update(bool) File: /indra/newview/llpanelvoiceeffect.cpp --- indra/newview/llpanelvoiceeffect.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index fd470798ee..68fa9d1e5e 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -129,6 +129,8 @@ void LLPanelVoiceEffect::update(bool list_updated) if (mVoiceEffectCombo) { LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + llassert(effect_interface); + if (!effect_interface) return; if (list_updated) { // Add the default "No Voice Morph" entry. -- cgit v1.2.3 From 2888e446a723d6c477fa07fcc733dcc16e021fef Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 12:00:02 +0100 Subject: CID-496 Checker: FORWARD_NULL Function: LLFloaterVoiceEffect::refreshEffectList() File: /indra/newview/llfloatervoiceeffect.cpp --- indra/newview/llfloatervoiceeffect.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp index ca1f142760..3ab061dbea 100644 --- a/indra/newview/llfloatervoiceeffect.cpp +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -199,7 +199,12 @@ void LLFloaterVoiceEffect::refreshEffectList() if(sl_item) { LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; - dynamic_cast(sl_item->getColumn(0))->setFontStyle(style); + LLScrollListText slt = dynamic_cast(sl_item->getColumn(0)); + llassert(slt); + if (slt) + { + slt->setFontStyle(style); + } } } } -- cgit v1.2.3 From 297bab71ab6fcbdabd3f1c0ac0e2fa403a3ed319 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 12:04:28 +0100 Subject: CID-495 Checker: FORWARD_NULL Function: show_item_original(const LLUUID &) File: /indra/newview/llinventoryfunctions.cpp --- indra/newview/llinventoryfunctions.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7463658003..2d11337955 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -433,13 +433,12 @@ void show_item_original(const LLUUID& item_uuid) LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); main_inventory->onFilterEdit(""); - } - if(floater_inventory->getVisible()) - { - floater_inventory_visible = true; + if(floater_inventory->getVisible()) + { + floater_inventory_visible = true; + } } - } if(sidepanel_inventory && !floater_inventory_visible) { -- cgit v1.2.3 From 49a3fc9cc3b47a751d99b31f87458680bd966936 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 12:07:00 +0100 Subject: CID-494 Checker: FORWARD_NULL Function: LLPanelOutfitEdit::filterWearablesBySelectedItem() File: /indra/newview/llpaneloutfitedit.cpp --- indra/newview/llpaneloutfitedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index a7e901cbfa..053c2d9498 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -773,7 +773,7 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) return; } - if (one_selected && !is_dummy_item) + if (item && one_selected && !is_dummy_item) { if (item->isWearableType()) { -- cgit v1.2.3 From 1ff353452174c37c600d7de650348ab30f91b86c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 12:17:54 +0100 Subject: CID-499 Checker: FORWARD_NULL Function: LLAppearanceMgr::dumpItemArray(const LLDynamicArray, (int)32> &, const std::basic_string, std::allocator>&) File: /indra/newview/llappearancemgr.cpp --- indra/newview/llappearancemgr.cpp | 2 +- indra/newview/llfloatervoiceeffect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8ef3fa200b..17efc28a6a 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2590,7 +2590,7 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items, { asset_id = linked_item->getAssetUUID(); } - llinfos << msg << " " << i <<" " << item->getName() << " " << asset_id.asString() << llendl; + llinfos << msg << " " << i <<" " << (item ? item->getName() : "(nullitem)") << " " << asset_id.asString() << llendl; } llinfos << llendl; } diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp index 3ab061dbea..61fe50e301 100644 --- a/indra/newview/llfloatervoiceeffect.cpp +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -199,7 +199,7 @@ void LLFloaterVoiceEffect::refreshEffectList() if(sl_item) { LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; - LLScrollListText slt = dynamic_cast(sl_item->getColumn(0)); + LLScrollListText* slt = dynamic_cast(sl_item->getColumn(0)); llassert(slt); if (slt) { -- cgit v1.2.3 From 54bf954b16c63f9b7be457b48ee5655627831856 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 5 Jul 2010 17:38:01 +0300 Subject: EXT-8226 FIXED Potential fix for a crash at startup in LLIMWellWindow::findIMChiclet(). Bug reason: LLChicletPanel::onCurrentVoiceChannelChanged() was called at startup, which, in turn, called LLIMWellWindow::findIMChiclet(). Apparently, LLIMWellWindow::mMessageList was not initialized yet, so dereferencing the null pointer caused the crash. I couldn't reproduce the crash so I've just added defensive checks (just for any case) and moved binding LLIMWellWindow::findIMChiclet() to sFindChicletsSignal from the constructor to postBuild(). Reviewed by Alexei Arabadji at https://codereview.productengine.com/secondlife/r/692/ --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cb65756764..e6b4aeb6c2 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -582,8 +582,6 @@ LLIMWellWindow::LLIMWellWindow(const LLSD& key) : LLSysWellWindow(key) { LLIMMgr::getInstance()->addSessionObserver(this); - LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); - LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); } LLIMWellWindow::~LLIMWellWindow() @@ -601,6 +599,10 @@ BOOL LLIMWellWindow::postBuild() { BOOL rv = LLSysWellWindow::postBuild(); setTitle(getString("title_im_well_window")); + + LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); + LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); + return rv; } @@ -641,6 +643,8 @@ void LLIMWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) { + if (!mMessageList) return NULL; + LLChiclet* res = NULL; ObjectRowPanel* panel = mMessageList->getTypedItemByValue(notification_id); if (panel != NULL) @@ -655,6 +659,8 @@ LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& notification_id) // PRIVATE METHODS LLChiclet* LLIMWellWindow::findIMChiclet(const LLUUID& sessionId) { + if (!mMessageList) return NULL; + LLChiclet* res = NULL; RowPanel* panel = mMessageList->getTypedItemByValue(sessionId); if (panel != NULL) -- cgit v1.2.3 From c267f4148aa13cea96412ae19863db607abc29e4 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 5 Jul 2010 17:53:50 +0300 Subject: EXT-8104 FIXED Fixed occasional inability to paste text into location input. Changes: - Set gEditMenuHandler to the input entry whenever it's focused, so that it can handle the Ctrl+V shortcut. - Now pasting text into the input field triggers rebuilding the dropdown matches list, as if the user has typed the text. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/691/ --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 53a11eff04..b8590d838e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -231,7 +231,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.rect(text_entry_rect); params.default_text(LLStringUtil::null); params.max_length_bytes(p.max_chars); - params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); + params.keystroke_callback(boost::bind(&LLLocationInputCtrl::onTextEntry, this, _1)); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create(params); @@ -484,13 +484,16 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) KEY key = gKeyboard->currentKey(); MASK mask = gKeyboard->currentMask(TRUE); + // Typing? (moving cursor should not affect showing the list) + bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END; + bool pasting = mask == MASK_CONTROL && key == 'V'; + if (line_editor->getText().empty()) { prearrangeList(); // resets filter hideList(); } - // Typing? (moving cursor should not affect showing the list) - else if (mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + else if (typing || pasting) { prearrangeList(line_editor->getText()); if (mList->getItemCount() != 0) @@ -966,7 +969,12 @@ void LLLocationInputCtrl::focusTextEntry() // if the "select_on_focus" parameter is true it places the cursor // at the beginning (after selecting text), thus screwing up updateSelection(). if (mTextEntry) + { gFocusMgr.setKeyboardFocus(mTextEntry); + + // Enable the text entry to handle accelerator keys (EXT-8104). + LLEditMenuHandler::gEditMenuHandler = mTextEntry; + } } void LLLocationInputCtrl::enableAddLandmarkButton(bool val) -- cgit v1.2.3 From 86da02f7d2f39705320dfea5c0f1b528ade7cad7 Mon Sep 17 00:00:00 2001 From: gabriel Date: Mon, 5 Jul 2010 16:29:30 +0100 Subject: =EXT-4655 fixed --- indra/newview/llfloaterscriptlimits.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 4792d761d8..0a5499b166 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -557,8 +557,6 @@ BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() void LLPanelScriptLimitsRegionMemory::processParcelInfo(const LLParcelData& parcel_data) { - mParcelId = parcel_data.parcel_id; - if(!getLandScriptResources()) { std::string msg_error = LLTrans::getString("ScriptLimitsRequestError"); @@ -580,6 +578,7 @@ void LLPanelScriptLimitsRegionMemory::setParcelID(const LLUUID& parcel_id) LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this); mParcelId.setNull(); } + mParcelId = parcel_id; LLRemoteParcelInfoProcessor::getInstance()->addObserver(parcel_id, this); LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(parcel_id); } -- cgit v1.2.3 From 1be44136e08d632fcf0ebcfd88484793437bd551 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 5 Jul 2010 20:18:52 +0300 Subject: EXT-8146 FIXED Added confirmation dialog before outfit(s) deleting. - Added new notification which appears when trash button in "My Outfits" is clicked. Used it in code to only delete outfits if OK is selected. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/695/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitsinventory.cpp | 13 ++++++++++--- indra/newview/llpaneloutfitsinventory.h | 1 + indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index c5d259e517..ca5679d5b0 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -282,10 +282,17 @@ void LLPanelOutfitsInventory::showGearMenu() void LLPanelOutfitsInventory::onTrashButtonClick() { - mMyOutfitsPanel->removeSelected(); + LLNotificationsUtil::add("DeleteOutfits", LLSD(), LLSD(), boost::bind(&LLPanelOutfitsInventory::onOutfitsRemovalConfirmation, this, _1, _2)); +} - updateListCommands(); - updateVerbs(); +void LLPanelOutfitsInventory::onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; // canceled + + mMyOutfitsPanel->removeSelected(); + updateListCommands(); + updateVerbs(); } bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index a50e047140..5c397e9c29 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -94,6 +94,7 @@ protected: void onWearButtonClick(); void showGearMenu(); void onTrashButtonClick(); + void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); bool isActionEnabled(const LLSD& userdata); void setWearablesLoading(bool val); void onWearablesLoaded(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 290c8c55a9..04a8a02ecd 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -815,6 +815,17 @@ Delete pick <nolink>[PICK]</nolink>? yestext="OK"/> + + Delete the selected outfit/s? + + + Date: Tue, 6 Jul 2010 11:20:05 +0100 Subject: CID-486 Checker: NULL_RETURNS Function: LLAgentWearables::revertWearable(LLWearableType::EType, unsigned int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e70511ce6e..6acbc16018 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -511,7 +511,11 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, void LLAgentWearables::revertWearable(const LLWearableType::EType type, const U32 index) { LLWearable* wearable = getWearable(type, index); - wearable->revertValues(); + llassert(wearable); + if (wearable) + { + wearable->revertValues(); + } gAgent.sendAgentSetAppearance(); } -- cgit v1.2.3 From e04df15bf1280d29f998a18bbb326f4bfa991f69 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 6 Jul 2010 11:21:45 +0100 Subject: CID-484 Checker: NULL_RETURNS Function: LLAgentWearables::animateAllWearableParams(float, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6acbc16018..266aaaff4a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1944,7 +1944,11 @@ void LLAgentWearables::animateAllWearableParams(F32 delta, BOOL upload_bake) for (S32 count = 0; count < (S32)getWearableCount((LLWearableType::EType)type); ++count) { LLWearable *wearable = getWearable((LLWearableType::EType)type,count); - wearable->animateParams(delta, upload_bake); + llassert(wearable); + if (wearable) + { + wearable->animateParams(delta, upload_bake); + } } } } -- cgit v1.2.3 From a1bbba2be64daf332bdf511129b1ec4f2bea1540 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 6 Jul 2010 11:23:22 +0100 Subject: CID-485 Checker: NULL_RETURNS Function: LLAgentWearables::setWearableName(const LLUUID &, const std::basic_string, std::allocator>&) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 266aaaff4a..efa5eca217 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -547,6 +547,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string& { LLWearable* old_wearable = getWearable((LLWearableType::EType)i,j); llassert(old_wearable); + if (!old_wearable) continue; std::string old_name = old_wearable->getName(); old_wearable->setName(new_name); -- cgit v1.2.3