Esempio n. 1
0
void LLPreviewNotecard::deleteNotecard()
{
	LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
	if (item != NULL)
	{
		const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
		change_item_parent(&gInventory, item, trash_id, FALSE);
	}

	closeFloater();
}
Esempio n. 2
0
void LLCOFMgr::checkCOF()
{
    const LLUUID idCOF = getCOF();
    const LLUUID idLAF = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);

    // Check COF for non-links and move them to Lost&Found
    LLInventoryModel::cat_array_t* pFolders;
    LLInventoryModel::item_array_t* pItems;
    gInventory.getDirectDescendentsOf(idCOF, pFolders, pItems);
    for (S32 idxFolder = 0, cntFolder = pFolders->count(); idxFolder < cntFolder; idxFolder++)
    {
        LLViewerInventoryCategory* pFolder = pFolders->get(idxFolder).get();
        if ( (pFolder) && (idLAF.notNull()) )
            change_category_parent(&gInventory, pFolder, idLAF, false);
    }
    for (S32 idxItem = 0, cntItem = pItems->count(); idxItem < cntItem; idxItem++)
    {
        LLViewerInventoryItem* pItem = pItems->get(idxItem).get();
        if ( (pItem) && (!pItem->getIsLinkType()) && (idLAF.notNull()) )
            change_item_parent(&gInventory, pItem, idLAF, false);
    }
}