diff --git a/indra/develop.py b/indra/develop.py index d86b86b48..4295234e0 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -504,17 +504,17 @@ class WindowsSetup(PlatformSetup): self._generator = version print 'Building with ', self.gens[version]['gen'] break - else: - print >> sys.stderr, 'Cannot find a Visual Studio installation, testing for express editions' - for version in 'vc80 vc90 vc71'.split(): - if self.find_visual_studio_express(version): - self._generator = version - self.using_express = True - print 'Building with ', self.gens[version]['gen'] , "Express edition" - break - else: - print >> sys.stderr, 'Cannot find any Visual Studio installation' - sys.exit(1) + else: + print >> sys.stderr, 'Cannot find a Visual Studio installation, testing for express editions' + for version in 'vc80 vc90 vc71'.split(): + if self.find_visual_studio_express(version): + self._generator = version + self.using_express = True + print 'Building with ', self.gens[version]['gen'] , "Express edition" + break + else: + print >> sys.stderr, 'Cannot find any Visual Studio installation' + sys.exit(1) return self._generator def _set_generator(self, gen): diff --git a/indra/newview/llinventoryview.cpp b/indra/newview/llinventoryview.cpp index 24d91f9d3..db27c05f0 100644 --- a/indra/newview/llinventoryview.cpp +++ b/indra/newview/llinventoryview.cpp @@ -84,6 +84,9 @@ #include "llselectmgr.h" #include "llsdserialize.h" +// +#include "llbuildnewviewsscheduler.h" +// static LLRegisterWidget r("inventory_panel"); @@ -482,16 +485,15 @@ void LLInventoryView::init(LLInventoryModel* inventory) init_inventory_actions(this); // Controls + U32 sort_order = gSavedSettings.getU32("InventorySortOrder"); + BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE ); + BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME ); + BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP ); addBoolControl("Inventory.ShowFilters", FALSE); - addBoolControl("Inventory.SortByName", FALSE); - addBoolControl("Inventory.SortByDate", TRUE); - addBoolControl("Inventory.FoldersAlwaysByName", TRUE); - addBoolControl("Inventory.SystemFoldersToTop", TRUE); - updateSortControls(); - - addBoolControl("Inventory.SearchName", TRUE); - addBoolControl("Inventory.SearchDesc", FALSE); - addBoolControl("Inventory.SearchCreator", FALSE); + addBoolControl("Inventory.SortByName", sort_by_name ); + addBoolControl("Inventory.SortByDate", ! sort_by_name ); + addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name ); + addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top ); mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -505,7 +507,7 @@ void LLInventoryView::init(LLInventoryModel* inventory) if (mActivePanel) { // "All Items" is the previous only view, so it gets the InventorySortOrder - mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER)); + mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); mActivePanel->getFilter()->markDefault(); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); mActivePanel->setSelectCallback(onSelectionChange, mActivePanel); @@ -1247,7 +1249,10 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); const std::string LLInventoryPanel::WORNITEMS_SORT_ORDER = std::string("WornItemsSortOrder"); -const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); +const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string(""); +// +std::list LLInventoryPanel::sInstances; +// LLInventoryPanel::LLInventoryPanel(const std::string& name, const std::string& sort_order_setting, @@ -1263,6 +1268,9 @@ LLInventoryPanel::LLInventoryPanel(const std::string& name, mAllowMultiSelect(allow_multi_select), mSortOrderSetting(sort_order_setting) { + // + sInstances.push_back(this); + // setBackgroundColor(gColors.getColor("InventoryBackgroundColor")); setBackgroundVisible(TRUE); setBackgroundOpaque(TRUE); @@ -1315,6 +1323,10 @@ BOOL LLInventoryPanel::postBuild() LLInventoryPanel::~LLInventoryPanel() { + // + sInstances.remove(this); + gBuildNewViewsScheduler->cancel(this); + // // should this be a global setting? U32 sort_order = mFolders->getSortOrder(); if (mSortOrderSetting != INHERIT_SORT_ORDER) @@ -1635,7 +1647,9 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) for(S32 i = 0; i < count; ++i) { LLInventoryCategory* cat = categories->get(i); - buildNewViews(cat->getUUID()); + // + gBuildNewViewsScheduler->addJob(this, cat); + // } } if(items) @@ -1644,12 +1658,111 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) for(S32 i = 0; i < count; ++i) { LLInventoryItem* item = items->get(i); - buildNewViews(item->getUUID()); + // + gBuildNewViewsScheduler->addJob(this, item); + // } } mInventory->unlockDirectDescendentArrays(id); } } +// +void LLInventoryPanel::buildNewViews(const LLInventoryObject* objectp) +{ + LLFolderViewItem* itemp = NULL; + + if (objectp) + { + if (objectp->getType() <= LLAssetType::AT_NONE || + objectp->getType() >= LLAssetType::AT_COUNT) + { + llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == " + << ((S32) objectp->getType()) + << " (shouldn't happen)" << llendl; + } + else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category + { + LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(), + LLInventoryType::IT_CATEGORY, + this, + objectp->getUUID()); + + if (new_listener) + { + LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(), + new_listener->getIcon(), + mFolders, + new_listener); + + folderp->setItemSortOrder(mFolders->getSortOrder()); + itemp = folderp; + } + } + else // build new view for item + { + LLInventoryItem* item = (LLInventoryItem*)objectp; + LLInvFVBridge* new_listener = LLInvFVBridge::createBridge( + item->getType(), + item->getInventoryType(), + this, + item->getUUID(), + item->getFlags()); + if (new_listener) + { + itemp = new LLFolderViewItem(new_listener->getDisplayName(), + new_listener->getIcon(), + new_listener->getCreationDate(), + mFolders, + new_listener); + } + } + + LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID()); + + if (itemp) + { + // + itemp->mDelayedDelete = TRUE; + // + if (parent_folder) + { + itemp->addToFolder(parent_folder, mFolders); + } + else + { + llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl; + delete itemp; + } + } + } + + if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY))) + { + LLViewerInventoryCategory::cat_array_t* categories; + LLViewerInventoryItem::item_array_t* items; + + mInventory->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items); + if(categories) + { + S32 count = categories->count(); + for(S32 i = 0; i < count; ++i) + { + LLInventoryCategory* cat = categories->get(i); + buildNewViews(cat); + } + } + if(items) + { + S32 count = items->count(); + for(S32 i = 0; i < count; ++i) + { + LLInventoryItem* item = items->get(i); + buildNewViews(item); + } + } + mInventory->unlockDirectDescendentArrays(objectp->getUUID()); + } +} struct LLConfirmPurgeData { diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 07d2e27bf..3a337deb0 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -190,7 +190,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) rect, image_id.getString(), image_id, - LLUUID::null, + image_id, true); preview->setSourceID(image_id); preview->setFocus(TRUE);