aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt4
-rw-r--r--linden/indra/newview/llinventoryview.cpp52
2 files changed, 30 insertions, 26 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 37f56a4..45426b7 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,9 @@
12008-11-23 Jacek Antonelli <jacek.antonelli@gmail.com> 12008-11-23 Jacek Antonelli <jacek.antonelli@gmail.com>
2 2
3 * linden/indra/newview/llinventoryview.cpp:
4 Read filter labels from LLTrans, no hard-coding.
5
6
3 * linden/indra/newview/skins/default/xui/en-us/strings.xml: 7 * linden/indra/newview/skins/default/xui/en-us/strings.xml:
4 Defined strings for filter types (to allow translation). 8 Defined strings for filter types (to allow translation).
5 9
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index de8dacb..f64dd0d 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -1010,62 +1010,62 @@ void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data)
1010 std::string item_type = quickfilter->getSimple(); 1010 std::string item_type = quickfilter->getSimple();
1011 U32 filter_type; 1011 U32 filter_type;
1012 1012
1013 if ("Animations" == item_type) 1013 if (view->getString("filter_type_animation") == item_type)
1014 { 1014 {
1015 filter_type = 0x1 << LLInventoryType::IT_ANIMATION; 1015 filter_type = 0x1 << LLInventoryType::IT_ANIMATION;
1016 } 1016 }
1017 1017
1018 else if ("Calling Cards" == item_type) 1018 else if (view->getString("filter_type_callingcard") == item_type)
1019 { 1019 {
1020 filter_type = 0x1 << LLInventoryType::IT_CALLINGCARD; 1020 filter_type = 0x1 << LLInventoryType::IT_CALLINGCARD;
1021 } 1021 }
1022 1022
1023 else if ("Clothing / Body Parts" == item_type) 1023 else if (view->getString("filter_type_wearable") == item_type)
1024 { 1024 {
1025 filter_type = 0x1 << LLInventoryType::IT_WEARABLE; 1025 filter_type = 0x1 << LLInventoryType::IT_WEARABLE;
1026 } 1026 }
1027 1027
1028 else if ("Gestures" == item_type) 1028 else if (view->getString("filter_type_gesture") == item_type)
1029 { 1029 {
1030 filter_type = 0x1 << LLInventoryType::IT_GESTURE; 1030 filter_type = 0x1 << LLInventoryType::IT_GESTURE;
1031 } 1031 }
1032 1032
1033 else if ("Landmarks" == item_type) 1033 else if (view->getString("filter_type_landmark") == item_type)
1034 { 1034 {
1035 filter_type = 0x1 << LLInventoryType::IT_LANDMARK; 1035 filter_type = 0x1 << LLInventoryType::IT_LANDMARK;
1036 } 1036 }
1037 1037
1038 else if ("Notecards" == item_type) 1038 else if (view->getString("filter_type_notecard") == item_type)
1039 { 1039 {
1040 filter_type = 0x1 << LLInventoryType::IT_NOTECARD; 1040 filter_type = 0x1 << LLInventoryType::IT_NOTECARD;
1041 } 1041 }
1042 1042
1043 else if ("Objects" == item_type) 1043 else if (view->getString("filter_type_object") == item_type)
1044 { 1044 {
1045 filter_type = 0x1 << LLInventoryType::IT_OBJECT; 1045 filter_type = 0x1 << LLInventoryType::IT_OBJECT;
1046 } 1046 }
1047 1047
1048 else if ("Scripts" == item_type) 1048 else if (view->getString("filter_type_script") == item_type)
1049 { 1049 {
1050 filter_type = 0x1 << LLInventoryType::IT_LSL; 1050 filter_type = 0x1 << LLInventoryType::IT_LSL;
1051 } 1051 }
1052 1052
1053 else if ("Sounds" == item_type) 1053 else if (view->getString("filter_type_sound") == item_type)
1054 { 1054 {
1055 filter_type = 0x1 << LLInventoryType::IT_SOUND; 1055 filter_type = 0x1 << LLInventoryType::IT_SOUND;
1056 } 1056 }
1057 1057
1058 else if ("Textures" == item_type) 1058 else if (view->getString("filter_type_texture") == item_type)
1059 { 1059 {
1060 filter_type = 0x1 << LLInventoryType::IT_TEXTURE; 1060 filter_type = 0x1 << LLInventoryType::IT_TEXTURE;
1061 } 1061 }
1062 1062
1063 else if ("Snapshots" == item_type) 1063 else if (view->getString("filter_type_snapshot") == item_type)
1064 { 1064 {
1065 filter_type = 0x1 << LLInventoryType::IT_SNAPSHOT; 1065 filter_type = 0x1 << LLInventoryType::IT_SNAPSHOT;
1066 } 1066 }
1067 1067
1068 else if ("Custom..." == item_type) 1068 else if (view->getString("filter_type_custom") == item_type)
1069 { 1069 {
1070 // When they select custom, show the floater then return 1070 // When they select custom, show the floater then return
1071 if( !(view->filtersVisible(view)) ) 1071 if( !(view->filtersVisible(view)) )
@@ -1075,7 +1075,7 @@ void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data)
1075 return; 1075 return;
1076 } 1076 }
1077 1077
1078 else if ("All Types" == item_type) 1078 else if (view->getString("filter_type_all") == item_type)
1079 { 1079 {
1080 // Show all types 1080 // Show all types
1081 filter_type = 0xffffffff; 1081 filter_type = 0xffffffff;
@@ -1149,67 +1149,67 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
1149 1149
1150 if (filter_type == filter_mask) 1150 if (filter_type == filter_mask)
1151 { 1151 {
1152 selection = "All Types"; 1152 selection = view->getString("filter_type_all");
1153 } 1153 }
1154 1154
1155 else if (filter_type == (0x1 << LLInventoryType::IT_ANIMATION)) 1155 else if (filter_type == (0x1 << LLInventoryType::IT_ANIMATION))
1156 { 1156 {
1157 selection = "Animations"; 1157 selection = view->getString("filter_type_animation");
1158 } 1158 }
1159 1159
1160 else if (filter_type == (0x1 << LLInventoryType::IT_CALLINGCARD)) 1160 else if (filter_type == (0x1 << LLInventoryType::IT_CALLINGCARD))
1161 { 1161 {
1162 selection = "Calling Cards"; 1162 selection = view->getString("filter_type_callingcard");
1163 } 1163 }
1164 1164
1165 else if (filter_type == (0x1 << LLInventoryType::IT_WEARABLE)) 1165 else if (filter_type == (0x1 << LLInventoryType::IT_WEARABLE))
1166 { 1166 {
1167 selection = "Clothing / Body Parts"; 1167 selection = view->getString("filter_type_wearable");
1168 } 1168 }
1169 1169
1170 else if (filter_type == (0x1 << LLInventoryType::IT_GESTURE)) 1170 else if (filter_type == (0x1 << LLInventoryType::IT_GESTURE))
1171 { 1171 {
1172 selection = "Gestures"; 1172 selection = view->getString("filter_type_gesture");
1173 } 1173 }
1174 1174
1175 else if (filter_type == (0x1 << LLInventoryType::IT_LANDMARK)) 1175 else if (filter_type == (0x1 << LLInventoryType::IT_LANDMARK))
1176 { 1176 {
1177 selection = "Landmarks"; 1177 selection = view->getString("filter_type_landmark");
1178 } 1178 }
1179 1179
1180 else if (filter_type == (0x1 << LLInventoryType::IT_NOTECARD)) 1180 else if (filter_type == (0x1 << LLInventoryType::IT_NOTECARD))
1181 { 1181 {
1182 selection = "Notecards"; 1182 selection = view->getString("filter_type_notecard");
1183 } 1183 }
1184 1184
1185 else if (filter_type == (0x1 << LLInventoryType::IT_OBJECT)) 1185 else if (filter_type == (0x1 << LLInventoryType::IT_OBJECT))
1186 { 1186 {
1187 selection = "Objects"; 1187 selection = view->getString("filter_type_object");
1188 } 1188 }
1189 1189
1190 else if (filter_type == (0x1 << LLInventoryType::IT_LSL)) 1190 else if (filter_type == (0x1 << LLInventoryType::IT_LSL))
1191 { 1191 {
1192 selection = "Scripts"; 1192 selection = view->getString("filter_type_script");
1193 } 1193 }
1194 1194
1195 else if (filter_type == (0x1 << LLInventoryType::IT_SOUND)) 1195 else if (filter_type == (0x1 << LLInventoryType::IT_SOUND))
1196 { 1196 {
1197 selection = "Sounds"; 1197 selection = view->getString("filter_type_sound");
1198 } 1198 }
1199 1199
1200 else if (filter_type == (0x1 << LLInventoryType::IT_TEXTURE)) 1200 else if (filter_type == (0x1 << LLInventoryType::IT_TEXTURE))
1201 { 1201 {
1202 selection = "Textures"; 1202 selection = view->getString("filter_type_texture");
1203 } 1203 }
1204 1204
1205 else if (filter_type == (0x1 << LLInventoryType::IT_SNAPSHOT)) 1205 else if (filter_type == (0x1 << LLInventoryType::IT_SNAPSHOT))
1206 { 1206 {
1207 selection = "Snapshots"; 1207 selection = view->getString("filter_type_snapshot");
1208 } 1208 }
1209 1209
1210 else 1210 else
1211 { 1211 {
1212 selection = "Custom..."; 1212 selection = view->getString("filter_type_custom");
1213 } 1213 }
1214 1214
1215 1215