Feature Request: Ability to automatically accept all inventory offers
Replaces the exposed setting in popups preferences However, for users wanting the old behavior of just landmarks, notecards, and textures being automatically accepted, the original setting(AutoAcceptNewInventory) stays as is, it can be turned on and off in debug
This commit is contained in:
@@ -2336,6 +2336,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoAcceptAllNewInventory</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Automatically accept new inventory, regardless of type</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AutoAcceptNewInventory</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -60,7 +60,7 @@ BOOL LLPanelMsgs::postBuild()
|
||||
|
||||
buildPopupLists();
|
||||
|
||||
childSetValue("accept_new_inventory", gSavedSettings.getBOOL("AutoAcceptNewInventory"));
|
||||
childSetValue("accept_new_inventory", gSavedSettings.getBOOL("AutoAcceptAllNewInventory"));
|
||||
childSetValue("show_new_inventory", gSavedSettings.getBOOL("ShowNewInventory"));
|
||||
childSetValue("show_in_inventory", gSavedSettings.getBOOL("ShowInInventory"));
|
||||
|
||||
@@ -151,7 +151,7 @@ void LLPanelMsgs::buildPopupLists() //void LLFloaterPreference::buildPopupLists(
|
||||
|
||||
void LLPanelMsgs::apply()
|
||||
{
|
||||
gSavedSettings.setBOOL("AutoAcceptNewInventory", childGetValue("accept_new_inventory"));
|
||||
gSavedSettings.setBOOL("AutoAcceptAllNewInventory", childGetValue("accept_new_inventory"));
|
||||
gSavedSettings.setBOOL("ShowNewInventory", childGetValue("show_new_inventory"));
|
||||
gSavedSettings.setBOOL("ShowInInventory", childGetValue("show_in_inventory"));
|
||||
}
|
||||
|
||||
@@ -1684,6 +1684,13 @@ void inventory_offer_handler(LLOfferInfo* info)
|
||||
return;
|
||||
}
|
||||
|
||||
// If the user wants to, accept all offers of any kind
|
||||
if (gSavedSettings.getBOOL("AutoAcceptAllNewInventory"))
|
||||
{
|
||||
info->forceResponse(IOR_ACCEPT);
|
||||
return;
|
||||
}
|
||||
|
||||
// Avoid the Accept/Discard dialog if the user so desires. JC
|
||||
if (gSavedSettings.getBOOL("AutoAcceptNewInventory")
|
||||
&& (info->mType == LLAssetType::AT_NOTECARD
|
||||
|
||||
Reference in New Issue
Block a user