From 3f34acaa18fbe44241ab5fc9042d3b7e9f611fe1 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 30 Jun 2023 14:01:30 +0200 Subject: SL-19816 Home location on world map for invalid locations --- indra/newview/llagent.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8cc9be7244..a80c285a6e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2534,12 +2534,6 @@ void LLAgent::setStartPosition( U32 location_id ) if (!requestPostCapability("HomeLocation", body, boost::bind(&LLAgent::setStartPositionSuccess, this, _1))) LL_WARNS() << "Unable to post to HomeLocation capability." << LL_ENDL; - - const U32 HOME_INDEX = 1; - if( HOME_INDEX == location_id ) - { - setHomePosRegion( mRegionp->getHandle(), getPositionAgent() ); - } } void LLAgent::setStartPositionSuccess(const LLSD &result) -- cgit v1.2.3 From 374de322bf8777121bc6ad12455980261a8b4b86 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 5 Jul 2023 20:48:54 +0300 Subject: SL-19950 don't try to change fly state if it's not needed --- indra/newview/llagent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a80c285a6e..289a9caea4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -481,7 +481,11 @@ void LLAgent::init() // *Note: this is where LLViewerCamera::getInstance() used to be constructed. - setFlying( gSavedSettings.getBOOL("FlyingAtExit") ); + bool is_flying = gSavedSettings.getBOOL("FlyingAtExit"); + if(is_flying) + { + setFlying(is_flying); + } *mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); -- cgit v1.2.3 From 5928afda8a5db7875a9d4743fb04daf3c8c51be4 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 6 Jul 2023 21:46:19 +0300 Subject: SL-19702 restore previous double clicking behavior for objects (#266) --- indra/newview/llviewerinput.cpp | 5 +++-- indra/newview/llviewerwindow.cpp | 3 ++- indra/newview/llviewerwindow.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 6bab2c2100..226e0a9a56 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -1597,7 +1597,8 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down) { - BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down); + bool is_toolmgr_action = false; + BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action); if (clicktype != CLICK_NONE) { @@ -1616,7 +1617,7 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, // If the first LMB click is handled by the menu, skip the following double click static bool skip_double_click = false; - if (clicktype == CLICK_LEFT && down ) + if (clicktype == CLICK_LEFT && down && !is_toolmgr_action) { skip_double_click = handled; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b9fcc25310..e8fd74b37b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1050,7 +1050,7 @@ void LLViewerWindow::handlePieMenu(S32 x, S32 y, MASK mask) } } -BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down) +BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool& is_toolmgr_action) { const char* buttonname = ""; const char* buttonstatestr = ""; @@ -1199,6 +1199,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) ) { LLViewerEventRecorder::instance().clear_xui(); + is_toolmgr_action = true; return TRUE; } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 1927e01ddb..92905ef21a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -179,7 +179,7 @@ public: void reshapeStatusBarContainer(); - BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); + BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool &is_toolmgr_action); // // LLWindowCallback interface implementation -- cgit v1.2.3 From f5385a80266e67bc8b2901e78ddfa886d8b61bbc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 6 Jul 2023 21:32:44 +0300 Subject: SL-18164 Media type format not shown in the About Land's media tab --- indra/newview/llfloaterurlentry.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 917d6dfcd0..48d6e01d32 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -175,10 +175,9 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) // We assume that an empty scheme is an http url, as this is how we will treat it. if(scheme == "") { - scheme = "http"; + scheme = "https"; } - // Discover the MIME type only for "http" scheme. if(!media_url.empty() && (scheme == "http" || scheme == "https")) { @@ -204,13 +203,18 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle pa LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpOpts->setFollowRedirects(true); httpOpts->setHeadersOnly(true); + httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); + httpHeaders->append(HTTP_OUT_HEADER_COOKIE, ""); + LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL; - LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts); + LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -226,12 +230,6 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle pa // which have no mime type set. std::string resolvedMimeType = LLMIMETypes::getDefaultMimeType(); - if (!status) - { - floaterUrlEntry->headerFetchComplete(status.getType(), resolvedMimeType); - return; - } - LLSD resultHeaders = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS]; if (resultHeaders.has(HTTP_IN_HEADER_CONTENT_TYPE)) -- cgit v1.2.3 From d61e6fc7eca41bba6def1d5904ec829dd71f011f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 7 Jul 2023 20:26:51 +0300 Subject: SL-19963 Group Profile's money details have misleading date --- indra/newview/llpanelgrouplandmoney.cpp | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index a2e136bd5a..f276d6d785 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -1077,7 +1077,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval ); msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date); - std::string time_str = LLTrans::getString("GroupMoneyDate"); + std::string time_str = LLTrans::getString("GroupMoneyStartDate"); LLSD substitution; // We don't do time zone corrections of the calculated number of seconds @@ -1232,7 +1232,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, // Start with the date. if (text == mImplementationp->mLoadingText) { - std::string time_str = LLTrans::getString("GroupMoneyDate"); + std::string time_str = LLTrans::getString("GroupMoneyStartDate"); LLSD substitution; // We don't do time zone corrections of the calculated number of seconds diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 01f5b513c7..2be13d9818 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2847,7 +2847,7 @@ If you continue to receive this message, please contact Second Life support for Balance Credits Debits - [weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc] + Transactions since [weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc] Acquired Items -- cgit v1.2.3 From e80f0f331dbfca686e0a80c557e9b1e455c8d167 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 11 Jul 2023 03:05:07 +0300 Subject: SL-19986 Crash at LLConversationItemSession::findParticipant Observed on bugsplat, no repro. Something destroys LLConversationItem without cleaning list (some sessions reuse the item, but they aren't supposed to remove it). Either item should inform floater to be properly removed or should be stored as an LLPointer. --- indra/newview/llconversationmodel.h | 2 +- indra/newview/llfloaterimcontainer.cpp | 22 ++++++++++++++++++---- indra/newview/llfloaterimcontainer.h | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 7c6980a7e6..457b2e83fb 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -40,7 +40,7 @@ class LLConversationItem; class LLConversationItemSession; class LLConversationItemParticipant; -typedef std::map conversations_items_map; +typedef std::map > conversations_items_map; typedef std::map conversations_widgets_map; typedef std::vector menuentry_vec_t; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 2720b7fcf7..172e672dc5 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -155,6 +155,20 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLFloaterIMSessionTab::addToHost(new_session_id); } + +LLConversationItem* LLFloaterIMContainer::getSessionModel(const LLUUID& session_id) +{ + conversations_items_map::iterator iter = mConversationsItems.find(session_id); + if (iter == mConversationsItems.end()) + { + return NULL; + } + else + { + return iter->second.get(); + } +} + void LLFloaterIMContainer::sessionRemoved(const LLUUID& session_id) { removeConversationListItem(session_id); @@ -608,7 +622,8 @@ void LLFloaterIMContainer::handleConversationModelEvent(const LLSD& event) } else if (type == "add_participant") { - LLConversationItemSession* session_model = dynamic_cast(mConversationsItems[session_id]); + LLConversationItem* item = getSessionModel(session_id); + LLConversationItemSession* session_model = dynamic_cast(item); LLConversationItemParticipant* participant_model = (session_model ? session_model->findParticipant(participant_id) : NULL); LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(session_id); if (!participant_view && session_model && participant_model) @@ -1749,10 +1764,9 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) { - LLConversationItemSession* item = dynamic_cast(get_ptr_in_map(mConversationsItems,session_id)); + LLConversationItemSession* item = dynamic_cast(getSessionModel(session_id)); if (item) { - item->setTimeNow(participant_id); mConversationViewModel.requestSortAll(); mConversationsRoot->arrangeAll(); } @@ -1761,7 +1775,7 @@ void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& pa void LLFloaterIMContainer::setNearbyDistances() { // Get the nearby chat session: that's the one with uuid nul - LLConversationItemSession* item = dynamic_cast(get_ptr_in_map(mConversationsItems,LLUUID())); + LLConversationItemSession* item = dynamic_cast(getSessionModel(LLUUID())); if (item) { // Get the positions of the nearby avatars and their ids diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index b4a9d377ab..82f3b00ebc 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -106,7 +106,7 @@ public: LLConversationViewModel& getRootViewModel() { return mConversationViewModel; } LLUUID getSelectedSession() { return mSelectedSession; } void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; } - LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); } + LLConversationItem* getSessionModel(const LLUUID& session_id); LLConversationSort& getSortOrder() { return mConversationViewModel.getSorter(); } // Handling of lists of participants is public so to be common with llfloatersessiontab -- cgit v1.2.3 From 9a3c76757f7f635c0b8e47277881fea195d6b672 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 13 Jul 2023 14:13:24 -0700 Subject: SL-20009 - race condition - calling cards could be created without name This happens when a calling card is created before the name is in the name cache. --- indra/newview/llfriendcard.cpp | 15 +-------------- indra/newview/llviewerinventory.cpp | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index e395da7f1e..97fff033b6 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -534,20 +534,7 @@ void LLFriendCardsManager::syncFriendsFolder() // Create own calling card if it was not found in Friends/All folder if (!collector.isAgentCallingCardFound()) { - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - - create_inventory_item(gAgentID, - gAgent.getSessionID(), - calling_cards_folder_id, - LLTransactionID::tnull, - av_name.getCompleteName(), - gAgentID.asString(), - LLAssetType::AT_CALLINGCARD, - LLInventoryType::IT_CALLINGCARD, - NO_INV_SUBTYPE, - PERM_MOVE | PERM_TRANSFER, - NULL); + create_inventory_callingcard(gAgentID, calling_cards_folder_id); } // All folders created and updated. diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 50252556de..c13acb4158 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1046,14 +1046,29 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, gAgent.sendReliableMessage(); } +void create_inventory_callingcard_callback(LLPointer cb, + const LLUUID &parent, + const LLUUID &avatar_id, + const LLAvatarName &av_name) +{ + std::string item_desc = avatar_id.asString(); + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + parent, + LLTransactionID::tnull, + av_name.getUserName(), + item_desc, + LLAssetType::AT_CALLINGCARD, + LLInventoryType::IT_CALLINGCARD, + NO_INV_SUBTYPE, + PERM_MOVE | PERM_TRANSFER, + cb); +} + void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent /*= LLUUID::null*/, LLPointer cb/*=NULL*/) { - std::string item_desc = avatar_id.asString(); LLAvatarName av_name; - LLAvatarNameCache::get(avatar_id, &av_name); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent, LLTransactionID::tnull, av_name.getUserName(), item_desc, LLAssetType::AT_CALLINGCARD, - LLInventoryType::IT_CALLINGCARD, NO_INV_SUBTYPE, PERM_MOVE | PERM_TRANSFER, cb); + LLAvatarNameCache::get(avatar_id, boost::bind(&create_inventory_callingcard_callback, cb, parent, _1, _2)); } void create_inventory_wearable(const LLUUID& agent_id, const LLUUID& session_id, -- cgit v1.2.3 From c70f54095e01490b7d6f4eb58253ab966d49fcbe Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 14 Jul 2023 10:34:39 -0700 Subject: Fix some spacing --- indra/newview/llviewerinventory.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index c13acb4158..15942faa98 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1053,16 +1053,16 @@ void create_inventory_callingcard_callback(LLPointer cb, { std::string item_desc = avatar_id.asString(); create_inventory_item(gAgent.getID(), - gAgent.getSessionID(), - parent, - LLTransactionID::tnull, - av_name.getUserName(), - item_desc, - LLAssetType::AT_CALLINGCARD, - LLInventoryType::IT_CALLINGCARD, - NO_INV_SUBTYPE, - PERM_MOVE | PERM_TRANSFER, - cb); + gAgent.getSessionID(), + parent, + LLTransactionID::tnull, + av_name.getUserName(), + item_desc, + LLAssetType::AT_CALLINGCARD, + LLInventoryType::IT_CALLINGCARD, + NO_INV_SUBTYPE, + PERM_MOVE | PERM_TRANSFER, + cb); } void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent /*= LLUUID::null*/, LLPointer cb/*=NULL*/) -- cgit v1.2.3 From d573bc2f926fb6ff473d9b346cdeb4d73e3b0ab3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Sat, 15 Jul 2023 14:23:44 +0300 Subject: SL-20011 Restrict 'Empty Trash' if objects are attached --- indra/newview/llinventorybridge.cpp | 3 ++- indra/newview/llvoavatarself.cpp | 21 +++++++++++++++++++++ indra/newview/llvoavatarself.h | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index db347f7096..31b1cb7a23 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4141,7 +4141,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items || is_recent_panel || !trash || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN - || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN) + || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN + || gAgentAvatarp->hasAttachmentsInTrash()) { disabled_items.push_back(std::string("Empty Trash")); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 8fc1dcd81f..914376f5d1 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1247,6 +1247,27 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) return FALSE; } +bool LLVOAvatarSelf::hasAttachmentsInTrash() +{ + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + + for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) + { + LLViewerJointAttachment *attachment = iter->second; + for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); + attachment_iter != attachment->mAttachedObjects.end(); + ++attachment_iter) + { + LLViewerObject *attached_object = attachment_iter->get(); + if (attached_object && gInventory.isObjectDescendentOf(attached_object->getAttachmentItemID(), trash_id)) + { + return true; + } + } + } + return false; +} + // static BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) { diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 279dbd61a6..6384e2b844 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -289,6 +289,8 @@ public: /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object); static BOOL detachAttachmentIntoInventory(const LLUUID& item_id); + bool hasAttachmentsInTrash(); + //-------------------------------------------------------------------- // HUDs //-------------------------------------------------------------------- -- cgit v1.2.3 From 4c89ad558688f6dfa8f7216ad7613ed75823b069 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 14 Jul 2023 02:00:16 +0300 Subject: SL-19306 A method of displaying user-customized keybindings in user-visible text --- indra/newview/llappviewer.cpp | 2 + indra/newview/llfloaterpreference.cpp | 42 +++++++++++++++- indra/newview/llkeyconflict.cpp | 38 +-------------- indra/newview/llviewerinput.cpp | 92 +++++++++++++++++++++++++++++------ indra/newview/llviewerinput.h | 17 ++++--- 5 files changed, 132 insertions(+), 59 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8235e4466c..3d81d4d7ea 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -195,6 +195,7 @@ #include "llhudeffecttrail.h" #include "llvectorperfoptions.h" #include "llslurl.h" +#include "llurlregistry.h" #include "llwatchdog.h" // Included so that constants/settings might be initialized @@ -4447,6 +4448,7 @@ void LLAppViewer::loadKeyBindings() LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL; } } + LLUrlRegistry::instance().setKeybindingHandler(&gViewerInput); } void LLAppViewer::purgeCache() diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9ea49e935f..e59c2ee2cd 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -251,11 +251,49 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) } } } -// static -std::string LLFloaterPreference::sSkin = ""; + +// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs +// Also see LLUrlEntryKeybinding, the value of this command type +// is ability to show up to date value in chat +class LLKeybindingHandler: public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLKeybindingHandler(): LLCommandHandler("keybinding", UNTRUSTED_CLICK_ONLY) + { + } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 1) return false; + + LLFloaterPreference* prefsfloater = dynamic_cast + (LLFloaterReg::showInstance("preferences")); + + if (prefsfloater) + { + // find 'controls' panel and bring it the front + LLTabContainer* tabcontainer = prefsfloater->getChild("pref core"); + LLPanel* panel = prefsfloater->getChild("controls"); + if (tabcontainer && panel) + { + tabcontainer->selectTabPanel(panel); + } + } + + return true; + } +}; +LLKeybindingHandler gKeybindHandler; + + ////////////////////////////////////////////// // LLFloaterPreference +// static +std::string LLFloaterPreference::sSkin = ""; + LLFloaterPreference::LLFloaterPreference(const LLSD& key) : LLFloater(key), mGotPersonalInfo(false), diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp index 60f8aca94c..4a0ee8fd0c 100644 --- a/indra/newview/llkeyconflict.cpp +++ b/indra/newview/llkeyconflict.cpp @@ -74,40 +74,6 @@ std::string string_from_mask(MASK mask) return res; } -std::string string_from_mouse(EMouseClickType click, bool translate) -{ - std::string res; - switch (click) - { - case CLICK_LEFT: - res = "LMB"; - break; - case CLICK_MIDDLE: - res = "MMB"; - break; - case CLICK_RIGHT: - res = "RMB"; - break; - case CLICK_BUTTON4: - res = "MB4"; - break; - case CLICK_BUTTON5: - res = "MB5"; - break; - case CLICK_DOUBLELEFT: - res = "Double LMB"; - break; - default: - break; - } - - if (translate && !res.empty()) - { - res = LLTrans::getString(res); - } - return res; -} - // LLKeyConflictHandler S32 LLKeyConflictHandler::sTemporaryFileUseCount = 0; @@ -270,7 +236,7 @@ std::string LLKeyConflictHandler::getStringFromKeyData(const LLKeyData& keydata) result = LLKeyboard::stringFromAccelerator(keydata.mMask); } - result += string_from_mouse(keydata.mMouse, true); + result += LLKeyboard::stringFromMouse(keydata.mMouse); return result; } @@ -545,7 +511,7 @@ void LLKeyConflictHandler::saveToSettings(bool temporary) { // set() because 'optional', for compatibility purposes // just copy old keys.xml and rename to key_bindings.xml, it should work - binding.mouse.set(string_from_mouse(data.mMouse, false), true); + binding.mouse.set(LLKeyboard::stringFromMouse(data.mMouse, false), true); } binding.command = iter->first; mode.bindings.add(binding); diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 226e0a9a56..3f8e6f57f6 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -991,34 +991,50 @@ LLViewerInput::LLViewerInput() } } +LLViewerInput::~LLViewerInput() +{ + +} + // static -BOOL LLViewerInput::modeFromString(const std::string& string, S32 *mode) +bool LLViewerInput::modeFromString(const std::string& string, S32 *mode) { - if (string == "FIRST_PERSON") + if (string.empty()) + { + return false; + } + + std::string cmp_string = string; + LLStringUtil::toLower(cmp_string); + if (cmp_string == "first_person") { *mode = MODE_FIRST_PERSON; - return TRUE; + return true; } - else if (string == "THIRD_PERSON") + else if (cmp_string == "third_person") { *mode = MODE_THIRD_PERSON; - return TRUE; + return true; } - else if (string == "EDIT_AVATAR") + else if (cmp_string == "edit_avatar") { *mode = MODE_EDIT_AVATAR; - return TRUE; + return true; } - else if (string == "SITTING") + else if (cmp_string == "sitting") { *mode = MODE_SITTING; - return TRUE; - } - else - { - *mode = MODE_THIRD_PERSON; - return FALSE; + return true; } + + S32 val = atoi(string.c_str()); + if (val >= 0 || val < MODE_COUNT) + { + *mode = val; + return true; + } + + return false; } // static @@ -1222,6 +1238,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons bind.mKey = key; bind.mMask = mask; bind.mFunction = function; + bind.mFunctionName = function_name; if (result->mIsGlobal) { @@ -1303,6 +1320,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const bind.mMouse = mouse; bind.mMask = mask; bind.mFunction = function; + bind.mFunctionName = function_name; if (result->mIsGlobal) { @@ -1801,3 +1819,49 @@ bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask } return false; } + +std::string LLViewerInput::getKeyBindingAsString(const std::string& mode, const std::string& control) const +{ + S32 keyboard_mode; + if (!modeFromString(mode, &keyboard_mode)) + { + keyboard_mode = getMode(); + } + + std::string res; + bool needs_separator = false; + + // keybindings are sorted from having most mask to no mask (from restrictive to less restrictive), + // but it's visually better to present this data in reverse + std::vector::const_reverse_iterator iter_key = mKeyBindings[keyboard_mode].rbegin(); + while (iter_key != mKeyBindings[keyboard_mode].rend()) + { + if (iter_key->mFunctionName == control) + { + if (needs_separator) + { + res.append(" | "); + } + res.append(LLKeyboard::stringFromAccelerator(iter_key->mMask, iter_key->mKey)); + needs_separator = true; + } + iter_key++; + } + + std::vector::const_reverse_iterator iter_mouse = mMouseBindings[keyboard_mode].rbegin(); + while (iter_mouse != mMouseBindings[keyboard_mode].rend()) + { + if (iter_mouse->mFunctionName == control) + { + if (needs_separator) + { + res.append(" | "); + } + res.append(LLKeyboard::stringFromAccelerator(iter_mouse->mMask, iter_mouse->mMouse)); + needs_separator = true; + } + iter_mouse++; + } + + return res; +} diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 52e95e2168..41e289ac1d 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -28,12 +28,13 @@ #define LL_LLVIEWERINPUT_H #include "llkeyboard.h" // For EKeystate -#include "llinitparam.h" const S32 MAX_KEY_BINDINGS = 128; // was 60 const S32 keybindings_xml_version = 1; const std::string script_mouse_handler_name = "script_trigger_lbutton"; +class LLWindow; + class LLNamedFunction { public: @@ -51,6 +52,7 @@ public: MASK mMask; LLKeyFunc mFunction; + std::string mFunctionName; }; class LLMouseBinding @@ -60,6 +62,7 @@ public: MASK mMask; LLKeyFunc mFunction; + std::string mFunctionName; }; @@ -72,11 +75,7 @@ typedef enum e_keyboard_mode MODE_COUNT } EKeyboardMode; -class LLWindow; - -void bind_keyboard_functions(); - -class LLViewerInput +class LLViewerInput : public LLKeyBindingToStringHandler { public: struct KeyBinding : public LLInitParam::Block @@ -107,6 +106,7 @@ public: }; LLViewerInput(); + virtual ~LLViewerInput(); BOOL handleKey(KEY key, MASK mask, BOOL repeated); BOOL handleKeyUp(KEY key, MASK mask); @@ -121,7 +121,7 @@ public: S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error EKeyboardMode getMode() const; - static BOOL modeFromString(const std::string& string, S32 *mode); // False on failure + static bool modeFromString(const std::string& string, S32 *mode); // False on failure static BOOL mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure bool scanKey(KEY key, @@ -136,6 +136,9 @@ public: bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const; bool isLMouseHandlingDefault(const S32 mode) const { return mLMouseDefaultHandling[mode]; } + // inherited from LLKeyBindingToStringHandler + virtual std::string getKeyBindingAsString(const std::string& mode, const std::string& control) const override; + private: bool scanKey(const std::vector &binding, S32 binding_count, -- cgit v1.2.3 From c37140dd89051317216bbf7a2cb08198c62535e0 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 17 Jul 2023 18:05:10 +0300 Subject: SL-19995 FIXED The context menu is not fully displayed for the navigation bar --- indra/newview/lllocationinputctrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index d6f3068610..9fa35e3bd9 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -391,7 +391,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) LL_WARNS() << "Error loading navigation bar context menu" << LL_ENDL; } - getTextEntry()->setRightMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked,this,_2,_3,_4)); + //don't show default context menu + getTextEntry()->setShowContextMenu(false); + getTextEntry()->setRightMouseDownCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked, this, _2, _3, _4)); updateWidgetlayout(); // Connecting signal for updating location on "Show Coordinates" setting change. -- cgit v1.2.3 From a6e84f5e9ed71c93f333733d7d4642e37fb3a50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Wed, 19 Jul 2023 19:35:49 +0200 Subject: update DejaVu Fonts to 2.37, including LICENSE --- indra/newview/fonts/DejaVu-license.txt | 92 ++++++++++++++++++++++++- indra/newview/fonts/DejaVuSans-Bold.ttf | Bin 573136 -> 705684 bytes indra/newview/fonts/DejaVuSans-BoldOblique.ttf | Bin 524056 -> 643292 bytes indra/newview/fonts/DejaVuSans-Oblique.ttf | Bin 523804 -> 635416 bytes indra/newview/fonts/DejaVuSans.ttf | Bin 622280 -> 757076 bytes indra/newview/fonts/DejaVuSansMono.ttf | Bin 321524 -> 340712 bytes 6 files changed, 90 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/fonts/DejaVu-license.txt b/indra/newview/fonts/DejaVu-license.txt index 254e2cc42a..df52c1709b 100644 --- a/indra/newview/fonts/DejaVu-license.txt +++ b/indra/newview/fonts/DejaVu-license.txt @@ -1,6 +1,7 @@ Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) + Bitstream Vera Fonts Copyright ------------------------------ @@ -46,7 +47,7 @@ Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot -org. +org. Arev Fonts Copyright ------------------------------ @@ -96,4 +97,91 @@ dealings in this Font Software without prior written authorization from Tavmjong Bah. For further information, contact: tavmjong @ free . fr. -$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ +TeX Gyre DJV Math +----------------- +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. + +Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski +(on behalf of TeX users groups) are in public domain. + +Letters imported from Euler Fraktur from AMSfonts are (c) American +Mathematical Society (see below). +Bitstream Vera Fonts Copyright +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera +is a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license (“Fonts”) and associated +documentation +files (the “Font Software”), to reproduce and distribute the Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, +and/or sell copies of the Font Software, and to permit persons to whom +the Font Software is furnished to do so, subject to the following +conditions: + +The above copyright and trademark notices and this permission notice +shall be +included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional +glyphs or characters may be added to the Fonts, only if the fonts are +renamed +to names not containing either the words “Bitstream” or the word “Vera”. + +This License becomes null and void to the extent applicable to Fonts or +Font Software +that has been modified and is distributed under the “Bitstream Vera” +names. + +The Font Software may be sold as part of a larger software package but +no copy +of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, +SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN +ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE +THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +Except as contained in this notice, the names of GNOME, the GNOME +Foundation, +and Bitstream Inc., shall not be used in advertising or otherwise to promote +the sale, use or other dealings in this Font Software without prior written +authorization from the GNOME Foundation or Bitstream Inc., respectively. +For further information, contact: fonts at gnome dot org. + +AMSFonts (v. 2.2) copyright + +The PostScript Type 1 implementation of the AMSFonts produced by and +previously distributed by Blue Sky Research and Y&Y, Inc. are now freely +available for general use. This has been accomplished through the +cooperation +of a consortium of scientific publishers with Blue Sky Research and Y&Y. +Members of this consortium include: + +Elsevier Science IBM Corporation Society for Industrial and Applied +Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS) + +In order to assure the authenticity of these fonts, copyright will be +held by +the American Mathematical Society. This is not meant to restrict in any way +the legitimate use of the fonts, such as (but not limited to) electronic +distribution of documents containing these fonts, inclusion of these fonts +into other public domain or commercial font collections or computer +applications, use of the outline data to create derivative fonts and/or +faces, etc. However, the AMS does require that the AMS copyright notice be +removed from any derivative versions of the fonts which have been altered in +any way. In addition, to ensure the fidelity of TeX documents using Computer +Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces, +has requested that any alterations which yield different font metrics be +given a different name. + +$Id$ diff --git a/indra/newview/fonts/DejaVuSans-Bold.ttf b/indra/newview/fonts/DejaVuSans-Bold.ttf index ec1a2ebaf2..6d65fa7dc4 100644 Binary files a/indra/newview/fonts/DejaVuSans-Bold.ttf and b/indra/newview/fonts/DejaVuSans-Bold.ttf differ diff --git a/indra/newview/fonts/DejaVuSans-BoldOblique.ttf b/indra/newview/fonts/DejaVuSans-BoldOblique.ttf index 1a5576460d..753f2d80b1 100644 Binary files a/indra/newview/fonts/DejaVuSans-BoldOblique.ttf and b/indra/newview/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/indra/newview/fonts/DejaVuSans-Oblique.ttf b/indra/newview/fonts/DejaVuSans-Oblique.ttf index becc549927..999bac7714 100644 Binary files a/indra/newview/fonts/DejaVuSans-Oblique.ttf and b/indra/newview/fonts/DejaVuSans-Oblique.ttf differ diff --git a/indra/newview/fonts/DejaVuSans.ttf b/indra/newview/fonts/DejaVuSans.ttf index c1b19d8705..e5f7eecce4 100644 Binary files a/indra/newview/fonts/DejaVuSans.ttf and b/indra/newview/fonts/DejaVuSans.ttf differ diff --git a/indra/newview/fonts/DejaVuSansMono.ttf b/indra/newview/fonts/DejaVuSansMono.ttf index 6bc854ddae..f5786022f1 100644 Binary files a/indra/newview/fonts/DejaVuSansMono.ttf and b/indra/newview/fonts/DejaVuSansMono.ttf differ -- cgit v1.2.3 From 37a6b6411c0ad86fecd1bf71f7874c2d74a5a121 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Jul 2023 00:13:27 +0300 Subject: SL-18058 Updated profile picture not shown in Conversation floater --- indra/newview/llavatariconctrl.cpp | 5 +++++ indra/newview/llpanelprofile.cpp | 44 ++++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index c131dc641b..44bf698caa 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -247,6 +247,11 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) app->addObserver(mAvatarId, this); app->sendAvatarPropertiesRequest(mAvatarId); } + else if (gAgentID == mAvatarId) + { + // Always track any changes to our own icon id + app->addObserver(mAvatarId, this); + } } } else diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 8ac1efe8e7..643d0f4df9 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -276,9 +276,9 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) //TODO: changes take two minutes to propagate! // Add some storage that holds updated data for two minutes // for new instances to reuse the data -// Profile data is only relevant to won avatar, but notes -// are for everybody -void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data) +// Profile data is only relevant to own avatar, but notes +// are for everybody (no onger an issue?) +void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data, std::function callback) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -299,10 +299,16 @@ void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLSD data) if (!status) { LL_WARNS("AvatarProperties") << "Failed to put agent information " << data << " for id " << agent_id << LL_ENDL; - return; + } + else + { + LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Data: " << data << " Result: " << httpResults << LL_ENDL; } - LL_DEBUGS("AvatarProperties") << "Agent id: " << agent_id << " Data: " << data << " Result: " << httpResults << LL_ENDL; + if (callback) + { + callback(status); + } } LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::string path_to_image, LLHandle *handle) @@ -447,6 +453,13 @@ void post_profile_image_coro(std::string cap_url, EProfileImageType type, std::s } } + if (type == PROFILE_IMAGE_SL && result.notNull()) + { + LLAvatarIconIDCache::getInstance()->add(gAgentID, result); + // Should trigger callbacks in icon controls + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID); + } + // Cleanup LLFile::remove(path_to_image); delete handle; @@ -1823,7 +1836,7 @@ void LLPanelProfileSecondLife::onShowInSearchCallback() LLSD data; data["allow_publish"] = mAllowPublish; LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), data)); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), data, nullptr)); } else { @@ -1838,7 +1851,7 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() if (!cap_url.empty()) { LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("sl_about_text", mDescriptionText))); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("sl_about_text", mDescriptionText), nullptr)); } else { @@ -1999,10 +2012,19 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id) std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP); if (!cap_url.empty()) { + std::function callback = [id](bool result) + { + if (result) + { + LLAvatarIconIDCache::getInstance()->add(gAgentID, id); + // Should trigger callbacks in icon controls + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID); + } + }; LLSD params; params["sl_image_id"] = id; LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params)); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params, callback)); mImageId = id; if (mImageId == LLUUID::null) @@ -2353,7 +2375,7 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id) LLSD params; params["fl_image_id"] = id; LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params)); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), params, nullptr)); mImageId = id; if (mImageId.notNull()) @@ -2397,7 +2419,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() if (!cap_url.empty()) { LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("fl_about_text", mCurrentDescription))); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("fl_about_text", mCurrentDescription), nullptr)); } else { @@ -2540,7 +2562,7 @@ void LLPanelProfileNotes::onSaveNotesChanges() if (!cap_url.empty()) { LLCoros::instance().launch("putAgentUserInfoCoro", - boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes))); + boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes), nullptr)); } else { -- cgit v1.2.3 From 24f9b1f6dae69a642f8446e9bba4c2586f076594 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Jul 2023 00:59:09 +0300 Subject: SL-20049 Don't show selection beam when attempting to drag avatar --- indra/newview/llvoavatarself.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 914376f5d1..b03d32d291 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -960,7 +960,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) } //-------------------------------------------------------------------- -// draw tractor beam when editing objects +// draw tractor (selection) beam when editing objects //-------------------------------------------------------------------- //virtual void LLVOAvatarSelf::idleUpdateTractorBeam() @@ -2821,12 +2821,14 @@ BOOL LLVOAvatarSelf::needsRenderBeam() LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing()); - if (LLToolGrab::getInstance()->getEditingObject() && - LLToolGrab::getInstance()->getEditingObject()->isAttachment()) - { - // don't render selection beam on hud objects - is_touching_or_grabbing = FALSE; - } + LLViewerObject* objp = LLToolGrab::getInstance()->getEditingObject(); + if (objp // might need to be "!objp ||" instead of "objp &&". + && (objp->isAttachment() || objp->isAvatar())) + { + // don't render grab tool's selection beam on hud objects, + // attachments or avatars + is_touching_or_grabbing = FALSE; + } return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection()); } -- cgit v1.2.3 From df880791b81c5d0ebe9b65011107e867ad042ac2 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 26 Jul 2023 17:53:45 +0200 Subject: SL-18619 Eyes not rendering in Shape floater thumbnails --- indra/newview/lldrawpoolavatar.cpp | 12 ++++++------ indra/newview/llvoavatar.cpp | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 4ffa903cca..3160f693b2 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -183,8 +183,8 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass) is_deferred_render = true; if (LLPipeline::sImpostorRender) - { //impostor pass does not have rigid or impostor rendering - pass += 2; + { //impostor pass does not have impostor rendering + ++pass; } switch (pass) @@ -210,7 +210,7 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass) if (LLPipeline::sImpostorRender) { - pass += 2; + ++pass; } switch (pass) @@ -431,7 +431,7 @@ void LLDrawPoolAvatar::render(S32 pass) LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; if (LLPipeline::sImpostorRender) { - renderAvatars(NULL, pass+2); + renderAvatars(NULL, ++pass); return; } @@ -446,7 +446,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass) if (LLPipeline::sImpostorRender) { //impostor render does not have impostors or rigid rendering - pass += 2; + ++pass; } switch (pass) @@ -474,7 +474,7 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass) if (LLPipeline::sImpostorRender) { - pass += 2; + ++pass; } switch (pass) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 305c489cc8..e77530ecbd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5230,11 +5230,6 @@ U32 LLVOAvatar::renderRigid() { return 0; } - - if (!mIsBuilt) - { - return 0; - } bool should_alpha_mask = shouldAlphaMask(); LLGLState test(GL_ALPHA_TEST, should_alpha_mask); -- cgit v1.2.3 From 2531144643bfb9208d829cfb8ff0d594b9e4aaee Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 27 Jul 2023 11:14:15 +0200 Subject: SL-18399 'DisableCameraConstraints' debug setting is not working on RC --- indra/newview/llagentcamera.cpp | 179 ++++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 88 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 77131efd75..382187cd37 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -100,6 +100,12 @@ const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f; const F32 OBJECT_EXTENTS_PADDING = 0.5f; +static bool isDisableCameraConstraints() +{ + static LLCachedControl sDisableCameraConstraints(gSavedSettings, "DisableCameraConstraints", false); + return sDisableCameraConstraints; +} + // The agent instance. LLAgentCamera gAgentCamera; @@ -565,9 +571,9 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) { BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) - if (!mFocusObject || mFocusObject->isDead() || + if (!mFocusObject || mFocusObject->isDead() || mFocusObject->isMesh() || - gSavedSettings.getBOOL("DisableCameraConstraints")) + isDisableCameraConstraints()) { obj_min_distance = 0.f; return TRUE; @@ -737,39 +743,44 @@ F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person) // already [0,1] return mHUDTargetZoom; } - else if (get_third_person || (mFocusOnAvatar && cameraThirdPerson())) + + if (isDisableCameraConstraints()) + { + return mCameraZoomFraction; + } + + if (get_third_person || (mFocusOnAvatar && cameraThirdPerson())) { return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f); } - else if (cameraCustomizeAvatar()) + + if (cameraCustomizeAvatar()) { F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); return clamp_rescale(distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM, 1.f, 0.f ); } - else - { - F32 min_zoom; - F32 max_zoom = getCameraMaxZoomDistance(); - F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); - if (mFocusObject.notNull()) + F32 min_zoom; + F32 max_zoom = getCameraMaxZoomDistance(); + + F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); + if (mFocusObject.notNull()) + { + if (mFocusObject->isAvatar()) { - if (mFocusObject->isAvatar()) - { - min_zoom = AVATAR_MIN_ZOOM; - } - else - { - min_zoom = OBJECT_MIN_ZOOM; - } + min_zoom = AVATAR_MIN_ZOOM; } else { - min_zoom = LAND_MIN_ZOOM; + min_zoom = OBJECT_MIN_ZOOM; } - - return clamp_rescale(distance, min_zoom, max_zoom, 1.f, 0.f); } + else + { + min_zoom = LAND_MIN_ZOOM; + } + + return clamp_rescale(distance, min_zoom, max_zoom, 1.f, 0.f); } void LLAgentCamera::setCameraZoomFraction(F32 fraction) @@ -782,6 +793,10 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction) { mHUDTargetZoom = fraction; } + else if (isDisableCameraConstraints()) + { + mCameraZoomFraction = fraction; + } else if (mFocusOnAvatar && cameraThirdPerson()) { mCameraZoomFraction = rescale(fraction, 0.f, 1.f, MAX_ZOOM_FRACTION, MIN_ZOOM_FRACTION); @@ -816,6 +831,7 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction) camera_offset_dir.normalize(); mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom); } + startCameraAnimation(); } @@ -920,49 +936,40 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction) return; } - - LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); - F32 min_zoom = LAND_MIN_ZOOM; + LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); F32 current_distance = (F32)camera_offset_unit.normalize(); F32 new_distance = current_distance * fraction; - // Don't move through focus point - if (mFocusObject) + // Unless camera is unlocked + if (!isDisableCameraConstraints()) { - LLVector3 camera_offset_dir((F32)camera_offset_unit.mdV[VX], (F32)camera_offset_unit.mdV[VY], (F32)camera_offset_unit.mdV[VZ]); + F32 min_zoom = LAND_MIN_ZOOM; - if (mFocusObject->isAvatar()) - { - calcCameraMinDistance(min_zoom); - } - else + // Don't move through focus point + if (mFocusObject) { - min_zoom = OBJECT_MIN_ZOOM; - } - } + LLVector3 camera_offset_dir((F32)camera_offset_unit.mdV[VX], (F32)camera_offset_unit.mdV[VY], (F32)camera_offset_unit.mdV[VZ]); - new_distance = llmax(new_distance, min_zoom); - - F32 max_distance = getCameraMaxZoomDistance(); + if (mFocusObject->isAvatar()) + { + calcCameraMinDistance(min_zoom); + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } + } - max_distance = llmin(max_distance, current_distance * 4.f); //Scaled max relative to current distance. MAINT-3154 + new_distance = llmax(new_distance, min_zoom); - if (new_distance > max_distance) - { - new_distance = max_distance; + F32 max_distance = getCameraMaxZoomDistance(); + max_distance = llmin(max_distance, current_distance * 4.f); //Scaled max relative to current distance. MAINT-3154 + new_distance = llmin(new_distance, max_distance); - /* - // Unless camera is unlocked - if (!LLViewerCamera::sDisableCameraConstraints) + if (cameraCustomizeAvatar()) { - return; + new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM); } - */ - } - - if(cameraCustomizeAvatar()) - { - new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); } mCameraFocusOffsetTarget = new_distance * camera_offset_unit; @@ -985,53 +992,52 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters) changeCameraToMouselook(FALSE); } - mCameraZoomFraction = llclamp(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION); + if (!isDisableCameraConstraints()) + { + mCameraZoomFraction = llclamp(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION); + } } else { LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); F32 current_distance = (F32)camera_offset_unit.normalize(); F32 new_distance = current_distance - meters; - F32 min_zoom = LAND_MIN_ZOOM; - - // Don't move through focus point - if (mFocusObject.notNull()) + + // Unless camera is unlocked + if (!isDisableCameraConstraints()) { - if (mFocusObject->isAvatar()) - { - min_zoom = AVATAR_MIN_ZOOM; - } - else + F32 min_zoom = LAND_MIN_ZOOM; + + // Don't move through focus point + if (mFocusObject.notNull()) { - min_zoom = OBJECT_MIN_ZOOM; + if (mFocusObject->isAvatar()) + { + min_zoom = AVATAR_MIN_ZOOM; + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } } - } - new_distance = llmax(new_distance, min_zoom); + new_distance = llmax(new_distance, min_zoom); - F32 max_distance = getCameraMaxZoomDistance(); + F32 max_distance = getCameraMaxZoomDistance(); + new_distance = llmin(new_distance, max_distance); - if (new_distance > max_distance) - { - // Unless camera is unlocked - if (!gSavedSettings.getBOOL("DisableCameraConstraints")) + if (CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode()) { - return; + new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM); } } - if( CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode() ) - { - new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); - } - // Compute new camera offset mCameraFocusOffsetTarget = new_distance * camera_offset_unit; cameraZoomIn(1.f); } } - //----------------------------------------------------------------------------- // cameraPanIn() //----------------------------------------------------------------------------- @@ -1823,7 +1829,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) local_camera_offset = gAgent.getFrameAgent().rotateToAbsolute( local_camera_offset ); } - if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !gAgentAvatarp->isSitting())) + if (!isDisableCameraConstraints() && !mCameraCollidePlane.isExactlyZero() && + (!isAgentAvatarValid() || !gAgentAvatarp->isSitting())) { LLVector3 plane_normal; plane_normal.setVec(mCameraCollidePlane.mV); @@ -1942,7 +1949,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) camera_position_global = focusPosGlobal + mCameraFocusOffset; } - if (!gSavedSettings.getBOOL("DisableCameraConstraints") && !gAgent.isGodlike()) + if (!isDisableCameraConstraints() && !gAgent.isGodlike()) { LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global); bool constrain = true; @@ -2106,17 +2113,13 @@ F32 LLAgentCamera::getCameraMinOffGround() { return 0.f; } - else + + if (isDisableCameraConstraints()) { - if (gSavedSettings.getBOOL("DisableCameraConstraints")) - { - return -1000.f; - } - else - { - return 0.5f; - } + return -1000.f; } + + return 0.5f; } -- cgit v1.2.3 From ef9cb58a9ea6e37f5ca8c61c258560b2ee72c8d8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 1 Aug 2023 01:07:51 +0300 Subject: SL-18623 LLAvatarRenderInfoAccountant coroutine crash For unknown reason allocations of these coroutines often crash on client machines. 1. Limit quantity of coros running in parallel by reducing retries and wait time 2. Print out more diagnostic info --- indra/newview/llavatarrenderinfoaccountant.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 293c9d60a1..a6c9a41fa4 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -79,8 +79,14 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + // Going to request each 15 seconds either way, so don't wait + // too long and don't repeat + httpOpts->setRetries(0); + httpOpts->setTimeout(SECS_BETWEEN_REGION_REQUEST); + + LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts); LLWorld *world_inst = LLWorld::getInstance(); if (!world_inst) @@ -190,6 +196,11 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + + // Going to request each 60+ seconds, timeout is 30s. + // Don't repeat too often, will be sending newer data soon + httpOpts->setRetries(1); LLWorld *world_inst = LLWorld::getInstance(); if (!world_inst) @@ -256,7 +267,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U regionp = NULL; world_inst = NULL; - LLSD result = httpAdapter->postAndSuspend(httpRequest, url, report); + LLSD result = httpAdapter->postAndSuspend(httpRequest, url, report, httpOpts); world_inst = LLWorld::getInstance(); if (!world_inst) -- cgit v1.2.3 From 8ed2fb94641393b391425987a108057753729d41 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 1 Aug 2023 00:53:23 +0200 Subject: SL-19528 Remove PERMISSION_DEBIT warning from experience that is Grid and Privileged --- indra/newview/llviewermessage.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e7456f77bb..ce29238667 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5815,6 +5815,22 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["OBJECTNAME"] = object_name; args["NAME"] = clean_owner_name; S32 known_questions = 0; + + // SL-19346, SL-19528 - No DEBIT warning for GRID & PRIVILEGED + if (experienceid.notNull()) + { + const LLSD& experience = LLExperienceCache::instance().get(experienceid); + if (!experience.isUndefined()) + { + S32 properties = experience[LLExperienceCache::PROPERTIES].asInteger(); + if ((properties | LLExperienceCache::PROPERTY_GRID) && + (properties | LLExperienceCache::PROPERTY_PRIVILEGED)) + { + questions ^= SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; + } + } + } + bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; // check the received permission flags against each permission BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS) -- cgit v1.2.3 From bbb1f32cfcb91d36a765770935a7b378d5a9d7f9 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 3 Aug 2023 22:35:00 +0300 Subject: SL-20121 Fixed the crash in LLViewerInput::getKeyBindingAsString() --- indra/newview/llviewerinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 3f8e6f57f6..aac0cba92e 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -1028,7 +1028,7 @@ bool LLViewerInput::modeFromString(const std::string& string, S32 *mode) } S32 val = atoi(string.c_str()); - if (val >= 0 || val < MODE_COUNT) + if (val >= 0 && val < MODE_COUNT) { *mode = val; return true; -- cgit v1.2.3 From 06989cb1451d18f137714a375856244c500ddf3c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 14 Aug 2023 23:25:40 +0200 Subject: SL-19528 Remove PERMISSION_DEBIT warning (revert recent change) --- indra/newview/llviewermessage.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ce29238667..e7456f77bb 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5815,22 +5815,6 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["OBJECTNAME"] = object_name; args["NAME"] = clean_owner_name; S32 known_questions = 0; - - // SL-19346, SL-19528 - No DEBIT warning for GRID & PRIVILEGED - if (experienceid.notNull()) - { - const LLSD& experience = LLExperienceCache::instance().get(experienceid); - if (!experience.isUndefined()) - { - S32 properties = experience[LLExperienceCache::PROPERTIES].asInteger(); - if ((properties | LLExperienceCache::PROPERTY_GRID) && - (properties | LLExperienceCache::PROPERTY_PRIVILEGED)) - { - questions ^= SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; - } - } - } - bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; // check the received permission flags against each permission BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS) -- cgit v1.2.3 From f40b85c4f495b9079991c41a26b76d397a6168ae Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 23 Aug 2023 19:21:30 +0300 Subject: SL-20184 Crash when opening Marketplace Listings Window Looks like a bit of code from Inventory Extensions viewer leaked into release. This was supposed to prevent 'folder does not exist' spam as Inventory Extensions does not create folders this way, instead it blocked folder creation. --- indra/newview/llinventorymodel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index b4727de77f..cd0ce88920 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -596,9 +596,7 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot( if(rv.isNull() && root_id.notNull() - && create_folder - && preferred_type != LLFolderType::FT_MARKETPLACE_LISTINGS - && preferred_type != LLFolderType::FT_OUTBOX) + && create_folder) { if (isInventoryUsable()) -- cgit v1.2.3 From 2d27a6ac31009fd5ad828b6d769393f1cbfd3694 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 24 Aug 2023 00:12:24 +0300 Subject: DRTVWR-587 Post-merge build fix --- indra/newview/llfloaterpreference.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e59c2ee2cd..47a78c049a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -264,7 +264,7 @@ public: } bool handle(const LLSD& params, const LLSD& query_map, - LLMediaCtrl* web) + const std::string& grid, LLMediaCtrl* web) { if (params.size() < 1) return false; -- cgit v1.2.3 From 3d2da2b2c09fc637c2eaccac1607e3480bede145 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 28 Aug 2023 21:48:32 +0300 Subject: SL-20214 Crash at LLControlAVBridge::updateSpatialExtents --- indra/newview/llvovolume.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4ddba872f1..269c5666cc 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5114,8 +5114,6 @@ void LLControlAVBridge::updateSpatialExtents() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE - LLControlAvatar* controlAvatar = getVObj()->getControlAvatar(); - LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0); bool rootWasDirty = root->isDirty(); @@ -5126,7 +5124,11 @@ void LLControlAVBridge::updateSpatialExtents() // disappear when root goes off-screen" // // Expand extents to include Control Avatar placed outside of the bounds - if (controlAvatar && (rootWasDirty || controlAvatar->mPlaying)) + LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL; + if (controlAvatar + && controlAvatar->mDrawable + && controlAvatar->mDrawable->getEntry() + && (rootWasDirty || controlAvatar->mPlaying)) { root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform()); } -- cgit v1.2.3 From 35c0f1a7697731ed481fe41807e3f04eb5ec5045 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Aug 2023 01:57:44 +0300 Subject: SL-20205 Clipping of label "Water" --- .../default/xui/en/panel_region_environment.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index edf1e1efd4..0b3639f779 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -259,7 +259,7 @@ follows="left|top" layout="topleft" height="24" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -271,7 +271,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt1" @@ -305,7 +305,7 @@ follows="left|top" layout="topleft" height="24" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -317,7 +317,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt2" @@ -351,7 +351,7 @@ follows="left|top" layout="topleft" height="25" - width="52" + width="53" left_delta="2" top_pad="1" halign="right" @@ -363,7 +363,7 @@ follows="left|top" enabled="false" top_delta="3" - left_pad="21" + left_pad="20" height="20" layout="topleft" name="edt_invname_alt3" @@ -460,7 +460,7 @@ follows="left|top" layout="topleft" height="12" - width="52" + width="53" left_delta="2" top_pad="2" halign="right" @@ -477,7 +477,7 @@ mouse_opaque="false" visible="true" top_delta="-3" - left_pad="2"/> + left_pad="1"/> + left_pad="1"/> Date: Tue, 5 Sep 2023 13:19:10 +0200 Subject: SL-20206 Underwater visuals problematic when camera is swung below Z=0 --- indra/newview/llagentcamera.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 098ff8fea9..6e8784b726 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1996,15 +1996,21 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) // Don't let camera go underground F32 camera_min_off_ground = getCameraMinOffGround(); - camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); - - if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground) + F32 minZ = llmax(F_ALMOST_ZERO, camera_land_height + camera_min_off_ground); + if (camera_position_global.mdV[VZ] < minZ) { - camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground; + camera_position_global.mdV[VZ] = minZ; isConstrained = TRUE; } + // Don't let camera go abovesky + F32 maxZ = LLWorld::getInstance()->getRegionMaxHeight() * 0.25 - F_ALMOST_ZERO; + if (camera_position_global.mdV[VZ] > maxZ) + { + camera_position_global.mdV[VZ] = maxZ; + isConstrained = TRUE; + } if (hit_limit) { -- cgit v1.2.3 From 1aa27d4d13602baaf568d6269f4842881a78bdbc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 7 Sep 2023 23:06:00 +0300 Subject: SL-20273 IM, Offer Teleport, Map and Pay SLurls from external browser were blocked --- indra/newview/llfloaterworldmap.cpp | 53 ++++++++++++++++++++++++----- indra/newview/llgroupactions.cpp | 3 +- indra/newview/llpanelprofile.cpp | 3 +- indra/newview/llpanelprofileclassifieds.cpp | 3 +- indra/newview/llpanelprofilepicks.cpp | 3 +- indra/newview/llviewerfloaterreg.cpp | 6 +++- indra/newview/llviewerinventory.cpp | 26 ++++++++++++-- 7 files changed, 81 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 8f3ec8af05..c8559fc9d3 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -121,10 +121,27 @@ static const F32 ZOOM_MAX = 128.f; class LLWorldMapHandler : public LLCommandHandler { public: - // requires trusted browser to trigger - LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_CLICK_ONLY ) { } - - bool handle(const LLSD& params, + LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) + { + } + + virtual bool canHandleUntrusted( + const LLSD& params, + const LLSD& query_map, + LLMediaCtrl* web, + const std::string& nav_type) + { + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) + { + // NAV_TYPE_EXTERNAL will be throttled + return true; + } + + return false; + } + + bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) @@ -160,12 +177,32 @@ LLWorldMapHandler gWorldMapHandler; class LLMapTrackAvatarHandler : public LLCommandHandler { public: - // requires trusted browser to trigger - LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_CLICK_ONLY) + LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_THROTTLE) { } - - bool handle(const LLSD& params, + + virtual bool canHandleUntrusted( + const LLSD& params, + const LLSD& query_map, + LLMediaCtrl* web, + const std::string& nav_type) + { + if (params.size() < 1) + { + return true; // don't block, will fail later + } + + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) + { + // NAV_TYPE_EXTERNAL will be throttled + return true; + } + + return false; + } + + bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 043316ccca..380e49c320 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -65,7 +65,8 @@ public: return true; // don't block, will fail later } - if (nav_type == NAV_TYPE_CLICKED) + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) { return true; } diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 0c2ec017b5..4b8d92c7fd 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -511,7 +511,8 @@ public: return true; // don't block, will fail later } - if (nav_type == NAV_TYPE_CLICKED) + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) { return true; } diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index dec6cfd83b..3fbaad4dee 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -93,7 +93,8 @@ public: return true; // don't block, will fail later } - if (nav_type == NAV_TYPE_CLICKED) + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) { return true; } diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 0535036cb0..ff3f654d0e 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -74,7 +74,8 @@ public: return true; // don't block, will fail later } - if (nav_type == NAV_TYPE_CLICKED) + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) { return true; } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0f2fe1e1cd..e7a799c754 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -192,7 +192,11 @@ public: std::string fl_name = params[0].asString(); - if (nav_type == NAV_TYPE_CLICKED) + // External browsers explicitly ask user about opening links + // so treat "external" same as "clicked" in this case, + // despite it being treated as untrusted. + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) { const std::list blacklist_clicked = { "camera_presets", diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 33d162ed29..2d33cf6a7f 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -231,9 +231,29 @@ LLLocalizedInventoryItemsDictionary::LLLocalizedInventoryItemsDictionary() class LLInventoryHandler : public LLCommandHandler { public: - // requires trusted browser to trigger - LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_CLICK_ONLY) { } - + LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_THROTTLE) { } + + virtual bool canHandleUntrusted( + const LLSD& params, + const LLSD& query_map, + LLMediaCtrl* web, + const std::string& nav_type) + { + if (params.size() < 1) + { + return true; // don't block, will fail later + } + + if (nav_type == NAV_TYPE_CLICKED + || nav_type == NAV_TYPE_EXTERNAL) + { + // NAV_TYPE_EXTERNAL will be throttled + return true; + } + + return false; + } + bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, -- cgit v1.2.3 From 51f904e4a7d7e5d04be09991f859bd1b26f0d7ae Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 25 Sep 2023 12:29:51 +0200 Subject: SL-20244 On-screen animesh characters that start pelvis offset animations disappear when root goes off-screen --- indra/newview/lldrawable.cpp | 13 ------------- indra/newview/llspatialpartition.cpp | 37 ++++++++++++++++++++++++++++++++++++ indra/newview/llspatialpartition.h | 5 ++++- indra/newview/llvovolume.cpp | 24 ----------------------- 4 files changed, 41 insertions(+), 38 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index bb4174d3b6..d8be4c3bd5 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -763,19 +763,6 @@ void LLDrawable::movePartition() if (part) { part->move(this, getSpatialGroup()); - - // SL-18251 "On-screen animesh characters using pelvis offset animations - // disappear when root goes off-screen" - // - // Update extents of the root node when Control Avatar changes it's bounds - if (mRenderType == LLPipeline::RENDER_TYPE_CONTROL_AV && isRoot()) - { - LLControlAvatar* controlAvatar = dynamic_cast(getVObj().get()); - if (controlAvatar && controlAvatar->mControlAVBridge) - { - ((LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0))->setState(LLViewerOctreeGroup::DIRTY); - } - } } } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 17c834326c..ae97ce604a 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -847,6 +847,43 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c assert_states_valid(this); } +//virtual +void LLSpatialGroup::rebound() +{ + if (!isDirty()) + return; + + super::rebound(); + + if (mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_CONTROL_AV) + { + llassert(mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_CONTROL_AV); + + LLSpatialBridge* bridge = getSpatialPartition()->asBridge(); + if (bridge && + bridge->mDrawable && + bridge->mDrawable->getVObj() && + bridge->mDrawable->getVObj()->isRoot()) + { + LLControlAvatar* controlAvatar = bridge->mDrawable->getVObj()->getControlAvatar(); + if (controlAvatar && + controlAvatar->mDrawable && + controlAvatar->mControlAVBridge) + { + llassert(controlAvatar->mControlAVBridge->mOctree); + + LLSpatialGroup* root = (LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0); + if (this == root) + { + const LLVector4a* addingExtents = controlAvatar->mDrawable->getSpatialExtents(); + const LLXformMatrix* currentTransform = bridge->mDrawable->getXform(); + expandExtents(addingExtents, *currentTransform); + } + } + } + } +} + void LLSpatialGroup::destroyGL(bool keep_occlusion) { setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY); diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index cdb591083c..b5ac867b3e 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -205,6 +205,7 @@ public: LL_ALIGN_PREFIX(64) class LLSpatialGroup : public LLOcclusionCullingGroup { + using super = LLOcclusionCullingGroup; friend class LLSpatialPartition; friend class LLOctreeStateCheck; public: @@ -322,6 +323,9 @@ public: virtual void handleDestruction(const TreeNode* node); virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child); + // LLViewerOctreeGroup + virtual void rebound(); + public: LL_ALIGN_16(LLVector4a mViewAngle); LL_ALIGN_16(LLVector4a mLastUpdateViewAngle); @@ -703,7 +707,6 @@ class LLControlAVBridge : public LLVolumeBridge using super = LLVolumeBridge; public: LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regionp); - virtual void updateSpatialExtents(); }; class LLHUDBridge : public LLVolumeBridge diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 269c5666cc..c7054102fd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5110,30 +5110,6 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV; } -void LLControlAVBridge::updateSpatialExtents() -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE - - LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0); - - bool rootWasDirty = root->isDirty(); - - super::updateSpatialExtents(); // root becomes non-dirty here - - // SL-18251 "On-screen animesh characters using pelvis offset animations - // disappear when root goes off-screen" - // - // Expand extents to include Control Avatar placed outside of the bounds - LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL; - if (controlAvatar - && controlAvatar->mDrawable - && controlAvatar->mDrawable->getEntry() - && (rootWasDirty || controlAvatar->mPlaying)) - { - root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform()); - } -} - bool can_batch_texture(LLFace* facep) { if (facep->getTextureEntry()->getBumpmap()) -- cgit v1.2.3 From aee8f570e14684e6143a18541ba0bc9a5060fa98 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 29 Sep 2023 21:27:37 +0300 Subject: SL-20368 Request outfits using 'links' instead of getting items one by one --- indra/newview/llappearancemgr.cpp | 32 ++++++++++++++--- indra/newview/llappearancemgr.h | 2 +- indra/newview/llinventoryobserver.cpp | 65 +++++++++++++++++------------------ 3 files changed, 60 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 8010b84c20..667ae999bb 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2776,9 +2776,33 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool else { selfStartPhase("wear_inventory_category_fetch"); - callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal, - &LLAppearanceMgr::instance(), - category->getUUID(), copy, append)); + if (AISAPI::isAvailable() && category->getPreferredType() == LLFolderType::FT_OUTFIT) + { + // for reliability just fetch it whole, linked items included + LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)category; + LLUUID cat_id = category->getUUID(); + cat->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE); + AISAPI::FetchCategoryLinks(cat_id, + [cat_id, copy, append](const LLUUID& id) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (cat) + { + cat->setFetching(LLViewerInventoryCategory::FETCH_NONE); + } + if (id.isNull()) + { + LL_WARNS() << "failed to fetch category, attempting to wear as is " << cat_id << LL_ENDL; + } + LLAppearanceMgr::instance().wearCategoryFinal(cat_id, copy, append); + }); + } + else + { + callAfterCategoryFetch(category->getUUID(), boost::bind(&LLAppearanceMgr::wearCategoryFinal, + &LLAppearanceMgr::instance(), + category->getUUID(), copy, append)); + } } } @@ -2787,7 +2811,7 @@ S32 LLAppearanceMgr::getActiveCopyOperations() const return LLCallAfterInventoryCopyMgr::getInstanceCount(); } -void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append) +void LLAppearanceMgr::wearCategoryFinal(const LLUUID& cat_id, bool copy_items, bool append) { LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 43839e47a6..da29ceee3a 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -58,7 +58,7 @@ public: void updateCOF(const LLUUID& category, bool append = false); void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append); - void wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append); + void wearCategoryFinal(const LLUUID& cat_id, bool copy_items, bool append); void wearOutfitByName(const std::string& name); void changeOutfit(bool proceed, const LLUUID& category, bool append); void replaceCurrentOutfit(const LLUUID& new_outfit); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 281a8bc789..b6c2e954a4 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -337,52 +337,49 @@ void LLInventoryFetchItemsObserver::startFetch() { for (requests_by_folders_t::value_type &folder : requests) { - if (folder.second.size() > MAX_INDIVIDUAL_ITEM_REQUESTS) + LLViewerInventoryCategory* cat = gInventory.getCategory(folder.first); + if (cat) { - // requesting one by one will take a while - // do whole folder - LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); - } - else - { - LLViewerInventoryCategory* cat = gInventory.getCategory(folder.first); - if (cat) + if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) { - if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) - { - // start fetching whole folder since it's not ready either way - cat->fetch(); - } - else if (cat->getViewerDescendentCount() <= folder.second.size() - || cat->getDescendentCount() <= folder.second.size()) - { - // Start fetching whole folder since we need all items - LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); + // start fetching whole folder since it's not ready either way + cat->fetch(); + } + else if (folder.second.size() > MAX_INDIVIDUAL_ITEM_REQUESTS) + { + // requesting one by one will take a while + // do whole folder + LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); + } + else if (cat->getViewerDescendentCount() <= folder.second.size() + || cat->getDescendentCount() <= folder.second.size()) + { + // Start fetching whole folder since we need all items + LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); - } - else - { - // get items one by one - for (LLUUID &item_id : folder.second) - { - LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id); - } - } } else { - // Isn't supposed to happen? We should have all folders - // and if item exists, folder is supposed to exist as well. - llassert(false); - LL_WARNS("Inventory") << "Missing folder: " << folder.first << " fetching items individually" << LL_ENDL; - // get items one by one - for (LLUUID &item_id : folder.second) + for (LLUUID& item_id : folder.second) { LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id); } } } + else + { + // Isn't supposed to happen? We should have all folders + // and if item exists, folder is supposed to exist as well. + llassert(false); + LL_WARNS("Inventory") << "Missing folder: " << folder.first << " fetching items individually" << LL_ENDL; + + // get items one by one + for (LLUUID& item_id : folder.second) + { + LLInventoryModelBackgroundFetch::getInstance()->scheduleItemFetch(item_id); + } + } } } else -- cgit v1.2.3 From 55ebcf3fd469d65d15b956b2e0996f0f2257b885 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 30 Sep 2023 00:56:21 +0300 Subject: SL-20347 Fix structure of localized panel_main_inventory --- .../skins/default/xui/da/panel_main_inventory.xml | 29 ++++++-------- .../skins/default/xui/de/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/en/panel_main_inventory.xml | 6 ++- .../skins/default/xui/es/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/fr/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/it/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/ja/panel_main_inventory.xml | 46 ++++++++++------------ .../skins/default/xui/pl/panel_main_inventory.xml | 29 ++++++-------- .../skins/default/xui/pt/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/ru/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/tr/panel_main_inventory.xml | 43 ++++++++++---------- .../skins/default/xui/zh/panel_main_inventory.xml | 43 ++++++++++---------- 12 files changed, 211 insertions(+), 243 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/panel_main_inventory.xml b/indra/newview/skins/default/xui/da/panel_main_inventory.xml index d6406939c1..37a17f4bd6 100644 --- a/indra/newview/skins/default/xui/da/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/da/panel_main_inventory.xml @@ -9,20 +9,17 @@ Genstande: - - - - - - - -