FIRE-15746: Add option to show block report in nearby chat

Ansariel 2015-03-22 15:54:10 +01:00
parent 620977bf48
commit 9146989ec2
6 changed files with 52 additions and 1 deletions

View File

@ -23204,6 +23204,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>FSReportBlockToNearbyChat</key>
<map>
<key>Comment</key>
<string>Reports changes to the blocklist in nearby chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -59,6 +59,9 @@
#include "llviewerobjectlist.h"
#include "lltrans.h"
#include "llviewercontrol.h"
#include "fscommon.h"
namespace
{
// This method is used to return an object to mute given an object id.
@ -346,6 +349,15 @@ void LLMuteList::updateAdd(const LLMute& mute)
gAgent.sendReliableMessage();
mIsLoaded = TRUE; // why is this here? -MG
// <FS:Ansariel> FIRE-15746: Show block report in nearby chat
if (gSavedSettings.getBOOL("FSReportBlockToNearbyChat"))
{
LLStringUtil::format_map_t args;
args["NAME"] = mute.mName;
reportToNearbyChat(LLTrans::getString("Mute_Add", args));
}
// </FS:Ansariel>
}
@ -444,6 +456,15 @@ void LLMuteList::updateRemove(const LLMute& mute)
msg->addUUIDFast(_PREHASH_MuteID, mute.mID);
msg->addString("MuteName", mute.mName);
gAgent.sendReliableMessage();
// <FS:Ansariel> FIRE-15746: Show block report in nearby chat
if (gSavedSettings.getBOOL("FSReportBlockToNearbyChat"))
{
LLStringUtil::format_map_t args;
args["NAME"] = mute.mName;
reportToNearbyChat(LLTrans::getString("Mute_Remove", args));
}
// </FS:Ansariel>
}
void notify_automute_callback(const LLUUID& agent_id, const std::string& full_name, bool is_group, LLMuteList::EAutoReason reason)

View File

@ -12,6 +12,7 @@
<check_box label="Wenn ich beim Hochladen Geld bezahlen muss" name="FSShowUploadPaymentToast"/>
<check_box label="Wenn eine Landmarke erstellt wurde" name="landmark_created_checkbox"/>
<check_box label="Wenn jemand seinen Displaynamen ändert" name="FSShowDisplayNameUpdateNotification"/>
<check_box label="Wenn ich jemanden blockiere oder freischalte" name="FSReportBlockToNearbyChat"/>
<check_box label="Skriptfehler anzeigen in:" name="show_script_errors"/>
<radio_group name="show_script_errors_location">
<radio_item label="Lokaler Chat" name="script_0"/>

View File

@ -6170,4 +6170,10 @@ Setzen Sie den Editorpfad in Anführungszeichen
<string name="FSRegionRestartInLocalChat">
Die Region, in der Sie sich gerade befinden, ist dabei neu zu starten. Falls Sie in dieser Region bleiben, werden Sie ausgeloggt.
</string>
<string name="Mute_Add">
„[NAME]“ has been added to the blocklist.
</string>
<string name="Mute_Remove">
„[NAME]“ has been removed from the blocklist.
</string>
</strings>

View File

@ -91,6 +91,16 @@
left="10"
top_pad="2"
name="FSShowDisplayNameUpdateNotification"
width="180" />
<check_box
control_name="FSReportBlockToNearbyChat"
height="16"
label="When I block or unblock somebody"
layout="topleft"
left="10"
top_pad="2"
name="FSReportBlockToNearbyChat"
width="180" />
<check_box

View File

@ -2551,7 +2551,7 @@ Try enclosing path to the editor with double quotes.
<!-- Settings sanity checks -->
<string name="SanityCheckEquals">The settings control &quot;[CONTROL_NAME]&quot; should be at [VALUE_1].</string>
<string name="SanityCheckNotEquals">The settings control&quot;[CONTROL_NAME]&quot; should not be set to [VALUE_1].</string>
<string name="SanityCheckNotEquals">The settings control &quot;[CONTROL_NAME]&quot; should not be set to [VALUE_1].</string>
<string name="SanityCheckLessThan">The settings control &quot;[CONTROL_NAME]&quot; should be lower than [VALUE_1].</string>
<string name="SanityCheckGreaterThan">The settings control &quot;[CONTROL_NAME]&quot; should be higher than [VALUE_1].</string>
<string name="SanityCheckBetween">The settings control &quot;[CONTROL_NAME]&quot; should be between [VALUE_1] and [VALUE_2].</string>
@ -2775,4 +2775,6 @@ Try enclosing path to the editor with double quotes.
<string name="FSRegionRestartInLocalChat">The region you are in now is about to restart. If you stay in this region you will be logged out.</string>
<string name="Mute_Add">'[NAME]' has been added to the blocklist.</string>
<string name="Mute_Remove">'[NAME]' has been removed from the blocklist.</string>
</strings>