From 10a2519e737d2fc4be74e7bb289d0b3eb0709aa0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Sep 2020 12:30:59 +0300 Subject: Revert "SL-13852 Add visibility options to inventory search results" This reverts commit 18566c502398e0e449717a06b1ffae3966e55522. --- indra/llui/lllineeditor.h | 3 - indra/llui/llsearcheditor.cpp | 22 +----- indra/llui/llsearcheditor.h | 20 +---- indra/newview/llfolderviewmodelinventory.h | 1 - indra/newview/llinventoryfilter.cpp | 85 +-------------------- indra/newview/llinventoryfilter.h | 17 +---- indra/newview/llpanelmaininventory.cpp | 35 --------- indra/newview/llpanelmaininventory.h | 2 - .../icons/Inv_Toolbar_SearchVisibility.png | Bin 756 -> 0 bytes indra/newview/skins/default/textures/textures.xml | 3 - .../widgets/TextField_Search_Highlight.png | Bin 16287 -> 0 bytes .../xui/en/menu_inventory_search_visibility.xml | 44 ----------- .../skins/default/xui/en/panel_main_inventory.xml | 40 ++++------ .../skins/default/xui/en/widgets/filter_editor.xml | 4 +- .../skins/default/xui/en/widgets/search_editor.xml | 4 +- 15 files changed, 22 insertions(+), 258 deletions(-) delete mode 100644 indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png delete mode 100644 indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png delete mode 100644 indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml (limited to 'indra') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index f84625bea7..aa5779d45f 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -283,9 +283,6 @@ public: void resetContextMenu() { setContextMenu(NULL); }; - void setBgImage(LLPointer image) { mBgImage = image; } - void setBgImageFocused(LLPointer image) { mBgImageFocused = image; } - private: // private helper methods diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index bafeef41fb..1fdd05a11c 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -34,11 +34,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) : LLUICtrl(p), mSearchButton(NULL), - mClearButton(NULL), - mEditorImage(p.background_image), - mEditorImageFocused(p.background_image_focused), - mEditorSearchImage(p.background_image_highlight), - mHighlightTextField(p.highlight_text_field) + mClearButton(NULL) { S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height; S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad; @@ -61,8 +57,6 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) // Set up line editor. LLLineEditor::Params line_editor_params(p); line_editor_params.name("filter edit box"); - line_editor_params.background_image(p.background_image); - line_editor_params.background_image_focused(p.background_image_focused); line_editor_params.rect(getLocalRect()); line_editor_params.follows.flags(FOLLOWS_ALL); line_editor_params.text_pad_left(text_pad_left); @@ -110,20 +104,6 @@ void LLSearchEditor::draw() if (mClearButton) mClearButton->setVisible(!mSearchEditor->getWText().empty()); - if (mHighlightTextField) - { - if (!mSearchEditor->getWText().empty()) - { - mSearchEditor->setBgImage(mEditorSearchImage); - mSearchEditor->setBgImageFocused(mEditorSearchImage); - } - else - { - mSearchEditor->setBgImage(mEditorImage); - mSearchEditor->setBgImageFocused(mEditorImageFocused); - } - } - LLUICtrl::draw(); } diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index c0f3c1d60c..3b12868225 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -47,23 +47,14 @@ public: Optional search_button, clear_button; Optional search_button_visible, - clear_button_visible, - highlight_text_field; + clear_button_visible; Optional keystroke_callback; - Optional background_image, - background_image_focused, - background_image_highlight; - Params() : search_button("search_button"), search_button_visible("search_button_visible"), clear_button("clear_button"), - clear_button_visible("clear_button_visible"), - highlight_text_field("highlight_text_field"), - background_image("background_image"), - background_image_focused("background_image_focused"), - background_image_highlight("background_image_highlight") + clear_button_visible("clear_button_visible") {} }; @@ -102,13 +93,6 @@ protected: LLLineEditor* mSearchEditor; LLButton* mSearchButton; LLButton* mClearButton; - - LLPointer mEditorImage; - LLPointer mEditorImageFocused; - LLPointer mEditorSearchImage; - LLPointer mEditorSearchImageFocused; - - bool mHighlightTextField; }; #endif // LL_SEARCHEDITOR_H diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 51b98339c4..06a908cccc 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -45,7 +45,6 @@ public: virtual LLFolderType::EType getPreferredType() const = 0; virtual void showProperties(void) = 0; virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. - virtual BOOL isAgentInventory() const { return FALSE; } virtual BOOL isUpToDate() const = 0; virtual bool hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 1b99c90d5c..8f18de0210 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -63,8 +63,7 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p) mPermissions(p.permissions), mFilterTypes(p.types), mFilterUUID(p.uuid), - mFilterLinks(p.links), - mSearchVisibility(0xffffFFFFffffFFFFULL) + mFilterLinks(p.links) { } @@ -155,7 +154,6 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) passed = passed && checkAgainstPermissions(listener); passed = passed && checkAgainstFilterLinks(listener); passed = passed && checkAgainstCreator(listener); - passed = passed && checkAgainstSearchVisibility(listener); return passed; } @@ -552,27 +550,6 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory } } -bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const -{ - if (!listener || !hasFilterString()) return TRUE; - - const LLUUID object_id = listener->getUUID(); - const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return TRUE; - - const BOOL is_link = object->getIsLinkType(); - if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0)) - return FALSE; - - if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0)) - return FALSE; - - if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0)) - return FALSE; - - return TRUE; -} - const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const { return mFilterSubString; @@ -741,61 +718,6 @@ void LLInventoryFilter::setFilterMarketplaceListingFolders(bool select_only_list } } - -void LLInventoryFilter::toggleSearchVisibilityLinks() -{ - bool hide_links = mFilterOps.mSearchVisibility & VISIBILITY_LINKS; - if (hide_links) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_LINKS; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_LINKS; - } - - if (hasFilterString()) - { - setModified(hide_links ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - -void LLInventoryFilter::toggleSearchVisibilityTrash() -{ - bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH; - if (hide_trash) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_TRASH; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_TRASH; - } - - if (hasFilterString()) - { - setModified(hide_trash ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - -void LLInventoryFilter::toggleSearchVisibilityLibrary() -{ - bool hide_library = mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY; - if (hide_library) - { - mFilterOps.mSearchVisibility &= ~VISIBILITY_LIBRARY; - } - else - { - mFilterOps.mSearchVisibility |= VISIBILITY_LIBRARY; - } - - if (hasFilterString()) - { - setModified(hide_library ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); - } -} - void LLInventoryFilter::setFilterNoMarketplaceFolder() { mFilterOps.mFilterTypes |= FILTERTYPE_NO_MARKETPLACE_ITEMS; @@ -1427,11 +1349,6 @@ U64 LLInventoryFilter::getFilterSettingsTypes() const return mFilterOps.mFilterSettingsTypes; } -U64 LLInventoryFilter::getSearchVisibilityTypes() const -{ - return mFilterOps.mSearchVisibility; -} - bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index caba8315c4..be02ee3623 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -99,14 +99,6 @@ public: FILTERCREATOR_OTHERS }; - enum ESearchVisibility - { - VISIBILITY_NONE = 0, - VISIBILITY_TRASH = 0x1 << 0, - VISIBILITY_LIBRARY = 0x1 << 1, - VISIBILITY_LINKS = 0x1 << 2 - }; - struct FilterOps { struct DateRange : public LLInitParam::Block @@ -162,7 +154,6 @@ public: mFilterWearableTypes, mFilterSettingsTypes, // for _SETTINGS mFilterLinks, - mSearchVisibility, mFilterCategoryTypes; // For _CATEGORY LLUUID mFilterUUID; // for UUID @@ -202,8 +193,7 @@ public: U64 getFilterObjectTypes() const; U64 getFilterCategoryTypes() const; U64 getFilterWearableTypes() const; - U64 getFilterSettingsTypes() const; - U64 getSearchVisibilityTypes() const; + U64 getFilterSettingsTypes() const; bool isFilterObjectTypesWith(LLInventoryType::EType t) const; void setFilterObjectTypes(U64 types); @@ -223,10 +213,6 @@ public: ESearchType getSearchType() { return mSearchType; } void setFilterCreator(EFilterCreatorType type); - void toggleSearchVisibilityLinks(); - void toggleSearchVisibilityTrash(); - void toggleSearchVisibilityLibrary(); - void setFilterSubString(const std::string& string); const std::string& getFilterSubString(BOOL trim = FALSE) const; const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; } @@ -323,7 +309,6 @@ private: bool checkAgainstPermissions(const LLInventoryItem* item) const; bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const; bool checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const; - bool checkAgainstSearchVisibility(const class LLFolderViewModelItemInventory* listener) const; bool checkAgainstClipboard(const LLUUID& object_id) const; FilterOps mFilterOps; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d24440ebbd..02cd22c307 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -115,7 +115,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mSavedFolderState(NULL), mFilterText(""), mMenuGearDefault(NULL), - mMenuVisibility(NULL), mMenuAddHandle(), mNeedUploadCost(true) { @@ -229,7 +228,6 @@ BOOL LLPanelMainInventory::postBuild() } mGearMenuButton = getChild("options_gear_btn"); - mVisibilityMenuButton = getChild("options_visibility_btn"); initListCommandsHandlers(); @@ -1166,9 +1164,6 @@ void LLPanelMainInventory::initListCommandsHandlers() LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAddHandle = menu->getHandle(); - mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mVisibilityMenuButton->setMenu(mMenuVisibility); - // Update the trash button when selected item(s) get worn or taken off. LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this)); } @@ -1358,21 +1353,6 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } LLFloaterReg::showInstance("linkreplace", params); } - - if (command_name == "toggle_search_trash") - { - mActivePanel->getFilter().toggleSearchVisibilityTrash(); - } - - if (command_name == "toggle_search_library") - { - mActivePanel->getFilter().toggleSearchVisibilityLibrary(); - } - - if (command_name == "include_links") - { - mActivePanel->getFilter().toggleSearchVisibilityLinks(); - } } void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) @@ -1518,21 +1498,6 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) return sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; } - if (command_name == "toggle_search_trash") - { - return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_TRASH) != 0; - } - - if (command_name == "toggle_search_library") - { - return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LIBRARY) != 0; - } - - if (command_name == "include_links") - { - return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LINKS) != 0; - } - return FALSE; } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 5211aa0c92..a6bdee233d 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -169,9 +169,7 @@ protected: private: LLDragAndDropButton* mTrashButton; LLToggleableMenu* mMenuGearDefault; - LLToggleableMenu* mMenuVisibility; LLMenuButton* mGearMenuButton; - LLMenuButton* mVisibilityMenuButton; LLHandle mMenuAddHandle; bool mNeedUploadCost; diff --git a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png deleted file mode 100644 index 048da25c92..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1302edda7a..7325d836d2 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -333,8 +333,6 @@ with the same filename but different name - - @@ -650,7 +648,6 @@ with the same filename but different name - diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png deleted file mode 100644 index e3944289c6..0000000000 Binary files a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png and /dev/null differ diff --git a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml deleted file mode 100644 index 46193f4a7a..0000000000 --- a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 2ff58035ed..d77fbdec0a 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -32,20 +32,30 @@ left="12" name="ItemcountText" font="SansSerifMedium" - text_color="InventoryItemLinkColor" + text_color="EmphasisColor" use_ellipses="true" top_pad="0" width="300"> Items: - + + follows="top|right" + width="90"> - - - + + background_image_focused="TextField_Search_Active"> + background_image_focused="TextField_Search_Active" >