Display Name work

This commit is contained in:
Siana Gearz
2010-12-12 21:58:19 +01:00
parent a8ce4df93c
commit 9983d0b803
29 changed files with 525 additions and 134 deletions

View File

@@ -91,12 +91,19 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
mNextUpdate = next_update.secondsSinceEpoch();
}
std::string LLAvatarName::getCompleteName() const
std::string LLAvatarName::getCompleteName(bool linefeed) const
{
std::string name;
if (!mUsername.empty())
{
name = mDisplayName + " (" + mUsername + ")";
if (linefeed)
{
name = mDisplayName + "\n(" + mUsername + ")";
}
else
{
name = mDisplayName + " (" + mUsername + ")";
}
}
else
{

View File

@@ -45,7 +45,7 @@ public:
// For normal names, returns "James Linden (james.linden)"
// When display names are disabled returns just "James Linden"
std::string getCompleteName() const;
std::string getCompleteName(bool linefeed = false) const;
// Returns "James Linden" or "bobsmith123 Resident" for backwards
// compatibility with systems like voice and muting