diff options
| author | Paul ProductEngine <pguslisty@productengine.com> | 2012-05-18 21:01:10 +0300 |
|---|---|---|
| committer | Paul ProductEngine <pguslisty@productengine.com> | 2012-05-18 21:01:10 +0300 |
| commit | d9cf4691a7369004a1ceeb11ca8d3262648c05e7 (patch) | |
| tree | bfeee25cbae98ba152afbb6c8e5aa4231c126431 /indra/newview/llviewermessage.cpp | |
| parent | f4edcdd4090cb6704603d5ef0dc8cf7a3f67399e (diff) | |
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
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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); } |
