Skip to content
Snippets Groups Projects
Commit ece5e6b8 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

MAINT-7961 Search link in Recent tab of Inventory should open the Search filters for Inventory

parent c8c8005e
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,7 @@ BOOL LLPanelMainInventory::postBuild() ...@@ -162,6 +162,7 @@ BOOL LLPanelMainInventory::postBuild()
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
LLInventoryFilter& recent_filter = recent_items_panel->getFilter(); LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY)); recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY));
recent_filter.setEmptyLookupMessage("InventoryNoMatchingRecentItems");
recent_filter.markDefault(); recent_filter.markDefault();
recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2)); recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
} }
......
...@@ -91,6 +91,8 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver ...@@ -91,6 +91,8 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
static void newWindow(); static void newWindow();
void toggleFindOptions();
protected: protected:
// //
// Misc functions // Misc functions
...@@ -98,7 +100,6 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver ...@@ -98,7 +100,6 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
void setFilterTextFromFilter(); void setFilterTextFromFilter();
void startSearch(); void startSearch();
void toggleFindOptions();
void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action); void onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action);
static BOOL filtersVisible(void* user_data); static BOOL filtersVisible(void* user_data);
......
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
#include "llappearancemgr.h" #include "llappearancemgr.h"
#include "llcommandhandler.h" #include "llcommandhandler.h"
#include "llviewermessage.h" #include "llviewermessage.h"
#include "llpanelmaininventory.h"
#include "llsidepanelappearance.h" #include "llsidepanelappearance.h"
#include "llsidepanelinventory.h"
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
#include "llavataractions.h" #include "llavataractions.h"
#include "lllogininstance.h" #include "lllogininstance.h"
...@@ -248,6 +250,20 @@ class LLInventoryHandler : public LLCommandHandler ...@@ -248,6 +250,20 @@ class LLInventoryHandler : public LLCommandHandler
return true; return true;
} }
if (params[0].asString() == "filters")
{
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
if (sidepanel_inventory)
{
LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
if (main_inventory)
{
main_inventory->toggleFindOptions();
}
}
return true;
}
// otherwise, we need a UUID and a verb... // otherwise, we need a UUID and a verb...
if (params.size() < 2) if (params.size() < 2)
{ {
......
...@@ -2289,6 +2289,7 @@ For AI Character: Get the closest navigable point to the point provided. ...@@ -2289,6 +2289,7 @@ For AI Character: Get the closest navigable point to the point provided.
<!-- inventory --> <!-- inventory -->
<string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string>
<string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string>
<string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string> <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string> <string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment