From 879e30e0617798a786f39b815668cec4e6dbc310 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 13 Oct 2009 04:06:49 -0700 Subject: Updated inventory search to include description (from Emerald) --- linden/indra/newview/llinventoryactions.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'linden/indra/newview/llinventoryactions.cpp') diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp index b598c83..25592c1 100644 --- a/linden/indra/newview/llinventoryactions.cpp +++ b/linden/indra/newview/llinventoryactions.cpp @@ -484,7 +484,8 @@ class SetSearchType : public inventory_listener_t gSavedSettings.setU32("InventorySearchType", 0); mPtr->getControl("Inventory.SearchByName")->setValue(TRUE); - mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE); mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE); } else if(search_type == "creator") @@ -493,16 +494,31 @@ class SetSearchType : public inventory_listener_t mPtr->getControl("Inventory.SearchByName")->setValue(FALSE); mPtr->getControl("Inventory.SearchByCreator")->setValue(TRUE); + mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE); + } + else if(search_type == "desc") + { + gSavedSettings.setU32("InventorySearchType", 2); + + mPtr->getControl("Inventory.SearchByName")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByDesc")->setValue(TRUE); mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE); } else if(search_type == "all") { - gSavedSettings.setU32("InventorySearchType", 4); + gSavedSettings.setU32("InventorySearchType", 3); mPtr->getControl("Inventory.SearchByName")->setValue(FALSE); mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); + mPtr->getControl("Inventory.SearchByDesc")->setValue(FALSE); mPtr->getControl("Inventory.SearchByAll")->setValue(TRUE); } + + //Clear search when switching modes. + mPtr->getActivePanel()->setFilterSubString(LLStringUtil::null); + mPtr->getActivePanel()->setFilterTypes(LLInventoryType::NIT_ALL); return true; } }; -- cgit v1.1