Made display name update notification optional (FIRE-3605)

Ansariel 2012-02-20 14:22:45 +01:00
parent 2b247cddf6
commit a3eee73b35
4 changed files with 35 additions and 5 deletions

View File

@ -16909,5 +16909,16 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>FSShowDisplayNameUpdateNotification</key>
<map>
<key>Comment</key>
<string>Show system notifications if somebody changes their display name.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@ -40,6 +40,7 @@
#include "llnotificationsutil.h"
#include "llui.h" // getLanguage()
#include "lggcontactsets.h"
#include "llviewercontrol.h"
namespace LLViewerDisplayName
{
@ -192,14 +193,22 @@ class LLDisplayNameUpdate : public LLHTTPNode
args["OLD_NAME"] = old_display_name;
args["SLID"] = av_name.mUsername;
args["NEW_NAME"] = av_name.mDisplayName;
if(LGGContactSets::getInstance()->hasPseudonym(agent_id))
if (LGGContactSets::getInstance()->hasPseudonym(agent_id))
{
LLSD payload;
payload["agent_id"] = agent_id;
LLNotificationsUtil::add("DisplayNameUpdateRemoveAlias", args, payload,
boost::bind(&LGGContactSets::callbackAliasReset, LGGContactSets::getInstance(), _1, _2));
}else
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
else
{
// <FS:Ansariel> Optional hiding of display name update notification
if (gSavedSettings.getBOOL("FSShowDisplayNameUpdateNotification"))
{
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
// </FS:Ansariel> Optional hiding of display name update notification
}
if (agent_id == gAgent.getID())
{
LLViewerDisplayName::sNameChangedSignal();

View File

@ -8,7 +8,8 @@
<check_box label="Wenn Freunde sich an- oder abmelden" name="friends_online_notify_checkbox" width="230"/>
<check_box label="Nur in lokalem Chat" name="OnlineOfflinetoNearbyChatHistory" left_pad="5"/>
<check_box name="OnlineOfflinetoNearbyChat" label="In lokalem Chat &amp; Console" width="160"/>
<check_box label="Wenn eine Landmarke erstellt wurde" name="landmark_created_checkbox"/>
<check_box label="Wenn eine Landmarke erstellt wurde" name="landmark_created_checkbox" width="230"/>
<check_box label="Wenn jemand seinen Displaynamen ändert" name="FSShowDisplayNameUpdateNotification" left_pad="0"/>
<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

@ -80,9 +80,18 @@
left="10"
name="landmark_created_checkbox"
top_pad="2"
width="190" />
width="210" />
<check_box
control_name="FSShowDisplayNameUpdateNotification"
height="16"
label="When somebody changes their display name"
layout="topleft"
left_pad="10"
name="FSShowDisplayNameUpdateNotification"
width="180" />
<check_box
control_name="ShowScriptErrors"
follows="left|top"
height="16"