From d9cf4691a7369004a1ceeb11ca8d3262648c05e7 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 18 May 2012 21:01:10 +0300 Subject: MAINT-938 ADDITIONAL FIX (Make debit-permissions dialog give a stronger warning) - Requested permissions are added dynamically to the dialog's footer - And the footer is not shown when it is empty --- indra/llui/llnotifications.cpp | 5 +++-- indra/newview/llviewermessage.cpp | 11 ++++++++++- indra/newview/skins/default/xui/en/notifications.xml | 4 +--- indra/newview/skins/default/xui/en/strings.xml | 1 + 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 1dc657f915..09480968a6 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -876,8 +876,9 @@ std::string LLNotification::getFooter() const if (!mTemplatep) return std::string(); - std::string message = mTemplatep->mFooter; - return message; + std::string footer = mTemplatep->mFooter; + LLStringUtil::format(footer, mSubstitutions); + return footer; } std::string LLNotification::getLabel() const diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2917fee62e..7d6370676e 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5972,16 +5972,21 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["OBJECTNAME"] = object_name; args["NAME"] = LLCacheName::cleanFullName(owner_name); + BOOL has_not_only_debit = questions ^ LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT]; // check the received permission flags against each permission for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) { if (questions & LSCRIPTRunTimePermissionBits[i]) { count++; - script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n"; // check whether permission question should cause special caution dialog caution |= (SCRIPT_QUESTION_IS_CAUTION[i]); + + if (("ScriptTakeMoney" == SCRIPT_QUESTIONS[i]) && has_not_only_debit) + continue; + + script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n"; } } args["QUESTIONS"] = script_question; @@ -5997,6 +6002,10 @@ void process_script_question(LLMessageSystem *msg, void **user_data) // check whether cautions are even enabled or not if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) { + if (caution) + { + args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : ""; + } // display the caution permissions prompt LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4e0f52b8fe..351e33c17c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6393,9 +6393,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not text="Deny"/> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9752652679..9e8aa11583 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -393,6 +393,7 @@ Please try logging in again in a minute. You will now be reconnected to Nearby Voice Chat '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been granted permission to: [PERMISSIONS]. '[OBJECTNAME]', an object owned by '[OWNERNAME]', located in [REGIONNAME] at [REGIONPOS], has been denied permission to: [PERMISSIONS]. + If you allow access to your account, you will also be allowing the object to: Take Linden dollars (L$) from you Act on your control inputs Remap your control inputs -- cgit v1.2.3