void LLLibraryOutfitsFetch::importedFolderDone() { llinfos << "start" << llendl; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; uuid_vec_t folders; // Collect the contents of the Imported Clothing folder gInventory.collectDescendents(mImportedClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH); for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); iter != cat_array.end(); ++iter) { const LLViewerInventoryCategory *cat = iter->get(); // Get the name of every imported outfit folders.push_back(cat->getUUID()); mImportedClothingFolders.push_back(cat->getUUID()); } mComplete.clear(); setFetchIDs(folders); startFetch(); if (isFinished()) { done(); } }
void LLLibraryOutfitsFetch::outfitsDone() { llinfos << "start" << llendl; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; uuid_vec_t folders; // Collect the contents of the Library's Clothing folder gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH); llassert(cat_array.count() > 0); for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); iter != cat_array.end(); ++iter) { const LLViewerInventoryCategory *cat = iter->get(); // Get the names and id's of every outfit in the library, skip "Ruth" // because it's a low quality legacy outfit if (cat->getName() != "Ruth") { // Get the name of every outfit in the library folders.push_back(cat->getUUID()); mLibraryClothingFolders.push_back(cat->getUUID()); } } cat_array.clear(); wearable_array.clear(); // Check if you already have an "Imported Library Clothing" folder LLNameCategoryCollector matchFolderFunctor(mImportedClothingName); gInventory.collectDescendentsIf(mClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, matchFolderFunctor); if (cat_array.size() > 0) { const LLViewerInventoryCategory *cat = cat_array.get(0); mImportedClothingID = cat->getUUID(); } mComplete.clear(); setFetchIDs(folders); startFetch(); if (isFinished()) { done(); } }
// virtual BOOL LLFloaterGesture::postBuild() { std::string label; label = getTitle(); setTitle(label); mGestureList = getChild<LLScrollListCtrl>("gesture_list"); mGestureList->setCommitCallback(boost::bind(&LLFloaterGesture::onCommitList, this)); mGestureList->setDoubleClickCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLUICtrl>("edit_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickEdit, this)); getChild<LLUICtrl>("play_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLUICtrl>("stop_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLButton>("activate_btn")->setClickedCallback(boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); getChild<LLUICtrl>("FSShowOnlyActiveGestures")->setCommitCallback(boost::bind(&LLFloaterGesture::refreshForActiveSort, this)); // <FS:PP> FIRE-5646: Option to show only active gestures getChild<LLUICtrl>("new_gesture_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickNew, this)); getChild<LLButton>("del_btn")->setClickedCallback(boost::bind(&LLFloaterGesture::onDeleteSelected, this)); getChildView("play_btn")->setVisible( true); getChildView("stop_btn")->setVisible( false); setDefaultBtn("play_btn"); mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false); uuid_vec_t folders; folders.push_back(mGestureFolderID); //perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details. gInventory.addObserver(this); setFetchIDs(folders); startFetch(); if (mGestureList) { buildGestureList(); mGestureList->setFocus(TRUE); const BOOL ascending = TRUE; mGestureList->sortByColumn(std::string("name"), ascending); mGestureList->selectFirstItem(); } // Update button labels onCommitList(); return TRUE; }
void LLLibraryOutfitsFetch::importedFolderFetch() { llinfos << "start" << llendl; // Fetch the contents of the Imported Clothing Folder uuid_vec_t folders; folders.push_back(mImportedClothingID); mComplete.clear(); setFetchIDs(folders); startFetch(); if (isFinished()) { done(); } }
void LLFloaterGesture::done() { //this method can be called twice: for GestureFolder and once after loading all sudir of GestureFolder if (gInventory.isCategoryComplete(mGestureFolderID)) { LL_DEBUGS("Gesture")<< "mGestureFolderID loaded" << LL_ENDL; // we load only gesture folder without childred. LLInventoryModel::cat_array_t* categories; LLInventoryModel::item_array_t* items; uuid_vec_t unloaded_folders; LL_DEBUGS("Gesture")<< "Get subdirs of Gesture Folder...." << LL_ENDL; gInventory.getDirectDescendentsOf(mGestureFolderID, categories, items); if (categories->empty()) { gInventory.removeObserver(this); LL_INFOS("Gesture")<< "Gesture dos NOT contains sub-directories."<< LL_ENDL; return; } LL_DEBUGS("Gesture")<< "There are " << categories->size() << " Folders "<< LL_ENDL; for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); it != categories->end(); it++) { if (!gInventory.isCategoryComplete(it->get()->getUUID())) { unloaded_folders.push_back(it->get()->getUUID()); LL_DEBUGS("Gesture")<< it->get()->getName()<< " Folder added to fetchlist"<< LL_ENDL; } } if (!unloaded_folders.empty()) { LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL; setFetchIDs(unloaded_folders); startFetch(); } else { LL_DEBUGS("Gesture")<< "All Gesture subdirectories have been loaded."<< LL_ENDL; gInventory.removeObserver(this); buildGestureList(); } } else { LL_WARNS("Gesture")<< "Gesture list was NOT loaded"<< LL_ENDL; } }
void LLLibraryOutfitsFetch::folderDone() { llinfos << "start" << llendl; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH); // Early out if we already have items in My Outfits // except the case when My Outfits contains just initial outfit if (cat_array.count() > 1) { mOutfitsPopulated = true; return; } mClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); mLibraryClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true); // If Library->Clothing->Initial Outfits exists, use that. LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); cat_array.clear(); gInventory.collectDescendentsIf(mLibraryClothingID, cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, matchFolderFunctor); if (cat_array.count() > 0) { const LLViewerInventoryCategory *cat = cat_array.get(0); mLibraryClothingID = cat->getUUID(); } mComplete.clear(); // Get the complete information on the items in the inventory. uuid_vec_t folders; folders.push_back(mClothingID); folders.push_back(mLibraryClothingID); setFetchIDs(folders); startFetch(); if (isFinished()) { done(); } }
LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids) { setFetchIDs(ids); }