diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfilteredwearablelist.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llfilteredwearablelist.h | 12 | ||||
-rw-r--r-- | indra/newview/llfloatermarketplacelistings.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llinventoryitemslist.h | 5 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 25 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_edit.xml | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 3 |
10 files changed, 64 insertions, 38 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 62e32c0bdc..f53ba01d37 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5592,6 +5592,8 @@ void LLAppViewer::forceErrorBreakpoint() LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL; #ifdef LL_WINDOWS DebugBreak(); +#else + asm ("int $3"); #endif return; } diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp index f2af9b5300..e67a6a2b77 100644 --- a/indra/newview/llfilteredwearablelist.cpp +++ b/indra/newview/llfilteredwearablelist.cpp @@ -37,6 +37,7 @@ LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector) : mWearableList(list) , mCollector(collector) +, mListStale(true) { llassert(mWearableList); gInventory.addObserver(this); @@ -64,7 +65,16 @@ void LLFilteredWearableListManager::changed(U32 mask) return; } - populateList(); + if (mWearableList->isInVisibleChain() || mWearableList->getForceRefresh()) + { + // Todo: current populateList() is time consuming and changed() is time-sensitive, + // either move from here or optimize + populateList(); + } + else + { + mListStale = true; + } } void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector) @@ -73,13 +83,31 @@ void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor populateList(); } +void LLFilteredWearableListManager::populateIfNeeded() +{ + if (mListStale) + { + populateList(); + } +} + +LLTrace::BlockTimerStatHandle FTM_MANAGER_LIST_POPULATION("Manager List Population"); + void LLFilteredWearableListManager::populateList() { + LL_RECORD_BLOCK_TIME(FTM_MANAGER_LIST_POPULATION); + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; if(mCollector) { + // Too slow with large inventory! + // Consider refactoring into "request once, append ids on changed()", since + // Inventory observer provides ids of changed items this should be possible, + // but will likely require modifying LLInventoryItemsList to avoid code-repeats. + // Or make something like "gather everything and filter manually on idle" + mListStale = false; gInventory.collectDescendentsIf( gInventory.getRootFolderID(), cat_array, diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h index f44ab1466f..197302f41d 100644 --- a/indra/newview/llfilteredwearablelist.h +++ b/indra/newview/llfilteredwearablelist.h @@ -52,9 +52,9 @@ public: void setFilterCollector(LLInventoryCollectFunctor* collector); /** - * Populates wearable list with filtered data. - */ - void populateList(); + * Populates wearable list with filtered data in case there were any updates. + */ + void populateIfNeeded(); /** * Drop operation @@ -62,8 +62,14 @@ public: void holdProgress(); private: + /** + * Populates wearable list with filtered data. + */ + void populateList(); + LLInventoryItemsList* mWearableList; LLInventoryCollectFunctor* mCollector; + bool mListStale; }; #endif //LL_LLFILTEREDWEARABLELIST_H diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 18f0bc4498..889d017389 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -603,6 +603,7 @@ void LLFloaterMarketplaceListings::updateView() text = LLTrans::getString("InventoryMarketplaceError", subs); title = LLTrans::getString("InventoryOutboxErrorTitle"); tooltip = LLTrans::getString("InventoryOutboxErrorTooltip"); + LL_WARNS() << "Marketplace status code: " << mkt_status << LL_ENDL; } mInventoryText->setValue(text); diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index fe05c2ed7c..ce41105f98 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -61,6 +61,11 @@ public: */ void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; } + /** + * If refreshes when invisible. + */ + bool getForceRefresh(){ return mForceRefresh; } + virtual bool selectItemByValue(const LLSD& value, bool select = true); void updateSelection(); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 208ee77f2d..3f6bdde127 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -578,7 +578,6 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key) // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden. // So, we can defer initializing a bit. mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mListViewItemTypes[LVIT_ALL]->collector); - mWearableListManager->populateList(); displayCurrentOutfit(); mInitialized = true; } @@ -632,6 +631,10 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) // Reset mWearableItemsList position to top. See EXT-8180. mWearableItemsList->goToTop(); } + else + { + mWearableListManager->populateIfNeeded(); + } //switching button bars getChildView("no_add_wearables_button_bar")->setVisible( !show_add_wearables); @@ -661,6 +664,7 @@ void LLPanelOutfitEdit::showWearablesListView() { updateWearablesPanelVerbButtons(); updateFiltersVisibility(); + mWearableListManager->populateIfNeeded(); } mListViewBtn->setToggleState(TRUE); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 605d1a04e6..c68f6b8a15 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4177,27 +4177,6 @@ class LLViewToggleUI : public view_listener_t } }; -class LLEditDuplicate : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - if(LLEditMenuHandler::gEditMenuHandler) - { - LLEditMenuHandler::gEditMenuHandler->duplicate(); - } - return true; - } -}; - -class LLEditEnableDuplicate : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); - return new_value; - } -}; - void handle_duplicate_in_place(void*) { LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL; @@ -8710,7 +8689,6 @@ void initialize_edit_menu() view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete"); view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll"); view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect"); - view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate"); view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff"); view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo"); view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo"); @@ -8720,7 +8698,6 @@ void initialize_edit_menu() view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete"); view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll"); view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect"); - view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); } @@ -9131,6 +9108,7 @@ void initialize_menus() view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar"); view_listener_t::addMenu(new LLObjectAttachToAvatar(false), "Object.AttachAddToAvatar"); view_listener_t::addMenu(new LLObjectReturn(), "Object.Return"); + commit.add("Object.Duplicate", boost::bind(&LLSelectMgr::duplicate, LLSelectMgr::getInstance())); view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse"); view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); @@ -9152,6 +9130,7 @@ void initialize_menus() enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1)); view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); + enable.add("Object.EnableDuplicate", boost::bind(&LLSelectMgr::canDuplicate, LLSelectMgr::getInstance())); view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute)); diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml index 99061e089a..6f83756f83 100644 --- a/indra/newview/skins/default/xui/en/menu_edit.xml +++ b/indra/newview/skins/default/xui/en/menu_edit.xml @@ -62,15 +62,6 @@ <menu_item_call.on_enable function="Edit.EnableDelete" /> </menu_item_call> - <menu_item_call - label="Duplicate" - name="Duplicate" - shortcut="control|D"> - <menu_item_call.on_click - function="Edit.Duplicate" /> - <menu_item_call.on_enable - function="Edit.EnableDuplicate" /> - </menu_item_call> <menu_item_separator/> <menu_item_call label="Select All" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index c96b7ae673..12df3749f6 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1025,6 +1025,15 @@ <menu_item_call.on_enable function="Object.EnableReturn" /> </menu_item_call> + <menu_item_call + label="Duplicate" + name="DuplicateObject" + shortcut="control|D"> + <menu_item_call.on_click + function="Object.Duplicate" /> + <menu_item_call.on_enable + function="Object.EnableDuplicate" /> + </menu_item_call> </menu> <menu create_jump_keys="true" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5f686a87be..d6c06b0ecc 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2312,7 +2312,8 @@ We are accessing your account on the [[MARKETPLACE_CREATE_STORE_URL] Marketplace The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors. </string> <string name="InventoryMarketplaceError"> -This feature is currently in Beta. Please add your name to this [http://goo.gl/forms/FCQ7UXkakz Google form] if you would like to participate. +An error occurred while opening Marketplace Listings. +If you continue to receive this message, please contact Second Life support for assistance at http://support.secondlife.com </string> <string name="InventoryMarketplaceListingsNoItemsTitle">Your Marketplace Listings folder is empty.</string> <string name="InventoryMarketplaceListingsNoItemsTooltip"></string> |