diff options
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d40141c91d..0ba373c51b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,12 +34,14 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llavataractions.h" #include "lldndbutton.h" #include "lleconomy.h" #include "llfilepicker.h" #include "llfloaterinventory.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" @@ -115,6 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory() mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this)); mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this)); mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); // Controls // *TODO: Just use persistant settings for each of these @@ -419,7 +422,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) return; } - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); mFilterSubString = search_string; if (mActivePanel->getFilterSubString().empty() && mFilterSubString.empty()) @@ -499,7 +502,7 @@ void LLPanelMainInventory::onFilterSelected() if (filter->isActive()) { // If our filter is active we may be the first thing requiring a fetch so we better start it here. - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); } setFilterTextFromFilter(); } @@ -566,11 +569,11 @@ void LLPanelMainInventory::updateItemcountText() std::string text = ""; - if (LLInventoryModel::backgroundFetchActive()) + if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()) { text = getString("ItemcountFetching", string_args); } - else if (LLInventoryModel::isEverythingFetched()) + else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched()) { text = getString("ItemcountCompleted", string_args); } @@ -600,7 +603,7 @@ void LLPanelMainInventory::toggleFindOptions() if (parent_floater) // Seraph: Fix this, shouldn't be null even for sidepanel parent_floater->addDependentFloater(mFinderHandle); // start background fetch of folders - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); } else { @@ -1043,7 +1046,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - current_item->getListener()->performAction(getActivePanel()->getRootFolder(), getActivePanel()->getModel(), "goto"); + current_item->getListener()->performAction(getActivePanel()->getModel(), "goto"); } if (command_name == "find_links") @@ -1088,19 +1091,19 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "delete") { BOOL can_delete = FALSE; - LLFolderView *folder = getActivePanel()->getRootFolder(); - if (folder) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { can_delete = TRUE; std::set<LLUUID> selection_set; - folder->getSelectionList(selection_set); + root->getSelectionList(selection_set); if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) { const LLUUID &item_id = (*iter); - LLFolderViewItem *item = folder->getItemByID(item_id); + LLFolderViewItem *item = root->getItemByID(item_id); const LLFolderViewEventListener *listener = item->getListener(); llassert(listener); if (!listener) return FALSE; |