aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-08 16:08:05 -0600
committerJacek Antonelli2008-12-08 16:08:05 -0600
commita4cdb42a86b2f7a62605b4e39ebddd0297fcf2aa (patch)
treed2b49f6ad678ae4ae04f38ee67663001fde9840b /linden/indra/newview/llinventoryview.cpp
parentAdded Quick Filter item for Body Parts. (diff)
downloadmeta-impy-a4cdb42a86b2f7a62605b4e39ebddd0297fcf2aa.zip
meta-impy-a4cdb42a86b2f7a62605b4e39ebddd0297fcf2aa.tar.gz
meta-impy-a4cdb42a86b2f7a62605b4e39ebddd0297fcf2aa.tar.bz2
meta-impy-a4cdb42a86b2f7a62605b4e39ebddd0297fcf2aa.tar.xz
Hooked up Body Parts quickfilter and checkbox.
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r--linden/indra/newview/llinventoryview.cpp32
1 files changed, 25 insertions, 7 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index 96603ae..94bebc6 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -182,10 +182,11 @@ void LLInventoryViewFinder::updateElementsFromFilter()
182 182
183 // update the ui elements 183 // update the ui elements
184 LLFloater::setTitle(mFilter->getName()); 184 LLFloater::setTitle(mFilter->getName());
185 childSetValue("check_animation", (S32) (filter_types & LLInventoryType::NIT_ANIMATION));
186 185
186 childSetValue("check_animation", (S32) (filter_types & LLInventoryType::NIT_ANIMATION));
187 childSetValue("check_bodypart", (S32) (filter_types & LLInventoryType::NIT_BODYPART));
187 childSetValue("check_calling_card", (S32) (filter_types & LLInventoryType::NIT_CALLCARD)); 188 childSetValue("check_calling_card", (S32) (filter_types & LLInventoryType::NIT_CALLCARD));
188 childSetValue("check_clothing", (S32) (filter_types & LLInventoryType::NIT_WEARABLE)); 189 childSetValue("check_clothing", (S32) (filter_types & LLInventoryType::NIT_CLOTHING));
189 childSetValue("check_gesture", (S32) (filter_types & LLInventoryType::NIT_GESTURE)); 190 childSetValue("check_gesture", (S32) (filter_types & LLInventoryType::NIT_GESTURE));
190 childSetValue("check_landmark", (S32) (filter_types & LLInventoryType::NIT_LANDMARK)); 191 childSetValue("check_landmark", (S32) (filter_types & LLInventoryType::NIT_LANDMARK));
191 childSetValue("check_notecard", (S32) (filter_types & LLInventoryType::NIT_NOTECARD)); 192 childSetValue("check_notecard", (S32) (filter_types & LLInventoryType::NIT_NOTECARD));
@@ -211,6 +212,11 @@ void LLInventoryViewFinder::draw()
211 filtered_by_all_types = FALSE; 212 filtered_by_all_types = FALSE;
212 } 213 }
213 214
215 if (!childGetValue("check_bodypart"))
216 {
217 filter &= ~(LLInventoryType::NIT_BODYPART);
218 filtered_by_all_types = FALSE;
219 }
214 220
215 if (!childGetValue("check_calling_card")) 221 if (!childGetValue("check_calling_card"))
216 { 222 {
@@ -220,7 +226,7 @@ void LLInventoryViewFinder::draw()
220 226
221 if (!childGetValue("check_clothing")) 227 if (!childGetValue("check_clothing"))
222 { 228 {
223 filter &= ~(LLInventoryType::NIT_WEARABLE); 229 filter &= ~(LLInventoryType::NIT_CLOTHING);
224 filtered_by_all_types = FALSE; 230 filtered_by_all_types = FALSE;
225 } 231 }
226 232
@@ -346,6 +352,7 @@ void LLInventoryViewFinder::selectAllTypes(void* user_data)
346 if(!self) return; 352 if(!self) return;
347 353
348 self->childSetValue("check_animation", TRUE); 354 self->childSetValue("check_animation", TRUE);
355 self->childSetValue("check_bodypart", TRUE);
349 self->childSetValue("check_calling_card", TRUE); 356 self->childSetValue("check_calling_card", TRUE);
350 self->childSetValue("check_clothing", TRUE); 357 self->childSetValue("check_clothing", TRUE);
351 self->childSetValue("check_gesture", TRUE); 358 self->childSetValue("check_gesture", TRUE);
@@ -391,6 +398,7 @@ void LLInventoryViewFinder::selectNoTypes(void* user_data)
391 398
392 399
393 self->childSetValue("check_animation", FALSE); 400 self->childSetValue("check_animation", FALSE);
401 self->childSetValue("check_bodypart", FALSE);
394 self->childSetValue("check_calling_card", FALSE); 402 self->childSetValue("check_calling_card", FALSE);
395 self->childSetValue("check_clothing", FALSE); 403 self->childSetValue("check_clothing", FALSE);
396 self->childSetValue("check_gesture", FALSE); 404 self->childSetValue("check_gesture", FALSE);
@@ -1016,14 +1024,19 @@ void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data)
1016 filter_type = LLInventoryType::NIT_ANIMATION; 1024 filter_type = LLInventoryType::NIT_ANIMATION;
1017 } 1025 }
1018 1026
1027 else if (view->getString("filter_type_bodypart") == item_type)
1028 {
1029 filter_type = LLInventoryType::NIT_BODYPART;
1030 }
1031
1019 else if (view->getString("filter_type_callingcard") == item_type) 1032 else if (view->getString("filter_type_callingcard") == item_type)
1020 { 1033 {
1021 filter_type = LLInventoryType::NIT_CALLCARD; 1034 filter_type = LLInventoryType::NIT_CALLCARD;
1022 } 1035 }
1023 1036
1024 else if (view->getString("filter_type_wearable") == item_type) 1037 else if (view->getString("filter_type_clothing") == item_type)
1025 { 1038 {
1026 filter_type = LLInventoryType::NIT_WEARABLE; 1039 filter_type = LLInventoryType::NIT_CLOTHING;
1027 } 1040 }
1028 1041
1029 else if (view->getString("filter_type_gesture") == item_type) 1042 else if (view->getString("filter_type_gesture") == item_type)
@@ -1145,14 +1158,19 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
1145 selection = view->getString("filter_type_animation"); 1158 selection = view->getString("filter_type_animation");
1146 } 1159 }
1147 1160
1161 else if (filter_type == (filter_type & LLInventoryType::NIT_BODYPART))
1162 {
1163 selection = view->getString("filter_type_bodypart");
1164 }
1165
1148 else if (filter_type == (filter_type & LLInventoryType::NIT_CALLCARD)) 1166 else if (filter_type == (filter_type & LLInventoryType::NIT_CALLCARD))
1149 { 1167 {
1150 selection = view->getString("filter_type_callingcard"); 1168 selection = view->getString("filter_type_callingcard");
1151 } 1169 }
1152 1170
1153 else if (filter_type == (filter_type & LLInventoryType::NIT_WEARABLE)) 1171 else if (filter_type == (filter_type & LLInventoryType::NIT_CLOTHING))
1154 { 1172 {
1155 selection = view->getString("filter_type_wearable"); 1173 selection = view->getString("filter_type_clothing");
1156 } 1174 }
1157 1175
1158 else if (filter_type == (filter_type & LLInventoryType::NIT_GESTURE)) 1176 else if (filter_type == (filter_type & LLInventoryType::NIT_GESTURE))