From a044c71a4f2b8c587152fff0574e116324e2ad3e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Jun 2019 20:36:58 +0300 Subject: [PATCH 001/212] SL-11450 After detaching everything viewer shows wrong slot count Attachments' title not overwriting properly --- indra/newview/llcofwearables.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index b47e0930a3..1caefd58ab 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -502,13 +502,14 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel { mAttachments->sort(); mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false) - setAttachmentsTitle(); } else { mAttachments->setNoItemsCommentText(LLTrans::getString("no_attachments")); } + setAttachmentsTitle(); + if (mBodyParts->size()) { mBodyParts->sort(); From 4aa9dfec746f28696a195fe81aed9b6ef0791954 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sun, 10 Nov 2019 15:18:01 +0200 Subject: [PATCH 002/212] SL-9699 Fixed tooltip warning --- indra/newview/skins/default/xui/en/floater_forget_user.xml | 2 +- indra/newview/skins/default/xui/en/panel_login.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_forget_user.xml b/indra/newview/skins/default/xui/en/floater_forget_user.xml index f2e894733f..0673901a96 100644 --- a/indra/newview/skins/default/xui/en/floater_forget_user.xml +++ b/indra/newview/skins/default/xui/en/floater_forget_user.xml @@ -36,5 +36,5 @@ top_pad="5" width="260" initial_value="1" - tooltip="Deletes local files: chat history, last session screenshot, browser cookies, teleport history, toolbar settings, e t c"/> + tool_tip="Deletes local files: chat history, last session screenshot, browser cookies, teleport history, toolbar settings, e t c"/> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index d601b36ce5..873f03aae9 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -137,7 +137,7 @@ label="Remember me" check_button.bottom="3" name="remember_name" - tooltip="Already recorded user can be forgotten from preferences." + tool_tip="Already recorded user can be forgotten from preferences." width="145" /> Date: Tue, 12 Nov 2019 04:21:49 +0200 Subject: [PATCH 003/212] Post-merge fixes --- indra/newview/llviewermedia.h | 1 + indra/newview/llviewerparcelmediaautoplay.cpp | 2 +- indra/newview/llviewerwindow.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 2b604d3a7a..9467a138f0 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -79,6 +79,7 @@ class LLViewerMedia: public LLSingleton public: // String to get/set media autoplay in gSavedSettings + static const char* AUTO_PLAY_MEDIA_SETTING; static const char* SHOW_MEDIA_ON_OTHERS_SETTING; static const char* SHOW_MEDIA_WITHIN_PARCEL_SETTING; static const char* SHOW_MEDIA_OUTSIDE_PARCEL_SETTING; diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index 54d9804b9c..36c7d436f6 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -169,7 +169,7 @@ void LLViewerParcelMediaAutoPlay::onStartMusicResponse(const LLUUID ®ion_id, // make sure we are still there if (parcel->getLocalID() == parcel_id && gAgent.getRegion()->getRegionID() == region_id) { - LLViewerParcelMedia::play(parcel); + LLViewerParcelMedia::getInstance()->play(parcel); } } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3b0acf81e0..f4c2e93a45 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3009,7 +3009,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) void LLViewerWindow::handleScrollHWheel(S32 clicks) { - LLUI::resetMouseIdleTimer(); + LLUI::getInstance()->resetMouseIdleTimer(); LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); if (mouse_captor) From ac0bbba7a554834f763a0ffcd03fd25897bc374e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 12 Nov 2019 11:45:39 +0200 Subject: [PATCH 004/212] SL-9699 Updated tooltip and initial checkbox value --- indra/newview/llfloaterforgetuser.cpp | 4 +++- indra/newview/skins/default/xui/en/floater_forget_user.xml | 1 - indra/newview/skins/default/xui/en/panel_login.xml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp index 5659cb2f79..55e25ace9a 100644 --- a/indra/newview/llfloaterforgetuser.cpp +++ b/indra/newview/llfloaterforgetuser.cpp @@ -99,7 +99,9 @@ BOOL LLFloaterForgetUser::postBuild() } bool enable_button = scroll_list->getFirstSelectedIndex() != -1; - getChild("delete_data")->setEnabled(enable_button); + LLCheckBoxCtrl *chk_box = getChild("delete_data"); + chk_box->setEnabled(enable_button); + chk_box->set(FALSE); LLButton *button = getChild("forget"); button->setEnabled(enable_button); button->setCommitCallback(boost::bind(&LLFloaterForgetUser::onForgetClicked, this)); diff --git a/indra/newview/skins/default/xui/en/floater_forget_user.xml b/indra/newview/skins/default/xui/en/floater_forget_user.xml index 0673901a96..86228d49ee 100644 --- a/indra/newview/skins/default/xui/en/floater_forget_user.xml +++ b/indra/newview/skins/default/xui/en/floater_forget_user.xml @@ -35,6 +35,5 @@ name="delete_data" top_pad="5" width="260" - initial_value="1" tool_tip="Deletes local files: chat history, last session screenshot, browser cookies, teleport history, toolbar settings, e t c"/> diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 873f03aae9..766406e1d8 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -137,7 +137,7 @@ label="Remember me" check_button.bottom="3" name="remember_name" - tool_tip="Already recorded user can be forgotten from preferences." + tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." width="145" /> Date: Tue, 12 Nov 2019 16:07:36 +0200 Subject: [PATCH 005/212] Fix instance existance check --- indra/llrender/llrender2dutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 4eb0203245..801b945806 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1650,7 +1650,7 @@ LLPointer LLRender2D::getUIImage(const std::string& name, S32 priorit // static void LLRender2D::resetProvider() { - if (LLRender2D::instanceExists) + if (LLRender2D::instanceExists()) { LLRender2D::getInstance()->mImageProvider = NULL; } From b3b103efe59c347a7268d820876888fe9297d7dd Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 12 Nov 2019 22:26:10 +0000 Subject: [PATCH 006/212] SL-10498 - benefits info received at login, persisted in new LLAgentBenefits singleton. --- indra/newview/CMakeLists.txt | 2 + indra/newview/llagentbenefits.cpp | 112 ++++++++++++++++++++++++++++++ indra/newview/llagentbenefits.h | 57 +++++++++++++++ indra/newview/llstartup.cpp | 7 ++ 4 files changed, 178 insertions(+) create mode 100644 indra/newview/llagentbenefits.cpp create mode 100644 indra/newview/llagentbenefits.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 694e89ab99..5423ddb684 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -115,6 +115,7 @@ set(viewer_SOURCE_FILES llaisapi.cpp llagent.cpp llagentaccess.cpp + llagentbenefits.cpp llagentcamera.cpp llagentdata.cpp llagentlanguage.cpp @@ -739,6 +740,7 @@ set(viewer_HEADER_FILES llaisapi.h llagent.h llagentaccess.h + llagentbenefits.h llagentcamera.h llagentdata.h llagentlanguage.h diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp new file mode 100644 index 0000000000..724b2e1dc1 --- /dev/null +++ b/indra/newview/llagentbenefits.cpp @@ -0,0 +1,112 @@ +/** +* @file llagentbenefits.cpp +* +* $LicenseInfo:firstyear=2019&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2019, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" +#include "llagentbenefits.h" + +LLAgentBenefits::LLAgentBenefits() +{ +} + +LLAgentBenefits::~LLAgentBenefits() +{ +} + +// This could be extended to a template scheme or otherwise modified +// to support other types, if and when needed. Currently all fields +// the viewer cares about are integer. +bool get_required_S32(const LLSD& sd, const LLSD::String& key, S32& value) +{ + value = -1; + if (sd.has(key)) + { + value = sd[key].asInteger(); + return true; + } + + LL_WARNS("Benefits") << "Missing required benefit field " << key << LL_ENDL; + return false; +} + +bool LLAgentBenefits::init(const LLSD& benefits_sd) +{ + LL_DEBUGS("Benefits") << "initializing benefits from " << benefits_sd << LL_ENDL; + + if (!get_required_S32(benefits_sd, "animated_object_limit", m_animated_object_limit)) + { + return false; + } + if (!get_required_S32(benefits_sd, "animation_upload_cost", m_animation_upload_cost)) + { + return false; + } + if (!get_required_S32(benefits_sd, "attachment_limit", m_attachment_limit)) + { + return false; + } + if (!get_required_S32(benefits_sd, "group_membership_limit", m_group_membership_limit)) + { + return false; + } + if (!get_required_S32(benefits_sd, "sound_upload_cost", m_sound_upload_cost)) + { + return false; + } + if (!get_required_S32(benefits_sd, "texture_upload_cost", m_texture_upload_cost)) + { + return false; + } + return true; +} + +S32 LLAgentBenefits::getAnimatedObjectLimit() const +{ + return m_animated_object_limit; +} + +S32 LLAgentBenefits::getAnimationUploadCost() const +{ + return m_animation_upload_cost; +} + +S32 LLAgentBenefits::getAttachmentLimit() const +{ + return m_attachment_limit; +} + +S32 LLAgentBenefits::getGroupMembershipLimit() const +{ + return m_group_membership_limit; +} + +S32 LLAgentBenefits::getSoundUploadCost() const +{ + return m_sound_upload_cost; +} + +S32 LLAgentBenefits::getTextureUploadCost() const +{ + return m_texture_upload_cost; +} diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h new file mode 100644 index 0000000000..0a8e33af28 --- /dev/null +++ b/indra/newview/llagentbenefits.h @@ -0,0 +1,57 @@ +/** +* @file llagentbenefits.h +* +* $LicenseInfo:firstyear=2019&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2019, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#ifndef LL_AGENTBENEFITS_H +#define LL_AGENTBENEFITS_H + +#include "llsingleton.h" +#include "llsd.h" + +class LLAgentBenefits: public LLSingleton +{ + LLSINGLETON(LLAgentBenefits); + ~LLAgentBenefits(); + LOG_CLASS(LLAgentBenefits); + +public: + bool init(const LLSD& benefits_sd); + + S32 getAnimatedObjectLimit() const; + S32 getAnimationUploadCost() const; + S32 getAttachmentLimit() const; + S32 getGroupMembershipLimit() const; + S32 getSoundUploadCost() const; + S32 getTextureUploadCost() const; + +private: + S32 m_animated_object_limit; + S32 m_animation_upload_cost; + S32 m_attachment_limit; + S32 m_group_membership_limit; + S32 m_sound_upload_cost; + S32 m_texture_upload_cost; +}; + +#endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c8c39ae00f..73e8d3cf5f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -88,6 +88,7 @@ #include "v3math.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentpicksinfo.h" #include "llagentwearables.h" @@ -3258,6 +3259,12 @@ bool process_login_success_response() { LLSD response = LLLoginInstance::getInstance()->getResponse(); + //LL_INFOS() << "login success response:" << ll_pretty_print_sd(response) << LL_ENDL; + if (!LLAgentBenefits::instance().init(response["account_level_benefits"])) + { + LL_ERRS() << "Benefits error" << LL_ENDL; + } + std::string text(response["udp_blacklist"]); if(!text.empty()) { From f9fdae67789c87ad2a6a062570236b5140ccc112 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 13 Nov 2019 12:56:07 +0200 Subject: [PATCH 007/212] SL-9699 Field should be populated as long as there is data, regardless of 'remember password' --- indra/newview/llpanellogin.cpp | 25 ++++++++++--------------- indra/newview/llpanellogin.h | 4 ++-- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d7c189271e..4f050a9748 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -554,12 +554,12 @@ void LLPanelLogin::populateFields(LLPointer credential, bool remem if (sInstance->mFirstLoginThisInstall) { // no list to populate - setFields(credential, remember_psswrd); + setFields(credential); } else { sInstance->getChild("remember_name")->setValue(remember_user); - sInstance->populateUserList(credential, remember_psswrd); + sInstance->populateUserList(credential); remember_check->setEnabled(remember_user); } } @@ -580,16 +580,13 @@ void LLPanelLogin::resetFields() } else { - LLUICtrl* remember_check = sInstance->getChild("remember_check"); - bool remember_psswrd = remember_check->getValue(); LLPointer cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - sInstance->populateUserList(cred, remember_psswrd); + sInstance->populateUserList(cred); } } // static -void LLPanelLogin::setFields(LLPointer credential, - bool remember_psswrd) +void LLPanelLogin::setFields(LLPointer credential) { if (!sInstance) { @@ -631,7 +628,7 @@ void LLPanelLogin::setFields(LLPointer credential, LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL; if(authenticator.isMap() && authenticator.has("secret") && - (authenticator["secret"].asString().size() > 0) && remember_psswrd) + (authenticator["secret"].asString().size() > 0)) { // This is a MD5 hex digest of a password. @@ -1096,8 +1093,7 @@ void LLPanelLogin::onUserListCommit(void*) { std::string user_key = username_combo->getSelectedValue(); LLPointer cred = gSecAPIHandler->loadFromCredentialMap("login_list", LLGridManager::getInstance()->getGrid(), user_key); - bool remember_psswrd = sInstance->getChild("remember_check")->getValue(); - setFields(cred, remember_psswrd); + setFields(cred); sInstance->mPasswordModified = false; } else @@ -1156,10 +1152,9 @@ void LLPanelLogin::updateServer() if(!sInstance->areCredentialFieldsDirty()) { // populate dropbox and setFields - bool remember_psswrd = sInstance->getChild("remember_check")->getValue(); // Note: following call is related to initializeLoginInfo() LLPointer credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - sInstance->populateUserList(credential, remember_psswrd); + sInstance->populateUserList(credential); } // update the login panel links @@ -1198,7 +1193,7 @@ void LLPanelLogin::updateLoginButtons() } } -void LLPanelLogin::populateUserList(LLPointer credential, bool remember_psswrd) +void LLPanelLogin::populateUserList(LLPointer credential) { LLComboBox* user_combo = getChild("username_combo"); user_combo->removeall(); @@ -1228,7 +1223,7 @@ void LLPanelLogin::populateUserList(LLPointer credential, bool rem } else { - setFields(credential, remember_psswrd); + setFields(credential); } } else @@ -1236,7 +1231,7 @@ void LLPanelLogin::populateUserList(LLPointer credential, bool rem if (credential.notNull()) { user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); - setFields(credential, remember_psswrd); + setFields(credential); } } } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 3eb7b68949..c9b8e1b6fc 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -96,7 +96,7 @@ private: void onSelectServer(); void onLocationSLURL(); - static void setFields(LLPointer credential, bool remember_psswrd); + static void setFields(LLPointer credential); static void onClickConnect(void*); static void onClickNewAccount(void*); @@ -113,7 +113,7 @@ private: boost::scoped_ptr mListener; void updateLoginButtons(); - void populateUserList(LLPointer credential, bool remember_psswrd); + void populateUserList(LLPointer credential); void (*mCallback)(S32 option, void *userdata); void* mCallbackData; From b52f8573e454287556e00c1eda4765073e203308 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 13 Nov 2019 16:17:16 +0200 Subject: [PATCH 008/212] SL-12272 Ordered Shutdown log spam --- indra/llappearance/llwearabletype.cpp | 17 ++++++++--------- indra/llappearance/llwearabletype.h | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 6b7dc41ffd..dc02b5e225 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -56,7 +56,7 @@ struct WearableEntry : public LLDictionaryEntry BOOL mAllowMultiwear; }; -class LLWearableDictionary : public LLParamSingleton, +class LLWearableDictionary : public LLSingleton, public LLDictionary { LLSINGLETON(LLWearableDictionary); @@ -64,6 +64,12 @@ class LLWearableDictionary : public LLParamSingleton, LLWearableDictionary::LLWearableDictionary() { + if (!LLWearableType::instanceExists()) + { + // LLWearableType is effectively a wrapper around LLWearableDictionary and is used as storage for LLTranslationBridge + // Todo: consider merging LLWearableType and LLWearableDictionary + LL_WARNS() << "Initing LLWearableDictionary without LLWearableType" << LL_ENDL; + } addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE)); addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE)); addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE)); @@ -92,6 +98,7 @@ LLWearableDictionary::LLWearableDictionary() LLWearableType::LLWearableType(LLTranslationBridge* trans) { + // LLTranslationBridge exists, but is not ready at this point in time since strings.xml is not yet loaded mTrans = trans; } @@ -100,14 +107,6 @@ LLWearableType::~LLWearableType() delete mTrans; } -void LLWearableType::initSingleton() -{ - // To make sure all wrapping functions will crash without initing LLWearableType; - LLWearableDictionary::initParamSingleton(); - - // Todo: consider merging LLWearableType and LLWearableDictionary -} - // static LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name) { diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 80bb9a10b4..5fe969822a 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -47,7 +47,6 @@ class LLWearableType : public LLParamSingleton LLSINGLETON(LLWearableType, LLTranslationBridge* trans); ~LLWearableType(); friend struct WearableEntry; - void initSingleton(); public: enum EType { From 7df0a4ddd0c48358e7152733aaba01464f2620be Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 14 Nov 2019 15:01:50 +0000 Subject: [PATCH 009/212] SL-10499, SL-10497 - use LLAgentBenefits info --- indra/newview/llagentbenefits.cpp | 17 +++++- indra/newview/llagentbenefits.h | 2 + indra/newview/llfloaterbvhpreview.cpp | 11 ++-- indra/newview/llfloaternamedesc.cpp | 1 + indra/newview/llfloaterreporter.cpp | 6 --- indra/newview/lloutfitgallery.cpp | 3 +- indra/newview/llpanelmaininventory.cpp | 48 ++++++++--------- indra/newview/llpanelpeople.cpp | 1 + indra/newview/llpanelsnapshotoptions.cpp | 8 ++- indra/newview/llstartup.cpp | 24 ++------- indra/newview/llviewerassetupload.cpp | 18 +------ indra/newview/llviewerassetupload.h | 1 - indra/newview/llviewermenu.cpp | 54 +++++++++++++------ indra/newview/llvoavatar.cpp | 35 ++---------- .../skins/default/xui/en/menu_viewer.xml | 9 ++-- 15 files changed, 105 insertions(+), 133 deletions(-) diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 724b2e1dc1..09be8f46c1 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -26,7 +26,14 @@ #include "llviewerprecompiledheaders.h" #include "llagentbenefits.h" -LLAgentBenefits::LLAgentBenefits() +LLAgentBenefits::LLAgentBenefits(): + m_initalized(false), + m_animated_object_limit(-1), + m_animation_upload_cost(-1), + m_attachment_limit(-1), + m_group_membership_limit(-1), + m_sound_upload_cost(-1), + m_texture_upload_cost(-1) { } @@ -78,35 +85,43 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) { return false; } + + m_initalized = true; return true; } S32 LLAgentBenefits::getAnimatedObjectLimit() const { + //llassert(m_initalized); return m_animated_object_limit; } S32 LLAgentBenefits::getAnimationUploadCost() const { + //llassert(m_initalized); return m_animation_upload_cost; } S32 LLAgentBenefits::getAttachmentLimit() const { + //llassert(m_initalized); return m_attachment_limit; } S32 LLAgentBenefits::getGroupMembershipLimit() const { + //llassert(m_initalized); return m_group_membership_limit; } S32 LLAgentBenefits::getSoundUploadCost() const { + //llassert(m_initalized); return m_sound_upload_cost; } S32 LLAgentBenefits::getTextureUploadCost() const { + //llassert(m_initalized); return m_texture_upload_cost; } diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 0a8e33af28..995833149c 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -52,6 +52,8 @@ private: S32 m_group_membership_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; + + bool m_initalized; }; #endif diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index ee7e6f8562..91a6e63665 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -38,6 +38,7 @@ #include "llstring.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llanimationstates.h" #include "llbbox.h" #include "llbutton.h" @@ -1004,16 +1005,18 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) { std::string name = floaterp->getChild("name_form")->getValue().asString(); std::string desc = floaterp->getChild("description_form")->getValue().asString(); - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 expected_upload_cost = LLAgentBenefits::instance().getAnimationUploadCost(); - LLResourceUploadInfo::ptr_t assetUpdloadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( floaterp->mTransactionID, LLAssetType::AT_ANIMATION, name, desc, 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, - LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost)); - upload_new_resource(assetUpdloadInfo); + upload_new_resource(assetUploadInfo); } else { diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index c9a689281e..33dfae8be8 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -161,6 +161,7 @@ void LLFloaterNameDesc::onBtnOK( ) { getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads + // FIXME PREMIUM - upload cost. Need to know which asset type this is, use agent benefits. LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 960fd9620d..4cc43254a5 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -102,7 +102,6 @@ public: virtual LLSD prepareUpload(); virtual LLSD generatePostBody(); - virtual S32 getEconomyUploadCost(); virtual LLUUID finishUpload(LLSD &result); virtual bool showInventoryPanel() const { return false; } @@ -129,11 +128,6 @@ LLSD LLARScreenShotUploader::generatePostBody() return mReport; } -S32 LLARScreenShotUploader::getEconomyUploadCost() -{ // Abuse report screen shots do not cost anything to upload. - return 0; -} - LLUUID LLARScreenShotUploader::finishUpload(LLSD &result) { /* *TODO$: Report success or failure. Carried over from previous todo on responder*/ diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index b2b6de94b3..8f5626bd7a 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -36,6 +36,7 @@ #include "llaccordionctrltab.h" #include "llappearancemgr.h" +#include "llagentbenefits.h" #include "lleconomy.h" #include "llerror.h" #include "llfilepicker.h" @@ -1205,7 +1206,7 @@ void LLOutfitGallery::uploadOutfitImage(const std::vector& filename return; } - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); void *nruserdata = NULL; nruserdata = (void *)&outfit_id; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f63e604927..7404798589 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -28,6 +28,7 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llavataractions.h" #include "llcheckboxctrl.h" @@ -227,16 +228,21 @@ BOOL LLPanelMainInventory::postBuild() initListCommandsHandlers(); - // *TODO:Get the cost info from the server - const std::string upload_cost("10"); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) { - menu->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - menu->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - menu->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - menu->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); + menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); + menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); + + // FIXME PREMIUM - bulk upload of what? This doesn't work with + // mixed items if costs aren't all the same. For now treating + // as textures. + menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } // Trigger callback for focus received so we can deselect items in inbox/outbox @@ -1512,28 +1518,18 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { - LLMenuItemBranchGL* upload_menu = menu->findChild("upload"); - if(upload_menu) - { - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); - std::string cost_str; + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); - // getPriceUpload() returns -1 if no data available yet. - if(upload_cost >= 0) - { - mNeedUploadCost = false; - cost_str = llformat("%d", upload_cost); - } - else - { - cost_str = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); - } + menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); + menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); + menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - upload_menu->getChild("Upload Image")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); - } + // FIXME PREMIUM - bulk upload of what? This doesn't work with + // mixed items if costs aren't all the same. For now treating + // as textures. + menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index be174475e1..d138433ed8 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -612,6 +612,7 @@ void LLPanelPeople::removePicker() BOOL LLPanelPeople::postBuild() { + // FIXME PREMIUM - need to get premium vs. basic info via BaaS S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; if (gAgent.getRegion()) { diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 23747a8efd..63206e2780 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -35,12 +35,13 @@ #include "llfloaterflickr.h" #include "llfloatertwitter.h" +#include "llagentbenefits.h" + /** * Provides several ways to save a snapshot. */ class LLPanelSnapshotOptions : public LLPanel -, public LLEconomyObserver { LOG_CLASS(LLPanelSnapshotOptions); @@ -49,7 +50,6 @@ public: ~LLPanelSnapshotOptions(); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onEconomyDataChange() { updateUploadCost(); } private: void updateUploadCost(); @@ -74,12 +74,10 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions() mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this)); mCommitCallbackRegistrar.add("Snapshot.SendToTwitter", boost::bind(&LLPanelSnapshotOptions::onSendToTwitter, this)); mCommitCallbackRegistrar.add("Snapshot.SendToFlickr", boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this)); - LLGlobalEconomy::getInstance()->addObserver(this); } LLPanelSnapshotOptions::~LLPanelSnapshotOptions() { - LLGlobalEconomy::getInstance()->removeObserver(this); } // virtual @@ -97,7 +95,7 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key) void LLPanelSnapshotOptions::updateUploadCost() { - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); getChild("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost)); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 73e8d3cf5f..979fe63432 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -247,7 +247,6 @@ static std::string gAgentStartLocation = "safe"; static bool mLoginStatePastUI = false; const S32 DEFAULT_MAX_AGENT_GROUPS = 42; -const S32 ALLOWED_MAX_AGENT_GROUPS = 500; const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); @@ -3607,26 +3606,9 @@ bool process_login_success_response() LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token); } - gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS; - if(response.has("max-agent-groups")) - { - S32 agent_groups = atoi(std::string(response["max-agent-groups"]).c_str()); - if (agent_groups > 0 && agent_groups <= ALLOWED_MAX_AGENT_GROUPS) - { - gMaxAgentGroups = agent_groups; - LL_INFOS("LLStartup") << "gMaxAgentGroups read from login.cgi: " - << gMaxAgentGroups << LL_ENDL; - } - else - { - LL_INFOS("LLStartup") << "Invalid value received, using defaults for gMaxAgentGroups: " - << gMaxAgentGroups << LL_ENDL; - } - } - else { - LL_INFOS("LLStartup") << "Missing max-agent-groups, using default value for gMaxAgentGroups: " - << gMaxAgentGroups << LL_ENDL; - } + gMaxAgentGroups = LLAgentBenefits::instance().getGroupMembershipLimit(); + LL_INFOS("LLStartup") << "gMaxAgentGroups set from agent benefits: " + << gMaxAgentGroups << LL_ENDL; bool success = false; // JC: gesture loading done below, when we have an asset system diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 97fbb8c601..a919362321 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -171,22 +171,6 @@ void LLResourceUploadInfo::logPreparedUpload() "Asset Type: " << LLAssetType::lookup(mAssetType) << LL_ENDL; } -S32 LLResourceUploadInfo::getEconomyUploadCost() -{ - // Update L$ and ownership credit information - // since it probably changed on the server - if (getAssetType() == LLAssetType::AT_TEXTURE || - getAssetType() == LLAssetType::AT_SOUND || - getAssetType() == LLAssetType::AT_ANIMATION || - getAssetType() == LLAssetType::AT_MESH) - { - return LLGlobalEconomy::instance().getPriceUpload(); - } - - return 0; -} - - LLUUID LLResourceUploadInfo::finishUpload(LLSD &result) { if (getFolderId().isNull()) @@ -740,7 +724,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti return; } - S32 uploadPrice = result["upload_price"].asInteger();//uploadInfo->getEconomyUploadCost(); + S32 uploadPrice = result["upload_price"].asInteger(); if (uploadPrice > 0) { diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index ee1806b782..0ba16dce1d 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -62,7 +62,6 @@ public: virtual LLSD prepareUpload(); virtual LLSD generatePostBody(); virtual void logPreparedUpload(); - virtual S32 getEconomyUploadCost(); virtual LLUUID finishUpload(LLSD &result); LLTransactionID getTransactionId() const { return mTransactionId; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dc82719109..0fda4d3df8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -45,6 +45,7 @@ // newview includes #include "llagent.h" #include "llagentaccess.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentui.h" #include "llagentwearables.h" @@ -134,6 +135,7 @@ #include "llstartup.h" #include "boost/unordered_map.hpp" #include +#include #include "llcleanup.h" using namespace LLAvatarAppearanceDefines; @@ -508,13 +510,15 @@ void init_menus() gViewerWindow->setMenuBackgroundColor(false, LLGridManager::getInstance()->isInProductionGrid()); - // Assume L$10 for now, the server will tell us the real cost at login // *TODO:Also fix cost in llfolderview.cpp for Inventory menus - const std::string upload_cost("10"); - gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str); + gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); + gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); + // FIXME PREMIUM - do we need to handle non-texture bulk uploads? + gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", texture_upload_cost_str); gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); @@ -8665,18 +8669,30 @@ class LLUploadCostCalculator : public view_listener_t bool handleEvent(const LLSD& userdata) { - std::string menu_name = userdata.asString(); + std::vector fields; + boost::split(fields, userdata.asString(), boost::is_any_of(",")); + if (fields.size()<1) + { + return false; + } + std::string menu_name = fields[0]; + std::string asset_type_str = "texture"; + if (fields.size()>1) + { + asset_type_str = fields[1]; + } + LL_DEBUGS("Benefits") << "userdata " << userdata << " menu_name " << menu_name << " asset_type_str " << asset_type_str << LL_ENDL; + calculateCost(asset_type_str); gMenuHolder->childSetLabelArg(menu_name, "[COST]", mCostStr); return true; } - void calculateCost(); + void calculateCost(const std::string& asset_type_str); public: LLUploadCostCalculator() { - calculateCost(); } }; @@ -8702,19 +8718,24 @@ class LLToggleUIHints : public view_listener_t } }; -void LLUploadCostCalculator::calculateCost() +void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str) { - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + // FIXME PREMIUM reasonable default? + S32 upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); - // getPriceUpload() returns -1 if no data available yet. - if(upload_cost >= 0) + if (asset_type_str == "texture") { - mCostStr = llformat("%d", upload_cost); + upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); } - else + else if (asset_type_str == "animation") { - mCostStr = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + upload_cost = LLAgentBenefits::instance().getAnimationUploadCost(); } + else if (asset_type_str == "sound") + { + upload_cost = LLAgentBenefits::instance().getSoundUploadCost(); + } + mCostStr = std::to_string(upload_cost); } void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) @@ -8819,6 +8840,7 @@ void initialize_menus() enable.add("displayViewerEventRecorderMenuItems",boost::bind(&LLViewerEventRecorder::displayViewerEventRecorderMenuItems,&LLViewerEventRecorder::instance())); + // FIXME PREMIUM these need to be distinguished by asset type - see menu_viewer.xml view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts"); enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ca1216b89d..f8ff71911e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -38,6 +38,7 @@ #include "raytrace.h" #include "llagent.h" // Get state values from here +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentwearables.h" #include "llanimationstates.h" @@ -7060,20 +7061,7 @@ U32 LLVOAvatar::getNumAttachments() const //----------------------------------------------------------------------------- S32 LLVOAvatar::getMaxAttachments() const { - const S32 MAX_AGENT_ATTACHMENTS = 38; - - S32 max_attach = MAX_AGENT_ATTACHMENTS; - - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("MaxAgentAttachments")) - { - max_attach = features["MaxAgentAttachments"].asInteger(); - } - } - return max_attach; + return LLAgentBenefits::instance().getAttachmentLimit(); } //----------------------------------------------------------------------------- @@ -7107,24 +7095,7 @@ U32 LLVOAvatar::getNumAnimatedObjectAttachments() const //----------------------------------------------------------------------------- S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const { - S32 max_attach = 0; - if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits")) - { - max_attach = getMaxAttachments(); - } - else - { - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("AnimatedObjects")) - { - max_attach = features["AnimatedObjects"]["MaxAgentAnimatedObjectAttachments"].asInteger(); - } - } - } - return max_attach; + return LLAgentBenefits::instance().getAnimatedObjectLimit(); } //----------------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 7bb7b5d62c..165986448f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1306,7 +1306,7 @@ function="File.EnableUpload" /> + parameter="Upload Image,texture" /> + parameter="Upload Sound,sound" /> + parameter="Upload Animation,animation" /> + From 65550520ed00699098b221a1166e4c1763333d58 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 15 Nov 2019 15:13:11 +0000 Subject: [PATCH 010/212] SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits. --- indra/llinventory/CMakeLists.txt | 2 - indra/llinventory/lleconomy.cpp | 287 ------------------ indra/llinventory/lleconomy.h | 157 ---------- indra/newview/llagent.cpp | 3 +- indra/newview/llagentbenefits.cpp | 16 +- indra/newview/llagentbenefits.h | 2 + indra/newview/llfloaterbvhpreview.cpp | 1 - indra/newview/llfloatergroups.cpp | 5 +- indra/newview/llfloatermodelpreview.cpp | 1 - indra/newview/llfloaternamedesc.cpp | 7 +- indra/newview/llgroupmgr.cpp | 1 - indra/newview/llmeshrepository.cpp | 1 - indra/newview/lloutfitgallery.cpp | 1 - indra/newview/llpanelcontents.cpp | 1 - indra/newview/llpanelgroupgeneral.cpp | 5 +- indra/newview/llpanelmaininventory.cpp | 6 - indra/newview/llpanelobject.cpp | 1 - indra/newview/llpanelpeople.cpp | 12 +- indra/newview/llpanelsnapshotinventory.cpp | 9 +- indra/newview/llpanelsnapshotoptions.cpp | 1 - indra/newview/llpanelvolume.cpp | 1 - indra/newview/llselectmgr.cpp | 1 - indra/newview/llsnapshotlivepreview.cpp | 4 +- indra/newview/llstartup.cpp | 8 - indra/newview/llstartup.h | 1 - indra/newview/llviewerassetupload.cpp | 1 - indra/newview/llviewermenu.cpp | 1 - indra/newview/llviewermenufile.cpp | 7 +- indra/newview/llviewermessage.cpp | 15 +- .../skins/default/xui/en/notifications.xml | 4 +- 30 files changed, 47 insertions(+), 515 deletions(-) delete mode 100644 indra/llinventory/lleconomy.cpp delete mode 100644 indra/llinventory/lleconomy.h diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 68dd00d880..32a83a88d9 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -19,7 +19,6 @@ include_directories( set(llinventory_SOURCE_FILES llcategory.cpp - lleconomy.cpp llfoldertype.cpp llinventory.cpp llinventorydefines.cpp @@ -37,7 +36,6 @@ set(llinventory_HEADER_FILES CMakeLists.txt llcategory.h - lleconomy.h llfoldertype.h llinventory.h llinventorydefines.h diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp deleted file mode 100644 index 2a023d8c24..0000000000 --- a/indra/llinventory/lleconomy.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/** - * @file lleconomy.cpp - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "linden_common.h" - -#include "lleconomy.h" -#include "llerror.h" -#include "message.h" -#include "v3math.h" - - -LLBaseEconomy::LLBaseEconomy() -: mObjectCount( -1 ), - mObjectCapacity( -1 ), - mPriceObjectClaim( -1 ), - mPricePublicObjectDecay( -1 ), - mPricePublicObjectDelete( -1 ), - mPriceEnergyUnit( -1 ), - mPriceUpload( -1 ), - mPriceRentLight( -1 ), - mTeleportMinPrice( -1 ), - mTeleportPriceExponent( -1 ), - mPriceGroupCreate( -1 ) -{ } - -LLBaseEconomy::~LLBaseEconomy() -{ } - -void LLBaseEconomy::addObserver(LLEconomyObserver* observer) -{ - mObservers.push_back(observer); -} - -void LLBaseEconomy::removeObserver(LLEconomyObserver* observer) -{ - std::list::iterator it = - std::find(mObservers.begin(), mObservers.end(), observer); - if (it != mObservers.end()) - { - mObservers.erase(it); - } -} - -void LLBaseEconomy::notifyObservers() -{ - for (std::list::iterator it = mObservers.begin(); - it != mObservers.end(); - ++it) - { - (*it)->onEconomyDataChange(); - } -} - -// static -void LLBaseEconomy::processEconomyData(LLMessageSystem *msg, LLBaseEconomy* econ_data) -{ - S32 i; - F32 f; - - msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCapacity, i); - econ_data->setObjectCapacity(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCount, i); - econ_data->setObjectCount(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceEnergyUnit, i); - econ_data->setPriceEnergyUnit(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceObjectClaim, i); - econ_data->setPriceObjectClaim(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDecay, i); - econ_data->setPricePublicObjectDecay(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDelete, i); - econ_data->setPricePublicObjectDelete(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceUpload, i); - econ_data->setPriceUpload(i); -#if LL_LINUX - // We can optionally fake the received upload price for testing. - // Note that the server is within its rights to not obey our fake - // price. :) - const char* fakeprice_str = getenv("LL_FAKE_UPLOAD_PRICE"); - if (fakeprice_str) - { - S32 fakeprice = (S32)atoi(fakeprice_str); - LL_WARNS() << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << LL_ENDL; - econ_data->setPriceUpload(fakeprice); - } -#endif - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceRentLight, i); - econ_data->setPriceRentLight(i); - msg->getS32Fast(_PREHASH_Info, _PREHASH_TeleportMinPrice, i); - econ_data->setTeleportMinPrice(i); - msg->getF32Fast(_PREHASH_Info, _PREHASH_TeleportPriceExponent, f); - econ_data->setTeleportPriceExponent(f); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i); - econ_data->setPriceGroupCreate(i); - - econ_data->notifyObservers(); -} - -S32 LLBaseEconomy::calculateTeleportCost(F32 distance) const -{ - S32 min_cost = getTeleportMinPrice(); - F32 exponent = getTeleportPriceExponent(); - F32 divisor = 100.f * pow(3.f, exponent); - S32 cost = (U32)(distance * pow(log10(distance), exponent) / divisor); - if (cost < 0) - { - cost = 0; - } - else if (cost < min_cost) - { - cost = min_cost; - } - - return cost; -} - -S32 LLBaseEconomy::calculateLightRent(const LLVector3& object_size) const -{ - F32 intensity_mod = llmax(object_size.magVec(), 1.f); - return (S32)(intensity_mod * getPriceRentLight()); -} - -void LLBaseEconomy::print() -{ - LL_INFOS() << "Global Economy Settings: " << LL_ENDL; - LL_INFOS() << "Object Capacity: " << mObjectCapacity << LL_ENDL; - LL_INFOS() << "Object Count: " << mObjectCount << LL_ENDL; - LL_INFOS() << "Claim Price Per Object: " << mPriceObjectClaim << LL_ENDL; - LL_INFOS() << "Claim Price Per Public Object: " << mPricePublicObjectDecay << LL_ENDL; - LL_INFOS() << "Delete Price Per Public Object: " << mPricePublicObjectDelete << LL_ENDL; - LL_INFOS() << "Release Price Per Public Object: " << getPricePublicObjectRelease() << LL_ENDL; - LL_INFOS() << "Price Per Energy Unit: " << mPriceEnergyUnit << LL_ENDL; - LL_INFOS() << "Price Per Upload: " << mPriceUpload << LL_ENDL; - LL_INFOS() << "Light Base Price: " << mPriceRentLight << LL_ENDL; - LL_INFOS() << "Teleport Min Price: " << mTeleportMinPrice << LL_ENDL; - LL_INFOS() << "Teleport Price Exponent: " << mTeleportPriceExponent << LL_ENDL; - LL_INFOS() << "Price for group creation: " << mPriceGroupCreate << LL_ENDL; -} - -LLRegionEconomy::LLRegionEconomy() -: mPriceObjectRent( -1.f ), - mPriceObjectScaleFactor( -1.f ), - mEnergyEfficiency( -1.f ), - mBasePriceParcelClaimDefault(-1), - mBasePriceParcelClaimActual(-1), - mPriceParcelClaimFactor(-1.f), - mBasePriceParcelRent(-1), - mAreaOwned(-1.f), - mAreaTotal(-1.f) -{ } - -LLRegionEconomy::~LLRegionEconomy() -{ } - -BOOL LLRegionEconomy::hasData() const -{ - return (mBasePriceParcelRent != -1); -} - -// static -void LLRegionEconomy::processEconomyData(LLMessageSystem *msg, void** user_data) -{ - S32 i; - F32 f; - - LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; - - LLBaseEconomy::processEconomyData(msg, this_ptr); - - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelClaim, i); - this_ptr->setBasePriceParcelClaimDefault(i); - msg->getF32(_PREHASH_Info, _PREHASH_PriceParcelClaimFactor, f); - this_ptr->setPriceParcelClaimFactor(f); - msg->getF32Fast(_PREHASH_Info, _PREHASH_EnergyEfficiency, f); - this_ptr->setEnergyEfficiency(f); - msg->getF32Fast(_PREHASH_Info, _PREHASH_PriceObjectRent, f); - this_ptr->setPriceObjectRent(f); - msg->getF32Fast(_PREHASH_Info, _PREHASH_PriceObjectScaleFactor, f); - this_ptr->setPriceObjectScaleFactor(f); - msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelRent, i); - this_ptr->setBasePriceParcelRent(i); -} - -// static -void LLRegionEconomy::processEconomyDataRequest(LLMessageSystem *msg, void **user_data) -{ - LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; - if (!this_ptr->hasData()) - { - LL_WARNS() << "Dropping EconomyDataRequest, because EconomyData message " - << "has not been processed" << LL_ENDL; - } - - msg->newMessageFast(_PREHASH_EconomyData); - msg->nextBlockFast(_PREHASH_Info); - msg->addS32Fast(_PREHASH_ObjectCapacity, this_ptr->getObjectCapacity()); - msg->addS32Fast(_PREHASH_ObjectCount, this_ptr->getObjectCount()); - msg->addS32Fast(_PREHASH_PriceEnergyUnit, this_ptr->getPriceEnergyUnit()); - msg->addS32Fast(_PREHASH_PriceObjectClaim, this_ptr->getPriceObjectClaim()); - msg->addS32Fast(_PREHASH_PricePublicObjectDecay, this_ptr->getPricePublicObjectDecay()); - msg->addS32Fast(_PREHASH_PricePublicObjectDelete, this_ptr->getPricePublicObjectDelete()); - msg->addS32Fast(_PREHASH_PriceParcelClaim, this_ptr->mBasePriceParcelClaimActual); - msg->addF32Fast(_PREHASH_PriceParcelClaimFactor, this_ptr->mPriceParcelClaimFactor); - msg->addS32Fast(_PREHASH_PriceUpload, this_ptr->getPriceUpload()); - msg->addS32Fast(_PREHASH_PriceRentLight, this_ptr->getPriceRentLight()); - msg->addS32Fast(_PREHASH_TeleportMinPrice, this_ptr->getTeleportMinPrice()); - msg->addF32Fast(_PREHASH_TeleportPriceExponent, this_ptr->getTeleportPriceExponent()); - - msg->addF32Fast(_PREHASH_EnergyEfficiency, this_ptr->getEnergyEfficiency()); - msg->addF32Fast(_PREHASH_PriceObjectRent, this_ptr->getPriceObjectRent()); - msg->addF32Fast(_PREHASH_PriceObjectScaleFactor, this_ptr->getPriceObjectScaleFactor()); - msg->addS32Fast(_PREHASH_PriceParcelRent, this_ptr->getPriceParcelRent()); - msg->addS32Fast(_PREHASH_PriceGroupCreate, this_ptr->getPriceGroupCreate()); - - msg->sendReliable(msg->getSender()); -} - - -S32 LLRegionEconomy::getPriceParcelClaim() const -{ - //return (S32)((F32)mBasePriceParcelClaim * (mAreaTotal / (mAreaTotal - mAreaOwned))); - return (S32)((F32)mBasePriceParcelClaimActual * mPriceParcelClaimFactor); -} - -S32 LLRegionEconomy::getPriceParcelRent() const -{ - return mBasePriceParcelRent; -} - - -void LLRegionEconomy::print() -{ - this->LLBaseEconomy::print(); - - LL_INFOS() << "Region Economy Settings: " << LL_ENDL; - LL_INFOS() << "Land (square meters): " << mAreaTotal << LL_ENDL; - LL_INFOS() << "Owned Land (square meters): " << mAreaOwned << LL_ENDL; - LL_INFOS() << "Daily Object Rent: " << mPriceObjectRent << LL_ENDL; - LL_INFOS() << "Daily Land Rent (per meter): " << getPriceParcelRent() << LL_ENDL; - LL_INFOS() << "Energey Efficiency: " << mEnergyEfficiency << LL_ENDL; -} - - -void LLRegionEconomy::setBasePriceParcelClaimDefault(S32 val) -{ - mBasePriceParcelClaimDefault = val; - if(mBasePriceParcelClaimActual == -1) - { - mBasePriceParcelClaimActual = val; - } -} - -void LLRegionEconomy::setBasePriceParcelClaimActual(S32 val) -{ - mBasePriceParcelClaimActual = val; -} - -void LLRegionEconomy::setPriceParcelClaimFactor(F32 val) -{ - mPriceParcelClaimFactor = val; -} - -void LLRegionEconomy::setBasePriceParcelRent(S32 val) -{ - mBasePriceParcelRent = val; -} diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h deleted file mode 100644 index cdfde171c1..0000000000 --- a/indra/llinventory/lleconomy.h +++ /dev/null @@ -1,157 +0,0 @@ -/** - * @file lleconomy.h - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLECONOMY_H -#define LL_LLECONOMY_H - -#include "llsingleton.h" -#include - -class LLMessageSystem; -class LLVector3; - -/** - * Register an observer to be notified of economy data updates coming from server. - */ -class LLEconomyObserver -{ -public: - virtual ~LLEconomyObserver() {} - virtual void onEconomyDataChange() = 0; -}; - -class LLBaseEconomy -{ -public: - LLBaseEconomy(); - virtual ~LLBaseEconomy(); - - virtual void print(); - - void addObserver(LLEconomyObserver* observer); - void removeObserver(LLEconomyObserver* observer); - void notifyObservers(); - - static void processEconomyData(LLMessageSystem *msg, LLBaseEconomy* econ_data); - - S32 calculateTeleportCost(F32 distance) const; - S32 calculateLightRent(const LLVector3& object_size) const; - - S32 getObjectCount() const { return mObjectCount; } - S32 getObjectCapacity() const { return mObjectCapacity; } - S32 getPriceObjectClaim() const { return mPriceObjectClaim; } - S32 getPricePublicObjectDecay() const { return mPricePublicObjectDecay; } - S32 getPricePublicObjectDelete() const { return mPricePublicObjectDelete; } - S32 getPricePublicObjectRelease() const { return mPriceObjectClaim - mPricePublicObjectDelete; } - S32 getPriceEnergyUnit() const { return mPriceEnergyUnit; } - S32 getPriceUpload() const { return mPriceUpload; } - S32 getPriceRentLight() const { return mPriceRentLight; } - S32 getTeleportMinPrice() const { return mTeleportMinPrice; } - F32 getTeleportPriceExponent() const { return mTeleportPriceExponent; } - S32 getPriceGroupCreate() const { return mPriceGroupCreate; } - - - void setObjectCount(S32 val) { mObjectCount = val; } - void setObjectCapacity(S32 val) { mObjectCapacity = val; } - void setPriceObjectClaim(S32 val) { mPriceObjectClaim = val; } - void setPricePublicObjectDecay(S32 val) { mPricePublicObjectDecay = val; } - void setPricePublicObjectDelete(S32 val) { mPricePublicObjectDelete = val; } - void setPriceEnergyUnit(S32 val) { mPriceEnergyUnit = val; } - void setPriceUpload(S32 val) { mPriceUpload = val; } - void setPriceRentLight(S32 val) { mPriceRentLight = val; } - void setTeleportMinPrice(S32 val) { mTeleportMinPrice = val; } - void setTeleportPriceExponent(F32 val) { mTeleportPriceExponent = val; } - void setPriceGroupCreate(S32 val) { mPriceGroupCreate = val; } - -private: - S32 mObjectCount; - S32 mObjectCapacity; - S32 mPriceObjectClaim; // per primitive - S32 mPricePublicObjectDecay; // per primitive - S32 mPricePublicObjectDelete; // per primitive - S32 mPriceEnergyUnit; - S32 mPriceUpload; - S32 mPriceRentLight; - S32 mTeleportMinPrice; - F32 mTeleportPriceExponent; - S32 mPriceGroupCreate; - - std::list mObservers; -}; - -class LLGlobalEconomy: public LLSingleton, public LLBaseEconomy -{ - LLSINGLETON_EMPTY_CTOR(LLGlobalEconomy); -}; - -class LLRegionEconomy : public LLBaseEconomy -{ -public: - LLRegionEconomy(); - ~LLRegionEconomy(); - - static void processEconomyData(LLMessageSystem *msg, void **user_data); - static void processEconomyDataRequest(LLMessageSystem *msg, void **user_data); - - void print(); - - BOOL hasData() const; - F32 getPriceObjectRent() const { return mPriceObjectRent; } - F32 getPriceObjectScaleFactor() const {return mPriceObjectScaleFactor;} - F32 getEnergyEfficiency() const { return mEnergyEfficiency; } - S32 getPriceParcelClaim() const; - S32 getPriceParcelRent() const; - F32 getAreaOwned() const { return mAreaOwned; } - F32 getAreaTotal() const { return mAreaTotal; } - S32 getBasePriceParcelClaimActual() const { return mBasePriceParcelClaimActual; } - - void setPriceObjectRent(F32 val) { mPriceObjectRent = val; } - void setPriceObjectScaleFactor(F32 val) { mPriceObjectScaleFactor = val; } - void setEnergyEfficiency(F32 val) { mEnergyEfficiency = val; } - - void setBasePriceParcelClaimDefault(S32 val); - void setBasePriceParcelClaimActual(S32 val); - void setPriceParcelClaimFactor(F32 val); - void setBasePriceParcelRent(S32 val); - - void setAreaOwned(F32 val) { mAreaOwned = val; } - void setAreaTotal(F32 val) { mAreaTotal = val; } - -private: - F32 mPriceObjectRent; - F32 mPriceObjectScaleFactor; - F32 mEnergyEfficiency; - - S32 mBasePriceParcelClaimDefault; - S32 mBasePriceParcelClaimActual; - F32 mPriceParcelClaimFactor; - S32 mBasePriceParcelRent; - - F32 mAreaOwned; - F32 mAreaTotal; - -}; - -#endif diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 31b8b90518..1b622de847 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -32,6 +32,7 @@ #include "pipeline.h" #include "llagentaccess.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" @@ -2984,7 +2985,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return (S32)mGroups.size() < gMaxAgentGroups; + return (S32)mGroups.size() < LLAgentBenefits::instance().getGroupMembershipLimit(); } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 09be8f46c1..5ca4ecb456 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -73,6 +73,10 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) { return false; } + if (!get_required_S32(benefits_sd, "create_group_cost", m_create_group_cost)) + { + return false; + } if (!get_required_S32(benefits_sd, "group_membership_limit", m_group_membership_limit)) { return false; @@ -86,42 +90,42 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) return false; } + // FIXME PREMIUM - either use this field or get rid of it m_initalized = true; return true; } S32 LLAgentBenefits::getAnimatedObjectLimit() const { - //llassert(m_initalized); return m_animated_object_limit; } S32 LLAgentBenefits::getAnimationUploadCost() const { - //llassert(m_initalized); return m_animation_upload_cost; } S32 LLAgentBenefits::getAttachmentLimit() const { - //llassert(m_initalized); return m_attachment_limit; } +S32 LLAgentBenefits::getCreateGroupCost() const +{ + return m_create_group_cost; +} + S32 LLAgentBenefits::getGroupMembershipLimit() const { - //llassert(m_initalized); return m_group_membership_limit; } S32 LLAgentBenefits::getSoundUploadCost() const { - //llassert(m_initalized); return m_sound_upload_cost; } S32 LLAgentBenefits::getTextureUploadCost() const { - //llassert(m_initalized); return m_texture_upload_cost; } diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 995833149c..b21048e38b 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -41,6 +41,7 @@ public: S32 getAnimatedObjectLimit() const; S32 getAnimationUploadCost() const; S32 getAttachmentLimit() const; + S32 getCreateGroupCost() const; S32 getGroupMembershipLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; @@ -49,6 +50,7 @@ private: S32 m_animated_object_limit; S32 m_animation_upload_cost; S32 m_attachment_limit; + S32 m_create_group_cost; S32 m_group_membership_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 91a6e63665..6d7d3c8556 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -31,7 +31,6 @@ #include "llbvhloader.h" #include "lldatapacker.h" #include "lldir.h" -#include "lleconomy.h" #include "llnotificationsutil.h" #include "llvfile.h" #include "llapr.h" diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index dbe7fee108..a32b01679a 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -38,6 +38,7 @@ #include "roles_constants.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llbutton.h" #include "llgroupactions.h" #include "llscrolllistctrl.h" @@ -172,7 +173,7 @@ void LLPanelGroups::reset() group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); init_group_list(getChild("group list"), gAgent.getGroupID()); enableButtons(); @@ -183,7 +184,7 @@ BOOL LLPanelGroups::postBuild() childSetCommitCallback("group list", onGroupList, this); getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); LLScrollListCtrl *list = getChild("group list"); if (list) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b6efc1590e..dfed11f1b0 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -44,7 +44,6 @@ #include "lldrawable.h" #include "llrender.h" #include "llface.h" -#include "lleconomy.h" #include "llfocusmgr.h" #include "llfloaterperms.h" #include "lliconctrl.h" diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 33dfae8be8..fa1ed57d1f 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -46,12 +46,12 @@ #include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llstring.h" -#include "lleconomy.h" #include "llpermissions.h" // linden includes #include "llassetstorage.h" #include "llinventorytype.h" +#include "llagentbenefits.h" const S32 PREVIEW_LINE_HEIGHT = 19; const S32 PREVIEW_BORDER_WIDTH = 2; @@ -123,7 +123,8 @@ BOOL LLFloaterNameDesc::postBuild() // Cancel button getChild("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnCancel, this)); - getChild("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload() )); + // FIXME PREMIUM - depends - what are we uploading here? + getChild("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); setDefaultBtn("ok_btn"); @@ -163,7 +164,7 @@ void LLFloaterNameDesc::onBtnOK( ) // FIXME PREMIUM - upload cost. Need to know which asset type this is, use agent benefits. LLAssetStorage::LLStoreAssetCallback callback = NULL; - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). if (can_afford_transaction(expected_upload_cost)) { diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 088d052533..e384019a43 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -44,7 +44,6 @@ #include "roles_constants.h" #include "lltransactiontypes.h" #include "llstatusbar.h" -#include "lleconomy.h" #include "llviewerwindow.h" #include "llpanelgroup.h" #include "llgroupactions.h" diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 31e3d408d7..be05ba9207 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -41,7 +41,6 @@ #include "lldeadmantimer.h" #include "llfloatermodelpreview.h" #include "llfloaterperms.h" -#include "lleconomy.h" #include "llimagej2c.h" #include "llhost.h" #include "llmath.h" diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 8f5626bd7a..35b83880d9 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -37,7 +37,6 @@ #include "llaccordionctrltab.h" #include "llappearancemgr.h" #include "llagentbenefits.h" -#include "lleconomy.h" #include "llerror.h" #include "llfilepicker.h" #include "llfloaterperms.h" diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 451f41cd3b..3bae0cebfb 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -30,7 +30,6 @@ #include "llpanelcontents.h" // linden library includes -#include "lleconomy.h" #include "llerror.h" #include "llfloaterreg.h" #include "llfontgl.h" diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index b53cd222e7..2d0a09b469 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -30,6 +30,7 @@ #include "llavatarnamecache.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llsdparam.h" #include "lluictrlfactory.h" #include "roles_constants.h" @@ -339,7 +340,9 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); + LLSD args; + args["COST"] = LLAgentBenefits::instance().getCreateGroupCost(); + LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 7404798589..b81dce4e31 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,7 +34,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldndbutton.h" -#include "lleconomy.h" #include "llfilepicker.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -1510,11 +1509,6 @@ bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType void LLPanelMainInventory::setUploadCostIfNeeded() { - // *NOTE dzaporozhan - // Upload cost is set in process_economy_data() (llviewermessage.cpp). But since we - // have two instances of Inventory panel at the moment(and two instances of context menu), - // call to gMenuHolder->childSetLabelArg() sets upload cost only for one of the instances. - LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 3665910c63..6bff95ab36 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -30,7 +30,6 @@ #include "llpanelobject.h" // linden library includes -#include "lleconomy.h" #include "llerror.h" #include "llfontgl.h" #include "llpermissionsflags.h" diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d138433ed8..0a41018293 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -47,6 +47,7 @@ #include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llavataractions.h" #include "llavatarlist.h" #include "llavatarlistitem.h" @@ -85,11 +86,10 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +// FIXME PREMIUM - these should come from package info, once viewer is receiving it all. const S32 BASE_MAX_AGENT_GROUPS = 42; const S32 PREMIUM_MAX_AGENT_GROUPS = 60; -extern S32 gMaxAgentGroups; - /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -629,7 +629,7 @@ BOOL LLPanelPeople::postBuild() getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(gMaxAgentGroups < max_premium) + if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) { getChild("groupcount")->setText(getString("GroupCountWithInfo")); getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -877,9 +877,10 @@ void LLPanelPeople::updateButtons() groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected U32 groups_count = gAgent.mGroups.size(); - U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0; + S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0; groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); - groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining)); + groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining)); } else { @@ -1092,6 +1093,7 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) } } +// FIXME PREMIUM this should be coming from LLAgentBenefits info about the various packages. void LLPanelPeople::onGroupLimitInfo() { LLSD args; diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 21ac7604ff..202f42c53a 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llcombobox.h" -#include "lleconomy.h" #include "llsidetraypanelcontainer.h" #include "llspinctrl.h" @@ -38,6 +37,8 @@ #include "llstatusbar.h" // can_afford_transaction() #include "llnotificationsutil.h" +#include "llagentbenefits.h" + /** * The panel provides UI for saving snapshot as an inventory texture. */ @@ -135,7 +136,7 @@ BOOL LLPanelSnapshotInventory::postBuild() // virtual void LLPanelSnapshotInventory::onOpen(const LLSD& key) { - getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload())); + getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } @@ -155,7 +156,7 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventoryBase::onSend() { - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); if (can_afford_transaction(expected_upload_cost)) { if (mSnapshotFloater) @@ -191,7 +192,7 @@ BOOL LLPanelOutfitSnapshotInventory::postBuild() // virtual void LLPanelOutfitSnapshotInventory::onOpen(const LLSD& key) { - getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload())); + getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 63206e2780..7932db8727 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -26,7 +26,6 @@ #include "llviewerprecompiledheaders.h" -#include "lleconomy.h" #include "llpanel.h" #include "llsidetraypanelcontainer.h" diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 735eaa423d..de2fa74803 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -31,7 +31,6 @@ // linden library includes #include "llclickaction.h" -#include "lleconomy.h" #include "llerror.h" #include "llfontgl.h" #include "llflexibleobject.h" diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 90f8f84ea4..00ff91634d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -35,7 +35,6 @@ #include "llcachename.h" #include "llavatarnamecache.h" #include "lldbstrings.h" -#include "lleconomy.h" #include "llgl.h" #include "llmediaentry.h" #include "llrender.h" diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f5fea9dece..430abba543 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -28,10 +28,10 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentui.h" #include "llcombobox.h" -#include "lleconomy.h" #include "llfloaterperms.h" #include "llfloaterreg.h" #include "llfloaterflickr.h" @@ -1039,7 +1039,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string; std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string; LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 979fe63432..2f9bc786ca 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -209,7 +209,6 @@ // exported globals // bool gAgentMovementCompleted = false; -S32 gMaxAgentGroups; const std::string SCREEN_HOME_FILENAME = "screen_home%s.png"; const std::string SCREEN_LAST_FILENAME = "screen_last%s.png"; @@ -246,7 +245,6 @@ static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; static bool mLoginStatePastUI = false; -const S32 DEFAULT_MAX_AGENT_GROUPS = 42; const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); @@ -1574,8 +1572,6 @@ bool idle_startup() send_complete_agent_movement(regionp->getHost()); gAssetStorage->setUpstream(regionp->getHost()); gCacheName->setUpstream(regionp->getHost()); - msg->newMessageFast(_PREHASH_EconomyDataRequest); - gAgent.sendReliableMessage(); } display_startup(); @@ -3606,10 +3602,6 @@ bool process_login_success_response() LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token); } - gMaxAgentGroups = LLAgentBenefits::instance().getGroupMembershipLimit(); - LL_INFOS("LLStartup") << "gMaxAgentGroups set from agent benefits: " - << gMaxAgentGroups << LL_ENDL; - bool success = false; // JC: gesture loading done below, when we have an asset system // in place. Don't delete/clear gUserCredentials until then. diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index db37207022..e9d0498fcb 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -80,7 +80,6 @@ typedef enum { // exported symbols extern bool gAgentMovementCompleted; -extern S32 gMaxAgentGroups; extern LLPointer gStartTexture; class LLStartUp diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index a919362321..2a79eee80e 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -36,7 +36,6 @@ #include "lluploaddialog.h" #include "llpreviewscript.h" #include "llnotificationsutil.h" -#include "lleconomy.h" #include "llagent.h" #include "llfloaterreg.h" #include "llfloatersnapshot.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0fda4d3df8..ef3c1f4c14 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -128,7 +128,6 @@ #include "lluilistener.h" #include "llappearancemgr.h" #include "lltrans.h" -#include "lleconomy.h" #include "lltoolgrab.h" #include "llwindow.h" #include "llpathfindingmanager.h" diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index a9a91b158b..b1606958e1 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -30,6 +30,7 @@ // project includes #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llfilepicker.h" #include "llfloaterreg.h" @@ -67,7 +68,6 @@ #include "llviewerassetupload.h" // linden libraries -#include "lleconomy.h" #include "llnotificationsutil.h" #include "llsdserialize.h" #include "llsdutil.h" @@ -85,8 +85,6 @@ class LLFileEnableUpload : public view_listener_t bool handleEvent(const LLSD& userdata) { return true; -// bool new_value = gStatusBar && LLGlobalEconomy::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::getInstance()->getPriceUpload()); -// return new_value; } }; @@ -417,7 +415,8 @@ const void upload_bulk(const std::vector& filenames, LLFilePicker:: // // Also fix single upload to charge first, then refund - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + // FIXME PREMIUM - upload_cost should be per-file, depends on asset type + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); for (std::vector::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { std::string filename = (*in_iter); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b0ad81614a..2cde93f471 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -32,7 +32,6 @@ #include "llaudioengine.h" #include "llavataractions.h" #include "llavatarnamecache.h" // IDEVO HACK -#include "lleconomy.h" #include "lleventtimer.h" #include "llfloaterreg.h" #include "llfolderview.h" @@ -51,6 +50,7 @@ #include "mean_collision_data.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llcallingcard.h" #include "llbuycurrencyhtml.h" @@ -903,7 +903,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = gMaxAgentGroups; + S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.size() < max_groups) @@ -5435,16 +5435,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) // do some extra stuff once we get our economy data void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) { - LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance()); - - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); - - LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL; - - gMenuHolder->getChild("Upload Image")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild("Upload Sound")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild("Upload Animation")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild("Bulk Upload")->setLabelArg("[COST]", llformat("%d", upload_cost)); + LL_DEBUGS("Benefits") << "Received economy data, not currently used" << LL_ENDL; } void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f72767cceb..e0fc6bb9a5 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -920,7 +920,7 @@ You do not have enough L$ to join this group. icon="alertmodal.tga" name="CreateGroupCost" type="alertmodal"> -Creating this group will cost L$100. +Creating this group will cost L$[COST]. Groups need more than one member, or they are deleted forever. Please invite members within 48 hours. group @@ -929,7 +929,7 @@ Please invite members within 48 hours. canceltext="Cancel" name="okcancelbuttons" notext="Cancel" - yestext="Create group for L$100"/> + yestext="Create group for L$[COST]"/> Date: Fri, 15 Nov 2019 19:47:03 +0200 Subject: [PATCH 011/212] SL-9699 First login panel checkbox was misinterpreted --- indra/newview/llpanellogin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4f050a9748..cfd486f7f3 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -749,7 +749,7 @@ void LLPanelLogin::getFields(LLPointer& credential, } else { - remember_user = true; + remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me' } } From e32a2e2f8ad072408cb9136d3d5fc5f02a232bef Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sun, 17 Nov 2019 18:21:49 +0200 Subject: [PATCH 012/212] SL-9699 Fixed processing of placeholder --- indra/newview/llpanellogin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index cfd486f7f3..4fd39d1211 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1230,8 +1230,12 @@ void LLPanelLogin::populateUserList(LLPointer credential) { if (credential.notNull()) { - user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); - setFields(credential); + const LLSD &ident = credential->getIdentifier(); + if (ident.isMap() && ident.has("type")) + { + user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); + setFields(credential); + } } } } From d12e10be377e692f5164ba914b8f038e66b0d45c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 18 Nov 2019 17:15:11 +0000 Subject: [PATCH 013/212] SL-10499 - bulk upload behavior adjusted to account for possibly different upload prices for different asset types. Also added a confirmation dialog for bulk upload. --- indra/newview/llagentbenefits.cpp | 21 ++++ indra/newview/llagentbenefits.h | 3 + indra/newview/llviewerassetupload.cpp | 52 ++++++--- indra/newview/llviewerassetupload.h | 2 + indra/newview/llviewermenufile.cpp | 104 ++++++++++++++---- .../default/xui/en/menu_inventory_add.xml | 4 +- .../skins/default/xui/en/menu_viewer.xml | 2 +- .../skins/default/xui/en/notifications.xml | 11 ++ .../default/xui/it/menu_inventory_add.xml | 2 +- .../skins/default/xui/it/menu_viewer.xml | 2 +- .../skins/default/xui/pl/menu_viewer.xml | 2 +- .../default/xui/pt/menu_inventory_add.xml | 2 +- 12 files changed, 163 insertions(+), 44 deletions(-) diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 5ca4ecb456..eef644ccc0 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -129,3 +129,24 @@ S32 LLAgentBenefits::getTextureUploadCost() const { return m_texture_upload_cost; } + +bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) +{ + bool succ = false; + if (asset_type == LLAssetType::AT_TEXTURE) + { + cost = getTextureUploadCost(); + succ = true; + } + else if (asset_type == LLAssetType::AT_SOUND) + { + cost = getSoundUploadCost(); + succ = true; + } + else if (asset_type == LLAssetType::AT_ANIMATION) + { + cost = getAnimationUploadCost(); + succ = true; + } + return succ; +} diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index b21048e38b..7ed6e169ce 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -28,6 +28,7 @@ #include "llsingleton.h" #include "llsd.h" +#include "llassettype.h" class LLAgentBenefits: public LLSingleton { @@ -45,6 +46,8 @@ public: S32 getGroupMembershipLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; + + bool findUploadCost(LLAssetType::EType& asset_type, S32& cost); private: S32 m_animated_object_limit; diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 2a79eee80e..de35f9911c 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -306,6 +306,31 @@ std::string LLResourceUploadInfo::getDisplayName() const return (mName.empty()) ? mAssetId.asString() : mName; }; +// static +bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec) +{ + bool succ = false; + + codec = LLImageBase::getCodecFromExtension(exten); + if (codec != IMG_CODEC_INVALID) + { + asset_type = LLAssetType::AT_TEXTURE; + succ = true; + } + else if (exten == "wav") + { + asset_type = LLAssetType::AT_SOUND; + succ = true; + } + else if (exten == "anim") + { + asset_type = LLAssetType::AT_ANIMATION; + succ = true; + } + + return succ; +} + //========================================================================= LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo( std::string fileName, @@ -343,9 +368,11 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() std::string filename = gDirUtilp->getTempFilename(); std::string exten = gDirUtilp->getExtension(getFileName()); - U32 codec = LLImageBase::getCodecFromExtension(exten); LLAssetType::EType assetType = LLAssetType::AT_NONE; + U32 codec = IMG_CODEC_INVALID; + bool found_type = findAssetTypeAndCodecOfExtension(exten, assetType, codec); + std::string errorMessage; std::string errorLabel; @@ -362,10 +389,16 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() errorLabel = "NoFileExtension"; error = true; } - else if (codec != IMG_CODEC_INVALID) + else if (!found_type) + { + // Unknown extension + errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str()); + errorLabel = "ErrorMessage"; + error = TRUE;; + } + else if (assetType == LLAssetType::AT_TEXTURE) { // It's an image file, the upload procedure is the same for all - assetType = LLAssetType::AT_TEXTURE; if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec)) { errorMessage = llformat("Problem with file %s:\n\n%s\n", @@ -374,9 +407,8 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() error = true; } } - else if (exten == "wav") + else if (assetType == LLAssetType::AT_SOUND) { - assetType = LLAssetType::AT_SOUND; // tag it as audio S32 encodeResult = 0; LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL; @@ -406,18 +438,10 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() errorLabel = "DoNotSupportBulkAnimationUpload"; error = true; } - else if (exten == "anim") + else if (assetType == LLAssetType::AT_ANIMATION) { - assetType = LLAssetType::AT_ANIMATION; filename = getFileName(); } - else - { - // Unknown extension - errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str()); - errorLabel = "ErrorMessage"; - error = TRUE;; - } if (error) { diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 0ba16dce1d..8ef25ad6fd 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -87,6 +87,8 @@ public: LLUUID getItemId() const { return mItemId; } LLAssetID getAssetId() const { return mAssetId; } + static bool findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec); + protected: LLResourceUploadInfo( std::string name, diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index b1606958e1..90fbbcc8d2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -404,6 +404,70 @@ const void upload_single_file(const std::vector& filenames, LLFileP return; } +void do_bulk_upload(std::vector filenames, const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) + { + // Cancel upload + return; + } + + for (std::vector::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) + { + std::string filename = (*in_iter); + + std::string name = gDirUtilp->getBaseFileName(filename, true); + std::string asset_name = name; + LLStringUtil::replaceNonstandardASCII(asset_name, '?'); + LLStringUtil::replaceChar(asset_name, '|', '?'); + LLStringUtil::stripNonprintable(asset_name); + LLStringUtil::trim(asset_name); + + std::string ext = gDirUtilp->getExtension(filename); + LLAssetType::EType asset_type; + U32 codec; + S32 expected_upload_cost; + if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) && + LLAgentBenefits::instance().findUploadCost(asset_type, expected_upload_cost)) + { + LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( + filename, + asset_name, + asset_name, 0, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), + expected_upload_cost)); + + upload_new_resource(uploadInfo, NULL, NULL); + } + } +} + +bool get_bulk_upload_expected_cost(const std::vector& filenames, S32& total_cost) +{ + bool succ = true; + total_cost = 0; + for (std::vector::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) + { + std::string filename = (*in_iter); + std::string ext = gDirUtilp->getExtension(filename); + + LLAssetType::EType asset_type; + U32 codec; + S32 cost; + + if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) && + LLAgentBenefits::instance().findUploadCost(asset_type, cost)) + { + total_cost += cost; + } + } + + return succ; +} const void upload_bulk(const std::vector& filenames, LLFilePicker::ELoadFilter type) { @@ -415,31 +479,25 @@ const void upload_bulk(const std::vector& filenames, LLFilePicker:: // // Also fix single upload to charge first, then refund - // FIXME PREMIUM - upload_cost should be per-file, depends on asset type - S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + // FIXME PREMIUM what about known types that can't be bulk uploaded + // (bvh)? These will fail in the item by item upload but won't be + // mentioned in the notification. + std::vector filtered_filenames; for (std::vector::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { - std::string filename = (*in_iter); - if (!check_file_extension(filename, type)) continue; - - std::string name = gDirUtilp->getBaseFileName(filename, true); - std::string asset_name = name; - LLStringUtil::replaceNonstandardASCII(asset_name, '?'); - LLStringUtil::replaceChar(asset_name, '|', '?'); - LLStringUtil::stripNonprintable(asset_name); - LLStringUtil::trim(asset_name); - - LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( - filename, - asset_name, - asset_name, 0, - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms("Uploads"), - LLFloaterPerms::getGroupPerms("Uploads"), - LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost)); - - upload_new_resource(uploadInfo, NULL, NULL); + const std::string& filename = *in_iter; + if (check_file_extension(filename, type)) + { + filtered_filenames.push_back(filename); + } + } + S32 expected_upload_cost; + if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost)) + { + LLSD args; + args["COST"] = expected_upload_cost; + args["COUNT"] = (S32) filtered_filenames.size(); + LLNotificationsUtil::add("BulkUploadCostConfirmation", args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2)); } } diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index 29724b0270..05dd8f827d 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -56,7 +56,7 @@ function="File.VisibleUploadModel"/> - \ No newline at end of file + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 165986448f..9b27e8b03d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1347,7 +1347,7 @@ function="File.VisibleUploadModel"/> + +This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to continue with the upload? + + + - + diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index ae82a89d28..795a23ca9b 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -168,7 +168,7 @@ - + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index e6ad1faee6..2dfafff7f5 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -159,7 +159,7 @@ - + diff --git a/indra/newview/skins/default/xui/pt/menu_inventory_add.xml b/indra/newview/skins/default/xui/pt/menu_inventory_add.xml index 7a7ebc50af..92621e8493 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory_add.xml @@ -6,7 +6,7 @@ - + From 5b20fca991c109df40b5e8ee0f750507c57f46a1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 18 Nov 2019 19:32:47 +0000 Subject: [PATCH 014/212] possible fix for mac compilation error --- indra/newview/llviewermenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ef3c1f4c14..c1de275174 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8669,7 +8669,8 @@ class LLUploadCostCalculator : public view_listener_t bool handleEvent(const LLSD& userdata) { std::vector fields; - boost::split(fields, userdata.asString(), boost::is_any_of(",")); + std::string str = userdata.asString(); + boost::split(fields, str, boost::is_any_of(",")); if (fields.size()<1) { return false; From fed4d3391cf704fb080cf95e15cd992351ba0575 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 18 Nov 2019 21:46:19 +0200 Subject: [PATCH 015/212] SL-9699 Fixed processing of placeholder #2 --- indra/newview/llfloaterforgetuser.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp index 55e25ace9a..363951041a 100644 --- a/indra/newview/llfloaterforgetuser.cpp +++ b/indra/newview/llfloaterforgetuser.cpp @@ -54,7 +54,7 @@ LLFloaterForgetUser::~LLFloaterForgetUser() BOOL LLFloaterForgetUser::postBuild() { - // Note, storage works per grid, watever is selected currently in login screen or logged in. + // Note, storage works per grid, whatever is selected currently in login screen or logged in. // Since login screen can change grid, store the value. mGrid = LLGridManager::getInstance()->getGrid(); @@ -87,14 +87,18 @@ BOOL LLFloaterForgetUser::postBuild() LLPointer cred = gSecAPIHandler->loadCredential(mGrid); if (cred.notNull()) { - LLScrollListItem::Params item_params; - item_params.value(cred->userID()); - item_params.columns.add() - .value(LLPanelLogin::getUserName(cred)) - .column("user") - .font(LLFontGL::getFontSansSerifSmall()); - scroll_list->addRow(item_params, ADD_BOTTOM); - scroll_list->selectFirstItem(); + const LLSD &ident = cred->getIdentifier(); + if (ident.isMap() && ident.has("type")) + { + LLScrollListItem::Params item_params; + item_params.value(cred->userID()); + item_params.columns.add() + .value(LLPanelLogin::getUserName(cred)) + .column("user") + .font(LLFontGL::getFontSansSerifSmall()); + scroll_list->addRow(item_params, ADD_BOTTOM); + scroll_list->selectFirstItem(); + } } } From eb6e64ec401382fd2fbbbb27830e828035a6e5af Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 19 Nov 2019 16:15:19 +0000 Subject: [PATCH 016/212] SL-10499 - Fixes for benefits info and upload, especially bulk upload --- indra/newview/llfloaternamedesc.cpp | 31 ++++++++++++++----- indra/newview/llfloaternamedesc.h | 3 ++ indra/newview/llpanelmaininventory.cpp | 10 ------ indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerassetupload.cpp | 6 ++++ indra/newview/llviewerassetupload.h | 1 + indra/newview/llviewermenu.cpp | 10 +++--- .../skins/default/xui/en/menu_viewer.xml | 2 +- .../skins/default/xui/en/notifications.xml | 8 +++++ 9 files changed, 49 insertions(+), 24 deletions(-) diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index fa1ed57d1f..937dd60f0f 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -63,7 +63,7 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; //----------------------------------------------------------------------------- LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) : LLFloater(filename), - mIsAudio(FALSE) + mIsAudio(FALSE) { mFilenameAndPath = filename.asString(); mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false); @@ -123,14 +123,33 @@ BOOL LLFloaterNameDesc::postBuild() // Cancel button getChild("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnCancel, this)); - // FIXME PREMIUM - depends - what are we uploading here? - getChild("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); + S32 expected_upload_cost = getExpectedUploadCost(); + getChild("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", expected_upload_cost)); setDefaultBtn("ok_btn"); return TRUE; } +S32 LLFloaterNameDesc::getExpectedUploadCost() const +{ + std::string exten = gDirUtilp->getExtension(mFilename); + LLAssetType::EType asset_type; + S32 upload_cost = -1; + if (LLResourceUploadInfo::findAssetTypeOfExtension(exten, asset_type)) + { + if (!LLAgentBenefits::instance().findUploadCost(asset_type, upload_cost)) + { + LL_WARNS() << "Unable to find upload cost for asset type " << asset_type << LL_ENDL; + } + } + else + { + LL_WARNS() << "Unable to find upload cost for " << mFilename << LL_ENDL; + } + return upload_cost; +} + //----------------------------------------------------------------------------- // LLFloaterNameDesc() //----------------------------------------------------------------------------- @@ -162,10 +181,8 @@ void LLFloaterNameDesc::onBtnOK( ) { getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads - // FIXME PREMIUM - upload cost. Need to know which asset type this is, use agent benefits. LLAssetStorage::LLStoreAssetCallback callback = NULL; - S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). - + S32 expected_upload_cost = getExpectedUploadCost(); if (can_afford_transaction(expected_upload_cost)) { void *nruserdata = NULL; @@ -187,7 +204,7 @@ void LLFloaterNameDesc::onBtnOK( ) { LLSD args; args["COST"] = llformat("%d", expected_upload_cost); - LLNotificationsUtil::add("ErrorTextureCannotAfford", args); + LLNotificationsUtil::add("ErrorCannotAffordUpload", args); } closeFloater(false); diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 41643681ac..589f470e82 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -30,6 +30,7 @@ #include "llfloater.h" #include "llresizehandle.h" #include "llstring.h" +#include "llassettype.h" class LLLineEditor; class LLButton; @@ -45,6 +46,8 @@ public: void onBtnOK(); void onBtnCancel(); void doCommit(); + + S32 getExpectedUploadCost() const; protected: virtual void onCommit(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index b81dce4e31..a57ee83285 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -237,11 +237,6 @@ BOOL LLPanelMainInventory::postBuild() menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - - // FIXME PREMIUM - bulk upload of what? This doesn't work with - // mixed items if costs aren't all the same. For now treating - // as textures. - menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } // Trigger callback for focus received so we can deselect items in inbox/outbox @@ -1519,11 +1514,6 @@ void LLPanelMainInventory::setUploadCostIfNeeded() menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - - // FIXME PREMIUM - bulk upload of what? This doesn't work with - // mixed items if costs aren't all the same. For now treating - // as textures. - menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2f9bc786ca..c144ea2f8e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3254,7 +3254,7 @@ bool process_login_success_response() { LLSD response = LLLoginInstance::getInstance()->getResponse(); - //LL_INFOS() << "login success response:" << ll_pretty_print_sd(response) << LL_ENDL; + LL_DEBUGS("Benefits") << "login success response:" << response << LL_ENDL; if (!LLAgentBenefits::instance().init(response["account_level_benefits"])) { LL_ERRS() << "Benefits error" << LL_ENDL; diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index de35f9911c..4cbb88d4f1 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -306,6 +306,12 @@ std::string LLResourceUploadInfo::getDisplayName() const return (mName.empty()) ? mAssetId.asString() : mName; }; +bool LLResourceUploadInfo::findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type) +{ + U32 codec; + return findAssetTypeAndCodecOfExtension(exten, asset_type, codec); +} + // static bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec) { diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 8ef25ad6fd..6301359021 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -87,6 +87,7 @@ public: LLUUID getItemId() const { return mItemId; } LLAssetID getAssetId() const { return mAssetId; } + static bool findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type); static bool findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec); protected: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c1de275174..e88acc2ac4 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -516,8 +516,6 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); - // FIXME PREMIUM - do we need to handle non-texture bulk uploads? - gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", texture_upload_cost_str); gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); @@ -8720,8 +8718,7 @@ class LLToggleUIHints : public view_listener_t void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str) { - // FIXME PREMIUM reasonable default? - S32 upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + S32 upload_cost = -1; if (asset_type_str == "texture") { @@ -8735,6 +8732,10 @@ void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str) { upload_cost = LLAgentBenefits::instance().getSoundUploadCost(); } + if (upload_cost < 0) + { + LL_WARNS() << "Unable to find upload cost for asset_type_str " << asset_type_str << LL_ENDL; + } mCostStr = std::to_string(upload_cost); } @@ -8840,7 +8841,6 @@ void initialize_menus() enable.add("displayViewerEventRecorderMenuItems",boost::bind(&LLViewerEventRecorder::displayViewerEventRecorderMenuItems,&LLViewerEventRecorder::instance())); - // FIXME PREMIUM these need to be distinguished by asset type - see menu_viewer.xml view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts"); enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 9b27e8b03d..362ddfd27a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1347,7 +1347,7 @@ function="File.VisibleUploadModel"/> fail + + You need L$[COST] to upload this item. + fail + + Date: Wed, 20 Nov 2019 14:03:57 +0000 Subject: [PATCH 017/212] SL-10499 - handle package info from benefits service --- indra/newview/llagent.cpp | 2 +- indra/newview/llagentbenefits.cpp | 69 ++++++++++++++++++- indra/newview/llagentbenefits.h | 28 ++++++-- indra/newview/llfloaterbvhpreview.cpp | 2 +- indra/newview/llfloatergroups.cpp | 4 +- indra/newview/llfloaternamedesc.cpp | 2 +- indra/newview/lloutfitgallery.cpp | 2 +- indra/newview/llpanelgroupgeneral.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 12 ++-- indra/newview/llpanelpeople.cpp | 39 ++--------- indra/newview/llpanelsnapshotinventory.cpp | 6 +- indra/newview/llpanelsnapshotoptions.cpp | 2 +- indra/newview/llsnapshotlivepreview.cpp | 2 +- indra/newview/llstartup.cpp | 59 +++++++++++++++- indra/newview/llviewermenu.cpp | 12 ++-- indra/newview/llviewermenufile.cpp | 4 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llvoavatar.cpp | 4 +- .../skins/default/xui/en/notifications.xml | 12 +++- 19 files changed, 194 insertions(+), 71 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1b622de847..1545be3457 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2985,7 +2985,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return (S32)mGroups.size() < LLAgentBenefits::instance().getGroupMembershipLimit(); + return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit(); } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index eef644ccc0..a7f16b03d2 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -130,7 +130,7 @@ S32 LLAgentBenefits::getTextureUploadCost() const return m_texture_upload_cost; } -bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) +bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) const { bool succ = false; if (asset_type == LLAssetType::AT_TEXTURE) @@ -150,3 +150,70 @@ bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) } return succ; } + +LLAgentBenefitsMgr::LLAgentBenefitsMgr() +{ +} + +LLAgentBenefitsMgr::~LLAgentBenefitsMgr() +{ +} + +// static +const LLAgentBenefits& LLAgentBenefitsMgr::current() +{ + return instance().mCurrent; +} + +// static +const LLAgentBenefits& LLAgentBenefitsMgr::get(const std::string& package) +{ + if (instance().mPackageMap.find(package) != instance().mPackageMap.end()) + { + return instance().mPackageMap[package]; + } + else + { + return instance().mDefault; + } +} + +// static +bool LLAgentBenefitsMgr::init(const std::string& package, const LLSD& benefits_sd) +{ + LLAgentBenefits benefits; + if (!benefits.init(benefits_sd)) + { + LL_WARNS("Benefits") << "Unable to initialize package " << package << " from sd " << benefits_sd << LL_ENDL; + return false; + } + else + { + instance().mPackageMap[package] = benefits; + } + return true; + +} + +// static +bool LLAgentBenefitsMgr::initCurrent(const std::string& package, const LLSD& benefits_sd) +{ + LLAgentBenefits benefits; + if (!benefits.init(benefits_sd)) + { + LL_WARNS("Benefits") << "Unable to initialize package " << package << " from sd " << benefits_sd << LL_ENDL; + return false; + } + else + { + instance().mCurrent = benefits; + } + return true; + +} + +// static +bool LLAgentBenefitsMgr::has(const std::string& package) +{ + return instance().mPackageMap.find(package) != instance().mPackageMap.end(); +} diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 7ed6e169ce..9338bc1c26 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -30,13 +30,13 @@ #include "llsd.h" #include "llassettype.h" -class LLAgentBenefits: public LLSingleton +class LLAgentBenefits { - LLSINGLETON(LLAgentBenefits); +public: + LLAgentBenefits(); ~LLAgentBenefits(); LOG_CLASS(LLAgentBenefits); -public: bool init(const LLSD& benefits_sd); S32 getAnimatedObjectLimit() const; @@ -47,7 +47,7 @@ public: S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; - bool findUploadCost(LLAssetType::EType& asset_type, S32& cost); + bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const; private: S32 m_animated_object_limit; @@ -61,4 +61,24 @@ private: bool m_initalized; }; +class LLAgentBenefitsMgr: public LLSingleton +{ + LLSINGLETON(LLAgentBenefitsMgr); + ~LLAgentBenefitsMgr(); + LOG_CLASS(LLAgentBenefitsMgr); + +public: + static const LLAgentBenefits& current(); + static const LLAgentBenefits& get(const std::string& package); + static bool init(const std::string& package, const LLSD& benefits_sd); + static bool initCurrent(const std::string& package, const LLSD& benefits_sd); + static bool has(const std::string& package); + +private: + LLAgentBenefits mCurrent; + LLAgentBenefits mDefault; + std::map mPackageMap; +}; + + #endif diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 6d7d3c8556..1f54b5f838 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -1004,7 +1004,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) { std::string name = floaterp->getChild("name_form")->getValue().asString(); std::string desc = floaterp->getChild("description_form")->getValue().asString(); - S32 expected_upload_cost = LLAgentBenefits::instance().getAnimationUploadCost(); + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost(); LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( floaterp->mTransactionID, LLAssetType::AT_ANIMATION, diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index a32b01679a..f341e2ebcb 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -173,7 +173,7 @@ void LLPanelGroups::reset() group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); + getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefitsMgr::current().getGroupMembershipLimit())); init_group_list(getChild("group list"), gAgent.getGroupID()); enableButtons(); @@ -184,7 +184,7 @@ BOOL LLPanelGroups::postBuild() childSetCommitCallback("group list", onGroupList, this); getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); + getChild("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefitsMgr::current().getGroupMembershipLimit())); LLScrollListCtrl *list = getChild("group list"); if (list) diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 937dd60f0f..89e93102dd 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -138,7 +138,7 @@ S32 LLFloaterNameDesc::getExpectedUploadCost() const S32 upload_cost = -1; if (LLResourceUploadInfo::findAssetTypeOfExtension(exten, asset_type)) { - if (!LLAgentBenefits::instance().findUploadCost(asset_type, upload_cost)) + if (!LLAgentBenefitsMgr::current().findUploadCost(asset_type, upload_cost)) { LL_WARNS() << "Unable to find upload cost for asset type " << asset_type << LL_ENDL; } diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 35b83880d9..6c3d385811 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1205,7 +1205,7 @@ void LLOutfitGallery::uploadOutfitImage(const std::vector& filename return; } - S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); void *nruserdata = NULL; nruserdata = (void *)&outfit_id; diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 2d0a09b469..18f38b0d12 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -341,7 +341,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) } LLSD args; - args["COST"] = LLAgentBenefits::instance().getCreateGroupCost(); + args["COST"] = LLAgentBenefitsMgr::current().getCreateGroupCost(); LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a57ee83285..be31a2ed5d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -227,9 +227,9 @@ BOOL LLPanelMainInventory::postBuild() initListCommandsHandlers(); - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); - const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); - const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) @@ -1507,9 +1507,9 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); - const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); - const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0a41018293..2e991e425d 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -86,10 +86,6 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; -// FIXME PREMIUM - these should come from package info, once viewer is receiving it all. -const S32 BASE_MAX_AGENT_GROUPS = 42; -const S32 PREMIUM_MAX_AGENT_GROUPS = 60; - /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -612,24 +608,14 @@ void LLPanelPeople::removePicker() BOOL LLPanelPeople::postBuild() { - // FIXME PREMIUM - need to get premium vs. basic info via BaaS - S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("MaxAgentGroupsPremium")) - { - max_premium = features["MaxAgentGroupsPremium"].asInteger(); - } - } + S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); getChild("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) + if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium) { getChild("groupcount")->setText(getString("GroupCountWithInfo")); getChild("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -877,7 +863,7 @@ void LLPanelPeople::updateButtons() groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected U32 groups_count = gAgent.mGroups.size(); - S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + S32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit(); U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0; groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining)); @@ -1093,26 +1079,13 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) } } -// FIXME PREMIUM this should be coming from LLAgentBenefits info about the various packages. void LLPanelPeople::onGroupLimitInfo() { LLSD args; - S32 max_basic = BASE_MAX_AGENT_GROUPS; - S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; - if (gAgent.getRegion()) - { - LLSD features; - gAgent.getRegion()->getSimulatorFeatures(features); - if (features.has("MaxAgentGroupsBasic")) - { - max_basic = features["MaxAgentGroupsBasic"].asInteger(); - } - if (features.has("MaxAgentGroupsPremium")) - { - max_premium = features["MaxAgentGroupsPremium"].asInteger(); - } - } + S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit(); + S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); + args["MAX_BASIC"] = max_basic; args["MAX_PREMIUM"] = max_premium; diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 202f42c53a..594cbed7ad 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -136,7 +136,7 @@ BOOL LLPanelSnapshotInventory::postBuild() // virtual void LLPanelSnapshotInventory::onOpen(const LLSD& key) { - getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); + getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } @@ -156,7 +156,7 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventoryBase::onSend() { - S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); if (can_afford_transaction(expected_upload_cost)) { if (mSnapshotFloater) @@ -192,7 +192,7 @@ BOOL LLPanelOutfitSnapshotInventory::postBuild() // virtual void LLPanelOutfitSnapshotInventory::onOpen(const LLSD& key) { - getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); + getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefitsMgr::current().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 7932db8727..6ded46d690 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -94,7 +94,7 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key) void LLPanelSnapshotOptions::updateUploadCost() { - S32 upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); getChild("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost)); } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 430abba543..3c8b405a67 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1039,7 +1039,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string; std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string; LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c144ea2f8e..3f65d69719 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3250,14 +3250,67 @@ void apply_udp_blacklist(const std::string& csv) } +void on_benefits_failed_callback(const LLSD& notification, const LLSD& response) +{ + LL_WARNS("Benefits") << "Failed to load benefits information" << LL_ENDL; +} + +bool init_benefits(LLSD& response) +{ + LL_DEBUGS("Benefits") << "login success response:" << response << LL_ENDL; + + bool succ = true; + + std::string package_name = response["account_type"].asString(); + const LLSD& benefits_sd = response["account_level_benefits"]; + if (!LLAgentBenefitsMgr::init(package_name, benefits_sd) || + !LLAgentBenefitsMgr::initCurrent(package_name, benefits_sd)) + { + succ = false; + } + else + { + LL_DEBUGS("Benefits") << "Initialized current benefits, level " << package_name << " from " << benefits_sd << LL_ENDL; + } + const LLSD& packages_sd = response["premium_packages"]; + for(LLSD::map_const_iterator package_iter = packages_sd.beginMap(); + package_iter != packages_sd.endMap(); + ++package_iter) + { + std::string package_name = package_iter->first; + const LLSD& benefits_sd = package_iter->second["benefits"]; + if (LLAgentBenefitsMgr::init(package_name, benefits_sd)) + { + LL_DEBUGS("Benefits") << "Initialized benefits for package " << package_name << " from " << benefits_sd << LL_ENDL; + } + else + { + LL_WARNS("Benefits") << "Failed init for package " << package_name << " from " << benefits_sd << LL_ENDL; + succ = false; + } + } + + if (!LLAgentBenefitsMgr::has("Base")) + { + LL_WARNS("Benefits") << "Benefits info did not include required package Base" << LL_ENDL; + succ = false; + } + if (!LLAgentBenefitsMgr::has("Premium")) + { + LL_WARNS("Benefits") << "Benefits info did not include required package Premium" << LL_ENDL; + succ = false; + } + return succ; +} + bool process_login_success_response() { LLSD response = LLLoginInstance::getInstance()->getResponse(); - LL_DEBUGS("Benefits") << "login success response:" << response << LL_ENDL; - if (!LLAgentBenefits::instance().init(response["account_level_benefits"])) + bool benefits_ok = init_benefits(response); + if (!benefits_ok) { - LL_ERRS() << "Benefits error" << LL_ENDL; + LLNotificationsUtil::add("FailedToGetBenefits", LLSD(), LLSD(), boost::bind(on_benefits_failed_callback, _1, _2)); } std::string text(response["udp_blacklist"]); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e88acc2ac4..49a4eb6a4d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -510,9 +510,9 @@ void init_menus() LLGridManager::getInstance()->isInProductionGrid()); // *TODO:Also fix cost in llfolderview.cpp for Inventory menus - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); - const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); - const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); gMenuHolder->childSetLabelArg("Upload Image", "[COST]", texture_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); @@ -8722,15 +8722,15 @@ void LLUploadCostCalculator::calculateCost(const std::string& asset_type_str) if (asset_type_str == "texture") { - upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); + upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); } else if (asset_type_str == "animation") { - upload_cost = LLAgentBenefits::instance().getAnimationUploadCost(); + upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost(); } else if (asset_type_str == "sound") { - upload_cost = LLAgentBenefits::instance().getSoundUploadCost(); + upload_cost = LLAgentBenefitsMgr::current().getSoundUploadCost(); } if (upload_cost < 0) { diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 90fbbcc8d2..4ce39e715c 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -429,7 +429,7 @@ void do_bulk_upload(std::vector filenames, const LLSD& notification U32 codec; S32 expected_upload_cost; if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) && - LLAgentBenefits::instance().findUploadCost(asset_type, expected_upload_cost)) + LLAgentBenefitsMgr::current().findUploadCost(asset_type, expected_upload_cost)) { LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( filename, @@ -460,7 +460,7 @@ bool get_bulk_upload_expected_cost(const std::vector& filenames, S3 S32 cost; if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec) && - LLAgentBenefits::instance().findUploadCost(asset_type, cost)) + LLAgentBenefitsMgr::current().findUploadCost(asset_type, cost)) { total_cost += cost; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2cde93f471..6e64ccc501 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -903,7 +903,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + S32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit(); if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.size() < max_groups) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f8ff71911e..e7ceec40ef 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7061,7 +7061,7 @@ U32 LLVOAvatar::getNumAttachments() const //----------------------------------------------------------------------------- S32 LLVOAvatar::getMaxAttachments() const { - return LLAgentBenefits::instance().getAttachmentLimit(); + return LLAgentBenefitsMgr::current().getAttachmentLimit(); } //----------------------------------------------------------------------------- @@ -7095,7 +7095,7 @@ U32 LLVOAvatar::getNumAnimatedObjectAttachments() const //----------------------------------------------------------------------------- S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const { - return LLAgentBenefits::instance().getAnimatedObjectLimit(); + return LLAgentBenefitsMgr::current().getAnimatedObjectLimit(); } //----------------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f93113ebd0..c8db5d24dd 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8410,7 +8410,17 @@ Your voice has been muted by moderator. name="okbutton" yestext="OK"/> - + + + Unfortunately, we were unable to get benefits information for this session. This should not happen in a normal production environment. Please contact support. This session will not work normally and we recommend that you restart. + + + Date: Wed, 20 Nov 2019 20:23:33 +0000 Subject: [PATCH 018/212] SL-10499 - Added picks_limit to benefits info. Will be needed in profiles eventually. --- indra/newview/llagentbenefits.cpp | 10 ++++++++++ indra/newview/llagentbenefits.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index a7f16b03d2..fcb1600b1d 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -32,6 +32,7 @@ LLAgentBenefits::LLAgentBenefits(): m_animation_upload_cost(-1), m_attachment_limit(-1), m_group_membership_limit(-1), + m_picks_limit(-1), m_sound_upload_cost(-1), m_texture_upload_cost(-1) { @@ -81,6 +82,10 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) { return false; } + if (!get_required_S32(benefits_sd, "picks_limit", m_picks_limit)) + { + return false; + } if (!get_required_S32(benefits_sd, "sound_upload_cost", m_sound_upload_cost)) { return false; @@ -120,6 +125,11 @@ S32 LLAgentBenefits::getGroupMembershipLimit() const return m_group_membership_limit; } +S32 LLAgentBenefits::getPicksLimit() const +{ + return m_picks_limit; +} + S32 LLAgentBenefits::getSoundUploadCost() const { return m_sound_upload_cost; diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 9338bc1c26..680b1e7b07 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -44,6 +44,7 @@ public: S32 getAttachmentLimit() const; S32 getCreateGroupCost() const; S32 getGroupMembershipLimit() const; + S32 getPicksLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; @@ -55,6 +56,7 @@ private: S32 m_attachment_limit; S32 m_create_group_cost; S32 m_group_membership_limit; + S32 m_picks_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; From 4acfc99fa608269d06a5a3e45a4c3fdc5e3d06ee Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 22 Nov 2019 18:26:56 +0200 Subject: [PATCH 019/212] SL-12317 UI Changes to Group limits --- indra/llui/lltextbase.cpp | 8 +++++--- indra/llui/lltextbase.h | 6 ++++++ indra/newview/llpanelpeople.cpp | 15 ++++++++++++--- indra/newview/lltoastalertpanel.cpp | 5 +++++ .../skins/default/xui/en/notifications.xml | 18 ++++++++++++++---- .../skins/default/xui/en/panel_people.xml | 3 ++- 6 files changed, 44 insertions(+), 11 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 22635f734e..8a4b224310 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -152,6 +152,7 @@ LLTextBase::Params::Params() plain_text("plain_text",false), track_end("track_end", false), read_only("read_only", false), + skip_link_underline("skip_link_underline", false), spellcheck("spellcheck", false), v_pad("v_pad", 0), h_pad("h_pad", 0), @@ -183,6 +184,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mFontShadow(p.font_shadow), mPopupMenuHandle(), mReadOnly(p.read_only), + mSkipLinkUnderline(p.skip_link_underline), mSpellCheck(p.spellcheck), mSpellCheckStart(-1), mSpellCheckEnd(-1), @@ -2289,7 +2291,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig S32 cur_length = getLength(); LLStyleConstSP sp(new LLStyle(highlight_params)); LLTextSegmentPtr segmentp; - if(underline_on_hover_only) + if (underline_on_hover_only || mSkipLinkUnderline) { highlight_params.font.style("NORMAL"); LLStyleConstSP normal_sp(new LLStyle(highlight_params)); @@ -2313,7 +2315,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig S32 segment_start = old_length; S32 segment_end = old_length + wide_text.size(); LLStyleConstSP sp(new LLStyle(style_params)); - if (underline_on_hover_only) + if (underline_on_hover_only || mSkipLinkUnderline) { LLStyle::Params normal_style_params(style_params); normal_style_params.font.style("NORMAL"); @@ -3488,7 +3490,7 @@ F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start /*virtual*/ BOOL LLOnHoverChangeableTextSegment::handleHover(S32 x, S32 y, MASK mask) { - mStyle = mHoveredStyle; + mStyle = mEditor.getSkipLinkUnderline() ? mNormalStyle : mHoveredStyle; return LLNormalTextSegment::handleHover(x, y, mask); } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 9831c35858..86aecf9236 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -309,6 +309,7 @@ public: border_visible, track_end, read_only, + skip_link_underline, spellcheck, allow_scroll, plain_text, @@ -448,6 +449,9 @@ public: void setReadOnly(bool read_only) { mReadOnly = read_only; } bool getReadOnly() { return mReadOnly; } + void setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; } + bool getSkipLinkUnderline() { return mSkipLinkUnderline; } + void setPlainText(bool value) { mPlainText = value;} bool getPlainText() const { return mPlainText; } @@ -691,6 +695,8 @@ protected: bool mAutoIndent; S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes + bool mSkipLinkUnderline; + // support widgets LLHandle mPopupMenuHandle; LLView* mDocumentView; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2e991e425d..3126edc205 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1086,10 +1086,19 @@ void LLPanelPeople::onGroupLimitInfo() S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit(); S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); - args["MAX_BASIC"] = max_basic; - args["MAX_PREMIUM"] = max_premium; + args["MAX_BASIC"] = max_basic; + args["MAX_PREMIUM"] = max_premium; - LLNotificationsUtil::add("GroupLimitInfo", args); + if (LLAgentBenefitsMgr::has("PremiumPlus")) + { + S32 max_premium_plus = LLAgentBenefitsMgr::get("PremiumPlus").getGroupMembershipLimit(); + args["MAX_PREMIUM"] = max_premium_plus; + LLNotificationsUtil::add("GroupLimitInfoPlus", args); + } + else + { + LLNotificationsUtil::add("GroupLimitInfo", args); + } } void LLPanelPeople::onTabSelected(const LLSD& param) diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 941cb410fc..bac3a6832e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -194,6 +194,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal - 3*VPAD - BTN_HEIGHT; // reshape to calculate real text width and height msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height ); + + if ("GroupLimitInfo" == mNotification->getName() || "GroupLimitInfoPlus" == mNotification->getName()) + { + msg_box->setSkipLinkUnderline(true); + } msg_box->setValue(msg); S32 pixel_width = msg_box->getTextPixelWidth(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c8db5d24dd..670784f3bf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4276,11 +4276,21 @@ You have reached your maximum number of groups. Please leave some group before j icon="alert.tga" name="GroupLimitInfo" type="alert"> -The group limit for base accounts is [MAX_BASIC], and for [https://secondlife.com/premium/ premium] -accounts is [MAX_PREMIUM]. -If you downgraded your account, you will need to get below [MAX_BASIC] group limit before you can join more. +Residents with Basic memberships may join up to [MAX_BASIC] groups. +Premium memberships allow up to [MAX_PREMIUM]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade] + group + + -[https://secondlife.com/my/account/membership.php Upgrade today!] + +Residents with Basic memberships may join up to [MAX_BASIC] groups. +Premium memberships allow up to [MAX_PREMIUM]. Premium Plus +memberships allow up to [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade] group + value="You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Raise your limit]"/> You belong to [COUNT] groups, and can join [REMAINING] more. From 9621dd8bbd1697b119574bcc879345f03b42969e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 22 Nov 2019 20:18:30 +0200 Subject: [PATCH 020/212] SL-12100 Premium Enhancements - Changes to rates to create Groups, UI Work --- indra/llui/llscrolllistctrl.cpp | 8 +- indra/llui/llscrolllistctrl.h | 10 +- indra/newview/CMakeLists.txt | 2 + indra/newview/llagentbenefits.cpp | 7 + indra/newview/llagentbenefits.h | 2 + indra/newview/llgroupactions.cpp | 4 +- indra/newview/llgroupmgr.cpp | 4 +- indra/newview/llpanelgroup.cpp | 41 --- indra/newview/llpanelgroup.h | 3 - indra/newview/llpanelgroupcreate.cpp | 237 +++++++++++++ indra/newview/llpanelgroupcreate.h | 73 ++++ indra/newview/llpanelgroupgeneral.cpp | 59 +--- indra/newview/llpanelgroupgeneral.h | 1 - .../skins/default/xui/en/floater_people.xml | 6 + .../skins/default/xui/en/notifications.xml | 12 + .../xui/en/panel_group_creation_sidetray.xml | 314 ++++++++++++++++++ .../xui/en/panel_group_info_sidetray.xml | 11 - .../newview/skins/default/xui/en/strings.xml | 6 + 18 files changed, 680 insertions(+), 120 deletions(-) create mode 100644 indra/newview/llpanelgroupcreate.cpp create mode 100644 indra/newview/llpanelgroupcreate.h create mode 100644 indra/newview/skins/default/xui/en/panel_group_creation_sidetray.xml diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f4028057e8..7415e7d974 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -137,6 +137,7 @@ LLScrollListCtrl::Params::Params() background_visible("background_visible"), draw_stripes("draw_stripes"), column_padding("column_padding"), + row_padding("row_padding", 2), fg_unselected_color("fg_unselected_color"), fg_selected_color("fg_selected_color"), bg_selected_color("bg_selected_color"), @@ -199,6 +200,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mHoveredColor(p.hovered_color()), mSearchColumn(p.search_column), mColumnPadding(p.column_padding), + mRowPadding(p.row_padding), mContextMenuType(MENU_NONE), mIsFriendSignal(NULL) { @@ -685,8 +687,6 @@ bool LLScrollListCtrl::updateColumnWidths() return width_changed; } -const S32 SCROLL_LIST_ROW_PAD = 2; - // Line height is the max height of all the cells in all the items. void LLScrollListCtrl::updateLineHeight() { @@ -699,7 +699,7 @@ void LLScrollListCtrl::updateLineHeight() S32 i = 0; for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i)) { - mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD ); + mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding ); } } } @@ -711,7 +711,7 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp) S32 i = 0; for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i)) { - mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD ); + mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding ); } } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index b35a8608e7..51e0819ecc 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -108,7 +108,8 @@ public: // layout Optional column_padding, - page_lines, + row_padding, + page_lines, heading_height; // sort and search behavior @@ -283,8 +284,10 @@ public: void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; } void setDrawStripes(BOOL b) { mDrawStripes = b; } - void setColumnPadding(const S32 c) { mColumnPadding = c; } - S32 getColumnPadding() { return mColumnPadding; } + void setColumnPadding(const S32 c) { mColumnPadding = c; } + S32 getColumnPadding() const { return mColumnPadding; } + void setRowPadding(const S32 c) { mColumnPadding = c; } + S32 getRowPadding() const { return mColumnPadding; } void setCommitOnKeyboardMovement(BOOL b) { mCommitOnKeyboardMovement = b; } void setCommitOnSelectionChange(BOOL b) { mCommitOnSelectionChange = b; } void setAllowKeyboardMovement(BOOL b) { mAllowKeyboardMovement = b; } @@ -468,6 +471,7 @@ private: LLRect mItemListRect; S32 mColumnPadding; + S32 mRowPadding; BOOL mBackgroundVisible; BOOL mDrawStripes; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5423ddb684..748cffd1c3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -441,6 +441,7 @@ set(viewer_SOURCE_FILES llpanelface.cpp llpanelgenerictip.cpp llpanelgroup.cpp + llpanelgroupcreate.cpp llpanelgroupbulk.cpp llpanelgroupbulkban.cpp llpanelgroupexperiences.cpp @@ -1060,6 +1061,7 @@ set(viewer_HEADER_FILES llpanelface.h llpanelgenerictip.h llpanelgroup.h + llpanelgroupcreate.h llpanelgroupbulk.h llpanelgroupbulkimpl.h llpanelgroupbulkban.h diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index fcb1600b1d..2d219735a0 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -217,6 +217,7 @@ bool LLAgentBenefitsMgr::initCurrent(const std::string& package, const LLSD& ben else { instance().mCurrent = benefits; + instance().mCurrentName = package; } return true; @@ -227,3 +228,9 @@ bool LLAgentBenefitsMgr::has(const std::string& package) { return instance().mPackageMap.find(package) != instance().mPackageMap.end(); } + +//static +bool LLAgentBenefitsMgr::isCurrent(const std::string& package) +{ + return instance().mCurrentName == package; +} diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 680b1e7b07..48aa6bd869 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -75,8 +75,10 @@ public: static bool init(const std::string& package, const LLSD& benefits_sd); static bool initCurrent(const std::string& package, const LLSD& benefits_sd); static bool has(const std::string& package); + static bool isCurrent(const std::string& package); private: + std::string mCurrentName; LLAgentBenefits mCurrent; LLAgentBenefits mDefault; std::map mPackageMap; diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 599790d2bb..d2bd716f55 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -400,10 +400,10 @@ void LLGroupActions::createGroup() { LLSD params; params["group_id"] = LLUUID::null; - params["open_tab_name"] = "panel_group_info_sidetray"; + params["open_tab_name"] = "panel_group_creation_sidetray"; params["action"] = "create"; - LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params); + LLFloaterSidePanelContainer::showPanel("people", "panel_group_creation_sidetray", params); } //static diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index e384019a43..dbf7639539 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -45,7 +45,7 @@ #include "lltransactiontypes.h" #include "llstatusbar.h" #include "llviewerwindow.h" -#include "llpanelgroup.h" +#include "llpanelgroupcreate.h" #include "llgroupactions.h" #include "llnotificationsutil.h" #include "lluictrlfactory.h" @@ -1451,7 +1451,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data) gAgent.mGroups.push_back(gd); - LLPanelGroup::refreshCreatedGroup(group_id); + LLPanelGroupCreate::refreshCreatedGroup(group_id); //FIXME //LLFloaterGroupInfo::closeCreateGroup(); //LLFloaterGroupInfo::showFromUUID(group_id,"roles_tab"); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e41211ddbd..ab255d5215 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -128,10 +128,6 @@ void LLPanelGroup::onOpen(const LLSD& key) { onBackBtnClick(); } - else if(str_action == "create") - { - setGroupID(LLUUID::null); - } else if(str_action == "refresh_notices") { LLPanelGroupNotices* panel_notices = findChild("group_notices_tab_panel"); @@ -162,12 +158,8 @@ BOOL LLPanelGroup::postBuild() button = getChild("btn_refresh"); button->setClickedCallback(onBtnRefresh, this); - getChild("btn_create")->setVisible(false); - childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL); - childSetCommitCallback("btn_create",boost::bind(&LLPanelGroup::onBtnCreate,this),NULL); - LLPanelGroupTab* panel_general = findChild("group_general_tab_panel"); LLPanelGroupTab* panel_roles = findChild("group_roles_tab_panel"); LLPanelGroupTab* panel_notices = findChild("group_notices_tab_panel"); @@ -223,7 +215,6 @@ void LLPanelGroup::reposButtons() } reposButton("btn_apply"); - reposButton("btn_create"); reposButton("btn_refresh"); reposButton("btn_cancel"); reposButton("btn_chat"); @@ -246,23 +237,6 @@ void LLPanelGroup::onBackBtnClick() } } - -void LLPanelGroup::onBtnCreate() -{ - LLPanelGroupGeneral* panel_general = findChild("group_general_tab_panel"); - if(!panel_general) - return; - std::string apply_mesg; - if(panel_general->apply(apply_mesg))//yes yes you need to call apply to create... - return; - if ( !apply_mesg.empty() ) - { - LLSD args; - args["MESSAGE"] = apply_mesg; - LLNotificationsUtil::add("GenericAlert", args); - } -} - void LLPanelGroup::onBtnRefresh(void* user_data) { LLPanelGroup* self = static_cast(user_data); @@ -378,7 +352,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) LLButton* button_apply = findChild("btn_apply"); LLButton* button_refresh = findChild("btn_refresh"); - LLButton* button_create = findChild("btn_create"); LLButton* button_cancel = findChild("btn_cancel"); LLButton* button_call = findChild("btn_call"); @@ -391,8 +364,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(button_refresh) button_refresh->setVisible(!is_null_group_id); - if(button_create) - button_create->setVisible(is_null_group_id); if(button_cancel) button_cancel->setVisible(!is_null_group_id); @@ -611,18 +582,6 @@ void LLPanelGroup::showNotice(const std::string& subject, panel_notices->showNotice(subject,message,has_inventory,inventory_name,inventory_offer); } - - - -//static -void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id) -{ - LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel("people", "panel_group_info_sidetray"); - if(!panel) - return; - panel->setGroupID(group_id); -} - //static void LLPanelGroup::showNotice(const std::string& subject, diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 0b40c8b5d3..be40b08a6d 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -79,8 +79,6 @@ public: virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - static void refreshCreatedGroup(const LLUUID& group_id); - static void showNotice(const std::string& subject, const std::string& message, const LLUUID& group_id, @@ -92,7 +90,6 @@ public: protected: virtual void update(LLGroupChange gc); - void onBtnCreate(); void onBackBtnClick(); void onBtnJoin(); diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp new file mode 100644 index 0000000000..a782edae72 --- /dev/null +++ b/indra/newview/llpanelgroupcreate.cpp @@ -0,0 +1,237 @@ +/** + * @file llpanelgroupcreate.cpp + * + * $LicenseInfo:firstyear=2019&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2019, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelgroupcreate.h" + +// UI includes +#include "llbutton.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "llfloatersidepanelcontainer.h" +#include "llsidetraypanelcontainer.h" +#include "llscrolllistctrl.h" +#include "llspinctrl.h" +#include "lltextbox.h" +#include "lltexteditor.h" +#include "lltexturectrl.h" +#include "lluictrlfactory.h" + +// Viewer includes +#include "llagentbenefits.h" +#include "llfloaterreg.h" +#include "llfloater.h" +#include "llgroupmgr.h" +#include "lltrans.h" +#include "llnotificationsutil.h" +#include "lluicolortable.h" + + +const S32 MATURE_CONTENT = 1; +const S32 NON_MATURE_CONTENT = 2; +const S32 DECLINE_TO_STATE = 0; + +static LLPanelInjector t_panel_group_creation("panel_group_creation_sidetray"); + +LLPanelGroupCreate::LLPanelGroupCreate() +: LLPanel() +{ +} + +LLPanelGroupCreate::~LLPanelGroupCreate() +{ +} + +BOOL LLPanelGroupCreate::postBuild() +{ + childSetCommitCallback("back", boost::bind(&LLPanelGroupCreate::onBackBtnClick, this), NULL); + + mComboMature = getChild("group_mature_check", TRUE); + mCtrlOpenEnrollment = getChild("open_enrollement", TRUE); + mCtrlEnrollmentFee = getChild("check_enrollment_fee", TRUE); + mEditCharter = getChild("charter", TRUE); + mSpinEnrollmentFee = getChild("spin_enrollment_fee", TRUE); + mMembershipList = getChild("membership_list", TRUE); + + mCreateButton = getChild("btn_create", TRUE); + mCreateButton->setCommitCallback(boost::bind(&LLPanelGroupCreate::onBtnCreate, this)); + + mGroupNameEditor = getChild("group_name_editor", TRUE); + mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace); + + mInsignia = getChild("insignia", TRUE); + mInsignia->setAllowLocalTexture(FALSE); + mInsignia->setCanApplyImmediately(FALSE); + + return TRUE; +} + +void LLPanelGroupCreate::onOpen(const LLSD& key) +{ + mInsignia->setImageAssetID(LLUUID::null); + mInsignia->setImageAssetName(mInsignia->getDefaultImageName()); + mGroupNameEditor->clear(); + mEditCharter->clear(); + mSpinEnrollmentFee->set(0.f); + mCtrlEnrollmentFee->set(FALSE); + mCtrlOpenEnrollment->set(FALSE); + mMembershipList->clearRows(); + + // populate list + addMembershipRow("Base"); + addMembershipRow("Premium"); + addMembershipRow("PremiumPlus"); + addMembershipRow("Internal");// Present only if you are already in one, needed for testing + + S32 cost = LLAgentBenefitsMgr::current().getCreateGroupCost(); + mCreateButton->setLabelArg("[COST]", llformat("%d", cost)); +} + +//static +void LLPanelGroupCreate::refreshCreatedGroup(const LLUUID& group_id) +{ + LLSD params; + params["group_id"] = group_id; + params["open_tab_name"] = "panel_group_info_sidetray"; + LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params); +} + +void LLPanelGroupCreate::addMembershipRow(const std::string &name) +{ + if (LLAgentBenefitsMgr::has(name)) + { + bool is_current = LLAgentBenefitsMgr::isCurrent(name); + + LLScrollListItem::Params item_params; + LLScrollListCell::Params cell_params; + cell_params.font = LLFontGL::getFontSansSerif(); + // Start out right justifying numeric displays + cell_params.font_halign = LLFontGL::LEFT; + if (is_current) + { + cell_params.color = LLUIColorTable::instance().getColor("DrYellow"); + } + + cell_params.column = "clmn_name"; + std::string mem_str = name + "Membership"; + if (is_current) + { + cell_params.value = LLTrans::getString(mem_str) + " " + getString("current_membership"); + } + else + { + cell_params.value = LLTrans::getString(mem_str); + } + item_params.columns.add(cell_params); + cell_params.column = "clmn_price"; + cell_params.value = llformat("L$ %d",LLAgentBenefitsMgr::get(name).getCreateGroupCost()); + item_params.columns.add(cell_params); + mMembershipList->addRow(item_params); + } +} + +void LLPanelGroupCreate::onBackBtnClick() +{ + LLSideTrayPanelContainer* parent = dynamic_cast(getParent()); + if(parent) + { + parent->openPreviousPanel(); + } +} + +bool LLPanelGroupCreate::confirmMatureApply(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // 0 == Yes + // 1 == No + // 2 == Cancel + switch (option) + { + case 0: + mComboMature->setCurrentByIndex(MATURE_CONTENT); + createGroup(); + break; + case 1: + mComboMature->setCurrentByIndex(NON_MATURE_CONTENT); + createGroup(); + break; + default: + break; + } + + return true; +} + +void LLPanelGroupCreate::onBtnCreate() +{ + LL_INFOS() << "Validating group creation" << LL_ENDL; + + // Validate the group name length. + std::string gr_name = mGroupNameEditor->getText(); + LLStringUtil::trim(gr_name); + S32 group_name_len = gr_name.size(); + if (group_name_len < DB_GROUP_NAME_MIN_LEN + || group_name_len > DB_GROUP_NAME_STR_LEN) + { + LLSD args; + args["MIN_LEN"] = DB_GROUP_NAME_MIN_LEN; + args["MAX_LEN"] = DB_GROUP_NAME_STR_LEN; + LLNotificationsUtil::add("GroupNameLengthWarning", args); + } + else + // Check to make sure mature has been set + if (mComboMature && + mComboMature->getCurrentIndex() == DECLINE_TO_STATE) + { + LLNotificationsUtil::add("SetGroupMature", LLSD(), LLSD(), + boost::bind(&LLPanelGroupCreate::confirmMatureApply, this, _1, _2)); + } + else + { + createGroup(); + } +} + +void LLPanelGroupCreate::createGroup() +{ + LL_INFOS() << "Creating group" << LL_ENDL; + + U32 enrollment_fee = (mCtrlEnrollmentFee->get() ? + (U32)mSpinEnrollmentFee->get() : 0); + LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID(); + + std::string gr_name = mGroupNameEditor->getText(); + LLStringUtil::trim(gr_name); + LLGroupMgr::getInstance()->sendCreateGroupRequest(gr_name, + mEditCharter->getText(), + true, + insignia_id, + enrollment_fee, + mCtrlOpenEnrollment->get(), + false, + mComboMature->getCurrentIndex() == MATURE_CONTENT); +} + diff --git a/indra/newview/llpanelgroupcreate.h b/indra/newview/llpanelgroupcreate.h new file mode 100644 index 0000000000..3ae2e7f24a --- /dev/null +++ b/indra/newview/llpanelgroupcreate.h @@ -0,0 +1,73 @@ +/** + * @file llpanelgroupcreate.h + * + * $LicenseInfo:firstyear=2019&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2019, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELGROUPCREATE_H +#define LL_LLPANELGROUPCREATE_H + +#include "llpanel.h" + + +// Forward declares +class LLButton; +class LLCheckBoxCtrl; +class LLComboBox; +class LLLineEditor; +class LLTextEditor; +class LLTextureCtrl; +class LLScrollListCtrl; +class LLSpinCtrl; + + +class LLPanelGroupCreate : public LLPanel +{ +public: + LLPanelGroupCreate(); + virtual ~LLPanelGroupCreate(); + + virtual BOOL postBuild(); + + void onOpen(const LLSD& key); + + static void refreshCreatedGroup(const LLUUID& group_id); + +private: + void addMembershipRow(const std::string &name); + bool confirmMatureApply(const LLSD& notification, const LLSD& response); + void onBtnCreate(); + void onBackBtnClick(); + void createGroup(); + + LLComboBox *mComboMature; + LLButton *mCreateButton; + LLCheckBoxCtrl *mCtrlOpenEnrollment; + LLCheckBoxCtrl *mCtrlEnrollmentFee; + LLTextEditor *mEditCharter; + LLTextureCtrl *mInsignia; + LLLineEditor *mGroupNameEditor; + LLScrollListCtrl *mMembershipList; + LLSpinCtrl *mSpinEnrollmentFee; +}; + +#endif // LL_LLPANELGROUPCREATE_H diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 18f38b0d12..375daf60f8 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -304,6 +304,11 @@ void LLPanelGroupGeneral::draw() bool LLPanelGroupGeneral::apply(std::string& mesg) { + if (mGroupID.isNull()) + { + return false; + } + if (!mGroupID.isNull() && mAllowEdit && mComboActiveTitle && mComboActiveTitle->isDirty()) { LLGroupMgr::getInstance()->sendGroupTitleUpdate(mGroupID,mComboActiveTitle->getCurrentID()); @@ -313,7 +318,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); - if (has_power_in_group || mGroupID.isNull()) + if (has_power_in_group) { LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL; @@ -326,27 +331,6 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - if (mGroupID.isNull()) - { - // Validate the group name length. - S32 group_name_len = mGroupNameEditor->getText().size(); - if ( group_name_len < DB_GROUP_NAME_MIN_LEN - || group_name_len > DB_GROUP_NAME_STR_LEN) - { - std::ostringstream temp_error; - temp_error << "A group name must be between " << DB_GROUP_NAME_MIN_LEN - << " and " << DB_GROUP_NAME_STR_LEN << " characters."; - mesg = temp_error.str(); - return false; - } - - LLSD args; - args["COST"] = LLAgentBenefitsMgr::current().getCreateGroupCost(); - LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); - - return false; - } - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { @@ -453,37 +437,6 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS return ret; } -// static -bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - switch(option) - { - case 0: - { - // Yay! We are making a new group! - U32 enrollment_fee = (mCtrlEnrollmentFee->get() ? - (U32) mSpinEnrollmentFee->get() : 0); - LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID(); - - LLGroupMgr::getInstance()->sendCreateGroupRequest(mGroupNameEditor->getText(), - mEditCharter->getText(), - mCtrlShowInGroupList->get(), - insignia_id, - enrollment_fee, - mCtrlOpenEnrollment->get(), - false, - mComboMature->getCurrentIndex() == MATURE_CONTENT); - - } - break; - case 1: - default: - break; - } - return false; -} - // virtual void LLPanelGroupGeneral::update(LLGroupChange gc) { diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 11972bafa9..1d0789521c 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -51,7 +51,6 @@ public: virtual bool needsApply(std::string& mesg); virtual bool apply(std::string& mesg); virtual void cancel(); - bool createGroupCallback(const LLSD& notification, const LLSD& response); virtual void update(LLGroupChange gc); diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml index 701233ba4a..0cc0ca1ce4 100644 --- a/indra/newview/skins/default/xui/en/floater_people.xml +++ b/indra/newview/skins/default/xui/en/floater_people.xml @@ -31,5 +31,11 @@ filename="panel_group_info_sidetray.xml" label="Group Profile" font="SansSerifBold"/> + diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 670784f3bf..2417c52251 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -684,6 +684,18 @@ Do you want to revoke modify rights for the selected Residents? yestext="Yes"/> + +A group name must be between [MIN_LEN] and [MAX_LEN] characters. + group + fail + + + + + +(your membership) + + + + + + + + + + Group Charter + + + + + + + + + - Select maturity rating - + + + + + + + + + The fee to create a group is based on your membership level. [https://secondlife.com/my/account/membership.php More info] + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + From 518f8addd1a7e2da79ce7c6966fa5774cc8e6415 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Jan 2020 20:10:55 +0000 Subject: [PATCH 080/212] SL-12587 - added ViewerBenefits to requested caps. --- indra/newview/llviewerregion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 75e707aaa3..5d8660143e 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2969,6 +2969,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("UploadBakedTexture"); capabilityNames.append("UserInfo"); capabilityNames.append("ViewerAsset"); + capabilityNames.append("ViewerBenefits"); capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); From e63381a9365d69204b8e7593f47b963d3d037689 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 17 Jan 2020 17:32:29 +0000 Subject: [PATCH 081/212] SL-12587 - trigger build update --- indra/edit-me-to-trigger-new-build.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index b28b04f643..fd40910d9e 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -1,3 +1,4 @@ + From c5be566a6fbf121d1ca140586a02cda18f83b11b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 20 Jan 2020 14:43:48 +0200 Subject: [PATCH 082/212] SL-12596 Fixed incorectly enabled checkbox and enabled login button --- indra/newview/llpanellogin.cpp | 15 +++++++++++---- .../newview/skins/default/xui/en/panel_login.xml | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index cfa935cd01..7ef3685cdb 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -549,16 +549,19 @@ void LLPanelLogin::populateFields(LLPointer credential, bool remem LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL; return; } - LLUICtrl* remember_check = sInstance->getChild("remember_check"); - remember_check->setValue(remember_psswrd); if (sInstance->mFirstLoginThisInstall) { + LLUICtrl* remember_check = sInstance->getChild("remember_check"); + remember_check->setValue(remember_psswrd); // no list to populate setFields(credential); } else { sInstance->getChild("remember_name")->setValue(remember_user); + LLUICtrl* remember_password = sInstance->getChild("remember_password"); + remember_password->setValue(remember_psswrd); + remember_password->setEnabled(remember_user); sInstance->populateUserList(credential); } } @@ -746,13 +749,14 @@ void LLPanelLogin::getFields(LLPointer& credential, } } credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); - remember_psswrd = sInstance->getChild("remember_check")->getValue(); if (!sInstance->mFirstLoginThisInstall) { + remember_psswrd = sInstance->getChild("remember_password")->getValue(); remember_user = sInstance->getChild("remember_name")->getValue(); } else { + remember_psswrd = sInstance->getChild("remember_check")->getValue(); remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me' } } @@ -1080,6 +1084,7 @@ void LLPanelLogin::onUserNameTextEnty(void*) { sInstance->mPasswordModified = true; sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->mPasswordLength = 0; sInstance->addFavoritesToStartLocation(); //will call updateLoginButtons() } @@ -1119,7 +1124,7 @@ void LLPanelLogin::onRememberUserCheck(void*) if (sInstance && !sInstance->mFirstLoginThisInstall) { LLCheckBoxCtrl* remember_name(sInstance->getChild("remember_name")); - LLCheckBoxCtrl* remember_psswrd(sInstance->getChild("remember_check")); + LLCheckBoxCtrl* remember_psswrd(sInstance->getChild("remember_password")); LLComboBox* user_combo(sInstance->getChild("username_combo")); bool remember = remember_name->getValue().asBoolean(); @@ -1179,6 +1184,8 @@ void LLPanelLogin::updateServer() // restore creds user_combo->setTextEntry(username); pswd_edit->setValue(password); + sInstance->mUsernameLength = username.length(); + sInstance->mPasswordLength = password.length(); } else { diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 9da0c815ed..eab53c9985 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -151,7 +151,7 @@ label_text.word_wrap="true" label_text.width="150" check_button.bottom="3" - name="remember_check" + name="remember_password" width="170" /> Date: Mon, 20 Jan 2020 16:59:27 +0200 Subject: [PATCH 083/212] SL-12595 The checkbox overlaps buttons in the 'Delete selected item?' notification --- indra/llui/llcheckboxctrl.cpp | 46 +++++++++++++++---- indra/llui/llcheckboxctrl.h | 17 +++++++ .../skins/default/xui/en/panel_login.xml | 5 +- 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index f5b64d58b0..6a51c4240b 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -47,10 +47,18 @@ static LLDefaultChildRegistry::Register r("check_box"); template class LLCheckBoxCtrl* LLView::getChild( const std::string& name, BOOL recurse) const; +void LLCheckBoxCtrl::WordWrap::declareValues() +{ + declare("none", EWordWrap::WRAP_NONE); + declare("down", EWordWrap::WRAP_DOWN); + declare("up", EWordWrap::WRAP_UP); +} + LLCheckBoxCtrl::Params::Params() : initial_value("initial_value", false), label_text("label_text"), check_button("check_button"), + word_wrap("word_wrap", EWordWrap::WRAP_NONE), radio_style("radio_style") {} @@ -59,14 +67,14 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p) : LLUICtrl(p), mTextEnabledColor(p.label_text.text_color()), mTextDisabledColor(p.label_text.text_readonly_color()), - mFont(p.font()) + mFont(p.font()), + mWordWrap(p.word_wrap) { mViewModel->setValue(LLSD(p.initial_value)); mViewModel->resetDirty(); static LLUICachedControl llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0); static LLUICachedControl llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0); static LLUICachedControl llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0); - static LLUICachedControl llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0); // must be big enough to hold all children setUseBoundingRect(TRUE); @@ -85,17 +93,35 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p) { tbparams.font(p.font); } - mLabel = LLUICtrlFactory::create (tbparams); + + mLabel = LLUICtrlFactory::create(tbparams); + if (mWordWrap != WRAP_NONE) + { + // Not setWordWrap(mWordWrap != WRAP_NONE) because there might be some old lurking code that sets it manually + mLabel->setWordWrap(true); + S32 new_width = getRect().getWidth() - p.check_button.rect().getWidth() - llcheckboxctrl_hpad; + LLRect label_rect = mLabel->getRect(); + label_rect.mRight = label_rect.mLeft + new_width; + mLabel->setRect(label_rect); + } mLabel->reshapeToFitText(); + LLRect label_rect = mLabel->getRect(); if (mLabel->getLineCount() > 1) { - // reshapeToFitText uses LLView::reshape() which always reshapes - // from bottom to top, but we want to extend the bottom - // Note: might be better idea to use getRect().mTop of LLCheckBoxCtrl (+pad) as top point of new rect - S32 delta = ll_round((F32)mLabel->getFont()->getLineHeight() * mLabel->getLineSpacingMult()) - label_rect.getHeight(); - label_rect.translate(0, delta); - mLabel->setRect(label_rect); + if (mWordWrap == WRAP_DOWN) + { + // reshapeToFitText uses LLView::reshape() which always reshapes + // from bottom to top, but we want to extend the bottom + // Note: might be better idea to use getRect().mTop of LLCheckBoxCtrl (+pad) as top point of new rect + S32 delta = ll_round((F32)mLabel->getFont()->getLineHeight() * mLabel->getLineSpacingMult()) - label_rect.getHeight(); + label_rect.translate(0, delta); + mLabel->setRect(label_rect); + } + // else + // WRAP_UP is essentially done by reshapeToFitText() (extends from bottom to top) + // howhever it doesn't respect rect of checkbox + // todo: this should be fixed, but there are at least couple checkboxes that use this feature as is. } addChild(mLabel); @@ -165,7 +191,7 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) mLabel->reshapeToFitText(); LLRect label_rect = mLabel->getRect(); - if (label_top != label_rect.mTop) + if (label_top != label_rect.mTop && mWordWrap == WRAP_DOWN) { // reshapeToFitText uses LLView::reshape() which always reshapes // from bottom to top, but we want to extend the bottom so diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 07ae9c3b18..eb5bd5b6da 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -50,6 +50,19 @@ class LLCheckBoxCtrl , public ll::ui::SearchableControl { public: + + enum EWordWrap + { + WRAP_NONE, + WRAP_UP, + WRAP_DOWN + }; + + struct WordWrap : public LLInitParam::TypeValuesHelper + { + static void declareValues(); + }; + struct Params : public LLInitParam::Block { @@ -58,6 +71,8 @@ public: Optional label_text; Optional check_button; + Optional word_wrap; + Ignored radio_style; Params(); @@ -129,6 +144,8 @@ protected: LLUIColor mTextEnabledColor; LLUIColor mTextDisabledColor; + + EWordWrap mWordWrap; // off, shifts text up, shifts text down }; // Build time optimization, generate once in .cpp file diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index eab53c9985..58352509c4 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -148,11 +148,10 @@ left="408" bottom_delta="0" label="Remember password" - label_text.word_wrap="true" - label_text.width="150" + word_wrap="down" check_button.bottom="3" name="remember_password" - width="170" /> + width="165" /> Date: Mon, 20 Jan 2020 17:50:56 +0200 Subject: [PATCH 084/212] SL-9699 Enabled word-wrap for 'remember username' checkbox --- indra/newview/skins/default/xui/en/panel_login.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 58352509c4..ade004f9d0 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -135,10 +135,11 @@ bottom_delta="21" height="24" label="Remember me" + word_wrap="down" check_button.bottom="3" name="remember_name" tool_tip="Already remembered user can be forgotten from Me > Preferences > Advanced > Remembered Usernames." - width="145" /> + width="198" /> Date: Fri, 24 Jan 2020 09:40:34 +0100 Subject: [PATCH 085/212] FIRE-29194: tags showing in offline inventory offer log --- indra/newview/llviewermessage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 99fef7e512..da990251a2 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2431,7 +2431,10 @@ std::string LLOfferInfo::getSanitizedDescription() std::size_t start = mDesc.find_first_of("'"); std::size_t end = mDesc.find_last_of("'"); - if ((start != std::string::npos) && (end != std::string::npos)) + // FIRE-29194: tags showing in offline inventory offer log + //if ((start != std::string::npos) && (end != std::string::npos)) + if ((start != std::string::npos) && (end != std::string::npos) && start != end) + // { description.insert(start, ""); description.insert(end + 8, ""); From ef4ac6354270b7776e928e86fddb05d25717dd76 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 24 Jan 2020 10:34:52 +0100 Subject: [PATCH 086/212] Update FMOD Studio to 2.00.07 on Windows --- autobuild.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3fe22cf8f4..3a00455e7e 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1086,11 +1086,11 @@ archive hash - c668bd6961489c9bd6f07f1203a9d6eb + 3067612af8484188a50069bf9ecca987 hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.05-windows-192861134.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.07-windows-200240843.tar.bz2 name windows @@ -1100,11 +1100,11 @@ archive hash - 2cf52c44f8943f69b91c950ae7ea356a + a26e1b97c3fd2a8a7631ca84da8ab95d hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.05-windows64-192861136.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.07-windows64-200240848.tar.bz2 name windows64 From 83a9e1d45057b7ab1add07d4d753c667514ce77a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 25 Jan 2020 01:23:58 +0100 Subject: [PATCH 087/212] FIRE-8257: Text in chat console is sometimes cut off on the left side; based on a fix by Testicular Slingshot --- indra/llui/llconsole.cpp | 33 ++++++++++++++----- .../skins/default/xui/en/floater_about.xml | 2 +- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index b398ecf218..35207a7a59 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -580,23 +580,40 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, L while( paragraph_offset < (S32)mParagraphText.length() && mParagraphText[paragraph_offset] != 0) { - S32 skip_chars; // skip '\n' + // FIRE-8257: Sometimes text is cut off on left side of console + //S32 skip_chars; // skip '\n' // Figure out if a word-wrapped line fits here. LLWString::size_type line_end = mParagraphText.find_first_of(llwchar('\n'), paragraph_offset); - if (line_end != LLWString::npos) - { - skip_chars = 1; // skip '\n' - } - else + // FIRE-8257: Sometimes text is cut off on left side of console + //if (line_end != LLWString::npos) + //{ + // skip_chars = 1; // skip '\n' + //} + //else + //{ + // line_end = mParagraphText.size(); + // skip_chars = 0; + //} + + //U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); + if (line_end == LLWString::npos) { line_end = mParagraphText.size(); - skip_chars = 0; } - U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); + S32 skip_chars = 0; // skip '\n' + U32 line_length = line_end - paragraph_offset; + U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_length, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); + // if (drawable != 0) { + // FIRE-8257: Sometimes text is cut off on left side of console + if (drawable >= line_length) + { + skip_chars = 1; + } + // F32 x_position = 0; //Screen X position of text. mMaxWidth = llmax( mMaxWidth, (F32)font->getWidth( mParagraphText.substr( paragraph_offset, drawable ).c_str() ) ); diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 735f9f6b5d..d68065bc84 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -165,7 +165,7 @@ Additional code generously contributed to Firestorm by: top_pad="4" width="450" wrap="true"> -Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Animats, Armin Weatherwax, Beq Janus, Casper Warden, Chalice Yao, Chaser Zaks, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Magne Metaverse LLC, Magus Freston, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, mygoditsfullofstars, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Revolution Smythe, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Thickbrick Sleaford, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. +Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Animats, Armin Weatherwax, Beq Janus, Casper Warden, Chalice Yao, Chaser Zaks, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Magne Metaverse LLC, Magus Freston, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, mygoditsfullofstars, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Revolution Smythe, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Testicular Slingshot, Thickbrick Sleaford, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. Date: Sat, 25 Jan 2020 10:23:32 +0100 Subject: [PATCH 088/212] FIRE-29244: Chat keywords don't work properly if keyword list contains whitespaces for readability; based on a patch by Testicular Slingshot --- indra/newview/fskeywords.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index 361ddfbd16..88269625cf 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -63,13 +63,16 @@ void FSKeywords::updateKeywords() mWordList.clear(); while (begin != end) { + std::string token(*begin++); + LLStringUtil::trim(token); + if (match_whole_words) { - mWordList.push_back(boost::regex_replace(std::string(*begin++), boost::regex("[.^$|()\\[\\]{}*+?\\\\]"), "\\\\&", boost::match_default|boost::format_sed)); + mWordList.push_back(boost::regex_replace(token, boost::regex("[.^$|()\\[\\]{}*+?\\\\]"), "\\\\&", boost::match_default|boost::format_sed)); } else { - mWordList.push_back(*begin++); + mWordList.push_back(token); } } } From e77ac3096f6b06e41b50a35d9bc3ad06d6358e28 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 25 Jan 2020 16:46:55 +0100 Subject: [PATCH 089/212] FIRE-29294: Viewer occasionally ends in a loop after the fix for FIRE-8257 --- indra/llui/llconsole.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 35207a7a59..fa83293ac7 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -656,6 +656,12 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, L } mLines.push_back(line); //Append line to paragraph line list. } + // FIRE-8257: Sometimes text is cut off on left side of console + else + { + break; + } + // paragraph_offset += (drawable + skip_chars); } } From 3bd6240bf7c1c8e11ee8e03a6dfcaad6bcfa9b7b Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 27 Jan 2020 17:39:22 +0100 Subject: [PATCH 090/212] Linux; FMODStudio update to 2.0.7 --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3a00455e7e..f49b5626e6 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1072,11 +1072,11 @@ archive hash - 4bf66af7313c2a859bde553a563698e3 + 7e114818d7e6688c956eca1bee149e99 hash_algorithm md5 url - file:///opt/firestorm/fmodstudio-2.00.05-linux64-192862026.tar.bz2 + file:///opt/firestorm/fmodstudio-2.00.07-linux64-200271635.tar.bz2 name linux64 From 3eb54ae91b07edd699b16fc1a05383f00c3ecda7 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 28 Jan 2020 02:31:54 +0200 Subject: [PATCH 091/212] DRTVWR-496 Changed canonical_repo to lindenlab/viewer-dev --- autobuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild.xml b/autobuild.xml index b182b7ae5d..4c2a105600 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3427,7 +3427,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors package_description canonical_repo - https://bitbucket.org/lindenlab/viewer-release + https://bitbucket.org/lindenlab/viewer-dev copyright Copyright (c) 2014, Linden Research, Inc. description From c5da1b0863871a22637d5281e3cf393e85467e9b Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 28 Jan 2020 18:28:07 +0200 Subject: [PATCH 092/212] DRTVWR-496 Changed canonical_repo to lindenlab/viewer --- autobuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild.xml b/autobuild.xml index 4c2a105600..1f1db48bdc 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3427,7 +3427,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors package_description canonical_repo - https://bitbucket.org/lindenlab/viewer-dev + https://bitbucket.org/lindenlab/viewer copyright Copyright (c) 2014, Linden Research, Inc. description From 2c81050b689284886b30740ac226feaafeb54544 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 23 Jan 2020 11:35:09 -0500 Subject: [PATCH 093/212] SL-12615: Support a branch-specific setting for viewer_channel in TeamCity builds --- build.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build.sh b/build.sh index 1f9daa78b2..e35028ad6e 100755 --- a/build.sh +++ b/build.sh @@ -259,6 +259,23 @@ then export additional_packages= fi +begin_section "select viewer channel" +# Look for a branch-specific viewer_channel setting +# changeset_branch is set in the sling-buildscripts +viewer_build_branch=$(echo -n "${changeset_branch:-$(repo_branch ${BUILDSCRIPTS_SRC:-$(pwd)})}" | tr -Cs 'A-Za-z0-9_' '_' | sed -E 's/^_+//; s/_+$//') +if [ -n "$viewer_build_branch" ] +then + branch_viewer_channel_var="${viewer_build_branch}_viewer_channel" + if [ -n "${!branch_viewer_channel_var}" ] + then + viewer_channel="${!branch_viewer_channel_var}" + record_event "Overriding viewer_channel for branch '$changeset_branch' to '$viewer_channel'" + else + record_event "No branch-specific viewer_channel for branch '$viewer_build_branch'; to set a branch build channel set '$branch_viewer_channel_var'" + fi +fi +end_section "select viewer channel" + python_cmd "$helpers/codeticket.py" addinput "Viewer Channel" "${viewer_channel}" initialize_version # provided by buildscripts build.sh; sets version id From 2998552f3d7447da316afdd1713595528596a0c5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 28 Jan 2020 14:33:03 -0500 Subject: [PATCH 094/212] Increment viewer version to 6.3.7 following promotion of DRTVWR-496 --- 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 c8320dd521..c44315e3f0 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.3.6 +6.3.7 From da41ae49173a5390ba1f779d320d52ddf1698314 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 29 Jan 2020 00:05:10 +0100 Subject: [PATCH 095/212] Great job again, Git... --- .gitignore | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..5a1ac105cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,80 @@ +# By extension +*.DS_Store +*.bak +*.diff +*.orig +*.pyc +*.rej +*.swp +*~ + +# Specific paths and/or names +LICENSES +build-darwin-* +build-linux-* +build-stamp +build-vc120* +build-vc150* +configure-stamp +debian/files +debian/secondlife-appearance-utility* +debian/secondlife-viewer* +indra/.distcc +indra/CMakeFiles +indra/build-vc[0-9]* +indra/lib/mono/1.0/*.dll +indra/lib/mono/indra/*.dll +indra/lib/mono/indra/*.exe +indra/lib/mono/indra/*.pdb +indra/lib/python/eventlet/ +indra/lib/python/mulib.* +indra/llwindow/glh/glh_linear.h +indra/newview/app_settings/dictionaries +indra/newview/app_settings/mozilla +indra/newview/app_settings/mozilla-runtime-* +indra/newview/app_settings/mozilla_debug +indra/newview/app_settings/static_*.db2 +indra/newview/avatar_icons_cache.txt +indra/newview/avatar_lad.log +indra/newview/browser_profile +indra/newview/character +indra/newview/dbghelp.dll +indra/newview/filters.xml +indra/newview/fmod.dll +indra/newview/fmod.log +indra/newview/mozilla-theme +indra/newview/mozilla-universal-darwin.tgz +indra/newview/pilot.txt +indra/newview/pilot.xml +indra/newview/res-sdl/ll_icon.* +indra/newview/res/ll_icon.* +indra/newview/search_history.txt +indra/newview/teleport_history.txt +indra/newview/typed_locations.txt +indra/newview/vivox-runtime +indra/server-linux-* +indra/temp +indra/test/linden_file.dat +indra/test_apps/llmediatest/dependencies/i686-win32 +indra/test_apps/terrain_mule/*.dll +indra/viewer-linux-* +indra/web/dataservice/lib/shared/vault.* +indra/web/dataservice/locale.* +indra/web/dataservice/vendor.* +indra/web/doc/asset-upload/plugins/lsl_compiler/lslc +indra/web/doc/asset-upload/plugins/verify-notecard +indra/web/doc/asset-upload/plugins/verify-texture +installed.xml +libraries +tarfile_tmp +web/config.* +web/locale.* +web/secondlife.com.* + +# Firestorm additions +indra/newview/exoflickrkeys.h +indra/newview/fsdiscordkey.h +my_autobuild.xml +.vscode +*Thumbs.db +logs From a4cabf80d3c7a125a23dbab0fadec5c8c5ab8d97 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 16:39:49 +0200 Subject: [PATCH 096/212] SL-12590 SL-12608 Fixed wrong states --- indra/newview/llpanellogin.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 7ef3685cdb..224cec9650 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1230,6 +1230,8 @@ void LLPanelLogin::updateLoginButtons() if (user_combo->getCurrentIndex() != -1) { remember_name->setValue(true); + LLCheckBoxCtrl* remember_pass = getChild("remember_password"); + remember_pass->setEnabled(TRUE); } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user } } @@ -1239,6 +1241,8 @@ void LLPanelLogin::populateUserList(LLPointer credential) LLComboBox* user_combo = getChild("username_combo"); user_combo->removeall(); user_combo->clear(); + user_combo->setValue(std::string()); + getChild("password_edit")->setValue(std::string()); mUsernameLength = 0; mPasswordLength = 0; @@ -1261,9 +1265,7 @@ void LLPanelLogin::populateUserList(LLPointer credential) if (credential.isNull() || !user_combo->setSelectedByValue(LLSD(credential->userID()), true)) { - // selection failed, just deselect whatever might be selected - user_combo->setValue(std::string()); - getChild("password_edit")->setValue(std::string()); + // selection failed, fields will be mepty updateLoginButtons(); } else @@ -1278,7 +1280,8 @@ void LLPanelLogin::populateUserList(LLPointer credential) const LLSD &ident = credential->getIdentifier(); if (ident.isMap() && ident.has("type")) { - user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); + // this llsd might hold invalid credencial (failed login), so + // do not add to the list, just set field. setFields(credential); } else From a8437a7636c065ae06e53281db1be94dd4ae9e88 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 18:02:41 +0200 Subject: [PATCH 097/212] potential crashfix --- indra/newview/llimprocessing.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index d3537dc24e..c3375a3779 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1569,6 +1569,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) return; } + if (gAgent.getRegion() == NULL) + { + LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL; + return; + } + LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL; std::vector data; From 66a831dcf94edb7e391c270ccb79a8f023219e09 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 Jan 2020 18:09:19 +0200 Subject: [PATCH 098/212] SL-4354 Mesh avatars look broken while loading. --- indra/newview/llvoavatar.cpp | 35 ++++++++++++++++++++++++++++------- indra/newview/llvoavatar.h | 2 ++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 887456dcfb..f4f91a4009 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -197,6 +197,8 @@ const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f; const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024; +const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60; + enum ERenderName { RENDER_NAME_NEVER, @@ -663,6 +665,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoadedInitialized(FALSE), mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mLoadedCallbacksPaused(FALSE), + mLoadedCallbackTextures(0), mRenderUnloadedAvatar(LLCachedControl(gSavedSettings, "RenderUnloadedAvatar", false)), mLastRezzedStatus(-1), mIsEditingAppearance(FALSE), @@ -5327,6 +5330,7 @@ void LLVOAvatar::checkTextureLoading() if(mCallbackTextureList.empty()) //when is self or no callbacks. Note: this list for self is always empty. { mLoadedCallbacksPaused = pause ; + mLoadedCallbackTextures = 0; return ; //nothing to check. } @@ -5334,7 +5338,9 @@ void LLVOAvatar::checkTextureLoading() { return ; //have not been invisible for enough time. } - + + mLoadedCallbackTextures = 0; + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) { @@ -5356,8 +5362,12 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again } - } - } + } + if (tex->isFullyLoaded()) + { + mLoadedCallbackTextures++; + } + } if(!pause) { @@ -7799,9 +7809,19 @@ BOOL LLVOAvatar::updateIsFullyLoaded() { S32 rez_status = getRezzedStatus(); bool loading = getIsCloud(); - if (mFirstFullyVisible && !mIsControlAvatar && rez_status < 3) + if (mFirstFullyVisible && !mIsControlAvatar) { - loading = ((rez_status < 2) || !isFullyBaked()); + loading = ((rez_status < 2) + || mMeshTexturesDirty + || mVisualComplexityStale //complexity just updated + // Wait at least 60s for unfinished textures to finish on first load, + // don't wait forever, it might fail. Even if it will eventually load by + // itself and update mLoadedCallbackTextures (or fail and clean the list), + // avatars are more time-sensitive than textures and can't wait that long. + || (mLoadedCallbackTextures != mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() <= MAX_TEXTURE_WAIT_TIME_SEC) + || !mPendingAttachment.empty() + || (rez_status < 3 && !isFullyBaked()) + ); } updateRezzedStatusTimers(rez_status); updateRuthTimer(loading); @@ -8185,6 +8205,7 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); + mLastTexCallbackAddedTime.reset(); // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; @@ -8578,7 +8599,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - + mLastTexCallbackAddedTime.reset(); // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; } @@ -10351,7 +10372,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // Diagnostic list of all textures on our avatar static std::set all_textures; - if (mVisualComplexityStale) + if (mVisualComplexityStale) { U32 cost = VISUAL_COMPLEXITY_UNKNOWN; LLVOVolume::texture_cost_t textures; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index e352a6c1fa..3526142ff5 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -629,6 +629,8 @@ protected: LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; BOOL mLoadedCallbacksPaused; + S32 mLoadedCallbackTextures; // count of fully loaded textures filled from mCallbackTextureList + LLFrameTimer mLastTexCallbackAddedTime; std::set mTextureIDs; //-------------------------------------------------------------------- // Local Textures From 31adfd75e2716509331edd862d6c0716145d235e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Jan 2020 20:48:15 +0000 Subject: [PATCH 099/212] SL-12587 - debug logging option to see list of requested caps --- indra/newview/llviewerregion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 5d8660143e..654a028ec4 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -290,6 +290,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url << " region name " << regionp->getName() << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; + LL_DEBUGS("AppInit", "Capabilities") << "Capabilities requested: " << capabilityNames << LL_ENDL; regionp = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); From 712164210cf57cfde3b17c3162dc4129d52e2780 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jan 2020 15:20:00 +0200 Subject: [PATCH 100/212] SL-4354 Mesh avatars look broken while loading. --- indra/newview/llvoavatar.cpp | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f4f91a4009..780b6f81f1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5339,7 +5339,7 @@ void LLVOAvatar::checkTextureLoading() return ; //have not been invisible for enough time. } - mLoadedCallbackTextures = 0; + mLoadedCallbackTextures = pause ? mCallbackTextureList.size() : 0; for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) @@ -5361,12 +5361,13 @@ void LLVOAvatar::checkTextureLoading() tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again + + if (tex->isFullyLoaded()) + { + mLoadedCallbackTextures++; // consider it loaded + } } } - if (tex->isFullyLoaded()) - { - mLoadedCallbackTextures++; - } } if(!pause) @@ -7812,13 +7813,11 @@ BOOL LLVOAvatar::updateIsFullyLoaded() if (mFirstFullyVisible && !mIsControlAvatar) { loading = ((rez_status < 2) - || mMeshTexturesDirty - || mVisualComplexityStale //complexity just updated // Wait at least 60s for unfinished textures to finish on first load, // don't wait forever, it might fail. Even if it will eventually load by // itself and update mLoadedCallbackTextures (or fail and clean the list), // avatars are more time-sensitive than textures and can't wait that long. - || (mLoadedCallbackTextures != mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() <= MAX_TEXTURE_WAIT_TIME_SEC) + || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC) || !mPendingAttachment.empty() || (rez_status < 3 && !isFullyBaked()) ); @@ -8205,7 +8204,14 @@ void LLVOAvatar::updateMeshTextures() } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - mLastTexCallbackAddedTime.reset(); + if (!baked_img->isFullyLoaded() && !paused) + { + mLastTexCallbackAddedTime.reset(); + } + else + { + mLoadedCallbackTextures++; // consider it loaded + } // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; @@ -8599,7 +8605,14 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), src_callback_list, paused ); - mLastTexCallbackAddedTime.reset(); + if (!image->isFullyLoaded() && !paused) + { + mLastTexCallbackAddedTime.reset(); + } + else + { + mLoadedCallbackTextures++; // consider it loaded + } // this could add paused texture callbacks mLoadedCallbacksPaused |= paused; } From 669e0b6058dae6cdc2e1170ef4b45d2ad6de5be3 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 30 Jan 2020 16:39:14 +0100 Subject: [PATCH 101/212] Updated Polish translation --- .../skins/default/xui/pl/floater_forget_user.xml | 2 +- .../skins/default/xui/pl/notifications.xml | 15 +++++++++++++-- .../newview/skins/default/xui/pl/panel_login.xml | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/pl/floater_forget_user.xml b/indra/newview/skins/default/xui/pl/floater_forget_user.xml index 03930e8835..83a4972df2 100644 --- a/indra/newview/skins/default/xui/pl/floater_forget_user.xml +++ b/indra/newview/skins/default/xui/pl/floater_forget_user.xml @@ -1,5 +1,5 @@ + + Fee is based on your subscription level. Higher levels are charged lower fees. + \ No newline at end of file From 9a9001076c7113191c4db8a0c892f3b83828dd07 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 11 Mar 2020 17:52:33 +0100 Subject: [PATCH 142/212] Add missing currency symbols to viewer menu --- .../skins/default/xui/da/menu_viewer.xml | 6 +-- .../skins/default/xui/de/menu_viewer.xml | 6 +-- .../default/xui/de/panel_snapshot_options.xml | 2 +- .../skins/default/xui/en/menu_viewer.xml | 6 +-- .../skins/default/xui/es/menu_viewer.xml | 6 +-- .../skins/default/xui/it/menu_viewer.xml | 6 +-- .../skins/default/xui/ja/menu_viewer.xml | 53 ++----------------- .../skins/default/xui/pl/menu_viewer.xml | 6 +-- .../skins/default/xui/pt/menu_viewer.xml | 6 +-- .../skins/default/xui/ru/menu_viewer.xml | 6 +-- .../skins/default/xui/tr/menu_viewer.xml | 6 +-- .../skins/default/xui/zh/menu_viewer.xml | 6 +-- 12 files changed, 34 insertions(+), 81 deletions(-) diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index 99bd7d7506..178c6bf87a 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -113,9 +113,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index a55db97333..a889e74926 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -217,9 +217,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_options.xml b/indra/newview/skins/default/xui/de/panel_snapshot_options.xml index fdbec3ba4c..0d909312ed 100644 --- a/indra/newview/skins/default/xui/de/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/de/panel_snapshot_options.xml @@ -5,7 +5,7 @@ @@ -294,9 +247,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index cc3219d8a5..f8e113c377 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -212,9 +212,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index ca898e2936..032b197fc9 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -165,9 +165,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index ad69a2ae84..bfabcae3f6 100644 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -207,9 +207,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index e3d8fb4ed1..ab085e7488 100644 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -159,9 +159,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index fb1407c3c0..62ad1a8166 100644 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -159,9 +159,9 @@ - - - + + + From 5b3cc96259bd22a1eb04773495c859cd2ada6d62 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 11 Mar 2020 18:11:22 +0100 Subject: [PATCH 143/212] Add missing currency symbols --- indra/newview/skins/default/xui/da/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/de/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/es/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/fr/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/it/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/ja/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/pl/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/pt/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/ru/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/tr/menu_inventory_add.xml | 6 +++--- indra/newview/skins/default/xui/zh/menu_inventory_add.xml | 6 +++--- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/indra/newview/skins/default/xui/da/menu_inventory_add.xml b/indra/newview/skins/default/xui/da/menu_inventory_add.xml index 6d91534763..9419e4ea3c 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/de/menu_inventory_add.xml b/indra/newview/skins/default/xui/de/menu_inventory_add.xml index cdabf59f07..f89ecc5165 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/es/menu_inventory_add.xml b/indra/newview/skins/default/xui/es/menu_inventory_add.xml index 6f359a6e10..5255af8d0a 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_add.xml b/indra/newview/skins/default/xui/fr/menu_inventory_add.xml index 874855ec5c..903769616a 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/it/menu_inventory_add.xml b/indra/newview/skins/default/xui/it/menu_inventory_add.xml index ae1fc5dddb..bad724f295 100644 --- a/indra/newview/skins/default/xui/it/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/it/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/ja/menu_inventory_add.xml b/indra/newview/skins/default/xui/ja/menu_inventory_add.xml index 2be16a4f5c..11a6bc851f 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/pl/menu_inventory_add.xml b/indra/newview/skins/default/xui/pl/menu_inventory_add.xml index bca2fabf6b..38ace0ac53 100644 --- a/indra/newview/skins/default/xui/pl/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/pl/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/pt/menu_inventory_add.xml b/indra/newview/skins/default/xui/pt/menu_inventory_add.xml index eeec9877a7..aae0eb5ce6 100644 --- a/indra/newview/skins/default/xui/pt/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/pt/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/ru/menu_inventory_add.xml b/indra/newview/skins/default/xui/ru/menu_inventory_add.xml index f25c524daa..89c9b29bfd 100644 --- a/indra/newview/skins/default/xui/ru/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/ru/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/tr/menu_inventory_add.xml b/indra/newview/skins/default/xui/tr/menu_inventory_add.xml index 596221c040..36a59d85d4 100644 --- a/indra/newview/skins/default/xui/tr/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/tr/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + diff --git a/indra/newview/skins/default/xui/zh/menu_inventory_add.xml b/indra/newview/skins/default/xui/zh/menu_inventory_add.xml index 63f6dff6ca..2619a19018 100644 --- a/indra/newview/skins/default/xui/zh/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/zh/menu_inventory_add.xml @@ -1,9 +1,9 @@ - - - + + + From 1adde0d10641849c7b57f5e917eea4af1ada1921 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 11 Mar 2020 19:07:56 +0100 Subject: [PATCH 144/212] Update German translation --- .../skins/default/xui/de/notifications.xml | 36 ++++++++++-- .../xui/de/panel_group_creation_sidetray.xml | 55 +++++++++++++++++++ .../xui/en/panel_group_creation_sidetray.xml | 11 ++-- 3 files changed, 91 insertions(+), 11 deletions(-) create mode 100644 indra/newview/skins/default/xui/de/panel_group_creation_sidetray.xml diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index cf8acdffcb..fcac39b3fb 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -270,6 +270,10 @@ Möchten Sie den ausgewählten Einwohnern Änderungsrechte gewähren? Möchten Sie den ausgewählten Einwohnern die Änderungsrechte entziehen? + + Ein Gruppenname muss zwischen [MIN_LEN] und [MAX_LEN] Zeichen lang sein. + + Gruppe konnte nicht erstellt werden. [MESSAGE] @@ -511,6 +515,9 @@ Um Medien nur auf einer Fläche einzufügen, wählen Sie „Oberfläche auswähl Es kostet L$[COST], um ein Foto in Ihrem Inventar zu speichern. Sie können entweder L$ kaufen oder das Foto auf Ihrem Computer speichern. + + Es kostet L$[COST], um diesen Gegenstand hochzuladen. + Es kostet L$[COST], um eine Textur in Ihrem Inventar zu speichern. Sie können entweder L$ kaufen oder das Foto auf Ihrem Computer speichern. @@ -1827,11 +1834,14 @@ Eingehende Gruppeneinladungen werden jetzt automatisch abgewiesen. Sie erhalten - Die Gruppenbegrenzung für Basiskonten ist [MAX_BASIC]; für -[https://secondlife.com/premium/ Premium-]Konten ist sie [MAX_PREMIUM]. -Wenn Sie ein Downgrade Ihres Kontos durchgeführt haben, müssen Sie das Gruppenlimit unter [MAX_BASIC] bringen, bevor sich weitere Personen registrieren können. - -[https://secondlife.com/my/account/membership.php Noch heute upgraden!] + Einwohner mit einer Basis-Mitgliedschaft können bis zu [MAX_BASIC] Gruppen beitreten. +Eine Premium-Mitgliedschaft erlaubt bis zu [MAX_PREMIUM]. [https://secondlife.com/my/account/membership.php Mehr erfahren oder upgraden] + + + + Einwohner mit einer Basis-Mitgliedschaft können bis zu [MAX_BASIC] Gruppen beitreten. +Eine Premium-Mitgliedschaft erlaubt bis zu [MAX_PREMIUM]. [https://secondlife.com/my/account/membership.php Mehr erfahren oder upgraden] +Eine Premium-Plus-Mitgliedschaft erlaubt bis zu [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php Mehr erfahren oder upgraden] @@ -3511,6 +3521,22 @@ Diese werden für ein paar Sekunden sicherheitshalber gesperrt. Sie wurden vom Moderator stummgeschaltet. + + Leider konnten die Vorteilsinformationen für diese Sitzung nicht abgerufen werden. Dieses sollte normalerweise nicht passieren. Bitte kontaktieren Sie den Support. Diese Sitzung wird nicht normal funktionieren und wir empfehlen einen Neustart. + + + + Das Hochladen von [COUNT] Gegenständen wird insgesamt [COST] L$ kosten. Möchten Sie mit dem Hochladen fortfahren? + + + + Die ausgewählten Dateien können nicht per Mehrfach-Upload hochgeladen werden. + + + + Einige der ausgewählten Dateien können nicht per Mehrfach-Upload hochgeladen werden. + + Das Hochladen kostet [PRICE] L$. Möchten Sie fortfahren? diff --git a/indra/newview/skins/default/xui/de/panel_group_creation_sidetray.xml b/indra/newview/skins/default/xui/de/panel_group_creation_sidetray.xml new file mode 100644 index 0000000000..7fcb928956 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_group_creation_sidetray.xml @@ -0,0 +1,55 @@ + + + + (Ihre Mitgliedschaft) + + + + + + + + + + + + Gruppen-Charta + + + + + + + + + - Inhaltseinstufung auswählen - + + + + + + + + + Die Gebühr zum Erstellen einer Gruppe hängig von Ihrer Mitgliedschaftsstufe ab. [https://secondlife.com/my/account/membership.php Weitere Informationen] + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_fs_protectedfolders.xml b/indra/newview/skins/default/xui/en/floater_fs_protectedfolders.xml new file mode 100644 index 0000000000..bbdddd54c5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_fs_protectedfolders.xml @@ -0,0 +1,81 @@ + + + + (Unknown Folder) + + + + + + + + + Date: Tue, 14 Apr 2020 19:24:36 +0200 Subject: [PATCH 191/212] Updated Polish translation --- .../xui/pl/floater_fs_protectedfolders.xml | 15 +++++++++++++++ .../skins/default/xui/pl/menu_attachment_self.xml | 2 ++ .../skins/default/xui/pl/menu_inventory.xml | 2 ++ .../default/xui/pl/menu_pie_attachment_self.xml | 1 + .../newview/skins/default/xui/pl/menu_viewer.xml | 1 + .../default/xui/pl/panel_preferences_move.xml | 6 +++--- indra/newview/skins/default/xui/pl/strings.xml | 3 +++ 7 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 indra/newview/skins/default/xui/pl/floater_fs_protectedfolders.xml diff --git a/indra/newview/skins/default/xui/pl/floater_fs_protectedfolders.xml b/indra/newview/skins/default/xui/pl/floater_fs_protectedfolders.xml new file mode 100644 index 0000000000..58146356f1 --- /dev/null +++ b/indra/newview/skins/default/xui/pl/floater_fs_protectedfolders.xml @@ -0,0 +1,15 @@ + + + + (nieznany folder) + + + + + diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_move.xml b/indra/newview/skins/default/xui/pl/panel_preferences_move.xml index 85169111f0..abb3b8f00f 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_move.xml @@ -55,11 +55,11 @@ - Ruch przy zmianie regionu: + Przewiduj ruch przy zmianie regionu: - - + + Jeśli unieruchamianie wbudowane w Most LSL jest aktywne... diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index fc3ec97ff5..d0ddabe911 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -725,6 +725,9 @@ Spróbuj zalogować się ponownie za minutę. Wczytywanie... + + zablokowany + chroniony From c5b6a150dc17bd3eea39fca0e19f7a91c0de653d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 14 Apr 2020 23:07:19 +0200 Subject: [PATCH 192/212] FIRE-20414 / FIRE-29342: Move menu option to "Avatar" menu and add option to inventory (gear) menu --- .../ansastorm/xui/de/panel_main_inventory.xml | 1 + .../ansastorm/xui/en/panel_main_inventory.xml | 10 + .../ansastorm/xui/pl/panel_main_inventory.xml | 1 + .../xui/de/menu_inventory_gear_default.xml | 1 + .../skins/default/xui/de/menu_viewer.xml | 2 +- .../xui/en/menu_inventory_gear_default.xml | 10 + .../skins/default/xui/en/menu_viewer.xml | 22 +-- .../xui/pl/menu_inventory_gear_default.xml | 1 + .../skins/default/xui/pl/menu_viewer.xml | 2 +- .../vintage/xui/de/panel_main_inventory.xml | 187 ++++++------------ .../vintage/xui/en/panel_main_inventory.xml | 10 + .../vintage/xui/pl/panel_main_inventory.xml | 1 + 12 files changed, 106 insertions(+), 142 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 1d0b7b0648..e1c085d903 100644 --- a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml @@ -15,6 +15,7 @@ + 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 ae5e447dd5..497b5b29ab 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -66,6 +66,16 @@ + + + + + diff --git a/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml index d1eb5bc16d..5e54c05c66 100644 --- a/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml @@ -1,6 +1,7 @@ + diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index bc4cd72edd..88be7705e2 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -8,6 +8,7 @@ + @@ -224,7 +225,6 @@ - diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 96a437e862..3f4489925c 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -15,6 +15,16 @@ function="Inventory.GearDefault.Custom.Action" parameter="new_window" /> + + + + - + + + + @@ -1907,17 +1916,6 @@ - - - - - + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 56083b97bf..4bca4660fe 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -6,6 +6,7 @@ + @@ -219,7 +220,6 @@ - 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 40a617441b..1a87cb649b 100644 --- a/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/de/panel_main_inventory.xml @@ -1,141 +1,75 @@ - - - Inventar ([ITEM_COUNT] Elemente werden abgerufen... [FILTER] + Inventar ([ITEM_COUNT] Elemente werden abgerufen... [FILTER] - [ITEM_COUNT] Elemente [FILTER] + [ITEM_COUNT] Elemente [FILTER] [ITEM_COUNT] Elemente abgerufen [FILTER] - Elemente: - + Elemente: + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -148,7 +82,6 @@ - @@ -165,7 +98,6 @@ - @@ -177,5 +109,4 @@ Elemente - 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 075adc43f9..2aa6b8eae3 100644 --- a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml @@ -66,6 +66,16 @@ + + + + + From b93a63a029471da1b36aedb50144e75c9fcfa02c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Apr 2020 21:01:32 +0200 Subject: [PATCH 193/212] Use some LL definitions --- indra/newview/fsregioncross.cpp | 11 ++++------- indra/newview/fsregioncross.h | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/indra/newview/fsregioncross.cpp b/indra/newview/fsregioncross.cpp index e20ca443ce..71050ce67c 100644 --- a/indra/newview/fsregioncross.cpp +++ b/indra/newview/fsregioncross.cpp @@ -29,7 +29,7 @@ #include "llviewercontrol.h" #include "llmath.h" // normal build #include "llviewerobject.h" -#include "llframetimer.h" +#include "llframetimer.h" #include "fsregioncross.h" // // Improved region crossing time limit prediction. @@ -104,7 +104,7 @@ static inline F32 dividesafe(F32 num, F32 denom) { return((denom > FP_MAG_THRESHOLD // avoid divide by zero || denom < -FP_MAG_THRESHOLD) ? (num / denom) - : std::numeric_limits::infinity()); // return infinity if zero divide + : F32_MAX); // return infinity if zero divide } // // getextraptimelimit -- don't extrapolate further ahead than this during a region crossing. @@ -121,11 +121,8 @@ F32 RegionCrossExtrapolateImpl::getextraptimelimit() const LLQuaternion rot = mOwner.getRotationRegion(); // transform in global coords const LLQuaternion& inverserot = rot.conjugate(); // transform global to local // Calculate safe extrapolation time limit. - F32 extrapTimeLimit = std::min( - dividesafe(fsRegionCrossingPositionErrorLimit, - ((mOwner.getVelocity()*inverserot - mFilteredVel.get()).length())), - dividesafe(fsRegionCrossingAngleErrorLimit, - ((mOwner.getAngularVelocity()*inverserot - mFilteredAngVel.get()).length()))); + F32 extrapTimeLimit = llmin(dividesafe(fsRegionCrossingPositionErrorLimit, ((mOwner.getVelocity()*inverserot - mFilteredVel.get()).length())), + dividesafe(fsRegionCrossingAngleErrorLimit, ((mOwner.getAngularVelocity()*inverserot - mFilteredAngVel.get()).length()))); LL_INFOS() << "Region cross extrapolation safe limit " << extrapTimeLimit << " secs." << LL_ENDL; return(extrapTimeLimit); // do not extrapolate more than this } diff --git a/indra/newview/fsregioncross.h b/indra/newview/fsregioncross.h index 0122d49fd4..a769096ff8 100644 --- a/indra/newview/fsregioncross.h +++ b/indra/newview/fsregioncross.h @@ -31,8 +31,6 @@ // // Improved region crossing support. // -#include -#include class LLViewerObject; // forward declaration @@ -129,7 +127,7 @@ public: F32 getextraptimelimit() const // get extrapolation time limit { if (mImpl.get()) { return(mImpl->getextraptimelimit()); } // get extrapolation time limit if vehicle - return(std::numeric_limits::infinity()); // no limit if not a vehicle + return(F32_MAX); // no limit if not a vehicle } }; From 084eb8c03059630007f31b59749e6ec5b08e193b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 16 Apr 2020 08:48:36 +0200 Subject: [PATCH 194/212] This is of course not the same... --- indra/newview/fsregioncross.cpp | 2 +- indra/newview/fsregioncross.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/fsregioncross.cpp b/indra/newview/fsregioncross.cpp index 71050ce67c..5a6cab98a8 100644 --- a/indra/newview/fsregioncross.cpp +++ b/indra/newview/fsregioncross.cpp @@ -104,7 +104,7 @@ static inline F32 dividesafe(F32 num, F32 denom) { return((denom > FP_MAG_THRESHOLD // avoid divide by zero || denom < -FP_MAG_THRESHOLD) ? (num / denom) - : F32_MAX); // return infinity if zero divide + : std::numeric_limits::infinity()); // return infinity if zero divide } // // getextraptimelimit -- don't extrapolate further ahead than this during a region crossing. diff --git a/indra/newview/fsregioncross.h b/indra/newview/fsregioncross.h index a769096ff8..a1b85afd00 100644 --- a/indra/newview/fsregioncross.h +++ b/indra/newview/fsregioncross.h @@ -127,7 +127,7 @@ public: F32 getextraptimelimit() const // get extrapolation time limit { if (mImpl.get()) { return(mImpl->getextraptimelimit()); } // get extrapolation time limit if vehicle - return(F32_MAX); // no limit if not a vehicle + return(std::numeric_limits::infinity()); // no limit if not a vehicle } }; From 29f8de325c3d4d6437c7f19ece029b59fa5c6f29 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 16 Apr 2020 10:34:52 +0200 Subject: [PATCH 195/212] Clean this up a bit --- indra/newview/fsregioncross.cpp | 141 +++++++++++++++++--------------- indra/newview/fsregioncross.h | 88 ++++++++++++-------- 2 files changed, 130 insertions(+), 99 deletions(-) diff --git a/indra/newview/fsregioncross.cpp b/indra/newview/fsregioncross.cpp index 5a6cab98a8..f7644d8bfe 100644 --- a/indra/newview/fsregioncross.cpp +++ b/indra/newview/fsregioncross.cpp @@ -24,14 +24,14 @@ * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA * http://www.firestormviewer.org */ - -#include "llviewerprecompiledheaders.h" // regular Firestorm includes -#include "llviewercontrol.h" -#include "llmath.h" // normal build -#include "llviewerobject.h" -#include "llframetimer.h" + +#include "llviewerprecompiledheaders.h" #include "fsregioncross.h" -// +#include "llframetimer.h" +#include "llmath.h" +#include "llviewercontrol.h" +#include "llviewerobject.h" + // Improved region crossing time limit prediction. // // Applied when @@ -55,15 +55,14 @@ // Potential vehicle, but might be just a chair. // We don't start the movement averaging until there's movement at least once. // -RegionCrossExtrapolateImpl::RegionCrossExtrapolateImpl(const LLViewerObject& vo) : // constructor - mOwner(vo), // back ref to owner - mPreviousUpdateTime(0), // time of last update - mMoved(false) // has not moved yet +RegionCrossExtrapolateImpl::RegionCrossExtrapolateImpl(const LLViewerObject& vo) : + mOwner(vo), + mPreviousUpdateTime(0), + mMoved(false) { - LL_INFOS() << "Object " << vo.getID().asString() << " has sitter." << LL_ENDL; // log sit event + LL_INFOS() << "Object " << vo.getID().asString() << " has sitter." << LL_ENDL; } -// // update -- called for each object update message to "vehicle" objects. // // This is called for any object with an avatar sitting on it. @@ -71,42 +70,49 @@ RegionCrossExtrapolateImpl::RegionCrossExtrapolateImpl(const LLViewerObject& vo) // If it has moved, we treat it as a vehicle. // void RegionCrossExtrapolateImpl::update() -{ - if (!mMoved) // if not seen to move - { LLVector3 rawvel = mOwner.getVelocity(); // velocity in world coords - if (rawvel.mV[VX] != 0.0 || rawvel.mV[VY] != 0.0 || rawvel.mV[VZ] != 0) // check for nonzero velocity - { mMoved = true; } // moved, has seated avatar, thus is vehicle +{ + if (!mMoved) + { + LLVector3 rawvel = mOwner.getVelocity(); // velocity in world coords + if (rawvel.mV[VX] != 0.f || rawvel.mV[VY] != 0.f || rawvel.mV[VZ] != 0.f) // check for nonzero velocity + { + mMoved = true; // moved, has seated avatar, thus is vehicle + } else - { return; } // sitting on stationary object, skip this + { + return; // sitting on stationary object, skip this + } } + // Moving seat - do the extrapolation calculations - F64 dt = 1.0/45.0; // dt used on first value - one physics frame on server - F64 now = LLFrameTimer::getElapsedSeconds(); // timestamp + F64 dt = 1.0 / 45.0; // dt used on first value - one physics frame on server + F64 now = LLFrameTimer::getElapsedSeconds(); if (mPreviousUpdateTime != 0.0) - { dt = now - mPreviousUpdateTime; // change since last update + { + dt = now - mPreviousUpdateTime; // change since last update // Could adjust here for ping time and time dilation, but the filter isn't that // sensitive to minor variations dt and it would just complicate things. } + mPreviousUpdateTime = now; - LLQuaternion rot = mOwner.getRotationRegion(); // transform in global coords - const LLQuaternion& inverserot = rot.conjugate(); // transform global to local - LLVector3 vel = mOwner.getVelocity()*inverserot; // velocity in object coords - LLVector3 angvel = mOwner.getAngularVelocity()*inverserot; // angular velocity in object coords - mFilteredVel.update(vel,dt); // accum into filter in object coords - mFilteredAngVel.update(angvel,dt); // accum into filter in object coords + LLQuaternion rot = mOwner.getRotationRegion(); // transform in global coords + const LLQuaternion& inverserot = rot.conjugate(); // transform global to local + LLVector3 vel = mOwner.getVelocity() * inverserot; // velocity in object coords + LLVector3 angvel = mOwner.getAngularVelocity() * inverserot; // angular velocity in object coords + mFilteredVel.update(vel, dt); // accum into filter in object coords + mFilteredAngVel.update(angvel, dt); // accum into filter in object coords } -// + // dividesafe -- floating divide with divide by zero check // // Returns infinity for a divide by near zero. // static inline F32 dividesafe(F32 num, F32 denom) -{ return((denom > FP_MAG_THRESHOLD // avoid divide by zero - || denom < -FP_MAG_THRESHOLD) - ? (num / denom) - : std::numeric_limits::infinity()); // return infinity if zero divide +{ + return ((denom > FP_MAG_THRESHOLD || denom < -FP_MAG_THRESHOLD) // avoid divide by zero + ? (num / denom) : std::numeric_limits::infinity()); // return infinity if zero divide } -// + // getextraptimelimit -- don't extrapolate further ahead than this during a region crossing. // // Returns seconds of extrapolation that will probably stay within set limits of error. @@ -117,36 +123,43 @@ F32 RegionCrossExtrapolateImpl::getextraptimelimit() const // The limits can be adjusted as debug symbols or in settings.xml, but that should not be necessary. static LLCachedControl fsRegionCrossingPositionErrorLimit(gSavedSettings, "FSRegionCrossingPositionErrorLimit"); static LLCachedControl fsRegionCrossingAngleErrorLimit(gSavedSettings, "FSRegionCrossingAngleErrorLimit"); - // Time limit is max allowed error / error. Returns worst case (smallest) of vel and angular vel limits. + + // Time limit is max allowed error / error. Returns worst case (smallest) of vel and angular vel limits. LLQuaternion rot = mOwner.getRotationRegion(); // transform in global coords const LLQuaternion& inverserot = rot.conjugate(); // transform global to local - // Calculate safe extrapolation time limit. - F32 extrapTimeLimit = llmin(dividesafe(fsRegionCrossingPositionErrorLimit, ((mOwner.getVelocity()*inverserot - mFilteredVel.get()).length())), - dividesafe(fsRegionCrossingAngleErrorLimit, ((mOwner.getAngularVelocity()*inverserot - mFilteredAngVel.get()).length()))); - LL_INFOS() << "Region cross extrapolation safe limit " << extrapTimeLimit << " secs." << LL_ENDL; - return(extrapTimeLimit); // do not extrapolate more than this -} -// + // Calculate safe extrapolation time limit. + F32 extrapTimeLimit = llmin(dividesafe(fsRegionCrossingPositionErrorLimit, ((mOwner.getVelocity() * inverserot - mFilteredVel.get()).length())), + dividesafe(fsRegionCrossingAngleErrorLimit, ((mOwner.getAngularVelocity() * inverserot - mFilteredAngVel.get()).length()))); + + LL_INFOS() << "Region cross extrapolation safe limit " << extrapTimeLimit << " secs." << LL_ENDL; + return extrapTimeLimit; // do not extrapolate more than this +} + // ifsaton -- True if object is being sat upon. // // Potential vehicle. // -BOOL RegionCrossExtrapolate::ifsaton(const LLViewerObject& vo) // true if root object and being sat on -{ if (!vo.isRoot()) { return(false); } // not root, cannot be sat upon +bool RegionCrossExtrapolate::ifsaton(const LLViewerObject& vo) // true if root object and being sat on +{ + if (!vo.isRoot()) + { + return false; // not root, cannot be sat upon + } + for (auto iter = vo.getChildren().begin(); // check for avatar as child of root - iter != vo.getChildren().end(); iter++) - { - LLViewerObject* child = *iter; // get child - if (child->isAvatar()) // avatar as child - { - return(true); // we have a sitter - } - } - return(false); // no avatar children, not sat on + iter != vo.getChildren().end(); iter++) + { + LLViewerObject* child = *iter; + if (child->isAvatar()) + { + return true; + } + } + + return false; // no avatar children, not sat on } -// // LowPassFilter -- the low pass filter for smoothing velocities. // // Works on vectors. @@ -167,17 +180,17 @@ BOOL RegionCrossExtrapolate::ifsaton(const LLViewerObject& vo) // true if root void LowPassFilter::update(const LLVector3& val, F32 secs) // add new value into filter { static LLCachedControl fsRegionCrossingSmoothingTime(gSavedSettings, "FSRegionCrossingSmoothingTime"); - if (!mInitialized) // if not initialized yet - { mFiltered = val; // just use new value + if (!mInitialized) + { + mFiltered = val; // just use new value mInitialized = true; return; } - F32 filtermult = 1.0; // no filtering if zero filter time - if (fsRegionCrossingSmoothingTime > 0.001) // avoid divide by zero - { filtermult = 1.0 - 1.0/pow(1.0+1.0/fsRegionCrossingSmoothingTime,secs); } // filter scale factor - mFiltered = val * filtermult + mFiltered*(1.0-filtermult); // low pass filter + + F32 filtermult = 1.0f; // no filtering if zero filter time + if (fsRegionCrossingSmoothingTime > F_ALMOST_ZERO) // avoid divide by zero + { + filtermult = 1.0f - 1.0f / pow(1.0f + 1.0f / fsRegionCrossingSmoothingTime, secs); // filter scale factor + } + mFiltered = val * filtermult + mFiltered * (1.0f - filtermult); // low pass filter } - - - - diff --git a/indra/newview/fsregioncross.h b/indra/newview/fsregioncross.h index a1b85afd00..626036ed7a 100644 --- a/indra/newview/fsregioncross.h +++ b/indra/newview/fsregioncross.h @@ -32,9 +32,8 @@ // Improved region crossing support. // -class LLViewerObject; // forward declaration +class LLViewerObject; -// // LowPassFilter -- a simple Kalman low-pass filter. // // Supports nonuniform time deltas between samples, since object update times are not consistent. @@ -43,26 +42,27 @@ class LowPassFilter { private: LLVector3 mFiltered; // filtered value - BOOL mInitialized; // true if initialized + bool mInitialized; + public: - LowPassFilter() : // constructor + LowPassFilter() : mInitialized(false), - mFiltered(0.0,0.0,0.0) - {} + mFiltered() + { } + void update(const LLVector3& val, F32 dt); // add new value into filter - + const LLVector3& get() const // get filtered output { - return(mFiltered); // already stored + return mFiltered; // already stored } - - void clear() + + void clear() { - mInitialized = false; // not initialized yet + mInitialized = false; } }; -// // RegionCrossExtrapolateImpl -- the extrapolation limit calculator. // // One of these is created when an object is sat upon. If the @@ -79,16 +79,15 @@ private: F64 mPreviousUpdateTime; // previous update time LowPassFilter mFilteredVel; // filtered velocity LowPassFilter mFilteredAngVel; // filtered angular velocity - BOOL mMoved; // seen to move at least once + bool mMoved; // seen to move at least once public: - RegionCrossExtrapolateImpl(const LLViewerObject& vo); // constructor + RegionCrossExtrapolateImpl(const LLViewerObject& vo); void update(); // update on object update message F32 getextraptimelimit() const; // don't extrapolate more than this - BOOL hasmoved() const { return(mMoved); } // true if has been seen to move with sitter + bool hasmoved() const { return (mMoved); } // true if has been seen to move with sitter }; -// // RegionCrossExtrapolate -- calculate safe limit on how long to extrapolate after a region crossing // // Member object of llViewerObject. For vehicles, a RegionCrossExtrapolateImpl is allocated to do the real work. @@ -96,38 +95,57 @@ public: // Call "changedlink" for any object update which changes parenting. // Get the extrapolation limit time with getextraptimelimit. // -class LLViewerObject; // forward -class RegionCrossExtrapolate { +class RegionCrossExtrapolate +{ private: - std::unique_ptr mImpl; // pointer to region cross extrapolator, if present - + std::unique_ptr mImpl; + protected: - BOOL ifsaton(const LLViewerObject& vo); // true if root object and being sat on - + bool ifsaton(const LLViewerObject& vo); // true if root object and being sat on + public: void update(const LLViewerObject& vo) // new object update message received - { if (mImpl.get()) { mImpl->update(); } // update extrapolator if present + { + if (mImpl.get()) + { + mImpl->update(); // update extrapolator if present + } } - + void changedlink(const LLViewerObject& vo) // parent or child changed, check if extrapolation object needed { if (ifsaton(vo)) // if this object is now the root of a linkset with an avatar - { if (!mImpl.get()) // if no extrapolation implementor - { mImpl.reset(new RegionCrossExtrapolateImpl(vo)); } // add an extrapolator - } else { // not a vehicle + { + if (!mImpl.get()) // if no extrapolation implementor + { + mImpl.reset(new RegionCrossExtrapolateImpl(vo)); // add an extrapolator + } + } + else // not a vehicle + { if (mImpl.get()) - { mImpl.reset(); } // no longer needed + { + mImpl.reset(); // no longer needed + } } } - - BOOL ismovingssaton(const LLViewerObject &vo) - { if (!mImpl.get()) { return(false); } // not sat on - return(mImpl->hasmoved()); // sat on, check for moving + + bool ismovingssaton(const LLViewerObject &vo) + { + if (!mImpl.get()) + { + return (false); // not sat on + } + return mImpl->hasmoved(); // sat on, check for moving } - + F32 getextraptimelimit() const // get extrapolation time limit - { if (mImpl.get()) { return(mImpl->getextraptimelimit()); } // get extrapolation time limit if vehicle - return(std::numeric_limits::infinity()); // no limit if not a vehicle + { + if (mImpl.get()) + { + return mImpl->getextraptimelimit(); // get extrapolation time limit if vehicle + } + return std::numeric_limits::infinity(); // no limit if not a vehicle } }; From b113c6cc88cc5aae5cca35015f76a8ee64569313 Mon Sep 17 00:00:00 2001 From: Beq Date: Thu, 16 Apr 2020 20:50:55 +0100 Subject: [PATCH 196/212] FIRE-17287 - re-enable http pipelining in OpenSim --- indra/newview/llappcorehttp.cpp | 14 -------------- indra/newview/llstartup.cpp | 3 --- 2 files changed, 17 deletions(-) diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index a5a8891aad..bb21cb7026 100644 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -388,20 +388,6 @@ void LLAppCoreHttp::refreshSettings(bool initial) // Global pipelining setting bool pipeline_changed(false); static const std::string http_pipelining("HttpPipelining"); -// FIRE-17287: Force HttpPipelining off on OpenSim -#ifdef OPENSIM - if (LLGridManager::instance().isInOpenSim()) - { - if (mPipelined) - { - mPipelined = false; - pipeline_changed = true; - } - LL_INFOS() << "HTTP Pipelining is not supported on OpenSim - setting to disabled." << LL_ENDL; - } - else -#endif -// if (gSavedSettings.controlExists(http_pipelining)) { // Default to true (in ctor) if absent. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 25d2bd78b8..3749afdcb4 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1641,9 +1641,6 @@ bool idle_startup() progress += 0.02f; display_startup(); - // FIRE-17287: Force HttpPipelining off on OpenSim - LLAppViewer::instance()->getAppCoreHttp().refreshSettings(false); - // eLastExecEvent last_exec_event = gLastExecEvent; const std::string current_grid = LLGridManager::getInstance()->getGrid(); From 9338815b4e732a55366ed9c26bf24e121ecf5783 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 17 Apr 2020 11:41:58 +0100 Subject: [PATCH 197/212] FIRE-29467 - Add a prefs tooltip and fix a typo --- indra/newview/skins/default/xui/en/floater_phototools.xml | 4 ++-- .../skins/default/xui/en/floater_phototools_camera.xml | 2 +- indra/newview/skins/default/xui/en/panel_preferences_move.xml | 1 + indra/newview/skins/starlight/xui/en/floater_phototools.xml | 4 ++-- .../skins/starlight/xui/en/floater_phototools_camera.xml | 2 +- .../newview/skins/starlightcui/xui/en/floater_phototools.xml | 4 ++-- .../skins/starlightcui/xui/en/floater_phototools_camera.xml | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_phototools.xml b/indra/newview/skins/default/xui/en/floater_phototools.xml index 3a2416cb7c..359b3a2b3d 100644 --- a/indra/newview/skins/default/xui/en/floater_phototools.xml +++ b/indra/newview/skins/default/xui/en/floater_phototools.xml @@ -1507,7 +1507,7 @@ layout="topleft" left="5" top_pad="15" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="80"> View angle @@ -4145,7 +4145,7 @@ layout="topleft" left="10" top_pad="7" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle diff --git a/indra/newview/skins/default/xui/en/floater_phototools_camera.xml b/indra/newview/skins/default/xui/en/floater_phototools_camera.xml index 38d7524086..947839324f 100644 --- a/indra/newview/skins/default/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_phototools_camera.xml @@ -362,7 +362,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." width="100"> View angle diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index abe4d6fd6b..8838998e6a 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -56,6 +56,7 @@ max_val="2.97" min_val="0.17" name="camera_fov" + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." show_text="true" width="275" /> View angle @@ -4213,7 +4213,7 @@ layout="topleft" left="10" top_pad="7" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle diff --git a/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml b/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml index fddca09966..6522e10a47 100644 --- a/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml @@ -363,7 +363,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." width="100"> View angle diff --git a/indra/newview/skins/starlightcui/xui/en/floater_phototools.xml b/indra/newview/skins/starlightcui/xui/en/floater_phototools.xml index 634a53872b..0987e60f84 100644 --- a/indra/newview/skins/starlightcui/xui/en/floater_phototools.xml +++ b/indra/newview/skins/starlightcui/xui/en/floater_phototools.xml @@ -1569,7 +1569,7 @@ layout="topleft" left="5" top_pad="15" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="80"> View angle @@ -4213,7 +4213,7 @@ layout="topleft" left="10" top_pad="7" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle diff --git a/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml b/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml index 7150f3bbf9..78c63df2ba 100644 --- a/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml @@ -363,7 +363,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in you viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." width="100"> View angle From 4707cbd177be6a0fc7b8ea9fad8f149f1c818693 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Apr 2020 14:40:59 +0200 Subject: [PATCH 198/212] Update German translation and fix another typo --- indra/newview/skins/default/xui/de/panel_preferences_move.xml | 2 +- .../newview/skins/default/xui/en/floater_phototools_camera.xml | 2 +- .../skins/starlight/xui/en/floater_phototools_camera.xml | 2 +- .../skins/starlightcui/xui/en/floater_phototools_camera.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_move.xml b/indra/newview/skins/default/xui/de/panel_preferences_move.xml index 2594105793..d8f22347e8 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_move.xml @@ -3,7 +3,7 @@ - + diff --git a/indra/newview/skins/default/xui/en/floater_phototools_camera.xml b/indra/newview/skins/default/xui/en/floater_phototools_camera.xml index 947839324f..ae2c2fae5a 100644 --- a/indra/newview/skins/default/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_phototools_camera.xml @@ -362,7 +362,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle diff --git a/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml b/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml index 6522e10a47..1eb43fba86 100644 --- a/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/starlight/xui/en/floater_phototools_camera.xml @@ -363,7 +363,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle diff --git a/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml b/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml index 78c63df2ba..dd36f20145 100644 --- a/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml +++ b/indra/newview/skins/starlightcui/xui/en/floater_phototools_camera.xml @@ -363,7 +363,7 @@ layout="topleft" left="10" top_pad="12" - tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpacenNavigator)." + tool_tip="In real world terms this is a Zoom feature. This will change the field of view in your viewer window. It is the same as hitting Ctrl + 0 or Ctrl+8. NOTE: This will not function if you have flycam enabled (3D SpaceNavigator)." width="100"> View angle From 7010bed940f172dd5bb12be863148863b72942a7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Apr 2020 14:42:29 +0200 Subject: [PATCH 199/212] Update Polish translation as well --- indra/newview/skins/default/xui/pl/panel_preferences_move.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_move.xml b/indra/newview/skins/default/xui/pl/panel_preferences_move.xml index abb3b8f00f..27fe6c707e 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_move.xml @@ -2,7 +2,7 @@ - + From de24e09af16c43fa9a09d0441379b11393987330 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Apr 2020 16:36:25 +0200 Subject: [PATCH 200/212] Increase version to 6.3.10 for master branch --- 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 291cd91eb1..9776e7290d 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -6.3.9 +6.3.10 From 51eff4e22594fe177bada7725560a88a80c33b74 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sun, 19 Apr 2020 06:07:20 +0200 Subject: [PATCH 201/212] Windows/Bugsplat: Do not use secondlife-bin.pdb but rather firestorm-bin.pdb as symbol file. --- indra/newview/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index abed07e723..85c4ff7f6f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2777,8 +2777,8 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE "${VIEWER_SYMBOL_FILE_CYGWIN}" "-C" "${PARENT_DIRECTORY_CYGWIN}" - "secondlife-bin.pdb" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-bin.pdb" + "firestorm-bin.pdb" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/firestorm-bin.pdb" COMMENT "Packing viewer PDB into ${VIEWER_SYMBOL_FILE_CYGWIN}" ) add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME}) From 3a96f21d274e08c1ee8d997b8429f4b5bd16f334 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 21 Apr 2020 00:46:10 +0100 Subject: [PATCH 202/212] DAEExport: unify textures in one UVMap option --- indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/daeexport.cpp | 22 ++++++++++++++++--- .../default/xui/en/floater_export_collada.xml | 19 +++++++++++----- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5974026d7e..efd0bde0b8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23422,6 +23422,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + DAEExportSingleUVMap + + Comment + set all objects to have the same UV map name + Persist + 1 + Type + Boolean + Value + 0 + DAEExportTextureParams Comment diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index 15984fcf1c..7f693c49a8 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -640,7 +640,14 @@ void DAESaver::addPolygons(daeElement* mesh, const char* geomID, const char* mat domInputLocalOffset* input = daeSafeCast(polylist->add("input")); input->setSemantic("TEXCOORD"); input->setOffset(0); - input->setSource(llformat("#%s-%s", geomID, "map0").c_str()); + if(gSavedSettings.getBOOL("DAEExportSingleUVMap")) + { + input->setSource(llformat("#%s-%s", "unified", "map0").c_str()); + } + else + { + input->setSource(llformat("#%s-%s", geomID, "map0").c_str()); + } } // Save indices @@ -778,7 +785,7 @@ bool DAESaver::saveDAE(std::string filename) } S32 prim_nr = 0; - + for (obj_info_t::iterator obj_iter = mObjects.begin(); obj_iter != mObjects.end(); ++obj_iter) { LLViewerObject* obj = obj_iter->first; @@ -797,6 +804,7 @@ bool DAESaver::saveDAE(std::string filename) std::vector normal_data; std::vector uv_data; bool applyTexCoord = gSavedSettings.getBOOL("DAEExportTextureParams"); + bool consolidateUVMap = gSavedSettings.getBOOL("DAEExportSingleUVMap"); S32 num_faces = obj->getVolume()->getNumVolumeFaces(); for (S32 face_num = 0; face_num < num_faces; face_num++) @@ -853,7 +861,15 @@ bool DAESaver::saveDAE(std::string filename) addSource(mesh, llformat("%s-%s", geomID, "positions").c_str(), "XYZ", position_data); addSource(mesh, llformat("%s-%s", geomID, "normals").c_str(), "XYZ", normal_data); - addSource(mesh, llformat("%s-%s", geomID, "map0").c_str(), "ST", uv_data); + if(consolidateUVMap) + { + addSource(mesh, llformat("%s-%s", "unified", "map0").c_str(), "ST", uv_data); + } + else + { + addSource(mesh, llformat("%s-%s", geomID, "map0").c_str(), "ST", uv_data); + } + // Add the element { diff --git a/indra/newview/skins/default/xui/en/floater_export_collada.xml b/indra/newview/skins/default/xui/en/floater_export_collada.xml index 87c7c5e3d4..a0edb9dbaa 100644 --- a/indra/newview/skins/default/xui/en/floater_export_collada.xml +++ b/indra/newview/skins/default/xui/en/floater_export_collada.xml @@ -1,6 +1,6 @@ Options: @@ -120,6 +120,15 @@ name="texture_params_check" top_pad="2" width="235" /> + Date: Wed, 22 Apr 2020 16:35:02 +0200 Subject: [PATCH 203/212] Updated Polish translation In addition to some new strings a difference between 'load' and 'upload' wording has been made --- .../xui/pl/floater_preview_texture.xml | 2 +- .../default/xui/pl/floater_about_land.xml | 6 +- .../xui/pl/floater_animation_anim_preview.xml | 2 +- .../xui/pl/floater_animation_bvh_preview.xml | 2 +- .../default/xui/pl/floater_export_collada.xml | 1 + .../default/xui/pl/floater_fs_import.xml | 4 +- .../default/xui/pl/floater_image_preview.xml | 2 +- .../default/xui/pl/floater_import_collada.xml | 2 +- .../default/xui/pl/floater_model_preview.xml | 10 ++-- .../default/xui/pl/floater_perm_prefs.xml | 2 +- .../default/xui/pl/floater_perms_default.xml | 2 +- .../xui/pl/floater_phototools_camera.xml | 2 +- .../xui/pl/floater_preview_texture.xml | 2 +- .../skins/default/xui/pl/floater_snapshot.xml | 2 +- .../default/xui/pl/floater_sound_preview.xml | 2 +- .../default/xui/pl/floater_texture_ctrl.xml | 2 +- .../xui/pl/menu_gallery_outfit_tab.xml | 2 +- .../default/xui/pl/menu_inventory_add.xml | 2 +- .../skins/default/xui/pl/menu_outfit_gear.xml | 2 +- .../skins/default/xui/pl/menu_viewer.xml | 4 +- .../skins/default/xui/pl/notifications.xml | 58 +++++++++---------- .../pl/panel_outfit_snapshot_inventory.xml | 2 +- .../xui/pl/panel_preferences_alerts.xml | 2 +- .../xui/pl/panel_preferences_firestorm.xml | 2 +- .../xui/pl/panel_preferences_privacy.xml | 2 +- .../default/xui/pl/panel_region_terrain.xml | 4 +- .../skins/default/xui/pl/panel_script_ed.xml | 2 +- .../xui/pl/panel_script_ed_preproc.xml | 2 +- .../newview/skins/default/xui/pl/strings.xml | 14 ++--- .../latency/xui/pl/floater_about_land.xml | 6 +- .../vintage/xui/pl/floater_about_land.xml | 6 +- 31 files changed, 78 insertions(+), 77 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/pl/floater_preview_texture.xml b/indra/newview/skins/ansastorm/xui/pl/floater_preview_texture.xml index 7b3c94209a..2b862aac59 100644 --- a/indra/newview/skins/ansastorm/xui/pl/floater_preview_texture.xml +++ b/indra/newview/skins/ansastorm/xui/pl/floater_preview_texture.xml @@ -14,7 +14,7 @@ Opis: - Załadował/a: + Przesłał/a: