summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-05-01 21:39:25 +0000
committerDon Kjer <don@lindenlab.com>2007-05-01 21:39:25 +0000
commit4ecb9cb63e4993b3b4bc65d73ed255139b5c3f75 (patch)
tree48d9bb9a1ae468ecdbd53cf21a598d66ee8eced3 /indra/newview/llnamelistctrl.cpp
parentf5e9ce7e47694e349a4eb28b052016b11e1bdf81 (diff)
svn merge -r 59163:61099 svn+ssh://svn/svn/linden/branches/release-candidate into release
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rw-r--r--indra/newview/llnamelistctrl.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index d8c2987470..bc451ecfc0 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -175,20 +175,28 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos
char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
- LLString fullname;
- if (gCacheName->getName(item->getUUID(), first, last))
- {
- fullname.assign(first);
- fullname.append(1, ' ');
- fullname.append(last);
- }
- else // didn't work as a resident name, try looking up as a group
+ // use supplied name by default
+ LLString fullname = value["name"].asString();
+ if (value["target"].asString() == "GROUP")
{
char group_name[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/
gCacheName->getGroupName(item->getUUID(), group_name);
// fullname will be "nobody" if group not found
fullname = group_name;
}
+ else if (value["target"].asString() == "SPECIAL")
+ {
+ // just use supplied name
+ }
+ else // normal resident
+ {
+ if (gCacheName->getName(item->getUUID(), first, last))
+ {
+ fullname.assign(first);
+ fullname.append(1, ' ');
+ fullname.append(last);
+ }
+ }
LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);
((LLScrollListText*)cell)->setText( fullname );
@@ -429,3 +437,4 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
return name_list;
}
+