diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml index 0720ccee49190d109c106e4daa57b9ad92a092f0..9ddf007ce7623516f99041e97ed40136d0d49100 100644 --- a/indra/newview/app_settings/ignorable_dialogs.xml +++ b/indra/newview/app_settings/ignorable_dialogs.xml @@ -45,6 +45,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>FirstDisplayName</key> + <map> + <key>Comment</key> + <string>Shows hint when edits profile for the first time</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>FirstReceiveLindens</key> <map> <key>Comment</key> diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index dd08706f4ff5ed839c02d24413e87b483b54daf5..b08c1139234788e50af96d45ee9ba8b20904417e 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -116,6 +116,12 @@ void LLFirstUse::notMoving(bool enable) firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top")); } +// static +void LLFirstUse::setDisplayName(bool enable) +{ + firstUseNotification("FirstDisplayName", enable, "HintDisplayName", LLSD(), LLSD().with("target", "set_display_name").with("direction", "left")); +} + // static void LLFirstUse::receiveLindens(bool enable) { diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index 275f134400fdb57ede1041754adb734219bd42bd..3b7ff6383b4b68b8080ef6b0957394f79796c0f8 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -91,6 +91,7 @@ class LLFirstUse static void notMoving(bool enable = true); static void newInventory(bool enable = true); static void receiveLindens(bool enable = true); + static void setDisplayName(bool enable = true); static void useSandbox(); protected: diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 79d5195ccf413828a47b49264f8d70adb596928c..3cc6b32678c78066989b367f337851780a745873 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -34,6 +34,8 @@ #include "llagent.h" #include "llagentcamera.h" #include "llagentwearables.h" +#include "llfirstuse.h" +#include "llhints.h" #include "llsidetray.h" #include "llviewercontrol.h" #include "llviewerdisplayname.h" @@ -190,8 +192,20 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key) set_name->setEnabled(use_display_names); // force new avatar name fetch so we have latest update time LLAvatarNameCache::fetch(gAgent.getID()); - LLPanelMyProfile::onOpen(getAvatarId()); + + LLAvatarName av_name; + if (LLAvatarNameCache::useDisplayNames()) + { + if (LLAvatarNameCache::get(gAgent.getID(), &av_name) && av_name.mIsDisplayNameDefault) + { + LLFirstUse::setDisplayName(); + } + else + { + LLFirstUse::setDisplayName(false); + } + } } void LLPanelMyProfileEdit::processProperties(void* data, EAvatarProcessorType type) @@ -258,6 +272,8 @@ BOOL LLPanelMyProfileEdit::postBuild() getChild<LLUICtrl>("set_name")->setCommitCallback( boost::bind(&LLPanelMyProfileEdit::onClickSetName, this)); + LLHints::registerHintTarget("set_display_name", getChild<LLUICtrl>("set_name")->getHandle()); + return LLPanelAvatarProfile::postBuild(); } /** @@ -386,7 +402,9 @@ void LLPanelMyProfileEdit::onClickSetName() { LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelMyProfileEdit::onAvatarNameCache, - this, _1, _2)); + this, _1, _2)); + + LLFirstUse::setDisplayName(false); } void LLPanelMyProfileEdit::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index efd6ed0ac872b9cdb062733b09edb669971aa77e..88b56138800c2bb30f80ce33e1b87ee4dca7347f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6537,6 +6537,14 @@ Mute everyone? To walk or run, open the Move Panel and use the directional arrows to navigate. You can also use the directional keys on your keyboard. </notification> + <notification + name="HintDisplayName" + label="Display Name" + type="hint" + unique="true"> + Set your customizable display name here. This is in addition to your unique username, which can't be changed. + </notification> + <notification name="HintInventory" label="Inventory"