diff options
author | Jacek Antonelli | 2008-11-08 22:10:34 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-11-08 22:10:34 -0600 |
commit | ff0244c3120757f7074fd5162f370ad8f6646ed2 (patch) | |
tree | de7f0a29c01d6780e8ac7471b10a8a3e50cab41a | |
parent | Added commit callback for Quick Filter. (diff) | |
download | meta-impy-ff0244c3120757f7074fd5162f370ad8f6646ed2.zip meta-impy-ff0244c3120757f7074fd5162f370ad8f6646ed2.tar.gz meta-impy-ff0244c3120757f7074fd5162f370ad8f6646ed2.tar.bz2 meta-impy-ff0244c3120757f7074fd5162f370ad8f6646ed2.tar.xz |
Quick Filter works, but is a bit rough.
It doesn't refresh its display when you change tabs,
and the Show Filters window doesn't refresh either.
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 77 |
2 files changed, 82 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index c3f90bd..f4a217d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,6 +1,12 @@ | |||
1 | 2008-11-08 Jacek Antonelli <jacek.antonelli@gmail.com> | 1 | 2008-11-08 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 2 | ||
3 | * linden/indra/newview/llinventoryview.cpp: | 3 | * linden/indra/newview/llinventoryview.cpp: |
4 | Quick Filter works, but is a bit rough. | ||
5 | It doesn't refresh its display when you change tabs, | ||
6 | and the Show Filters window doesn't refresh either. | ||
7 | |||
8 | |||
9 | * linden/indra/newview/llinventoryview.cpp: | ||
4 | Added commit callback for Quick Filter. | 10 | Added commit callback for Quick Filter. |
5 | * linden/indra/newview/llinventoryview.h: | 11 | * linden/indra/newview/llinventoryview.h: |
6 | Ditto. | 12 | Ditto. |
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index edc1ca7..e0061ba 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -991,9 +991,84 @@ void LLInventoryView::onSearchEdit(const std::string& search_string, void* user_ | |||
991 | //static | 991 | //static |
992 | void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data) | 992 | void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data) |
993 | { | 993 | { |
994 | |||
994 | LLComboBox* quickfilter = (LLComboBox*)ctrl; | 995 | LLComboBox* quickfilter = (LLComboBox*)ctrl; |
995 | 996 | ||
996 | llinfos << "Quick Filter: " << quickfilter->getSimple() << llendl; | 997 | |
998 | LLInventoryView* view = (LLInventoryView*)(quickfilter->getParent()); | ||
999 | if (!view->mActivePanel) | ||
1000 | { | ||
1001 | return; | ||
1002 | } | ||
1003 | |||
1004 | |||
1005 | std::string item_type = quickfilter->getSimple(); | ||
1006 | U32 filter_type; | ||
1007 | |||
1008 | if ("Animations" == item_type) | ||
1009 | { | ||
1010 | filter_type = 0x1 << LLInventoryType::IT_ANIMATION; | ||
1011 | } | ||
1012 | |||
1013 | else if ("Calling Cards" == item_type) | ||
1014 | { | ||
1015 | filter_type = 0x1 << LLInventoryType::IT_CALLINGCARD; | ||
1016 | } | ||
1017 | |||
1018 | else if ("Clothing" == item_type) | ||
1019 | { | ||
1020 | filter_type = 0x1 << LLInventoryType::IT_WEARABLE; | ||
1021 | } | ||
1022 | |||
1023 | else if ("Gestures" == item_type) | ||
1024 | { | ||
1025 | filter_type = 0x1 << LLInventoryType::IT_GESTURE; | ||
1026 | } | ||
1027 | |||
1028 | else if ("Landmarks" == item_type) | ||
1029 | { | ||
1030 | filter_type = 0x1 << LLInventoryType::IT_LANDMARK; | ||
1031 | } | ||
1032 | |||
1033 | else if ("Notecards" == item_type) | ||
1034 | { | ||
1035 | filter_type = 0x1 << LLInventoryType::IT_NOTECARD; | ||
1036 | } | ||
1037 | |||
1038 | else if ("Objects" == item_type) | ||
1039 | { | ||
1040 | filter_type = 0x1 << LLInventoryType::IT_OBJECT; | ||
1041 | } | ||
1042 | |||
1043 | else if ("Scripts" == item_type) | ||
1044 | { | ||
1045 | filter_type = 0x1 << LLInventoryType::IT_LSL; | ||
1046 | } | ||
1047 | |||
1048 | else if ("Sounds" == item_type) | ||
1049 | { | ||
1050 | filter_type = 0x1 << LLInventoryType::IT_SOUND; | ||
1051 | } | ||
1052 | |||
1053 | else if ("Textures" == item_type) | ||
1054 | { | ||
1055 | filter_type = 0x1 << LLInventoryType::IT_TEXTURE; | ||
1056 | } | ||
1057 | |||
1058 | else if ("Snapshots" == item_type) | ||
1059 | { | ||
1060 | filter_type = 0x1 << LLInventoryType::IT_SNAPSHOT; | ||
1061 | } | ||
1062 | |||
1063 | else | ||
1064 | { | ||
1065 | // Show all types | ||
1066 | filter_type = 0xffffffff; | ||
1067 | } | ||
1068 | |||
1069 | view->mActivePanel->setFilterTypes( filter_type ); | ||
1070 | |||
1071 | llinfos << "Quick Filter: " << item_type << llendl; | ||
997 | } | 1072 | } |
998 | 1073 | ||
999 | 1074 | ||