From 3a1ae84c26cb12b9089a061cf59c7966d6c6e3f4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 26 Sep 2023 22:15:03 +0300 Subject: SL-15039 Restored couple settings that are still in use by TPVs --- indra/newview/llimprocessing.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'indra/newview/llimprocessing.cpp') diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index a1a82fef7b..948793681d 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -189,6 +189,18 @@ void inventory_offer_handler(LLOfferInfo* info) return; } + bool bAutoAccept(false); + // Avoid the Accept/Discard dialog if the user so desires. JC + if (gSavedSettings.getBOOL("AutoAcceptNewInventory") + && (info->mType == LLAssetType::AT_NOTECARD + || info->mType == LLAssetType::AT_LANDMARK + || info->mType == LLAssetType::AT_TEXTURE)) + { + // For certain types, just accept the items into the inventory, + // and possibly open them on receipt depending upon "ShowNewInventory". + bAutoAccept = true; + } + // Strip any SLURL from the message display. (DEV-2754) std::string msg = info->mDesc; int indx = msg.find(" ( http://slurl.com/secondlife/"); @@ -254,7 +266,7 @@ void inventory_offer_handler(LLOfferInfo* info) LLNotification::Params p; // Object -> Agent Inventory Offer - if (info->mFromObject) + if (info->mFromObject && !bAutoAccept) { // Inventory Slurls don't currently work for non agent transfers, so only display the object name. args["ITEM_SLURL"] = msg; @@ -300,10 +312,13 @@ void inventory_offer_handler(LLOfferInfo* info) send_do_not_disturb_message(gMessageSystem, info->mFromID); } - // Inform user that there is a script floater via toast system - payload["give_inventory_notification"] = TRUE; - p.payload = payload; - LLPostponedNotification::add(p, info->mFromID, false); + if (!bAutoAccept) // if we auto accept, do not pester the user + { + // Inform user that there is a script floater via toast system + payload["give_inventory_notification"] = TRUE; + p.payload = payload; + LLPostponedNotification::add(p, info->mFromID, false); + } } LLFirstUse::newInventory(); -- cgit v1.2.3