summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-05 01:05:39 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-05 01:05:39 +0000
commit85f940092705281f1040081ca5ebc207c3cb4a5b (patch)
treec3ba20351cd7ce83dcf09d65b5a8c5998625d2cc /indra/newview/llviewerinventory.cpp
parent7447454e7e733699f57f545bac13f46a72b916b7 (diff)
EXT-316 Enable the Viewer to generate calling cards for any agent
Added code to store agent ID in the description field of calling cards so that we can use them to store user generated contacts. Currently enabled as a context menu for avatars (just for initial testing). reviewed by richard
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bb14a619c5..820abe2fbd 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -728,6 +728,16 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
gAgent.sendReliableMessage();
}
+void create_inventory_callingcard(const LLUUID& avatar_id)
+{
+ std::string item_desc = avatar_id.asString();
+ std::string item_name;
+ gCacheName->getFullName(avatar_id, item_name);
+ create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
+ LLUUID::null, LLTransactionID::tnull, item_name, item_desc, LLAssetType::AT_CALLINGCARD,
+ LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, NULL);
+}
+
void copy_inventory_item(
const LLUUID& agent_id,
const LLUUID& current_owner,
@@ -1102,3 +1112,13 @@ const LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() cons
}
return NULL;
}
+
+//----------
+
+void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)
+{
+ rename(first_name + " " + last_name);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, getUUID());
+ gInventory.notifyObservers();
+}
+