From e0d1586f8c62cdf6455b3ff853f9c22d866e102c Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 21 Jan 2020 17:02:53 +0200 Subject: [PATCH 001/153] SL-12494 Add some more key bindings --- .../skins/default/xui/en/menu_viewer.xml | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index af185d43b0..8e65a2ffb1 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -56,7 +56,8 @@ + name="Places" + shortcut="control|L"> @@ -85,11 +86,22 @@ + name="Camera Controls" + shortcut="control|K"> + + + + + name="Stop Animating My Avatar" + shortcut="alt|shift|A"> @@ -473,7 +486,8 @@ + name="Events" + shortcut="control|E"> @@ -662,7 +676,8 @@ tear_off="true"> + name="Sunrise" + shortcut="control|shift|O"> @@ -694,7 +709,8 @@ + name="Midnight" + shortcut="control|shift|Z"> @@ -1342,7 +1358,8 @@ + name="Upload Model" + shortcut="alt|control|U"> From 08ac091dbd1f8946e170bd24ec1947427bb04b98 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 23 Jan 2020 12:05:09 +0200 Subject: [PATCH 002/153] SL-12610 FIXED [Portuguese] The texture size isn't displayed in the "Texture" floater --- indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml index ba4ef0afde..5ec005bd1a 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml @@ -13,8 +13,11 @@ + + Tamanho: + - Tamanho: [DIMENSÕES] + [DIMENSIONS] + + + - - + + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters]. + Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders cannot be used for Favorites. Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search]. Drag a landmark here to add it to your favorites. No items found. Check the spelling of your search string and try again. From 25fd4c2ba7bc00a0603bf58f5897ac550ff02446 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 28 Jan 2020 14:50:32 +0200 Subject: [PATCH 004/153] SL-12475 Mac buildfix --- indra/newview/llinventorypanel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 7d6adad9f3..cdbbe2bf35 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -335,7 +335,7 @@ public: void setSelectCallback(const boost::function& items, BOOL user_action)>& cb); protected: - LLInventoryFavoriteItemsPanel::LLInventoryFavoriteItemsPanel(const Params& params); + LLInventoryFavoriteItemsPanel(const Params& params); ~LLInventoryFavoriteItemsPanel() { mFolderChangedSignal.disconnect(); } void updateFavoritesRootFolder(); From 31b1dcc7efb84ae3a454804d5e4b321fd75d9ee4 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 30 Jan 2020 14:35:43 +0200 Subject: [PATCH 005/153] SL-12598 FIXED The buttons have cropped names in the 'Preferences' floater --- .../skins/default/xui/de/panel_preferences_graphics1.xml | 8 ++++---- .../skins/default/xui/de/panel_preferences_setup.xml | 2 +- .../skins/default/xui/es/panel_preferences_advanced.xml | 2 +- .../skins/default/xui/es/panel_preferences_graphics1.xml | 8 ++++---- .../skins/default/xui/fr/panel_preferences_graphics1.xml | 8 ++++---- .../skins/default/xui/it/panel_preferences_graphics1.xml | 6 +++--- .../skins/default/xui/it/panel_preferences_setup.xml | 2 +- .../skins/default/xui/pt/panel_preferences_graphics1.xml | 8 ++++---- .../skins/default/xui/pt/panel_preferences_setup.xml | 2 +- .../skins/default/xui/ru/panel_preferences_advanced.xml | 2 +- .../skins/default/xui/ru/panel_preferences_graphics1.xml | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml index e0aa9fe4a9..16fdb69509 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml @@ -32,10 +32,10 @@ From 5bb76d9164e8d73cdd14c9088459c584b94cb313 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 23 Mar 2020 21:00:22 +0200 Subject: [PATCH 043/153] SL-12237 Small adjustment to render complexity performance --- indra/newview/llvoavatar.cpp | 41 ++++++++++++++++++++++++++++++++++-- indra/newview/llvoavatar.h | 1 + 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8f6733886a..f337b0ca35 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2413,6 +2413,7 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) } static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE("Avatar Update"); +static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE_COMPLEXITY("Avatar Update Complexity"); static LLTrace::BlockTimerStatHandle FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ @@ -2462,7 +2463,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) } // Update should be happening max once per frame. - const S32 upd_freq = 4; // force update every upd_freq frames. if ((mLastAnimExtents[0]==LLVector3())|| (mLastAnimExtents[1])==LLVector3()) { @@ -2470,6 +2470,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) } else { + const S32 upd_freq = 4; // force update every upd_freq frames. mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0); } @@ -2554,7 +2555,39 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) } idleUpdateNameTag( mLastRootPos ); - idleUpdateRenderComplexity(); + + // Complexity has stale mechanics, but updates still can be very rapid + // so spread avatar complexity calculations over frames to lesen load from + // rapid updates and to make sure all avatars are not calculated at once. + S32 compl_upd_freq = 20; + if (isControlAvatar()) + { + // animeshes do not (or won't) have impostors nor change outfis, + // no need for high frequency + compl_upd_freq = 100; + } + else if (mLastRezzedStatus <= 0) //cloud or init + { + compl_upd_freq = 60; + } + else if (isSelf()) + { + compl_upd_freq = 5; + } + else if (mLastRezzedStatus == 1) //'grey', not fully loaded + { + compl_upd_freq = 40; + } + else if (isInMuteList()) //cheap, buffers value from search + { + compl_upd_freq = 100; + } + + if ((LLFrameTimer::getFrameCount() + mID.mData[0]) % compl_upd_freq == 0) + { + idleUpdateRenderComplexity(); + } + idleUpdateDebugInfo(); } void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) @@ -4348,6 +4381,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } else { + // Might be better to do HIDDEN_UPDATE if cloud updateMotions(LLCharacter::NORMAL_UPDATE); } @@ -10161,7 +10195,10 @@ void LLVOAvatar::idleUpdateRenderComplexity() // Render Complexity calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed +} +void LLVOAvatar::idleUpdateDebugInfo() +{ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO)) { std::string info_line; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 3526142ff5..2f04288825 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -286,6 +286,7 @@ public: static void invalidateNameTags(); void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderComplexity(); + void idleUpdateDebugInfo(); void accountRenderComplexityForObject(const LLViewerObject *attached_object, const F32 max_attachment_complexity, LLVOVolume::texture_cost_t& textures, From ad3b60445eb25b1c8786dddd3056a192f6630156 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Mar 2020 16:13:55 +0200 Subject: [PATCH 044/153] SL-12237 Invisible avatars don't need detailed updates --- indra/newview/llvoavatar.cpp | 25 ++++++++++++++++++------- indra/newview/llvoavatar.h | 2 +- indra/newview/llvoavatarself.cpp | 5 ----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f337b0ca35..ee9ca213d5 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2585,6 +2585,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) if ((LLFrameTimer::getFrameCount() + mID.mData[0]) % compl_upd_freq == 0) { + LL_RECORD_BLOCK_TIME(FTM_AVATAR_UPDATE_COMPLEXITY); idleUpdateRenderComplexity(); } idleUpdateDebugInfo(); @@ -2898,7 +2899,10 @@ F32 LLVOAvatar::calcMorphAmount() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - if ( voice_enabled && (LLVoiceClient::getInstance()->lipSyncEnabled()) && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) + if ( voice_enabled + && mLastRezzedStatus > 0 // no point updating lip-sync for clouds + && (LLVoiceClient::getInstance()->lipSyncEnabled()) + && LLVoiceClient::getInstance()->getIsSpeaking( mID ) ) { F32 ooh_morph_amount = 0.0f; F32 aah_morph_amount = 0.0f; @@ -3896,15 +3900,16 @@ void LLVOAvatar::updateFootstepSounds() } //------------------------------------------------------------------------ -// computeUpdatePeriod() +// computeUpdatePeriodAndVisibility() // Factored out from updateCharacter() // Set new value for mUpdatePeriod based on distance and various other factors. +// Returs true if character needs an update //------------------------------------------------------------------------ -void LLVOAvatar::computeUpdatePeriod() +BOOL LLVOAvatar::computeUpdatePeriodAndVisibility() { bool visually_muted = isVisuallyMuted(); - if (mDrawable.notNull() - && isVisible() + BOOL is_visible = isVisible(); // includes drawable check + if ( is_visible && (!isSelf() || visually_muted) && !isUIAvatar() && sUseImpostors @@ -3932,6 +3937,11 @@ void LLVOAvatar::computeUpdatePeriod() { //background avatars are REALLY slow updating impostors mUpdatePeriod = 16; } + else if (mLastRezzedStatus <= 0) + { + // Don't update cloud avatars too often + mUpdatePeriod = 8; + } else if ( shouldImpostor(3) ) { //back 25% of max visible avatars are slow updating impostors mUpdatePeriod = 8; @@ -3945,10 +3955,12 @@ void LLVOAvatar::computeUpdatePeriod() //nearby avatars, update the impostors more frequently. mUpdatePeriod = 4; } + return (LLDrawable::getCurrentFrame() + mID.mData[0]) % mUpdatePeriod == 0 ? TRUE : FALSE; } else { mUpdatePeriod = 1; + return is_visible; } } @@ -4317,8 +4329,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // The rest should only be done occasionally for far away avatars. // Set mUpdatePeriod and visible based on distance and other criteria. //-------------------------------------------------------------------- - computeUpdatePeriod(); - visible = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE; + visible = computeUpdatePeriodAndVisibility(); //-------------------------------------------------------------------- // Early out if not visible and not self diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2f04288825..952c04a1ff 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -264,7 +264,7 @@ public: virtual void updateDebugText(); virtual BOOL updateCharacter(LLAgent &agent); void updateFootstepSounds(); - void computeUpdatePeriod(); + BOOL computeUpdatePeriodAndVisibility(); void updateOrientation(LLAgent &agent, F32 speed, F32 delta_time); void updateTimeStep(); void updateRootPositionAndRotation(LLAgent &agent, F32 speed, bool was_sit_ground_constrained); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 16b27fd144..aea12380e8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2667,11 +2667,6 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) { gAgentCamera.changeCameraToCustomizeAvatar(); } - -#if 0 - gAgentAvatarp->clearVisualParamWeights(); - gAgentAvatarp->idleUpdateAppearanceAnimation(); -#endif gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh. From 672fa8002dbc5d90f827648b7f72b0f766ee2a58 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 24 Mar 2020 19:25:48 +0200 Subject: [PATCH 045/153] SL-1431 settings_per_account.xml file should be attached to crashreport --- indra/newview/llappdelegate-objc.mm | 1 + indra/newview/llappviewermacosx-for-objc.h | 1 + indra/newview/llappviewermacosx.cpp | 9 +++++---- indra/newview/llappviewerwin32.cpp | 3 +++ indra/newview/llstartup.cpp | 6 +++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 47fde299c7..a2b7362608 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -294,6 +294,7 @@ struct AttachmentInfo std::vector info{ AttachmentInfo(metadata.logFilePathname, "text/plain"), AttachmentInfo(metadata.userSettingsPathname, "text/xml"), + AttachmentInfo(metadata.accountSettingsPathname, "text/xml"), AttachmentInfo(metadata.staticDebugPathname, "text/xml") }; diff --git a/indra/newview/llappviewermacosx-for-objc.h b/indra/newview/llappviewermacosx-for-objc.h index 37e8a3917a..79c3efff91 100644 --- a/indra/newview/llappviewermacosx-for-objc.h +++ b/indra/newview/llappviewermacosx-for-objc.h @@ -41,6 +41,7 @@ struct CrashMetadata { std::string logFilePathname; std::string userSettingsPathname; + std::string accountSettingsPathname; std::string staticDebugPathname; std::string OSInfo; std::string agentFullname; diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 3111540a13..662164af2d 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -199,10 +199,11 @@ CrashMetadataSingleton::CrashMetadataSingleton() else { LL_INFOS() << "Metadata from '" << staticDebugPathname << "':" << LL_ENDL; - logFilePathname = get_metadata(info, "SLLog"); - userSettingsPathname = get_metadata(info, "SettingsFilename"); - OSInfo = get_metadata(info, "OSInfo"); - agentFullname = get_metadata(info, "LoginName"); + logFilePathname = get_metadata(info, "SLLog"); + userSettingsPathname = get_metadata(info, "SettingsFilename"); + accountSettingsPathname = get_metadata(info, "PerAccountSettingsFilename"); + OSInfo = get_metadata(info, "OSInfo"); + agentFullname = get_metadata(info, "LoginName"); // Translate underscores back to spaces LLStringUtil::replaceChar(agentFullname, '_', ' '); regionName = get_metadata(info, "CurrentRegion"); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index d208e135bb..293f86f170 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -139,6 +139,9 @@ namespace { // user name, when we have it sBugSplatSender->setDefaultUserName(WCSTR(gAgentAvatarp->getFullname())); + + sBugSplatSender->sendAdditionalFile( + WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); } // LL_ERRS message, when there is one diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 38c201d340..ec0b0dc4a8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -913,9 +913,9 @@ bool idle_startup() } // Set PerAccountSettingsFile to the default value. - gSavedSettings.setString("PerAccountSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, - LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"))); + std::string settings_per_account = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")); + gSavedSettings.setString("PerAccountSettingsFile", settings_per_account); + gDebugInfo["PerAccountSettingsFilename"] = settings_per_account; // Note: can't store warnings files per account because some come up before login From 790dff05d0a9c2341db1c02cd9fb332ac4b6f76f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 Mar 2020 15:10:33 +0200 Subject: [PATCH 046/153] SL-12554 FIXED The value of the 'Avatar Maximum Complexity' is not synchronized after closing Advanced settings --- indra/newview/llfloaterpreference.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 5d370394b4..0e899d5950 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -948,6 +948,7 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata) if (userdata.asString() == "closeadvanced") { LLFloaterReg::hideInstance("prefs_graphics_advanced"); + updateMaxComplexity(); } else { From fd2e544d558976aac3b452fabfb4c13aeb16aaf0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 25 Mar 2020 18:28:23 +0000 Subject: [PATCH 047/153] SL-12478 Long names are not beautiful in nametags --- indra/newview/llhudnametag.cpp | 58 ++++++++++++++++++++++++++-------- indra/newview/llhudnametag.h | 2 +- indra/newview/llvoavatar.cpp | 12 +++---- indra/newview/llvoavatar.h | 2 +- 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 81d862a827..0701b07856 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -415,7 +415,8 @@ void LLHUDNameTag::clearString() void LLHUDNameTag::addLine(const std::string &text_utf8, const LLColor4& color, const LLFontGL::StyleFlags style, - const LLFontGL* font) + const LLFontGL* font, + const bool use_ellipses) { LLWString wline = utf8str_to_wstring(text_utf8); if (!wline.empty()) @@ -432,18 +433,49 @@ void LLHUDNameTag::addLine(const std::string &text_utf8, tokenizer tokens(wline, sep); tokenizer::iterator iter = tokens.begin(); - while (iter != tokens.end()) - { - U32 line_length = 0; - do - { - F32 max_pixels = HUD_TEXT_MAX_WIDTH; - S32 segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels, wline.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); - LLHUDTextSegment segment(iter->substr(line_length, segment_length), style, color, font); - mTextSegments.push_back(segment); - line_length += segment_length; - } - while (line_length != iter->size()); + const F32 max_pixels = HUD_TEXT_MAX_WIDTH; + while (iter != tokens.end()) + { + U32 line_length = 0; + if (use_ellipses) + { + // "QualityAssuranceAssuresQuality 1" will end up like "QualityAssuranceAssuresQual..." + // "QualityAssurance AssuresQuality 1" will be split into two lines "QualityAssurance" and "AssuresQuality 1" + do + { + S32 segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels, wline.length(), LLFontGL::ONLY_WORD_BOUNDARIES); + if (segment_length == 0) + { + // First word in segment (not nessesary first line) does not fit, need to draw "...". + // Use four dots for ellipsis width to generate padding + const LLWString dots_pad(utf8str_to_wstring(std::string("...."))); + S32 elipses_width = font->getWidthF32(dots_pad.c_str()); + segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels - elipses_width, wline.length(), LLFontGL::ANYWHERE); + const LLWString dots(utf8str_to_wstring(std::string("..."))); + LLHUDTextSegment segment(iter->substr(line_length, segment_length) + dots, style, color, font); + mTextSegments.push_back(segment); + break; // consider it to be complete + } + else + { + LLHUDTextSegment segment(iter->substr(line_length, segment_length), style, color, font); + mTextSegments.push_back(segment); + line_length += segment_length; + } + } while (line_length != iter->size()); + } + else + { + // "QualityAssuranceAssuresQuality 1" will be split into two lines "QualityAssuranceAssuresQualit" and "y 1" + // "QualityAssurance AssuresQuality 1" will be split into two lines "QualityAssurance" and "AssuresQuality" + do + { + S32 segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels, wline.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); + LLHUDTextSegment segment(iter->substr(line_length, segment_length), style, color, font); + mTextSegments.push_back(segment); + line_length += segment_length; + } while (line_length != iter->size()); + } ++iter; } } diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h index 38a4f18415..20272a8232 100644 --- a/indra/newview/llhudnametag.h +++ b/indra/newview/llhudnametag.h @@ -92,7 +92,7 @@ public: void clearString(); // Add text a line at a time, allowing custom formatting - void addLine(const std::string &text_utf8, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL, const LLFontGL* font = NULL); + void addLine(const std::string &text_utf8, const LLColor4& color, const LLFontGL::StyleFlags style = LLFontGL::NORMAL, const LLFontGL* font = NULL, const bool use_ellipses = false); // For bubble chat, set the part above the chat text void setLabel(const std::string& label_utf8); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ee9ca213d5..96a9e8f222 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3250,7 +3250,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) std::string title_str = title->getString(); LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR); addNameTagLine(title_str, name_tag_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerifSmall()); + LLFontGL::getFontSansSerifSmall(), true); } static LLUICachedControl show_display_names("NameTagShowDisplayNames", true); @@ -3270,7 +3270,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) if (show_display_names) { addNameTagLine(av_name.getDisplayName(), name_tag_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerif()); + LLFontGL::getFontSansSerif(), true); } // Suppress SLID display if display name matches exactly (ugh) if (show_usernames && !av_name.isDisplayNameDefault()) @@ -3278,14 +3278,14 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // *HACK: Desaturate the color LLColor4 username_color = name_tag_color * 0.83f; addNameTagLine(av_name.getUserName(), username_color, LLFontGL::NORMAL, - LLFontGL::getFontSansSerifSmall()); + LLFontGL::getFontSansSerifSmall(), true); } } else { const LLFontGL* font = LLFontGL::getFontSansSerif(); std::string full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); - addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font); + addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font, true); } mNameAway = is_away; @@ -3377,7 +3377,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) } } -void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font) +void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font, const bool use_ellipses) { llassert(mNameText); if (mVisibleChat) @@ -3386,7 +3386,7 @@ void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color, } else { - mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font); + mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font, use_ellipses); } mNameIsSet |= !line.empty(); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 952c04a1ff..6232c51b49 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -284,7 +284,7 @@ public: static void invalidateNameTag(const LLUUID& agent_id); // force all name tags to rebuild, useful when display names turned on/off static void invalidateNameTags(); - void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); + void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font, const bool use_ellipses = false); void idleUpdateRenderComplexity(); void idleUpdateDebugInfo(); void accountRenderComplexityForObject(const LLViewerObject *attached_object, From 33633361a37c4b25589e8a4ec34c733a206a8301 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 27 Mar 2020 16:10:31 +0200 Subject: [PATCH 048/153] Revert SL-11848 in scope of SL-12824 This reverts commit 8a9a9295999a67e97b16c3e0ff4b9fdfd8298904. --- indra/newview/llface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 5539cfb5df..90929249c0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -456,7 +456,7 @@ void LLFace::setTextureIndex(U8 index) } else { - if (mDrawInfo && mDrawInfo->mTextureList.size() <= 1) + if (mDrawInfo && !mDrawInfo->mTextureList.empty()) { LL_ERRS() << "Face with no texture index references indexed texture draw info." << LL_ENDL; } From 764cb898921baafb7c948451660183f39c789e0c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 27 Mar 2020 16:22:51 +0200 Subject: [PATCH 049/153] SL-12824 Imported fix for crash For "Face with no texture index references indexed texture draw info" --- indra/newview/lldrawpoolavatar.cpp | 15 ++++++++++----- indra/newview/llface.cpp | 8 ++++---- indra/newview/llface.h | 1 + indra/newview/llspatialpartition.cpp | 2 +- indra/newview/llvovolume.cpp | 10 +++++----- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 63abadbcf4..3d3d75c5eb 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1604,11 +1604,16 @@ void LLDrawPoolAvatar::getRiggedGeometry( LLVolume* volume, const LLVolumeFace& vol_face) { - face->setGeomIndex(0); - face->setIndicesIndex(0); - - //rigged faces do not batch textures - face->setTextureIndex(255); + face->setGeomIndex(0); + face->setIndicesIndex(0); + + if (face->getTextureIndex() != FACE_DO_NOT_BATCH_TEXTURES) + { + face->setDrawInfo(NULL); + } + + //rigged faces do not batch textures + face->setTextureIndex(FACE_DO_NOT_BATCH_TEXTURES); if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 90929249c0..880d903499 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -153,7 +153,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) } mTEOffset = -1; - mTextureIndex = 255; + mTextureIndex = FACE_DO_NOT_BATCH_TEXTURES; setDrawable(drawablep); mVObjp = objp; @@ -450,7 +450,7 @@ void LLFace::setTextureIndex(U8 index) { mTextureIndex = index; - if (mTextureIndex != 255) + if (mTextureIndex != FACE_DO_NOT_BATCH_TEXTURES) { mDrawablep->setState(LLDrawable::REBUILD_POSITION); } @@ -1534,7 +1534,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount); - U8 index = mTextureIndex < 255 ? mTextureIndex : 0; + U8 index = mTextureIndex < FACE_DO_NOT_BATCH_TEXTURES ? mTextureIndex : 0; S32 val = 0; U8* vp = (U8*) &val; @@ -2067,7 +2067,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a texIdx; - S32 index = mTextureIndex < 255 ? mTextureIndex : 0; + S32 index = mTextureIndex < FACE_DO_NOT_BATCH_TEXTURES ? mTextureIndex : 0; F32 val = 0.f; S32* vp = (S32*) &val; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index fce7f71173..18235fdc98 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -52,6 +52,7 @@ class LLDrawInfo; const F32 MIN_ALPHA_SIZE = 1024.f; const F32 MIN_TEX_ANIM_SIZE = 512.f; +const U8 FACE_DO_NOT_BATCH_TEXTURES = 255; class LLFace : public LLTrace::MemTrackableNonVirtual { diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 7e6f3ef7bc..07b9d24dd2 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3445,7 +3445,7 @@ public: U8 index = facep->getTextureIndex(); if (facep->mDrawInfo) { - if (index < 255) + if (index < FACE_DO_NOT_BATCH_TEXTURES) { if (facep->mDrawInfo->mTextureList.size() <= index) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0aeccc7399..fa4880627f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5059,7 +5059,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, } - if (index < 255 && idx >= 0) + if (index < FACE_DO_NOT_BATCH_TEXTURES && idx >= 0) { if (mat || draw_vec[idx]->mMaterial) { //can't batch textures when materials are present (yet) @@ -5105,7 +5105,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_vec[idx]->mEnd += facep->getGeomCount(); draw_vec[idx]->mVSize = llmax(draw_vec[idx]->mVSize, facep->getVirtualSize()); - if (index < 255 && index >= draw_vec[idx]->mTextureList.size()) + if (index < FACE_DO_NOT_BATCH_TEXTURES && index >= draw_vec[idx]->mTextureList.size()) { draw_vec[idx]->mTextureList.resize(index+1); draw_vec[idx]->mTextureList[index] = tex; @@ -5192,7 +5192,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_info->mDrawMode = LLRender::TRIANGLE_STRIP; } - if (index < 255) + if (index < FACE_DO_NOT_BATCH_TEXTURES) { //initialize texture list for texture batching draw_info->mTextureList.resize(index+1); draw_info->mTextureList[index] = tex; @@ -6319,7 +6319,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace //face has no texture index facep->mDrawInfo = NULL; - facep->setTextureIndex(255); + facep->setTextureIndex(FACE_DO_NOT_BATCH_TEXTURES); if (geom_count + facep->getGeomCount() > max_vertices) { //cut batches on geom count too big @@ -6383,7 +6383,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace facep->setGeomIndex(index_offset); facep->setVertexBuffer(buffer); - if (batch_textures && facep->getTextureIndex() == 255) + if (batch_textures && facep->getTextureIndex() == FACE_DO_NOT_BATCH_TEXTURES) { LL_ERRS() << "Invalid texture index." << LL_ENDL; } From 826d6fc591dace753b053d9b3c28a0e710037964 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 3 Apr 2020 18:06:00 +0300 Subject: [PATCH 050/153] SL-12968 Wrong avatar was paused on selection --- indra/newview/llselectmgr.cpp | 47 ++++++++--------------------------- 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9d491e0e00..ae55cbf025 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6882,51 +6882,26 @@ void LLSelectMgr::pauseAssociatedAvatars() mSelectedObjects->mSelectType = getSelectTypeForObject(object); - bool is_attached = false; - if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && - isAgentAvatarValid()) + LLVOAvatar* parent_av = NULL; + if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT) { // Selection can be obsolete, confirm that this is an attachment - LLViewerObject* parent = (LLViewerObject*)object->getParent(); - while (parent != NULL) - { - if (parent->isAvatar()) - { - is_attached = true; - break; - } - else - { - parent = (LLViewerObject*)parent->getParent(); - } - } + // and find parent avatar + parent_av = object->getAvatarAncestor(); } - - if (is_attached) + // Can be both an attachment and animated object + if (parent_av) { - if (object->isAnimatedObject()) - { - // Is an animated object attachment. - // Pause both the control avatar and the avatar it's attached to. - if (object->getControlAvatar()) - { - mPauseRequests.push_back(object->getControlAvatar()->requestPause()); - } - mPauseRequests.push_back(gAgentAvatarp->requestPause()); - } - else - { - // Is a regular attachment. Pause the avatar it's attached to. - mPauseRequests.push_back(gAgentAvatarp->requestPause()); - } + // It's an attachment. Pause the avatar it's attached to. + mPauseRequests.push_back(parent_av->requestPause()); } - else if (object && object->isAnimatedObject() && object->getControlAvatar()) + + if (object->isAnimatedObject() && object->getControlAvatar()) { - // Is a non-attached animated object. Pause the control avatar. + // It's an animated object. Pause the control avatar. mPauseRequests.push_back(object->getControlAvatar()->requestPause()); } - } } From 80447f5e6bfd9843413c7a79074d11373e6c4061 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 13 Apr 2020 15:06:11 +0300 Subject: [PATCH 051/153] SL-11172 Re-fixed, now should affect 'tab' only --- indra/llui/llaccordionctrl.cpp | 4 ++-- indra/llui/llaccordionctrl.h | 2 +- indra/llui/llaccordionctrltab.cpp | 4 ++-- indra/llui/llaccordionctrltab.h | 2 +- indra/llui/lllineeditor.cpp | 1 + indra/llui/llmultisliderctrl.cpp | 1 + indra/llui/llsliderctrl.cpp | 1 + indra/llui/llspinctrl.cpp | 3 ++- indra/llui/lluictrl.cpp | 4 ++-- indra/llui/llview.cpp | 4 ++-- indra/llui/llview.h | 2 +- 11 files changed, 16 insertions(+), 12 deletions(-) diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 779508df49..962b8e9bb5 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -657,7 +657,7 @@ void LLAccordionCtrl::onScrollPosChangeCallback(S32, LLScrollbar*) } // virtual -void LLAccordionCtrl::onChildGotFocus(const LLUICtrl *cntrl) +void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl) { if (mScrollbar && mScrollbar->getVisible()) { @@ -683,7 +683,7 @@ void LLAccordionCtrl::onChildGotFocus(const LLUICtrl *cntrl) } } - LLUICtrl::onChildGotFocus(cntrl); + LLUICtrl::onUpdateScrollToChild(cntrl); } void LLAccordionCtrl::onOpen (const LLSD& key) diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index 3e30677429..b38a76d27f 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -111,7 +111,7 @@ public: void draw(); void onScrollPosChangeCallback(S32, LLScrollbar*); - virtual void onChildGotFocus(const LLUICtrl * cntrl); + virtual void onUpdateScrollToChild(const LLUICtrl * cntrl); void onOpen (const LLSD& key); S32 notifyParent(const LLSD& info); diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index d5c4ad961c..098621b543 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -453,7 +453,7 @@ void LLAccordionCtrlTab::onVisibilityChange(BOOL new_visibility) } // virtual -void LLAccordionCtrlTab::onChildGotFocus(const LLUICtrl *cntrl) +void LLAccordionCtrlTab::onUpdateScrollToChild(const LLUICtrl *cntrl) { if (mScrollbar && mScrollbar->getVisible()) { @@ -478,7 +478,7 @@ void LLAccordionCtrlTab::onChildGotFocus(const LLUICtrl *cntrl) } } - LLUICtrl::onChildGotFocus(cntrl); + LLUICtrl::onUpdateScrollToChild(cntrl); } BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 53546ad5a1..2c72e8c036 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -159,7 +159,7 @@ public: * Raises notifyParent event with "child_visibility_change" = new_visibility */ void onVisibilityChange(BOOL new_visibility); - virtual void onChildGotFocus(const LLUICtrl * cntrl); + virtual void onUpdateScrollToChild(const LLUICtrl * cntrl); // Changes expand/collapse state and triggers expand/collapse callbacks virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 3ad504d68d..83cbbe0207 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -2142,6 +2142,7 @@ void LLLineEditor::clear() void LLLineEditor::onTabInto() { selectAll(); + LLUICtrl::onTabInto(); } //virtual diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index c460a08afc..4026a9e38e 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -474,6 +474,7 @@ void LLMultiSliderCtrl::onTabInto() { mEditor->onTabInto(); } + LLF32UICtrl::onTabInto(); } void LLMultiSliderCtrl::reportInvalidData() diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 0056cb6dc4..f5f160a3d6 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -438,6 +438,7 @@ void LLSliderCtrl::onTabInto() { mEditor->onTabInto(); } + LLF32UICtrl::onTabInto(); } void LLSliderCtrl::reportInvalidData() diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index ce3fc29d32..ee78b82429 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -442,7 +442,8 @@ void LLSpinCtrl::setAllowEdit(BOOL allow_edit) void LLSpinCtrl::onTabInto() { - mEditor->onTabInto(); + mEditor->onTabInto(); + LLF32UICtrl::onTabInto(); } diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index e1d275c351..544a76e8d5 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -679,7 +679,6 @@ void LLUICtrl::setFocus(BOOL b) if (!hasFocus()) { gFocusMgr.setKeyboardFocus( this ); - onChildGotFocus(this); } } else @@ -722,8 +721,9 @@ void LLUICtrl::resetDirty() } // virtual -void LLUICtrl::onTabInto() +void LLUICtrl::onTabInto() { + onUpdateScrollToChild(this); } // virtual diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 9d5cc70580..d81e2cd494 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -641,12 +641,12 @@ void LLView::onVisibilityChange ( BOOL new_visibility ) } // virtual -void LLView::onChildGotFocus(const LLUICtrl * cntrl) +void LLView::onUpdateScrollToChild(const LLUICtrl * cntrl) { LLView* parent_view = getParent(); if (parent_view) { - parent_view->onChildGotFocus(cntrl); + parent_view->onUpdateScrollToChild(cntrl); } } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 643436eb8c..5c91c37d3c 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -301,7 +301,7 @@ public: virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); virtual void onVisibilityChange ( BOOL new_visibility ); - virtual void onChildGotFocus(const LLUICtrl * cntrl); + virtual void onUpdateScrollToChild(const LLUICtrl * cntrl); void pushVisible(BOOL visible) { mLastVisible = mVisible; setVisible(visible); } void popVisible() { setVisible(mLastVisible); } From efc371571328da1298e4801a0338ab340675f60d Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 5 May 2020 01:31:22 +0300 Subject: [PATCH 052/153] Buildfix --- indra/newview/lltexturectrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index f55dbacd2a..de7551d2fe 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -755,7 +755,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::dequemModeSelector->getSelectedIndex(); + int index = self->mModeSelector->getValue().asInteger(); self->getChild("Default")->setVisible(index == 0 ? TRUE : FALSE); self->getChild("Blank")->setVisible(index == 0 ? TRUE : FALSE); From 3053f624832763e2b3edb9b7961264bb293cef83 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 5 May 2020 01:15:25 +0300 Subject: [PATCH 053/153] SL-12527 cursor is not changed to the pointer on the MoTD link when teleporting --- indra/newview/llappviewer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4c3b82b4e2..8cc2812fd9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4857,13 +4857,14 @@ void LLAppViewer::idle() { return; } + + gViewerWindow->updateUI(); + if (gTeleportDisplay) { return; } - gViewerWindow->updateUI(); - /////////////////////////////////////// // Agent and camera movement // From 0dbdc3c3afdf96c18631560685697218cb0c77c4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 17:17:26 +0200 Subject: [PATCH 054/153] Fix DirectX detection --- indra/cmake/DirectX.cmake | 59 +++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake index 1741dc111f..868a226d84 100644 --- a/indra/cmake/DirectX.cmake +++ b/indra/cmake/DirectX.cmake @@ -1,25 +1,25 @@ # -*- cmake -*- if (WINDOWS) - if(ADDRESS_SIZE EQUAL 32) - set(PROGRAMFILES_x86 $ENV{PROGRAMFILES}) - else(ADDRESS_SIZE EQUAL 32) - set(PROGRAMFILES_x86 $ENV{PROGRAMFILES\(X86\)}) - endif(ADDRESS_SIZE EQUAL 32) + if (DEFINED ENV{PROGRAMFILES\(X86\)}) + set (PROGRAMFILES $ENV{PROGRAMFILES\(X86\)}) + else (DEFINED ENV{PROGRAMFILES\(X86\)}) + set (PROGRAMFILES $ENV{PROGRAMFILES}) + endif (DEFINED ENV{PROGRAMFILES\(X86\)}) find_path(DIRECTX_INCLUDE_DIR dxdiag.h "$ENV{DXSDK_DIR}/Include" - "${PROGRAMFILES_x86}/Windows Kits/8.1/Include/um" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include" + "${PROGRAMFILES}/Windows Kits/8.1/Include/um" + "${PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include" "C:/DX90SDK/Include" - "$ENV{PROGRAMFILES}/DX90SDK/Include" + "${PROGRAMFILES}/DX90SDK/Include" ) if (DIRECTX_INCLUDE_DIR) include_directories(${DIRECTX_INCLUDE_DIR}) @@ -30,24 +30,29 @@ if (WINDOWS) message(FATAL_ERROR "Could not find DirectX SDK Include") endif (DIRECTX_INCLUDE_DIR) + if(ADDRESS_SIZE EQUAL 32) + set(DIRECTX_ARCHITECTURE "x86") + else(ADDRESS_SIZE EQUAL 32) + set(DIRECTX_ARCHITECTURE "x64") + endif(ADDRESS_SIZE EQUAL 32) find_path(DIRECTX_LIBRARY_DIR dxguid.lib - "$ENV{DXSDK_DIR}/Lib/x86" - "${PROGRAMFILES_x86}/Windows Kits/8.1/Lib/winv6.3/um/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86" + "$ENV{DXSDK_DIR}/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Windows Kits/8.1/Lib/winv6.3/um/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/${DIRECTX_ARCHITECTURE}" + "${PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/${DIRECTX_ARCHITECTURE}" "C:/DX90SDK/Lib" - "$ENV{PROGRAMFILES}/DX90SDK/Lib" + "${PROGRAMFILES}/DX90SDK/Lib" ) if (DIRECTX_LIBRARY_DIR) if (DIRECTX_FIND_QUIETLY) - message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}") + message(STATUS "Found DirectX library: ${DIRECTX_LIBRARY_DIR}") endif (DIRECTX_FIND_QUIETLY) else (DIRECTX_LIBRARY_DIR) message(FATAL_ERROR "Could not find DirectX SDK Libraries") From fe07947116dfd69cb1fe300e791fdf78a9174367 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 17:26:40 +0200 Subject: [PATCH 055/153] Transplant font updates --- indra/newview/fonts/fonts.xml | 2 ++ indra/newview/fonts/fonts_celestia_medium_redux.xml | 2 ++ indra/newview/fonts/fonts_droid.xml | 2 ++ indra/newview/fonts/fonts_dyslexia.xml | 2 ++ indra/newview/fonts/fonts_liberation.xml | 2 ++ indra/newview/fonts/fonts_mobi.xml | 2 ++ indra/newview/fonts/fonts_noto.xml | 2 ++ indra/newview/fonts/fonts_roboto.xml | 2 ++ indra/newview/fonts/fonts_ubuntu.xml | 2 ++ 9 files changed, 18 insertions(+) diff --git a/indra/newview/fonts/fonts.xml b/indra/newview/fonts/fonts.xml index 3e7eff4d4f..00ce0e8b17 100644 --- a/indra/newview/fonts/fonts.xml +++ b/indra/newview/fonts/fonts.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_celestia_medium_redux.xml b/indra/newview/fonts/fonts_celestia_medium_redux.xml index 4196fbc6a0..d177a69a56 100644 --- a/indra/newview/fonts/fonts_celestia_medium_redux.xml +++ b/indra/newview/fonts/fonts_celestia_medium_redux.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_droid.xml b/indra/newview/fonts/fonts_droid.xml index 927bcdde17..c540333cbe 100644 --- a/indra/newview/fonts/fonts_droid.xml +++ b/indra/newview/fonts/fonts_droid.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_dyslexia.xml b/indra/newview/fonts/fonts_dyslexia.xml index 9ebb445a84..ce40f41f94 100644 --- a/indra/newview/fonts/fonts_dyslexia.xml +++ b/indra/newview/fonts/fonts_dyslexia.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_liberation.xml b/indra/newview/fonts/fonts_liberation.xml index b612fe663f..0685fe5e61 100644 --- a/indra/newview/fonts/fonts_liberation.xml +++ b/indra/newview/fonts/fonts_liberation.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_mobi.xml b/indra/newview/fonts/fonts_mobi.xml index 4b73ba4e1d..76e08ece60 100644 --- a/indra/newview/fonts/fonts_mobi.xml +++ b/indra/newview/fonts/fonts_mobi.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_noto.xml b/indra/newview/fonts/fonts_noto.xml index 57b3940962..08c4fbf813 100644 --- a/indra/newview/fonts/fonts_noto.xml +++ b/indra/newview/fonts/fonts_noto.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_roboto.xml b/indra/newview/fonts/fonts_roboto.xml index e1c35b5332..004061a1b9 100644 --- a/indra/newview/fonts/fonts_roboto.xml +++ b/indra/newview/fonts/fonts_roboto.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc diff --git a/indra/newview/fonts/fonts_ubuntu.xml b/indra/newview/fonts/fonts_ubuntu.xml index f4f9cbe46a..5246683517 100644 --- a/indra/newview/fonts/fonts_ubuntu.xml +++ b/indra/newview/fonts/fonts_ubuntu.xml @@ -15,6 +15,7 @@ nirmala.ttf tahoma.ttf Cambria.ttc + micross.ttf malgun.ttf @@ -29,6 +30,7 @@ 华文细黑.ttf PingFang.ttc STIXGeneral.otf + Thonburi.ttc From 1dc99b3589da4609f8b312116f76f4a72dddf137 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 18:06:07 +0200 Subject: [PATCH 056/153] Fix texture picker floater --- .../skins/default/xui/da/floater_texture_ctrl.xml | 2 +- .../skins/default/xui/de/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/en/floater_texture_ctrl.xml | 2 +- .../skins/default/xui/es/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/fr/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/it/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/ja/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/pl/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/pt/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/ru/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/tr/floater_texture_ctrl.xml | 12 ++++++------ .../skins/default/xui/zh/floater_texture_ctrl.xml | 12 ++++++------ 12 files changed, 62 insertions(+), 62 deletions(-) diff --git a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml index 9e3c0c6d1d..7a1cb1c294 100644 --- a/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/da/floater_texture_ctrl.xml @@ -6,7 +6,7 @@ Flere teksturer - + Størrelse: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml index 1d89785c58..7c63e05550 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Mehrere Texturen - - - - - - + + + + + + Größe: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index 3b98f19b8a..cdd1407c69 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -79,7 +79,7 @@ height="14" layout="topleft" left="8" - name="unknown" + name="size_lbl" top_pad="4"> Size: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml index 791bdb9197..8ebe4f2784 100644 --- a/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/es/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Texturas múltiples - - - - - - + + + + + + Tamaño: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml index ee58eacbf0..8a745f7f2a 100644 --- a/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Textures multiples - - - - - - + + + + + + Taille: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml index 5f44a1448b..d03e88e738 100644 --- a/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/it/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Texture multiple - - - - - - + + + + + + Dimensioni: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml index 3c6360beb1..968f388fa9 100644 --- a/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ 複数のテクスチャ - - - - - - + + + + + + サイズ: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml index 7f2847f898..e9cd4ec40b 100644 --- a/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pl/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Wiele tekstur - - - - - - + + + + + + Rozmiar: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml index 5cc70f0e9b..e71a243032 100644 --- a/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Multiplas texturas - - - - - - + + + + + + Tamanho: [DIMENSÕES] diff --git a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml index f9122d90d8..0887a57525 100644 --- a/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml @@ -13,12 +13,12 @@ - - - - - - + + + + + + Размер: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml index 7bf5d6a081..941f8a289a 100644 --- a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ Birden çok doku - - - - - - + + + + + + Büyüklük: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml index de43666043..522467983e 100644 --- a/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml @@ -9,12 +9,12 @@ 多重材質 - - - - - - + + + + + + 尺寸: [DIMENSIONS] From 9c3368bbf60cb1d6f72f8f501981bc1b05a61a66 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 5 May 2020 19:08:55 +0300 Subject: [PATCH 057/153] SL-13178 Improve initial opening time of the landmarks floater --- doc/contributions.txt | 1 + indra/newview/llinventorypanel.cpp | 34 --------------------- indra/newview/llinventorypanel.h | 39 ++++++++++++++++++++++++ indra/newview/llplacesinventorypanel.cpp | 3 +- indra/newview/llplacesinventorypanel.h | 8 +++-- 5 files changed, 46 insertions(+), 39 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 811499ae28..9fc8fd9992 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -831,6 +831,7 @@ Khyota Wulluf Kimar Coba Kithrak Kirkorian Kitty Barnett + BUG-228665 VWR-19699 STORM-288 STORM-799 diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 1ed68d72c1..26f1b61fe6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1850,41 +1850,7 @@ void LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder() } /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ -/* Exchanges filter's flexibility for speed of generation and */ -/* improved performance */ /************************************************************************/ -class LLAssetFilteredInventoryPanel : public LLInventoryPanel -{ -public: - struct Params - : public LLInitParam::Block - { - Mandatory filter_asset_type; - - Params() : filter_asset_type("filter_asset_type") {} - }; - - void initFromParams(const Params& p); -protected: - LLAssetFilteredInventoryPanel(const Params& p) : LLInventoryPanel(p) {} - friend class LLUICtrlFactory; -public: - ~LLAssetFilteredInventoryPanel() {} - - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) override; - -protected: - /*virtual*/ LLFolderViewItem* buildNewViews(const LLUUID& id) override; - /*virtual*/ void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item) override; - -private: - LLAssetType::EType mAssetType; -}; - void LLAssetFilteredInventoryPanel::initFromParams(const Params& p) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 32d122cab8..eda5479cb4 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -359,4 +359,43 @@ protected: boost::function& items, BOOL user_action)> mSelectionCallback; friend class LLUICtrlFactory; }; + +/************************************************************************/ +/* Asset Pre-Filtered Inventory Panel related class */ +/* Exchanges filter's flexibility for speed of generation and */ +/* improved performance */ +/************************************************************************/ + +class LLAssetFilteredInventoryPanel : public LLInventoryPanel +{ +public: + struct Params + : public LLInitParam::Block + { + Mandatory filter_asset_type; + + Params() : filter_asset_type("filter_asset_type") {} + }; + + void initFromParams(const Params& p); +protected: + LLAssetFilteredInventoryPanel(const Params& p) : LLInventoryPanel(p) {} + friend class LLUICtrlFactory; +public: + ~LLAssetFilteredInventoryPanel() {} + + /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) override; + +protected: + /*virtual*/ LLFolderViewItem* buildNewViews(const LLUUID& id) override; + /*virtual*/ void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item) override; + +private: + LLAssetType::EType mAssetType; +}; + #endif // LL_LLINVENTORYPANEL_H diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index a23830e8e1..1c14acd843 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -43,9 +43,8 @@ static LLDefaultChildRegistry::Register r("places_invent static const LLPlacesInventoryBridgeBuilder PLACES_INVENTORY_BUILDER; LLPlacesInventoryPanel::LLPlacesInventoryPanel(const Params& p) : - LLInventoryPanel(p), + LLAssetFilteredInventoryPanel(p), mSavedFolderState(NULL) - { mInvFVBridgeBuilder = &PLACES_INVENTORY_BUILDER; mSavedFolderState = new LLSaveFolderState(); diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index 27d9b83bd1..5629438415 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -32,14 +32,16 @@ class LLLandmarksPanel; class LLFolderView; -class LLPlacesInventoryPanel : public LLInventoryPanel +class LLPlacesInventoryPanel : public LLAssetFilteredInventoryPanel { public: struct Params - : public LLInitParam::Block + : public LLInitParam::Block { Params() - {} + { + filter_asset_type = "landmark"; + } }; LLPlacesInventoryPanel(const Params& p); From 1c82cec3bd3e278b8326aa8ff6fbf59753b346d7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 18:09:40 +0200 Subject: [PATCH 058/153] Fix XUI parser warning produced by texture picker floater --- indra/newview/skins/default/xui/en/floater_texture_ctrl.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml index cdd1407c69..8a734faac0 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml @@ -49,7 +49,6 @@ Date: Tue, 5 May 2020 18:26:07 +0200 Subject: [PATCH 059/153] Update German translation --- indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml | 3 ++- indra/newview/skins/default/xui/de/menu_inventory.xml | 1 + indra/newview/skins/default/xui/de/menu_script_chiclet.xml | 1 + indra/newview/skins/default/xui/de/panel_main_inventory.xml | 3 ++- indra/newview/skins/default/xui/de/strings.xml | 3 +++ indra/newview/skins/vintage/xui/de/panel_main_inventory.xml | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml index 1d9d75c805..cc77bcfe10 100644 --- a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml @@ -99,7 +99,8 @@ - + + diff --git a/indra/newview/skins/default/xui/de/menu_inventory.xml b/indra/newview/skins/default/xui/de/menu_inventory.xml index 606651c4b7..c853224443 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory.xml @@ -53,6 +53,7 @@ + diff --git a/indra/newview/skins/default/xui/de/menu_script_chiclet.xml b/indra/newview/skins/default/xui/de/menu_script_chiclet.xml index 3256aa1a87..97587d6413 100644 --- a/indra/newview/skins/default/xui/de/menu_script_chiclet.xml +++ b/indra/newview/skins/default/xui/de/menu_script_chiclet.xml @@ -1,4 +1,5 @@ + diff --git a/indra/newview/skins/default/xui/de/panel_main_inventory.xml b/indra/newview/skins/default/xui/de/panel_main_inventory.xml index 081db49dad..ca4249da43 100644 --- a/indra/newview/skins/default/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/de/panel_main_inventory.xml @@ -34,7 +34,8 @@ - + + diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index deed2bfe4b..f89f155636 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1688,6 +1688,9 @@ http://www.firestormviewer.org/support für Hilfe zum Lösen des Problems. Sie haben nicht das Richtige gefunden? [secondlife:///app/inventory/filters Filter] anzeigen. + + Wählen Sie „Als Favoriten-Ordner verwenden“ für einen Ordner Ihrer Wahl. Sie können jederzeit einen anderen Ordner auswählen. System-Ordner können nicht als Favorit ausgewählt werden. + Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/places/[SEARCH_TERM] Suche]. diff --git a/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml b/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml index 30d535a2cb..a31d41e0a5 100644 --- a/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml @@ -109,6 +109,7 @@ + From ac65091c57b0e22821a8eab59a349622e6e93e42 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 18:29:07 +0200 Subject: [PATCH 060/153] Remove host IP display for all other languages as well --- indra/newview/skins/default/xui/de/strings.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 2 +- indra/newview/skins/default/xui/fr/strings.xml | 2 +- indra/newview/skins/default/xui/it/strings.xml | 2 +- indra/newview/skins/default/xui/pl/strings.xml | 2 +- indra/newview/skins/default/xui/pt/strings.xml | 2 +- indra/newview/skins/default/xui/ru/strings.xml | 2 +- indra/newview/skins/default/xui/tr/strings.xml | 2 +- indra/newview/skins/default/xui/zh/strings.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index f89f155636..ec4e8a1683 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -42,7 +42,7 @@ Build-Konfiguration [BUILD_CONFIG] - Sie befinden sich an [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] auf <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Sie befinden sich an [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] auf <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (globale Koordinaten [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 531e1c066f..b634a64923 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -44,7 +44,7 @@ Compilado con [COMPILER], versión [COMPILER_VERSION] - Estás en la posición [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1], de [REGION], alojada en <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Estás en la posición [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1], de [REGION], alojada en <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (coordenadas globales [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 2bf7913a7a..2123953870 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -36,7 +36,7 @@ Compilé avec [COMPILER] version [COMPILER_VERSION] - Vous êtes à [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] dans [REGION], se trouvant à <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Vous êtes à [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] dans [REGION], se trouvant à <nolink>[HOSTNAME]</nolink> SLURL : <nolink>[SLURL]</nolink> (coordonnées globales [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index e082dccfa7..f509735661 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -31,7 +31,7 @@ Configurazione build [BUILD_CONFIG] - Tu sei a [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] che si trova su <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Tu sei a [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] che si trova su <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (coordinate globali [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 264bd4d493..4fa14760f9 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -31,7 +31,7 @@ Konfiguracja budowania: [BUILD_CONFIG] -Położenie [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> ([HOSTIP]) +Położenie [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (koordynaty globalne [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index d8871c7529..a8174f0dae 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -36,7 +36,7 @@ Construído com [COMPILER] versão [COMPILER_VERSION] - Você está em [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] em [REGION] localizado em <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Você está em [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] em [REGION] localizado em <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (coordenadas globais [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 9bd3c77aff..c4fe1ae499 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -51,7 +51,7 @@ Использован компилятор [COMPILER], версия [COMPILER_VERSION] - Вы в точке [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] в регионе [REGION], расположенном на <nolink>[HOSTNAME]</nolink> ([HOSTIP]) + Вы в точке [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] в регионе [REGION], расположенном на <nolink>[HOSTNAME]</nolink> SLURL: <nolink>[SLURL]</nolink> (глобальные координаты [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index 065e841c46..65b49f2f16 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -48,7 +48,7 @@ [COMPILER] [COMPILER_VERSION] sürümü ile oluşturuldu - <nolink>[HOSTNAME]</nolink> ([HOSTIP]) üzerinde bulunan [REGION] içerisinde [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] konumundasınız + <nolink>[HOSTNAME]</nolink> üzerinde bulunan [REGION] içerisinde [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] konumundasınız SLURL: <nolink>[SLURL]</nolink> (küresel koordinatlar [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index ae4765a4aa..80e1d32c3c 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -48,7 +48,7 @@ 以 [COMPILER_VERSION] 版本 [COMPILER] 建置 - 你的方位是 [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1],地區名:[REGION],主機:<nolink>[HOSTNAME]</nolink> ([HOSTIP]) + 你的方位是 [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1],地區名:[REGION],主機:<nolink>[HOSTNAME]</nolink> 第二人生URL:<nolink>[SLURL]</nolink> (全域坐標:[POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1]) [SERVER_VERSION] From 11fdaf420e531eca4e3a2ea47dc68e52eb6c9c4c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 5 May 2020 18:47:03 +0200 Subject: [PATCH 061/153] Fix XUI parser warning "No callback found for: 'Inventory.SetFavoritesFolder' in control: Set Favorites folder" --- indra/newview/llpanelobjectinventory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index ae21eddd3a..4e37d8da59 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1408,6 +1408,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&do_nothing)); + mCommitCallbackRegistrar.add("Inventory.SetFavoritesFolder", boost::bind(&do_nothing)); // Prevent warning "No callback found for: 'Inventory.SetFavoritesFolder' in control: Set Favorites folder" mCommitCallbackRegistrar.add("Inventory.CustomAction", boost::bind(&do_nothing)); // Prevent warning "No callback found for: 'Inventory.CustomAction' in control: Find Links" } From 0828d7375af44aa270635f374c993959ae3e2a28 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 8 May 2020 11:54:58 +0300 Subject: [PATCH 062/153] SL-12396 FIXED Last line can't be removed if it was selected via triple-clicking --- indra/llui/lltextbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index b48a32a622..30bf938591 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1037,6 +1037,7 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) line_start = it->mDocIndexStart; } line_end = it->mDocIndexEnd; + line_end = llclamp(line_end, 0, getLength()); } if (line_start == -1) From 847cce915dd54166ca3b4fd6bfb8b3c697433abf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 14 May 2020 22:55:33 +0300 Subject: [PATCH 063/153] SL-12237 Remade updates for invisible avatars --- indra/newview/llvoavatar.cpp | 33 +++++++++++++++++++-------------- indra/newview/llvoavatar.h | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f43391b477..7e8f65a046 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3901,16 +3901,15 @@ void LLVOAvatar::updateFootstepSounds() } //------------------------------------------------------------------------ -// computeUpdatePeriodAndVisibility() +// computeUpdatePeriod() // Factored out from updateCharacter() // Set new value for mUpdatePeriod based on distance and various other factors. -// Returs true if character needs an update //------------------------------------------------------------------------ -BOOL LLVOAvatar::computeUpdatePeriodAndVisibility() +void LLVOAvatar::computeUpdatePeriod() { bool visually_muted = isVisuallyMuted(); - BOOL is_visible = isVisible(); // includes drawable check - if ( is_visible + if (mDrawable.notNull() + && isVisible() && (!isSelf() || visually_muted) && !isUIAvatar() && sUseImpostors @@ -3956,12 +3955,10 @@ BOOL LLVOAvatar::computeUpdatePeriodAndVisibility() //nearby avatars, update the impostors more frequently. mUpdatePeriod = 4; } - return (LLDrawable::getCurrentFrame() + mID.mData[0]) % mUpdatePeriod == 0 ? TRUE : FALSE; } else { mUpdatePeriod = 1; - return is_visible; } } @@ -4330,15 +4327,16 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // The rest should only be done occasionally for far away avatars. // Set mUpdatePeriod and visible based on distance and other criteria. //-------------------------------------------------------------------- - visible = computeUpdatePeriodAndVisibility(); + computeUpdatePeriod(); + bool needs_update = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0; //-------------------------------------------------------------------- - // Early out if not visible and not self + // Early out if does not need update and not self // don't early out for your own avatar, as we rely on your animations playing reliably // for example, the "turn around" animation when entering customize avatar needs to trigger // even when your avatar is offscreen //-------------------------------------------------------------------- - if (!visible && !isSelf()) + if (!needs_update && !isSelf()) { updateMotions(LLCharacter::HIDDEN_UPDATE); return FALSE; @@ -4387,7 +4385,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) mSpeed = speed; // update animations - if (mSpecialRenderMode == 1) // Animation Preview + if (!visible) + { + updateMotions(LLCharacter::HIDDEN_UPDATE); + } + else if (mSpecialRenderMode == 1) // Animation Preview { updateMotions(LLCharacter::FORCE_UPDATE); } @@ -4421,10 +4423,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // Update child joints as needed. mRoot->updateWorldMatrixChildren(); - // System avatar mesh vertices need to be reskinned. - mNeedsSkin = TRUE; + if (visible) + { + // System avatar mesh vertices need to be reskinned. + mNeedsSkin = TRUE; + } - return TRUE; + return visible; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 7b03a4073f..71a81c2e3d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -264,7 +264,7 @@ public: virtual void updateDebugText(); virtual BOOL updateCharacter(LLAgent &agent); void updateFootstepSounds(); - BOOL computeUpdatePeriodAndVisibility(); + void computeUpdatePeriod(); void updateOrientation(LLAgent &agent, F32 speed, F32 delta_time); void updateTimeStep(); void updateRootPositionAndRotation(LLAgent &agent, F32 speed, bool was_sit_ground_constrained); From db41596b1a01f4a1c93e21a753428d0ca39ae460 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 26 May 2020 21:30:44 +0200 Subject: [PATCH 064/153] Include per account settings file independent from username --- indra/newview/llappviewerwin32.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index a68f659554..2e282d6800 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -160,22 +160,22 @@ namespace // Clear out username first, as we get some crashes that has the OS set as username, let's see if this fixes it. sBugSplatSender->setDefaultUserName( WCSTR("") ); - // Only send avatar name if enabled via prefs - if (gCrashSettings.getBOOL("CrashSubmitName")) + if (gAgentAvatarp) { - // - if (gAgentAvatarp) + // Only send avatar name if enabled via prefs + if (gCrashSettings.getBOOL("CrashSubmitName")) + // { // user name, when we have it sBugSplatSender->setDefaultUserName(WCSTR(gAgentAvatarp->getFullname())); - - sBugSplatSender->sendAdditionalFile( - WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); + // Only send avatar name if enabled via prefs } - // Only send avatar name if enabled via prefs + // + + sBugSplatSender->sendAdditionalFile( + WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); } - // - + // LL_ERRS message, when there is one sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage())); From 60dc71dda3953da44e9336d3082e372753dc45c5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 26 May 2020 22:15:08 +0200 Subject: [PATCH 065/153] Only send per account settings file if user opted in to send settings files --- indra/newview/llappviewerwin32.cpp | 11 +++++++++-- .../default/xui/de/panel_preferences_crashreports.xml | 2 +- .../default/xui/en/panel_preferences_crashreports.xml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 2e282d6800..78b758a1b0 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -172,8 +172,15 @@ namespace } // - sBugSplatSender->sendAdditionalFile( - WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); + // Only include if sending settings file + //sBugSplatSender->sendAdditionalFile( + // WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); + if (gCrashSettings.getBOOL("CrashSubmitSettings")) + { + sBugSplatSender->sendAdditionalFile( + WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml"))); + } + // } // LL_ERRS message, when there is one diff --git a/indra/newview/skins/default/xui/de/panel_preferences_crashreports.xml b/indra/newview/skins/default/xui/de/panel_preferences_crashreports.xml index d15b516e78..b28d52f539 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_crashreports.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_crashreports.xml @@ -2,7 +2,7 @@ - + (enthält Benutzername) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_crashreports.xml b/indra/newview/skins/default/xui/en/panel_preferences_crashreports.xml index cae43db347..5b362348b2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_crashreports.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_crashreports.xml @@ -39,7 +39,7 @@ follows="top|left" top_pad="5" height="16" - label="Include settings.xml" + label="Include settings files" name="checkSendSettings" width="130" enabled="false" /> From 547361692e485bd8f8f2e6640fa13f55fb8d62ab Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Wed, 3 Jun 2020 00:20:38 +0300 Subject: [PATCH 066/153] Post-merge buildfix --- indra/newview/viewer_manifest.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5080b93345..e9007fd7b5 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1057,11 +1057,6 @@ class DarwinManifest(ViewerManifest): if self.args['configuration'].lower() == 'debug': for libfile in ( "libfmodL.dylib", - # dylibs that vary based on configuration - if self.args['fmodex'] == 'ON': - if self.args['configuration'].lower() == 'debug': - for libfile in ( - "libfmodexL.dylib", ): dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile) else: @@ -1069,10 +1064,6 @@ class DarwinManifest(ViewerManifest): "libfmod.dylib", ): dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) - - "libfmodex.dylib", - ): - dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) # our apps executable_path = {} From 9b1c8534fbb0e99e9e20142fdc9582f3966c1e01 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Wed, 3 Jun 2020 11:36:13 +0300 Subject: [PATCH 067/153] More post-merge cleanup --- indra/newview/CMakeLists.txt | 5 ----- indra/newview/viewer_manifest.py | 9 ++------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a2892f9c7e..8977dcf50d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1939,7 +1939,6 @@ if (WINDOWS) --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" "--fmodstudio=${FMODSTUDIO}" - "--fmodex=${FMODEX}" "--openal=${OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} @@ -2087,7 +2086,6 @@ if (LINUX) --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" "--fmodstudio=${FMODSTUDIO}" - "--fmodex=${FMODEX}" "--openal=${OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} @@ -2116,7 +2114,6 @@ if (LINUX) --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" "--fmodstudio=${FMODSTUDIO}" - "--fmodex=${FMODEX}" "--openal=${OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} @@ -2195,7 +2192,6 @@ if (DARWIN) --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" "--fmodstudio=${FMODSTUDIO}" - "--fmodex=${FMODEX}" "--openal=${OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} @@ -2232,7 +2228,6 @@ if (DARWIN) --artwork=${ARTWORK_DIR} "--bugsplat=${BUGSPLAT_DB}" "--fmodstudio=${FMODSTUDIO}" - "--fmodex=${FMODEX}" "--openal=${OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index e9007fd7b5..0a96444a7a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1064,7 +1064,7 @@ class DarwinManifest(ViewerManifest): "libfmod.dylib", ): dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) - + # our apps executable_path = {} for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"), @@ -1535,10 +1535,6 @@ class Linux_i686_Manifest(LinuxManifest): except: print "Skipping libfmod.so - not found" pass - if self.args['fmodex'] == 'ON': - self.path("libfmodex-*.so") - self.path("libfmodex.so") - # Vivox runtimes with self.prefix(src=relpkgdir, dst="bin"): @@ -1564,12 +1560,11 @@ class Linux_x86_64_Manifest(LinuxManifest): ################################################################ if __name__ == "__main__": - # fmodex and openal can be used simultaneously and controled by environment + # fmodstudio and openal can be used simultaneously and controled by environment extra_arguments = [ dict(name='bugsplat', description="""BugSplat database to which to post crashes, if BugSplat crash reporting is desired""", default=''), dict(name='fmodstudio', description="""Indication if fmod studio libraries are needed""", default='OFF'), - dict(name='fmodex', description="""Indication that fmodex libraries are needed""", default='OFF'), dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'), ] try: From 846d0d337145597eb98e1e107a273622a183f133 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 5 Jun 2020 17:25:01 +0300 Subject: [PATCH 068/153] SL-13390 Fix Openal Builds --- indra/llaudio/llaudioengine_openal.cpp | 2 +- indra/newview/llprogressview.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp index a38d8291fa..3bdd0302ee 100644 --- a/indra/llaudio/llaudioengine_openal.cpp +++ b/indra/llaudio/llaudioengine_openal.cpp @@ -55,7 +55,7 @@ LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL() bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata, const std::string &app_title) { mWindGen = NULL; - LLAudioEngine::init(num_channels, userdata); + LLAudioEngine::init(num_channels, userdata, app_title); if(!alutInit(NULL, NULL)) { diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index e4c4a0d86b..19c8ef2651 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -385,6 +385,7 @@ void LLProgressView::initLogos() const S32 default_pad = 15; S32 icon_width, icon_height; + S32 pad_y = 0; // We don't know final screen rect yet, so we can't precalculate position fully LLTextBox *logos_label = getChild("logos_lbl"); @@ -404,7 +405,7 @@ void LLProgressView::initLogos() // with no internal paddings so it gets additional padding icon_width = 77; icon_height = 21; - S32 pad_y = 4; + pad_y = 4; texture_start_x++; loadLogo(temp_str + "fmod_logo.png", image_codec, From aabb0bbc49aa15b100dc8c2cbf286202cb084646 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Jun 2020 15:53:18 +0300 Subject: [PATCH 069/153] SL-13390 Disable Havok icon when Havok is not included --- indra/newview/CMakeLists.txt | 6 ++++++ indra/newview/llprogressview.cpp | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8977dcf50d..1adc25090f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1736,6 +1736,12 @@ if (FMODSTUDIO) endif (FMODSTUDIO) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") + +if (HAVOK OR HAVOK_TPV) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK") +endif (HAVOK OR HAVOK_TPV) + +# progress view disables/enables icons based on available packages set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 19c8ef2651..3e3ab3a676 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -385,7 +385,6 @@ void LLProgressView::initLogos() const S32 default_pad = 15; S32 icon_width, icon_height; - S32 pad_y = 0; // We don't know final screen rect yet, so we can't precalculate position fully LLTextBox *logos_label = getChild("logos_lbl"); @@ -405,28 +404,30 @@ void LLProgressView::initLogos() // with no internal paddings so it gets additional padding icon_width = 77; icon_height = 21; - pad_y = 4; + S32 pad_fmod_y = 4; texture_start_x++; loadLogo(temp_str + "fmod_logo.png", image_codec, - LLRect(texture_start_x, texture_start_y + pad_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_y), + LLRect(texture_start_x, texture_start_y + pad_fmod_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_fmod_y), default_clip, default_clip); texture_start_x += icon_width + default_pad + 1; -#endif +#endif //LL_FMODSTUDIO +#ifdef LL_HAVOK // original image size is 342x113, central element is on a larger side // plus internal padding, so it gets slightly more height than desired 32 icon_width = 88; icon_height = 29; - pad_y = -1; + S32 pad_havok_y = -1; loadLogo(temp_str + "havok_logo.png", image_codec, - LLRect(texture_start_x, texture_start_y + pad_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_y), + LLRect(texture_start_x, texture_start_y + pad_havok_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_havok_y), default_clip, default_clip); texture_start_x += icon_width + default_pad; +#endif //LL_HAVOK // 108x41 icon_width = 74; From 4103483b91c139b592bc7d36a3ed7f78c13e896b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 20 Jun 2020 18:17:29 +0200 Subject: [PATCH 070/153] Fix incorrect bounds check --- indra/newview/rlvenvironment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/rlvenvironment.cpp b/indra/newview/rlvenvironment.cpp index f305309e0c..94878ab112 100644 --- a/indra/newview/rlvenvironment.cpp +++ b/indra/newview/rlvenvironment.cpp @@ -560,7 +560,7 @@ ERlvCmdRet RlvEnvironment::handleSetFn(const std::string& strRlvOption, const st template<> std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) { - if (idxComponent > 2) + if (idxComponent >= 2) return LLStringUtil::null; return std::to_string(getFn(LLEnvironment::instance().getCurrentSky()).mV[idxComponent]); } @@ -583,7 +583,7 @@ std::string RlvEnvironment::handleLegacyGetFn(const std::function ERlvCmdRet RlvEnvironment::handleLegacySetFn(float optionValue, LLVector2 curValue, const std::function& setFn, U32 idxComponent) { - if (idxComponent > 2) + if (idxComponent >= 2) return RLV_RET_FAILED_UNKNOWN; LLSettingsSky::ptr_t pSky = LLEnvironment::instance().getCurrentSky(); From 3c564f5afcd59bbbce135a6fc531361196bae2f6 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 2 Jul 2020 21:20:13 +0300 Subject: [PATCH 071/153] SL-11625 Fix for skewed baked texture offset values --- doc/contributions.txt | 2 ++ indra/newview/llviewerjointmesh.cpp | 16 +--------------- indra/newview/llviewertexlayer.cpp | 2 +- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 7c1986530d..785e849886 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1303,6 +1303,7 @@ Shyotl Kuhr MAINT-2334 MAINT-6913 STORM-2143 + SL-11625 Siana Gearz STORM-960 STORM-1088 @@ -1342,6 +1343,7 @@ Sovereign Engineer MAINT-7343 SL-11079 OPEN-343 + SL-11625 SpacedOut Frye VWR-34 VWR-45 diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 6990f56a08..fdfd22c117 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -253,7 +253,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) //---------------------------------------------------------------- llassert( !(mTexture.notNull() && mLayerSet) ); // mutually exclusive - LLTexUnit::eTextureAddressMode old_mode = LLTexUnit::TAM_WRAP; LLViewerTexLayerSet *layerset = dynamic_cast(mLayerSet); if (mTestImageName) { @@ -280,22 +279,15 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } } - else - if ( !is_dummy && mTexture.notNull() ) + else if ( !is_dummy && mTexture.notNull() ) { - if(mTexture->hasGLTexture()) - { - old_mode = mTexture->getAddressMode(); - } gGL.getTexUnit(diffuse_channel)->bind(mTexture); - gGL.getTexUnit(diffuse_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); } else { gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } - U32 mask = sRenderMask; U32 start = mMesh->mFaceVertexOffset; @@ -341,12 +333,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.getTexUnit(diffuse_channel)->setTextureBlendType(LLTexUnit::TB_MULT); } - if (mTexture.notNull() && !is_dummy) - { - gGL.getTexUnit(diffuse_channel)->bind(mTexture); - gGL.getTexUnit(diffuse_channel)->setTextureAddressMode(old_mode); - } - return triangle_count; } diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index 7f7d190b92..c501dd0035 100644 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -54,7 +54,7 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height) : // ORDER_LAST => must render these after the hints are created. LLTexLayerSetBuffer(owner), - LLViewerDynamicTexture( width, height, 4, LLViewerDynamicTexture::ORDER_LAST, TRUE ), + LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, FALSE), mNeedsUpdate(TRUE), mNumLowresUpdates(0) { From 85cbf2ee3b78d49a4ee8798e65c586566c7922ec Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 9 Jul 2020 15:33:24 +0300 Subject: [PATCH 072/153] SL-12478 long names are not beautiful in Name Tags According to revised behavior names should always fit into single line --- indra/newview/llhudnametag.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 0701b07856..4ed802138d 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -439,17 +439,19 @@ void LLHUDNameTag::addLine(const std::string &text_utf8, U32 line_length = 0; if (use_ellipses) { - // "QualityAssuranceAssuresQuality 1" will end up like "QualityAssuranceAssuresQual..." - // "QualityAssurance AssuresQuality 1" will be split into two lines "QualityAssurance" and "AssuresQuality 1" + // "QualityAssuranceAssuresQuality1" will end up like "QualityAssuranceAssuresQual..." + // "QualityAssuranceAssuresQuality QualityAssuranceAssuresQuality" will end up like "QualityAssuranceAssuresQual..." + // "QualityAssurance AssuresQuality1" will end up as "QualityAssurance AssuresQua..." because we are enforcing single line do { - S32 segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels, wline.length(), LLFontGL::ONLY_WORD_BOUNDARIES); - if (segment_length == 0) + S32 segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels, wline.length(), LLFontGL::ANYWHERE); + if (segment_length + line_length < wline.length()) // since we only draw one string, line_length should be 0 { - // First word in segment (not nessesary first line) does not fit, need to draw "...". + // token does does not fit into signle line, need to draw "...". // Use four dots for ellipsis width to generate padding const LLWString dots_pad(utf8str_to_wstring(std::string("...."))); S32 elipses_width = font->getWidthF32(dots_pad.c_str()); + // truncated string length segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels - elipses_width, wline.length(), LLFontGL::ANYWHERE); const LLWString dots(utf8str_to_wstring(std::string("..."))); LLHUDTextSegment segment(iter->substr(line_length, segment_length) + dots, style, color, font); @@ -458,6 +460,7 @@ void LLHUDNameTag::addLine(const std::string &text_utf8, } else { + // token fits fully into string LLHUDTextSegment segment(iter->substr(line_length, segment_length), style, color, font); mTextSegments.push_back(segment); line_length += segment_length; From b495608a8352cfb949d44607ef4967f2516da40a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 9 Jul 2020 18:07:57 +0300 Subject: [PATCH 073/153] SL-12554 FIXED The value of the 'Avatar Maximum Complexity' is not synchronized after closing Advanced settings via Close btn --- indra/newview/llfloaterpreference.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 712b41848c..96094dcf14 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2938,6 +2938,7 @@ void LLFloaterPreferenceGraphicsAdvanced::onClickCloseBtn(bool app_quitting) { instance->cancel(); } + updateMaxComplexity(); } LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy() From 55477e74c79228feb9a5a2d8b970bb9cce2e57a1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 10 Jul 2020 21:07:54 +0300 Subject: [PATCH 074/153] Reverted SL-12494 Change was moved to DRTVWR-514 --- .../skins/default/xui/en/menu_viewer.xml | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index c7ab26bc22..873b95926b 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -56,8 +56,7 @@ + name="Places"> @@ -86,22 +85,11 @@ + name="Camera Controls"> - - - - + name="Stop Animating My Avatar"> @@ -471,8 +458,7 @@ + name="Events"> @@ -661,8 +647,7 @@ tear_off="true"> + name="Sunrise"> @@ -694,8 +679,7 @@ + name="Midnight"> @@ -1333,8 +1317,7 @@ function="World.EnvPreset" + name="Upload Model"> From f554fe2ca74ddf275e47cdce8537e04ab40f9f95 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 10 Jul 2020 23:44:55 +0300 Subject: [PATCH 075/153] SL-10326 Allow selecting any movable avatars with 'Allow Select Avatar' option --- indra/newview/llselectmgr.cpp | 4 ++-- indra/newview/llselectmgr.h | 2 +- indra/newview/llviewerparcelmgr.cpp | 5 ++++- indra/newview/llviewerwindow.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9fd5eb28c1..50884762a8 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3931,11 +3931,11 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r return TRUE; } -BOOL LLSelectMgr::isSelfAvatarSelected() +BOOL LLSelectMgr::isMovableAvatarSelected() { if (mAllowSelectAvatar) { - return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject() == gAgentAvatarp); + return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject()->isAvatar()) && getSelection()->getFirstMoveableNode(TRUE); } return FALSE; } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 75d11dd06b..57fdfce152 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -732,7 +732,7 @@ public: LLPermissions* findObjectPermissions(const LLViewerObject* object); - BOOL isSelfAvatarSelected(); + BOOL isMovableAvatarSelected(); void selectDelete(); // Delete on simulator void selectForceDelete(); // just delete, no into trash diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index c966b7d4f9..d5365e4ee8 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1906,7 +1906,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use || music_url.substr(0, 8) == "https://") { LLViewerRegion *region = LLWorld::getInstance()->getRegion(msg->getSender()); - optionally_start_music(music_url, parcel->mLocalID, region->getRegionID()); + if (region) + { + optionally_start_music(music_url, parcel->mLocalID, region->getRegionID()); + } } else { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1e72e2266b..e3b01bf60f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3925,7 +3925,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL draw_handles = TRUE; - if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isSelfAvatarSelected()) + if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected()) { draw_handles = FALSE; } From 471c53e87095b25f21515125825a30a4129136f8 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 15 Jul 2020 23:51:57 +0200 Subject: [PATCH 076/153] [FIXED] Crash on Linux when issuing @setenv_ambientr:=force (legacy handling functions returned a reference to a local variable) --- indra/newview/rlvenvironment.cpp | 6 +++--- indra/newview/rlvenvironment.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/rlvenvironment.cpp b/indra/newview/rlvenvironment.cpp index 94878ab112..6b498325d9 100644 --- a/indra/newview/rlvenvironment.cpp +++ b/indra/newview/rlvenvironment.cpp @@ -558,7 +558,7 @@ ERlvCmdRet RlvEnvironment::handleSetFn(const std::string& strRlvOption, const st } template<> -std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) +std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) { if (idxComponent >= 2) return LLStringUtil::null; @@ -566,7 +566,7 @@ std::string RlvEnvironment::handleLegacyGetFn(const std::function -std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) +std::string RlvEnvironment::handleLegacyGetFn(const std::function& getFn, U32 idxComponent) { if ( (idxComponent >= VRED) && (idxComponent <= VBLUE) ) { @@ -672,7 +672,7 @@ void RlvEnvironment::registerSetEnvFn(const std::string& strFnName, const std::f } template -void RlvEnvironment::registerLegacySkyFn(const std::string& strFnName, const std::function& getFn, const std::function& setFn) +void RlvEnvironment::registerLegacySkyFn(const std::string& strFnName, const std::function& getFn, const std::function& setFn) { RLV_ASSERT(m_LegacyGetFnLookup.end() == m_LegacyGetFnLookup.find(strFnName)); m_LegacyGetFnLookup.insert(std::make_pair(strFnName, [this, getFn](const std::string& strRlvParam, U32 idxComponent) diff --git a/indra/newview/rlvenvironment.h b/indra/newview/rlvenvironment.h index 0f70e24cae..2d19ab2341 100644 --- a/indra/newview/rlvenvironment.h +++ b/indra/newview/rlvenvironment.h @@ -45,12 +45,12 @@ protected: void registerGetEnvFn(const std::string& strFnName, const std::function& getFn); template void registerSetEnvFn(const std::string& strFnName, const std::function& setFn); template void registerSkyFn(const std::string& strFnName, const std::function& getFn, const std::function& setFn); - template void registerLegacySkyFn(const std::string& strFnName, const std::function& getFn, const std::function& setFn); + template void registerLegacySkyFn(const std::string& strFnName, const std::function& getFn, const std::function& setFn); // Command handling helpers template std::string handleGetFn(const std::function& fn); template ERlvCmdRet handleSetFn(const std::string& strRlvOption, const std::function& fn); - template std::string handleLegacyGetFn(const std::function& getFn, U32 idxComponent); + template std::string handleLegacyGetFn(const std::function& getFn, U32 idxComponent); template ERlvCmdRet handleLegacySetFn(float optionValue, T value, const std::function& setFn, U32 idxComponent); /* From 1c002e7c223d46df70421a67164facdd70baf0c7 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 21 Jul 2020 23:36:42 +0200 Subject: [PATCH 077/153] Pass address size to CMake via the platform parameter (see corresponding change in our autobuild) --- .gitignore | 6 ++---- autobuild.xml | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4af34870cf..192fdaad5c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,8 @@ indra/.distcc build-vc80/ build-vc100/ build-vc120/ -build-vc120-32/ -build-vc120-64/ -build-vc150-32/ -build-vc150-64/ +build-vc[0-9]*-32/ +build-vc[0-9]*-64/ indra/CMakeFiles indra/build-vc[0-9]* indra/lib/mono/1.0/*.dll diff --git a/autobuild.xml b/autobuild.xml index 5a5ba8aeb9..4400a4a0f8 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3868,6 +3868,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_CMAKE_PLAT|NOTWIN} default @@ -3906,6 +3908,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_CMAKE_PLAT|NOTWIN} -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE @@ -3940,6 +3944,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_CMAKE_PLAT|NOTWIN} name @@ -3976,6 +3982,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_CMAKE_PLAT|NOTWIN} -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE From de50b2e02f09f90141736d4828c68240b2d7b73e Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 25 Jul 2020 18:20:04 +0200 Subject: [PATCH 078/153] Code review for viewer/build branch --- indra/cmake/FindWindowsSDK.cmake | 631 ------------------------------- indra/newview/CMakeLists.txt | 15 - 2 files changed, 646 deletions(-) delete mode 100644 indra/cmake/FindWindowsSDK.cmake diff --git a/indra/cmake/FindWindowsSDK.cmake b/indra/cmake/FindWindowsSDK.cmake deleted file mode 100644 index 32991ea66c..0000000000 --- a/indra/cmake/FindWindowsSDK.cmake +++ /dev/null @@ -1,631 +0,0 @@ -# - Find the Windows SDK aka Platform SDK -# -# Relevant Wikipedia article: http://en.wikipedia.org/wiki/Microsoft_Windows_SDK -# -# Pass "COMPONENTS tools" to ignore Visual Studio version checks: in case -# you just want the tool binaries to run, rather than the libraries and headers -# for compiling. -# -# Variables: -# WINDOWSSDK_FOUND - if any version of the windows or platform SDK was found that is usable with the current version of visual studio -# WINDOWSSDK_LATEST_DIR -# WINDOWSSDK_LATEST_NAME -# WINDOWSSDK_FOUND_PREFERENCE - if we found an entry indicating a "preferred" SDK listed for this visual studio version -# WINDOWSSDK_PREFERRED_DIR -# WINDOWSSDK_PREFERRED_NAME -# -# WINDOWSSDK_DIRS - contains no duplicates, ordered most recent first. -# WINDOWSSDK_PREFERRED_FIRST_DIRS - contains no duplicates, ordered with preferred first, followed by the rest in descending recency -# -# Functions: -# windowssdk_name_lookup( ) - Find the name corresponding with the SDK directory you pass in, or -# NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work. -# -# windowssdk_build_lookup( ) - Find the build version number corresponding with the SDK directory you pass in, or -# NOTFOUND if not recognized. Your directory must be one of WINDOWSSDK_DIRS for this to work. -# -# get_windowssdk_from_component( ) - Given a library or include dir, -# find the Windows SDK root dir corresponding to it, or NOTFOUND if unrecognized. -# -# get_windowssdk_library_dirs( ) - Find the architecture-appropriate -# library directories corresponding to the SDK directory you pass in (or NOTFOUND if none) -# -# get_windowssdk_library_dirs_multiple( ...) - Find the architecture-appropriate -# library directories corresponding to the SDK directories you pass in, in order, skipping those not found. NOTFOUND if none at all. -# Good for passing WINDOWSSDK_DIRS or WINDOWSSDK_DIRS to if you really just want a file and don't care where from. -# -# get_windowssdk_include_dirs( ) - Find the -# include directories corresponding to the SDK directory you pass in (or NOTFOUND if none) -# -# get_windowssdk_include_dirs_multiple( ...) - Find the -# include directories corresponding to the SDK directories you pass in, in order, skipping those not found. NOTFOUND if none at all. -# Good for passing WINDOWSSDK_DIRS or WINDOWSSDK_DIRS to if you really just want a file and don't care where from. -# -# Requires these CMake modules: -# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -# -# Original Author: -# 2012 Ryan Pavlik -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2012. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(_preferred_sdk_dirs) # pre-output -set(_win_sdk_dirs) # pre-output -set(_win_sdk_versanddirs) # pre-output -set(_win_sdk_buildsanddirs) # pre-output -set(_winsdk_vistaonly) # search parameters -set(_winsdk_kits) # search parameters - - -set(_WINDOWSSDK_ANNOUNCE OFF) -if(NOT WINDOWSSDK_FOUND AND (NOT WindowsSDK_FIND_QUIETLY)) - set(_WINDOWSSDK_ANNOUNCE ON) -endif() -macro(_winsdk_announce) - if(_WINSDK_ANNOUNCE) - message(STATUS ${ARGN}) - endif() -endmacro() - -set(_winsdk_win10vers - 10.0.18362.0 # 19H1 aka Win10 1809 "May 2019 Update" - 10.0.17763.0 # Redstone 5 aka Win10 1809 "October 2018 Update" - 10.0.17133.0 # Redstone 4 aka Win10 1803 "April 1018 Update" - 10.0.16299.0 # Redstone 3 aka Win10 1709 "Fall Creators Update" - 10.0.15063.0 # Redstone 2 aka Win10 1703 "Creators Update" - 10.0.14393.0 # Redstone aka Win10 1607 "Anniversary Update" - 10.0.10586.0 # TH2 aka Win10 1511 - 10.0.10240.0 # Win10 RTM - 10.0.10150.0 # just ucrt - 10.0.10056.0 -) - -if(WindowsSDK_FIND_COMPONENTS MATCHES "tools") - set(_WINDOWSSDK_IGNOREMSVC ON) - _winsdk_announce("Checking for tools from Windows/Platform SDKs...") -else() - set(_WINDOWSSDK_IGNOREMSVC OFF) - _winsdk_announce("Checking for Windows/Platform SDKs...") -endif() - -# Appends to the three main pre-output lists used only if the path exists -# and is not already in the list. -function(_winsdk_conditional_append _vername _build _path) - if(("${_path}" MATCHES "registry") OR (NOT EXISTS "${_path}")) - # Path invalid - do not add - return() - endif() - list(FIND _win_sdk_dirs "${_path}" _win_sdk_idx) - if(_win_sdk_idx GREATER -1) - # Path already in list - do not add - return() - endif() - _winsdk_announce( " - ${_vername}, Build ${_build} @ ${_path}") - # Not yet in the list, so we'll add it - list(APPEND _win_sdk_dirs "${_path}") - set(_win_sdk_dirs "${_win_sdk_dirs}" CACHE INTERNAL "" FORCE) - list(APPEND - _win_sdk_versanddirs - "${_vername}" - "${_path}") - set(_win_sdk_versanddirs "${_win_sdk_versanddirs}" CACHE INTERNAL "" FORCE) - list(APPEND - _win_sdk_buildsanddirs - "${_build}" - "${_path}") - set(_win_sdk_buildsanddirs "${_win_sdk_buildsanddirs}" CACHE INTERNAL "" FORCE) -endfunction() - -# Appends to the "preferred SDK" lists only if the path exists -function(_winsdk_conditional_append_preferred _info _path) - if(("${_path}" MATCHES "registry") OR (NOT EXISTS "${_path}")) - # Path invalid - do not add - return() - endif() - - get_filename_component(_path "${_path}" ABSOLUTE) - - list(FIND _win_sdk_preferred_sdk_dirs "${_path}" _win_sdk_idx) - if(_win_sdk_idx GREATER -1) - # Path already in list - do not add - return() - endif() - _winsdk_announce( " - Found \"preferred\" SDK ${_info} @ ${_path}") - # Not yet in the list, so we'll add it - list(APPEND _win_sdk_preferred_sdk_dirs "${_path}") - set(_win_sdk_preferred_sdk_dirs "${_win_sdk_dirs}" CACHE INTERNAL "" FORCE) - - # Just in case we somehow missed it: - _winsdk_conditional_append("${_info}" "" "${_path}") -endfunction() - -# Given a version like v7.0A, looks for an SDK in the registry under "Microsoft SDKs". -# If the given version might be in both HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows -# and HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots aka "Windows Kits", -# use this macro first, since these registry keys usually have more information. -# -# Pass a "default" build number as an extra argument in case we can't find it. -function(_winsdk_check_microsoft_sdks_registry _winsdkver) - set(SDKKEY "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\${_winsdkver}") - get_filename_component(_sdkdir - "[${SDKKEY};InstallationFolder]" - ABSOLUTE) - - set(_sdkname "Windows SDK ${_winsdkver}") - - # Default build number passed as extra argument - set(_build ${ARGN}) - # See if the registry holds a Microsoft-mutilated, err, designated, product name - # (just using get_filename_component to execute the registry lookup) - get_filename_component(_sdkproductname - "[${SDKKEY};ProductName]" - NAME) - if(NOT "${_sdkproductname}" MATCHES "registry") - # Got a product name - set(_sdkname "${_sdkname} (${_sdkproductname})") - endif() - - # try for a version to augment our name - # (just using get_filename_component to execute the registry lookup) - get_filename_component(_sdkver - "[${SDKKEY};ProductVersion]" - NAME) - if(NOT "${_sdkver}" MATCHES "registry" AND NOT MATCHES) - # Got a version - if(NOT "${_sdkver}" MATCHES "\\.\\.") - # and it's not an invalid one with two dots in it: - # use to override the default build - set(_build ${_sdkver}) - if(NOT "${_sdkname}" MATCHES "${_sdkver}") - # Got a version that's not already in the name, let's use it to improve our name. - set(_sdkname "${_sdkname} (${_sdkver})") - endif() - endif() - endif() - _winsdk_conditional_append("${_sdkname}" "${_build}" "${_sdkdir}") -endfunction() - -# Given a name for identification purposes, the build number, and a key (technically a "value name") -# corresponding to a Windows SDK packaged as a "Windows Kit", look for it -# in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots -# Note that the key or "value name" tends to be something weird like KitsRoot81 - -# no easy way to predict, just have to observe them in the wild. -# Doesn't hurt to also try _winsdk_check_microsoft_sdks_registry for these: -# sometimes you get keys in both parts of the registry (in the wow64 portion especially), -# and the non-"Windows Kits" location is often more descriptive. -function(_winsdk_check_windows_kits_registry _winkit_name _winkit_build _winkit_key) - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;${_winkit_key}]" - ABSOLUTE) - _winsdk_conditional_append("${_winkit_name}" "${_winkit_build}" "${_sdkdir}") -endfunction() - -# Given a name for identification purposes and the build number -# corresponding to a Windows 10 SDK packaged as a "Windows Kit", look for it -# in HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots -# Doesn't hurt to also try _winsdk_check_microsoft_sdks_registry for these: -# sometimes you get keys in both parts of the registry (in the wow64 portion especially), -# and the non-"Windows Kits" location is often more descriptive. -function(_winsdk_check_win10_kits _winkit_build) - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" - ABSOLUTE) - if(("${_sdkdir}" MATCHES "registry") OR (NOT EXISTS "${_sdkdir}")) - return() # not found - endif() - if(EXISTS "${_sdkdir}/Include/${_winkit_build}/um") - _winsdk_conditional_append("Windows Kits 10 (Build ${_winkit_build})" "${_winkit_build}" "${_sdkdir}") - endif() -endfunction() - -# Given a name for indentification purposes, the build number, and the associated package GUID, -# look in the registry under both HKLM and HKCU in \\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\ -# for that guid and the SDK it points to. -function(_winsdk_check_platformsdk_registry _platformsdkname _build _platformsdkguid) - foreach(_winsdk_hive HKEY_LOCAL_MACHINE HKEY_CURRENT_USER) - get_filename_component(_sdkdir - "[${_winsdk_hive}\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]" - ABSOLUTE) - _winsdk_conditional_append("${_platformsdkname} (${_build})" "${_build}" "${_sdkdir}") - endforeach() -endfunction() - -### -# Detect toolchain information: to know whether it's OK to use Vista+ only SDKs -### -set(_winsdk_vistaonly_ok OFF) -if(MSVC AND NOT _WINDOWSSDK_IGNOREMSVC) - # VC 10 and older has broad target support - if(MSVC_VERSION LESS 1700) - # VC 11 by default targets Vista and later only, so we can add a few more SDKs that (might?) only work on vista+ - elseif("${CMAKE_VS_PLATFORM_TOOLSET}" MATCHES "_xp") - # This is the XP-compatible v110+ toolset - elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v100" OR "${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v90") - # This is the VS2010/VS2008 toolset - else() - # OK, we're VC11 or newer and not using a backlevel or XP-compatible toolset. - # These versions have no XP (and possibly Vista pre-SP1) support - set(_winsdk_vistaonly_ok ON) - if(_WINDOWSSDK_ANNOUNCE AND NOT _WINDOWSSDK_VISTAONLY_PESTERED) - set(_WINDOWSSDK_VISTAONLY_PESTERED ON CACHE INTERNAL "" FORCE) - message(STATUS "FindWindowsSDK: Detected Visual Studio 2012 or newer, not using the _xp toolset variant: including SDK versions that drop XP support in search!") - endif() - endif() -endif() -if(_WINDOWSSDK_IGNOREMSVC) - set(_winsdk_vistaonly_ok ON) -endif() - -### -# MSVC version checks - keeps messy conditionals in one place -# (messy because of _WINDOWSSDK_IGNOREMSVC) -### -set(_winsdk_msvc_greater_1200 OFF) -if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION GREATER 1200))) - set(_winsdk_msvc_greater_1200 ON) -endif() -# Newer than VS .NET/VS Toolkit 2003 -set(_winsdk_msvc_greater_1310 OFF) -if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION GREATER 1310))) - set(_winsdk_msvc_greater_1310 ON) -endif() - -# VS2005/2008 -set(_winsdk_msvc_less_1600 OFF) -if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (MSVC_VERSION LESS 1600))) - set(_winsdk_msvc_less_1600 ON) -endif() - -# VS2013+ -set(_winsdk_msvc_not_less_1800 OFF) -if(_WINDOWSSDK_IGNOREMSVC OR (MSVC AND (NOT MSVC_VERSION LESS 1800))) - set(_winsdk_msvc_not_less_1800 ON) -endif() - -### -# START body of find module -### -if(_winsdk_msvc_greater_1310) # Newer than VS .NET/VS Toolkit 2003 - ### - # Look for "preferred" SDKs - ### - - # Environment variable for SDK dir - if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL "")) - _winsdk_conditional_append_preferred("WindowsSDKDir environment variable" "$ENV{WindowsSDKDir}") - endif() - - if(_winsdk_msvc_less_1600) - # Per-user current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - _winsdk_conditional_append_preferred("Per-user current Windows SDK" "${_sdkdir}") - - # System-wide current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - _winsdk_conditional_append_preferred("System-wide current Windows SDK" "${_sdkdir}") - endif() - - ### - # Begin the massive list of SDK searching! - ### - if(_winsdk_vistaonly_ok AND _winsdk_msvc_not_less_1800) - # These require at least Visual Studio 2013 (VC12) - - _winsdk_check_microsoft_sdks_registry(v10.0A) - - # Windows Software Development Kit (SDK) for Windows 10 - # Several different versions living in the same directory - if nothing else we can assume RTM (10240) - _winsdk_check_microsoft_sdks_registry(v10.0 10.0.10240.0) - foreach(_win10build ${_winsdk_win10vers}) - _winsdk_check_win10_kits(${_win10build}) - endforeach() - endif() # vista-only and 2013+ - - # Included in Visual Studio 2013 - # Includes the v120_xp toolset - _winsdk_check_microsoft_sdks_registry(v8.1A 8.1.51636) - - if(_winsdk_vistaonly_ok AND _winsdk_msvc_not_less_1800) - # Windows Software Development Kit (SDK) for Windows 8.1 - # http://msdn.microsoft.com/en-gb/windows/desktop/bg162891 - _winsdk_check_microsoft_sdks_registry(v8.1 8.1.25984.0) - _winsdk_check_windows_kits_registry("Windows Kits 8.1" 8.1.25984.0 KitsRoot81) - endif() # vista-only and 2013+ - - if(_winsdk_vistaonly_ok) - # Included in Visual Studio 2012 - _winsdk_check_microsoft_sdks_registry(v8.0A 8.0.50727) - - # Microsoft Windows SDK for Windows 8 and .NET Framework 4.5 - # This is the first version to also include the DirectX SDK - # http://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx - _winsdk_check_microsoft_sdks_registry(v8.0 6.2.9200.16384) - _winsdk_check_windows_kits_registry("Windows Kits 8.0" 6.2.9200.16384 KitsRoot) - endif() # vista-only - - # Included with VS 2012 Update 1 or later - # Introduces v110_xp toolset - _winsdk_check_microsoft_sdks_registry(v7.1A 7.1.51106) - if(_winsdk_vistaonly_ok) - # Microsoft Windows SDK for Windows 7 and .NET Framework 4 - # http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b - _winsdk_check_microsoft_sdks_registry(v7.1 7.1.7600.0.30514) - endif() # vista-only - - # Included with VS 2010 - _winsdk_check_microsoft_sdks_registry(v7.0A 6.1.7600.16385) - - # Windows SDK for Windows 7 and .NET Framework 3.5 SP1 - # Works with VC9 - # http://www.microsoft.com/en-us/download/details.aspx?id=18950 - _winsdk_check_microsoft_sdks_registry(v7.0 6.1.7600.16385) - - # Two versions call themselves "v6.1": - # Older: - # Windows Vista Update & .NET 3.0 SDK - # http://www.microsoft.com/en-us/download/details.aspx?id=14477 - - # Newer: - # Windows Server 2008 & .NET 3.5 SDK - # may have broken VS9SP1? they recommend v7.0 instead, or a KB... - # http://www.microsoft.com/en-us/download/details.aspx?id=24826 - _winsdk_check_microsoft_sdks_registry(v6.1 6.1.6000.16384.10) - - # Included in VS 2008 - _winsdk_check_microsoft_sdks_registry(v6.0A 6.1.6723.1) - - # Microsoft Windows Software Development Kit for Windows Vista and .NET Framework 3.0 Runtime Components - # http://blogs.msdn.com/b/stanley/archive/2006/11/08/microsoft-windows-software-development-kit-for-windows-vista-and-net-framework-3-0-runtime-components.aspx - _winsdk_check_microsoft_sdks_registry(v6.0 6.0.6000.16384) -endif() - -# Let's not forget the Platform SDKs, which sometimes are useful! -if(_winsdk_msvc_greater_1200) - _winsdk_check_platformsdk_registry("Microsoft Platform SDK for Windows Server 2003 R2" "5.2.3790.2075.51" "D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1") - _winsdk_check_platformsdk_registry("Microsoft Platform SDK for Windows Server 2003 SP1" "5.2.3790.1830.15" "8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3") -endif() -### -# Finally, look for "preferred" SDKs -### -if(_winsdk_msvc_greater_1310) # Newer than VS .NET/VS Toolkit 2003 - - - # Environment variable for SDK dir - if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL "")) - _winsdk_conditional_append_preferred("WindowsSDKDir environment variable" "$ENV{WindowsSDKDir}") - endif() - - if(_winsdk_msvc_less_1600) - # Per-user current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - _winsdk_conditional_append_preferred("Per-user current Windows SDK" "${_sdkdir}") - - # System-wide current Windows SDK for VS2005/2008 - get_filename_component(_sdkdir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" - ABSOLUTE) - _winsdk_conditional_append_preferred("System-wide current Windows SDK" "${_sdkdir}") - endif() -endif() - - -function(windowssdk_name_lookup _dir _outvar) - list(FIND _win_sdk_versanddirs "${_dir}" _diridx) - math(EXPR _idx "${_diridx} - 1") - if(${_idx} GREATER -1) - list(GET _win_sdk_versanddirs ${_idx} _ret) - else() - set(_ret "NOTFOUND") - endif() - set(${_outvar} "${_ret}" PARENT_SCOPE) -endfunction() - -function(windowssdk_build_lookup _dir _outvar) - list(FIND _win_sdk_buildsanddirs "${_dir}" _diridx) - math(EXPR _idx "${_diridx} - 1") - if(${_idx} GREATER -1) - list(GET _win_sdk_buildsanddirs ${_idx} _ret) - else() - set(_ret "NOTFOUND") - endif() - set(${_outvar} "${_ret}" PARENT_SCOPE) -endfunction() - -# If we found something... -if(_win_sdk_dirs) - list(GET _win_sdk_dirs 0 WINDOWSSDK_LATEST_DIR) - windowssdk_name_lookup("${WINDOWSSDK_LATEST_DIR}" - WINDOWSSDK_LATEST_NAME) - set(WINDOWSSDK_DIRS ${_win_sdk_dirs}) - - # Fallback, in case no preference found. - set(WINDOWSSDK_PREFERRED_DIR "${WINDOWSSDK_LATEST_DIR}") - set(WINDOWSSDK_PREFERRED_NAME "${WINDOWSSDK_LATEST_NAME}") - set(WINDOWSSDK_PREFERRED_FIRST_DIRS ${WINDOWSSDK_DIRS}) - set(WINDOWSSDK_FOUND_PREFERENCE OFF) -endif() - -# If we found indications of a user preference... -if(_win_sdk_preferred_sdk_dirs) - list(GET _win_sdk_preferred_sdk_dirs 0 WINDOWSSDK_PREFERRED_DIR) - windowssdk_name_lookup("${WINDOWSSDK_PREFERRED_DIR}" - WINDOWSSDK_PREFERRED_NAME) - set(WINDOWSSDK_PREFERRED_FIRST_DIRS - ${_win_sdk_preferred_sdk_dirs} - ${_win_sdk_dirs}) - list(REMOVE_DUPLICATES WINDOWSSDK_PREFERRED_FIRST_DIRS) - set(WINDOWSSDK_FOUND_PREFERENCE ON) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(WindowsSDK - "No compatible version of the Windows SDK or Platform SDK found." - WINDOWSSDK_DIRS) - -if(WINDOWSSDK_FOUND) - # Internal: Architecture-appropriate library directory names. - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "ARM") - if(CMAKE_SIZEOF_VOID_P MATCHES "8") - # Only supported in Win10 SDK and up. - set(_winsdk_arch8 arm64) # what the WDK for Win8+ calls this architecture - else() - set(_winsdk_archbare /arm) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch arm) # what the architecture used to be called - set(_winsdk_arch8 arm) # what the WDK for Win8+ calls this architecture - endif() - else() - if(CMAKE_SIZEOF_VOID_P MATCHES "8") - set(_winsdk_archbare /x64) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch amd64) # what the architecture used to be called - set(_winsdk_arch8 x64) # what the WDK for Win8+ calls this architecture - else() - set(_winsdk_archbare ) # what the architecture used to be called in oldest SDKs - set(_winsdk_arch i386) # what the architecture used to be called - set(_winsdk_arch8 x86) # what the WDK for Win8+ calls this architecture - endif() - endif() - - function(get_windowssdk_from_component _component _var) - get_filename_component(_component "${_component}" ABSOLUTE) - file(TO_CMAKE_PATH "${_component}" _component) - foreach(_sdkdir ${WINDOWSSDK_DIRS}) - get_filename_component(_sdkdir "${_sdkdir}" ABSOLUTE) - string(LENGTH "${_sdkdir}" _sdklen) - file(RELATIVE_PATH _rel "${_sdkdir}" "${_component}") - # If we don't have any "parent directory" items... - if(NOT "${_rel}" MATCHES "[.][.]") - set(${_var} "${_sdkdir}" PARENT_SCOPE) - return() - endif() - endforeach() - # Fail. - set(${_var} "NOTFOUND" PARENT_SCOPE) - endfunction() - function(get_windowssdk_library_dirs _winsdk_dir _var) - set(_dirs) - set(_suffixes - "lib${_winsdk_archbare}" # SDKs like 7.1A - "lib/${_winsdk_arch}" # just because some SDKs have x86 dir and root dir - "lib/w2k/${_winsdk_arch}" # Win2k min requirement - "lib/wxp/${_winsdk_arch}" # WinXP min requirement - "lib/wnet/${_winsdk_arch}" # Win Server 2003 min requirement - "lib/wlh/${_winsdk_arch}" - "lib/wlh/um/${_winsdk_arch8}" # Win Vista ("Long Horn") min requirement - "lib/win7/${_winsdk_arch}" - "lib/win7/um/${_winsdk_arch8}" # Win 7 min requirement - ) - foreach(_ver - wlh # Win Vista ("Long Horn") min requirement - win7 # Win 7 min requirement - win8 # Win 8 min requirement - winv6.3 # Win 8.1 min requirement - ) - - list(APPEND _suffixes - "lib/${_ver}/${_winsdk_arch}" - "lib/${_ver}/um/${_winsdk_arch8}" - "lib/${_ver}/km/${_winsdk_arch8}" - ) - endforeach() - - # Look for WDF libraries in Win10+ SDK - foreach(_mode umdf kmdf) - file(GLOB _wdfdirs RELATIVE "${_winsdk_dir}" "${_winsdk_dir}/lib/wdf/${_mode}/${_winsdk_arch8}/*") - if(_wdfdirs) - list(APPEND _suffixes ${_wdfdirs}) - endif() - endforeach() - - # Look in each Win10+ SDK version for the components - foreach(_win10ver ${_winsdk_win10vers}) - foreach(_component um km ucrt mmos) - list(APPEND _suffixes "lib/${_win10ver}/${_component}/${_winsdk_arch8}") - endforeach() - endforeach() - - foreach(_suffix ${_suffixes}) - # Check to see if a library actually exists here. - file(GLOB _libs "${_winsdk_dir}/${_suffix}/*.lib") - if(_libs) - list(APPEND _dirs "${_winsdk_dir}/${_suffix}") - endif() - endforeach() - if("${_dirs}" STREQUAL "") - set(_dirs NOTFOUND) - else() - list(REMOVE_DUPLICATES _dirs) - endif() - set(${_var} ${_dirs} PARENT_SCOPE) - endfunction() - function(get_windowssdk_include_dirs _winsdk_dir _var) - set(_dirs) - - set(_subdirs shared um winrt km wdf mmos ucrt) - set(_suffixes Include) - - foreach(_dir ${_subdirs}) - list(APPEND _suffixes "Include/${_dir}") - endforeach() - - foreach(_ver ${_winsdk_win10vers}) - foreach(_dir ${_subdirs}) - list(APPEND _suffixes "Include/${_ver}/${_dir}") - endforeach() - endforeach() - - foreach(_suffix ${_suffixes}) - # Check to see if a header file actually exists here. - file(GLOB _headers "${_winsdk_dir}/${_suffix}/*.h") - if(_headers) - list(APPEND _dirs "${_winsdk_dir}/${_suffix}") - endif() - endforeach() - if("${_dirs}" STREQUAL "") - set(_dirs NOTFOUND) - else() - list(REMOVE_DUPLICATES _dirs) - endif() - set(${_var} ${_dirs} PARENT_SCOPE) - endfunction() - function(get_windowssdk_library_dirs_multiple _var) - set(_dirs) - foreach(_sdkdir ${ARGN}) - get_windowssdk_library_dirs("${_sdkdir}" _current_sdk_libdirs) - if(_current_sdk_libdirs) - list(APPEND _dirs ${_current_sdk_libdirs}) - endif() - endforeach() - if("${_dirs}" STREQUAL "") - set(_dirs NOTFOUND) - else() - list(REMOVE_DUPLICATES _dirs) - endif() - set(${_var} ${_dirs} PARENT_SCOPE) - endfunction() - function(get_windowssdk_include_dirs_multiple _var) - set(_dirs) - foreach(_sdkdir ${ARGN}) - get_windowssdk_include_dirs("${_sdkdir}" _current_sdk_incdirs) - if(_current_sdk_libdirs) - list(APPEND _dirs ${_current_sdk_incdirs}) - endif() - endforeach() - if("${_dirs}" STREQUAL "") - set(_dirs NOTFOUND) - else() - list(REMOVE_DUPLICATES _dirs) - endif() - set(${_var} ${_dirs} PARENT_SCOPE) - endfunction() -endif() \ No newline at end of file diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 87f1422cae..a38fda9ccf 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1880,21 +1880,6 @@ if (WINDOWS) windows-crash-logger ) - # sets the 'working directory' for debugging from visual studio. - if (NOT UNATTENDED) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe - ARGS - --solution - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln - --workingdir - ${VIEWER_BINARY_NAME} - "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." - ) - endif (NOT UNATTENDED) - # sets the 'working directory' for debugging from visual studio. # Condition for version can be moved to requirements once build agents will be updated (see TOOL-3865) if (NOT UNATTENDED) From 9d36022d62c43951fd9ebc054a0c6c08df92f83a Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 25 Jul 2020 18:23:18 +0200 Subject: [PATCH 079/153] Add support for Catznip's fork of autobuild --- autobuild.xml | 2 +- build.sh | 2 +- indra/cmake/BuildPackagesInfo.cmake | 2 +- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- indra/newview/llexperiencelog.cpp | 5 ++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 4400a4a0f8..8078a54526 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3839,7 +3839,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows build_directory - build-vc${AUTOBUILD_VSVER|150}-$AUTOBUILD_ADDRSIZE + build-vc${AUTOBUILD_VSVER}-$AUTOBUILD_ADDRSIZE configurations RelWithDebInfo diff --git a/build.sh b/build.sh index 545c913f92..f480825be7 100755 --- a/build.sh +++ b/build.sh @@ -28,7 +28,7 @@ build_dir_Linux() build_dir_CYGWIN() { - echo build-vc${AUTOBUILD_VSVER:-120}-${AUTOBUILD_ADDRSIZE} + echo build-vc${AUTOBUILD_VSVER}-${AUTOBUILD_ADDRSIZE} } viewer_channel_suffix() diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 8f8b6b2330..4caa98cba4 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -14,7 +14,7 @@ add_custom_command(OUTPUT packages-info.txt DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py ${CMAKE_SOURCE_DIR}/../autobuild.xml COMMAND ${PYTHON_EXECUTABLE} - ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE} + ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE} -DAUTOBUILD_VSVER=$ENV{AUTOBUILD_VSVER} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt ) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 7f84ec146a..022604483f 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -90,7 +90,7 @@ if(WINDOWS) MESSAGE(STATUS "MSVC_VERSION ${MSVC_VERSION}") elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 set(MSVC_VER 120) - elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017 + elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) # Visual Studio 2017 + 2019 set(MSVC_VER 140) else (MSVC80) MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp index ee5d561927..26fde85f93 100644 --- a/indra/newview/llexperiencelog.cpp +++ b/indra/newview/llexperiencelog.cpp @@ -151,7 +151,10 @@ std::string LLExperienceLog::getPermissionString( const LLSD& message, const std } else { - buf.str(); +// [SL:KB] - Patch: Viewer-Build | Checked: Catznip-6.5 + buf.str(""); +// [/SL:KB] +// buf.str(); } } From c750a5ac87e2630ee870e67440c97cdd13467fbc Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 25 Jul 2020 18:33:53 +0200 Subject: [PATCH 080/153] Don't normalize line endings in llimprocessing.cpp as a temporary hack until LL sorts it out -> this is unfortunately far better than normalizing them in viewer/build and propagate a change in that file to every single branch we have --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 575154feaa..f042409a02 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,6 +4,7 @@ *.cpp text diff=cpp *.h text diff=cpp *.py text diff=python +indra/newview/llimprocessing.cpp -text # Documents *.txt text From 8fbf3b431da125681af41df6231df3fbaf30a0db Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 14 Aug 2020 19:34:35 +0200 Subject: [PATCH 081/153] Add ASan as a build option now that Visual Studio supports it --- indra/cmake/00-Common.cmake | 7 +++++++ indra/cmake/LLSharedLibs.cmake | 7 +++++++ indra/cmake/Linking.cmake | 16 ++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 6043b5a603..a6d386ce73 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -32,6 +32,9 @@ set(CMAKE_CXX_FLAGS_DEBUG "$ENV{LL_BUILD_DEBUG}") # Portable compilation flags. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") +# Configure asan +set(ASAN OFF CACHE BOOL "Enable use of asan in builds") + # Configure crash reporting set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds") @@ -63,6 +66,10 @@ if (WINDOWS) # http://www.cmake.org/pipermail/cmake/2009-September/032143.html string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + if(ASAN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") + endif(ASAN) + # Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit # compiler on our TeamCity build hosts has started running out of virtual # memory for the precompiled header file. diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake index f69b45cd92..0773e7587a 100644 --- a/indra/cmake/LLSharedLibs.cmake +++ b/indra/cmake/LLSharedLibs.cmake @@ -18,6 +18,13 @@ macro(ll_deploy_sharedlibs_command target_exe) if(NOT DARWIN) if(WINDOWS) SET_TEST_PATH(SEARCH_DIRS) + if(ASAN) + if(ADDRESS_SIZE EQUAL 32) + LIST(APPEND SEARCH_DIRS "$ENV{VCToolsInstallDir}bin\\Hostx64\\x86") + else(ADDRESS_SIZE EQUAL 32) + LIST(APPEND SEARCH_DIRS "$ENV{VCToolsInstallDir}bin\\Hostx64\\x64") + endif(ADDRESS_SIZE EQUAL 32) + endif(ASAN) LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32") elseif(LINUX) SET_TEST_PATH(SEARCH_DIRS) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 3cb235a9d5..18e44d72e5 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -69,6 +69,22 @@ if (WINDOWS) ole32 dbghelp ) + + if(ASAN) + if(ADDRESS_SIZE EQUAL 32) + set(WINDOWS_LIBRARIES + ${WINDOWS_LIBRARIES} + clang_rt.asan_dynamic_runtime_thunk-i386 + clang_rt.asan_dynamic-i386 + ) + else(ADDRESS_SIZE EQUAL 32) + set(WINDOWS_LIBRARIES + ${WINDOWS_LIBRARIES} + clang_rt.asan_dynamic_runtime_thunk-x86_64 + clang_rt.asan_dynamic-x86_64 + ) + endif(ADDRESS_SIZE EQUAL 32) + endif(ASAN) else (WINDOWS) set(WINDOWS_LIBRARIES "") endif (WINDOWS) From dccce87fdd0be1706ad87cb5d31d0eef8d372822 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 14 Aug 2020 20:58:35 +0200 Subject: [PATCH 082/153] Remove the remaining "pdb was not found" warnings --- indra/media_plugins/example/CMakeLists.txt | 2 +- indra/media_plugins/libvlc/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt index eb067a7f6e..528d8c80e3 100644 --- a/indra/media_plugins/example/CMakeLists.txt +++ b/indra/media_plugins/example/CMakeLists.txt @@ -69,7 +69,7 @@ if (WINDOWS) set_target_properties( media_plugin_example PROPERTIES - LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT" + LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT /IGNORE:4099" ) endif (WINDOWS) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 97392bbe08..624bfac119 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -78,7 +78,7 @@ if (WINDOWS) set_target_properties( media_plugin_libvlc PROPERTIES - LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT" + LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099" ) endif (WINDOWS) From 2c3f18bf371a0ee1decb4a6678da832eef28caef Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 14 Aug 2020 20:59:00 +0200 Subject: [PATCH 083/153] Clean up the copy_w_viewer_manifest warnings --- indra/newview/CMakeLists.txt | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a38fda9ccf..0d9573b89c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1784,40 +1784,44 @@ if (WINDOWS) # The following commented dependencies are determined at variably at build time. Can't do this here. ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll + #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll ${SHARED_LIB_STAGING_DIR}/Release/glod.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll - ${SHARED_LIB_STAGING_DIR}/Debug/glod.dll - ${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll + #${SHARED_LIB_STAGING_DIR}/Debug/glod.dll + #${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll + #${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll + #${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll + ${SHARED_LIB_STAGING_DIR}/Release/nghttp2.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/nghttp2.dll + ${SHARED_LIB_STAGING_DIR}/Release/msvcp140.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp140.dll ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll - ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll + #${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt + #${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll + ${LIBS_PREBUILT_DIR}/bin/release/SLVoice.exe + #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll + #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll + ${LIBS_PREBUILT_DIR}/ca-bundle.crt ${GOOGLE_PERF_TOOLS_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt - ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt - ${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt + #${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt + #${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll - ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll - ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll + #${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll + #${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll ${viewer_APPSETTINGS_FILES} SLPlugin media_plugin_cef media_plugin_libvlc media_plugin_example - winmm_shim + #winmm_shim windows-crash-logger ) @@ -1837,7 +1841,7 @@ if (WINDOWS) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll - ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll + #${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll ) endif (FMODSTUDIO) From 80fe2157fe43e46f16b33fc75ab8ef7de428d275 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 15 Aug 2020 12:36:27 +0300 Subject: [PATCH 084/153] SL-13783 Workaround for enqueueCoprocedure() crash with asset storage --- indra/llmessage/llcoproceduremanager.cpp | 6 ++++++ indra/llmessage/llcoproceduremanager.h | 1 + 2 files changed, 7 insertions(+) diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 74cdff2b00..e1ca388dd7 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -137,6 +137,12 @@ LLCoprocedureManager::~LLCoprocedureManager() } +void LLCoprocedureManager::initSingleton() +{ + // workaround until we get mutex into initializePool + initializePool("VAssetStorage"); +} + LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName) { // Attempt to look up a pool size in the configuration. If found use that diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 7d0e83180c..f323b16878 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -39,6 +39,7 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > { LLSINGLETON(LLCoprocedureManager); virtual ~LLCoprocedureManager(); + /*virtual*/ void initSingleton(); public: typedef boost::function SettingQuery_t; From 5ff63f0d7b2c50b7a88f9b40ef0224c8f15336c3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 17 Aug 2020 21:46:08 +0300 Subject: [PATCH 085/153] SL-13789 Crash 'Enqueue failed' due to viewer requesting over 4K landmarks --- indra/newview/lllandmarklist.cpp | 31 +++++++++++++++++++++++++++++++ indra/newview/lllandmarklist.h | 7 ++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index c58540914e..1fc70cd6d6 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -39,6 +39,11 @@ // Globals LLLandmarkList gLandmarkList; +// number is mostly arbitrary, but it should be below DEFAULT_QUEUE_SIZE pool size, +// which is 4096, to not overfill the pool if user has more than 4K of landmarks, +// and low number helps with not flooding server with requests +const S32 MAX_SIMULTANEOUS_REQUESTS = 512; + //////////////////////////////////////////////////////////////////////////// // LLLandmarkList @@ -69,6 +74,11 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t { return NULL; } + if ( mWaitList.find(asset_uuid) != mWaitList.end() ) + { + // Landmark is sheduled for download, but not requested yet + return NULL; + } landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid); if (iter != mRequestedList.end()) @@ -86,6 +96,13 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t mLoadedCallbackMap.insert(vt); } + if (mRequestedList.size() > MAX_SIMULTANEOUS_REQUESTS) + { + // Postpone download till queu is emptier + mWaitList.insert(asset_uuid); + return NULL; + } + gAssetStorage->getAssetData(asset_uuid, LLAssetType::AT_LANDMARK, LLLandmarkList::processGetAssetReply, @@ -155,8 +172,22 @@ void LLLandmarkList::processGetAssetReply( } gLandmarkList.mBadList.insert(uuid); + gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests + // todo: this should clean mLoadedCallbackMap! } + if (!gLandmarkList.mWaitList.empty()) + { + // start new download from wait list + landmark_uuid_list_t::iterator iter = gLandmarkList.mWaitList.begin(); + LLUUID asset_uuid = *iter; + gLandmarkList.mWaitList.erase(iter); + gAssetStorage->getAssetData(asset_uuid, + LLAssetType::AT_LANDMARK, + LLLandmarkList::processGetAssetReply, + NULL); + gLandmarkList.mRequestedList[asset_uuid] = gFrameTimeSeconds; + } } BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid) diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index 3356f866ce..2e7bd25610 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -70,9 +70,10 @@ protected: typedef std::map landmark_list_t; landmark_list_t mList; - typedef std::set landmark_bad_list_t; - landmark_bad_list_t mBadList; - + typedef std::set landmark_uuid_list_t; + landmark_uuid_list_t mBadList; + landmark_uuid_list_t mWaitList; + typedef std::map landmark_requested_list_t; landmark_requested_list_t mRequestedList; From 58ba75f6dd4c7c5c93ea9f14cef7f2194aa00e08 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 18 Aug 2020 16:00:25 +0300 Subject: [PATCH 086/153] SL-13783 Workaround for enqueueCoprocedure() crash #2 --- indra/llmessage/llcoproceduremanager.cpp | 11 +++++------ indra/llmessage/llcoproceduremanager.h | 1 - indra/newview/llviewerassetstorage.cpp | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 0684f47df2..3f55bda1e3 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -140,12 +140,6 @@ LLCoprocedureManager::~LLCoprocedureManager() close(); } -void LLCoprocedureManager::initSingleton() -{ - // workaround until we get mutex into initializePool - initializePool("VAssetStorage"); -} - LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName) { // Attempt to look up a pool size in the configuration. If found use that @@ -197,8 +191,13 @@ LLUUID LLCoprocedureManager::enqueueCoprocedure(const std::string &pool, const s void LLCoprocedureManager::setPropertyMethods(SettingQuery_t queryfn, SettingUpdate_t updatefn) { + // functions to discover and store the pool sizes mPropertyQueryFn = queryfn; mPropertyDefineFn = updatefn; + + // workaround until we get mutex into initializePool + initializePool("VAssetStorage"); + initializePool("Upload"); } //------------------------------------------------------------------------- diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 8540ced8cc..70204ba02b 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -40,7 +40,6 @@ class LLCoprocedureManager : public LLSingleton < LLCoprocedureManager > { LLSINGLETON(LLCoprocedureManager); virtual ~LLCoprocedureManager(); - /*virtual*/ void initSingleton(); public: typedef boost::function SettingQuery_t; diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index cacdee7e83..54f80a2995 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -49,6 +49,7 @@ /// LLViewerAssetRequest ///---------------------------------------------------------------------------- + // There is also PoolSizeVAssetStorage value in setting that should mirror this name static const std::string VIEWER_ASSET_STORAGE_CORO_POOL = "VAssetStorage"; /** From 8ac53f8a76f52352643a1515fc94aaf4c8e02e2e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 18 Aug 2020 18:25:34 +0200 Subject: [PATCH 087/153] Revert "Attempt to fix the VAAssetStorage pool creation issue" because of LL's upcoming ewwwww-hackme-fix This reverts commit e7f50639447b19cb1de8255073e84bbe5a72ef5e. --- indra/llmessage/llcoproceduremanager.cpp | 11 ----------- indra/llmessage/llcoproceduremanager.h | 2 -- indra/newview/llviewerassetstorage.cpp | 4 ---- 3 files changed, 17 deletions(-) diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 652ac321dc..c52a02fdc9 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -272,17 +272,6 @@ void LLCoprocedureManager::close(const std::string &pool) } } -// Explicitly create the VAAssetStorage pool -void LLCoprocedureManager::createPool(const std::string& poolName) -{ - poolMap_t::iterator it = mPoolMap.find(poolName); - if (it == mPoolMap.end()) - { - initializePool(poolName); - } -} -// Explicitly create the VAAssetStorage pool - //========================================================================= LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size): mPoolName(poolName), diff --git a/indra/llmessage/llcoproceduremanager.h b/indra/llmessage/llcoproceduremanager.h index 9a9cbef6d5..70204ba02b 100644 --- a/indra/llmessage/llcoproceduremanager.h +++ b/indra/llmessage/llcoproceduremanager.h @@ -79,8 +79,6 @@ public: void close(); void close(const std::string &pool); - - void createPool(const std::string& poolName); // Explicitly create the VAAssetStorage pool private: diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 047d7cc3f4..50f99284a8 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -116,8 +116,6 @@ LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager * mCountSucceeded(0), mTotalBytesFetched(0) { - // Explicitly create the VAAssetStorage pool - LLCoprocedureManager::instance().createPool(VIEWER_ASSET_STORAGE_CORO_POOL); } @@ -131,8 +129,6 @@ LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager * mCountSucceeded(0), mTotalBytesFetched(0) { - // Explicitly create the VAAssetStorage pool - LLCoprocedureManager::instance().createPool(VIEWER_ASSET_STORAGE_CORO_POOL); } LLViewerAssetStorage::~LLViewerAssetStorage() From e19e36d7db0822397b7022306a61147f8624fe05 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 19 Aug 2020 13:26:05 +0200 Subject: [PATCH 088/153] Linux; Update ndPhysicsStub --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 0a739aa4be..fff4811354 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -60,9 +60,9 @@ archive hash - 99fe10fdec03a22d680de72bc8b5f85a + c266a8d6124fc11e41a82c288f2bf8e4 url - http://3p.firestormviewer.org/ndPhysicsStub-1.181041840-linux64-181041840.tar.bz2 + http://3p.firestormviewer.org/ndPhysicsStub-1.202321033-linux64-202321033.tar.bz2 name linux64 From 2c4eec2bf28cfcf9010b9923fceff1ca4bc30a31 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 19 Aug 2020 17:29:23 +0200 Subject: [PATCH 089/153] FIRE-30030 French translation update, by Laurent Bechir --- .../default/xui/fr/floater_phototools.xml | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/floater_phototools.xml b/indra/newview/skins/default/xui/fr/floater_phototools.xml index 460b5ab734..fde691f09f 100644 --- a/indra/newview/skins/default/xui/fr/floater_phototools.xml +++ b/indra/newview/skins/default/xui/fr/floater_phototools.xml @@ -99,7 +99,7 @@ - + @@ -115,24 +115,24 @@ - Rés. Omb. + Résolution - - - - - + + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters]. - Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders cannot be used for Favorites. Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search]. Drag a landmark here to add it to your favorites. No items found. Check the spelling of your search string and try again. From 4eefce9767784742cd394ddf948d345cfbced8c8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 9 Sep 2020 18:05:11 +0300 Subject: [PATCH 122/153] SL-13921 Only one of extended key usages is needed LN (EKU_TLS) is more likely to be present thus should be checked first --- indra/newview/llsechandler_basic.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 656a2cf8cf..737ef30ada 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -924,12 +924,13 @@ void _validateCert(int validation_policy, LLTHROW(LLCertKeyUsageValidationException(current_cert_info)); } // only validate EKU if the cert has it - if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() && - ( (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], + if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) + && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() + && (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], + LLSD((std::string)CERT_EKU_TLS_SERVER_AUTH))) + && (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], LLSD((std::string)CERT_EKU_SERVER_AUTH))) - || (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE], - LLSD((std::string)CERT_EKU_TLS_SERVER_AUTH))) - )) + ) { LLTHROW(LLCertKeyUsageValidationException(current_cert_info)); } From 9a4dc2530d118a2f8127b51946346cab05d88cef Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 9 Sep 2020 19:39:10 +0200 Subject: [PATCH 123/153] Undo remaining favorites inventory folder changes for the time being until it will come back in a later LL viewer release --- .../skins/ansastorm/xui/de/panel_main_inventory.xml | 1 - .../skins/ansastorm/xui/en/panel_main_inventory.xml | 13 ------------- .../newview/skins/default/xui/de/menu_inventory.xml | 1 - .../skins/default/xui/de/panel_main_inventory.xml | 1 - indra/newview/skins/default/xui/de/strings.xml | 3 --- .../skins/starlight/xui/en/panel_main_inventory.xml | 13 ------------- .../starlightcui/xui/en/panel_main_inventory.xml | 13 ------------- .../skins/vintage/xui/de/panel_main_inventory.xml | 1 - .../skins/vintage/xui/en/panel_main_inventory.xml | 13 ------------- 9 files changed, 59 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml index cc77bcfe10..cda2003bd7 100644 --- a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml @@ -100,7 +100,6 @@ - diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 0ff1daed39..0e67c9e937 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -604,19 +604,6 @@ name="Worn Items" show_item_link_overlays="true" width="290" /> - - diff --git a/indra/newview/skins/default/xui/de/panel_main_inventory.xml b/indra/newview/skins/default/xui/de/panel_main_inventory.xml index ca4249da43..d8990fe940 100644 --- a/indra/newview/skins/default/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/de/panel_main_inventory.xml @@ -35,7 +35,6 @@ - diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index fbe7c58723..5483e9833d 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1700,9 +1700,6 @@ http://www.firestormviewer.org/support für Hilfe zum Lösen des Problems. Sie haben nicht das Richtige gefunden? [secondlife:///app/inventory/filters Filter] anzeigen. - - Wählen Sie „Als Favoriten-Ordner verwenden“ für einen Ordner Ihrer Wahl. Sie können jederzeit einen anderen Ordner auswählen. System-Ordner können nicht als Favorit ausgewählt werden. - Sie haben nicht das Richtige gefunden? Versuchen Sie es mit der [secondlife:///app/search/places/[SEARCH_TERM] Suche]. diff --git a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml index 38ba958898..3e9e644e80 100644 --- a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml @@ -133,19 +133,6 @@ name="Worn Items" show_item_link_overlays="true" width="290" /> - - - diff --git a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml index b0f1ed8c5e..87070ce13b 100644 --- a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml @@ -574,19 +574,6 @@ layout="topleft" name="Worn Items" show_item_link_overlays="true" /> - Date: Wed, 9 Sep 2020 19:44:40 +0200 Subject: [PATCH 124/153] Update German translation --- indra/newview/skins/default/xui/de/notifications.xml | 5 +++++ indra/newview/skins/default/xui/de/strings.xml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index d5dc6f291c..00f570ac40 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1520,6 +1520,11 @@ Sie können sich später noch umentscheiden. Konnte nicht zu [SLURL] teleportieren, da dieser Standort sich auf einem anderen Grid ([GRID]) befindet. Sie befinden sich im Moment auf dem Grid ([CURRENT_GRID]). Bitte schließen Sie Ihren Viewer und versuchen Sie es erneut. + + Keine Verbindung zum Server möglich. +[REASON] + + Eine Verbindung zum Server konnte nicht hergestellt werden. [REASON] diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 5483e9833d..56844b8977 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -195,9 +195,15 @@ Voice-Serverversion: [VOICE_VERSION] In der Zertifikatskette des Servers befanden sich zu viele Zertifikate. Bitte kontaktieren Sie Ihren Grid-Administrator. + + Das Zertifikat konnte nicht geladen werden. Bitte kontaktieren Sie Ihren Grid-Administrator. + Die Zertifikatsunterschrift des Gridservers konnte nicht bestätigt werden. Bitte kontaktieren Sie Ihren Grid-Administrator. + + Fehler beim Allokieren von Speicher für OpenSSL zum Laden des Zertifikats. + Netzwerkfehler: Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Netzwerkverbindung. From 81553d1b8cacde537ceff10c8f24806a7f94ad36 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 9 Sep 2020 22:09:39 +0300 Subject: [PATCH 125/153] SL-13919 SSL verification should take mVerifyPeer flag into account --- indra/llcorehttp/_httpoprequest.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 6978b8d08b..408adbde2b 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -1007,11 +1007,20 @@ CURLcode HttpOpRequest::curlSslCtxCallback(CURL *curl, void *sslctx, void *userd { HttpOpRequest::ptr_t op(HttpOpRequest::fromHandle(userdata)); - if (op->mCallbackSSLVerify) - { - SSL_CTX * ctx = (SSL_CTX *)sslctx; - // verification for ssl certs - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + if (op->mCallbackSSLVerify) + { + SSL_CTX * ctx = (SSL_CTX *)sslctx; + if (op->mReqOptions && op->mReqOptions->getSSLVerifyPeer()) + { + // verification for ssl certs + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + } + else + { + // disable any default verification for server certs + // Ex: setting urls (assume non-SL) for parcel media in LLFloaterURLEntry + SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); + } // set the verification callback. SSL_CTX_set_cert_verify_callback(ctx, sslCertVerifyCallback, userdata); // the calls are void From 8594be3b9a6518ae25b99f920358a61ed4bae1a1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 11 Sep 2020 16:31:15 +0300 Subject: [PATCH 126/153] SL-13927 Turn SSL verification On for all SL services in viewer --- indra/llcorehttp/httpoptions.cpp | 11 ++++++++++- indra/llcorehttp/httpoptions.h | 11 ++++++++++- indra/llcrashlogger/llcrashlogger.cpp | 1 + indra/newview/llappcorehttp.cpp | 24 ++++++++++++++++++++++++ indra/newview/llappcorehttp.h | 1 + indra/newview/llfloaterabout.cpp | 1 + indra/newview/llfloatergridstatus.cpp | 1 + indra/newview/lltranslate.cpp | 2 ++ 8 files changed, 50 insertions(+), 2 deletions(-) diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index df5aa52fa9..c6365e5091 100644 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -32,6 +32,7 @@ namespace LLCore { + bool HttpOptions::sDefaultVerifyPeer = false; HttpOptions::HttpOptions() : mWantHeaders(false), @@ -43,7 +44,7 @@ HttpOptions::HttpOptions() : mMaxRetryBackoff(HTTP_RETRY_BACKOFF_MAX_DEFAULT), mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT), mFollowRedirects(true), - mVerifyPeer(false), + mVerifyPeer(sDefaultVerifyPeer), mVerifyHost(false), mDNSCacheTimeout(-1L), mNoBody(false) @@ -122,7 +123,15 @@ void HttpOptions::setHeadersOnly(bool nobody) { mNoBody = nobody; if (mNoBody) + { setWantHeaders(true); + setSSLVerifyPeer(false); + } +} + +void HttpOptions::setDefaultSSLVerifyPeer(bool verify) +{ + sDefaultVerifyPeer = verify; } } // end namespace LLCore diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h index 8a6de61b04..41f71896b0 100644 --- a/indra/llcorehttp/httpoptions.h +++ b/indra/llcorehttp/httpoptions.h @@ -143,7 +143,7 @@ public: /// Instructs the LLCore::HTTPRequest to verify that the exchanged security /// certificate is authentic. - /// Default: false + /// Default: sDefaultVerifyPeer void setSSLVerifyPeer(bool verify); bool getSSLVerifyPeer() const { @@ -177,6 +177,13 @@ public: { return mNoBody; } + + /// Sets default behavior for verifying that the name in the + /// security certificate matches the name of the host contacted. + /// Defaults false if not set, but should be set according to + /// viewer's initialization options and command argunments, see + /// NoVerifySSLCert + static void setDefaultSSLVerifyPeer(bool verify); protected: bool mWantHeaders; @@ -192,6 +199,8 @@ protected: bool mVerifyHost; int mDNSCacheTimeout; bool mNoBody; + + static bool sDefaultVerifyPeer; }; // end class HttpOptions diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 62fcdaf545..e02f3a6306 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -411,6 +411,7 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); httpOpts->setTimeout(timeout); + httpOpts->setSSLVerifyPeer(false); for(int i = 0; i < retries; ++i) { diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index 134a34137b..3da87e657c 100644 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -116,6 +116,7 @@ static const struct }; static void setting_changed(); +static void ssl_verification_changed(); LLAppCoreHttp::HttpClass::HttpClass() @@ -195,6 +196,23 @@ void LLAppCoreHttp::init() LL_WARNS("Init") << "Failed to set SSL Verification. Reason: " << status.toString() << LL_ENDL; } + // Set up Default SSL Verification option. + const std::string no_verify_ssl("NoVerifySSLCert"); + if (gSavedSettings.controlExists(no_verify_ssl)) + { + LLPointer cntrl_ptr = gSavedSettings.getControl(no_verify_ssl); + if (cntrl_ptr.isNull()) + { + LL_WARNS("Init") << "Unable to set signal on global setting '" << no_verify_ssl + << "'" << LL_ENDL; + } + else + { + mSSLNoVerifySignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&ssl_verification_changed)); + LLCore::HttpOptions::setDefaultSSLVerifyPeer(!cntrl_ptr->getValue().asBoolean()); + } + } + // Tracing levels for library & libcurl (note that 2 & 3 are beyond spammy): // 0 - None // 1 - Basic start, stop simple transitions @@ -296,6 +314,11 @@ void setting_changed() LLAppViewer::instance()->getAppCoreHttp().refreshSettings(false); } +void ssl_verification_changed() +{ + LLCore::HttpOptions::setDefaultSSLVerifyPeer(!gSavedSettings.getBOOL("NoVerifySSLCert")); +} + namespace { // The NoOpDeletor is used when wrapping LLAppCoreHttp in a smart pointer below for @@ -355,6 +378,7 @@ void LLAppCoreHttp::cleanup() { mHttpClasses[i].mSettingsSignal.disconnect(); } + mSSLNoVerifySignal.disconnect(); mPipelinedSignal.disconnect(); delete mRequest; diff --git a/indra/newview/llappcorehttp.h b/indra/newview/llappcorehttp.h index 95c138d598..751c498ab0 100644 --- a/indra/newview/llappcorehttp.h +++ b/indra/newview/llappcorehttp.h @@ -256,6 +256,7 @@ private: HttpClass mHttpClasses[AP_COUNT]; bool mPipelined; // Global setting boost::signals2::connection mPipelinedSignal; // Signal for 'HttpPipelining' setting + boost::signals2::connection mSSLNoVerifySignal; // Signal for 'NoVerifySSLCert' setting static LLCore::HttpStatus sslVerify(const std::string &uri, const LLCore::HttpHandler::ptr_t &handler, void *appdata); }; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 171858e472..1fbd198019 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -236,6 +236,7 @@ void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); + httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL verification fails LLSD result = httpAdapter->getAndSuspend(httpRequest, cap_url, httpOpts); diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index faa7e9f3db..9745e17bbb 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -95,6 +95,7 @@ void LLFloaterGridStatus::getGridStatusRSSCoro() LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); std::string url = gSavedSettings.getString("GridStatusRSS"); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index fa3b44f702..553a3cd086 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -144,6 +144,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std:: httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); httpOpts->setFollowRedirects(true); + httpOpts->setSSLVerifyPeer(false); std::string url = this->getKeyVerificationURL(key); if (url.empty()) @@ -185,6 +186,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN); httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); + httpOpts->setSSLVerifyPeer(false); std::string url = this->getTranslateURL(fromTo.first, fromTo.second, msg); if (url.empty()) From 3ab3d957de295fb755440c534aa5aa4d65852fc8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 1 Sep 2020 21:24:06 +0300 Subject: [PATCH 127/153] SL-13830 Don't crash if quiting during startup --- indra/newview/llvoicevivox.cpp | 44 +++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 7b6d9613ac..746ed69417 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -919,10 +919,12 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() //--------------------------------------------------------------------- llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); + bool quiting = LLAppViewer::isExiting(); + LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL; LLVoiceVivoxStats::getInstance()->reset(); - while (!mConnected) + while (!mConnected && !quiting) { LLVoiceVivoxStats::getInstance()->connectionAttemptStart(); LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL; @@ -937,10 +939,16 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() if (!mConnected) { llcoro::suspendUntilTimeout(DAEMON_CONNECT_THROTTLE_SECONDS); + quiting = LLAppViewer::isExiting(); } } //--------------------------------------------------------------------- + if (quiting && !mConnected) + { + return false; + } + llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); while (!mPump) @@ -977,11 +985,13 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { LL_INFOS("Voice") << "Provisioning voice account." << LL_ENDL; - while (!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) + bool quiting = LLApp::isExiting(); + while ((!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) && !quiting) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; // *TODO* Pump a message for wake up. llcoro::suspend(); + quiting = LLApp::isExiting(); } std::string url = gAgent.getRegionCapability("ProvisionVoiceAccountRequest"); @@ -1001,6 +1011,7 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { LLVoiceVivoxStats::getInstance()->provisionAttemptStart(); result = httpAdapter->postAndSuspend(httpRequest, url, LLSD(), httpOpts); + quiting = LLApp::isExiting(); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1010,6 +1021,7 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() F32 timeout = pow(PROVISION_RETRY_TIMEOUT, static_cast(retryCount)); LL_WARNS("Voice") << "Provision CAP 404. Retrying in " << timeout << " seconds." << LL_ENDL; llcoro::suspendUntilTimeout(timeout); + quiting = LLApp::isExiting(); } else if (!status) { @@ -1021,10 +1033,15 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { provisioned = true; } - } while (!provisioned && retryCount <= PROVISION_RETRY_MAX); + } while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !quiting); + + if (quiting && !provisioned) + { + return false; + } LLVoiceVivoxStats::getInstance()->provisionAttemptEnd(provisioned); - if (! provisioned ) + if (!provisioned) { LL_WARNS("Voice") << "Could not access voice provision cap after " << retryCount << " attempts." << LL_ENDL; return false; @@ -1069,6 +1086,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection() LLSD result; bool connected(false); bool giving_up(false); + bool quiting = LLApp::isExiting(); int retries = 0; LL_INFOS("Voice") << "Requesting connection to voice service" << LL_ENDL; @@ -1077,6 +1095,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection() do { result = llcoro::suspendUntilEventOn(mVivoxPump); + quiting = LLApp::isExiting(); LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("connector")) @@ -1085,12 +1104,13 @@ bool LLVivoxVoiceClient::establishVoiceConnection() connected = LLSD::Boolean(result["connector"]); if (!connected) { - if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX) + if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX && !quiting) { F32 timeout = LLSD::Real(result["retry"]); timeout *= retries; LL_INFOS("Voice") << "Retry connection to voice service in " << timeout << " seconds" << LL_ENDL; llcoro::suspendUntilTimeout(timeout); + quiting = LLApp::isExiting(); if (mVoiceEnabled) // user may have switched it off { @@ -1113,7 +1133,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection() LL_DEBUGS("Voice") << (connected ? "" : "not ") << "connected, " << (giving_up ? "" : "not ") << "giving up" << LL_ENDL; - } while (!connected && !giving_up); + } while (!connected && !giving_up && !quiting); if (giving_up) { @@ -1183,6 +1203,7 @@ bool LLVivoxVoiceClient::loginToVivox() bool response_ok(false); bool account_login(false); bool send_login(true); + bool quiting = LLApp::isExiting(); do { @@ -1194,13 +1215,14 @@ bool LLVivoxVoiceClient::loginToVivox() } LLSD result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, LOGIN_ATTEMPT_TIMEOUT, timeoutResult); + quiting = LLApp::isExiting(); LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL; if (result.has("login")) { std::string loginresp = result["login"]; - if ((loginresp == "retry") || (loginresp == "timeout")) + if (((loginresp == "retry") || (loginresp == "timeout")) && !quiting) { LL_WARNS("Voice") << "login failed with status '" << loginresp << "' " << " count " << loginRetryCount << "/" << LOGIN_RETRY_MAX @@ -1228,6 +1250,7 @@ bool LLVivoxVoiceClient::loginToVivox() LL_WARNS("Voice") << "login " << loginresp << " will retry login in " << timeout << " seconds." << LL_ENDL; llcoro::suspendUntilTimeout(timeout); + quiting = LLApp::isExiting(); } else if (loginresp == "failed") { @@ -1242,9 +1265,14 @@ bool LLVivoxVoiceClient::loginToVivox() { account_login = true; } + else if (quiting) + { + mIsLoggingIn = false; + return false; + } } - } while (!response_ok || !account_login); + } while ((!response_ok || !account_login) && !quiting); mRelogRequested = false; mIsLoggedIn = true; From 6936736d1766a8a683b7058dbfdaee3c07e30cf7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 11 Sep 2020 20:59:43 +0300 Subject: [PATCH 128/153] Revert SL-13927 commit 8c8eac256bdb51fdf9e6e297280b2017d26c3588. Got into D503 by accident --- indra/llcorehttp/httpoptions.cpp | 11 +---------- indra/llcorehttp/httpoptions.h | 11 +---------- indra/llcrashlogger/llcrashlogger.cpp | 1 - indra/newview/llappcorehttp.cpp | 24 ------------------------ indra/newview/llappcorehttp.h | 1 - indra/newview/llfloaterabout.cpp | 1 - indra/newview/llfloatergridstatus.cpp | 1 - indra/newview/lltranslate.cpp | 2 -- 8 files changed, 2 insertions(+), 50 deletions(-) diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index c6365e5091..df5aa52fa9 100644 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -32,7 +32,6 @@ namespace LLCore { - bool HttpOptions::sDefaultVerifyPeer = false; HttpOptions::HttpOptions() : mWantHeaders(false), @@ -44,7 +43,7 @@ HttpOptions::HttpOptions() : mMaxRetryBackoff(HTTP_RETRY_BACKOFF_MAX_DEFAULT), mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT), mFollowRedirects(true), - mVerifyPeer(sDefaultVerifyPeer), + mVerifyPeer(false), mVerifyHost(false), mDNSCacheTimeout(-1L), mNoBody(false) @@ -123,15 +122,7 @@ void HttpOptions::setHeadersOnly(bool nobody) { mNoBody = nobody; if (mNoBody) - { setWantHeaders(true); - setSSLVerifyPeer(false); - } -} - -void HttpOptions::setDefaultSSLVerifyPeer(bool verify) -{ - sDefaultVerifyPeer = verify; } } // end namespace LLCore diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h index 41f71896b0..8a6de61b04 100644 --- a/indra/llcorehttp/httpoptions.h +++ b/indra/llcorehttp/httpoptions.h @@ -143,7 +143,7 @@ public: /// Instructs the LLCore::HTTPRequest to verify that the exchanged security /// certificate is authentic. - /// Default: sDefaultVerifyPeer + /// Default: false void setSSLVerifyPeer(bool verify); bool getSSLVerifyPeer() const { @@ -177,13 +177,6 @@ public: { return mNoBody; } - - /// Sets default behavior for verifying that the name in the - /// security certificate matches the name of the host contacted. - /// Defaults false if not set, but should be set according to - /// viewer's initialization options and command argunments, see - /// NoVerifySSLCert - static void setDefaultSSLVerifyPeer(bool verify); protected: bool mWantHeaders; @@ -199,8 +192,6 @@ protected: bool mVerifyHost; int mDNSCacheTimeout; bool mNoBody; - - static bool sDefaultVerifyPeer; }; // end class HttpOptions diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index e02f3a6306..62fcdaf545 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -411,7 +411,6 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); httpOpts->setTimeout(timeout); - httpOpts->setSSLVerifyPeer(false); for(int i = 0; i < retries; ++i) { diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index 3da87e657c..134a34137b 100644 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -116,7 +116,6 @@ static const struct }; static void setting_changed(); -static void ssl_verification_changed(); LLAppCoreHttp::HttpClass::HttpClass() @@ -196,23 +195,6 @@ void LLAppCoreHttp::init() LL_WARNS("Init") << "Failed to set SSL Verification. Reason: " << status.toString() << LL_ENDL; } - // Set up Default SSL Verification option. - const std::string no_verify_ssl("NoVerifySSLCert"); - if (gSavedSettings.controlExists(no_verify_ssl)) - { - LLPointer cntrl_ptr = gSavedSettings.getControl(no_verify_ssl); - if (cntrl_ptr.isNull()) - { - LL_WARNS("Init") << "Unable to set signal on global setting '" << no_verify_ssl - << "'" << LL_ENDL; - } - else - { - mSSLNoVerifySignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&ssl_verification_changed)); - LLCore::HttpOptions::setDefaultSSLVerifyPeer(!cntrl_ptr->getValue().asBoolean()); - } - } - // Tracing levels for library & libcurl (note that 2 & 3 are beyond spammy): // 0 - None // 1 - Basic start, stop simple transitions @@ -314,11 +296,6 @@ void setting_changed() LLAppViewer::instance()->getAppCoreHttp().refreshSettings(false); } -void ssl_verification_changed() -{ - LLCore::HttpOptions::setDefaultSSLVerifyPeer(!gSavedSettings.getBOOL("NoVerifySSLCert")); -} - namespace { // The NoOpDeletor is used when wrapping LLAppCoreHttp in a smart pointer below for @@ -378,7 +355,6 @@ void LLAppCoreHttp::cleanup() { mHttpClasses[i].mSettingsSignal.disconnect(); } - mSSLNoVerifySignal.disconnect(); mPipelinedSignal.disconnect(); delete mRequest; diff --git a/indra/newview/llappcorehttp.h b/indra/newview/llappcorehttp.h index 751c498ab0..95c138d598 100644 --- a/indra/newview/llappcorehttp.h +++ b/indra/newview/llappcorehttp.h @@ -256,7 +256,6 @@ private: HttpClass mHttpClasses[AP_COUNT]; bool mPipelined; // Global setting boost::signals2::connection mPipelinedSignal; // Signal for 'HttpPipelining' setting - boost::signals2::connection mSSLNoVerifySignal; // Signal for 'NoVerifySSLCert' setting static LLCore::HttpStatus sslVerify(const std::string &uri, const LLCore::HttpHandler::ptr_t &handler, void *appdata); }; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 1fbd198019..171858e472 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -236,7 +236,6 @@ void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url) httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); - httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL verification fails LLSD result = httpAdapter->getAndSuspend(httpRequest, cap_url, httpOpts); diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index 9745e17bbb..faa7e9f3db 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -95,7 +95,6 @@ void LLFloaterGridStatus::getGridStatusRSSCoro() LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); std::string url = gSavedSettings.getString("GridStatusRSS"); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 553a3cd086..fa3b44f702 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -144,7 +144,6 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, std:: httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); httpOpts->setFollowRedirects(true); - httpOpts->setSSLVerifyPeer(false); std::string url = this->getKeyVerificationURL(key); if (url.empty()) @@ -186,7 +185,6 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN); httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent); - httpOpts->setSSLVerifyPeer(false); std::string url = this->getTranslateURL(fromTo.first, fromTo.second, msg); if (url.empty()) From 74f23cde48829577d330ec0624135b45564af0ac Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 11 Sep 2020 21:34:13 +0300 Subject: [PATCH 129/153] SL-13830 Remade vivox shutdown to terminate when it is told to shutdown instead of when viewer is quiting --- indra/newview/llvoicevivox.cpp | 69 ++++++++++++++++------------------ indra/newview/llvoicevivox.h | 2 + 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 746ed69417..976ef61d8e 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -274,6 +274,8 @@ static void killGateway() /////////////////////////////////////////////////////////////////////////////////////////////// +bool LLVivoxVoiceClient::sShuttingDown = false; + LLVivoxVoiceClient::LLVivoxVoiceClient() : mSessionTerminateRequested(false), mRelogRequested(false), @@ -381,6 +383,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient() { mAvatarNameCacheConnection.disconnect(); } + sShuttingDown = true; } //--------------------------------------------------- @@ -414,6 +417,8 @@ void LLVivoxVoiceClient::terminate() mRelogRequested = false; killGateway(); } + + sShuttingDown = true; } //--------------------------------------------------- @@ -661,13 +666,13 @@ void LLVivoxVoiceClient::voiceControlCoro() U32 retry = 0; - while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !LLApp::isExiting()) + while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown) { LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; llcoro::suspendUntilTimeout(1.0); } - if (LLApp::isExiting()) + if (sShuttingDown) { mIsCoroutineActive = false; return; @@ -698,7 +703,7 @@ void LLVivoxVoiceClient::voiceControlCoro() << "disconnected" << " RelogRequested=" << mRelogRequested << LL_ENDL; - if (mRelogRequested) + if (mRelogRequested && !sShuttingDown) { if (!success) { @@ -713,14 +718,14 @@ void LLVivoxVoiceClient::voiceControlCoro() LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL; } - while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + while (isGatewayRunning() || (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown)) { LL_INFOS("Voice") << "waiting for SLVoice to exit" << LL_ENDL; llcoro::suspendUntilTimeout(1.0); } } } - while (mVoiceEnabled && mRelogRequested); + while (mVoiceEnabled && mRelogRequested && !sShuttingDown); mIsCoroutineActive = false; LL_INFOS("Voice") << "exiting" << LL_ENDL; } @@ -765,7 +770,7 @@ bool LLVivoxVoiceClient::endAndDisconnectSession() bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data) { - if (!LLAppViewer::isExiting() && mVoiceEnabled) + if (!sShuttingDown && mVoiceEnabled) { LL_WARNS("Voice") << "SLVoice terminated " << ll_stream_notation_sd(data) << LL_ENDL; terminateAudioSession(false); @@ -919,12 +924,10 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() //--------------------------------------------------------------------- llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); - bool quiting = LLAppViewer::isExiting(); - LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL; LLVoiceVivoxStats::getInstance()->reset(); - while (!mConnected && !quiting) + while (!mConnected && !sShuttingDown) { LLVoiceVivoxStats::getInstance()->connectionAttemptStart(); LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL; @@ -939,12 +942,11 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() if (!mConnected) { llcoro::suspendUntilTimeout(DAEMON_CONNECT_THROTTLE_SECONDS); - quiting = LLAppViewer::isExiting(); } } //--------------------------------------------------------------------- - if (quiting && !mConnected) + if (sShuttingDown && !mConnected) { return false; } @@ -985,13 +987,11 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { LL_INFOS("Voice") << "Provisioning voice account." << LL_ENDL; - bool quiting = LLApp::isExiting(); - while ((!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) && !quiting) + while ((!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) && !sShuttingDown) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; // *TODO* Pump a message for wake up. llcoro::suspend(); - quiting = LLApp::isExiting(); } std::string url = gAgent.getRegionCapability("ProvisionVoiceAccountRequest"); @@ -1011,7 +1011,6 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { LLVoiceVivoxStats::getInstance()->provisionAttemptStart(); result = httpAdapter->postAndSuspend(httpRequest, url, LLSD(), httpOpts); - quiting = LLApp::isExiting(); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -1021,7 +1020,6 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() F32 timeout = pow(PROVISION_RETRY_TIMEOUT, static_cast(retryCount)); LL_WARNS("Voice") << "Provision CAP 404. Retrying in " << timeout << " seconds." << LL_ENDL; llcoro::suspendUntilTimeout(timeout); - quiting = LLApp::isExiting(); } else if (!status) { @@ -1033,9 +1031,9 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { provisioned = true; } - } while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !quiting); + } while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !sShuttingDown); - if (quiting && !provisioned) + if (sShuttingDown && !provisioned) { return false; } @@ -1082,11 +1080,15 @@ bool LLVivoxVoiceClient::establishVoiceConnection() LL_WARNS("Voice") << "cannot establish connection; enabled "< removing " << idCurObj << RLV_ENDL; + m_Objects.erase(itObj); + } } // notifyBehaviourObservers(rlvCmd, !fFromObj); } From 487a487ce2eda4f2ec328802af9c3aa6ec31bf12 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 13 Sep 2020 20:52:39 +0200 Subject: [PATCH 132/153] [FIXED] Assertion failure on LLApp::isQuitting() in RlvHandler::cleanup() when disconnecting -> Also prefer using isExiting() over isQuitting() --- indra/newview/llappviewer.cpp | 5 ++++- indra/newview/rlvcommon.cpp | 2 +- indra/newview/rlvhandler.cpp | 15 +++++++++------ indra/newview/rlvui.cpp | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9117d8da60..3d3404e494 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -378,7 +378,10 @@ const std::string START_MARKER_FILE_NAME("SecondLife.start_marker"); const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker"); -static BOOL gDoDisconnect = FALSE; +//static BOOL gDoDisconnect = FALSE; +// [RLVa:KB] - Checked: RLVa-2.3 +BOOL gDoDisconnect = FALSE; +// [/RLVa:KB] static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index e9f2d2fc69..0eee08d0a6 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -136,7 +136,7 @@ void RlvSettings::initClass() // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d void RlvSettings::updateLoginLastLocation() { - if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) + if ( (!LLApp::isExiting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) { BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 7f750be450..6c7e549767 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -70,6 +70,9 @@ // Boost includes #include +// llappviewer.cpp +extern BOOL gDoDisconnect; + // ============================================================================ // Static variable initialization // @@ -158,7 +161,7 @@ void RlvHandler::cleanup() // // Clean up any restrictions that are still active // - RLV_ASSERT(LLApp::isQuitting()); // Several commands toggle debug settings but won't if they know the viewer is quitting + RLV_ASSERT(LLApp::isExiting() || gDoDisconnect); // Several commands toggle debug settings but won't if they know the viewer is quitting // Assume we have no way to predict how m_Objects will change so make a copy ahead of time uuid_vec_t idRlvObjects; @@ -2385,7 +2388,7 @@ ERlvCmdRet RlvBehaviourHandler::onCommand(const RlvComma template<> template<> void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) { - if (LLApp::isQuitting()) + if (LLApp::isExiting()) return; // Nothing to do if the viewer is shutting down // @@ -2440,7 +2443,7 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour template<> template<> void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) { - if (LLApp::isQuitting()) + if (LLApp::isExiting()) return; // Nothing to do if the viewer is shutting down // Update the shownames context @@ -2477,7 +2480,7 @@ template<> template<> ERlvCmdRet RlvBehaviourHandler::onCommand(const RlvCommand& rlvCmd, bool& fRefCount) { ERlvCmdRet eRet = RlvBehaviourGenericHandler::onCommand(rlvCmd, fRefCount); - if ( (RLV_RET_SUCCESS == eRet) && (rlvCmd.hasOption()) && (!LLApp::isQuitting()) ) + if ( (RLV_RET_SUCCESS == eRet) && (rlvCmd.hasOption()) && (!LLApp::isExiting()) ) { const LLUUID idAgent = RlvCommandOptionHelper::parseOption(rlvCmd.getOption()); @@ -2502,7 +2505,7 @@ ERlvCmdRet RlvBehaviourHandler::onCommand(const RlvCommand& template<> template<> void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) { - if (LLApp::isQuitting()) + if (LLApp::isExiting()) return; // Nothing to do if the viewer is shutting down // Update the shownames context @@ -2526,7 +2529,7 @@ ERlvCmdRet RlvBehaviourHandler::onCommand(const RlvComman template<> template<> void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) { - if (LLApp::isQuitting()) + if (LLApp::isExiting()) return; // Nothing to do if the viewer is shutting down // Refresh the nearby people list diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index cd6e5831ce..846460096d 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -77,7 +77,7 @@ RlvUIEnabler::RlvUIEnabler() // Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a void RlvUIEnabler::onBehaviourToggle(ERlvBehaviour eBhvr, ERlvParamType eType) { - bool fQuitting = LLApp::isQuitting(); + bool fQuitting = LLApp::isExiting(); for (behaviour_handler_map_t::const_iterator itHandler = m_Handlers.lower_bound(eBhvr), endHandler = m_Handlers.upper_bound(eBhvr); itHandler != endHandler; ++itHandler) { From 4501d4eb1af631969461ea3818f9dc7b1f5e2f15 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 14 Sep 2020 14:17:15 +0200 Subject: [PATCH 133/153] Add @buy and @pay restrictions to block object purchases and avatar payments respectively (because of baguettes) --- indra/newview/rlvactions.cpp | 26 +++++++++++++++++++++++++- indra/newview/rlvactions.h | 17 ++++++++++++++++- indra/newview/rlvdefines.h | 4 +++- indra/newview/rlvhandler.cpp | 30 ++++++++++++++++++++++++++++++ indra/newview/rlvhelper.cpp | 4 +++- 5 files changed, 77 insertions(+), 4 deletions(-) diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index ed17275c0e..b2fa52b5bb 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -367,6 +367,14 @@ bool RlvActions::canBuild() (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); } +// Handles: @buy +bool RlvActions::canBuyObject(const LLUUID& idObj) +{ + // User can buy an object set for sale if: + // - not restricted from buying objects + return (!RlvHandler::instance().hasBehaviour(RLV_BHVR_BUY)); +} + // Handles: @edit and @editobj bool RlvActions::canEdit(const LLViewerObject* pObj) { @@ -397,6 +405,22 @@ bool RlvActions::canInteract(const LLViewerObject* pObj, const LLVector3& posOff ( (!rlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (pObj->isHUDAttachment()) || (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) <= s_nFartouchDist * s_nFartouchDist)) ); } +// Handles: @pay +bool RlvActions::canPayAvatar(const LLUUID& idAvatar) +{ + // User can pay an avatar if: + // - not restricted from paying avatars + return (!RlvHandler::instance().hasBehaviour(RLV_BHVR_PAY)); +} + +// Handles: @buy +bool RlvActions::canPayObject(const LLUUID& idObj) +{ + // User can pay an object/vendor if: + // - not restricted from buying objects + return (!RlvHandler::instance().hasBehaviour(RLV_BHVR_BUY)); +} + bool RlvActions::canRez() { return (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index 90b1069f6b..dbb88c5abd 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -222,6 +222,11 @@ public: */ static bool canBuild(); + /* + * Returns true if the user can buy an object set for sale + */ + static bool canBuyObject(const LLUUID& idObj); + /* * Returns true if the user can edit the specified object (with an optional relative offset) */ @@ -238,6 +243,16 @@ public: */ static bool canInteract(const LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero); + /* + * Returns true if the user can pay an avatar + */ + static bool canPayAvatar(const LLUUID& idAvatar); + + /* + * Returns true if the user can pay an object (i.e. vendor) + */ + static bool canPayObject(const LLUUID& idObj); + /* * Returns true if the user can rez new objects (from inventory or through the create tool) */ diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index f43a332f9f..5410f0e7c0 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -151,8 +151,10 @@ enum ERlvBehaviour { RLV_BHVR_ACCEPTTP, // "accepttp" RLV_BHVR_ACCEPTTPREQUEST, // "accepttprequest" RLV_BHVR_ALLOWIDLE, // "allowidle" + RLV_BHVR_BUY, // "buy" RLV_BHVR_EDIT, // "edit" RLV_BHVR_EDITOBJ, // "editobj" + RLV_BHVR_PAY, // "pay" RLV_BHVR_REZ, // "rez" RLV_BHVR_FARTOUCH, // "fartouch" RLV_BHVR_INTERACT, // "interact" diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index d64bcabeb4..3a7c01bf42 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1859,6 +1859,25 @@ ERlvCmdRet RlvBehaviourAddRemAttachHandler::onCommand(const RlvCommand& rlvCmd, return RLV_RET_SUCCESS; } +// Handles: @buy=n|y toggles +template<> template<> +void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) +{ + // Start or stop filtering opening the buy, buy contents and pay object floaters + if (fHasBhvr) + { + RlvUIEnabler::instance().addGenericFloaterFilter("buy_object"); + RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents"); + RlvUIEnabler::instance().addGenericFloaterFilter("pay_object"); + } + else + { + RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object"); + RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object_contents"); + RlvUIEnabler::instance().removeGenericFloaterFilter("pay_object"); + } +} + // Handles: @detach[:]=n|y template<> template<> ERlvCmdRet RlvBehaviourHandler::onCommand(const RlvCommand& rlvCmd, bool& fRefCount) @@ -1997,6 +2016,17 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBh RlvUIEnabler::instance().removeGenericFloaterFilter("beacons"); } +// Handles: @pay=n|y toggles +template<> template<> +void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) +{ + // Start or stop filtering opening the pay avatar floater + if (fHasBhvr) + RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident"); + else + RlvUIEnabler::instance().removeGenericFloaterFilter("pay_resident"); +} + // Handles: @setoverlay=n|y toggles template<> template<> void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhvr, bool fHasBhvr) diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 2a0ecf6d97..b08875fca5 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -89,6 +89,7 @@ RlvBehaviourDictionary::RlvBehaviourDictionary() addEntry(new RlvBehaviourInfo("attachallthis", RLV_BHVR_ATTACHTHIS, RLV_TYPE_ADDREM, RlvBehaviourInfo::FORCEWEAR_SUBTREE)); addEntry(new RlvBehaviourInfo("attachthis_except", RLV_BHVR_ATTACHTHISEXCEPT, RLV_TYPE_ADDREM, RlvBehaviourInfo::FORCEWEAR_NODE)); addEntry(new RlvBehaviourInfo("attachallthis_except", RLV_BHVR_ATTACHTHISEXCEPT, RLV_TYPE_ADDREM, RlvBehaviourInfo::FORCEWEAR_SUBTREE)); + addEntry(new RlvBehaviourGenericToggleProcessor("buy")); addEntry(new RlvBehaviourGenericProcessor("chatwhisper", RLV_BHVR_CHATWHISPER)); addEntry(new RlvBehaviourGenericProcessor("chatnormal", RLV_BHVR_CHATNORMAL)); addEntry(new RlvBehaviourGenericProcessor("chatshout", RLV_BHVR_CHATSHOUT)); @@ -106,6 +107,7 @@ RlvBehaviourDictionary::RlvBehaviourDictionary() addEntry(new RlvBehaviourGenericProcessor("interact", RLV_BHVR_INTERACT, RlvBehaviourInfo::BHVR_EXTENDED)); addEntry(new RlvBehaviourGenericProcessor("jump", RLV_BHVR_JUMP)); addEntry(new RlvBehaviourInfo("notify", RLV_BHVR_NOTIFY, RLV_TYPE_ADDREM)); + addEntry(new RlvBehaviourGenericToggleProcessor("pay")); addEntry(new RlvBehaviourGenericProcessor("permissive", RLV_BHVR_PERMISSIVE)); addEntry(new RlvBehaviourGenericProcessor("recvchat", RLV_BHVR_RECVCHAT, RlvBehaviourInfo::BHVR_STRICT)); addEntry(new RlvBehaviourGenericProcessor("recvchatfrom", RLV_BHVR_RECVCHATFROM, RlvBehaviourInfo::BHVR_STRICT)); From a3c0d62eb51a360ab199a00295a341681ee1a66a Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 14 Sep 2020 15:09:16 +0200 Subject: [PATCH 134/153] Enable/disable additions for @buy/pay restrictions + show a blocked notification whenever the floater would have opened to inform the user --- indra/newview/llchathistory.cpp | 7 +++ indra/newview/llconversationloglist.cpp | 9 +++ indra/newview/llfloaterimcontainer.cpp | 14 ++++- indra/newview/llpanelpeoplemenus.cpp | 6 ++ indra/newview/lltoolpie.cpp | 39 +++++++++++- indra/newview/llviewermenu.cpp | 19 +++++- indra/newview/rlvhandler.cpp | 40 +++++++----- indra/newview/rlvui.cpp | 62 ++++++++++++++----- indra/newview/rlvui.h | 7 ++- .../skins/default/xui/en/menu_avatar_icon.xml | 1 + 10 files changed, 165 insertions(+), 39 deletions(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 3b4cdd022a..dfdd11f2d0 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -66,6 +66,7 @@ #include "llviewercontrol.h" #include "llviewerobjectlist.h" // [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) +#include "rlvactions.h" #include "rlvcommon.h" // [/RLVa:KB] @@ -486,6 +487,12 @@ public: { return canModerate(userdata); } +// [RLVa:KB] - @pay + else if (level == "can_pay") + { + return RlvActions::canPayAvatar(getAvatarId()); + } +// [/RLVa:KB] else if (level == "can_ban_member") { return canBanGroupMember(getAvatarId()); diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 86e23e7c83..45fd7b327f 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -34,6 +34,9 @@ #include "llconversationloglistitem.h" #include "llviewermenu.h" #include "lltrans.h" +// [RLVa:KB] - @pay +#include "rlvactions.h" +// [/RLVa:KB] static LLDefaultChildRegistry::Register r("conversation_log_list"); @@ -387,6 +390,12 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) { return (is_p2p || is_group_member) && LLAvatarActions::canCall(); } +// [RLVa:KB] - @pay + else if ("can_pay" == command_name) + { + return is_p2p && RlvActions::canPayAvatar(selected_id); + } +// [/RLVa:KB] else if ("add_rem_friend" == command_name || "can_invite_to_group" == command_name || "can_share" == command_name || diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 21420b122b..6ebb1dd7f2 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -55,6 +55,9 @@ #include "llworld.h" #include "llsdserialize.h" #include "llviewerobjectlist.h" +// [RLVa:KB] - @pay +#include "rlvactions.h" +// [/RLVa:KB] #include "boost/foreach.hpp" // @@ -1426,11 +1429,20 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v } // Handle all other options - if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) +// if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) +// [RLVa:KB] - @pay + if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item)) +// [/RLVa:KB] { // Those menu items are enable only if a single avatar is selected return is_single_select; } +// [RLVa:KB] - @pay + else if ("can_pay" == item) + { + return is_single_select && RlvActions::canPayAvatar(single_id); + } +// [/RLVa:KB] else if ("can_block" == item) { return (is_single_select ? LLAvatarActions::canBlock(single_id) : false); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index f3c693a29a..c615a36299 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -254,6 +254,12 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) { return LLLogChat::isTranscriptExist(mUUIDs.front()); } +// [RLVa:KB] - @pay + else if (item == std::string("can_pay")) + { + return RlvActions::canPayAvatar(mUUIDs.front()); + } +// [/RLVa:KB] else if (item == std::string("can_im") || item == std::string("can_invite") || item == std::string("can_share") || item == std::string("can_pay")) { diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 214450beba..533e71a40d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -277,14 +277,39 @@ BOOL LLToolPie::handleLeftClickPick() } // [/RLVa:KB] +// [RLVa:KB] - @buy + const std::function fnRlvCheck = [](const LLUUID& idObj, U8 clickAction) { + switch (clickAction) + { + case CLICK_ACTION_BUY: + return RlvActions::canBuyObject(idObj); + case CLICK_ACTION_PAY: + return RlvActions::canPayObject(idObj); + default: + return true; + } + }; +// [/RLVa:KB] mClickAction = 0; if (object && object->getClickAction()) { mClickAction = object->getClickAction(); +// [RLVa:KB] - @buy + if ( (RlvActions::isRlvEnabled()) && (!fnRlvCheck(object->getID(), mClickAction)) ) + { + mClickAction = CLICK_ACTION_NONE; + } +// [/RLVa:KB] } else if (parent && parent->getClickAction()) { mClickAction = parent->getClickAction(); +// [RLVa:KB] - @buy + if ((RlvActions::isRlvEnabled()) && (!fnRlvCheck(parent->getID(), mClickAction))) + { + mClickAction = CLICK_ACTION_NONE; + } +// [/RLVa:KB] } switch(mClickAction) @@ -524,7 +549,12 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object) LLSelectNode* node = LLSelectMgr::getInstance()->getHoverNode(); if (!node || node->mSaleInfo.isForSale()) { - cursor = UI_CURSOR_TOOLBUY; +// [RLVa:KB] - @buy + cursor = (!object || RlvActions::canBuyObject(parent ? parent->getID() : object->getID())) + ? UI_CURSOR_TOOLBUY + : ((object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch())) ? UI_CURSOR_HAND : UI_CURSOR_ARROW; +// [/RLVa:KB] +// cursor = UI_CURSOR_TOOLBUY; } } break; @@ -541,7 +571,12 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object) if ((object && object->flagTakesMoney()) || (parent && parent->flagTakesMoney())) { - cursor = UI_CURSOR_TOOLBUY; +// [RLVa:KB] - @buy + cursor = ((object && RlvActions::canPayObject(object->getID())) || (parent && RlvActions::canPayObject(parent->getID()))) + ? UI_CURSOR_TOOLBUY + : ((object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch())) ? UI_CURSOR_HAND : UI_CURSOR_ARROW; +// [/RLVa:KB] +// cursor = UI_CURSOR_TOOLBUY; } } break; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 75793ac975..034bc96bbd 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3653,6 +3653,11 @@ bool enable_buy_object() if( for_sale_selection(node) ) { +// [RLVa:KB] - @buy + if (!RlvActions::canBuyObject(obj->getID())) + return false; +// [/RLVa:KB] + // *NOTE: Is this needed? This checks to see if anyone owns the // object, dating back to when we had "public" objects owned by // no one. JC @@ -5132,6 +5137,11 @@ BOOL is_selection_buy_not_take() LLViewerObject* obj = node->getObject(); if(obj && !(obj->permYouOwner()) && (node->mSaleInfo.isForSale())) { +// [RLVa:KB] - @buy + if (!RlvActions::canBuyObject(obj->getID())) + continue; +// [/RLVa:KB] + // you do not own the object and it is for sale, thus, // it's a buy return TRUE; @@ -6427,8 +6437,8 @@ bool enable_pay_avatar() LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); LLVOAvatar* avatar = find_avatar_from_object(obj); // return (avatar != NULL); -// [RLVa:KB] - Checked: RLVa-1.2.1 - return (avatar != NULL) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())); +// [RLVa:KB] - @shownames and @pay + return (avatar != NULL) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) && (RlvActions::canPayAvatar(avatar->getID())); // [/RLVa:KB] } @@ -6440,7 +6450,10 @@ bool enable_pay_object() LLViewerObject *parent = (LLViewerObject *)object->getParent(); if((object->flagTakesMoney()) || (parent && parent->flagTakesMoney())) { - return true; +// [RLVa:KB] - @buy + return RlvActions::canBuyObject(object->getID()); +// [/RLVa:KB] +// return true; } } return false; diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 3a7c01bf42..5f7168f261 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1866,15 +1866,15 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the buy, buy contents and pay object floaters if (fHasBhvr) { - RlvUIEnabler::instance().addGenericFloaterFilter("buy_object"); - RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents"); - RlvUIEnabler::instance().addGenericFloaterFilter("pay_object"); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object", std::string(RLV_STRING_BLOCKED_GENERIC))); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents", std::string(RLV_STRING_BLOCKED_GENERIC))); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_object", std::string(RLV_STRING_BLOCKED_GENERIC))); } else { - RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object"); - RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object_contents"); - RlvUIEnabler::instance().removeGenericFloaterFilter("pay_object"); + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object")); + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("buy_object_contents")); + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("pay_object")); } } @@ -2011,9 +2011,13 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBh // Start or stop filtering opening the beacons floater if (fHasBhvr) - RlvUIEnabler::instance().addGenericFloaterFilter("beacons"); + { + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("beacons")); + } else - RlvUIEnabler::instance().removeGenericFloaterFilter("beacons"); + { + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("beacons")); + } } // Handles: @pay=n|y toggles @@ -2022,9 +2026,13 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhv { // Start or stop filtering opening the pay avatar floater if (fHasBhvr) - RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident"); + { + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident")); + } else - RlvUIEnabler::instance().removeGenericFloaterFilter("pay_resident"); + { + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("pay_resident")); + } } // Handles: @setoverlay=n|y toggles @@ -2366,11 +2374,11 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour e LLFloaterReg::const_instance_list_t envFloaters = LLFloaterReg::getFloaterList(strEnvFloaters[idxFloater]); for (LLFloater* pFloater : envFloaters) pFloater->closeFloater(); - RlvUIEnabler::instance().addGenericFloaterFilter(strEnvFloaters[idxFloater]); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter(strEnvFloaters[idxFloater])); } else { - RlvUIEnabler::instance().removeGenericFloaterFilter(strEnvFloaters[idxFloater]); + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter(strEnvFloaters[idxFloater])); } } @@ -2456,9 +2464,13 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour // Filter (or stop filtering) opening new inventory floaters // if (fHasBhvr) - RlvUIEnabler::instance().addGenericFloaterFilter("inventory"); + { + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("inventory")); + } else - RlvUIEnabler::instance().removeGenericFloaterFilter("inventory"); + { + RLV_VERIFY(RlvUIEnabler::instance().removeGenericFloaterFilter("inventory")); + } } // Handles: @shownames[:]=n|y toggles diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index cd6e5831ce..4d8699b55a 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -182,9 +182,13 @@ void RlvUIEnabler::onToggleShowMinimap() // Start or stop filtering showing the mini-map floater if (!fEnable) - addGenericFloaterFilter("mini_map"); + { + RLV_VERIFY(addGenericFloaterFilter("mini_map")); + } else - removeGenericFloaterFilter("mini_map"); + { + RLV_VERIFY(removeGenericFloaterFilter("mini_map")); + } // Hide the mini-map floater if it's currently visible (or restore it if it was previously visible) static bool fPrevVisibile = false; @@ -217,9 +221,13 @@ void RlvUIEnabler::onToggleShowWorldMap() // Start or stop filtering opening the world map if (!fEnable) - addGenericFloaterFilter("world_map"); + { + RLV_VERIFY(addGenericFloaterFilter("world_map")); + } else - removeGenericFloaterFilter("world_map"); + { + RLV_VERIFY(removeGenericFloaterFilter("world_map")); + } } // Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a @@ -271,31 +279,53 @@ void RlvUIEnabler::onUpdateLoginLastLocation(bool fQuitting) // ============================================================================ -// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a -void RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName) +bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification) { - m_FilteredFloaters.insert(strFloaterName); + return addGenericFloaterFilter(strFloaterName, [strRlvNotification]() { RlvUtil::notifyBlocked(strRlvNotification); }); +} + +bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const std::function& fn) +{ + // NOTE: we don't currently support multiple filters for the same floater (due to the need to remove the correct one at the end of it all) + if (m_FilteredFloaterMap.end() != m_FilteredFloaterMap.find(strFloaterName)) + return false; + + m_FilteredFloaterMap.insert(std::make_pair(strFloaterName, fn)); if (!m_ConnFloaterGeneric.connected()) + { m_ConnFloaterGeneric = LLFloaterReg::setValidateCallback(boost::bind(&RlvUIEnabler::filterFloaterGeneric, this, _1, _2)); + } + + return true; } -// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a -void RlvUIEnabler::removeGenericFloaterFilter(const std::string& strFloaterName) +bool RlvUIEnabler::removeGenericFloaterFilter(const std::string& strFloaterName) { - std::multiset::iterator itFloater = m_FilteredFloaters.find(strFloaterName); - RLV_ASSERT_DBG(itFloater != m_FilteredFloaters.end()); - m_FilteredFloaters.erase(itFloater); + auto itFloater = m_FilteredFloaterMap.find(strFloaterName); + if (itFloater != m_FilteredFloaterMap.end()) + return false; + + m_FilteredFloaterMap.erase(itFloater); RLV_ASSERT_DBG(m_ConnFloaterGeneric.connected()); - if (m_FilteredFloaters.empty()) + if (m_FilteredFloaterMap.empty()) m_ConnFloaterGeneric.disconnect(); + + return true; } -// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a -bool RlvUIEnabler::filterFloaterGeneric(const std::string& strName, const LLSD&) +bool RlvUIEnabler::filterFloaterGeneric(const std::string& strFloaterName, const LLSD&) { - return m_FilteredFloaters.end() == m_FilteredFloaters.find(strName); + auto itFloater = m_FilteredFloaterMap.find(strFloaterName); + if (m_FilteredFloaterMap.end() != itFloater) + { + if (itFloater->second) + itFloater->second(); + return false; + } + return true; + } // Checked: 2010-04-22 (RLVa-1.4.5) | Added: RLVa-1.2.0 diff --git a/indra/newview/rlvui.h b/indra/newview/rlvui.h index c6f945a2c5..c53a9ab190 100644 --- a/indra/newview/rlvui.h +++ b/indra/newview/rlvui.h @@ -55,8 +55,9 @@ protected: * Floater and sidebar validation callbacks */ public: - void addGenericFloaterFilter(const std::string& strFloaterName); - void removeGenericFloaterFilter(const std::string& strFloaterName); + bool addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification); + bool addGenericFloaterFilter(const std::string& strFloaterName, const std::function& fn = nullptr); + bool removeGenericFloaterFilter(const std::string& strFloaterName); protected: bool filterFloaterGeneric(const std::string&, const LLSD&); @@ -86,7 +87,7 @@ protected: typedef std::multimap behaviour_handler_map_t; behaviour_handler_map_t m_Handlers; - std::multiset m_FilteredFloaters; + std::map> m_FilteredFloaterMap; }; // ============================================================================ diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml index 05ab4d35a0..597f480e83 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml @@ -95,6 +95,7 @@ layout="topleft" name="Pay"> + Date: Wed, 16 Sep 2020 00:09:14 +0200 Subject: [PATCH 135/153] Update FMOD Studio to 2.01.04 on Windows --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 0123f9e3d4..b7fb6c9e7a 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -992,11 +992,11 @@ archive hash - fab47cbf13e89dd0359b5f5e995f6794 + fd75a1941350a5a0b510b18192f28ef3 hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.01.03-windows-202191858.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.01.04-windows-202592205.tar.bz2 name windows @@ -1006,18 +1006,18 @@ archive hash - a757fe92a8a48b247e23802c22153d1c + 534c065e8d284b794d1aabeda20f3600 hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.01.03-windows64-202191859.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.01.04-windows64-202592207.tar.bz2 name windows64 version - 2.01.03 + 2.01.04 fontconfig From aebcd1855d7b0722cfa339ed3de7b942f3865aed Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 01:35:44 +0200 Subject: [PATCH 136/153] Change RLVa string constants over to opt-in constexpr string_views (but keep char* by default) --- indra/newview/llagent.cpp | 6 +- indra/newview/llagentui.cpp | 4 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llavataractions.cpp | 10 +-- indra/newview/llfloaterimsession.cpp | 2 +- indra/newview/llfloaterworldmap.cpp | 6 +- indra/newview/llgroupactions.cpp | 4 +- indra/newview/llimprocessing.cpp | 10 +-- indra/newview/llimview.cpp | 2 +- indra/newview/llinspectremoteobject.cpp | 2 +- indra/newview/llinventorybridge.cpp | 4 +- indra/newview/llinventorypanel.cpp | 2 +- indra/newview/llnetmap.cpp | 2 +- indra/newview/llslurl.cpp | 2 +- indra/newview/llteleporthistory.cpp | 2 +- indra/newview/lltoolpie.cpp | 4 +- indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewermessage.cpp | 10 +-- indra/newview/llworldmapview.cpp | 2 +- indra/newview/rlvactions.cpp | 6 +- indra/newview/rlvactions.h | 6 +- indra/newview/rlvcommon.cpp | 34 +++++---- indra/newview/rlvcommon.h | 38 ++++++---- indra/newview/rlvdefines.h | 99 ++++++++++++++++++------- indra/newview/rlvhandler.cpp | 8 +- 25 files changed, 168 insertions(+), 101 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a9626b0e11..9bfb64626b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4139,7 +4139,7 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) : gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC) ) || ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->isSitting())) )) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::Teleport); return; } // [/RLVa:KB] @@ -4241,7 +4241,7 @@ void LLAgent::teleportViaLocation(const LLVector3d& pos_global) { if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() ) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::Teleport); return; } @@ -4311,7 +4311,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVe { if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() ) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::Teleport); return; } diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 8258e77caa..6a227a5d22 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -106,8 +106,8 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const // RELEASE-RLVa: [SL-2.0.0] Check ELocationFormat to make sure our switch still makes sense if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { - parcel_name = RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL); - region_name = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + parcel_name = RlvStrings::getString(RlvStringKeys::Hidden::Parcel); + region_name = RlvStrings::getString(RlvStringKeys::Hidden::Region); if (LOCATION_FORMAT_NO_MATURITY == fmt) fmt = LOCATION_FORMAT_LANDMARK; else if (LOCATION_FORMAT_FULL == fmt) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3333c43e3c..3779900088 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3170,7 +3170,7 @@ LLSD LLAppViewer::getViewerInfo() const } else { - info["REGION"] = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + info["REGION"] = RlvStrings::getString(RlvStringKeys::Hidden::Region); } info["SERVER_VERSION"] = gLastVersionChannel; // [/RLVa:KB] diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 43f4a6da6d..138360cc01 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -211,7 +211,7 @@ void LLAvatarActions::startIM(const LLUUID& id) if (!RlvActions::canStartIM(id)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartIm, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); return; } // [/RLVa:KB] @@ -256,7 +256,7 @@ void LLAvatarActions::startCall(const LLUUID& id) if (!RlvActions::canStartIM(id)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartIm, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); return; } // [/RLVa:KB] @@ -282,7 +282,7 @@ void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids, const LLUUID& floate if (!RlvActions::canStartIM(idAgent)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartConference); return; } id_array.push_back(idAgent); @@ -339,7 +339,7 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float if (!RlvActions::canStartIM(idAgent)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartConference); return; } id_array.push_back(idAgent); @@ -467,7 +467,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const // Filter the request message if the recipients is IM-blocked if ( (RlvActions::isRlvEnabled()) && ((!RlvActions::canStartIM(idRecipient)) || (!RlvActions::canSendIM(idRecipient))) ) { - strMessage = RlvStrings::getString(RLV_STRING_HIDDEN); + strMessage = RlvStrings::getString(RlvStringKeys::Hidden::Generic); } // [/RLVa:KB] diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index b1319d9c10..020b175f37 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -321,7 +321,7 @@ void LLFloaterIMSession::sendMsg(const std::string& msg) if (fRlvFilter) { - utf8_text = RlvStrings::getString(RLV_STRING_BLOCKED_SENDIM); + utf8_text = RlvStrings::getString(RlvStringKeys::Blocked::SendIm); } } // [/RLVa:KB] diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 71851bb23a..78cbcef98f 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -676,7 +676,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) mTrackedStatus = LLTracker::TRACKING_LOCATION; LLWorldMap::getInstance()->cancelTracking(); // The floater is taking over the tracking // [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5 - LLTracker::trackLocation(pos_global, (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? full_name : RlvStrings::getString(RLV_STRING_HIDDEN).c_str(), tooltip); + LLTracker::trackLocation(pos_global, (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? full_name : RlvStrings::getString(RlvStringKeys::Hidden::Generic).c_str(), tooltip); // [/RLVa:KB] // LLTracker::trackLocation(pos_global, full_name, tooltip); @@ -755,7 +755,7 @@ void LLFloaterWorldMap::updateLocation() mSetToUserPosition = FALSE; // Fill out the location field - getChild("location")->setValue(RlvStrings::getString(RLV_STRING_HIDDEN_REGION)); + getChild("location")->setValue(RlvStrings::getString(RlvStringKeys::Hidden::Region)); // update the coordinate display with location of avatar in region updateTeleportCoordsDisplay( agentPos ); @@ -814,7 +814,7 @@ void LLFloaterWorldMap::updateLocation() { mSLURL = LLSLURL(); - childSetValue("location", RlvStrings::getString(RLV_STRING_HIDDEN_REGION)); + childSetValue("location", RlvStrings::getString(RlvStringKeys::Hidden::Region)); } else if (gotSimName) // [/RLVa:KB] diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 5409b00c2e..c33ff3e709 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -215,7 +215,7 @@ void LLGroupActions::startCall(const LLUUID& group_id) if (!RlvActions::canStartIM(group_id)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartIm, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); return; } // [/RLVa:KB] @@ -455,7 +455,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id) if (!RlvActions::canStartIM(group_id)) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartIm, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); return LLUUID::null; } // [/RLVa:KB] diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 66ed5aada9..ce8c3c7327 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -620,8 +620,8 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!RlvActions::canReceiveIM(from_id)) && (!LLMuteList::getInstance()->isLinden(original_name) )) { if (!mute_im) - RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id); - buffer = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM); + RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RlvStringKeys::Blocked::RecvImRemote), session_id); + buffer = RlvStrings::getString(RlvStringKeys::Blocked::RecvIm); } // [/RLVa:KB] @@ -1089,7 +1089,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, { std::string::size_type idxPos = location.find('/'); if ( (std::string::npos != idxPos) && (RlvUtil::isNearbyRegion(location.substr(0, idxPos))) ) - location = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + location = RlvStrings::getString(RlvStringKeys::Hidden::Region); } } // [/RLVa:KB] @@ -1337,7 +1337,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, if ( ((IM_LURE_USER == dialog) && (!RlvActions::canAcceptTpOffer(from_id))) || ((IM_TELEPORT_REQUEST == dialog) && (!RlvActions::canAcceptTpRequest(from_id))) ) { - RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLUREREQ_REMOTE)); + RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RlvStringKeys::Blocked::TpLureRequestRemote)); if (is_do_not_disturb) send_do_not_disturb_message(gMessageSystem, from_id); return; @@ -1347,7 +1347,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, if ( (!RlvActions::canReceiveIM(from_id)) || ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (IM_LURE_USER == dialog || IM_TELEPORT_REQUEST == dialog)) ) { - message = RlvStrings::getString(RLV_STRING_HIDDEN); + message = RlvStrings::getString(RlvStringKeys::Hidden::Generic); } } // [/RLVa:KB] diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4ea73ea4d9..18f3ffcb7c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3671,7 +3671,7 @@ public: } else if (!RlvActions::canReceiveIM(from_id)) // Conference chat: don't block; censor if not an exception { - message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM); + message = RlvStrings::getString(RlvStringKeys::Blocked::RecvIm); } } // [/RLVa:KB] diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 8fa90c5d62..c77b510a17 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -200,7 +200,7 @@ void LLInspectRemoteObject::update() getChild("block_btn")->setEnabled(!mObjectID.isNull() && !LLMuteList::getInstance()->isMuted(mObjectID)); // [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f - if ( (rlv_handler_t::isEnabled()) && (RlvStrings::getString(RLV_STRING_HIDDEN_REGION) == mSLurl) ) + if ( (rlv_handler_t::isEnabled()) && (RlvStrings::getString(RlvStringKeys::Hidden::Region) == mSLurl) ) { getChild("object_slurl")->setValue(mSLurl); getChild("map_btn")->setEnabled(false); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5289e64d4f..bc60e729cf 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3778,7 +3778,7 @@ void LLFolderBridge::perform_pasteFromClipboard() // [RLVa:KB] - Checked: RLVa-2.1.0 if ( ((item) && (!RlvActions::canPasteInventory(item, dest_folder))) || ((cat) && (!RlvActions::canPasteInventory(cat, dest_folder))) ) { - RlvActions::notifyBlocked(RLV_STRING_BLOCKED_INVFOLDER); + RlvActions::notifyBlocked(RlvStringKeys::Blocked::InvFolder); return; } // [/RLVa:KB] @@ -5906,7 +5906,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act if (!RlvActions::canStartIM(item->getCreatorUUID())) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", item->getCreatorUUID(), "completename").getSLURLString())); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartIm, LLSD().with("RECIPIENT", LLSLURL("agent", item->getCreatorUUID(), "completename").getSLURLString())); return; } // [/RLVa:KB] diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 64993d8f7c..bd26e6867c 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1365,7 +1365,7 @@ bool LLInventoryPanel::beginIMSession() if (!fRlvCanStartIM) { make_ui_sound("UISndInvalidOp"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::StartConference); return true; } // [/RLVa:KB] diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 73b7ca5503..40b3fdd888 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -636,7 +636,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) // region_name = region->getName(); // [RLVa:KB] - Checked: RLVa-1.2.2 - region_name = (RlvActions::canShowLocation()) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + region_name = (RlvActions::canShowLocation()) ? region->getName() : RlvStrings::getString(RlvStringKeys::Hidden::Region); // [/RLVa:KB] if (!region_name.empty()) { diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index c7caa8f043..fbf9dab1ba 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -397,7 +397,7 @@ std::string LLSLURL::getSLURLString() const // [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d return LLGridManager::getInstance()->getSLURLBase(mGrid) + ( ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) || (!RlvUtil::isNearbyRegion(mRegion))) - ? (LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z)) : RlvStrings::getString(RLV_STRING_HIDDEN_REGION) ); + ? (LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z)) : RlvStrings::getString(RlvStringKeys::Hidden::Region) ); // [/RLVa:KB] } case APP: diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index ac7ee401ba..3fadae7717 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -187,7 +187,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) } else { - mItems[mCurrentItem] = LLTeleportHistoryItem(RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL), LLVector3d::zero); + mItems[mCurrentItem] = LLTeleportHistoryItem(RlvStrings::getString(RlvStringKeys::Hidden::Parcel), LLVector3d::zero); } // [/RLVa:KB] } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 85069205d3..20bf2f7da5 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -808,7 +808,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) if ( (fValidPick) && (RlvActions::isRlvEnabled()) && (!RlvActions::canTeleportToLocal(mPick.mPosGlobal)) ) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_AUTOPILOT); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::AutoPilot); fValidPick = false; } @@ -919,7 +919,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) if ( (fValidPick) && (RlvActions::isRlvEnabled()) && (!RlvActions::canTeleportToLocal(mPick.mPosGlobal)) ) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_AUTOPILOT); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::AutoPilot); fValidPick = false; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f14816fc2c..8a934241a3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1227,7 +1227,7 @@ class LLAdvancedToggleWireframe : public view_listener_t // [RLVa:KB] - Checked: RLVa-2.0.0 bool fRlvBlockWireframe = gRlvAttachmentLocks.hasLockedHUD(); if ( (!gUseWireframe) && (fRlvBlockWireframe) ) - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_WIREFRAME); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::Wireframe); set_use_wireframe( (!gUseWireframe) && (!fRlvBlockWireframe) ); return true; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ef6c43dab..d3ffd28d10 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5818,8 +5818,8 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp // [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.0.0a if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { - notice.setArg("[REGIONNAME]", RlvStrings::getString(RLV_STRING_HIDDEN_REGION)); - notice.setArg("[REGIONPOS]", RlvStrings::getString(RLV_STRING_HIDDEN)); + notice.setArg("[REGIONNAME]", RlvStrings::getString(RlvStringKeys::Hidden::Region)); + notice.setArg("[REGIONPOS]", RlvStrings::getString(RlvStringKeys::Hidden::Generic)); } else if (!foundpos) // [/RLVa:KB] @@ -6556,7 +6556,7 @@ void send_lures(const LLSD& notification, const LLSD& response) if ( (gRlvHandler.isEnabled()) && (std::any_of(sdRecipients.beginArray(), sdRecipients.endArray(), [](const LLSD& id) { return !RlvActions::canStartIM(id.asUUID()) || !RlvActions::canSendIM(id.asUUID()); })) ) { - text = RlvStrings::getString(RLV_STRING_HIDDEN); + text = RlvStrings::getString(RlvStringKeys::Hidden::Generic); } // [/RLVa:KB] @@ -6652,7 +6652,7 @@ void handle_lure(const uuid_vec_t& ids) LLSD edit_args; // [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a - edit_args["REGION"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN); + edit_args["REGION"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RlvStringKeys::Hidden::Generic); // [/RLVa:KB] // edit_args["REGION"] = gAgent.getRegion()->getName(); @@ -6668,7 +6668,7 @@ void handle_lure(const uuid_vec_t& ids) if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, idAgent, RLV_CHECK_PERMISSIVE)) && ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) { - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT_OFFER); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::TeleportOffer); return; } } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 0754e31c91..7d65617653 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1068,7 +1068,7 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, MASK mask ) // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.4.5) | Modified: RLVa-1.4.5 std::string message = llformat("%s (%s)", - (RlvActions::canShowLocation()) ? info->getName().c_str() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION).c_str(), + (RlvActions::canShowLocation()) ? info->getName().c_str() : RlvStrings::getString(RlvStringKeys::Hidden::Region).c_str(), info->getAccessString().c_str()); // [/RLVa:KB] // std::string message = llformat("%s (%s)", info->getName().c_str(), info->getAccessString().c_str()); diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 793824a316..671b2a8414 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -584,7 +584,11 @@ bool RlvActions::isRlvEnabled() return RlvHandler::isEnabled(); } +#ifdef CATZNIP_STRINGVIEW +void RlvActions::notifyBlocked(const boost::string_view& strNotifcation, const LLSD& sdArgs) +#else void RlvActions::notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs) +#endif // CATZNIP_STRINGVIEW { RlvUtil::notifyBlocked(strNotifcation, sdArgs); } diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index be22f4ce6a..81d8e1fc42 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -309,7 +309,11 @@ public: /* * Shows one of the blocked toast notifications (see rlva_strings.xml) */ +#ifdef CATZNIP_STRINGVIEW + static void notifyBlocked(const boost::string_view& strNotifcation, const LLSD& sdArgs = LLSD()); +#else static void notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs = LLSD()); +#endif // CATZNIP_STRINGVIEW }; // ============================================================================ diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 112411b2a4..202f5860dc 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -1,17 +1,17 @@ -/** +/** * - * Copyright (c) 2009-2011, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the + * Copyright (c) 2009-2020, Kitty Barnett + * + * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * + * * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to + * you have read and understood your obligations described above, and agree to * abide by those obligations. - * + * */ #include "llviewerprecompiledheaders.h" @@ -360,7 +360,11 @@ const std::string& RlvStrings::getAnonym(const std::string& strName) } // Checked: 2011-11-08 (RLVa-1.5.0) +#ifdef CATZNIP_STRINGVIEW +const std::string& RlvStrings::getString(const boost::string_view& strStringName) +#else const std::string& RlvStrings::getString(const std::string& strStringName) +#endif // CATZNIP_STRINGVIEW { static const std::string strMissing = "(Missing RLVa string)"; string_map_t::const_iterator itString = m_StringMap.find(strStringName); @@ -476,14 +480,14 @@ void RlvUtil::filterLocation(std::string& strUTF8Text) { // Filter any mention of the surrounding region names LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList(); - const std::string& strHiddenRegion = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + const std::string& strHiddenRegion = RlvStrings::getString(RlvStringKeys::Hidden::Region); for (LLWorld::region_list_t::const_iterator itRegion = regions.begin(); itRegion != regions.end(); ++itRegion) boost::ireplace_all(strUTF8Text, (*itRegion)->getName(), strHiddenRegion); // Filter any mention of the parcel name LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstance(); if (pParcelMgr) - boost::ireplace_all(strUTF8Text, pParcelMgr->getAgentParcelName(), RlvStrings::getString(RLV_STRING_HIDDEN_PARCEL)); + boost::ireplace_all(strUTF8Text, pParcelMgr->getAgentParcelName(), RlvStrings::getString(RlvStringKeys::Hidden::Parcel)); } // Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c @@ -529,7 +533,7 @@ void RlvUtil::filterScriptQuestions(S32& nQuestions, LLSD& sdPayload) if ((!gRlvAttachmentLocks.canAttach()) && (SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_ATTACH].permbit & nQuestions)) { // Notify the user that we blocked it since they're not allowed to wear any new attachments - sdPayload["rlv_blocked"] = RLV_STRING_BLOCKED_PERMATTACH; + sdPayload["rlv_blocked"] = RlvStringKeys::Blocked::PermissionAttach; nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_ATTACH].permbit; } @@ -537,7 +541,7 @@ void RlvUtil::filterScriptQuestions(S32& nQuestions, LLSD& sdPayload) if ((gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) && (SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_TELEPORT].permbit & nQuestions)) { // Notify the user that we blocked it since they're not allowed to teleport - sdPayload["rlv_blocked"] = RLV_STRING_BLOCKED_PERMTELEPORT; + sdPayload["rlv_blocked"] = RlvStringKeys::Blocked::PermissionTeleport; nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_TELEPORT].permbit; } @@ -580,7 +584,11 @@ bool RlvUtil::isNearbyRegion(const std::string& strRegion) } // Checked: 2011-04-11 (RLVa-1.3.0h) | Modified: RLVa-1.3.0h +#ifdef CATZNIP_STRINGVIEW +void RlvUtil::notifyBlocked(const boost::string_view& strNotifcation, const LLSD& sdArgs, bool fLogToChat) +#else void RlvUtil::notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs, bool fLogToChat) +#endif // CATZNIP_STRINGVIEW { std::string strMsg = RlvStrings::getString(strNotifcation); LLStringUtil::format(strMsg, sdArgs); diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index 82fca44f91..dcd40babf2 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -1,21 +1,20 @@ -/** +/** * - * Copyright (c) 2009-2011, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the + * Copyright (c) 2009-2020, Kitty Barnett + * + * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * + * * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to + * you have read and understood your obligations described above, and agree to * abide by those obligations. - * + * */ -#ifndef RLV_COMMON_H -#define RLV_COMMON_H +#pragma once #include "llavatarname.h" #include "llselectmgr.h" @@ -146,7 +145,11 @@ public: static const std::string& getAnonym(const LLAvatarName& avName); // @shownames static const std::string& getAnonym(const std::string& strName); // @shownames +#ifdef CATZNIP_STRINGVIEW + static const std::string& getString(const boost::string_view& strStringName); +#else static const std::string& getString(const std::string& strStringName); +#endif // CATZNIP_STRINGVIEW static const char* getStringFromReturnCode(ERlvCmdRet eRet); static const std::string& getStringMapPath() { return m_StringMapPath; } static std::string getVersion(const LLUUID& idRlvObject, bool fLegacy = false); @@ -158,7 +161,7 @@ public: protected: static std::vector m_Anonyms; - typedef std::map > string_map_t; + typedef std::map, std::less<>> string_map_t; static string_map_t m_StringMap; static std::string m_StringMapPath; }; @@ -181,9 +184,14 @@ public: static bool isForceTp() { return m_fForceTp; } static void forceTp(const LLVector3d& posDest); // Ignores restrictions that might otherwise prevent tp'ing +#ifdef CATZNIP_STRINGVIEW + static void notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs = LLSD(), bool fLogToChat = false) { notifyBlocked(boost::string_view(strNotifcation), sdArgs, fLogToChat); } + static void notifyBlocked(const boost::string_view& strNotifcation, const LLSD& sdArgs = LLSD(), bool fLogToChat = false); +#else static void notifyBlocked(const std::string& strNotifcation, const LLSD& sdArgs = LLSD(), bool fLogToChat = false); - static void notifyBlockedGeneric() { notifyBlocked(RLV_STRING_BLOCKED_GENERIC); } - static void notifyBlockedViewXXX(LLAssetType::EType assetType) { notifyBlocked(RLV_STRING_BLOCKED_VIEWXXX, LLSD().with("[TYPE]", LLAssetType::lookup(assetType))); } +#endif // CATZNIP_STRINGVIEW + static void notifyBlockedGeneric() { notifyBlocked(RlvStringKeys::Blocked::Generic); } + static void notifyBlockedViewXXX(LLAssetType::EType assetType) { notifyBlocked(RlvStringKeys::Blocked::ViewXxx, LLSD().with("[TYPE]", LLAssetType::lookup(assetType))); } static void notifyFailedAssertion(const std::string& strAssert, const std::string& strFile, int nLine); static void sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null); @@ -332,5 +340,3 @@ inline bool RlvUtil::sendChatReply(const std::string& strChannel, const std::str } // ============================================================================ - -#endif // RLV_COMMON_H diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index a3938876a0..a419d945c3 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2009-2016, Kitty Barnett + * Copyright (c) 2009-2020, Kitty Barnett * * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; @@ -14,8 +14,11 @@ * */ -#ifndef RLV_DEFINES_H -#define RLV_DEFINES_H +#pragma once + +#ifdef CATZNIP_STRINGVIEW +#include "llstringview.h" +#endif // CATZNIP_STRINGVIE // ============================================================================ // Defines @@ -393,30 +396,72 @@ enum ERlvAttachGroupType // Strings (see rlva_strings.xml) // -#define RLV_STRING_HIDDEN "hidden_generic" -#define RLV_STRING_HIDDEN_PARCEL "hidden_parcel" -#define RLV_STRING_HIDDEN_REGION "hidden_region" +namespace RlvStringKeys +{ + namespace Blocked + { +#ifdef CATZNIP_STRINGVIEW + /*inline*/ constexpr boost::string_view AutoPilot = make_string_view("blocked_autopilot"); + /*inline*/ constexpr boost::string_view Generic = make_string_view("blocked_generic"); + /*inline*/ constexpr boost::string_view GroupChange = make_string_view("blocked_groupchange"); + /*inline*/ constexpr boost::string_view InvFolder = make_string_view("blocked_invfolder"); + /*inline*/ constexpr boost::string_view PermissionAttach = make_string_view("blocked_permattach"); + /*inline*/ constexpr boost::string_view PermissionTeleport = make_string_view("blocked_permteleport"); + /*inline*/ constexpr boost::string_view RecvIm = make_string_view("blocked_recvim"); + /*inline*/ constexpr boost::string_view RecvImRemote = make_string_view("blocked_recvim_remote"); + /*inline*/ constexpr boost::string_view SendIm = make_string_view("blocked_sendim"); + /*inline*/ constexpr boost::string_view StartConference = make_string_view("blocked_startconf"); + /*inline*/ constexpr boost::string_view StartIm = make_string_view("blocked_startim"); + /*inline*/ constexpr boost::string_view Teleport = make_string_view("blocked_teleport"); + /*inline*/ constexpr boost::string_view TeleportOffer = make_string_view("blocked_teleport_offer"); + /*inline*/ constexpr boost::string_view TpLureRequestRemote = make_string_view("blocked_tplurerequest_remote"); + /*inline*/ constexpr boost::string_view ViewXxx = make_string_view("blocked_viewxxx"); + /*inline*/ constexpr boost::string_view Wireframe = make_string_view("blocked_wireframe"); +#else + constexpr const char AutoPilot[] = "blocked_autopilot"; + constexpr const char Generic[] = "blocked_generic"; + constexpr const char GroupChange[] = "blocked_groupchange"; + constexpr const char InvFolder[] = "blocked_invfolder"; + constexpr const char PermissionAttach[] = "blocked_permattach"; + constexpr const char PermissionTeleport[] = "blocked_permteleport"; + constexpr const char RecvIm[] = "blocked_recvim"; + constexpr const char RecvImRemote[] = "blocked_recvim_remote"; + constexpr const char SendIm[] = "blocked_sendim"; + constexpr const char StartConference[] = "blocked_startconf"; + constexpr const char StartIm[] = "blocked_startim"; + constexpr const char Teleport[] = "blocked_teleport"; + constexpr const char TeleportOffer[] = "blocked_teleport_offer"; + constexpr const char TpLureRequestRemote[] = "blocked_tplurerequest_remote"; + constexpr const char ViewXxx[] = "blocked_viewxxx"; + constexpr const char Wireframe[] = "blocked_wireframe"; +#endif // CATZNIP_STRINGVIEW + } -#define RLV_STRING_BLOCKED_AUTOPILOT "blocked_autopilot" -#define RLV_STRING_BLOCKED_GENERIC "blocked_generic" -#define RLV_STRING_BLOCKED_GROUPCHANGE "blocked_groupchange" -#define RLV_STRING_BLOCKED_INVFOLDER "blocked_invfolder" -#define RLV_STRING_BLOCKED_PERMATTACH "blocked_permattach" -#define RLV_STRING_BLOCKED_PERMTELEPORT "blocked_permteleport" -#define RLV_STRING_BLOCKED_RECVIM "blocked_recvim" -#define RLV_STRING_BLOCKED_RECVIM_REMOTE "blocked_recvim_remote" -#define RLV_STRING_BLOCKED_SENDIM "blocked_sendim" -#define RLV_STRING_BLOCKED_STARTCONF "blocked_startconf" -#define RLV_STRING_BLOCKED_STARTIM "blocked_startim" -#define RLV_STRING_BLOCKED_TELEPORT "blocked_teleport" -#define RLV_STRING_BLOCKED_TELEPORT_OFFER "blocked_teleport_offer" -#define RLV_STRING_BLOCKED_TPLUREREQ_REMOTE "blocked_tplurerequest_remote" -#define RLV_STRING_BLOCKED_VIEWXXX "blocked_viewxxx" -#define RLV_STRING_BLOCKED_WIREFRAME "blocked_wireframe" -#define RLV_STRING_STOPIM_NOSESSION "stopim_nosession" -#define RLV_STRING_STOPIM_ENDSESSION_REMOTE "stopim_endsession_remote" -#define RLV_STRING_STOPIM_ENDSESSION_LOCAL "stopim_endsession_local" + namespace Hidden + { +#ifdef CATZNIP_STRINGVIEW + /*inline*/ constexpr boost::string_view Generic = make_string_view("hidden_generic"); + /*inline*/ constexpr boost::string_view Parcel = make_string_view("hidden_parcel"); + /*inline*/ constexpr boost::string_view Region = make_string_view("hidden_region"); +#else + constexpr const char Generic[] = "hidden_generic"; + constexpr const char Parcel[] = "hidden_parcel"; + constexpr const char Region[] = "hidden_region"; +#endif // CATZNIP_STRINGVIEW + } + + namespace StopIm + { +#ifdef CATZNIP_STRINGVIEW + /*inline*/ constexpr boost::string_view NoSession = make_string_view("stopim_nosession"); + /*inline*/ constexpr boost::string_view EndSessionRemote = make_string_view("stopim_endsession_remote"); + /*inline*/ constexpr boost::string_view EndSessionLocal = make_string_view("stopim_endsession_local"); +#else + constexpr const char NoSession[] = "stopim_nosession"; + constexpr const char EndSessionRemote[] = "stopim_endsession_remote"; + constexpr const char EndSessionLocal[] = "stopim_endsession_local"; +#endif // CATZNIP_STRINGVIEW + } +} // ============================================================================ - -#endif // RLV_DEFINES_H diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 82d92a5a9a..d717fdc745 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -631,11 +631,11 @@ bool RlvHandler::processIMQuery(const LLUUID& idSender, const std::string& strMe // If the user can't start an IM session terminate it (if one is open) - always notify the sender in this case if (!RlvActions::canStartIM(idSender, true)) { - RlvUtil::sendBusyMessage(idSender, RlvStrings::getString(RLV_STRING_STOPIM_ENDSESSION_REMOTE)); + RlvUtil::sendBusyMessage(idSender, RlvStrings::getString(RlvStringKeys::StopIm::EndSessionRemote)); if (RlvActions::hasOpenP2PSession(idSender)) { LLAvatarActions::endIM(idSender); - RlvUtil::notifyBlocked(RLV_STRING_STOPIM_ENDSESSION_LOCAL, LLSD().with("NAME", LLSLURL("agent", idSender, "about").getSLURLString()), true); + RlvUtil::notifyBlocked(RlvStringKeys::StopIm::EndSessionLocal, LLSD().with("NAME", LLSLURL("agent", idSender, "about").getSLURLString()), true); } return true; } @@ -643,7 +643,7 @@ bool RlvHandler::processIMQuery(const LLUUID& idSender, const std::string& strMe // User can start an IM session so we do nothing - notify and hide it from the user only if IM queries are enabled if (!RlvSettings::getEnableIMQuery()) return false; - RlvUtil::sendBusyMessage(idSender, RlvStrings::getString(RLV_STRING_STOPIM_NOSESSION)); + RlvUtil::sendBusyMessage(idSender, RlvStrings::getString(RlvStringKeys::StopIm::NoSession)); return true; } else if (RlvSettings::getEnableIMQuery()) @@ -766,7 +766,7 @@ void RlvHandler::onActiveGroupChanged() // Notify them about the change const LLSD sdArgs = LLSD().with("GROUP_SLURL", (m_idAgentGroup.notNull()) ? llformat("secondlife:///app/group/%s/about", m_idAgentGroup.asString().c_str()) : "(none)"); - RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_GROUPCHANGE, sdArgs); + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::GroupChange, sdArgs); setActiveGroup(m_idAgentGroup); } From 7256da3e34490a3ed5eb7423bfe5e2e44d68de93 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 01:56:47 +0200 Subject: [PATCH 137/153] RLVa string constants rework (part 2) --- indra/newview/llstartup.cpp | 4 +- indra/newview/llviewercontrol.cpp | 2 +- indra/newview/llviewermessage.cpp | 4 +- indra/newview/rlvcommon.cpp | 38 ++++++++-------- indra/newview/rlvcommon.h | 34 ++++++++------ indra/newview/rlvdefines.h | 74 +++++++++++++++++++++---------- indra/newview/rlvextensions.cpp | 4 +- indra/newview/rlvhandler.cpp | 4 +- indra/newview/rlvlocks.cpp | 2 +- 9 files changed, 100 insertions(+), 66 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7965b70b3e..606724e44f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -719,7 +719,7 @@ bool idle_startup() } // [RLVa:KB] - Patch: RLVa-2.1.0 - if (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) + if (gSavedSettings.get(RlvSettingNames::Main)) { show_connect_box = TRUE; } @@ -874,7 +874,7 @@ bool idle_startup() } // [RLVa:KB] - Checked: RLVa-0.2.1 - if (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) + if (gSavedSettings.get(RlvSettingNames::Main)) { RlvHandler::setEnabled(true); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 007fb0e339..6fc15c321d 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -778,7 +778,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderAutoMuteByteLimit")->getSignal()->connect(boost::bind(&handleRenderAutoMuteByteLimitChanged, _2)); gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&handleAvatarHoverOffsetChanged, _2)); // [RLVa:KB] - Checked: 2015-12-27 (RLVa-1.5.0) - gSavedSettings.getControl("RestrainedLove")->getSignal()->connect(boost::bind(&RlvSettings::onChangedSettingMain, _2)); + gSavedSettings.getControl(RlvSettingNames::Main)->getSignal()->connect(boost::bind(&RlvSettings::onChangedSettingMain, _2)); // [/RLVa:KB] } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d3ffd28d10..0ec1ea0210 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2660,14 +2660,14 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) (((gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHAT)) && (!gRlvHandler.isException(RLV_BHVR_RECVCHAT, from_id))) || ((gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHATFROM)) && (gRlvHandler.isException(RLV_BHVR_RECVCHATFROM, from_id))) )) { - if ( (gRlvHandler.filterChat(mesg, false)) && (!gSavedSettings.getBOOL("RestrainedLoveShowEllipsis")) ) + if ( (gRlvHandler.filterChat(mesg, false)) && (!gSavedSettings.get(RlvSettingNames::ShowEllipsis)) ) return; } else if ((fIsEmote) && (((gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTE)) && (!gRlvHandler.isException(RLV_BHVR_RECVEMOTE, from_id))) || ((gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTEFROM)) && (gRlvHandler.isException(RLV_BHVR_RECVEMOTEFROM, from_id))) )) { - if (!gSavedSettings.getBOOL("RestrainedLoveShowEllipsis")) + if (!gSavedSettings.get(RlvSettingNames::ShowEllipsis)) return; mesg = "/me ..."; } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 202f5860dc..37a7fbea0c 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -100,9 +100,9 @@ void RlvSettings::initClass() { initCompatibilityMode(LLStringUtil::null); - s_fTempAttach = rlvGetSetting(RLV_SETTING_ENABLETEMPATTACH, true); - if (gSavedSettings.controlExists(RLV_SETTING_ENABLETEMPATTACH)) - gSavedSettings.getControl(RLV_SETTING_ENABLETEMPATTACH)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fTempAttach)); + s_fTempAttach = rlvGetSetting(RlvSettingNames::EnableTempAttach, true); + if (gSavedSettings.controlExists(RlvSettingNames::EnableTempAttach)) + gSavedSettings.getControl(RlvSettingNames::EnableTempAttach)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fTempAttach)); #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS s_fCompositeFolders = rlvGetSetting(RLV_SETTING_ENABLECOMPOSITES, false); @@ -110,19 +110,19 @@ void RlvSettings::initClass() gSavedSettings.getControl(RLV_SETTING_ENABLECOMPOSITES)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fCompositeFolders)); #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS - s_fLegacyNaming = rlvGetSetting(RLV_SETTING_ENABLELEGACYNAMING, true); - if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) - gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fLegacyNaming)); + s_fLegacyNaming = rlvGetSetting(RlvSettingNames::EnableLegacyNaming, true); + if (gSavedSettings.controlExists(RlvSettingNames::EnableLegacyNaming)) + gSavedSettings.getControl(RlvSettingNames::EnableLegacyNaming)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &s_fLegacyNaming)); - s_fCanOOC = rlvGetSetting(RLV_SETTING_CANOOC, true); - s_fNoSetEnv = rlvGetSetting(RLV_SETTING_NOSETENV, false); + s_fCanOOC = rlvGetSetting(RlvSettingNames::CanOoc, true); + s_fNoSetEnv = rlvGetSetting(RlvSettingNames::NoSetEnv, false); // Don't allow toggling RLVaLoginLastLocation from the debug settings floater - if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) - gSavedPerAccountSettings.getControl(RLV_SETTING_LOGINLASTLOCATION)->setHiddenFromSettingsEditor(true); + if (gSavedPerAccountSettings.controlExists(RlvSettingNames::LoginLastLocation)) + gSavedPerAccountSettings.getControl(RlvSettingNames::LoginLastLocation)->setHiddenFromSettingsEditor(true); - if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU)) - gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel)); + if (gSavedSettings.controlExists(RlvSettingNames::TopLevelMenu)) + gSavedSettings.getControl(RlvSettingNames::TopLevelMenu)->getSignal()->connect(boost::bind(&onChangedMenuLevel)); int nMinMaturity = gSavedSettings.getS32("RLVaExperienceMaturityThreshold"); s_nExperienceMinMaturity = (nMinMaturity == 0) ? 0 : ((nMinMaturity == 1) ? SIM_ACCESS_PG : ((nMinMaturity == 2) ? SIM_ACCESS_MATURE : SIM_ACCESS_ADULT)); @@ -136,12 +136,12 @@ void RlvSettings::initClass() // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d void RlvSettings::updateLoginLastLocation() { - if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) + if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RlvSettingNames::LoginLastLocation)) ) { - BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); - if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) + bool fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); + if (gSavedPerAccountSettings.get(RlvSettingNames::LoginLastLocation) != fValue) { - gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); + gSavedPerAccountSettings.set(RlvSettingNames::LoginLastLocation, fValue); gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); } } @@ -607,7 +607,7 @@ void RlvUtil::notifyFailedAssertion(const std::string& strAssert, const std::str // Don't show the same assertion over and over, or if the user opted out static std::string strAssertPrev, strFilePrev; static int nLinePrev; if ( ((strAssertPrev == strAssert) && (strFile == strFilePrev) && (nLine == nLinePrev)) || - (!rlvGetSetting(RLV_SETTING_SHOWASSERTIONFAIL, true)) ) + (!rlvGetSetting(RlvSettingNames::ShowAssertionFail, true)) ) { return; } @@ -705,7 +705,7 @@ bool rlvMenuMainToggleVisible(LLUICtrl* pMenuCtrl) if (pMenuItem) { static std::string strLabel = pMenuItem->getLabel(); - if ((bool)gSavedSettings.getBOOL(RLV_SETTING_MAIN) == rlv_handler_t::isEnabled()) + if ((bool)gSavedSettings.get(RlvSettingNames::Main) == rlv_handler_t::isEnabled()) pMenuItem->setLabel(strLabel); else pMenuItem->setLabel(strLabel + " " + LLTrans::getString("RLVaPendingRestart")); @@ -716,7 +716,7 @@ bool rlvMenuMainToggleVisible(LLUICtrl* pMenuCtrl) // Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b void rlvMenuToggleVisible() { - bool fTopLevel = rlvGetSetting(RLV_SETTING_TOPLEVELMENU, true); + bool fTopLevel = rlvGetSetting(RlvSettingNames::TopLevelMenu, true); bool fRlvEnabled = rlv_handler_t::isEnabled(); LLMenuGL* pRLVaMenuMain = gMenuBarView->findChildMenuByName("RLVa Main", FALSE); diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index dcd40babf2..216b5320d3 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -63,13 +63,21 @@ class RlvGCTimer; // RlvSettings // +#ifdef CATZNIP_STRINGVIEW +template inline T rlvGetSetting(const boost::string_view& strSetting, const T& defaultValue) +#else template inline T rlvGetSetting(const std::string& strSetting, const T& defaultValue) +#endif // CATZNIP_STRINGVIEW { RLV_ASSERT_DBG(gSavedSettings.controlExists(strSetting)); return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.get(strSetting) : defaultValue; } +#ifdef CATZNIP_STRINGVIEW +template inline T rlvGetPerUserSetting(const boost::string_view& strSetting, const T& defaultValue) +#else template inline T rlvGetPerUserSetting(const std::string& strSetting, const T& defaultValue) +#endif // CATZNIP_STRINGVIEW { RLV_ASSERT_DBG(gSavedPerAccountSettings.controlExists(strSetting)); return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.get(strSetting) : defaultValue; @@ -78,29 +86,29 @@ template inline T rlvGetPerUserSetting(const std::string& strSetting class RlvSettings { public: - static bool getDebug() { return rlvGetSetting(RLV_SETTING_DEBUG, false); } + static bool getDebug() { return rlvGetSetting(RlvSettingNames::Debug, false); } static bool getCanOOC() { return s_fCanOOC; } - static bool getForbidGiveToRLV() { return rlvGetSetting(RLV_SETTING_FORBIDGIVETORLV, true); } + static bool getForbidGiveToRLV() { return rlvGetSetting(RlvSettingNames::ForbidGiveToRlv, true); } static bool getNoSetEnv() { return s_fNoSetEnv; } - static std::string getWearAddPrefix() { return rlvGetSetting(RLV_SETTING_WEARADDPREFIX, LLStringUtil::null); } - static std::string getWearReplacePrefix() { return rlvGetSetting(RLV_SETTING_WEARREPLACEPREFIX, LLStringUtil::null); } + static std::string getWearAddPrefix() { return rlvGetSetting(RlvSettingNames::WearAddPrefix, LLStringUtil::null); } + static std::string getWearReplacePrefix() { return rlvGetSetting(RlvSettingNames::WearReplacePrefix, LLStringUtil::null); } - static bool getDebugHideUnsetDup() { return rlvGetSetting(RLV_SETTING_DEBUGHIDEUNSETDUP, false); } + static bool getDebugHideUnsetDup() { return rlvGetSetting(RlvSettingNames::DebugHideUnsetDup, false); } #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS static BOOL getEnableComposites() { return s_fCompositeFolders; } #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static bool getEnableIMQuery() { return rlvGetSetting("RLVaEnableIMQuery", true); } + static bool getEnableIMQuery() { return rlvGetSetting(RlvSettingNames::EnableIMQuery, true); } static bool getEnableLegacyNaming() { return s_fLegacyNaming; } - static bool getEnableSharedWear() { return rlvGetSetting(RLV_SETTING_ENABLESHAREDWEAR, false); } + static bool getEnableSharedWear() { return rlvGetSetting(RlvSettingNames::EnableSharedWear, false); } static bool getEnableTemporaryAttachments() { return s_fTempAttach; } - static bool getHideLockedLayers() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDLAYER, false); } - static bool getHideLockedAttach() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDATTACH, false); } - static bool getHideLockedInventory() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDINVENTORY, false); } - static bool getSharedInvAutoRename() { return rlvGetSetting(RLV_SETTING_SHAREDINVAUTORENAME, true); } - static bool getSplitRedirectChat() { return rlvGetSetting(RLV_SETTING_SPLITREDIRECTCHAT, false); } + static bool getHideLockedLayers() { return rlvGetSetting(RlvSettingNames::HideLockedLayer, false); } + static bool getHideLockedAttach() { return rlvGetSetting(RlvSettingNames::HideLockedAttach, false); } + static bool getHideLockedInventory() { return rlvGetSetting(RlvSettingNames::HideLockedInventory, false); } + static bool getSharedInvAutoRename() { return rlvGetSetting(RlvSettingNames::SharedInvAutoRename, true); } + static bool getSplitRedirectChat() { return rlvGetSetting(RlvSettingNames::SplitRedirectChat, false); } - static bool getLoginLastLocation() { return rlvGetPerUserSetting(RLV_SETTING_LOGINLASTLOCATION, true); } + static bool getLoginLastLocation() { return rlvGetPerUserSetting(RlvSettingNames::LoginLastLocation, true); } static void updateLoginLastLocation(); static void initCompatibilityMode(std::string strCompatList); diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index a419d945c3..355eb4f977 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -365,32 +365,58 @@ enum ERlvAttachGroupType // Settings // -#define RLV_SETTING_MAIN "RestrainedLove" -#define RLV_SETTING_DEBUG "RestrainedLoveDebug" -#define RLV_SETTING_CANOOC "RestrainedLoveCanOOC" -#define RLV_SETTING_FORBIDGIVETORLV "RestrainedLoveForbidGiveToRLV" -#define RLV_SETTING_NOSETENV "RestrainedLoveNoSetEnv" -#define RLV_SETTING_SHOWELLIPSIS "RestrainedLoveShowEllipsis" -#define RLV_SETTING_WEARADDPREFIX "RestrainedLoveStackWhenFolderBeginsWith" -#define RLV_SETTING_WEARREPLACEPREFIX "RestrainedLoveReplaceWhenFolderBeginsWith" +namespace RlvSettingNames +{ +#ifdef CATZNIP_STRINGVIEW + /*inline*/ constexpr boost::string_view Main = make_string_view("RestrainedLove"); + /*inline*/ constexpr boost::string_view Debug = make_string_view("RestrainedLoveDebug"); + /*inline*/ constexpr boost::string_view CanOoc = make_string_view("RestrainedLoveCanOOC"); + /*inline*/ constexpr boost::string_view ForbidGiveToRlv = make_string_view("RestrainedLoveForbidGiveToRLV"); + /*inline*/ constexpr boost::string_view NoSetEnv = make_string_view("RestrainedLoveNoSetEnv"); + /*inline*/ constexpr boost::string_view ShowEllipsis = make_string_view("RestrainedLoveShowEllipsis"); + /*inline*/ constexpr boost::string_view WearAddPrefix = make_string_view("RestrainedLoveStackWhenFolderBeginsWith"); + /*inline*/ constexpr boost::string_view WearReplacePrefix = make_string_view("RestrainedLoveReplaceWhenFolderBeginsWith"); -#define RLV_SETTING_DEBUGHIDEUNSETDUP "RLVaDebugHideUnsetDuplicate" -#define RLV_SETTING_ENABLECOMPOSITES "RLVaEnableCompositeFolders" -#define RLV_SETTING_ENABLELEGACYNAMING "RLVaEnableLegacyNaming" -#define RLV_SETTING_ENABLESHAREDWEAR "RLVaEnableSharedWear" -#define RLV_SETTING_ENABLETEMPATTACH "RLVaEnableTemporaryAttachments" -#define RLV_SETTING_HIDELOCKEDLAYER "RLVaHideLockedLayers" -#define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments" -#define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory" -#define RLV_SETTING_LOGINLASTLOCATION "RLVaLoginLastLocation" -#define RLV_SETTING_SHAREDINVAUTORENAME "RLVaSharedInvAutoRename" -#define RLV_SETTING_SHOWASSERTIONFAIL "RLVaShowAssertionFailures" -#define RLV_SETTING_SPLITREDIRECTCHAT "RLVaSplitRedirectChat" -#define RLV_SETTING_TOPLEVELMENU "RLVaTopLevelMenu" -#define RLV_SETTING_WEARREPLACEUNLOCKED "RLVaWearReplaceUnlocked" + /*inline*/ constexpr boost::string_view DebugHideUnsetDup = make_string_view("RLVaDebugHideUnsetDuplicate"); + /*inline*/ constexpr boost::string_view EnableIMQuery = make_string_view("RLVaEnableIMQuery"); + /*inline*/ constexpr boost::string_view EnableLegacyNaming = make_string_view("RLVaEnableLegacyNaming"); + /*inline*/ constexpr boost::string_view EnableSharedWear = make_string_view("RLVaEnableSharedWear"); + /*inline*/ constexpr boost::string_view EnableTempAttach = make_string_view("RLVaEnableTemporaryAttachments"); + /*inline*/ constexpr boost::string_view HideLockedLayer = make_string_view("RLVaHideLockedLayers"); + /*inline*/ constexpr boost::string_view HideLockedAttach = make_string_view("RLVaHideLockedAttachments"); + /*inline*/ constexpr boost::string_view HideLockedInventory = make_string_view("RLVaHideLockedInventory"); + /*inline*/ constexpr boost::string_view LoginLastLocation = make_string_view("RLVaLoginLastLocation"); + /*inline*/ constexpr boost::string_view SharedInvAutoRename = make_string_view("RLVaSharedInvAutoRename"); + /*inline*/ constexpr boost::string_view ShowAssertionFail = make_string_view("RLVaShowAssertionFailures"); + /*inline*/ constexpr boost::string_view SplitRedirectChat = make_string_view("RLVaSplitRedirectChat"); + /*inline*/ constexpr boost::string_view TopLevelMenu = make_string_view("RLVaTopLevelMenu"); + /*inline*/ constexpr boost::string_view WearReplaceUnlocked = make_string_view("RLVaWearReplaceUnlocked"); +#else + constexpr const char Main[] = "RestrainedLove"; + constexpr const char Debug[] = "RestrainedLoveDebug"; + constexpr const char CanOoc[] = "RestrainedLoveCanOOC"; + constexpr const char ForbidGiveToRlv[] = "RestrainedLoveForbidGiveToRLV"; + constexpr const char NoSetEnv[] = "RestrainedLoveNoSetEnv"; + constexpr const char ShowEllipsis[] = "RestrainedLoveShowEllipsis"; + constexpr const char WearAddPrefix[] = "RestrainedLoveStackWhenFolderBeginsWith"; + constexpr const char WearReplacePrefix[] = "RestrainedLoveReplaceWhenFolderBeginsWith"; -#define RLV_SETTING_FIRSTUSE_PREFIX "FirstRLV" -#define RLV_SETTING_FIRSTUSE_GIVETORLV RLV_SETTING_FIRSTUSE_PREFIX"GiveToRLV" + constexpr const char DebugHideUnsetDup[] = "RLVaDebugHideUnsetDuplicate"; + constexpr const char EnableIMQuery[] = "RLVaEnableIMQuery"; + constexpr const char EnableLegacyNaming[] = "RLVaEnableLegacyNaming"; + constexpr const char EnableSharedWear[] = "RLVaEnableSharedWear"; + constexpr const char EnableTempAttach[] = "RLVaEnableTemporaryAttachments"; + constexpr const char HideLockedLayer[] = "RLVaHideLockedLayers"; + constexpr const char HideLockedAttach[] = "RLVaHideLockedAttachments"; + constexpr const char HideLockedInventory[] = "RLVaHideLockedInventory"; + constexpr const char LoginLastLocation[] = "RLVaLoginLastLocation"; + constexpr const char SharedInvAutoRename[] = "RLVaSharedInvAutoRename"; + constexpr const char ShowAssertionFail[] = "RLVaShowAssertionFailures"; + constexpr const char SplitRedirectChat[] = "RLVaSplitRedirectChat"; + constexpr const char TopLevelMenu[] = "RLVaTopLevelMenu"; + constexpr const char WearReplaceUnlocked[] = "RLVaWearReplaceUnlocked"; +#endif // CATZNIP_STRINGVIEW +} // ============================================================================ // Strings (see rlva_strings.xml) diff --git a/indra/newview/rlvextensions.cpp b/indra/newview/rlvextensions.cpp index 4612331c96..9a44df6778 100644 --- a/indra/newview/rlvextensions.cpp +++ b/indra/newview/rlvextensions.cpp @@ -35,8 +35,8 @@ RlvExtGetSet::RlvExtGetSet() { m_DbgAllowed.insert(std::pair("AvatarSex", DBG_READ | DBG_WRITE | DBG_PSEUDO)); m_DbgAllowed.insert(std::pair("RenderResolutionDivisor", DBG_READ | DBG_WRITE)); - m_DbgAllowed.insert(std::pair(RLV_SETTING_FORBIDGIVETORLV, DBG_READ)); - m_DbgAllowed.insert(std::pair(RLV_SETTING_NOSETENV, DBG_READ)); + m_DbgAllowed.insert(std::pair(RlvSettingNames::ForbidGiveToRlv, DBG_READ)); + m_DbgAllowed.insert(std::pair(RlvSettingNames::NoSetEnv, DBG_READ)); m_DbgAllowed.insert(std::pair("WindLightUseAtmosShaders", DBG_READ)); // Cache persistance of every setting diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index d717fdc745..0fce3168fa 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1240,7 +1240,7 @@ bool RlvHandler::filterChat(std::string& strUTF8Text, bool fFilterEmote) const } if (fFilter) - strUTF8Text = (gSavedSettings.getBOOL("RestrainedLoveShowEllipsis")) ? "..." : ""; + strUTF8Text = (gSavedSettings.get(RlvSettingNames::ShowEllipsis)) ? "..." : ""; return fFilter; } @@ -1520,7 +1520,7 @@ bool RlvHandler::setEnabled(bool fEnable) // Reset to show assertions if the viewer version changed if (gSavedSettings.getString("LastRunVersion") != gLastRunVersion) - gSavedSettings.setBOOL("RLVaShowAssertionFailures", TRUE); + gSavedSettings.set(RlvSettingNames::ShowAssertionFail, TRUE); } return m_fEnabled; diff --git a/indra/newview/rlvlocks.cpp b/indra/newview/rlvlocks.cpp index 7463386853..4b94e34fdf 100644 --- a/indra/newview/rlvlocks.cpp +++ b/indra/newview/rlvlocks.cpp @@ -631,7 +631,7 @@ void RlvAttachmentLockWatchdog::onAttach(const LLViewerObject* pAttachObj, const if ( (pAttachObj != *itAttachObj) && (gRlvAttachmentLocks.isLockedAttachment(*itAttachObj)) ) { // Fail if we encounter a non-detachable attachment (unless we're only replacing detachable attachments) - if (gSavedSettings.getBOOL("RLVaWearReplaceUnlocked")) + if (gSavedSettings.get(RlvSettingNames::WearReplaceUnlocked)) idsAttachObjExcept.push_back((*itAttachObj)->getID()); else fAttachAllowed = false; From fdaeeb38daf0ba3a0373b53a9d3430664836733b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 02:37:04 +0200 Subject: [PATCH 138/153] Switch ERlvExceptionCheck to a C++0x enum + minor code review/cleanup (no functional changes) --- indra/newview/llviewermessage.cpp | 2 +- indra/newview/rlvactions.cpp | 14 ++++++------ indra/newview/rlvdefines.h | 8 +++---- indra/newview/rlvhandler.cpp | 38 ++++++++++++++----------------- indra/newview/rlvhandler.h | 14 +++++++++++- indra/newview/rlvhelper.h | 15 ------------ 6 files changed, 42 insertions(+), 49 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0ec1ea0210..1631adbc1c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6665,7 +6665,7 @@ void handle_lure(const uuid_vec_t& ids) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(idAgent); - if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, idAgent, RLV_CHECK_PERMISSIVE)) && + if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, idAgent, ERlvExceptionCheck::Permissive)) && ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) { RlvUtil::notifyBlocked(RlvStringKeys::Blocked::TeleportOffer); diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 671b2a8414..1728717cce 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -454,7 +454,7 @@ bool RlvActions::canShowHoverText(const LLViewerObject *pObj) !( (rlvHandler.hasBehaviour(RLV_BHVR_SHOWHOVERTEXTALL)) || ( (rlvHandler.hasBehaviour(RLV_BHVR_SHOWHOVERTEXTWORLD)) && (!pObj->isHUDAttachment()) ) || ( (rlvHandler.hasBehaviour(RLV_BHVR_SHOWHOVERTEXTHUD)) && (pObj->isHUDAttachment()) ) || - (rlvHandler.isException(RLV_BHVR_SHOWHOVERTEXT, pObj->getID(), RLV_CHECK_PERMISSIVE)) ) ); + (rlvHandler.isException(RLV_BHVR_SHOWHOVERTEXT, pObj->getID(), ERlvExceptionCheck::Permissive)) ) ); } // Handles: @touchall, @touchthis, @touchworld, @touchattach, @touchattachself, @touchattachother, @touchhud, @touchme and @fartouch @@ -501,28 +501,28 @@ bool RlvActions::canTouch(const LLViewerObject* pObj, const LLVector3& posOffset bool fCanTouch = (idRoot.notNull()) && ( (pObj->isHUDAttachment()) || (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHALL)) ) && - ( (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHTHIS)) || (!rlvHandler.isException(RLV_BHVR_TOUCHTHIS, idRoot, RLV_CHECK_PERMISSIVE)) ); + ( (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHTHIS)) || (!rlvHandler.isException(RLV_BHVR_TOUCHTHIS, idRoot, ERlvExceptionCheck::Permissive)) ); if (fCanTouch) { if ( (!pObj->isAttachment()) || (!pObj->permYouOwner()) ) { // Rezzed or attachment worn by other - test for (1.c), (2.d), (2.e) and (1/2.h) fCanTouch = - ( (!pObj->isAttachment()) ? (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHWORLD)) || (rlvHandler.isException(RLV_BHVR_TOUCHWORLD, idRoot, RLV_CHECK_PERMISSIVE)) - : ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACH)) && (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACHOTHER))) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, RLV_CHECK_PERMISSIVE)) ) && + ( (!pObj->isAttachment()) ? (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHWORLD)) || (rlvHandler.isException(RLV_BHVR_TOUCHWORLD, idRoot, ERlvExceptionCheck::Permissive)) + : ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACH)) && (!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACHOTHER))) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, ERlvExceptionCheck::Permissive)) ) && ( (!rlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) <= s_nFartouchDist * s_nFartouchDist) ); } else if (!pObj->isHUDAttachment()) { // Regular attachment worn by this avie - test for (3.d), (3.e) and (3.h) fCanTouch = - ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACH)) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, RLV_CHECK_PERMISSIVE))) && - ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACHSELF)) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, RLV_CHECK_PERMISSIVE))); + ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACH)) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, ERlvExceptionCheck::Permissive))) && + ((!rlvHandler.hasBehaviour(RLV_BHVR_TOUCHATTACHSELF)) || (rlvHandler.isException(RLV_BHVR_TOUCHATTACH, idRoot, ERlvExceptionCheck::Permissive))); } else { // HUD attachment - test for (4.g) - fCanTouch = (!hasBehaviour(RLV_BHVR_TOUCHHUD)) || (rlvHandler.isException(RLV_BHVR_TOUCHHUD, idRoot, RLV_CHECK_PERMISSIVE)); + fCanTouch = (!hasBehaviour(RLV_BHVR_TOUCHHUD)) || (rlvHandler.isException(RLV_BHVR_TOUCHHUD, idRoot, ERlvExceptionCheck::Permissive)); } } // Post-check for (1/2/3/4i) diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 355eb4f977..bf1a0e0835 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -327,11 +327,11 @@ enum ERlvCmdRet { }; #define RLV_RET_SUCCEEDED(eCmdRet) (((eCmdRet) & RLV_RET_SUCCESS) == RLV_RET_SUCCESS) -enum ERlvExceptionCheck +enum class ERlvExceptionCheck { - RLV_CHECK_PERMISSIVE, // Exception can be set by any object - RLV_CHECK_STRICT, // Exception must be set by all objects holding the restriction - RLV_CHECK_DEFAULT // Permissive or strict will be determined by currently enforced restrictions + Permissive, // Exception can be set by any object + Strict, // Exception must be set by all objects holding the restriction + Default, // Permissive or strict will be determined by currently enforced restrictions }; enum ERlvLockMask diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 0fce3168fa..fa73b1d527 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -257,35 +257,34 @@ bool RlvHandler::ownsBehaviour(const LLUUID& idObj, ERlvBehaviour eBhvr) const // Behaviour exception handling // -// Checked: 2009-10-04 (RLVa-1.0.4a) | Modified: RLVa-1.0.4a void RlvHandler::addException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption) { - m_Exceptions.insert(std::pair(eBhvr, RlvException(idObj, eBhvr, varOption))); + m_Exceptions.insert(std::make_pair(eBhvr, RlvException(idObj, eBhvr, varOption))); } -// Checked: 2009-10-04 (RLVa-1.0.4c) | Modified: RLVa-1.0.4c -bool RlvHandler::isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck typeCheck) const +bool RlvHandler::isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck eCheckType) const { // We need to "strict check" exceptions only if: the restriction is actually in place *and* (isPermissive(eBhvr) == FALSE) - if (RLV_CHECK_DEFAULT == typeCheck) - typeCheck = ( (hasBehaviour(eBhvr)) && (!isPermissive(eBhvr)) ) ? RLV_CHECK_STRICT : RLV_CHECK_PERMISSIVE; + if (ERlvExceptionCheck::Default == eCheckType) + eCheckType = ( (hasBehaviour(eBhvr)) && (!isPermissive(eBhvr)) ) ? ERlvExceptionCheck::Strict : ERlvExceptionCheck::Permissive; uuid_vec_t objList; - if (RLV_CHECK_STRICT == typeCheck) + if (ERlvExceptionCheck::Strict == eCheckType) { // If we're "strict checking" then we need the UUID of every object that currently has 'eBhvr' restricted - for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) - if (itObj->second.hasBehaviour(eBhvr, !hasBehaviour(RLV_BHVR_PERMISSIVE))) - objList.push_back(itObj->first); + for (const auto& objEntry : m_Objects) + { + if (objEntry.second.hasBehaviour(eBhvr, !hasBehaviour(RLV_BHVR_PERMISSIVE))) + objList.push_back(objEntry.first); + } } - for (rlv_exception_map_t::const_iterator itException = m_Exceptions.lower_bound(eBhvr), - endException = m_Exceptions.upper_bound(eBhvr); itException != endException; ++itException) + for (rlv_exception_map_t::const_iterator itException = m_Exceptions.lower_bound(eBhvr), endException = m_Exceptions.upper_bound(eBhvr); itException != endException; ++itException) { if (itException->second.varOption == varOption) { // For permissive checks we just return on the very first match - if (RLV_CHECK_PERMISSIVE == typeCheck) + if (ERlvExceptionCheck::Permissive == eCheckType) return true; // For strict checks we don't return until the list is empty (every object with 'eBhvr' restricted also contains the exception) @@ -299,19 +298,16 @@ bool RlvHandler::isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varO return false; } -// Checked: 2009-10-04 (RLVa-1.0.4a) | Modified: RLVa-1.0.4a bool RlvHandler::isPermissive(ERlvBehaviour eBhvr) const { - return (RlvBehaviourDictionary::instance().getHasStrict(eBhvr)) - ? !((hasBehaviour(RLV_BHVR_PERMISSIVE)) || (isException(RLV_BHVR_PERMISSIVE, eBhvr, RLV_CHECK_PERMISSIVE))) + return (RlvBehaviourDictionary::instance().getHasStrict(eBhvr)) + ? !((hasBehaviour(RLV_BHVR_PERMISSIVE)) || (isException(RLV_BHVR_PERMISSIVE, eBhvr, ERlvExceptionCheck::Permissive))) : true; } -// Checked: 2009-10-04 (RLVa-1.0.4a) | Modified: RLVa-1.0.4a void RlvHandler::removeException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption) { - for (rlv_exception_map_t::iterator itException = m_Exceptions.lower_bound(eBhvr), - endException = m_Exceptions.upper_bound(eBhvr); itException != endException; ++itException) + for (rlv_exception_map_t::iterator itException = m_Exceptions.lower_bound(eBhvr), endException = m_Exceptions.upper_bound(eBhvr); itException != endException; ++itException) { if ( (itException->second.idObject == idObj) && (itException->second.varOption == varOption) ) { @@ -1746,9 +1742,9 @@ ERlvCmdRet RlvBehaviourGenericHandler::onCommand(const Rlv return RLV_RET_FAILED_OPTION; if (RLV_TYPE_ADD == rlvCmd.getParamType()) - gRlvHandler.addException(rlvCmd.getObjectID(), rlvCmd.getBehaviourType(), idException); + RlvHandler::instance().addException(rlvCmd.getObjectID(), rlvCmd.getBehaviourType(), idException); else - gRlvHandler.removeException(rlvCmd.getObjectID(), rlvCmd.getBehaviourType(), idException); + RlvHandler::instance().removeException(rlvCmd.getObjectID(), rlvCmd.getBehaviourType(), idException); fRefCount = true; return RLV_RET_SUCCESS; diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h index 32eda85137..c5b20de417 100644 --- a/indra/newview/rlvhandler.h +++ b/indra/newview/rlvhandler.h @@ -77,7 +77,7 @@ public: // Returns TRUE if the specified behaviour has an added exception bool hasException(ERlvBehaviour eBhvr) const; // Returns TRUE if the specified option was added as an exception for the specified behaviour - bool isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck typeCheck = RLV_CHECK_DEFAULT) const; + bool isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck eCheckType = ERlvExceptionCheck::Default) const; // Returns TRUE if the specified behaviour should behave "permissive" (rather than "strict"/"secure") bool isPermissive(ERlvBehaviour eBhvr) const; @@ -235,6 +235,18 @@ public: typedef std::map rlv_object_map_t; typedef std::tuple rlv_blocked_object_t; typedef std::list rlv_blocked_object_list_t; + + struct RlvException + { + public: + LLUUID idObject; // UUID of the object that added the exception + ERlvBehaviour eBehaviour; // Behaviour the exception applies to + RlvExceptionOption varOption; // Exception data (type is dependent on eBehaviour) + + RlvException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& option) : idObject(idObj), eBehaviour(eBhvr), varOption(option) {} + private: + RlvException(); + }; typedef std::multimap rlv_exception_map_t; protected: rlv_object_map_t m_Objects; // Map of objects that have active restrictions (idObj -> RlvObject) diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index cbe79ec57a..b83d29cc13 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -622,21 +622,6 @@ protected: boost::signals2::connection m_ConnCommand; }; -// ============================================================================ -// RlvException -// - -struct RlvException -{ -public: - LLUUID idObject; // UUID of the object that added the exception - ERlvBehaviour eBehaviour; // Behaviour the exception applies to - RlvExceptionOption varOption; // Exception data (type is dependent on eBehaviour) - - RlvException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& option) : idObject(idObj), eBehaviour(eBhvr), varOption(option) {} -private: - RlvException(); -}; // ============================================================================ // Various helper classes/timers/functors From 19476954c8516cb7b2b145c269fc45e4de213cbb Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 12:15:59 +0200 Subject: [PATCH 139/153] [FIXED] Crash when accepting a give-to-#RLV task offer since the EEP merge --- indra/newview/llinventorymodel.cpp | 16 +++++++++-- indra/newview/llinventorymodel.h | 11 +++++++- indra/newview/rlvinventory.cpp | 44 ++++++++++++------------------ indra/newview/rlvinventory.h | 18 ++++++------ 4 files changed, 51 insertions(+), 38 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 2be378d5b1..25a7225418 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1634,7 +1634,10 @@ void LLInventoryModel::idleNotifyObservers() } // Call this method when it's time to update everyone on a new state. -void LLInventoryModel::notifyObservers() +//void LLInventoryModel::notifyObservers() +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 +void LLInventoryModel::notifyObservers(const LLUUID& transaction_id) +// [/SL:KB] { if (mIsNotifyObservers) { @@ -1646,6 +1649,9 @@ void LLInventoryModel::notifyObservers() } mIsNotifyObservers = TRUE; +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + mTransactionId = transaction_id; +// [/SL:KB] for (observer_list_t::iterator iter = mObservers.begin(); iter != mObservers.end(); ) { @@ -1659,6 +1665,9 @@ void LLInventoryModel::notifyObservers() mModifyMask = LLInventoryObserver::NONE; mChangedItemIDs.clear(); mAddedItemIDs.clear(); +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + mTransactionId.setNull(); +// [/SL:KB] mIsNotifyObservers = FALSE; } @@ -3321,7 +3330,10 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { gInventory.updateItem(*iit); } - gInventory.notifyObservers(); +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + gInventory.notifyObservers(tid); +// [/SL:KB] +// gInventory.notifyObservers(); // The incoming inventory could span more than one BulkInventoryUpdate packet, // so record the transaction ID for this purchase, then wear all clothing diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index bd31b02a75..3be55ae87f 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -526,7 +526,10 @@ public: void idleNotifyObservers(); // Call to explicitly update everyone on a new state. - void notifyObservers(); +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + void notifyObservers(const LLUUID& transaction_id = LLUUID::null); +// [/SL:KB] +// void notifyObservers(); // Allows outsiders to tell the inventory if something has // been changed 'under the hood', but outside the control of the @@ -535,6 +538,9 @@ public: const changed_items_t& getChangedIDs() const { return mChangedItemIDs; } const changed_items_t& getAddedIDs() const { return mAddedItemIDs; } +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + const LLUUID& getTransactionId() const { return mTransactionId; } +// [/SL:KB] protected: // Updates all linked items pointing to this id. void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); @@ -546,6 +552,9 @@ private: U32 mModifyMask; changed_items_t mChangedItemIDs; changed_items_t mAddedItemIDs; +// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 + LLUUID mTransactionId; +// [/SL:KB] //-------------------------------------------------------------------- diff --git a/indra/newview/rlvinventory.cpp b/indra/newview/rlvinventory.cpp index e3d06e2bdc..7b0b87c61d 100644 --- a/indra/newview/rlvinventory.cpp +++ b/indra/newview/rlvinventory.cpp @@ -1,17 +1,17 @@ -/** +/** * - * Copyright (c) 2009-2014, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the + * Copyright (c) 2009-2020, Kitty Barnett + * + * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * + * * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to + * you have read and understood your obligations described above, and agree to * abide by those obligations. - * + * */ #include "llviewerprecompiledheaders.h" @@ -630,26 +630,18 @@ void RlvGiveToRLVOffer::moveAndRename(const LLUUID& idFolder, const LLUUID& idDe void RlvGiveToRLVTaskOffer::changed(U32 mask) { - if (mask & LLInventoryObserver::ADD) - { - LLMessageSystem* pMsg = gMessageSystem; - if ( (pMsg->getMessageName()) && (0 == strcmp(pMsg->getMessageName(), "BulkUpdateInventory")) ) - { - LLUUID idTransaction; - pMsg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, idTransaction); - if (m_idTransaction == idTransaction) + if ( (mask & LLInventoryObserver::ADD) && (gInventory.getTransactionId().notNull()) && (m_idTransaction == gInventory.getTransactionId()) ) + { // BulkUpdateInventory + const auto& idItems = gInventory.getAddedIDs(); + for (const LLUUID& idItem : idItems) + { + if (LLInventoryCategory* pCategory = gInventory.getCategory(idItem)) { - LLUUID idInvObject; - for (S32 idxBlock = 0, cntBlock = pMsg->getNumberOfBlocksFast(_PREHASH_FolderData); idxBlock < cntBlock; idxBlock++) - { - pMsg->getUUIDFast(_PREHASH_FolderData, _PREHASH_FolderID, idInvObject, idxBlock); - if ( (idInvObject.notNull()) && (std::find(m_Folders.begin(), m_Folders.end(), idInvObject) == m_Folders.end()) ) - m_Folders.push_back(idInvObject); - } - - done(); + if (std::find(m_Folders.begin(), m_Folders.end(), pCategory->getUUID()) == m_Folders.end()) + m_Folders.push_back(pCategory->getUUID()); } } + done(); } } diff --git a/indra/newview/rlvinventory.h b/indra/newview/rlvinventory.h index 2cb7f8bc8e..bee9c4bd11 100644 --- a/indra/newview/rlvinventory.h +++ b/indra/newview/rlvinventory.h @@ -1,17 +1,17 @@ -/** +/** * - * Copyright (c) 2009-2014, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the + * Copyright (c) 2009-2020, Kitty Barnett + * + * The source code in this file is provided to you under the terms of the * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * + * * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to + * you have read and understood your obligations described above, and agree to * abide by those obligations. - * + * */ #ifndef RLV_INVENTORY_H From 198843fc1a1c9df306c8c93af6b386f6ce604e80 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 13:20:41 +0200 Subject: [PATCH 140/153] CATZ-576: Indicate user typing status with @redirchat=n with an optional toggle --- indra/newview/app_settings/settings.xml | 13 ++++++++++++- indra/newview/llagent.cpp | 7 +++++++ indra/newview/llchatbar.cpp | 6 +----- indra/newview/llfloaterimnearbychat.cpp | 5 +---- indra/newview/rlvactions.cpp | 9 +++++++++ indra/newview/rlvactions.h | 5 +++++ indra/newview/rlvdefines.h | 1 + indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 8 files changed, 46 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0b7be374ba..54b443b865 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -255,10 +255,21 @@ Value 1 + RLVaShowRedirectChatTyping + + Comment + Sends typing start messages (and optionally plays the typing animation) when @redirchat restricted + Persist + 1 + Type + Boolean + Value + 0 + RLVaSplitRedirectChat Comment - Splits long nearby chat lines across multiple messages when @redir* restricted. + Splits long nearby chat lines across multiple messages when @redir* restricted Persist 1 Type diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3c493604a7..66da75c6d8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1992,6 +1992,13 @@ BOOL LLAgent::needsRenderHead() //----------------------------------------------------------------------------- void LLAgent::startTyping() { +// [RLVa:KB] - @redirchat + if (!RlvActions::canSendTypingStart()) + { + return; + } +// [/RLVa:KB] + mTypingTimer.reset(); if (getRenderState() & AGENT_STATE_TYPING) diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index e19f1bd15c..501c6c119d 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -479,11 +479,7 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) S32 length = raw_text.length(); -// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences -// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d - // RELEASE-RLVa: [SL-2.0.0] This entire class appears to be dead/non-functional? - if ( (length > 0) && (raw_text[0] != '/') && (!RlvActions::hasBehaviour(RLV_BHVR_REDIRCHAT)) ) -// [/RLVa:KB] + if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences { gAgent.startTyping(); } diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 269172f282..655276af0b 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -476,10 +476,7 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke() S32 length = raw_text.length(); -// if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences -// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d - if ( (length > 0) && (raw_text[0] != '/') && (!RlvActions::hasBehaviour(RLV_BHVR_REDIRCHAT)) ) -// [/RLVa:KB] + if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences { gAgent.startTyping(); } diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index ed17275c0e..d1786dab5e 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -188,6 +188,15 @@ bool RlvActions::canSendIM(const LLUUID& idRecipient) ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) || (!gRlvHandler.isException(RLV_BHVR_SENDIMTO, idRecipient)) ) ); } +// Handles: @redirchat +bool RlvActions::canSendTypingStart() +{ + // The CHAT_TYPE_START indicator can be sent if: + // - nearby chat isn't being redirected + // - the user specifically indicated that they want to show typing under @redirchat + return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get(RLV_SETTING_SHOWREDIRECTCHATTYPING); +} + bool RlvActions::canStartIM(const LLUUID& idRecipient, bool fIgnoreOpen) { // User can start an IM session with "recipient" (could be an agent or a group) if: diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index 90b1069f6b..5fcf40b1d1 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -107,6 +107,11 @@ public: */ static bool canSendIM(const LLUUID& idRecipient); + /* + * Returns true if the viewer can inform the region about the user's (nearby chat) typing + */ + static bool canSendTypingStart(); + /* * Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID (or if the session already exists, unless 'ignore open' is specified) */ diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index f43a332f9f..a724cbcc0e 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -380,6 +380,7 @@ enum ERlvAttachGroupType #define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments" #define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory" #define RLV_SETTING_LOGINLASTLOCATION "RLVaLoginLastLocation" +#define RLV_SETTING_SHOWREDIRECTCHATTYPING "RLVaShowRedirectChatTyping" #define RLV_SETTING_SHAREDINVAUTORENAME "RLVaSharedInvAutoRename" #define RLV_SETTING_SHOWASSERTIONFAIL "RLVaShowAssertionFailures" #define RLV_SETTING_SPLITREDIRECTCHAT "RLVaSplitRedirectChat" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 10e88f1f7d..9bd07bdceb 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1657,6 +1657,16 @@ function="ToggleControl" parameter="RestrainedLoveShowEllipsis" /> + + + + From 84a1e74e9e3c4b6ce5d97fed24da57fec36b05e9 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 14:43:10 +0200 Subject: [PATCH 141/153] Post-merge fix-ups --- indra/newview/rlvactions.cpp | 2 +- indra/newview/rlvhandler.cpp | 8 ++++---- indra/newview/rlvui.cpp | 6 +++++- indra/newview/rlvui.h | 4 ++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 2b2753dee7..379bc14e91 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -194,7 +194,7 @@ bool RlvActions::canSendTypingStart() // The CHAT_TYPE_START indicator can be sent if: // - nearby chat isn't being redirected // - the user specifically indicated that they want to show typing under @redirchat - return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get(RLV_SETTING_SHOWREDIRECTCHATTYPING); + return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get(RlvSettingNames::ShowRedirectChatTyping); } bool RlvActions::canStartIM(const LLUUID& idRecipient, bool fIgnoreOpen) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 6b462d01df..369eb3334c 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1871,9 +1871,9 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the buy, buy contents and pay object floaters if (fHasBhvr) { - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object", std::string(RLV_STRING_BLOCKED_GENERIC))); - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents", std::string(RLV_STRING_BLOCKED_GENERIC))); - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_object", std::string(RLV_STRING_BLOCKED_GENERIC))); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object", RlvStringKeys::Blocked::Generic)); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents", RlvStringKeys::Blocked::Generic)); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_object", RlvStringKeys::Blocked::Generic)); } else { @@ -2032,7 +2032,7 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the pay avatar floater if (fHasBhvr) { - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident")); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident", RlvStringKeys::Blocked::Generic)); } else { diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index 62ddf89189..ae6a4e358a 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -279,7 +279,11 @@ void RlvUIEnabler::onUpdateLoginLastLocation(bool fQuitting) // ============================================================================ +#ifdef CATZNIP_STRINGVIEW +bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const boost::string_view& strRlvNotification) +#else bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification) +#endif // CATZNIP_STRINGVIEW { return addGenericFloaterFilter(strFloaterName, [strRlvNotification]() { RlvUtil::notifyBlocked(strRlvNotification); }); } @@ -303,7 +307,7 @@ bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, co bool RlvUIEnabler::removeGenericFloaterFilter(const std::string& strFloaterName) { auto itFloater = m_FilteredFloaterMap.find(strFloaterName); - if (itFloater != m_FilteredFloaterMap.end()) + if (m_FilteredFloaterMap.end() == itFloater) return false; m_FilteredFloaterMap.erase(itFloater); diff --git a/indra/newview/rlvui.h b/indra/newview/rlvui.h index c53a9ab190..2040fe4654 100644 --- a/indra/newview/rlvui.h +++ b/indra/newview/rlvui.h @@ -55,7 +55,11 @@ protected: * Floater and sidebar validation callbacks */ public: +#ifdef CATZNIP_STRINGVIEW + bool addGenericFloaterFilter(const std::string& strFloaterName, const boost::string_view& strRlvNotification); +#else bool addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification); +#endif // CATZNIP_STRINGVIEW bool addGenericFloaterFilter(const std::string& strFloaterName, const std::function& fn = nullptr); bool removeGenericFloaterFilter(const std::string& strFloaterName); From 6b0838e59ea0ad778c5a702df51b773798bf2632 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 16 Sep 2020 15:09:15 +0200 Subject: [PATCH 142/153] [FIXED] Floater filter remove check is backwards --- indra/newview/rlvhandler.cpp | 2 +- indra/newview/rlvui.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index a4cc038730..72dd6e4c7d 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -2035,7 +2035,7 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the pay avatar floater if (fHasBhvr) { - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident")); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident", std::string(RLV_STRING_BLOCKED_GENERIC))); } else { diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index 62ddf89189..1cb6ed35a1 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -303,7 +303,7 @@ bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, co bool RlvUIEnabler::removeGenericFloaterFilter(const std::string& strFloaterName) { auto itFloater = m_FilteredFloaterMap.find(strFloaterName); - if (itFloater != m_FilteredFloaterMap.end()) + if (m_FilteredFloaterMap.end() == itFloater) return false; m_FilteredFloaterMap.erase(itFloater); From f59b228ce80a6eb5da48bf3b1c8b51674c217bd2 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 16 Sep 2020 19:45:58 +0200 Subject: [PATCH 143/153] FIRE-30106 Russian translation update, by Romka Swallowtail --- .../newview/skins/default/xui/ru/floater_about_land.xml | 2 +- indra/newview/skins/default/xui/ru/floater_camera.xml | 1 - indra/newview/skins/default/xui/ru/floater_inspect.xml | 2 +- .../newview/skins/default/xui/ru/floater_phototools.xml | 4 ++-- .../skins/default/xui/ru/menu_fs_chat_options.xml | 1 + indra/newview/skins/default/xui/ru/notifications.xml | 9 ++++++--- .../skins/default/xui/ru/panel_fs_contacts_groups.xml | 2 +- .../skins/default/xui/ru/panel_preferences_firestorm.xml | 2 ++ indra/newview/skins/default/xui/ru/strings.xml | 5 ++++- 9 files changed, 18 insertions(+), 10 deletions(-) diff --git a/indra/newview/skins/default/xui/ru/floater_about_land.xml b/indra/newview/skins/default/xui/ru/floater_about_land.xml index ad9d2eca68..89496c5ebc 100644 --- a/indra/newview/skins/default/xui/ru/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ru/floater_about_land.xml @@ -63,7 +63,7 @@ Участок не выбран. - [wkday,datetime,local], [day,datetime,local] [mth,datetime,local] [year,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] + [wkday,datetime,slt], [day,datetime,slt] [mth,datetime,slt] [year,datetime,slt] [hour,datetime,slt]:[min,datetime,slt]:[second,datetime,slt] UUID участка не может быть исправлен. diff --git a/indra/newview/skins/default/xui/ru/floater_camera.xml b/indra/newview/skins/default/xui/ru/floater_camera.xml index 57aefd540c..1f963749fd 100644 --- a/indra/newview/skins/default/xui/ru/floater_camera.xml +++ b/indra/newview/skins/default/xui/ru/floater_camera.xml @@ -33,5 +33,4 @@ + From 1fc2a322850ec463e9ee960cc56a178de33bf75b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 19 Sep 2020 23:36:23 +0200 Subject: [PATCH 148/153] Fix paste fail --- indra/newview/fschathistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 05c797a75d..ca44855f3f 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -514,7 +514,8 @@ public: { return RlvActions::canPayAvatar(getAvatarId()); } -// [/RLVa:KB] else if (param == "can_ban_member") +// [/RLVa:KB] + else if (param == "can_ban_member") { return canBanGroupMember(getAvatarId()); } From 5328e5ed112a7899eb6b8d992e02252d9acd16a0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 20 Sep 2020 20:25:42 +0200 Subject: [PATCH 149/153] Merge LL --- autobuild.xml | 14 +++--- indra/llcorehttp/_httpoprequest.cpp | 19 +++++--- indra/newview/llvoicevivox.cpp | 67 ++++++++++++++++++++--------- indra/newview/llvoicevivox.h | 2 + 4 files changed, 69 insertions(+), 33 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index db0a8351da..07a97298c0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -292,9 +292,9 @@ archive hash - d670d00aa732b97d105d287b62582762 + 9b8bcc3be6dbe40a04c9c81c313f70dc url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55065/512118/apr_suite-1.4.5.539073-darwin64-539073.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68333/658209/apr_suite-1.4.5.548882-darwin64-548882.tar.bz2 name darwin64 @@ -328,9 +328,9 @@ archive hash - 83b4a047db5f7ee462753d91e6277cba + 6bdf460c18ee004b41a46afc80041a92 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55143/512317/apr_suite-1.4.5.539073-windows-539073.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68334/658225/apr_suite-1.4.5.548882-windows-548882.tar.bz2 name windows @@ -340,16 +340,16 @@ archive hash - b3bbf168b39e25c08cc1febddeb33332 + 83104bfa4dabb77cd70d185e38a95b49 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55139/512304/apr_suite-1.4.5.539073-windows64-539073.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/68332/658215/apr_suite-1.4.5.548882-windows64-548882.tar.bz2 name windows64 version - 1.4.5.539073 + 1.4.5.548882 boost diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index a4764a2152..ae2d067bc2 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -1024,11 +1024,20 @@ CURLcode HttpOpRequest::curlSslCtxCallback(CURL *curl, void *sslctx, void *userd { HttpOpRequest::ptr_t op(HttpOpRequest::fromHandle(userdata)); - if (op->mCallbackSSLVerify) - { - SSL_CTX * ctx = (SSL_CTX *)sslctx; - // verification for ssl certs - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + if (op->mCallbackSSLVerify) + { + SSL_CTX * ctx = (SSL_CTX *)sslctx; + if (op->mReqOptions && op->mReqOptions->getSSLVerifyPeer()) + { + // verification for ssl certs + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + } + else + { + // disable any default verification for server certs + // Ex: setting urls (assume non-SL) for parcel media in LLFloaterURLEntry + SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); + } // set the verification callback. SSL_CTX_set_cert_verify_callback(ctx, sslCertVerifyCallback, userdata); // the calls are void diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c382745f01..ea2fe59761 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -274,6 +274,8 @@ static void killGateway() /////////////////////////////////////////////////////////////////////////////////////////////// +bool LLVivoxVoiceClient::sShuttingDown = false; + LLVivoxVoiceClient::LLVivoxVoiceClient() : mSessionTerminateRequested(false), mRelogRequested(false), @@ -382,6 +384,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient() { mAvatarNameCacheConnection.disconnect(); } + sShuttingDown = true; } //--------------------------------------------------- @@ -416,6 +419,8 @@ void LLVivoxVoiceClient::terminate() killGateway(); } + sShuttingDown = true; + // Delete useless Vivox logs on logout if (gSavedSettings.getString("VivoxDebugLevel") == "0") { @@ -712,13 +717,13 @@ void LLVivoxVoiceClient::voiceControlCoro() U32 retry = 0; - while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !LLApp::isExiting()) + while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown) { LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; llcoro::suspendUntilTimeout(1.0); } - if (LLApp::isExiting()) + if (sShuttingDown) { mIsCoroutineActive = false; return; @@ -749,7 +754,7 @@ void LLVivoxVoiceClient::voiceControlCoro() << "disconnected" << " RelogRequested=" << mRelogRequested << LL_ENDL; - if (mRelogRequested) + if (mRelogRequested && !sShuttingDown) { if (!success) { @@ -764,14 +769,14 @@ void LLVivoxVoiceClient::voiceControlCoro() LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL; } - while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + while (isGatewayRunning() || (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !sShuttingDown)) { LL_INFOS("Voice") << "waiting for SLVoice to exit" << LL_ENDL; llcoro::suspendUntilTimeout(1.0); } } } - while (mVoiceEnabled && mRelogRequested); + while (mVoiceEnabled && mRelogRequested && !sShuttingDown); mIsCoroutineActive = false; LL_INFOS("Voice") << "exiting" << LL_ENDL; } @@ -816,7 +821,7 @@ bool LLVivoxVoiceClient::endAndDisconnectSession() bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data) { - if (!LLAppViewer::isExiting() && mVoiceEnabled) + if (!sShuttingDown && mVoiceEnabled) { LL_WARNS("Voice") << "SLVoice terminated " << ll_stream_notation_sd(data) << LL_ENDL; terminateAudioSession(false); @@ -1021,7 +1026,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL; LLVoiceVivoxStats::getInstance()->reset(); - while (!mConnected) + while (!mConnected && !sShuttingDown) { LLVoiceVivoxStats::getInstance()->connectionAttemptStart(); LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL; @@ -1040,6 +1045,11 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() } //--------------------------------------------------------------------- + if (sShuttingDown && !mConnected) + { + return false; + } + llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); while (!mPump) @@ -1076,7 +1086,7 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { LL_INFOS("Voice") << "Provisioning voice account." << LL_ENDL; - while (!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) + while ((!gAgent.getRegion() || !gAgent.getRegion()->capabilitiesReceived()) && !sShuttingDown) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; // *TODO* Pump a message for wake up. @@ -1120,10 +1130,15 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() { provisioned = true; } - } while (!provisioned && retryCount <= PROVISION_RETRY_MAX); + } while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !sShuttingDown); + + if (sShuttingDown && !provisioned) + { + return false; + } LLVoiceVivoxStats::getInstance()->provisionAttemptEnd(provisioned); - if (! provisioned ) + if (!provisioned) { LL_WARNS("Voice") << "Could not access voice provision cap after " << retryCount << " attempts." << LL_ENDL; return false; @@ -1164,6 +1179,11 @@ bool LLVivoxVoiceClient::establishVoiceConnection() LL_WARNS("Voice") << "cannot establish connection; enabled "< + diff --git a/indra/newview/skins/default/xui/pl/panel_outfit_edit.xml b/indra/newview/skins/default/xui/pl/panel_outfit_edit.xml index 97ec0eb03d..6d7c930e45 100644 --- a/indra/newview/skins/default/xui/pl/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/pl/panel_outfit_edit.xml @@ -16,6 +16,7 @@ + From b1f1335752292a8b01267f75eb7ed9ae8e0a919a Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 21 Sep 2020 21:14:35 +0200 Subject: [PATCH 151/153] FIRE-30387 Russian translation update, by Romka Swallowtail --- indra/newview/skins/default/xui/ru/menu_viewer.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index 2a70884839..0f7393670a 100644 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -305,14 +305,14 @@ - + - - + + - + From 57df044612f79aa90a68bd48657b0f3c1d6a4ddf Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 22 Sep 2020 19:26:23 +0200 Subject: [PATCH 152/153] FIRE-29930: Don't include general global settings in camera presets --- indra/newview/app_settings/camera/Front.xml | 22 --------------------- indra/newview/app_settings/camera/Rear.xml | 22 --------------------- indra/newview/app_settings/camera/Side.xml | 22 --------------------- indra/newview/llpresetsmanager.cpp | 9 ++++----- 4 files changed, 4 insertions(+), 71 deletions(-) diff --git a/indra/newview/app_settings/camera/Front.xml b/indra/newview/app_settings/camera/Front.xml index f9f615c4a7..1bf35c8682 100644 --- a/indra/newview/app_settings/camera/Front.xml +++ b/indra/newview/app_settings/camera/Front.xml @@ -1,16 +1,5 @@ - AppearanceCameraMovement - - Comment - When entering appearance editing mode, camera zooms in on currently selected portion of avatar - Persist - 1 - Type - Boolean - Value - 1 - AvatarSitRotation Comment @@ -90,17 +79,6 @@ Value 0.90322577953338623 - EditCameraMovement - - Comment - When entering build mode, camera moves up above avatar - Persist - 1 - Type - Boolean - Value - 0 - FocusOffsetRearView Comment diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml index a084f83bfe..a4de53d698 100644 --- a/indra/newview/app_settings/camera/Rear.xml +++ b/indra/newview/app_settings/camera/Rear.xml @@ -1,16 +1,5 @@ - AppearanceCameraMovement - - Comment - When entering appearance editing mode, camera zooms in on currently selected portion of avatar - Persist - 1 - Type - Boolean - Value - 1 - AvatarSitRotation Comment @@ -90,17 +79,6 @@ Value 0.90322577953338623 - EditCameraMovement - - Comment - When entering build mode, camera moves up above avatar - Persist - 1 - Type - Boolean - Value - 0 - FocusOffsetRearView Comment diff --git a/indra/newview/app_settings/camera/Side.xml b/indra/newview/app_settings/camera/Side.xml index 5db5b164bd..0ff6c5ae3f 100644 --- a/indra/newview/app_settings/camera/Side.xml +++ b/indra/newview/app_settings/camera/Side.xml @@ -1,16 +1,5 @@ - AppearanceCameraMovement - - Comment - When entering appearance editing mode, camera zooms in on currently selected portion of avatar - Persist - 1 - Type - Boolean - Value - 1 - AvatarSitRotation Comment @@ -90,17 +79,6 @@ Value 0.90322577953338623 - EditCameraMovement - - Comment - When entering build mode, camera moves up above avatar - Persist - 1 - Type - Boolean - Value - 0 - FocusOffsetRearView Comment diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index f4d6ec4ae1..d99466ec28 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -275,8 +275,10 @@ void LLPresetsManager::getControlNames(std::vector& names) // From panel_preferences_move.xml ("CameraAngle") ("CameraOffsetScale") - ("EditCameraMovement") - ("AppearanceCameraMovement") + // FIRE-29930: Don't include these settings as it might be confusing why settings suddenly reset + //("EditCameraMovement") + //("AppearanceCameraMovement") + // // From llagentcamera.cpp ("CameraOffsetBuild") ("TrackFocusObject") @@ -286,9 +288,6 @@ void LLPresetsManager::getControlNames(std::vector& names) // Additional settings ("ZoomTime") ("CameraPositionSmoothing") - ("EditAppearanceLighting") - ("FSDisableMouseWheelCameraZoom") - ("DisableCameraConstraints") // ; names = camera_controls; From 60ed688026269568a9eef67437dc780f88c92871 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Sep 2020 15:32:35 -0400 Subject: [PATCH 153/153] Increment viewer version to 6.4.9 following promotion of DRTVWR-503 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 4b20d9700d..a228920441 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.4.8 +6.4.9