From 80a8bab2a9dd8e77262b001af973212a6cba4a5a Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 12 Sep 2008 14:59:33 -0500 Subject: Second Life viewer sources 1.21.2-RC --- linden/indra/llaudio/listener.cpp | 5 - linden/indra/llaudio/listener.h | 1 - linden/indra/llcommon/linden_common.h | 6 + linden/indra/llcommon/lldqueueptr.h | 8 +- linden/indra/llcommon/llversionviewer.h | 2 +- linden/indra/llmessage/llpacketbuffer.cpp | 23 - linden/indra/llmessage/llpacketbuffer.h | 1 - linden/indra/llmessage/llpacketring.cpp | 4 +- linden/indra/llmessage/llpacketring.h | 2 +- linden/indra/llmessage/llxfer.cpp | 4 +- linden/indra/llmessage/llxfer.h | 2 +- linden/indra/llmessage/llxfer_file.cpp | 6 +- linden/indra/llmessage/llxfer_file.h | 2 +- linden/indra/llmessage/llxfer_mem.cpp | 6 +- linden/indra/llmessage/llxfer_mem.h | 2 +- linden/indra/llmessage/llxfer_vfile.cpp | 6 +- linden/indra/llmessage/llxfer_vfile.h | 2 +- linden/indra/llmessage/llxfermanager.cpp | 4 +- linden/indra/llmessage/llxfermanager.h | 2 +- linden/indra/llrender/llrender.cpp | 6 + linden/indra/llrender/llrender.h | 3 +- linden/indra/llui/llui.cpp | 2 +- linden/indra/llvfs/lldir.cpp | 3 +- linden/indra/lscript/lscript_compile/indra.l | 5 + linden/indra/lscript/lscript_compile/indra.y | 71 + linden/indra/newview/app_settings/keywords.ini | 4 + linden/indra/newview/app_settings/settings.xml | 15 +- linden/indra/newview/gpu_table.txt | 6 + .../darwin/releasecandidate-dmg/_DS_Store | Bin 12292 -> 12292 bytes linden/indra/newview/llappviewer.cpp | 13 +- linden/indra/newview/llappviewerwin32.cpp | 35 +- linden/indra/newview/llconsole.cpp | 4 + linden/indra/newview/llfloaterfriends.cpp | 33 +- linden/indra/newview/llfloaterfriends.h | 3 +- linden/indra/newview/llfloaterimagepreview.cpp | 3 +- linden/indra/newview/llfloatertopobjects.cpp | 23 +- linden/indra/newview/llinventorymodel.cpp | 76 +- linden/indra/newview/llinventorymodel.h | 15 +- linden/indra/newview/llinventoryview.cpp | 13 +- linden/indra/newview/llprefsvoice.cpp | 2 - linden/indra/newview/llprefsvoice.h | 1 - linden/indra/newview/llsky.h | 1 - linden/indra/newview/llurl.cpp | 4 +- linden/indra/newview/llurl.h | 2 +- linden/indra/newview/llviewercontrol.cpp | 17 +- linden/indra/newview/llviewerimagelist.cpp | 3 +- linden/indra/newview/llviewermedia.cpp | 6 +- linden/indra/newview/llviewermenu.cpp | 192 +- linden/indra/newview/llviewerwindow.cpp | 2 + linden/indra/newview/llvoavatar.cpp | 5 + linden/indra/newview/llvoiceclient.cpp | 41 +- linden/indra/newview/llvoiceclient.h | 4 +- linden/indra/newview/llvovolume.cpp | 11 +- linden/indra/newview/llxmlrpctransaction.cpp | 2 +- linden/indra/newview/llxmlrpctransaction.h | 2 +- linden/indra/newview/pipeline.cpp | 1 + linden/indra/newview/pipeline.h | 3 +- .../indra/newview/skins/default/xui/de/alerts.xml | 84 +- .../newview/skins/default/xui/de/floater_about.xml | 38 +- .../skins/default/xui/de/floater_about_land.xml | 22 +- .../newview/skins/default/xui/de/floater_im.xml | 2 +- .../default/xui/de/floater_instant_message.xml | 3 + .../default/xui/de/floater_live_lsleditor.xml | 1 + .../skins/default/xui/de/floater_mem_leaking.xml | 18 + .../skins/default/xui/de/floater_postcard.xml | 18 +- .../skins/default/xui/de/floater_report_abuse.xml | 113 + .../xui/de/floater_skin_preview_template.xml | 30 + .../skins/default/xui/de/floater_snapshot.xml | 30 +- .../newview/skins/default/xui/de/floater_tools.xml | 25 + .../skins/default/xui/de/floater_top_objects.xml | 21 +- .../newview/skins/default/xui/de/floater_tos.xml | 1 + .../skins/default/xui/de/menu_pie_avatar.xml | 2 +- .../newview/skins/default/xui/de/menu_viewer.xml | 14 +- .../newview/skins/default/xui/de/mime_types.xml | 11 +- .../newview/skins/default/xui/de/need_to_long.xml | 215 +- .../skins/default/xui/de/need_to_translate.xml | 4004 ++++------------ .../skins/default/xui/de/need_to_update.xml | 793 ++-- .../indra/newview/skins/default/xui/de/notify.xml | 43 +- .../newview/skins/default/xui/de/panel_login.xml | 5 +- .../default/xui/de/panel_preferences_chat.xml | 5 +- .../default/xui/de/panel_preferences_general.xml | 2 + .../skins/default/xui/de/panel_preferences_im.xml | 2 + .../default/xui/de/panel_preferences_popups.xml | 1 + .../default/xui/de/panel_preferences_skins.xml | 2 +- .../skins/default/xui/de/panel_region_debug.xml | 14 +- .../skins/default/xui/de/panel_region_estate.xml | 6 + .../newview/skins/default/xui/de/role_actions.xml | 15 +- .../indra/newview/skins/default/xui/de/strings.xml | 24 + .../newview/skins/default/xui/en-us/alerts.xml | 18 +- .../default/xui/en-us/floater_top_objects.xml | 4 +- .../newview/skins/default/xui/en-us/notify.xml | 2 +- .../default/xui/en-us/panel_preferences_voice.xml | 5 - .../default/xui/en-us/panel_voice_options.xml | 4 - .../newview/skins/default/xui/es/panel_toolbar.xml | 2 +- .../newview/skins/default/xui/fr/panel_toolbar.xml | 2 +- .../indra/newview/skins/default/xui/ja/alerts.xml | 87 +- .../newview/skins/default/xui/ja/floater_about.xml | 40 +- .../skins/default/xui/ja/floater_about_land.xml | 4 + .../newview/skins/default/xui/ja/floater_im.xml | 2 +- .../default/xui/ja/floater_instant_message.xml | 3 + .../default/xui/ja/floater_live_lsleditor.xml | 1 + .../skins/default/xui/ja/floater_mem_leaking.xml | 19 + .../skins/default/xui/ja/floater_postcard.xml | 23 +- .../skins/default/xui/ja/floater_report_abuse.xml | 115 +- .../xui/ja/floater_skin_preview_template.xml | 30 + .../skins/default/xui/ja/floater_snapshot.xml | 30 +- .../newview/skins/default/xui/ja/floater_tools.xml | 25 + .../skins/default/xui/ja/floater_top_objects.xml | 1 + .../newview/skins/default/xui/ja/floater_tos.xml | 1 + .../skins/default/xui/ja/menu_pie_avatar.xml | 2 +- .../newview/skins/default/xui/ja/menu_viewer.xml | 6 +- .../newview/skins/default/xui/ja/mime_types.xml | 7 +- .../newview/skins/default/xui/ja/need_to_long.xml | 343 +- .../skins/default/xui/ja/need_to_translate.xml | 4968 ++++++-------------- .../skins/default/xui/ja/need_to_update.xml | 1026 ++-- .../indra/newview/skins/default/xui/ja/notify.xml | 39 +- .../newview/skins/default/xui/ja/panel_login.xml | 5 +- .../default/xui/ja/panel_preferences_chat.xml | 6 +- .../default/xui/ja/panel_preferences_general.xml | 2 + .../skins/default/xui/ja/panel_preferences_im.xml | 2 + .../default/xui/ja/panel_preferences_popups.xml | 3 + .../default/xui/ja/panel_preferences_skins.xml | 2 +- .../skins/default/xui/ja/panel_region_debug.xml | 15 +- .../skins/default/xui/ja/panel_region_estate.xml | 6 + .../newview/skins/default/xui/ja/role_actions.xml | 27 +- .../indra/newview/skins/default/xui/ja/strings.xml | 24 + .../indra/newview/skins/default/xui/ko/alerts.xml | 81 +- .../newview/skins/default/xui/ko/floater_about.xml | 6 +- .../skins/default/xui/ko/floater_about_land.xml | 4 + .../newview/skins/default/xui/ko/floater_im.xml | 2 +- .../default/xui/ko/floater_instant_message.xml | 3 + .../default/xui/ko/floater_live_lsleditor.xml | 1 + .../skins/default/xui/ko/floater_mem_leaking.xml | 18 + .../skins/default/xui/ko/floater_postcard.xml | 7 +- .../skins/default/xui/ko/floater_report_abuse.xml | 115 +- .../xui/ko/floater_skin_preview_template.xml | 30 + .../skins/default/xui/ko/floater_snapshot.xml | 28 +- .../newview/skins/default/xui/ko/floater_tools.xml | 25 + .../skins/default/xui/ko/floater_top_objects.xml | 1 + .../newview/skins/default/xui/ko/floater_tos.xml | 1 + .../skins/default/xui/ko/menu_pie_avatar.xml | 2 +- .../newview/skins/default/xui/ko/menu_viewer.xml | 6 +- .../newview/skins/default/xui/ko/mime_types.xml | 7 +- .../newview/skins/default/xui/ko/need_to_long.xml | 270 +- .../skins/default/xui/ko/need_to_translate.xml | 4151 ++++------------ .../skins/default/xui/ko/need_to_update.xml | 786 ++-- .../indra/newview/skins/default/xui/ko/notify.xml | 43 +- .../newview/skins/default/xui/ko/panel_login.xml | 5 +- .../default/xui/ko/panel_preferences_chat.xml | 5 +- .../default/xui/ko/panel_preferences_general.xml | 2 + .../skins/default/xui/ko/panel_preferences_im.xml | 1 + .../default/xui/ko/panel_preferences_popups.xml | 3 + .../default/xui/ko/panel_preferences_skins.xml | 2 +- .../skins/default/xui/ko/panel_region_debug.xml | 14 +- .../skins/default/xui/ko/panel_region_estate.xml | 6 + .../newview/skins/default/xui/ko/role_actions.xml | 15 +- .../indra/newview/skins/default/xui/ko/strings.xml | 24 + .../newview/skins/default/xui/zh/panel_toolbar.xml | 2 +- .../skins/silver/xui/en-us/floater_tools.xml | 10 + .../skins/silver/xui/en-us/panel_avatar.xml | 31 +- .../win_crash_logger/llcrashloggerwindows.cpp | 2 + .../indra/win_crash_logger/llcrashloggerwindows.h | 1 - linden/indra/win_crash_logger/win_crash_logger.cpp | 2 + 163 files changed, 6636 insertions(+), 12261 deletions(-) create mode 100644 linden/indra/newview/skins/default/xui/de/floater_mem_leaking.xml create mode 100644 linden/indra/newview/skins/default/xui/de/floater_skin_preview_template.xml create mode 100644 linden/indra/newview/skins/default/xui/ja/floater_mem_leaking.xml create mode 100644 linden/indra/newview/skins/default/xui/ja/floater_skin_preview_template.xml create mode 100644 linden/indra/newview/skins/default/xui/ko/floater_mem_leaking.xml create mode 100644 linden/indra/newview/skins/default/xui/ko/floater_skin_preview_template.xml diff --git a/linden/indra/llaudio/listener.cpp b/linden/indra/llaudio/listener.cpp index 849b143..ff3cfff 100644 --- a/linden/indra/llaudio/listener.cpp +++ b/linden/indra/llaudio/listener.cpp @@ -59,11 +59,6 @@ void LLListener::init(void) } //----------------------------------------------------------------------- -void LLListener::free(void) -{ -} - -//----------------------------------------------------------------------- void LLListener::translate(LLVector3 offset) { mPosition += offset; diff --git a/linden/indra/llaudio/listener.h b/linden/indra/llaudio/listener.h index 07664f7..595373d 100644 --- a/linden/indra/llaudio/listener.h +++ b/linden/indra/llaudio/listener.h @@ -51,7 +51,6 @@ class LLListener LLListener(); virtual ~LLListener(); virtual void init(); - virtual void free(); virtual void set(LLVector3 pos, LLVector3 vel, LLVector3 up, LLVector3 at); diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h index 7d3c82d..827ec8f 100644 --- a/linden/indra/llcommon/linden_common.h +++ b/linden/indra/llcommon/linden_common.h @@ -32,6 +32,12 @@ #ifndef LL_LINDEN_COMMON_H #define LL_LINDEN_COMMON_H +#if defined(LL_WINDOWS) && defined(_DEBUG) +# define _CRTDBG_MAP_ALLOC +# include +# include +#endif + #include "llpreprocessor.h" #include diff --git a/linden/indra/llcommon/lldqueueptr.h b/linden/indra/llcommon/lldqueueptr.h index 248357e..07addb5 100644 --- a/linden/indra/llcommon/lldqueueptr.h +++ b/linden/indra/llcommon/lldqueueptr.h @@ -47,7 +47,7 @@ public: void init(); void destroy(); void reset(); - void realloc(U32 newsize); + void reallocate(U32 newsize); // ACCESSORS const Type& get(const S32 index) const; // no bounds checking @@ -115,7 +115,7 @@ template inline LLDynamicQueuePtr::LLDynamicQueuePtr(const S32 size) { init(); - realloc(size); + reallocate(size); } template @@ -134,7 +134,7 @@ inline void LLDynamicQueuePtr::init() } template -inline void LLDynamicQueuePtr::realloc(U32 newsize) +inline void LLDynamicQueuePtr::reallocate(U32 newsize) { if (newsize) { @@ -308,7 +308,7 @@ inline S32 LLDynamicQueuePtr::push(const Type &obj) { if (mMaxObj - count() <= 1) { - realloc(mMaxObj * 2); + reallocate(mMaxObj * 2); } mMemory[mLastObj++] = obj; diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index cd7b304..f357b76 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -34,7 +34,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 21; -const S32 LL_VERSION_PATCH = 1; +const S32 LL_VERSION_PATCH = 2; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llmessage/llpacketbuffer.cpp b/linden/indra/llmessage/llpacketbuffer.cpp index 129965e..649cdb6 100644 --- a/linden/indra/llmessage/llpacketbuffer.cpp +++ b/linden/indra/llmessage/llpacketbuffer.cpp @@ -65,7 +65,6 @@ LLPacketBuffer::LLPacketBuffer (S32 hSocket) LLPacketBuffer::~LLPacketBuffer () { - free(); } /////////////////////////////////////////////////////////// @@ -76,25 +75,3 @@ void LLPacketBuffer::init (S32 hSocket) mHost = ::get_sender(); } -/////////////////////////////////////////////////////////// - -void LLPacketBuffer::free () -{ -} - - - - - - - - - - - - - - - - - diff --git a/linden/indra/llmessage/llpacketbuffer.h b/linden/indra/llmessage/llpacketbuffer.h index f1c343b..fc6f606 100644 --- a/linden/indra/llmessage/llpacketbuffer.h +++ b/linden/indra/llmessage/llpacketbuffer.h @@ -47,7 +47,6 @@ public: const char *getData() const { return mData; } LLHost getHost() const { return mHost; } void init(S32 hSocket); - void free(); protected: char mData[NET_BUFFER_SIZE]; // packet data /* Flawfinder : ignore */ diff --git a/linden/indra/llmessage/llpacketring.cpp b/linden/indra/llmessage/llpacketring.cpp index 12d4e11..2d517af 100644 --- a/linden/indra/llmessage/llpacketring.cpp +++ b/linden/indra/llmessage/llpacketring.cpp @@ -59,11 +59,11 @@ LLPacketRing::LLPacketRing () : /////////////////////////////////////////////////////////// LLPacketRing::~LLPacketRing () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// -void LLPacketRing::free () +void LLPacketRing::cleanup () { LLPacketBuffer *packetp; diff --git a/linden/indra/llmessage/llpacketring.h b/linden/indra/llmessage/llpacketring.h index dac52e6..8d3bf8d 100644 --- a/linden/indra/llmessage/llpacketring.h +++ b/linden/indra/llmessage/llpacketring.h @@ -47,7 +47,7 @@ public: LLPacketRing(); ~LLPacketRing(); - void free(); + void cleanup(); void dropPackets(U32); void setDropPercentage (F32 percent_to_drop); diff --git a/linden/indra/llmessage/llxfer.cpp b/linden/indra/llmessage/llxfer.cpp index ab7b1ee..03bc42c 100644 --- a/linden/indra/llmessage/llxfer.cpp +++ b/linden/indra/llmessage/llxfer.cpp @@ -55,7 +55,7 @@ LLXfer::LLXfer (S32 chunk_size) LLXfer::~LLXfer () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// @@ -90,7 +90,7 @@ void LLXfer::init (S32 chunk_size) /////////////////////////////////////////////////////////// -void LLXfer::free () +void LLXfer::cleanup () { if (mBuffer) { diff --git a/linden/indra/llmessage/llxfer.h b/linden/indra/llmessage/llxfer.h index 259f1ac..bd82300 100644 --- a/linden/indra/llmessage/llxfer.h +++ b/linden/indra/llmessage/llxfer.h @@ -88,7 +88,7 @@ class LLXfer virtual ~LLXfer(); void init(S32 chunk_size); - virtual void free(); + virtual void cleanup(); virtual S32 startSend (U64 xfer_id, const LLHost &remote_host); virtual void sendPacket(S32 packet_num); diff --git a/linden/indra/llmessage/llxfer_file.cpp b/linden/indra/llmessage/llxfer_file.cpp index da12d54..c56ea98 100644 --- a/linden/indra/llmessage/llxfer_file.cpp +++ b/linden/indra/llmessage/llxfer_file.cpp @@ -67,7 +67,7 @@ LLXfer_File::LLXfer_File (const std::string& local_filename, BOOL delete_local_o LLXfer_File::~LLXfer_File () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// @@ -95,7 +95,7 @@ void LLXfer_File::init (const std::string& local_filename, BOOL delete_local_on_ /////////////////////////////////////////////////////////// -void LLXfer_File::free () +void LLXfer_File::cleanup () { if (mFp) { @@ -115,7 +115,7 @@ void LLXfer_File::free () lldebugs << "Keeping local file: " << mLocalFilename << llendl; } - LLXfer::free(); + LLXfer::cleanup(); } /////////////////////////////////////////////////////////// diff --git a/linden/indra/llmessage/llxfer_file.h b/linden/indra/llmessage/llxfer_file.h index 78f77a8..09b3228 100644 --- a/linden/indra/llmessage/llxfer_file.h +++ b/linden/indra/llmessage/llxfer_file.h @@ -53,7 +53,7 @@ class LLXfer_File : public LLXfer virtual ~LLXfer_File(); virtual void init(const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size); - virtual void free(); + virtual void cleanup(); virtual S32 initializeRequest(U64 xfer_id, const std::string& local_filename, diff --git a/linden/indra/llmessage/llxfer_mem.cpp b/linden/indra/llmessage/llxfer_mem.cpp index 3404520..0b8c5b1 100644 --- a/linden/indra/llmessage/llxfer_mem.cpp +++ b/linden/indra/llmessage/llxfer_mem.cpp @@ -48,7 +48,7 @@ LLXfer_Mem::LLXfer_Mem () LLXfer_Mem::~LLXfer_Mem () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// @@ -62,9 +62,9 @@ void LLXfer_Mem::init () /////////////////////////////////////////////////////////// -void LLXfer_Mem::free () +void LLXfer_Mem::cleanup () { - LLXfer::free(); + LLXfer::cleanup(); } /////////////////////////////////////////////////////////// diff --git a/linden/indra/llmessage/llxfer_mem.h b/linden/indra/llmessage/llxfer_mem.h index 0e67a06..cb2dd88 100644 --- a/linden/indra/llmessage/llxfer_mem.h +++ b/linden/indra/llmessage/llxfer_mem.h @@ -55,7 +55,7 @@ class LLXfer_Mem : public LLXfer virtual ~LLXfer_Mem(); virtual void init(); - virtual void free(); + virtual void cleanup(); virtual S32 startSend (U64 xfer_id, const LLHost &remote_host); virtual U64 registerXfer(U64 xfer_id, const void *datap, const S32 length); diff --git a/linden/indra/llmessage/llxfer_vfile.cpp b/linden/indra/llmessage/llxfer_vfile.cpp index aede763..a92c434 100644 --- a/linden/indra/llmessage/llxfer_vfile.cpp +++ b/linden/indra/llmessage/llxfer_vfile.cpp @@ -60,7 +60,7 @@ LLXfer_VFile::LLXfer_VFile (LLVFS *vfs, const LLUUID &local_id, LLAssetType::ETy LLXfer_VFile::~LLXfer_VFile () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// @@ -82,7 +82,7 @@ void LLXfer_VFile::init (LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType /////////////////////////////////////////////////////////// -void LLXfer_VFile::free () +void LLXfer_VFile::cleanup () { LLVFile file(mVFS, mTempID, mType, LLVFile::WRITE); file.remove(); @@ -90,7 +90,7 @@ void LLXfer_VFile::free () delete mVFile; mVFile = NULL; - LLXfer::free(); + LLXfer::cleanup(); } /////////////////////////////////////////////////////////// diff --git a/linden/indra/llmessage/llxfer_vfile.h b/linden/indra/llmessage/llxfer_vfile.h index 12d38ba..e7e1981 100644 --- a/linden/indra/llmessage/llxfer_vfile.h +++ b/linden/indra/llmessage/llxfer_vfile.h @@ -58,7 +58,7 @@ class LLXfer_VFile : public LLXfer virtual ~LLXfer_VFile(); virtual void init(LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType type); - virtual void free(); + virtual void cleanup(); virtual S32 initializeRequest(U64 xfer_id, LLVFS *vfs, diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp index 90188b6..f40612c 100644 --- a/linden/indra/llmessage/llxfermanager.cpp +++ b/linden/indra/llmessage/llxfermanager.cpp @@ -64,7 +64,7 @@ LLXferManager::LLXferManager (LLVFS *vfs) LLXferManager::~LLXferManager () { - free(); + cleanup(); } /////////////////////////////////////////////////////////// @@ -86,7 +86,7 @@ void LLXferManager::init (LLVFS *vfs) /////////////////////////////////////////////////////////// -void LLXferManager::free () +void LLXferManager::cleanup () { LLXfer *xferp; LLXfer *delp; diff --git a/linden/indra/llmessage/llxfermanager.h b/linden/indra/llmessage/llxfermanager.h index 12b3ec0..77f3f60 100644 --- a/linden/indra/llmessage/llxfermanager.h +++ b/linden/indra/llmessage/llxfermanager.h @@ -114,7 +114,7 @@ class LLXferManager virtual ~LLXferManager(); virtual void init(LLVFS *vfs); - virtual void free(); + virtual void cleanup(); void setUseAckThrottling(const BOOL use); void setAckThrottleBPS(const F32 bps); diff --git a/linden/indra/llrender/llrender.cpp b/linden/indra/llrender/llrender.cpp index 13edf8a..7be06af 100644 --- a/linden/indra/llrender/llrender.cpp +++ b/linden/indra/llrender/llrender.cpp @@ -439,10 +439,16 @@ LLRender::LLRender() LLRender::~LLRender() { + shutdown(); +} + +void LLRender::shutdown() +{ for (U32 i = 0; i < mTexUnits.size(); i++) { delete mTexUnits[i]; } + mTexUnits.clear(); } void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z) diff --git a/linden/indra/llrender/llrender.h b/linden/indra/llrender/llrender.h index edf46ff..15360a3 100644 --- a/linden/indra/llrender/llrender.h +++ b/linden/indra/llrender/llrender.h @@ -176,7 +176,8 @@ public: LLRender(); ~LLRender(); - + void shutdown(); + void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z); void scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z); void pushMatrix(); diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 1fc9244..734aecf 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -134,7 +134,7 @@ void gl_state_for_2d(S32 width, S32 height) glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glOrtho(0.0f, window_width, 0.0f, window_height, -1.0f, 1.0f); + glOrtho(0.0f, llmax(window_width, 1.f), 0.0f, llmax(window_height,1.f), -1.0f, 1.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); stop_glerror(); diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 6d6b7aa..0e014d9 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp @@ -377,7 +377,8 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd case LL_PATH_EXECUTABLE: prefix = getExecutableDir(); - + break; + default: llassert(0); } diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index 4cfe199..3e62195 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/indra/lscript/lscript_compile/indra.l @@ -611,6 +611,11 @@ extern "C" { int yyerror(const char *fmt, ...); } "TEXTURE_PLYWOOD" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); } "TEXTURE_TRANSPARENT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); return(STRING_CONSTANT); } +"TOUCH_INVALID_FACE" { count(); yylval.ival = -1; return(INTEGER_CONSTANT); } +"TOUCH_INVALID_VECTOR" { count(); return(TOUCH_INVALID_VECTOR); } +"TOUCH_INVALID_TEXCOORD" { count(); return(TOUCH_INVALID_TEXCOORD); } + + {L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); } {N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y index d10cbfe..fdc240c 100644 --- a/linden/indra/lscript/lscript_compile/indra.y +++ b/linden/indra/lscript/lscript_compile/indra.y @@ -136,6 +136,9 @@ %token ZERO_VECTOR %token ZERO_ROTATION +%token TOUCH_INVALID_VECTOR +%token TOUCH_INVALID_TEXCOORD + %nonassoc LOWER_THAN_ELSE %nonassoc ELSE @@ -439,6 +442,40 @@ vector_constant $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); gAllocationManager->addAllocation($$); } + | TOUCH_INVALID_VECTOR + { + LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf0); + LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0); + gAllocationManager->addAllocation(sa0); + LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf1); + LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1); + gAllocationManager->addAllocation(sa1); + LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf2); + LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2); + gAllocationManager->addAllocation(sa2); + $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); + gAllocationManager->addAllocation($$); + } + | TOUCH_INVALID_TEXCOORD + { + LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f); + gAllocationManager->addAllocation(cf0); + LLScriptSAConstant *sa0 = new LLScriptSAConstant(gLine, gColumn, cf0); + gAllocationManager->addAllocation(sa0); + LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f); + gAllocationManager->addAllocation(cf1); + LLScriptSAConstant *sa1 = new LLScriptSAConstant(gLine, gColumn, cf1); + gAllocationManager->addAllocation(sa1); + LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf2); + LLScriptSAConstant *sa2 = new LLScriptSAConstant(gLine, gColumn, cf2); + gAllocationManager->addAllocation(sa2); + $$ = new LLScriptSAVector(gLine, gColumn, sa0, sa1, sa2); + gAllocationManager->addAllocation($$); + } ; quaternion_constant @@ -1645,6 +1682,40 @@ vector_initializer $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); gAllocationManager->addAllocation($$); } + | TOUCH_INVALID_VECTOR + { + LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf0); + LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0); + gAllocationManager->addAllocation(sa0); + LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf1); + LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1); + gAllocationManager->addAllocation(sa1); + LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf2); + LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2); + gAllocationManager->addAllocation(sa2); + $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); + gAllocationManager->addAllocation($$); + } + | TOUCH_INVALID_TEXCOORD + { + LLScriptConstantFloat *cf0 = new LLScriptConstantFloat(gLine, gColumn, -1.f); + gAllocationManager->addAllocation(cf0); + LLScriptConstantExpression *sa0 = new LLScriptConstantExpression(gLine, gColumn, cf0); + gAllocationManager->addAllocation(sa0); + LLScriptConstantFloat *cf1 = new LLScriptConstantFloat(gLine, gColumn, -1.f); + gAllocationManager->addAllocation(cf1); + LLScriptConstantExpression *sa1 = new LLScriptConstantExpression(gLine, gColumn, cf1); + gAllocationManager->addAllocation(sa1); + LLScriptConstantFloat *cf2 = new LLScriptConstantFloat(gLine, gColumn, 0.f); + gAllocationManager->addAllocation(cf2); + LLScriptConstantExpression *sa2 = new LLScriptConstantExpression(gLine, gColumn, cf2); + gAllocationManager->addAllocation(sa2); + $$ = new LLScriptVectorInitializer(gLine, gColumn, sa0, sa1, sa2); + gAllocationManager->addAllocation($$); + } ; quaternion_initializer diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini index 23c88dc..3679c38 100644 --- a/linden/indra/newview/app_settings/keywords.ini +++ b/linden/indra/newview/app_settings/keywords.ini @@ -506,6 +506,10 @@ CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default ac CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked +TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid. +TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid. +TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid. + # string constants [word .1, .3, .5] NULL_KEY Indicates an empty key diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index f2653cd..5543847 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -2360,17 +2360,6 @@ 1.0 - EnablePushToTalk - - Comment - Must hold down a key or moouse button when talking into your microphone - Persist - 1 - Type - Boolean - Value - 1 - EnableRippleWater Comment @@ -5165,7 +5154,7 @@ PTTCurrentlyEnabled Comment - + Use Push to Talk mode Persist 0 Type @@ -10050,7 +10039,7 @@ Type Boolean Value - 1 + 0 WaterEditPresets diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt index 7e7be97..77b75e1 100644 --- a/linden/indra/newview/gpu_table.txt +++ b/linden/indra/newview/gpu_table.txt @@ -67,6 +67,12 @@ ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1 ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1 ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1 ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1 +ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD.*23.* 1 1 +ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD.*24.* 1 1 +ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD.*26.* 3 1 +ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD.*34.* 1 1 +ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD.*36.* 3 1 +ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD.*38.* 3 1 ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 0 1 ATI Mobility Radeon X2xxx .*ATI.*Mobility.*X2.* 0 1 ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 1 diff --git a/linden/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store b/linden/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store index a8b7573..c73ba24 100644 Binary files a/linden/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store and b/linden/indra/newview/installers/darwin/releasecandidate-dmg/_DS_Store differ diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 6a53300..9851e47 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -58,6 +58,7 @@ #include "llfloatersnapshot.h" #include "llviewerwindow.h" #include "llviewerdisplay.h" +#include "llviewermedia.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llworldmap.h" @@ -82,8 +83,6 @@ # include // For initMarkerFile support #endif - - #include "llnotify.h" #include "llviewerkeyboard.h" #include "lllfsthread.h" @@ -466,9 +465,6 @@ static void settings_modify() gSavedSettings.setU32("VectorizeProcessor", 0 ); gSavedSettings.setBOOL("VectorizeSkin", FALSE); #endif - - // propagate push to talk preference to current status - gSavedSettings.setBOOL("PTTCurrentlyEnabled", TRUE); //gSavedSettings.getBOOL("EnablePushToTalk")); } void LLAppViewer::initGridChoice() @@ -581,7 +577,7 @@ bool LLAppViewer::init() // into the log files during normal startup until AFTER // we run the "program crashed last time" error handler below. // - + // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API gDirUtilp->initAppDirs("SecondLife"); @@ -1364,6 +1360,7 @@ bool LLAppViewer::cleanup() sImageDecodeThread = NULL; gImageList.shutdown(); // shutdown again in case a callback added something + LLUIImageList::getInstance()->cleanUp(); // This should eventually be done in LLAppViewer LLImageJ2C::closeDSO(); @@ -1406,9 +1403,11 @@ bool LLAppViewer::cleanup() LLWeb::loadURLExternal( gLaunchFileOnQuit ); } - + + LLViewerMedia::cleanupClass(); llinfos << "Goodbye" << llendflush; + // return 0; return true; } diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index aab6289..07f3ece 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp @@ -31,6 +31,10 @@ #include "llviewerprecompiledheaders.h" +#if defined(_DEBUG) +# define WINDOWS_CRT_MEM_CHECKS 1 +#endif + #include "llappviewerwin32.h" #include "llmemtype.h" @@ -127,6 +131,10 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, { LLMemType mt1(LLMemType::MTYPE_STARTUP); +#if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD + _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit +#endif + // *FIX: global gIconResource = MAKEINTRESOURCE(IDI_LL_ICON); @@ -156,7 +164,32 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // the assumption is that the error handler is responsible for doing // app cleanup if there was a problem. // - viewer_app_ptr->cleanup(); +#if WINDOWS_CRT_MEM_CHECKS + llinfos << "CRT Checking memory:" << llendflush; + if (!_CrtCheckMemory()) + { + llwarns << "_CrtCheckMemory() failed at prior to cleanup!" << llendflush; + } + else + { + llinfos << " No corruption detected." << llendflush; + } +#endif + + viewer_app_ptr->cleanup(); + +#if WINDOWS_CRT_MEM_CHECKS + llinfos << "CRT Checking memory:" << llendflush; + if (!_CrtCheckMemory()) + { + llwarns << "_CrtCheckMemory() failed after cleanup!" << llendflush; + } + else + { + llinfos << " No corruption detected." << llendflush; + } +#endif + } delete viewer_app_ptr; viewer_app_ptr = NULL; diff --git a/linden/indra/newview/llconsole.cpp b/linden/indra/newview/llconsole.cpp index c2aaa01..b0f1988 100644 --- a/linden/indra/newview/llconsole.cpp +++ b/linden/indra/newview/llconsole.cpp @@ -383,6 +383,10 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, LLFontGL* font, bool fo } mLines.push_back(line); //Append line to paragraph line list. } + else + { + break; // Nothing more to print + } paragraph_offset += (drawable + skip_chars); } } diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index 7f6bf01..8fdaa52 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp @@ -41,6 +41,7 @@ #include "lldir.h" #include "llagent.h" +#include "llappviewer.h" // for gLastVersionChannel #include "llfloateravatarpicker.h" #include "llviewerwindow.h" #include "llbutton.h" @@ -591,7 +592,7 @@ struct LLAddFriendData }; // static -void LLPanelFriends::callbackAddFriend(S32 option, const std::string& text, void* data) +void LLPanelFriends::callbackAddFriendWithMessage(S32 option, const std::string& text, void* data) { LLAddFriendData* add = (LLAddFriendData*)data; if (option == 0) @@ -602,6 +603,22 @@ void LLPanelFriends::callbackAddFriend(S32 option, const std::string& text, void } // static +void LLPanelFriends::callbackAddFriend(S32 option, void* data) +{ + LLAddFriendData* add = (LLAddFriendData*)data; + if (option == 0) + { + // Servers older than 1.25 require the text of the message to be the + // calling card folder ID for the offering user. JC + LLUUID calling_card_folder_id = + gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD); + std::string message = calling_card_folder_id.asString(); + requestFriendship(add->mID, add->mName, message); + } + delete add; +} + +// static void LLPanelFriends::onPickAvatar(const std::vector& names, const std::vector& ids, void* ) @@ -625,10 +642,20 @@ void LLPanelFriends::requestFriendshipDialog(const LLUUID& id, data->mID = id; data->mName = name; - // TODO: accept a line of text with this dialog LLStringUtil::format_map_t args; args["[NAME]"] = name; - gViewerWindow->alertXmlEditText("AddFriend", args, NULL, NULL, callbackAddFriend, data); + + // Look for server versions like: Second Life Server 1.24.4.95600 + if (gLastVersionChannel.find(" 1.24.") != std::string::npos) + { + // Old and busted server version, doesn't support friend + // requests with messages. + gViewerWindow->alertXml("AddFriend", args, callbackAddFriend, data); + } + else + { + gViewerWindow->alertXmlEditText("AddFriendWithMessage", args, NULL, NULL, callbackAddFriendWithMessage, data); + } } // static diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h index 7444d93..afb206e 100644 --- a/linden/indra/newview/llfloaterfriends.h +++ b/linden/indra/newview/llfloaterfriends.h @@ -119,7 +119,8 @@ private: // callback methods static void onSelectName(LLUICtrl* ctrl, void* user_data); - static void callbackAddFriend(S32 option, const std::string& text, void* user_data); + static void callbackAddFriendWithMessage(S32 option, const std::string& text, void* user_data); + static void callbackAddFriend(S32 option, void* user_data); static void onPickAvatar(const std::vector& names, const std::vector& ids, void* user_data); static void onMaximumSelect(void* user_data); diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 92e8ad1..912a4fc 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -114,8 +114,7 @@ BOOL LLFloaterImagePreview::postBuild() mSculptedPreview = new LLImagePreviewSculpted(256, 256); mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); - if ((mRawImagep->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) && - (mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF)) + if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF) childEnable("lossless_check"); } else diff --git a/linden/indra/newview/llfloatertopobjects.cpp b/linden/indra/newview/llfloatertopobjects.cpp index 02be0f9..ada5c68 100644 --- a/linden/indra/newview/llfloatertopobjects.cpp +++ b/linden/indra/newview/llfloatertopobjects.cpp @@ -157,8 +157,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getU32Fast(_PREHASH_RequestData, _PREHASH_TotalObjectCount, total_count); msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode); - LLCtrlListInterface *list = childGetListInterface("objects_list"); - if (!list) return; + LLScrollListCtrl *list = getChild("objects_list"); S32 block_count = msg->getNumberOfBlocks("ReportData"); for (S32 block = 0; block < block_count; ++block) @@ -206,16 +205,16 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) element["columns"][3]["column"] = "location"; element["columns"][3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); element["columns"][3]["font"] = "SANSSERIF"; - element["columns"][3]["column"] = "time"; - element["columns"][3]["value"] = formatted_time((time_t)time_stamp); - element["columns"][3]["font"] = "SANSSERIF"; + element["columns"][4]["column"] = "time"; + element["columns"][4]["value"] = formatted_time((time_t)time_stamp); + element["columns"][4]["font"] = "SANSSERIF"; if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS && have_extended_data) { - element["columns"][4]["column"] = "Mono Time"; - element["columns"][4]["value"] = llformat("%0.3f", mono_score); - element["columns"][4]["font"] = "SANSSERIF"; + element["columns"][5]["column"] = "Mono Time"; + element["columns"][5]["value"] = llformat("%0.3f", mono_score); + element["columns"][5]["font"] = "SANSSERIF"; } list->addElement(element); @@ -228,13 +227,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) if (total_count == 0 && list->getItemCount() == 0) { - LLSD element; - element["id"] = LLUUID::null; - element["columns"][0]["column"] = "name"; - element["columns"][0]["value"] = getString("none_descriptor"); - element["columns"][0]["font"] = "SANSSERIF"; - - list->addElement(element); + list->addCommentText(getString("none_descriptor")); } else { diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 0e6056f..b1e3017 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -293,6 +293,28 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, items = get_ptr_in_map(mParentChildItemTree, cat_id); } +// SJB: Added version to lock the arrays to catch potential logic bugs +void LLInventoryModel::lockDirectDescendentArrays(const LLUUID& cat_id, + cat_array_t*& categories, + item_array_t*& items) +{ + getDirectDescendentsOf(cat_id, categories, items); + if (categories) + { + mCategoryLock[cat_id] = true; + } + if (items) + { + mItemLock[cat_id] = true; + } +} + +void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id) +{ + mCategoryLock[cat_id] = false; + mItemLock[cat_id] = false; +} + // findCategoryUUIDForType() returns the uuid of the category that // specifies 'type' as what it defaults to containing. The category is // not necessarily only for that type. *NOTE: This will create a new @@ -620,6 +642,26 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) return mask; } +LLInventoryModel::cat_array_t* LLInventoryModel::getUnlockedCatArray(const LLUUID& id) +{ + cat_array_t* cat_array = get_ptr_in_map(mParentChildCategoryTree, id); + if (cat_array) + { + llassert_always(mCategoryLock[id] == false); + } + return cat_array; +} + +LLInventoryModel::item_array_t* LLInventoryModel::getUnlockedItemArray(const LLUUID& id) +{ + item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id); + if (item_array) + { + llassert_always(mItemLock[id] == false); + } + return item_array; +} + // Calling this method with an inventory category will either change // an existing item with the matching id, or it will add the category. void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) @@ -646,12 +688,12 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) { // need to update the parent-child tree cat_array_t* cat_array; - cat_array = get_ptr_in_map(mParentChildCategoryTree, old_parent_id); + cat_array = getUnlockedCatArray(old_parent_id); if(cat_array) { cat_array->removeObj(old_cat); } - cat_array = get_ptr_in_map(mParentChildCategoryTree, new_parent_id); + cat_array = getUnlockedCatArray(new_parent_id); if(cat_array) { cat_array->put(old_cat); @@ -674,13 +716,15 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) // make sure this category is correctly referenced by it's parent. cat_array_t* cat_array; - cat_array = get_ptr_in_map(mParentChildCategoryTree, cat->getParentUUID()); + cat_array = getUnlockedCatArray(cat->getParentUUID()); if(cat_array) { cat_array->put(new_cat); } // make space in the tree for this category's children. + llassert_always(mCategoryLock[new_cat->getUUID()] == false); + llassert_always(mItemLock[new_cat->getUUID()] == false); cat_array_t* catsp = new cat_array_t; item_array_t* itemsp = new item_array_t; mParentChildCategoryTree[new_cat->getUUID()] = catsp; @@ -708,9 +752,9 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) if(cat && (cat->getParentUUID() != cat_id)) { cat_array_t* cat_array; - cat_array = get_ptr_in_map(mParentChildCategoryTree, cat->getParentUUID()); + cat_array = getUnlockedCatArray(cat->getParentUUID()); if(cat_array) cat_array->removeObj(cat); - cat_array = get_ptr_in_map(mParentChildCategoryTree, cat_id); + cat_array = getUnlockedCatArray(cat_id); cat->setParent(cat_id); if(cat_array) cat_array->put(cat); addChangedMask(LLInventoryObserver::STRUCTURE, object_id); @@ -720,9 +764,9 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) if(item && (item->getParentUUID() != cat_id)) { item_array_t* item_array; - item_array = get_ptr_in_map(mParentChildItemTree, item->getParentUUID()); + item_array = getUnlockedItemArray(item->getParentUUID()); if(item_array) item_array->removeObj(item); - item_array = get_ptr_in_map(mParentChildItemTree, cat_id); + item_array = getUnlockedItemArray(cat_id); item->setParent(cat_id); if(item_array) item_array->put(item); addChangedMask(LLInventoryObserver::STRUCTURE, object_id); @@ -743,25 +787,25 @@ void LLInventoryModel::deleteObject(const LLUUID& id) mCategoryMap.erase(id); mItemMap.erase(id); //mInventory.erase(id); - item_array_t* item_list = get_ptr_in_map(mParentChildItemTree, parent_id); + item_array_t* item_list = getUnlockedItemArray(parent_id); if(item_list) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)((LLInventoryObject*)obj); item_list->removeObj(item); } - cat_array_t* cat_list = get_ptr_in_map(mParentChildCategoryTree, parent_id); + cat_array_t* cat_list = getUnlockedCatArray(parent_id); if(cat_list) { LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj); cat_list->removeObj(cat); } - item_list = get_ptr_in_map(mParentChildItemTree, id); + item_list = getUnlockedItemArray(id); if(item_list) { delete item_list; mParentChildItemTree.erase(id); } - cat_list = get_ptr_in_map(mParentChildCategoryTree, id); + cat_list = getUnlockedCatArray(id); if(cat_list) { delete cat_list; @@ -2060,11 +2104,13 @@ void LLInventoryModel::buildParentChildMap() cats.put(cat); if (mParentChildCategoryTree.count(cat->getUUID()) == 0) { + llassert_always(mCategoryLock[cat->getUUID()] == false); catsp = new cat_array_t; mParentChildCategoryTree[cat->getUUID()] = catsp; } if (mParentChildItemTree.count(cat->getUUID()) == 0) { + llassert_always(mItemLock[cat->getUUID()] == false); itemsp = new item_array_t; mParentChildItemTree[cat->getUUID()] = itemsp; } @@ -2089,7 +2135,7 @@ void LLInventoryModel::buildParentChildMap() for(i = 0; i < count; ++i) { LLViewerInventoryCategory* cat = cats.get(i); - catsp = get_ptr_in_map(mParentChildCategoryTree, cat->getParentUUID()); + catsp = getUnlockedCatArray(cat->getParentUUID()); if(catsp) { catsp->put(cat); @@ -2122,7 +2168,7 @@ void LLInventoryModel::buildParentChildMap() cat->setParent(gAgent.getInventoryRootID()); } cat->updateServer(TRUE); - catsp = get_ptr_in_map(mParentChildCategoryTree, cat->getParentUUID()); + catsp = getUnlockedCatArray(cat->getParentUUID()); if(catsp) { catsp->put(cat); @@ -2158,7 +2204,7 @@ void LLInventoryModel::buildParentChildMap() { LLPointer item; item = items.get(i); - itemsp = get_ptr_in_map(mParentChildItemTree, item->getParentUUID()); + itemsp = getUnlockedItemArray(item->getParentUUID()); if(itemsp) { itemsp->put(item); @@ -2175,7 +2221,7 @@ void LLInventoryModel::buildParentChildMap() // we update server here, the client might crash. //item->updateServer(); lost_item_ids.push_back(item->getUUID()); - itemsp = get_ptr_in_map(mParentChildItemTree, item->getParentUUID()); + itemsp = getUnlockedItemArray(item->getParentUUID()); if(itemsp) { itemsp->put(item); diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h index d8c3163..8017410 100644 --- a/linden/indra/newview/llinventorymodel.h +++ b/linden/indra/newview/llinventorymodel.h @@ -162,7 +162,13 @@ public: void getDirectDescendentsOf(const LLUUID& cat_id, cat_array_t*& categories, item_array_t*& items) const; - + + // SJB: Added version to lock the arrays to catch potential logic bugs + void lockDirectDescendentArrays(const LLUUID& cat_id, + cat_array_t*& categories, + item_array_t*& items); + void unlockDirectDescendentArrays(const LLUUID& cat_id); + // Starting with the object specified, add it's descendents to the // array provided, but do not add the inventory object specified // by id. There is no guaranteed order. Neither array will be @@ -418,6 +424,10 @@ protected: bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); protected: + cat_array_t* getUnlockedCatArray(const LLUUID& id); + item_array_t* getUnlockedItemArray(const LLUUID& id); + +protected: // Varaibles used to track what has changed since the last notify. U32 mModifyMask; typedef std::set changed_items_t; @@ -434,6 +444,9 @@ protected: cat_map_t mCategoryMap; item_map_t mItemMap; + std::map mCategoryLock; + std::map mItemLock; + // cache recent lookups mutable LLPointer mLastItem; diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 2150b70..f9dd70d 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -1506,8 +1506,6 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) { LLFolderViewItem* itemp = NULL; LLInventoryObject* objectp = gInventory.getObject(id); - S32 i; - S32 count; if (objectp) { @@ -1577,11 +1575,11 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) LLViewerInventoryCategory::cat_array_t* categories; LLViewerInventoryItem::item_array_t* items; - mInventory->getDirectDescendentsOf(id, categories, items); + mInventory->lockDirectDescendentArrays(id, categories, items); if(categories) { - count = categories->count(); - for(i = 0; i < count; ++i) + S32 count = categories->count(); + for(S32 i = 0; i < count; ++i) { LLInventoryCategory* cat = categories->get(i); buildNewViews(cat->getUUID()); @@ -1589,13 +1587,14 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) } if(items) { - count = items->count(); - for(i = 0; i < count; ++i) + S32 count = items->count(); + for(S32 i = 0; i < count; ++i) { LLInventoryItem* item = items->get(i); buildNewViews(item->getUUID()); } } + mInventory->unlockDirectDescendentArrays(id); } } diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 5aa2cf4..6661f08 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp @@ -96,7 +96,6 @@ void LLPrefsVoiceLogic::init() mEnableVoice = gSavedSettings.getBOOL("EnableVoiceChat"); mVoiceCallsFriendsOnly = gSavedSettings.getBOOL("VoiceCallsFriendsOnly"); -// mEnablePushToTalk = gSavedSettings.getBOOL("EnablePushToTalk"); mModifier = gSavedSettings.getString("PushToTalkButton"); mPushToTalkToggle = gSavedSettings.getBOOL("PushToTalkToggle"); mEarLocation = gSavedSettings.getS32("VoiceEarLocation"); @@ -139,7 +138,6 @@ void LLPrefsVoiceLogic::cancel() { gSavedSettings.setBOOL("EnableVoiceChat", mEnableVoice); gSavedSettings.setBOOL("VoiceCallsFriendsOnly", mVoiceCallsFriendsOnly); -// gSavedSettings.setBOOL("EnablePushToTalk", mEnablePushToTalk ); gSavedSettings.setString("PushToTalkButton", mModifier); gSavedSettings.setBOOL("PushToTalkToggle", mPushToTalkToggle ); gSavedSettings.setS32("VoiceEarLocation", mEarLocation); diff --git a/linden/indra/newview/llprefsvoice.h b/linden/indra/newview/llprefsvoice.h index 1fb5c66..836108d 100644 --- a/linden/indra/newview/llprefsvoice.h +++ b/linden/indra/newview/llprefsvoice.h @@ -58,7 +58,6 @@ protected: BOOL mEnableVoice; BOOL mVoiceCallsFriendsOnly; - BOOL mEnablePushToTalk; std::string mModifier; BOOL mPushToTalkToggle; S32 mEarLocation; diff --git a/linden/indra/newview/llsky.h b/linden/indra/newview/llsky.h index 60c449a..3b17c18 100644 --- a/linden/indra/newview/llsky.h +++ b/linden/indra/newview/llsky.h @@ -57,7 +57,6 @@ public: ~LLSky(); void init(const LLVector3 &sun_direction); - void free(); void cleanup(); diff --git a/linden/indra/newview/llurl.cpp b/linden/indra/newview/llurl.cpp index 3226eb8..c4b84c3 100644 --- a/linden/indra/newview/llurl.cpp +++ b/linden/indra/newview/llurl.cpp @@ -57,7 +57,7 @@ LLURL::LLURL(const char * url) LLURL::~LLURL() { - free(); + cleanup(); } void LLURL::init(const char * url) @@ -140,7 +140,7 @@ void LLURL::init(const char * url) // llinfos << " Tag : <" << mTag << ">" << llendl; } -void LLURL::free() +void LLURL::cleanup() { } diff --git a/linden/indra/newview/llurl.h b/linden/indra/newview/llurl.h index 62ec437..7aae048 100644 --- a/linden/indra/newview/llurl.h +++ b/linden/indra/newview/llurl.h @@ -71,7 +71,7 @@ public: virtual ~LLURL(); virtual void init (const char * url); - virtual void free (); + virtual void cleanup (); bool operator==(const LLURL &rhs) const; bool operator!=(const LLURL &rhs) const; diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 9651fa3..7a30b22 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -424,22 +424,7 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) { if(gVoiceClient) { - // Note: Ignore the specific event value, look up the ones we want - - gVoiceClient->setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); - gVoiceClient->setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); - std::string keyString = gSavedSettings.getString("PushToTalkButton"); - gVoiceClient->setPTTKey(keyString); - gVoiceClient->setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); - gVoiceClient->setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); - std::string serverName = gSavedSettings.getString("VivoxDebugServerName"); - gVoiceClient->setVivoxDebugServerName(serverName); - - std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); - gVoiceClient->setCaptureDevice(inputDevice); - std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - gVoiceClient->setRenderDevice(outputDevice); - gVoiceClient->setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); + gVoiceClient->updateSettings(); } return true; } diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 28f51e1..a79a76a 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp @@ -909,8 +909,7 @@ LLPointer LLViewerImageList::convertToUploadFile(LLPointersetRate(0.f); if (gSavedSettings.getBOOL("LosslessJ2CUpload") && - (raw_image->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) && - (raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF)) + (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) compressedImage->setReversible(TRUE); compressedImage->encode(raw_image, 0.0f); diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index 76c11f1..e99c838 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp @@ -473,6 +473,9 @@ void LLViewerMedia::initBrowser() buildMediaManagerData( init_data ); LLMediaManager::initBrowser( init_data ); delete init_data; + + // We use a custom user agent with viewer version and skin name. + LLViewerMediaImpl::updateBrowserUserAgent(); } ////////////////////////////////////////////////////////////////////////////////////////// @@ -538,9 +541,6 @@ void LLViewerMedia::buildMediaManagerData( LLMediaManagerData* init_data ) init_data->setBrowserProfileName( profile_name ); init_data->setBrowserParentWindow( gViewerWindow->getMediaWindow() ); - // We use a custom user agent with viewer version and skin name. - LLViewerMediaImpl::updateBrowserUserAgent(); - // Users can change skins while client is running, so make sure // we pick up on changes. gSavedSettings.getControl("SkinCurrent")->getSignal()->connect( diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index d78847e..b1cd9b6 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -146,7 +146,6 @@ #include "llinventoryview.h" #include "llkeyboard.h" #include "llpanellogin.h" -#include "llfloaterlandmark.h" #include "llmenucommands.h" #include "llmenugl.h" #include "llmorphview.h" @@ -208,9 +207,6 @@ #include "lltexlayer.h" -void init_landmark_menu(LLMenuGL* menu); -void clear_landmark_menu(LLMenuGL* menu); - void init_client_menu(LLMenuGL* menu); void init_server_menu(LLMenuGL* menu); @@ -256,7 +252,6 @@ LLPieMenu *gPieAttachment = NULL; LLPieMenu *gPieLand = NULL; // local constants -const std::string LANDMARK_MENU_NAME("Landmarks"); const std::string CLIENT_MENU_NAME("Advanced"); const std::string SERVER_MENU_NAME("Admin"); @@ -274,7 +269,6 @@ LLPieMenu* gDetachPieMenu = NULL; LLPieMenu* gDetachScreenPieMenu = NULL; LLPieMenu* gDetachBodyPartPieMenus[8]; -LLMenuGL* gLandmarkMenu = NULL; LLMenuItemCallGL* gAFKMenu = NULL; LLMenuItemCallGL* gBusyMenu = NULL; @@ -336,8 +330,6 @@ void handle_audio_status_3(void*); void handle_audio_status_4(void*); #endif void manage_landmarks(void*); -void create_new_landmark(void*); -void landmark_menu_action(void*); void reload_ui(void*); void handle_agent_stop_moving(void*); void print_packets_lost(void*); @@ -497,55 +489,6 @@ BOOL enable_region_owner(void*); void menu_toggle_attached_lights(void* user_data); void menu_toggle_attached_particles(void* user_data); -class LLLandmarkObserver : public LLInventoryObserver -{ -public: - LLLandmarkObserver(); - virtual ~LLLandmarkObserver(); - - virtual void changed(U32 mask) - { - // JC - Disabled for now - slows down client or causes crashes - // in inventory code. - // - // Also, this may not be faster than just rebuilding the menu each time. - // I believe gInventory.getObject() is not fast. - // - //const std::set& changed_ids = gInventory.getChangedIDs(); - //std::set::const_iterator id_it; - //BOOL need_to_rebuild_menu = FALSE; - //for(id_it = changed_ids.begin(); id_it != changed_ids.end(); ++id_it) - //{ - // LLInventoryObject* objectp = gInventory.getObject(*id_it); - // if (objectp && (objectp->getType() == LLAssetType::AT_LANDMARK || objectp->getType() == LLAssetType::AT_CATEGORY)) - // { - // need_to_rebuild_menu = TRUE; - // } - //} - //if (need_to_rebuild_menu) - //{ - // init_landmark_menu(gLandmarkMenu); - //} - } -}; - -// For debugging only, I think the inventory observer doesn't get -// called if the inventory is loaded from cache. -void build_landmark_menu(void*) -{ - init_landmark_menu(gLandmarkMenu); -} - -LLLandmarkObserver::LLLandmarkObserver() -{ - gInventory.addObserver(this); -} - -LLLandmarkObserver::~LLLandmarkObserver() -{ - gInventory.removeObserver(this); -} - class LLMenuParcelObserver : public LLParcelObserver { public: @@ -555,7 +498,6 @@ public: }; static LLMenuParcelObserver* gMenuParcelObserver = NULL; -static LLLandmarkObserver* gLandmarkObserver = NULL; LLMenuParcelObserver::LLMenuParcelObserver() { @@ -729,17 +671,6 @@ void init_menus() // TomY TODO convert these two LLMenuGL*menu; - // JC - Maybe we don't want a global landmark menu - /* - menu = new LLMenuGL(LANDMARK_MENU_NAME); - // Defer init_landmark_menu() until inventory observer reports that we actually - // have inventory. Otherwise findCategoryByUUID() will create an empty - // Landmarks folder in inventory. JC - gMenuBarView->appendMenu( menu ); - menu->updateParent(LLMenuGL::sMenuContainer); - gLandmarkMenu = menu; - */ - menu = new LLMenuGL(CLIENT_MENU_NAME); init_client_menu(menu); gMenuBarView->appendMenu( menu ); @@ -755,9 +686,6 @@ void init_menus() // Let land based option enable when parcel changes gMenuParcelObserver = new LLMenuParcelObserver(); - // Let landmarks menu update when landmarks are added/removed - gLandmarkObserver = new LLLandmarkObserver(); - // // Debug menu visiblity // @@ -775,64 +703,6 @@ void init_menus() -void init_landmark_menu(LLMenuGL* menu) -{ - if (!menu) return; - - // clear existing menu, as we might be rebuilding as result of inventory update - clear_landmark_menu(menu); - - // *TODO: Translate - menu->append(new LLMenuItemCallGL("Organize Landmarks", - &manage_landmarks, NULL)); - menu->append(new LLMenuItemCallGL("New Landmark...", - &create_new_landmark, NULL)); - menu->appendSeparator(); - - // now collect all landmarks in inventory and build menu... - LLInventoryModel::cat_array_t* cats; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK), cats, items); - if(items) - { - S32 count = items->count(); - for(S32 i = 0; i < count; ++i) - { - LLInventoryItem* item = items->get(i); - std::string landmark_name = item->getName(); - LLUUID* landmark_id_ptr = new LLUUID( item->getUUID() ); - LLMenuItemCallGL* menu_item = - new LLMenuItemCallGL(landmark_name, landmark_menu_action, - NULL, NULL, landmark_id_ptr); - menu->append(menu_item); - } - } -} - -void clear_landmark_menu(LLMenuGL* menu) -{ - if (!menu) return; - - // We store the UUIDs of the landmark inventory items in the userdata - // field of the menus. Therefore when we clean up the menu we need to - // delete that data. - const LLView::child_list_t* child_list = menu->getChildList(); - LLView::child_list_const_iter_t it = child_list->begin(); - for ( ; it != child_list->end(); ++it) - { - LLView* view = *it; - LLMenuItemCallGL* menu_item = dynamic_cast(view); - - if (menu_item && menu_item->getMenuCallback() == landmark_menu_action) - { - void* user_data = menu_item->getUserData(); - delete (LLUUID*)user_data; - } - } - - menu->empty(); -} - void init_client_menu(LLMenuGL* menu) { LLMenuGL* sub_menu = NULL; @@ -1364,6 +1234,9 @@ void init_debug_rendering_menu(LLMenuGL* menu) sub_menu->append(new LLMenuItemCheckGL("Raycasting", &LLPipeline::toggleRenderDebug, NULL, &LLPipeline::toggleRenderDebugControl, (void*)LLPipeline::RENDER_DEBUG_RAYCAST)); + sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL, + &LLPipeline::toggleRenderDebugControl, + (void*)LLPipeline::RENDER_DEBUG_SCULPTED)); sub_menu->append(new LLMenuItemToggleGL("Show Select Buffer", &gDebugSelect)); @@ -1602,14 +1475,9 @@ static std::vector > sMenus; //----------------------------------------------------------------------------- void cleanup_menus() { - clear_landmark_menu(gLandmarkMenu); - delete gMenuParcelObserver; gMenuParcelObserver = NULL; - delete gLandmarkObserver; - gLandmarkObserver = NULL; - delete gPieSelf; gPieSelf = NULL; @@ -3098,60 +2966,6 @@ void handle_audio_status_4(void*) } #endif -void manage_landmarks(void*) -{ - LLFloaterLandmark::showInstance(1); -} - -void create_new_landmark(void*) -{ - // Note this is temporary cut and paste of legacy functionality. - // TODO: Make this spawn a floater allowing user customize before creating the inventory object - - LLViewerRegion* agent_region = gAgent.getRegion(); - if(!agent_region) - { - llwarns << "No agent region" << llendl; - return; - } - LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (!agent_parcel) - { - llwarns << "No agent parcel" << llendl; - return; - } - if (!agent_parcel->getAllowLandmark() - && !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK)) - { - gViewerWindow->alertXml("CannotCreateLandmarkNotOwner"); - return; - } - - LLUUID folder_id; - folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); - std::string pos_string; - gAgent.buildLocationString(pos_string); - - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - folder_id, LLTransactionID::tnull, - pos_string, pos_string, // name, desc - LLAssetType::AT_LANDMARK, - LLInventoryType::IT_LANDMARK, - NOT_WEARABLE, PERM_ALL, - NULL); -} - -void landmark_menu_action(void* userdata) -{ - LLUUID item_id = *(LLUUID*)userdata; - - LLViewerInventoryItem* itemp = gInventory.getItem(item_id); - if (itemp) - { - open_landmark(itemp, itemp->getName(), FALSE); - } -} - void reload_ui(void *) { LLUICtrlFactory::getInstance()->rebuild(); diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index bd40796..d90b33a 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -1954,6 +1954,8 @@ void LLViewerWindow::shutdownGL() stopGL(FALSE); stop_glerror(); } + + gGL.shutdown(); } // shutdownViews() and shutdownGL() need to be called first diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index a9ecf9d..8adb910 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -8886,6 +8886,11 @@ U32 LLVOAvatar::getVisibilityRank() void LLVOAvatar::setVisibilityRank(U32 rank) { + if (mDrawable.isNull() || mDrawable->isDead()) + { //do nothing + return; + } + BOOL stale = gFrameTimeSeconds - mLastFadeTime > 10.f; //only raise visibility rank or trigger a fade out every 10 seconds diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index bedf1d9..64a17ae 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -839,19 +839,12 @@ LLVoiceClient::LLVoiceClient() mCaptureDeviceDirty = false; mRenderDeviceDirty = false; - // Load initial state from prefs. - mVoiceEnabled = gSavedSettings.getBOOL("EnableVoiceChat"); - mUsePTT = TRUE; //gSavedSettings.getBOOL("EnablePushToTalk"); - std::string keyString = gSavedSettings.getString("PushToTalkButton"); - setPTTKey(keyString); - mPTTIsToggle = gSavedSettings.getBOOL("PushToTalkToggle"); - mEarLocation = gSavedSettings.getS32("VoiceEarLocation"); - setVoiceVolume(gSavedSettings.getBOOL("MuteVoice") ? 0.f : gSavedSettings.getF32("AudioLevelVoice")); - std::string captureDevice = gSavedSettings.getString("VoiceInputAudioDevice"); - setCaptureDevice(captureDevice); - std::string renderDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - setRenderDevice(renderDevice); - mLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled"); + // Use default values for everything then call updateSettings() after preferences are loaded + mVoiceEnabled = false; + mUsePTT = true; + mPTTIsToggle = false; + mEarLocation = 0; + mLipSyncEnabled = false; mTuningMode = false; mTuningEnergy = 0.0f; @@ -895,12 +888,11 @@ LLVoiceClient::~LLVoiceClient() //---------------------------------------------- - - void LLVoiceClient::init(LLPumpIO *pump) { // constructor will set up gVoiceClient LLVoiceClient::getInstance()->mPump = pump; + LLVoiceClient::getInstance()->updateSettings(); } void LLVoiceClient::terminate() @@ -923,6 +915,25 @@ void LLVoiceClient::terminate() } } +//--------------------------------------------------- + +void LLVoiceClient::updateSettings() +{ + setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); + std::string keyString = gSavedSettings.getString("PushToTalkButton"); + setPTTKey(keyString); + setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); + setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); + std::string serverName = gSavedSettings.getString("VivoxDebugServerName"); + setVivoxDebugServerName(serverName); + + std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + setCaptureDevice(inputDevice); + std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + setRenderDevice(outputDevice); + setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); +} ///////////////////////////// // utility functions diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h index 9dfcd52..2220d59 100644 --- a/linden/indra/newview/llvoiceclient.h +++ b/linden/indra/newview/llvoiceclient.h @@ -99,7 +99,9 @@ class LLVoiceClient: public LLSingleton serviceTypeC // one-to-one and small group chat }; static F32 OVERDRIVEN_POWER_LEVEL; - + + void updateSettings(); // call after loading settings and whenever they change + ///////////////////////////// // session control messages void connect(); diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 3716a76..b70dd23 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -68,7 +68,8 @@ const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; -const S32 SCULPT_REZ = 64; +// sadly - we can't lower sculptie rez below b/c residents have a LOT of content that depends on the 128 +const S32 SCULPT_REZ = 128; BOOL gAnimateTextures = TRUE; extern BOOL gHideSelectedObjects; @@ -530,7 +531,13 @@ void LLVOVolume::updateTextures() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); mSculptChanged = TRUE; } - + + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) + { + setDebugText(llformat("T%d C%d V%d\n%dx%d", + texture_discard, current_discard, getVolume()->getSculptLevel(), + mSculptTexture->getHeight(), mSculptTexture->getWidth())); + } } diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index 9b49eb9..f58a506 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp @@ -134,7 +134,7 @@ void LLXMLRPCValue::appendDouble(const char* id, double v) XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueDouble(id, v)); } -void LLXMLRPCValue::free() +void LLXMLRPCValue::cleanup() { XMLRPC_CleanupValue(mV); mV = NULL; diff --git a/linden/indra/newview/llxmlrpctransaction.h b/linden/indra/newview/llxmlrpctransaction.h index 878ff7c..843ca24 100644 --- a/linden/indra/newview/llxmlrpctransaction.h +++ b/linden/indra/newview/llxmlrpctransaction.h @@ -74,7 +74,7 @@ public: void appendDouble(const char*, double); void appendValue(const char*, LLXMLRPCValue&); - void free(); + void cleanup(); // only call this on the top level created value XMLRPC_VALUE getValue() const; diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 0827986..f232fdf 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -4520,6 +4520,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot) return; } + LLVertexBuffer::unbind(); LLGLState::checkStates(); LLGLState::checkTextureChannels(); diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index e21d143..5f94e37 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h @@ -340,7 +340,8 @@ public: RENDER_DEBUG_LIGHTS = 0x100000, RENDER_DEBUG_BATCH_SIZE = 0x200000, RENDER_DEBUG_RAYCAST = 0x400000, - RENDER_DEBUG_SHAME = 0x800000 + RENDER_DEBUG_SHAME = 0x800000, + RENDER_DEBUG_SCULPTED = 0x1000000 }; public: diff --git a/linden/indra/newview/skins/default/xui/de/alerts.xml b/linden/indra/newview/skins/default/xui/de/alerts.xml index 3292470..fce0456 100644 --- a/linden/indra/newview/skins/default/xui/de/alerts.xml +++ b/linden/indra/newview/skins/default/xui/de/alerts.xml @@ -378,12 +378,13 @@ Die Second Life Website für weitere Informationen über Partnerschaften öffnen - Wenn dieser Einwohner einen Webprofil-URL angegeben hat, können Sie: - * Auf 'Laden' klicken und die Seite im integrierten Browser anzeigen. - * Auf 'Öffnen' klicken und die Seite im externen Browser anzeigen. + Wenn dieser Einwohner eine Webprofil-URL angegeben hat, können Sie: +* Auf 'Laden' klicken und die Seite im integrierten Browser anzuzeigen. +* Auf Laden->"In external Browser öffnen" klicken um die Seite extern anzeigen zu lassen. +* Auf Laden->"Home-URL" klicken um zum Webprofil des Benutzers zurückzukehren. -In Ihrem Profil können Sie jeden URL als Webprofil festlegen. -Bei Anzeige ihres Profils kann jeder Einwohner diesen URL öffnen. +In Ihrem eigenen Profil können Sie jede beliebige URL als Ihr Webprofil eingeben und mit OK übernehmen. +Wenn andere Einwohner Ihr Profil betrachten, können sie diese URL besuchen. @@ -665,7 +666,7 @@ um ihren Landepunkt festzulegen. - Postkarte mit Standardbetreff bzw. -nachricht senden? + Foto mit Standardbetreff bzw. -nachricht als E-Mail versenden? - Eine Postkarte konnte aus folgendem Grund nicht hochgeladen werden: [REASON] + Ein Foto konnte aus folgendem Grund nicht gesendet werden: [REASON] @@ -725,19 +726,21 @@ Der Outfit-Ordner enthält keine Kleidung, Körperteile oder Anhänge. - Sie benötigen ein Konto, um sich in [SECOND_LIFE] anmelden zu können. -Möchten Sie auf www.secondlife.com ein Konto anlegen? + Hoppla! Da fehlt noch etwas. +Geben Sie bitte den Vor- und den Nachnamen Ihres Avatars ein. + +Sie benötigen ein Benutzerkonto, um [SECOND_LIFE] betreten zu können.Möchten Sie jetzt ein Benutzerkonto anlegen? - Die neue Benutzeroberfläche wird nach einem Neustart von [SECOND_LIFE] angewendet. + Die neue Haut wird nach dem erneuten Start von [SECOND_LIFE] angezeigt. @@ -1350,6 +1353,17 @@ Bitte wählen Sie einen männlichen oder weiblichen Avatar. Weiblich + + + Möchten Sie wirklich alle Objekte zurückgeben, die [USER_NAME] gehören? + + + + Fehler beim Versuch, [NUM_ADDED] Agenten hinzuzufügen: @@ -1561,8 +1575,8 @@ Möchten Sie diese Objekte weggeben? - Sie sind nicht berechtigt, die ausgewählten - Ordner zu kopieren. + Sie sind nicht berechtigt, den ausgewählten +Ordner zu kopieren. @@ -1955,7 +1969,7 @@ Keine Parzelle ausgewählt. Land kann nicht gekauft werden: - Kann die Region nicht finden, in der sich dieses Land befindet. +Kann die Region nicht finden, in der sich dieses Land befindet. @@ -2339,14 +2353,11 @@ www.secondlife.com/support. Sie wurden von [SECOND_LIFE] abgemeldet: -[MESSAGE] - -Klicken Sie auf 'Weiter', um IM und Chat anzuzeigen. -Andere Optionen sind nicht mehr möglich. -Klicken Sie auf 'Beenden', um [SECOND_LIFE] zu schließen. + [MESSAGE] +Klicken Sie auf 'IM & Chat anzeigen', um vorhandene Nachrichten und Chat weiterhin anzuzeigen. Klicken Sie andernfalls auf 'Beenden', um [SECOND_LIFE] sofort zu beenden. - Freunde können einander die Erlaubnis erteilen, -sich gegenseitig auf der Karte verfolgen und -ihren Online-Status einsehen zu können. + Freunde können sich gegenseitig die Berechtigung +erteilen, sich auf der Karte zu verfolgen und den jeweiligen Online-Status einzusehen. -[NAME] Freundschaft anbieten? +[NAME] die Freundschaft anbieten? + Wollen wir Freunde sein? @@ -4444,17 +4455,17 @@ Fehler schneller zu beseitigen. Sehr geehrte(r) Einwohner(in), - -Meldungen über Urheberrechtsverletzungen können nur auf -http://secondlife.com/corporate/dmca.php eingereicht werden. -Meldungen über Urheberrechtsverletzungen, die über -'Missbrauch melden' eingereicht wurden, werden automatisch -gelöscht. Wenn Sie keine Urheberrechtsverletzung melden möchten, -können Sie dieses Fenster schließen und mit dem Einreichen Ihrer Meldung fortfahren. - +achten Sie bei der Meldung einer Urheberrechtsverletzung darauf, dass Sie dabei korrekt vorgehen: + +1. Missbrauch melden. Wenn Sie der Meinung sind, ein Einwohner nutzt das Berechtigungssystem von Second Life auf unerlaubte Weise zu seinem Vorteil aus, indem er zum Beispiel einen CopyBot oder verwandte Kopiertools verwendet und damit eine Urheberrechtsverletzung begeht, können Sie diesen Missbrauch melden.Das Missbrauchsteam untersucht etwaige Verstöße gegen die Second Life Community Standards oder die Nutzungsbedingungen und verhängt entsprechende Strafen.Das Missbrauchsteam ist jedoch nicht dafür zuständig, Inhalte aus der Second Life-Welt zu entfernen und reagiert auch nicht auf entsprechende Anfragen. + +2. Die DMCA oder Inhaltsentfernungs-Vorgehensweise. Sie können das Entfernen von Inhalten aus Second Life beantragen. Dazu müssen Sie eine Urheberrechtsverletzung gemäß den in unserer DMCA-Richtlinie unter http://secondlife.com/corporate/dmca.php dargelegten Anweisungen einreichen. + +Wenn Sie jetzt mit der Missbrauchmeldung fortfahren möchten, schließen Sie bitte dieses Fenster und senden Sie Ihren Bericht ein. + Vielen Dank, - + Linden Lab @@ -4532,8 +4543,7 @@ wirklich löschen? - Möchten Sie Ihre Cookies -wirklich löschen? + Sind Sie sicher, dass Sie Ihre Cookies löschen möchten?