aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfolderview.cpp')
-rw-r--r--linden/indra/newview/llfolderview.cpp45
1 files changed, 31 insertions, 14 deletions
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp
index 8cefd5b..58d0c42 100644
--- a/linden/indra/newview/llfolderview.cpp
+++ b/linden/indra/newview/llfolderview.cpp
@@ -4522,7 +4522,7 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)
4522 } 4522 }
4523 LLFolderViewEventListener* listener = item->getListener(); 4523 LLFolderViewEventListener* listener = item->getListener();
4524 mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; 4524 mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
4525 BOOL passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE) 4525 BOOL passed = (listener->getNInventoryType() & mFilterOps.mFilterTypes || listener->getNInventoryType() == LLInventoryType::NIT_NONE)
4526 && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) 4526 && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
4527 && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions) 4527 && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
4528 && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate); 4528 && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
@@ -4800,9 +4800,9 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
4800 } 4800 }
4801} 4801}
4802 4802
4803BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t) 4803BOOL LLInventoryFilter::isFilterWith(LLInventoryType::NType t)
4804{ 4804{
4805 return mFilterOps.mFilterTypes & (0x01 << t); 4805 return mFilterOps.mFilterTypes & t;
4806} 4806}
4807 4807
4808std::string LLInventoryFilter::getFilterText() 4808std::string LLInventoryFilter::getFilterText()
@@ -4812,6 +4812,11 @@ std::string LLInventoryFilter::getFilterText()
4812 return mFilterText; 4812 return mFilterText;
4813 } 4813 }
4814 4814
4815 return rebuildFilterText();
4816}
4817
4818std::string LLInventoryFilter::rebuildFilterText()
4819{
4815 mNeedTextRebuild = FALSE; 4820 mNeedTextRebuild = FALSE;
4816 std::string filtered_types; 4821 std::string filtered_types;
4817 std::string not_filtered_types; 4822 std::string not_filtered_types;
@@ -4820,7 +4825,7 @@ std::string LLInventoryFilter::getFilterText()
4820 S32 num_filter_types = 0; 4825 S32 num_filter_types = 0;
4821 mFilterText.clear(); 4826 mFilterText.clear();
4822 4827
4823 if (isFilterWith(LLInventoryType::IT_ANIMATION)) 4828 if (isFilterWith(LLInventoryType::NIT_ANIMATION))
4824 { 4829 {
4825 filtered_types += " Animations,"; 4830 filtered_types += " Animations,";
4826 filtered_by_type = TRUE; 4831 filtered_by_type = TRUE;
@@ -4832,7 +4837,19 @@ std::string LLInventoryFilter::getFilterText()
4832 filtered_by_all_types = FALSE; 4837 filtered_by_all_types = FALSE;
4833 } 4838 }
4834 4839
4835 if (isFilterWith(LLInventoryType::IT_CALLINGCARD)) 4840 if (isFilterWith(LLInventoryType::NIT_BODYPART))
4841 {
4842 filtered_types += " Body Parts,";
4843 filtered_by_type = TRUE;
4844 num_filter_types++;
4845 }
4846 else
4847 {
4848 not_filtered_types += " Body Parts,";
4849 filtered_by_all_types = FALSE;
4850 }
4851
4852 if (isFilterWith(LLInventoryType::NIT_CALLCARD))
4836 { 4853 {
4837 filtered_types += " Calling Cards,"; 4854 filtered_types += " Calling Cards,";
4838 filtered_by_type = TRUE; 4855 filtered_by_type = TRUE;
@@ -4844,7 +4861,7 @@ std::string LLInventoryFilter::getFilterText()
4844 filtered_by_all_types = FALSE; 4861 filtered_by_all_types = FALSE;
4845 } 4862 }
4846 4863
4847 if (isFilterWith(LLInventoryType::IT_WEARABLE)) 4864 if (isFilterWith(LLInventoryType::NIT_CLOTHING))
4848 { 4865 {
4849 filtered_types += " Clothing,"; 4866 filtered_types += " Clothing,";
4850 filtered_by_type = TRUE; 4867 filtered_by_type = TRUE;
@@ -4856,7 +4873,7 @@ std::string LLInventoryFilter::getFilterText()
4856 filtered_by_all_types = FALSE; 4873 filtered_by_all_types = FALSE;
4857 } 4874 }
4858 4875
4859 if (isFilterWith(LLInventoryType::IT_GESTURE)) 4876 if (isFilterWith(LLInventoryType::NIT_GESTURE))
4860 { 4877 {
4861 filtered_types += " Gestures,"; 4878 filtered_types += " Gestures,";
4862 filtered_by_type = TRUE; 4879 filtered_by_type = TRUE;
@@ -4868,7 +4885,7 @@ std::string LLInventoryFilter::getFilterText()
4868 filtered_by_all_types = FALSE; 4885 filtered_by_all_types = FALSE;
4869 } 4886 }
4870 4887
4871 if (isFilterWith(LLInventoryType::IT_LANDMARK)) 4888 if (isFilterWith(LLInventoryType::NIT_LANDMARK))
4872 { 4889 {
4873 filtered_types += " Landmarks,"; 4890 filtered_types += " Landmarks,";
4874 filtered_by_type = TRUE; 4891 filtered_by_type = TRUE;
@@ -4880,7 +4897,7 @@ std::string LLInventoryFilter::getFilterText()
4880 filtered_by_all_types = FALSE; 4897 filtered_by_all_types = FALSE;
4881 } 4898 }
4882 4899
4883 if (isFilterWith(LLInventoryType::IT_NOTECARD)) 4900 if (isFilterWith(LLInventoryType::NIT_NOTECARD))
4884 { 4901 {
4885 filtered_types += " Notecards,"; 4902 filtered_types += " Notecards,";
4886 filtered_by_type = TRUE; 4903 filtered_by_type = TRUE;
@@ -4892,7 +4909,7 @@ std::string LLInventoryFilter::getFilterText()
4892 filtered_by_all_types = FALSE; 4909 filtered_by_all_types = FALSE;
4893 } 4910 }
4894 4911
4895 if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT)) 4912 if (isFilterWith(LLInventoryType::NIT_OBJECT))
4896 { 4913 {
4897 filtered_types += " Objects,"; 4914 filtered_types += " Objects,";
4898 filtered_by_type = TRUE; 4915 filtered_by_type = TRUE;
@@ -4904,7 +4921,7 @@ std::string LLInventoryFilter::getFilterText()
4904 filtered_by_all_types = FALSE; 4921 filtered_by_all_types = FALSE;
4905 } 4922 }
4906 4923
4907 if (isFilterWith(LLInventoryType::IT_LSL)) 4924 if (isFilterWith(LLInventoryType::NIT_SCRIPT_LSL2))
4908 { 4925 {
4909 filtered_types += " Scripts,"; 4926 filtered_types += " Scripts,";
4910 filtered_by_type = TRUE; 4927 filtered_by_type = TRUE;
@@ -4916,7 +4933,7 @@ std::string LLInventoryFilter::getFilterText()
4916 filtered_by_all_types = FALSE; 4933 filtered_by_all_types = FALSE;
4917 } 4934 }
4918 4935
4919 if (isFilterWith(LLInventoryType::IT_SOUND)) 4936 if (isFilterWith(LLInventoryType::NIT_SOUND))
4920 { 4937 {
4921 filtered_types += " Sounds,"; 4938 filtered_types += " Sounds,";
4922 filtered_by_type = TRUE; 4939 filtered_by_type = TRUE;
@@ -4928,7 +4945,7 @@ std::string LLInventoryFilter::getFilterText()
4928 filtered_by_all_types = FALSE; 4945 filtered_by_all_types = FALSE;
4929 } 4946 }
4930 4947
4931 if (isFilterWith(LLInventoryType::IT_TEXTURE)) 4948 if (isFilterWith(LLInventoryType::NIT_TEXTURE))
4932 { 4949 {
4933 filtered_types += " Textures,"; 4950 filtered_types += " Textures,";
4934 filtered_by_type = TRUE; 4951 filtered_by_type = TRUE;
@@ -4940,7 +4957,7 @@ std::string LLInventoryFilter::getFilterText()
4940 filtered_by_all_types = FALSE; 4957 filtered_by_all_types = FALSE;
4941 } 4958 }
4942 4959
4943 if (isFilterWith(LLInventoryType::IT_SNAPSHOT)) 4960 if (isFilterWith(LLInventoryType::NIT_SNAPSHOT))
4944 { 4961 {
4945 filtered_types += " Snapshots,"; 4962 filtered_types += " Snapshots,";
4946 filtered_by_type = TRUE; 4963 filtered_by_type = TRUE;