From 681f6071c77af54ef565a1e4668dbc5a40a59696 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 5 Dec 2024 02:37:06 +0100 Subject: [PATCH] Add an option to show new inventory notification even if auto accept is enabled Suggested by Darkover Tone --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llimprocessing.cpp | 15 +++++++++++++-- .../default/xui/en/panel_preferences_privacy.xml | 9 +++++++++ .../default/xui/pl/panel_preferences_privacy.xml | 1 + indra/newview/skins/default/xui/pl/strings.xml | 8 +++++++- 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 39a79e063c..e2a34afacd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25209,6 +25209,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSShowAutoAcceptInventoryInNotifications + + Comment + If enabled, auto-accepted inventory items will be shown in notifications. + Persist + 1 + Type + Boolean + Value + 1 + FSStatusBarShowFPS Comment diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 005c119bd4..f1012682f4 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -405,7 +405,7 @@ void inventory_offer_handler(LLOfferInfo* info) LLPostponedNotification::add(p, info->mFromID, false); } // FIRE-19540: Log auto-accepted inventory to nearby chat - else if (gSavedSettings.getBOOL("FSLogAutoAcceptInventoryToChat")) + else if (gSavedSettings.getBOOL("FSLogAutoAcceptInventoryToChat") || gSavedSettings.getBOOL("FSShowAutoAcceptInventoryInNotifications")) { std::string message_type; LLStringUtil::format_map_t chat_args; @@ -438,7 +438,18 @@ void inventory_offer_handler(LLOfferInfo* info) message_type = "InvOfferAutoAcceptUser"; } - FSCommon::report_to_nearby_chat(LLTrans::getString(message_type, chat_args)); + std::string inv_offer_message = LLTrans::getString(message_type, chat_args); + if (gSavedSettings.getBOOL("FSLogAutoAcceptInventoryToChat")) + { + FSCommon::report_to_nearby_chat(inv_offer_message); + } + if (gSavedSettings.getBOOL("FSShowAutoAcceptInventoryInNotifications")) + { + LLSD args; + args["MESSAGE"] = inv_offer_message; + LLNotificationsUtil::add("IMSystemMessageTip", args); + } + make_ui_sound("UISndInventoryOffer"); } // diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 233cc814d5..1feddaa65d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -155,6 +155,15 @@ name="FSLogAutoAcceptInventoryToChat" top_pad="3" width="350" /> + + diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 83682683f0..e51b022574 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -2836,7 +2836,7 @@ Jeśli ciągle otrzymujesz tą wiadomość, to skontaktuj się z pomocą technic należący do nieznanego właściciela - dał Ci + dał/a Ci Odrzucono @@ -2847,6 +2847,12 @@ Jeśli ciągle otrzymujesz tą wiadomość, to skontaktuj się z pomocą technic od + + Obiekt o nazwie [OBJECT_NAME] dał Ci [OBJECT_TYPE]: [DESC] + + + [USER_NAME] dał/a Ci [OBJECT_TYPE]: [DESC] + Suma