summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-10-07 10:42:31 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-10-07 10:42:31 -0700
commit2ed5f04b99c4805b8adda9745811e82616d61c9b (patch)
tree808587517ec2b7e0e2fffdf7d3aca12daab3b16a /indra
parent7c47576f02e2e5f1300e786b8868a0697554f69a (diff)
Adding viewer hint for setting display name the when edit profile is opened with no display name set
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/ignorable_dialogs.xml11
-rw-r--r--indra/newview/llfirstuse.cpp6
-rw-r--r--indra/newview/llfirstuse.h1
-rw-r--r--indra/newview/llpanelme.cpp22
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
5 files changed, 46 insertions, 2 deletions
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml
index 0720ccee49..9ddf007ce7 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 dd08706f4f..b08c113923 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -117,6 +117,12 @@ void LLFirstUse::notMoving(bool enable)
}
// 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)
{
firstUseNotification("FirstReceiveLindens", enable, "HintLindenDollar", LLSD(), LLSD().with("target", "linden_balance").with("direction", "bottom"));
diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h
index 275f134400..3b7ff6383b 100644
--- a/indra/newview/llfirstuse.h
+++ b/indra/newview/llfirstuse.h
@@ -91,6 +91,7 @@ public:
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 79d5195ccf..3cc6b32678 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 efd6ed0ac8..88b5613880 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6538,6 +6538,14 @@ Mute everyone?
</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"
type="hint"