summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-07 15:01:27 -0700
committerJames Cook <james@lindenlab.com>2010-05-07 15:01:27 -0700
commit5ad8364a68d64d2d921f4cf65dbab0eb7b03fc1d (patch)
treed84ac94b833f72dec54df79283e2ccb5bc333e9e
parent0e9faa3f0492f3ea1988377ee55c8b772d69ebed (diff)
DEV-49780 Better confirmation/failure messages for setting name
Reviewed with Callum
-rw-r--r--indra/newview/llpanelme.cpp8
-rw-r--r--indra/newview/llviewerdisplayname.cpp15
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml26
3 files changed, 33 insertions, 16 deletions
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index d4a54852cd..3e5fc7a482 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -311,6 +311,14 @@ void LLPanelMyProfileEdit::onCacheSetName(bool success,
{
if (success)
{
+ // Inform the user that the change took place, but will take a while
+ // to percolate.
+ LLSD args;
+ // *TODO: get estimated percolation time from service
+ S32 timeout_hours = 72;
+ args["HOURS"] = llformat("%d", timeout_hours);
+ LLNotificationsUtil::add("SetDisplayNameSuccess", args);
+
// Re-fetch my name, as it may have been sanitized by the service
LLAvatarNameCache::get(getAvatarId(),
boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 4122a112e5..bec2687cca 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -180,11 +180,16 @@ class LLDisplayNameUpdate : public LLHTTPNode
// force name tag to update
LLVOAvatar::invalidateNameTag(agent_id);
- LLSD args;
- args["OLD_NAME"] = old_display_name;
- args["SLID"] = av_name.mSLID;
- args["NEW_NAME"] = av_name.mDisplayName;
- LLNotificationsUtil::add("DisplayNameUpdate", args);
+ // Don't show a notification for my name, because we'll show a nicer
+ // dialog
+ if (agent_id != gAgent.getID())
+ {
+ LLSD args;
+ args["OLD_NAME"] = old_display_name;
+ args["SLID"] = av_name.mSLID;
+ args["NEW_NAME"] = av_name.mDisplayName;
+ LLNotificationsUtil::add("DisplayNameUpdate", args);
+ }
}
};
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 47c2e496bd..6d90ec901a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3055,32 +3055,36 @@ Change your display name?
<notification
icon="alertmodal.tga"
- name="SetDisplayNameFailedGeneric"
+ name="SetDisplayNameSuccess"
type="alertmodal">
- Sorry, we could not set your display name. Please try again later.
- </notification>
+Thanks for updating your name!
+Just like in real life, it takes a while for everyone to learn about a new name. Please allow [HOURS] hours for your name to update in object ownership, scripts, search, etc.
+ </notification>
+
<notification
icon="alertmodal.tga"
- name="AgentDisplayNameSetLindenFailed"
+ name="SetDisplayNameFailedGeneric"
type="alertmodal">
-Sorry, your display name cannot contain the word 'Linden'.
-
-Please try a different name.
+ Sorry, we could not set your display name. Please try again later.
</notification>
<notification
icon="alertmodal.tga"
- name="SetDisplayNameFailedThrottle"
+ name="AgentDisplayNameUpdateThresholdExceeded"
type="alertmodal">
- Sorry, you can only change your display name once every [FREQUENCY] hour(s).
+Sorry, you can only change your display name once every 24 hours.
+
+Please try again later.
</notification>
<notification
icon="alertmodal.tga"
- name="SetDisplayNameFailedUnavailable"
+ name="AgentDisplayNameSetBlocked"
type="alertmodal">
- Sorry, we could not set that display name. Please try a different name.
+ Sorry, we could not set your requested name because it contains a banned word.
+
+ Please try a different name.
</notification>
<notification