diff options
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r-- | indra/newview/llimprocessing.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
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<LLPostponedOfferNotification>(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<LLPostponedOfferNotification>(p, info->mFromID, false); + } } LLFirstUse::newInventory(); |