From 09540c8cd0c6a89eb392d59dab04487246189979 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 28 Sep 2017 17:10:38 +0300 Subject: SL-775 SL-11418 Texture cache purge stalls viewer --- indra/newview/lltexturecache.cpp | 94 +++++++++++++++++++++++++++++++++++++--- indra/newview/lltexturecache.h | 3 ++ 2 files changed, 92 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index e5af47ab6c..9969631843 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -53,6 +53,7 @@ const F32 TEXTURE_CACHE_PURGE_AMOUNT = .20f; // % amount to reduce the cache by const F32 TEXTURE_CACHE_LRU_SIZE = .10f; // % amount for LRU list (low overhead to regenerate) const S32 TEXTURE_FAST_CACHE_ENTRY_OVERHEAD = sizeof(S32) * 4; //w, h, c, level const S32 TEXTURE_FAST_CACHE_ENTRY_SIZE = 16 * 16 * 4 + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD; +const F32 TEXTURE_LAZY_PURGE_TIME_LIMIT = .005f; // 5ms class LLTextureCacheWorker : public LLWorkerClass { @@ -1669,6 +1670,90 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) LL_INFOS() << "The entire texture cache is cleared." << LL_ENDL ; } +void LLTextureCache::purgeTexturesLazy(F32 time_limit_sec) +{ + if (mReadOnly) + { + return; + } + + if (!mThreaded) + { + LLAppViewer::instance()->pauseMainloopTimeout(); + } + + // time_limit doesn't account for lock time + LLMutexLock lock(&mHeaderMutex); + + if (mPurgeEntryList.empty()) + { + // Read the entries list and form list of textures to purge + std::vector entries; + U32 num_entries = openAndReadEntries(entries); + if (!num_entries) + { + return; // nothing to purge + } + + // Use mTexturesSizeMap to collect UUIDs of textures with bodies + typedef std::set > time_idx_set_t; + std::set > time_idx_set; + for (size_map_t::iterator iter1 = mTexturesSizeMap.begin(); + iter1 != mTexturesSizeMap.end(); ++iter1) + { + if (iter1->second > 0) + { + id_map_t::iterator iter2 = mHeaderIDMap.find(iter1->first); + if (iter2 != mHeaderIDMap.end()) + { + S32 idx = iter2->second; + time_idx_set.insert(std::make_pair(entries[idx].mTime, idx)); + } + else + { + LL_ERRS("TextureCache") << "mTexturesSizeMap / mHeaderIDMap corrupted." << LL_ENDL; + } + } + } + + S64 cache_size = mTexturesSizeTotal; + S64 purged_cache_size = (sCacheMaxTexturesSize * (S64)((1.f - TEXTURE_CACHE_PURGE_AMOUNT) * 100)) / 100; + for (time_idx_set_t::iterator iter = time_idx_set.begin(); + iter != time_idx_set.end(); ++iter) + { + S32 idx = iter->second; + if (cache_size >= purged_cache_size) + { + cache_size -= entries[idx].mBodySize; + mPurgeEntryList.push_back(std::pair(idx, entries[idx])); + } + else + { + break; + } + } + LL_DEBUGS("TextureCache") << "Formed Purge list of " << mPurgeEntryList.size() << " entries" << LL_ENDL; + } + else + { + // Remove collected entried + LLTimer timer; + while (!mPurgeEntryList.empty() && timer.getElapsedTimeF32() < time_limit_sec) + { + S32 idx = mPurgeEntryList.back().first; + Entry entry = mPurgeEntryList.back().second; + mPurgeEntryList.pop_back(); + // make sure record is still valid + id_map_t::iterator iter_header = mHeaderIDMap.find(entry.mID); + if (iter_header != mHeaderIDMap.end() && iter_header->second == idx) + { + removeEntry(idx, entry, getTextureFileName(entry.mID)); + writeEntryToHeaderImmediately(idx, entry); + } + } + } +} + void LLTextureCache::purgeTextures(bool validate) { if (mReadOnly) @@ -1928,11 +2013,10 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio } if (mDoPurge) { - // NOTE: This may cause an occasional hiccup, - // but it really needs to be done on the control thread - // (i.e. here) - purgeTextures(false); - mDoPurge = FALSE; + // NOTE: Needs to be done on the control thread + // (i.e. here) + purgeTexturesLazy(TEXTURE_LAZY_PURGE_TIME_LIMIT); + mDoPurge = !mPurgeEntryList.empty(); } LLMutexLock lock(&mWorkersMutex); LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 81ea7aeee2..9f68aa9039 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -155,6 +155,7 @@ private: void readHeaderCache(); void clearCorruptedCache(); void purgeAllTextures(bool purge_directories); + void purgeTexturesLazy(F32 time_limit_sec); void purgeTextures(bool validate); LLAPRFile* openHeaderEntriesFile(bool readonly, S32 offset); void closeHeaderEntriesFile(); @@ -225,6 +226,8 @@ private: typedef std::map idx_entry_map_t; idx_entry_map_t mUpdatedEntryMap; + typedef std::vector> idx_entry_vector_t; + idx_entry_vector_t mPurgeEntryList; // Statics static F32 sHeaderCacheVersion; -- cgit v1.2.3 From 7dbadf4c8bc7400ac4108217eccb0fcc6c164f93 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 25 Jun 2019 03:32:23 +0300 Subject: Mac buildfix --- indra/newview/lltexturecache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 9969631843..cf1ee04644 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1747,7 +1747,8 @@ void LLTextureCache::purgeTexturesLazy(F32 time_limit_sec) id_map_t::iterator iter_header = mHeaderIDMap.find(entry.mID); if (iter_header != mHeaderIDMap.end() && iter_header->second == idx) { - removeEntry(idx, entry, getTextureFileName(entry.mID)); + std::string tex_filename = getTextureFileName(entry.mID); + removeEntry(idx, entry, tex_filename); writeEntryToHeaderImmediately(idx, entry); } } -- cgit v1.2.3 From 5e9b7b82a8e303c2480e07c993698020b770defe Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 24 Jun 2019 21:24:01 +0300 Subject: SL-11473 Block calculate button until model fully loads --- indra/newview/llfloatermodelpreview.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index cb58cfdd0a..7705c1a76f 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3014,6 +3014,15 @@ void LLModelPreview::updateStatusMessages() { mFMP->childDisable("ok_btn"); } + + if (mModelNoErrors && mLodsWithParsingError.empty()) + { + mFMP->childEnable("calculate_btn"); + } + else + { + mFMP->childDisable("calculate_btn"); + } //add up physics triangles etc S32 phys_tris = 0; -- cgit v1.2.3 From 185fe0f77b4113613c0980fb49fe1819e3c61976 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 25 Jun 2019 14:48:04 +0300 Subject: SL-11418 Mac build fix --- indra/newview/lltexturecache.cpp | 2 +- indra/newview/lltexturecache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index cf1ee04644..f3bb574191 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -53,7 +53,7 @@ const F32 TEXTURE_CACHE_PURGE_AMOUNT = .20f; // % amount to reduce the cache by const F32 TEXTURE_CACHE_LRU_SIZE = .10f; // % amount for LRU list (low overhead to regenerate) const S32 TEXTURE_FAST_CACHE_ENTRY_OVERHEAD = sizeof(S32) * 4; //w, h, c, level const S32 TEXTURE_FAST_CACHE_ENTRY_SIZE = 16 * 16 * 4 + TEXTURE_FAST_CACHE_ENTRY_OVERHEAD; -const F32 TEXTURE_LAZY_PURGE_TIME_LIMIT = .005f; // 5ms +const F32 TEXTURE_LAZY_PURGE_TIME_LIMIT = .004f; // 4ms. Would be better to autoadjust, but there is a major cache rework in progress. class LLTextureCacheWorker : public LLWorkerClass { diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 9f68aa9039..da59290930 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -226,7 +226,7 @@ private: typedef std::map idx_entry_map_t; idx_entry_map_t mUpdatedEntryMap; - typedef std::vector> idx_entry_vector_t; + typedef std::vector > idx_entry_vector_t; idx_entry_vector_t mPurgeEntryList; // Statics -- cgit v1.2.3 From 07a1be20c1d0db001e154569f3bfb45e23dca1b8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 25 Jun 2019 19:28:08 +0300 Subject: SL-11454 Discarding should accept items to trash --- indra/newview/llviewermessage.cpp | 88 +++++++++++++-------------------------- 1 file changed, 29 insertions(+), 59 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6e5c77e4a9..2061d93c80 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1944,7 +1944,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const msg->addU32Fast(_PREHASH_ParentEstateID, 0); msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); - LLInventoryObserver* opener = NULL; std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. @@ -1992,22 +1991,14 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const } bool is_do_not_disturb = gAgent.isDoNotDisturb(); - + LLUUID destination; + + // If user accepted, accept to proper folder, if user discarded, accept to trash. switch(button) { case IOR_ACCEPT: - // ACCEPT. The math for the dialog works, because the accept - // for inventory_offered, task_inventory_offer or - // group_notice_inventory is 1 greater than the offer integer value. - // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, - // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), - sizeof(mFolderID.mData)); - // send the message - msg->sendReliable(mHost); - - //don't spam them if they are getting flooded + destination = mFolderID; + //don't spam user if flooded if (check_offer_throttle(mFromName, true)) { log_message = "" + chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); @@ -2015,54 +2006,13 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args); } - - // we will want to open this item when it comes back. - LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << mTransactionID - << LL_ENDL; - switch (mIM) - { - case IM_TASK_INVENTORY_OFFERED: - case IM_GROUP_NOTICE: - case IM_GROUP_NOTICE_REQUESTED: - { - // This is an offer from a task or group. - // We don't use a new instance of an opener - // We instead use the singular observer gOpenTaskOffer - // Since it already exists, we don't need to actually do anything - } - break; - default: - LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; - break; - } // end switch (mIM) break; - case IOR_MUTE: // MUTE falls through to decline case IOR_DECLINE: - // DECLINE. The math for the dialog works, because the decline - // for inventory_offered, task_inventory_offer or - // group_notice_inventory is 2 greater than the offer integer value. - // Generates IM_INVENTORY_DECLINED, IM_TASK_INVENTORY_DECLINED, - // or IM_GROUP_NOTICE_INVENTORY_DECLINED default: // close button probably (or any of the fall-throughs from above) - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 2)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); - // send the message - msg->sendReliable(mHost); - - if (gSavedSettings.getBOOL("LogInventoryDecline")) - { - LLStringUtil::format_map_t log_message_args; - log_message_args["DESC"] = mDesc; - log_message_args["NAME"] = mFromName; - log_message = LLTrans::getString("InvOfferDecline", log_message_args); - - LLSD args; - args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessageTip", args); - } + destination = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); if (is_do_not_disturb && (!mFromGroup && !mFromObject)) { @@ -2070,10 +2020,30 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const } break; } - - if(opener) + + // ACCEPT. The math for the dialog works, because the accept + // for inventory_offered, task_inventory_offer or + // group_notice_inventory is 1 greater than the offer integer value. + // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, + // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED + // Decline for inventory_offered, task_inventory_offer or + // group_notice_inventory is 2 greater than the offer integer value. + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination.mData), sizeof(destination.mData)); + // send the message + msg->sendReliable(mHost); + + // Purely for logging purposes. + switch (mIM) { - gInventory.addObserver(opener); + case IM_INVENTORY_OFFERED: + case IM_GROUP_NOTICE: + case IM_TASK_INVENTORY_OFFERED: + case IM_GROUP_NOTICE_REQUESTED: //No idea why we check for this one + break; + default: + LL_WARNS("Messaging") << "inventory_task_offer_callback: unknown offer type" << LL_ENDL; + break; } if(!mPersist) -- cgit v1.2.3 From ca067076c18b961ab68a0f1bb88ff252850181dd Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 26 Jun 2019 15:22:12 +0300 Subject: SL-11489 Add new "preexisting_tport" message to viewer --- indra/newview/skins/default/xui/en/notifications.xml | 7 +++++++ indra/newview/skins/default/xui/en/teleport_strings.xml | 3 +++ 2 files changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f72767cceb..72efb4921a 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2477,6 +2477,13 @@ Sorry, but the system was unable to complete your teleport request in a timely f type="alertmodal"> fail Sorry, but the system was unable to complete your region crossing in a timely fashion. Please try again in a few minutes. + + + fail +Sorry, but the system was unable to start your teleport. Please try again in a few minutes. Sorry, but the system was unable to complete your region crossing in a timely fashion. Please try again in a few minutes. + + Sorry, but the system was unable to start your teleport. Please try again in a few minutes. + Unable to find teleport destination. The destination may be temporarily unavailable or no longer exists. Please try again in a few minutes. -- cgit v1.2.3 From d392b97aa71ca06589bb1bc850c19c6855f3fa79 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 26 Jun 2019 17:00:43 +0300 Subject: SL-11454 Dismissing group notice should move attachment to trash --- indra/newview/llimprocessing.cpp | 2 +- indra/newview/llviewermessage.cpp | 116 +++++++++++++++++++++----------------- indra/newview/llviewermessage.h | 3 +- 3 files changed, 66 insertions(+), 55 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index d59c301210..236addac6d 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -715,7 +715,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, { info = new LLOfferInfo(); - info->mIM = IM_GROUP_NOTICE; + info->mIM = dialog; info->mFromID = from_id; info->mFromGroup = from_group; info->mTransactionID = session_id; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2061d93c80..55be6bdb7d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1671,8 +1671,20 @@ void LLOfferInfo::fromLLSD(const LLSD& params) *this = params; } -void LLOfferInfo::send_auto_receive_response(void) -{ +void LLOfferInfo::sendReceiveResponse(const LLUUID &destination_folder_id) +{ + if(IM_INVENTORY_OFFERED == mIM) + { + // add buddy to recent people list + LLRecentPeople::instance().add(mFromID); + } + + if (mTransactionID.isNull()) + { + // Not provided, message won't work + return; + } + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ImprovedInstantMessage); msg->nextBlockFast(_PREHASH_AgentData); @@ -1691,23 +1703,34 @@ void LLOfferInfo::send_auto_receive_response(void) msg->addU32Fast(_PREHASH_ParentEstateID, 0); msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); - - // Auto Receive Message. The math for the dialog works, because the accept + + // ACCEPT. The math for the dialog works, because the accept // for inventory_offered, task_inventory_offer or // group_notice_inventory is 1 greater than the offer integer value. // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED + // Decline for inventory_offered, task_inventory_offer or + // group_notice_inventory is 2 greater than the offer integer value. + + EInstantMessage im = mIM; + if (mIM == IM_GROUP_NOTICE_REQUESTED) + { + // Request has no responder dialogs + im = IM_GROUP_NOTICE; + } + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), - sizeof(mFolderID.mData)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData), + sizeof(destination_folder_id.mData)); // send the message msg->sendReliable(mHost); - - if(IM_INVENTORY_OFFERED == mIM) - { - // add buddy to recent people list - LLRecentPeople::instance().add(mFromID); - } + + // transaction id is usable only once + // Note: a bit of a hack, clicking group notice attachment will not close notice + // so we reset no longer usable transaction id to know not to send message again + // Once capabilities for responses will be implemented LLOfferInfo will have to + // remember that it already responded in another way and ignore IOR_DECLINE + mTransactionID.setNull(); } void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response) @@ -1799,11 +1822,11 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& } break; case IM_GROUP_NOTICE: + case IM_GROUP_NOTICE_REQUESTED: opener = new LLOpenTaskGroupOffer; - send_auto_receive_response(); + sendReceiveResponse(mFolderID); break; case IM_TASK_INVENTORY_OFFERED: - case IM_GROUP_NOTICE_REQUESTED: // This is an offer from a task or group. // We don't use a new instance of an opener // We instead use the singular observer gOpenTaskOffer @@ -1857,15 +1880,24 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // Disabled logging to old chat floater to fix crash in group notices - EXT-4149 // LLFloaterChat::addChatHistory(chat); - LLDiscardAgentOffer* discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); - discard_agent_offer->startFetch(); - if ((catp && gInventory.isCategoryComplete(mObjectID)) || (itemp && itemp->isFinished())) + if (mObjectID.notNull()) //make sure we can discard { - discard_agent_offer->done(); + LLDiscardAgentOffer* discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); + discard_agent_offer->startFetch(); + if ((catp && gInventory.isCategoryComplete(mObjectID)) || (itemp && itemp->isFinished())) + { + discard_agent_offer->done(); + } + else + { + opener = discard_agent_offer; + } } - else + else if (mIM == IM_GROUP_NOTICE) { - opener = discard_agent_offer; + // group notice needs to request object to trash so that user will see it later + LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + sendReceiveResponse(trash); } if (modified_form != NULL) @@ -1878,9 +1910,14 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& } default: // close button probably - // The item has already been fetched and is in your inventory, we simply won't highlight it + // In case of agent offers item has already been fetched and is in your inventory, we simply won't highlight it // OR delete it if the notification gets killed, since we don't want that to be a vector for // losing inventory offers. + if (mIM == IM_GROUP_NOTICE) + { + LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + sendReceiveResponse(trash); + } break; } @@ -1925,28 +1962,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const } } } - - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_ImprovedInstantMessage); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); - msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); - msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); - msg->addUUIDFast(_PREHASH_ID, mTransactionID); - msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary - std::string name; - LLAgentUI::buildFullname(name); - msg->addStringFast(_PREHASH_FromAgentName, name); - msg->addStringFast(_PREHASH_Message, ""); - msg->addU32Fast(_PREHASH_ParentEstateID, 0); - msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); - msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); - + std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. + if (mFromObject == TRUE) { if (mFromGroup) @@ -2016,22 +2035,13 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const if (is_do_not_disturb && (!mFromGroup && !mFromObject)) { + LLMessageSystem* msg = gMessageSystem; send_do_not_disturb_message(msg,mFromID); } break; } - // ACCEPT. The math for the dialog works, because the accept - // for inventory_offered, task_inventory_offer or - // group_notice_inventory is 1 greater than the offer integer value. - // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, - // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED - // Decline for inventory_offered, task_inventory_offer or - // group_notice_inventory is 2 greater than the offer integer value. - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination.mData), sizeof(destination.mData)); - // send the message - msg->sendReliable(mHost); + sendReceiveResponse(destination); // Purely for logging purposes. switch (mIM) @@ -2039,7 +2049,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const case IM_INVENTORY_OFFERED: case IM_GROUP_NOTICE: case IM_TASK_INVENTORY_OFFERED: - case IM_GROUP_NOTICE_REQUESTED: //No idea why we check for this one + case IM_GROUP_NOTICE_REQUESTED: break; default: LL_WARNS("Messaging") << "inventory_task_offer_callback: unknown offer type" << LL_ENDL; diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 2d6636f30d..d02ef46348 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -254,7 +254,7 @@ public: /*virtual*/ void fromLLSD(const LLSD& params); /*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response); - void send_auto_receive_response(void); + void send_auto_receive_response() { sendReceiveResponse(mFolderID); } // TODO - replace all references with handleRespond() bool inventory_offer_callback(const LLSD& notification, const LLSD& response); @@ -264,6 +264,7 @@ private: void initRespondFunctionMap(); std::string getSanitizedDescription(); + void sendReceiveResponse(const LLUUID &destination_folder_id); typedef boost::function respond_function_t; typedef std::map respond_function_map_t; -- cgit v1.2.3 From 4401869685f0845f4813f10c9e1949692d79d86f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 26 Jun 2019 22:09:51 +0300 Subject: SL-11454 Missed variable --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 55be6bdb7d..a68e941c0c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1719,7 +1719,7 @@ void LLOfferInfo::sendReceiveResponse(const LLUUID &destination_folder_id) im = IM_GROUP_NOTICE; } - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); + msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1)); msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData), sizeof(destination_folder_id.mData)); // send the message -- cgit v1.2.3 From 22c58368315de9ed3112339e633d61d3427b80ba Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 27 Jun 2019 13:48:14 +0300 Subject: SL-11492 Create a keyboard shortcut for Me->Appearance --- indra/newview/skins/default/xui/en/menu_viewer.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 87a0bb7d70..e52ef2a877 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -17,9 +17,11 @@ + name="ChangeOutfit" + shortcut="control|O"> + function="Floater.ToggleOrBringToFront" + parameter="appearance" /> -- cgit v1.2.3 From a05046f4c069b4bfee2dd57b558008621d36e742 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 27 Jun 2019 17:52:11 +0300 Subject: SL-11454 Exception for muted objects, such offers should get declined --- indra/newview/llimprocessing.cpp | 18 ++++++++----- indra/newview/llviewermessage.cpp | 56 ++++++++++++++++++++------------------- indra/newview/llviewermessage.h | 4 +-- 3 files changed, 43 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 236addac6d..5b9ef7e60a 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -896,12 +896,18 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, if (is_muted) { // Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331) - LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); - fetch_item->startFetch(); - delete fetch_item; - - // Same as closing window - info->forceResponse(IOR_DECLINE); + if (IM_INVENTORY_OFFERED == dialog) + { + LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); + fetch_item->startFetch(); + delete fetch_item; + // Same as closing window + info->forceResponse(IOR_DECLINE); + } + else + { + info->forceResponse(IOR_MUTE); + } } // old logic: busy mode must not affect interaction with objects (STORM-565) // new logic: inventory offers from in-world objects should be auto-declined (CHUI-519) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a68e941c0c..3fda51f856 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1671,7 +1671,7 @@ void LLOfferInfo::fromLLSD(const LLSD& params) *this = params; } -void LLOfferInfo::sendReceiveResponse(const LLUUID &destination_folder_id) +void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_folder_id) { if(IM_INVENTORY_OFFERED == mIM) { @@ -1719,9 +1719,17 @@ void LLOfferInfo::sendReceiveResponse(const LLUUID &destination_folder_id) im = IM_GROUP_NOTICE; } - msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData), - sizeof(destination_folder_id.mData)); + if (accept) + { + msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData), + sizeof(destination_folder_id.mData)); + } + else + { + msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 2)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); + } // send the message msg->sendReliable(mHost); @@ -1790,7 +1798,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // TODO: when task inventory offers can also be handled the new way, migrate the code that sets these strings here: from_string = chatHistory_string = mFromName; - + + // accept goes to proper folder, decline gets accepted to trash, muted gets declined + bool accept_to_trash = true; + LLNotificationFormPtr modified_form(notification_ptr ? new LLNotificationForm(*notification_ptr->getForm()) : new LLNotificationForm()); switch(button) @@ -1824,7 +1835,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& case IM_GROUP_NOTICE: case IM_GROUP_NOTICE_REQUESTED: opener = new LLOpenTaskGroupOffer; - sendReceiveResponse(mFolderID); + sendReceiveResponse(true, mFolderID); break; case IM_TASK_INVENTORY_OFFERED: // This is an offer from a task or group. @@ -1861,6 +1872,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { modified_form->setElementEnabled("Mute", false); } + accept_to_trash = false; // for notices, but IOR_MUTE normally doesn't happen for notices // MUTE falls through to decline case IOR_DECLINE: { @@ -1874,6 +1886,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 { chat.mMuted = TRUE; + accept_to_trash = false; // will send decline message } // *NOTE dzaporozhan @@ -1896,8 +1909,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& else if (mIM == IM_GROUP_NOTICE) { // group notice needs to request object to trash so that user will see it later + // Note: muted agent offers go to trash, not sure if we should do same for notices LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - sendReceiveResponse(trash); + sendReceiveResponse(accept_to_trash, trash); } if (modified_form != NULL) @@ -1916,7 +1930,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (mIM == IM_GROUP_NOTICE) { LLUUID trash = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - sendReceiveResponse(trash); + sendReceiveResponse(true, trash); } break; } @@ -2009,8 +2023,8 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const from_string = chatHistory_string = mFromName; } - bool is_do_not_disturb = gAgent.isDoNotDisturb(); LLUUID destination; + bool accept = true; // If user accepted, accept to proper folder, if user discarded, accept to trash. switch(button) @@ -2028,33 +2042,21 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const break; case IOR_MUTE: // MUTE falls through to decline + accept = false; case IOR_DECLINE: default: // close button probably (or any of the fall-throughs from above) destination = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - - if (is_do_not_disturb && (!mFromGroup && !mFromObject)) + if (accept && LLMuteList::getInstance()->isMuted(mFromID, mFromName)) { - LLMessageSystem* msg = gMessageSystem; - send_do_not_disturb_message(msg,mFromID); + // Note: muted offers are usually declined automatically, + // but user can mute object after receiving message + accept = false; } break; } - sendReceiveResponse(destination); - - // Purely for logging purposes. - switch (mIM) - { - case IM_INVENTORY_OFFERED: - case IM_GROUP_NOTICE: - case IM_TASK_INVENTORY_OFFERED: - case IM_GROUP_NOTICE_REQUESTED: - break; - default: - LL_WARNS("Messaging") << "inventory_task_offer_callback: unknown offer type" << LL_ENDL; - break; - } + sendReceiveResponse(accept, destination); if(!mPersist) { diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index d02ef46348..78829a6a56 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -254,7 +254,7 @@ public: /*virtual*/ void fromLLSD(const LLSD& params); /*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response); - void send_auto_receive_response() { sendReceiveResponse(mFolderID); } + void send_auto_receive_response() { sendReceiveResponse(true, mFolderID); } // TODO - replace all references with handleRespond() bool inventory_offer_callback(const LLSD& notification, const LLSD& response); @@ -264,7 +264,7 @@ private: void initRespondFunctionMap(); std::string getSanitizedDescription(); - void sendReceiveResponse(const LLUUID &destination_folder_id); + void sendReceiveResponse(bool accept, const LLUUID &destination_folder_id); typedef boost::function respond_function_t; typedef std::map respond_function_map_t; -- cgit v1.2.3 From 8c54233ef9d83ea7f920084f94707d64653e33f7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 1 Jul 2019 21:24:52 +0300 Subject: SL-1566 Fixed watchdog killer event line missing from crash log --- indra/newview/llappviewer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c8dcbb87c1..12a459b2b8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2145,6 +2145,9 @@ void watchdog_llerrs_callback(const std::string &error_string) { gLLErrorActivated = true; + gDebugInfo["FatalMessage"] = error_string; + LLAppViewer::instance()->writeDebugInfo(); + #ifdef LL_WINDOWS RaiseException(0,0,0,0); #else -- cgit v1.2.3 From dbb613a2d88fda507b7e3ac46e938f4258a70ec8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 2 Jul 2019 16:52:21 +0300 Subject: SL-11456 Allow scaling of HUD attachments --- indra/newview/app_settings/settings.xml | 11 +++++++++ indra/newview/llagentcamera.cpp | 6 +++++ indra/newview/llagentcamera.h | 1 + indra/newview/llselectmgr.cpp | 10 +++++---- indra/newview/llviewerdisplay.cpp | 2 +- .../default/xui/en/panel_preferences_advanced.xml | 26 ++++++++++++++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 49601ae98f..472a76a7e2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13133,6 +13133,17 @@ Value 3 + HUDScaleFactor + + Comment + Scale of HUD attachments + Persist + 1 + Type + F32 + Value + 1.0 + UIScaleFactor Comment diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 92a3026096..fd8797481d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -807,6 +807,12 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction) startCameraAnimation(); } +F32 LLAgentCamera::getAgentHUDTargetZoom() +{ + static LLCachedControl hud_scale_factor(gSavedSettings, "HUDScaleFactor"); + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + return (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) ? hud_scale_factor*gAgentCamera.mHUDTargetZoom : hud_scale_factor; +} //----------------------------------------------------------------------------- // cameraOrbitAround() diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index d087de1e2f..a4bc8434b0 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -266,6 +266,7 @@ public: F32 getCameraZoomFraction(); // Get camera zoom as fraction of minimum and maximum zoom void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom F32 calcCameraFOVZoomFactor(); + F32 getAgentHUDTargetZoom(); //-------------------------------------------------------------------- // Pan diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index d2db6f6649..3df6f25917 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6607,8 +6607,7 @@ void LLSelectMgr::updateSelectionCenter() if (mSelectedObjects->mSelectType != SELECT_TYPE_HUD && isAgentAvatarValid()) { // reset hud ZOOM - gAgentCamera.mHUDTargetZoom = 1.f; - gAgentCamera.mHUDCurZoom = 1.f; + resetAgentHUDZoom(); } mShowSelection = FALSE; @@ -6981,8 +6980,11 @@ BOOL LLSelectMgr::setForceSelection(BOOL force) void LLSelectMgr::resetAgentHUDZoom() { - gAgentCamera.mHUDTargetZoom = 1.f; - gAgentCamera.mHUDCurZoom = 1.f; + if (gAgentCamera.mHUDTargetZoom != 1) + { + gAgentCamera.mHUDTargetZoom = 1.f; + gAgentCamera.mHUDCurZoom = 1.f; + } } void LLSelectMgr::getAgentHUDZoom(F32 &target_zoom, F32 ¤t_zoom) const diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 5924dbc260..a3d946c4d4 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1087,7 +1087,7 @@ void render_hud_attachments() // clamp target zoom level to reasonable values gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f); // smoothly interpolate current zoom level - gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLSmoothInterpolation::getInterpolant(0.03f)); + gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.getAgentHUDTargetZoom(), LLSmoothInterpolation::getInterpolant(0.03f)); if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 4f0bb9d3b7..8296438d4c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -142,6 +142,32 @@ min_val="0.75" name="ui_scale_slider" top_pad="-14" + width="250" /> + + HUD Scale: + + Date: Wed, 3 Jul 2019 13:01:56 +0300 Subject: SL-11535 Autopilot should store selection for later use --- indra/newview/llselectmgr.cpp | 91 +++++++++++++++++++++++++++++++++++++----- indra/newview/llselectmgr.h | 19 +++++++++ indra/newview/llviewermenu.cpp | 10 ++--- 3 files changed, 104 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 3df6f25917..b726e841f8 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -152,6 +152,53 @@ struct LLDeRezInfo // Imports // +//----------------------------------------------------------------------------- +// ~LLSelectionCallbackData() +//----------------------------------------------------------------------------- + +LLSelectionCallbackData::LLSelectionCallbackData() +{ + LLSelectMgr *instance = LLSelectMgr::getInstance(); + LLObjectSelectionHandle selection = instance->getSelection(); + if (!selection->getNumNodes()) + { + return; + } + mSelectedObjects = new LLObjectSelection(); + + for (LLObjectSelection::iterator iter = selection->begin(); + iter != selection->end();) + { + LLObjectSelection::iterator curiter = iter++; + + LLSelectNode *nodep = *curiter; + LLViewerObject* objectp = nodep->getObject(); + + if (!objectp) + { + mSelectedObjects->mSelectType = SELECT_TYPE_WORLD; + } + else + { + LLSelectNode* new_nodep = new LLSelectNode(*nodep); + mSelectedObjects->addNode(new_nodep); + + if (objectp->isHUDAttachment()) + { + mSelectedObjects->mSelectType = SELECT_TYPE_HUD; + } + else if (objectp->isAttachment()) + { + mSelectedObjects->mSelectType = SELECT_TYPE_ATTACHMENT; + } + else + { + mSelectedObjects->mSelectType = SELECT_TYPE_WORLD; + } + } + } +} + // // Functions @@ -4472,9 +4519,19 @@ void LLSelectMgr::selectionSetObjectSaleInfo(const LLSaleInfo& sale_info) void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) { - LLViewerObject* attach_object = mSelectedObjects->getFirstRootObject(); + sendAttach(mSelectedObjects, attachment_point, replace); +} - if (!attach_object || !isAgentAvatarValid() || mSelectedObjects->mSelectType != SELECT_TYPE_WORLD) +void LLSelectMgr::sendAttach(LLObjectSelectionHandle selection_handle, U8 attachment_point, bool replace) +{ + if (selection_handle.isNull()) + { + return; + } + + LLViewerObject* attach_object = selection_handle->getFirstRootObject(); + + if (!attach_object || !isAgentAvatarValid() || selection_handle->mSelectType != SELECT_TYPE_WORLD) { return; } @@ -4492,6 +4549,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) } sendListToRegions( + selection_handle, "ObjectAttach", packAgentIDAndSessionAndAttachment, packObjectIDAndRotation, @@ -4503,6 +4561,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) // After "ObjectAttach" server will unsubscribe us from properties updates // so either deselect objects or resend selection after attach packet reaches server // In case of build_mode LLPanelObjectInventory::refresh() will deal with selection + // Still unsubscribe even in case selection_handle is not current selection deselectAll(); } } @@ -5044,7 +5103,17 @@ void LLSelectMgr::packPermissions(LLSelectNode* node, void *user_data) void LLSelectMgr::sendListToRegions(const std::string& message_name, void (*pack_header)(void *user_data), void (*pack_body)(LLSelectNode* node, void *user_data), - void (*log_func)(LLSelectNode* node, void *user_data), + void (*log_func)(LLSelectNode* node, void *user_data), + void *user_data, + ESendType send_type) +{ + sendListToRegions(mSelectedObjects, message_name, pack_header, pack_body, log_func, user_data, send_type); +} +void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, + const std::string& message_name, + void (*pack_header)(void *user_data), + void (*pack_body)(LLSelectNode* node, void *user_data), + void (*log_func)(LLSelectNode* node, void *user_data), void *user_data, ESendType send_type) { @@ -5070,7 +5139,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, return true; } } func; - getSelection()->applyToNodes(&func); + selected_handle->applyToNodes(&func); std::queue nodes_to_send; @@ -5113,25 +5182,25 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, { case SEND_ONLY_ROOTS: if(message_name == "ObjectBuy") - getSelection()->applyToRootNodes(&pushroots); + selected_handle->applyToRootNodes(&pushroots); else - getSelection()->applyToRootNodes(&pushall); + selected_handle->applyToRootNodes(&pushall); break; case SEND_INDIVIDUALS: - getSelection()->applyToNodes(&pushall); + selected_handle->applyToNodes(&pushall); break; case SEND_ROOTS_FIRST: // first roots... - getSelection()->applyToNodes(&pushroots); + selected_handle->applyToNodes(&pushroots); // then children... - getSelection()->applyToNodes(&pushnonroots); + selected_handle->applyToNodes(&pushnonroots); break; case SEND_CHILDREN_FIRST: // first children... - getSelection()->applyToNodes(&pushnonroots); + selected_handle->applyToNodes(&pushnonroots); // then roots... - getSelection()->applyToNodes(&pushroots); + selected_handle->applyToNodes(&pushroots); break; default: diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 3e8bfdb00e..3bed484b58 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -239,6 +239,7 @@ class LLObjectSelection : public LLRefCount { friend class LLSelectMgr; friend class LLSafeHandle; + friend class LLSelectionCallbackData; protected: ~LLObjectSelection(); @@ -396,6 +397,16 @@ extern template class LLSelectMgr* LLSingleton::getInstance() // For use with getFirstTest() struct LLSelectGetFirstTest; +// temporary storage, Ex: to attach objects after autopilot +class LLSelectionCallbackData +{ +public: + LLSelectionCallbackData(); + LLObjectSelectionHandle getSelection() { return mSelectedObjects; } +private: + LLObjectSelectionHandle mSelectedObjects; +}; + class LLSelectMgr : public LLEditMenuHandler, public LLSingleton { LLSINGLETON(LLSelectMgr); @@ -740,6 +751,7 @@ public: // canceled void sendBuy(const LLUUID& buyer_id, const LLUUID& category_id, const LLSaleInfo sale_info); void sendAttach(U8 attachment_point, bool replace); + void sendAttach(LLObjectSelectionHandle selection_handle, U8 attachment_point, bool replace); void sendDetach(); void sendDropAttachment(); void sendLink(); @@ -787,6 +799,13 @@ private: void (*log_func)(LLSelectNode* node, void *user_data), void *user_data, ESendType send_type); + void sendListToRegions( LLObjectSelectionHandle selected_handle, + const std::string& message_name, + void (*pack_header)(void *user_data), + void (*pack_body)(LLSelectNode* node, void *user_data), + void (*log_func)(LLSelectNode* node, void *user_data), + void *user_data, + ESendType send_type); static void packAgentID( void *); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 52b2c631fa..1566736f17 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6672,10 +6672,10 @@ private: static void onNearAttachObject(BOOL success, void *user_data); void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point); - - struct CallbackData + class CallbackData : public LLSelectionCallbackData { - CallbackData(LLViewerJointAttachment* point, bool replace) : mAttachmentPoint(point), mReplace(replace) {} + public: + CallbackData(LLViewerJointAttachment* point, bool replace) : LLSelectionCallbackData(), mAttachmentPoint(point), mReplace(replace) {} LLViewerJointAttachment* mAttachmentPoint; bool mReplace; @@ -6716,8 +6716,8 @@ void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data) // interpret 0 as "default location" attachment_id = 0; } - LLSelectMgr::getInstance()->sendAttach(attachment_id, cb_data->mReplace); - } + LLSelectMgr::getInstance()->sendAttach(cb_data->getSelection(), attachment_id, cb_data->mReplace); + } LLObjectAttachToAvatar::setObjectSelection(NULL); delete cb_data; -- cgit v1.2.3 From 378c54a11a3193e6cd040fde00af6de83f6ab769 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 5 Jul 2019 18:18:43 +0300 Subject: SL-11532 Fixed The object info icon is not shown when hovering the mouse over object --- indra/newview/lltoolpie.cpp | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 2a87bce134..47227f987d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -874,37 +874,9 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) static bool needs_tooltip(LLSelectNode* nodep) { - if (!nodep) + if (!nodep || !nodep->mValid) return false; - - LLViewerObject* object = nodep->getObject(); - LLViewerObject *parent = (LLViewerObject *)object->getParent(); - if (object->flagHandleTouch() - || (parent && parent->flagHandleTouch()) - || object->flagTakesMoney() - || (parent && parent->flagTakesMoney()) - || object->flagAllowInventoryAdd() - ) - { - return true; - } - - U8 click_action = final_click_action(object); - if (click_action != 0) - { - return true; - } - - if (nodep->mValid) - { - bool anyone_copy = anyone_copy_selection(nodep); - bool for_sale = for_sale_selection(nodep); - if (anyone_copy || for_sale) - { - return true; - } - } - return false; + return true; } -- cgit v1.2.3 From 126b138440efb2cf9371259a5f1622a6d0bd246f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 8 Jul 2019 21:08:17 +0300 Subject: SL-11472 Checkboxes continue to change their state after clicking is stopped in the "Item profile" menu --- indra/newview/llfloaterproperties.cpp | 2 +- indra/newview/llsidepaneliteminfo.cpp | 142 +++++++++++++++++++++++++--------- indra/newview/llsidepaneliteminfo.h | 15 +++- indra/newview/llsidepaneltaskinfo.cpp | 63 ++++++++------- indra/newview/llsidepaneltaskinfo.h | 1 + 5 files changed, 154 insertions(+), 69 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index fbb7432f71..64ad40f419 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -85,7 +85,7 @@ public: } virtual void changed(U32 mask); private: - LLFloaterProperties* mFloater; + LLFloaterProperties* mFloater; // Not a handle because LLFloaterProperties is managing LLPropertiesObserver }; void LLPropertiesObserver::changed(U32 mask) diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 2503e2a5e2..d508621b41 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -49,6 +49,29 @@ #include "llviewerregion.h" +class PropertiesChangedCallback : public LLInventoryCallback +{ +public: + PropertiesChangedCallback(LLHandle sidepanel_handle, LLUUID &item_id, S32 id) + : mHandle(sidepanel_handle), mItemId(item_id), mId(id) + {} + + void fire(const LLUUID &inv_item) + { + // inv_item can be null for some reason + LLSidepanelItemInfo* sidepanel = dynamic_cast(mHandle.get()); + if (sidepanel) + { + // sidepanel waits only for most recent update + sidepanel->onUpdateCallback(mItemId, mId); + } + } +private: + LLHandle mHandle; + LLUUID mItemId; + S32 mId; +}; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLItemPropertiesObserver // @@ -68,7 +91,7 @@ public: } virtual void changed(U32 mask); private: - LLSidepanelItemInfo* mFloater; + LLSidepanelItemInfo* mFloater; // Not a handle because LLSidepanelItemInfo is managing LLItemPropertiesObserver }; void LLItemPropertiesObserver::changed(U32 mask) @@ -115,7 +138,7 @@ public: S32 serial_num, void* user_data); private: - LLSidepanelItemInfo* mFloater; + LLSidepanelItemInfo* mFloater; // Not a handle because LLSidepanelItemInfo is managing LLObjectInventoryObserver }; /*virtual*/ @@ -138,6 +161,7 @@ LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p) : LLSidepanelInventorySubpanel(p) , mItemID(LLUUID::null) , mObjectInventoryObserver(NULL) + , mUpdatePendingId(-1) { mPropertiesObserver = new LLItemPropertiesObserver(this); } @@ -168,19 +192,19 @@ BOOL LLSidepanelItemInfo::postBuild() // owner permissions // Permissions debug text // group permissions - getChild("CheckShareWithGroup")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + getChild("CheckShareWithGroup")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this, _1)); // everyone permissions - getChild("CheckEveryoneCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + getChild("CheckEveryoneCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this, _1)); // next owner permissions - getChild("CheckNextOwnerModify")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); - getChild("CheckNextOwnerCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); - getChild("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); + getChild("CheckNextOwnerModify")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this, _1)); + getChild("CheckNextOwnerCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this, _1)); + getChild("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this, _1)); // Mark for sale or not, and sale info - getChild("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + getChild("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1)); // Change sale type, and sale info - getChild("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + getChild("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1)); // "Price" label for edit - getChild("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + getChild("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1)); refresh(); return TRUE; } @@ -192,11 +216,16 @@ void LLSidepanelItemInfo::setObjectID(const LLUUID& object_id) // Start monitoring changes in the object inventory to update // selected inventory item properties in Item Profile panel. See STORM-148. startObjectInventoryObserver(); + mUpdatePendingId = -1; } void LLSidepanelItemInfo::setItemID(const LLUUID& item_id) { - mItemID = item_id; + if (mItemID != item_id) + { + mItemID = item_id; + mUpdatePendingId = -1; + } } const LLUUID& LLSidepanelItemInfo::getObjectID() const @@ -209,6 +238,15 @@ const LLUUID& LLSidepanelItemInfo::getItemID() const return mItemID; } +void LLSidepanelItemInfo::onUpdateCallback(const LLUUID& item_id, S32 received_update_id) +{ + if (mItemID == item_id && mUpdatePendingId == received_update_id) + { + mUpdatePendingId = -1; + refresh(); + } +} + void LLSidepanelItemInfo::reset() { LLSidepanelInventorySubpanel::reset(); @@ -242,24 +280,16 @@ void LLSidepanelItemInfo::refresh() "LabelItemName", "LabelItemDesc", "LabelCreatorName", - "LabelOwnerName", - "CheckOwnerModify", - "CheckOwnerCopy", - "CheckOwnerTransfer", - "CheckShareWithGroup", - "CheckEveryoneCopy", - "CheckNextOwnerModify", - "CheckNextOwnerCopy", - "CheckNextOwnerTransfer", - "CheckPurchase", - "Edit Cost" + "LabelOwnerName" }; for(size_t t=0; tsetEnabled(false); } - + + setPropertiesFieldsEnabled(false); + const std::string hide_names[]={ "BaseMaskDebug", "OwnerMaskDebug", @@ -297,6 +327,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) llassert(item); if (!item) return; + if (mUpdatePendingId != -1) + { + return; + } + // do not enable the UI for incomplete items. BOOL is_complete = item->isFinished(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); @@ -726,6 +761,26 @@ void LLSidepanelItemInfo::stopObjectInventoryObserver() mObjectInventoryObserver = NULL; } +void LLSidepanelItemInfo::setPropertiesFieldsEnabled(bool enabled) +{ + const std::string fields[] = { + "CheckOwnerModify", + "CheckOwnerCopy", + "CheckOwnerTransfer", + "CheckShareWithGroup", + "CheckEveryoneCopy", + "CheckNextOwnerModify", + "CheckNextOwnerCopy", + "CheckNextOwnerTransfer", + "CheckPurchase", + "Edit Cost" + }; + for (size_t t = 0; tsetEnabled(false); + } +} + void LLSidepanelItemInfo::onClickCreator() { LLViewerInventoryItem* item = findItem(); @@ -793,10 +848,18 @@ void LLSidepanelItemInfo::onCommitDescription() } } -// static -void LLSidepanelItemInfo::onCommitPermissions() +void LLSidepanelItemInfo::onCommitPermissions(LLUICtrl* ctrl) +{ + if (ctrl) + { + // will be enabled by response from server + ctrl->setEnabled(false); + } + updatePermissions(); +} + +void LLSidepanelItemInfo::updatePermissions() { - //LL_INFOS() << "LLSidepanelItemInfo::onCommitPermissions()" << LL_ENDL; LLViewerInventoryItem* item = findItem(); if(!item) return; @@ -884,19 +947,17 @@ void LLSidepanelItemInfo::onCommitPermissions() } // static -void LLSidepanelItemInfo::onCommitSaleInfo() +void LLSidepanelItemInfo::onCommitSaleInfo(LLUICtrl* ctrl) { + if (ctrl) + { + // will be enabled by response from server + ctrl->setEnabled(false); + } //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleInfo()" << LL_ENDL; updateSaleInfo(); } -// static -void LLSidepanelItemInfo::onCommitSaleType() -{ - //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleType()" << LL_ENDL; - updateSaleInfo(); -} - void LLSidepanelItemInfo::updateSaleInfo() { LLViewerInventoryItem* item = findItem(); @@ -977,7 +1038,12 @@ void LLSidepanelItemInfo::onCommitChanges(LLPointer item) if (mObjectID.isNull()) { // This is in the agent's inventory. - item->updateServer(FALSE); + // Mark update as pending and wait only for most recent one in case user requested for couple + // Once update arrives or any of ids change drop pending id. + mUpdatePendingId++; + LLPointer callback = new PropertiesChangedCallback(getHandle(), mItemID, mUpdatePendingId); + update_inventory_item(item.get(), callback); + //item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -1002,6 +1068,7 @@ void LLSidepanelItemInfo::onCommitChanges(LLPointer item) // prevents flashing in content tab and some duplicated request. object->dirtyInventory(); } + setPropertiesFieldsEnabled(false); } } } @@ -1030,7 +1097,6 @@ void LLSidepanelItemInfo::save() { onCommitName(); onCommitDescription(); - onCommitPermissions(); - onCommitSaleInfo(); - onCommitSaleType(); + updatePermissions(); + updateSaleInfo(); } diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 74cf7afe35..5f29254182 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -57,6 +57,9 @@ public: const LLUUID& getObjectID() const; const LLUUID& getItemID() const; + // if received update and item id (from callback) matches internal ones, update UI + void onUpdateCallback(const LLUUID& item_id, S32 received_update_id); + protected: /*virtual*/ void refresh(); /*virtual*/ void save(); @@ -71,12 +74,16 @@ private: void startObjectInventoryObserver(); void stopObjectInventoryObserver(); + void setPropertiesFieldsEnabled(bool enabled); LLUUID mItemID; // inventory UUID for the inventory item. LLUUID mObjectID; // in-world task UUID, or null if in agent inventory. LLItemPropertiesObserver* mPropertiesObserver; // for syncing changes to item LLObjectInventoryObserver* mObjectInventoryObserver; // for syncing changes to items inside an object - + + // We can send multiple properties updates simultaneously, make sure only last response counts and there won't be a race condition. + S32 mUpdatePendingId; + // // UI Elements // @@ -85,9 +92,9 @@ protected: void onClickOwner(); void onCommitName(); void onCommitDescription(); - void onCommitPermissions(); - void onCommitSaleInfo(); - void onCommitSaleType(); + void onCommitPermissions(LLUICtrl* ctrl); + void updatePermissions(); + void onCommitSaleInfo(LLUICtrl* ctrl); void updateSaleInfo(); void onCommitChanges(LLPointer item); }; diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index f03c7abc4d..7fa06f51e3 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -174,9 +174,6 @@ BOOL LLSidepanelTaskInfo::postBuild() void LLSidepanelTaskInfo::disableAll() { - mDAPermModify->setEnabled(FALSE); - mDAPermModify->setValue(LLStringUtil::null); - mDACreatorName->setValue(LLStringUtil::null); mDACreatorName->setEnabled(FALSE); @@ -184,18 +181,42 @@ void LLSidepanelTaskInfo::disableAll() mDAOwnerName->setValue(LLStringUtil::null); mDAOwnerName->setEnabled(FALSE); - mDAButtonSetGroup->setEnabled(FALSE); - mDAObjectName->setValue(LLStringUtil::null); mDAObjectName->setEnabled(FALSE); mDAName->setEnabled(FALSE); mDADescription->setEnabled(FALSE); mDAObjectDescription->setValue(LLStringUtil::null); mDAObjectDescription->setEnabled(FALSE); - + + mDAPathfindingAttributes->setEnabled(FALSE); + mDAPathfindingAttributes->setValue(LLStringUtil::null); + + mDAButtonSetGroup->setEnabled(FALSE); + mDAButtonDeed->setEnabled(FALSE); + + mDAPermModify->setEnabled(FALSE); + mDAPermModify->setValue(LLStringUtil::null); + mDAEditCost->setValue(LLStringUtil::null); + mDAComboSaleType->setValue(LLSaleInfo::FS_COPY); + + disablePermissions(); + + mDAB->setVisible(FALSE); + mDAO->setVisible(FALSE); + mDAG->setVisible(FALSE); + mDAE->setVisible(FALSE); + mDAN->setVisible(FALSE); + mDAF->setVisible(FALSE); + + mOpenBtn->setEnabled(FALSE); + mPayBtn->setEnabled(FALSE); + mBuyBtn->setEnabled(FALSE); +} + +void LLSidepanelTaskInfo::disablePermissions() +{ mDACheckboxShareWithGroup->setValue(FALSE); mDACheckboxShareWithGroup->setEnabled(FALSE); - mDAButtonDeed->setEnabled(FALSE); mDACheckboxAllowEveryoneMove->setValue(FALSE); mDACheckboxAllowEveryoneMove->setEnabled(FALSE); @@ -217,33 +238,17 @@ void LLSidepanelTaskInfo::disableAll() //checkbox include in search mDASearchCheck->setValue(FALSE); mDASearchCheck->setEnabled(FALSE); - - mDAComboSaleType->setValue(LLSaleInfo::FS_COPY); + mDAComboSaleType->setEnabled(FALSE); - - mDAEditCost->setValue(LLStringUtil::null); + mDAEditCost->setEnabled(FALSE); - + mDALabelClickAction->setEnabled(FALSE); if (mDAComboClickAction) { mDAComboClickAction->setEnabled(FALSE); mDAComboClickAction->clear(); } - - mDAPathfindingAttributes->setEnabled(FALSE); - mDAPathfindingAttributes->setValue(LLStringUtil::null); - - mDAB->setVisible(FALSE); - mDAO->setVisible(FALSE); - mDAG->setVisible(FALSE); - mDAE->setVisible(FALSE); - mDAN->setVisible(FALSE); - mDAF->setVisible(FALSE); - - mOpenBtn->setEnabled(FALSE); - mPayBtn->setEnabled(FALSE); - mBuyBtn->setEnabled(FALSE); } void LLSidepanelTaskInfo::refresh() @@ -972,6 +977,12 @@ void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 BOOL new_state = check->get(); LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm); + + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + if (self) + { + self->disablePermissions(); + } } // static diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index cbfb07874b..dc259cb22d 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -95,6 +95,7 @@ protected: static void doClickAction(U8 click_action); void disableAll(); + void disablePermissions(); private: LLNameBox* mLabelGroupName; // group name -- cgit v1.2.3 From 0c0e7437c3b08f0269144b789fd4d04732780ea9 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 12 Jul 2019 19:26:59 +0300 Subject: Better logging for SL-10786 --- indra/newview/llviewermessage.cpp | 12 ++++++++++-- indra/newview/llvoavatar.cpp | 10 +++++----- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3fda51f856..cf5f2e284f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4027,6 +4027,8 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); + LL_DEBUGS("Messaging", "Motion") << "Processing " << num_blocks << " Animations" << LL_ENDL; + //clear animation flags avatarp->mSignaledAnimations.clear(); @@ -4039,8 +4041,6 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); - LL_DEBUGS("Messaging") << "Anim sequence ID: " << anim_sequence_id << LL_ENDL; - avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; // *HACK: Disabling flying mode if it has been enabled shortly before the agent @@ -4079,6 +4079,14 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) avatarp->mAnimationSources.insert(LLVOAvatar::AnimationSourceMap::value_type(object_id, animation_id)); } } + LL_DEBUGS("Messaging", "Motion") << "Anim sequence ID: " << anim_sequence_id + << " Animation id: " << animation_id + << " From block: " << object_id << LL_ENDL; + } + else + { + LL_DEBUGS("Messaging", "Motion") << "Anim sequence ID: " << anim_sequence_id + << " Animation id: " << animation_id << LL_ENDL; } } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 91c9a9f86d..4428a2c33c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5643,7 +5643,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL } else { - LL_WARNS() << "Failed to start motion!" << LL_ENDL; + LL_WARNS("Motion") << "Failed to start motion!" << LL_ENDL; } } else //stop animation @@ -5750,13 +5750,13 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) //----------------------------------------------------------------------------- BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { - LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; + LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; + LL_DEBUGS("Motion") << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; } if (isSelf() && remap_id == ANIM_AGENT_AWAY) @@ -5772,13 +5772,13 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { - LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; + LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; + LL_DEBUGS("Motion") << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; } if (isSelf()) -- cgit v1.2.3 From ef9f7ebcc4ce1b29b646343c1a96239abb9dee0c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 12 Jul 2019 21:45:47 +0300 Subject: SL-11577 Put Upload Cost Messages Under Transactions --- indra/newview/llnotificationlistitem.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index b405d3dca2..6a79a0c68c 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -262,6 +262,7 @@ std::set LLTransactionNotificationListItem::getTypes() std::set types; types.insert("PaymentReceived"); types.insert("PaymentSent"); + types.insert("UploadPayment"); return types; } -- cgit v1.2.3 From 0771d66acec71a4165eed03e3b0efc24f7d760e5 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 15 Jul 2019 11:29:06 +0300 Subject: SL-11567 FIXED The allowed and the blocked experiences are not listed in the "Allowed","Blocked" tabs immediately --- indra/newview/llfloaterexperiences.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index fdc1b47334..184e39402a 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -74,10 +74,6 @@ BOOL LLFloaterExperiences::postBuild() getChild("xp_tabs")->addTabPanel(new LLPanelExperienceLog()); resizeToTabs(); - - LLEventPumps::instance().obtain("experience_permission").listen("LLFloaterExperiences", - boost::bind(&LLFloaterExperiences::updatePermissions, this, _1)); - return TRUE; } @@ -163,6 +159,10 @@ void LLFloaterExperiences::refreshContents() void LLFloaterExperiences::onOpen( const LLSD& key ) { + LLEventPumps::instance().obtain("experience_permission").stopListening("LLFloaterExperiences"); + LLEventPumps::instance().obtain("experience_permission").listen("LLFloaterExperiences", + boost::bind(&LLFloaterExperiences::updatePermissions, this, _1)); + LLViewerRegion* region = gAgent.getRegion(); if(region) { -- cgit v1.2.3 From e9a9f71e563f236eabf5dca980913bcbb6f36a94 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 15 Jul 2019 17:56:30 +0300 Subject: SL-10908 Safeguards and potential crash fix --- indra/newview/llcontrolavatar.cpp | 9 ++++++--- indra/newview/llsky.cpp | 2 +- indra/newview/llsurfacepatch.cpp | 2 +- indra/newview/llviewerobjectlist.cpp | 6 +++++- indra/newview/llworld.cpp | 4 ++-- indra/newview/llworld.h | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index d24dac385f..92eeebd705 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -327,10 +327,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj) { LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR); - cav->mRootVolp = obj; + if (cav) + { + cav->mRootVolp = obj; - // Sync up position/rotation with object - cav->matchVolumeTransform(); + // Sync up position/rotation with object + cav->matchVolumeTransform(); + } return cav; } diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index 3ef89ba920..5e2442798b 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -119,7 +119,7 @@ void LLSky::restoreGL() void LLSky::resetVertexBuffers() { - if (gSky.mVOSkyp.notNull()) + if (gSky.mVOSkyp.notNull() && gSky.mVOGroundp.notNull()) { gPipeline.resetVertexBuffers(gSky.mVOSkyp->mDrawable); gPipeline.resetVertexBuffers(gSky.mVOGroundp->mDrawable); diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index f6cf714db4..5e056944e9 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -203,7 +203,7 @@ LLVector2 LLSurfacePatch::getTexCoords(const U32 x, const U32 y) const void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1) { - if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge()) + if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge() || !mVObjp) { return; // failsafe } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 932759c86d..2bf04dc204 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1383,7 +1383,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { - objectp->markDead(); // does the right thing if object already dead + // We are going to cleanup a lot of smart pointers to this object, they might be last, + // and object being NULLed while inside it's own function won't be pretty + // so create a pointer to make sure object will stay alive untill markDead() finishes + LLPointer sp(objectp); + sp->markDead(); // does the right thing if object already dead return TRUE; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index cee47a591e..89f5eb86b3 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -916,10 +916,10 @@ void LLWorld::updateWaterObjects() } } - for (std::list::iterator iter = mHoleWaterObjects.begin(); + for (std::list >::iterator iter = mHoleWaterObjects.begin(); iter != mHoleWaterObjects.end(); ++ iter) { - LLVOWater* waterp = *iter; + LLVOWater* waterp = (*iter).get(); gObjectList.killObject(waterp); } mHoleWaterObjects.clear(); diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index c9ac241d5a..993fbfb2cc 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -199,7 +199,7 @@ private: // Data for "Fake" objects // - std::list mHoleWaterObjects; + std::list > mHoleWaterObjects; LLPointer mEdgeWaterObjects[8]; LLPointer mDefaultWaterTexturep; -- cgit v1.2.3 From ba2429163af92b510d26444bb33f9f9d941c6dda Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 18 Jul 2019 18:37:45 +0300 Subject: SL-11592 [Win] Ability to bind extra mouse buttons for push to talk --- indra/newview/llfloaterpreference.cpp | 67 +++++++++++++++++++++- indra/newview/llfloaterpreference.h | 1 + indra/newview/llviewerwindow.cpp | 42 +++++++++++++- indra/newview/llviewerwindow.h | 5 +- indra/newview/llvoiceclient.cpp | 23 +++++--- indra/newview/llvoiceclient.h | 6 +- .../default/xui/en/panel_preferences_sound.xml | 8 +++ 7 files changed, 136 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 64961fc99c..5f74aaa5dd 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -124,7 +124,9 @@ char const* const VISIBILITY_DEFAULT = "default"; char const* const VISIBILITY_HIDDEN = "hidden"; //control value for middle mouse as talk2push button -const static std::string MIDDLE_MOUSE_CV = "MiddleMouse"; +const static std::string MIDDLE_MOUSE_CV = "MiddleMouse"; // for voice client and redability +const static std::string MOUSE_BUTTON_4_CV = "MouseButton4"; +const static std::string MOUSE_BUTTON_5_CV = "MouseButton5"; /// This must equal the maximum value set for the IndirectMaxComplexity slider in panel_preferences_graphics1.xml static const U32 INDIRECT_MAX_ARC_OFF = 101; // all the way to the right == disabled @@ -168,6 +170,7 @@ public: void setParent(LLFloaterPreference* parent) { mParent = parent; } BOOL handleKeyHere(KEY key, MASK mask); + BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down); static void onCancel(void* user_data); private: @@ -211,6 +214,23 @@ BOOL LLVoiceSetKeyDialog::handleKeyHere(KEY key, MASK mask) return result; } +BOOL LLVoiceSetKeyDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down) +{ + BOOL result = FALSE; + if (down && clicktype >= 3 && mask == 0) + { + mParent->setMouse(clicktype); + result = TRUE; + closeFloater(); + } + else + { + result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down); + } + + return result; +} + //static void LLVoiceSetKeyDialog::onCancel(void* user_data) { @@ -1694,6 +1714,40 @@ void LLFloaterPreference::setKey(KEY key) getChild("modifier_combo")->onCommit(); } +void LLFloaterPreference::setMouse(LLMouseHandler::EClickType click) +{ + if (click >= LLMouseHandler::CLICK_MIDDLE) + { + std::string bt_name; + std::string ctrl_value; + switch (click) + { + case LLMouseHandler::CLICK_MIDDLE: + bt_name = "middle_mouse"; + ctrl_value = MIDDLE_MOUSE_CV; + break; + case LLMouseHandler::CLICK_BUTTON4: + bt_name = "button4_mouse"; + ctrl_value = MOUSE_BUTTON_4_CV; + break; + case LLMouseHandler::CLICK_BUTTON5: + bt_name = "button5_mouse"; + ctrl_value = MOUSE_BUTTON_5_CV; + break; + default: + break; + } + // We are using text names for readability + LLUICtrl* p2t_line_editor = getChild("modifier_combo"); + p2t_line_editor->setControlValue(ctrl_value); + LLPanel* advanced_preferences = dynamic_cast(p2t_line_editor->getParent()); + if (advanced_preferences) + { + p2t_line_editor->setValue(advanced_preferences->getString(bt_name)); + } + } +} + void LLFloaterPreference::onClickSetMiddleMouse() { LLUICtrl* p2t_line_editor = getChild("modifier_combo"); @@ -2431,10 +2485,19 @@ BOOL LLPanelPreference::postBuild() if (hasChild("modifier_combo", TRUE)) { //localizing if push2talk button is set to middle mouse - if (MIDDLE_MOUSE_CV == getChild("modifier_combo")->getValue().asString()) + std::string modifier_value = getChild("modifier_combo")->getValue().asString(); + if (MIDDLE_MOUSE_CV == modifier_value) { getChild("modifier_combo")->setValue(getString("middle_mouse")); } + else if (MOUSE_BUTTON_4_CV == modifier_value) + { + getChild("modifier_combo")->setValue(getString("button4_mouse")); + } + else if (MOUSE_BUTTON_5_CV == modifier_value) + { + getChild("modifier_combo")->setValue(getString("button5_mouse")); + } } //////////////////////PanelSetup /////////////////// diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 1b8229ada6..d46f0deb7a 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -148,6 +148,7 @@ public: void onSelectSkin(); void onClickSetKey(); void setKey(KEY key); + void setMouse(LLMouseHandler::EClickType click); void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 74770dc483..643a011ebc 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -938,6 +938,12 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mLeftMouseDown = down; buttonname = "Left Double Click"; break; + case LLMouseHandler::CLICK_BUTTON4: + buttonname = "Button 4"; + break; + case LLMouseHandler::CLICK_BUTTON5: + buttonname = "Button 5"; + break; } LLView::sMouseHandlerMessage.clear(); @@ -1115,7 +1121,7 @@ BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK m BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = TRUE; - LLVoiceClient::getInstance()->middleMouseState(true); + LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_MIDDLE, true); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -1267,17 +1273,47 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi return result; } - + BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = FALSE; - LLVoiceClient::getInstance()->middleMouseState(false); + LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_MIDDLE, false); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. return TRUE; } +BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down) +{ + switch (button) + { + case 1: + LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_BUTTON4, down); + handleAnyMouseClick(window, pos, mask, LLMouseHandler::CLICK_BUTTON4, down); + break; + case 2: + LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_BUTTON5, down); + handleAnyMouseClick(window, pos, mask, LLMouseHandler::CLICK_BUTTON5, down); + break; + default: + break; + } + + // Always handled as far as the OS is concerned. + return TRUE; +} + +BOOL LLViewerWindow::handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button) +{ + return handleOtherMouse(window, pos, mask, button, TRUE); +} + +BOOL LLViewerWindow::handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button) +{ + return handleOtherMouse(window, pos, mask, button, FALSE); +} + // WARNING: this is potentially called multiple times per frame void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 071a3632dd..d084642fdc 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -192,7 +192,10 @@ public: /*virtual*/ BOOL handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ BOOL handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ BOOL handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); - /*virtual*/ BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); + /*virtual*/ BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); + /*virtual*/ BOOL handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button); + /*virtual*/ BOOL handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button); + BOOL handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down); /*virtual*/ LLWindowCallbacks::DragNDropResult handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, LLWindowCallbacks::DragNDropAction action, std::string data); void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask); void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 5c107cc10b..bce399a940 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -125,7 +125,7 @@ LLVoiceClient::LLVoiceClient() mPTTDirty(true), mPTT(true), mUsePTT(true), - mPTTIsMiddleMouse(false), + mPTTMouseButton(0), mPTTKey(0), mPTTIsToggle(false), mUserPTTState(false), @@ -638,13 +638,22 @@ bool LLVoiceClient::getPTTIsToggle() void LLVoiceClient::setPTTKey(std::string &key) { + // Value is stored as text for readability if(key == "MiddleMouse") { - mPTTIsMiddleMouse = true; + mPTTMouseButton = LLMouseHandler::CLICK_MIDDLE; + } + else if(key == "MouseButton4") + { + mPTTMouseButton = LLMouseHandler::CLICK_BUTTON4; + } + else if (key == "MouseButton5") + { + mPTTMouseButton = LLMouseHandler::CLICK_BUTTON5; } else { - mPTTIsMiddleMouse = false; + mPTTMouseButton = 0; if(!LLKeyboard::keyFromString(key, &mPTTKey)) { // If the call failed, don't match any key. @@ -681,7 +690,7 @@ void LLVoiceClient::keyDown(KEY key, MASK mask) return; } - if (!mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak") && (key == mPTTKey)) + if (mPTTMouseButton == 0 && LLAgent::isActionAllowed("speak") && (key == mPTTKey)) { bool down = gKeyboard->getKeyDown(mPTTKey); if (down) @@ -693,7 +702,7 @@ void LLVoiceClient::keyDown(KEY key, MASK mask) } void LLVoiceClient::keyUp(KEY key, MASK mask) { - if (!mPTTIsMiddleMouse && (key == mPTTKey)) + if (mPTTMouseButton == 0 && (key == mPTTKey)) { bool down = gKeyboard->getKeyDown(mPTTKey); if (!down) @@ -702,9 +711,9 @@ void LLVoiceClient::keyUp(KEY key, MASK mask) } } } -void LLVoiceClient::middleMouseState(bool down) +void LLVoiceClient::updateMouseState(S32 click, bool down) { - if(mPTTIsMiddleMouse && LLAgent::isActionAllowed("speak")) + if(mPTTMouseButton == click && LLAgent::isActionAllowed("speak")) { inputUserControlState(down); } diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 758e9cecd7..fbc85fd977 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -418,8 +418,8 @@ public: // PTT key triggering void keyDown(KEY key, MASK mask); void keyUp(KEY key, MASK mask); - void middleMouseState(bool down); - + void updateMouseState(S32 click, bool down); + boost::signals2::connection MicroChangedCallback(const micro_changed_signal_t::slot_type& cb ) { return mMicroChangedSignal.connect(cb); } @@ -485,7 +485,7 @@ protected: bool mPTT; bool mUsePTT; - bool mPTTIsMiddleMouse; + S32 mPTTMouseButton; KEY mPTTKey; bool mPTTIsToggle; bool mUserPTTState; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 8f2e81b9f7..649403184d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -13,6 +13,14 @@ name="middle_mouse"> Middle Mouse + + Mouse Button 4 + + + Mouse Button 5 + Date: Thu, 18 Jul 2019 19:18:02 +0300 Subject: SL-11592 [Mac] Ability to bind extra mouse buttons for push to talk --- indra/newview/llfloaterpreference.cpp | 47 +++++++++++++++++++---------------- indra/newview/llviewerwindow.cpp | 4 +-- 2 files changed, 27 insertions(+), 24 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 5f74aaa5dd..27a597a631 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -217,7 +217,9 @@ BOOL LLVoiceSetKeyDialog::handleKeyHere(KEY key, MASK mask) BOOL LLVoiceSetKeyDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down) { BOOL result = FALSE; - if (down && clicktype >= 3 && mask == 0) + if (down + && (clicktype == LLMouseHandler::CLICK_MIDDLE || clicktype == LLMouseHandler::CLICK_BUTTON4 || clicktype == LLMouseHandler::CLICK_BUTTON5) + && mask == 0) { mParent->setMouse(clicktype); result = TRUE; @@ -1716,29 +1718,30 @@ void LLFloaterPreference::setKey(KEY key) void LLFloaterPreference::setMouse(LLMouseHandler::EClickType click) { - if (click >= LLMouseHandler::CLICK_MIDDLE) + std::string bt_name; + std::string ctrl_value; + switch (click) + { + case LLMouseHandler::CLICK_MIDDLE: + bt_name = "middle_mouse"; + ctrl_value = MIDDLE_MOUSE_CV; + break; + case LLMouseHandler::CLICK_BUTTON4: + bt_name = "button4_mouse"; + ctrl_value = MOUSE_BUTTON_4_CV; + break; + case LLMouseHandler::CLICK_BUTTON5: + bt_name = "button5_mouse"; + ctrl_value = MOUSE_BUTTON_5_CV; + break; + default: + break; + } + + if (!ctrl_value.empty()) { - std::string bt_name; - std::string ctrl_value; - switch (click) - { - case LLMouseHandler::CLICK_MIDDLE: - bt_name = "middle_mouse"; - ctrl_value = MIDDLE_MOUSE_CV; - break; - case LLMouseHandler::CLICK_BUTTON4: - bt_name = "button4_mouse"; - ctrl_value = MOUSE_BUTTON_4_CV; - break; - case LLMouseHandler::CLICK_BUTTON5: - bt_name = "button5_mouse"; - ctrl_value = MOUSE_BUTTON_5_CV; - break; - default: - break; - } - // We are using text names for readability LLUICtrl* p2t_line_editor = getChild("modifier_combo"); + // We are using text control names for readability and compatibility with voice p2t_line_editor->setControlValue(ctrl_value); LLPanel* advanced_preferences = dynamic_cast(p2t_line_editor->getParent()); if (advanced_preferences) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 643a011ebc..9afe85a6f5 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1288,11 +1288,11 @@ BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask { switch (button) { - case 1: + case 4: LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_BUTTON4, down); handleAnyMouseClick(window, pos, mask, LLMouseHandler::CLICK_BUTTON4, down); break; - case 2: + case 5: LLVoiceClient::getInstance()->updateMouseState(LLMouseHandler::CLICK_BUTTON5, down); handleAnyMouseClick(window, pos, mask, LLMouseHandler::CLICK_BUTTON5, down); break; -- cgit v1.2.3 From 8bf2fb06218f24f95a7ff53df33b647b4ec088fc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 Jul 2019 20:51:14 +0300 Subject: SL-10453 Unhelpful error message when trying to join a group you are already a member of --- indra/newview/llviewermessage.cpp | 27 ++++++++++++++++++++------ indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index cf5f2e284f..5b9c39af9f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5153,12 +5153,27 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) } } - // Error Notification can come with and without reason - if (notificationID == "JoinGroupError" && llsdBlock.has("reason")) - { - LLNotificationsUtil::add("JoinGroupErrorReason", llsdBlock); - return true; - } + // Error Notification can come with and without reason + if (notificationID == "JoinGroupError") + { + if (llsdBlock.has("reason")) + { + LLNotificationsUtil::add("JoinGroupErrorReason", llsdBlock); + return true; + } + if (llsdBlock.has("group_id")) + { + LLGroupData agent_gdatap; + bool is_member = gAgent.getGroupData(llsdBlock["group_id"].asUUID(), agent_gdatap); + if (is_member) + { + LLSD args; + args["reason"] = LLTrans::getString("AlreadyInGroup"); + LLNotificationsUtil::add("JoinGroupErrorReason", args); + return true; + } + } + } LLNotificationsUtil::add(notificationID, llsdBlock); return true; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 71ab490547..2bf3f96ea7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2634,6 +2634,7 @@ If you continue to receive this message, please contact Second Life support for Debits Total No group data found for group + You are already in this group -- cgit v1.2.3 From 0277bc7af761a113062bc86b3e5c3c5405a61735 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 24 Jul 2019 16:56:17 +0300 Subject: SL-11645 Replacing outfit from an object leaves one item unworn --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llviewerobject.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 349ba6183b..6d2d533c9d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4662,7 +4662,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response { LLInventoryObject::object_list_t inventory_objects; object->getInventoryContents(inventory_objects); - int contents_count = inventory_objects.size()-1; //subtract one for containing folder + int contents_count = inventory_objects.size(); LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count, cat_and_wear->mFolderResponded, cat_and_wear->mReplace); diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 8b1535851e..9aaf28f5d0 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -474,6 +474,8 @@ public: void updateInventoryLocal(LLInventoryItem* item, U8 key); // Update without messaging. void updateTextureInventory(LLViewerInventoryItem* item, U8 key, bool is_new); LLInventoryObject* getInventoryObject(const LLUUID& item_id); + + // Get content except for root category void getInventoryContents(LLInventoryObject::object_list_t& objects); LLInventoryObject* getInventoryRoot(); LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); -- cgit v1.2.3 From 87be5f79975d0a3a5d6b7665aafc4be68b4f4afc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 24 Jul 2019 16:58:24 +0300 Subject: SL-4150 Rename htonmemcpy --- indra/newview/llhudeffectbeam.cpp | 12 ++++----- indra/newview/llhudeffectlookat.cpp | 20 +++++++-------- indra/newview/llhudeffectpointat.cpp | 20 +++++++-------- indra/newview/llhudeffecttrail.cpp | 12 ++++----- indra/newview/llselectmgr.cpp | 6 ++--- indra/newview/llviewerobject.cpp | 48 ++++++++++++++++++------------------ 6 files changed, 59 insertions(+), 59 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index 54e683e048..d1d83e6e03 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -90,7 +90,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) memset(packed_data, 0, 41); if (mSourceObject) { - htonmemcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); } if (mTargetObject) @@ -104,11 +104,11 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) if (mTargetObject) { - htonmemcpy(&(packed_data[17]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[17]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[17]), mTargetPos.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[17]), mTargetPos.mdV, MVT_LLVector3d, 24); } mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, 41); } @@ -131,7 +131,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 41, blocknum); - htonmemcpy(source_id.mData, packed_data, MVT_LLUUID, 16); + htolememcpy(source_id.mData, packed_data, MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp) @@ -143,7 +143,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) if (use_target_object) { - htonmemcpy(target_id.mData, &packed_data[17], MVT_LLUUID, 16); + htolememcpy(target_id.mData, &packed_data[17], MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(target_id); if (objp) @@ -153,7 +153,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } else { - htonmemcpy(new_target.mdV, &(packed_data[17]), MVT_LLVector3d, 24); + htolememcpy(new_target.mdV, &(packed_data[17]), MVT_LLVector3d, 24); setTargetPos(new_target); } diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index f46152dcec..6898dce7b1 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -269,29 +269,29 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); } // pack both target object and position // position interpreted as offset if target object is non-null if (mTargetObject) { - htonmemcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); } - htonmemcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); U8 lookAtTypePacked = (U8)mTargetType; - htonmemcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1); + htolememcpy(&(packed_data[LOOKAT_TYPE]), &lookAtTypePacked, MVT_U8, 1); mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE); @@ -325,7 +325,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); - htonmemcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); + htolememcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp && objp->isAvatar()) @@ -338,11 +338,11 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) return; } - htonmemcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); + htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); objp = gObjectList.findObject(target_id); - htonmemcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); + htolememcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); if (objp) { @@ -358,7 +358,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } U8 lookAtTypeUnpacked = 0; - htonmemcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); + htolememcpy(&lookAtTypeUnpacked, &(packed_data[LOOKAT_TYPE]), MVT_U8, 1); mTargetType = (ELookAtType)lookAtTypeUnpacked; if (mTargetType == LOOKAT_TARGET_NONE) diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index cc772c8f5c..ecf6d42d69 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -107,28 +107,28 @@ void LLHUDEffectPointAt::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), mSourceObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[SOURCE_AVATAR]), LLUUID::null.mData, MVT_LLUUID, 16); } // pack both target object and position // position interpreted as offset if target object is non-null if (mTargetObject) { - htonmemcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16); } else { - htonmemcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); + htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16); } - htonmemcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(&(packed_data[TARGET_POS]), mTargetOffsetGlobal.mdV, MVT_LLVector3d, 24); U8 pointAtTypePacked = (U8)mTargetType; - htonmemcpy(&(packed_data[POINTAT_TYPE]), &pointAtTypePacked, MVT_U8, 1); + htolememcpy(&(packed_data[POINTAT_TYPE]), &pointAtTypePacked, MVT_U8, 1); mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE); @@ -164,10 +164,10 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); - htonmemcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); - htonmemcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); - htonmemcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); - htonmemcpy(&pointAtTypeUnpacked, &(packed_data[POINTAT_TYPE]), MVT_U8, 1); + htolememcpy(source_id.mData, &(packed_data[SOURCE_AVATAR]), MVT_LLUUID, 16); + htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16); + htolememcpy(new_target.mdV, &(packed_data[TARGET_POS]), MVT_LLVector3d, 24); + htolememcpy(&pointAtTypeUnpacked, &(packed_data[POINTAT_TYPE]), MVT_U8, 1); LLViewerObject *objp = gObjectList.findObject(source_id); if (objp && objp->isAvatar()) diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index fc6efdb840..2ba8aa422b 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -87,15 +87,15 @@ void LLHUDEffectSpiral::packData(LLMessageSystem *mesgsys) if (mSourceObject) { - htonmemcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data, mSourceObject->mID.mData, MVT_LLUUID, 16); } if (mTargetObject) { - htonmemcpy(packed_data + 16, mTargetObject->mID.mData, MVT_LLUUID, 16); + htolememcpy(packed_data + 16, mTargetObject->mID.mData, MVT_LLUUID, 16); } if (!mPositionGlobal.isExactlyZero()) { - htonmemcpy(packed_data + 32, mPositionGlobal.mdV, MVT_LLVector3d, 24); + htolememcpy(packed_data + 32, mPositionGlobal.mdV, MVT_LLVector3d, 24); } mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, 56); } @@ -116,9 +116,9 @@ void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum) mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, EFFECT_SIZE, blocknum, EFFECT_SIZE); - htonmemcpy(object_id.mData, packed_data, MVT_LLUUID, 16); - htonmemcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); - htonmemcpy(mPositionGlobal.mdV, packed_data + 32, MVT_LLVector3d, 24); + htolememcpy(object_id.mData, packed_data, MVT_LLUUID, 16); + htolememcpy(target_object_id.mData, packed_data + 16, MVT_LLUUID, 16); + htolememcpy(mPositionGlobal.mdV, packed_data + 32, MVT_LLVector3d, 24); LLViewerObject *objp = NULL; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b726e841f8..4c268ae273 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4163,20 +4163,20 @@ void LLSelectMgr::packMultipleUpdate(LLSelectNode* node, void *user_data) if (type & UPD_POSITION) { - htonmemcpy(&data[offset], &(object->getPosition().mV), MVT_LLVector3, 12); + htolememcpy(&data[offset], &(object->getPosition().mV), MVT_LLVector3, 12); offset += 12; } if (type & UPD_ROTATION) { LLQuaternion quat = object->getRotation(); LLVector3 vec = quat.packToVector3(); - htonmemcpy(&data[offset], &(vec.mV), MVT_LLQuaternion, 12); + htolememcpy(&data[offset], &(vec.mV), MVT_LLQuaternion, 12); offset += 12; } if (type & UPD_SCALE) { //LL_INFOS() << "Sending object scale " << object->getScale() << LL_ENDL; - htonmemcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12); + htolememcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12); offset += 12; } gMessageSystem->addBinaryDataFast(_PREHASH_Data, data, offset); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ec1095813b..7381504f01 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1279,7 +1279,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { case (60 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1287,23 +1287,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, this_update_precision = 32; // this is a terse update // pos - htonmemcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // vel - htonmemcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // acc - htonmemcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // theta { LLVector3 vec; - htonmemcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); new_rot.unpackFromVector3(vec); } count += sizeof(LLVector3); // omega - htonmemcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); if (new_angv.isExactlyZero()) { // reset rotation time @@ -1319,7 +1319,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, break; case(32 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1329,7 +1329,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // This is a terse 16 update, so treat data as an array of U16's. #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1340,7 +1340,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_pos_parent.mV[VZ] = U16_to_F32(val[VZ], MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1351,7 +1351,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size))); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1362,7 +1362,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size))); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Quat, 4); + htolememcpy(valswizzle, &data[count], MVT_U16Quat, 4); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1374,7 +1374,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.mQ[VW] = U16_to_F32(val[VW], -1.f, 1.f); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1570,7 +1570,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { case(60 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1578,23 +1578,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // this is a terse 32 update // pos this_update_precision = 32; - htonmemcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(new_pos_parent.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // vel - htonmemcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getVelocity().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // acc - htonmemcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)getAcceleration().mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); count += sizeof(LLVector3); // theta { LLVector3 vec; - htonmemcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy(vec.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); new_rot.unpackFromVector3(vec); } count += sizeof(LLVector3); // omega - htonmemcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); + htolememcpy((void*)new_angv.mV, &data[count], MVT_LLVector3, sizeof(LLVector3)); if (new_angv.isExactlyZero()) { // reset rotation time @@ -1610,7 +1610,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, break; case(32 + 16): // pull out collision normal for avatar - htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); + htolememcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); // fall through @@ -1620,7 +1620,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1631,7 +1631,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_pos_parent.mV[VZ] = U16_to_F32(val[VZ], MIN_HEIGHT, MAX_HEIGHT); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1642,7 +1642,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size)); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1653,7 +1653,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U16_to_F32(val[VZ], -size, size)); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Quat, 8); + htolememcpy(valswizzle, &data[count], MVT_U16Quat, 8); val = valswizzle; #else val = (U16 *) &data[count]; @@ -1665,7 +1665,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.mQ[VW] = U16_to_F32(val[VW], -1.f, 1.f); #ifdef LL_BIG_ENDIAN - htonmemcpy(valswizzle, &data[count], MVT_U16Vec3, 6); + htolememcpy(valswizzle, &data[count], MVT_U16Vec3, 6); val = valswizzle; #else val = (U16 *) &data[count]; -- cgit v1.2.3 From b1b102cf662b9deb00c6231ca335fcf46b86034c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 26 Jul 2019 21:10:01 +0300 Subject: SL-8380 Ability to disable 2D UI tooltips --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerwindow.cpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 472a76a7e2..b4919c6e48 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11219,6 +11219,17 @@ Value 1 + BasicUITooltips + + Comment + Show tooltips for various 2D UI elements like buttons or checkboxes, won't supress tooltips like drag'n'drop, inworld, links or media + Persist + 1 + Type + Boolean + Value + 1 + ShowHoverTips Comment diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9afe85a6f5..7f3e1faa33 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3367,7 +3367,8 @@ void LLViewerWindow::updateUI() LLRect screen_sticky_rect = mRootView->getLocalRect(); S32 local_x, local_y; - if (gSavedSettings.getBOOL("DebugShowXUINames")) + static LLCachedControl debug_show_xui_names(gSavedSettings, "DebugShowXUINames", 0); + if (debug_show_xui_names) { LLToolTip::Params params; -- cgit v1.2.3 From a28386b93472f7881b6d75a06f4ecf5fbd456a17 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 29 Jul 2019 17:42:44 +0300 Subject: SL-9189 Add ability to rename gesture in Gesture list --- indra/newview/llfloatergesture.cpp | 53 ++++++++++++++++++++++ indra/newview/llfloatergesture.h | 3 ++ .../skins/default/xui/en/menu_gesture_gear.xml | 10 ++++ .../newview/skins/default/xui/en/notifications.xml | 23 ++++++++++ 4 files changed, 89 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index b840d37c4d..e778e8eb9e 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -41,6 +41,7 @@ #include "llkeyboard.h" #include "llmenugl.h" #include "llmultigesture.h" +#include "llnotificationsutil.h" #include "llpreviewgesture.h" #include "llscrolllistctrl.h" #include "lltrans.h" @@ -125,6 +126,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key) mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this)); mCommitCallbackRegistrar.add("Gesture.Action.CopyPaste", boost::bind(&LLFloaterGesture::onCopyPasteAction, this, _2)); mCommitCallbackRegistrar.add("Gesture.Action.SaveToCOF", boost::bind(&LLFloaterGesture::addToCurrentOutFit, this)); + mCommitCallbackRegistrar.add("Gesture.Action.Rename", boost::bind(&LLFloaterGesture::onRenameSelected, this)); mEnableCallbackRegistrar.add("Gesture.EnableAction", boost::bind(&LLFloaterGesture::isActionEnabled, this, _2)); } @@ -430,6 +432,19 @@ bool LLFloaterGesture::isActionEnabled(const LLSD& command) { return mGestureList->getAllSelected().size() == 1; } + else if ("rename_gesture" == command_name) + { + if (mGestureList->getAllSelected().size() == 1) + { + LLViewerInventoryItem* item = gInventory.getItem(mGestureList->getCurrentID()); + + if (item && item->getPermissions().allowModifyBy(gAgentID)) + { + return true; + } + } + return false; + } return true; } @@ -514,6 +529,44 @@ void LLFloaterGesture::onActivateBtnClick() } } +void LLFloaterGesture::onRenameSelected() +{ + LLViewerInventoryItem* gesture = gInventory.getItem(mGestureList->getCurrentID()); + if (!gesture) + { + return; + } + + LLSD args; + args["NAME"] = gesture->getName(); + + LLSD payload; + payload["gesture_id"] = mGestureList->getCurrentID(); + + LLNotificationsUtil::add("RenameGesture", args, payload, boost::bind(onGestureRename, _1, _2)); + +} + +void LLFloaterGesture::onGestureRename(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) return; // canceled + + std::string new_name = response["new_name"].asString(); + LLInventoryObject::correctInventoryName(new_name); + if (!new_name.empty()) + { + LLUUID item_id = notification["payload"]["gesture_id"].asUUID(); + LLViewerInventoryItem* gesture = gInventory.getItem(item_id); + if (gesture && (gesture->getName() != new_name)) + { + LLSD updates; + updates["name"] = new_name; + update_inventory_item(item_id, updates, NULL); + } + } +} + void LLFloaterGesture::onCopyPasteAction(const LLSD& command) { std::string command_name = command.asString(); diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 8efb3e6461..1d702c6704 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -95,6 +95,9 @@ private: void onCommitList(); void onCopyPasteAction(const LLSD& command); void onDeleteSelected(); + void onRenameSelected(); + + static void onGestureRename(const LLSD& notification, const LLSD& response); LLUUID mSelectedID; LLUUID mGestureFolderID; diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml index c1458977ca..5cae643e44 100644 --- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml @@ -11,6 +11,16 @@ + + + + + + New gesture name: + confirm +
+ + [NAME] + +
+ diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index d7e87ed52e..a1005c654c 100644 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -60,12 +60,21 @@ LLPointer LLSecAPIBasicHandler::getCertificate(X509* openssl_cert LLPointer LLSecAPIBasicHandler::getCertificateChain(const X509_STORE_CTX* chain) { return NULL; } LLPointer LLSecAPIBasicHandler::getCertificateStore(const std::string& store_id) { return NULL; } void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) {} +void LLSecAPIBasicHandler::addToProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem, const LLSD& data) {} +void LLSecAPIBasicHandler::removeFromProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem) {} LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, const std::string& data_id) { return LLSD(); } void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, const std::string& data_id) {} LLPointer LLSecAPIBasicHandler::createCredential(const std::string& grid, const LLSD& identifier, const LLSD& authenticator) { return NULL; } LLPointer LLSecAPIBasicHandler::loadCredential(const std::string& grid) { return NULL; } void LLSecAPIBasicHandler::saveCredential(LLPointer cred, bool save_authenticator) {} void LLSecAPIBasicHandler::deleteCredential(LLPointer cred) {} +bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const std::string& grid) { return false; } +void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map) {} +LLPointer LLSecAPIBasicHandler::loadFromCredentialMap(const std::string& storage, const std::string& grid, const std::string& userkey) { return NULL; } +void LLSecAPIBasicHandler::addToCredentialMap(const std::string& storage, LLPointer cred, bool save_authenticator) {} +void LLSecAPIBasicHandler::removeFromCredentialMap(const std::string& storage, LLPointer cred) {} +void LLSecAPIBasicHandler::removeFromCredentialMap(const std::string& storage, const std::string& grid, const std::string& userkey) {} +void LLSecAPIBasicHandler::removeCredentialMap(const std::string& storage, const std::string& grid) {} // ------------------------------------------------------------------------------------------- // TUT -- cgit v1.2.3 From cd25ae3e083e34acfa659ac78c0ae3fb246ee630 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 13 Aug 2019 12:40:32 +0300 Subject: SL-11707 FIXED [Maint] Incorrect sound length limit referenced. --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 30e8f7cedc..ab80e0fc46 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2180,7 +2180,7 @@ Wrong chunk size in WAV file: icon="alertmodal.tga" name="SoundFileInvalidTooLong" type="alertmodal"> -Audio file is too long (10 second maximum): +Audio file is too long (30 second maximum): [FILE] fail
-- cgit v1.2.3 From 9773e06cc12b432772eda856c5281c749caec988 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 21 Aug 2019 16:22:43 +0300 Subject: SL-11753 FIXED Group & Resident with the same name share chat history. --- indra/newview/llfloaterconversationpreview.cpp | 7 ++++ indra/newview/llfloaterconversationpreview.h | 1 + indra/newview/llimview.cpp | 11 +++++- indra/newview/llimview.h | 1 + indra/newview/lllogchat.cpp | 47 ++++++++++++++++++++++---- indra/newview/lllogchat.h | 3 +- 6 files changed, 61 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 66198b3bf6..37186ce3d5 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -50,6 +50,7 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i mShowHistory(false), mMessages(NULL), mHistoryThreadsBusy(false), + mIsGroup(false), mOpened(false) { } @@ -75,6 +76,7 @@ BOOL LLFloaterConversationPreview::postBuild() { name = conv->getConversationName(); file = conv->getHistoryFileName(); + mIsGroup = (LLIMModel::LLIMSession::GROUP_SESSION == conv->getConversationType()); } else { @@ -82,6 +84,10 @@ BOOL LLFloaterConversationPreview::postBuild() file = "chat"; } mChatHistoryFileName = file; + if (mIsGroup) + { + mChatHistoryFileName += GROUP_CHAT_SUFFIX; + } LLStringUtil::format_map_t args; args["[NAME]"] = name; std::string title = getString("Title", args); @@ -145,6 +151,7 @@ void LLFloaterConversationPreview::onOpen(const LLSD& key) LLSD load_params; load_params["load_all_history"] = true; load_params["cut_off_todays_date"] = false; + load_params["is_group"] = mIsGroup; // The temporary message list with "Loading..." text // Will be deleted upon loading completion in setPages() method diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index a8dbbc9ffe..7ca4ee6945 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -66,6 +66,7 @@ private: bool mShowHistory; bool mHistoryThreadsBusy; bool mOpened; + bool mIsGroup; }; #endif /* LLFLOATERCONVERSATIONPREVIEW_H_ */ diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0f5d514660..c07064389b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -848,7 +848,7 @@ void LLIMModel::LLIMSession::loadHistory() std::list chat_history; //involves parsing of a chat history - LLLogChat::loadChatHistory(mHistoryFileName, chat_history); + LLLogChat::loadChatHistory(mHistoryFileName, chat_history, LLSD(), isGroupChat()); addMessagesFromHistory(chat_history); } } @@ -912,6 +912,11 @@ bool LLIMModel::LLIMSession::isP2P() return IM_NOTHING_SPECIAL == mType; } +bool LLIMModel::LLIMSession::isGroupChat() +{ + return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID)); +} + bool LLIMModel::LLIMSession::isOtherParticipantAvaline() { return !mOtherParticipantIsAvatar; @@ -969,6 +974,10 @@ void LLIMModel::LLIMSession::buildHistoryFileName() mHistoryFileName = LLCacheName::buildUsername(mName); } } + else if (isGroupChat()) + { + mHistoryFileName = mName + GROUP_CHAT_SUFFIX; + } } //static diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 81d3ffa1a6..344f6d9a83 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -91,6 +91,7 @@ public: bool isOutgoingAdHoc() const; bool isAdHoc(); bool isP2P(); + bool isGroupChat(); bool isOtherParticipantAvaline(); bool isP2PSessionType() const { return mSessionType == P2P_SESSION;} diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 1bdeddbcfe..e2f253d2bd 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -67,6 +67,8 @@ const std::string LL_IM_FROM("from"); const std::string LL_IM_FROM_ID("from_id"); const std::string LL_TRANSCRIPT_FILE_EXTENSION("txt"); +const std::string GROUP_CHAT_SUFFIX(" (group)"); + const static char IM_SYMBOL_SEPARATOR(':'); const static std::string IM_SEPARATOR(std::string() + IM_SYMBOL_SEPARATOR + " "); const static std::string NEW_LINE("\n"); @@ -345,7 +347,7 @@ void LLLogChat::saveHistory(const std::string& filename, } // static -void LLLogChat::loadChatHistory(const std::string& file_name, std::list& messages, const LLSD& load_params) +void LLLogChat::loadChatHistory(const std::string& file_name, std::list& messages, const LLSD& load_params, bool is_group) { if (file_name.empty()) { @@ -358,10 +360,25 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list& m LLFILE* fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r");/*Flawfinder: ignore*/ if (!fptr) { - fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/ + if (is_group) + { + std::string old_name(file_name); + old_name.erase(old_name.size() - GROUP_CHAT_SUFFIX.size()); + fptr = LLFile::fopen(LLLogChat::makeLogFileName(old_name), "r"); + if (fptr) + { + fclose(fptr); + LLFile::copy(LLLogChat::makeLogFileName(old_name), LLLogChat::makeLogFileName(file_name)); + } + fptr = LLFile::fopen(LLLogChat::makeLogFileName(file_name), "r"); + } if (!fptr) { - return; //No previous conversation with this name. + fptr = LLFile::fopen(LLLogChat::oldLogFileName(file_name), "r");/*Flawfinder: ignore*/ + if (!fptr) + { + return; //No previous conversation with this name. + } } } @@ -1047,12 +1064,28 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list& list); static void getListOfTranscriptBackupFiles(std::vector& list_of_transcriptions); - static void loadChatHistory(const std::string& file_name, std::list& messages, const LLSD& load_params = LLSD()); + static void loadChatHistory(const std::string& file_name, std::list& messages, const LLSD& load_params = LLSD(), bool is_group = false); typedef boost::signals2::signal save_history_signal_t; static boost::signals2::connection setSaveHistorySignal(const save_history_signal_t::slot_type& cb); @@ -192,6 +192,7 @@ protected: virtual ~LLChatLogParser() {}; }; +extern const std::string GROUP_CHAT_SUFFIX; // LLSD map lookup constants extern const std::string LL_IM_TIME; //("time"); -- cgit v1.2.3 From 82c3bf0a9881e29745851b1c0baa3ed69ecc4735 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 23 Aug 2019 17:31:09 +0300 Subject: SL-11736 FIXED "Stand" button disappears if "Restore down" UI button is pressed while sitting. --- indra/newview/llmoveview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 19f238d99a..28201b7345 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -574,6 +574,8 @@ BOOL LLPanelStandStopFlying::postBuild() //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE)); mStopFlyingButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStopFlyingButtonClick, this)); mStopFlyingButton->setVisible(FALSE); + + gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelStandStopFlying::updatePosition, this)); return TRUE; } -- cgit v1.2.3 From 9c3c8450a64cd644966f3242af0a2dbde0eacab9 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 27 Aug 2019 17:40:33 +0300 Subject: SL-11782 FIXED Light is still visible when it's out of the draw distance --- indra/newview/pipeline.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bd73c234a6..a5f99676b4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8686,7 +8686,8 @@ void LLPipeline::renderDeferredLighting() const LLViewerObject *vobj = drawablep->getVObj(); if(vobj && vobj->getAvatar() - && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList())) + && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList()) + || (vobj && dist_vec(vobj->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip)) { continue; } -- cgit v1.2.3 From 6897ad72ff1774f286acd3ddebdc11fc2e0b5f23 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 29 Aug 2019 16:51:27 +0300 Subject: SL-11675 Don't show identical error messages more then once --- indra/newview/skins/default/xui/en/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ab80e0fc46..fd9a3f12e8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2259,6 +2259,7 @@ Unable to create output file: [FILE] icon="alertmodal.tga" name="DoNotSupportBulkAnimationUpload" type="alertmodal"> + [APP_NAME] does not currently support bulk upload of BVH format animation files. fail @@ -3440,6 +3441,9 @@ Display settings have been set to recommended levels because of a change to the icon="alertmodal.tga" name="ErrorMessage" type="alertmodal"> + + ERROR_MESSAGE + [ERROR_MESSAGE] fail Date: Thu, 29 Aug 2019 18:32:42 +0300 Subject: SL-10536 Crash in getPosRegionFromAgent --- indra/newview/llcontrolavatar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 92eeebd705..f0682dc1ba 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -171,7 +171,10 @@ void LLControlAvatar::matchVolumeTransform() if (attached_av) { LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp); - setPositionAgent(mRootVolp->getRenderPosition()); + if (getRegion() && !isDead()) + { + setPositionAgent(mRootVolp->getRenderPosition()); + } attach->updateWorldPRSParent(); LLVector3 joint_pos = attach->getWorldPosition(); LLQuaternion joint_rot = attach->getWorldRotation(); @@ -227,7 +230,10 @@ void LLControlAvatar::matchVolumeTransform() #endif setRotation(bind_rot*obj_rot); mRoot->setWorldRotation(bind_rot*obj_rot); - setPositionAgent(vol_pos); + if (getRegion() && !isDead()) + { + setPositionAgent(vol_pos); + } mRoot->setPosition(vol_pos + mPositionConstraintFixup); F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale"); -- cgit v1.2.3 From 23acff80c083c442edddbe3fbb1754d640496704 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 29 Aug 2019 22:15:54 +0300 Subject: SL-11657 Further improvements --- indra/newview/llviewerobject.cpp | 60 +++++++++++++++++++++++++++++++++------- indra/newview/llviewerobject.h | 11 ++++++-- 2 files changed, 58 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 6c0f101cd7..bbd454c4f5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -142,6 +142,9 @@ const F32 PHYSICS_TIMESTEP = 1.f / 45.f; const U32 MAX_INV_FILE_READ_FAILS = 25; const S32 MAX_OBJECT_BINARY_DATA_SIZE = 60 + 16; +const F64 INVENTORY_UPDATE_WAIT_TIME_DESYNC = 5; // seconds +const F64 INVENTORY_UPDATE_WAIT_TIME_OUTDATED = 1; + static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object"); // static @@ -2979,6 +2982,8 @@ void LLViewerObject::fetchInventoryFromServer() if (!isInventoryPending()) { delete mInventory; + + // Results in processTaskInv LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_RequestTaskInventory); msg->nextBlockFast(_PREHASH_AgentData); @@ -2988,11 +2993,44 @@ void LLViewerObject::fetchInventoryFromServer() msg->addU32Fast(_PREHASH_LocalID, mLocalID); msg->sendReliable(mRegionp->getHost()); - // this will get reset by dirtyInventory or doInventoryCallback + // This will get reset by doInventoryCallback or processTaskInv mInvRequestState = INVENTORY_REQUEST_PENDING; } } +void LLViewerObject::fetchInventoryDelayed(const F64 &time_seconds) +{ + // unless already waiting, drop previous request and shedule an update + if (mInvRequestState != INVENTORY_REQUEST_WAIT) + { + if (mInvRequestXFerId != 0) + { + // abort download. + gXferManager->abortRequestById(mInvRequestXFerId, -1); + mInvRequestXFerId = 0; + } + mInvRequestState = INVENTORY_REQUEST_WAIT; // affects isInventoryPending() + LLCoros::instance().launch("LLViewerObject::fetchInventoryDelayedCoro()", + boost::bind(&LLViewerObject::fetchInventoryDelayedCoro, mID, time_seconds)); + } +} + +//static +void LLViewerObject::fetchInventoryDelayedCoro(const LLUUID task_inv, const F64 time_seconds) +{ + llcoro::suspendUntilTimeout(time_seconds); + LLViewerObject *obj = gObjectList.findObject(task_inv); + if (obj) + { + // Might be good idea to prolong delay here in case expected serial changed. + // As it is, it will get a response with obsolete serial and will delay again. + + // drop waiting state to unlock isInventoryPending() + obj->mInvRequestState = INVENTORY_REQUEST_STOPPED; + obj->fetchInventoryFromServer(); + } +} + LLControlAvatar *LLViewerObject::getControlAvatar() { return getRootEdit()->mControlAvatar.get(); @@ -3166,30 +3204,32 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) // we can receive multiple task updates simultaneously, make sure we will not rewrite newer with older update msg->getS16Fast(_PREHASH_InventoryData, _PREHASH_Serial, ft->mSerial); - if (ft->mSerial == object->mInventorySerialNum) + if (ft->mSerial == object->mInventorySerialNum + && ft->mSerial < object->mExpectedInventorySerialNum) { // Loop Protection. // We received same serial twice. // Viewer did some changes to inventory that couldn't be saved server side - // or something went wrong to cause serial to be out of sync + // or something went wrong to cause serial to be out of sync. + // Drop xfer and restart after some time, assign server's value as expected LL_WARNS() << "Task inventory serial might be out of sync, server serial: " << ft->mSerial << " client expected serial: " << object->mExpectedInventorySerialNum << LL_ENDL; object->mExpectedInventorySerialNum = ft->mSerial; + object->fetchInventoryDelayed(INVENTORY_UPDATE_WAIT_TIME_DESYNC); } - - if (ft->mSerial < object->mExpectedInventorySerialNum) + else if (ft->mSerial < object->mExpectedInventorySerialNum) { - // out of date message, record to current serial for loop protection, but do not load it - // just drop xfer to restart on idle + // Out of date message, record to current serial for loop protection, but do not load it + // Drop xfer and restart after some time if (ft->mSerial < object->mInventorySerialNum) { - LL_WARNS() << "Somehow task serial decreased, out of order packet?" << LL_ENDL; + LL_WARNS() << "Task serial decreased. Potentially out of order packet or desync." << LL_ENDL; } object->mInventorySerialNum = ft->mSerial; - object->mInvRequestXFerId = 0; - object->mInvRequestState = INVENTORY_REQUEST_STOPPED; + object->fetchInventoryDelayed(INVENTORY_UPDATE_WAIT_TIME_OUTDATED); } else if (ft->mSerial >= object->mExpectedInventorySerialNum) { + // We received version we expected or newer. Load it. object->mInventorySerialNum = ft->mSerial; object->mExpectedInventorySerialNum = ft->mSerial; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 077b02e097..89cea5756f 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -621,9 +621,13 @@ private: static void initObjectDataMap(); - // forms task inventory request if none are pending + // forms task inventory request if none are pending, marks request as pending void fetchInventoryFromServer(); + // forms task inventory request after some time passed, marks request as pending + void fetchInventoryDelayed(const F64 &time_seconds); + static void fetchInventoryDelayedCoro(const LLUUID task_inv, const F64 time_seconds); + public: // // Viewer-side only types - use the LL_PCODE_APP mask. @@ -807,8 +811,9 @@ protected: enum EInventoryRequestState { INVENTORY_REQUEST_STOPPED, - INVENTORY_REQUEST_PENDING, - INVENTORY_XFER + INVENTORY_REQUEST_WAIT, // delay before requesting + INVENTORY_REQUEST_PENDING, // just did fetchInventoryFromServer() + INVENTORY_XFER // processed response from 'fetch', now doing an xfer }; EInventoryRequestState mInvRequestState; U64 mInvRequestXFerId; -- cgit v1.2.3 From 7c9e92f49402d0dca29357161d6a6b1eb16d7ab7 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 26 Sep 2019 19:24:54 +0300 Subject: SL-12016 Mini-map avatar icon (Z-position) fix --- indra/newview/llnetmap.cpp | 2 +- indra/newview/llworldmapview.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 248c361ca4..cb6f3fcf2d 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -354,7 +354,7 @@ void LLNetMap::draw() LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color; - unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z && + unknown_relative_z = positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z && camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z; LLWorldMapView::drawAvatar( diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 86249badaa..853da80e9e 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1154,7 +1154,7 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, { const F32 HEIGHT_THRESHOLD = 7.f; LLUIImagePtr dot_image = sAvatarLevelImage; - if (unknown_relative_z) + if (unknown_relative_z && llabs(relative_z) > HEIGHT_THRESHOLD) { dot_image = sAvatarUnknownImage; } -- cgit v1.2.3 From 666129f45ce49703153c20f551b3b05b98791abb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 30 Sep 2019 15:18:13 +0300 Subject: SL-4354 Hide partially loaded avatar with cloud more reliably --- indra/newview/llvoavatar.cpp | 36 +++++++++++++++++++++++++----------- indra/newview/llvoavatar.h | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f861c0cecf..1e4b5cc599 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -883,8 +883,9 @@ BOOL LLVOAvatar::hasGray() const S32 LLVOAvatar::getRezzedStatus() const { if (getIsCloud()) return 0; - if (isFullyTextured() && allBakedTexturesCompletelyDownloaded()) return 3; - if (isFullyTextured()) return 2; + bool textured = isFullyTextured(); + if (textured && allBakedTexturesCompletelyDownloaded()) return 3; + if (textured) return 2; llassert(hasGray()); return 1; // gray } @@ -7621,14 +7622,13 @@ bool LLVOAvatar::getIsCloud() const ); } -void LLVOAvatar::updateRezzedStatusTimers() +void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status) { // State machine for rezzed status. Statuses are -1 on startup, 0 // = cloud, 1 = gray, 2 = downloading, 3 = full. // Purpose is to collect time data for each it takes avatar to reach // various loading landmarks: gray, textured (partial), textured fully. - S32 rez_status = getRezzedStatus(); if (rez_status != mLastRezzedStatus) { LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL; @@ -7798,8 +7798,13 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse // returns true if the value has changed. BOOL LLVOAvatar::updateIsFullyLoaded() { - const bool loading = getIsCloud(); - updateRezzedStatusTimers(); + S32 rez_status = getRezzedStatus(); + bool loading = getIsCloud(); + if (mFirstFullyVisible && !mIsControlAvatar && rez_status < 3) + { + loading = ((rez_status < 2) || !isFullyBaked()); + } + updateRezzedStatusTimers(rez_status); updateRuthTimer(loading); return processFullyLoadedChange(loading); } @@ -7835,13 +7840,22 @@ void LLVOAvatar::updateRuthTimer(bool loading) BOOL LLVOAvatar::processFullyLoadedChange(bool loading) { - // we wait a little bit before giving the all clear, - // to let textures settle down - const F32 PAUSE = 1.f; + // We wait a little bit before giving the 'all clear', to let things to + // settle down (models to snap into place, textures to get first packets) + const F32 LOADED_DELAY = 1.f; + const F32 FIRST_USE_DELAY = 3.f; + if (loading) mFullyLoadedTimer.reset(); - - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); + + if (mFirstFullyVisible) + { + mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > FIRST_USE_DELAY); + } + else + { + mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY); + } if (!mPreviousFullyLoaded && !loading && mFullyLoaded) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 00dccc5d12..e352a6c1fa 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -348,7 +348,7 @@ public: BOOL isFullyTextured() const; BOOL hasGray() const; S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. - void updateRezzedStatusTimers(); + void updateRezzedStatusTimers(S32 status); S32 mLastRezzedStatus; -- cgit v1.2.3 From a9a2ca0d7476dbe1d231d972dd602344b054e028 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 1 Oct 2019 16:49:33 -0700 Subject: SL-11430: Transaction ID is passed as aux_id from offline message. No special parsing required to get type from binary_bucket. --- indra/newview/llimprocessing.cpp | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 42043a03f2..24f40c8182 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -855,39 +855,18 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } else // IM_TASK_INVENTORY_OFFERED { - if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5) - { - // cap received offline message - std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size); - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("|", "", boost::keep_empty_tokens); - tokenizer tokens(str_bucket, sep); - tokenizer::iterator iter = tokens.begin(); - - info->mType = (LLAssetType::EType)(atoi((*(iter++)).c_str())); - // Note There is more elements in 'tokens' ... - - info->mObjectID = LLUUID::null; - info->mFromObject = TRUE; - } - else - { - if (sizeof(S8) != binary_bucket_size) - { - LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; - delete info; - break; - } - info->mType = (LLAssetType::EType) binary_bucket[0]; - info->mObjectID = LLUUID::null; - info->mFromObject = TRUE; - } + info->mType = (LLAssetType::EType) binary_bucket[0]; + info->mObjectID = LLUUID::null; + info->mFromObject = TRUE; } + // In the case of an offline message, the transaction id will be in aux_id and th session_id will be null + // (conversely when online the transaction id is passed as session_id) + info->mTransactionID = session_id.isNull() ? aux_id : session_id; + info->mIM = dialog; info->mFromID = from_id; info->mFromGroup = from_group; - info->mTransactionID = session_id; info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType)); info->mFromName = name; -- cgit v1.2.3 From 00cad756a2c83fc80135a2bad3c2ef5a13168520 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 2 Oct 2019 17:31:13 +0300 Subject: SL-11963 Notecard external Editor breaks the order of embeded content --- indra/newview/llpreviewnotecard.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 1533a27469..2f534ac245 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -367,6 +367,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, previewEditor->makePristine(); BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem()); preview->setEnabled(modifiable); + preview->syncExternal(); preview->mAssetStatus = PREVIEW_ASSET_LOADED; } else @@ -503,10 +504,6 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync) } editor->makePristine(); - if (sync) - { - syncExternal(); - } const LLInventoryItem* item = getItem(); // save it out to database if (item) @@ -755,6 +752,7 @@ void LLPreviewNotecard::openInExternalEditor() // Start watching file changes. mLiveFile = new LLLiveLSLFile(filename, boost::bind(&LLPreviewNotecard::onExternalChange, this, _1)); + mLiveFile->ignoreNextUpdate(); mLiveFile->addToEventTimer(); // Open it in external editor. -- cgit v1.2.3 From 06e316b0ad0b79f048852da14ff64e9213a7db31 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 7 Oct 2019 14:56:23 +0300 Subject: SL-11838 Resetting attach points was not resetting HUD --- indra/newview/llvoavatar.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1e4b5cc599..37ad7a53a8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2046,8 +2046,10 @@ void LLVOAvatar::resetSkeleton(bool reset_animations) LL_ERRS() << "Error resetting skeleton" << LL_ENDL; } - // Reset attachment points (buildSkeleton only does bones and CVs) - bool ignore_hud_joints = true; + // Reset attachment points + // BuildSkeleton only does bones and CVs but we still need to reinit huds + // since huds can be animated. + bool ignore_hud_joints = !isSelf(); initAttachmentPoints(ignore_hud_joints); // Fix up collision volumes @@ -6577,7 +6579,7 @@ void LLVOAvatar::initAttachmentPoints(bool ignore_hud_joints) LLAvatarXmlInfo::LLAvatarAttachmentInfo *info = *iter; if (info->mIsHUDAttachment && (!isSelf() || ignore_hud_joints)) { - //don't process hud joint for other avatars, or when doing a skeleton reset. + //don't process hud joint for other avatars. continue; } -- cgit v1.2.3 From 607f34699301af95610ce4a0d72750e61b778a0e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 7 Oct 2019 20:37:07 +0300 Subject: SL-9116 Implemented sound cut-off for llSetSoundRadius --- indra/newview/llaudiosourcevo.cpp | 98 +++++++++++++++++++++++++++++++-------- indra/newview/llaudiosourcevo.h | 4 ++ indra/newview/llviewerobject.cpp | 7 +++ indra/newview/llviewerobject.h | 2 + 4 files changed, 92 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp index b37aba6c15..4b6c855bde 100644 --- a/indra/newview/llaudiosourcevo.cpp +++ b/indra/newview/llaudiosourcevo.cpp @@ -29,8 +29,10 @@ #include "llaudiosourcevo.h" +#include "llagent.h" #include "llagentcamera.h" #include "llmutelist.h" +#include "llviewercontrol.h" #include "llviewerparcelmgr.h" LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp) @@ -54,6 +56,79 @@ void LLAudioSourceVO::setGain(const F32 gain) mGain = llclamp(gain, 0.f, 1.f); } +void LLAudioSourceVO::checkCutOffRadius() +{ + if (mSourceMuted // already muted by something, will be recalculated on update() + || !mObjectp) + { + return; + } + + F32 cutoff = mObjectp->getSoundCutOffRadius(); + if (cutoff < 0.1f) + { + // consider cutoff below 0.1m as off (to avoid near zero comparison) + return; + } + + LLVector3d pos_global = getPosGlobal(); + if (!isInCutOffRadius(pos_global, cutoff)) + { + mSourceMuted = true; + } +} + +LLVector3d LLAudioSourceVO::getPosGlobal() const +{ + if (mObjectp->isAttachment()) + { + LLViewerObject* parent = mObjectp; + while (parent && !parent->isAvatar()) + { + parent = (LLViewerObject*)parent->getParent(); + } + if (parent) + { + return parent->getPositionGlobal(); + } + } + else + { + return mObjectp->getPositionGlobal(); + } + return LLVector3d(); +} + +bool LLAudioSourceVO::isInCutOffRadius(const LLVector3d pos_global, const F32 cutoff) const +{ + static LLCachedControl ear_mode(gSavedSettings, "VoiceEarLocation", 0); + + LLVector3d pos_ear; + + switch (ear_mode()) + { + case 0: // camera + pos_ear = gAgentCamera.getCameraPositionGlobal(); + break; + + case 1: // avatar + case 2: + // voice support 'mixed' in '2' case with agent's position and camera's rotations + // but it is not defined in settings and uses camera as default + pos_ear = gAgent.getPositionGlobal(); + break; + + default: + pos_ear = gAgentCamera.getCameraPositionGlobal(); + break; + } + LLVector3d to_vec = pos_global - pos_ear; + + F32 dist = (F32)to_vec.magVec(); + + return dist < cutoff; +} + void LLAudioSourceVO::updateMute() { if (!mObjectp || mObjectp->isDead()) @@ -63,26 +138,11 @@ void LLAudioSourceVO::updateMute() } bool mute = false; - LLVector3d pos_global; - - if (mObjectp->isAttachment()) - { - LLViewerObject* parent = mObjectp; - while (parent && !parent->isAvatar()) - { - parent = (LLViewerObject*)parent->getParent(); - } - if (parent) - { - pos_global = parent->getPositionGlobal(); - } - } - else - { - pos_global = mObjectp->getPositionGlobal(); - } + LLVector3d pos_global = getPosGlobal(); - if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) + F32 cutoff = mObjectp->getSoundCutOffRadius(); + if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off + || !LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) { mute = true; } diff --git a/indra/newview/llaudiosourcevo.h b/indra/newview/llaudiosourcevo.h index f1d8ef4528..672a07f7d3 100644 --- a/indra/newview/llaudiosourcevo.h +++ b/indra/newview/llaudiosourcevo.h @@ -41,7 +41,11 @@ public: /*virtual*/ void update(); /*virtual*/ void setGain(const F32 gain); + void checkCutOffRadius(); + private: + LLVector3d getPosGlobal() const; + bool isInCutOffRadius(LLVector3d pos_global, const F32 cutoff) const; void updateMute(); private: diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 8d7bfa42ed..bc0a151670 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -268,6 +268,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mData(NULL), mAudioSourcep(NULL), mAudioGain(1.f), + mSoundCutOffRadius(0.f), mAppAngle(0.f), mPixelArea(1024.f), mInventory(NULL), @@ -1245,6 +1246,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, LLUUID audio_uuid; LLUUID owner_id; // only valid if audio_uuid or particle system is not null F32 gain; + F32 cutoff; U8 sound_flags; mesgsys->getU32Fast( _PREHASH_ObjectData, _PREHASH_CRC, crc, block_num); @@ -1253,6 +1255,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // HACK: Owner id only valid if non-null sound id or particle system mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id, block_num ); mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Gain, gain, block_num ); + mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Radius, cutoff, block_num ); mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Flags, sound_flags, block_num ); mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Material, material, block_num ); mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_ClickAction, click_action, block_num); @@ -1261,6 +1264,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num, MAX_OBJECT_BINARY_DATA_SIZE); mTotalCRC = crc; + mSoundCutOffRadius = cutoff; // Owner ID used for sound muting or particle system muting setAttachedSound(audio_uuid, owner_id, gain, sound_flags); @@ -1957,6 +1961,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } mTotalCRC = crc; + mSoundCutOffRadius = cutoff; setAttachedSound(sound_uuid, owner_id, gain, sound_flags); @@ -5912,6 +5917,8 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow if( gAgent.canAccessMaturityAtGlobal(this->getPositionGlobal()) ) { //LL_INFOS() << "Playing attached sound " << audio_uuid << LL_ENDL; + // recheck cutoff radius in case this update was an object-update with new value + mAudioSourcep->checkCutOffRadius(); mAudioSourcep->play(audio_uuid); } } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index e9ae26939a..03c5403a1e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -403,6 +403,7 @@ public: // Owner id is this object's owner void setAttachedSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, const U8 flags); void adjustAudioGain(const F32 gain); + F32 getSoundCutOffRadius() const { return mSoundCutOffRadius; } void clearAttachedSound() { mAudioSourcep = NULL; } // Create if necessary @@ -790,6 +791,7 @@ protected: LLPointer mPartSourcep; // Particle source associated with this object. LLAudioSourceVO* mAudioSourcep; F32 mAudioGain; + F32 mSoundCutOffRadius; F32 mAppAngle; // Apparent visual arc in degrees F32 mPixelArea; // Apparent area in pixels -- cgit v1.2.3 From 951a1dfa021043459e789bee6c7643eec6c60b80 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 8 Oct 2019 11:08:11 +0300 Subject: SL-8234 FIXED Snapshot Freeze frame creates a white stripe on Navbar --- indra/newview/llsnapshotlivepreview.cpp | 40 +++++---------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f5fea9dece..0bba495174 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -65,6 +65,7 @@ F32 SHINE_WIDTH = 0.6f; F32 SHINE_OPACITY = 0.3f; F32 FALL_TIME = 0.6f; S32 BORDER_WIDTH = 6; +S32 TOP_PANEL_HEIGHT = 30; const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 @@ -295,8 +296,8 @@ void LLSnapshotLivePreview::draw() F32 uv_width = isImageScaled() ? 1.f : llmin((F32)getWidth() / (F32)getCurrentImage()->getWidth(), 1.f); F32 uv_height = isImageScaled() ? 1.f : llmin((F32)getHeight() / (F32)getCurrentImage()->getHeight(), 1.f); gGL.pushMatrix(); - { - gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f); + { + gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom + TOP_PANEL_HEIGHT, 0.f); gGL.begin(LLRender::QUADS); { gGL.texCoord2f(uv_width, uv_height); @@ -348,14 +349,15 @@ void LLSnapshotLivePreview::draw() F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME); // draw "shine" effect - LLLocalClipRect clip(getLocalRect()); + LLRect local_rect(0, getRect().getHeight() + TOP_PANEL_HEIGHT, getRect().getWidth(), 0); + LLLocalClipRect clip(local_rect); { // draw diagonal stripe with gradient that passes over screen S32 x1 = gViewerWindow->getWindowWidthScaled() * ll_round((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f))); S32 x2 = x1 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); S32 x3 = x2 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH); S32 y1 = 0; - S32 y2 = gViewerWindow->getWindowHeightScaled(); + S32 y2 = gViewerWindow->getWindowHeightScaled() + TOP_PANEL_HEIGHT; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.begin(LLRender::QUADS); @@ -385,36 +387,6 @@ void LLSnapshotLivePreview::draw() } } - // draw framing rectangle - { - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.color4f(1.f, 1.f, 1.f, 1.f); - const LLRect& outline_rect = getImageRect(); - gGL.begin(LLRender::QUADS); - { - gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); - gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); - gGL.vertex2i(outline_rect.mRight, outline_rect.mTop); - gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop); - - gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom); - gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom); - gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH); - gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH); - - gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop); - gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom); - gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH); - gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); - - gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom); - gGL.vertex2i(outline_rect.mRight, outline_rect.mTop); - gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); - gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH); - } - gGL.end(); - } - // draw old image dropping away if (mFallAnimTimer.getStarted()) { -- cgit v1.2.3 From 4543d5d5ccb6289b870e2c0c80b11f448c97f096 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 8 Oct 2019 18:33:10 +0300 Subject: SL-12062 FIXED The 'voice volume' slider in IM does not change the personal volume of user --- indra/newview/llconversationview.cpp | 2 +- indra/newview/lloutputmonitorctrl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 0075b62100..60a5204547 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -175,7 +175,7 @@ BOOL LLConversationViewSession::postBuild() LLAvatarIconCtrl* icon = mItemPanel->getChild("avatar_icon"); icon->setVisible(true); icon->setValue(session->mOtherParticipantID); - mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); + mSpeakingIndicator->setSpeakerId(session->mOtherParticipantID, session->mSessionID, true); mHasArrow = false; } break; diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 7f6c065bb9..e9fe493d7e 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -245,11 +245,11 @@ void LLOutputMonitorCtrl::draw() // virtual BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask) { - if (mSpeakerId != gAgentID && !mShowParticipantsSpeaking) + if (mSpeakerId != gAgentID) { LLFloaterReg::showInstance("floater_voice_volume", LLSD().with("avatar_id", mSpeakerId)); } - else if(mShowParticipantsSpeaking) + else if (mShowParticipantsSpeaking) { LLFloaterReg::showInstance("chat_voice", LLSD()); } -- cgit v1.2.3 From f2d92b05b812d56226e6548e12eed5c0a3e15b81 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 10 Oct 2019 10:58:14 +0300 Subject: SL-12087 FIXED Values for physical preset (wood, stone, metal, etc.) in build tool don't update unless the edited object is reselected. --- indra/newview/llpanelvolume.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 735eaa423d..58bc049338 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -82,8 +82,11 @@ #include -// "Features" Tab +const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f; +const F32 DEFAULT_DENSITY = 1000.f; + +// "Features" Tab BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters @@ -830,7 +833,7 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data) // static void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) { - //LLPanelObject* self = (LLPanelObject*) userdata; + LLPanelVolume* self = (LLPanelVolume*)userdata; LLComboBox* box = (LLComboBox*) ctrl; if (box) @@ -841,6 +844,19 @@ void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) if (material_name != LEGACY_FULLBRIGHT_DESC) { U8 material_code = LLMaterialTable::basic.getMCode(material_name); + if (self) + { + LLViewerObject* objectp = self->mObject; + if (objectp) + { + objectp->setPhysicsGravity(DEFAULT_GRAVITY_MULTIPLIER); + objectp->setPhysicsFriction(LLMaterialTable::basic.getFriction(material_code)); + //currently density is always set to 1000 serverside regardless of chosen material, + //actual material density should be used here, if this behavior change + objectp->setPhysicsDensity(DEFAULT_DENSITY); + objectp->setPhysicsRestitution(LLMaterialTable::basic.getRestitution(material_code)); + } + } LLSelectMgr::getInstance()->selectionSetMaterial(material_code); } } -- cgit v1.2.3 From 1b19a88e84241986ef81ddf145288103a7003d27 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 14 Oct 2019 16:13:07 +0300 Subject: SL-12067 Don't allow to send L$ gifts to Null UUID --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5b9c39af9f..3998a6af15 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -374,6 +374,11 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL; if(can_afford_transaction(amount)) { + if (uuid.isNull()) + { + LL_WARNS() << "Failed to send L$ gift to to Null UUID." << LL_ENDL; + return; + } // gStatusBar->debitBalance(amount); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoneyTransferRequest); -- cgit v1.2.3 From 48e282947f424701465cae6dc095e73387e3e863 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 15 Oct 2019 17:25:26 +0300 Subject: SL-11986 Mesh Uploader does not report Upload cost on fee-failure --- indra/newview/llfloatermodelpreview.cpp | 29 +++++++++++++++++++++++++---- indra/newview/llfloatermodelpreview.h | 4 +++- indra/newview/llfloatermodeluploadbase.h | 2 +- indra/newview/llmeshrepository.cpp | 4 ++-- indra/newview/lluploadfloaterobservers.h | 2 +- 5 files changed, 32 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 7705c1a76f..74925caed4 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -433,7 +433,7 @@ void LLFloaterModelPreview::initModelPreview() mModelPreview = new LLModelPreview(512, 512, this ); mModelPreview->setPreviewTarget(16.f); mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5)); - mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1)); + mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::modelUpdated, this, _1)); } void LLFloaterModelPreview::onViewOptionChecked(LLUICtrl* ctrl) @@ -510,7 +510,8 @@ void LLFloaterModelPreview::onClickCalculateBtn() mModelPreview->getPreviewAvatar()->showAttachmentOverrides(); } - mUploadModelUrl.clear(); + mUploadModelUrl.clear(); + mModelPhysicsFee.clear(); gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale, childGetValue("upload_textures").asBoolean(), @@ -4439,6 +4440,12 @@ void LLFloaterModelPreview::toggleCalculateButton() toggleCalculateButton(true); } +void LLFloaterModelPreview::modelUpdated(bool calculate_visible) +{ + mModelPhysicsFee.clear(); + toggleCalculateButton(calculate_visible); +} + void LLFloaterModelPreview::toggleCalculateButton(bool visible) { mCalculateBtn->setVisible(visible); @@ -4464,7 +4471,10 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) childSetTextArg("download_weight", "[ST]", tbd); childSetTextArg("server_weight", "[SIM]", tbd); childSetTextArg("physics_weight", "[PH]", tbd); - childSetTextArg("upload_fee", "[FEE]", tbd); + if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.emptyMap()) + { + childSetTextArg("upload_fee", "[FEE]", tbd); + } childSetTextArg("price_breakdown", "[STREAMING]", tbd); childSetTextArg("price_breakdown", "[PHYSICS]", tbd); childSetTextArg("price_breakdown", "[INSTANCES]", tbd); @@ -4524,10 +4534,21 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived() mUploadBtn->setEnabled(isModelUploadAllowed()); } -void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) +void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) { LL_WARNS() << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << LL_ENDL; doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true)); + + if (result.has("upload_price")) + { + mModelPhysicsFee = result; + childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger())); + childSetVisible("upload_fee", true); + } + else + { + mModelPhysicsFee.clear(); + } } /*virtual*/ diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index edc90d1695..1c66570650 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -125,7 +125,7 @@ public: /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url); void handleModelPhysicsFeeReceived(); - /*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason); + /*virtual*/ void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result); /*virtual*/ void onModelUploadSuccess(); @@ -208,6 +208,8 @@ private: void onLoDSourceCommit(S32 lod); + void modelUpdated(bool calculate_visible); + // Toggles between "Calculate weights & fee" and "Upload" buttons. void toggleCalculateButton(bool visible); diff --git a/indra/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h index 0d4c834122..721fce059e 100644 --- a/indra/newview/llfloatermodeluploadbase.h +++ b/indra/newview/llfloatermodeluploadbase.h @@ -45,7 +45,7 @@ public: virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0; - virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) = 0; + virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) = 0; virtual void onModelUploadSuccess() {}; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 31e3d408d7..95322cce6d 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2772,7 +2772,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp if (observer) { - observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason); + observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]); } } else @@ -2805,7 +2805,7 @@ void LLMeshUploadThread::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResp if (observer) { - observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason); + observer->setModelPhysicsFeeErrorStatus(status.toULong(), reason, body["error"]); } } } diff --git a/indra/newview/lluploadfloaterobservers.h b/indra/newview/lluploadfloaterobservers.h index 15c3dad38e..77e950a1c9 100644 --- a/indra/newview/lluploadfloaterobservers.h +++ b/indra/newview/lluploadfloaterobservers.h @@ -53,7 +53,7 @@ public: virtual ~LLWholeModelFeeObserver() {} virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0; - virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason) = 0; + virtual void setModelPhysicsFeeErrorStatus(S32 status, const std::string& reason, const LLSD& result) = 0; LLHandle getWholeModelFeeObserverHandle() const { return mWholeModelFeeObserverHandle; } -- cgit v1.2.3 From 20c21bfcb359ab59bb334807907f03402a4b6ca1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 16 Oct 2019 19:40:05 +0300 Subject: SL-12110 FIXED Location bar is corrupted for a parcel if its name begins with empty space --- indra/newview/lllocationinputctrl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 11bc1425f9..638daef598 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -1100,9 +1100,7 @@ void LLLocationInputCtrl::changeLocationPresentation() //change location presentation only if user does not select/paste anything and //human-readable region name is being displayed - std::string text = mTextEntry->getText(); - LLStringUtil::trim(text); - if(!mTextEntry->hasSelection() && text == mHumanReadableLocation) + if(!mTextEntry->hasSelection() && mTextEntry->getText() == mHumanReadableLocation) { //needs unescaped one LLSLURL slurl; -- cgit v1.2.3 From 96c78187c19352159e4bd1ea111a2764c13d01ea Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 17 Oct 2019 14:48:31 +0300 Subject: SL-12129 FIXED Object IMs doesn't react to an instant message from an object. --- indra/newview/llimprocessing.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 24f40c8182..0294b17991 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -62,6 +62,8 @@ #pragma warning (disable:4702) #endif +extern void on_new_message(const LLSD& msg); + // Strip out "Resident" for display, but only if the message came from a user // (rather than a script) static std::string clean_name_from_im(const std::string& name, EInstantMessage type) @@ -1007,6 +1009,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + if (message != "") + { + LLSD msg_notify; + msg_notify["session_id"] = LLUUID(); + msg_notify["from_id"] = chat.mFromID; + msg_notify["source_type"] = chat.mSourceType; + on_new_message(msg_notify); + } } -- cgit v1.2.3 From aab8ea7236e01f279c33eb1839ac2e0c4a1f9829 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 17 Oct 2019 19:15:02 +0300 Subject: SL-12121 FIXED Unable to delete folders from 'Marketplace listings' --- indra/newview/llinventorybridge.cpp | 7 ++++++- indra/newview/llmarketplacefunctions.cpp | 5 +++++ indra/newview/llmarketplacefunctions.h | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6d2d533c9d..16d39205fc 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2270,7 +2270,7 @@ public: // Can be destroyed (or moved to trash) BOOL LLFolderBridge::isItemRemovable() const { - if (!get_is_category_removable(getInventoryModel(), mUUID) || isMarketplaceListingsFolder()) + if (!get_is_category_removable(getInventoryModel(), mUUID)) { return FALSE; } @@ -2287,6 +2287,11 @@ BOOL LLFolderBridge::isItemRemovable() const } } + if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) + { + return FALSE; + } + return TRUE; } diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index a0e19f2d19..26977593f4 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -1294,6 +1294,11 @@ void LLMarketplaceData::setSLMDataFetched(U32 status) } } +bool LLMarketplaceData::isSLMDataFetched() +{ + return mMarketPlaceDataFetched == MarketplaceFetchCodes::MARKET_FETCH_DONE; +} + // Creation / Deletion / Update // Methods publicly called bool LLMarketplaceData::createListing(const LLUUID& folder_id) diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index ec312baca3..fee9225f77 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -204,7 +204,9 @@ public: void setDataFetchedSignal(const status_updated_signal_t::slot_type& cb); void setSLMDataFetched(U32 status); U32 getSLMDataFetched() { return mMarketPlaceDataFetched; } - + + bool isSLMDataFetched(); + // High level create/delete/set Marketplace data: each method returns true if the function succeeds, false if error bool createListing(const LLUUID& folder_id); bool activateListing(const LLUUID& folder_id, bool activate, S32 depth = -1); -- cgit v1.2.3 From 3631057bfabab170798ab377e48151d327479aa4 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 17 Oct 2019 21:58:18 +0300 Subject: Line endings fix --- indra/newview/llinventorybridge.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 16d39205fc..36784ce3f9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2287,9 +2287,9 @@ BOOL LLFolderBridge::isItemRemovable() const } } - if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) - { - return FALSE; + if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) + { + return FALSE; } return TRUE; -- cgit v1.2.3 From 63a3d9b4d99d244481dbd33c184d3ff8039ca7ad Mon Sep 17 00:00:00 2001 From: NiranV Date: Wed, 4 Sep 2019 04:23:42 +0200 Subject: SL-12104 Fixed: Oversized snapshots being broken. --- indra/newview/llviewerwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 72df31cb5f..a7601fc30c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4719,7 +4719,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) { - if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true)) + U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA; + if (scratch_space.allocate(image_width, image_height, color_fmt, true, true)) { original_width = gPipeline.mDeferredScreen.getWidth(); original_height = gPipeline.mDeferredScreen.getHeight(); -- cgit v1.2.3 From e13a1ccdaa015bc392a65f82a23303ee8c71deac Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 4 Sep 2019 17:39:26 +0300 Subject: SL-11217 Show confirmation when replacing skin,shape,eyes or hairbase with item which doesn't match the type. --- indra/newview/llfloaterlinkreplace.cpp | 85 ++++++++++++++++------ indra/newview/llfloaterlinkreplace.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 14 ++++ 3 files changed, 76 insertions(+), 24 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index 10cce3bd22..595d584799 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -32,6 +32,8 @@ #include "llagent.h" #include "llappearancemgr.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" +#include "llnotifications.h" #include "lltextbox.h" #include "llviewercontrol.h" @@ -142,37 +144,72 @@ void LLFloaterLinkReplace::onStartClicked() LL_WARNS() << "Cannot replace. Source and target are identical." << LL_ENDL; return; } + + const LLUUID& source_item_id = gInventory.getLinkedItemID(mSourceUUID); + LLViewerInventoryItem *source_item = gInventory.getItem(source_item_id); + const LLUUID& target_item_id = gInventory.getLinkedItemID(mTargetUUID); + LLViewerInventoryItem *target_item = gInventory.getItem(target_item_id); - LLInventoryModel::cat_array_t cat_array; - LLLinkedItemIDMatches is_linked_item_match(mSourceUUID); - gInventory.collectDescendentsIf(gInventory.getRootFolderID(), - cat_array, - mRemainingInventoryItems, - LLInventoryModel::INCLUDE_TRASH, - is_linked_item_match); - LL_INFOS() << "Found " << mRemainingInventoryItems.size() << " inventory links that need to be replaced." << LL_ENDL; - if (mRemainingInventoryItems.size() > 0) + LLNotification::Params params("ConfirmReplaceLink"); + params.functor.function(boost::bind(&LLFloaterLinkReplace::onStartClickedResponse, this, _1, _2)); + if (source_item && source_item->isWearableType() && source_item->getWearableType() <= LLWearableType::WT_EYES) { - LLViewerInventoryItem* target_item = gInventory.getItem(mTargetUUID); - if (target_item) + if(target_item && target_item->isWearableType() && source_item->getWearableType() == target_item->getWearableType()) { - mRemainingItems = (U32)mRemainingInventoryItems.size(); - - LLStringUtil::format_map_t args; - args["NUM"] = llformat("%d", mRemainingItems); - mStatusText->setText(getString("ItemsRemaining", args)); - - mStartBtn->setEnabled(FALSE); - mRefreshBtn->setEnabled(FALSE); - - mEventTimer.start(); - tick(); + LLNotifications::instance().forceResponse(params, 0); } else { - mStatusText->setText(getString("TargetNotFound")); - LL_WARNS() << "Link replace target not found." << LL_ENDL; + LLSD args; + args["TYPE"] = LLWearableType::getTypeName(source_item->getWearableType()); + params.substitutions(args); + LLNotifications::instance().add(params); + } + } + else + { + LLNotifications::instance().forceResponse(params, 0); + } +} + +void LLFloaterLinkReplace::onStartClickedResponse(const LLSD& notification, const LLSD& response) +{ + + if (LLNotificationsUtil::getSelectedOption(notification, response) == 0) + { + + LLInventoryModel::cat_array_t cat_array; + LLLinkedItemIDMatches is_linked_item_match(mSourceUUID); + gInventory.collectDescendentsIf(gInventory.getRootFolderID(), + cat_array, + mRemainingInventoryItems, + LLInventoryModel::INCLUDE_TRASH, + is_linked_item_match); + LL_INFOS() << "Found " << mRemainingInventoryItems.size() << " inventory links that need to be replaced." << LL_ENDL; + + if (mRemainingInventoryItems.size() > 0) + { + LLViewerInventoryItem* target_item = gInventory.getItem(mTargetUUID); + if (target_item) + { + mRemainingItems = (U32)mRemainingInventoryItems.size(); + + LLStringUtil::format_map_t args; + args["NUM"] = llformat("%d", mRemainingItems); + mStatusText->setText(getString("ItemsRemaining", args)); + + mStartBtn->setEnabled(FALSE); + mRefreshBtn->setEnabled(FALSE); + + mEventTimer.start(); + tick(); + } + else + { + mStatusText->setText(getString("TargetNotFound")); + LL_WARNS() << "Link replace target not found." << LL_ENDL; + } } } } diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h index dd5c301206..060773f93e 100644 --- a/indra/newview/llfloaterlinkreplace.h +++ b/indra/newview/llfloaterlinkreplace.h @@ -94,6 +94,7 @@ public: private: void checkEnableStart(); void onStartClicked(); + void onStartClickedResponse(const LLSD& notification, const LLSD& response); void decreaseOpenItemCount(); void updateFoundLinks(); void processBatch(LLInventoryModel::item_array_t items); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index fd9a3f12e8..874fbe19fd 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6166,6 +6166,20 @@ Are you sure you want to permanently delete the contents of your Lost And Found? yestext="Yes"/> + +You're about to replace '[TYPE]' body part link with the item which doesn't match the type. +Are you sure you want to proceed? + confirm + + + Date: Thu, 5 Sep 2019 12:04:11 +0300 Subject: =?UTF-8?q?SL-11867=20FIXED=20[ES][FR][IT]=20The=20text=20?= =?UTF-8?q?=E2=80=9CUnable=20to=20buy=E2=80=9D=20goes=20beyond=20the=20des?= =?UTF-8?q?cription=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/skins/default/xui/es/floater_buy_currency.xml | 2 +- indra/newview/skins/default/xui/fr/floater_buy_currency.xml | 2 +- indra/newview/skins/default/xui/it/floater_buy_currency.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency.xml b/indra/newview/skins/default/xui/es/floater_buy_currency.xml index 2c8848265f..dbff3fcf0e 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_currency.xml @@ -60,7 +60,7 @@ no el objeto.