Conflicts:
	indra/llmessage/message_prehash.cpp
	indra/llmessage/message_prehash.h
This commit is contained in:
Siana Gearz
2011-10-14 02:44:20 +02:00
34 changed files with 3303 additions and 2968 deletions

View File

@@ -865,37 +865,13 @@ public:
virtual void done()
{
LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL;
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
bool notify = false;
if(trash_id.notNull() && mObjectID.notNull())
{
LLInventoryModel::update_list_t update;
LLInventoryModel::LLCategoryUpdate old_folder(mFolderID, -1);
update.push_back(old_folder);
LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1);
update.push_back(new_folder);
gInventory.accountForUpdate(update);
gInventory.moveObject(mObjectID, trash_id);
LLInventoryObject* obj = gInventory.getObject(mObjectID);
if(obj)
{
// no need to restamp since this is already a freshly
// stamped item.
obj->updateParentOnServer(FALSE);
notify = true;
}
}
else
{
LL_WARNS("Messaging") << "DiscardAgentOffer unable to find: "
<< (trash_id.isNull() ? "trash " : "")
<< (mObjectID.isNull() ? "object" : "") << LL_ENDL;
}
// We're invoked from LLInventoryModel::notifyObservers().
// If we now try to remove the inventory item, it will cause a nested
// notifyObservers() call, which won't work.
// So defer moving the item to trash until viewer gets idle (in a moment).
LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeItem, &gInventory, mObjectID));
gInventory.removeObserver(this);
if(notify)
{
gInventory.notifyObservers();
}
delete this;
}
protected:
@@ -5975,7 +5951,7 @@ void container_inventory_arrived(LLViewerObject* object,
{
// create a new inventory category to put this in
LLUUID cat_id;
cat_id = gInventory.createNewCategory(gAgent.getInventoryRootID(),
cat_id = gInventory.createNewCategory(gInventory.getRootFolderID(),
LLFolderType::FT_NONE,
std::string("Acquired Items")); //TODO: Translate