diff options
Diffstat (limited to 'linden/indra/newview')
163 files changed, 15003 insertions, 1794 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 34aa29f..bb07922 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -61,6 +61,7 @@ include_directories( | |||
61 | ) | 61 | ) |
62 | 62 | ||
63 | set(viewer_SOURCE_FILES | 63 | set(viewer_SOURCE_FILES |
64 | jcfloater_animation_list.cpp | ||
64 | llagent.cpp | 65 | llagent.cpp |
65 | llagentdata.cpp | 66 | llagentdata.cpp |
66 | llagentlanguage.cpp | 67 | llagentlanguage.cpp |
@@ -121,6 +122,7 @@ set(viewer_SOURCE_FILES | |||
121 | llfloaterabout.cpp | 122 | llfloaterabout.cpp |
122 | llfloateractivespeakers.cpp | 123 | llfloateractivespeakers.cpp |
123 | llfloateranimpreview.cpp | 124 | llfloateranimpreview.cpp |
125 | llfloaterassetbrowser.cpp | ||
124 | llfloaterauction.cpp | 126 | llfloaterauction.cpp |
125 | llfloateravatarinfo.cpp | 127 | llfloateravatarinfo.cpp |
126 | llfloateravatarpicker.cpp | 128 | llfloateravatarpicker.cpp |
@@ -166,6 +168,7 @@ set(viewer_SOURCE_FILES | |||
166 | llfloatermute.cpp | 168 | llfloatermute.cpp |
167 | llfloaternamedesc.cpp | 169 | llfloaternamedesc.cpp |
168 | llfloaternewim.cpp | 170 | llfloaternewim.cpp |
171 | llfloaterobjectiminfo.cpp | ||
169 | llfloateropenobject.cpp | 172 | llfloateropenobject.cpp |
170 | llfloaterparcel.cpp | 173 | llfloaterparcel.cpp |
171 | llfloaterpermissionsmgr.cpp | 174 | llfloaterpermissionsmgr.cpp |
@@ -420,6 +423,7 @@ set(viewer_SOURCE_FILES | |||
420 | llwearablelist.cpp | 423 | llwearablelist.cpp |
421 | llweb.cpp | 424 | llweb.cpp |
422 | llwebbrowserctrl.cpp | 425 | llwebbrowserctrl.cpp |
426 | llwindlightremotectrl.cpp | ||
423 | llwind.cpp | 427 | llwind.cpp |
424 | llwlanimator.cpp | 428 | llwlanimator.cpp |
425 | llwldaycycle.cpp | 429 | llwldaycycle.cpp |
@@ -431,6 +435,12 @@ set(viewer_SOURCE_FILES | |||
431 | llxmlrpctransaction.cpp | 435 | llxmlrpctransaction.cpp |
432 | noise.cpp | 436 | noise.cpp |
433 | pipeline.cpp | 437 | pipeline.cpp |
438 | primbackup.cpp | ||
439 | rlvhandler.cpp | ||
440 | rlvhelper.cpp | ||
441 | rlvmultistringsearch.cpp | ||
442 | rlvextensions.cpp | ||
443 | rlvfloaterbehaviour.cpp | ||
434 | ) | 444 | ) |
435 | 445 | ||
436 | set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING | 446 | set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING |
@@ -454,6 +464,7 @@ set(viewer_HEADER_FILES | |||
454 | CMakeLists.txt | 464 | CMakeLists.txt |
455 | ViewerInstall.cmake | 465 | ViewerInstall.cmake |
456 | 466 | ||
467 | jcfloater_animation_list.h | ||
457 | llagent.h | 468 | llagent.h |
458 | llagentdata.h | 469 | llagentdata.h |
459 | llagentlanguage.h | 470 | llagentlanguage.h |
@@ -516,6 +527,7 @@ set(viewer_HEADER_FILES | |||
516 | llfloaterabout.h | 527 | llfloaterabout.h |
517 | llfloateractivespeakers.h | 528 | llfloateractivespeakers.h |
518 | llfloateranimpreview.h | 529 | llfloateranimpreview.h |
530 | llfloaterassetbrowser.h | ||
519 | llfloaterauction.h | 531 | llfloaterauction.h |
520 | llfloateravatarinfo.h | 532 | llfloateravatarinfo.h |
521 | llfloateravatarpicker.h | 533 | llfloateravatarpicker.h |
@@ -561,6 +573,7 @@ set(viewer_HEADER_FILES | |||
561 | llfloatermute.h | 573 | llfloatermute.h |
562 | llfloaternamedesc.h | 574 | llfloaternamedesc.h |
563 | llfloaternewim.h | 575 | llfloaternewim.h |
576 | llfloaterobjectiminfo.h | ||
564 | llfloateropenobject.h | 577 | llfloateropenobject.h |
565 | llfloaterparcel.h | 578 | llfloaterparcel.h |
566 | llfloaterpermissionsmgr.h | 579 | llfloaterpermissionsmgr.h |
@@ -820,6 +833,7 @@ set(viewer_HEADER_FILES | |||
820 | llwebbrowserctrl.h | 833 | llwebbrowserctrl.h |
821 | llwind.h | 834 | llwind.h |
822 | llwindebug.h | 835 | llwindebug.h |
836 | llwindlightremotectrl.h | ||
823 | llwlanimator.h | 837 | llwlanimator.h |
824 | llwldaycycle.h | 838 | llwldaycycle.h |
825 | llwlparammanager.h | 839 | llwlparammanager.h |
@@ -831,9 +845,16 @@ set(viewer_HEADER_FILES | |||
831 | macmain.h | 845 | macmain.h |
832 | noise.h | 846 | noise.h |
833 | pipeline.h | 847 | pipeline.h |
848 | primbackup.h | ||
834 | randgauss.h | 849 | randgauss.h |
835 | VertexCache.h | 850 | VertexCache.h |
836 | VorbisFramework.h | 851 | VorbisFramework.h |
852 | rlvevent.h | ||
853 | rlvhandler.h | ||
854 | rlvhelper.h | ||
855 | rlvmultistringsearch.h | ||
856 | rlvextensions.h | ||
857 | rlvfloaterbehaviour.h | ||
837 | ) | 858 | ) |
838 | 859 | ||
839 | source_group("CMake Rules" FILES ViewerInstall.cmake) | 860 | source_group("CMake Rules" FILES ViewerInstall.cmake) |
@@ -1023,7 +1044,9 @@ set(viewer_XUI_FILES | |||
1023 | skins/default/xui/en-us/floater_about_land.xml | 1044 | skins/default/xui/en-us/floater_about_land.xml |
1024 | skins/default/xui/en-us/floater_about.xml | 1045 | skins/default/xui/en-us/floater_about.xml |
1025 | skins/default/xui/en-us/floater_active_speakers.xml | 1046 | skins/default/xui/en-us/floater_active_speakers.xml |
1047 | skins/default/xui/en-us/floater_animation_list.xml | ||
1026 | skins/default/xui/en-us/floater_animation_preview.xml | 1048 | skins/default/xui/en-us/floater_animation_preview.xml |
1049 | skins/default/xui/en-us/floater_asset_browser.xml | ||
1027 | skins/default/xui/en-us/floater_auction.xml | 1050 | skins/default/xui/en-us/floater_auction.xml |
1028 | skins/default/xui/en-us/floater_audio_volume.xml | 1051 | skins/default/xui/en-us/floater_audio_volume.xml |
1029 | skins/default/xui/en-us/floater_avatar_picker.xml | 1052 | skins/default/xui/en-us/floater_avatar_picker.xml |
@@ -1078,6 +1101,7 @@ set(viewer_XUI_FILES | |||
1078 | skins/default/xui/en-us/floater_name_description.xml | 1101 | skins/default/xui/en-us/floater_name_description.xml |
1079 | skins/default/xui/en-us/floater_new_im.xml | 1102 | skins/default/xui/en-us/floater_new_im.xml |
1080 | skins/default/xui/en-us/floater_new_outfit_dialog.xml | 1103 | skins/default/xui/en-us/floater_new_outfit_dialog.xml |
1104 | skins/default/xui/en-us/floater_object_im_info.xml | ||
1081 | skins/default/xui/en-us/floater_openobject.xml | 1105 | skins/default/xui/en-us/floater_openobject.xml |
1082 | skins/default/xui/en-us/floater_pay_object.xml | 1106 | skins/default/xui/en-us/floater_pay_object.xml |
1083 | skins/default/xui/en-us/floater_pay.xml | 1107 | skins/default/xui/en-us/floater_pay.xml |
@@ -1194,6 +1218,9 @@ set(viewer_XUI_FILES | |||
1194 | skins/default/xui/en-us/panel_voice_options.xml | 1218 | skins/default/xui/en-us/panel_voice_options.xml |
1195 | skins/default/xui/en-us/panel_voice_remote_expanded.xml | 1219 | skins/default/xui/en-us/panel_voice_remote_expanded.xml |
1196 | skins/default/xui/en-us/panel_voice_remote.xml | 1220 | skins/default/xui/en-us/panel_voice_remote.xml |
1221 | skins/default/xui/en-us/panel_windlight_controls.xml | ||
1222 | skins/default/xui/en-us/panel_windlight_remote.xml | ||
1223 | skins/default/xui/en-us/panel_windlight_remote_expanded.xml | ||
1197 | skins/default/xui/en-us/role_actions.xml | 1224 | skins/default/xui/en-us/role_actions.xml |
1198 | skins/default/xui/en-us/strings.xml | 1225 | skins/default/xui/en-us/strings.xml |
1199 | skins/default/xui/en-us/teleport_strings.xml | 1226 | skins/default/xui/en-us/teleport_strings.xml |
@@ -1385,6 +1412,7 @@ if (WINDOWS) | |||
1385 | endif (WINDOWS) | 1412 | endif (WINDOWS) |
1386 | 1413 | ||
1387 | target_link_libraries(${VIEWER_BINARY_NAME} | 1414 | target_link_libraries(${VIEWER_BINARY_NAME} |
1415 | ${NDOF_LIBRARY} | ||
1388 | ${LLAUDIO_LIBRARIES} | 1416 | ${LLAUDIO_LIBRARIES} |
1389 | ${LLCHARACTER_LIBRARIES} | 1417 | ${LLCHARACTER_LIBRARIES} |
1390 | ${LLIMAGE_LIBRARIES} | 1418 | ${LLIMAGE_LIBRARIES} |
@@ -1414,7 +1442,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} | |||
1414 | ${SDL_LIBRARY} | 1442 | ${SDL_LIBRARY} |
1415 | ${SMARTHEAP_LIBRARY} | 1443 | ${SMARTHEAP_LIBRARY} |
1416 | ${UI_LIBRARIES} | 1444 | ${UI_LIBRARIES} |
1417 | ${NDOF_LIBRARY} | ||
1418 | ${WINDOWS_LIBRARIES} | 1445 | ${WINDOWS_LIBRARIES} |
1419 | ${XMLRPCEPI_LIBRARIES} | 1446 | ${XMLRPCEPI_LIBRARIES} |
1420 | ${ELFIO_LIBRARIES} | 1447 | ${ELFIO_LIBRARIES} |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 477b4ba..4ae2db3 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -1,7 +1,106 @@ | |||
1 | <?xml version="1.0" ?> | 1 | <?xml version="1.0" ?> |
2 | <llsd> | 2 | <llsd> |
3 | <map> | 3 | <map> |
4 | <key>AFKTimeout</key> | 4 | <key>RestrainedLife</key> |
5 | <map> | ||
6 | <key>Comment</key> | ||
7 | <string>Toggles the RestrainedLife features (BDSM lockable toys support). Needs a restart of the viewer.</string> | ||
8 | <key>Persist</key> | ||
9 | <integer>1</integer> | ||
10 | <key>Type</key> | ||
11 | <string>Boolean</string> | ||
12 | <key>Value</key> | ||
13 | <integer>0</integer> | ||
14 | </map> | ||
15 | <key>RestrainedLifeDebug</key> | ||
16 | <map> | ||
17 | <key>Comment</key> | ||
18 | <string>Toggles the RestrainedLife debug mode (displays the commands when in debug mode).</string> | ||
19 | <key>Persist</key> | ||
20 | <integer>1</integer> | ||
21 | <key>Type</key> | ||
22 | <string>Boolean</string> | ||
23 | <key>Value</key> | ||
24 | <integer>0</integer> | ||
25 | </map> | ||
26 | <key>RestrainedLifeNoSetEnv</key> | ||
27 | <map> | ||
28 | <key>Comment</key> | ||
29 | <string>When TRUE, forbids to set the environment (time of day and Windlight settings) via RestrainedLife. Needs a restart of the viewer.</string> | ||
30 | <key>Persist</key> | ||
31 | <integer>1</integer> | ||
32 | <key>Type</key> | ||
33 | <string>Boolean</string> | ||
34 | <key>Value</key> | ||
35 | <integer>0</integer> | ||
36 | </map> | ||
37 | <key>RestrainedLifeForbidGiveToRLV</key> | ||
38 | <map> | ||
39 | <key>Comment</key> | ||
40 | <string>When FALSE, allows to give sub-folders to the #RLV RestrainedLife folder.</string> | ||
41 | <key>Persist</key> | ||
42 | <integer>1</integer> | ||
43 | <key>Type</key> | ||
44 | <string>Boolean</string> | ||
45 | <key>Value</key> | ||
46 | <integer>1</integer> | ||
47 | </map> | ||
48 | <key>RLVaEnableLegacyNaming</key> | ||
49 | <map> | ||
50 | <key>Comment</key> | ||
51 | <string>Enables legacy naming convention for folders</string> | ||
52 | <key>Persist</key> | ||
53 | <integer>1</integer> | ||
54 | <key>Type</key> | ||
55 | <string>Boolean</string> | ||
56 | <key>Value</key> | ||
57 | <integer>1</integer> | ||
58 | </map> | ||
59 | <key>RLVaEnableWear</key> | ||
60 | <map> | ||
61 | <key>Comment</key> | ||
62 | <string>When TRUE, enables the "Wear" option on the inventory item context menu for attachments.</string> | ||
63 | <key>Persist</key> | ||
64 | <integer>1</integer> | ||
65 | <key>Type</key> | ||
66 | <string>Boolean</string> | ||
67 | <key>Value</key> | ||
68 | <integer>0</integer> | ||
69 | </map> | ||
70 | <key>RLVaHideLockedLayers</key> | ||
71 | <map> | ||
72 | <key>Comment</key> | ||
73 | <string>When TRUE, hides worn but "remove outfit" restricted clothing layers from @getoufit</string> | ||
74 | <key>Persist</key> | ||
75 | <integer>1</integer> | ||
76 | <key>Type</key> | ||
77 | <string>Boolean</string> | ||
78 | <key>Value</key> | ||
79 | <integer>0</integer> | ||
80 | </map> | ||
81 | <key>RLVaHideLockedAttachments</key> | ||
82 | <map> | ||
83 | <key>Comment</key> | ||
84 | <string>When TRUE, hides worn but "no detach" restricted attachments from @getattach</string> | ||
85 | <key>Persist</key> | ||
86 | <integer>1</integer> | ||
87 | <key>Type</key> | ||
88 | <string>Boolean</string> | ||
89 | <key>Value</key> | ||
90 | <integer>0</integer> | ||
91 | </map> | ||
92 | <key>RLVaShowNameTags</key> | ||
93 | <map> | ||
94 | <key>Comment</key> | ||
95 | <string>Display of names above avatars is subject to the general "Show Names" setting when @shownames=n restricted</string> | ||
96 | <key>Persist</key> | ||
97 | <integer>1</integer> | ||
98 | <key>Type</key> | ||
99 | <string>Boolean</string> | ||
100 | <key>Value</key> | ||
101 | <integer>0</integer> | ||
102 | </map> | ||
103 | <key>AFKTimeout</key> | ||
5 | <map> | 104 | <map> |
6 | <key>Comment</key> | 105 | <key>Comment</key> |
7 | <string>Time before automatically setting AFK (away from keyboard) mode (seconds)</string> | 106 | <string>Time before automatically setting AFK (away from keyboard) mode (seconds)</string> |
@@ -664,6 +763,17 @@ | |||
664 | <key>Value</key> | 763 | <key>Value</key> |
665 | <integer>0</integer> | 764 | <integer>0</integer> |
666 | </map> | 765 | </map> |
766 | <key>BlockClickSit</key> | ||
767 | <map> | ||
768 | <key>Comment</key> | ||
769 | <string>Block click sit</string> | ||
770 | <key>Persist</key> | ||
771 | <integer>1</integer> | ||
772 | <key>Type</key> | ||
773 | <string>Boolean</string> | ||
774 | <key>Value</key> | ||
775 | <integer>0</integer> | ||
776 | </map> | ||
667 | <key>BrowserHome</key> | 777 | <key>BrowserHome</key> |
668 | <map> | 778 | <map> |
669 | <key>Comment</key> | 779 | <key>Comment</key> |
@@ -1105,6 +1215,17 @@ | |||
1105 | <key>Value</key> | 1215 | <key>Value</key> |
1106 | <real>0.5</real> | 1216 | <real>0.5</real> |
1107 | </map> | 1217 | </map> |
1218 | <key>ChatChannelSelect</key> | ||
1219 | <map> | ||
1220 | <key>Comment</key> | ||
1221 | <string>Toggle custom channel controls in the chat bar</string> | ||
1222 | <key>Persist</key> | ||
1223 | <integer>1</integer> | ||
1224 | <key>Type</key> | ||
1225 | <string>Boolean</string> | ||
1226 | <key>Value</key> | ||
1227 | <integer>0</integer> | ||
1228 | </map> | ||
1108 | <key>ChatFontSize</key> | 1229 | <key>ChatFontSize</key> |
1109 | <map> | 1230 | <map> |
1110 | <key>Comment</key> | 1231 | <key>Comment</key> |
@@ -2245,6 +2366,17 @@ | |||
2245 | <key>Value</key> | 2366 | <key>Value</key> |
2246 | <integer>0</integer> | 2367 | <integer>0</integer> |
2247 | </map> | 2368 | </map> |
2369 | <key>DoubleClickTeleport</key> | ||
2370 | <map> | ||
2371 | <key>Comment</key> | ||
2372 | <string>Enable double-click teleport</string> | ||
2373 | <key>Persist</key> | ||
2374 | <integer>1</integer> | ||
2375 | <key>Type</key> | ||
2376 | <string>Boolean</string> | ||
2377 | <key>Value</key> | ||
2378 | <integer>1</integer> | ||
2379 | </map> | ||
2248 | <key>DragAndDropToolTipDelay</key> | 2380 | <key>DragAndDropToolTipDelay</key> |
2249 | <map> | 2381 | <map> |
2250 | <key>Comment</key> | 2382 | <key>Comment</key> |
@@ -2371,6 +2503,17 @@ | |||
2371 | <key>Value</key> | 2503 | <key>Value</key> |
2372 | <integer>1</integer> | 2504 | <integer>1</integer> |
2373 | </map> | 2505 | </map> |
2506 | <key>EnableWindlightRemote</key> | ||
2507 | <map> | ||
2508 | <key>Comment</key> | ||
2509 | <string>Enable windlight quick access remote in toolbar</string> | ||
2510 | <key>Persist</key> | ||
2511 | <integer>1</integer> | ||
2512 | <key>Type</key> | ||
2513 | <string>Boolean</string> | ||
2514 | <key>Value</key> | ||
2515 | <integer>1</integer> | ||
2516 | </map> | ||
2374 | <key>EnergyFromTop</key> | 2517 | <key>EnergyFromTop</key> |
2375 | <map> | 2518 | <map> |
2376 | <key>Comment</key> | 2519 | <key>Comment</key> |
@@ -3084,7 +3227,24 @@ | |||
3084 | <integer>0</integer> | 3227 | <integer>0</integer> |
3085 | </array> | 3228 | </array> |
3086 | </map> | 3229 | </map> |
3087 | <key>FloaterOpenObjectRect</key> | 3230 | |
3231 | <key>FloaterObjectIMInfo</key> | ||
3232 | <map> | ||
3233 | <key>Comment</key> | ||
3234 | <string>Rectangle for floater object im info windows</string> | ||
3235 | <key>Persist</key> | ||
3236 | <integer>1</integer> | ||
3237 | <key>Type</key> | ||
3238 | <string>Rect</string> | ||
3239 | <key>Value</key> | ||
3240 | <array> | ||
3241 | <integer>0</integer> | ||
3242 | <integer>300</integer> | ||
3243 | <integer>300</integer> | ||
3244 | <integer>0</integer> | ||
3245 | </array> | ||
3246 | </map> | ||
3247 | <key>FloaterOpenObjectRect</key> | ||
3088 | <map> | 3248 | <map> |
3089 | <key>Comment</key> | 3249 | <key>Comment</key> |
3090 | <string>Rectangle for Open Object window</string> | 3250 | <string>Rectangle for Open Object window</string> |
@@ -3116,6 +3276,22 @@ | |||
3116 | <integer>0</integer> | 3276 | <integer>0</integer> |
3117 | </array> | 3277 | </array> |
3118 | </map> | 3278 | </map> |
3279 | <key>FloaterPrimImport</key> | ||
3280 | <map> | ||
3281 | <key>Comment</key> | ||
3282 | <string>Rectangle for import/export</string> | ||
3283 | <key>Persist</key> | ||
3284 | <integer>1</integer> | ||
3285 | <key>Type</key> | ||
3286 | <string>Rect</string> | ||
3287 | <key>Value</key> | ||
3288 | <array> | ||
3289 | <integer>0</integer> | ||
3290 | <integer>25</integer> | ||
3291 | <integer>400</integer> | ||
3292 | <integer>0</integer> | ||
3293 | </array> | ||
3294 | </map> | ||
3119 | <key>FloaterRegionInfo</key> | 3295 | <key>FloaterRegionInfo</key> |
3120 | <map> | 3296 | <map> |
3121 | <key>Comment</key> | 3297 | <key>Comment</key> |
@@ -3999,6 +4175,17 @@ | |||
3999 | <key>Value</key> | 4175 | <key>Value</key> |
4000 | <real>1.0</real> | 4176 | <real>1.0</real> |
4001 | </map> | 4177 | </map> |
4178 | <key>InventorySearchType</key> | ||
4179 | <map> | ||
4180 | <key>Comment</key> | ||
4181 | <string>Controls what type of inventory search we perform.</string> | ||
4182 | <key>Persist</key> | ||
4183 | <integer>0</integer> | ||
4184 | <key>Type</key> | ||
4185 | <string>U32</string> | ||
4186 | <key>Value</key> | ||
4187 | <integer>0</integer> | ||
4188 | </map> | ||
4002 | <key>InventorySortOrder</key> | 4189 | <key>InventorySortOrder</key> |
4003 | <map> | 4190 | <map> |
4004 | <key>Comment</key> | 4191 | <key>Comment</key> |
@@ -5780,7 +5967,7 @@ | |||
5780 | <key>Persist</key> | 5967 | <key>Persist</key> |
5781 | <integer>1</integer> | 5968 | <integer>1</integer> |
5782 | <key>Type</key> | 5969 | <key>Type</key> |
5783 | <string>S32</string> | 5970 | <string>F32</string> |
5784 | <key>Value</key> | 5971 | <key>Value</key> |
5785 | <integer>0</integer> | 5972 | <integer>0</integer> |
5786 | </map> | 5973 | </map> |
@@ -7403,6 +7590,17 @@ | |||
7403 | <key>Value</key> | 7590 | <key>Value</key> |
7404 | <integer>0</integer> | 7591 | <integer>0</integer> |
7405 | </map> | 7592 | </map> |
7593 | <key>ShowWindlightSettingsPopup</key> | ||
7594 | <map> | ||
7595 | <key>Comment</key> | ||
7596 | <string>Show environment settings popup</string> | ||
7597 | <key>Persist</key> | ||
7598 | <integer>1</integer> | ||
7599 | <key>Type</key> | ||
7600 | <string>Boolean</string> | ||
7601 | <key>Value</key> | ||
7602 | <integer>0</integer> | ||
7603 | </map> | ||
7406 | <key>ShowWorldMap</key> | 7604 | <key>ShowWorldMap</key> |
7407 | <map> | 7605 | <map> |
7408 | <key>Comment</key> | 7606 | <key>Comment</key> |
@@ -7907,7 +8105,7 @@ | |||
7907 | <key>Type</key> | 8105 | <key>Type</key> |
7908 | <string>F32</string> | 8106 | <string>F32</string> |
7909 | <key>Value</key> | 8107 | <key>Value</key> |
7910 | <real>500.0</real> | 8108 | <real>1000.0</real> |
7911 | </map> | 8109 | </map> |
7912 | <key>ToolHelpRect</key> | 8110 | <key>ToolHelpRect</key> |
7913 | <map> | 8111 | <map> |
diff --git a/linden/indra/newview/app_settings/settings_per_account.xml b/linden/indra/newview/app_settings/settings_per_account.xml index 90c7b11..59caac4 100644 --- a/linden/indra/newview/app_settings/settings_per_account.xml +++ b/linden/indra/newview/app_settings/settings_per_account.xml | |||
@@ -1,6 +1,17 @@ | |||
1 | <llsd> | 1 | <llsd> |
2 | <map> | 2 | <map> |
3 | <key>BusyModeResponse</key> | 3 | <key>RLVaLoginLastLocation</key> |
4 | <map> | ||
5 | <key>Comment</key> | ||
6 | <string>Determines whether the next login will be forced to the last logoff location (set by the viewer)</string> | ||
7 | <key>Persist</key> | ||
8 | <integer>1</integer> | ||
9 | <key>Type</key> | ||
10 | <string>Boolean</string> | ||
11 | <key>Value</key> | ||
12 | <integer>1</integer> | ||
13 | </map> | ||
14 | <key>BusyModeResponse</key> | ||
4 | <map> | 15 | <map> |
5 | <key>Comment</key> | 16 | <key>Comment</key> |
6 | <string>Auto response to instant messages while in busy mode.</string> | 17 | <string>Auto response to instant messages while in busy mode.</string> |
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%201.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%201.xml new file mode 100644 index 0000000..896abf6 --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%201.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.35999998450279236</real> | ||
6 | <real>0.42000001668930054</real> | ||
7 | <real>0.42000001668930054</real> | ||
8 | <real>0.42000001668930054</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>0.51999998092651367</real> | ||
13 | <real>0.2800000011920929</real> | ||
14 | <real>0.51999998092651367</real> | ||
15 | <real>0.51999998092651367</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.69999998807907104</real> | ||
20 | <real>0.69999998807907104</real> | ||
21 | <real>0.68000000715255737</real> | ||
22 | <real>0.69999998807907104</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>1</real> | ||
27 | <real>0.79000002145767212</real> | ||
28 | <real>0.80000001192092896</real> | ||
29 | <real>1</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.40999999642372131</real> | ||
34 | <real>0.39999997615814209</real> | ||
35 | <real>0.88999998569488525</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.28999999165534973</real> | ||
41 | <real>0.32999998331069946</real> | ||
42 | <real>0.039999999105930328</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.37999999523162842</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>11.809999465942383</real> | ||
55 | <real>12.799999237060547</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.31999999284744263</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.00021999998716637492</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>4</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>3.8327431678771973</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.5399999618530273</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>14.40000057220459</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.85000002384185791</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>2.0399999618530273</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.049999997019767761</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>0.63680768013000488</real> | ||
116 | <real>0.043968122452497482</real> | ||
117 | <real>-0.76976805925369263</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>676.10003662109375</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>18</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>2</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0.043982300907373428</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>2.369999885559082</real> | ||
136 | <real>1.4099999666213989</real> | ||
137 | <real>1.0199999809265137</real> | ||
138 | <real>2.369999885559082</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%202.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%202.xml new file mode 100644 index 0000000..3b170ac --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%202.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.84000003337860107</real> | ||
6 | <real>0.56999999284744263</real> | ||
7 | <real>0.56999999284744263</real> | ||
8 | <real>0.84000003337860107</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>1.0799999237060547</real> | ||
13 | <real>0.51999998092651367</real> | ||
14 | <real>0.51999998092651367</real> | ||
15 | <real>1.0799999237060547</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.57999998331069946</real> | ||
20 | <real>0.25999999046325684</real> | ||
21 | <real>0.25999999046325684</real> | ||
22 | <real>0.57999998331069946</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>1</real> | ||
27 | <real>0.79000002145767212</real> | ||
28 | <real>0.80000001192092896</real> | ||
29 | <real>1</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.40999999642372131</real> | ||
34 | <real>0.39999997615814209</real> | ||
35 | <real>0.88999998569488525</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.28999999165534973</real> | ||
41 | <real>0.32999998331069946</real> | ||
42 | <real>0.039999999105930328</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.37999999523162842</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>11.809999465942383</real> | ||
55 | <real>12.799999237060547</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.31999999284744263</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.0002899999963119626</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>5.5999999046325684</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>3.8327431678771973</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.5399999618530273</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>14.40000057220459</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.85000002384185791</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>2.0399999618530273</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.049999997019767761</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>0.63495957851409912</real> | ||
116 | <real>0.087851203978061676</real> | ||
117 | <real>-0.76753407716751099</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>676.10003662109375</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>18</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>2</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0.087964601814746857</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>2.2799999713897705</real> | ||
136 | <real>0.75</real> | ||
137 | <real>0.59999996423721313</real> | ||
138 | <real>2.2799999713897705</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%203.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%203.xml new file mode 100644 index 0000000..5cc7a61 --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%203.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.71999996900558472</real> | ||
6 | <real>0.71999996900558472</real> | ||
7 | <real>0.71999996900558472</real> | ||
8 | <real>0.23999999463558197</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>0.31999999284744263</real> | ||
13 | <real>0.094117648899555206</real> | ||
14 | <real>0.094117648899555206</real> | ||
15 | <real>0.15999999642372131</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.45999997854232788</real> | ||
20 | <real>0</real> | ||
21 | <real>0.039999999105930328</real> | ||
22 | <real>0.45999997854232788</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>0.14000000059604645</real> | ||
27 | <real>0.14000000059604645</real> | ||
28 | <real>0.14000000059604645</real> | ||
29 | <real>0.14000000059604645</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.74000000953674316</real> | ||
34 | <real>0.93999999761581421</real> | ||
35 | <real>0.20999999344348907</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.65999996662139893</real> | ||
41 | <real>0.52999997138977051</real> | ||
42 | <real>0.0099999997764825821</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.070000000298023224</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>18</real> | ||
55 | <real>20</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.34000000357627869</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.00018000000272877514</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>6.7000002861022949</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>3.5185837745666504</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.0399999618530273</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>17.399999618530273</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.64999997615814209</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>0.40999999642372131</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.17000000178813934</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>0.3677685558795929</real> | ||
116 | <real>0.043968122452497482</real> | ||
117 | <real>-0.92887735366821289</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>263</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>24</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>1.0399999618530273</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0.043982300907373428</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>1.5899999141693115</real> | ||
136 | <real>1.5899999141693115</real> | ||
137 | <real>1.5899999141693115</real> | ||
138 | <real>1.5899999141693115</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%204.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%204.xml new file mode 100644 index 0000000..d48a4a2 --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%204.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.42000001668930054</real> | ||
6 | <real>0.29999998211860657</real> | ||
7 | <real>0.29999998211860657</real> | ||
8 | <real>0.42000001668930054</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>0.59999996423721313</real> | ||
13 | <real>0.15999999642372131</real> | ||
14 | <real>0.2199999988079071</real> | ||
15 | <real>0.59999996423721313</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.029999999329447746</real> | ||
20 | <real>0</real> | ||
21 | <real>0</real> | ||
22 | <real>0.079999998211860657</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>0.81999999284744263</real> | ||
27 | <real>0.18999999761581421</real> | ||
28 | <real>0.039999999105930328</real> | ||
29 | <real>0.81999999284744263</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.74000000953674316</real> | ||
34 | <real>0.93999999761581421</real> | ||
35 | <real>0.20999999344348907</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.65999996662139893</real> | ||
41 | <real>0.52999997138977051</real> | ||
42 | <real>0.0099999997764825821</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.14000000059604645</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>18</real> | ||
55 | <real>20</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.37999999523162842</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.00015999999595806003</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>17.399999618530273</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>2.3247785568237305</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.5299999713897705</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>17.399999618530273</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.64999997615814209</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>0.32999998331069946</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.079999998211860657</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>-0.72615015506744385</real> | ||
116 | <real>0.087851203978061676</real> | ||
117 | <real>-0.68190038204193115</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>1048</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>24</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>1.3199999332427979</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0.087964601814746857</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>1.5899999141693115</real> | ||
136 | <real>0.47999998927116394</real> | ||
137 | <real>0.53999996185302734</real> | ||
138 | <real>1.5899999141693115</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%205.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%205.xml new file mode 100644 index 0000000..3ceb600 --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%205.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.77999997138977051</real> | ||
6 | <real>0.29999998211860657</real> | ||
7 | <real>0.29999998211860657</real> | ||
8 | <real>0.77999997138977051</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>1.5799999237060547</real> | ||
13 | <real>0.45999997854232788</real> | ||
14 | <real>0.45999997854232788</real> | ||
15 | <real>1.5799999237060547</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.97999995946884155</real> | ||
20 | <real>0.34000000357627869</real> | ||
21 | <real>0.35999998450279236</real> | ||
22 | <real>0.97999995946884155</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>0</real> | ||
27 | <real>0</real> | ||
28 | <real>0</real> | ||
29 | <real>0</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.74000000953674316</real> | ||
34 | <real>0.93999999761581421</real> | ||
35 | <real>0.19999998807907104</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.65999996662139893</real> | ||
41 | <real>0.69999998807907104</real> | ||
42 | <real>0</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.070000000298023224</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>2.8600001335144043</real> | ||
55 | <real>17.589999675750732</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.42999997735023499</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.00015999999595806003</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>2.1000001430511475</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>3.7699110507965088</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.1100000143051147</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>14.000000953674316</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.89999997615814209</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>0.82999998331069946</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.48999997973442078</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>0.58778512477874756</real> | ||
116 | <real>0</real> | ||
117 | <real>-0.80901706218719482</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>276</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>24</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>1.1699999570846558</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>0.29999998211860657</real> | ||
136 | <real>0.29999998211860657</real> | ||
137 | <real>0.29999998211860657</real> | ||
138 | <real>0.099999994039535522</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/app_settings/windlight/skies/Rouge%206.xml b/linden/indra/newview/app_settings/windlight/skies/Rouge%206.xml new file mode 100644 index 0000000..c36da85 --- /dev/null +++ b/linden/indra/newview/app_settings/windlight/skies/Rouge%206.xml | |||
@@ -0,0 +1,141 @@ | |||
1 | <llsd> | ||
2 | <map> | ||
3 | <key>ambient</key> | ||
4 | <array> | ||
5 | <real>0.77999997138977051</real> | ||
6 | <real>0.29999998211860657</real> | ||
7 | <real>0.29999998211860657</real> | ||
8 | <real>0.77999997138977051</real> | ||
9 | </array> | ||
10 | <key>blue_density</key> | ||
11 | <array> | ||
12 | <real>0.65999996662139893</real> | ||
13 | <real>0.58384609222412109</real> | ||
14 | <real>0.58384609222412109</real> | ||
15 | <real>0.32999998331069946</real> | ||
16 | </array> | ||
17 | <key>blue_horizon</key> | ||
18 | <array> | ||
19 | <real>0.37999999523162842</real> | ||
20 | <real>0.34000000357627869</real> | ||
21 | <real>0.35999998450279236</real> | ||
22 | <real>0.37999999523162842</real> | ||
23 | </array> | ||
24 | <key>cloud_color</key> | ||
25 | <array> | ||
26 | <real>0</real> | ||
27 | <real>0</real> | ||
28 | <real>0</real> | ||
29 | <real>0</real> | ||
30 | </array> | ||
31 | <key>cloud_pos_density1</key> | ||
32 | <array> | ||
33 | <real>0.74000000953674316</real> | ||
34 | <real>0.93999999761581421</real> | ||
35 | <real>0.19999998807907104</real> | ||
36 | <real>1</real> | ||
37 | </array> | ||
38 | <key>cloud_pos_density2</key> | ||
39 | <array> | ||
40 | <real>0.65999996662139893</real> | ||
41 | <real>0.69999998807907104</real> | ||
42 | <real>0</real> | ||
43 | <real>1</real> | ||
44 | </array> | ||
45 | <key>cloud_scale</key> | ||
46 | <array> | ||
47 | <real>0.070000000298023224</real> | ||
48 | <real>0</real> | ||
49 | <real>0</real> | ||
50 | <real>1</real> | ||
51 | </array> | ||
52 | <key>cloud_scroll_rate</key> | ||
53 | <array> | ||
54 | <real>2.8600001335144043</real> | ||
55 | <real>17.589999675750732</real> | ||
56 | </array> | ||
57 | <key>cloud_shadow</key> | ||
58 | <array> | ||
59 | <real>0.42999997735023499</real> | ||
60 | <real>0</real> | ||
61 | <real>0</real> | ||
62 | <real>1</real> | ||
63 | </array> | ||
64 | <key>density_multiplier</key> | ||
65 | <array> | ||
66 | <real>0.00015999999595806003</real> | ||
67 | <real>0</real> | ||
68 | <real>0</real> | ||
69 | <real>1</real> | ||
70 | </array> | ||
71 | <key>distance_multiplier</key> | ||
72 | <array> | ||
73 | <real>2.1000001430511475</real> | ||
74 | <real>0</real> | ||
75 | <real>0</real> | ||
76 | <real>1</real> | ||
77 | </array> | ||
78 | <key>east_angle</key> | ||
79 | <real>3.7699110507965088</real> | ||
80 | <key>enable_cloud_scroll</key> | ||
81 | <array> | ||
82 | <boolean>1</boolean> | ||
83 | <boolean>1</boolean> | ||
84 | </array> | ||
85 | <key>gamma</key> | ||
86 | <array> | ||
87 | <real>1.1100000143051147</real> | ||
88 | <real>0</real> | ||
89 | <real>0</real> | ||
90 | <real>1</real> | ||
91 | </array> | ||
92 | <key>glow</key> | ||
93 | <array> | ||
94 | <real>14.000000953674316</real> | ||
95 | <real>0.0010000000474974513</real> | ||
96 | <real>-0.89999997615814209</real> | ||
97 | <real>1</real> | ||
98 | </array> | ||
99 | <key>haze_density</key> | ||
100 | <array> | ||
101 | <real>0.82999998331069946</real> | ||
102 | <real>0</real> | ||
103 | <real>0</real> | ||
104 | <real>1</real> | ||
105 | </array> | ||
106 | <key>haze_horizon</key> | ||
107 | <array> | ||
108 | <real>0.2800000011920929</real> | ||
109 | <real>0.19915600121021271</real> | ||
110 | <real>0.19915600121021271</real> | ||
111 | <real>1</real> | ||
112 | </array> | ||
113 | <key>lightnorm</key> | ||
114 | <array> | ||
115 | <real>0.58778512477874756</real> | ||
116 | <real>0</real> | ||
117 | <real>-0.80901706218719482</real> | ||
118 | <real>0</real> | ||
119 | </array> | ||
120 | <key>max_y</key> | ||
121 | <array> | ||
122 | <real>276</real> | ||
123 | <real>0</real> | ||
124 | <real>0</real> | ||
125 | <real>1</real> | ||
126 | </array> | ||
127 | <key>preset_num</key> | ||
128 | <integer>24</integer> | ||
129 | <key>star_brightness</key> | ||
130 | <real>1.1699999570846558</real> | ||
131 | <key>sun_angle</key> | ||
132 | <real>0</real> | ||
133 | <key>sunlight_color</key> | ||
134 | <array> | ||
135 | <real>0.29999998211860657</real> | ||
136 | <real>0.29999998211860657</real> | ||
137 | <real>0.29999998211860657</real> | ||
138 | <real>0.099999994039535522</real> | ||
139 | </array> | ||
140 | </map> | ||
141 | </llsd> | ||
diff --git a/linden/indra/newview/jcfloater_animation_list.cpp b/linden/indra/newview/jcfloater_animation_list.cpp new file mode 100644 index 0000000..9f5c9bb --- /dev/null +++ b/linden/indra/newview/jcfloater_animation_list.cpp | |||
@@ -0,0 +1,462 @@ | |||
1 | /* Copyright (c) 2009 | ||
2 | * | ||
3 | * Modular Systems Ltd. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or | ||
6 | * without modification, are permitted provided that the following | ||
7 | * conditions are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * 2. Redistributions in binary form must reproduce the above | ||
12 | * copyright notice, this list of conditions and the following | ||
13 | * disclaimer in the documentation and/or other materials provided | ||
14 | * with the distribution. | ||
15 | * 3. Neither the name Modular Systems Ltd nor the names of its contributors | ||
16 | * may be used to endorse or promote products derived from this | ||
17 | * software without specific prior written permission. | ||
18 | * | ||
19 | * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS “AS IS” | ||
20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
21 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS | ||
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
29 | * THE POSSIBILITY OF SUCH DAMAGE. | ||
30 | */ | ||
31 | |||
32 | #include "llviewerprecompiledheaders.h" | ||
33 | |||
34 | #include "lluuid.h" | ||
35 | #include "lluictrlfactory.h" | ||
36 | #include "llvoavatar.h" | ||
37 | |||
38 | #include "llagent.h" | ||
39 | |||
40 | #include "llscrolllistctrl.h" | ||
41 | |||
42 | #include "llviewerobjectlist.h" | ||
43 | |||
44 | #include "jcfloater_animation_list.h" | ||
45 | |||
46 | #include "llviewercontrol.h" | ||
47 | |||
48 | #include "llinventorymodel.h" | ||
49 | |||
50 | #include "llcategory.h" | ||
51 | |||
52 | #include "llfloaterchat.h" | ||
53 | |||
54 | #include "llfloateravatarinfo.h" | ||
55 | |||
56 | |||
57 | |||
58 | |||
59 | |||
60 | //std::map<LLUUID, AObjectData> JCFloaterAnimList::mObjectOwners; | ||
61 | |||
62 | JCFloaterAnimList::JCFloaterAnimList(const LLSD& seed) : | ||
63 | LLFloater(std::string("animation list")), | ||
64 | mAnimList(0) | ||
65 | { | ||
66 | BOOL no_open = FALSE; | ||
67 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_animation_list.xml",&getFactoryMap(),no_open); | ||
68 | } | ||
69 | |||
70 | JCFloaterAnimList::~JCFloaterAnimList() | ||
71 | { | ||
72 | } | ||
73 | |||
74 | //static | ||
75 | bool JCFloaterAnimList::visible(LLFloater* instance, const LLSD& key) | ||
76 | { | ||
77 | return VisibilityPolicy<LLFloater>::visible(instance, key); | ||
78 | } | ||
79 | |||
80 | //static | ||
81 | void JCFloaterAnimList::show(LLFloater* instance, const LLSD& key) | ||
82 | { | ||
83 | VisibilityPolicy<LLFloater>::show(instance, key); | ||
84 | } | ||
85 | |||
86 | //static | ||
87 | void JCFloaterAnimList::hide(LLFloater* instance, const LLSD& key) | ||
88 | { | ||
89 | VisibilityPolicy<LLFloater>::hide(instance, key); | ||
90 | } | ||
91 | |||
92 | void JCFloaterAnimList::onVisibilityChange(BOOL new_visibility) | ||
93 | { | ||
94 | if(!new_visibility) { | ||
95 | // *HACK: clean up memory on hiding | ||
96 | mObjectOwners.clear(); | ||
97 | } | ||
98 | } | ||
99 | |||
100 | BOOL JCFloaterAnimList::postBuild() | ||
101 | { | ||
102 | mAnimList = getChild<LLScrollListCtrl>("animation_list"); | ||
103 | mAnimList->setCallbackUserData(this); | ||
104 | mAnimList->setDoubleClickCallback(onDoubleClick); | ||
105 | mAnimList->sortByColumn("animation_uuid", TRUE); | ||
106 | |||
107 | childSetAction("Stop Selected",StopSelected,this); | ||
108 | childSetAction("Revoke Selected",RevokeSelected,this); | ||
109 | childSetAction("Stop+Revoke Selected",StopRevokeSelected,this); | ||
110 | childSetAction("Open Owner Profile",OpenProfile,this); | ||
111 | |||
112 | return 1; | ||
113 | } | ||
114 | |||
115 | void JCFloaterAnimList::StopSelected(void *userdata ) | ||
116 | { | ||
117 | JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; | ||
118 | LLDynamicArray<LLUUID> ids; | ||
119 | std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected(); | ||
120 | for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ ) | ||
121 | { | ||
122 | LLScrollListItem *item = *itr; | ||
123 | const LLUUID &id = item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID(); | ||
124 | if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL ) | ||
125 | { | ||
126 | ids.put(id); | ||
127 | } | ||
128 | } | ||
129 | gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP); | ||
130 | } | ||
131 | |||
132 | void JCFloaterAnimList::RevokeSelected(void *userdata ) | ||
133 | { | ||
134 | JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; | ||
135 | LLDynamicArray<LLUUID> ids; | ||
136 | std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected(); | ||
137 | for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ ) | ||
138 | { | ||
139 | LLScrollListItem *item = *itr; | ||
140 | const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID(); | ||
141 | if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL ) | ||
142 | { | ||
143 | ids.put(id); | ||
144 | } | ||
145 | } | ||
146 | if( !ids.empty() ) | ||
147 | { | ||
148 | for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
149 | { | ||
150 | LLUUID id = *itr; | ||
151 | LLMessageSystem* msg = gMessageSystem; | ||
152 | msg->newMessageFast(_PREHASH_RevokePermissions); | ||
153 | msg->nextBlockFast(_PREHASH_AgentData); | ||
154 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
155 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
156 | msg->nextBlockFast(_PREHASH_Data); | ||
157 | msg->addUUIDFast(_PREHASH_ObjectID, id); | ||
158 | msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX); | ||
159 | gAgent.sendReliableMessage(); | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | |||
164 | void JCFloaterAnimList::StopRevokeSelected(void *userdata ) | ||
165 | { | ||
166 | StopSelected(userdata); | ||
167 | RevokeSelected(userdata); | ||
168 | } | ||
169 | |||
170 | void JCFloaterAnimList::OpenProfile(void *userdata ) | ||
171 | { | ||
172 | JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; | ||
173 | std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected(); | ||
174 | if(!items.empty()) | ||
175 | { | ||
176 | //LLVOAvatar* avatarp = gAgent.getAvatarObject(); | ||
177 | for(std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); ++itr) | ||
178 | { | ||
179 | LLScrollListItem *item = *itr; | ||
180 | const LLUUID &object_id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID(); | ||
181 | LLFloaterAvatarInfo::showFromDirectory(self->mObjectOwners[object_id].owner_id); | ||
182 | } | ||
183 | } | ||
184 | } | ||
185 | |||
186 | /*void JCFloaterAnimList::ReturnSelected(void *userdata ) | ||
187 | { | ||
188 | JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; | ||
189 | LLDynamicArray<LLUUID> ids = self->mAnimList->getSelectedIDs(); | ||
190 | if(ids.size() > 0) | ||
191 | { | ||
192 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | ||
193 | for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
194 | { | ||
195 | LLUUID id = *itr; | ||
196 | |||
197 | } | ||
198 | } | ||
199 | }*/ | ||
200 | |||
201 | void JCFloaterAnimList::draw() | ||
202 | { | ||
203 | refresh(); | ||
204 | LLFloater::draw(); | ||
205 | } | ||
206 | //LLScrollListCtrl::getSelectedIDs(); | ||
207 | void JCFloaterAnimList::refresh() | ||
208 | { | ||
209 | LLDynamicArray<LLUUID> selected = mAnimList->getSelectedIDs(); | ||
210 | S32 scrollpos = mAnimList->getScrollPos(); | ||
211 | mAnimList->deleteAllItems(); | ||
212 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | ||
213 | if (avatarp) | ||
214 | { | ||
215 | LLVOAvatar::AnimSourceIterator ai; | ||
216 | |||
217 | for(ai = avatarp->mAnimationSources.begin(); ai != avatarp->mAnimationSources.end(); ++ai) | ||
218 | { | ||
219 | LLSD element; | ||
220 | const LLUUID &aifirst = ai->first; | ||
221 | LLViewerInventoryItem* item = gInventory.getItem(findItemID(ai->second,0)); | ||
222 | |||
223 | // *NOTE: conceal id to prevent bugs, use | ||
224 | // item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID() | ||
225 | // instead | ||
226 | element["id"] = LLUUID::null.combine(ai->second); | ||
227 | element["columns"][LIST_ANIMATION_NAME]["column"] = "Anim Name"; | ||
228 | element["columns"][LIST_ANIMATION_NAME]["type"] = "text"; | ||
229 | element["columns"][LIST_ANIMATION_NAME]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
230 | if(item) | ||
231 | { | ||
232 | element["columns"][LIST_ANIMATION_NAME]["value"] = item->getName();//ai->second//"avatar_icon"; | ||
233 | }else | ||
234 | { | ||
235 | element["columns"][LIST_ANIMATION_NAME]["value"] = "Not in Inventory"; | ||
236 | } | ||
237 | element["columns"][LIST_ANIMATION_UUID]["column"] = "Animation UUID"; | ||
238 | element["columns"][LIST_ANIMATION_UUID]["type"] = "text"; | ||
239 | element["columns"][LIST_ANIMATION_UUID]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
240 | element["columns"][LIST_ANIMATION_UUID]["value"] = ai->second; | ||
241 | element["columns"][LIST_OBJECT_UUID]["column"] = "Source Object UUID"; | ||
242 | element["columns"][LIST_OBJECT_UUID]["type"] = "text"; | ||
243 | element["columns"][LIST_OBJECT_UUID]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
244 | element["columns"][LIST_OBJECT_UUID]["value"] = aifirst; | ||
245 | element["columns"][LIST_OBJECT_OWNER]["column"] = "Source Owner"; | ||
246 | element["columns"][LIST_OBJECT_OWNER]["type"] = "text"; | ||
247 | element["columns"][LIST_OBJECT_OWNER]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
248 | std::string name("?"); | ||
249 | LLViewerObject *object = gObjectList.findObject(aifirst); | ||
250 | bool is_first = ( mObjectOwners.count( aifirst ) == 0 ); | ||
251 | bool just_shown = false; | ||
252 | LLUUID owner_id(LLUUID::null); | ||
253 | |||
254 | if( !is_first ) | ||
255 | { | ||
256 | name = mObjectOwners[aifirst].owner_name; | ||
257 | owner_id = mObjectOwners[aifirst].owner_id; | ||
258 | } | ||
259 | |||
260 | if( object ) | ||
261 | { | ||
262 | if( object->permYouOwner() ) | ||
263 | { | ||
264 | owner_id = gAgent.getID(); | ||
265 | gAgent.getName(name); | ||
266 | } | ||
267 | else | ||
268 | { | ||
269 | object = (LLViewerObject *) object->getRoot(); | ||
270 | if( object->isAvatar() ) | ||
271 | { | ||
272 | owner_id = object->getID(); | ||
273 | name = ((LLVOAvatar *)object)->getFullname(); | ||
274 | } | ||
275 | } | ||
276 | } | ||
277 | |||
278 | { | ||
279 | AObjectData &data = mObjectOwners[aifirst]; | ||
280 | if( object ) | ||
281 | { | ||
282 | if( !data.in_object_list ) | ||
283 | { | ||
284 | just_shown = true; | ||
285 | data.in_object_list = true; | ||
286 | } | ||
287 | data.root_id = ( (LLViewerObject*)object->getRoot() )->getID(); | ||
288 | } | ||
289 | data.owner_name = name; | ||
290 | data.owner_id = owner_id; | ||
291 | } | ||
292 | |||
293 | if( is_first || just_shown ) { | ||
294 | if( name == "?" && !aifirst.isNull()) { | ||
295 | LLMessageSystem* msg = gMessageSystem; | ||
296 | msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily); | ||
297 | msg->nextBlockFast(_PREHASH_AgentData); | ||
298 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
299 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
300 | msg->nextBlockFast(_PREHASH_ObjectData); | ||
301 | msg->addU32Fast(_PREHASH_RequestFlags, 0 ); | ||
302 | if( object ) | ||
303 | { | ||
304 | LL_INFOS("Avatar List") << "Sending RequestObjectPropertiesFamily packet for id( " << aifirst.asString() << " ) on object( " << object->getID().asString() << " )" << LL_ENDL; | ||
305 | msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); | ||
306 | } | ||
307 | else | ||
308 | { | ||
309 | LL_INFOS("Avatar List") << "Sending RequestObjectPropertiesFamily packet for id( " << aifirst.asString() << " )" << LL_ENDL; | ||
310 | msg->addUUIDFast(_PREHASH_ObjectID, aifirst); | ||
311 | } | ||
312 | gAgent.sendReliableMessage(); | ||
313 | } | ||
314 | } | ||
315 | element["columns"][LIST_OBJECT_OWNER]["value"] = name; | ||
316 | mAnimList->addElement(element, ADD_BOTTOM); | ||
317 | //LLViewerObject* objectp = gObjectList.findObject(ai->first); | ||
318 | //if(objectp) | ||
319 | //{ | ||
320 | // //objectp-> | ||
321 | //} | ||
322 | |||
323 | //object_ids.insert(ai->first); | ||
324 | //animation_ids.insert(ai->second); | ||
325 | } | ||
326 | } | ||
327 | |||
328 | mAnimList->sortItems(); | ||
329 | mAnimList->selectMultiple(selected); | ||
330 | mAnimList->setScrollPos(scrollpos); | ||
331 | } | ||
332 | |||
333 | void JCFloaterAnimList::callbackLoadOwnerName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data) | ||
334 | { | ||
335 | LLUUID *oid = (LLUUID*)data; | ||
336 | JCFloaterAnimList *self = JCFloaterAnimList::getInstance(LLSD()); | ||
337 | if(self->mObjectOwners.count( *oid ) > 0) | ||
338 | { | ||
339 | self->mObjectOwners[*oid].owner_name = first + " " + last; | ||
340 | } | ||
341 | delete oid; | ||
342 | } | ||
343 | |||
344 | void JCFloaterAnimList::processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data) | ||
345 | { | ||
346 | if(!JCFloaterAnimList::instanceVisible(LLSD())) return; | ||
347 | JCFloaterAnimList *self = JCFloaterAnimList::getInstance(LLSD()); | ||
348 | LLUUID object_id; | ||
349 | U32 request_flags; | ||
350 | LLUUID creator_id; | ||
351 | LLUUID owner_id; | ||
352 | LLUUID group_id; | ||
353 | LLUUID extra_id; | ||
354 | U32 base_mask, owner_mask, group_mask, everyone_mask, next_owner_mask; | ||
355 | LLSaleInfo sale_info; | ||
356 | LLCategory category; | ||
357 | msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_RequestFlags, request_flags ); | ||
358 | msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_ObjectID, object_id ); | ||
359 | msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id ); | ||
360 | msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_GroupID, group_id ); | ||
361 | msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_BaseMask, base_mask ); | ||
362 | msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_OwnerMask, owner_mask ); | ||
363 | msg->getU32Fast(_PREHASH_ObjectData,_PREHASH_GroupMask, group_mask ); | ||
364 | msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_EveryoneMask, everyone_mask ); | ||
365 | msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_NextOwnerMask, next_owner_mask); | ||
366 | sale_info.unpackMessage(msg, _PREHASH_ObjectData); | ||
367 | category.unpackMessage(msg, _PREHASH_ObjectData); | ||
368 | LLUUID last_owner_id; | ||
369 | msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_LastOwnerID, last_owner_id ); | ||
370 | std::string name; | ||
371 | msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Name, name); | ||
372 | std::string desc; | ||
373 | msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, desc); | ||
374 | |||
375 | for( std::map<LLUUID, AObjectData>::iterator di = self->mObjectOwners.begin(); di != self->mObjectOwners.end(); di++ ) | ||
376 | { | ||
377 | const LLUUID &id = di->first; | ||
378 | const AObjectData &data = di->second; | ||
379 | |||
380 | if(data.root_id == object_id || data.owner_id == object_id) | ||
381 | { | ||
382 | LLUUID* ref = new LLUUID(id); | ||
383 | self->mObjectOwners[id].owner_id = owner_id; | ||
384 | gCacheName->get(owner_id, FALSE, callbackLoadOwnerName, (void*)ref); | ||
385 | } | ||
386 | } | ||
387 | } | ||
388 | |||
389 | const LLUUID& JCFloaterAnimList::findItemID(const LLUUID& asset_id, BOOL copyable_only) | ||
390 | { | ||
391 | LLViewerInventoryCategory::cat_array_t cats; | ||
392 | LLViewerInventoryItem::item_array_t items; | ||
393 | LLAssetIDMatches asset_id_matches(asset_id); | ||
394 | gInventory.collectDescendentsIf(LLUUID::null, | ||
395 | cats, | ||
396 | items, | ||
397 | LLInventoryModel::INCLUDE_TRASH, | ||
398 | asset_id_matches); | ||
399 | |||
400 | if (items.count()) | ||
401 | { | ||
402 | // search for copyable version first | ||
403 | for (S32 i = 0; i < items.count(); i++) | ||
404 | { | ||
405 | LLInventoryItem* itemp = items[i]; | ||
406 | LLPermissions item_permissions = itemp->getPermissions(); | ||
407 | if (item_permissions.allowCopyBy(gAgent.getID(), gAgent.getGroupID())) | ||
408 | { | ||
409 | return itemp->getUUID(); | ||
410 | } | ||
411 | } | ||
412 | // otherwise just return first instance, unless copyable requested | ||
413 | if (copyable_only) | ||
414 | { | ||
415 | return LLUUID::null; | ||
416 | } | ||
417 | else | ||
418 | { | ||
419 | return items[0]->getUUID(); | ||
420 | } | ||
421 | } | ||
422 | |||
423 | return LLUUID::null; | ||
424 | } | ||
425 | |||
426 | /*void JCFloaterAnimList::onClickCopyAnimationUUID(void *userdata) | ||
427 | { | ||
428 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
429 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
430 | |||
431 | if ( NULL == item ) return; | ||
432 | |||
433 | LLUUID agent_id = item->getUUID(); | ||
434 | |||
435 | char buffer[UUID_STR_LENGTH]; | ||
436 | agent_id.toString(buffer); | ||
437 | |||
438 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | ||
439 | }*/ | ||
440 | |||
441 | void JCFloaterAnimList::onDoubleClick(void *userdata) | ||
442 | { | ||
443 | //JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; | ||
444 | //LLScrollListItem *item = self->mAnimList->getFirstSelected(); | ||
445 | //if(!item)return; | ||
446 | //LLUUID agent_id = item->getUUID(); | ||
447 | |||
448 | //gAgent.setFocusObject(gObjectList.findObject(agent_id)); | ||
449 | //gAgent.setFocusOnAvatar(FALSE, TRUE); | ||
450 | } | ||
451 | |||
452 | void JCFloaterAnimList::close(bool app) | ||
453 | { | ||
454 | //sInstance->setVisible(0); | ||
455 | //#ifdef RECONSTRUCT_ON_TOGGLE | ||
456 | // sInstance = NULL; | ||
457 | LLFloater::close(app); | ||
458 | //#else | ||
459 | // sInstance->setVisible(!(sInstance->getVisible())); | ||
460 | //#endif | ||
461 | } | ||
462 | |||
diff --git a/linden/indra/newview/jcfloater_animation_list.h b/linden/indra/newview/jcfloater_animation_list.h new file mode 100644 index 0000000..d8262f0 --- /dev/null +++ b/linden/indra/newview/jcfloater_animation_list.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* Copyright (c) 2009 | ||
2 | * | ||
3 | * Modular Systems Ltd. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or | ||
6 | * without modification, are permitted provided that the following | ||
7 | * conditions are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * 2. Redistributions in binary form must reproduce the above | ||
12 | * copyright notice, this list of conditions and the following | ||
13 | * disclaimer in the documentation and/or other materials provided | ||
14 | * with the distribution. | ||
15 | * 3. Neither the name Modular Systems Ltd nor the names of its contributors | ||
16 | * may be used to endorse or promote products derived from this | ||
17 | * software without specific prior written permission. | ||
18 | * | ||
19 | * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS “AS IS” | ||
20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
21 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS | ||
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
29 | * THE POSSIBILITY OF SUCH DAMAGE. | ||
30 | */ | ||
31 | |||
32 | #include "llfloater.h" | ||
33 | #include "lluuid.h" | ||
34 | #include "llstring.h" | ||
35 | |||
36 | struct AObjectData | ||
37 | { | ||
38 | std::string owner_name; | ||
39 | LLUUID owner_id; | ||
40 | LLUUID root_id; | ||
41 | bool in_object_list; | ||
42 | }; | ||
43 | |||
44 | class JCFloaterAnimList : public LLFloater, public LLUISingleton<JCFloaterAnimList, JCFloaterAnimList> | ||
45 | { | ||
46 | public: | ||
47 | JCFloaterAnimList(const LLSD& seed); | ||
48 | virtual ~JCFloaterAnimList(); | ||
49 | |||
50 | /*virtual*/ BOOL postBuild(); | ||
51 | /*virtual*/ void draw(); | ||
52 | /*virtual*/ void onVisibilityChange(BOOL new_visibility); | ||
53 | |||
54 | /*virtual*/ void close(bool app = 0); | ||
55 | void refresh(); | ||
56 | |||
57 | const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only); | ||
58 | |||
59 | static void callbackLoadOwnerName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data); | ||
60 | |||
61 | static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data); | ||
62 | |||
63 | static bool visible(LLFloater* instance, const LLSD& key); | ||
64 | static void show(LLFloater* instance, const LLSD& key); | ||
65 | static void hide(LLFloater* instance, const LLSD& key); | ||
66 | |||
67 | private: | ||
68 | |||
69 | enum ANIMATION_COLUMN_ORDER | ||
70 | { | ||
71 | LIST_ANIMATION_NAME, | ||
72 | LIST_ANIMATION_UUID, | ||
73 | LIST_OBJECT_UUID, | ||
74 | LIST_OBJECT_OWNER | ||
75 | }; | ||
76 | |||
77 | LLScrollListCtrl* mAnimList; | ||
78 | |||
79 | std::map<LLUUID, AObjectData> mObjectOwners; | ||
80 | |||
81 | static void StopSelected(void *userdata ); | ||
82 | static void RevokeSelected(void *userdata ); | ||
83 | static void StopRevokeSelected(void *userdata ); | ||
84 | static void OpenProfile(void *userdata ); | ||
85 | static void onDoubleClick(void *userdata); | ||
86 | |||
87 | }; | ||
88 | |||
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 5f0a875..d73ddb6 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -232,6 +232,7 @@ LLAgent gAgent; | |||
232 | // Statics | 232 | // Statics |
233 | // | 233 | // |
234 | BOOL LLAgent::sDebugDisplayTarget = FALSE; | 234 | BOOL LLAgent::sDebugDisplayTarget = FALSE; |
235 | BOOL LLAgent::sPhantom = FALSE; | ||
235 | 236 | ||
236 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; | 237 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; |
237 | 238 | ||
@@ -757,6 +758,9 @@ void LLAgent::movePitch(S32 direction) | |||
757 | // Does this parcel allow you to fly? | 758 | // Does this parcel allow you to fly? |
758 | BOOL LLAgent::canFly() | 759 | BOOL LLAgent::canFly() |
759 | { | 760 | { |
761 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
762 | if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY)) return FALSE; | ||
763 | // [/RLVa:KB] | ||
760 | if (isGodlike()) return TRUE; | 764 | if (isGodlike()) return TRUE; |
761 | 765 | ||
762 | LLViewerRegion* regionp = getRegion(); | 766 | LLViewerRegion* regionp = getRegion(); |
@@ -796,6 +800,13 @@ void LLAgent::setFlying(BOOL fly) | |||
796 | 800 | ||
797 | if (fly) | 801 | if (fly) |
798 | { | 802 | { |
803 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
804 | if (gRlvHandler.hasBehaviour(RLV_BHVR_FLY)) | ||
805 | { | ||
806 | return; | ||
807 | } | ||
808 | // [/RLVa:KB] | ||
809 | |||
799 | BOOL was_flying = getFlying(); | 810 | BOOL was_flying = getFlying(); |
800 | if (!canFly() && !was_flying) | 811 | if (!canFly() && !was_flying) |
801 | { | 812 | { |
@@ -835,6 +846,35 @@ void LLAgent::toggleFlying() | |||
835 | 846 | ||
836 | 847 | ||
837 | //----------------------------------------------------------------------------- | 848 | //----------------------------------------------------------------------------- |
849 | // togglePhantom() | ||
850 | //----------------------------------------------------------------------------- | ||
851 | void LLAgent::togglePhantom() | ||
852 | { | ||
853 | BOOL phan = !(sPhantom); | ||
854 | |||
855 | setPhantom( phan ); | ||
856 | } | ||
857 | |||
858 | |||
859 | //----------------------------------------------------------------------------- | ||
860 | // setPhantom() lgg | ||
861 | //----------------------------------------------------------------------------- | ||
862 | void LLAgent::setPhantom(BOOL phantom) | ||
863 | { | ||
864 | sPhantom = phantom; | ||
865 | } | ||
866 | |||
867 | |||
868 | //----------------------------------------------------------------------------- | ||
869 | // getPhantom() lgg | ||
870 | //----------------------------------------------------------------------------- | ||
871 | BOOL LLAgent::getPhantom() | ||
872 | { | ||
873 | return sPhantom; | ||
874 | } | ||
875 | |||
876 | |||
877 | //----------------------------------------------------------------------------- | ||
838 | // setRegion() | 878 | // setRegion() |
839 | //----------------------------------------------------------------------------- | 879 | //----------------------------------------------------------------------------- |
840 | void LLAgent::setRegion(LLViewerRegion *regionp) | 880 | void LLAgent::setRegion(LLViewerRegion *regionp) |
@@ -4213,6 +4253,13 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_ani | |||
4213 | return; | 4253 | return; |
4214 | } | 4254 | } |
4215 | 4255 | ||
4256 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
4257 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting) ) | ||
4258 | { | ||
4259 | return; | ||
4260 | } | ||
4261 | // [/RLVa:KB] | ||
4262 | |||
4216 | setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up | 4263 | setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up |
4217 | gViewerWindow->getWindow()->resetBusyCount(); | 4264 | gViewerWindow->getWindow()->resetBusyCount(); |
4218 | 4265 | ||
@@ -5007,6 +5054,14 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO | |||
5007 | // utility to build a location string | 5054 | // utility to build a location string |
5008 | void LLAgent::buildLocationString(std::string& str) | 5055 | void LLAgent::buildLocationString(std::string& str) |
5009 | { | 5056 | { |
5057 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
5058 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5059 | { | ||
5060 | str = rlv_handler_t::cstrHidden; | ||
5061 | return; | ||
5062 | } | ||
5063 | // [/RLVa:KB] | ||
5064 | |||
5010 | const LLVector3& agent_pos_region = getPositionAgent(); | 5065 | const LLVector3& agent_pos_region = getPositionAgent(); |
5011 | S32 pos_x = S32(agent_pos_region.mV[VX]); | 5066 | S32 pos_x = S32(agent_pos_region.mV[VX]); |
5012 | S32 pos_y = S32(agent_pos_region.mV[VY]); | 5067 | S32 pos_y = S32(agent_pos_region.mV[VY]); |
@@ -5889,6 +5944,15 @@ void LLAgent::teleportRequest( | |||
5889 | // Landmark ID = LLUUID::null means teleport home | 5944 | // Landmark ID = LLUUID::null means teleport home |
5890 | void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) | 5945 | void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) |
5891 | { | 5946 | { |
5947 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
5948 | if ( (rlv_handler_t::isEnabled()) && | ||
5949 | ( (gRlvHandler.hasBehaviour("tplm")) || | ||
5950 | ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting)) )) | ||
5951 | { | ||
5952 | return; | ||
5953 | } | ||
5954 | // [/RLVa:KB] | ||
5955 | |||
5892 | LLViewerRegion *regionp = getRegion(); | 5956 | LLViewerRegion *regionp = getRegion(); |
5893 | if(regionp && teleportCore()) | 5957 | if(regionp && teleportCore()) |
5894 | { | 5958 | { |
@@ -5953,6 +6017,17 @@ void LLAgent::teleportCancel() | |||
5953 | 6017 | ||
5954 | void LLAgent::teleportViaLocation(const LLVector3d& pos_global) | 6018 | void LLAgent::teleportViaLocation(const LLVector3d& pos_global) |
5955 | { | 6019 | { |
6020 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-07 (RLVa-1.0.0d) | ||
6021 | // If we're getting teleported due to @tpto we should disregard any @tploc=n or @unsit=n restrictions from the same object | ||
6022 | if ( (rlv_handler_t::isEnabled()) && | ||
6023 | ( (gRlvHandler.hasBehaviourExcept("tploc", gRlvHandler.getCurrentObject())) || | ||
6024 | ( (mAvatarObject.notNull()) && (mAvatarObject->mIsSitting) && | ||
6025 | (gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) ) ) | ||
6026 | { | ||
6027 | return; | ||
6028 | } | ||
6029 | // [/RLVa:KB] | ||
6030 | |||
5956 | LLViewerRegion* regionp = getRegion(); | 6031 | LLViewerRegion* regionp = getRegion(); |
5957 | LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); | 6032 | LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); |
5958 | if(regionp && info) | 6033 | if(regionp && info) |
@@ -6027,6 +6102,13 @@ void LLAgent::setTeleportState(ETeleportState state) | |||
6027 | // We're outa here. Save "back" slurl. | 6102 | // We're outa here. Save "back" slurl. |
6028 | mTeleportSourceSLURL = getSLURL(); | 6103 | mTeleportSourceSLURL = getSLURL(); |
6029 | } | 6104 | } |
6105 | |||
6106 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b | ||
6107 | if ( (rlv_handler_t::isEnabled()) && (TELEPORT_NONE == mTeleportState) ) | ||
6108 | { | ||
6109 | gRlvHandler.setCanCancelTp(true); | ||
6110 | } | ||
6111 | // [/RLVa:KB] | ||
6030 | } | 6112 | } |
6031 | 6113 | ||
6032 | void LLAgent::stopCurrentAnimations() | 6114 | void LLAgent::stopCurrentAnimations() |
@@ -6654,10 +6736,17 @@ void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void | |||
6654 | } | 6736 | } |
6655 | 6737 | ||
6656 | // now that we have the asset ids...request the wearable assets | 6738 | // now that we have the asset ids...request the wearable assets |
6739 | // [RLVa:KB] - Checked: 2009-08-08 (RLVa-1.0.1g) | Added: RLVa-1.0.1g | ||
6740 | LLInventoryFetchObserver::item_ref_t rlvItems; | ||
6741 | // [/RLVa:KB] | ||
6657 | for( i = 0; i < WT_COUNT; i++ ) | 6742 | for( i = 0; i < WT_COUNT; i++ ) |
6658 | { | 6743 | { |
6659 | if( !gAgent.mWearableEntry[i].mItemID.isNull() ) | 6744 | if( !gAgent.mWearableEntry[i].mItemID.isNull() ) |
6660 | { | 6745 | { |
6746 | // [RLVa:KB] - Checked: 2009-08-08 (RLVa-1.0.1g) | Added: RLVa-1.0.1g | ||
6747 | if (rlv_handler_t::isEnabled()) | ||
6748 | rlvItems.push_back(gAgent.mWearableEntry[i].mItemID); | ||
6749 | // [/RLVa:KB] | ||
6661 | gWearableList.getAsset( | 6750 | gWearableList.getAsset( |
6662 | asset_id_array[i], | 6751 | asset_id_array[i], |
6663 | LLStringUtil::null, | 6752 | LLStringUtil::null, |
@@ -6665,6 +6754,15 @@ void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void | |||
6665 | LLAgent::onInitialWearableAssetArrived, (void*)(intptr_t)i ); | 6754 | LLAgent::onInitialWearableAssetArrived, (void*)(intptr_t)i ); |
6666 | } | 6755 | } |
6667 | } | 6756 | } |
6757 | |||
6758 | // [RLVa:KB] - Checked: 2009-08-08 (RLVa-1.0.1g) | Added: RLVa-1.0.1g | ||
6759 | // TODO-RLVa: checking that we're in STATE_STARTED is probably not needed, but leave it until we can be absolutely sure | ||
6760 | if ( (rlv_handler_t::isEnabled()) && (LLStartUp::getStartupState() == STATE_STARTED) ) | ||
6761 | { | ||
6762 | RlvCurrentlyWorn f; | ||
6763 | f.fetchItems(rlvItems); | ||
6764 | } | ||
6765 | // [/RLVa:KB] | ||
6668 | } | 6766 | } |
6669 | } | 6767 | } |
6670 | 6768 | ||
@@ -7162,6 +7260,13 @@ void LLAgent::removeWearable( EWearableType type ) | |||
7162 | return; | 7260 | return; |
7163 | } | 7261 | } |
7164 | 7262 | ||
7263 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | ||
7264 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isRemovable(type)) ) | ||
7265 | { | ||
7266 | return; | ||
7267 | } | ||
7268 | // [/RLVa:KB] | ||
7269 | |||
7165 | if( old_wearable ) | 7270 | if( old_wearable ) |
7166 | { | 7271 | { |
7167 | if( old_wearable->isDirty() ) | 7272 | if( old_wearable->isDirty() ) |
@@ -7284,15 +7389,17 @@ void LLAgent::setWearableOutfit( | |||
7284 | wearables_to_remove[WT_SKIN] = FALSE; | 7389 | wearables_to_remove[WT_SKIN] = FALSE; |
7285 | wearables_to_remove[WT_HAIR] = FALSE; | 7390 | wearables_to_remove[WT_HAIR] = FALSE; |
7286 | wearables_to_remove[WT_EYES] = FALSE; | 7391 | wearables_to_remove[WT_EYES] = FALSE; |
7287 | wearables_to_remove[WT_SHIRT] = remove; | 7392 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.2a |
7288 | wearables_to_remove[WT_PANTS] = remove; | 7393 | wearables_to_remove[WT_SHIRT] = remove && gRlvHandler.isRemovable(WT_SHIRT); |
7289 | wearables_to_remove[WT_SHOES] = remove; | 7394 | wearables_to_remove[WT_PANTS] = remove && gRlvHandler.isRemovable(WT_PANTS); |
7290 | wearables_to_remove[WT_SOCKS] = remove; | 7395 | wearables_to_remove[WT_SHOES] = remove && gRlvHandler.isRemovable(WT_SHOES); |
7291 | wearables_to_remove[WT_JACKET] = remove; | 7396 | wearables_to_remove[WT_SOCKS] = remove && gRlvHandler.isRemovable(WT_SOCKS); |
7292 | wearables_to_remove[WT_GLOVES] = remove; | 7397 | wearables_to_remove[WT_JACKET] = remove && gRlvHandler.isRemovable(WT_JACKET); |
7293 | wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) & remove; | 7398 | wearables_to_remove[WT_GLOVES] = remove && gRlvHandler.isRemovable(WT_GLOVES); |
7294 | wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) & remove; | 7399 | wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) && remove && gRlvHandler.isRemovable(WT_UNDERSHIRT); |
7295 | wearables_to_remove[WT_SKIRT] = remove; | 7400 | wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) && remove && gRlvHandler.isRemovable(WT_UNDERPANTS); |
7401 | wearables_to_remove[WT_SKIRT] = remove && gRlvHandler.isRemovable(WT_SKIRT); | ||
7402 | // [/RLVa:KB] | ||
7296 | 7403 | ||
7297 | S32 count = wearables.count(); | 7404 | S32 count = wearables.count(); |
7298 | llassert( items.count() == count ); | 7405 | llassert( items.count() == count ); |
@@ -7384,6 +7491,15 @@ void LLAgent::setWearable( LLInventoryItem* new_item, LLWearable* new_wearable ) | |||
7384 | EWearableType type = new_wearable->getType(); | 7491 | EWearableType type = new_wearable->getType(); |
7385 | 7492 | ||
7386 | LLWearable* old_wearable = mWearableEntry[ type ].mWearable; | 7493 | LLWearable* old_wearable = mWearableEntry[ type ].mWearable; |
7494 | |||
7495 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
7496 | // Block if: we can't wear on that layer; or we're already wearing something there we can't take off | ||
7497 | if ( (rlv_handler_t::isEnabled()) && ((!gRlvHandler.isWearable(type)) || ((old_wearable) && (!gRlvHandler.isRemovable(type)))) ) | ||
7498 | { | ||
7499 | return; | ||
7500 | } | ||
7501 | // [/RLVa:KB] | ||
7502 | |||
7387 | if( old_wearable ) | 7503 | if( old_wearable ) |
7388 | { | 7504 | { |
7389 | const LLUUID& old_item_id = mWearableEntry[ type ].mItemID; | 7505 | const LLUUID& old_item_id = mWearableEntry[ type ].mItemID; |
@@ -7592,10 +7708,13 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) | |||
7592 | return; | 7708 | return; |
7593 | } | 7709 | } |
7594 | 7710 | ||
7595 | gMessageSystem->newMessage("ObjectDetach"); | 7711 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.0c |
7596 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | 7712 | // NOTE-RLVa: This function is called from inside RlvHandler as well, hence the rather heavy modifications |
7597 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | 7713 | std::list<U32> rlvAttachments; |
7598 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 7714 | // TODO-RLVa: Once we have the improved "removeWearable" logic implemented we can just get rid of the whole "rlvCompFolders" hassle |
7715 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
7716 | std::list<LLUUID> rlvCompFolders; | ||
7717 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
7599 | 7718 | ||
7600 | for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); | 7719 | for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); |
7601 | iter != avatarp->mAttachmentPoints.end(); ) | 7720 | iter != avatarp->mAttachmentPoints.end(); ) |
@@ -7605,11 +7724,78 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) | |||
7605 | LLViewerObject* objectp = attachment->getObject(); | 7724 | LLViewerObject* objectp = attachment->getObject(); |
7606 | if (objectp) | 7725 | if (objectp) |
7607 | { | 7726 | { |
7727 | if (rlv_handler_t::isEnabled()) | ||
7728 | { | ||
7729 | if (!gRlvHandler.isDetachable(curiter->first)) | ||
7730 | continue; | ||
7731 | |||
7732 | // Check if we're being called in response to an RLV command (that would be @detach=force) | ||
7733 | if ( (gRlvHandler.getCurrentCommand()) && (attachment->getItemID().notNull()) ) | ||
7734 | { | ||
7735 | if (!gRlvHandler.isStrippable(attachment->getItemID())) // "nostrip" can be taken off by the user but not @detach | ||
7736 | continue; | ||
7737 | |||
7738 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
7739 | LLViewerInventoryCategory* pFolder; | ||
7740 | if (gRlvHandler.getCompositeInfo(attachment->getItemID(), NULL, &pFolder)) | ||
7741 | { | ||
7742 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
7743 | if (!gRlvHandler.canTakeOffComposite(pFolder)) | ||
7744 | continue; | ||
7745 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
7746 | |||
7747 | // The attachment belongs to a composite folder so there may be additional things we need to take off | ||
7748 | if (std::find(rlvCompFolders.begin(), rlvCompFolders.end(), pFolder->getUUID()) != rlvCompFolders.end()) | ||
7749 | rlvCompFolders.push_back(pFolder->getUUID()); | ||
7750 | } | ||
7751 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
7752 | } | ||
7753 | } | ||
7754 | rlvAttachments.push_back(objectp->getLocalID()); | ||
7755 | } | ||
7756 | } | ||
7757 | |||
7758 | // Only send the message if we actually have something to detach | ||
7759 | if (rlvAttachments.size() > 0) | ||
7760 | { | ||
7761 | gMessageSystem->newMessage("ObjectDetach"); | ||
7762 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
7763 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | ||
7764 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
7765 | |||
7766 | for (std::list<U32>::const_iterator itAttach = rlvAttachments.begin(); itAttach != rlvAttachments.end(); ++itAttach) | ||
7767 | { | ||
7608 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); | 7768 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); |
7609 | gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID()); | 7769 | gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, *itAttach); |
7610 | } | 7770 | } |
7771 | |||
7772 | gMessageSystem->sendReliable( gAgent.getRegionHost() ); | ||
7611 | } | 7773 | } |
7612 | gMessageSystem->sendReliable( gAgent.getRegionHost() ); | 7774 | |
7775 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
7776 | if (rlv_handler_t::isEnabled) | ||
7777 | { | ||
7778 | // If we encountered any composite folders then we need to @detach all of them | ||
7779 | for (std::list<LLUUID>::const_iterator itFolder = rlvCompFolders.begin(); itFolder != rlvCompFolders.end(); ++itFolder) | ||
7780 | { | ||
7781 | std::string strFolder = gRlvHandler.getSharedPath(*itFolder); | ||
7782 | |||
7783 | // It shouldn't happen but make absolutely sure that we don't issue @detach:=force and reenter this function | ||
7784 | if (!strFolder.empty()) | ||
7785 | { | ||
7786 | std::string strCmd = "detach:" + strFolder + "=force"; | ||
7787 | #ifdef RLV_DEBUG | ||
7788 | RLV_INFOS << "\t- detaching composite folder: @" << strCmd << LL_ENDL; | ||
7789 | #endif // RLV_DEBUG | ||
7790 | |||
7791 | // HACK-RLV: executing a command while another command is currently executing isn't the best thing to do, however | ||
7792 | // in this specific case it is safe (and still better than making processForceCommand public) | ||
7793 | gRlvHandler.processCommand(gRlvHandler.getCurrentObject(), strCmd); | ||
7794 | } | ||
7795 | } | ||
7796 | } | ||
7797 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
7798 | // [/RLVa:KB] | ||
7613 | } | 7799 | } |
7614 | 7800 | ||
7615 | void LLAgent::observeFriends() | 7801 | void LLAgent::observeFriends() |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index a4a930f..d6854e4 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -67,6 +67,10 @@ | |||
67 | #include "llfollowcam.h" | 67 | #include "llfollowcam.h" |
68 | // end Ventrella | 68 | // end Ventrella |
69 | 69 | ||
70 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
71 | #include "rlvhandler.h" | ||
72 | // [/RLVa:KB] | ||
73 | |||
70 | const U8 AGENT_STATE_TYPING = 0x04; // Typing indication | 74 | const U8 AGENT_STATE_TYPING = 0x04; // Typing indication |
71 | const U8 AGENT_STATE_EDITING = 0x10; // Set when agent has objects selected | 75 | const U8 AGENT_STATE_EDITING = 0x10; // Set when agent has objects selected |
72 | 76 | ||
@@ -371,6 +375,11 @@ public: | |||
371 | // Does this parcel allow you to fly? | 375 | // Does this parcel allow you to fly? |
372 | BOOL canFly(); | 376 | BOOL canFly(); |
373 | 377 | ||
378 | //lgg crap | ||
379 | static BOOL getPhantom();// const { return emeraldPhantom; } | ||
380 | static void setPhantom(BOOL phantom); | ||
381 | static void togglePhantom(); | ||
382 | |||
374 | // Animation functions | 383 | // Animation functions |
375 | void stopCurrentAnimations(); | 384 | void stopCurrentAnimations(); |
376 | void requestStopMotion( LLMotion* motion ); | 385 | void requestStopMotion( LLMotion* motion ); |
@@ -801,6 +810,8 @@ private: | |||
801 | LLVector3d mCameraSmoothingLastPositionGlobal; | 810 | LLVector3d mCameraSmoothingLastPositionGlobal; |
802 | LLVector3d mCameraSmoothingLastPositionAgent; | 811 | LLVector3d mCameraSmoothingLastPositionAgent; |
803 | BOOL mCameraSmoothingStop; | 812 | BOOL mCameraSmoothingStop; |
813 | |||
814 | static BOOL sPhantom; | ||
804 | 815 | ||
805 | 816 | ||
806 | //Ventrella | 817 | //Ventrella |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 4d53c88..ab4d8a9 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -3126,7 +3126,12 @@ void LLAppViewer::idle() | |||
3126 | { | 3126 | { |
3127 | // Send avatar and camera info | 3127 | // Send avatar and camera info |
3128 | last_control_flags = gAgent.getControlFlags(); | 3128 | last_control_flags = gAgent.getControlFlags(); |
3129 | send_agent_update(TRUE); | 3129 | |
3130 | if(!gAgent.getPhantom()) | ||
3131 | { | ||
3132 | send_agent_update(TRUE); | ||
3133 | } | ||
3134 | |||
3130 | agent_update_timer.reset(); | 3135 | agent_update_timer.reset(); |
3131 | } | 3136 | } |
3132 | } | 3137 | } |
@@ -3829,4 +3834,21 @@ void LLAppViewer::handleLoginComplete() | |||
3829 | gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState(); | 3834 | gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState(); |
3830 | } | 3835 | } |
3831 | writeDebugInfo(); | 3836 | writeDebugInfo(); |
3837 | |||
3838 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
3839 | // TODO-RLVa: find some way to initialize the lookup table when we need them *and* support toggling RLVa at runtime | ||
3840 | gRlvHandler.initLookupTables(); | ||
3841 | |||
3842 | if (rlv_handler_t::isEnabled()) | ||
3843 | { | ||
3844 | RlvCurrentlyWorn::fetchWorn(); | ||
3845 | rlv_handler_t::fetchSharedInventory(); | ||
3846 | |||
3847 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
3848 | RlvSettings::updateLoginLastLocation(); | ||
3849 | #endif // RLV_EXTENSION_STARTLOCATION | ||
3850 | |||
3851 | gRlvHandler.processRetainedCommands(); | ||
3852 | } | ||
3853 | // [/RLVa:KB] | ||
3832 | } | 3854 | } |
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 59aa572..1de3690 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "llkeyboard.h" | 53 | #include "llkeyboard.h" |
54 | #include "lllineeditor.h" | 54 | #include "lllineeditor.h" |
55 | #include "llstatusbar.h" | 55 | #include "llstatusbar.h" |
56 | #include "llspinctrl.h" | ||
56 | #include "lltextbox.h" | 57 | #include "lltextbox.h" |
57 | #include "lluiconstants.h" | 58 | #include "lluiconstants.h" |
58 | #include "llviewergesture.h" // for triggering gestures | 59 | #include "llviewergesture.h" // for triggering gestures |
@@ -78,7 +79,10 @@ LLChatBar *gChatBar = NULL; | |||
78 | 79 | ||
79 | // legacy calllback glue | 80 | // legacy calllback glue |
80 | void toggleChatHistory(void* user_data); | 81 | void toggleChatHistory(void* user_data); |
81 | void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); | 82 | //void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); |
83 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a | ||
84 | void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); | ||
85 | // [/RLVa:KB] | ||
82 | 86 | ||
83 | 87 | ||
84 | class LLChatBarGestureObserver : public LLGestureManagerObserver | 88 | class LLChatBarGestureObserver : public LLGestureManagerObserver |
@@ -98,6 +102,7 @@ private: | |||
98 | 102 | ||
99 | LLChatBar::LLChatBar() | 103 | LLChatBar::LLChatBar() |
100 | : LLPanel(LLStringUtil::null, LLRect(), BORDER_NO), | 104 | : LLPanel(LLStringUtil::null, LLRect(), BORDER_NO), |
105 | mChannelControl(FALSE), | ||
101 | mInputEditor(NULL), | 106 | mInputEditor(NULL), |
102 | mGestureLabelTimer(), | 107 | mGestureLabelTimer(), |
103 | mLastSpecialChatChannel(0), | 108 | mLastSpecialChatChannel(0), |
@@ -151,6 +156,8 @@ BOOL LLChatBar::postBuild() | |||
151 | mInputEditor->setEnableLineHistory(TRUE); | 156 | mInputEditor->setEnableLineHistory(TRUE); |
152 | } | 157 | } |
153 | 158 | ||
159 | toggleChannelControl(); | ||
160 | |||
154 | mIsBuilt = TRUE; | 161 | mIsBuilt = TRUE; |
155 | 162 | ||
156 | return TRUE; | 163 | return TRUE; |
@@ -210,6 +217,7 @@ void LLChatBar::refresh() | |||
210 | 217 | ||
211 | childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); | 218 | childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); |
212 | 219 | ||
220 | childSetValue("channel_control",( 1.f * ((S32)(getChild<LLSpinCtrl>("channel_control")->get()))) ); | ||
213 | childSetEnabled("Say", mInputEditor->getText().size() > 0); | 221 | childSetEnabled("Say", mInputEditor->getText().size() > 0); |
214 | childSetEnabled("Shout", mInputEditor->getText().size() > 0); | 222 | childSetEnabled("Shout", mInputEditor->getText().size() > 0); |
215 | 223 | ||
@@ -370,8 +378,11 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel) | |||
370 | } | 378 | } |
371 | else | 379 | else |
372 | { | 380 | { |
373 | // This is normal chat. | 381 | if (!mChannelControl) |
374 | *channel = 0; | 382 | { |
383 | // This is normal chat. | ||
384 | *channel = 0; | ||
385 | } | ||
375 | return mesg; | 386 | return mesg; |
376 | } | 387 | } |
377 | } | 388 | } |
@@ -387,7 +398,8 @@ void LLChatBar::sendChat( EChatType type ) | |||
387 | // store sent line in history, duplicates will get filtered | 398 | // store sent line in history, duplicates will get filtered |
388 | if (mInputEditor) mInputEditor->updateHistory(); | 399 | if (mInputEditor) mInputEditor->updateHistory(); |
389 | // Check if this is destined for another channel | 400 | // Check if this is destined for another channel |
390 | S32 channel = 0; | 401 | S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0; |
402 | |||
391 | stripChannelNumber(text, &channel); | 403 | stripChannelNumber(text, &channel); |
392 | 404 | ||
393 | std::string utf8text = wstring_to_utf8str(text); | 405 | std::string utf8text = wstring_to_utf8str(text); |
@@ -425,6 +437,31 @@ void LLChatBar::sendChat( EChatType type ) | |||
425 | } | 437 | } |
426 | } | 438 | } |
427 | 439 | ||
440 | void LLChatBar::toggleChannelControl() | ||
441 | { | ||
442 | LLRect input_rect = mInputEditor->getRect(); | ||
443 | S32 chan_width = getChild<LLSpinCtrl>("channel_control")->getRect().getWidth(); | ||
444 | BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect"); | ||
445 | BOOL control = getChild<LLSpinCtrl>("channel_control")->getVisible(); | ||
446 | |||
447 | if (visible && !control) | ||
448 | { | ||
449 | input_rect.setLeftTopAndSize(input_rect.mLeft+chan_width, input_rect.mTop, | ||
450 | input_rect.getWidth()-chan_width, input_rect.getHeight()); | ||
451 | } | ||
452 | else if (!visible && control) | ||
453 | { | ||
454 | input_rect.setLeftTopAndSize(input_rect.mLeft-chan_width, input_rect.mTop, | ||
455 | input_rect.getWidth()+chan_width, input_rect.getHeight()); | ||
456 | |||
457 | } | ||
458 | mInputEditor->setRect(input_rect); | ||
459 | |||
460 | childSetVisible("channel_control", visible); | ||
461 | childSetEnabled("channel_control", visible); | ||
462 | mChannelControl = visible; | ||
463 | } | ||
464 | |||
428 | 465 | ||
429 | //----------------------------------------------------------------------- | 466 | //----------------------------------------------------------------------- |
430 | // Static functions | 467 | // Static functions |
@@ -482,7 +519,10 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) | |||
482 | 519 | ||
483 | S32 length = raw_text.length(); | 520 | S32 length = raw_text.length(); |
484 | 521 | ||
485 | if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences | 522 | //if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences |
523 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
524 | if ( (length > 0) && (raw_text[0] != '/') && (!gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) ) | ||
525 | // [/RLVa:KB] | ||
486 | { | 526 | { |
487 | gAgent.startTyping(); | 527 | gAgent.startTyping(); |
488 | } | 528 | } |
@@ -575,7 +615,8 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, | |||
575 | void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) | 615 | void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) |
576 | { | 616 | { |
577 | // Look for "/20 foo" channel chats. | 617 | // Look for "/20 foo" channel chats. |
578 | S32 channel = 0; | 618 | S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0; |
619 | |||
579 | LLWString out_text = stripChannelNumber(wtext, &channel); | 620 | LLWString out_text = stripChannelNumber(wtext, &channel); |
580 | std::string utf8_out_text = wstring_to_utf8str(out_text); | 621 | std::string utf8_out_text = wstring_to_utf8str(out_text); |
581 | std::string utf8_text = wstring_to_utf8str(wtext); | 622 | std::string utf8_text = wstring_to_utf8str(wtext); |
@@ -586,6 +627,21 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL | |||
586 | utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); | 627 | utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); |
587 | } | 628 | } |
588 | 629 | ||
630 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b | ||
631 | if ( (0 == channel) && (rlv_handler_t::isEnabled()) ) | ||
632 | { | ||
633 | // Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation) | ||
634 | if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour("chatnormal")) ) | ||
635 | type = CHAT_TYPE_WHISPER; | ||
636 | else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour("chatshout")) ) | ||
637 | type = CHAT_TYPE_NORMAL; | ||
638 | else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour("chatwhisper")) ) | ||
639 | type = CHAT_TYPE_NORMAL; | ||
640 | |||
641 | animate &= !gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT); | ||
642 | } | ||
643 | // [/RLVa:KB] | ||
644 | |||
589 | // Don't animate for chats people can't hear (chat to scripts) | 645 | // Don't animate for chats people can't hear (chat to scripts) |
590 | if (animate && (channel == 0)) | 646 | if (animate && (channel == 0)) |
591 | { | 647 | { |
@@ -621,8 +677,57 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL | |||
621 | send_chat_from_viewer(utf8_out_text, type, channel); | 677 | send_chat_from_viewer(utf8_out_text, type, channel); |
622 | } | 678 | } |
623 | 679 | ||
624 | void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) | 680 | // void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) |
681 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a | ||
682 | void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel) | ||
683 | // [/RLVa:KB] | ||
625 | { | 684 | { |
685 | // [RLVa:KB] - Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
686 | // Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc) | ||
687 | if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) ) | ||
688 | { | ||
689 | if (0 == channel) | ||
690 | { | ||
691 | // (We already did this before, but LLChatHandler::handle() calls this directly) | ||
692 | if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour("chatnormal")) ) | ||
693 | type = CHAT_TYPE_WHISPER; | ||
694 | else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour("chatshout")) ) | ||
695 | type = CHAT_TYPE_NORMAL; | ||
696 | else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour("chatwhisper")) ) | ||
697 | type = CHAT_TYPE_NORMAL; | ||
698 | |||
699 | // Redirect chat if needed | ||
700 | if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) && | ||
701 | (gRlvHandler.redirectChatOrEmote(utf8_out_text)) ) ) | ||
702 | { | ||
703 | return; | ||
704 | } | ||
705 | |||
706 | // Filter public chat if sendchat restricted (and filter anything that redirchat didn't redirect) | ||
707 | if ( (gRlvHandler.hasBehaviour("sendchat")) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) ) | ||
708 | gRlvHandler.filterChat(utf8_out_text, true); | ||
709 | } | ||
710 | else | ||
711 | { | ||
712 | // Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception) | ||
713 | if ( (gRlvHandler.hasBehaviour("sendchannel")) && (!gRlvHandler.hasBehaviour("sendchannel", llformat("%d", channel))) ) | ||
714 | return; | ||
715 | |||
716 | // Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers) | ||
717 | if (channel >= CHAT_CHANNEL_DEBUG) | ||
718 | { | ||
719 | bool fIsEmote = rlvIsEmote(utf8_out_text); | ||
720 | if ( (gRlvHandler.hasBehaviour("sendchat")) || | ||
721 | ((!fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))) || | ||
722 | ((fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE))) ) | ||
723 | { | ||
724 | return; | ||
725 | } | ||
726 | } | ||
727 | } | ||
728 | } | ||
729 | // [/RLVa:KB] | ||
730 | |||
626 | LLMessageSystem* msg = gMessageSystem; | 731 | LLMessageSystem* msg = gMessageSystem; |
627 | msg->newMessageFast(_PREHASH_ChatFromViewer); | 732 | msg->newMessageFast(_PREHASH_ChatFromViewer); |
628 | msg->nextBlockFast(_PREHASH_AgentData); | 733 | msg->nextBlockFast(_PREHASH_AgentData); |
diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h index 72c797a..53ac233 100644 --- a/linden/indra/newview/llchatbar.h +++ b/linden/indra/newview/llchatbar.h | |||
@@ -93,6 +93,8 @@ public: | |||
93 | static void startChat(const char* line); | 93 | static void startChat(const char* line); |
94 | static void stopChat(); | 94 | static void stopChat(); |
95 | 95 | ||
96 | void toggleChannelControl(); | ||
97 | |||
96 | protected: | 98 | protected: |
97 | void sendChat(EChatType type); | 99 | void sendChat(EChatType type); |
98 | void updateChat(); | 100 | void updateChat(); |
@@ -109,6 +111,9 @@ protected: | |||
109 | LLComboBox* mGestureCombo; | 111 | LLComboBox* mGestureCombo; |
110 | 112 | ||
111 | LLChatBarGestureObserver* mObserver; | 113 | LLChatBarGestureObserver* mObserver; |
114 | |||
115 | private: | ||
116 | BOOL mChannelControl; | ||
112 | }; | 117 | }; |
113 | 118 | ||
114 | extern LLChatBar *gChatBar; | 119 | extern LLChatBar *gChatBar; |
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 37e9c54..57c5339 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -119,14 +119,22 @@ LLFloaterAbout::LLFloaterAbout() | |||
119 | __DATE__, __TIME__); | 119 | __DATE__, __TIME__); |
120 | 120 | ||
121 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 121 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
122 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), FALSE, FALSE, &viewer_link_style); | 122 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); |
123 | 123 | ||
124 | std::string support; | 124 | std::string support; |
125 | support.append("\n\n"); | 125 | support.append("\n\n"); |
126 | 126 | ||
127 | // Position | 127 | // Position |
128 | LLViewerRegion* region = gAgent.getRegion(); | 128 | LLViewerRegion* region = gAgent.getRegion(); |
129 | if (region) | 129 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) |
130 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
131 | { | ||
132 | support.append(rlv_handler_t::cstrHidden); | ||
133 | support.append("\n\n"); | ||
134 | } | ||
135 | else if (region) | ||
136 | // [/RLVa:KB] | ||
137 | // if (region) | ||
130 | { | 138 | { |
131 | LLStyleSP server_link_style(new LLStyle); | 139 | LLStyleSP server_link_style(new LLStyle); |
132 | server_link_style->setVisible(true); | 140 | server_link_style->setVisible(true); |
@@ -155,7 +163,7 @@ LLFloaterAbout::LLFloaterAbout() | |||
155 | support.append("\n"); | 163 | support.append("\n"); |
156 | 164 | ||
157 | support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 165 | support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
158 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), FALSE, FALSE, &server_link_style); | 166 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); |
159 | 167 | ||
160 | support = "\n\n"; | 168 | support = "\n\n"; |
161 | } | 169 | } |
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index a8f3f91..b4d402a 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp | |||
@@ -98,6 +98,11 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c | |||
98 | if (speaker_ptr) | 98 | if (speaker_ptr) |
99 | { | 99 | { |
100 | speaker_ptr->mDisplayName = first + " " + last; | 100 | speaker_ptr->mDisplayName = first + " " + last; |
101 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g | ||
102 | // TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventuall get fixed | ||
103 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
104 | speaker_ptr->mDisplayName = gRlvHandler.getAnonym(speaker_ptr->mDisplayName); | ||
105 | // [/RLVa:KB] | ||
101 | } | 106 | } |
102 | } | 107 | } |
103 | 108 | ||
@@ -710,6 +715,13 @@ void LLPanelActiveSpeakers::onVolumeChange(LLUICtrl* source, void* user_data) | |||
710 | //static | 715 | //static |
711 | void LLPanelActiveSpeakers::onClickProfile(void* user_data) | 716 | void LLPanelActiveSpeakers::onClickProfile(void* user_data) |
712 | { | 717 | { |
718 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g | ||
719 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
720 | { | ||
721 | return; | ||
722 | } | ||
723 | // [/RLVa:KB] | ||
724 | |||
713 | LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; | 725 | LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; |
714 | LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); | 726 | LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); |
715 | 727 | ||
@@ -719,6 +731,13 @@ void LLPanelActiveSpeakers::onClickProfile(void* user_data) | |||
719 | //static | 731 | //static |
720 | void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data) | 732 | void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data) |
721 | { | 733 | { |
734 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g | ||
735 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
736 | { | ||
737 | return; | ||
738 | } | ||
739 | // [/RLVa:KB] | ||
740 | |||
722 | LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; | 741 | LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; |
723 | LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); | 742 | LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); |
724 | 743 | ||
diff --git a/linden/indra/newview/llfloaterassetbrowser.cpp b/linden/indra/newview/llfloaterassetbrowser.cpp new file mode 100644 index 0000000..615d21a --- /dev/null +++ b/linden/indra/newview/llfloaterassetbrowser.cpp | |||
@@ -0,0 +1,466 @@ | |||
1 | /** | ||
2 | * @file llfloaterassetbrowser.cpp | ||
3 | * @brief LLFloaterAssetBrowser class implementation | ||
4 | * Phox wuz hurr | ||
5 | */ | ||
6 | |||
7 | #include "llviewerprecompiledheaders.h" | ||
8 | #include "llfloaterassetbrowser.h" | ||
9 | #include "llinventoryview.h" | ||
10 | #include "llinventorymodel.h" | ||
11 | #include "llviewerimagelist.h" | ||
12 | #include "llbutton.h" | ||
13 | #include "lltextbox.h" | ||
14 | #include "llpreview.h" | ||
15 | #include "llinventorybridge.h" | ||
16 | #include "llagent.h" | ||
17 | #include "lltooldraganddrop.h" | ||
18 | #include "llfocusmgr.h" | ||
19 | #include "llview.h" | ||
20 | |||
21 | // Externs | ||
22 | extern LLInventoryModel gInventory; | ||
23 | |||
24 | // Statics | ||
25 | LLFloaterAssetBrowser* LLFloaterAssetBrowser::sInstance = NULL; | ||
26 | |||
27 | LLFloaterAssetBrowser::LLFloaterAssetBrowser() | ||
28 | : LLFloater("floater_asset_browser") | ||
29 | { | ||
30 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_asset_browser.xml"); | ||
31 | |||
32 | mInventoryPanel = getChild<LLInventoryPanel>("inventory panel"); | ||
33 | |||
34 | //Open all folders and close them in order to make item list up-to-date | ||
35 | //if(gInventory.getItemCount()==0) | ||
36 | mInventoryPanel->openAllFolders(); | ||
37 | |||
38 | //gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE)); | ||
39 | |||
40 | |||
41 | childSetAction("button next", onClickNext, this); | ||
42 | childSetAction("button previous", onClickPrevious, this); | ||
43 | childSetAction("button refresh", onClickRefresh, this); | ||
44 | |||
45 | initialize(); | ||
46 | createThumbnails(); | ||
47 | mInventoryPanel->closeAllFolders(); | ||
48 | } | ||
49 | |||
50 | // static | ||
51 | void LLFloaterAssetBrowser::show(void*) | ||
52 | { | ||
53 | if (!sInstance) | ||
54 | sInstance = new LLFloaterAssetBrowser(); | ||
55 | |||
56 | sInstance->open(); | ||
57 | } | ||
58 | |||
59 | // virtual | ||
60 | LLFloaterAssetBrowser::~LLFloaterAssetBrowser() | ||
61 | { | ||
62 | clearAssetInfoTexts(); | ||
63 | mTextureAssets.clear(); | ||
64 | mMaxIndex = 0; | ||
65 | mFirstIndex = 0; | ||
66 | mMouseOverIndex = 0; | ||
67 | mMouseOverUUID = LLUUID::null; | ||
68 | mMouseOverAssetUUID = LLUUID::null; | ||
69 | mFloaterTitle = ""; | ||
70 | clearNoAssetsText(); | ||
71 | sInstance=NULL; | ||
72 | } | ||
73 | |||
74 | void LLFloaterAssetBrowser::initialize() | ||
75 | { | ||
76 | mMaxIndex = ITEMS_PER_PAGE; | ||
77 | mFirstIndex = 0; | ||
78 | mAssetInfoLabelList.clear(); | ||
79 | mAssetInfoIndex = 0; | ||
80 | mFloaterHeight = getRect().getHeight(); | ||
81 | mFloaterWidth = getRect().getWidth(); | ||
82 | mMouseOverIndex = 0; | ||
83 | mMouseOverUUID = LLUUID::null; | ||
84 | mMouseOverAssetUUID = LLUUID::null; | ||
85 | mFloaterTitle = ""; | ||
86 | |||
87 | S32 image_top = getRect().getHeight(); | ||
88 | S32 image_bottom = BTN_HEIGHT_SMALL; | ||
89 | S32 image_middle = (image_top + image_bottom) / 2; | ||
90 | S32 line_height = llround(LLFontGL::sSansSerifSmall->getLineHeight()); | ||
91 | |||
92 | mNoAssetsLabel = new LLTextBox("mNoAssetsLabel.", | ||
93 | LLRect(getRect().getWidth()/2, | ||
94 | image_middle + line_height / 2, | ||
95 | getRect().getWidth(), | ||
96 | image_middle - line_height / 2 ), | ||
97 | "No assets found.", | ||
98 | LLFontGL::sSansSerifSmall ); | ||
99 | mNoAssetsLabel->setFollowsAll(); | ||
100 | addChild(mNoAssetsLabel); | ||
101 | mNoAssetsLabel->setVisible(FALSE); | ||
102 | } | ||
103 | |||
104 | void LLFloaterAssetBrowser::createThumbnails() | ||
105 | { | ||
106 | LLViewerInventoryCategory::cat_array_t cats; | ||
107 | LLViewerInventoryItem::item_array_t items; | ||
108 | LLIsType isType(LLAssetType::AT_TEXTURE); | ||
109 | |||
110 | gInventory.collectDescendentsIf(LLUUID::null, | ||
111 | cats, | ||
112 | items, | ||
113 | LLInventoryModel::INCLUDE_TRASH, | ||
114 | isType); | ||
115 | |||
116 | //Get UUID, asset UUID and name | ||
117 | for(S32 i = 0; i < items.count(); i++) | ||
118 | { | ||
119 | LLInventoryItem* itemp = items[i]; | ||
120 | LLAssetSelection temp; | ||
121 | temp.mAssetUUID = itemp->getAssetUUID(); | ||
122 | temp.mUUID = itemp->getUUID(); | ||
123 | temp.mName = itemp->getName(); | ||
124 | temp.mTexturep = NULL; | ||
125 | temp.mAssetRect = LLRect::null; | ||
126 | mTextureAssets.push_back(temp); | ||
127 | } | ||
128 | |||
129 | //Get Texturep | ||
130 | for(S32 i = 0; i < items.count(); i++) | ||
131 | { | ||
132 | mTextureAssets[i].mTexturep = gImageList.getImage(mTextureAssets[i].mAssetUUID, MIPMAP_YES, IMMEDIATE_NO); | ||
133 | mTextureAssets[i].mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW); | ||
134 | //mTextureAssets[i].mTexturep->processTextureStats(); | ||
135 | } | ||
136 | |||
137 | //Generate the asset info text | ||
138 | /*for(S32 i = 0; i < items.count(); i++) | ||
139 | { | ||
140 | LLString asset_info; | ||
141 | LLString dimensions; | ||
142 | |||
143 | asset_info.append(mTextureAssets[i].mName); | ||
144 | |||
145 | //if(mTextureAssets[i].mTexturep->mFullWidth == 0 | ||
146 | //|| mTextureAssets[i].mTexturep->mFullHeight == 0) | ||
147 | |||
148 | dimensions = llformat("\n%d x %d", | ||
149 | mTextureAssets[i].mTexturep->mFullWidth, | ||
150 | mTextureAssets[i].mTexturep->mFullHeight); | ||
151 | asset_info.append(dimensions); | ||
152 | |||
153 | mTextureAssets[i].mAssetInfo = asset_info; | ||
154 | }*/ | ||
155 | |||
156 | mFloaterTitle = llformat("Asset Browser (%d assets fetched)", mTextureAssets.size()); | ||
157 | setTitle(mFloaterTitle); | ||
158 | } | ||
159 | |||
160 | // virtual | ||
161 | BOOL LLFloaterAssetBrowser::handleHover(S32 x, S32 y, MASK mask) | ||
162 | { | ||
163 | if(mTextureAssets.size() > 0) | ||
164 | { | ||
165 | for(U32 i = mFirstIndex; i < mMaxIndex; i++) | ||
166 | { | ||
167 | if(i < mTextureAssets.size()) | ||
168 | { | ||
169 | if(mTextureAssets[i].mAssetRect.pointInRect(x,y)) | ||
170 | { | ||
171 | mMouseOverUUID = mTextureAssets[i].mUUID; | ||
172 | mMouseOverIndex = i; | ||
173 | |||
174 | if(hasMouseCapture()) | ||
175 | { | ||
176 | S32 screen_x; | ||
177 | S32 screen_y; | ||
178 | LLUUID mObjectUUID= LLUUID::null; | ||
179 | const LLViewerInventoryItem *item = gInventory.getItem(mMouseOverUUID); | ||
180 | |||
181 | localPointToScreen(x, y, &screen_x, &screen_y ); | ||
182 | |||
183 | if(item && item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID()) | ||
184 | && LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y)) | ||
185 | { | ||
186 | EDragAndDropType type; | ||
187 | type = LLAssetType::lookupDragAndDropType(item->getType()); | ||
188 | LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_LIBRARY; | ||
189 | |||
190 | if(!mObjectUUID.isNull()) | ||
191 | { | ||
192 | src = LLToolDragAndDrop::SOURCE_WORLD; | ||
193 | } | ||
194 | else if(item->getPermissions().getOwner() == gAgent.getID()) | ||
195 | { | ||
196 | src = LLToolDragAndDrop::SOURCE_AGENT; | ||
197 | } | ||
198 | LLToolDragAndDrop::getInstance()->beginDrag(type, | ||
199 | item->getUUID(), | ||
200 | src, | ||
201 | mObjectUUID); | ||
202 | return LLToolDragAndDrop::getInstance()->handleHover(x, y, mask); | ||
203 | } | ||
204 | return TRUE; | ||
205 | } | ||
206 | return LLFloater::handleHover(x, y, mask); | ||
207 | } | ||
208 | } | ||
209 | } | ||
210 | return LLFloater::handleHover(x, y, mask); | ||
211 | } | ||
212 | else | ||
213 | { | ||
214 | mMouseOverUUID = LLUUID::null; | ||
215 | return LLFloater::handleHover(x, y, mask); | ||
216 | } | ||
217 | } | ||
218 | |||
219 | // virtual | ||
220 | BOOL LLFloaterAssetBrowser::handleMouseDown(S32 x, S32 y, MASK mask) | ||
221 | { | ||
222 | if(mTextureAssets.size() > 0) | ||
223 | { | ||
224 | if(mTextureAssets[mMouseOverIndex].mAssetRect.pointInRect(x,y)) | ||
225 | { | ||
226 | if(mMouseOverUUID.notNull()) | ||
227 | { | ||
228 | gFocusMgr.setMouseCapture(this); | ||
229 | S32 screen_x; | ||
230 | S32 screen_y; | ||
231 | localPointToScreen(x, y, &screen_x, &screen_y); | ||
232 | LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y); | ||
233 | return TRUE; | ||
234 | } | ||
235 | } | ||
236 | } | ||
237 | return LLFloater::handleMouseDown(x, y, mask); | ||
238 | } | ||
239 | |||
240 | // virtual | ||
241 | BOOL LLFloaterAssetBrowser::handleMouseUp(S32 x, S32 y, MASK mask) | ||
242 | { | ||
243 | if(hasMouseCapture()) | ||
244 | { | ||
245 | gFocusMgr.setMouseCapture(NULL); | ||
246 | return TRUE; | ||
247 | } | ||
248 | return LLFloater::handleMouseUp(x, y, mask); | ||
249 | } | ||
250 | |||
251 | // virtual | ||
252 | BOOL LLFloaterAssetBrowser::handleDoubleClick(S32 x, S32 y, MASK mask) | ||
253 | { | ||
254 | if(mTextureAssets.size() > 0) | ||
255 | { | ||
256 | if(mTextureAssets[mMouseOverIndex].mAssetRect.pointInRect(x,y)) | ||
257 | { | ||
258 | if(mMouseOverUUID.notNull()) | ||
259 | { | ||
260 | open_texture(mMouseOverUUID, mTextureAssets[mMouseOverIndex].mName, FALSE); | ||
261 | return TRUE; | ||
262 | } | ||
263 | } | ||
264 | } | ||
265 | return LLFloater::handleDoubleClick(x, y, mask); | ||
266 | } | ||
267 | |||
268 | // virtual | ||
269 | void LLFloaterAssetBrowser::draw() | ||
270 | { | ||
271 | LLFloater::draw(); | ||
272 | |||
273 | if(mTextureAssets.size() > 0) | ||
274 | { | ||
275 | S32 hor_pos = 0; | ||
276 | S32 ver_pos = 0; | ||
277 | U32 items_per_row = 0; | ||
278 | S32 height = getRect().getHeight()/8; | ||
279 | S32 width = height; | ||
280 | |||
281 | for(U32 i = mFirstIndex; i < mMaxIndex; i++) | ||
282 | { | ||
283 | if(i < mTextureAssets.size()) | ||
284 | { | ||
285 | mTexturep = NULL; | ||
286 | mImageAssetID = mTextureAssets[i].mAssetUUID; | ||
287 | |||
288 | if(mImageAssetID.notNull()) | ||
289 | { | ||
290 | mTexturep = gImageList.getImage(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO); | ||
291 | //mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW); | ||
292 | mTexturep->processTextureStats(); | ||
293 | mTextureAssets[i].mWidth = mTexturep->mFullWidth; | ||
294 | mTextureAssets[i].mHeight = mTexturep->mFullHeight; | ||
295 | } | ||
296 | |||
297 | if(isMinimized()) | ||
298 | { | ||
299 | return; | ||
300 | } | ||
301 | |||
302 | //Border | ||
303 | LLRect border; | ||
304 | border.mLeft = START_POS + ver_pos; | ||
305 | border.mTop = getRect().getHeight() - LLFLOATER_HEADER_SIZE - BORDER_PAD - hor_pos; | ||
306 | border.mRight = border.mLeft + width; | ||
307 | border.mBottom = border.mTop - height; | ||
308 | |||
309 | //Save the rect for each thumbnail | ||
310 | mTextureAssets[i].mAssetRect = border; | ||
311 | |||
312 | //Asset info rect | ||
313 | LLRect info_rect; | ||
314 | info_rect.mLeft = border.mLeft; | ||
315 | info_rect.mTop = border.mBottom - 3; | ||
316 | info_rect.mRight = border.mLeft + 130; | ||
317 | info_rect.mBottom = border.mBottom - 2*llround(LLFontGL::sSansSerifSmall->getLineHeight()); | ||
318 | |||
319 | gl_rect_2d(border, LLColor4::black, FALSE); | ||
320 | |||
321 | // Interior | ||
322 | LLRect interior = border; | ||
323 | interior.stretch(1); | ||
324 | |||
325 | //Draw the image | ||
326 | if(mTexturep) | ||
327 | { | ||
328 | if(mTexturep->getComponents() == 4) | ||
329 | { | ||
330 | gl_rect_2d_checkerboard(interior); | ||
331 | } | ||
332 | |||
333 | gl_draw_scaled_image(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep); | ||
334 | // Pump the priority | ||
335 | mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight())); | ||
336 | |||
337 | //Generate the asset info text | ||
338 | std::string asset_info; | ||
339 | asset_info.append(mTextureAssets[i].mName); | ||
340 | std::string dimensions = llformat("\n%d x %d", | ||
341 | mTexturep->mFullWidth /*mTextureAssets[i].mWidth*/, | ||
342 | mTexturep->mFullHeight /* mTextureAssets[i].mHeight*/); | ||
343 | asset_info.append(dimensions); | ||
344 | |||
345 | // Draw material info below the asset | ||
346 | // LLTextBox object has to be drawn only once, not non-stop like image | ||
347 | if(mAssetInfoIndex < ITEMS_PER_PAGE && | ||
348 | mAssetInfoIndex < mTextureAssets.size() - mFirstIndex) | ||
349 | { | ||
350 | mAssetInfoLabel = new LLTextBox("Asset Info"/*mTextureAssets[i].mAssetInfo*/, | ||
351 | info_rect, | ||
352 | asset_info, | ||
353 | LLFontGL::sSansSerifSmall); | ||
354 | mAssetInfoLabel->setFollowsAll(); | ||
355 | mAssetInfoLabelList.push_back(mAssetInfoLabel); | ||
356 | addChild(mAssetInfoLabelList[mAssetInfoIndex]); | ||
357 | mAssetInfoLabelList[mAssetInfoIndex]->setVisible(TRUE); | ||
358 | mAssetInfoIndex++; | ||
359 | } | ||
360 | |||
361 | } | ||
362 | else | ||
363 | { | ||
364 | // Draw X | ||
365 | gl_rect_2d(interior, LLColor4::grey, TRUE); | ||
366 | gl_draw_x(interior, LLColor4::black); | ||
367 | } | ||
368 | //Move to the right | ||
369 | ver_pos += getRect().getWidth()/6; | ||
370 | items_per_row++; | ||
371 | |||
372 | //Change the row | ||
373 | if(items_per_row % 4 == 0) | ||
374 | { | ||
375 | ver_pos = 0; | ||
376 | hor_pos += getRect().getHeight()/4; | ||
377 | } | ||
378 | } | ||
379 | }//for | ||
380 | |||
381 | //If the size of the floater has changed, clear the asset info texts | ||
382 | //in order to draw them again into the new position | ||
383 | if(getRect().getWidth() != mFloaterWidth || getRect().getHeight() != mFloaterHeight) | ||
384 | { | ||
385 | clearAssetInfoTexts(); | ||
386 | //Save the size of the current floater | ||
387 | mFloaterWidth = getRect().getWidth(); | ||
388 | mFloaterHeight = getRect().getHeight(); | ||
389 | } | ||
390 | if(mMaxIndex >= mTextureAssets.size()) | ||
391 | { | ||
392 | childDisable("button next"); | ||
393 | childEnable("button previous"); | ||
394 | } | ||
395 | else if(mFirstIndex <= 0) | ||
396 | { | ||
397 | childEnable("button next"); | ||
398 | childDisable("button previous"); | ||
399 | } | ||
400 | else | ||
401 | { | ||
402 | childEnable("button next"); | ||
403 | childEnable("button previous"); | ||
404 | } | ||
405 | } | ||
406 | else | ||
407 | { | ||
408 | //No assets found | ||
409 | mNoAssetsLabel->setVisible(TRUE); | ||
410 | childDisable("button next"); | ||
411 | childDisable("button previous"); | ||
412 | } | ||
413 | } | ||
414 | |||
415 | void LLFloaterAssetBrowser::clearAssetInfoTexts() | ||
416 | { | ||
417 | for(U32 i = 0; i < mAssetInfoLabelList.size(); i++) | ||
418 | { | ||
419 | delete mAssetInfoLabelList[i]; | ||
420 | mAssetInfoLabelList[i] = NULL; | ||
421 | } | ||
422 | mAssetInfoLabelList.clear(); | ||
423 | mAssetInfoIndex = 0; | ||
424 | } | ||
425 | |||
426 | void LLFloaterAssetBrowser::clearNoAssetsText() | ||
427 | { | ||
428 | if(mTextureAssets.size() > 0) | ||
429 | { | ||
430 | delete mNoAssetsLabel; | ||
431 | mNoAssetsLabel = NULL; | ||
432 | } | ||
433 | } | ||
434 | |||
435 | // static | ||
436 | void LLFloaterAssetBrowser::onClickNext(void *userdata) | ||
437 | { | ||
438 | LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata; | ||
439 | self->mFirstIndex = self->mMaxIndex; | ||
440 | self->mMaxIndex = self->mFirstIndex + ITEMS_PER_PAGE; | ||
441 | self->clearAssetInfoTexts(); | ||
442 | } | ||
443 | |||
444 | // static | ||
445 | void LLFloaterAssetBrowser::onClickPrevious(void *userdata) | ||
446 | { | ||
447 | LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata; | ||
448 | self->mFirstIndex = self->mMaxIndex - (2 * ITEMS_PER_PAGE); | ||
449 | self->mMaxIndex = self->mMaxIndex - ITEMS_PER_PAGE; | ||
450 | self->clearAssetInfoTexts(); | ||
451 | } | ||
452 | |||
453 | // static | ||
454 | void LLFloaterAssetBrowser::onClickRefresh(void *userdata) | ||
455 | { | ||
456 | LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata; | ||
457 | for(U32 i = 0; i < self->mTextureAssets.size(); i++) | ||
458 | { | ||
459 | self->mTextureAssets[i].mTexturep = NULL; | ||
460 | } | ||
461 | |||
462 | self->mTextureAssets.clear(); | ||
463 | self->createThumbnails(); | ||
464 | self->clearNoAssetsText(); | ||
465 | self->clearAssetInfoTexts(); | ||
466 | } | ||
diff --git a/linden/indra/newview/llfloaterassetbrowser.h b/linden/indra/newview/llfloaterassetbrowser.h new file mode 100644 index 0000000..76eb3ba --- /dev/null +++ b/linden/indra/newview/llfloaterassetbrowser.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /** | ||
2 | * @file llfloaterassetbrowser.h | ||
3 | * @brief LLFloaterAssetBrowser class implementation | ||
4 | * Phox wuz hurr | ||
5 | */ | ||
6 | |||
7 | #ifndef LL_LLFLOATERASSETBROWSERVIEW_H | ||
8 | #define LL_LLFLOATERASSETBROWSERVIEW_H | ||
9 | |||
10 | #include "llfloater.h" | ||
11 | #include "llinventorymodel.h" | ||
12 | #include "llview.h" | ||
13 | #include "llviewerimage.h" | ||
14 | |||
15 | class LLInventoryPanel; | ||
16 | |||
17 | struct LLAssetSelection | ||
18 | { | ||
19 | LLUUID mUUID; | ||
20 | LLUUID mAssetUUID; | ||
21 | std::string mName; | ||
22 | std::string mAssetInfo; | ||
23 | S32 mWidth; | ||
24 | S32 mHeight; | ||
25 | LLTextBox* mAssetInfoTextBox; | ||
26 | LLPointer<LLViewerImage> mTexturep; | ||
27 | LLRect mAssetRect; | ||
28 | }; | ||
29 | |||
30 | class LLFloaterAssetBrowser : public LLFloater | ||
31 | { | ||
32 | public: | ||
33 | LLFloaterAssetBrowser(); | ||
34 | |||
35 | virtual ~LLFloaterAssetBrowser(); | ||
36 | |||
37 | static void show(void*); | ||
38 | |||
39 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | ||
40 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
41 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | ||
42 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); | ||
43 | virtual void draw(); | ||
44 | |||
45 | static LLFloaterAssetBrowser* getInstance(){ return sInstance; } | ||
46 | |||
47 | private: | ||
48 | void initialize(); | ||
49 | void createThumbnails(); | ||
50 | void clearAssetInfoTexts(); | ||
51 | void clearNoAssetsText(); | ||
52 | |||
53 | static void onClickNext(void *userdata); | ||
54 | static void onClickPrevious(void *userdata); | ||
55 | static void onClickRefresh(void *userdata); | ||
56 | |||
57 | static LLFloaterAssetBrowser* sInstance; | ||
58 | |||
59 | protected: | ||
60 | LLInventoryPanel* mInventoryPanel; | ||
61 | LLUUID mImageAssetID; | ||
62 | LLUUID mMouseOverUUID; | ||
63 | LLUUID mMouseOverAssetUUID; | ||
64 | LLPointer<LLViewerImage> mTexturep; | ||
65 | std::vector<LLAssetSelection> mTextureAssets; | ||
66 | std::vector<LLTextBox*> mAssetInfoLabelList; | ||
67 | U32 mLastIndex; | ||
68 | U32 mMaxIndex; | ||
69 | U32 mFirstIndex; | ||
70 | U32 mAssetInfoIndex; | ||
71 | S32 mFloaterHeight; | ||
72 | S32 mFloaterWidth; | ||
73 | S32 mMouseOverIndex; | ||
74 | LLTextBox* mNoAssetsLabel; | ||
75 | LLTextBox* mAssetInfoLabel; | ||
76 | std::string mFloaterTitle; | ||
77 | }; | ||
78 | |||
79 | static const S32 HPAD = 4; | ||
80 | static const S32 BORDER_PAD = HPAD; | ||
81 | static const U32 ITEMS_PER_PAGE = 16; | ||
82 | static const S32 START_POS = 250; | ||
83 | |||
84 | #endif | ||
diff --git a/linden/indra/newview/llfloaterbeacons.cpp b/linden/indra/newview/llfloaterbeacons.cpp index d636776..7403df2 100644 --- a/linden/indra/newview/llfloaterbeacons.cpp +++ b/linden/indra/newview/llfloaterbeacons.cpp | |||
@@ -37,6 +37,9 @@ | |||
37 | #include "llcheckboxctrl.h" | 37 | #include "llcheckboxctrl.h" |
38 | #include "pipeline.h" | 38 | #include "pipeline.h" |
39 | 39 | ||
40 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
41 | #include "llagent.h" | ||
42 | // [/RLVa:KB] | ||
40 | 43 | ||
41 | LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) | 44 | LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) |
42 | { | 45 | { |
@@ -72,6 +75,13 @@ BOOL LLFloaterBeacons::postBuild() | |||
72 | // Too bad we can't just add control_name="BeaconsEnabled" to the XML. | 75 | // Too bad we can't just add control_name="BeaconsEnabled" to the XML. |
73 | void LLFloaterBeacons::open() | 76 | void LLFloaterBeacons::open() |
74 | { | 77 | { |
78 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
79 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
80 | { | ||
81 | return; | ||
82 | } | ||
83 | // [/RLVa:KB] | ||
84 | |||
75 | LLFloater::open(); | 85 | LLFloater::open(); |
76 | gSavedSettings.setBOOL( "BeaconsEnabled", TRUE); | 86 | gSavedSettings.setBOOL( "BeaconsEnabled", TRUE); |
77 | } | 87 | } |
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 5117b8d..1f51a21 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -56,10 +56,11 @@ | |||
56 | #include "llfloaterchatterbox.h" | 56 | #include "llfloaterchatterbox.h" |
57 | #include "llfloatermute.h" | 57 | #include "llfloatermute.h" |
58 | #include "llkeyboard.h" | 58 | #include "llkeyboard.h" |
59 | //#include "lllineeditor.h" | 59 | #include "lllineeditor.h" |
60 | #include "llmutelist.h" | 60 | #include "llmutelist.h" |
61 | //#include "llresizehandle.h" | 61 | //#include "llresizehandle.h" |
62 | #include "llchatbar.h" | 62 | #include "llchatbar.h" |
63 | #include "llspinctrl.h" | ||
63 | #include "llstatusbar.h" | 64 | #include "llstatusbar.h" |
64 | #include "llviewertexteditor.h" | 65 | #include "llviewertexteditor.h" |
65 | #include "llviewergesture.h" // for triggering gestures | 66 | #include "llviewergesture.h" // for triggering gestures |
@@ -188,7 +189,7 @@ void LLFloaterChat::updateConsoleVisibility() | |||
188 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? | 189 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? |
189 | } | 190 | } |
190 | 191 | ||
191 | void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LLColor4& color) | 192 | void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color) |
192 | { | 193 | { |
193 | std::string line = chat.mText; | 194 | std::string line = chat.mText; |
194 | bool prepend_newline = true; | 195 | bool prepend_newline = true; |
@@ -198,16 +199,25 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL | |||
198 | prepend_newline = false; | 199 | prepend_newline = false; |
199 | } | 200 | } |
200 | 201 | ||
201 | // If the msg is not from an agent (not yourself though), | 202 | // If the msg is from an agent (not yourself though), |
202 | // extract out the sender name and replace it with the hotlinked name. | 203 | // extract out the sender name and replace it with the hotlinked name. |
203 | if (chat.mSourceType == CHAT_SOURCE_AGENT && | 204 | if (chat.mSourceType == CHAT_SOURCE_AGENT && |
204 | chat.mFromID != LLUUID::null && | 205 | chat.mFromID != LLUUID::null && |
205 | (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | 206 | // [RLVa] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) |
207 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | ||
208 | // [/RLVa] | ||
209 | { | ||
210 | chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str()); | ||
211 | } | ||
212 | |||
213 | // If the chat line has an associated url, link it up to the name. | ||
214 | if (!chat.mURL.empty() | ||
215 | && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | ||
206 | { | 216 | { |
207 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); | 217 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); |
208 | line = line.substr(chat.mFromName.length() + 1); | 218 | line = line.substr(chat.mFromName.length() + 1); |
209 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID); | 219 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); |
210 | edit->appendStyledText(start_line, false, prepend_newline, &sourceStyle); | 220 | edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); |
211 | prepend_newline = false; | 221 | prepend_newline = false; |
212 | } | 222 | } |
213 | edit->appendColoredText(line, false, prepend_newline, color); | 223 | edit->appendColoredText(line, false, prepend_newline, color); |
@@ -223,9 +233,61 @@ void log_chat_text(const LLChat& chat) | |||
223 | 233 | ||
224 | LLLogChat::saveHistory(std::string("chat"),histstr); | 234 | LLLogChat::saveHistory(std::string("chat"),histstr); |
225 | } | 235 | } |
236 | |||
237 | // static | ||
238 | void LLFloaterChat::toggleHistoryChannelControl() | ||
239 | { | ||
240 | LLFloaterChat* chat_floater = LLFloaterChat::getInstance(LLSD()); | ||
241 | BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect"); | ||
242 | BOOL control = chat_floater->getChild<LLSpinCtrl>("channel_control")->getVisible(); | ||
243 | |||
244 | LLLineEditor* input = chat_floater->getChild<LLLineEditor>("Chat Editor"); | ||
245 | LLRect input_rect = input->getRect(); | ||
246 | S32 chan_width = chat_floater->getChild<LLSpinCtrl>("channel_control")->getRect().getWidth(); | ||
247 | |||
248 | if (visible && !control) | ||
249 | { | ||
250 | input_rect.setLeftTopAndSize(input_rect.mLeft+chan_width+4, input_rect.mTop, | ||
251 | input_rect.getWidth()-chan_width, input_rect.getHeight()); | ||
252 | } | ||
253 | else if (!visible && control) | ||
254 | { | ||
255 | input_rect.setLeftTopAndSize(input_rect.mLeft-chan_width-4, input_rect.mTop, | ||
256 | input_rect.getWidth()+chan_width, input_rect.getHeight()); | ||
257 | } | ||
258 | input->setRect(input_rect); | ||
259 | |||
260 | chat_floater->childSetVisible("channel_control", visible); | ||
261 | chat_floater->childSetEnabled("channel_control", visible); | ||
262 | } | ||
263 | |||
226 | // static | 264 | // static |
227 | void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) | 265 | void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) |
228 | { | 266 | { |
267 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
268 | if (rlv_handler_t::isEnabled()) | ||
269 | { | ||
270 | // TODO-RLVa: we might cast too broad a net by filtering here, needs testing | ||
271 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) ) | ||
272 | { | ||
273 | LLChat& rlvChat = const_cast<LLChat&>(chat); | ||
274 | gRlvHandler.filterLocation(rlvChat.mText); | ||
275 | rlvChat.mRlvLocFiltered = TRUE; | ||
276 | } | ||
277 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) ) | ||
278 | { | ||
279 | // NOTE: this will also filter inventory accepted/declined text in the chat history | ||
280 | LLChat& rlvChat = const_cast<LLChat&>(chat); | ||
281 | if (CHAT_SOURCE_AGENT != chat.mSourceType) | ||
282 | { | ||
283 | // Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup) | ||
284 | gRlvHandler.filterNames(rlvChat.mText); | ||
285 | } | ||
286 | rlvChat.mRlvNamesFiltered = TRUE; | ||
287 | } | ||
288 | } | ||
289 | // [/RLVa:KB] | ||
290 | |||
229 | if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file) | 291 | if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file) |
230 | { | 292 | { |
231 | log_chat_text(chat); | 293 | log_chat_text(chat); |
@@ -356,6 +418,30 @@ void LLFloaterChat::addChat(const LLChat& chat, | |||
356 | chat.mChatType == CHAT_TYPE_DEBUG_MSG | 418 | chat.mChatType == CHAT_TYPE_DEBUG_MSG |
357 | && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); | 419 | && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); |
358 | 420 | ||
421 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
422 | if (rlv_handler_t::isEnabled()) | ||
423 | { | ||
424 | // TODO-RLVa: we might cast too broad a net by filtering here, needs testing | ||
425 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) ) | ||
426 | { | ||
427 | LLChat& rlvChat = const_cast<LLChat&>(chat); | ||
428 | if (!from_instant_message) | ||
429 | gRlvHandler.filterLocation(rlvChat.mText); | ||
430 | rlvChat.mRlvLocFiltered = TRUE; | ||
431 | } | ||
432 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) ) | ||
433 | { | ||
434 | LLChat& rlvChat = const_cast<LLChat&>(chat); | ||
435 | if ( (!from_instant_message) && (CHAT_SOURCE_AGENT != chat.mSourceType) ) | ||
436 | { | ||
437 | // Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup) | ||
438 | gRlvHandler.filterNames(rlvChat.mText); | ||
439 | } | ||
440 | rlvChat.mRlvNamesFiltered = TRUE; | ||
441 | } | ||
442 | } | ||
443 | // [/RLVa:KB] | ||
444 | |||
359 | #if LL_LCD_COMPILE | 445 | #if LL_LCD_COMPILE |
360 | // add into LCD displays | 446 | // add into LCD displays |
361 | if (!invisible_script_debug_chat) | 447 | if (!invisible_script_debug_chat) |
@@ -513,7 +599,11 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata) | |||
513 | { | 599 | { |
514 | LLFloaterChat* self = (LLFloaterChat*)userdata; | 600 | LLFloaterChat* self = (LLFloaterChat*)userdata; |
515 | 601 | ||
516 | self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); | 602 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) |
603 | self->childSetVisible("active_speakers_panel", | ||
604 | (!self->childIsVisible("active_speakers_panel")) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ); | ||
605 | // [/RLVa:KB] | ||
606 | //self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); | ||
517 | } | 607 | } |
518 | 608 | ||
519 | //static | 609 | //static |
diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h index 923fd9a..203a158 100644 --- a/linden/indra/newview/llfloaterchat.h +++ b/linden/indra/newview/llfloaterchat.h | |||
@@ -82,6 +82,8 @@ public: | |||
82 | static void* createSpeakersPanel(void* data); | 82 | static void* createSpeakersPanel(void* data); |
83 | static void* createChatPanel(void* data); | 83 | static void* createChatPanel(void* data); |
84 | 84 | ||
85 | static void toggleHistoryChannelControl(); | ||
86 | |||
85 | // visibility policy for LLUISingleton | 87 | // visibility policy for LLUISingleton |
86 | static bool visible(LLFloater* instance, const LLSD& key); | 88 | static bool visible(LLFloater* instance, const LLSD& key); |
87 | static void show(LLFloater* instance, const LLSD& key); | 89 | static void show(LLFloater* instance, const LLSD& key); |
diff --git a/linden/indra/newview/llfloaterchatterbox.h b/linden/indra/newview/llfloaterchatterbox.h index 39e1025..04833ab 100644 --- a/linden/indra/newview/llfloaterchatterbox.h +++ b/linden/indra/newview/llfloaterchatterbox.h | |||
@@ -149,7 +149,14 @@ public: | |||
149 | { | 149 | { |
150 | if (visible(instance, key)) | 150 | if (visible(instance, key)) |
151 | { | 151 | { |
152 | LLFloaterChatterBox::hideInstance(); | 152 | if(instance->getHost()) |
153 | { | ||
154 | LLFloaterChatterBox::hideInstance(); | ||
155 | } | ||
156 | else | ||
157 | { | ||
158 | VisibilityPolicy<LLFloater>::hide(instance, key); | ||
159 | } | ||
153 | } | 160 | } |
154 | } | 161 | } |
155 | 162 | ||
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index e1d3c4a..2367b48 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp | |||
@@ -42,6 +42,10 @@ | |||
42 | #include "llviewerobject.h" | 42 | #include "llviewerobject.h" |
43 | #include "lluictrlfactory.h" | 43 | #include "lluictrlfactory.h" |
44 | 44 | ||
45 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
46 | #include "rlvhandler.h" | ||
47 | // [/RLVa:KB] | ||
48 | |||
45 | LLFloaterInspect* LLFloaterInspect::sInstance = NULL; | 49 | LLFloaterInspect* LLFloaterInspect::sInstance = NULL; |
46 | 50 | ||
47 | LLFloaterInspect::LLFloaterInspect(void) : | 51 | LLFloaterInspect::LLFloaterInspect(void) : |
@@ -145,7 +149,13 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl) | |||
145 | if(node) | 149 | if(node) |
146 | { | 150 | { |
147 | const LLUUID& owner_id = node->mPermissions->getOwner(); | 151 | const LLUUID& owner_id = node->mPermissions->getOwner(); |
148 | LLFloaterAvatarInfo::showFromDirectory(owner_id); | 152 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) |
153 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
154 | { | ||
155 | LLFloaterAvatarInfo::showFromDirectory(owner_id); | ||
156 | } | ||
157 | // [/RLVa:KB] | ||
158 | // LLFloaterAvatarInfo::showFromDirectory(owner_id); | ||
149 | } | 159 | } |
150 | } | 160 | } |
151 | } | 161 | } |
@@ -163,7 +173,10 @@ void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data) | |||
163 | { | 173 | { |
164 | if(LLFloaterInspect::getSelectedUUID() != LLUUID::null) | 174 | if(LLFloaterInspect::getSelectedUUID() != LLUUID::null) |
165 | { | 175 | { |
166 | sInstance->childSetEnabled("button owner", true); | 176 | //sInstance->childSetEnabled("button owner", true); |
177 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e | ||
178 | sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
179 | // [/RLVa:KB] | ||
167 | sInstance->childSetEnabled("button creator", true); | 180 | sInstance->childSetEnabled("button creator", true); |
168 | } | 181 | } |
169 | } | 182 | } |
@@ -223,6 +236,13 @@ void LLFloaterInspect::refresh() | |||
223 | LLStringUtil::copy(time, ctime(×tamp), MAX_STRING); | 236 | LLStringUtil::copy(time, ctime(×tamp), MAX_STRING); |
224 | time[24] = '\0'; | 237 | time[24] = '\0'; |
225 | gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name); | 238 | gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name); |
239 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
240 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
241 | { | ||
242 | // TODO-RLVa: shouldn't filter if this is a group-owned prim (will show "(nobody)") | ||
243 | owner_name = gRlvHandler.getAnonym(owner_name); | ||
244 | } | ||
245 | // [/RLVa:KB] | ||
226 | gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name); | 246 | gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name); |
227 | row["id"] = obj->getObject()->getID(); | 247 | row["id"] = obj->getObject()->getID(); |
228 | row["columns"][0]["column"] = "object_name"; | 248 | row["columns"][0]["column"] = "object_name"; |
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index 9707184..75c5782 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp | |||
@@ -813,6 +813,12 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id) | |||
813 | // static | 813 | // static |
814 | void LLPanelLandGeneral::onClickBuyLand(void* data) | 814 | void LLPanelLandGeneral::onClickBuyLand(void* data) |
815 | { | 815 | { |
816 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
817 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
818 | { | ||
819 | return; | ||
820 | } | ||
821 | // [/RLVa:KB] | ||
816 | BOOL* for_group = (BOOL*)data; | 822 | BOOL* for_group = (BOOL*)data; |
817 | LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); | 823 | LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); |
818 | } | 824 | } |
@@ -2779,3 +2785,41 @@ void LLPanelLandCovenant::updateEstateOwnerName(const std::string& name) | |||
2779 | if (editor) editor->setText(name); | 2785 | if (editor) editor->setText(name); |
2780 | } | 2786 | } |
2781 | } | 2787 | } |
2788 | |||
2789 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
2790 | void LLFloaterLand::open() | ||
2791 | { | ||
2792 | // We'll allow "About Land" as long as you have the ability to return prims (through ownership or through group powers) | ||
2793 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
2794 | { | ||
2795 | LLParcelSelection* pParcelSel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection(); | ||
2796 | if ( (!pParcelSel) || (pParcelSel->hasOthersSelected()) ) | ||
2797 | return; | ||
2798 | LLParcel* pParcel = pParcelSel->getParcel(); | ||
2799 | if (!pParcel) | ||
2800 | return; | ||
2801 | |||
2802 | // Ideally we could just use LLViewerParcelMgr::isParcelOwnedByAgent(), but that has that sneaky exemption | ||
2803 | // for fake god like (aka View Admin Options) | ||
2804 | const LLUUID& idOwner = pParcel->getOwnerID(); | ||
2805 | if ( (idOwner != gAgent.getID()) ) | ||
2806 | { | ||
2807 | // *sighs* LLAgent::hasPowerInGroup() has it too so copy/paste from there | ||
2808 | S32 count = gAgent.mGroups.count(); bool fShow = false; | ||
2809 | for (S32 i = 0; i < count; ++i) | ||
2810 | { | ||
2811 | if (gAgent.mGroups.get(i).mID == idOwner) | ||
2812 | { | ||
2813 | fShow |= ((gAgent.mGroups.get(i).mPowers & GP_LAND_RETURN) > 0); | ||
2814 | break; | ||
2815 | } | ||
2816 | } | ||
2817 | |||
2818 | if (!fShow) | ||
2819 | return; | ||
2820 | } | ||
2821 | } | ||
2822 | |||
2823 | LLFloater::open(); | ||
2824 | } | ||
2825 | // [/RLVa:KB] | ||
diff --git a/linden/indra/newview/llfloaterland.h b/linden/indra/newview/llfloaterland.h index 5f2b970..6e26b93 100644 --- a/linden/indra/newview/llfloaterland.h +++ b/linden/indra/newview/llfloaterland.h | |||
@@ -82,6 +82,10 @@ public: | |||
82 | virtual void onOpen(); | 82 | virtual void onOpen(); |
83 | virtual BOOL postBuild(); | 83 | virtual BOOL postBuild(); |
84 | 84 | ||
85 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
86 | virtual void open(); | ||
87 | // [/RLVa:KB] | ||
88 | |||
85 | protected: | 89 | protected: |
86 | 90 | ||
87 | // Does its own instance management, so clients not allowed | 91 | // Does its own instance management, so clients not allowed |
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 9ade3bf..29a95c2 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -47,11 +47,16 @@ | |||
47 | #include "llfloaterfriends.h" | 47 | #include "llfloaterfriends.h" |
48 | #include "llfloatergroupinvite.h" | 48 | #include "llfloatergroupinvite.h" |
49 | #include "llfloatergroups.h" | 49 | #include "llfloatergroups.h" |
50 | #include "llfloaterreporter.h" | ||
50 | #include "llimview.h" | 51 | #include "llimview.h" |
52 | #include "llmutelist.h" | ||
51 | #include "roles_constants.h" | 53 | #include "roles_constants.h" |
52 | #include "llscrolllistctrl.h" | 54 | #include "llscrolllistctrl.h" |
53 | #include "lltracker.h" | 55 | #include "lltracker.h" |
56 | #include "llviewerobjectlist.h" | ||
54 | #include "llviewermessage.h" | 57 | #include "llviewermessage.h" |
58 | #include "llviewerregion.h" | ||
59 | #include "llviewerwindow.h" | ||
55 | #include "llworld.h" | 60 | #include "llworld.h" |
56 | 61 | ||
57 | LLFloaterMap* LLFloaterMap::sInstance = NULL; | 62 | LLFloaterMap* LLFloaterMap::sInstance = NULL; |
@@ -59,11 +64,16 @@ LLFloaterMap* LLFloaterMap::sInstance = NULL; | |||
59 | LLFloaterMap::LLFloaterMap(const LLSD& key) | 64 | LLFloaterMap::LLFloaterMap(const LLSD& key) |
60 | : | 65 | : |
61 | LLFloater(std::string("minimap")), | 66 | LLFloater(std::string("minimap")), |
62 | mPanelMap(NULL) | 67 | mPanelMap(NULL), |
68 | mUpdate(TRUE) | ||
63 | { | 69 | { |
64 | LLCallbackMap::map_t factory_map; | 70 | LLCallbackMap::map_t factory_map; |
65 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); | 71 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); |
66 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); | 72 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); |
73 | |||
74 | mSelectedAvatar.setNull(); | ||
75 | mAvatars.clear(); | ||
76 | |||
67 | sInstance = this; | 77 | sInstance = this; |
68 | } | 78 | } |
69 | 79 | ||
@@ -73,7 +83,6 @@ void* LLFloaterMap::createPanelMiniMap(void* data) | |||
73 | { | 83 | { |
74 | LLFloaterMap* self = (LLFloaterMap*)data; | 84 | LLFloaterMap* self = (LLFloaterMap*)data; |
75 | self->mPanelMap = new LLNetMap("Mapview"); | 85 | self->mPanelMap = new LLNetMap("Mapview"); |
76 | self->mSelectedAvatar.setNull(); | ||
77 | return self->mPanelMap; | 86 | return self->mPanelMap; |
78 | } | 87 | } |
79 | 88 | ||
@@ -88,12 +97,20 @@ BOOL LLFloaterMap::postBuild() | |||
88 | childSetCommitCallback("RadarList", onList, this); | 97 | childSetCommitCallback("RadarList", onList, this); |
89 | mRadarList->setDoubleClickCallback(onClickIM); | 98 | mRadarList->setDoubleClickCallback(onClickIM); |
90 | 99 | ||
100 | childSetFocusChangedCallback("near_me_range", onRangeChange, this); | ||
101 | |||
91 | childSetAction("im_btn", onClickIM, this); | 102 | childSetAction("im_btn", onClickIM, this); |
92 | childSetAction("profile_btn", onClickProfile, this); | 103 | childSetAction("profile_btn", onClickProfile, this); |
93 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); | 104 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); |
94 | childSetAction("track_btn", onClickTrack, this); | 105 | childSetAction("track_btn", onClickTrack, this); |
95 | childSetAction("invite_btn", onClickInvite, this); | 106 | childSetAction("invite_btn", onClickInvite, this); |
96 | childSetAction("add_btn", onClickAddFriend, this); | 107 | childSetAction("add_btn", onClickAddFriend, this); |
108 | childSetAction("freeze_btn", onClickFreeze, this); | ||
109 | childSetAction("eject_btn", onClickEject, this); | ||
110 | childSetAction("mute_btn", onClickMute, this); | ||
111 | childSetAction("unmute_btn", onClickUnmute, this); | ||
112 | childSetAction("ar_btn", onClickAR, this); | ||
113 | childSetAction("estate_eject_btn", onClickEjectFromEstate, this); | ||
97 | 114 | ||
98 | setDefaultBtn("im_btn"); | 115 | setDefaultBtn("im_btn"); |
99 | 116 | ||
@@ -155,11 +172,25 @@ void LLFloaterMap::draw() | |||
155 | } | 172 | } |
156 | } | 173 | } |
157 | 174 | ||
175 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) | ||
176 | void LLFloaterMap::open() | ||
177 | { | ||
178 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP)) | ||
179 | { | ||
180 | LLFloater::open(); | ||
181 | } | ||
182 | } | ||
183 | // [/RLVa:KB] | ||
184 | |||
158 | // TODO: make this detachable | 185 | // TODO: make this detachable |
186 | // TODO: make this expand/collapse | ||
159 | 187 | ||
160 | // | 188 | /* |
161 | // Radar | 189 | * Imprudence Radar |
162 | // | 190 | * @brief inworld radar integrated with the minimap |
191 | * by McCabe Maxsted | ||
192 | * Estate tab portion by Dale Glass | ||
193 | */ | ||
163 | 194 | ||
164 | //static | 195 | //static |
165 | void LLFloaterMap::updateRadar() | 196 | void LLFloaterMap::updateRadar() |
@@ -170,113 +201,128 @@ void LLFloaterMap::updateRadar() | |||
170 | 201 | ||
171 | void LLFloaterMap::populateRadar() | 202 | void LLFloaterMap::populateRadar() |
172 | { | 203 | { |
173 | std::stringstream avatar_count_string; | 204 | if (!mUpdate) |
205 | { | ||
206 | return; | ||
207 | } | ||
208 | |||
209 | if (visibleItemsSelected()) | ||
210 | { | ||
211 | mSelectedAvatar = mRadarList->getSelectedValue().asUUID(); | ||
212 | } | ||
213 | else | ||
214 | { | ||
215 | mSelectedAvatar.setNull(); | ||
216 | } | ||
217 | |||
218 | S32 scroll_pos = mRadarList->getScrollPos(); | ||
219 | |||
174 | LLVector3d current_pos = gAgent.getPositionGlobal(); | 220 | LLVector3d current_pos = gAgent.getPositionGlobal(); |
175 | 221 | ||
176 | // find what avatars you can see | 222 | // find what avatars you can see |
177 | std::vector<LLUUID> avatar_ids_new; | 223 | std::vector<LLUUID> avatar_ids; |
178 | std::vector<LLVector3d> positions_new; | 224 | std::vector<LLVector3d> positions; |
179 | LLWorld::getInstance()->getAvatars(&avatar_ids_new, &positions_new, current_pos, gSavedSettings.getF32("NearMeRange")); | 225 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, current_pos, gSavedSettings.getF32("NearMeRange")); |
180 | 226 | ||
181 | // add an avatar to the list if it doesn't exist | 227 | // Add avatars to the list. If they're already there, update positions |
182 | std::vector<LLUUID>::iterator result; | 228 | std::pair<std::map<LLUUID, LLVector3d>::iterator, bool> ret; |
183 | for (U32 i=0; i<avatar_ids_new.size(); i++) | 229 | for (U32 i=0; i<avatar_ids.size(); i++) |
184 | { | 230 | { |
185 | result = find(mAvatarIDs.begin(), mAvatarIDs.end(), avatar_ids_new[i]); | 231 | if (avatar_ids[i] == gAgent.getID() || |
186 | if (result == mAvatarIDs.end()) | 232 | avatar_ids[i].isNull()) |
187 | { | 233 | { |
188 | mAvatarIDs.push_back(avatar_ids_new[i]); | 234 | continue; |
189 | mPositions.push_back(positions_new[i]); | ||
190 | addToList(avatar_ids_new[i], positions_new[i], current_pos); | ||
191 | } | 235 | } |
192 | else // avatar exists, check for updated position | 236 | |
237 | ret = mAvatars.insert(std::pair<LLUUID, LLVector3d>(avatar_ids[i], positions[i])); | ||
238 | if (ret.second == false) | ||
193 | { | 239 | { |
194 | if (mPositions[i] != positions_new[i]) | 240 | mAvatars[avatar_ids[i]] = positions[i]; |
195 | { | ||
196 | removeFromList(mAvatarIDs[i]); | ||
197 | mPositions[i] = positions_new[i]; | ||
198 | addToList(mAvatarIDs[i], mPositions[i], current_pos); | ||
199 | } | ||
200 | } | 241 | } |
201 | } | 242 | } |
202 | 243 | ||
203 | // pull out dead entries | 244 | LLSD element; |
204 | for (U32 i=0; i<mAvatarIDs.size(); i++) | 245 | |
246 | mRadarList->deleteAllItems(); | ||
247 | |||
248 | // if an avatar's not in range anymore, kill it. Otherwise, populate radar | ||
249 | std::map<LLUUID, LLVector3d>::iterator mIt; | ||
250 | std::vector<LLUUID>::iterator result; | ||
251 | for (mIt = mAvatars.begin(); mIt != mAvatars.end(); ) | ||
205 | { | 252 | { |
206 | result = find(avatar_ids_new.begin(), avatar_ids_new.end(), mAvatarIDs[i]); | 253 | result = find(avatar_ids.begin(), avatar_ids.end(), mIt->first); |
207 | if (result == avatar_ids_new.end()) | 254 | if (result == avatar_ids.end()) |
208 | { | 255 | { |
209 | removeFromList(mAvatarIDs[i]); | 256 | mAvatars.erase(mIt++); |
210 | 257 | } | |
211 | // pop_back is faster | 258 | else |
212 | std::swap(mAvatarIDs[i], mAvatarIDs.back()); | 259 | { |
213 | mAvatarIDs.pop_back(); | 260 | // Add to list only if we get their name |
214 | std::swap(mPositions[i], mPositions.back()); | 261 | std::string fullname = getSelectedName(mIt->first); |
215 | mPositions.pop_back(); | 262 | if (!fullname.empty() && fullname != " ") |
263 | { | ||
264 | std::string mute_text = LLMuteList::getInstance()->isMuted(mIt->first) ? getString("muted") : ""; | ||
265 | element["id"] = mIt->first; | ||
266 | element["columns"][0]["column"] = "avatar_name"; | ||
267 | element["columns"][0]["type"] = "text"; | ||
268 | element["columns"][0]["value"] = fullname + " " + mute_text; | ||
269 | element["columns"][1]["column"] = "avatar_distance"; | ||
270 | element["columns"][1]["type"] = "text"; | ||
271 | |||
272 | F64 distance = dist_vec(current_pos, mIt->second); | ||
273 | std::stringstream dist_formatted; | ||
274 | dist_formatted.str(""); | ||
275 | dist_formatted << (double)((int)((distance + 0.05)*10.0))/10.0 << "m"; | ||
276 | element["columns"][1]["value"] = dist_formatted.str(); | ||
277 | |||
278 | mRadarList->addElement(element, ADD_BOTTOM); | ||
279 | } | ||
280 | ++mIt; | ||
216 | } | 281 | } |
217 | } | 282 | } |
218 | 283 | ||
219 | avatar_count_string.str(""); | 284 | mRadarList->sortItems(); |
220 | if (mAvatarIDs.empty()) | 285 | mRadarList->setScrollPos(scroll_pos); |
221 | { | 286 | |
222 | childSetEnabled("RadarList", false);childSetEnabled("im_btn", false); | 287 | if (mSelectedAvatar.notNull()) |
223 | mRadarList->addCommentText(getString("no_one_near")); | ||
224 | avatar_count_string << "0"; | ||
225 | } | ||
226 | else | ||
227 | { | 288 | { |
228 | childSetEnabled("RadarList", true); | 289 | mRadarList->selectByID(mSelectedAvatar); |
229 | avatar_count_string << (int)mAvatarIDs.size(); | ||
230 | } | 290 | } |
231 | LLTextBox* lblAvatarCount = getChild<LLTextBox>("lblAvatarCount"); | ||
232 | lblAvatarCount->setText(avatar_count_string.str()); | ||
233 | onList(mRadarList, this); | ||
234 | } | ||
235 | |||
236 | void LLFloaterMap::addToList(const LLUUID& agent_id, const LLVector3d& agent_pos, const LLVector3d& current_pos) | ||
237 | { | ||
238 | if (agent_id == gAgent.getID()) | ||
239 | return; | ||
240 | |||
241 | F64 distance = dist_vec(current_pos, agent_pos); | ||
242 | std::stringstream dist_formatted; | ||
243 | dist_formatted << (double)((int)((distance + 0.05)*10.0))/10.0 << "m"; | ||
244 | |||
245 | LLSD element; | ||
246 | element["id"] = agent_id; // value | ||
247 | element["columns"][0]["column"] = "avatar_name"; | ||
248 | element["columns"][0]["type"] = "text"; | ||
249 | 291 | ||
250 | std::string fullname; | 292 | // set count |
251 | if(!gCacheName->getFullName(agent_id, fullname)) | 293 | std::stringstream avatar_count; |
294 | avatar_count.str(""); | ||
295 | if (mAvatars.empty()) | ||
252 | { | 296 | { |
253 | element["columns"][0]["value"] = LLCacheName::getDefaultName(); | 297 | mRadarList->addCommentText(getString("no_one_near"), ADD_TOP); |
254 | } | 298 | avatar_count << "0"; |
299 | } | ||
255 | else | 300 | else |
256 | { | 301 | { |
257 | element["columns"][0]["value"] = fullname; | 302 | avatar_count << (int)mAvatars.size(); |
258 | } | 303 | } |
304 | childSetText("lblAvatarCount", avatar_count.str()); | ||
259 | 305 | ||
260 | element["columns"][1]["column"] = "avatar_distance"; | 306 | toggleButtons(); |
261 | element["columns"][1]["type"] = "text"; | 307 | } |
262 | element["columns"][1]["value"] = dist_formatted.str(); | ||
263 | |||
264 | mRadarList->addElement(element); | ||
265 | mRadarList->selectByID(mSelectedAvatar); | ||
266 | |||
267 | onList(mRadarList, this); | ||
268 | } | ||
269 | 308 | ||
270 | void LLFloaterMap::removeFromList(const LLUUID& agent_id) | 309 | void LLFloaterMap::toggleButtons() |
271 | { | 310 | { |
272 | S32 index = mRadarList->getItemIndex(agent_id); | 311 | BOOL enabled = mRadarList->hasFocus() ? visibleItemsSelected() : FALSE; |
273 | if (index >= 0) | 312 | BOOL unmute_enabled = mRadarList->hasFocus() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; |
274 | { | 313 | |
275 | mRadarList->deleteSingleItem(index); | 314 | childSetEnabled("im_btn", enabled); |
276 | mRadarList->selectByID(mSelectedAvatar); | 315 | childSetEnabled("profile_btn", enabled); |
277 | 316 | childSetEnabled("offer_teleport_btn", enabled); | |
278 | onList(mRadarList, this); | 317 | childSetEnabled("track_btn", enabled); |
279 | } | 318 | childSetEnabled("invite_btn", enabled); |
319 | childSetEnabled("add_btn", enabled); | ||
320 | childSetEnabled("freeze_btn", enabled); | ||
321 | childSetEnabled("eject_btn", enabled); | ||
322 | childSetEnabled("mute_btn", enabled); | ||
323 | childSetEnabled("unmute_btn", unmute_enabled); | ||
324 | childSetEnabled("ar_btn", enabled); | ||
325 | childSetEnabled("estate_eject_btn", enabled); | ||
280 | } | 326 | } |
281 | 327 | ||
282 | // static | 328 | // static |
@@ -285,26 +331,10 @@ void LLFloaterMap::onList(LLUICtrl* ctrl, void* user_data) | |||
285 | LLFloaterMap* self = (LLFloaterMap*)user_data; | 331 | LLFloaterMap* self = (LLFloaterMap*)user_data; |
286 | if (self) | 332 | if (self) |
287 | { | 333 | { |
288 | self->childSetEnabled("im_btn", self->visibleItemsSelected()); | 334 | self->toggleButtons(); |
289 | self->childSetEnabled("profile_btn", self->visibleItemsSelected()); | ||
290 | self->childSetEnabled("offer_teleport_btn", self->visibleItemsSelected()); | ||
291 | self->childSetEnabled("track_btn", self->visibleItemsSelected()); | ||
292 | self->childSetEnabled("invite_btn", self->visibleItemsSelected()); | ||
293 | self->childSetEnabled("add_btn", self->visibleItemsSelected()); | ||
294 | |||
295 | if (self->visibleItemsSelected()) | ||
296 | { | ||
297 | if (self->mSelectedAvatar != self->mRadarList->getFirstSelected()->getUUID()) | ||
298 | { | ||
299 | self->mSelectedAvatar = self->mRadarList->getFirstSelected()->getUUID(); | ||
300 | } | ||
301 | } | ||
302 | else | ||
303 | { | ||
304 | self->mSelectedAvatar.setNull(); | ||
305 | } | ||
306 | } | 335 | } |
307 | } | 336 | } |
337 | |||
308 | 338 | ||
309 | BOOL LLFloaterMap::visibleItemsSelected() const | 339 | BOOL LLFloaterMap::visibleItemsSelected() const |
310 | { | 340 | { |
@@ -316,6 +346,16 @@ BOOL LLFloaterMap::visibleItemsSelected() const | |||
316 | } | 346 | } |
317 | 347 | ||
318 | // static | 348 | // static |
349 | void LLFloaterMap::onRangeChange(LLFocusableElement* focus, void* user_data) | ||
350 | { | ||
351 | LLFloaterMap* self = (LLFloaterMap*)user_data; | ||
352 | if (self) | ||
353 | { | ||
354 | self->mUpdate = !(self->childHasFocus("near_me_range")); | ||
355 | } | ||
356 | } | ||
357 | |||
358 | // static | ||
319 | BOOL LLFloaterMap::isSelected(LLUUID agent) | 359 | BOOL LLFloaterMap::isSelected(LLUUID agent) |
320 | { | 360 | { |
321 | if (sInstance->mSelectedAvatar == agent) | 361 | if (sInstance->mSelectedAvatar == agent) |
@@ -325,6 +365,10 @@ BOOL LLFloaterMap::isSelected(LLUUID agent) | |||
325 | return FALSE; | 365 | return FALSE; |
326 | } | 366 | } |
327 | 367 | ||
368 | // | ||
369 | // Avatar tab | ||
370 | // | ||
371 | |||
328 | // static | 372 | // static |
329 | void LLFloaterMap::onClickIM(void* user_data) | 373 | void LLFloaterMap::onClickIM(void* user_data) |
330 | { | 374 | { |
@@ -429,3 +473,282 @@ void LLFloaterMap::onClickAddFriend(void* user_data) | |||
429 | LLPanelFriends::requestFriendshipDialog(agent_id, fullname); | 473 | LLPanelFriends::requestFriendshipDialog(agent_id, fullname); |
430 | } | 474 | } |
431 | } | 475 | } |
476 | |||
477 | // | ||
478 | // Estate tab | ||
479 | // | ||
480 | |||
481 | //static | ||
482 | std::string LLFloaterMap::getSelectedName(LLUUID agent_id) | ||
483 | { | ||
484 | std::string agent_name; | ||
485 | if(agent_id.notNull() && gCacheName->getFullName(agent_id, agent_name)) | ||
486 | { | ||
487 | return agent_name; | ||
488 | } | ||
489 | return LLStringUtil::null; | ||
490 | } | ||
491 | |||
492 | //static | ||
493 | void LLFloaterMap::callbackFreeze(S32 option, void *user_data) | ||
494 | { | ||
495 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
496 | |||
497 | if ( option == 0 ) | ||
498 | { | ||
499 | sendFreeze(self->mSelectedAvatar, true); | ||
500 | } | ||
501 | else if ( option == 1 ) | ||
502 | { | ||
503 | sendFreeze(self->mSelectedAvatar, false); | ||
504 | } | ||
505 | } | ||
506 | |||
507 | //static | ||
508 | void LLFloaterMap::callbackEject(S32 option, void *user_data) | ||
509 | { | ||
510 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
511 | |||
512 | if ( option == 0 ) | ||
513 | { | ||
514 | sendEject(self->mSelectedAvatar, false); | ||
515 | } | ||
516 | else if ( option == 1 ) | ||
517 | { | ||
518 | sendEject(self->mSelectedAvatar, true); | ||
519 | } | ||
520 | } | ||
521 | |||
522 | //static | ||
523 | void LLFloaterMap::callbackEjectFromEstate(S32 option, void *user_data) | ||
524 | { | ||
525 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
526 | |||
527 | if ( option == 0 ) | ||
528 | { | ||
529 | cmdEstateEject(self->mSelectedAvatar); | ||
530 | } | ||
531 | else if ( option == 1 ) | ||
532 | { | ||
533 | cmdEstateBan(self->mSelectedAvatar); | ||
534 | } | ||
535 | } | ||
536 | |||
537 | void LLFloaterMap::onClickFreeze(void *user_data) | ||
538 | { | ||
539 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
540 | LLStringUtil::format_map_t args; | ||
541 | LLSD payload; | ||
542 | args["[AVATAR_NAME]"] = self->getSelectedName(self->mSelectedAvatar); | ||
543 | gViewerWindow->alertXml("FreezeAvatarFullname", args, callbackFreeze, user_data); | ||
544 | } | ||
545 | |||
546 | //static | ||
547 | void LLFloaterMap::onClickEject(void *user_data) | ||
548 | { | ||
549 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
550 | LLStringUtil::format_map_t args; | ||
551 | LLSD payload; | ||
552 | args["AVATAR_NAME"] = self->getSelectedName(self->mSelectedAvatar); | ||
553 | gViewerWindow->alertXml("EjectAvatarFullName", args, callbackEject, user_data); | ||
554 | } | ||
555 | |||
556 | //static | ||
557 | void LLFloaterMap::onClickMute(void *user_data) | ||
558 | { | ||
559 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
560 | |||
561 | LLUUID agent_id = self->mSelectedAvatar; | ||
562 | std::string agent_name = self->getSelectedName(agent_id); | ||
563 | if(!agent_name.empty()) | ||
564 | { | ||
565 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
566 | { | ||
567 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
568 | //LLMuteList::getInstance()->remove(mute); | ||
569 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
570 | } | ||
571 | else | ||
572 | { | ||
573 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
574 | LLMuteList::getInstance()->add(mute); | ||
575 | } | ||
576 | } | ||
577 | } | ||
578 | |||
579 | //static | ||
580 | void LLFloaterMap::onClickUnmute(void *user_data) | ||
581 | { | ||
582 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
583 | |||
584 | LLUUID agent_id = self->mSelectedAvatar; | ||
585 | std::string agent_name = self->getSelectedName(agent_id); | ||
586 | if(!agent_name.empty()) | ||
587 | { | ||
588 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
589 | { | ||
590 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
591 | LLMuteList::getInstance()->remove(mute); | ||
592 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
593 | } | ||
594 | else | ||
595 | { | ||
596 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
597 | //LLMuteList::getInstance()->add(mute); | ||
598 | } | ||
599 | } | ||
600 | } | ||
601 | |||
602 | //static | ||
603 | void LLFloaterMap::onClickEjectFromEstate(void *user_data) | ||
604 | { | ||
605 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
606 | LLStringUtil::format_map_t args; | ||
607 | LLSD payload; | ||
608 | args["EVIL_USER"] = self->getSelectedName(self->mSelectedAvatar); | ||
609 | gViewerWindow->alertXml("EstateKickUser", args, callbackEjectFromEstate, user_data); | ||
610 | } | ||
611 | |||
612 | //static | ||
613 | void LLFloaterMap::onClickAR(void *user_data) | ||
614 | { | ||
615 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
616 | LLUUID agent_id = self->mSelectedAvatar; | ||
617 | |||
618 | if (agent_id.notNull()) | ||
619 | { | ||
620 | LLFloaterReporter::showFromObject(agent_id); | ||
621 | } | ||
622 | } | ||
623 | |||
624 | // static | ||
625 | void LLFloaterMap::cmdEstateEject(const LLUUID &avatar) | ||
626 | { | ||
627 | sendEstateMessage("teleporthomeuser", avatar); | ||
628 | } | ||
629 | |||
630 | // static | ||
631 | void LLFloaterMap::cmdEstateBan(const LLUUID &avatar) | ||
632 | { | ||
633 | sendEstateMessage("teleporthomeuser", avatar); // Kick first, just to be sure | ||
634 | sendEstateBan(avatar); | ||
635 | } | ||
636 | |||
637 | // static | ||
638 | void LLFloaterMap::sendFreeze(const LLUUID& avatar_id, bool freeze) | ||
639 | { | ||
640 | U32 flags = 0x0; | ||
641 | if (!freeze) | ||
642 | { | ||
643 | // unfreeze | ||
644 | flags |= 0x1; | ||
645 | } | ||
646 | |||
647 | LLMessageSystem* msg = gMessageSystem; | ||
648 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
649 | |||
650 | if (avatar) | ||
651 | { | ||
652 | msg->newMessage("FreezeUser"); | ||
653 | msg->nextBlock("AgentData"); | ||
654 | msg->addUUID("AgentID", gAgent.getID()); | ||
655 | msg->addUUID("SessionID", gAgent.getSessionID()); | ||
656 | msg->nextBlock("Data"); | ||
657 | msg->addUUID("TargetID", avatar_id ); | ||
658 | msg->addU32("Flags", flags ); | ||
659 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
660 | } | ||
661 | } | ||
662 | |||
663 | // static | ||
664 | void LLFloaterMap::sendEject(const LLUUID& avatar_id, bool ban) | ||
665 | { | ||
666 | LLMessageSystem* msg = gMessageSystem; | ||
667 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
668 | |||
669 | if (avatar) | ||
670 | { | ||
671 | U32 flags = 0x0; | ||
672 | if ( ban ) | ||
673 | { | ||
674 | // eject and add to ban list | ||
675 | flags |= 0x1; | ||
676 | } | ||
677 | |||
678 | msg->newMessage("EjectUser"); | ||
679 | msg->nextBlock("AgentData"); | ||
680 | msg->addUUID("AgentID", gAgent.getID() ); | ||
681 | msg->addUUID("SessionID", gAgent.getSessionID() ); | ||
682 | msg->nextBlock("Data"); | ||
683 | msg->addUUID("TargetID", avatar_id ); | ||
684 | msg->addU32("Flags", flags ); | ||
685 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
686 | } | ||
687 | } | ||
688 | |||
689 | // static | ||
690 | void LLFloaterMap::sendEstateMessage(const char* request, const LLUUID &target) | ||
691 | { | ||
692 | |||
693 | LLMessageSystem* msg = gMessageSystem; | ||
694 | LLUUID invoice; | ||
695 | |||
696 | // This seems to provide an ID so that the sim can say which request it's | ||
697 | // replying to. I think this can be ignored for now. | ||
698 | invoice.generate(); | ||
699 | |||
700 | llinfos << "Sending estate request '" << request << "'" << llendl; | ||
701 | msg->newMessage("EstateOwnerMessage"); | ||
702 | msg->nextBlockFast(_PREHASH_AgentData); | ||
703 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
704 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
705 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
706 | msg->nextBlock("MethodData"); | ||
707 | msg->addString("Method", request); | ||
708 | msg->addUUID("Invoice", invoice); | ||
709 | |||
710 | // Agent id | ||
711 | msg->nextBlock("ParamList"); | ||
712 | msg->addString("Parameter", gAgent.getID().asString().c_str()); | ||
713 | |||
714 | // Target | ||
715 | msg->nextBlock("ParamList"); | ||
716 | msg->addString("Parameter", target.asString().c_str()); | ||
717 | |||
718 | msg->sendReliable(gAgent.getRegion()->getHost()); | ||
719 | } | ||
720 | |||
721 | // static | ||
722 | void LLFloaterMap::sendEstateBan(const LLUUID& agent) | ||
723 | { | ||
724 | LLUUID invoice; | ||
725 | U32 flags = ESTATE_ACCESS_BANNED_AGENT_ADD; | ||
726 | |||
727 | invoice.generate(); | ||
728 | |||
729 | LLMessageSystem* msg = gMessageSystem; | ||
730 | msg->newMessage("EstateOwnerMessage"); | ||
731 | msg->nextBlockFast(_PREHASH_AgentData); | ||
732 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
733 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
734 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
735 | |||
736 | msg->nextBlock("MethodData"); | ||
737 | msg->addString("Method", "estateaccessdelta"); | ||
738 | msg->addUUID("Invoice", invoice); | ||
739 | |||
740 | char buf[MAX_STRING]; /* Flawfinder: ignore*/ | ||
741 | gAgent.getID().toString(buf); | ||
742 | msg->nextBlock("ParamList"); | ||
743 | msg->addString("Parameter", buf); | ||
744 | |||
745 | snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore */ | ||
746 | msg->nextBlock("ParamList"); | ||
747 | msg->addString("Parameter", buf); | ||
748 | |||
749 | agent.toString(buf); | ||
750 | msg->nextBlock("ParamList"); | ||
751 | msg->addString("Parameter", buf); | ||
752 | |||
753 | gAgent.sendReliableMessage(); | ||
754 | } | ||
diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index bcf6f0e..0fff8a3 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h | |||
@@ -56,21 +56,25 @@ public: | |||
56 | /*virtual*/ void onOpen(); | 56 | /*virtual*/ void onOpen(); |
57 | /*virtual*/ void onClose(bool app_quitting); | 57 | /*virtual*/ void onClose(bool app_quitting); |
58 | /*virtual*/ BOOL canClose(); | 58 | /*virtual*/ BOOL canClose(); |
59 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) | ||
60 | /*virtual*/ void open(); | ||
61 | // [/RLVa:KB] | ||
62 | |||
59 | 63 | ||
60 | private: | 64 | private: |
61 | LLFloaterMap(const LLSD& key = LLSD()); | 65 | LLFloaterMap(const LLSD& key = LLSD()); |
62 | LLNetMap* mPanelMap; | 66 | |
63 | LLScrollListCtrl* mRadarList; | 67 | LLNetMap* mPanelMap; |
64 | LLUUID mSelectedAvatar; | 68 | LLScrollListCtrl* mRadarList; |
65 | std::vector<LLUUID> mAvatarIDs; | 69 | LLUUID mSelectedAvatar; |
66 | std::vector<LLVector3d> mPositions; | 70 | std::map<LLUUID, LLVector3d> mAvatars; |
67 | static LLFloaterMap* sInstance; | 71 | bool mUpdate; |
68 | 72 | static LLFloaterMap* sInstance; | |
69 | void addToList(const LLUUID& agent_id, const LLVector3d& agent_pos, const LLVector3d& current_pos); | ||
70 | void removeFromList(const LLUUID& agent_id); | ||
71 | 73 | ||
72 | static void onList(class LLUICtrl* ctrl, void* user_data); | 74 | static void onList(LLUICtrl* ctrl, void* user_data); |
75 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | ||
73 | BOOL visibleItemsSelected() const; | 76 | BOOL visibleItemsSelected() const; |
77 | void toggleButtons(); | ||
74 | void populateRadar(); | 78 | void populateRadar(); |
75 | 79 | ||
76 | static void onClickProfile(void* user_data); | 80 | static void onClickProfile(void* user_data); |
@@ -80,6 +84,26 @@ private: | |||
80 | static void onClickTrack(void* user_data); | 84 | static void onClickTrack(void* user_data); |
81 | static void onClickInvite(void* user_data); | 85 | static void onClickInvite(void* user_data); |
82 | static void callback_invite_to_group(LLUUID group_id, void *user_data); | 86 | static void callback_invite_to_group(LLUUID group_id, void *user_data); |
87 | |||
88 | static std::string getSelectedName(LLUUID agent_id); | ||
89 | static void onClickFreeze(void *user_data); | ||
90 | static void onClickEject(void *user_data); | ||
91 | static void onClickMute(void *user_data); | ||
92 | static void onClickUnmute(void *user_data); | ||
93 | static void onClickAR(void *user_data); | ||
94 | static void onClickEjectFromEstate(void *user_data); | ||
95 | |||
96 | static void callbackFreeze(S32 option, void *user_data); | ||
97 | static void callbackEject(S32 option, void *user_data); | ||
98 | static void callbackAR(void *user_data); | ||
99 | static void callbackEjectFromEstate(S32 option, void *user_data); | ||
100 | |||
101 | static void sendFreeze(const LLUUID &avatar, bool); | ||
102 | static void sendEject(const LLUUID &avatar, bool); | ||
103 | static void cmdEstateEject(const LLUUID &avatar); | ||
104 | static void cmdEstateBan(const LLUUID &avatar); | ||
105 | static void sendEstateBan(const LLUUID& agent); | ||
106 | static void sendEstateMessage(const char* request, const LLUUID &target); | ||
83 | }; | 107 | }; |
84 | 108 | ||
85 | #endif // LL_LLFLOATERMAP_H | 109 | #endif // LL_LLFLOATERMAP_H |
diff --git a/linden/indra/newview/llfloaterobjectiminfo.cpp b/linden/indra/newview/llfloaterobjectiminfo.cpp new file mode 100644 index 0000000..6cbc4e2 --- /dev/null +++ b/linden/indra/newview/llfloaterobjectiminfo.cpp | |||
@@ -0,0 +1,204 @@ | |||
1 | /** | ||
2 | * @file llfloaterobjectiminfo.cpp | ||
3 | * @brief A floater with information about an object that sent an IM. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #include "llviewerprecompiledheaders.h" | ||
33 | |||
34 | #include "llfloaterobjectiminfo.h" | ||
35 | |||
36 | #include "llagentdata.h" | ||
37 | #include "llcachename.h" | ||
38 | #include "llcommandhandler.h" | ||
39 | #include "llfloater.h" | ||
40 | #include "llfloateravatarinfo.h" | ||
41 | #include "llfloatergroupinfo.h" | ||
42 | #include "llfloatermute.h" | ||
43 | #include "llmutelist.h" | ||
44 | #include "llsdutil.h" | ||
45 | #include "lluictrlfactory.h" | ||
46 | #include "llurldispatcher.h" | ||
47 | #include "llviewercontrol.h" | ||
48 | |||
49 | //////////////////////////////////////////////////////////////////////////// | ||
50 | // LLFloaterObjectIMInfo | ||
51 | class LLFloaterObjectIMInfo : public LLFloater, public LLFloaterSingleton<LLFloaterObjectIMInfo> | ||
52 | { | ||
53 | public: | ||
54 | LLFloaterObjectIMInfo(const LLSD& sd); | ||
55 | virtual ~LLFloaterObjectIMInfo() { }; | ||
56 | |||
57 | BOOL postBuild(void); | ||
58 | |||
59 | void update(const LLUUID& id, const std::string& name, const std::string& slurl, const LLUUID& owner, bool owner_is_group); | ||
60 | |||
61 | // UI Handlers | ||
62 | static void onClickMap(void* data); | ||
63 | static void onClickOwner(void* data); | ||
64 | static void onClickMute(void* data); | ||
65 | |||
66 | static void nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data); | ||
67 | |||
68 | private: | ||
69 | LLUUID mObjectID; | ||
70 | std::string mObjectName; | ||
71 | std::string mSlurl; | ||
72 | LLUUID mOwnerID; | ||
73 | std::string mOwnerName; | ||
74 | bool mOwnerIsGroup; | ||
75 | }; | ||
76 | |||
77 | LLFloaterObjectIMInfo::LLFloaterObjectIMInfo(const LLSD& seed) | ||
78 | : mObjectID(), mObjectName(), mSlurl(), mOwnerID(), mOwnerName(), mOwnerIsGroup(false) | ||
79 | { | ||
80 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_object_im_info.xml"); | ||
81 | |||
82 | if (getRect().mLeft == 0 | ||
83 | && getRect().mBottom == 0) | ||
84 | { | ||
85 | center(); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | BOOL LLFloaterObjectIMInfo::postBuild(void) | ||
90 | { | ||
91 | childSetAction("Mute",onClickMute,this); | ||
92 | childSetActionTextbox("OwnerName",onClickOwner, this); | ||
93 | childSetActionTextbox("Slurl",onClickMap, this); | ||
94 | |||
95 | return true; | ||
96 | } | ||
97 | |||
98 | void LLFloaterObjectIMInfo::update(const LLUUID& object_id, const std::string& name, const std::string& slurl, const LLUUID& owner_id, bool owner_is_group) | ||
99 | { | ||
100 | // When talking to an old region we won't have a slurl. | ||
101 | // The object id isn't really the object id either but we don't use it so who cares. | ||
102 | bool have_slurl = !slurl.empty(); | ||
103 | childSetVisible("Unknown_Slurl",!have_slurl); | ||
104 | childSetVisible("Slurl",have_slurl); | ||
105 | |||
106 | childSetText("ObjectName",name); | ||
107 | childSetText("Slurl",slurl); | ||
108 | childSetText("OwnerName",std::string("")); | ||
109 | |||
110 | bool my_object = (owner_id == gAgentID); | ||
111 | childSetEnabled("Mute",!my_object); | ||
112 | |||
113 | mObjectID = object_id; | ||
114 | mObjectName = name; | ||
115 | mSlurl = slurl; | ||
116 | mOwnerID = owner_id; | ||
117 | mOwnerIsGroup = owner_is_group; | ||
118 | |||
119 | if (gCacheName) gCacheName->get(owner_id,owner_is_group,nameCallback,this); | ||
120 | } | ||
121 | |||
122 | //static | ||
123 | void LLFloaterObjectIMInfo::onClickMap(void* data) | ||
124 | { | ||
125 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
126 | |||
127 | std::ostringstream link; | ||
128 | link << "secondlife://" << self->mSlurl; | ||
129 | LLURLDispatcher::dispatch(link.str(),false); | ||
130 | } | ||
131 | |||
132 | //static | ||
133 | void LLFloaterObjectIMInfo::onClickOwner(void* data) | ||
134 | { | ||
135 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
136 | if (self->mOwnerIsGroup) | ||
137 | { | ||
138 | LLFloaterGroupInfo::showFromUUID(self->mOwnerID); | ||
139 | } | ||
140 | else | ||
141 | { | ||
142 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
143 | } | ||
144 | } | ||
145 | |||
146 | //static | ||
147 | void LLFloaterObjectIMInfo::onClickMute(void* data) | ||
148 | { | ||
149 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
150 | |||
151 | LLMute::EType mute_type = (self->mOwnerIsGroup) ? LLMute::GROUP : LLMute::AGENT; | ||
152 | LLMute mute(self->mOwnerID, self->mOwnerName, mute_type); | ||
153 | LLMuteList::getInstance()->add(mute); | ||
154 | LLFloaterMute::showInstance(); | ||
155 | self->close(); | ||
156 | } | ||
157 | |||
158 | //static | ||
159 | void LLFloaterObjectIMInfo::nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data) | ||
160 | { | ||
161 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
162 | self->mOwnerName = first; | ||
163 | if (!last.empty()) | ||
164 | { | ||
165 | self->mOwnerName += " " + last; | ||
166 | } | ||
167 | |||
168 | self->childSetText("OwnerName",self->mOwnerName); | ||
169 | } | ||
170 | |||
171 | //////////////////////////////////////////////////////////////////////////// | ||
172 | // LLObjectIMInfo | ||
173 | void LLObjectIMInfo::show(const LLUUID &object_id, const std::string &name, const std::string &location, const LLUUID &owner_id, bool owner_is_group) | ||
174 | { | ||
175 | LLFloaterObjectIMInfo* im_info_floater = LLFloaterObjectIMInfo::showInstance(); | ||
176 | im_info_floater->update(object_id,name,location,owner_id,owner_is_group); | ||
177 | } | ||
178 | |||
179 | //////////////////////////////////////////////////////////////////////////// | ||
180 | // LLObjectIMInfoHandler | ||
181 | class LLObjectIMInfoHandler : public LLCommandHandler | ||
182 | { | ||
183 | public: | ||
184 | LLObjectIMInfoHandler() : LLCommandHandler("objectim", false) { } | ||
185 | |||
186 | bool handle(const LLSD& tokens, const LLSD& query_map); | ||
187 | }; | ||
188 | |||
189 | // Creating the object registers with the dispatcher. | ||
190 | LLObjectIMInfoHandler gObjectIMHandler; | ||
191 | |||
192 | // ex. secondlife:///app/objectim/9426adfc-9c17-8765-5f09-fdf19957d003?owner=a112d245-9095-4e9c-ace4-ffa31717f934&groupowned=true&slurl=ahern/123/123/123&name=Object | ||
193 | bool LLObjectIMInfoHandler::handle(const LLSD &tokens, const LLSD &query_map) | ||
194 | { | ||
195 | LLUUID task_id = tokens[0].asUUID(); | ||
196 | std::string name = query_map["name"].asString(); | ||
197 | std::string slurl = query_map["slurl"].asString(); | ||
198 | LLUUID owner = query_map["owner"].asUUID(); | ||
199 | bool group_owned = query_map.has("groupowned"); | ||
200 | |||
201 | LLObjectIMInfo::show(task_id,name,slurl,owner,group_owned); | ||
202 | |||
203 | return true; | ||
204 | } | ||
diff --git a/linden/indra/newview/llfloaterobjectiminfo.h b/linden/indra/newview/llfloaterobjectiminfo.h new file mode 100644 index 0000000..0564c3e --- /dev/null +++ b/linden/indra/newview/llfloaterobjectiminfo.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /** | ||
2 | * @file llfloaterobjectiminfo.h | ||
3 | * @brief Shows a dialog with information about an object. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2006-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_LLFLOATEROBJECTIMINFO_H | ||
33 | #define LL_LLFLOATEROBJECTIMINFO_H | ||
34 | |||
35 | namespace LLObjectIMInfo | ||
36 | { | ||
37 | // Show an LLFloaterObjectIMInfo for this object. | ||
38 | static void show(const LLUUID& object_id, | ||
39 | const std::string& name, | ||
40 | const std::string& location, | ||
41 | const LLUUID& owner_id, | ||
42 | bool owner_is_group); | ||
43 | }; | ||
44 | |||
45 | #endif // LL_LLFLOATERURLDISPLAY_H | ||
diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index a83b0c9..fd4f9c6 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp | |||
@@ -207,7 +207,18 @@ void LLFloaterOpenObject::onClickMoveToInventory(void* data) | |||
207 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) | 207 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) |
208 | { | 208 | { |
209 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; | 209 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; |
210 | self->moveToInventory(true); | 210 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Deprecated: RLVa-0.2.2a |
211 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
212 | { | ||
213 | // TODO-RLVa: once we have "Add to Outfit" and "Replace Outfit" working we don't need this anymore | ||
214 | self->moveToInventory(false); | ||
215 | } | ||
216 | else | ||
217 | { | ||
218 | self->moveToInventory(true); | ||
219 | } | ||
220 | // [/RLVa:KB] | ||
221 | // self->moveToInventory(true); | ||
211 | self->close(); | 222 | self->close(); |
212 | } | 223 | } |
213 | 224 | ||
diff --git a/linden/indra/newview/llfloaterproperties.cpp b/linden/indra/newview/llfloaterproperties.cpp index eddd56a..0af8ec3 100644 --- a/linden/indra/newview/llfloaterproperties.cpp +++ b/linden/indra/newview/llfloaterproperties.cpp | |||
@@ -354,8 +354,17 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) | |||
354 | else | 354 | else |
355 | { | 355 | { |
356 | gCacheName->getFullName(perm.getOwner(), name); | 356 | gCacheName->getFullName(perm.getOwner(), name); |
357 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
358 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
359 | { | ||
360 | name = gRlvHandler.getAnonym(name); | ||
361 | } | ||
362 | // [/RLVa:KB] | ||
357 | } | 363 | } |
358 | childSetEnabled("BtnOwner",TRUE); | 364 | //childSetEnabled("BtnOwner",TRUE); |
365 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e | ||
366 | childSetEnabled("BtnOwner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
367 | // [/RLVa:KB] | ||
359 | childSetEnabled("LabelOwnerTitle",TRUE); | 368 | childSetEnabled("LabelOwnerTitle",TRUE); |
360 | childSetEnabled("LabelOwnerName",TRUE); | 369 | childSetEnabled("LabelOwnerName",TRUE); |
361 | childSetText("LabelOwnerName",name); | 370 | childSetText("LabelOwnerName",name); |
@@ -602,7 +611,10 @@ void LLFloaterProperties::onClickOwner(void* data) | |||
602 | } | 611 | } |
603 | else | 612 | else |
604 | { | 613 | { |
605 | if(!item->getPermissions().getOwner().isNull()) | 614 | // if(!item->getPermissions().getOwner().isNull()) |
615 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
616 | if ( (!item->getPermissions().getOwner().isNull()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | ||
617 | // [/RLVa:KB] | ||
606 | { | 618 | { |
607 | LLFloaterAvatarInfo::showFromObject(item->getPermissions().getOwner()); | 619 | LLFloaterAvatarInfo::showFromObject(item->getPermissions().getOwner()); |
608 | } | 620 | } |
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 6e0dba1..40907eb 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp | |||
@@ -3192,3 +3192,22 @@ bool LLDispatchSetEstateAccess::operator()( | |||
3192 | 3192 | ||
3193 | return true; | 3193 | return true; |
3194 | } | 3194 | } |
3195 | |||
3196 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
3197 | void LLFloaterRegionInfo::open() | ||
3198 | { | ||
3199 | // We'll allow access to the estate tools for estate managers (and for the sim owner) | ||
3200 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
3201 | { | ||
3202 | LLViewerRegion* pRegion = gAgent.getRegion(); | ||
3203 | if (!pRegion) | ||
3204 | return; | ||
3205 | |||
3206 | // Should be able to call LLRegion::canManageEstate() but then we can fake god like | ||
3207 | if ( (!pRegion->isEstateManager()) && (pRegion->getOwner() != gAgent.getID()) ) | ||
3208 | return; | ||
3209 | } | ||
3210 | |||
3211 | LLFloater::open(); | ||
3212 | } | ||
3213 | // [/RLVa:KB] | ||
diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h index 41a94ce..7b675de 100644 --- a/linden/indra/newview/llfloaterregioninfo.h +++ b/linden/indra/newview/llfloaterregioninfo.h | |||
@@ -66,6 +66,9 @@ public: | |||
66 | 66 | ||
67 | /*virtual*/ void onOpen(); | 67 | /*virtual*/ void onOpen(); |
68 | /*virtual*/ BOOL postBuild(); | 68 | /*virtual*/ BOOL postBuild(); |
69 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
70 | /*virtual*/ void open(); | ||
71 | // [/RLVa:KB] | ||
69 | 72 | ||
70 | static void processEstateOwnerRequest(LLMessageSystem* msg, void**); | 73 | static void processEstateOwnerRequest(LLMessageSystem* msg, void**); |
71 | 74 | ||
diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp index d2fcf01..0d3b101 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp | |||
@@ -132,6 +132,23 @@ LLFloaterReporter::LLFloaterReporter( | |||
132 | 132 | ||
133 | childSetText("abuse_location_edit", gAgent.getSLURL() ); | 133 | childSetText("abuse_location_edit", gAgent.getSLURL() ); |
134 | 134 | ||
135 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0a | ||
136 | if (rlv_handler_t::isEnabled()) | ||
137 | { | ||
138 | // Can't filter these since they get sent as part of the report so just hide them instead | ||
139 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
140 | { | ||
141 | childSetVisible("abuse_location_edit", false); | ||
142 | childSetVisible("pos_field", false); | ||
143 | } | ||
144 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
145 | { | ||
146 | childSetVisible("owner_name", false); | ||
147 | childSetVisible("abuser_name_edit", false); | ||
148 | } | ||
149 | } | ||
150 | // [/RLVa:KB] | ||
151 | |||
135 | LLButton* pick_btn = getChild<LLButton>("pick_btn"); | 152 | LLButton* pick_btn = getChild<LLButton>("pick_btn"); |
136 | if (pick_btn) | 153 | if (pick_btn) |
137 | { | 154 | { |
@@ -299,6 +316,12 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) | |||
299 | if (regionp) | 316 | if (regionp) |
300 | { | 317 | { |
301 | childSetText("sim_field", regionp->getName()); | 318 | childSetText("sim_field", regionp->getName()); |
319 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
320 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
321 | { | ||
322 | childSetText("sim_field", rlv_handler_t::cstrHiddenRegion); | ||
323 | } | ||
324 | // [/RLVa:KB] | ||
302 | LLVector3d global_pos; | 325 | LLVector3d global_pos; |
303 | global_pos.setVec(objectp->getPositionRegion()); | 326 | global_pos.setVec(objectp->getPositionRegion()); |
304 | setPosBox(global_pos); | 327 | setPosBox(global_pos); |
@@ -322,6 +345,12 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) | |||
322 | object_owner.append("Unknown"); | 345 | object_owner.append("Unknown"); |
323 | } | 346 | } |
324 | childSetText("object_name", object_owner); | 347 | childSetText("object_name", object_owner); |
348 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RVLa-1.0.0e | ||
349 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
350 | { | ||
351 | childSetVisible("object_name", false); // Hide the object name if the picked object represents an avataz | ||
352 | } | ||
353 | // [/RLVa:KB] | ||
325 | childSetText("owner_name", object_owner); | 354 | childSetText("owner_name", object_owner); |
326 | childSetText("abuser_name_edit", object_owner); | 355 | childSetText("abuser_name_edit", object_owner); |
327 | mAbuserID = object_id; | 356 | mAbuserID = object_id; |
@@ -594,6 +623,12 @@ LLFloaterReporter* LLFloaterReporter::createNewBugReporter() | |||
594 | void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id) | 623 | void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id) |
595 | { | 624 | { |
596 | childSetText("object_name", object_name); | 625 | childSetText("object_name", object_name); |
626 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RVLa-1.0.0e | ||
627 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
628 | { | ||
629 | childSetVisible("object_name", true); // Show the object name if the picked object is actually an object | ||
630 | } | ||
631 | // [/RLVa:KB] | ||
597 | childSetText("owner_name", owner_name); | 632 | childSetText("owner_name", owner_name); |
598 | childSetText("abuser_name_edit", owner_name); | 633 | childSetText("abuser_name_edit", owner_name); |
599 | mAbuserID = owner_id; | 634 | mAbuserID = owner_id; |
diff --git a/linden/indra/newview/llfloatersettingsdebug.cpp b/linden/indra/newview/llfloatersettingsdebug.cpp index e440c4a..58f37c5 100644 --- a/linden/indra/newview/llfloatersettingsdebug.cpp +++ b/linden/indra/newview/llfloatersettingsdebug.cpp | |||
@@ -39,6 +39,11 @@ | |||
39 | #include "llcolorswatch.h" | 39 | #include "llcolorswatch.h" |
40 | #include "llviewercontrol.h" | 40 | #include "llviewercontrol.h" |
41 | 41 | ||
42 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0g) | ||
43 | #include "rlvhandler.h" | ||
44 | #include "rlvextensions.h" | ||
45 | // [/RLVa:KB] | ||
46 | |||
42 | LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; | 47 | LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; |
43 | 48 | ||
44 | LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) | 49 | LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) |
@@ -239,6 +244,32 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) | |||
239 | 244 | ||
240 | if (controlp) | 245 | if (controlp) |
241 | { | 246 | { |
247 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d | ||
248 | if (rlv_handler_t::isEnabled()) | ||
249 | { | ||
250 | // Don't allow changing DBG_WRITE debug settings under @setdebug=n | ||
251 | bool fEnable = !( (gRlvHandler.hasBehaviour(RLV_BHVR_SETDEBUG)) && | ||
252 | (RlvExtGetSet::getDebugSettingFlags(controlp->getName()) & RlvExtGetSet::DBG_WRITE) ); | ||
253 | // Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n | ||
254 | fEnable &= !((gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) && | ||
255 | (("VertexShaderEnable" == controlp->getName()) || ("WindLightUseAtmosShaders" == controlp->getName()))); | ||
256 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
257 | // Don't allow toggling RestrainedLifeLoginLastLocation | ||
258 | fEnable &= !(RLV_SETTING_LOGINLASTLOCATION == controlp->getName()); | ||
259 | #endif // RLV_EXTENSION_STARTLOCATION | ||
260 | |||
261 | // NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault() | ||
262 | spinner1->setEnabled(fEnable); | ||
263 | spinner2->setEnabled(fEnable); | ||
264 | spinner3->setEnabled(fEnable); | ||
265 | spinner4->setEnabled(fEnable); | ||
266 | color_swatch->setEnabled(fEnable); | ||
267 | childSetEnabled("val_text", fEnable); | ||
268 | childSetEnabled("boolean_combo", fEnable); | ||
269 | childSetEnabled("default_btn", fEnable); | ||
270 | } | ||
271 | // [/RLVa:KB] | ||
272 | |||
242 | eControlType type = controlp->type(); | 273 | eControlType type = controlp->type(); |
243 | 274 | ||
244 | //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame | 275 | //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame |
diff --git a/linden/indra/newview/llfloatertelehub.cpp b/linden/indra/newview/llfloatertelehub.cpp index 943bc36..062306b 100644 --- a/linden/indra/newview/llfloatertelehub.cpp +++ b/linden/indra/newview/llfloatertelehub.cpp | |||
@@ -68,7 +68,6 @@ void LLFloaterTelehub::show() | |||
68 | // Find tools floater, glue to bottom | 68 | // Find tools floater, glue to bottom |
69 | if (gFloaterTools) | 69 | if (gFloaterTools) |
70 | { | 70 | { |
71 | gFloaterTools->showMore(FALSE); | ||
72 | LLRect tools_rect = gFloaterTools->getRect(); | 71 | LLRect tools_rect = gFloaterTools->getRect(); |
73 | S32 our_width = sInstance->getRect().getWidth(); | 72 | S32 our_width = sInstance->getRect().getWidth(); |
74 | S32 our_height = sInstance->getRect().getHeight(); | 73 | S32 our_height = sInstance->getRect().getHeight(); |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 84a1edc..d2a8040 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -54,6 +54,7 @@ | |||
54 | #include "llpanelobject.h" | 54 | #include "llpanelobject.h" |
55 | #include "llpanelvolume.h" | 55 | #include "llpanelvolume.h" |
56 | #include "llpanelpermissions.h" | 56 | #include "llpanelpermissions.h" |
57 | #include "llresmgr.h" | ||
57 | #include "llselectmgr.h" | 58 | #include "llselectmgr.h" |
58 | #include "llslider.h" | 59 | #include "llslider.h" |
59 | #include "llstatusbar.h" | 60 | #include "llstatusbar.h" |
@@ -321,7 +322,7 @@ BOOL LLFloaterTools::postBuild() | |||
321 | 322 | ||
322 | mSliderDozerSize = getChild<LLSlider>("slider brush size"); | 323 | mSliderDozerSize = getChild<LLSlider>("slider brush size"); |
323 | childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); | 324 | childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); |
324 | childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize")); | 325 | childSetValue( "slider brush size", gSavedSettings.getF32("LandBrushSize")); |
325 | 326 | ||
326 | 327 | ||
327 | mSliderDozerForce = getChild<LLSlider>("slider force"); | 328 | mSliderDozerForce = getChild<LLSlider>("slider force"); |
@@ -329,14 +330,10 @@ BOOL LLFloaterTools::postBuild() | |||
329 | // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here | 330 | // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here |
330 | childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce"))); | 331 | childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce"))); |
331 | 332 | ||
332 | childSetAction("button more", click_show_more, this); | ||
333 | childSetAction("button less", click_show_more, this); | ||
334 | mTab = getChild<LLTabContainer>("Object Info Tabs"); | 333 | mTab = getChild<LLTabContainer>("Object Info Tabs"); |
335 | if(mTab) | 334 | if(mTab) |
336 | { | 335 | { |
337 | mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") ); | ||
338 | mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); | 336 | mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); |
339 | mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") ); | ||
340 | mTab->setBorderVisible(FALSE); | 337 | mTab->setBorderVisible(FALSE); |
341 | mTab->selectFirstTab(); | 338 | mTab->selectFirstTab(); |
342 | } | 339 | } |
@@ -436,19 +433,6 @@ LLFloaterTools::LLFloaterTools() | |||
436 | factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo | 433 | factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo |
437 | 434 | ||
438 | LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE); | 435 | LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE); |
439 | |||
440 | mLargeHeight = getRect().getHeight(); | ||
441 | mSmallHeight = mLargeHeight; | ||
442 | if (mTab) mSmallHeight -= mTab->getRect().getHeight(); | ||
443 | |||
444 | // force a toggle initially. seems to be needed to correctly initialize | ||
445 | // both "more" and "less" cases. it also seems to be important to begin | ||
446 | // with the user's preference first so that it's initial position will | ||
447 | // be correct (SL-51192) -MG | ||
448 | BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference | ||
449 | gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below | ||
450 | showMore( !show_more ); // does the toggle | ||
451 | showMore( show_more ); // reset the real user's preference | ||
452 | } | 436 | } |
453 | 437 | ||
454 | LLFloaterTools::~LLFloaterTools() | 438 | LLFloaterTools::~LLFloaterTools() |
@@ -492,6 +476,16 @@ void LLFloaterTools::refresh() | |||
492 | mTab->enableTabButton(idx_face, all_volume); | 476 | mTab->enableTabButton(idx_face, all_volume); |
493 | mTab->enableTabButton(idx_contents, all_volume); | 477 | mTab->enableTabButton(idx_contents, all_volume); |
494 | 478 | ||
479 | // Refresh object and prim count labels | ||
480 | LLLocale locale(LLLocale::USER_LOCALE); | ||
481 | std::string obj_count_string; | ||
482 | LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); | ||
483 | childSetTextArg("obj_count", "[COUNT]", obj_count_string); | ||
484 | std::string prim_count_string; | ||
485 | LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); | ||
486 | childSetTextArg("prim_count", "[COUNT]", prim_count_string); | ||
487 | |||
488 | // Refresh child tabs | ||
495 | mPanelPermissions->refresh(); | 489 | mPanelPermissions->refresh(); |
496 | mPanelObject->refresh(); | 490 | mPanelObject->refresh(); |
497 | mPanelVolume->refresh(); | 491 | mPanelVolume->refresh(); |
@@ -699,7 +693,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
699 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && | 693 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && |
700 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) | 694 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) |
701 | { | 695 | { |
702 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | 696 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0 && |
697 | LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | ||
703 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) | 698 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) |
704 | { | 699 | { |
705 | can_unlink = true; | 700 | can_unlink = true; |
@@ -799,8 +794,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
799 | if (mSliderDozerSize) | 794 | if (mSliderDozerSize) |
800 | { | 795 | { |
801 | mSliderDozerSize ->setVisible( land_visible ); | 796 | mSliderDozerSize ->setVisible( land_visible ); |
802 | childSetVisible("Brush:", land_visible); | 797 | childSetVisible("Bulldozer:", land_visible); |
803 | childSetVisible("Brush Size:", land_visible); | 798 | childSetVisible("Dozer Size:", land_visible); |
804 | } | 799 | } |
805 | if (mCheckShowOwners) | 800 | if (mCheckShowOwners) |
806 | { | 801 | { |
@@ -812,13 +807,10 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
812 | childSetVisible("Strength:", land_visible); | 807 | childSetVisible("Strength:", land_visible); |
813 | } | 808 | } |
814 | 809 | ||
815 | // | 810 | childSetVisible("obj_count", !land_visible); |
816 | // More panel visibility | 811 | childSetVisible("prim_count", !land_visible); |
817 | // | 812 | mTab->setVisible(!land_visible); |
818 | BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); | 813 | mPanelLandInfo->setVisible(land_visible); |
819 | |||
820 | mTab->setVisible(show_more && tool != LLToolBrushLand::getInstance() && tool != LLToolSelectLand::getInstance()); | ||
821 | mPanelLandInfo->setVisible(show_more && (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance())); | ||
822 | } | 814 | } |
823 | 815 | ||
824 | 816 | ||
@@ -873,46 +865,12 @@ void LLFloaterTools::onClose(bool app_quitting) | |||
873 | // gMenuBarView->arrange(); | 865 | // gMenuBarView->arrange(); |
874 | } | 866 | } |
875 | 867 | ||
876 | void LLFloaterTools::showMore(BOOL show_more) | ||
877 | { | ||
878 | BOOL showing_more = gSavedSettings.getBOOL("ToolboxShowMore"); | ||
879 | if (show_more == showing_more) | ||
880 | { | ||
881 | return; | ||
882 | } | ||
883 | |||
884 | gSavedSettings.setBOOL("ToolboxShowMore", show_more); | ||
885 | |||
886 | // Visibility updated next frame - JC | ||
887 | // mTab->setVisible(show_more); | ||
888 | |||
889 | if (show_more) | ||
890 | { | ||
891 | reshape( getRect().getWidth(), mLargeHeight, TRUE); | ||
892 | translate( 0, mSmallHeight - mLargeHeight ); | ||
893 | } | ||
894 | else | ||
895 | { | ||
896 | reshape( getRect().getWidth(), mSmallHeight, TRUE); | ||
897 | translate( 0, mLargeHeight - mSmallHeight ); | ||
898 | } | ||
899 | childSetVisible("button less", show_more); | ||
900 | childSetVisible("button more", !show_more); | ||
901 | } | ||
902 | |||
903 | void LLFloaterTools::showPanel(EInfoPanel panel) | 868 | void LLFloaterTools::showPanel(EInfoPanel panel) |
904 | { | 869 | { |
905 | llassert(panel >= 0 && panel < PANEL_COUNT); | 870 | llassert(panel >= 0 && panel < PANEL_COUNT); |
906 | mTab->selectTabByName(PANEL_NAMES[panel]); | 871 | mTab->selectTabByName(PANEL_NAMES[panel]); |
907 | } | 872 | } |
908 | 873 | ||
909 | void click_show_more(void *userdata) | ||
910 | { | ||
911 | LLFloaterTools *f = (LLFloaterTools *)userdata; | ||
912 | BOOL show_more = !gSavedSettings.getBOOL("ToolboxShowMore"); | ||
913 | f->showMore( show_more ); | ||
914 | } | ||
915 | |||
916 | void click_popup_info(void*) | 874 | void click_popup_info(void*) |
917 | { | 875 | { |
918 | // gBuildView->setPropertiesPanelOpen(TRUE); | 876 | // gBuildView->setPropertiesPanelOpen(TRUE); |
@@ -997,8 +955,8 @@ void click_popup_dozer_mode(LLUICtrl *, void *user) | |||
997 | 955 | ||
998 | void commit_slider_dozer_size(LLUICtrl *ctrl, void*) | 956 | void commit_slider_dozer_size(LLUICtrl *ctrl, void*) |
999 | { | 957 | { |
1000 | S32 size = (S32)ctrl->getValue().asInteger(); | 958 | F32 size = (F32)ctrl->getValue().asReal(); |
1001 | gSavedSettings.setS32("LandBrushSize", size); | 959 | gSavedSettings.setF32("LandBrushSize", size); |
1002 | } | 960 | } |
1003 | 961 | ||
1004 | void commit_slider_dozer_force(LLUICtrl *ctrl, void*) | 962 | void commit_slider_dozer_force(LLUICtrl *ctrl, void*) |
@@ -1086,15 +1044,15 @@ void LLFloaterTools::onFocusReceived() | |||
1086 | 1044 | ||
1087 | void LLFloaterTools::updateTreeGrassCombo(bool visible) | 1045 | void LLFloaterTools::updateTreeGrassCombo(bool visible) |
1088 | { | 1046 | { |
1047 | LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label"); | ||
1089 | if (visible) | 1048 | if (visible) |
1090 | { | 1049 | { |
1091 | LLPCode pcode = LLToolPlacer::getObjectType(); | 1050 | LLPCode pcode = LLToolPlacer::getObjectType(); |
1092 | std::map<std::string, S32>::iterator it, end; | 1051 | std::map<std::string, S32>::iterator it, end; |
1093 | std::string selected; | 1052 | std::string selected; |
1094 | LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label"); | ||
1095 | if (pcode == LLToolPlacerPanel::sTree) | 1053 | if (pcode == LLToolPlacerPanel::sTree) |
1096 | { | 1054 | { |
1097 | tree_grass_label->setVisible(true); | 1055 | tree_grass_label->setVisible(visible); |
1098 | LLButton* button = getChild<LLButton>("ToolTree"); | 1056 | LLButton* button = getChild<LLButton>("ToolTree"); |
1099 | tree_grass_label->setText(button->getToolTip()); | 1057 | tree_grass_label->setText(button->getToolTip()); |
1100 | 1058 | ||
@@ -1104,7 +1062,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible) | |||
1104 | } | 1062 | } |
1105 | else if (pcode == LLToolPlacerPanel::sGrass) | 1063 | else if (pcode == LLToolPlacerPanel::sGrass) |
1106 | { | 1064 | { |
1107 | tree_grass_label->setVisible(true); | 1065 | tree_grass_label->setVisible(visible); |
1108 | LLButton* button = getChild<LLButton>("ToolGrass"); | 1066 | LLButton* button = getChild<LLButton>("ToolGrass"); |
1109 | tree_grass_label->setText(button->getToolTip()); | 1067 | tree_grass_label->setText(button->getToolTip()); |
1110 | 1068 | ||
@@ -1140,6 +1098,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible) | |||
1140 | } | 1098 | } |
1141 | 1099 | ||
1142 | mComboTreesGrass->setVisible(visible); | 1100 | mComboTreesGrass->setVisible(visible); |
1101 | tree_grass_label->setVisible(visible); | ||
1143 | } | 1102 | } |
1144 | 1103 | ||
1145 | // static | 1104 | // static |
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h index 8f88977..1b13b9f 100644 --- a/linden/indra/newview/llfloatertools.h +++ b/linden/indra/newview/llfloatertools.h | |||
@@ -95,14 +95,12 @@ public: | |||
95 | /*virtual*/ void draw(); | 95 | /*virtual*/ void draw(); |
96 | 96 | ||
97 | void dirty(); | 97 | void dirty(); |
98 | void showMore(BOOL show_more); | ||
99 | void showPanel(EInfoPanel panel); | 98 | void showPanel(EInfoPanel panel); |
100 | 99 | ||
101 | void setStatusText(const std::string& text); | 100 | void setStatusText(const std::string& text); |
102 | virtual void onFocusReceived(); | 101 | virtual void onFocusReceived(); |
103 | static void setEditTool(void* data); | 102 | static void setEditTool(void* data); |
104 | void saveLastTool(); | 103 | void saveLastTool(); |
105 | |||
106 | private: | 104 | private: |
107 | static void setObjectType( void* data ); | 105 | static void setObjectType( void* data ); |
108 | 106 | ||
@@ -198,8 +196,6 @@ public: | |||
198 | 196 | ||
199 | private: | 197 | private: |
200 | BOOL mDirty; | 198 | BOOL mDirty; |
201 | S32 mSmallHeight; | ||
202 | S32 mLargeHeight; | ||
203 | 199 | ||
204 | std::map<std::string, std::string> mStatusText; | 200 | std::map<std::string, std::string> mStatusText; |
205 | 201 | ||
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp index 37cd4ef..9936f3b 100644 --- a/linden/indra/newview/llfloaterwindlight.cpp +++ b/linden/indra/newview/llfloaterwindlight.cpp | |||
@@ -60,6 +60,7 @@ | |||
60 | 60 | ||
61 | #undef max | 61 | #undef max |
62 | 62 | ||
63 | |||
63 | LLFloaterWindLight* LLFloaterWindLight::sWindLight = NULL; | 64 | LLFloaterWindLight* LLFloaterWindLight::sWindLight = NULL; |
64 | 65 | ||
65 | std::set<std::string> LLFloaterWindLight::sDefaultPresets; | 66 | std::set<std::string> LLFloaterWindLight::sDefaultPresets; |
@@ -227,6 +228,10 @@ void LLFloaterWindLight::initCallbacks(void) { | |||
227 | // Dome | 228 | // Dome |
228 | childSetCommitCallback("WLGamma", onFloatControlMoved, ¶m_mgr->mWLGamma); | 229 | childSetCommitCallback("WLGamma", onFloatControlMoved, ¶m_mgr->mWLGamma); |
229 | childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL); | 230 | childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL); |
231 | |||
232 | // next/prev buttons | ||
233 | childSetAction("next", onClickNext, this); | ||
234 | childSetAction("prev", onClickPrev, this); | ||
230 | } | 235 | } |
231 | 236 | ||
232 | void LLFloaterWindLight::onClickHelp(void* data) | 237 | void LLFloaterWindLight::onClickHelp(void* data) |
@@ -317,6 +322,15 @@ void LLFloaterWindLight::syncMenu() | |||
317 | LLWLParamSet& currentParams = param_mgr->mCurParams; | 322 | LLWLParamSet& currentParams = param_mgr->mCurParams; |
318 | //std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues; | 323 | //std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues; |
319 | 324 | ||
325 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
326 | // Fixes LL "bug" (preset name isn't kept synchronized) | ||
327 | LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo"); | ||
328 | if (comboBox->getSelectedItemLabel() != currentParams.mName) | ||
329 | { | ||
330 | comboBox->setSimple(currentParams.mName); | ||
331 | } | ||
332 | // [/RLVa:KB] | ||
333 | |||
320 | // blue horizon | 334 | // blue horizon |
321 | param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err); | 335 | param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err); |
322 | childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / 2.0); | 336 | childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / 2.0); |
@@ -992,3 +1006,51 @@ void LLFloaterWindLight::deactivateAnimator() | |||
992 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | 1006 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; |
993 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | 1007 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; |
994 | } | 1008 | } |
1009 | |||
1010 | void LLFloaterWindLight::onClickNext(void* user_data) | ||
1011 | { | ||
1012 | LLWLParamManager * param_mgr = LLWLParamManager::instance(); | ||
1013 | LLWLParamSet& currentParams = param_mgr->mCurParams; | ||
1014 | |||
1015 | // find place of current param | ||
1016 | std::map<std::string, LLWLParamSet>::iterator mIt = | ||
1017 | param_mgr->mParamList.find(currentParams.mName); | ||
1018 | |||
1019 | // if at the end, loop | ||
1020 | std::map<std::string, LLWLParamSet>::iterator last = param_mgr->mParamList.end(); --last; | ||
1021 | if(mIt == last) | ||
1022 | { | ||
1023 | mIt = param_mgr->mParamList.begin(); | ||
1024 | } | ||
1025 | else | ||
1026 | { | ||
1027 | mIt++; | ||
1028 | } | ||
1029 | param_mgr->mAnimator.mIsRunning = false; | ||
1030 | param_mgr->mAnimator.mUseLindenTime = false; | ||
1031 | param_mgr->loadPreset(mIt->first, true); | ||
1032 | } | ||
1033 | |||
1034 | void LLFloaterWindLight::onClickPrev(void* user_data) | ||
1035 | { | ||
1036 | LLWLParamManager * param_mgr = LLWLParamManager::instance(); | ||
1037 | LLWLParamSet& currentParams = param_mgr->mCurParams; | ||
1038 | |||
1039 | // find place of current param | ||
1040 | std::map<std::string, LLWLParamSet>::iterator mIt = | ||
1041 | param_mgr->mParamList.find(currentParams.mName); | ||
1042 | |||
1043 | // if at the beginning, loop | ||
1044 | if(mIt == param_mgr->mParamList.begin()) | ||
1045 | { | ||
1046 | std::map<std::string, LLWLParamSet>::iterator last = param_mgr->mParamList.end(); --last; | ||
1047 | mIt = last; | ||
1048 | } | ||
1049 | else | ||
1050 | { | ||
1051 | mIt--; | ||
1052 | } | ||
1053 | param_mgr->mAnimator.mIsRunning = false; | ||
1054 | param_mgr->mAnimator.mUseLindenTime = false; | ||
1055 | param_mgr->loadPreset(mIt->first, true); | ||
1056 | } | ||
diff --git a/linden/indra/newview/llfloaterwindlight.h b/linden/indra/newview/llfloaterwindlight.h index 3e5556b..70e76c5 100644 --- a/linden/indra/newview/llfloaterwindlight.h +++ b/linden/indra/newview/llfloaterwindlight.h | |||
@@ -136,6 +136,9 @@ private: | |||
136 | static LLFloaterWindLight* sWindLight; | 136 | static LLFloaterWindLight* sWindLight; |
137 | 137 | ||
138 | static std::set<std::string> sDefaultPresets; | 138 | static std::set<std::string> sDefaultPresets; |
139 | |||
140 | static void onClickNext(void* user_data); | ||
141 | static void onClickPrev(void* user_data); | ||
139 | }; | 142 | }; |
140 | 143 | ||
141 | 144 | ||
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index bc61d8a..a31dde5 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp | |||
@@ -280,6 +280,13 @@ void LLFloaterWorldMap::onClose(bool app_quitting) | |||
280 | // static | 280 | // static |
281 | void LLFloaterWorldMap::show(void*, BOOL center_on_target) | 281 | void LLFloaterWorldMap::show(void*, BOOL center_on_target) |
282 | { | 282 | { |
283 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
284 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP)) | ||
285 | { | ||
286 | return; | ||
287 | } | ||
288 | // [/RLVa:KB] | ||
289 | |||
283 | BOOL was_visible = gFloaterWorldMap->getVisible(); | 290 | BOOL was_visible = gFloaterWorldMap->getVisible(); |
284 | 291 | ||
285 | gFloaterWorldMap->mIsClosing = FALSE; | 292 | gFloaterWorldMap->mIsClosing = FALSE; |
@@ -641,7 +648,10 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) | |||
641 | F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); | 648 | F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); |
642 | F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); | 649 | F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); |
643 | std::string full_name = llformat("%s (%d, %d, %d)", | 650 | std::string full_name = llformat("%s (%d, %d, %d)", |
644 | sim_name.c_str(), | 651 | // sim_name.c_str(), |
652 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a) | ||
653 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? sim_name.c_str() : rlv_handler_t::cstrHiddenRegion.c_str(), | ||
654 | // [/RLVa:KB] | ||
645 | llround(region_x), | 655 | llround(region_x), |
646 | llround(region_y), | 656 | llround(region_y), |
647 | llround((F32)pos_global.mdV[VZ])); | 657 | llround((F32)pos_global.mdV[VZ])); |
@@ -695,6 +705,14 @@ void LLFloaterWorldMap::updateLocation() | |||
695 | 705 | ||
696 | // Set the current SLURL | 706 | // Set the current SLURL |
697 | mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); | 707 | mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); |
708 | |||
709 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
710 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
711 | { | ||
712 | childSetValue("location", rlv_handler_t::cstrHiddenRegion); | ||
713 | mSLURL.clear(); | ||
714 | } | ||
715 | // [/RLVa:KB] | ||
698 | } | 716 | } |
699 | } | 717 | } |
700 | 718 | ||
@@ -737,6 +755,14 @@ void LLFloaterWorldMap::updateLocation() | |||
737 | { // Empty SLURL will disable the "Copy SLURL to clipboard" button | 755 | { // Empty SLURL will disable the "Copy SLURL to clipboard" button |
738 | mSLURL = ""; | 756 | mSLURL = ""; |
739 | } | 757 | } |
758 | |||
759 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
760 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
761 | { | ||
762 | childSetValue("location", rlv_handler_t::cstrHiddenRegion); | ||
763 | mSLURL.clear(); | ||
764 | } | ||
765 | // [/RLVa:KB] | ||
740 | } | 766 | } |
741 | } | 767 | } |
742 | 768 | ||
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index 70c4ead..5407f06 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp | |||
@@ -281,7 +281,28 @@ void LLFolderViewItem::refreshFromListener() | |||
281 | { | 281 | { |
282 | if(mListener) | 282 | if(mListener) |
283 | { | 283 | { |
284 | //Super crazy hack to build the creator search label - RK | ||
285 | LLInventoryItem* item = gInventory.getItem(mListener->getUUID()); | ||
286 | std::string creator_name; | ||
287 | if(item) | ||
288 | { | ||
289 | if(item->getCreatorUUID().notNull()) | ||
290 | { | ||
291 | gCacheName->getFullName(item->getCreatorUUID(), creator_name); | ||
292 | } | ||
293 | } | ||
294 | mLabelCreator = creator_name; | ||
295 | /*if(creator_name == "(Loading...)") | ||
296 | mLabelCreator = ""; | ||
297 | else | ||
298 | mLabelCreator = creator_name;*/ | ||
299 | |||
300 | //Label for name search | ||
284 | mLabel = mListener->getDisplayName(); | 301 | mLabel = mListener->getDisplayName(); |
302 | |||
303 | //Build label for combined search - RK | ||
304 | mLabelAll = mLabel + " " + mLabelCreator; | ||
305 | |||
285 | setIcon(mListener->getIcon()); | 306 | setIcon(mListener->getIcon()); |
286 | time_t creation_date = mListener->getCreationDate(); | 307 | time_t creation_date = mListener->getCreationDate(); |
287 | if (mCreationDate != creation_date) | 308 | if (mCreationDate != creation_date) |
@@ -299,12 +320,26 @@ void LLFolderViewItem::refresh() | |||
299 | refreshFromListener(); | 320 | refreshFromListener(); |
300 | 321 | ||
301 | std::string searchable_label(mLabel); | 322 | std::string searchable_label(mLabel); |
323 | std::string searchable_label_creator(mLabelCreator); | ||
324 | std::string searchable_label_all(mLabelAll); | ||
325 | |||
326 | //add the (no modify), (no transfer) etc stuff to each label. | ||
302 | searchable_label.append(mLabelSuffix); | 327 | searchable_label.append(mLabelSuffix); |
328 | searchable_label_creator.append(mLabelSuffix); | ||
329 | searchable_label_all.append(mLabelSuffix); | ||
330 | |||
331 | //all labels need to be uppercase. | ||
303 | LLStringUtil::toUpper(searchable_label); | 332 | LLStringUtil::toUpper(searchable_label); |
333 | LLStringUtil::toUpper(searchable_label_creator); | ||
334 | LLStringUtil::toUpper(searchable_label_all); | ||
304 | 335 | ||
305 | if (mSearchableLabel.compare(searchable_label)) | 336 | if (mSearchableLabel.compare(searchable_label) || |
337 | mSearchableLabelCreator.compare(searchable_label_creator)) | ||
306 | { | 338 | { |
307 | mSearchableLabel.assign(searchable_label); | 339 | mSearchableLabel.assign(searchable_label); |
340 | mSearchableLabelCreator.assign(searchable_label_creator); | ||
341 | mSearchableLabelAll.assign(searchable_label_all); | ||
342 | |||
308 | dirtyFilter(); | 343 | dirtyFilter(); |
309 | // some part of label has changed, so overall width has potentially changed | 344 | // some part of label has changed, so overall width has potentially changed |
310 | if (mParentFolder) | 345 | if (mParentFolder) |
@@ -588,7 +623,13 @@ void LLFolderViewItem::rename(const std::string& new_name) | |||
588 | 623 | ||
589 | const std::string& LLFolderViewItem::getSearchableLabel() const | 624 | const std::string& LLFolderViewItem::getSearchableLabel() const |
590 | { | 625 | { |
591 | return mSearchableLabel; | 626 | U32 search_type = gSavedSettings.getU32("InventorySearchType"); |
627 | if(search_type == 4) | ||
628 | return mSearchableLabelAll; | ||
629 | else if(search_type == 1) | ||
630 | return mSearchableLabelCreator; | ||
631 | else | ||
632 | return mSearchableLabel; | ||
592 | } | 633 | } |
593 | 634 | ||
594 | const std::string& LLFolderViewItem::getName( void ) const | 635 | const std::string& LLFolderViewItem::getName( void ) const |
diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index 3c350d4..25b4362 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h | |||
@@ -338,6 +338,11 @@ protected: | |||
338 | 338 | ||
339 | std::string mLabel; | 339 | std::string mLabel; |
340 | std::string mSearchableLabel; | 340 | std::string mSearchableLabel; |
341 | std::string mLabelAll; | ||
342 | std::string mSearchableLabelAll; | ||
343 | std::string mLabelCreator; | ||
344 | std::string mSearchableLabelCreator; | ||
345 | |||
341 | std::string mType; | 346 | std::string mType; |
342 | S32 mLabelWidth; | 347 | S32 mLabelWidth; |
343 | U32 mCreationDate; | 348 | U32 mCreationDate; |
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 2b51948..296cdaa 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp | |||
@@ -166,6 +166,13 @@ extern BOOL gDebugSelect; | |||
166 | // Returns true if you got at least one object | 166 | // Returns true if you got at least one object |
167 | void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) | 167 | void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) |
168 | { | 168 | { |
169 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
170 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
171 | { | ||
172 | return; | ||
173 | } | ||
174 | // [/RLVa:KB] | ||
175 | |||
169 | LLVector3 av_pos = gAgent.getPositionAgent(); | 176 | LLVector3 av_pos = gAgent.getPositionAgent(); |
170 | F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance"); | 177 | F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance"); |
171 | select_dist_squared = select_dist_squared * select_dist_squared; | 178 | select_dist_squared = select_dist_squared * select_dist_squared; |
@@ -230,6 +237,27 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) | |||
230 | LLViewerCamera::getInstance()->setFar(new_far); | 237 | LLViewerCamera::getInstance()->setFar(new_far); |
231 | LLViewerCamera::getInstance()->setNear(new_near); | 238 | LLViewerCamera::getInstance()->setNear(new_near); |
232 | } | 239 | } |
240 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
241 | if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) | ||
242 | { | ||
243 | // We'll allow drag selection under fartouch, but only within the fartouch range | ||
244 | // (just copy/paste the code above us to make that work, thank you Lindens!) | ||
245 | LLVector3 relative_av_pos = av_pos; | ||
246 | relative_av_pos -= LLViewerCamera::getInstance()->getOrigin(); | ||
247 | |||
248 | F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f; | ||
249 | F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f; | ||
250 | |||
251 | new_near = llmax(new_near, 0.1f); | ||
252 | |||
253 | LLViewerCamera::getInstance()->setFar(new_far); | ||
254 | LLViewerCamera::getInstance()->setNear(new_near); | ||
255 | |||
256 | // Usurp these two | ||
257 | limit_select_distance = TRUE; | ||
258 | select_dist_squared = 1.5f * 1.5f; | ||
259 | } | ||
260 | // [/RLVa:KB] | ||
233 | LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, | 261 | LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, |
234 | center_x-width/2, center_y-height/2, width, height, | 262 | center_x-width/2, center_y-height/2, width, height, |
235 | limit_select_distance); | 263 | limit_select_distance); |
diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index 37897eb..2f8e838 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp | |||
@@ -220,8 +220,8 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, | |||
220 | static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig")); | 220 | static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig")); |
221 | static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif")); | 221 | static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif")); |
222 | 222 | ||
223 | text->appendStyledText(subject,false,false,&headerstyle); | 223 | text->appendStyledText(subject,false,false,headerstyle); |
224 | text->appendStyledText(time_buf,false,false,&datestyle); | 224 | text->appendStyledText(time_buf,false,false,datestyle); |
225 | // Sadly, our LLTextEditor can't handle both styled and unstyled text | 225 | // Sadly, our LLTextEditor can't handle both styled and unstyled text |
226 | // at the same time. Hence this space must be styled. JC | 226 | // at the same time. Hence this space must be styled. JC |
227 | text->appendColoredText(std::string(" "),false,false,LLColor4::grey4); | 227 | text->appendColoredText(std::string(" "),false,false,LLColor4::grey4); |
diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index 8d033b2..e40ae10 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp | |||
@@ -244,14 +244,25 @@ void LLHoverView::updateText() | |||
244 | LLNameValue* lastname = hit_object->getNVPair("LastName"); | 244 | LLNameValue* lastname = hit_object->getNVPair("LastName"); |
245 | if (firstname && lastname) | 245 | if (firstname && lastname) |
246 | { | 246 | { |
247 | if (title) | 247 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) |
248 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
248 | { | 249 | { |
249 | line.append(title->getString()); | 250 | line = gRlvHandler.getAnonym(line.append(firstname->getString()).append(1, ' ').append(lastname->getString())); |
251 | } | ||
252 | else | ||
253 | { | ||
254 | // [/RLVa:KB] | ||
255 | if (title) | ||
256 | { | ||
257 | line.append(title->getString()); | ||
258 | line.append(1, ' '); | ||
259 | } | ||
260 | line.append(firstname->getString()); | ||
250 | line.append(1, ' '); | 261 | line.append(1, ' '); |
262 | line.append(lastname->getString()); | ||
263 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
251 | } | 264 | } |
252 | line.append(firstname->getString()); | 265 | // [/RLVa:KB] |
253 | line.append(1, ' '); | ||
254 | line.append(lastname->getString()); | ||
255 | } | 266 | } |
256 | else | 267 | else |
257 | { | 268 | { |
@@ -307,6 +318,13 @@ void LLHoverView::updateText() | |||
307 | } | 318 | } |
308 | else if(gCacheName->getFullName(owner, name)) | 319 | else if(gCacheName->getFullName(owner, name)) |
309 | { | 320 | { |
321 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
322 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
323 | { | ||
324 | name = gRlvHandler.getAnonym(name); | ||
325 | } | ||
326 | // [/RLVa:KB] | ||
327 | |||
310 | line.append(name); | 328 | line.append(name); |
311 | } | 329 | } |
312 | else | 330 | else |
@@ -468,7 +486,10 @@ void LLHoverView::updateText() | |||
468 | line.append(LLTrans::getString("TooltipLand")); | 486 | line.append(LLTrans::getString("TooltipLand")); |
469 | if (hover_parcel) | 487 | if (hover_parcel) |
470 | { | 488 | { |
471 | line.append(hover_parcel->getName()); | 489 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-0.2.0b |
490 | line.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? hover_parcel->getName() : rlv_handler_t::cstrHiddenParcel ); | ||
491 | // [/RLVa:KB] | ||
492 | //line.append(hover_parcel->getName()); | ||
472 | } | 493 | } |
473 | mText.push_back(line); | 494 | mText.push_back(line); |
474 | 495 | ||
@@ -497,7 +518,10 @@ void LLHoverView::updateText() | |||
497 | } | 518 | } |
498 | else if(gCacheName->getFullName(owner, name)) | 519 | else if(gCacheName->getFullName(owner, name)) |
499 | { | 520 | { |
500 | line.append(name); | 521 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b |
522 | line.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? name : gRlvHandler.getAnonym(name)); | ||
523 | // [/RLVa:KB] | ||
524 | //line.append(name); | ||
501 | } | 525 | } |
502 | else | 526 | else |
503 | { | 527 | { |
diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index 32323dc..ac48c6b 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp | |||
@@ -565,6 +565,30 @@ void LLHUDText::renderText(BOOL for_select) | |||
565 | 565 | ||
566 | void LLHUDText::setStringUTF8(const std::string &wtext) | 566 | void LLHUDText::setStringUTF8(const std::string &wtext) |
567 | { | 567 | { |
568 | // [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | ||
569 | // NOTE: setString() is only called for debug beacons and the floating name tags (which we don't want to censor | ||
570 | // because you'd see "(Region hidden) LastName" if you happen to go to a sim who's name is your first name :p | ||
571 | if (rlv_handler_t::isEnabled()) | ||
572 | { | ||
573 | std::string text(wtext); | ||
574 | |||
575 | if (gRlvHandler.canShowHoverText(mSourceObject)) | ||
576 | { | ||
577 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
578 | gRlvHandler.filterLocation(text); | ||
579 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
580 | gRlvHandler.filterNames(text); | ||
581 | } | ||
582 | else | ||
583 | { | ||
584 | text = ""; | ||
585 | } | ||
586 | |||
587 | setString(utf8str_to_wstring(text)); | ||
588 | return; | ||
589 | } | ||
590 | // [/RLVa:KB] | ||
591 | |||
568 | setString(utf8str_to_wstring(wtext)); | 592 | setString(utf8str_to_wstring(wtext)); |
569 | } | 593 | } |
570 | 594 | ||
@@ -1147,3 +1171,18 @@ F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font) | |||
1147 | return width; | 1171 | return width; |
1148 | } | 1172 | } |
1149 | } | 1173 | } |
1174 | |||
1175 | // [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
1176 | void LLHUDText::refreshAllObjectText() | ||
1177 | { | ||
1178 | for (TextObjectIterator itText = sTextObjects.begin(); itText != sTextObjects.end(); itText++) | ||
1179 | { | ||
1180 | LLHUDText* pText = *itText; | ||
1181 | if ( (pText) && (!pText->mObjText.empty() && ("" != pText->mObjText) ) && | ||
1182 | (pText->mSourceObject) && (LL_PCODE_VOLUME == pText->mSourceObject->getPCode()) ) | ||
1183 | { | ||
1184 | pText->setStringUTF8(pText->mObjText); | ||
1185 | } | ||
1186 | } | ||
1187 | } | ||
1188 | // [/RLVa:KB] | ||
diff --git a/linden/indra/newview/llhudtext.h b/linden/indra/newview/llhudtext.h index 6e29d9d..c68a975 100644 --- a/linden/indra/newview/llhudtext.h +++ b/linden/indra/newview/llhudtext.h | |||
@@ -130,6 +130,11 @@ public: | |||
130 | static void addPickable(std::set<LLViewerObject*> &pick_list); | 130 | static void addPickable(std::set<LLViewerObject*> &pick_list); |
131 | static void reshape(); | 131 | static void reshape(); |
132 | static void setDisplayText(BOOL flag) { sDisplayText = flag ; } | 132 | static void setDisplayText(BOOL flag) { sDisplayText = flag ; } |
133 | // [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
134 | const std::string& getObjectText() const { return mObjText; } | ||
135 | void setObjectText(const std::string &utf8string) { mObjText = utf8string; } | ||
136 | static void refreshAllObjectText(); | ||
137 | // [/RLVa:KB] | ||
133 | protected: | 138 | protected: |
134 | LLHUDText(const U8 type); | 139 | LLHUDText(const U8 type); |
135 | 140 | ||
@@ -175,6 +180,9 @@ private: | |||
175 | EVertAlignment mVertAlignment; | 180 | EVertAlignment mVertAlignment; |
176 | S32 mLOD; | 181 | S32 mLOD; |
177 | BOOL mHidden; | 182 | BOOL mHidden; |
183 | // [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
184 | std::string mObjText; | ||
185 | // [/RLVa:KB] | ||
178 | 186 | ||
179 | static BOOL sDisplayText ; | 187 | static BOOL sDisplayText ; |
180 | static std::set<LLPointer<LLHUDText> > sTextObjects; | 188 | static std::set<LLPointer<LLHUDText> > sTextObjects; |
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index f30ae8c..014c050 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -1543,8 +1543,8 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 | |||
1543 | else | 1543 | else |
1544 | { | 1544 | { |
1545 | // Convert the name to a hotlink and add to message. | 1545 | // Convert the name to a hotlink and add to message. |
1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookup(source); | 1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source); |
1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,&source_style); | 1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,source_style); |
1548 | } | 1548 | } |
1549 | prepend_newline = false; | 1549 | prepend_newline = false; |
1550 | } | 1550 | } |
@@ -2009,6 +2009,42 @@ void LLFloaterIMPanel::sendMsg() | |||
2009 | std::string utf8_text = wstring_to_utf8str(text); | 2009 | std::string utf8_text = wstring_to_utf8str(text); |
2010 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); | 2010 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); |
2011 | 2011 | ||
2012 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | ||
2013 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) | ||
2014 | { | ||
2015 | if (IM_NOTHING_SPECIAL == mDialog) // One-on-one IM: allow if recipient is a sendim exception | ||
2016 | { | ||
2017 | if (!gRlvHandler.isException(RLV_BHVR_SENDIM, mOtherParticipantUUID)) | ||
2018 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2019 | } | ||
2020 | else if (gAgent.isInGroup(mSessionUUID)) // Group chat: allow if recipient is a sendim exception | ||
2021 | { | ||
2022 | if (!gRlvHandler.isException(RLV_BHVR_SENDIM, mSessionUUID)) | ||
2023 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2024 | } | ||
2025 | else if (mSpeakers) // Conference chat: allow if all participants are sendim exceptions | ||
2026 | { | ||
2027 | LLSpeakerMgr::speaker_list_t speakers; | ||
2028 | mSpeakers->getSpeakerList(&speakers, TRUE); | ||
2029 | |||
2030 | for (LLSpeakerMgr::speaker_list_t::const_iterator itSpeaker = speakers.begin(); | ||
2031 | itSpeaker != speakers.end(); ++itSpeaker) | ||
2032 | { | ||
2033 | LLSpeaker* pSpeaker = *itSpeaker; | ||
2034 | if ( (gAgent.getID() != pSpeaker->mID) && (!gRlvHandler.isException(RLV_BHVR_SENDIM, pSpeaker->mID)) ) | ||
2035 | { | ||
2036 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2037 | break; | ||
2038 | } | ||
2039 | } | ||
2040 | } | ||
2041 | else // Catch all fall-through | ||
2042 | { | ||
2043 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2044 | } | ||
2045 | } | ||
2046 | // [/RLVa:KB] | ||
2047 | |||
2012 | if ( mSessionInitialized ) | 2048 | if ( mSessionInitialized ) |
2013 | { | 2049 | { |
2014 | deliver_message(utf8_text, | 2050 | deliver_message(utf8_text, |
diff --git a/linden/indra/newview/llimview.cpp b/linden/indra/newview/llimview.cpp index 1072b21..20de43e 100644 --- a/linden/indra/newview/llimview.cpp +++ b/linden/indra/newview/llimview.cpp | |||
@@ -1550,6 +1550,19 @@ public: | |||
1550 | { | 1550 | { |
1551 | return; | 1551 | return; |
1552 | } | 1552 | } |
1553 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
1554 | // TODO-RLVa: duplicate from process_improved_im()? | ||
1555 | if (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) | ||
1556 | { | ||
1557 | if (gAgent.isInGroup(session_id)) | ||
1558 | { | ||
1559 | if (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id)) | ||
1560 | return; | ||
1561 | } | ||
1562 | else if (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) | ||
1563 | message = message.substr(0, message_offset) + rlv_handler_t::cstrBlockedRecvIM; | ||
1564 | } | ||
1565 | // [/RLVa:KB] | ||
1553 | 1566 | ||
1554 | // standard message, not from system | 1567 | // standard message, not from system |
1555 | std::string saved; | 1568 | std::string saved; |
diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp index 0bf3ab2..b598c83 100644 --- a/linden/indra/newview/llinventoryactions.cpp +++ b/linden/indra/newview/llinventoryactions.cpp | |||
@@ -85,6 +85,9 @@ | |||
85 | #include "lluictrlfactory.h" | 85 | #include "lluictrlfactory.h" |
86 | #include "llselectmgr.h" | 86 | #include "llselectmgr.h" |
87 | 87 | ||
88 | // Defined in llinventorybridge.cpp | ||
89 | void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove); | ||
90 | |||
88 | const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) | 91 | const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) |
89 | const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) | 92 | const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) |
90 | const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) | 93 | const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) |
@@ -115,6 +118,12 @@ bool doToSelected(LLFolderView* folder, std::string action) | |||
115 | std::set<LLUUID> selected_items; | 118 | std::set<LLUUID> selected_items; |
116 | folder->getSelectionList(selected_items); | 119 | folder->getSelectionList(selected_items); |
117 | 120 | ||
121 | if ( ("attach" == action) && (selected_items.size() > 1) ) | ||
122 | { | ||
123 | wear_attachments_on_avatar(selected_items, FALSE); | ||
124 | return true; | ||
125 | } | ||
126 | |||
118 | LLMultiPreview* multi_previewp = NULL; | 127 | LLMultiPreview* multi_previewp = NULL; |
119 | LLMultiProperties* multi_propertiesp = NULL; | 128 | LLMultiProperties* multi_propertiesp = NULL; |
120 | 129 | ||
@@ -464,6 +473,40 @@ class LLDoCreateFloater : public inventory_listener_t | |||
464 | } | 473 | } |
465 | }; | 474 | }; |
466 | 475 | ||
476 | //Handles the search type buttons | ||
477 | class SetSearchType : public inventory_listener_t | ||
478 | { | ||
479 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
480 | { | ||
481 | std::string search_type = userdata.asString(); | ||
482 | if(search_type == "name") | ||
483 | { | ||
484 | gSavedSettings.setU32("InventorySearchType", 0); | ||
485 | |||
486 | mPtr->getControl("Inventory.SearchByName")->setValue(TRUE); | ||
487 | mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); | ||
488 | mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE); | ||
489 | } | ||
490 | else if(search_type == "creator") | ||
491 | { | ||
492 | gSavedSettings.setU32("InventorySearchType", 1); | ||
493 | |||
494 | mPtr->getControl("Inventory.SearchByName")->setValue(FALSE); | ||
495 | mPtr->getControl("Inventory.SearchByCreator")->setValue(TRUE); | ||
496 | mPtr->getControl("Inventory.SearchByAll")->setValue(FALSE); | ||
497 | } | ||
498 | else if(search_type == "all") | ||
499 | { | ||
500 | gSavedSettings.setU32("InventorySearchType", 4); | ||
501 | |||
502 | mPtr->getControl("Inventory.SearchByName")->setValue(FALSE); | ||
503 | mPtr->getControl("Inventory.SearchByCreator")->setValue(FALSE); | ||
504 | mPtr->getControl("Inventory.SearchByAll")->setValue(TRUE); | ||
505 | } | ||
506 | return true; | ||
507 | } | ||
508 | }; | ||
509 | |||
467 | class LLSetSortBy : public inventory_listener_t | 510 | class LLSetSortBy : public inventory_listener_t |
468 | { | 511 | { |
469 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 512 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -711,6 +754,8 @@ void init_inventory_actions(LLInventoryView *floater) | |||
711 | (new LLShowFilters())->registerListener(floater, "Inventory.ShowFilters"); | 754 | (new LLShowFilters())->registerListener(floater, "Inventory.ShowFilters"); |
712 | (new LLResetFilter())->registerListener(floater, "Inventory.ResetFilter"); | 755 | (new LLResetFilter())->registerListener(floater, "Inventory.ResetFilter"); |
713 | (new LLSetSortBy())->registerListener(floater, "Inventory.SetSortBy"); | 756 | (new LLSetSortBy())->registerListener(floater, "Inventory.SetSortBy"); |
757 | |||
758 | (new SetSearchType())->registerListener(floater, "Inventory.SetSearchBy"); | ||
714 | } | 759 | } |
715 | 760 | ||
716 | void init_inventory_panel_actions(LLInventoryPanel *panel) | 761 | void init_inventory_panel_actions(LLInventoryPanel *panel) |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 52b15cb..19a5ade 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -111,6 +111,8 @@ void remove_inventory_category_from_avatar(LLInventoryCategory* category); | |||
111 | void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata); | 111 | void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata); |
112 | void move_task_inventory_callback(S32 option, void* user_data); | 112 | void move_task_inventory_callback(S32 option, void* user_data); |
113 | void confirm_replace_attachment_rez(S32 option, void* user_data); | 113 | void confirm_replace_attachment_rez(S32 option, void* user_data); |
114 | void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove); | ||
115 | void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOOL remove); | ||
114 | 116 | ||
115 | std::string ICON_NAME[ICON_NAME_COUNT] = | 117 | std::string ICON_NAME[ICON_NAME_COUNT] = |
116 | { | 118 | { |
@@ -1921,6 +1923,12 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
1921 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); | 1923 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); |
1922 | LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); | 1924 | LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); |
1923 | 1925 | ||
1926 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
1927 | // Fixes LL bug | ||
1928 | mItems.clear(); | ||
1929 | mDisabledItems.clear(); | ||
1930 | // [/RLVa:KB] | ||
1931 | |||
1924 | if (lost_and_found_id == mUUID) | 1932 | if (lost_and_found_id == mUUID) |
1925 | { | 1933 | { |
1926 | // This is the lost+found folder. | 1934 | // This is the lost+found folder. |
@@ -2934,6 +2942,13 @@ void open_notecard(LLViewerInventoryItem* inv_item, | |||
2934 | const LLUUID& source_id, | 2942 | const LLUUID& source_id, |
2935 | BOOL take_focus) | 2943 | BOOL take_focus) |
2936 | { | 2944 | { |
2945 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2946 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour("viewnote")) ) | ||
2947 | { | ||
2948 | return; | ||
2949 | } | ||
2950 | // [/RLVa:KB] | ||
2951 | |||
2937 | // See if we can bring an existing preview to the front | 2952 | // See if we can bring an existing preview to the front |
2938 | if(!LLPreview::show(inv_item->getUUID(), take_focus)) | 2953 | if(!LLPreview::show(inv_item->getUUID(), take_focus)) |
2939 | { | 2954 | { |
@@ -3259,7 +3274,14 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model | |||
3259 | item = (LLViewerInventoryItem*)gInventory.getItem(object_id); | 3274 | item = (LLViewerInventoryItem*)gInventory.getItem(object_id); |
3260 | if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID())) | 3275 | if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID())) |
3261 | { | 3276 | { |
3262 | rez_attachment(item, NULL); | 3277 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
3278 | // User picked "Wear" so either nothing is locked, or we need to look up the specific attach point from its name | ||
3279 | // (NOTE: rez_attachment will take care of deciding whether or not we *can* attach) | ||
3280 | rez_attachment(item, | ||
3281 | ((!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment()) || (RlvSettings::getEnableWear())) | ||
3282 | ? NULL : gRlvHandler.getAttachPoint(item, true)); | ||
3283 | // [/RLVa:KB] | ||
3284 | // rez_attachment(item, NULL); | ||
3263 | } | 3285 | } |
3264 | else if(item && item->isComplete()) | 3286 | else if(item && item->isComplete()) |
3265 | { | 3287 | { |
@@ -3278,6 +3300,15 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model | |||
3278 | else if ("detach" == action) | 3300 | else if ("detach" == action) |
3279 | { | 3301 | { |
3280 | LLInventoryItem* item = gInventory.getItem(mUUID); | 3302 | LLInventoryItem* item = gInventory.getItem(mUUID); |
3303 | |||
3304 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
3305 | // Fall-through: if there's a "Detach from yourself" code path we missed then we'll still disallow the detach here | ||
3306 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(item)) ) | ||
3307 | { | ||
3308 | return; | ||
3309 | } | ||
3310 | // [/RLVa:KB] | ||
3311 | |||
3281 | if( item ) | 3312 | if( item ) |
3282 | { | 3313 | { |
3283 | gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); | 3314 | gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); |
@@ -3367,11 +3398,24 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach | |||
3367 | rez_action->mAttachPt = attach_pt; | 3398 | rez_action->mAttachPt = attach_pt; |
3368 | if (attachment && attachment->getObject()) | 3399 | if (attachment && attachment->getObject()) |
3369 | { | 3400 | { |
3370 | gViewerWindow->alertXml("ReplaceAttachment", confirm_replace_attachment_rez, (void*)rez_action); | 3401 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) |
3402 | if ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(attach_pt)) ) | ||
3403 | gViewerWindow->alertXml("ReplaceAttachment", confirm_replace_attachment_rez, (void*)rez_action); | ||
3404 | else | ||
3405 | delete rez_action; | ||
3406 | // [/RLVa] | ||
3407 | // gViewerWindow->alertXml("ReplaceAttachment", confirm_replace_attachment_rez, (void*)rez_action); | ||
3371 | } | 3408 | } |
3372 | else | 3409 | else |
3373 | { | 3410 | { |
3374 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); | 3411 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) |
3412 | // Don't allow wear to default attach point if there are any locked attachments | ||
3413 | if ( (!rlv_handler_t::isEnabled()) || (0 != attach_pt) || (!gRlvHandler.hasLockedAttachment()) || (RlvSettings::getEnableWear()) ) | ||
3414 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); | ||
3415 | else | ||
3416 | delete rez_action; | ||
3417 | // [/RLVa] | ||
3418 | // confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); | ||
3375 | } | 3419 | } |
3376 | } | 3420 | } |
3377 | 3421 | ||
@@ -3440,6 +3484,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3440 | if( avatarp->isWearingAttachment( mUUID ) ) | 3484 | if( avatarp->isWearingAttachment( mUUID ) ) |
3441 | { | 3485 | { |
3442 | items.push_back(std::string("Detach From Yourself")); | 3486 | items.push_back(std::string("Detach From Yourself")); |
3487 | |||
3488 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
3489 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(item)) ) | ||
3490 | disabled_items.push_back(std::string("Detach From Yourself")); | ||
3491 | // [/RLVa:KB] | ||
3443 | } | 3492 | } |
3444 | else | 3493 | else |
3445 | if( !isInTrash() ) | 3494 | if( !isInTrash() ) |
@@ -3451,6 +3500,16 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3451 | items.push_back(std::string("RestoreToWorld Separator")); | 3500 | items.push_back(std::string("RestoreToWorld Separator")); |
3452 | items.push_back(std::string("Restore to Last Position")); | 3501 | items.push_back(std::string("Restore to Last Position")); |
3453 | 3502 | ||
3503 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c | ||
3504 | // Only enable "Wear" if there is an attach point name *and* there isn't a worn attachment there that's currently locked | ||
3505 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment()) ) | ||
3506 | { | ||
3507 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); | ||
3508 | if ( (!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt->getObject())) ) | ||
3509 | disabled_items.push_back(std::string("Object Wear")); | ||
3510 | } | ||
3511 | // [/RLVa:KB] | ||
3512 | |||
3454 | LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); | 3513 | LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); |
3455 | LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE); | 3514 | LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE); |
3456 | LLVOAvatar *avatarp = gAgent.getAvatarObject(); | 3515 | LLVOAvatar *avatarp = gAgent.getAvatarObject(); |
@@ -3466,15 +3525,27 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3466 | LLMenuItemCallGL *new_item; | 3525 | LLMenuItemCallGL *new_item; |
3467 | if (attachment->getIsHUDAttachment()) | 3526 | if (attachment->getIsHUDAttachment()) |
3468 | { | 3527 | { |
3528 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
3469 | attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), | 3529 | attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), |
3470 | NULL, //&LLObjectBridge::attachToAvatar, | 3530 | NULL, //&LLObjectBridge::attachToAvatar, |
3471 | NULL, &attach_label, (void*)attachment)); | 3531 | (rlv_handler_t::isEnabled()) ? &rlvAttachToEnabler : NULL, |
3532 | &attach_label, (void*)attachment)); | ||
3533 | // [/RLVa:KB] | ||
3534 | //attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), | ||
3535 | // NULL, //&LLObjectBridge::attachToAvatar, | ||
3536 | // NULL, &attach_label, (void*)attachment)); | ||
3472 | } | 3537 | } |
3473 | else | 3538 | else |
3474 | { | 3539 | { |
3540 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
3475 | attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), | 3541 | attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), |
3476 | NULL, //&LLObjectBridge::attachToAvatar, | 3542 | NULL, //&LLObjectBridge::attachToAvatar, |
3477 | NULL, &attach_label, (void*)attachment)); | 3543 | (rlv_handler_t::isEnabled()) ? &rlvAttachToEnabler : NULL, |
3544 | &attach_label, (void*)attachment)); | ||
3545 | // [/RLVa:KB] | ||
3546 | //attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), | ||
3547 | // NULL, //&LLObjectBridge::attachToAvatar, | ||
3548 | // NULL, &attach_label, (void*)attachment)); | ||
3478 | } | 3549 | } |
3479 | 3550 | ||
3480 | LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject"); | 3551 | LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject"); |
@@ -3671,6 +3742,31 @@ private: | |||
3671 | bool mAppend; | 3742 | bool mAppend; |
3672 | }; | 3743 | }; |
3673 | 3744 | ||
3745 | class LLWearAttachmentsCallback : public LLInventoryCallback | ||
3746 | { | ||
3747 | public: | ||
3748 | LLWearAttachmentsCallback(bool append) : mAppend(append) {} | ||
3749 | void fire(const LLUUID& item_id) | ||
3750 | { | ||
3751 | mItemIDs.insert(item_id); | ||
3752 | } | ||
3753 | protected: | ||
3754 | ~LLWearAttachmentsCallback() | ||
3755 | { | ||
3756 | if( LLInventoryCallbackManager::is_instantiated() ) | ||
3757 | { | ||
3758 | wear_attachments_on_avatar(mItemIDs, mAppend); | ||
3759 | } | ||
3760 | else | ||
3761 | { | ||
3762 | llwarns << "Dropping unhandled LLWearAttachments" << llendl; | ||
3763 | } | ||
3764 | } | ||
3765 | private: | ||
3766 | std::set<LLUUID> mItemIDs; | ||
3767 | bool mAppend; | ||
3768 | }; | ||
3769 | |||
3674 | void LLOutfitObserver::done() | 3770 | void LLOutfitObserver::done() |
3675 | { | 3771 | { |
3676 | // We now have an outfit ready to be copied to agent inventory. Do | 3772 | // We now have an outfit ready to be copied to agent inventory. Do |
@@ -3954,6 +4050,20 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) | |||
3954 | is_gesture); | 4050 | is_gesture); |
3955 | S32 gest_count = gest_item_array.count(); | 4051 | S32 gest_count = gest_item_array.count(); |
3956 | 4052 | ||
4053 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | ||
4054 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) ) | ||
4055 | { | ||
4056 | // Filter anything that doesn't specify an attachment point (or that specifies one that's currently locked) | ||
4057 | for (S32 idxObj = obj_item_array.count() - 1; idxObj >= 0; idxObj--) | ||
4058 | { | ||
4059 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(obj_item_array.get(idxObj).get(), true); | ||
4060 | if ( ((!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt->getObject()))) ) | ||
4061 | obj_item_array.remove(idxObj); | ||
4062 | } | ||
4063 | obj_count = obj_item_array.count(); | ||
4064 | } | ||
4065 | // [/RLVa:KB] | ||
4066 | |||
3957 | if( !wearable_count && !obj_count && !gest_count) | 4067 | if( !wearable_count && !obj_count && !gest_count) |
3958 | { | 4068 | { |
3959 | gViewerWindow->alertXml("CouldNotPutOnOutfit"); | 4069 | gViewerWindow->alertXml("CouldNotPutOnOutfit"); |
@@ -4026,57 +4136,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) | |||
4026 | if( obj_count > 0 ) | 4136 | if( obj_count > 0 ) |
4027 | { | 4137 | { |
4028 | // We've found some attachements. Add these. | 4138 | // We've found some attachements. Add these. |
4029 | 4139 | wear_attachments_on_avatar(obj_item_array, !wear_info->mAppend); | |
4030 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | ||
4031 | if( avatar ) | ||
4032 | { | ||
4033 | // Build a compound message to send all the objects that need to be rezzed. | ||
4034 | |||
4035 | // Limit number of packets to send | ||
4036 | const S32 MAX_PACKETS_TO_SEND = 10; | ||
4037 | const S32 OBJECTS_PER_PACKET = 4; | ||
4038 | const S32 MAX_OBJECTS_TO_SEND = MAX_PACKETS_TO_SEND * OBJECTS_PER_PACKET; | ||
4039 | if( obj_count > MAX_OBJECTS_TO_SEND ) | ||
4040 | { | ||
4041 | obj_count = MAX_OBJECTS_TO_SEND; | ||
4042 | } | ||
4043 | |||
4044 | // Create an id to keep the parts of the compound message together | ||
4045 | LLUUID compound_msg_id; | ||
4046 | compound_msg_id.generate(); | ||
4047 | LLMessageSystem* msg = gMessageSystem; | ||
4048 | |||
4049 | for(i = 0; i < obj_count; ++i) | ||
4050 | { | ||
4051 | if( 0 == (i % OBJECTS_PER_PACKET) ) | ||
4052 | { | ||
4053 | // Start a new message chunk | ||
4054 | msg->newMessageFast(_PREHASH_RezMultipleAttachmentsFromInv); | ||
4055 | msg->nextBlockFast(_PREHASH_AgentData); | ||
4056 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
4057 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
4058 | msg->nextBlockFast(_PREHASH_HeaderData); | ||
4059 | msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id ); | ||
4060 | msg->addU8Fast(_PREHASH_TotalObjects, obj_count ); | ||
4061 | msg->addBOOLFast(_PREHASH_FirstDetachAll, !wear_info->mAppend ); | ||
4062 | } | ||
4063 | |||
4064 | LLInventoryItem* item = obj_item_array.get(i); | ||
4065 | msg->nextBlockFast(_PREHASH_ObjectData ); | ||
4066 | msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() ); | ||
4067 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); | ||
4068 | msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point | ||
4069 | pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); | ||
4070 | msg->addStringFast(_PREHASH_Name, item->getName()); | ||
4071 | msg->addStringFast(_PREHASH_Description, item->getDescription()); | ||
4072 | |||
4073 | if( (i+1 == obj_count) || ((OBJECTS_PER_PACKET-1) == (i % OBJECTS_PER_PACKET)) ) | ||
4074 | { | ||
4075 | // End of message chunk | ||
4076 | msg->sendReliable( gAgent.getRegion()->getHost() ); | ||
4077 | } | ||
4078 | } | ||
4079 | } | ||
4080 | } | 4140 | } |
4081 | } | 4141 | } |
4082 | delete wear_info; | 4142 | delete wear_info; |
@@ -4141,6 +4201,13 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B | |||
4141 | // item->setAssetUUID(wearable->getID()); | 4201 | // item->setAssetUUID(wearable->getID()); |
4142 | // item->updateAssetOnServer(); | 4202 | // item->updateAssetOnServer(); |
4143 | // } | 4203 | // } |
4204 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | ||
4205 | if ( (!gRlvHandler.isWearable(wearable->getType())) || | ||
4206 | ( (!gRlvHandler.isRemovable(wearable->getType())) && (gAgent.getWearable(wearable->getType())) ) ) | ||
4207 | { | ||
4208 | continue; | ||
4209 | } | ||
4210 | // [/RLVa:KB] | ||
4144 | items.put(item); | 4211 | items.put(item); |
4145 | wearables.put(wearable); | 4212 | wearables.put(wearable); |
4146 | } | 4213 | } |
@@ -4160,6 +4227,109 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B | |||
4160 | dec_busy_count(); | 4227 | dec_busy_count(); |
4161 | } | 4228 | } |
4162 | 4229 | ||
4230 | void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove) | ||
4231 | { | ||
4232 | // NOTE: the inventory items can reside in the user's inventory, the library, or any combination of the two | ||
4233 | |||
4234 | LLInventoryModel::item_array_t items; | ||
4235 | LLPointer<LLInventoryCallback> cb; | ||
4236 | |||
4237 | for (std::set<LLUUID>::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) | ||
4238 | { | ||
4239 | LLViewerInventoryItem* item = gInventory.getItem(*it); | ||
4240 | if ( (item) && (LLAssetType::AT_OBJECT == item->getType()) ) | ||
4241 | { | ||
4242 | if ( (gInventory.isObjectDescendentOf(*it, gAgent.getInventoryRootID())) ) | ||
4243 | { | ||
4244 | items.put(item); | ||
4245 | } | ||
4246 | else if ( (item->isComplete()) ) | ||
4247 | { | ||
4248 | if (cb.isNull()) | ||
4249 | cb = new LLWearAttachmentsCallback(remove); | ||
4250 | copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), LLUUID::null, std::string(), cb); | ||
4251 | } | ||
4252 | } | ||
4253 | } | ||
4254 | |||
4255 | wear_attachments_on_avatar(items, remove); | ||
4256 | } | ||
4257 | |||
4258 | void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOOL remove) | ||
4259 | { | ||
4260 | // NOTE: all inventory items must reside in the user's inventory | ||
4261 | |||
4262 | LLVOAvatar* avatarp = gAgent.getAvatarObject(); | ||
4263 | if(!avatarp) | ||
4264 | { | ||
4265 | llwarns << "No avatar found." << llendl; | ||
4266 | return; | ||
4267 | } | ||
4268 | |||
4269 | // Build a compound message to send all the objects that need to be rezzed. | ||
4270 | |||
4271 | // Limit number of packets to send | ||
4272 | const S32 MAX_PACKETS_TO_SEND = 10; | ||
4273 | const S32 OBJECTS_PER_PACKET = 4; | ||
4274 | const S32 MAX_OBJECTS_TO_SEND = MAX_PACKETS_TO_SEND * OBJECTS_PER_PACKET; | ||
4275 | |||
4276 | S32 count = items.count(); | ||
4277 | if ( !count ) | ||
4278 | { | ||
4279 | return; | ||
4280 | } | ||
4281 | else if ( count > MAX_OBJECTS_TO_SEND ) | ||
4282 | { | ||
4283 | count = MAX_OBJECTS_TO_SEND; | ||
4284 | } | ||
4285 | |||
4286 | // Create an id to keep the parts of the compound message together | ||
4287 | LLUUID compound_msg_id; | ||
4288 | compound_msg_id.generate(); | ||
4289 | LLMessageSystem* msg = gMessageSystem; | ||
4290 | |||
4291 | for(S32 i = 0; i < count; ++i) | ||
4292 | { | ||
4293 | if( 0 == (i % OBJECTS_PER_PACKET) ) | ||
4294 | { | ||
4295 | // Start a new message chunk | ||
4296 | msg->newMessageFast(_PREHASH_RezMultipleAttachmentsFromInv); | ||
4297 | msg->nextBlockFast(_PREHASH_AgentData); | ||
4298 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
4299 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
4300 | msg->nextBlockFast(_PREHASH_HeaderData); | ||
4301 | msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id ); | ||
4302 | msg->addU8Fast(_PREHASH_TotalObjects, count ); | ||
4303 | // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); | ||
4304 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.2a | ||
4305 | // This really should just *always* be FALSE since TRUE can result in loss of the current asset state | ||
4306 | msg->addBOOLFast(_PREHASH_FirstDetachAll, remove && (!gRlvHandler.hasLockedAttachment()) ); | ||
4307 | // [/RLVa:KB] | ||
4308 | } | ||
4309 | |||
4310 | LLInventoryItem* item = items.get(i); | ||
4311 | msg->nextBlockFast(_PREHASH_ObjectData ); | ||
4312 | msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() ); | ||
4313 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); | ||
4314 | // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point | ||
4315 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.2a | ||
4316 | msg->addU8Fast(_PREHASH_AttachmentPt, | ||
4317 | ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) ) | ||
4318 | ? 0 | ||
4319 | : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); | ||
4320 | // [/RLVa:KB] | ||
4321 | pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); | ||
4322 | msg->addStringFast(_PREHASH_Name, item->getName()); | ||
4323 | msg->addStringFast(_PREHASH_Description, item->getDescription()); | ||
4324 | |||
4325 | if( (i+1 == count) || ((OBJECTS_PER_PACKET-1) == (i % OBJECTS_PER_PACKET)) ) | ||
4326 | { | ||
4327 | // End of message chunk | ||
4328 | msg->sendReliable( gAgent.getRegion()->getHost() ); | ||
4329 | } | ||
4330 | } | ||
4331 | } | ||
4332 | |||
4163 | void remove_inventory_category_from_avatar( LLInventoryCategory* category ) | 4333 | void remove_inventory_category_from_avatar( LLInventoryCategory* category ) |
4164 | { | 4334 | { |
4165 | if(!category) return; | 4335 | if(!category) return; |
@@ -4229,7 +4399,11 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata) | |||
4229 | { | 4399 | { |
4230 | for(i = 0; i < wearable_count; ++i) | 4400 | for(i = 0; i < wearable_count; ++i) |
4231 | { | 4401 | { |
4232 | if( gAgent.isWearingItem (item_array.get(i)->getUUID()) ) | 4402 | // if( gAgent.isWearingItem (item_array.get(i)->getUUID()) ) |
4403 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a | ||
4404 | LLWearable* pWearable = gAgent.getWearableFromWearableItem(item_array.get(i)->getUUID()); | ||
4405 | if ( (pWearable) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isRemovable(pWearable->getType()))) ) | ||
4406 | // [/RLVa:KB] | ||
4233 | { | 4407 | { |
4234 | gWearableList.getAsset(item_array.get(i)->getAssetUUID(), | 4408 | gWearableList.getAsset(item_array.get(i)->getAssetUUID(), |
4235 | item_array.get(i)->getName(), | 4409 | item_array.get(i)->getName(), |
@@ -4246,6 +4420,18 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata) | |||
4246 | { | 4420 | { |
4247 | for(i = 0; i < obj_count; ++i) | 4421 | for(i = 0; i < obj_count; ++i) |
4248 | { | 4422 | { |
4423 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.2a | ||
4424 | // TODO-RLVa: is there a reason why LL doesn't bother checking to see if you're actually wearing the object? | ||
4425 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
4426 | { | ||
4427 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
4428 | if ( (!pAvatar) || (!pAvatar->isWearingAttachment(obj_item_array.get(i)->getUUID())) || | ||
4429 | (!gRlvHandler.isDetachable(obj_item_array.get(i).get())) ) // Why does LLPointer have a cast to BOOL aka S32??? | ||
4430 | { | ||
4431 | continue; | ||
4432 | } | ||
4433 | } | ||
4434 | // [/RVLa:KB] | ||
4249 | gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); | 4435 | gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); |
4250 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); | 4436 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); |
4251 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | 4437 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); |
@@ -4638,8 +4824,11 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, | |||
4638 | { | 4824 | { |
4639 | EWearableType type = wearable->getType(); | 4825 | EWearableType type = wearable->getType(); |
4640 | 4826 | ||
4641 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& | 4827 | //if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& |
4642 | //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) | 4828 | //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) |
4829 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.2a | SL big fix | ||
4830 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES) ) | ||
4831 | // [/RLVa:KB] | ||
4643 | { | 4832 | { |
4644 | gAgent.removeWearable( type ); | 4833 | gAgent.removeWearable( type ); |
4645 | } | 4834 | } |
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 1029a3c..e662058 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp | |||
@@ -2876,6 +2876,14 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg, | |||
2876 | llinfos << "LLInventoryModel::processSaveAssetIntoInventory item" | 2876 | llinfos << "LLInventoryModel::processSaveAssetIntoInventory item" |
2877 | " not found: " << item_id << llendl; | 2877 | " not found: " << item_id << llendl; |
2878 | } | 2878 | } |
2879 | |||
2880 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0e | ||
2881 | if (rlv_handler_t::isEnabled()) | ||
2882 | { | ||
2883 | gRlvHandler.onSavedAssetIntoInventory(item_id); | ||
2884 | } | ||
2885 | // [/RLVa:KB] | ||
2886 | |||
2879 | if(gViewerWindow) | 2887 | if(gViewerWindow) |
2880 | { | 2888 | { |
2881 | gViewerWindow->getWindow()->decBusyCount(); | 2889 | gViewerWindow->getWindow()->decBusyCount(); |
@@ -2918,6 +2926,23 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) | |||
2918 | // << llendl; | 2926 | // << llendl; |
2919 | if(tfolder->getUUID().notNull()) | 2927 | if(tfolder->getUUID().notNull()) |
2920 | { | 2928 | { |
2929 | // [RLVa:KB] - Checked: 2009-08-07 (RLVa-1.0.1f) | Added: RLVa-1.0.0f | ||
2930 | // TODO-RLVa: this really shouldn't go here, but if the inventory offer spans multiple BulkUpdateInventory messages | ||
2931 | // then the second message will cause the viewer to show the folder under its original name even though | ||
2932 | // it is renamed properly on the inventory server | ||
2933 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) ) | ||
2934 | { | ||
2935 | LLViewerInventoryCategory* pRlvRoot = gRlvHandler.getSharedRoot(); | ||
2936 | std::string strName = tfolder->getName(); | ||
2937 | if ((pRlvRoot) && (pRlvRoot->getUUID() == tfolder->getParentUUID() ) && (strName.find(RLV_PUTINV_PREFIX) == 0)) | ||
2938 | { | ||
2939 | strName.erase(0, strName.find(RLV_FOLDER_PREFIX_PUTINV)); // Strips the prefix while retaining while the '~' | ||
2940 | tfolder->rename(strName); | ||
2941 | tfolder->updateServer(FALSE); | ||
2942 | } | ||
2943 | } | ||
2944 | // [/RLVa:KB] | ||
2945 | |||
2921 | folders.push_back(tfolder); | 2946 | folders.push_back(tfolder); |
2922 | LLViewerInventoryCategory* folderp = gInventory.getCategory(tfolder->getUUID()); | 2947 | LLViewerInventoryCategory* folderp = gInventory.getCategory(tfolder->getUUID()); |
2923 | if(folderp) | 2948 | if(folderp) |
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 0f1eb2b..a8d5045 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -521,6 +521,15 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
521 | addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name ); | 521 | addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name ); |
522 | addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top ); | 522 | addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top ); |
523 | 523 | ||
524 | //Search Controls | ||
525 | U32 search_type = gSavedSettings.getU32("InventorySearchType"); | ||
526 | BOOL search_by_name = (search_type == 0); | ||
527 | |||
528 | addBoolControl("Inventory.SearchByName", search_by_name); | ||
529 | addBoolControl("Inventory.SearchByCreator", !search_by_name); | ||
530 | |||
531 | addBoolControl("Inventory.SearchByAll", !search_by_name); | ||
532 | |||
524 | mSavedFolderState = new LLSaveFolderState(); | 533 | mSavedFolderState = new LLSaveFolderState(); |
525 | mSavedFolderState->setApply(FALSE); | 534 | mSavedFolderState->setApply(FALSE); |
526 | 535 | ||
@@ -765,7 +774,17 @@ void LLInventoryView::setVisible( BOOL visible ) | |||
765 | // Destroy all but the last floater, which is made invisible. | 774 | // Destroy all but the last floater, which is made invisible. |
766 | void LLInventoryView::onClose(bool app_quitting) | 775 | void LLInventoryView::onClose(bool app_quitting) |
767 | { | 776 | { |
768 | S32 count = sActiveViews.count(); | 777 | // S32 count = sActiveViews.count(); |
778 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
779 | // See LLInventoryView::closeAll() on why we're doing it this way | ||
780 | S32 count = 0; | ||
781 | for (S32 idx = 0, cnt = sActiveViews.count(); idx < cnt; idx++) | ||
782 | { | ||
783 | if (!sActiveViews.get(idx)->isDead()) | ||
784 | count++; | ||
785 | } | ||
786 | // [/RLVa:KB] | ||
787 | |||
769 | if (count > 1) | 788 | if (count > 1) |
770 | { | 789 | { |
771 | destroy(); | 790 | destroy(); |
@@ -843,6 +862,13 @@ LLInventoryView* LLInventoryView::showAgentInventory(BOOL take_keyboard_focus) | |||
843 | return NULL; | 862 | return NULL; |
844 | } | 863 | } |
845 | 864 | ||
865 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
866 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV)) | ||
867 | { | ||
868 | return NULL; | ||
869 | } | ||
870 | // [/RLVa:KB] | ||
871 | |||
846 | LLInventoryView* iv = LLInventoryView::getActiveInventory(); | 872 | LLInventoryView* iv = LLInventoryView::getActiveInventory(); |
847 | #if 0 && !LL_RELEASE_FOR_DOWNLOAD | 873 | #if 0 && !LL_RELEASE_FOR_DOWNLOAD |
848 | if (sActiveViews.count() == 1) | 874 | if (sActiveViews.count() == 1) |
diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index bdc24e0..1762165 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h | |||
@@ -225,6 +225,34 @@ public: | |||
225 | static void toggleVisibility(); | 225 | static void toggleVisibility(); |
226 | static void toggleVisibility(void*) { toggleVisibility(); } | 226 | static void toggleVisibility(void*) { toggleVisibility(); } |
227 | 227 | ||
228 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
229 | static void closeAll() | ||
230 | { | ||
231 | // If there are mulitple inventory floaters open then clicking the "Inventory" button will close | ||
232 | // them one by one (see LLToolBar::onClickInventory() => toggleVisibility() ) until we get to the | ||
233 | // last one which will just be hidden instead of closed/destroyed (see LLInventoryView::onClose) | ||
234 | // | ||
235 | // However the view isn't removed from sActiveViews until its destructor is called and since | ||
236 | // 'LLMortician::sDestroyImmediate == FALSE' while the viewer is running the destructor won't be | ||
237 | // called right away | ||
238 | // | ||
239 | // Result: we can't call close() on the last (sActiveViews.count() will still be > 1) because | ||
240 | // onClose() would take the wrong branch and destroy() it as well | ||
241 | // | ||
242 | // Workaround: "fix" onClose() to count only views that aren't marked as "dead" | ||
243 | |||
244 | LLInventoryView* pView; U8 flagsSound; | ||
245 | for (S32 idx = sActiveViews.count() - 1; idx >= 0; idx--) | ||
246 | { | ||
247 | pView = sActiveViews.get(idx); | ||
248 | flagsSound = pView->getSoundFlags(); | ||
249 | pView->setSoundFlags(LLView::SILENT); // Suppress the window close sound | ||
250 | pView->close(); // onClose() protects against closing the last inventory floater | ||
251 | pView->setSoundFlags(flagsSound); // One view won't be destroy()'ed so it needs its sound flags restored | ||
252 | } | ||
253 | } | ||
254 | // [/RLVa:KB] | ||
255 | |||
228 | // Final cleanup, destroy all open inventory views. | 256 | // Final cleanup, destroy all open inventory views. |
229 | static void cleanup(); | 257 | static void cleanup(); |
230 | 258 | ||
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index fd02be6..fa66b05 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp | |||
@@ -463,8 +463,15 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) | |||
463 | if (mask == MASK_COPY) | 463 | if (mask == MASK_COPY) |
464 | { | 464 | { |
465 | // ...we're trying to make a copy | 465 | // ...we're trying to make a copy |
466 | LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, FALSE); | 466 | // LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, FALSE); |
467 | mCopyMadeThisDrag = TRUE; | 467 | // mCopyMadeThisDrag = TRUE; |
468 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
469 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
470 | { | ||
471 | LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, FALSE); | ||
472 | mCopyMadeThisDrag = TRUE; | ||
473 | } | ||
474 | // [/RLVa:KB] | ||
468 | 475 | ||
469 | // When we make the copy, we don't want to do any other processing. | 476 | // When we make the copy, we don't want to do any other processing. |
470 | // If so, the object will also be moved, and the copy will be offset. | 477 | // If so, the object will also be moved, and the copy will be offset. |
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 2429aa4..c66e816 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -366,6 +366,16 @@ void LLNetMap::draw() | |||
366 | glyph_color = avatar_color; | 366 | glyph_color = avatar_color; |
367 | } | 367 | } |
368 | 368 | ||
369 | // [RLVa:KB] | ||
370 | if ( !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) | ||
371 | { | ||
372 | // User is not allowed to see who it is, or even if it's a friend, | ||
373 | // due to RLV settings. | ||
374 | glyph_color = avatar_color; | ||
375 | } | ||
376 | // [/RLVa:KB] | ||
377 | |||
378 | |||
369 | LLWorldMapView::drawAvatar( | 379 | LLWorldMapView::drawAvatar( |
370 | pos_map.mV[VX], pos_map.mV[VY], | 380 | pos_map.mV[VX], pos_map.mV[VY], |
371 | glyph_color, | 381 | glyph_color, |
@@ -564,11 +574,33 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec | |||
564 | std::string fullname; | 574 | std::string fullname; |
565 | if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) | 575 | if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) |
566 | { | 576 | { |
567 | msg.append(fullname); | 577 | // [RLVa:KB] |
568 | msg.append("\n"); | 578 | if ( !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) ) |
579 | { | ||
580 | // User is not allowed to see who it is, due to RLV settings. | ||
581 | msg.append(rlv_handler_t::cstrHidden); | ||
582 | } | ||
583 | else | ||
584 | { | ||
585 | msg.append(fullname); | ||
586 | msg.append("\n"); | ||
587 | } | ||
588 | // [/RLVa:KB] | ||
569 | } | 589 | } |
570 | msg.append( region->getName() ); | ||
571 | 590 | ||
591 | // [RLVa:KB] | ||
592 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
593 | { | ||
594 | // User is not allowed to see where they are, due to RLV settings. | ||
595 | msg.append( rlv_handler_t::cstrHidden ); | ||
596 | } | ||
597 | else | ||
598 | { | ||
599 | msg.append( region->getName() ); | ||
600 | } | ||
601 | // [/RLVa:KB] | ||
602 | |||
603 | |||
572 | msg.append("\n"); | 604 | msg.append("\n"); |
573 | gSavedSettings.getBOOL( "MiniMapTeleport" ) ? | 605 | gSavedSettings.getBOOL( "MiniMapTeleport" ) ? |
574 | msg.append(getString("tooltip_tp")) : msg.append(getString("tooltip_map")); | 606 | msg.append(getString("tooltip_tp")) : msg.append(getString("tooltip_map")); |
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index 9e837a6..5590ab1 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -54,6 +54,10 @@ | |||
54 | #include "lloverlaybar.h" // for gOverlayBar | 54 | #include "lloverlaybar.h" // for gOverlayBar |
55 | #include "lluictrlfactory.h" | 55 | #include "lluictrlfactory.h" |
56 | 56 | ||
57 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b | ||
58 | #include "rlvhandler.h" | ||
59 | // [/RLVa:KB] | ||
60 | |||
57 | // Globals | 61 | // Globals |
58 | LLNotifyBoxView* gNotifyBoxView = NULL; | 62 | LLNotifyBoxView* gNotifyBoxView = NULL; |
59 | 63 | ||
@@ -328,6 +332,13 @@ LLNotifyBox::LLNotifyBox(LLPointer<LLNotifyBoxTemplate> xml_template, const LLSt | |||
328 | // TODO: Make a separate archive for these. | 332 | // TODO: Make a separate archive for these. |
329 | LLChat chat(mMessage); | 333 | LLChat chat(mMessage); |
330 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | 334 | chat.mSourceType = CHAT_SOURCE_SYSTEM; |
335 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b | ||
336 | if (rlv_handler_t::isEnabled()) | ||
337 | { | ||
338 | // Notices should already have their contents filtered where necessary | ||
339 | chat.mRlvLocFiltered = chat.mRlvNamesFiltered = TRUE; | ||
340 | } | ||
341 | // [/RLVa:KB] | ||
331 | LLFloaterChat::getInstance(LLSD())->addChatHistory(chat); | 342 | LLFloaterChat::getInstance(LLSD())->addChatHistory(chat); |
332 | } | 343 | } |
333 | else | 344 | else |
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 91a7375..12c001e 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp | |||
@@ -62,6 +62,7 @@ | |||
62 | #include "llvoavatar.h" | 62 | #include "llvoavatar.h" |
63 | #include "llvoiceremotectrl.h" | 63 | #include "llvoiceremotectrl.h" |
64 | #include "llwebbrowserctrl.h" | 64 | #include "llwebbrowserctrl.h" |
65 | #include "llwindlightremotectrl.h" | ||
65 | #include "llselectmgr.h" | 66 | #include "llselectmgr.h" |
66 | 67 | ||
67 | // | 68 | // |
@@ -92,6 +93,13 @@ void* LLOverlayBar::createVoiceRemote(void* userdata) | |||
92 | return self->mVoiceRemote; | 93 | return self->mVoiceRemote; |
93 | } | 94 | } |
94 | 95 | ||
96 | void* LLOverlayBar::createWindlightRemote(void* userdata) | ||
97 | { | ||
98 | LLOverlayBar *self = (LLOverlayBar*)userdata; | ||
99 | self->mWindlightRemote = new LLWindlightRemoteCtrl(); | ||
100 | return self->mWindlightRemote; | ||
101 | } | ||
102 | |||
95 | void* LLOverlayBar::createChatBar(void* userdata) | 103 | void* LLOverlayBar::createChatBar(void* userdata) |
96 | { | 104 | { |
97 | gChatBar = new LLChatBar(); | 105 | gChatBar = new LLChatBar(); |
@@ -102,6 +110,7 @@ LLOverlayBar::LLOverlayBar() | |||
102 | : LLPanel(), | 110 | : LLPanel(), |
103 | mMediaRemote(NULL), | 111 | mMediaRemote(NULL), |
104 | mVoiceRemote(NULL), | 112 | mVoiceRemote(NULL), |
113 | mWindlightRemote(NULL), | ||
105 | mMusicState(STOPPED), | 114 | mMusicState(STOPPED), |
106 | mOriginalIMLabel("") | 115 | mOriginalIMLabel("") |
107 | { | 116 | { |
@@ -113,6 +122,7 @@ LLOverlayBar::LLOverlayBar() | |||
113 | LLCallbackMap::map_t factory_map; | 122 | LLCallbackMap::map_t factory_map; |
114 | factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); | 123 | factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); |
115 | factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); | 124 | factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); |
125 | factory_map["windlight_remote"] = LLCallbackMap(LLOverlayBar::createWindlightRemote, this); | ||
116 | factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); | 126 | factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); |
117 | 127 | ||
118 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); | 128 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); |
@@ -256,7 +266,10 @@ void LLOverlayBar::refresh() | |||
256 | BOOL sitting = FALSE; | 266 | BOOL sitting = FALSE; |
257 | if (gAgent.getAvatarObject()) | 267 | if (gAgent.getAvatarObject()) |
258 | { | 268 | { |
259 | sitting = gAgent.getAvatarObject()->mIsSitting; | 269 | // sitting = gAgent.getAvatarObject()->mIsSitting; |
270 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
271 | sitting = gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT); | ||
272 | // [/RLVa:KB] | ||
260 | } | 273 | } |
261 | button = getChild<LLButton>("Stand Up"); | 274 | button = getChild<LLButton>("Stand Up"); |
262 | 275 | ||
@@ -269,6 +282,7 @@ void LLOverlayBar::refresh() | |||
269 | } | 282 | } |
270 | 283 | ||
271 | 284 | ||
285 | moveChildToBackOfTabGroup(mWindlightRemote); | ||
272 | moveChildToBackOfTabGroup(mMediaRemote); | 286 | moveChildToBackOfTabGroup(mMediaRemote); |
273 | moveChildToBackOfTabGroup(mVoiceRemote); | 287 | moveChildToBackOfTabGroup(mVoiceRemote); |
274 | 288 | ||
@@ -277,6 +291,7 @@ void LLOverlayBar::refresh() | |||
277 | { | 291 | { |
278 | childSetVisible("media_remote_container", FALSE); | 292 | childSetVisible("media_remote_container", FALSE); |
279 | childSetVisible("voice_remote_container", FALSE); | 293 | childSetVisible("voice_remote_container", FALSE); |
294 | childSetVisible("windlight_remote_container", FALSE); | ||
280 | childSetVisible("state_buttons", FALSE); | 295 | childSetVisible("state_buttons", FALSE); |
281 | } | 296 | } |
282 | else | 297 | else |
@@ -284,6 +299,7 @@ void LLOverlayBar::refresh() | |||
284 | // update "remotes" | 299 | // update "remotes" |
285 | childSetVisible("media_remote_container", TRUE); | 300 | childSetVisible("media_remote_container", TRUE); |
286 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); | 301 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); |
302 | childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote")); | ||
287 | childSetVisible("state_buttons", TRUE); | 303 | childSetVisible("state_buttons", TRUE); |
288 | } | 304 | } |
289 | 305 | ||
@@ -336,6 +352,13 @@ void LLOverlayBar::onClickMouselook(void*) | |||
336 | //static | 352 | //static |
337 | void LLOverlayBar::onClickStandUp(void*) | 353 | void LLOverlayBar::onClickStandUp(void*) |
338 | { | 354 | { |
355 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
356 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) | ||
357 | { | ||
358 | return; | ||
359 | } | ||
360 | // [/RLVa:KB] | ||
361 | |||
339 | LLSelectMgr::getInstance()->deselectAllForStandingUp(); | 362 | LLSelectMgr::getInstance()->deselectAllForStandingUp(); |
340 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 363 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
341 | } | 364 | } |
diff --git a/linden/indra/newview/lloverlaybar.h b/linden/indra/newview/lloverlaybar.h index 52a469a..140fabf 100644 --- a/linden/indra/newview/lloverlaybar.h +++ b/linden/indra/newview/lloverlaybar.h | |||
@@ -40,6 +40,7 @@ extern S32 STATUS_BAR_HEIGHT; | |||
40 | class LLButton; | 40 | class LLButton; |
41 | class LLLineEditor; | 41 | class LLLineEditor; |
42 | class LLMediaRemoteCtrl; | 42 | class LLMediaRemoteCtrl; |
43 | |||
43 | class LLMessageSystem; | 44 | class LLMessageSystem; |
44 | class LLTextBox; | 45 | class LLTextBox; |
45 | class LLTextEditor; | 46 | class LLTextEditor; |
@@ -49,6 +50,7 @@ class LLFrameTimer; | |||
49 | class LLStatGraph; | 50 | class LLStatGraph; |
50 | class LLSlider; | 51 | class LLSlider; |
51 | class LLVoiceRemoteCtrl; | 52 | class LLVoiceRemoteCtrl; |
53 | class LLWindlightRemoteCtrl; | ||
52 | 54 | ||
53 | class LLOverlayBar | 55 | class LLOverlayBar |
54 | : public LLPanel | 56 | : public LLPanel |
@@ -88,13 +90,15 @@ public: | |||
88 | protected: | 90 | protected: |
89 | static void* createMediaRemote(void* userdata); | 91 | static void* createMediaRemote(void* userdata); |
90 | static void* createVoiceRemote(void* userdata); | 92 | static void* createVoiceRemote(void* userdata); |
93 | static void* createWindlightRemote(void* userdata); | ||
91 | static void* createChatBar(void* userdata); | 94 | static void* createChatBar(void* userdata); |
92 | 95 | ||
93 | void enableMediaButtons(); | 96 | void enableMediaButtons(); |
94 | 97 | ||
95 | protected: | 98 | protected: |
96 | LLMediaRemoteCtrl* mMediaRemote; | 99 | LLMediaRemoteCtrl* mMediaRemote; |
97 | LLVoiceRemoteCtrl* mVoiceRemote; | 100 | LLVoiceRemoteCtrl* mVoiceRemote; |
101 | LLWindlightRemoteCtrl* mWindlightRemote; | ||
98 | bool mBuilt; // dialog constructed yet? | 102 | bool mBuilt; // dialog constructed yet? |
99 | S32 mMusicState; | 103 | S32 mMusicState; |
100 | std::string mOriginalIMLabel; | 104 | std::string mOriginalIMLabel; |
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index d48237f..e101ea2 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -51,6 +51,7 @@ | |||
51 | 51 | ||
52 | #include "llfloaterfriends.h" | 52 | #include "llfloaterfriends.h" |
53 | #include "llfloatergroupinfo.h" | 53 | #include "llfloatergroupinfo.h" |
54 | #include "llfloatergroups.h" | ||
54 | #include "llfloaterworldmap.h" | 55 | #include "llfloaterworldmap.h" |
55 | #include "llfloatermute.h" | 56 | #include "llfloatermute.h" |
56 | #include "llfloateravatarinfo.h" | 57 | #include "llfloateravatarinfo.h" |
@@ -86,6 +87,7 @@ | |||
86 | std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; | 87 | std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; |
87 | BOOL LLPanelAvatar::sAllowFirstLife = FALSE; | 88 | BOOL LLPanelAvatar::sAllowFirstLife = FALSE; |
88 | 89 | ||
90 | extern void callback_invite_to_group(LLUUID group_id, void *user_data); | ||
89 | extern void handle_lure(const LLUUID& invitee); | 91 | extern void handle_lure(const LLUUID& invitee); |
90 | extern void handle_pay_by_id(const LLUUID& payee); | 92 | extern void handle_pay_by_id(const LLUUID& payee); |
91 | 93 | ||
@@ -428,6 +430,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void) | |||
428 | 430 | ||
429 | childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); | 431 | childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); |
430 | childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar()); | 432 | childSetAction("Instant Message...", LLPanelAvatar::onClickIM, getPanelAvatar()); |
433 | childSetAction("Invite to Group...", LLPanelAvatar::onClickGroupInvite, getPanelAvatar()); | ||
431 | 434 | ||
432 | childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar()); | 435 | childSetAction("Add Friend...", LLPanelAvatar::onClickAddFriend, getPanelAvatar()); |
433 | childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar()); | 436 | childSetAction("Pay...", LLPanelAvatar::onClickPay, getPanelAvatar()); |
@@ -789,6 +792,9 @@ void LLPanelAvatarClassified::refresh() | |||
789 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 792 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
790 | 793 | ||
791 | bool allow_new = tab_count < MAX_CLASSIFIEDS; | 794 | bool allow_new = tab_count < MAX_CLASSIFIEDS; |
795 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
796 | allow_new &= !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC); | ||
797 | // [/RLVa:KB] | ||
792 | bool allow_delete = (tab_count > 0); | 798 | bool allow_delete = (tab_count > 0); |
793 | bool show_help = (tab_count == 0); | 799 | bool show_help = (tab_count == 0); |
794 | 800 | ||
@@ -924,6 +930,12 @@ void LLPanelAvatarClassified::processAvatarClassifiedReply(LLMessageSystem* msg, | |||
924 | // static | 930 | // static |
925 | void LLPanelAvatarClassified::onClickNew(void* data) | 931 | void LLPanelAvatarClassified::onClickNew(void* data) |
926 | { | 932 | { |
933 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) | ||
934 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
935 | { | ||
936 | return; | ||
937 | } | ||
938 | // [/RLVa:KB] | ||
927 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; | 939 | LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; |
928 | 940 | ||
929 | gViewerWindow->alertXml("AddClassified",callbackNew,self); | 941 | gViewerWindow->alertXml("AddClassified",callbackNew,self); |
@@ -1020,7 +1032,10 @@ void LLPanelAvatarPicks::refresh() | |||
1020 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); | 1032 | BOOL self = (gAgent.getID() == getPanelAvatar()->getAvatarID()); |
1021 | LLTabContainer* tabs = getChild<LLTabContainer>("picks tab"); | 1033 | LLTabContainer* tabs = getChild<LLTabContainer>("picks tab"); |
1022 | S32 tab_count = tabs ? tabs->getTabCount() : 0; | 1034 | S32 tab_count = tabs ? tabs->getTabCount() : 0; |
1023 | childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS); | 1035 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) |
1036 | childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ); | ||
1037 | // [/RLVa:KB] | ||
1038 | //childSetEnabled("New...", self && tab_count < MAX_AVATAR_PICKS); | ||
1024 | childSetEnabled("Delete...", self && tab_count > 0); | 1039 | childSetEnabled("Delete...", self && tab_count > 0); |
1025 | childSetVisible("New...", self && getPanelAvatar()->isEditable()); | 1040 | childSetVisible("New...", self && getPanelAvatar()->isEditable()); |
1026 | childSetVisible("Delete...", self && getPanelAvatar()->isEditable()); | 1041 | childSetVisible("Delete...", self && getPanelAvatar()->isEditable()); |
@@ -1098,6 +1113,12 @@ void LLPanelAvatarPicks::processAvatarPicksReply(LLMessageSystem* msg, void**) | |||
1098 | // static | 1113 | // static |
1099 | void LLPanelAvatarPicks::onClickNew(void* data) | 1114 | void LLPanelAvatarPicks::onClickNew(void* data) |
1100 | { | 1115 | { |
1116 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
1117 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
1118 | { | ||
1119 | return; | ||
1120 | } | ||
1121 | // [/RLVa:KB] | ||
1101 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; | 1122 | LLPanelAvatarPicks* self = (LLPanelAvatarPicks*)data; |
1102 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); | 1123 | LLPanelPick* panel_pick = new LLPanelPick(FALSE); |
1103 | LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab"); | 1124 | LLTabContainer* tabs = self->getChild<LLTabContainer>("picks tab"); |
@@ -1415,6 +1436,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name | |||
1415 | } | 1436 | } |
1416 | childSetVisible("Instant Message...",FALSE); | 1437 | childSetVisible("Instant Message...",FALSE); |
1417 | childSetEnabled("Instant Message...",FALSE); | 1438 | childSetEnabled("Instant Message...",FALSE); |
1439 | childSetVisible("Invite to Group...",FALSE); | ||
1440 | childSetEnabled("Invite to Group...",FALSE); | ||
1418 | childSetVisible("Mute",FALSE); | 1441 | childSetVisible("Mute",FALSE); |
1419 | childSetEnabled("Mute",FALSE); | 1442 | childSetEnabled("Mute",FALSE); |
1420 | childSetVisible("Offer Teleport...",FALSE); | 1443 | childSetVisible("Offer Teleport...",FALSE); |
@@ -1427,6 +1450,14 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name | |||
1427 | childSetEnabled("Add Friend...",FALSE); | 1450 | childSetEnabled("Add Friend...",FALSE); |
1428 | childSetVisible("Pay...",FALSE); | 1451 | childSetVisible("Pay...",FALSE); |
1429 | childSetEnabled("Pay...",FALSE); | 1452 | childSetEnabled("Pay...",FALSE); |
1453 | childSetVisible("Kick",FALSE); | ||
1454 | childSetEnabled("Kick",FALSE); | ||
1455 | childSetVisible("Freeze",FALSE); | ||
1456 | childSetEnabled("Freeze",FALSE); | ||
1457 | childSetVisible("Unfreeze",FALSE); | ||
1458 | childSetEnabled("Unfreeze",FALSE); | ||
1459 | childSetVisible("csr_btn", FALSE); | ||
1460 | childSetEnabled("csr_btn", FALSE); | ||
1430 | } | 1461 | } |
1431 | else | 1462 | else |
1432 | { | 1463 | { |
@@ -1438,6 +1469,8 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name | |||
1438 | 1469 | ||
1439 | childSetVisible("Instant Message...",TRUE); | 1470 | childSetVisible("Instant Message...",TRUE); |
1440 | childSetEnabled("Instant Message...",FALSE); | 1471 | childSetEnabled("Instant Message...",FALSE); |
1472 | childSetVisible("Invite to Group...",TRUE); | ||
1473 | childSetEnabled("Invite to Group...",FALSE); | ||
1441 | childSetVisible("Mute",TRUE); | 1474 | childSetVisible("Mute",TRUE); |
1442 | childSetEnabled("Mute",FALSE); | 1475 | childSetEnabled("Mute",FALSE); |
1443 | 1476 | ||
@@ -1464,20 +1497,20 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name | |||
1464 | childSetEnabled("Add Friend...", !avatar_is_friend); | 1497 | childSetEnabled("Add Friend...", !avatar_is_friend); |
1465 | childSetVisible("Pay...",TRUE); | 1498 | childSetVisible("Pay...",TRUE); |
1466 | childSetEnabled("Pay...",FALSE); | 1499 | childSetEnabled("Pay...",FALSE); |
1500 | |||
1501 | BOOL is_god = FALSE; | ||
1502 | if (gAgent.isGodlike()) is_god = TRUE; | ||
1503 | |||
1504 | childSetVisible("Kick", is_god); | ||
1505 | childSetEnabled("Kick", is_god); | ||
1506 | childSetVisible("Freeze", is_god); | ||
1507 | childSetEnabled("Freeze", is_god); | ||
1508 | childSetVisible("Unfreeze", is_god); | ||
1509 | childSetEnabled("Unfreeze", is_god); | ||
1510 | childSetVisible("csr_btn", is_god); | ||
1511 | childSetEnabled("csr_btn", is_god); | ||
1467 | } | 1512 | } |
1468 | } | 1513 | } |
1469 | |||
1470 | BOOL is_god = FALSE; | ||
1471 | if (gAgent.isGodlike()) is_god = TRUE; | ||
1472 | |||
1473 | childSetVisible("Kick", is_god); | ||
1474 | childSetEnabled("Kick", is_god); | ||
1475 | childSetVisible("Freeze", is_god); | ||
1476 | childSetEnabled("Freeze", is_god); | ||
1477 | childSetVisible("Unfreeze", is_god); | ||
1478 | childSetEnabled("Unfreeze", is_god); | ||
1479 | childSetVisible("csr_btn", is_god); | ||
1480 | childSetEnabled("csr_btn", is_god); | ||
1481 | } | 1514 | } |
1482 | 1515 | ||
1483 | 1516 | ||
@@ -1520,9 +1553,18 @@ void LLPanelAvatar::resetGroupList() | |||
1520 | LLSD row; | 1553 | LLSD row; |
1521 | 1554 | ||
1522 | row["id"] = id ; | 1555 | row["id"] = id ; |
1523 | row["columns"][0]["value"] = group_string; | ||
1524 | row["columns"][0]["font"] = "SANSSERIF_SMALL"; | 1556 | row["columns"][0]["font"] = "SANSSERIF_SMALL"; |
1525 | row["columns"][0]["width"] = 0; | 1557 | row["columns"][0]["width"] = 0; |
1558 | if (group_data.mListInProfile) | ||
1559 | { | ||
1560 | row["columns"][0]["value"] = group_string; | ||
1561 | row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
1562 | } | ||
1563 | else | ||
1564 | { | ||
1565 | row["columns"][0]["value"] = group_string + " " + getString("HiddenLabel"); | ||
1566 | row["columns"][0]["color"] = gColors.getColor("ScriptBgReadOnlyColor").getValue(); | ||
1567 | } | ||
1526 | group_list->addElement(row); | 1568 | group_list->addElement(row); |
1527 | } | 1569 | } |
1528 | group_list->sortByColumnIndex(0, TRUE); | 1570 | group_list->sortByColumnIndex(0, TRUE); |
@@ -1545,6 +1587,22 @@ void LLPanelAvatar::onClickIM(void* userdata) | |||
1545 | gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); | 1587 | gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID); |
1546 | } | 1588 | } |
1547 | 1589 | ||
1590 | void LLPanelAvatar::onClickGroupInvite(void* userdata) | ||
1591 | { | ||
1592 | LLPanelAvatar* self = (LLPanelAvatar*) userdata; | ||
1593 | if (self->getAvatarID().notNull()) | ||
1594 | { | ||
1595 | LLFloaterGroupPicker* widget; | ||
1596 | widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); | ||
1597 | if (widget) | ||
1598 | { | ||
1599 | widget->center(); | ||
1600 | widget->setPowersMask(GP_MEMBER_INVITE); | ||
1601 | widget->setSelectCallback(callback_invite_to_group, (void *)&(self->getAvatarID())); | ||
1602 | } | ||
1603 | } | ||
1604 | } | ||
1605 | |||
1548 | 1606 | ||
1549 | // static | 1607 | // static |
1550 | //----------------------------------------------------------------------------- | 1608 | //----------------------------------------------------------------------------- |
@@ -1762,6 +1820,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1762 | continue; | 1820 | continue; |
1763 | } | 1821 | } |
1764 | self->childSetEnabled("Instant Message...",TRUE); | 1822 | self->childSetEnabled("Instant Message...",TRUE); |
1823 | self->childSetEnabled("Invite to Group...",TRUE); | ||
1765 | self->childSetEnabled("Pay...",TRUE); | 1824 | self->childSetEnabled("Pay...",TRUE); |
1766 | self->childSetEnabled("Mute",TRUE); | 1825 | self->childSetEnabled("Mute",TRUE); |
1767 | 1826 | ||
@@ -1982,8 +2041,34 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) | |||
1982 | 2041 | ||
1983 | LLSD row; | 2042 | LLSD row; |
1984 | row["id"] = group_id; | 2043 | row["id"] = group_id; |
1985 | row["columns"][0]["value"] = group_string; | ||
1986 | row["columns"][0]["font"] = "SANSSERIF_SMALL"; | 2044 | row["columns"][0]["font"] = "SANSSERIF_SMALL"; |
2045 | |||
2046 | LLGroupData *group_data = NULL; | ||
2047 | |||
2048 | if (avatar_id == agent_id) // own avatar | ||
2049 | { | ||
2050 | // Search for this group in the agent's groups list | ||
2051 | LLDynamicArray<LLGroupData>::iterator i; | ||
2052 | for (i = gAgent.mGroups.begin(); i != gAgent.mGroups.end(); i++) | ||
2053 | { | ||
2054 | if (i->mID == group_id) | ||
2055 | { | ||
2056 | group_data = &*i; | ||
2057 | break; | ||
2058 | } | ||
2059 | } | ||
2060 | } | ||
2061 | // Set normal color if not found or if group is visible in profile | ||
2062 | if (!group_data || group_data->mListInProfile) | ||
2063 | { | ||
2064 | row["columns"][0]["value"] = group_string; | ||
2065 | row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | ||
2066 | } | ||
2067 | else | ||
2068 | { | ||
2069 | row["columns"][0]["value"] = group_string + " " + self->getString("HiddenLabel"); | ||
2070 | row["columns"][0]["color"] = gColors.getColor("ScriptBgReadOnlyColor").getValue(); | ||
2071 | } | ||
1987 | if (group_list) | 2072 | if (group_list) |
1988 | { | 2073 | { |
1989 | group_list->addElement(row); | 2074 | group_list->addElement(row); |
diff --git a/linden/indra/newview/llpanelavatar.h b/linden/indra/newview/llpanelavatar.h index 4570145..b1bb317 100644 --- a/linden/indra/newview/llpanelavatar.h +++ b/linden/indra/newview/llpanelavatar.h | |||
@@ -311,6 +311,7 @@ public: | |||
311 | 311 | ||
312 | static void onClickTrack( void *userdata); | 312 | static void onClickTrack( void *userdata); |
313 | static void onClickIM( void *userdata); | 313 | static void onClickIM( void *userdata); |
314 | static void onClickGroupInvite( void *userdata); | ||
314 | static void onClickOfferTeleport( void *userdata); | 315 | static void onClickOfferTeleport( void *userdata); |
315 | static void onClickPay( void *userdata); | 316 | static void onClickPay( void *userdata); |
316 | static void onClickAddFriend(void* userdata); | 317 | static void onClickAddFriend(void* userdata); |
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index 4d28be5..3760815 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp | |||
@@ -760,7 +760,10 @@ void LLPanelClassified::refresh() | |||
760 | mClickThroughText->setVisible(is_self); | 760 | mClickThroughText->setVisible(is_self); |
761 | 761 | ||
762 | mSetBtn->setVisible(is_self); | 762 | mSetBtn->setVisible(is_self); |
763 | mSetBtn->setEnabled(is_self); | 763 | //mSetBtn->setEnabled(is_self); |
764 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
765 | mSetBtn->setEnabled(is_self && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ); | ||
766 | // [/RLVa:KB] | ||
764 | 767 | ||
765 | mUpdateBtn->setEnabled(is_self && checkDirty()); | 768 | mUpdateBtn->setEnabled(is_self && checkDirty()); |
766 | mUpdateBtn->setVisible(is_self); | 769 | mUpdateBtn->setVisible(is_self); |
@@ -964,6 +967,12 @@ void LLPanelClassified::onClickLandmark(void* data) | |||
964 | // static | 967 | // static |
965 | void LLPanelClassified::onClickSet(void* data) | 968 | void LLPanelClassified::onClickSet(void* data) |
966 | { | 969 | { |
970 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
971 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
972 | { | ||
973 | return; | ||
974 | } | ||
975 | // [/RLVa:KB] | ||
967 | LLPanelClassified* self = (LLPanelClassified*)data; | 976 | LLPanelClassified* self = (LLPanelClassified*)data; |
968 | 977 | ||
969 | // Save location for later. | 978 | // Save location for later. |
diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index d91790e..e13ec46 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp | |||
@@ -66,6 +66,10 @@ | |||
66 | #include "lltoolcomp.h" | 66 | #include "lltoolcomp.h" |
67 | #include "llpanelinventory.h" | 67 | #include "llpanelinventory.h" |
68 | 68 | ||
69 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
70 | #include "llvoavatar.h" | ||
71 | // [/RLVa:KB] | ||
72 | |||
69 | // | 73 | // |
70 | // Imported globals | 74 | // Imported globals |
71 | // | 75 | // |
@@ -117,6 +121,24 @@ void LLPanelContents::getState(LLViewerObject *objectp ) | |||
117 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 | 121 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 |
118 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); | 122 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); |
119 | 123 | ||
124 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | ||
125 | if ( (rlv_handler_t::isEnabled()) && (editable) ) | ||
126 | { | ||
127 | // Don't allow creation of new scripts if it's undetachable | ||
128 | editable = gRlvHandler.isDetachable(objectp); | ||
129 | |||
130 | // Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection | ||
131 | if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) | ||
132 | { | ||
133 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
134 | // Only check the first (non-)root object because nothing else would result in enabling the button (see below) | ||
135 | LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE); | ||
136 | |||
137 | editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit())); | ||
138 | } | ||
139 | } | ||
140 | // [/RLVa:KB] | ||
141 | |||
120 | // Edit script button - ok if object is editable and there's an | 142 | // Edit script button - ok if object is editable and there's an |
121 | // unambiguous destination for the object. | 143 | // unambiguous destination for the object. |
122 | if( editable && | 144 | if( editable && |
@@ -160,6 +182,22 @@ void LLPanelContents::onClickNewScript(void *userdata) | |||
160 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); | 182 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); |
161 | if(object) | 183 | if(object) |
162 | { | 184 | { |
185 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
186 | if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()] | ||
187 | { | ||
188 | if (!gRlvHandler.isDetachable(object)) | ||
189 | { | ||
190 | return; // Disallow creating new scripts in a locked attachment | ||
191 | } | ||
192 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) | ||
193 | { | ||
194 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
195 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) ) | ||
196 | return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n | ||
197 | } | ||
198 | } | ||
199 | // [/RLVa:KB] | ||
200 | |||
163 | LLPermissions perm; | 201 | LLPermissions perm; |
164 | perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); | 202 | perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); |
165 | perm.initMasks( | 203 | perm.initMasks( |
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index d510775..e3da12a 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp | |||
@@ -318,6 +318,9 @@ BOOL LLPanelDisplay::postBuild() | |||
318 | mLightingText = getChild<LLTextBox>("LightingDetailText"); | 318 | mLightingText = getChild<LLTextBox>("LightingDetailText"); |
319 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); | 319 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); |
320 | 320 | ||
321 | childSetValue("toggle_windlight_control", gSavedSettings.getBOOL("EnableWindlightRemote")); | ||
322 | mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); | ||
323 | |||
321 | refresh(); | 324 | refresh(); |
322 | 325 | ||
323 | return TRUE; | 326 | return TRUE; |
@@ -475,7 +478,12 @@ void LLPanelDisplay::refreshEnabledState() | |||
475 | } | 478 | } |
476 | 479 | ||
477 | // Vertex Shaders | 480 | // Vertex Shaders |
478 | mCtrlShaderEnable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); | 481 | // mCtrlShaderEnable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); |
482 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0a | ||
483 | // "Basic Shaders" can't be disabled - but can be enabled - under @setenv=n | ||
484 | bool fCtrlShaderEnable = LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"); | ||
485 | mCtrlShaderEnable->setEnabled(fCtrlShaderEnable && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV) || !mShaderEnable)); | ||
486 | // [/RLVa:KB] | ||
479 | 487 | ||
480 | BOOL shaders = mCtrlShaderEnable->get(); | 488 | BOOL shaders = mCtrlShaderEnable->get(); |
481 | if (shaders) | 489 | if (shaders) |
@@ -490,7 +498,12 @@ void LLPanelDisplay::refreshEnabledState() | |||
490 | 498 | ||
491 | // *HACK just checks to see if we can use shaders... | 499 | // *HACK just checks to see if we can use shaders... |
492 | // maybe some cards that use shaders, but don't support windlight | 500 | // maybe some cards that use shaders, but don't support windlight |
493 | mCtrlWindLight->setEnabled(mCtrlShaderEnable->getEnabled() && shaders); | 501 | // mCtrlWindLight->setEnabled(mCtrlShaderEnable->getEnabled() && shaders); |
502 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0a | ||
503 | // "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n | ||
504 | bool fCtrlWindLightEnable = fCtrlShaderEnable && shaders; | ||
505 | mCtrlWindLight->setEnabled(fCtrlWindLightEnable && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV) || !mWindLight)); | ||
506 | // [/RLVa:KB] | ||
494 | 507 | ||
495 | // turn off sky detail if atmostpherics isn't on | 508 | // turn off sky detail if atmostpherics isn't on |
496 | mCtrlSkyFactor->setEnabled(gSavedSettings.getBOOL("WindLightUseAtmosShaders")); | 509 | mCtrlSkyFactor->setEnabled(gSavedSettings.getBOOL("WindLightUseAtmosShaders")); |
@@ -690,6 +703,8 @@ void LLPanelDisplay::cancel() | |||
690 | gSavedSettings.setU32("WLSkyDetail", mSkyLOD); | 703 | gSavedSettings.setU32("WLSkyDetail", mSkyLOD); |
691 | gSavedSettings.setS32("RenderMaxPartCount", mParticleCount); | 704 | gSavedSettings.setS32("RenderMaxPartCount", mParticleCount); |
692 | gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); | 705 | gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); |
706 | |||
707 | gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); | ||
693 | } | 708 | } |
694 | 709 | ||
695 | void LLPanelDisplay::apply() | 710 | void LLPanelDisplay::apply() |
@@ -701,6 +716,8 @@ void LLPanelDisplay::apply() | |||
701 | { | 716 | { |
702 | applyWindowSize(); | 717 | applyWindowSize(); |
703 | } | 718 | } |
719 | |||
720 | gSavedSettings.setBOOL("EnableWindlightRemote", childGetValue("toggle_windlight_control").asBoolean()); | ||
704 | } | 721 | } |
705 | 722 | ||
706 | void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data) | 723 | void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data) |
diff --git a/linden/indra/newview/llpaneldisplay.h b/linden/indra/newview/llpaneldisplay.h index f98e94e..80ef5cb 100644 --- a/linden/indra/newview/llpaneldisplay.h +++ b/linden/indra/newview/llpaneldisplay.h | |||
@@ -170,6 +170,8 @@ protected: | |||
170 | S32 mParticleCount; | 170 | S32 mParticleCount; |
171 | S32 mPostProcess; | 171 | S32 mPostProcess; |
172 | 172 | ||
173 | BOOL mWLControl; | ||
174 | |||
173 | static void setGraphicsSettings(LLControlGroup& group); | 175 | static void setGraphicsSettings(LLControlGroup& group); |
174 | static void createGroup(); | 176 | static void createGroup(); |
175 | 177 | ||
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index c53395d..7ab850f 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp | |||
@@ -81,6 +81,10 @@ | |||
81 | #include "llviewerwindow.h" | 81 | #include "llviewerwindow.h" |
82 | #include "llwearable.h" | 82 | #include "llwearable.h" |
83 | 83 | ||
84 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
85 | #include "llvoavatar.h" | ||
86 | // [/RLVa:KB] | ||
87 | |||
84 | ///---------------------------------------------------------------------------- | 88 | ///---------------------------------------------------------------------------- |
85 | /// Local function declarations, constants, enums, and typedefs | 89 | /// Local function declarations, constants, enums, and typedefs |
86 | ///---------------------------------------------------------------------------- | 90 | ///---------------------------------------------------------------------------- |
@@ -364,8 +368,16 @@ void LLTaskInvFVBridge::previewItem() | |||
364 | 368 | ||
365 | BOOL LLTaskInvFVBridge::isItemRenameable() const | 369 | BOOL LLTaskInvFVBridge::isItemRenameable() const |
366 | { | 370 | { |
367 | if(gAgent.isGodlike()) return TRUE; | 371 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
368 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 372 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
373 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
374 | { | ||
375 | return FALSE; | ||
376 | } | ||
377 | // [/RLVa:KB] | ||
378 | |||
379 | if(gAgent.isGodlike()) return TRUE; | ||
380 | // LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | ||
369 | if(object) | 381 | if(object) |
370 | { | 382 | { |
371 | LLInventoryItem* item; | 383 | LLInventoryItem* item; |
@@ -382,6 +394,12 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const | |||
382 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) | 394 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) |
383 | { | 395 | { |
384 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 396 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
397 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
398 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
399 | { | ||
400 | return TRUE; // Fallback code [see LLTaskInvFVBridge::isItemRenameable()] | ||
401 | } | ||
402 | // [/RLVa:KB] | ||
385 | if(object) | 403 | if(object) |
386 | { | 404 | { |
387 | LLViewerInventoryItem* item = NULL; | 405 | LLViewerInventoryItem* item = NULL; |
@@ -408,12 +426,47 @@ BOOL LLTaskInvFVBridge::isItemMovable() | |||
408 | // return TRUE; | 426 | // return TRUE; |
409 | //} | 427 | //} |
410 | //return FALSE; | 428 | //return FALSE; |
429 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | ||
430 | if (rlv_handler_t::isEnabled()) | ||
431 | { | ||
432 | LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); | ||
433 | if (pObj) | ||
434 | { | ||
435 | if (!gRlvHandler.isDetachable(pObj)) | ||
436 | { | ||
437 | return FALSE; | ||
438 | } | ||
439 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) | ||
440 | { | ||
441 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
442 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == pObj->getRootEdit()) ) | ||
443 | return FALSE; | ||
444 | } | ||
445 | } | ||
446 | } | ||
447 | // [/RLVa:KB] | ||
411 | return TRUE; | 448 | return TRUE; |
412 | } | 449 | } |
413 | 450 | ||
414 | BOOL LLTaskInvFVBridge::isItemRemovable() | 451 | BOOL LLTaskInvFVBridge::isItemRemovable() |
415 | { | 452 | { |
416 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 453 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
454 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | ||
455 | if ( (object) && (rlv_handler_t::isEnabled()) ) | ||
456 | { | ||
457 | if (!gRlvHandler.isDetachable(object)) | ||
458 | { | ||
459 | return FALSE; | ||
460 | } | ||
461 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) | ||
462 | { | ||
463 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
464 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) ) | ||
465 | return FALSE; | ||
466 | } | ||
467 | } | ||
468 | // [/RLVa:KB] | ||
469 | |||
417 | if(object | 470 | if(object |
418 | && (object->permModify() || object->permYouOwner())) | 471 | && (object->permModify() || object->permYouOwner())) |
419 | { | 472 | { |
@@ -558,6 +611,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const | |||
558 | const LLPermissions& perm = inv->getPermissions(); | 611 | const LLPermissions& perm = inv->getPermissions(); |
559 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, | 612 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, |
560 | GP_OBJECT_MANIPULATE); | 613 | GP_OBJECT_MANIPULATE); |
614 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
615 | // Kind of redundant due to the note below, but in case that ever gets fixed | ||
616 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
617 | { | ||
618 | return FALSE; | ||
619 | } | ||
620 | // [/RLVa:KB] | ||
561 | if (object->isAttachment() && !can_copy) | 621 | if (object->isAttachment() && !can_copy) |
562 | { | 622 | { |
563 | //RN: no copy contents of attachments cannot be dragged out | 623 | //RN: no copy contents of attachments cannot be dragged out |
@@ -675,6 +735,14 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
675 | { | 735 | { |
676 | disabled_items.push_back(std::string("Task Open")); | 736 | disabled_items.push_back(std::string("Task Open")); |
677 | } | 737 | } |
738 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
739 | else if ( (rlv_handler_t::isEnabled()) && | ||
740 | ((LLAssetType::AT_LSL_TEXT == item->getType()) || (LLAssetType::AT_NOTECARD == item->getType())) && | ||
741 | (!gRlvHandler.isDetachable(gObjectList.findObject(mPanel->getTaskUUID()))) ) | ||
742 | { | ||
743 | disabled_items.push_back(std::string("Task Open")); | ||
744 | } | ||
745 | // [/RLVa:KB] | ||
678 | } | 746 | } |
679 | items.push_back(std::string("Task Properties")); | 747 | items.push_back(std::string("Task Properties")); |
680 | if(isItemRenameable()) | 748 | if(isItemRenameable()) |
@@ -1180,12 +1248,20 @@ LLTaskLSLBridge::LLTaskLSLBridge( | |||
1180 | 1248 | ||
1181 | void LLTaskLSLBridge::openItem() | 1249 | void LLTaskLSLBridge::openItem() |
1182 | { | 1250 | { |
1251 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1252 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | ||
1253 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
1254 | { | ||
1255 | return; | ||
1256 | } | ||
1257 | // [/RLVa:KB] | ||
1258 | |||
1183 | llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl; | 1259 | llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl; |
1184 | if(LLLiveLSLEditor::show(mUUID, mPanel->getTaskUUID())) | 1260 | if(LLLiveLSLEditor::show(mUUID, mPanel->getTaskUUID())) |
1185 | { | 1261 | { |
1186 | return; | 1262 | return; |
1187 | } | 1263 | } |
1188 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 1264 | // LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
1189 | if(!object || object->isInventoryPending()) | 1265 | if(!object || object->isInventoryPending()) |
1190 | { | 1266 | { |
1191 | return; | 1267 | return; |
@@ -1300,6 +1376,12 @@ void LLTaskNotecardBridge::openItem() | |||
1300 | { | 1376 | { |
1301 | return; | 1377 | return; |
1302 | } | 1378 | } |
1379 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1380 | if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour("viewnote")) || (!gRlvHandler.isDetachable(object))) ) | ||
1381 | { | ||
1382 | return; | ||
1383 | } | ||
1384 | // [/RLVa:KB] | ||
1303 | if(object->permModify() || gAgent.isGodlike()) | 1385 | if(object->permModify() || gAgent.isGodlike()) |
1304 | { | 1386 | { |
1305 | S32 left, top; | 1387 | S32 left, top; |
diff --git a/linden/indra/newview/llpanelland.cpp b/linden/indra/newview/llpanelland.cpp index b40450c..c0b8e24 100644 --- a/linden/indra/newview/llpanelland.cpp +++ b/linden/indra/newview/llpanelland.cpp | |||
@@ -230,6 +230,12 @@ void LLPanelLandInfo::refresh() | |||
230 | //static | 230 | //static |
231 | void LLPanelLandInfo::onClickClaim(void*) | 231 | void LLPanelLandInfo::onClickClaim(void*) |
232 | { | 232 | { |
233 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
234 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
235 | { | ||
236 | return; | ||
237 | } | ||
238 | // [/RLVa:KB] | ||
233 | LLViewerParcelMgr::getInstance()->startBuyLand(); | 239 | LLViewerParcelMgr::getInstance()->startBuyLand(); |
234 | } | 240 | } |
235 | 241 | ||
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index c26f70f..325fcbc 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -74,6 +74,10 @@ | |||
74 | 74 | ||
75 | #include "llglheaders.h" | 75 | #include "llglheaders.h" |
76 | 76 | ||
77 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
78 | #include "rlvhandler.h" | ||
79 | // [/RLVa:KB] | ||
80 | |||
77 | #define USE_VIEWER_AUTH 0 | 81 | #define USE_VIEWER_AUTH 0 |
78 | 82 | ||
79 | std::string load_password_from_disk(void); | 83 | std::string load_password_from_disk(void); |
@@ -797,6 +801,18 @@ void LLPanelLogin::refreshLocation( bool force_visible ) | |||
797 | if ( ! force_visible ) | 801 | if ( ! force_visible ) |
798 | show_start = gSavedSettings.getBOOL("ShowStartLocation"); | 802 | show_start = gSavedSettings.getBOOL("ShowStartLocation"); |
799 | 803 | ||
804 | |||
805 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
806 | // TODO-RLVa: figure out some way to make this work with RLV_EXTENSION_STARTLOCATION | ||
807 | #ifndef RLV_EXTENSION_STARTLOCATION | ||
808 | if (rlv_handler_t::isEnabled()) | ||
809 | { | ||
810 | show_start = FALSE; | ||
811 | } | ||
812 | #endif // RLV_EXTENSION_STARTLOCATION | ||
813 | // [/RLVa:KB] | ||
814 | |||
815 | |||
800 | sInstance->childSetVisible("start_location_combo", show_start); | 816 | sInstance->childSetVisible("start_location_combo", show_start); |
801 | sInstance->childSetVisible("start_location_text", show_start); | 817 | sInstance->childSetVisible("start_location_text", show_start); |
802 | 818 | ||
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 5c70590..dd71a0e 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp | |||
@@ -75,6 +75,10 @@ | |||
75 | 75 | ||
76 | #include "lldrawpool.h" | 76 | #include "lldrawpool.h" |
77 | 77 | ||
78 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
79 | #include "llvoavatar.h" | ||
80 | // [/RLVa:KB] | ||
81 | |||
78 | // | 82 | // |
79 | // Constants | 83 | // Constants |
80 | // | 84 | // |
@@ -385,6 +389,15 @@ void LLPanelObject::getState( ) | |||
385 | enable_rotate = FALSE; | 389 | enable_rotate = FALSE; |
386 | } | 390 | } |
387 | 391 | ||
392 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
393 | if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) | ||
394 | { | ||
395 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
396 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == objectp->getRootEdit()) ) | ||
397 | enable_move = enable_scale = enable_rotate = FALSE; | ||
398 | } | ||
399 | // [/RLVa:KB] | ||
400 | |||
388 | LLVector3 vec; | 401 | LLVector3 vec; |
389 | if (enable_move) | 402 | if (enable_move) |
390 | { | 403 | { |
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index c430922..24bbab6 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp | |||
@@ -84,6 +84,7 @@ BOOL LLPanelPermissions::postBuild() | |||
84 | 84 | ||
85 | 85 | ||
86 | this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); | 86 | this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); |
87 | this->childSetAction("button last owner profile",LLPanelPermissions::onClickLastOwner,this); | ||
87 | this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); | 88 | this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); |
88 | 89 | ||
89 | this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); | 90 | this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); |
@@ -177,6 +178,11 @@ void LLPanelPermissions::refresh() | |||
177 | childSetEnabled("Owner Name",false); | 178 | childSetEnabled("Owner Name",false); |
178 | childSetEnabled("button owner profile",false); | 179 | childSetEnabled("button owner profile",false); |
179 | 180 | ||
181 | childSetEnabled("Last Owner:",false); | ||
182 | childSetText("Last Owner Name",LLStringUtil::null); | ||
183 | childSetEnabled("Last Owner Name",false); | ||
184 | childSetEnabled("button last owner profile",false); | ||
185 | |||
180 | childSetEnabled("Group:",false); | 186 | childSetEnabled("Group:",false); |
181 | childSetText("Group Name",LLStringUtil::null); | 187 | childSetText("Group Name",LLStringUtil::null); |
182 | childSetEnabled("Group Name",false); | 188 | childSetEnabled("Group Name",false); |
@@ -190,9 +196,6 @@ void LLPanelPermissions::refresh() | |||
190 | childSetEnabled("Description:",false); | 196 | childSetEnabled("Description:",false); |
191 | childSetText("Object Description",LLStringUtil::null); | 197 | childSetText("Object Description",LLStringUtil::null); |
192 | childSetEnabled("Object Description",false); | 198 | childSetEnabled("Object Description",false); |
193 | |||
194 | childSetText("prim info",LLStringUtil::null); | ||
195 | childSetEnabled("prim info",false); | ||
196 | 199 | ||
197 | childSetEnabled("Permissions:",false); | 200 | childSetEnabled("Permissions:",false); |
198 | 201 | ||
@@ -299,6 +302,8 @@ void LLPanelPermissions::refresh() | |||
299 | owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); | 302 | owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); |
300 | 303 | ||
301 | // llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; | 304 | // llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; |
305 | std::string last_owner_name; | ||
306 | LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); | ||
302 | 307 | ||
303 | if (mOwnerID.isNull()) | 308 | if (mOwnerID.isNull()) |
304 | { | 309 | { |
@@ -309,8 +314,8 @@ void LLPanelPermissions::refresh() | |||
309 | else | 314 | else |
310 | { | 315 | { |
311 | // Display last owner if public | 316 | // Display last owner if public |
312 | std::string last_owner_name; | 317 | //std::string last_owner_name; |
313 | LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); | 318 | //LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); |
314 | 319 | ||
315 | // It should never happen that the last owner is null and the owner | 320 | // It should never happen that the last owner is null and the owner |
316 | // is null, but it seems to be a bug in the simulator right now. JC | 321 | // is null, but it seems to be a bug in the simulator right now. JC |
@@ -322,9 +327,39 @@ void LLPanelPermissions::refresh() | |||
322 | } | 327 | } |
323 | } | 328 | } |
324 | 329 | ||
330 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
331 | bool fRlvEnableOwner = true; | ||
332 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | ||
333 | { | ||
334 | // Only filter the owner name if: the selection is all owned by the same avie and not group owned | ||
335 | if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) ) | ||
336 | { | ||
337 | owner_name = gRlvHandler.getAnonym(owner_name); | ||
338 | fRlvEnableOwner = false; | ||
339 | } | ||
340 | } | ||
341 | // [/RLVa:KB] | ||
342 | |||
325 | childSetText("Owner Name",owner_name); | 343 | childSetText("Owner Name",owner_name); |
326 | childSetEnabled("Owner Name",TRUE); | 344 | childSetEnabled("Owner Name",TRUE); |
327 | childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); | 345 | // childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); |
346 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
347 | childSetEnabled("button owner profile", | ||
348 | fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); | ||
349 | // [/RLVa:KB] | ||
350 | |||
351 | if (owner_name != last_owner_name) | ||
352 | { | ||
353 | childSetText("Last Owner Name", last_owner_name); | ||
354 | childSetEnabled("Last Owner Name", TRUE); | ||
355 | childSetEnabled("button last owner profile", TRUE); | ||
356 | } | ||
357 | else | ||
358 | { | ||
359 | childSetText("Last Owner Name", LLStringUtil::null); | ||
360 | childSetEnabled("Last Owner Name", FALSE); | ||
361 | childSetEnabled("button last owner profile", FALSE); | ||
362 | } | ||
328 | 363 | ||
329 | // update group text field | 364 | // update group text field |
330 | childSetEnabled("Group:",true); | 365 | childSetEnabled("Group:",true); |
@@ -388,33 +423,6 @@ void LLPanelPermissions::refresh() | |||
388 | childSetEnabled("Object Description",false); | 423 | childSetEnabled("Object Description",false); |
389 | } | 424 | } |
390 | 425 | ||
391 | |||
392 | // Pre-compute object info string | ||
393 | S32 prim_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); | ||
394 | S32 obj_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); | ||
395 | |||
396 | std::string object_info_string; | ||
397 | if (1 == obj_count) | ||
398 | { | ||
399 | object_info_string.assign("1 Object, "); | ||
400 | } | ||
401 | else | ||
402 | { | ||
403 | object_info_string = llformat( "%d Objects, ", obj_count); | ||
404 | } | ||
405 | if (1 == prim_count) | ||
406 | { | ||
407 | object_info_string.append("1 Primitive"); | ||
408 | } | ||
409 | else | ||
410 | { | ||
411 | std::string buffer; | ||
412 | buffer = llformat( "%d Primitives", prim_count); | ||
413 | object_info_string.append(buffer); | ||
414 | } | ||
415 | childSetText("prim info",object_info_string); | ||
416 | childSetEnabled("prim info",true); | ||
417 | |||
418 | S32 total_sale_price = 0; | 426 | S32 total_sale_price = 0; |
419 | S32 individual_sale_price = 0; | 427 | S32 individual_sale_price = 0; |
420 | BOOL is_for_sale_mixed = FALSE; | 428 | BOOL is_for_sale_mixed = FALSE; |
@@ -861,7 +869,23 @@ void LLPanelPermissions::onClickOwner(void *data) | |||
861 | } | 869 | } |
862 | else | 870 | else |
863 | { | 871 | { |
864 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | 872 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) |
873 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
874 | { | ||
875 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
876 | } | ||
877 | // [/RLVa:KB] | ||
878 | // LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
879 | } | ||
880 | } | ||
881 | |||
882 | void LLPanelPermissions::onClickLastOwner(void *data) | ||
883 | { | ||
884 | LLPanelPermissions *self = (LLPanelPermissions *)data; | ||
885 | |||
886 | if ( self->mLastOwnerID.notNull() ) | ||
887 | { | ||
888 | LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID); | ||
865 | } | 889 | } |
866 | } | 890 | } |
867 | 891 | ||
diff --git a/linden/indra/newview/llpanelpermissions.h b/linden/indra/newview/llpanelpermissions.h index 3b73254..57339ed 100644 --- a/linden/indra/newview/llpanelpermissions.h +++ b/linden/indra/newview/llpanelpermissions.h | |||
@@ -68,6 +68,7 @@ protected: | |||
68 | static void onClickRelease(void*); | 68 | static void onClickRelease(void*); |
69 | static void onClickCreator(void*); | 69 | static void onClickCreator(void*); |
70 | static void onClickOwner(void*); | 70 | static void onClickOwner(void*); |
71 | static void onClickLastOwner(void*); | ||
71 | static void onClickGroup(void*); | 72 | static void onClickGroup(void*); |
72 | static void cbGroupID(LLUUID group_id, void* userdata); | 73 | static void cbGroupID(LLUUID group_id, void* userdata); |
73 | static void onClickDeedToGroup(void*); | 74 | static void onClickDeedToGroup(void*); |
diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp index 480f703..57ce6d5 100644 --- a/linden/indra/newview/llpanelpick.cpp +++ b/linden/indra/newview/llpanelpick.cpp | |||
@@ -400,7 +400,10 @@ void LLPanelPick::refresh() | |||
400 | mEnabledCheck->setEnabled(godlike); | 400 | mEnabledCheck->setEnabled(godlike); |
401 | 401 | ||
402 | mSetBtn->setVisible(godlike); | 402 | mSetBtn->setVisible(godlike); |
403 | mSetBtn->setEnabled(godlike); | 403 | //mSetBtn->setEnabled(godlike); |
404 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
405 | mSetBtn->setEnabled(godlike && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ); | ||
406 | // [/RLVa:KB] | ||
404 | } | 407 | } |
405 | else | 408 | else |
406 | { | 409 | { |
@@ -417,7 +420,10 @@ void LLPanelPick::refresh() | |||
417 | mEnabledCheck->setEnabled(FALSE); | 420 | mEnabledCheck->setEnabled(FALSE); |
418 | 421 | ||
419 | mSetBtn->setVisible(is_self); | 422 | mSetBtn->setVisible(is_self); |
420 | mSetBtn->setEnabled(is_self); | 423 | //mSetBtn->setEnabled(is_self); |
424 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
425 | mSetBtn->setEnabled(is_self && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ); | ||
426 | // [/RLVa] | ||
421 | } | 427 | } |
422 | } | 428 | } |
423 | 429 | ||
@@ -455,6 +461,12 @@ void LLPanelPick::onClickLandmark(void* data) | |||
455 | // static | 461 | // static |
456 | void LLPanelPick::onClickSet(void* data) | 462 | void LLPanelPick::onClickSet(void* data) |
457 | { | 463 | { |
464 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
465 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
466 | { | ||
467 | return; | ||
468 | } | ||
469 | // [/RLVa:KB] | ||
458 | LLPanelPick* self = (LLPanelPick*)data; | 470 | LLPanelPick* self = (LLPanelPick*)data; |
459 | 471 | ||
460 | // Save location for later. | 472 | // Save location for later. |
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 4453751..f3b7278 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #include "llviewerprecompiledheaders.h" | 33 | #include "llviewerprecompiledheaders.h" |
34 | 34 | ||
35 | #include "llchatbar.h" | ||
36 | #include "llfloaterchat.h" | ||
35 | #include "llprefschat.h" | 37 | #include "llprefschat.h" |
36 | #include "lltexteditor.h" | 38 | #include "lltexteditor.h" |
37 | #include "llviewercontrol.h" | 39 | #include "llviewercontrol.h" |
@@ -69,11 +71,11 @@ protected: | |||
69 | BOOL mPlayTypingAnim; | 71 | BOOL mPlayTypingAnim; |
70 | BOOL mChatBubbles; | 72 | BOOL mChatBubbles; |
71 | BOOL mScriptErrorAsChat; | 73 | BOOL mScriptErrorAsChat; |
74 | BOOL mChatChannel; | ||
72 | F32 mConsoleOpacity; | 75 | F32 mConsoleOpacity; |
73 | F32 mBubbleOpacity; | 76 | F32 mBubbleOpacity; |
74 | }; | 77 | }; |
75 | 78 | ||
76 | |||
77 | LLPrefsChatImpl::LLPrefsChatImpl() | 79 | LLPrefsChatImpl::LLPrefsChatImpl() |
78 | : LLPanel(std::string("Chat Panel")) | 80 | : LLPanel(std::string("Chat Panel")) |
79 | { | 81 | { |
@@ -101,6 +103,7 @@ LLPrefsChatImpl::LLPrefsChatImpl() | |||
101 | childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); | 103 | childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); |
102 | childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); | 104 | childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); |
103 | childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); | 105 | childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); |
106 | childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect")); | ||
104 | childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); | 107 | childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); |
105 | childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); | 108 | childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); |
106 | 109 | ||
@@ -124,6 +127,7 @@ LLPrefsChatImpl::LLPrefsChatImpl() | |||
124 | mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); | 127 | mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); |
125 | mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); | 128 | mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); |
126 | mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); | 129 | mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); |
130 | mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); | ||
127 | mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); | 131 | mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); |
128 | mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); | 132 | mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); |
129 | } | 133 | } |
@@ -149,6 +153,7 @@ void LLPrefsChatImpl::cancel() | |||
149 | gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); | 153 | gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); |
150 | gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); | 154 | gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); |
151 | gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); | 155 | gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); |
156 | gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel); | ||
152 | gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); | 157 | gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); |
153 | gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); | 158 | gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); |
154 | } | 159 | } |
@@ -181,8 +186,21 @@ void LLPrefsChatImpl::apply() | |||
181 | 186 | ||
182 | gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); | 187 | gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); |
183 | gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); | 188 | gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); |
189 | |||
190 | BOOL chan_check = childGetValue("toggle_channel_control"); | ||
191 | gSavedSettings.setBOOL("ChatChannelSelect", chan_check); | ||
192 | if (mChatChannel != chan_check) | ||
193 | { | ||
194 | if (gChatBar) | ||
195 | { | ||
196 | gChatBar->toggleChannelControl(); | ||
197 | LLFloaterChat::toggleHistoryChannelControl(); | ||
198 | } | ||
199 | mChatChannel = chan_check; | ||
200 | } | ||
184 | } | 201 | } |
185 | 202 | ||
203 | |||
186 | //--------------------------------------------------------------------------- | 204 | //--------------------------------------------------------------------------- |
187 | 205 | ||
188 | LLPrefsChat::LLPrefsChat() | 206 | LLPrefsChat::LLPrefsChat() |
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 39619b7..5cb14fc 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp | |||
@@ -58,7 +58,7 @@ public: | |||
58 | void cancel(); | 58 | void cancel(); |
59 | void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); | 59 | void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); |
60 | void enableHistory(); | 60 | void enableHistory(); |
61 | 61 | ||
62 | static void onClickLogPath(void* user_data); | 62 | static void onClickLogPath(void* user_data); |
63 | static void onCommitLogging(LLUICtrl* ctrl, void* user_data); | 63 | static void onCommitLogging(LLUICtrl* ctrl, void* user_data); |
64 | 64 | ||
@@ -259,6 +259,12 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e | |||
259 | LLWStringUtil::replaceChar(busy_response, '^', '\n'); | 259 | LLWStringUtil::replaceChar(busy_response, '^', '\n'); |
260 | LLWStringUtil::replaceChar(busy_response, '%', ' '); | 260 | LLWStringUtil::replaceChar(busy_response, '%', ' '); |
261 | childSetText("busy_response", wstring_to_utf8str(busy_response)); | 261 | childSetText("busy_response", wstring_to_utf8str(busy_response)); |
262 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
263 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) | ||
264 | { | ||
265 | childDisable("busy_response"); | ||
266 | } | ||
267 | // [/RLVa:KB] | ||
262 | 268 | ||
263 | enableHistory(); | 269 | enableHistory(); |
264 | 270 | ||
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index af52a4b..1e9def3 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp | |||
@@ -1925,6 +1925,12 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) | |||
1925 | LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running"); | 1925 | LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running"); |
1926 | BOOL running = runningCheckbox->get(); | 1926 | BOOL running = runningCheckbox->get(); |
1927 | //self->mRunningCheckbox->get(); | 1927 | //self->mRunningCheckbox->get(); |
1928 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1929 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
1930 | { | ||
1931 | return; | ||
1932 | } | ||
1933 | // [/RLVa:KB] | ||
1928 | if( object ) | 1934 | if( object ) |
1929 | { | 1935 | { |
1930 | LLMessageSystem* msg = gMessageSystem; | 1936 | LLMessageSystem* msg = gMessageSystem; |
@@ -1950,6 +1956,12 @@ void LLLiveLSLEditor::onReset(void *userdata) | |||
1950 | LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata; | 1956 | LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata; |
1951 | 1957 | ||
1952 | LLViewerObject* object = gObjectList.findObject( self->mObjectID ); | 1958 | LLViewerObject* object = gObjectList.findObject( self->mObjectID ); |
1959 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1960 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | ||
1961 | { | ||
1962 | return; | ||
1963 | } | ||
1964 | // [/RLV:KB] | ||
1953 | if(object) | 1965 | if(object) |
1954 | { | 1966 | { |
1955 | LLMessageSystem* msg = gMessageSystem; | 1967 | LLMessageSystem* msg = gMessageSystem; |
@@ -2371,6 +2383,14 @@ void LLLiveLSLEditor::onLoad(void* userdata) | |||
2371 | void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) | 2383 | void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) |
2372 | { | 2384 | { |
2373 | LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; | 2385 | LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; |
2386 | |||
2387 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2388 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(gObjectList.findObject(self->mObjectID))) ) | ||
2389 | { | ||
2390 | return; | ||
2391 | } | ||
2392 | // [/RLV:KB] | ||
2393 | |||
2374 | self->mCloseAfterSave = close_after_save; | 2394 | self->mCloseAfterSave = close_after_save; |
2375 | self->saveIfNeeded(); | 2395 | self->saveIfNeeded(); |
2376 | } | 2396 | } |
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 998cc50..af97e2e 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp | |||
@@ -3451,12 +3451,20 @@ void LLSelectMgr::deselectAllIfTooFar() | |||
3451 | } | 3451 | } |
3452 | 3452 | ||
3453 | LLVector3d selectionCenter = getSelectionCenterGlobal(); | 3453 | LLVector3d selectionCenter = getSelectionCenterGlobal(); |
3454 | if (gSavedSettings.getBOOL("LimitSelectDistance") | 3454 | |
3455 | // if (gSavedSettings.getBOOL("LimitSelectDistance") | ||
3456 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
3457 | BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible(); | ||
3458 | if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) ) | ||
3459 | // [/RLVa:KB] | ||
3455 | && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) | 3460 | && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) |
3456 | && !mSelectedObjects->isAttachment() | 3461 | && !mSelectedObjects->isAttachment() |
3457 | && !selectionCenter.isExactlyZero()) | 3462 | && !selectionCenter.isExactlyZero()) |
3458 | { | 3463 | { |
3459 | F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); | 3464 | // F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); |
3465 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
3466 | F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f; | ||
3467 | // [/RLVa:KB] | ||
3460 | F32 deselect_dist_sq = deselect_dist * deselect_dist; | 3468 | F32 deselect_dist_sq = deselect_dist * deselect_dist; |
3461 | 3469 | ||
3462 | LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter; | 3470 | LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter; |
@@ -4552,6 +4560,11 @@ extern LLGLdouble gGLModelView[16]; | |||
4552 | 4560 | ||
4553 | void LLSelectMgr::updateSilhouettes() | 4561 | void LLSelectMgr::updateSilhouettes() |
4554 | { | 4562 | { |
4563 | if (!mRenderSilhouettes || !LLSelectMgr::sRenderSelectionHighlights) | ||
4564 | { | ||
4565 | return; | ||
4566 | } | ||
4567 | |||
4555 | S32 num_sils_genned = 0; | 4568 | S32 num_sils_genned = 0; |
4556 | 4569 | ||
4557 | LLVector3d cameraPos = gAgent.getCameraPositionGlobal(); | 4570 | LLVector3d cameraPos = gAgent.getCameraPositionGlobal(); |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index aca3cac..8d5aa9e 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -384,6 +384,11 @@ bool idle_startup() | |||
384 | // Initialize stuff that doesn't need data from simulators | 384 | // Initialize stuff that doesn't need data from simulators |
385 | // | 385 | // |
386 | 386 | ||
387 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d | ||
388 | if ( (gSavedSettings.controlExists(RLV_SETTING_MAIN)) && (gSavedSettings.getBOOL(RLV_SETTING_MAIN)) ) | ||
389 | rlv_handler_t::setEnabled(TRUE); | ||
390 | // [/RLVa:KB] | ||
391 | |||
387 | if (LLFeatureManager::getInstance()->isSafe()) | 392 | if (LLFeatureManager::getInstance()->isSafe()) |
388 | { | 393 | { |
389 | gViewerWindow->alertXml("DisplaySetToSafe"); | 394 | gViewerWindow->alertXml("DisplaySetToSafe"); |
@@ -924,6 +929,23 @@ bool idle_startup() | |||
924 | // their last location, or some URL "-url //sim/x/y[/z]" | 929 | // their last location, or some URL "-url //sim/x/y[/z]" |
925 | // All accounts have both a home and a last location, and we don't support | 930 | // All accounts have both a home and a last location, and we don't support |
926 | // more locations than that. Choose the appropriate one. JC | 931 | // more locations than that. Choose the appropriate one. JC |
932 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1d | ||
933 | #ifndef RLV_EXTENSION_STARTLOCATION | ||
934 | if (rlv_handler_t::isEnabled()) | ||
935 | #else | ||
936 | if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) ) | ||
937 | #endif // RLV_EXTENSION_STARTLOCATION | ||
938 | { | ||
939 | // Force login at the last location | ||
940 | agent_location_id = START_LOCATION_ID_LAST; | ||
941 | location_which = START_LOCATION_ID_LAST; | ||
942 | gSavedSettings.setBOOL("LoginLastLocation", FALSE); | ||
943 | |||
944 | // Clear some things that would cause us to divert to a user-specified location | ||
945 | LLURLSimString::setString(LLURLSimString::sLocationStringLast); | ||
946 | LLStartUp::sSLURLCommand.clear(); | ||
947 | } else | ||
948 | // [/RLVa:KB] | ||
927 | if (LLURLSimString::parse()) | 949 | if (LLURLSimString::parse()) |
928 | { | 950 | { |
929 | // a startup URL was specified | 951 | // a startup URL was specified |
@@ -2462,6 +2484,10 @@ bool idle_startup() | |||
2462 | 2484 | ||
2463 | // Have the agent start watching the friends list so we can update proxies | 2485 | // Have the agent start watching the friends list so we can update proxies |
2464 | gAgent.observeFriends(); | 2486 | gAgent.observeFriends(); |
2487 | |||
2488 | // Start loading inventory | ||
2489 | gInventory.startBackgroundFetch(); | ||
2490 | |||
2465 | if (gSavedSettings.getBOOL("LoginAsGod")) | 2491 | if (gSavedSettings.getBOOL("LoginAsGod")) |
2466 | { | 2492 | { |
2467 | gAgent.requestEnterGodMode(); | 2493 | gAgent.requestEnterGodMode(); |
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index b0ef61f..012db6f 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp | |||
@@ -568,6 +568,15 @@ void LLStatusBar::refresh() | |||
568 | mRegionDetails.mTraffic = 0.0f; | 568 | mRegionDetails.mTraffic = 0.0f; |
569 | } | 569 | } |
570 | 570 | ||
571 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a | ||
572 | if ( (region) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) // region == NULL if we loose our connection to the grid | ||
573 | { | ||
574 | // TODO-RLVa: find out whether the LCD code is still used because if so then we need to filter that as well | ||
575 | location_name = llformat("%s (%s) - %s", | ||
576 | rlv_handler_t::cstrHiddenRegion.c_str(), region->getSimAccessString().c_str(), rlv_handler_t::cstrHidden.c_str()); | ||
577 | } | ||
578 | // [/RLVa:KB] | ||
579 | |||
571 | mTextParcelName->setText(location_name); | 580 | mTextParcelName->setText(location_name); |
572 | 581 | ||
573 | 582 | ||
@@ -814,6 +823,12 @@ static void onClickScripts(void*) | |||
814 | 823 | ||
815 | static void onClickBuyLand(void*) | 824 | static void onClickBuyLand(void*) |
816 | { | 825 | { |
826 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
827 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
828 | { | ||
829 | return; | ||
830 | } | ||
831 | // [/RLVa:KB] | ||
817 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); | 832 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); |
818 | LLViewerParcelMgr::getInstance()->startBuyLand(); | 833 | LLViewerParcelMgr::getInstance()->startBuyLand(); |
819 | } | 834 | } |
diff --git a/linden/indra/newview/llstylemap.cpp b/linden/indra/newview/llstylemap.cpp index 6a3415f..e3bd3cd 100644 --- a/linden/indra/newview/llstylemap.cpp +++ b/linden/indra/newview/llstylemap.cpp | |||
@@ -47,13 +47,13 @@ LLStyleMap::~LLStyleMap() | |||
47 | 47 | ||
48 | LLStyleMap &LLStyleMap::instance() | 48 | LLStyleMap &LLStyleMap::instance() |
49 | { | 49 | { |
50 | static LLStyleMap mStyleMap; | 50 | static LLStyleMap style_map; |
51 | return mStyleMap; | 51 | return style_map; |
52 | } | 52 | } |
53 | 53 | ||
54 | // This is similar to the [] accessor except that if the entry doesn't already exist, | 54 | // This is similar to the [] accessor except that if the entry doesn't already exist, |
55 | // then this will create the entry. | 55 | // then this will create the entry. |
56 | const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) | 56 | const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source) |
57 | { | 57 | { |
58 | // Find this style in the map or add it if not. This map holds links to residents' profiles. | 58 | // Find this style in the map or add it if not. This map holds links to residents' profiles. |
59 | if (find(source) == end()) | 59 | if (find(source) == end()) |
@@ -77,6 +77,37 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) | |||
77 | return (*this)[source]; | 77 | return (*this)[source]; |
78 | } | 78 | } |
79 | 79 | ||
80 | // This is similar to lookupAgent for any generic URL encoded style. | ||
81 | const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link) | ||
82 | { | ||
83 | // Find this style in the map or add it if not. | ||
84 | iterator iter = find(id); | ||
85 | if (iter == end()) | ||
86 | { | ||
87 | LLStyleSP style(new LLStyle); | ||
88 | style->setVisible(true); | ||
89 | style->setFontName(LLStringUtil::null); | ||
90 | if (id != LLUUID::null && !link.empty()) | ||
91 | { | ||
92 | style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); | ||
93 | style->setLinkHREF(link); | ||
94 | } | ||
95 | else | ||
96 | style->setColor(LLColor4::white); | ||
97 | (*this)[id] = style; | ||
98 | } | ||
99 | else | ||
100 | { | ||
101 | LLStyleSP style = (*iter).second; | ||
102 | if ( style->getLinkHREF() != link ) | ||
103 | { | ||
104 | style->setLinkHREF(link); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | return (*this)[id]; | ||
109 | } | ||
110 | |||
80 | void LLStyleMap::update() | 111 | void LLStyleMap::update() |
81 | { | 112 | { |
82 | for (style_map_t::iterator iter = begin(); iter != end(); ++iter) | 113 | for (style_map_t::iterator iter = begin(); iter != end(); ++iter) |
diff --git a/linden/indra/newview/llstylemap.h b/linden/indra/newview/llstylemap.h index a38d253..f1eada9 100644 --- a/linden/indra/newview/llstylemap.h +++ b/linden/indra/newview/llstylemap.h | |||
@@ -47,7 +47,8 @@ public: | |||
47 | LLStyleMap(); | 47 | LLStyleMap(); |
48 | ~LLStyleMap(); | 48 | ~LLStyleMap(); |
49 | // Just like the [] accessor but it will add the entry in if it doesn't exist. | 49 | // Just like the [] accessor but it will add the entry in if it doesn't exist. |
50 | const LLStyleSP &lookup(const LLUUID &source); | 50 | const LLStyleSP &lookupAgent(const LLUUID &source); |
51 | const LLStyleSP &lookup(const LLUUID &source, const std::string& link); | ||
51 | static LLStyleMap &instance(); | 52 | static LLStyleMap &instance(); |
52 | 53 | ||
53 | // Forces refresh of the entries, call when something changes (e.g. link color). | 54 | // Forces refresh of the entries, call when something changes (e.g. link color). |
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index be0b8eb..71135d7 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp | |||
@@ -349,6 +349,13 @@ void LLFloaterTexturePicker::updateImageStats() | |||
349 | { | 349 | { |
350 | mResolutionLabel->setTextArg("[DIMENSIONS]", std::string("[? x ?]")); | 350 | mResolutionLabel->setTextArg("[DIMENSIONS]", std::string("[? x ?]")); |
351 | } | 351 | } |
352 | if (gAgent.isGodlike()) | ||
353 | { | ||
354 | std::string tstring = "Pick: "; | ||
355 | std::string image_id_string = mTexturep->getID().asString(); | ||
356 | tstring = tstring + image_id_string.replace(24, 35, 12, '*'); // hide last segment to discourage theft | ||
357 | setTitle(tstring); | ||
358 | } | ||
352 | } | 359 | } |
353 | } | 360 | } |
354 | 361 | ||
diff --git a/linden/indra/newview/lltool.cpp b/linden/indra/newview/lltool.cpp index 99dbe31..9dfd86b 100644 --- a/linden/indra/newview/lltool.cpp +++ b/linden/indra/newview/lltool.cpp | |||
@@ -64,7 +64,6 @@ LLTool::~LLTool() | |||
64 | } | 64 | } |
65 | } | 65 | } |
66 | 66 | ||
67 | |||
68 | BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) | 67 | BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) |
69 | { | 68 | { |
70 | if (gDebugClicks) | 69 | if (gDebugClicks) |
@@ -124,6 +123,20 @@ BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask) | |||
124 | // llinfos << "LLTool::handleRightMouseDown" << llendl; | 123 | // llinfos << "LLTool::handleRightMouseDown" << llendl; |
125 | return FALSE; | 124 | return FALSE; |
126 | } | 125 | } |
126 | |||
127 | BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask) | ||
128 | { | ||
129 | // by default, didn't handle it | ||
130 | // llinfos << "LLTool::handleMiddleMouseDown" << llendl; | ||
131 | return FALSE; | ||
132 | } | ||
133 | |||
134 | BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
135 | { | ||
136 | // by default, didn't handle it | ||
137 | // llinfos << "LLTool::handleMiddleMouseUp" << llendl; | ||
138 | return FALSE; | ||
139 | } | ||
127 | 140 | ||
128 | BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) | 141 | BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) |
129 | { | 142 | { |
diff --git a/linden/indra/newview/lltool.h b/linden/indra/newview/lltool.h index cf97fb4..73463ba 100644 --- a/linden/indra/newview/lltool.h +++ b/linden/indra/newview/lltool.h | |||
@@ -56,6 +56,9 @@ public: | |||
56 | // Virtual functions inherited from LLMouseHandler | 56 | // Virtual functions inherited from LLMouseHandler |
57 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | 57 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); |
58 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | 58 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); |
59 | virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask); | ||
60 | virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask); | ||
61 | |||
59 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 62 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
60 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | 63 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); |
61 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); | 64 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); |
diff --git a/linden/indra/newview/lltoolbar.cpp b/linden/indra/newview/lltoolbar.cpp index 8202191..6d04294 100644 --- a/linden/indra/newview/lltoolbar.cpp +++ b/linden/indra/newview/lltoolbar.cpp | |||
@@ -307,6 +307,20 @@ void LLToolBar::refresh() | |||
307 | } | 307 | } |
308 | gSavedSettings.setBOOL("BuildBtnState", build_mode); | 308 | gSavedSettings.setBOOL("BuildBtnState", build_mode); |
309 | 309 | ||
310 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | ||
311 | // Called per-frame so this really can't be slow | ||
312 | if (rlv_handler_t::isEnabled()) | ||
313 | { | ||
314 | // If we're rez-restricted, we can still edit => allow build floater | ||
315 | // If we're edit-restricted, we can still rez => allow build floater | ||
316 | childSetEnabled("build_btn", !(gRlvHandler.hasBehaviour(RLV_BHVR_REZ) && gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ); | ||
317 | |||
318 | childSetEnabled("map_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP) ); | ||
319 | childSetEnabled("radar_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP) ); | ||
320 | childSetEnabled("inventory_btn", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV) ); | ||
321 | } | ||
322 | // [/RLVa:KB] | ||
323 | |||
310 | updateCommunicateList(); | 324 | updateCommunicateList(); |
311 | } | 325 | } |
312 | 326 | ||
@@ -479,6 +493,14 @@ void LLToolBar::onClickSit(void*) | |||
479 | } | 493 | } |
480 | else | 494 | else |
481 | { | 495 | { |
496 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
497 | // NOTE-RLVa: dead code? | ||
498 | if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) | ||
499 | { | ||
500 | return; | ||
501 | } | ||
502 | // [/RLVa:KB] | ||
503 | |||
482 | // stand up | 504 | // stand up |
483 | gAgent.setFlying(FALSE); | 505 | gAgent.setFlying(FALSE); |
484 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 506 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp index 46b36d9..d23e29d 100644 --- a/linden/indra/newview/lltoolbrush.cpp +++ b/linden/indra/newview/lltoolbrush.cpp | |||
@@ -96,7 +96,24 @@ LLToolBrushLand::LLToolBrushLand() | |||
96 | mGotHover(FALSE), | 96 | mGotHover(FALSE), |
97 | mBrushSelected(FALSE) | 97 | mBrushSelected(FALSE) |
98 | { | 98 | { |
99 | mBrushIndex = gSavedSettings.getS32("LandBrushSize"); | 99 | mBrushSize = gSavedSettings.getF32("LandBrushSize"); |
100 | } | ||
101 | |||
102 | |||
103 | U8 LLToolBrushLand::getBrushIndex() | ||
104 | { | ||
105 | // find the best index for desired size | ||
106 | // (compatibility with old sims, brush_index is now depricated - DEV-8252) | ||
107 | U8 index = 0; | ||
108 | for (U8 i = 0; i < LAND_BRUSH_SIZE_COUNT; i++) | ||
109 | { | ||
110 | if (mBrushSize > LAND_BRUSH_SIZE[i]) | ||
111 | { | ||
112 | index = i; | ||
113 | } | ||
114 | } | ||
115 | |||
116 | return index; | ||
100 | } | 117 | } |
101 | 118 | ||
102 | void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, | 119 | void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, |
@@ -157,7 +174,6 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, | |||
157 | F32 seconds = (1.0f / gFPSClamped) * gSavedSettings.getF32("LandBrushForce"); | 174 | F32 seconds = (1.0f / gFPSClamped) * gSavedSettings.getF32("LandBrushForce"); |
158 | F32 x_pos = (F32)pos_region.mV[VX]; | 175 | F32 x_pos = (F32)pos_region.mV[VX]; |
159 | F32 y_pos = (F32)pos_region.mV[VY]; | 176 | F32 y_pos = (F32)pos_region.mV[VY]; |
160 | U8 brush_size = (U8)mBrushIndex; | ||
161 | LLMessageSystem* msg = gMessageSystem; | 177 | LLMessageSystem* msg = gMessageSystem; |
162 | msg->newMessageFast(_PREHASH_ModifyLand); | 178 | msg->newMessageFast(_PREHASH_ModifyLand); |
163 | msg->nextBlockFast(_PREHASH_AgentData); | 179 | msg->nextBlockFast(_PREHASH_AgentData); |
@@ -165,7 +181,7 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, | |||
165 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 181 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
166 | msg->nextBlockFast(_PREHASH_ModifyBlock); | 182 | msg->nextBlockFast(_PREHASH_ModifyBlock); |
167 | msg->addU8Fast(_PREHASH_Action, (U8)action); | 183 | msg->addU8Fast(_PREHASH_Action, (U8)action); |
168 | msg->addU8Fast(_PREHASH_BrushSize, brush_size); | 184 | msg->addU8Fast(_PREHASH_BrushSize, getBrushIndex()); |
169 | msg->addF32Fast(_PREHASH_Seconds, seconds); | 185 | msg->addF32Fast(_PREHASH_Seconds, seconds); |
170 | msg->addF32Fast(_PREHASH_Height, mStartingZ); | 186 | msg->addF32Fast(_PREHASH_Height, mStartingZ); |
171 | msg->nextBlockFast(_PREHASH_ParcelData); | 187 | msg->nextBlockFast(_PREHASH_ParcelData); |
@@ -174,6 +190,8 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, | |||
174 | msg->addF32Fast(_PREHASH_South, y_pos ); | 190 | msg->addF32Fast(_PREHASH_South, y_pos ); |
175 | msg->addF32Fast(_PREHASH_East, x_pos ); | 191 | msg->addF32Fast(_PREHASH_East, x_pos ); |
176 | msg->addF32Fast(_PREHASH_North, y_pos ); | 192 | msg->addF32Fast(_PREHASH_North, y_pos ); |
193 | msg->nextBlock("ModifyBlockExtended"); | ||
194 | msg->addF32("BrushSize", mBrushSize); | ||
177 | msg->sendMessage(regionp->getHost()); | 195 | msg->sendMessage(regionp->getHost()); |
178 | } | 196 | } |
179 | } | 197 | } |
@@ -294,7 +312,6 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() | |||
294 | regionp->forceUpdate(); | 312 | regionp->forceUpdate(); |
295 | 313 | ||
296 | // tell the simulator what we've done | 314 | // tell the simulator what we've done |
297 | U8 brush_size = (U8)mBrushIndex; | ||
298 | LLMessageSystem* msg = gMessageSystem; | 315 | LLMessageSystem* msg = gMessageSystem; |
299 | msg->newMessageFast(_PREHASH_ModifyLand); | 316 | msg->newMessageFast(_PREHASH_ModifyLand); |
300 | msg->nextBlockFast(_PREHASH_AgentData); | 317 | msg->nextBlockFast(_PREHASH_AgentData); |
@@ -302,7 +319,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() | |||
302 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 319 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
303 | msg->nextBlockFast(_PREHASH_ModifyBlock); | 320 | msg->nextBlockFast(_PREHASH_ModifyBlock); |
304 | msg->addU8Fast(_PREHASH_Action, (U8)action); | 321 | msg->addU8Fast(_PREHASH_Action, (U8)action); |
305 | msg->addU8Fast(_PREHASH_BrushSize, brush_size); | 322 | msg->addU8Fast(_PREHASH_BrushSize, getBrushIndex()); |
306 | msg->addF32Fast(_PREHASH_Seconds, seconds); | 323 | msg->addF32Fast(_PREHASH_Seconds, seconds); |
307 | msg->addF32Fast(_PREHASH_Height, mStartingZ); | 324 | msg->addF32Fast(_PREHASH_Height, mStartingZ); |
308 | 325 | ||
@@ -327,6 +344,9 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() | |||
327 | msg->addF32Fast(_PREHASH_East, max_region.mV[VX] ); | 344 | msg->addF32Fast(_PREHASH_East, max_region.mV[VX] ); |
328 | msg->addF32Fast(_PREHASH_North, max_region.mV[VY] ); | 345 | msg->addF32Fast(_PREHASH_North, max_region.mV[VY] ); |
329 | } | 346 | } |
347 | |||
348 | msg->nextBlock("ModifyBlockExtended"); | ||
349 | msg->addF32("BrushSize", mBrushSize); | ||
330 | 350 | ||
331 | msg->sendMessage(regionp->getHost()); | 351 | msg->sendMessage(regionp->getHost()); |
332 | } | 352 | } |
@@ -447,7 +467,8 @@ void LLToolBrushLand::render() | |||
447 | spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 ); | 467 | spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 ); |
448 | spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 ); | 468 | spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 ); |
449 | 469 | ||
450 | mBrushIndex = gSavedSettings.getS32("LandBrushSize"); | 470 | mBrushSize = gSavedSettings.getF32("LandBrushSize"); |
471 | |||
451 | region_list_t regions; | 472 | region_list_t regions; |
452 | determineAffectedRegions(regions, spot); | 473 | determineAffectedRegions(regions, spot); |
453 | 474 | ||
@@ -499,7 +520,7 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region | |||
499 | 520 | ||
500 | S32 i = (S32) pos_region.mV[VX]; | 521 | S32 i = (S32) pos_region.mV[VX]; |
501 | S32 j = (S32) pos_region.mV[VY]; | 522 | S32 j = (S32) pos_region.mV[VY]; |
502 | S32 half_edge = llfloor(LAND_BRUSH_SIZE[mBrushIndex]); | 523 | S32 half_edge = llfloor(mBrushSize); |
503 | S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction"); | 524 | S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction"); |
504 | F32 force = gSavedSettings.getF32("LandBrushForce"); // .1 to 100? | 525 | F32 force = gSavedSettings.getF32("LandBrushForce"); // .1 to 100? |
505 | 526 | ||
@@ -556,27 +577,27 @@ void LLToolBrushLand::determineAffectedRegions(region_list_t& regions, | |||
556 | const LLVector3d& spot ) const | 577 | const LLVector3d& spot ) const |
557 | { | 578 | { |
558 | LLVector3d corner(spot); | 579 | LLVector3d corner(spot); |
559 | corner.mdV[VX] -= (LAND_BRUSH_SIZE[mBrushIndex] / 2); | 580 | corner.mdV[VX] -= (mBrushSize / 2); |
560 | corner.mdV[VY] -= (LAND_BRUSH_SIZE[mBrushIndex] / 2); | 581 | corner.mdV[VY] -= (mBrushSize / 2); |
561 | LLViewerRegion* region = NULL; | 582 | LLViewerRegion* region = NULL; |
562 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); | 583 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); |
563 | if(region && regions.find(region) == regions.end()) | 584 | if(region && regions.find(region) == regions.end()) |
564 | { | 585 | { |
565 | regions.insert(region); | 586 | regions.insert(region); |
566 | } | 587 | } |
567 | corner.mdV[VY] += LAND_BRUSH_SIZE[mBrushIndex]; | 588 | corner.mdV[VY] += mBrushSize; |
568 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); | 589 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); |
569 | if(region && regions.find(region) == regions.end()) | 590 | if(region && regions.find(region) == regions.end()) |
570 | { | 591 | { |
571 | regions.insert(region); | 592 | regions.insert(region); |
572 | } | 593 | } |
573 | corner.mdV[VX] += LAND_BRUSH_SIZE[mBrushIndex]; | 594 | corner.mdV[VX] += mBrushSize; |
574 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); | 595 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); |
575 | if(region && regions.find(region) == regions.end()) | 596 | if(region && regions.find(region) == regions.end()) |
576 | { | 597 | { |
577 | regions.insert(region); | 598 | regions.insert(region); |
578 | } | 599 | } |
579 | corner.mdV[VY] -= LAND_BRUSH_SIZE[mBrushIndex]; | 600 | corner.mdV[VY] -= mBrushSize; |
580 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); | 601 | region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); |
581 | if(region && regions.find(region) == regions.end()) | 602 | if(region && regions.find(region) == regions.end()) |
582 | { | 603 | { |
diff --git a/linden/indra/newview/lltoolbrush.h b/linden/indra/newview/lltoolbrush.h index 8df4b67..f25d6b9 100644 --- a/linden/indra/newview/lltoolbrush.h +++ b/linden/indra/newview/lltoolbrush.h | |||
@@ -95,11 +95,14 @@ protected: | |||
95 | F32 mStartingZ; | 95 | F32 mStartingZ; |
96 | S32 mMouseX; | 96 | S32 mMouseX; |
97 | S32 mMouseY; | 97 | S32 mMouseY; |
98 | S32 mBrushIndex; | 98 | F32 mBrushSize; |
99 | BOOL mGotHover; | 99 | BOOL mGotHover; |
100 | BOOL mBrushSelected; | 100 | BOOL mBrushSelected; |
101 | // Order doesn't matter and we do check for existance of regions, so use a set | 101 | // Order doesn't matter and we do check for existance of regions, so use a set |
102 | region_list_t mLastAffectedRegions; | 102 | region_list_t mLastAffectedRegions; |
103 | |||
104 | private: | ||
105 | U8 getBrushIndex(); | ||
103 | }; | 106 | }; |
104 | 107 | ||
105 | 108 | ||
diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index efd8060..c99ccbf 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp | |||
@@ -1267,6 +1267,15 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, | |||
1267 | return; | 1267 | return; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | |||
1271 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
1272 | // Fallback in case there's a new code path that leads here (see behaviour notes) | ||
1273 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
1274 | { | ||
1275 | return; | ||
1276 | } | ||
1277 | // [/RLVa:KB] | ||
1278 | |||
1270 | //llinfos << "Rezzing object" << llendl; | 1279 | //llinfos << "Rezzing object" << llendl; |
1271 | make_ui_sound("UISndObjectRezIn"); | 1280 | make_ui_sound("UISndObjectRezIn"); |
1272 | LLViewerInventoryItem* item; | 1281 | LLViewerInventoryItem* item; |
@@ -1933,6 +1942,23 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL | |||
1933 | BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); | 1942 | BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); |
1934 | BOOL attached = obj->isAttachment(); | 1943 | BOOL attached = obj->isAttachment(); |
1935 | BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; | 1944 | BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; |
1945 | |||
1946 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1947 | if (rlv_handler_t::isEnabled()) | ||
1948 | { | ||
1949 | if (!gRlvHandler.isDetachable(obj)) | ||
1950 | { | ||
1951 | return ACCEPT_NO_LOCKED; // Disallow inventory drops on a locked attachment | ||
1952 | } | ||
1953 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) | ||
1954 | { | ||
1955 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
1956 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == obj->getRootEdit()) ) | ||
1957 | return ACCEPT_NO_LOCKED; // ... or on a linkset the avie is sitting on under @unsit=n/@sittp=n | ||
1958 | } | ||
1959 | } | ||
1960 | // [/RLVa:KB] | ||
1961 | |||
1936 | if(attached && !unrestricted) | 1962 | if(attached && !unrestricted) |
1937 | { | 1963 | { |
1938 | return ACCEPT_NO_LOCKED; | 1964 | return ACCEPT_NO_LOCKED; |
@@ -1988,6 +2014,15 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( | |||
1988 | return ACCEPT_NO; | 2014 | return ACCEPT_NO; |
1989 | } | 2015 | } |
1990 | 2016 | ||
2017 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | ||
2018 | LLViewerJointAttachment* pAttachPt = NULL; | ||
2019 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) && | ||
2020 | ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || (!gRlvHandler.isDetachable(pAttachPt->getObject())) ) ) | ||
2021 | { | ||
2022 | return ACCEPT_NO_LOCKED; | ||
2023 | } | ||
2024 | // [/RLVa:KB] | ||
2025 | |||
1991 | if( drop ) | 2026 | if( drop ) |
1992 | { | 2027 | { |
1993 | if(mSource == SOURCE_LIBRARY) | 2028 | if(mSource == SOURCE_LIBRARY) |
@@ -2003,7 +2038,10 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( | |||
2003 | } | 2038 | } |
2004 | else | 2039 | else |
2005 | { | 2040 | { |
2006 | rez_attachment(item, 0); | 2041 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-1.0.0c |
2042 | rez_attachment(item, pAttachPt); | ||
2043 | // [/RLVa:KB] | ||
2044 | //rez_attachment(item, 0); | ||
2007 | } | 2045 | } |
2008 | } | 2046 | } |
2009 | return ACCEPT_YES_SINGLE; | 2047 | return ACCEPT_YES_SINGLE; |
@@ -2013,6 +2051,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( | |||
2013 | EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( | 2051 | EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( |
2014 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) | 2052 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) |
2015 | { | 2053 | { |
2054 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2055 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
2056 | { | ||
2057 | return ACCEPT_NO_LOCKED; | ||
2058 | } | ||
2059 | // [/RLVa:KB] | ||
2060 | |||
2016 | if (mSource == SOURCE_WORLD) | 2061 | if (mSource == SOURCE_WORLD) |
2017 | { | 2062 | { |
2018 | return dad3dRezFromObjectOnLand(obj, face, mask, drop); | 2063 | return dad3dRezFromObjectOnLand(obj, face, mask, drop); |
@@ -2076,6 +2121,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( | |||
2076 | EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( | 2121 | EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( |
2077 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) | 2122 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) |
2078 | { | 2123 | { |
2124 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2125 | // NOTE: if (mask & MASK_CONTROL) then it's a drop rather than a rez, so we let that pass through | ||
2126 | if ( !(mask & MASK_CONTROL) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) | ||
2127 | { | ||
2128 | return ACCEPT_NO_LOCKED; | ||
2129 | } | ||
2130 | // [/RLVa:KB] | ||
2131 | |||
2079 | // handle objects coming from object inventory | 2132 | // handle objects coming from object inventory |
2080 | if (mSource == SOURCE_WORLD) | 2133 | if (mSource == SOURCE_WORLD) |
2081 | { | 2134 | { |
@@ -2281,6 +2334,20 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( | |||
2281 | return ACCEPT_NO; | 2334 | return ACCEPT_NO; |
2282 | } | 2335 | } |
2283 | 2336 | ||
2337 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
2338 | // (See behaviour notes for the "code path", this is just to give a visual indication on whether or not the drop is allowed) | ||
2339 | if (rlv_handler_t::isEnabled()) | ||
2340 | { | ||
2341 | EWearableType type = (EWearableType)item->getFlags(); | ||
2342 | |||
2343 | // Block if: 1) we can't wear on that layer; 2) or if we're already wearing something there we can't take off | ||
2344 | if ( (!gRlvHandler.isWearable(type)) || ((gAgent.getWearable(type)) && (!gRlvHandler.isRemovable(type))) ) | ||
2345 | { | ||
2346 | return ACCEPT_NO_LOCKED; | ||
2347 | } | ||
2348 | } | ||
2349 | // [/RLVa:KB] | ||
2350 | |||
2284 | if( drop ) | 2351 | if( drop ) |
2285 | { | 2352 | { |
2286 | // Don't wear anything until initial wearables are loaded, can | 2353 | // Don't wear anything until initial wearables are loaded, can |
@@ -2645,6 +2712,14 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( | |||
2645 | EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( | 2712 | EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( |
2646 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) | 2713 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) |
2647 | { | 2714 | { |
2715 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2716 | // NOTE: it looks like this is only ever called from LLToolDragAndDrop::dad3dRezObjectOnLand() making this a bit redundant | ||
2717 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
2718 | { | ||
2719 | return ACCEPT_NO_LOCKED; | ||
2720 | } | ||
2721 | // [/RLVa:KB] | ||
2722 | |||
2648 | lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << llendl; | 2723 | lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << llendl; |
2649 | LLViewerInventoryItem* item = NULL; | 2724 | LLViewerInventoryItem* item = NULL; |
2650 | LLViewerInventoryCategory* cat = NULL; | 2725 | LLViewerInventoryCategory* cat = NULL; |
@@ -2666,6 +2741,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( | |||
2666 | EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( | 2741 | EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( |
2667 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) | 2742 | LLViewerObject* obj, S32 face, MASK mask, BOOL drop) |
2668 | { | 2743 | { |
2744 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2745 | // NOTE: it looks like this is only ever called from LLToolDragAndDrop::dad3dRezObjectOnObject) making this a bit redundant | ||
2746 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
2747 | { | ||
2748 | return ACCEPT_NO_LOCKED; | ||
2749 | } | ||
2750 | // [/RLVa:KB] | ||
2751 | |||
2669 | lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << llendl; | 2752 | lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << llendl; |
2670 | LLViewerInventoryItem* item; | 2753 | LLViewerInventoryItem* item; |
2671 | LLViewerInventoryCategory* cat; | 2754 | LLViewerInventoryCategory* cat; |
diff --git a/linden/indra/newview/lltoolface.cpp b/linden/indra/newview/lltoolface.cpp index d5e4f81..41f2b0d 100644 --- a/linden/indra/newview/lltoolface.cpp +++ b/linden/indra/newview/lltoolface.cpp | |||
@@ -99,6 +99,16 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info) | |||
99 | return; | 99 | return; |
100 | } | 100 | } |
101 | 101 | ||
102 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
103 | if ( (rlv_handler_t::isEnabled()) && | ||
104 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || | ||
105 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!hit_obj->isAttachment()) || (!hit_obj->permYouOwner())) && | ||
106 | (dist_vec_squared(gAgent.getPositionAgent(), hit_obj->getPositionRegion() + pick_info.mObjectOffset) > 1.5f * 1.5f) ))) | ||
107 | { | ||
108 | return; | ||
109 | } | ||
110 | // [/RLVa:KB] | ||
111 | |||
102 | // ...clicked on a world object, try to pick the appropriate face | 112 | // ...clicked on a world object, try to pick the appropriate face |
103 | 113 | ||
104 | if (pick_info.mKeyMask & MASK_SHIFT) | 114 | if (pick_info.mKeyMask & MASK_SHIFT) |
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index a6695f9..6c0a557 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp | |||
@@ -185,7 +185,12 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) | |||
185 | return FALSE; | 185 | return FALSE; |
186 | } | 186 | } |
187 | 187 | ||
188 | if (objectp->isAvatar()) | 188 | //if (objectp->isAvatar()) |
189 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
190 | if ( (objectp->isAvatar()) || | ||
191 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!objectp->isAttachment()) || (!objectp->permYouOwner())) && | ||
192 | (dist_vec_squared(gAgent.getPositionAgent(), mGrabPick.mIntersection) > 1.5f * 1.5f) ) ) | ||
193 | // [/RLVa:KB] | ||
189 | { | 194 | { |
190 | if (gGrabTransientTool) | 195 | if (gGrabTransientTool) |
191 | { | 196 | { |
@@ -420,6 +425,23 @@ BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask) | |||
420 | return TRUE; | 425 | return TRUE; |
421 | } | 426 | } |
422 | 427 | ||
428 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
429 | // Don't allow dragging beyond 1.5m under @fartouch=n | ||
430 | LLViewerObject* pObj; | ||
431 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (GRAB_INACTIVE != mMode) && (hasMouseCapture()) && | ||
432 | ((pObj = mGrabPick.getObject()) != NULL) && (!pObj->isDead()) && (!pObj->isHUDAttachment()) && | ||
433 | (dist_vec_squared(gAgent.getPositionAgent(), pObj->getPositionRegion() + mGrabPick.mObjectOffset) > 1.5f * 1.5f) ) | ||
434 | { | ||
435 | if (gGrabTransientTool) | ||
436 | { | ||
437 | // Prevent the grab tool from popping up as soon as we kill the drag operation | ||
438 | gBasicToolset->selectTool(gGrabTransientTool); | ||
439 | gGrabTransientTool = NULL; | ||
440 | } | ||
441 | setMouseCapture(FALSE); | ||
442 | } | ||
443 | // [/RLVa:KB] | ||
444 | |||
423 | // Do the right hover based on mode | 445 | // Do the right hover based on mode |
424 | switch( mMode ) | 446 | switch( mMode ) |
425 | { | 447 | { |
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 27d1c4c..b32169d 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -165,6 +165,15 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
165 | // If it's a left-click, and we have a special action, do it. | 165 | // If it's a left-click, and we have a special action, do it. |
166 | if (useClickAction(always_show, mask, object, parent)) | 166 | if (useClickAction(always_show, mask, object, parent)) |
167 | { | 167 | { |
168 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
169 | // Block left-click special actions (fallback code really since LLToolSelect::handleObjectSelection() wouldn't select it anyway) | ||
170 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && | ||
171 | (dist_vec_squared(gAgent.getPositionAgent(), mPick.mIntersection) > 1.5f * 1.5f) ) | ||
172 | { | ||
173 | return TRUE; | ||
174 | } | ||
175 | // [/RLVa:KB] | ||
176 | |||
168 | mClickAction = 0; | 177 | mClickAction = 0; |
169 | if (object && object->getClickAction()) | 178 | if (object && object->getClickAction()) |
170 | { | 179 | { |
@@ -182,7 +191,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
182 | // nothing | 191 | // nothing |
183 | break; | 192 | break; |
184 | case CLICK_ACTION_SIT: | 193 | case CLICK_ACTION_SIT: |
185 | if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting | 194 | if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting) && !gSavedSettings.getBOOL("BlockClickSit")) // agent not already sitting |
186 | { | 195 | { |
187 | handle_sit_or_stand(); | 196 | handle_sit_or_stand(); |
188 | return TRUE; | 197 | return TRUE; |
@@ -344,7 +353,22 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
344 | //gMutePieMenu->setLabel("Mute"); | 353 | //gMutePieMenu->setLabel("Mute"); |
345 | } | 354 | } |
346 | 355 | ||
347 | gPieAvatar->show(x, y, mPieMouseButtonDown); | 356 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
357 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
358 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound | ||
359 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) | ||
360 | { | ||
361 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
362 | gPieAvatar->show(x, y, mPieMouseButtonDown); | ||
363 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
364 | } | ||
365 | else | ||
366 | { | ||
367 | make_ui_sound("UISndInvalidOp"); | ||
368 | } | ||
369 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
370 | // [/RLVa:KB] | ||
371 | |||
348 | } | 372 | } |
349 | else if (object->isAttachment() && !object->isHUDAttachment()) | 373 | else if (object->isAttachment() && !object->isHUDAttachment()) |
350 | { | 374 | { |
@@ -374,15 +398,32 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
374 | //gMuteObjectPieMenu->setLabel("Mute"); | 398 | //gMuteObjectPieMenu->setLabel("Mute"); |
375 | } | 399 | } |
376 | 400 | ||
377 | gPieObject->show(x, y, mPieMouseButtonDown); | 401 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f |
378 | 402 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | |
379 | // VEFFECT: ShowPie object | 403 | // If we have an empty selection under @fartouch=n don't show the pie menu but play the "operation block" sound |
380 | // Don't show when you click on someone else, it freaks them | 404 | // (not entirely accurate in case of Tools / Select Only XXX [see LLToolSelect::handleObjectSelection()] |
381 | // out. | 405 | if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) || (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) ) |
382 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | 406 | { |
383 | effectp->setPositionGlobal(mPick.mPosGlobal); | 407 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK |
384 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | 408 | // [/RLVa:KB] |
385 | effectp->setDuration(0.25f); | 409 | gPieObject->show(x, y, mPieMouseButtonDown); |
410 | |||
411 | // VEFFECT: ShowPie object | ||
412 | // Don't show when you click on someone else, it freaks them | ||
413 | // out. | ||
414 | LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); | ||
415 | effectp->setPositionGlobal(mPick.mPosGlobal); | ||
416 | effectp->setColor(LLColor4U(gAgent.getEffectColor())); | ||
417 | effectp->setDuration(0.25f); | ||
418 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
419 | #ifdef RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
420 | } | ||
421 | else | ||
422 | { | ||
423 | make_ui_sound("UISndInvalidOp"); | ||
424 | } | ||
425 | #endif // RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK | ||
426 | // [/RLVa:KB] | ||
386 | } | 427 | } |
387 | } | 428 | } |
388 | 429 | ||
@@ -635,7 +676,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
635 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; | 676 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; |
636 | } | 677 | } |
637 | 678 | ||
638 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) | 679 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport")) |
639 | { | 680 | { |
640 | if (mPick.mPickType == LLPickInfo::PICK_LAND | 681 | if (mPick.mPickType == LLPickInfo::PICK_LAND |
641 | && !mPick.mPosGlobal.isExactlyZero()) | 682 | && !mPick.mPosGlobal.isExactlyZero()) |
@@ -646,9 +687,10 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
646 | else if (mPick.mObjectID.notNull() | 687 | else if (mPick.mObjectID.notNull() |
647 | && !mPick.mPosGlobal.isExactlyZero()) | 688 | && !mPick.mPosGlobal.isExactlyZero()) |
648 | { | 689 | { |
649 | // Hit an object | 690 | //Zwagoth: No more teleport to HUD attachments. >:o |
650 | // HACK: Call the last hit position the point we hit on the object | 691 | if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) |
651 | //gLastHitPosGlobal += gLastHitObjectOffset; | 692 | return FALSE; |
693 | |||
652 | handle_go_to(); | 694 | handle_go_to(); |
653 | return TRUE; | 695 | return TRUE; |
654 | } | 696 | } |
diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp index 297556e..840de23 100644 --- a/linden/indra/newview/lltoolplacer.cpp +++ b/linden/indra/newview/lltoolplacer.cpp | |||
@@ -124,6 +124,14 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, | |||
124 | return FALSE; | 124 | return FALSE; |
125 | } | 125 | } |
126 | 126 | ||
127 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
128 | // NOTE: don't use surface_pos_global since for prims it will be the center of the prim while we need center + offset | ||
129 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > 1.5f * 1.5f) ) | ||
130 | { | ||
131 | return FALSE; | ||
132 | } | ||
133 | // [/RLVa:KB] | ||
134 | |||
127 | // Find the sim where the surface lives. | 135 | // Find the sim where the surface lives. |
128 | LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global); | 136 | LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global); |
129 | if (!regionp) | 137 | if (!regionp) |
@@ -255,7 +263,10 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) | |||
255 | { | 263 | { |
256 | flags |= FLAGS_USE_PHYSICS; | 264 | flags |= FLAGS_USE_PHYSICS; |
257 | } | 265 | } |
258 | if (create_selected) | 266 | //if (create_selected) |
267 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | Added: RLVa-1.0.0b | ||
268 | if ( (create_selected) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) | ||
269 | // [/RLVa:KB] | ||
259 | { | 270 | { |
260 | flags |= FLAGS_CREATE_SELECTED; | 271 | flags |= FLAGS_CREATE_SELECTED; |
261 | } | 272 | } |
@@ -513,6 +524,13 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) | |||
513 | { | 524 | { |
514 | BOOL added = TRUE; | 525 | BOOL added = TRUE; |
515 | 526 | ||
527 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
528 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
529 | { | ||
530 | return TRUE; // Callers seem to expect a "did you handle it?" so we return TRUE rather than FALSE | ||
531 | } | ||
532 | // [/RLVa:KB] | ||
533 | |||
516 | if (gSavedSettings.getBOOL("CreateToolCopySelection")) | 534 | if (gSavedSettings.getBOOL("CreateToolCopySelection")) |
517 | { | 535 | { |
518 | added = addDuplicate(x, y); | 536 | added = addDuplicate(x, y); |
diff --git a/linden/indra/newview/lltoolselect.cpp b/linden/indra/newview/lltoolselect.cpp index b4e9562..389ae59 100644 --- a/linden/indra/newview/lltoolselect.cpp +++ b/linden/indra/newview/lltoolselect.cpp | |||
@@ -50,6 +50,10 @@ | |||
50 | #include "llvoavatar.h" | 50 | #include "llvoavatar.h" |
51 | #include "llworld.h" | 51 | #include "llworld.h" |
52 | 52 | ||
53 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
54 | #include "llfloatertools.h" | ||
55 | // [/RLVa:KB] | ||
56 | |||
53 | // Globals | 57 | // Globals |
54 | extern BOOL gAllowSelectAvatar; | 58 | extern BOOL gAllowSelectAvatar; |
55 | 59 | ||
@@ -82,6 +86,51 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi | |||
82 | { | 86 | { |
83 | object = object->getRootEdit(); | 87 | object = object->getRootEdit(); |
84 | } | 88 | } |
89 | |||
90 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
91 | if (rlv_handler_t::isEnabled()) | ||
92 | { | ||
93 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
94 | { | ||
95 | if (!temp_select) | ||
96 | { | ||
97 | return LLSelectMgr::getInstance()->getSelection(); | ||
98 | } | ||
99 | else | ||
100 | { | ||
101 | // Temporary selection, but if the build floater is open then it'll be permanent so get rid of the floater | ||
102 | if (gFloaterTools->getVisible()) | ||
103 | { | ||
104 | // Copy/paste from toggle_build_mode() | ||
105 | gAgent.resetView(false); | ||
106 | gFloaterTools->close(); | ||
107 | gViewerWindow->showCursor(); | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | |||
112 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (object) && ((!object->isAttachment()) || (!object->permYouOwner())) && | ||
113 | (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) ) | ||
114 | { | ||
115 | // NOTE-RLVa: see behaviour notes for a rather lengthy explanation of why we're doing things this way | ||
116 | //if (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion() + pick.mObjectOffset) > 1.5f * 1.5f) | ||
117 | if (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) | ||
118 | { | ||
119 | if ( (gFloaterTools->getVisible()) && (pick.mKeyMask != MASK_SHIFT) && (pick.mKeyMask != MASK_CONTROL) ) | ||
120 | LLSelectMgr::getInstance()->deselectAll(); | ||
121 | return LLSelectMgr::getInstance()->getSelection(); | ||
122 | } | ||
123 | else if (gFloaterTools->getVisible()) | ||
124 | { | ||
125 | // Copy/paste from toggle_build_mode() | ||
126 | gAgent.resetView(false); | ||
127 | gFloaterTools->close(); | ||
128 | gViewerWindow->showCursor(); | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | // [/RLVa:KB] | ||
133 | |||
85 | BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); | 134 | BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); |
86 | BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); | 135 | BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); |
87 | 136 | ||
diff --git a/linden/indra/newview/lltracker.cpp b/linden/indra/newview/lltracker.cpp index bd2f659..cf98c7a 100644 --- a/linden/indra/newview/lltracker.cpp +++ b/linden/indra/newview/lltracker.cpp | |||
@@ -180,8 +180,12 @@ void LLTracker::render3D() | |||
180 | } | 180 | } |
181 | else | 181 | else |
182 | { | 182 | { |
183 | renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, | 183 | //renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, |
184 | instance()->mBeaconText, instance()->mTrackedLocationName ); | 184 | // instance()->mBeaconText, instance()->mTrackedLocationName ); |
185 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a | ||
186 | renderBeacon(instance()->mTrackedPositionGlobal, gTrackColor, instance()->mBeaconText, | ||
187 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? instance()->mTrackedLocationName : rlv_handler_t::cstrHidden); | ||
188 | // [/RLVa:KB] | ||
185 | } | 189 | } |
186 | } | 190 | } |
187 | 191 | ||
@@ -222,8 +226,12 @@ void LLTracker::render3D() | |||
222 | // and back again | 226 | // and back again |
223 | instance()->mHasReachedLandmark = FALSE; | 227 | instance()->mHasReachedLandmark = FALSE; |
224 | } | 228 | } |
225 | renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, | 229 | //renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, |
226 | instance()->mBeaconText, instance()->mTrackedLandmarkName ); | 230 | // instance()->mBeaconText, instance()->mTrackedLandmarkName ); |
231 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a | ||
232 | renderBeacon( instance()->mTrackedPositionGlobal, gTrackColor, instance()->mBeaconText, | ||
233 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? instance()->mTrackedLandmarkName : rlv_handler_t::cstrHidden); | ||
234 | // [/RLVa:KB] | ||
227 | } | 235 | } |
228 | } | 236 | } |
229 | else | 237 | else |
@@ -251,8 +259,12 @@ void LLTracker::render3D() | |||
251 | } | 259 | } |
252 | else | 260 | else |
253 | { | 261 | { |
254 | renderBeacon( av_tracker.getGlobalPos(), gTrackColor, | 262 | //renderBeacon( av_tracker.getGlobalPos(), gTrackColor, |
255 | instance()->mBeaconText, av_tracker.getName() ); | 263 | // instance()->mBeaconText, av_tracker.getName() ); |
264 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a | ||
265 | renderBeacon( av_tracker.getGlobalPos(), gTrackColor, instance()->mBeaconText, | ||
266 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? av_tracker.getName() : rlv_handler_t::cstrHidden); | ||
267 | // [/RLVa:KB] | ||
256 | } | 268 | } |
257 | } | 269 | } |
258 | else | 270 | else |
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 89ae973..eb8b1d5 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp | |||
@@ -423,6 +423,20 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) | |||
423 | return true; | 423 | return true; |
424 | } | 424 | } |
425 | 425 | ||
426 | // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | ||
427 | bool rlvHandleEnableLegacyNamingChanged(const LLSD& newvalue) | ||
428 | { | ||
429 | rlv_handler_t::fLegacyNaming = newvalue.asBoolean(); | ||
430 | return true; | ||
431 | } | ||
432 | |||
433 | bool rlvHandleShowNameTagsChanged(const LLSD& newvalue) | ||
434 | { | ||
435 | RlvSettings::fShowNameTags = newvalue.asBoolean(); | ||
436 | return true; | ||
437 | } | ||
438 | // [/RLVa:KB] | ||
439 | |||
426 | bool handleMediaDebugLevelChanged(const LLSD& newvalue) | 440 | bool handleMediaDebugLevelChanged(const LLSD& newvalue) |
427 | { | 441 | { |
428 | LLMediaManager *mgr = LLMediaManager::getInstance(); | 442 | LLMediaManager *mgr = LLMediaManager::getInstance(); |
@@ -566,6 +580,13 @@ void settings_setup_listeners() | |||
566 | gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); | 580 | gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); |
567 | gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); | 581 | gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); |
568 | gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1)); | 582 | gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1)); |
583 | |||
584 | // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | ||
585 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) | ||
586 | gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&rlvHandleEnableLegacyNamingChanged, _1)); | ||
587 | if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS)) | ||
588 | gSavedSettings.getControl(RLV_SETTING_SHOWNAMETAGS)->getSignal()->connect(boost::bind(&rlvHandleShowNameTagsChanged, _1)); | ||
589 | // [/RLVa:KB] | ||
569 | } | 590 | } |
570 | 591 | ||
571 | template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) | 592 | template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) |
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 96591a2..4b352a4 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -675,7 +675,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
675 | gSky.updateSky(); | 675 | gSky.updateSky(); |
676 | } | 676 | } |
677 | 677 | ||
678 | if(gUseWireframe) | 678 | // if(gUseWireframe) |
679 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
680 | if ( (gUseWireframe) && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment()) ) ) | ||
681 | // [/RLVa:KB] | ||
679 | { | 682 | { |
680 | glClearColor(0.5f, 0.5f, 0.5f, 0.f); | 683 | glClearColor(0.5f, 0.5f, 0.5f, 0.f); |
681 | glClear(GL_COLOR_BUFFER_BIT); | 684 | glClear(GL_COLOR_BUFFER_BIT); |
@@ -802,7 +805,12 @@ void render_hud_attachments() | |||
802 | glh::matrix4f current_mod = glh_get_current_modelview(); | 805 | glh::matrix4f current_mod = glh_get_current_modelview(); |
803 | 806 | ||
804 | // clamp target zoom level to reasonable values | 807 | // clamp target zoom level to reasonable values |
805 | gAgent.mHUDTargetZoom = llclamp(gAgent.mHUDTargetZoom, 0.1f, 1.f); | 808 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
809 | // TODO-RLVa: while hasLockedHUD() isn't slow this is called per frame so find a better way | ||
810 | gAgent.mHUDTargetZoom = llclamp(gAgent.mHUDTargetZoom, | ||
811 | ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedHUD()) ) ? 0.1f : 0.85f, 1.f); | ||
812 | // [/RLVa:KB] | ||
813 | //gAgent.mHUDTargetZoom = llclamp(gAgent.mHUDTargetZoom, 0.1f, 1.f); | ||
806 | // smoothly interpolate current zoom level | 814 | // smoothly interpolate current zoom level |
807 | gAgent.mHUDCurZoom = lerp(gAgent.mHUDCurZoom, gAgent.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f)); | 815 | gAgent.mHUDCurZoom = lerp(gAgent.mHUDCurZoom, gAgent.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f)); |
808 | 816 | ||
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2940bdd..8a92963 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -209,6 +209,10 @@ | |||
209 | #include "llwaterparammanager.h" | 209 | #include "llwaterparammanager.h" |
210 | 210 | ||
211 | #include "lltexlayer.h" | 211 | #include "lltexlayer.h" |
212 | #include "primbackup.h" | ||
213 | |||
214 | #include "jcfloater_animation_list.h" | ||
215 | #include "llfloaterassetbrowser.h" | ||
212 | 216 | ||
213 | void init_client_menu(LLMenuGL* menu); | 217 | void init_client_menu(LLMenuGL* menu); |
214 | void init_server_menu(LLMenuGL* menu); | 218 | void init_server_menu(LLMenuGL* menu); |
@@ -219,6 +223,13 @@ void init_debug_ui_menu(LLMenuGL* menu); | |||
219 | void init_debug_xui_menu(LLMenuGL* menu); | 223 | void init_debug_xui_menu(LLMenuGL* menu); |
220 | void init_debug_avatar_menu(LLMenuGL* menu); | 224 | void init_debug_avatar_menu(LLMenuGL* menu); |
221 | void init_debug_baked_texture_menu(LLMenuGL* menu); | 225 | void init_debug_baked_texture_menu(LLMenuGL* menu); |
226 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
227 | #ifdef RLV_DEBUG_TESTS | ||
228 | #include "rlvtest.h" | ||
229 | #endif // RLV_DEBUG_TESTS | ||
230 | #include "rlvfloaterbehaviour.h" | ||
231 | void init_debug_rlva_menu(LLMenuGL* menu); | ||
232 | // [/RLVa:KB] | ||
222 | 233 | ||
223 | BOOL enable_land_build(void*); | 234 | BOOL enable_land_build(void*); |
224 | BOOL enable_object_build(void*); | 235 | BOOL enable_object_build(void*); |
@@ -825,6 +836,19 @@ void init_client_menu(LLMenuGL* menu) | |||
825 | init_debug_world_menu(sub_menu); | 836 | init_debug_world_menu(sub_menu); |
826 | menu->appendMenu(sub_menu); | 837 | menu->appendMenu(sub_menu); |
827 | 838 | ||
839 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b | ||
840 | #ifdef RLV_ADVANCED_MENU | ||
841 | if (rlv_handler_t::isEnabled()) | ||
842 | { | ||
843 | sub_menu = new LLMenuGL("RLVa"); | ||
844 | init_debug_rlva_menu(sub_menu); | ||
845 | menu->appendMenu(sub_menu); | ||
846 | sub_menu->setVisible(rlv_handler_t::isEnabled()); | ||
847 | sub_menu->setEnabled(rlv_handler_t::isEnabled()); | ||
848 | } | ||
849 | #endif // RLV_ADVANCED_MENU | ||
850 | // [/RLVa:KB] | ||
851 | |||
828 | sub_menu = new LLMenuGL("UI"); | 852 | sub_menu = new LLMenuGL("UI"); |
829 | init_debug_ui_menu(sub_menu); | 853 | init_debug_ui_menu(sub_menu); |
830 | menu->appendMenu(sub_menu); | 854 | menu->appendMenu(sub_menu); |
@@ -919,6 +943,13 @@ void init_client_menu(LLMenuGL* menu) | |||
919 | &menu_check_control, | 943 | &menu_check_control, |
920 | (void*)"ShowConsoleWindow")); | 944 | (void*)"ShowConsoleWindow")); |
921 | 945 | ||
946 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e | ||
947 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | ||
948 | if (gSavedSettings.controlExists(RLV_SETTING_MAIN)) | ||
949 | menu->append(new LLMenuItemCheckGL("Restrained Life API", &rlvDbgToggleEnabled, NULL, &rlvDbgGetEnabled, NULL)); | ||
950 | #endif // RLV_ADVANCED_TOGGLE_RLVA | ||
951 | // [/RLVa:KB] | ||
952 | |||
922 | if(gSavedSettings.getBOOL("QAMode")) | 953 | if(gSavedSettings.getBOOL("QAMode")) |
923 | { | 954 | { |
924 | LLMenuGL* sub = NULL; | 955 | LLMenuGL* sub = NULL; |
@@ -1366,6 +1397,53 @@ void init_debug_baked_texture_menu(LLMenuGL* menu) | |||
1366 | menu->createJumpKeys(); | 1397 | menu->createJumpKeys(); |
1367 | } | 1398 | } |
1368 | 1399 | ||
1400 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | ||
1401 | void init_debug_rlva_menu(LLMenuGL* menu) | ||
1402 | { | ||
1403 | // Experimental feature toggles | ||
1404 | { | ||
1405 | /* | ||
1406 | #ifdef RLV_EXPERIMENTAL | ||
1407 | LLMenuGL* sub_menu = new LLMenuGL("Experimental"); | ||
1408 | |||
1409 | menu->appendMenu(sub_menu); | ||
1410 | #endif // RLV_EXPERIMENTAL | ||
1411 | */ | ||
1412 | } | ||
1413 | |||
1414 | // Unit tests | ||
1415 | { | ||
1416 | #ifdef RLV_DEBUG_TESTS | ||
1417 | init_debug_rlva_tests_menu(menu); | ||
1418 | #endif // RLV_DEBUG_TESTS | ||
1419 | } | ||
1420 | |||
1421 | #ifdef RLV_EXTENSION_ENABLE_WEAR | ||
1422 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR)) | ||
1423 | { | ||
1424 | menu->append(new LLMenuItemCheckGL("Enable Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR)); | ||
1425 | menu->appendSeparator(); | ||
1426 | } | ||
1427 | #endif // RLV_EXTENSION_ENABLE_WEAR | ||
1428 | |||
1429 | #ifdef RLV_EXTENSION_HIDELOCKED | ||
1430 | if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) && | ||
1431 | (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) ) | ||
1432 | { | ||
1433 | menu->append(new LLMenuItemCheckGL("Hide locked layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER)); | ||
1434 | menu->append(new LLMenuItemCheckGL("Hide locked attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH)); | ||
1435 | //sub_menu->append(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory)); | ||
1436 | menu->appendSeparator(); | ||
1437 | } | ||
1438 | #endif // RLV_EXTENSION_HIDELOCKED | ||
1439 | |||
1440 | #ifdef RLV_EXTENSION_FLOATER_RESTRICTIONS | ||
1441 | // TODO-RLVa: figure out a way to tell if floater_rlv_behaviour.xml exists | ||
1442 | menu->append(new LLMenuItemCallGL("Restrictions...", RlvFloaterBehaviour::show, NULL, NULL)); | ||
1443 | #endif // RLV_EXTENSION_FLOATER_RESTRICTIONS | ||
1444 | } | ||
1445 | // [/RLVa:KB] | ||
1446 | |||
1369 | void init_server_menu(LLMenuGL* menu) | 1447 | void init_server_menu(LLMenuGL* menu) |
1370 | { | 1448 | { |
1371 | { | 1449 | { |
@@ -1518,6 +1596,16 @@ class LLObjectTouch : public view_listener_t | |||
1518 | 1596 | ||
1519 | LLPickInfo pick = LLToolPie::getInstance()->getPick(); | 1597 | LLPickInfo pick = LLToolPie::getInstance()->getPick(); |
1520 | 1598 | ||
1599 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
1600 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1601 | // [msg->addVector3("Position", pick.mIntersection) <- see llDetectedTouchPos()] | ||
1602 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!object->isAttachment()) || (!object->permYouOwner())) && | ||
1603 | (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) ) | ||
1604 | { | ||
1605 | return true; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n | ||
1606 | } | ||
1607 | // [/RLVa:KB] | ||
1608 | |||
1521 | LLMessageSystem *msg = gMessageSystem; | 1609 | LLMessageSystem *msg = gMessageSystem; |
1522 | 1610 | ||
1523 | msg->newMessageFast(_PREHASH_ObjectGrab); | 1611 | msg->newMessageFast(_PREHASH_ObjectGrab); |
@@ -1566,6 +1654,14 @@ class LLObjectEnableTouch : public view_listener_t | |||
1566 | { | 1654 | { |
1567 | LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 1655 | LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
1568 | bool new_value = obj && obj->flagHandleTouch(); | 1656 | bool new_value = obj && obj->flagHandleTouch(); |
1657 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
1658 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1659 | if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!obj->isAttachment()) || (!obj->permYouOwner())) && | ||
1660 | (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) ) | ||
1661 | { | ||
1662 | new_value = false; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n | ||
1663 | } | ||
1664 | // [/RLVa:KB] | ||
1569 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 1665 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
1570 | 1666 | ||
1571 | // Update label based on the node touch name if available. | 1667 | // Update label based on the node touch name if available. |
@@ -1634,6 +1730,14 @@ class LLObjectOpen : public view_listener_t | |||
1634 | { | 1730 | { |
1635 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1731 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1636 | { | 1732 | { |
1733 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
1734 | // TODO-RLVa: shouldn't we be checking for fartouch here as well? | ||
1735 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
1736 | { | ||
1737 | return true; | ||
1738 | } | ||
1739 | // [/RLVa:KB] | ||
1740 | |||
1637 | return handle_object_open(); | 1741 | return handle_object_open(); |
1638 | } | 1742 | } |
1639 | }; | 1743 | }; |
@@ -1652,6 +1756,12 @@ class LLObjectEnableOpen : public view_listener_t | |||
1652 | if (!root) new_value = false; | 1756 | if (!root) new_value = false; |
1653 | else new_value = root->allowOpen(); | 1757 | else new_value = root->allowOpen(); |
1654 | } | 1758 | } |
1759 | |||
1760 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b | ||
1761 | // TODO-RLV: shouldn't we be checking for fartouch here as well? (and LLViewerObject::allowOpen() makes this redundant?) | ||
1762 | new_value &= !gRlvHandler.hasBehaviour(RLV_BHVR_EDIT); | ||
1763 | // [/RLVa:KB] | ||
1764 | |||
1655 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 1765 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
1656 | return true; | 1766 | return true; |
1657 | } | 1767 | } |
@@ -1713,7 +1823,13 @@ bool toggle_build_mode() | |||
1713 | } | 1823 | } |
1714 | } | 1824 | } |
1715 | 1825 | ||
1716 | 1826 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | |
1827 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (LLSelectMgr::getInstance()) ) | ||
1828 | { | ||
1829 | LLSelectMgr::getInstance()->deselectAll(); | ||
1830 | } | ||
1831 | // [/RLVa:KB] | ||
1832 | |||
1717 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); | 1833 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); |
1718 | LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); | 1834 | LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); |
1719 | 1835 | ||
@@ -1813,6 +1929,23 @@ class LLObjectEdit : public view_listener_t | |||
1813 | { | 1929 | { |
1814 | LLViewerParcelMgr::getInstance()->deselectLand(); | 1930 | LLViewerParcelMgr::getInstance()->deselectLand(); |
1815 | 1931 | ||
1932 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
1933 | if (rlv_handler_t::isEnabled()) | ||
1934 | { | ||
1935 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
1936 | { | ||
1937 | return true; // Can't edit any object under @edit=n | ||
1938 | } | ||
1939 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && | ||
1940 | (SELECT_TYPE_WORLD == LLSelectMgr::getInstance()->getSelection()->getSelectType()) && | ||
1941 | (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) ) | ||
1942 | { | ||
1943 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1944 | return true; // Can't edit in-world objects farther than 1.5m away under @fartouch=n | ||
1945 | } | ||
1946 | } | ||
1947 | // [/RLVa:KB] | ||
1948 | |||
1816 | if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) | 1949 | if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) |
1817 | { | 1950 | { |
1818 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); | 1951 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); |
@@ -1962,6 +2095,22 @@ class LLEnableEdit : public view_listener_t | |||
1962 | enable = LLViewerParcelMgr::getInstance()->agentCanBuild() | 2095 | enable = LLViewerParcelMgr::getInstance()->agentCanBuild() |
1963 | || LLSelectMgr::getInstance()->getSelection()->isAttachment(); | 2096 | || LLSelectMgr::getInstance()->getSelection()->isAttachment(); |
1964 | } | 2097 | } |
2098 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2099 | // TODO-RLV: include fartouch here? | ||
2100 | if ( (rlv_handler_t::isEnabled()) && (enable) ) | ||
2101 | { | ||
2102 | // We have no way of knowing whether we're being called for "Create" or for "Edit", but we can | ||
2103 | // make an educated guess based on the currently active selection which puts us halfway there. | ||
2104 | BOOL fActiveSelection = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); | ||
2105 | |||
2106 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) | ||
2107 | enable = false; // Edit and rez restricted, disable them both | ||
2108 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (fActiveSelection) ) | ||
2109 | enable = false; // Edit restricted and there's an active selection => disable Edit and Create | ||
2110 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && (!fActiveSelection) ) | ||
2111 | enable = false; // Rez restricted and there's no active selection => disable Create | ||
2112 | } | ||
2113 | // [/RLVa:KB] | ||
1965 | gMenuHolder->findControl(userdata["control"].asString())->setValue(enable); | 2114 | gMenuHolder->findControl(userdata["control"].asString())->setValue(enable); |
1966 | return true; | 2115 | return true; |
1967 | } | 2116 | } |
@@ -1989,7 +2138,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t | |||
1989 | { | 2138 | { |
1990 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; | 2139 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; |
1991 | LLViewerJointAttachment* attachment = curiter->second; | 2140 | LLViewerJointAttachment* attachment = curiter->second; |
1992 | if (attachment->getObject()) | 2141 | // if (attachment->getObject()) |
2142 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c | ||
2143 | if ( (attachment->getObject()) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(curiter->first)) ) ) | ||
2144 | // [/RLVa:KB] | ||
1993 | { | 2145 | { |
1994 | new_value = true; | 2146 | new_value = true; |
1995 | break; | 2147 | break; |
@@ -2036,6 +2188,9 @@ class LLObjectEnableMute : public view_listener_t | |||
2036 | BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); | 2188 | BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); |
2037 | BOOL is_self = avatar->isSelf(); | 2189 | BOOL is_self = avatar->isSelf(); |
2038 | new_value = !is_linden && !is_self; | 2190 | new_value = !is_linden && !is_self; |
2191 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2192 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
2193 | // [/RLVa:KB] | ||
2039 | } | 2194 | } |
2040 | } | 2195 | } |
2041 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 2196 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
@@ -2056,6 +2211,12 @@ class LLObjectMute : public view_listener_t | |||
2056 | LLVOAvatar* avatar = find_avatar_from_object(object); | 2211 | LLVOAvatar* avatar = find_avatar_from_object(object); |
2057 | if (avatar) | 2212 | if (avatar) |
2058 | { | 2213 | { |
2214 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e | ||
2215 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
2216 | { | ||
2217 | return true; // Fallback code [see LLObjectEnableMute::handleEvent()] | ||
2218 | } | ||
2219 | // [/RLVa:KB] | ||
2059 | id = avatar->getID(); | 2220 | id = avatar->getID(); |
2060 | 2221 | ||
2061 | LLNameValue *firstname = avatar->getNVPair("FirstName"); | 2222 | LLNameValue *firstname = avatar->getNVPair("FirstName"); |
@@ -2104,34 +2265,190 @@ class LLObjectMute : public view_listener_t | |||
2104 | } | 2265 | } |
2105 | }; | 2266 | }; |
2106 | 2267 | ||
2268 | class LLObjectEnableCopyUUID : public view_listener_t | ||
2269 | { | ||
2270 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2271 | { | ||
2272 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); | ||
2273 | bool new_value = (object != NULL); | ||
2274 | |||
2275 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | ||
2276 | return true; | ||
2277 | } | ||
2278 | }; | ||
2279 | |||
2280 | class LLObjectCopyUUID : public view_listener_t | ||
2281 | { | ||
2282 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2283 | { | ||
2284 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); | ||
2285 | if (!object) return true; | ||
2286 | |||
2287 | LLUUID id = object->getID(); | ||
2288 | |||
2289 | char buffer[UUID_STR_LENGTH]; | ||
2290 | id.toString(buffer); | ||
2291 | |||
2292 | |||
2293 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | ||
2294 | |||
2295 | LLSelectMgr::getInstance()->deselectAll(); | ||
2296 | return true; | ||
2297 | } | ||
2298 | }; | ||
2299 | |||
2300 | |||
2301 | class LLObjectEnableExport : public view_listener_t | ||
2302 | { | ||
2303 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2304 | { | ||
2305 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | ||
2306 | bool new_value = (object != NULL); | ||
2307 | if (new_value) | ||
2308 | { | ||
2309 | LLVOAvatar* avatar = find_avatar_from_object(object); | ||
2310 | new_value = (avatar == NULL); | ||
2311 | } | ||
2312 | if(new_value) | ||
2313 | { | ||
2314 | |||
2315 | struct ff : public LLSelectedNodeFunctor | ||
2316 | { | ||
2317 | ff(const LLSD& data) : LLSelectedNodeFunctor() | ||
2318 | ,userdata(data) | ||
2319 | { | ||
2320 | |||
2321 | } | ||
2322 | const LLSD& userdata; | ||
2323 | virtual bool apply(LLSelectNode* node) | ||
2324 | { | ||
2325 | if(gAgent.getID()!=node->mPermissions->getCreator()) | ||
2326 | { | ||
2327 | llwarns<<"Incorrect permission to export"<<llendl; | ||
2328 | return false; | ||
2329 | } | ||
2330 | return true; | ||
2331 | } | ||
2332 | }; | ||
2333 | |||
2334 | #ifdef LL_GRID_PERMISSIONS | ||
2335 | |||
2336 | ff * the_ff=new ff(userdata); | ||
2337 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff,false)) | ||
2338 | { | ||
2339 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
2340 | } | ||
2341 | else | ||
2342 | { | ||
2343 | gMenuHolder->findControl(userdata["control"].asString())->setValue(false); | ||
2344 | } | ||
2345 | return true; | ||
2346 | } | ||
2347 | |||
2348 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | ||
2349 | return true; | ||
2350 | #else | ||
2351 | } | ||
2352 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
2353 | return true; | ||
2354 | #endif | ||
2355 | |||
2356 | } | ||
2357 | }; | ||
2358 | |||
2359 | class LLObjectExport : public view_listener_t | ||
2360 | { | ||
2361 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2362 | { | ||
2363 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | ||
2364 | if (!object) return true; | ||
2365 | |||
2366 | LLVOAvatar* avatar = find_avatar_from_object(object); | ||
2367 | |||
2368 | if (!avatar) | ||
2369 | { | ||
2370 | primbackup::getInstance()->pre_export_object(); | ||
2371 | } | ||
2372 | |||
2373 | return true; | ||
2374 | } | ||
2375 | }; | ||
2376 | |||
2377 | |||
2378 | class LLObjectEnableImport : public view_listener_t | ||
2379 | { | ||
2380 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2381 | { | ||
2382 | gMenuHolder->findControl(userdata["control"].asString())->setValue(TRUE); | ||
2383 | return true; | ||
2384 | } | ||
2385 | }; | ||
2386 | |||
2387 | class LLObjectImport : public view_listener_t | ||
2388 | { | ||
2389 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2390 | { | ||
2391 | primbackup::getInstance()->import_object(FALSE); | ||
2392 | return true; | ||
2393 | } | ||
2394 | }; | ||
2395 | |||
2396 | class LLObjectImportUpload : public view_listener_t | ||
2397 | { | ||
2398 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2399 | { | ||
2400 | primbackup::getInstance()->import_object(TRUE); | ||
2401 | return true; | ||
2402 | } | ||
2403 | }; | ||
2404 | |||
2107 | bool handle_go_to() | 2405 | bool handle_go_to() |
2108 | { | 2406 | { |
2407 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2408 | if ( (rlv_handler_t::isEnabled()) && gAgent.forwardGrabbed() && (gRlvHandler.hasLockedAttachment()) ) | ||
2409 | { | ||
2410 | return true; | ||
2411 | } | ||
2412 | // [/RLVa:KB] | ||
2413 | |||
2109 | // JAMESDEBUG try simulator autopilot | 2414 | // JAMESDEBUG try simulator autopilot |
2110 | std::vector<std::string> strings; | 2415 | std::vector<std::string> strings; |
2111 | std::string val; | 2416 | std::string val; |
2112 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; | 2417 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; |
2113 | val = llformat("%g", pos.mdV[VX]); | 2418 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) |
2114 | strings.push_back(val); | ||
2115 | val = llformat("%g", pos.mdV[VY]); | ||
2116 | strings.push_back(val); | ||
2117 | val = llformat("%g", pos.mdV[VZ]); | ||
2118 | strings.push_back(val); | ||
2119 | send_generic_message("autopilot", strings); | ||
2120 | |||
2121 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
2122 | |||
2123 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | ||
2124 | { | 2419 | { |
2125 | gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); | 2420 | LLVector3d hips_offset(0.0f, 0.0f, 1.2f); |
2421 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
2422 | gAgent.teleportViaLocation(pos + hips_offset); | ||
2126 | } | 2423 | } |
2127 | else | 2424 | else |
2128 | { | 2425 | { |
2129 | // Snap camera back to behind avatar | 2426 | // JAMESDEBUG try simulator autopilot |
2130 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | 2427 | std::vector<std::string> strings; |
2131 | } | 2428 | std::string val; |
2429 | val = llformat("%g", pos.mdV[VX]); | ||
2430 | strings.push_back(val); | ||
2431 | val = llformat("%g", pos.mdV[VY]); | ||
2432 | strings.push_back(val); | ||
2433 | val = llformat("%g", pos.mdV[VZ]); | ||
2434 | strings.push_back(val); | ||
2435 | send_generic_message("autopilot", strings); | ||
2132 | 2436 | ||
2133 | // Could be first use | 2437 | LLViewerParcelMgr::getInstance()->deselectLand(); |
2134 | LLFirstUse::useGoTo(); | 2438 | |
2439 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | ||
2440 | { | ||
2441 | gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); | ||
2442 | } | ||
2443 | else | ||
2444 | { | ||
2445 | // Snap camera back to behind avatar | ||
2446 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | ||
2447 | } | ||
2448 | |||
2449 | // Could be first use | ||
2450 | LLFirstUse::useGoTo(); | ||
2451 | } | ||
2135 | return true; | 2452 | return true; |
2136 | } | 2453 | } |
2137 | 2454 | ||
@@ -2188,6 +2505,12 @@ class LLAvatarFreeze : public view_listener_t | |||
2188 | { | 2505 | { |
2189 | LLUUID* avatar_id = new LLUUID( avatar->getID() ); | 2506 | LLUUID* avatar_id = new LLUUID( avatar->getID() ); |
2190 | std::string fullname = avatar->getFullname(); | 2507 | std::string fullname = avatar->getFullname(); |
2508 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2509 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) | ||
2510 | { | ||
2511 | fullname = gRlvHandler.getAnonym(fullname); | ||
2512 | } | ||
2513 | // [/RLVa:KB] | ||
2191 | 2514 | ||
2192 | if (!fullname.empty()) | 2515 | if (!fullname.empty()) |
2193 | { | 2516 | { |
@@ -2213,7 +2536,11 @@ class LLAvatarVisibleDebug : public view_listener_t | |||
2213 | { | 2536 | { |
2214 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2537 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2215 | { | 2538 | { |
2216 | bool new_value = gAgent.isGodlike(); | 2539 | //bool new_value = gAgent.isGodlike(); |
2540 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2541 | // TODO-RLVa: can you actually use this to cheat anything? | ||
2542 | bool new_value = gAgent.isGodlike() && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
2543 | // [/RLVa:KB] | ||
2217 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 2544 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2218 | return true; | 2545 | return true; |
2219 | } | 2546 | } |
@@ -2325,6 +2652,12 @@ class LLAvatarEject : public view_listener_t | |||
2325 | MenuCallbackData *data = new MenuCallbackData; | 2652 | MenuCallbackData *data = new MenuCallbackData; |
2326 | (*data).avatar_id = avatar->getID(); | 2653 | (*data).avatar_id = avatar->getID(); |
2327 | std::string fullname = avatar->getFullname(); | 2654 | std::string fullname = avatar->getFullname(); |
2655 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2656 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) | ||
2657 | { | ||
2658 | fullname = gRlvHandler.getAnonym(fullname); | ||
2659 | } | ||
2660 | // [/RLVa:KB] | ||
2328 | 2661 | ||
2329 | const LLVector3d& pos = avatar->getPositionGlobal(); | 2662 | const LLVector3d& pos = avatar->getPositionGlobal(); |
2330 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); | 2663 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); |
@@ -2406,6 +2739,13 @@ class LLAvatarGiveCard : public view_listener_t | |||
2406 | { | 2739 | { |
2407 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2740 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2408 | { | 2741 | { |
2742 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2743 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
2744 | { | ||
2745 | return true; | ||
2746 | } | ||
2747 | // [/RLVa:KB] | ||
2748 | |||
2409 | llinfos << "handle_give_card()" << llendl; | 2749 | llinfos << "handle_give_card()" << llendl; |
2410 | LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 2750 | LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
2411 | if(dest && dest->isAvatar()) | 2751 | if(dest && dest->isAvatar()) |
@@ -2655,6 +2995,13 @@ class LLSelfStandUp : public view_listener_t | |||
2655 | { | 2995 | { |
2656 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2996 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2657 | { | 2997 | { |
2998 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
2999 | if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) | ||
3000 | { | ||
3001 | return true; | ||
3002 | } | ||
3003 | // [/RLVa:KB] | ||
3004 | |||
2658 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3005 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
2659 | return true; | 3006 | return true; |
2660 | } | 3007 | } |
@@ -2664,7 +3011,10 @@ class LLSelfEnableStandUp : public view_listener_t | |||
2664 | { | 3011 | { |
2665 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3012 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2666 | { | 3013 | { |
2667 | bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting; | 3014 | // bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting; |
3015 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
3016 | bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT); | ||
3017 | // [/RLVa:KB] | ||
2668 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3018 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2669 | return true; | 3019 | return true; |
2670 | } | 3020 | } |
@@ -2839,6 +3189,11 @@ class LLAvatarEnableAddFriend : public view_listener_t | |||
2839 | { | 3189 | { |
2840 | LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); | 3190 | LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); |
2841 | bool new_value = avatar && !is_agent_friend(avatar->getID()); | 3191 | bool new_value = avatar && !is_agent_friend(avatar->getID()); |
3192 | |||
3193 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
3194 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
3195 | // [/RLVa:KB] | ||
3196 | |||
2842 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3197 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2843 | return true; | 3198 | return true; |
2844 | } | 3199 | } |
@@ -2897,6 +3252,15 @@ bool handle_sit_or_stand() | |||
2897 | return true; | 3252 | return true; |
2898 | } | 3253 | } |
2899 | 3254 | ||
3255 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
3256 | if ( (rlv_handler_t::isEnabled()) && | ||
3257 | ( ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting)) || | ||
3258 | (gRlvHandler.hasBehaviour(RLV_BHVR_SIT)) ) ) | ||
3259 | { | ||
3260 | return true; | ||
3261 | } | ||
3262 | // [/RLVa:KB] | ||
3263 | |||
2900 | if (sitting_on_selection()) | 3264 | if (sitting_on_selection()) |
2901 | { | 3265 | { |
2902 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3266 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
@@ -2907,6 +3271,15 @@ bool handle_sit_or_stand() | |||
2907 | 3271 | ||
2908 | if (object && object->getPCode() == LL_PCODE_VOLUME) | 3272 | if (object && object->getPCode() == LL_PCODE_VOLUME) |
2909 | { | 3273 | { |
3274 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
3275 | if ( (rlv_handler_t::isEnabled()) && | ||
3276 | ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && | ||
3277 | (dist_vec_squared(gAgent.getPositionGlobal(), object->getPositionGlobal() + LLVector3d(pick.mObjectOffset)) > 1.5f * 1.5f) ) | ||
3278 | { | ||
3279 | return true; // Don't allow sitting farther away than 1.5m under @sittp=n or @fartouch=n | ||
3280 | } | ||
3281 | // [/RLVa:KB] | ||
3282 | |||
2910 | gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); | 3283 | gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); |
2911 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | 3284 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); |
2912 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | 3285 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); |
@@ -2944,6 +3317,13 @@ class LLLandSit : public view_listener_t | |||
2944 | { | 3317 | { |
2945 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3318 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2946 | { | 3319 | { |
3320 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
3321 | if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) | ||
3322 | { | ||
3323 | return true; | ||
3324 | } | ||
3325 | // [/RLVa:KB] | ||
3326 | |||
2947 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3327 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
2948 | LLViewerParcelMgr::getInstance()->deselectLand(); | 3328 | LLViewerParcelMgr::getInstance()->deselectLand(); |
2949 | 3329 | ||
@@ -3254,6 +3634,14 @@ class LLEditDuplicate : public view_listener_t | |||
3254 | { | 3634 | { |
3255 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3635 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3256 | { | 3636 | { |
3637 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
3638 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && | ||
3639 | (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
3640 | { | ||
3641 | return true; | ||
3642 | } | ||
3643 | // [/RLVa:KB] | ||
3644 | |||
3257 | if(LLEditMenuHandler::gEditMenuHandler) | 3645 | if(LLEditMenuHandler::gEditMenuHandler) |
3258 | { | 3646 | { |
3259 | LLEditMenuHandler::gEditMenuHandler->duplicate(); | 3647 | LLEditMenuHandler::gEditMenuHandler->duplicate(); |
@@ -3267,6 +3655,13 @@ class LLEditEnableDuplicate : public view_listener_t | |||
3267 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3655 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3268 | { | 3656 | { |
3269 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); | 3657 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); |
3658 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
3659 | if ( (new_value) && (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && | ||
3660 | (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
3661 | { | ||
3662 | new_value = false; | ||
3663 | } | ||
3664 | // [/RLVa:KB] | ||
3270 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3665 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
3271 | return true; | 3666 | return true; |
3272 | } | 3667 | } |
@@ -3652,6 +4047,11 @@ class LLToolsTakeCopy : public view_listener_t | |||
3652 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4047 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3653 | { | 4048 | { |
3654 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; | 4049 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; |
4050 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b | ||
4051 | // NOTE: we need to handle "Take Copy" because it will force a sim-side unsit if we're sitting on the selection, | ||
4052 | // but we do want to allow "Take Copy" under @rez=n so that's why we explicitly check for @unsit=n here | ||
4053 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (!rlvCanDeleteOrReturn()) ) return true; | ||
4054 | // [/RLVa:KB] | ||
3655 | 4055 | ||
3656 | const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); | 4056 | const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); |
3657 | derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); | 4057 | derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); |
@@ -3667,6 +4067,9 @@ class LLObjectReturn : public view_listener_t | |||
3667 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4067 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3668 | { | 4068 | { |
3669 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; | 4069 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; |
4070 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4071 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) return true; | ||
4072 | // [/RLVa:KB] | ||
3670 | 4073 | ||
3671 | mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); | 4074 | mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); |
3672 | 4075 | ||
@@ -3736,6 +4139,14 @@ class LLObjectEnableReturn : public view_listener_t | |||
3736 | } | 4139 | } |
3737 | } | 4140 | } |
3738 | #endif | 4141 | #endif |
4142 | |||
4143 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4144 | if ( (new_value) && (rlv_handler_t::isEnabled()) ) | ||
4145 | { | ||
4146 | new_value = rlvCanDeleteOrReturn(); | ||
4147 | } | ||
4148 | // [/RLVa:KB] | ||
4149 | |||
3739 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4150 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
3740 | return true; | 4151 | return true; |
3741 | } | 4152 | } |
@@ -3757,6 +4168,13 @@ void handle_take() | |||
3757 | return; | 4168 | return; |
3758 | } | 4169 | } |
3759 | 4170 | ||
4171 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4172 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4173 | { | ||
4174 | return; | ||
4175 | } | ||
4176 | // [/RLVa:KB] | ||
4177 | |||
3760 | BOOL you_own_everything = TRUE; | 4178 | BOOL you_own_everything = TRUE; |
3761 | BOOL locked_but_takeable_object = FALSE; | 4179 | BOOL locked_but_takeable_object = FALSE; |
3762 | LLUUID category_id; | 4180 | LLUUID category_id; |
@@ -3878,6 +4296,13 @@ BOOL enable_take() | |||
3878 | return FALSE; | 4296 | return FALSE; |
3879 | } | 4297 | } |
3880 | 4298 | ||
4299 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4300 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4301 | { | ||
4302 | return FALSE; | ||
4303 | } | ||
4304 | // [/RLVa:KB] | ||
4305 | |||
3881 | for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); | 4306 | for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); |
3882 | iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++) | 4307 | iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++) |
3883 | { | 4308 | { |
@@ -4193,12 +4618,28 @@ class LLToolsEnableUnlink : public view_listener_t | |||
4193 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && | 4618 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && |
4194 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) | 4619 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) |
4195 | { | 4620 | { |
4196 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | 4621 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0 && |
4622 | LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | ||
4197 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) | 4623 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) |
4198 | { | 4624 | { |
4199 | new_value = true; | 4625 | new_value = true; |
4200 | } | 4626 | } |
4201 | } | 4627 | } |
4628 | |||
4629 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
4630 | // The user might not be allowed to unlink this object due to RLV settings, | ||
4631 | // because it would unsit them if they are sitting on the object. | ||
4632 | if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && | ||
4633 | (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) | ||
4634 | { | ||
4635 | // Allow if the avie isn't sitting on any of the selected objects | ||
4636 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
4637 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
4638 | if (handleSel->getFirstRootNode(&func, TRUE)) | ||
4639 | new_value = false; | ||
4640 | } | ||
4641 | // [/RLVa:KB] | ||
4642 | |||
4202 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4643 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4203 | return true; | 4644 | return true; |
4204 | } | 4645 | } |
@@ -4208,6 +4649,19 @@ class LLToolsUnlink : public view_listener_t | |||
4208 | { | 4649 | { |
4209 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4650 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4210 | { | 4651 | { |
4652 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
4653 | // The user might not be allowed to unlink this object due to RLV settings, | ||
4654 | // because it would unsit them if they are sitting on the object. | ||
4655 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) | ||
4656 | { | ||
4657 | // Allow if the avie isn't sitting on any of the selected objects | ||
4658 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
4659 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
4660 | if (handleSel->getFirstRootNode(&func, TRUE)) | ||
4661 | return true; | ||
4662 | } | ||
4663 | // [/RLVa:KB] | ||
4664 | |||
4211 | LLSelectMgr::getInstance()->sendDelink(); | 4665 | LLSelectMgr::getInstance()->sendDelink(); |
4212 | return true; | 4666 | return true; |
4213 | } | 4667 | } |
@@ -4227,6 +4681,13 @@ class LLToolsReleaseKeys : public view_listener_t | |||
4227 | { | 4681 | { |
4228 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4682 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4229 | { | 4683 | { |
4684 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
4685 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
4686 | { | ||
4687 | return true; | ||
4688 | } | ||
4689 | // [/RLVa:KB] | ||
4690 | |||
4230 | gAgent.forceReleaseControls(); | 4691 | gAgent.forceReleaseControls(); |
4231 | 4692 | ||
4232 | return true; | 4693 | return true; |
@@ -4237,7 +4698,11 @@ class LLToolsEnableReleaseKeys : public view_listener_t | |||
4237 | { | 4698 | { |
4238 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4699 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4239 | { | 4700 | { |
4240 | gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); | 4701 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
4702 | gMenuHolder->findControl(userdata["control"].asString())->setValue( | ||
4703 | gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment() ) ) ); | ||
4704 | // [/RLVa:KB] | ||
4705 | //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); | ||
4241 | return true; | 4706 | return true; |
4242 | } | 4707 | } |
4243 | }; | 4708 | }; |
@@ -4345,6 +4810,15 @@ class LLEditEnableDelete : public view_listener_t | |||
4345 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4810 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4346 | { | 4811 | { |
4347 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); | 4812 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); |
4813 | |||
4814 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4815 | // NOTE: we want to disable delete on objects but not disable delete on text | ||
4816 | if ( (new_value) && (rlv_handler_t::isEnabled()) && (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
4817 | { | ||
4818 | new_value = rlvCanDeleteOrReturn(); | ||
4819 | } | ||
4820 | // [/RLVa:KB] | ||
4821 | |||
4348 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4822 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4349 | return true; | 4823 | return true; |
4350 | } | 4824 | } |
@@ -4354,6 +4828,15 @@ class LLEditDelete : public view_listener_t | |||
4354 | { | 4828 | { |
4355 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4829 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4356 | { | 4830 | { |
4831 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4832 | // NOTE: we want to disable delete on objects but not disable delete on text | ||
4833 | if ( (rlv_handler_t::isEnabled()) && (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) && | ||
4834 | (!rlvCanDeleteOrReturn()) ) | ||
4835 | { | ||
4836 | return true; | ||
4837 | } | ||
4838 | // [/RLVa:KB] | ||
4839 | |||
4357 | // If a text field can do a deletion, it gets precedence over deleting | 4840 | // If a text field can do a deletion, it gets precedence over deleting |
4358 | // an object in the world. | 4841 | // an object in the world. |
4359 | if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete()) | 4842 | if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete()) |
@@ -4385,6 +4868,12 @@ class LLObjectEnableDelete : public view_listener_t | |||
4385 | # endif | 4868 | # endif |
4386 | LLSelectMgr::getInstance()->canDoDelete(); | 4869 | LLSelectMgr::getInstance()->canDoDelete(); |
4387 | #endif | 4870 | #endif |
4871 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4872 | if ( (new_value) && (rlv_handler_t::isEnabled()) ) | ||
4873 | { | ||
4874 | new_value = rlvCanDeleteOrReturn(); | ||
4875 | } | ||
4876 | // [/RLVa:KB] | ||
4388 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4877 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4389 | return true; | 4878 | return true; |
4390 | } | 4879 | } |
@@ -4403,6 +4892,13 @@ class LLObjectDelete : public view_listener_t | |||
4403 | { | 4892 | { |
4404 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4893 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4405 | { | 4894 | { |
4895 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4896 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4897 | { | ||
4898 | return true; | ||
4899 | } | ||
4900 | // [/RLVa:KB] | ||
4901 | |||
4406 | if (LLSelectMgr::getInstance()) | 4902 | if (LLSelectMgr::getInstance()) |
4407 | { | 4903 | { |
4408 | LLSelectMgr::getInstance()->doDelete(); | 4904 | LLSelectMgr::getInstance()->doDelete(); |
@@ -4752,6 +5248,12 @@ class LLWorldCreateLandmark : public view_listener_t | |||
4752 | { | 5248 | { |
4753 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5249 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4754 | { | 5250 | { |
5251 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
5252 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5253 | { | ||
5254 | return true; | ||
5255 | } | ||
5256 | // [/RLVa:KB] | ||
4755 | LLViewerRegion* agent_region = gAgent.getRegion(); | 5257 | LLViewerRegion* agent_region = gAgent.getRegion(); |
4756 | if(!agent_region) | 5258 | if(!agent_region) |
4757 | { | 5259 | { |
@@ -4859,6 +5361,13 @@ class LLAvatarInviteToGroup : public view_listener_t | |||
4859 | { | 5361 | { |
4860 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5362 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4861 | { | 5363 | { |
5364 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5365 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5366 | { | ||
5367 | return true; | ||
5368 | } | ||
5369 | // [/RLVa:KB] | ||
5370 | |||
4862 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 5371 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
4863 | if(avatar) | 5372 | if(avatar) |
4864 | { | 5373 | { |
@@ -4872,6 +5381,13 @@ class LLAvatarAddFriend : public view_listener_t | |||
4872 | { | 5381 | { |
4873 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5382 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4874 | { | 5383 | { |
5384 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5385 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5386 | { | ||
5387 | return true; // Fallback code [see LLAvatarEnableAddFriend::handleEvent()] | ||
5388 | } | ||
5389 | // [/RLVa:KB] | ||
5390 | |||
4875 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 5391 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
4876 | if(avatar && !is_agent_friend(avatar->getID())) | 5392 | if(avatar && !is_agent_friend(avatar->getID())) |
4877 | { | 5393 | { |
@@ -4959,6 +5475,12 @@ class LLEnablePayObject : public view_listener_t | |||
4959 | } | 5475 | } |
4960 | } | 5476 | } |
4961 | } | 5477 | } |
5478 | |||
5479 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5480 | // Don't enable "Pay..." on the avatar pie menu under @shownames=n | ||
5481 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (avatar == NULL); | ||
5482 | // [/RLVa:KB] | ||
5483 | |||
4962 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 5484 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4963 | return true; | 5485 | return true; |
4964 | } | 5486 | } |
@@ -5147,6 +5669,12 @@ class LLShowFloater : public view_listener_t | |||
5147 | } | 5669 | } |
5148 | else if (floater_name == "buy land") | 5670 | else if (floater_name == "buy land") |
5149 | { | 5671 | { |
5672 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
5673 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5674 | { | ||
5675 | return true; | ||
5676 | } | ||
5677 | // [/RLVa:KB] | ||
5150 | if (LLViewerParcelMgr::getInstance()->selectionEmpty()) | 5678 | if (LLViewerParcelMgr::getInstance()->selectionEmpty()) |
5151 | { | 5679 | { |
5152 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); | 5680 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); |
@@ -5209,6 +5737,10 @@ class LLShowFloater : public view_listener_t | |||
5209 | { | 5737 | { |
5210 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); | 5738 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); |
5211 | } | 5739 | } |
5740 | else if (floater_name == "animation list") | ||
5741 | { | ||
5742 | JCFloaterAnimList::toggleInstance(LLSD()); | ||
5743 | } | ||
5212 | else if (floater_name == "inworld browser") | 5744 | else if (floater_name == "inworld browser") |
5213 | { | 5745 | { |
5214 | LLFloaterMediaBrowser::toggle(); | 5746 | LLFloaterMediaBrowser::toggle(); |
@@ -5324,6 +5856,13 @@ class LLShowAgentProfile : public view_listener_t | |||
5324 | } | 5856 | } |
5325 | else if (userdata.asString() == "hit object") | 5857 | else if (userdata.asString() == "hit object") |
5326 | { | 5858 | { |
5859 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5860 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5861 | { | ||
5862 | return true; | ||
5863 | } | ||
5864 | // [/RLVa:KB] | ||
5865 | |||
5327 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 5866 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
5328 | if (objectp) | 5867 | if (objectp) |
5329 | { | 5868 | { |
@@ -5383,6 +5922,13 @@ class LLLandEdit : public view_listener_t | |||
5383 | { | 5922 | { |
5384 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5923 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
5385 | { | 5924 | { |
5925 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
5926 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) | ||
5927 | { | ||
5928 | return true; | ||
5929 | } | ||
5930 | // [/RLVa:KB] | ||
5931 | |||
5386 | if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) | 5932 | if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) |
5387 | { | 5933 | { |
5388 | // zoom in if we're looking at the avatar | 5934 | // zoom in if we're looking at the avatar |
@@ -5401,7 +5947,6 @@ class LLLandEdit : public view_listener_t | |||
5401 | 5947 | ||
5402 | LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); | 5948 | LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); |
5403 | 5949 | ||
5404 | gFloaterTools->showMore(TRUE); | ||
5405 | gFloaterView->bringToFront( gFloaterTools ); | 5950 | gFloaterView->bringToFront( gFloaterTools ); |
5406 | 5951 | ||
5407 | // Switch to land edit toolset | 5952 | // Switch to land edit toolset |
@@ -5468,6 +6013,18 @@ private: | |||
5468 | LLViewerJointAttachment* attachment_point = NULL; | 6013 | LLViewerJointAttachment* attachment_point = NULL; |
5469 | if (index > 0) | 6014 | if (index > 0) |
5470 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); | 6015 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); |
6016 | |||
6017 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6018 | if ( (rlv_handler_t::isEnabled()) && | ||
6019 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point | ||
6020 | ((index > 0) && (!gRlvHandler.isDetachable(attachment_point->getObject()))) || // Can't replace locked attachment | ||
6021 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" | ||
6022 | { | ||
6023 | setObjectSelection(NULL); // Clear the selection or it'll get stuck | ||
6024 | return true; | ||
6025 | } | ||
6026 | // [/RLVa:KB] | ||
6027 | |||
5471 | confirm_replace_attachment(0, attachment_point); | 6028 | confirm_replace_attachment(0, attachment_point); |
5472 | } | 6029 | } |
5473 | return true; | 6030 | return true; |
@@ -5575,6 +6132,24 @@ class LLAttachmentDrop : public view_listener_t | |||
5575 | return true; | 6132 | return true; |
5576 | } | 6133 | } |
5577 | 6134 | ||
6135 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6136 | if (rlv_handler_t::isEnabled()) | ||
6137 | { | ||
6138 | if (gRlvHandler.hasLockedAttachment()) | ||
6139 | { | ||
6140 | // NOTE: copy/paste of the code in enable_detach() | ||
6141 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6142 | RlvSelectHasLockedAttach functor; | ||
6143 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6144 | return true; | ||
6145 | } | ||
6146 | else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
6147 | { | ||
6148 | return true; | ||
6149 | } | ||
6150 | } | ||
6151 | // [/RLVa:KB] | ||
6152 | |||
5578 | // The sendDropAttachment() method works on the list of selected | 6153 | // The sendDropAttachment() method works on the list of selected |
5579 | // objects. Thus we need to clear the list, make sure it only | 6154 | // objects. Thus we need to clear the list, make sure it only |
5580 | // contains the object the user clicked, send the message, | 6155 | // contains the object the user clicked, send the message, |
@@ -5593,6 +6168,13 @@ void handle_detach_from_avatar(void* user_data) | |||
5593 | 6168 | ||
5594 | if (attached_object) | 6169 | if (attached_object) |
5595 | { | 6170 | { |
6171 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0d | ||
6172 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(attached_object)) ) | ||
6173 | { | ||
6174 | return; | ||
6175 | } | ||
6176 | // [/RLVa:KB] | ||
6177 | |||
5596 | gMessageSystem->newMessage("ObjectDetach"); | 6178 | gMessageSystem->newMessage("ObjectDetach"); |
5597 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | 6179 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); |
5598 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | 6180 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); |
@@ -5675,6 +6257,17 @@ class LLAttachmentDetach : public view_listener_t | |||
5675 | return true; | 6257 | return true; |
5676 | } | 6258 | } |
5677 | 6259 | ||
6260 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6261 | // NOTE: copy/paste of the code in enable_detach() | ||
6262 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6263 | { | ||
6264 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6265 | RlvSelectHasLockedAttach functor; | ||
6266 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6267 | return FALSE; | ||
6268 | } | ||
6269 | // [/RLVa:KB] | ||
6270 | |||
5678 | // The sendDetach() method works on the list of selected | 6271 | // The sendDetach() method works on the list of selected |
5679 | // objects. Thus we need to clear the list, make sure it only | 6272 | // objects. Thus we need to clear the list, make sure it only |
5680 | // contains the object the user clicked, send the message, | 6273 | // contains the object the user clicked, send the message, |
@@ -5758,7 +6351,10 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
5758 | } | 6351 | } |
5759 | 6352 | ||
5760 | //now check to make sure that the item is actually in the inventory before we enable dropping it | 6353 | //now check to make sure that the item is actually in the inventory before we enable dropping it |
5761 | bool new_value = enable_detach(NULL) && can_build && item; | 6354 | // bool new_value = enable_detach(NULL) && can_build && item; |
6355 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
6356 | bool new_value = enable_detach(NULL) && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); | ||
6357 | // [/RLVa:KB] | ||
5762 | 6358 | ||
5763 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 6359 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
5764 | return true; | 6360 | return true; |
@@ -5778,6 +6374,20 @@ BOOL enable_detach(void*) | |||
5778 | // ...if it's you, good to detach | 6374 | // ...if it's you, good to detach |
5779 | if (avatar->getID() == gAgent.getID()) | 6375 | if (avatar->getID() == gAgent.getID()) |
5780 | { | 6376 | { |
6377 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6378 | // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() | ||
6379 | // so any changes here should be reflected there as well (I think it's in a number of other places as well by now) | ||
6380 | |||
6381 | // RELEASE-RLVa: LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with | ||
6382 | // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time | ||
6383 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6384 | { | ||
6385 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6386 | RlvSelectHasLockedAttach functor; | ||
6387 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6388 | return FALSE; | ||
6389 | } | ||
6390 | // [/RLVa:KB] | ||
5781 | return TRUE; | 6391 | return TRUE; |
5782 | } | 6392 | } |
5783 | 6393 | ||
@@ -5800,6 +6410,25 @@ class LLAttachmentEnableDetach : public view_listener_t | |||
5800 | // Used to tell if the selected object can be attached to your avatar. | 6410 | // Used to tell if the selected object can be attached to your avatar. |
5801 | BOOL object_selected_and_point_valid(void *user_data) | 6411 | BOOL object_selected_and_point_valid(void *user_data) |
5802 | { | 6412 | { |
6413 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
6414 | if (rlv_handler_t::isEnabled()) | ||
6415 | { | ||
6416 | // RELEASE-RLVa: look at the caller graph for this function on every new release | ||
6417 | // -> 1.22.11 and 1.23.4 | ||
6418 | // - object_is_wearable() => dead code [user_data == NULL => default attach point => OK!] | ||
6419 | // - LLObjectEnableWear::handleEvent() => Rezzed prim / right-click / "Wear" [user_data == NULL => see above] | ||
6420 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] | ||
6421 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] | ||
6422 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; | ||
6423 | if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point | ||
6424 | ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt->getObject()))) || // Don't allow replacing of locked attachment | ||
6425 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" | ||
6426 | { | ||
6427 | return FALSE; | ||
6428 | } | ||
6429 | } | ||
6430 | // [/RLVa:KB] | ||
6431 | |||
5803 | //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; | 6432 | //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; |
5804 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); | 6433 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); |
5805 | for (LLObjectSelection::root_iterator iter = selection->root_begin(); | 6434 | for (LLObjectSelection::root_iterator iter = selection->root_begin(); |
@@ -5867,7 +6496,13 @@ BOOL object_attached(void *user_data) | |||
5867 | { | 6496 | { |
5868 | LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; | 6497 | LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; |
5869 | 6498 | ||
5870 | return attachment->getObject() != NULL; | 6499 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
6500 | return ( | ||
6501 | (attachment->getObject() != NULL) && | ||
6502 | ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(attachment->getObject())) ) | ||
6503 | ); | ||
6504 | // [/RLVa:KB] | ||
6505 | // return attachment->getObject() != NULL; | ||
5871 | } | 6506 | } |
5872 | 6507 | ||
5873 | class LLAvatarSendIM : public view_listener_t | 6508 | class LLAvatarSendIM : public view_listener_t |
@@ -5875,6 +6510,12 @@ class LLAvatarSendIM : public view_listener_t | |||
5875 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6510 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
5876 | { | 6511 | { |
5877 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 6512 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
6513 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
6514 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
6515 | { | ||
6516 | return true; | ||
6517 | } | ||
6518 | // [/RLVa:KB] | ||
5878 | if(avatar) | 6519 | if(avatar) |
5879 | { | 6520 | { |
5880 | std::string name("IM"); | 6521 | std::string name("IM"); |
@@ -6010,6 +6651,16 @@ class LLToolsSelectedScriptAction : public view_listener_t | |||
6010 | { | 6651 | { |
6011 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6652 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6012 | { | 6653 | { |
6654 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6655 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6656 | { | ||
6657 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | ||
6658 | RlvSelectHasLockedAttach functor; | ||
6659 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstNode(&functor)) ) | ||
6660 | return true; | ||
6661 | } | ||
6662 | // [/RLVa:KB] | ||
6663 | |||
6013 | std::string action = userdata.asString(); | 6664 | std::string action = userdata.asString(); |
6014 | if (action == "compile mono") | 6665 | if (action == "compile mono") |
6015 | { | 6666 | { |
@@ -6070,7 +6721,10 @@ void handle_selected_texture_info(void*) | |||
6070 | S32 height = img->getHeight(); | 6721 | S32 height = img->getHeight(); |
6071 | S32 width = img->getWidth(); | 6722 | S32 width = img->getWidth(); |
6072 | S32 components = img->getComponents(); | 6723 | S32 components = img->getComponents(); |
6073 | msg = llformat("%dx%d %s on face ", | 6724 | std::string image_id_string = image_id.asString(); |
6725 | image_id_string = image_id_string.replace(24, 35, 12, '*') + " "; // hide last segment to discourage theft | ||
6726 | msg = llformat("%s%dx%d %s on face ", | ||
6727 | image_id_string.c_str(), | ||
6074 | width, | 6728 | width, |
6075 | height, | 6729 | height, |
6076 | (components == 4 ? "alpha" : "opaque")); | 6730 | (components == 4 ? "alpha" : "opaque")); |
@@ -6091,12 +6745,30 @@ void handle_dump_image_list(void*) | |||
6091 | 6745 | ||
6092 | void handle_test_male(void*) | 6746 | void handle_test_male(void*) |
6093 | { | 6747 | { |
6748 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6749 | if ( (rlv_handler_t::isEnabled()) && | ||
6750 | ( (gRlvHandler.hasLockedAttachment()) || | ||
6751 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | ||
6752 | { | ||
6753 | return; | ||
6754 | } | ||
6755 | // [/RLVa:KB] | ||
6756 | |||
6094 | wear_outfit_by_name("Male Shape & Outfit"); | 6757 | wear_outfit_by_name("Male Shape & Outfit"); |
6095 | //gGestureList.requestResetFromServer( TRUE ); | 6758 | //gGestureList.requestResetFromServer( TRUE ); |
6096 | } | 6759 | } |
6097 | 6760 | ||
6098 | void handle_test_female(void*) | 6761 | void handle_test_female(void*) |
6099 | { | 6762 | { |
6763 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6764 | if ( (rlv_handler_t::isEnabled()) && | ||
6765 | ( (gRlvHandler.hasLockedAttachment()) || | ||
6766 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | ||
6767 | { | ||
6768 | return; | ||
6769 | } | ||
6770 | // [/RLVa:KB] | ||
6771 | |||
6100 | wear_outfit_by_name("Female Shape & Outfit"); | 6772 | wear_outfit_by_name("Female Shape & Outfit"); |
6101 | //gGestureList.requestResetFromServer( FALSE ); | 6773 | //gGestureList.requestResetFromServer( FALSE ); |
6102 | } | 6774 | } |
@@ -6239,6 +6911,22 @@ BOOL enable_more_than_one_selected(void* ) | |||
6239 | 6911 | ||
6240 | static bool is_editable_selected() | 6912 | static bool is_editable_selected() |
6241 | { | 6913 | { |
6914 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | ||
6915 | // RELEASE-RLVa: check that this still isn't called by anything but script actions in the Tools menu | ||
6916 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6917 | { | ||
6918 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | ||
6919 | |||
6920 | // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only | ||
6921 | // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss) | ||
6922 | RlvSelectHasLockedAttach functor; | ||
6923 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstRootNode(&functor)) ) | ||
6924 | { | ||
6925 | return false; | ||
6926 | } | ||
6927 | } | ||
6928 | // [/RLVa:KB] | ||
6929 | |||
6242 | return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); | 6930 | return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); |
6243 | } | 6931 | } |
6244 | 6932 | ||
@@ -6285,7 +6973,12 @@ class LLToolsEnableTakeCopy : public view_listener_t | |||
6285 | { | 6973 | { |
6286 | virtual bool apply(LLViewerObject* obj) | 6974 | virtual bool apply(LLViewerObject* obj) |
6287 | { | 6975 | { |
6288 | return (!obj->permCopy() || obj->isAttachment()); | 6976 | // return (!obj->permCopy() || obj->isAttachment()); |
6977 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
6978 | return (!obj->permCopy() || obj->isAttachment()) || | ||
6979 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && | ||
6980 | (gAgent.getAvatarObject()->getRoot() == obj) ); | ||
6981 | // [/RLVa:KB] | ||
6289 | } | 6982 | } |
6290 | } func; | 6983 | } func; |
6291 | const bool firstonly = true; | 6984 | const bool firstonly = true; |
@@ -6488,6 +7181,9 @@ class LLWorldEnableCreateLandmark : public view_listener_t | |||
6488 | { | 7181 | { |
6489 | bool new_value = gAgent.isGodlike() || | 7182 | bool new_value = gAgent.isGodlike() || |
6490 | (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); | 7183 | (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); |
7184 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
7185 | new_value &= !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC); | ||
7186 | // [/RLVa:KB] | ||
6491 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 7187 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
6492 | return true; | 7188 | return true; |
6493 | } | 7189 | } |
@@ -6540,7 +7236,11 @@ BOOL enable_god_customer_service(void*) | |||
6540 | 7236 | ||
6541 | BOOL enable_god_basic(void*) | 7237 | BOOL enable_god_basic(void*) |
6542 | { | 7238 | { |
6543 | return gAgent.getGodLevel() > GOD_NOT; | 7239 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) |
7240 | // RELEASE-RLVa: check that this function isn't used for anything other than to enable/disable showing the "God Tools..." floater | ||
7241 | return (gAgent.getGodLevel() > GOD_NOT) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); | ||
7242 | // [/RLVa:KB] | ||
7243 | //return gAgent.getGodLevel() > GOD_NOT; | ||
6544 | } | 7244 | } |
6545 | 7245 | ||
6546 | #if 0 // 1.9.2 | 7246 | #if 0 // 1.9.2 |
@@ -7051,6 +7751,13 @@ class LLViewHighlightTransparent : public view_listener_t | |||
7051 | { | 7751 | { |
7052 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7752 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7053 | { | 7753 | { |
7754 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
7755 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
7756 | { | ||
7757 | return true; | ||
7758 | } | ||
7759 | // [/RLVa:KB] | ||
7760 | |||
7054 | LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; | 7761 | LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; |
7055 | return true; | 7762 | return true; |
7056 | } | 7763 | } |
@@ -7098,6 +7805,13 @@ class LLViewShowHUDAttachments : public view_listener_t | |||
7098 | { | 7805 | { |
7099 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7806 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7100 | { | 7807 | { |
7808 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
7809 | if ( (LLPipeline::sShowHUDAttachments) && (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedHUD()) ) | ||
7810 | { | ||
7811 | return true; | ||
7812 | } | ||
7813 | // [/RLVa:KB] | ||
7814 | |||
7101 | LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; | 7815 | LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; |
7102 | return true; | 7816 | return true; |
7103 | } | 7817 | } |
@@ -7156,6 +7870,15 @@ class LLEditEnableTakeOff : public view_listener_t | |||
7156 | { | 7870 | { |
7157 | new_value = LLAgent::selfHasWearable((void *)WT_SKIRT); | 7871 | new_value = LLAgent::selfHasWearable((void *)WT_SKIRT); |
7158 | } | 7872 | } |
7873 | |||
7874 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
7875 | // Why aren't they using LLWearable::typeNameToType()? *confuzzled* | ||
7876 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isRemovable(LLWearable::typeNameToType(clothing))) ) | ||
7877 | { | ||
7878 | new_value = false; | ||
7879 | } | ||
7880 | // [/RLVa:KB] | ||
7881 | |||
7159 | gMenuHolder->findControl(control_name)->setValue(new_value); | 7882 | gMenuHolder->findControl(control_name)->setValue(new_value); |
7160 | return true; | 7883 | return true; |
7161 | } | 7884 | } |
@@ -7253,6 +7976,13 @@ class LLWorldEnvSettings : public view_listener_t | |||
7253 | { | 7976 | { |
7254 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7977 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7255 | { | 7978 | { |
7979 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
7980 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
7981 | { | ||
7982 | return true; | ||
7983 | } | ||
7984 | // [/RLVa:KB] | ||
7985 | |||
7256 | std::string tod = userdata.asString(); | 7986 | std::string tod = userdata.asString(); |
7257 | LLVector3 sun_direction; | 7987 | LLVector3 sun_direction; |
7258 | 7988 | ||
@@ -7330,6 +8060,13 @@ class LLWorldWaterSettings : public view_listener_t | |||
7330 | { | 8060 | { |
7331 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 8061 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7332 | { | 8062 | { |
8063 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
8064 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
8065 | { | ||
8066 | return true; | ||
8067 | } | ||
8068 | // [/RLVa:KB] | ||
8069 | |||
7333 | // if not there or is hidden, show it | 8070 | // if not there or is hidden, show it |
7334 | if( !LLFloaterWater::isOpen() || | 8071 | if( !LLFloaterWater::isOpen() || |
7335 | !LLFloaterWater::instance()->getVisible()) { | 8072 | !LLFloaterWater::instance()->getVisible()) { |
@@ -7360,6 +8097,13 @@ class LLWorldDayCycle : public view_listener_t | |||
7360 | { | 8097 | { |
7361 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 8098 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7362 | { | 8099 | { |
8100 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
8101 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
8102 | { | ||
8103 | return true; | ||
8104 | } | ||
8105 | // [/RLVa:KB] | ||
8106 | |||
7363 | LLFloaterDayCycle::show(); | 8107 | LLFloaterDayCycle::show(); |
7364 | return true; | 8108 | return true; |
7365 | } | 8109 | } |
@@ -7547,6 +8291,113 @@ class LLAdvancedCheckHUDInfo : public view_listener_t | |||
7547 | }; | 8291 | }; |
7548 | 8292 | ||
7549 | 8293 | ||
8294 | ////////////////////// | ||
8295 | // FORCE GROUND SIT // | ||
8296 | ////////////////////// | ||
8297 | |||
8298 | class LLAdvancedToggleSit: public view_listener_t | ||
8299 | { | ||
8300 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8301 | { | ||
8302 | LLChat chat; | ||
8303 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8304 | if(!gAgent.getAvatarObject()->mIsSitting) | ||
8305 | { | ||
8306 | gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); | ||
8307 | chat.mText = "Forcing Ground Sit"; | ||
8308 | } | ||
8309 | else | ||
8310 | { | ||
8311 | gAgent.setControlFlags(!AGENT_CONTROL_SIT_ON_GROUND); | ||
8312 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
8313 | chat.mText = "Standing up"; | ||
8314 | } | ||
8315 | LLFloaterChat::addChat(chat); | ||
8316 | return true; | ||
8317 | } | ||
8318 | }; | ||
8319 | |||
8320 | class LLAdvancedCheckSit : public view_listener_t | ||
8321 | { | ||
8322 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8323 | { | ||
8324 | if(gAgent.getAvatarObject()->mIsSitting) | ||
8325 | { | ||
8326 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
8327 | } | ||
8328 | else | ||
8329 | { | ||
8330 | gMenuHolder->findControl(userdata["control"].asString())->setValue(false); | ||
8331 | } | ||
8332 | return true; | ||
8333 | } | ||
8334 | }; | ||
8335 | |||
8336 | |||
8337 | ///////////// | ||
8338 | // PHANTOM // | ||
8339 | ///////////// | ||
8340 | |||
8341 | class LLAdvancedTogglePhantom: public view_listener_t | ||
8342 | { | ||
8343 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8344 | { | ||
8345 | LLAgent::togglePhantom(); | ||
8346 | BOOL ph = LLAgent::getPhantom(); | ||
8347 | LLChat chat; | ||
8348 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8349 | chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); | ||
8350 | LLFloaterChat::addChat(chat); | ||
8351 | //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); | ||
8352 | return true; | ||
8353 | } | ||
8354 | |||
8355 | }; | ||
8356 | |||
8357 | class LLAdvancedCheckPhantom: public view_listener_t | ||
8358 | { | ||
8359 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8360 | { | ||
8361 | gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); | ||
8362 | return true; | ||
8363 | } | ||
8364 | }; | ||
8365 | |||
8366 | |||
8367 | /////////////////// | ||
8368 | // ASSET BROWSER // | ||
8369 | /////////////////// | ||
8370 | |||
8371 | class LLAdvancedToggleAssetBrowser: public view_listener_t | ||
8372 | { | ||
8373 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8374 | { | ||
8375 | //open the floater | ||
8376 | LLFloaterAssetBrowser::show(0); | ||
8377 | |||
8378 | bool vis = false; | ||
8379 | if(LLFloaterAssetBrowser::getInstance()) | ||
8380 | { | ||
8381 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8382 | } | ||
8383 | return true; | ||
8384 | } | ||
8385 | }; | ||
8386 | |||
8387 | class LLAdvancedCheckAssetBrowser: public view_listener_t | ||
8388 | { | ||
8389 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8390 | { | ||
8391 | bool vis = false; | ||
8392 | if(LLFloaterAssetBrowser::getInstance()) | ||
8393 | { | ||
8394 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8395 | } | ||
8396 | gMenuHolder->findControl(userdata["control"].asString())->setValue(vis); | ||
8397 | return true; | ||
8398 | } | ||
8399 | }; | ||
8400 | |||
7550 | 8401 | ||
7551 | /////////////////////// | 8402 | /////////////////////// |
7552 | // CLEAR GROUP CACHE // | 8403 | // CLEAR GROUP CACHE // |
@@ -9487,6 +10338,49 @@ class LLAvatarReportAbuse : public view_listener_t | |||
9487 | 10338 | ||
9488 | 10339 | ||
9489 | 10340 | ||
10341 | /////////////// | ||
10342 | // RLVa Main // | ||
10343 | /////////////// | ||
10344 | |||
10345 | |||
10346 | class RLVaMainToggle : public view_listener_t | ||
10347 | { | ||
10348 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10349 | { | ||
10350 | rlvDbgToggleEnabled(NULL); | ||
10351 | return true; | ||
10352 | } | ||
10353 | }; | ||
10354 | |||
10355 | class RLVaMainCheck : public view_listener_t | ||
10356 | { | ||
10357 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10358 | { | ||
10359 | bool new_value = rlvDbgGetEnabled(NULL); | ||
10360 | std::string control_name = userdata["control"].asString(); | ||
10361 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
10362 | return true; | ||
10363 | } | ||
10364 | }; | ||
10365 | |||
10366 | |||
10367 | |||
10368 | //////////////////// | ||
10369 | // RLVa BEHAVIORS // | ||
10370 | //////////////////// | ||
10371 | |||
10372 | |||
10373 | class RLVaBehaviorsShow : public view_listener_t | ||
10374 | { | ||
10375 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10376 | { | ||
10377 | RlvFloaterBehaviour::show(NULL); | ||
10378 | return true; | ||
10379 | } | ||
10380 | }; | ||
10381 | |||
10382 | |||
10383 | |||
9490 | static void addMenu(view_listener_t *menu, const char *name) | 10384 | static void addMenu(view_listener_t *menu, const char *name) |
9491 | { | 10385 | { |
9492 | sMenus.push_back(menu); | 10386 | sMenus.push_back(menu); |
@@ -9652,6 +10546,10 @@ void initialize_menus() | |||
9652 | addMenu(new LLObjectBuy(), "Object.Buy"); | 10546 | addMenu(new LLObjectBuy(), "Object.Buy"); |
9653 | addMenu(new LLObjectEdit(), "Object.Edit"); | 10547 | addMenu(new LLObjectEdit(), "Object.Edit"); |
9654 | addMenu(new LLObjectInspect(), "Object.Inspect"); | 10548 | addMenu(new LLObjectInspect(), "Object.Inspect"); |
10549 | addMenu(new LLObjectCopyUUID(), "Object.CopyUUID"); | ||
10550 | addMenu(new LLObjectExport(), "Object.Export"); | ||
10551 | addMenu(new LLObjectImport(), "Object.Import"); | ||
10552 | addMenu(new LLObjectImportUpload(), "Object.ImportUpload"); | ||
9655 | 10553 | ||
9656 | addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); | 10554 | addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); |
9657 | addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); | 10555 | addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); |
@@ -9662,6 +10560,9 @@ void initialize_menus() | |||
9662 | addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); | 10560 | addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); |
9663 | addMenu(new LLObjectEnableMute(), "Object.EnableMute"); | 10561 | addMenu(new LLObjectEnableMute(), "Object.EnableMute"); |
9664 | addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); | 10562 | addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); |
10563 | addMenu(new LLObjectEnableCopyUUID(), "Object.EnableCopyUUID"); | ||
10564 | addMenu(new LLObjectEnableExport(), "Object.EnableExport"); | ||
10565 | addMenu(new LLObjectEnableImport(), "Object.EnableImport"); | ||
9665 | 10566 | ||
9666 | /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); | 10567 | /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); |
9667 | addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); | 10568 | addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); |
@@ -9711,6 +10612,12 @@ void initialize_menus() | |||
9711 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); | 10612 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); |
9712 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); | 10613 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); |
9713 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); | 10614 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); |
10615 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); | ||
10616 | addMenu(new LLAdvancedCheckSit(), "Emerald.CheckSit"); | ||
10617 | addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); | ||
10618 | addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); | ||
10619 | addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser"); | ||
10620 | addMenu(new LLAdvancedCheckAssetBrowser(),"Advanced.CheckAssetBrowser"); | ||
9714 | 10621 | ||
9715 | // Advanced > HUD Info | 10622 | // Advanced > HUD Info |
9716 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); | 10623 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); |
@@ -9856,4 +10763,11 @@ void initialize_menus() | |||
9856 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); | 10763 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); |
9857 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); | 10764 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |
9858 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); | 10765 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); |
10766 | |||
10767 | |||
10768 | // RLVa | ||
10769 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); | ||
10770 | addMenu(new RLVaMainCheck(), "RLVa.Main.Enabled"); | ||
10771 | addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); | ||
10772 | |||
9859 | } | 10773 | } |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 3fb8e9a..e326dac 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -140,6 +140,11 @@ | |||
140 | #include "llwindebug.h" // For the invalid message handler | 140 | #include "llwindebug.h" // For the invalid message handler |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
144 | #include "llfloateravatarinfo.h" | ||
145 | extern LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances; // Only defined in llfloateravatarinfo.cpp | ||
146 | // [/RLVa:KB] | ||
147 | |||
143 | // | 148 | // |
144 | // Constants | 149 | // Constants |
145 | // | 150 | // |
@@ -1007,8 +1012,17 @@ void inventory_offer_callback(S32 button, void* user_data) | |||
1007 | std::string first_name, last_name; | 1012 | std::string first_name, last_name; |
1008 | if (gCacheName->getName(info->mFromID, first_name, last_name)) | 1013 | if (gCacheName->getName(info->mFromID, first_name, last_name)) |
1009 | { | 1014 | { |
1010 | from_string = std::string("An object named '") + info->mFromName + "' owned by " + first_name + " " + last_name; | 1015 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) |
1011 | chatHistory_string = info->mFromName + " owned by " + first_name + " " + last_name; | 1016 | std::string full_name = first_name + " " + last_name; |
1017 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) | ||
1018 | { | ||
1019 | full_name = gRlvHandler.getAnonym(full_name); | ||
1020 | } | ||
1021 | from_string = std::string("An object named '") + info->mFromName + "' owned by " + full_name; | ||
1022 | chatHistory_string = info->mFromName + " owned by " + full_name; | ||
1023 | // [/RLVa:KB] | ||
1024 | //from_string = std::string("An object named '") + info->mFromName + "' owned by " + first_name + " " + last_name; | ||
1025 | //chatHistory_string = info->mFromName + " owned by " + first_name + " " + last_name; | ||
1012 | } | 1026 | } |
1013 | else | 1027 | else |
1014 | { | 1028 | { |
@@ -1027,6 +1041,21 @@ void inventory_offer_callback(S32 button, void* user_data) | |||
1027 | switch(button) | 1041 | switch(button) |
1028 | { | 1042 | { |
1029 | case IOR_ACCEPT: | 1043 | case IOR_ACCEPT: |
1044 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.2a | ||
1045 | // Only change the inventory offer's destination folder to the shared root if: | ||
1046 | // - the user has enabled the feature | ||
1047 | // - the inventory offer came from a script (and specifies a folder) | ||
1048 | // - the name starts with the prefix [mDesc format (quotes are part of the string): "[OBJECTNAME] ( http://slurl.com/... )"] | ||
1049 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && | ||
1050 | (IM_TASK_INVENTORY_OFFERED == info->mIM) && (LLAssetType::AT_CATEGORY == info->mType) && (info->mDesc.find(RLV_PUTINV_PREFIX) == 1) ) | ||
1051 | { | ||
1052 | LLViewerInventoryCategory* pRlvRoot = gRlvHandler.getSharedRoot(); | ||
1053 | if (pRlvRoot) | ||
1054 | { | ||
1055 | info->mFolderID = pRlvRoot->getUUID(); | ||
1056 | } | ||
1057 | } | ||
1058 | // [/RLVa:KB] | ||
1030 | // ACCEPT. The math for the dialog works, because the accept | 1059 | // ACCEPT. The math for the dialog works, because the accept |
1031 | // for inventory_offered, task_inventory_offer or | 1060 | // for inventory_offered, task_inventory_offer or |
1032 | // group_notice_inventory is 1 greater than the offer integer value. | 1061 | // group_notice_inventory is 1 greater than the offer integer value. |
@@ -1189,6 +1218,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) | |||
1189 | if(indx >= 0) | 1218 | if(indx >= 0) |
1190 | { | 1219 | { |
1191 | LLStringUtil::truncate(msg, indx); | 1220 | LLStringUtil::truncate(msg, indx); |
1221 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a | ||
1222 | // TODO-RLVa: needs revisiting when LL saves open notifications to disk to accept them on the next relog | ||
1223 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
1224 | { | ||
1225 | gRlvHandler.filterLocation(info->mDesc); | ||
1226 | } | ||
1227 | // [/RLVa:KB] | ||
1192 | } | 1228 | } |
1193 | 1229 | ||
1194 | LLStringUtil::format_map_t args; | 1230 | LLStringUtil::format_map_t args; |
@@ -1229,6 +1265,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) | |||
1229 | std::string first_name, last_name; | 1265 | std::string first_name, last_name; |
1230 | if (gCacheName->getName(info->mFromID, first_name, last_name)) | 1266 | if (gCacheName->getName(info->mFromID, first_name, last_name)) |
1231 | { | 1267 | { |
1268 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
1269 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) | ||
1270 | { | ||
1271 | first_name = gRlvHandler.getAnonym(first_name.append(" ").append(last_name)); | ||
1272 | last_name.clear(); | ||
1273 | } | ||
1274 | // [/RLVa:KB] | ||
1232 | args["[FIRST]"] = first_name; | 1275 | args["[FIRST]"] = first_name; |
1233 | args["[LAST]"] = last_name; | 1276 | args["[LAST]"] = last_name; |
1234 | name_found = TRUE; | 1277 | name_found = TRUE; |
@@ -1243,7 +1286,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) | |||
1243 | else | 1286 | else |
1244 | { | 1287 | { |
1245 | // *TODO:translate -> [FIRST] [LAST] | 1288 | // *TODO:translate -> [FIRST] [LAST] |
1246 | args["[NAME]"] = info->mFromName; | 1289 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) |
1290 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) ) | ||
1291 | { | ||
1292 | args["[NAME]"] = gRlvHandler.getAnonym(info->mFromName); | ||
1293 | } | ||
1294 | // [/RLVa:KB] | ||
1295 | //args["[NAME]"] = info->mFromName; | ||
1247 | LLNotifyBox::showXml("UserGiveItem", args, | 1296 | LLNotifyBox::showXml("UserGiveItem", args, |
1248 | &inventory_offer_callback, (void*)info); | 1297 | &inventory_offer_callback, (void*)info); |
1249 | } | 1298 | } |
@@ -1411,7 +1460,20 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1411 | // do nothing -- don't distract newbies in | 1460 | // do nothing -- don't distract newbies in |
1412 | // Prelude with global IMs | 1461 | // Prelude with global IMs |
1413 | } | 1462 | } |
1414 | else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) | 1463 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) |
1464 | else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) ) | ||
1465 | { | ||
1466 | rlvSendBusyMessage(from_id, gRlvHandler.getVersionString(), session_id); | ||
1467 | // We won't receive a typing stop message, so do that manually (see comment at the end of LLFloaterIMPanel::sendMsg) | ||
1468 | LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem); | ||
1469 | gIMMgr->processIMTypingStop(im_info); | ||
1470 | } | ||
1471 | // [/RLVa:KB] | ||
1472 | // else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) | ||
1473 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
1474 | else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) && | ||
1475 | ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) ) | ||
1476 | // [/RLVa:KB] | ||
1415 | { | 1477 | { |
1416 | // return a standard "busy" message, but only do it to online IM | 1478 | // return a standard "busy" message, but only do it to online IM |
1417 | // (i.e. not other auto responses and not store-and-forward IM) | 1479 | // (i.e. not other auto responses and not store-and-forward IM) |
@@ -1468,6 +1530,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1468 | } | 1530 | } |
1469 | else if (to_id.isNull()) | 1531 | else if (to_id.isNull()) |
1470 | { | 1532 | { |
1533 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
1534 | // Filter region messages that weren't sent by a Linden | ||
1535 | if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) && | ||
1536 | (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) ) | ||
1537 | { | ||
1538 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
1539 | gRlvHandler.filterLocation(message); | ||
1540 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
1541 | { | ||
1542 | name = gRlvHandler.getAnonym(name); | ||
1543 | gRlvHandler.filterNames(message); | ||
1544 | } | ||
1545 | } | ||
1546 | // [/RLVa:KB] | ||
1547 | |||
1471 | // Message to everyone from GOD | 1548 | // Message to everyone from GOD |
1472 | args["[NAME]"] = name; | 1549 | args["[NAME]"] = name; |
1473 | args["[MESSAGE]"] = message; | 1550 | args["[MESSAGE]"] = message; |
@@ -1483,6 +1560,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1483 | else | 1560 | else |
1484 | { | 1561 | { |
1485 | // standard message, not from system | 1562 | // standard message, not from system |
1563 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
1564 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) | ||
1565 | { | ||
1566 | rlvSendBusyMessage(from_id, rlv_handler_t::cstrMsgRecvIM, session_id); | ||
1567 | |||
1568 | message = message.substr(0, message_offset) + rlv_handler_t::cstrBlockedRecvIM; | ||
1569 | } | ||
1570 | // [/RLVa:KB] | ||
1571 | |||
1486 | std::string saved; | 1572 | std::string saved; |
1487 | if(offline == IM_OFFLINE) | 1573 | if(offline == IM_OFFLINE) |
1488 | { | 1574 | { |
@@ -1688,6 +1774,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1688 | bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; | 1774 | bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; |
1689 | info->mType = (LLAssetType::EType) bucketp->asset_type; | 1775 | info->mType = (LLAssetType::EType) bucketp->asset_type; |
1690 | info->mObjectID = bucketp->object_id; | 1776 | info->mObjectID = bucketp->object_id; |
1777 | |||
1778 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
1779 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(from_id)) ) | ||
1780 | { | ||
1781 | name = gRlvHandler.getAnonym(name); | ||
1782 | } | ||
1783 | // [/RLVa:KB] | ||
1691 | } | 1784 | } |
1692 | else | 1785 | else |
1693 | { | 1786 | { |
@@ -1732,13 +1825,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1732 | 1825 | ||
1733 | case IM_INVENTORY_ACCEPTED: | 1826 | case IM_INVENTORY_ACCEPTED: |
1734 | { | 1827 | { |
1735 | args["[NAME]"] = name; | 1828 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b |
1829 | bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && | ||
1830 | (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id)); | ||
1831 | args["[NAME]"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name); | ||
1832 | // [/RLVa:KB] | ||
1833 | // args["[NAME]"] = name; | ||
1736 | LLNotifyBox::showXml("InventoryAccepted", args); | 1834 | LLNotifyBox::showXml("InventoryAccepted", args); |
1737 | break; | 1835 | break; |
1738 | } | 1836 | } |
1739 | case IM_INVENTORY_DECLINED: | 1837 | case IM_INVENTORY_DECLINED: |
1740 | { | 1838 | { |
1741 | args["[NAME]"] = name; | 1839 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b |
1840 | bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && | ||
1841 | (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id)); | ||
1842 | args["[NAME]"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name); | ||
1843 | // [/RLVa:KB] | ||
1844 | // args["[NAME]"] = name; | ||
1742 | LLNotifyBox::showXml("InventoryDeclined", args); | 1845 | LLNotifyBox::showXml("InventoryDeclined", args); |
1743 | break; | 1846 | break; |
1744 | } | 1847 | } |
@@ -1772,6 +1875,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1772 | return; | 1875 | return; |
1773 | } | 1876 | } |
1774 | 1877 | ||
1878 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
1879 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) ) | ||
1880 | { | ||
1881 | if (gAgent.isInGroup(session_id)) | ||
1882 | { | ||
1883 | if (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id)) | ||
1884 | return; | ||
1885 | } | ||
1886 | else | ||
1887 | { | ||
1888 | if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) | ||
1889 | message = message.substr(0, message_offset) + rlv_handler_t::cstrBlockedRecvIM; | ||
1890 | } | ||
1891 | } | ||
1892 | // [/RLVa:KB] | ||
1893 | |||
1775 | // standard message, not from system | 1894 | // standard message, not from system |
1776 | std::string saved; | 1895 | std::string saved; |
1777 | if(offline == IM_OFFLINE) | 1896 | if(offline == IM_OFFLINE) |
@@ -1802,15 +1921,51 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1802 | break; | 1921 | break; |
1803 | 1922 | ||
1804 | case IM_FROM_TASK: | 1923 | case IM_FROM_TASK: |
1805 | if (is_busy && !is_owned_by_me) | ||
1806 | { | 1924 | { |
1807 | return; | 1925 | if (is_busy && !is_owned_by_me) |
1926 | { | ||
1927 | return; | ||
1928 | } | ||
1929 | chat.mText = name + separator_string + message.substr(message_offset); | ||
1930 | chat.mFromName = name; | ||
1931 | |||
1932 | // Build a link to open the object IM info window. | ||
1933 | std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size); | ||
1934 | |||
1935 | LLSD query_string; | ||
1936 | query_string["owner"] = from_id; | ||
1937 | query_string["slurl"] = location.c_str(); | ||
1938 | query_string["name"] = name; | ||
1939 | if (from_group) | ||
1940 | { | ||
1941 | query_string["groupowned"] = "true"; | ||
1942 | } | ||
1943 | |||
1944 | if (session_id.notNull()) | ||
1945 | { | ||
1946 | chat.mFromID = session_id; | ||
1947 | } | ||
1948 | else | ||
1949 | { | ||
1950 | // This message originated on a region without the updated code for task id and slurl information. | ||
1951 | // We just need a unique ID for this object that isn't the owner ID. | ||
1952 | // If it is the owner ID it will overwrite the style that contains the link to that owner's profile. | ||
1953 | // This isn't ideal - it will make 1 style for all objects owned by the the same person/group. | ||
1954 | // This works because the only thing we can really do in this case is show the owner name and link to their profile. | ||
1955 | chat.mFromID = from_id ^ gAgent.getSessionID(); | ||
1956 | } | ||
1957 | |||
1958 | std::ostringstream link; | ||
1959 | link << "secondlife:///app/objectim/" << session_id | ||
1960 | << LLURI::mapToQueryString(query_string); | ||
1961 | |||
1962 | chat.mURL = link.str(); | ||
1963 | |||
1964 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because | ||
1965 | // IMs from objcts don't open IM sessions. | ||
1966 | chat.mSourceType = CHAT_SOURCE_OBJECT; | ||
1967 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
1808 | } | 1968 | } |
1809 | chat.mText = name + separator_string + message.substr(message_offset); | ||
1810 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because | ||
1811 | // IMs from objcts don't open IM sessions. | ||
1812 | chat.mSourceType = CHAT_SOURCE_OBJECT; | ||
1813 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
1814 | break; | 1969 | break; |
1815 | case IM_FROM_TASK_AS_ALERT: | 1970 | case IM_FROM_TASK_AS_ALERT: |
1816 | if (is_busy && !is_owned_by_me) | 1971 | if (is_busy && !is_owned_by_me) |
@@ -1818,6 +1973,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1818 | return; | 1973 | return; |
1819 | } | 1974 | } |
1820 | { | 1975 | { |
1976 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
1977 | // TODO-RLVa: what actually generates this? | ||
1978 | if (rlv_handler_t::isEnabled()) | ||
1979 | { | ||
1980 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
1981 | gRlvHandler.filterLocation(message); | ||
1982 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
1983 | gRlvHandler.filterNames(message); | ||
1984 | } | ||
1985 | // [/RLVa:KB] | ||
1986 | |||
1821 | // Construct a viewer alert for this message. | 1987 | // Construct a viewer alert for this message. |
1822 | args["[NAME]"] = name; | 1988 | args["[NAME]"] = name; |
1823 | args["[MESSAGE]"] = message; | 1989 | args["[MESSAGE]"] = message; |
@@ -1850,12 +2016,48 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1850 | } | 2016 | } |
1851 | else | 2017 | else |
1852 | { | 2018 | { |
1853 | // *TODO:translate -> [FIRST] [LAST] (maybe) | 2019 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) |
1854 | LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE); | 2020 | if (rlv_handler_t::isEnabled()) |
1855 | args["[NAME]"] = name; | 2021 | { |
1856 | args["[MESSAGE]"] = message; | 2022 | // Disallow if: 1) @tplure=n restricted (sender isn't an exception), or 2) @unsit=n restricted and currently sitting |
1857 | LLNotifyBox::showXml("OfferTeleport", args, | 2023 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); |
1858 | lure_callback, (void*)info); | 2024 | if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) && (!gRlvHandler.isException(RLV_BHVR_TPLURE, from_id)) ) || |
2025 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (pAvatar) && (pAvatar->mIsSitting) ) ) | ||
2026 | { | ||
2027 | rlvSendBusyMessage(from_id, rlv_handler_t::cstrMsgTpLure); | ||
2028 | return; | ||
2029 | } | ||
2030 | |||
2031 | // Censor teleport message if: 1) @revcim=n restricted (sender isn't an exception), or 2) @showloc=n restricted | ||
2032 | if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) || | ||
2033 | (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
2034 | { | ||
2035 | message = rlv_handler_t::cstrHidden; | ||
2036 | } | ||
2037 | } | ||
2038 | // [/RLVa:KB] | ||
2039 | |||
2040 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b | ||
2041 | if ( (rlv_handler_t::isEnabled()) && | ||
2042 | ((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id))) ) | ||
2043 | { | ||
2044 | gRlvHandler.setCanCancelTp(false); | ||
2045 | // (see IM_GODLIKE_LURE_USER below) | ||
2046 | LLLureInfo* info = new LLLureInfo(from_id, session_id, TRUE); | ||
2047 | lure_callback(0, (void*)info); | ||
2048 | } | ||
2049 | else | ||
2050 | { | ||
2051 | // [/RLVa:KB] | ||
2052 | // *TODO:translate -> [FIRST] [LAST] (maybe) | ||
2053 | LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE); | ||
2054 | args["[NAME]"] = name; | ||
2055 | args["[MESSAGE]"] = message; | ||
2056 | LLNotifyBox::showXml("OfferTeleport", args, | ||
2057 | lure_callback, (void*)info); | ||
2058 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b | ||
2059 | } | ||
2060 | // [/RLVa:KB] | ||
1859 | } | 2061 | } |
1860 | } | 2062 | } |
1861 | break; | 2063 | break; |
@@ -2200,8 +2402,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2200 | chat.mPosAgent = chatter->getPositionAgent(); | 2402 | chat.mPosAgent = chatter->getPositionAgent(); |
2201 | 2403 | ||
2202 | // Make swirly things only for talking objects. (not script debug messages, though) | 2404 | // Make swirly things only for talking objects. (not script debug messages, though) |
2203 | if (chat.mSourceType == CHAT_SOURCE_OBJECT | 2405 | // if (chat.mSourceType == CHAT_SOURCE_OBJECT |
2204 | && chat.mChatType != CHAT_TYPE_DEBUG_MSG) | 2406 | // && chat.mChatType != CHAT_TYPE_DEBUG_MSG) |
2407 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
2408 | // Don't show swirly things for llOwnerSay() chat here because we handle those further down | ||
2409 | if ( (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) && | ||
2410 | ((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) ) | ||
2411 | // [/RLVa:KB] | ||
2205 | { | 2412 | { |
2206 | LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); | 2413 | LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); |
2207 | psc->setSourceObject(chatter); | 2414 | psc->setSourceObject(chatter); |
@@ -2234,6 +2441,50 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2234 | color.setVec(1.f,1.f,1.f,1.f); | 2441 | color.setVec(1.f,1.f,1.f,1.f); |
2235 | msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); | 2442 | msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); |
2236 | 2443 | ||
2444 | // [RLVa:KB] - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
2445 | if ( (rlv_handler_t::isEnabled()) && | ||
2446 | (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) ) | ||
2447 | { | ||
2448 | // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) | ||
2449 | BOOL is_attachment = (chatter) ? chatter->isAttachment() : FALSE; | ||
2450 | |||
2451 | // Filtering "rules": | ||
2452 | // avatar => filter all avie text (unless it's this avie or they're an exemption) | ||
2453 | // objects => filter everything except attachments this avie owns | ||
2454 | if ( ((CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID())) || (!is_owned_by_me) || (!is_attachment) ) | ||
2455 | { | ||
2456 | if (!rlvIsEmote(mesg)) | ||
2457 | { | ||
2458 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHAT)) && (!gRlvHandler.isException(RLV_BHVR_RECVCHAT, from_id)) ) | ||
2459 | gRlvHandler.filterChat(mesg, false); | ||
2460 | } | ||
2461 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTE)) && (!gRlvHandler.isException(RLV_BHVR_RECVEMOTE, from_id)) ) | ||
2462 | { | ||
2463 | mesg = "/me ..."; | ||
2464 | } | ||
2465 | } | ||
2466 | |||
2467 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
2468 | { | ||
2469 | // Filtering "rules": | ||
2470 | // avatar => filter only their name (unless it's this avie) | ||
2471 | // other => filter everything except attachments this avie owns but then we still do filter their text | ||
2472 | if (CHAT_SOURCE_AGENT == chat.mSourceType) | ||
2473 | { | ||
2474 | if (chat.mFromID != gAgent.getID()) | ||
2475 | from_name = gRlvHandler.getAnonym(from_name); | ||
2476 | } | ||
2477 | else | ||
2478 | { | ||
2479 | if ( (!is_owned_by_me) || (!is_attachment) ) | ||
2480 | gRlvHandler.filterNames(from_name); | ||
2481 | gRlvHandler.filterNames(mesg); | ||
2482 | } | ||
2483 | chat.mRlvNamesFiltered = true; | ||
2484 | } | ||
2485 | } | ||
2486 | // [/RLVa:KB] | ||
2487 | |||
2237 | BOOL ircstyle = FALSE; | 2488 | BOOL ircstyle = FALSE; |
2238 | 2489 | ||
2239 | // Look for IRC-style emotes here so chatbubbles work | 2490 | // Look for IRC-style emotes here so chatbubbles work |
@@ -2298,8 +2549,76 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2298 | case CHAT_TYPE_WHISPER: | 2549 | case CHAT_TYPE_WHISPER: |
2299 | verb = " " + LLTrans::getString("whisper") + " "; | 2550 | verb = " " + LLTrans::getString("whisper") + " "; |
2300 | break; | 2551 | break; |
2301 | case CHAT_TYPE_DEBUG_MSG: | ||
2302 | case CHAT_TYPE_OWNER: | 2552 | case CHAT_TYPE_OWNER: |
2553 | // [RLVa:KB] - Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
2554 | if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) ) | ||
2555 | { | ||
2556 | mesg.erase(0, 1); | ||
2557 | LLStringUtil::toLower(mesg); | ||
2558 | |||
2559 | std::string strExecuted, strFailed, strRetained, *pstr; | ||
2560 | |||
2561 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
2562 | boost::char_separator<char> sep(",", "", boost::drop_empty_tokens); | ||
2563 | tokenizer tokens(mesg, sep); | ||
2564 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
2565 | { | ||
2566 | if (LLStartUp::getStartupState() == STATE_STARTED) | ||
2567 | { | ||
2568 | if (gRlvHandler.processCommand(from_id, *itToken, true)) | ||
2569 | pstr = &strExecuted; | ||
2570 | else | ||
2571 | pstr = &strFailed; | ||
2572 | } | ||
2573 | else | ||
2574 | { | ||
2575 | gRlvHandler.retainCommand(from_name, from_id, *itToken); | ||
2576 | pstr = &strRetained; | ||
2577 | } | ||
2578 | |||
2579 | if (!pstr->empty()) | ||
2580 | pstr->push_back(','); | ||
2581 | pstr->append(*itToken); | ||
2582 | } | ||
2583 | |||
2584 | if (!RlvSettings::getDebug()) | ||
2585 | return; | ||
2586 | |||
2587 | // Silly people want comprehensive debug messages, blah :p | ||
2588 | if ( (!strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty()) ) | ||
2589 | verb = " executes: @"; | ||
2590 | else if ( (strExecuted.empty()) && (!strFailed.empty()) && (strRetained.empty()) ) | ||
2591 | verb = " failed: @"; | ||
2592 | else if ( (strExecuted.empty()) && (strFailed.empty()) && (!strRetained.empty()) ) | ||
2593 | verb = " retained: @"; | ||
2594 | else | ||
2595 | { | ||
2596 | verb = ": @"; | ||
2597 | if (!strExecuted.empty()) | ||
2598 | mesg += "\n - executed: @" + strExecuted; | ||
2599 | if (!strFailed.empty()) | ||
2600 | mesg += "\n - failed: @" + strFailed; | ||
2601 | if (!strRetained.empty()) | ||
2602 | mesg += "\n - retained: @" + strRetained; | ||
2603 | } | ||
2604 | |||
2605 | break; | ||
2606 | } | ||
2607 | // [/RLVa:KB] | ||
2608 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
2609 | // Copy/paste from above | ||
2610 | if ( (chatter) && (chat.mChatType != CHAT_TYPE_DEBUG_MSG) ) | ||
2611 | { | ||
2612 | LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); | ||
2613 | psc->setSourceObject(chatter); | ||
2614 | psc->setColor(color); | ||
2615 | //We set the particles to be owned by the object's owner, | ||
2616 | //just in case they should be muted by the mute list | ||
2617 | psc->setOwnerUUID(owner_id); | ||
2618 | LLViewerPartSim::getInstance()->addPartSource(psc); | ||
2619 | } | ||
2620 | // [/RLVa:KB] | ||
2621 | case CHAT_TYPE_DEBUG_MSG: | ||
2303 | case CHAT_TYPE_NORMAL: | 2622 | case CHAT_TYPE_NORMAL: |
2304 | verb = ": "; | 2623 | verb = ": "; |
2305 | break; | 2624 | break; |
@@ -2368,7 +2687,10 @@ void process_teleport_start(LLMessageSystem *msg, void**) | |||
2368 | U32 teleport_flags = 0x0; | 2687 | U32 teleport_flags = 0x0; |
2369 | msg->getU32("Info", "TeleportFlags", teleport_flags); | 2688 | msg->getU32("Info", "TeleportFlags", teleport_flags); |
2370 | 2689 | ||
2371 | if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) | 2690 | //if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) |
2691 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b | ||
2692 | if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) ) | ||
2693 | // [/RLVa:KB] | ||
2372 | { | 2694 | { |
2373 | gViewerWindow->setProgressCancelButtonVisible(FALSE); | 2695 | gViewerWindow->setProgressCancelButtonVisible(FALSE); |
2374 | } | 2696 | } |
@@ -2403,7 +2725,10 @@ void process_teleport_progress(LLMessageSystem* msg, void**) | |||
2403 | } | 2725 | } |
2404 | U32 teleport_flags = 0x0; | 2726 | U32 teleport_flags = 0x0; |
2405 | msg->getU32("Info", "TeleportFlags", teleport_flags); | 2727 | msg->getU32("Info", "TeleportFlags", teleport_flags); |
2406 | if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) | 2728 | //if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) |
2729 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b | ||
2730 | if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) ) | ||
2731 | // [/RLVa:KB] | ||
2407 | { | 2732 | { |
2408 | gViewerWindow->setProgressCancelButtonVisible(FALSE); | 2733 | gViewerWindow->setProgressCancelButtonVisible(FALSE); |
2409 | } | 2734 | } |
@@ -2718,6 +3043,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) | |||
2718 | // appropriate. | 3043 | // appropriate. |
2719 | LLVector3 shift_vector = regionp->getPosRegionFromGlobal( | 3044 | LLVector3 shift_vector = regionp->getPosRegionFromGlobal( |
2720 | gAgent.getRegion()->getOriginGlobal()); | 3045 | gAgent.getRegion()->getOriginGlobal()); |
3046 | // don't shift objects, if teleporting more than about 1000 sims, as | ||
3047 | // for long teleports shifting objects garbles the view at the target region | ||
3048 | if (shift_vector.lengthSquared() > 6.5e10f) | ||
3049 | shift_vector = LLVector3::zero; | ||
2721 | gAgent.setRegion(regionp); | 3050 | gAgent.setRegion(regionp); |
2722 | gObjectList.shiftObjects(shift_vector); | 3051 | gObjectList.shiftObjects(shift_vector); |
2723 | gAssetStorage->setUpstream(msg->getSender()); | 3052 | gAssetStorage->setUpstream(msg->getSender()); |
@@ -2740,7 +3069,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) | |||
2740 | // know what you look like. | 3069 | // know what you look like. |
2741 | gAgent.sendAgentSetAppearance(); | 3070 | gAgent.sendAgentSetAppearance(); |
2742 | 3071 | ||
2743 | if (avatarp) | 3072 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) |
3073 | if ( (avatarp) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
3074 | // [/RLVa:KB] | ||
3075 | // if (avatarp) | ||
2744 | { | 3076 | { |
2745 | // Chat the "back" SLURL. (DEV-4907) | 3077 | // Chat the "back" SLURL. (DEV-4907) |
2746 | LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); | 3078 | LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); |
@@ -4320,7 +4652,13 @@ void notify_cautioned_script_question(LLScriptQuestionCBData* cbdata, S32 orig_q | |||
4320 | if (viewregion) | 4652 | if (viewregion) |
4321 | { | 4653 | { |
4322 | // got the region, so include the region and 3d coordinates of the object | 4654 | // got the region, so include the region and 3d coordinates of the object |
4323 | notice.setArg("[REGIONNAME]", viewregion->getName()); | 4655 | notice.setArg("[REGIONNAME]", viewregion->getName()); |
4656 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
4657 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
4658 | { | ||
4659 | notice.setArg("[REGIONNAME]", rlv_handler_t::cstrHiddenRegion); | ||
4660 | } | ||
4661 | // [/RLVa:KB] | ||
4324 | std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); | 4662 | std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); |
4325 | notice.setArg("[REGIONPOS]", formatpos); | 4663 | notice.setArg("[REGIONPOS]", formatpos); |
4326 | 4664 | ||
@@ -4525,8 +4863,31 @@ void process_script_question(LLMessageSystem *msg, void **user_data) | |||
4525 | 4863 | ||
4526 | LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions, object_name, owner_name); | 4864 | LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions, object_name, owner_name); |
4527 | 4865 | ||
4866 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0e | ||
4867 | S32 rlvQuestionsOther = questions; | ||
4868 | |||
4869 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour("acceptpermission")) ) | ||
4870 | { | ||
4871 | LLViewerObject* pObj = gObjectList.findObject(taskid); | ||
4872 | if (pObj) | ||
4873 | { | ||
4874 | if (pObj->permYouOwner()) | ||
4875 | { | ||
4876 | // PERMISSION_TAKE_CONTROLS and PERMISSION_ATTACH are only auto-granted to objects this avie owns | ||
4877 | rlvQuestionsOther &= ~(LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS] | | ||
4878 | LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]); | ||
4879 | } | ||
4880 | } | ||
4881 | } | ||
4882 | |||
4883 | if ( (!caution) && (!rlvQuestionsOther) ) | ||
4884 | { | ||
4885 | script_question_cb(0, cbdata); | ||
4886 | } | ||
4887 | else if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) | ||
4888 | // [/RLVa:KB] | ||
4528 | // check whether cautions are even enabled or not | 4889 | // check whether cautions are even enabled or not |
4529 | if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) | 4890 | //if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) |
4530 | { | 4891 | { |
4531 | if (caution) | 4892 | if (caution) |
4532 | { | 4893 | { |
@@ -4818,6 +5179,21 @@ void handle_lure_callback(S32 option, const std::string& text, void* userdata) | |||
4818 | 5179 | ||
4819 | if(0 == option) | 5180 | if(0 == option) |
4820 | { | 5181 | { |
5182 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0b | ||
5183 | bool fRlvCensorMessage = false; | ||
5184 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) | ||
5185 | { | ||
5186 | for (LLDynamicArray<LLUUID>::iterator it = invitees->begin(); it != invitees->end(); ++it) | ||
5187 | { | ||
5188 | if (!gRlvHandler.isException(RLV_BHVR_SENDIM, *it)) | ||
5189 | { | ||
5190 | fRlvCensorMessage = true; | ||
5191 | break; | ||
5192 | } | ||
5193 | } | ||
5194 | } | ||
5195 | // [/RLVa:KB] | ||
5196 | |||
4821 | LLMessageSystem* msg = gMessageSystem; | 5197 | LLMessageSystem* msg = gMessageSystem; |
4822 | msg->newMessageFast(_PREHASH_StartLure); | 5198 | msg->newMessageFast(_PREHASH_StartLure); |
4823 | msg->nextBlockFast(_PREHASH_AgentData); | 5199 | msg->nextBlockFast(_PREHASH_AgentData); |
@@ -4825,7 +5201,10 @@ void handle_lure_callback(S32 option, const std::string& text, void* userdata) | |||
4825 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | 5201 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); |
4826 | msg->nextBlockFast(_PREHASH_Info); | 5202 | msg->nextBlockFast(_PREHASH_Info); |
4827 | msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in. | 5203 | msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in. |
4828 | msg->addStringFast(_PREHASH_Message, text); | 5204 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0b |
5205 | msg->addStringFast(_PREHASH_Message, (!fRlvCensorMessage) ? text : rlv_handler_t::cstrHidden); | ||
5206 | // [/RLVa:KB] | ||
5207 | //msg->addStringFast(_PREHASH_Message, text); | ||
4829 | for(LLDynamicArray<LLUUID>::iterator itr = invitees->begin(); itr != invitees->end(); ++itr) | 5208 | for(LLDynamicArray<LLUUID>::iterator itr = invitees->begin(); itr != invitees->end(); ++itr) |
4830 | { | 5209 | { |
4831 | msg->nextBlockFast(_PREHASH_TargetData); | 5210 | msg->nextBlockFast(_PREHASH_TargetData); |
@@ -4855,8 +5234,28 @@ void handle_lure(LLDynamicArray<LLUUID>& ids) | |||
4855 | { | 5234 | { |
4856 | LLDynamicArray<LLUUID>* userdata = new LLDynamicArray<LLUUID>(ids); | 5235 | LLDynamicArray<LLUUID>* userdata = new LLDynamicArray<LLUUID>(ids); |
4857 | 5236 | ||
5237 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-1.0.0a | ||
5238 | // Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n | ||
5239 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5240 | { | ||
5241 | for (LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); ++it) | ||
5242 | { | ||
5243 | const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it); | ||
5244 | if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it)) && | ||
5245 | ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) | ||
5246 | { | ||
5247 | delete userdata; | ||
5248 | return; | ||
5249 | } | ||
5250 | } | ||
5251 | } | ||
5252 | // [/RLVa:KB] | ||
5253 | |||
4858 | LLStringUtil::format_map_t edit_args; | 5254 | LLStringUtil::format_map_t edit_args; |
4859 | edit_args["[REGION]"] = gAgent.getRegion()->getName(); | 5255 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-1.0.0a |
5256 | edit_args["[REGION]"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : rlv_handler_t::cstrHidden; | ||
5257 | // [/RLVa:KB] | ||
5258 | //edit_args["[REGION]"] = gAgent.getRegion()->getName(); | ||
4860 | if (gAgent.isGodlike()) | 5259 | if (gAgent.isGodlike()) |
4861 | { | 5260 | { |
4862 | gViewerWindow->alertXmlEditText("OfferTeleportFromGod", edit_args, | 5261 | gViewerWindow->alertXmlEditText("OfferTeleportFromGod", edit_args, |
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index ca7055a..102b135 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp | |||
@@ -1006,6 +1006,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
1006 | coloru.mV[3] = 255 - coloru.mV[3]; | 1006 | coloru.mV[3] = 255 - coloru.mV[3]; |
1007 | mText->setColor(LLColor4(coloru)); | 1007 | mText->setColor(LLColor4(coloru)); |
1008 | mText->setStringUTF8(temp_string); | 1008 | mText->setStringUTF8(temp_string); |
1009 | // [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
1010 | if (rlv_handler_t::isEnabled()) | ||
1011 | { | ||
1012 | mText->setObjectText(temp_string); | ||
1013 | } | ||
1014 | // [/RLVa:KB] | ||
1009 | 1015 | ||
1010 | if (mDrawable.notNull()) | 1016 | if (mDrawable.notNull()) |
1011 | { | 1017 | { |
@@ -1423,6 +1429,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, | |||
1423 | coloru.mV[3] = 255 - coloru.mV[3]; | 1429 | coloru.mV[3] = 255 - coloru.mV[3]; |
1424 | mText->setColor(LLColor4(coloru)); | 1430 | mText->setColor(LLColor4(coloru)); |
1425 | mText->setStringUTF8(temp_string); | 1431 | mText->setStringUTF8(temp_string); |
1432 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
1433 | if (rlv_handler_t::isEnabled()) | ||
1434 | { | ||
1435 | mText->setObjectText(temp_string); | ||
1436 | } | ||
1437 | // [/RLVa:KB] | ||
1426 | 1438 | ||
1427 | setChanged(TEXTURE); | 1439 | setChanged(TEXTURE); |
1428 | } | 1440 | } |
@@ -4795,7 +4807,10 @@ BOOL LLViewerObject::permTransfer() const | |||
4795 | // given you modify rights to. JC | 4807 | // given you modify rights to. JC |
4796 | BOOL LLViewerObject::allowOpen() const | 4808 | BOOL LLViewerObject::allowOpen() const |
4797 | { | 4809 | { |
4798 | return !flagInventoryEmpty() && (permYouOwner() || permModify()); | 4810 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) |
4811 | return !flagInventoryEmpty() && (permYouOwner() || permModify()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)); | ||
4812 | // [/RLVa:KB] | ||
4813 | // return !flagInventoryEmpty() && (permYouOwner() || permModify()); | ||
4799 | } | 4814 | } |
4800 | 4815 | ||
4801 | LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo() | 4816 | LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo() |
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 9ccbf99..cf37058 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -74,6 +74,8 @@ | |||
74 | 74 | ||
75 | #include "llappviewer.h" | 75 | #include "llappviewer.h" |
76 | 76 | ||
77 | #include "primbackup.h" | ||
78 | |||
77 | extern F32 gMinObjectDistance; | 79 | extern F32 gMinObjectDistance; |
78 | extern BOOL gAnimateTextures; | 80 | extern BOOL gAnimateTextures; |
79 | 81 | ||
@@ -163,7 +165,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, | |||
163 | 165 | ||
164 | BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) | 166 | BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) |
165 | { | 167 | { |
166 | if(object.getRegion()) | 168 | if (object.mRegionp) |
167 | { | 169 | { |
168 | U32 local_id = object.mLocalID; | 170 | U32 local_id = object.mLocalID; |
169 | LLHost region_host = object.getRegion()->getHost(); | 171 | LLHost region_host = object.getRegion()->getHost(); |
@@ -175,8 +177,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) | |||
175 | U64 indexid = (((U64)index) << 32) | (U64)local_id; | 177 | U64 indexid = (((U64)index) << 32) | (U64)local_id; |
176 | return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE; | 178 | return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE; |
177 | } | 179 | } |
178 | 180 | return FALSE; | |
179 | return FALSE ; | ||
180 | } | 181 | } |
181 | 182 | ||
182 | void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, | 183 | void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, |
@@ -222,6 +223,11 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, | |||
222 | 223 | ||
223 | updateActive(objectp); | 224 | updateActive(objectp); |
224 | 225 | ||
226 | if(!just_created) | ||
227 | primbackup::getInstance()->prim_update(objectp); | ||
228 | |||
229 | |||
230 | |||
225 | if (just_created) | 231 | if (just_created) |
226 | { | 232 | { |
227 | gPipeline.addObject(objectp); | 233 | gPipeline.addObject(objectp); |
@@ -251,6 +257,9 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, | |||
251 | objectp->mCreateSelected = false; | 257 | objectp->mCreateSelected = false; |
252 | gViewerWindow->getWindow()->decBusyCount(); | 258 | gViewerWindow->getWindow()->decBusyCount(); |
253 | gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW ); | 259 | gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW ); |
260 | |||
261 | primbackup::getInstance()->newprim(objectp); | ||
262 | |||
254 | } | 263 | } |
255 | } | 264 | } |
256 | 265 | ||
@@ -827,17 +836,10 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) | |||
827 | 836 | ||
828 | for (S32 i = 0; i < drawablep->getNumFaces(); i++) | 837 | for (S32 i = 0; i < drawablep->getNumFaces(); i++) |
829 | { | 838 | { |
830 | LLFace* facep = drawablep->getFace(i) ; | 839 | LLViewerObject* objectp = drawablep->getFace(i)->getViewerObject(); |
831 | if(facep) | ||
832 | { | ||
833 | LLViewerObject* objectp = facep->getViewerObject(); | ||
834 | if(objectp) | ||
835 | { | ||
836 | mSelectPickList.erase(objectp); | 840 | mSelectPickList.erase(objectp); |
837 | } | 841 | } |
838 | } | 842 | } |
839 | } | ||
840 | } | ||
841 | 843 | ||
842 | BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) | 844 | BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) |
843 | { | 845 | { |
@@ -914,7 +916,7 @@ void LLViewerObjectList::killAllObjects() | |||
914 | if (!mMapObjects.empty()) | 916 | if (!mMapObjects.empty()) |
915 | { | 917 | { |
916 | llwarns << "Some objects still on map object list!" << llendl; | 918 | llwarns << "Some objects still on map object list!" << llendl; |
917 | mMapObjects.clear(); | 919 | mActiveObjects.clear(); |
918 | } | 920 | } |
919 | } | 921 | } |
920 | 922 | ||
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 3e2cc19..76b752c 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -95,6 +95,13 @@ public: | |||
95 | } | 95 | } |
96 | else | 96 | else |
97 | { | 97 | { |
98 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
99 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour("viewnote")) ) | ||
100 | { | ||
101 | return; | ||
102 | } | ||
103 | // [/RLVa:KB] | ||
104 | |||
98 | // See if we can bring an existing preview to the front | 105 | // See if we can bring an existing preview to the front |
99 | if(!LLPreview::show(item->getUUID(), true)) | 106 | if(!LLPreview::show(item->getUUID(), true)) |
100 | { | 107 | { |
@@ -893,51 +900,9 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask) | |||
893 | 900 | ||
894 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | 901 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) |
895 | { | 902 | { |
896 | BOOL handled = FALSE; | 903 | BOOL handled = FALSE; |
897 | |||
898 | // let scrollbar have first dibs | ||
899 | handled = LLView::childrenHandleMouseUp(x, y, mask) != NULL; | ||
900 | |||
901 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
902 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
903 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
904 | { | ||
905 | mOnScrollEndCallback(mOnScrollEndData); | ||
906 | } | ||
907 | |||
908 | if( !handled && mTakesNonScrollClicks) | ||
909 | { | ||
910 | if( mIsSelecting ) | ||
911 | { | ||
912 | // Finish selection | ||
913 | if( y > getTextRect().mTop ) | ||
914 | { | ||
915 | mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 ); | ||
916 | } | ||
917 | else | ||
918 | if( y < getTextRect().mBottom ) | ||
919 | { | ||
920 | mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 ); | ||
921 | } | ||
922 | |||
923 | setCursorAtLocalPos( x, y, TRUE ); | ||
924 | endSelection(); | ||
925 | |||
926 | updateScrollFromCursor(); | ||
927 | } | ||
928 | |||
929 | if( !hasSelection() ) | ||
930 | { | ||
931 | handleMouseUpOverSegment( x, y, mask ); | ||
932 | } | ||
933 | |||
934 | handled = TRUE; | ||
935 | } | ||
936 | |||
937 | // Delay cursor flashing | ||
938 | resetKeystrokeTimer(); | ||
939 | 904 | ||
940 | if( hasMouseCapture() ) | 905 | if( hasMouseCapture() ) |
941 | { | 906 | { |
942 | if (mDragItem) | 907 | if (mDragItem) |
943 | { | 908 | { |
@@ -956,8 +921,15 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | |||
956 | } | 921 | } |
957 | } | 922 | } |
958 | mDragItem = NULL; | 923 | mDragItem = NULL; |
959 | gFocusMgr.setMouseCapture( NULL ); | 924 | } |
960 | handled = TRUE; | 925 | |
926 | handled = LLTextEditor::handleMouseUp(x,y,mask); | ||
927 | |||
928 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
929 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
930 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
931 | { | ||
932 | mOnScrollEndCallback(mOnScrollEndData); | ||
961 | } | 933 | } |
962 | 934 | ||
963 | return handled; | 935 | return handled; |
@@ -999,6 +971,24 @@ BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) | |||
999 | return handled; | 971 | return handled; |
1000 | } | 972 | } |
1001 | 973 | ||
974 | BOOL LLViewerTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
975 | { | ||
976 | BOOL handled = FALSE; | ||
977 | handled = childrenHandleMiddleMouseDown(x, y, mask) != NULL; | ||
978 | if (!handled) | ||
979 | { | ||
980 | handled = LLTextEditor::handleMiddleMouseDown(x, y, mask); | ||
981 | } | ||
982 | return handled; | ||
983 | } | ||
984 | |||
985 | BOOL LLViewerTextEditor::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
986 | { | ||
987 | BOOL handled = childrenHandleMiddleMouseUp(x, y, mask) != NULL; | ||
988 | |||
989 | return handled; | ||
990 | } | ||
991 | |||
1002 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | 992 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) |
1003 | { | 993 | { |
1004 | BOOL handled = FALSE; | 994 | BOOL handled = FALSE; |
@@ -1021,7 +1011,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1021 | } | 1011 | } |
1022 | } | 1012 | } |
1023 | } | 1013 | } |
1024 | |||
1025 | 1014 | ||
1026 | setCursorAtLocalPos( x, y, FALSE ); | 1015 | setCursorAtLocalPos( x, y, FALSE ); |
1027 | deselect(); | 1016 | deselect(); |
@@ -1059,6 +1048,9 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1059 | // delay cursor flashing | 1048 | // delay cursor flashing |
1060 | resetKeystrokeTimer(); | 1049 | resetKeystrokeTimer(); |
1061 | 1050 | ||
1051 | // take selection to 'primary' clipboard | ||
1052 | updatePrimary(); | ||
1053 | |||
1062 | handled = TRUE; | 1054 | handled = TRUE; |
1063 | } | 1055 | } |
1064 | return handled; | 1056 | return handled; |
diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h index 4cd5850..062808a 100644 --- a/linden/indra/newview/llviewertexteditor.h +++ b/linden/indra/newview/llviewertexteditor.h | |||
@@ -58,6 +58,8 @@ public: | |||
58 | // mousehandler overrides | 58 | // mousehandler overrides |
59 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | 59 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); |
60 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | 60 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); |
61 | virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask); | ||
62 | virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask); | ||
61 | virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); | 63 | virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); |
62 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 64 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
63 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); | 65 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); |
diff --git a/linden/indra/newview/llviewerthrottle.cpp b/linden/indra/newview/llviewerthrottle.cpp index 72a8a80..95c6ae2 100644 --- a/linden/indra/newview/llviewerthrottle.cpp +++ b/linden/indra/newview/llviewerthrottle.cpp | |||
@@ -49,7 +49,7 @@ const F32 MAX_FRACTIONAL = 1.5f; | |||
49 | const F32 MIN_FRACTIONAL = 0.2f; | 49 | const F32 MIN_FRACTIONAL = 0.2f; |
50 | 50 | ||
51 | const F32 MIN_BANDWIDTH = 50.f; | 51 | const F32 MIN_BANDWIDTH = 50.f; |
52 | const F32 MAX_BANDWIDTH = 1500.f; | 52 | const F32 MAX_BANDWIDTH = 5000.f; |
53 | const F32 STEP_FRACTIONAL = 0.1f; | 53 | const F32 STEP_FRACTIONAL = 0.1f; |
54 | const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s | 54 | const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s |
55 | const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s | 55 | const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 7e6c24f..2240d44 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -547,19 +547,42 @@ bool LLViewerWindow::shouldShowToolTipFor(LLMouseHandler *mh) | |||
547 | return false; | 547 | return false; |
548 | } | 548 | } |
549 | 549 | ||
550 | BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) | 550 | BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down) |
551 | { | 551 | { |
552 | std::string buttonname; | ||
553 | std::string buttonstatestr; | ||
554 | BOOL handled = FALSE; | ||
552 | S32 x = pos.mX; | 555 | S32 x = pos.mX; |
553 | S32 y = pos.mY; | 556 | S32 y = pos.mY; |
554 | x = llround((F32)x / mDisplayScale.mV[VX]); | 557 | x = llround((F32)x / mDisplayScale.mV[VX]); |
555 | y = llround((F32)y / mDisplayScale.mV[VY]); | 558 | y = llround((F32)y / mDisplayScale.mV[VY]); |
556 | 559 | ||
557 | LLView::sMouseHandlerMessage.clear(); | 560 | if (down) |
558 | 561 | buttonstatestr = "down" ; | |
559 | if (gDebugClicks) | 562 | else |
563 | buttonstatestr = "up" ; | ||
564 | |||
565 | switch (clicktype) | ||
560 | { | 566 | { |
561 | llinfos << "ViewerWindow left mouse down at " << x << "," << y << llendl; | 567 | case LLMouseHandler::CLICK_LEFT: |
568 | mLeftMouseDown = down; | ||
569 | buttonname = "Left"; | ||
570 | break; | ||
571 | case LLMouseHandler::CLICK_RIGHT: | ||
572 | mRightMouseDown = down; | ||
573 | buttonname = "Right"; | ||
574 | break; | ||
575 | case LLMouseHandler::CLICK_MIDDLE: | ||
576 | mMiddleMouseDown = down; | ||
577 | buttonname = "Middle"; | ||
578 | break; | ||
579 | case LLMouseHandler::CLICK_DOUBLELEFT: | ||
580 | mLeftMouseDown = down; | ||
581 | buttonname = "Left Double Click"; | ||
582 | break; | ||
562 | } | 583 | } |
584 | |||
585 | LLView::sMouseHandlerMessage.clear(); | ||
563 | 586 | ||
564 | if (gMenuBarView) | 587 | if (gMenuBarView) |
565 | { | 588 | { |
@@ -567,7 +590,10 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask | |||
567 | gMenuBarView->resetMenuTrigger(); | 590 | gMenuBarView->resetMenuTrigger(); |
568 | } | 591 | } |
569 | 592 | ||
570 | mLeftMouseDown = TRUE; | 593 | if (gDebugClicks) |
594 | { | ||
595 | llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; | ||
596 | } | ||
571 | 597 | ||
572 | // Make sure we get a coresponding mouseup event, even if the mouse leaves the window | 598 | // Make sure we get a coresponding mouseup event, even if the mouse leaves the window |
573 | mWindow->captureMouse(); | 599 | mWindow->captureMouse(); |
@@ -576,9 +602,9 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask | |||
576 | gMouseIdleTimer.reset(); | 602 | gMouseIdleTimer.reset(); |
577 | 603 | ||
578 | // Hide tooltips on mousedown | 604 | // Hide tooltips on mousedown |
579 | mToolTipBlocked = TRUE; | 605 | mToolTipBlocked = down; |
580 | 606 | ||
581 | // Also hide hover info on mousedown | 607 | // Also hide hover info on mousedown/mouseup |
582 | if (gHoverView) | 608 | if (gHoverView) |
583 | { | 609 | { |
584 | gHoverView->cancelHover(); | 610 | gHoverView->cancelHover(); |
@@ -587,7 +613,7 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask | |||
587 | // Don't let the user move the mouse out of the window until mouse up. | 613 | // Don't let the user move the mouse out of the window until mouse up. |
588 | if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) | 614 | if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) |
589 | { | 615 | { |
590 | mWindow->setMouseClipping(TRUE); | 616 | mWindow->setMouseClipping(down); |
591 | } | 617 | } |
592 | 618 | ||
593 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); | 619 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); |
@@ -598,10 +624,9 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask | |||
598 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); | 624 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); |
599 | if (LLView::sDebugMouseHandling) | 625 | if (LLView::sDebugMouseHandling) |
600 | { | 626 | { |
601 | llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl; | 627 | llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; |
602 | } | 628 | } |
603 | 629 | return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); | |
604 | return mouse_captor->handleMouseDown(local_x, local_y, mask); | ||
605 | } | 630 | } |
606 | 631 | ||
607 | // Topmost view gets a chance before the hierarchy | 632 | // Topmost view gets a chance before the hierarchy |
@@ -610,215 +635,95 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask | |||
610 | { | 635 | { |
611 | S32 local_x, local_y; | 636 | S32 local_x, local_y; |
612 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); | 637 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); |
613 | if (top_ctrl->pointInView(local_x, local_y)) | 638 | if (down) |
614 | { | 639 | { |
615 | return top_ctrl->handleMouseDown(local_x, local_y, mask); | 640 | if (top_ctrl->pointInView(local_x, local_y)) |
616 | } | 641 | { |
617 | else | 642 | return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ; |
618 | { | 643 | } |
619 | gFocusMgr.setTopCtrl(NULL); | 644 | else |
645 | { | ||
646 | gFocusMgr.setTopCtrl(NULL); | ||
647 | } | ||
620 | } | 648 | } |
621 | } | 649 | else |
650 | handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask); | ||
622 | 651 | ||
652 | |||
653 | } | ||
623 | // Give the UI views a chance to process the click | 654 | // Give the UI views a chance to process the click |
624 | if( mRootView->handleMouseDown(x, y, mask) ) | 655 | if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) |
625 | { | 656 | { |
626 | if (LLView::sDebugMouseHandling) | 657 | if (LLView::sDebugMouseHandling) |
627 | { | 658 | { |
628 | llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; | 659 | llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; |
629 | } | 660 | } |
630 | return TRUE; | 661 | return TRUE; |
631 | } | 662 | } |
632 | else if (LLView::sDebugMouseHandling) | 663 | else if (LLView::sDebugMouseHandling) |
633 | { | 664 | { |
634 | llinfos << "Left Mouse Down not handled by view" << llendl; | 665 | llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; |
635 | } | ||
636 | |||
637 | if (gDisconnected) | ||
638 | { | ||
639 | return FALSE; | ||
640 | } | ||
641 | |||
642 | if(LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask ) ) | ||
643 | { | ||
644 | // This is necessary to force clicks in the world to cause edit | ||
645 | // boxes that might have keyboard focus to relinquish it, and hence | ||
646 | // cause a commit to update their value. JC | ||
647 | gFocusMgr.setKeyboardFocus(NULL); | ||
648 | return TRUE; | ||
649 | } | ||
650 | |||
651 | return FALSE; | ||
652 | } | ||
653 | |||
654 | BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask) | ||
655 | { | ||
656 | S32 x = pos.mX; | ||
657 | S32 y = pos.mY; | ||
658 | x = llround((F32)x / mDisplayScale.mV[VX]); | ||
659 | y = llround((F32)y / mDisplayScale.mV[VY]); | ||
660 | |||
661 | LLView::sMouseHandlerMessage.clear(); | ||
662 | |||
663 | if (gDebugClicks) | ||
664 | { | ||
665 | llinfos << "ViewerWindow left mouse double-click at " << x << "," << y << llendl; | ||
666 | } | 666 | } |
667 | 667 | if (down) | |
668 | mLeftMouseDown = TRUE; | ||
669 | |||
670 | // Hide tooltips | ||
671 | if( mToolTip ) | ||
672 | { | 668 | { |
673 | mToolTip->setVisible( FALSE ); | 669 | if (gDisconnected) |
674 | } | ||
675 | |||
676 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); | ||
677 | if( mouse_captor ) | ||
678 | { | ||
679 | S32 local_x; | ||
680 | S32 local_y; | ||
681 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); | ||
682 | if (LLView::sDebugMouseHandling) | ||
683 | { | 670 | { |
684 | llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl; | 671 | return FALSE; |
685 | } | ||
686 | |||
687 | return mouse_captor->handleDoubleClick(local_x, local_y, mask); | ||
688 | } | ||
689 | |||
690 | // Check for hit on UI. | ||
691 | LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); | ||
692 | if (top_ctrl) | ||
693 | { | ||
694 | S32 local_x, local_y; | ||
695 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); | ||
696 | if (top_ctrl->pointInView(local_x, local_y)) | ||
697 | { | ||
698 | return top_ctrl->handleDoubleClick(local_x, local_y, mask); | ||
699 | } | 672 | } |
700 | else | 673 | |
674 | if(LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) ) | ||
701 | { | 675 | { |
702 | gFocusMgr.setTopCtrl(NULL); | 676 | // This is necessary to force clicks in the world to cause edit |
677 | // boxes that might have keyboard focus to relinquish it, and hence | ||
678 | // cause a commit to update their value. JC | ||
679 | gFocusMgr.setKeyboardFocus(NULL); | ||
680 | return TRUE; | ||
703 | } | 681 | } |
704 | } | 682 | } |
705 | 683 | else | |
706 | if (mRootView->handleDoubleClick(x, y, mask)) | ||
707 | { | 684 | { |
708 | if (LLView::sDebugMouseHandling) | 685 | |
686 | mWindow->releaseMouse(); | ||
687 | |||
688 | LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); | ||
689 | if( !handled ) | ||
709 | { | 690 | { |
710 | llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; | 691 | handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down); |
692 | } | ||
693 | |||
694 | |||
695 | |||
696 | if( !handled ) | ||
697 | { | ||
698 | if (tool) | ||
699 | { | ||
700 | handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down); | ||
701 | } | ||
711 | } | 702 | } |
712 | return TRUE; | ||
713 | } | ||
714 | else if (LLView::sDebugMouseHandling) | ||
715 | { | ||
716 | llinfos << "Left Mouse Down not handled by view" << llendl; | ||
717 | } | 703 | } |
718 | 704 | ||
719 | // Why is this here? JC 9/3/2002 | 705 | return (!down); |
720 | if (gNoRender) | 706 | } |
721 | { | ||
722 | return TRUE; | ||
723 | } | ||
724 | 707 | ||
725 | if(LLToolMgr::getInstance()->getCurrentTool()->handleDoubleClick( x, y, mask ) ) | 708 | BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) |
726 | { | 709 | { |
727 | return TRUE; | 710 | BOOL down = TRUE; |
728 | } | 711 | return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down); |
712 | } | ||
729 | 713 | ||
730 | // if we got this far and nothing handled a double click, pass a normal mouse down | 714 | BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask) |
731 | return handleMouseDown(window, pos, mask); | 715 | { |
716 | // try handling as a double-click first, then a single-click if that | ||
717 | // wasn't handled. | ||
718 | BOOL down = TRUE; | ||
719 | return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_DOUBLELEFT,down) || | ||
720 | handleMouseDown(window, pos, mask); | ||
732 | } | 721 | } |
733 | 722 | ||
734 | BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) | 723 | BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) |
735 | { | 724 | { |
736 | S32 x = pos.mX; | 725 | BOOL down = FALSE; |
737 | S32 y = pos.mY; | 726 | return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down); |
738 | x = llround((F32)x / mDisplayScale.mV[VX]); | ||
739 | y = llround((F32)y / mDisplayScale.mV[VY]); | ||
740 | |||
741 | LLView::sMouseHandlerMessage.clear(); | ||
742 | |||
743 | if (gDebugClicks) | ||
744 | { | ||
745 | llinfos << "ViewerWindow left mouse up" << llendl; | ||
746 | } | ||
747 | |||
748 | mLeftMouseDown = FALSE; | ||
749 | |||
750 | // Indicate mouse was active | ||
751 | gMouseIdleTimer.reset(); | ||
752 | |||
753 | // Hide tooltips on mouseup | ||
754 | if( mToolTip ) | ||
755 | { | ||
756 | mToolTip->setVisible( FALSE ); | ||
757 | } | ||
758 | |||
759 | // Also hide hover info on mouseup | ||
760 | if (gHoverView) gHoverView->cancelHover(); | ||
761 | |||
762 | BOOL handled = FALSE; | ||
763 | |||
764 | mWindow->releaseMouse(); | ||
765 | |||
766 | LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); | ||
767 | |||
768 | if( tool->clipMouseWhenDown() ) | ||
769 | { | ||
770 | mWindow->setMouseClipping(FALSE); | ||
771 | } | ||
772 | |||
773 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); | ||
774 | if( mouse_captor ) | ||
775 | { | ||
776 | S32 local_x; | ||
777 | S32 local_y; | ||
778 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); | ||
779 | if (LLView::sDebugMouseHandling) | ||
780 | { | ||
781 | llinfos << "Left Mouse Up handled by captor " << mouse_captor->getName() << llendl; | ||
782 | } | ||
783 | |||
784 | return mouse_captor->handleMouseUp(local_x, local_y, mask); | ||
785 | } | ||
786 | |||
787 | LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); | ||
788 | if (top_ctrl) | ||
789 | { | ||
790 | S32 local_x, local_y; | ||
791 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); | ||
792 | handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask); | ||
793 | } | ||
794 | |||
795 | if( !handled ) | ||
796 | { | ||
797 | handled = mRootView->handleMouseUp(x, y, mask); | ||
798 | } | ||
799 | |||
800 | if (LLView::sDebugMouseHandling) | ||
801 | { | ||
802 | if (handled) | ||
803 | { | ||
804 | llinfos << "Left Mouse Up" << LLView::sMouseHandlerMessage << llendl; | ||
805 | } | ||
806 | else | ||
807 | { | ||
808 | llinfos << "Left Mouse Up not handled by view" << llendl; | ||
809 | } | ||
810 | } | ||
811 | |||
812 | if( !handled ) | ||
813 | { | ||
814 | if (tool) | ||
815 | { | ||
816 | handled = tool->handleMouseUp(x, y, mask); | ||
817 | } | ||
818 | } | ||
819 | |||
820 | // Always handled as far as the OS is concerned. | ||
821 | return TRUE; | ||
822 | } | 727 | } |
823 | 728 | ||
824 | 729 | ||
@@ -829,91 +734,10 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK | |||
829 | x = llround((F32)x / mDisplayScale.mV[VX]); | 734 | x = llround((F32)x / mDisplayScale.mV[VX]); |
830 | y = llround((F32)y / mDisplayScale.mV[VY]); | 735 | y = llround((F32)y / mDisplayScale.mV[VY]); |
831 | 736 | ||
832 | LLView::sMouseHandlerMessage.clear(); | 737 | BOOL down = TRUE; |
833 | 738 | BOOL handle = handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down); | |
834 | if (gDebugClicks) | 739 | if (handle) |
835 | { | 740 | return handle; |
836 | llinfos << "ViewerWindow right mouse down at " << x << "," << y << llendl; | ||
837 | } | ||
838 | |||
839 | if (gMenuBarView) | ||
840 | { | ||
841 | // stop ALT-key access to menu | ||
842 | gMenuBarView->resetMenuTrigger(); | ||
843 | } | ||
844 | |||
845 | mRightMouseDown = TRUE; | ||
846 | |||
847 | // Make sure we get a coresponding mouseup event, even if the mouse leaves the window | ||
848 | mWindow->captureMouse(); | ||
849 | |||
850 | // Hide tooltips | ||
851 | if( mToolTip ) | ||
852 | { | ||
853 | mToolTip->setVisible( FALSE ); | ||
854 | } | ||
855 | |||
856 | // Also hide hover info on mousedown | ||
857 | if (gHoverView) | ||
858 | { | ||
859 | gHoverView->cancelHover(); | ||
860 | } | ||
861 | |||
862 | // Don't let the user move the mouse out of the window until mouse up. | ||
863 | if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) | ||
864 | { | ||
865 | mWindow->setMouseClipping(TRUE); | ||
866 | } | ||
867 | |||
868 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); | ||
869 | if( mouse_captor ) | ||
870 | { | ||
871 | S32 local_x; | ||
872 | S32 local_y; | ||
873 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); | ||
874 | if (LLView::sDebugMouseHandling) | ||
875 | { | ||
876 | llinfos << "Right Mouse Down handled by captor " << mouse_captor->getName() << llendl; | ||
877 | } | ||
878 | return mouse_captor->handleRightMouseDown(local_x, local_y, mask); | ||
879 | } | ||
880 | |||
881 | LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); | ||
882 | if (top_ctrl) | ||
883 | { | ||
884 | S32 local_x, local_y; | ||
885 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); | ||
886 | if (top_ctrl->pointInView(local_x, local_y)) | ||
887 | { | ||
888 | return top_ctrl->handleRightMouseDown(local_x, local_y, mask); | ||
889 | } | ||
890 | else | ||
891 | { | ||
892 | gFocusMgr.setTopCtrl(NULL); | ||
893 | } | ||
894 | } | ||
895 | |||
896 | if( mRootView->handleRightMouseDown(x, y, mask) ) | ||
897 | { | ||
898 | if (LLView::sDebugMouseHandling) | ||
899 | { | ||
900 | llinfos << "Right Mouse Down" << LLView::sMouseHandlerMessage << llendl; | ||
901 | } | ||
902 | return TRUE; | ||
903 | } | ||
904 | else if (LLView::sDebugMouseHandling) | ||
905 | { | ||
906 | llinfos << "Right Mouse Down not handled by view" << llendl; | ||
907 | } | ||
908 | |||
909 | if(LLToolMgr::getInstance()->getCurrentTool()->handleRightMouseDown( x, y, mask ) ) | ||
910 | { | ||
911 | // This is necessary to force clicks in the world to cause edit | ||
912 | // boxes that might have keyboard focus to relinquish it, and hence | ||
913 | // cause a commit to update their value. JC | ||
914 | gFocusMgr.setKeyboardFocus(NULL); | ||
915 | return TRUE; | ||
916 | } | ||
917 | 741 | ||
918 | // *HACK: this should be rolled into the composite tool logic, not | 742 | // *HACK: this should be rolled into the composite tool logic, not |
919 | // hardcoded at the top level. | 743 | // hardcoded at the top level. |
@@ -931,107 +755,27 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK | |||
931 | 755 | ||
932 | BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) | 756 | BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) |
933 | { | 757 | { |
934 | S32 x = pos.mX; | 758 | BOOL down = FALSE; |
935 | S32 y = pos.mY; | 759 | return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down); |
936 | x = llround((F32)x / mDisplayScale.mV[VX]); | ||
937 | y = llround((F32)y / mDisplayScale.mV[VY]); | ||
938 | |||
939 | LLView::sMouseHandlerMessage.clear(); | ||
940 | |||
941 | // Don't care about caps lock for mouse events. | ||
942 | if (gDebugClicks) | ||
943 | { | ||
944 | llinfos << "ViewerWindow right mouse up" << llendl; | ||
945 | } | ||
946 | |||
947 | mRightMouseDown = FALSE; | ||
948 | |||
949 | // Indicate mouse was active | ||
950 | gMouseIdleTimer.reset(); | ||
951 | |||
952 | // Hide tooltips on mouseup | ||
953 | if( mToolTip ) | ||
954 | { | ||
955 | mToolTip->setVisible( FALSE ); | ||
956 | } | ||
957 | |||
958 | // Also hide hover info on mouseup | ||
959 | if (gHoverView) gHoverView->cancelHover(); | ||
960 | |||
961 | BOOL handled = FALSE; | ||
962 | |||
963 | mWindow->releaseMouse(); | ||
964 | |||
965 | LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); | ||
966 | |||
967 | if( tool->clipMouseWhenDown() ) | ||
968 | { | ||
969 | mWindow->setMouseClipping(FALSE); | ||
970 | } | ||
971 | |||
972 | LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); | ||
973 | if( mouse_captor ) | ||
974 | { | ||
975 | S32 local_x; | ||
976 | S32 local_y; | ||
977 | mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); | ||
978 | if (LLView::sDebugMouseHandling) | ||
979 | { | ||
980 | llinfos << "Right Mouse Up handled by captor " << mouse_captor->getName() << llendl; | ||
981 | } | ||
982 | return mouse_captor->handleRightMouseUp(local_x, local_y, mask); | ||
983 | } | ||
984 | |||
985 | LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); | ||
986 | if (top_ctrl) | ||
987 | { | ||
988 | S32 local_x, local_y; | ||
989 | top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); | ||
990 | handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleRightMouseUp(local_x, local_y, mask); | ||
991 | } | ||
992 | |||
993 | if( !handled ) | ||
994 | { | ||
995 | handled = mRootView->handleRightMouseUp(x, y, mask); | ||
996 | } | ||
997 | |||
998 | if (LLView::sDebugMouseHandling) | ||
999 | { | ||
1000 | if (handled) | ||
1001 | { | ||
1002 | llinfos << "Right Mouse Up" << LLView::sMouseHandlerMessage << llendl; | ||
1003 | } | ||
1004 | else | ||
1005 | { | ||
1006 | llinfos << "Right Mouse Up not handled by view" << llendl; | ||
1007 | } | ||
1008 | } | ||
1009 | |||
1010 | if( !handled ) | ||
1011 | { | ||
1012 | if (tool) | ||
1013 | { | ||
1014 | handled = tool->handleRightMouseUp(x, y, mask); | ||
1015 | } | ||
1016 | } | ||
1017 | |||
1018 | // Always handled as far as the OS is concerned. | ||
1019 | return TRUE; | ||
1020 | } | 760 | } |
1021 | 761 | ||
1022 | BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) | 762 | BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) |
1023 | { | 763 | { |
764 | BOOL down = TRUE; | ||
1024 | gVoiceClient->middleMouseState(true); | 765 | gVoiceClient->middleMouseState(true); |
1025 | 766 | handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); | |
1026 | // Always handled as far as the OS is concerned. | 767 | |
768 | // Always handled as far as the OS is concerned. | ||
1027 | return TRUE; | 769 | return TRUE; |
1028 | } | 770 | } |
1029 | 771 | ||
1030 | BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) | 772 | BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) |
1031 | { | 773 | { |
774 | BOOL down = FALSE; | ||
1032 | gVoiceClient->middleMouseState(false); | 775 | gVoiceClient->middleMouseState(false); |
1033 | 776 | handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); | |
1034 | // Always handled as far as the OS is concerned. | 777 | |
778 | // Always handled as far as the OS is concerned. | ||
1035 | return TRUE; | 779 | return TRUE; |
1036 | } | 780 | } |
1037 | 781 | ||
@@ -1404,6 +1148,7 @@ LLViewerWindow::LLViewerWindow( | |||
1404 | mWindowRect(0, height, width, 0), | 1148 | mWindowRect(0, height, width, 0), |
1405 | mVirtualWindowRect(0, height, width, 0), | 1149 | mVirtualWindowRect(0, height, width, 0), |
1406 | mLeftMouseDown(FALSE), | 1150 | mLeftMouseDown(FALSE), |
1151 | mMiddleMouseDown(FALSE), | ||
1407 | mRightMouseDown(FALSE), | 1152 | mRightMouseDown(FALSE), |
1408 | mToolTip(NULL), | 1153 | mToolTip(NULL), |
1409 | mToolTipBlocked(FALSE), | 1154 | mToolTipBlocked(FALSE), |
@@ -3248,6 +2993,16 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, | |||
3248 | { | 2993 | { |
3249 | moveable_object_selected = TRUE; | 2994 | moveable_object_selected = TRUE; |
3250 | this_object_movable = TRUE; | 2995 | this_object_movable = TRUE; |
2996 | |||
2997 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
2998 | if ( (rlv_handler_t::isEnabled()) && | ||
2999 | ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) | ||
3000 | { | ||
3001 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
3002 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) ) | ||
3003 | moveable_object_selected = this_object_movable = FALSE; | ||
3004 | } | ||
3005 | // [/RLVa:KB] | ||
3251 | } | 3006 | } |
3252 | all_selected_objects_move = all_selected_objects_move && this_object_movable; | 3007 | all_selected_objects_move = all_selected_objects_move && this_object_movable; |
3253 | all_selected_objects_modify = all_selected_objects_modify && object->permModify(); | 3008 | all_selected_objects_modify = all_selected_objects_modify && object->permModify(); |
diff --git a/linden/indra/newview/llviewerwindow.h b/linden/indra/newview/llviewerwindow.h index ab2dd4e..40368f8 100644 --- a/linden/indra/newview/llviewerwindow.h +++ b/linden/indra/newview/llviewerwindow.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "lltimer.h" | 47 | #include "lltimer.h" |
48 | #include "llstat.h" | 48 | #include "llstat.h" |
49 | #include "llalertdialog.h" | 49 | #include "llalertdialog.h" |
50 | #include "llmousehandler.h" | ||
50 | 51 | ||
51 | class LLView; | 52 | class LLView; |
52 | class LLViewerObject; | 53 | class LLViewerObject; |
@@ -57,7 +58,6 @@ class LLVelocityBar; | |||
57 | class LLTextBox; | 58 | class LLTextBox; |
58 | class LLImageRaw; | 59 | class LLImageRaw; |
59 | class LLHUDIcon; | 60 | class LLHUDIcon; |
60 | class LLMouseHandler; | ||
61 | 61 | ||
62 | #define PICK_HALF_WIDTH 5 | 62 | #define PICK_HALF_WIDTH 5 |
63 | #define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1) | 63 | #define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1) |
@@ -81,7 +81,7 @@ public: | |||
81 | 81 | ||
82 | static bool isFlora(LLViewerObject* object); | 82 | static bool isFlora(LLViewerObject* object); |
83 | 83 | ||
84 | typedef enum e_pick_type | 84 | typedef enum |
85 | { | 85 | { |
86 | PICK_OBJECT, | 86 | PICK_OBJECT, |
87 | PICK_FLORA, | 87 | PICK_FLORA, |
@@ -150,6 +150,7 @@ public: | |||
150 | /*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask); | 150 | /*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask); |
151 | /*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level); | 151 | /*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level); |
152 | /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended | 152 | /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended |
153 | /*virtual*/ BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down); | ||
153 | /*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); | 154 | /*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); |
154 | /*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); | 155 | /*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); |
155 | /*virtual*/ BOOL handleCloseRequest(LLWindow *window); | 156 | /*virtual*/ BOOL handleCloseRequest(LLWindow *window); |
@@ -212,6 +213,7 @@ public: | |||
212 | LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } | 213 | LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } |
213 | LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; } | 214 | LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; } |
214 | BOOL getLeftMouseDown() const { return mLeftMouseDown; } | 215 | BOOL getLeftMouseDown() const { return mLeftMouseDown; } |
216 | BOOL getMiddleMouseDown() const { return mMiddleMouseDown; } | ||
215 | BOOL getRightMouseDown() const { return mRightMouseDown; } | 217 | BOOL getRightMouseDown() const { return mRightMouseDown; } |
216 | 218 | ||
217 | const LLPickInfo& getLastPick() const { return mLastPick; } | 219 | const LLPickInfo& getLastPick() const { return mLastPick; } |
@@ -279,7 +281,7 @@ public: | |||
279 | 281 | ||
280 | // snapshot functionality. | 282 | // snapshot functionality. |
281 | // perhaps some of this should move to llfloatershapshot? -MG | 283 | // perhaps some of this should move to llfloatershapshot? -MG |
282 | typedef enum e_snapshot_type | 284 | typedef enum |
283 | { | 285 | { |
284 | SNAPSHOT_TYPE_COLOR, | 286 | SNAPSHOT_TYPE_COLOR, |
285 | SNAPSHOT_TYPE_DEPTH, | 287 | SNAPSHOT_TYPE_DEPTH, |
@@ -397,6 +399,7 @@ protected: | |||
397 | LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame | 399 | LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame |
398 | LLStat mMouseVelocityStat; | 400 | LLStat mMouseVelocityStat; |
399 | BOOL mLeftMouseDown; | 401 | BOOL mLeftMouseDown; |
402 | BOOL mMiddleMouseDown; | ||
400 | BOOL mRightMouseDown; | 403 | BOOL mRightMouseDown; |
401 | 404 | ||
402 | LLProgressView *mProgressView; | 405 | LLProgressView *mProgressView; |
diff --git a/linden/indra/newview/llvlcomposition.cpp b/linden/indra/newview/llvlcomposition.cpp index bc7a2f4..cd8d1c0 100644 --- a/linden/indra/newview/llvlcomposition.cpp +++ b/linden/indra/newview/llvlcomposition.cpp | |||
@@ -79,8 +79,13 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 | |||
79 | // Initialize the texture matrix to defaults. | 79 | // Initialize the texture matrix to defaults. |
80 | for (S32 i = 0; i < CORNER_COUNT; ++i) | 80 | for (S32 i = 0; i < CORNER_COUNT; ++i) |
81 | { | 81 | { |
82 | mStartHeight[i] = gSavedSettings.getF32("TerrainColorStartHeight"); | 82 | //Zwag: I'm making these static values because they are a LARGE performance problem |
83 | mHeightRange[i] = gSavedSettings.getF32("TerrainColorHeightRange"); | 83 | // right now, and I've never heard of anyone changing them, they are not referenced |
84 | // elsewhere, and have not changed in defaults since the original source code release. | ||
85 | // We can move these back to signal connected statics if they really become important | ||
86 | // variables in the future. | ||
87 | mStartHeight[i] = 20.f;//gSavedSettings.getF32("TerrainColorStartHeight"); | ||
88 | mHeightRange[i] = 60.f;//gSavedSettings.getF32("TerrainColorHeightRange"); | ||
84 | } | 89 | } |
85 | mTexScaleX = 16.f; | 90 | mTexScaleX = 16.f; |
86 | mTexScaleY = 16.f; | 91 | mTexScaleY = 16.f; |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3d2523e..158977e 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -125,6 +125,10 @@ | |||
125 | #include "llvoicevisualizer.h" | 125 | #include "llvoicevisualizer.h" |
126 | #include "llvoiceclient.h" | 126 | #include "llvoiceclient.h" |
127 | 127 | ||
128 | // [RLVa:KB] | ||
129 | #include "llstartup.h" | ||
130 | // [/RLVa:KB] | ||
131 | |||
128 | LLXmlTree LLVOAvatar::sXMLTree; | 132 | LLXmlTree LLVOAvatar::sXMLTree; |
129 | LLXmlTree LLVOAvatar::sSkeletonXMLTree; | 133 | LLXmlTree LLVOAvatar::sSkeletonXMLTree; |
130 | LLVOAvatarSkeletonInfo* LLVOAvatar::sSkeletonInfo = NULL; | 134 | LLVOAvatarSkeletonInfo* LLVOAvatar::sSkeletonInfo = NULL; |
@@ -2093,9 +2097,15 @@ void LLVOAvatar::buildCharacter() | |||
2093 | if (attachment->getGroup() == i) | 2097 | if (attachment->getGroup() == i) |
2094 | { | 2098 | { |
2095 | LLMenuItemCallGL* item; | 2099 | LLMenuItemCallGL* item; |
2100 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2101 | // We need the userdata param to disable options in this pie menu later on (Left Hand / Right Hand option) | ||
2096 | item = new LLMenuItemCallGL(attachment->getName(), | 2102 | item = new LLMenuItemCallGL(attachment->getName(), |
2097 | NULL, | 2103 | NULL, |
2098 | object_selected_and_point_valid); | 2104 | object_selected_and_point_valid, attachment); |
2105 | // [/RLVa:KB] | ||
2106 | // item = new LLMenuItemCallGL(attachment->getName(), | ||
2107 | // NULL, | ||
2108 | // object_selected_and_point_valid); | ||
2099 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); | 2109 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); |
2100 | 2110 | ||
2101 | gAttachPieMenu->append(item); | 2111 | gAttachPieMenu->append(item); |
@@ -2150,9 +2160,15 @@ void LLVOAvatar::buildCharacter() | |||
2150 | if (attachment->getGroup() == 8) | 2160 | if (attachment->getGroup() == 8) |
2151 | { | 2161 | { |
2152 | LLMenuItemCallGL* item; | 2162 | LLMenuItemCallGL* item; |
2163 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2164 | // We need the userdata param to disable options in this pie menu later on | ||
2153 | item = new LLMenuItemCallGL(attachment->getName(), | 2165 | item = new LLMenuItemCallGL(attachment->getName(), |
2154 | NULL, | 2166 | NULL, |
2155 | object_selected_and_point_valid); | 2167 | object_selected_and_point_valid, attachment); |
2168 | // [/RLVa:KB] | ||
2169 | // item = new LLMenuItemCallGL(attachment->getName(), | ||
2170 | // NULL, | ||
2171 | // object_selected_and_point_valid); | ||
2156 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); | 2172 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); |
2157 | gAttachScreenPieMenu->append(item); | 2173 | gAttachScreenPieMenu->append(item); |
2158 | gDetachScreenPieMenu->append(new LLMenuItemCallGL(attachment->getName(), | 2174 | gDetachScreenPieMenu->append(new LLMenuItemCallGL(attachment->getName(), |
@@ -2171,6 +2187,7 @@ void LLVOAvatar::buildCharacter() | |||
2171 | { | 2187 | { |
2172 | continue; | 2188 | continue; |
2173 | } | 2189 | } |
2190 | // RELEASE-RLVa: random comment because we want know if LL ever changes this to not include "attachment" as userdata | ||
2174 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), | 2191 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), |
2175 | NULL, &object_selected_and_point_valid, | 2192 | NULL, &object_selected_and_point_valid, |
2176 | &attach_label, attachment); | 2193 | &attach_label, attachment); |
@@ -2230,8 +2247,13 @@ void LLVOAvatar::buildCharacter() | |||
2230 | LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attach_index, (LLViewerJointAttachment*)NULL); | 2247 | LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attach_index, (LLViewerJointAttachment*)NULL); |
2231 | if (attachment) | 2248 | if (attachment) |
2232 | { | 2249 | { |
2250 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2251 | // We need the userdata param to disable options in this pie menu later on | ||
2233 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), | 2252 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), |
2234 | NULL, object_selected_and_point_valid); | 2253 | NULL, object_selected_and_point_valid, attachment); |
2254 | // [/RLVa:KB] | ||
2255 | // LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), | ||
2256 | // NULL, object_selected_and_point_valid); | ||
2235 | gAttachBodyPartPieMenus[group]->append(item); | 2257 | gAttachBodyPartPieMenus[group]->append(item); |
2236 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", attach_index); | 2258 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", attach_index); |
2237 | gDetachBodyPartPieMenus[group]->append(new LLMenuItemCallGL(attachment->getName(), | 2259 | gDetachBodyPartPieMenus[group]->append(new LLMenuItemCallGL(attachment->getName(), |
@@ -3089,10 +3111,16 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3089 | const F32 time_visible = mTimeVisible.getElapsedTimeF32(); | 3111 | const F32 time_visible = mTimeVisible.getElapsedTimeF32(); |
3090 | const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds | 3112 | const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds |
3091 | const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds | 3113 | const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds |
3114 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b | ||
3115 | bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); | ||
3116 | // [/RLVa:KB] | ||
3092 | BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; | 3117 | BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; |
3093 | BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping); | 3118 | BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping); |
3094 | BOOL render_name = visible_chat || | 3119 | BOOL render_name = visible_chat || |
3095 | (visible_avatar && | 3120 | (visible_avatar && |
3121 | // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.0h | ||
3122 | ( (!fRlvShowNames) || (RlvSettings::fShowNameTags) ) && | ||
3123 | // [/RLVa:KB] | ||
3096 | ((sRenderName == RENDER_NAME_ALWAYS) || | 3124 | ((sRenderName == RENDER_NAME_ALWAYS) || |
3097 | (sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME))); | 3125 | (sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME))); |
3098 | // If it's your own avatar, don't draw in mouselook, and don't | 3126 | // If it's your own avatar, don't draw in mouselook, and don't |
@@ -3113,7 +3141,18 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3113 | new_name = TRUE; | 3141 | new_name = TRUE; |
3114 | } | 3142 | } |
3115 | 3143 | ||
3116 | if (sRenderGroupTitles != mRenderGroupTitles) | 3144 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b |
3145 | if (fRlvShowNames) | ||
3146 | { | ||
3147 | if (mRenderGroupTitles) | ||
3148 | { | ||
3149 | mRenderGroupTitles = FALSE; | ||
3150 | new_name = TRUE; | ||
3151 | } | ||
3152 | } | ||
3153 | else if (sRenderGroupTitles != mRenderGroupTitles) | ||
3154 | // [/RLVa] | ||
3155 | //if (sRenderGroupTitles != mRenderGroupTitles) | ||
3117 | { | 3156 | { |
3118 | mRenderGroupTitles = sRenderGroupTitles; | 3157 | mRenderGroupTitles = sRenderGroupTitles; |
3119 | new_name = TRUE; | 3158 | new_name = TRUE; |
@@ -3218,6 +3257,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3218 | || is_appearance != mNameAppearance) | 3257 | || is_appearance != mNameAppearance) |
3219 | { | 3258 | { |
3220 | std::string line; | 3259 | std::string line; |
3260 | |||
3221 | if (title && title->getString() && title->getString()[0] != '\0') | 3261 | if (title && title->getString() && title->getString()[0] != '\0') |
3222 | { | 3262 | { |
3223 | line += title->getString(); | 3263 | line += title->getString(); |
@@ -3232,6 +3272,15 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3232 | 3272 | ||
3233 | line += " "; | 3273 | line += " "; |
3234 | line += lastname->getString(); | 3274 | line += lastname->getString(); |
3275 | |||
3276 | // [RLVa:KB] | ||
3277 | if (fRlvShowNames) | ||
3278 | { | ||
3279 | // User is not allowed to see who it is, due to RLV settings. | ||
3280 | line = gRlvHandler.getAnonym(line); | ||
3281 | } | ||
3282 | // [/RLVa:KB] | ||
3283 | |||
3235 | BOOL need_comma = FALSE; | 3284 | BOOL need_comma = FALSE; |
3236 | 3285 | ||
3237 | if (is_away || is_muted || is_busy) | 3286 | if (is_away || is_muted || is_busy) |
@@ -6328,6 +6377,40 @@ BOOL LLVOAvatar::attachObject(LLViewerObject *viewer_object) | |||
6328 | { | 6377 | { |
6329 | updateAttachmentVisibility(gAgent.getCameraMode()); | 6378 | updateAttachmentVisibility(gAgent.getCameraMode()); |
6330 | 6379 | ||
6380 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
6381 | if (rlv_handler_t::isEnabled()) | ||
6382 | { | ||
6383 | static bool fRlvFullyLoaded = false; | ||
6384 | static LLFrameTimer* pRlvFullyLoadedTimer = NULL; | ||
6385 | |||
6386 | // There's no way to know when we're done reattaching what was attached at log-off but this ugly evil bad hack tries anyway | ||
6387 | if (!fRlvFullyLoaded) | ||
6388 | { | ||
6389 | if (pRlvFullyLoadedTimer) | ||
6390 | { | ||
6391 | if (pRlvFullyLoadedTimer->getElapsedTimeF32() > 30.0f) | ||
6392 | { | ||
6393 | fRlvFullyLoaded = true; | ||
6394 | delete pRlvFullyLoadedTimer; | ||
6395 | pRlvFullyLoadedTimer = NULL; | ||
6396 | } | ||
6397 | else | ||
6398 | { | ||
6399 | pRlvFullyLoadedTimer->reset(); | ||
6400 | } | ||
6401 | } | ||
6402 | else if ( (!pRlvFullyLoadedTimer) && | ||
6403 | ( (0 == mPendingAttachment.size()) || | ||
6404 | ((1 == mPendingAttachment.size()) && (mPendingAttachment[0] == viewer_object)) ) ) | ||
6405 | { | ||
6406 | pRlvFullyLoadedTimer = new LLFrameTimer(); | ||
6407 | } | ||
6408 | } | ||
6409 | |||
6410 | gRlvHandler.onAttach(attachment, fRlvFullyLoaded); | ||
6411 | } | ||
6412 | // [/RLVa:KB] | ||
6413 | |||
6331 | // Then make sure the inventory is in sync with the avatar. | 6414 | // Then make sure the inventory is in sync with the avatar. |
6332 | gInventory.addChangedMask( LLInventoryObserver::LABEL, attachment->getItemID() ); | 6415 | gInventory.addChangedMask( LLInventoryObserver::LABEL, attachment->getItemID() ); |
6333 | gInventory.notifyObservers(); | 6416 | gInventory.notifyObservers(); |
@@ -6383,6 +6466,14 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) | |||
6383 | // only one object per attachment point for now | 6466 | // only one object per attachment point for now |
6384 | if (attachment->getObject() == viewer_object) | 6467 | if (attachment->getObject() == viewer_object) |
6385 | { | 6468 | { |
6469 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
6470 | // URGENT-RLV: it looks like LLApp::isExiting() isn't always accurate so find something better (if it exists) | ||
6471 | if ( (rlv_handler_t::isEnabled()) && (!LLApp::isExiting()) && (mIsSelf) ) | ||
6472 | { | ||
6473 | gRlvHandler.onDetach(attachment); | ||
6474 | } | ||
6475 | // [/RLVa:KB] | ||
6476 | |||
6386 | LLUUID item_id = attachment->getItemID(); | 6477 | LLUUID item_id = attachment->getItemID(); |
6387 | attachment->removeObject(viewer_object); | 6478 | attachment->removeObject(viewer_object); |
6388 | if (mIsSelf) | 6479 | if (mIsSelf) |
@@ -6441,6 +6532,14 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) | |||
6441 | 6532 | ||
6442 | gPipeline.markMoved(mDrawable, TRUE); | 6533 | gPipeline.markMoved(mDrawable, TRUE); |
6443 | mIsSitting = TRUE; | 6534 | mIsSitting = TRUE; |
6535 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
6536 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
6537 | if (rlv_handler_t::isEnabled()) | ||
6538 | { | ||
6539 | RlvSettings::updateLoginLastLocation(); | ||
6540 | } | ||
6541 | #endif // RLV_EXTENSION_STARTLOCATION | ||
6542 | // [/RLVa:KB] | ||
6444 | mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject | 6543 | mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject |
6445 | mRoot.setPosition(getPosition()); | 6544 | mRoot.setPosition(getPosition()); |
6446 | mRoot.updateWorldMatrixChildren(); | 6545 | mRoot.updateWorldMatrixChildren(); |
@@ -6502,6 +6601,14 @@ void LLVOAvatar::getOffObject() | |||
6502 | gPipeline.markMoved(mDrawable, TRUE); | 6601 | gPipeline.markMoved(mDrawable, TRUE); |
6503 | 6602 | ||
6504 | mIsSitting = FALSE; | 6603 | mIsSitting = FALSE; |
6604 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
6605 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
6606 | if (rlv_handler_t::isEnabled()) | ||
6607 | { | ||
6608 | RlvSettings::updateLoginLastLocation(); | ||
6609 | } | ||
6610 | #endif // RLV_EXTENSION_STARTLOCATION | ||
6611 | // [/RLVa:KB] | ||
6505 | mRoot.getXform()->setParent(NULL); // LLVOAvatar::getOffObject | 6612 | mRoot.getXform()->setParent(NULL); // LLVOAvatar::getOffObject |
6506 | mRoot.setPosition(cur_position_world); | 6613 | mRoot.setPosition(cur_position_world); |
6507 | mRoot.setRotation(cur_rotation_world); | 6614 | mRoot.setRotation(cur_rotation_world); |
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index ad44356..adf82cd 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -1942,7 +1942,11 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
1942 | 1942 | ||
1943 | { | 1943 | { |
1944 | if (!mbCanSelect || | 1944 | if (!mbCanSelect || |
1945 | (gHideSelectedObjects && isSelected()) || | 1945 | // (gHideSelectedObjects && isSelected()) || |
1946 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1947 | ( (gHideSelectedObjects && isSelected()) && | ||
1948 | ((!rlv_handler_t::isEnabled()) || (!isHUDAttachment()) || (gRlvHandler.isDetachable(this))) ) || | ||
1949 | // [/RLVa:KB] | ||
1946 | mDrawable->isDead() || | 1950 | mDrawable->isDead() || |
1947 | !gPipeline.hasRenderType(mDrawable->getRenderType())) | 1951 | !gPipeline.hasRenderType(mDrawable->getRenderType())) |
1948 | { | 1952 | { |
@@ -2084,10 +2088,18 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, | |||
2084 | { | 2088 | { |
2085 | LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); | 2089 | LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); |
2086 | 2090 | ||
2087 | if (facep->getViewerObject()->isSelected() && gHideSelectedObjects) | 2091 | // if (facep->getViewerObject()->isSelected() && gHideSelectedObjects) |
2092 | // { | ||
2093 | // return; | ||
2094 | // } | ||
2095 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2096 | LLViewerObject* pObj = facep->getViewerObject(); | ||
2097 | if ( (pObj->isSelected() && gHideSelectedObjects) && | ||
2098 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (gRlvHandler.isDetachable(pObj))) ) | ||
2088 | { | 2099 | { |
2089 | return; | 2100 | return; |
2090 | } | 2101 | } |
2102 | // [/RVLa:KB] | ||
2091 | 2103 | ||
2092 | //add face to drawmap | 2104 | //add face to drawmap |
2093 | LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type]; | 2105 | LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type]; |
diff --git a/linden/indra/newview/llwindlightremotectrl.cpp b/linden/indra/newview/llwindlightremotectrl.cpp new file mode 100644 index 0000000..591b413 --- /dev/null +++ b/linden/indra/newview/llwindlightremotectrl.cpp | |||
@@ -0,0 +1,267 @@ | |||
1 | /** | ||
2 | * @file llwindlightremotectrl.cpp | ||
3 | * @brief toolbar remote for windlight options and presets | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2009&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2009, McCabe Maxsted | ||
8 | * | ||
9 | * Imprudence Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided to you | ||
11 | * under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
13 | * this distribution, or online at | ||
14 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | * $/LicenseInfo$ | ||
29 | */ | ||
30 | |||
31 | #include "llviewerprecompiledheaders.h" | ||
32 | |||
33 | #include "llwindlightremotectrl.h" | ||
34 | |||
35 | #include "llbutton.h" | ||
36 | #include "llcombobox.h" | ||
37 | #include "llfloaterenvsettings.h" | ||
38 | #include "llfloaterwindlight.h" | ||
39 | #include "lloverlaybar.h" | ||
40 | #include "lluictrlfactory.h" | ||
41 | #include "llwlparammanager.h" | ||
42 | #include "llviewercontrol.h" | ||
43 | |||
44 | |||
45 | class LLWindlightRemoteObserver : public LLWLPresetsObserver | ||
46 | { | ||
47 | public: | ||
48 | LLWindlightRemoteObserver(LLWindlightRemoteCtrl* wind_rem) : mWindlightRemote(wind_rem){} | ||
49 | virtual ~LLWindlightRemoteObserver() {} | ||
50 | virtual void changed() { mWindlightRemote->refreshPresets(); } | ||
51 | private: | ||
52 | LLWindlightRemoteCtrl* mWindlightRemote; | ||
53 | }; | ||
54 | |||
55 | |||
56 | LLWindlightRemoteCtrl::LLWindlightRemoteCtrl() | ||
57 | { | ||
58 | mPresetsCombo = NULL; | ||
59 | mObserver = NULL; | ||
60 | setIsChrome(TRUE); | ||
61 | |||
62 | build(); | ||
63 | |||
64 | setFocusRoot(TRUE); | ||
65 | } | ||
66 | |||
67 | LLWindlightRemoteCtrl::~LLWindlightRemoteCtrl() | ||
68 | { | ||
69 | delete mObserver; | ||
70 | mObserver = NULL; | ||
71 | } | ||
72 | |||
73 | void LLWindlightRemoteCtrl::draw() | ||
74 | { | ||
75 | LLButton* expand_button = getChild<LLButton>("Popup"); | ||
76 | if (expand_button) | ||
77 | { | ||
78 | if (expand_button->getToggleState()) | ||
79 | { | ||
80 | expand_button->setImageOverlay("arrow_down.tga"); | ||
81 | } | ||
82 | else | ||
83 | { | ||
84 | expand_button->setImageOverlay("arrow_up.tga"); | ||
85 | } | ||
86 | } | ||
87 | |||
88 | LLPanel::draw(); | ||
89 | } | ||
90 | |||
91 | void LLWindlightRemoteCtrl::build() | ||
92 | { | ||
93 | if (gSavedSettings.getBOOL("ShowWindlightSettingsPopup")) | ||
94 | { | ||
95 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_windlight_remote_expanded.xml"); | ||
96 | } | ||
97 | else | ||
98 | { | ||
99 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_windlight_remote.xml"); | ||
100 | } | ||
101 | } | ||
102 | |||
103 | BOOL LLWindlightRemoteCtrl::postBuild() | ||
104 | { | ||
105 | |||
106 | childSetAction("Environment", onClickToggleEnvironment, this); | ||
107 | childSetAction("Popup", onClickPopupBtn, this); | ||
108 | |||
109 | mPresetsCombo = getChild<LLComboBox>("Presets"); | ||
110 | if (mPresetsCombo) | ||
111 | { | ||
112 | mPresetsCombo->setCommitCallback(onCommitPreset); | ||
113 | mPresetsCombo->setCallbackUserData(this); | ||
114 | |||
115 | // set up observer to follow changes | ||
116 | mObserver = new LLWindlightRemoteObserver(this); | ||
117 | LLWLParamManager::addObserver(mObserver); | ||
118 | |||
119 | // refresh list from current presets | ||
120 | refreshPresets(); | ||
121 | } | ||
122 | |||
123 | return TRUE; | ||
124 | } | ||
125 | |||
126 | void LLWindlightRemoteCtrl::refreshPresets() | ||
127 | { | ||
128 | if (mPresetsCombo) | ||
129 | { | ||
130 | // snag current preset | ||
131 | LLWLParamManager * param_mgr = LLWLParamManager::instance(); | ||
132 | LLWLParamSet& currentParams = param_mgr->mCurParams; | ||
133 | |||
134 | // clear in case presets names have changed | ||
135 | mPresetsCombo->clearRows(); | ||
136 | |||
137 | std::map<std::string, LLWLParamSet>::iterator mIt = | ||
138 | param_mgr->mParamList.begin(); | ||
139 | for(; mIt != param_mgr->mParamList.end(); mIt++) | ||
140 | { | ||
141 | mPresetsCombo->add(mIt->first); | ||
142 | } | ||
143 | |||
144 | // insert separator and add World menu options | ||
145 | mPresetsCombo->addSeparator(ADD_BOTTOM); | ||
146 | mPresetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM); | ||
147 | mPresetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM); | ||
148 | mPresetsCombo->addSimpleElement(getString("sunset"), ADD_BOTTOM); | ||
149 | mPresetsCombo->addSimpleElement(getString("midnight"), ADD_BOTTOM); | ||
150 | mPresetsCombo->addSimpleElement(getString("revert_region"), ADD_BOTTOM); | ||
151 | |||
152 | if (mPresetsCombo->getSelectedItemLabel() != currentParams.mName && | ||
153 | !currentParams.mName.empty()) | ||
154 | { | ||
155 | mPresetsCombo->selectByValue(LLSD(currentParams.mName)); | ||
156 | } | ||
157 | else | ||
158 | { | ||
159 | mPresetsCombo->selectByValue(LLSD("Default")); | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | |||
164 | // static | ||
165 | void LLWindlightRemoteCtrl::onCommitPreset(LLUICtrl* ctrl, void* data) | ||
166 | { | ||
167 | LLWindlightRemoteCtrl* self = (LLWindlightRemoteCtrl*)data; | ||
168 | |||
169 | LLCtrlListInterface* presets = self->mPresetsCombo ? self->mPresetsCombo->getListInterface() : NULL; | ||
170 | if (presets) | ||
171 | { | ||
172 | S32 index = presets->getFirstSelectedIndex(); | ||
173 | if (index <= 0) | ||
174 | { | ||
175 | // Open Advanced Sky | ||
176 | LLFloaterWindLight::show(); | ||
177 | return; | ||
178 | } | ||
179 | |||
180 | // check for World menu options; if none, apply preset | ||
181 | std::string selected = self->mPresetsCombo->getSelectedValue().asString(); | ||
182 | |||
183 | if (selected == self->getString("sunrise")) | ||
184 | { | ||
185 | // set the value, turn off animation | ||
186 | LLWLParamManager::instance()->mAnimator.setDayTime(0.25); | ||
187 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | ||
188 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | ||
189 | |||
190 | // then call update once | ||
191 | LLWLParamManager::instance()->mAnimator.update( | ||
192 | LLWLParamManager::instance()->mCurParams); | ||
193 | } | ||
194 | else if (selected == self->getString("noon")) | ||
195 | { | ||
196 | // set the value, turn off animation | ||
197 | LLWLParamManager::instance()->mAnimator.setDayTime(0.567); | ||
198 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | ||
199 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | ||
200 | |||
201 | // then call update once | ||
202 | LLWLParamManager::instance()->mAnimator.update( | ||
203 | LLWLParamManager::instance()->mCurParams); | ||
204 | } | ||
205 | else if (selected == self->getString("sunset")) | ||
206 | { | ||
207 | // set the value, turn off animation | ||
208 | LLWLParamManager::instance()->mAnimator.setDayTime(0.75); | ||
209 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | ||
210 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | ||
211 | |||
212 | // then call update once | ||
213 | LLWLParamManager::instance()->mAnimator.update( | ||
214 | LLWLParamManager::instance()->mCurParams); | ||
215 | } | ||
216 | else if (selected == self->getString("midnight")) | ||
217 | { | ||
218 | // set the value, turn off animation | ||
219 | LLWLParamManager::instance()->mAnimator.setDayTime(0.0); | ||
220 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | ||
221 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | ||
222 | |||
223 | // then call update once | ||
224 | LLWLParamManager::instance()->mAnimator.update( | ||
225 | LLWLParamManager::instance()->mCurParams); | ||
226 | } | ||
227 | else if (selected == self->getString("revert_region")) | ||
228 | { | ||
229 | LLWLParamManager::instance()->mAnimator.mIsRunning = true; | ||
230 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = true; | ||
231 | } | ||
232 | else | ||
233 | { | ||
234 | // Apply preset | ||
235 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | ||
236 | LLWLParamManager::instance()->mAnimator.mUseLindenTime = false; | ||
237 | LLWLParamManager::instance()->loadPreset(selected, true); | ||
238 | } | ||
239 | } | ||
240 | } | ||
241 | |||
242 | // static | ||
243 | void LLWindlightRemoteCtrl::onClickToggleEnvironment(void* data) | ||
244 | { | ||
245 | // if evn settings not there or is hidden, show it | ||
246 | if( !LLFloaterEnvSettings::isOpen() || | ||
247 | !LLFloaterEnvSettings::instance()->getVisible()) | ||
248 | { | ||
249 | LLFloaterEnvSettings::show(); | ||
250 | |||
251 | // otherwise, close it button acts like a toggle | ||
252 | } | ||
253 | else | ||
254 | { | ||
255 | LLFloaterEnvSettings::instance()->close(); | ||
256 | } | ||
257 | } | ||
258 | |||
259 | //static | ||
260 | void LLWindlightRemoteCtrl::onClickPopupBtn(void* data) | ||
261 | { | ||
262 | LLWindlightRemoteCtrl* remotep = (LLWindlightRemoteCtrl*)data; | ||
263 | |||
264 | remotep->deleteAllChildren(); | ||
265 | remotep->build(); | ||
266 | gOverlayBar->layoutButtons(); | ||
267 | } | ||
diff --git a/linden/indra/newview/llwindlightremotectrl.h b/linden/indra/newview/llwindlightremotectrl.h new file mode 100644 index 0000000..e4ad2d5 --- /dev/null +++ b/linden/indra/newview/llwindlightremotectrl.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /** | ||
2 | * @file llwindlightremotectrl.h | ||
3 | * @brief toolbar remote for windlight options and presets | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2009&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2009, McCabe Maxsted | ||
8 | * | ||
9 | * Imprudence Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided to you | ||
11 | * under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
13 | * this distribution, or online at | ||
14 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | * $/LicenseInfo$ | ||
29 | */ | ||
30 | |||
31 | #ifndef LL_LLWINDLIGHTREMOTECTRL_H | ||
32 | #define LL_LLWINDLIGHTREMOTECTRL_H | ||
33 | |||
34 | #include "llpanel.h" | ||
35 | |||
36 | class LLComboBox; | ||
37 | class LLWLPresetsObserver; | ||
38 | |||
39 | class LLWindlightRemoteCtrl : public LLPanel | ||
40 | { | ||
41 | public: | ||
42 | LLWindlightRemoteCtrl(); | ||
43 | virtual ~LLWindlightRemoteCtrl(); | ||
44 | /*virtual*/ BOOL postBuild(); | ||
45 | /*virtual*/ void draw(); | ||
46 | |||
47 | void refreshPresets(); | ||
48 | |||
49 | private: | ||
50 | LLComboBox* mPresetsCombo; | ||
51 | LLWLPresetsObserver* mObserver; | ||
52 | |||
53 | void build(); | ||
54 | |||
55 | static void onCommitPreset(LLUICtrl* ctrl, void* data); | ||
56 | static void onClickToggleEnvironment(void* data); | ||
57 | static void onClickPopupBtn(void* data); | ||
58 | }; | ||
59 | |||
60 | #endif | ||
diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp index c1723f7..ba3d070 100644 --- a/linden/indra/newview/llwlparammanager.cpp +++ b/linden/indra/newview/llwlparammanager.cpp | |||
@@ -62,6 +62,7 @@ | |||
62 | #include "curl/curl.h" | 62 | #include "curl/curl.h" |
63 | 63 | ||
64 | LLWLParamManager * LLWLParamManager::sInstance = NULL; | 64 | LLWLParamManager * LLWLParamManager::sInstance = NULL; |
65 | std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers; | ||
65 | 66 | ||
66 | LLWLParamManager::LLWLParamManager() : | 67 | LLWLParamManager::LLWLParamManager() : |
67 | 68 | ||
@@ -238,6 +239,8 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) | |||
238 | getParamSet(name, mCurParams); | 239 | getParamSet(name, mCurParams); |
239 | propagateParameters(); | 240 | propagateParameters(); |
240 | } | 241 | } |
242 | |||
243 | notifyObservers(); | ||
241 | } | 244 | } |
242 | 245 | ||
243 | void LLWLParamManager::savePreset(const std::string & name) | 246 | void LLWLParamManager::savePreset(const std::string & name) |
@@ -264,6 +267,7 @@ void LLWLParamManager::savePreset(const std::string & name) | |||
264 | presetsXML.close(); | 267 | presetsXML.close(); |
265 | 268 | ||
266 | propagateParameters(); | 269 | propagateParameters(); |
270 | notifyObservers(); | ||
267 | } | 271 | } |
268 | 272 | ||
269 | void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader) | 273 | void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader) |
@@ -538,6 +542,8 @@ bool LLWLParamManager::removeParamSet(const std::string& name, bool delete_from_ | |||
538 | gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml"); | 542 | gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml"); |
539 | } | 543 | } |
540 | 544 | ||
545 | notifyObservers(); | ||
546 | |||
541 | return true; | 547 | return true; |
542 | } | 548 | } |
543 | 549 | ||
@@ -566,3 +572,37 @@ LLWLParamManager * LLWLParamManager::instance() | |||
566 | 572 | ||
567 | return sInstance; | 573 | return sInstance; |
568 | } | 574 | } |
575 | |||
576 | // static | ||
577 | void LLWLParamManager::addObserver(LLWLPresetsObserver* observer) | ||
578 | { | ||
579 | sObservers.push_back(observer); | ||
580 | } | ||
581 | |||
582 | // static | ||
583 | void LLWLParamManager::removeObserver(LLWLPresetsObserver* observer) | ||
584 | { | ||
585 | std::vector<LLWLPresetsObserver*>::iterator it; | ||
586 | it = std::find(sObservers.begin(), sObservers.end(), observer); | ||
587 | if (it != sObservers.end()) | ||
588 | { | ||
589 | sObservers.erase(it); | ||
590 | } | ||
591 | } | ||
592 | |||
593 | // Call this method when it's time to update everyone on a new state. | ||
594 | // Copy the list because an observer could respond by removing itself | ||
595 | // from the list. Static | ||
596 | void LLWLParamManager::notifyObservers() | ||
597 | { | ||
598 | lldebugs << "LLWLPresetsObserver::notifyObservers" << llendl; | ||
599 | |||
600 | std::vector<LLWLPresetsObserver*> observers = sObservers; | ||
601 | |||
602 | std::vector<LLWLPresetsObserver*>::iterator it; | ||
603 | for (it = observers.begin(); it != observers.end(); ++it) | ||
604 | { | ||
605 | LLWLPresetsObserver* observer = *it; | ||
606 | observer->changed(); | ||
607 | } | ||
608 | } | ||
diff --git a/linden/indra/newview/llwlparammanager.h b/linden/indra/newview/llwlparammanager.h index 1d9291c..355d3e3 100644 --- a/linden/indra/newview/llwlparammanager.h +++ b/linden/indra/newview/llwlparammanager.h | |||
@@ -40,6 +40,13 @@ | |||
40 | #include "llviewercamera.h" | 40 | #include "llviewercamera.h" |
41 | 41 | ||
42 | class LLGLSLShader; | 42 | class LLGLSLShader; |
43 | |||
44 | class LLWLPresetsObserver | ||
45 | { | ||
46 | public: | ||
47 | virtual ~LLWLPresetsObserver() { }; | ||
48 | virtual void changed() = 0; | ||
49 | }; | ||
43 | 50 | ||
44 | // color control | 51 | // color control |
45 | struct WLColorControl { | 52 | struct WLColorControl { |
@@ -195,6 +202,11 @@ public: | |||
195 | // singleton pattern implementation | 202 | // singleton pattern implementation |
196 | static LLWLParamManager * instance(); | 203 | static LLWLParamManager * instance(); |
197 | 204 | ||
205 | // manage observers | ||
206 | static void addObserver(LLWLPresetsObserver* observer); | ||
207 | static void removeObserver(LLWLPresetsObserver* observer); | ||
208 | static void notifyObservers(); | ||
209 | |||
198 | public: | 210 | public: |
199 | 211 | ||
200 | // helper variables | 212 | // helper variables |
@@ -249,12 +261,13 @@ public: | |||
249 | F32 mDomeRadius; | 261 | F32 mDomeRadius; |
250 | 262 | ||
251 | // list of all the parameters, listed by name | 263 | // list of all the parameters, listed by name |
252 | std::map<std::string, LLWLParamSet> mParamList; | 264 | std::map<std::string, LLWLParamSet> mParamList; |
253 | |||
254 | 265 | ||
255 | private: | 266 | private: |
256 | // our parameter manager singleton instance | 267 | // our parameter manager singleton instance |
257 | static LLWLParamManager * sInstance; | 268 | static LLWLParamManager * sInstance; |
269 | |||
270 | static std::vector<LLWLPresetsObserver*> sObservers; | ||
258 | 271 | ||
259 | }; | 272 | }; |
260 | 273 | ||
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index 77833c3..5e51e6f 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp | |||
@@ -640,7 +640,14 @@ void LLWorldMapView::draw() | |||
640 | // info->mAgents, | 640 | // info->mAgents, |
641 | // info->mName.c_str(), | 641 | // info->mName.c_str(), |
642 | // LLViewerRegion::accessToShortString(info->mAccess).c_str() ); | 642 | // LLViewerRegion::accessToShortString(info->mAccess).c_str() ); |
643 | if (info->mAccess == SIM_ACCESS_DOWN) | 643 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a) |
644 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
645 | { | ||
646 | mesg = rlv_handler_t::cstrHidden; | ||
647 | } | ||
648 | else if (info->mAccess == SIM_ACCESS_DOWN) | ||
649 | // [/RLVa:KB] | ||
650 | // if (info->mAccess == SIM_ACCESS_DOWN) | ||
644 | { | 651 | { |
645 | mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str()); | 652 | mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str()); |
646 | } | 653 | } |
@@ -1069,7 +1076,10 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& | |||
1069 | text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); | 1076 | text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); |
1070 | text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); | 1077 | text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); |
1071 | 1078 | ||
1072 | if (label != "") | 1079 | //if (label != "") |
1080 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a | ||
1081 | if ( (label != "") && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
1082 | // [/RLVa:KB] | ||
1073 | { | 1083 | { |
1074 | font->renderUTF8( | 1084 | font->renderUTF8( |
1075 | label, 0, | 1085 | label, 0, |
@@ -1129,7 +1139,10 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic | |||
1129 | 1139 | ||
1130 | std::string message = | 1140 | std::string message = |
1131 | llformat("%s (%s)", | 1141 | llformat("%s (%s)", |
1132 | info->mName.c_str(), | 1142 | //info->mName.c_str(), |
1143 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a) | ||
1144 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? info->mName.c_str() : rlv_handler_t::cstrHidden.c_str(), | ||
1145 | // [/RLVa:KB] | ||
1133 | LLViewerRegion::accessToString(info->mAccess).c_str()); | 1146 | LLViewerRegion::accessToString(info->mAccess).c_str()); |
1134 | 1147 | ||
1135 | if (info->mAccess != SIM_ACCESS_DOWN) | 1148 | if (info->mAccess != SIM_ACCESS_DOWN) |
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 87b810c..67af961 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -1795,8 +1795,13 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) | |||
1795 | 1795 | ||
1796 | if (gHideSelectedObjects) | 1796 | if (gHideSelectedObjects) |
1797 | { | 1797 | { |
1798 | if (drawablep->getVObj().notNull() && | 1798 | // if (drawablep->getVObj().notNull() && |
1799 | drawablep->getVObj()->isSelected()) | 1799 | // drawablep->getVObj()->isSelected()) |
1800 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
1801 | LLViewerObject* pObj = drawablep->getVObj(); | ||
1802 | if ( (pObj) && (pObj->isSelected()) && | ||
1803 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (gRlvHandler.isDetachable(pObj))) ) | ||
1804 | // [/RVLa:KB] | ||
1800 | { | 1805 | { |
1801 | return; | 1806 | return; |
1802 | } | 1807 | } |
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp new file mode 100644 index 0000000..78fd482 --- /dev/null +++ b/linden/indra/newview/primbackup.cpp | |||
@@ -0,0 +1,1105 @@ | |||
1 | |||
2 | #include "llviewerprecompiledheaders.h" | ||
3 | #include "llviewermenu.h" | ||
4 | |||
5 | |||
6 | // system library includes | ||
7 | #include <iostream> | ||
8 | #include <fstream> | ||
9 | #include <sstream> | ||
10 | |||
11 | // linden library includes | ||
12 | #include "llfilepicker.h" | ||
13 | #include "indra_constants.h" | ||
14 | #include "llsdserialize.h" | ||
15 | #include "llsdutil.h" | ||
16 | |||
17 | #include "llcallbacklist.h" | ||
18 | |||
19 | // newview includes | ||
20 | #include "llagent.h" | ||
21 | #include "llselectmgr.h" | ||
22 | #include "lltoolplacer.h" | ||
23 | |||
24 | #include "lltexturecache.h" | ||
25 | |||
26 | #include "llnotify.h" | ||
27 | |||
28 | #include "llapr.h" | ||
29 | #include "lldir.h" | ||
30 | #include "llimage.h" | ||
31 | #include "lllfsthread.h" | ||
32 | #include "llviewercontrol.h" | ||
33 | #include "llassetuploadresponders.h" | ||
34 | #include "lleconomy.h" | ||
35 | #include "llhttpclient.h" | ||
36 | #include "lluploaddialog.h" | ||
37 | #include "lldir.h" | ||
38 | #include "llinventorymodel.h" // gInventory | ||
39 | #include "llviewercontrol.h" // gSavedSettings | ||
40 | #include "llviewermenu.h" // gMenuHolder | ||
41 | #include "llagent.h" | ||
42 | #include "llfilepicker.h" | ||
43 | #include "llfloateranimpreview.h" | ||
44 | #include "llfloaterbuycurrency.h" | ||
45 | #include "llfloaterimagepreview.h" | ||
46 | #include "llfloaternamedesc.h" | ||
47 | #include "llfloatersnapshot.h" | ||
48 | #include "llinventorymodel.h" // gInventory | ||
49 | #include "llresourcedata.h" | ||
50 | #include "llstatusbar.h" | ||
51 | #include "llviewercontrol.h" // gSavedSettings | ||
52 | #include "llviewerimagelist.h" | ||
53 | #include "lluictrlfactory.h" | ||
54 | #include "llviewermenu.h" // gMenuHolder | ||
55 | #include "llviewerregion.h" | ||
56 | #include "llviewerstats.h" | ||
57 | #include "llviewerwindow.h" | ||
58 | #include "llappviewer.h" | ||
59 | #include "lluploaddialog.h" | ||
60 | // Included to allow LLTextureCache::purgeTextures() to pause watchdog timeout | ||
61 | #include "llappviewer.h" | ||
62 | #include "lltransactiontypes.h" | ||
63 | |||
64 | #include "primbackup.h" | ||
65 | |||
66 | #include "llviewerobjectlist.h" | ||
67 | |||
68 | primbackup* primbackup::sInstance = 0; | ||
69 | |||
70 | class importResponder: public LLNewAgentInventoryResponder | ||
71 | { | ||
72 | public: | ||
73 | |||
74 | importResponder(const LLSD& post_data, | ||
75 | const LLUUID& vfile_id, | ||
76 | LLAssetType::EType asset_type) | ||
77 | : LLNewAgentInventoryResponder(post_data, vfile_id, asset_type) | ||
78 | { | ||
79 | } | ||
80 | |||
81 | |||
82 | //virtual | ||
83 | virtual void uploadComplete(const LLSD& content) | ||
84 | { | ||
85 | lldebugs << "LLNewAgentInventoryResponder::result from capabilities" << llendl; | ||
86 | |||
87 | LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString()); | ||
88 | LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString()); | ||
89 | |||
90 | // Update L$ and ownership credit information | ||
91 | // since it probably changed on the server | ||
92 | if (asset_type == LLAssetType::AT_TEXTURE || | ||
93 | asset_type == LLAssetType::AT_SOUND || | ||
94 | asset_type == LLAssetType::AT_ANIMATION) | ||
95 | { | ||
96 | gMessageSystem->newMessageFast(_PREHASH_MoneyBalanceRequest); | ||
97 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
98 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
99 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
100 | gMessageSystem->nextBlockFast(_PREHASH_MoneyData); | ||
101 | gMessageSystem->addUUIDFast(_PREHASH_TransactionID, LLUUID::null ); | ||
102 | gAgent.sendReliableMessage(); | ||
103 | |||
104 | // LLStringUtil::format_map_t args; | ||
105 | // args["[AMOUNT]"] = llformat("%d",LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()); | ||
106 | // LLNotifyBox::showXml("UploadPayment", args); | ||
107 | } | ||
108 | |||
109 | // Actually add the upload to viewer inventory | ||
110 | llinfos << "Adding " << content["new_inventory_item"].asUUID() << " " | ||
111 | << content["new_asset"].asUUID() << " to inventory." << llendl; | ||
112 | if(mPostData["folder_id"].asUUID().notNull()) | ||
113 | { | ||
114 | LLPermissions perm; | ||
115 | U32 next_owner_perm; | ||
116 | perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); | ||
117 | if (mPostData["inventory_type"].asString() == "snapshot") | ||
118 | { | ||
119 | next_owner_perm = PERM_ALL; | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | next_owner_perm = PERM_MOVE | PERM_TRANSFER; | ||
124 | } | ||
125 | perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, next_owner_perm); | ||
126 | S32 creation_date_now = time_corrected(); | ||
127 | LLPointer<LLViewerInventoryItem> item | ||
128 | = new LLViewerInventoryItem(content["new_inventory_item"].asUUID(), | ||
129 | mPostData["folder_id"].asUUID(), | ||
130 | perm, | ||
131 | content["new_asset"].asUUID(), | ||
132 | asset_type, | ||
133 | inventory_type, | ||
134 | mPostData["name"].asString(), | ||
135 | mPostData["description"].asString(), | ||
136 | LLSaleInfo::DEFAULT, | ||
137 | LLInventoryItem::II_FLAGS_NONE, | ||
138 | creation_date_now); | ||
139 | gInventory.updateItem(item); | ||
140 | gInventory.notifyObservers(); | ||
141 | } | ||
142 | else | ||
143 | { | ||
144 | llwarns << "Can't find a folder to put it in" << llendl; | ||
145 | } | ||
146 | |||
147 | // remove the "Uploading..." message | ||
148 | LLUploadDialog::modalUploadFinished(); | ||
149 | |||
150 | primbackup::getInstance()->update_map(content["new_asset"].asUUID()); | ||
151 | primbackup::getInstance()->upload_next_asset(); | ||
152 | |||
153 | } | ||
154 | |||
155 | }; | ||
156 | |||
157 | |||
158 | |||
159 | class CacheReadResponder : public LLTextureCache::ReadResponder | ||
160 | { | ||
161 | public: | ||
162 | CacheReadResponder(const LLUUID& id, LLImageFormatted* image) | ||
163 | : mFormattedImage(image), mID(id) | ||
164 | { | ||
165 | setImage(image); | ||
166 | } | ||
167 | void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) | ||
168 | { | ||
169 | if(imageformat==IMG_CODEC_TGA && mFormattedImage->getCodec()==IMG_CODEC_J2C) | ||
170 | { | ||
171 | llwarns<<"Bleh its a tga not saving"<<llendl; | ||
172 | mFormattedImage=NULL; | ||
173 | mImageSize=0; | ||
174 | return; | ||
175 | } | ||
176 | |||
177 | if (mFormattedImage.notNull()) | ||
178 | { | ||
179 | llassert_always(mFormattedImage->getCodec() == imageformat); | ||
180 | mFormattedImage->appendData(data, datasize); | ||
181 | } | ||
182 | else | ||
183 | { | ||
184 | mFormattedImage = LLImageFormatted::createFromType(imageformat); | ||
185 | mFormattedImage->setData(data,datasize); | ||
186 | } | ||
187 | mImageSize = imagesize; | ||
188 | mImageLocal = imagelocal; | ||
189 | } | ||
190 | |||
191 | virtual void completed(bool success) | ||
192 | { | ||
193 | if(success && (mFormattedImage.notNull()) && mImageSize>0) | ||
194 | { | ||
195 | |||
196 | llinfos << "SUCCESS getting texture "<<mID<< llendl; | ||
197 | |||
198 | std::string name; | ||
199 | mID.toString(name); | ||
200 | llinfos << "Saving to "<<(primbackup::getInstance()->getfolder()+"//"+name)<<llendl; | ||
201 | if(!mFormattedImage->save(primbackup::getInstance()->getfolder()+"//"+name)) | ||
202 | { | ||
203 | llinfos << "FAIL saving texture "<<mID<< llendl; | ||
204 | } | ||
205 | |||
206 | } | ||
207 | else | ||
208 | { | ||
209 | if(!success) | ||
210 | llwarns << "FAIL NOT SUCCESSFUL getting texture "<<mID<< llendl; | ||
211 | if(mFormattedImage.isNull()) | ||
212 | llwarns << "FAIL image is NULL "<<mID<< llendl; | ||
213 | } | ||
214 | |||
215 | primbackup::getInstance()->m_nexttextureready=true; | ||
216 | //JUST SAY NO TO APR DEADLOCKING | ||
217 | //primbackup::getInstance()->export_next_texture(); | ||
218 | } | ||
219 | private: | ||
220 | LLPointer<LLImageFormatted> mFormattedImage; | ||
221 | LLUUID mID; | ||
222 | }; | ||
223 | |||
224 | |||
225 | |||
226 | primbackup::primbackup() | ||
227 | : LLFloater( std::string("Prim Import Floater") ) | ||
228 | { | ||
229 | LLUICtrlFactory::getInstance()->buildFloater( this, "floater_prim_import.xml" ); | ||
230 | |||
231 | // reposition floater from saved settings | ||
232 | //LLRect rect = gSavedSettings.getRect( "FloaterPrimImport" ); | ||
233 | //reshape( rect.getWidth(), rect.getHeight(), FALSE ); | ||
234 | //setRect( rect ); | ||
235 | |||
236 | running=false; | ||
237 | textures.clear(); | ||
238 | assetmap.clear(); | ||
239 | current_asset=LLUUID::null; | ||
240 | m_retexture=false; | ||
241 | close(); | ||
242 | } | ||
243 | |||
244 | |||
245 | //////////////////////////////////////////////////////////////////////////////// | ||
246 | // | ||
247 | primbackup* primbackup::getInstance() | ||
248 | { | ||
249 | if ( ! sInstance ) | ||
250 | sInstance = new primbackup(); | ||
251 | |||
252 | return sInstance; | ||
253 | } | ||
254 | |||
255 | primbackup::~primbackup() | ||
256 | { | ||
257 | // save position of floater | ||
258 | gSavedSettings.setRect( "FloaterPrimImport", getRect() ); | ||
259 | sInstance = 0; | ||
260 | } | ||
261 | |||
262 | void primbackup::draw() | ||
263 | { | ||
264 | LLFloater::draw(); | ||
265 | } | ||
266 | |||
267 | void primbackup::show() | ||
268 | { | ||
269 | // set the title | ||
270 | setTitle( "stuff" ); | ||
271 | m_curobject=1; | ||
272 | m_curprim=0; | ||
273 | m_objects=0; | ||
274 | m_prims=0; | ||
275 | m_textures=0; | ||
276 | m_curtexture=0; | ||
277 | rezcount=0; | ||
278 | |||
279 | // make floater appear | ||
280 | setVisibleAndFrontmost(); | ||
281 | } | ||
282 | |||
283 | |||
284 | void primbackup::onClose( bool app_quitting ) | ||
285 | { | ||
286 | setVisible( false ); | ||
287 | // HACK for fast XML iteration replace with: | ||
288 | // destroy(); | ||
289 | } | ||
290 | |||
291 | void primbackup::updateexportnumbers() | ||
292 | { | ||
293 | |||
294 | std::stringstream sstr; | ||
295 | LLUICtrl * ctrl=this->getChild<LLUICtrl>("name_label"); | ||
296 | |||
297 | sstr<<"Export Progress \n"; | ||
298 | |||
299 | sstr << "Remaining Textures "<<textures.size()<<"\n"; | ||
300 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
301 | |||
302 | } | ||
303 | |||
304 | |||
305 | void primbackup::updateimportnumbers() | ||
306 | { | ||
307 | std::stringstream sstr; | ||
308 | LLUICtrl * ctrl=this->getChild<LLUICtrl>("name_label"); | ||
309 | |||
310 | if(m_retexture) | ||
311 | { | ||
312 | sstr << " Textures uploads remaining : "<<textures.size()<<"\n"; | ||
313 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
314 | } | ||
315 | else | ||
316 | { | ||
317 | sstr << " Textures uploads N/A \n"; | ||
318 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
319 | } | ||
320 | sstr << " Objects "<<this->m_curobject<<"/"<<this->m_objects<<"\n"; | ||
321 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
322 | |||
323 | sstr << " Rez "<<this->rezcount<<"/"<<this->m_prims; | ||
324 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
325 | |||
326 | sstr << " Build "<<this->m_curprim<<"/"<<this->m_prims; | ||
327 | ctrl->setValue(LLSD("Text")=sstr.str()); | ||
328 | |||
329 | |||
330 | } | ||
331 | |||
332 | void primbackup::pre_export_object() | ||
333 | { | ||
334 | textures.clear(); | ||
335 | llsd.clear(); | ||
336 | this_group.clear(); | ||
337 | |||
338 | // Open the file save dialog | ||
339 | LLFilePicker& file_picker = LLFilePicker::instance(); | ||
340 | if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_XML ) ) | ||
341 | { | ||
342 | // User canceled save. | ||
343 | return; | ||
344 | } | ||
345 | |||
346 | file_name = file_picker.getCurFile(); | ||
347 | folder = gDirUtilp->getDirName(file_name); | ||
348 | |||
349 | export_state=EXPORT_INIT; | ||
350 | gIdleCallbacks.addFunction(exportworker, NULL); | ||
351 | } | ||
352 | |||
353 | void primbackup::exportworker(void *userdata) | ||
354 | { | ||
355 | primbackup::getInstance()->updateexportnumbers(); | ||
356 | |||
357 | switch(primbackup::getInstance()->export_state) | ||
358 | { | ||
359 | case EXPORT_INIT: | ||
360 | { | ||
361 | primbackup::getInstance()->show(); | ||
362 | LLSelectMgr::getInstance()->getSelection()->ref(); | ||
363 | |||
364 | struct ff : public LLSelectedNodeFunctor | ||
365 | { | ||
366 | virtual bool apply(LLSelectNode* node) | ||
367 | { | ||
368 | if(gAgent.getID()!=node->mPermissions->getOwner()) | ||
369 | { | ||
370 | #ifdef LL_GRID_PERMISSIONS | ||
371 | return false; | ||
372 | #else | ||
373 | return true; | ||
374 | #endif | ||
375 | } | ||
376 | else if(581632==node->mPermissions->getMaskOwner() || 2147483647==node->mPermissions->getMaskOwner()) | ||
377 | { | ||
378 | return true; | ||
379 | } | ||
380 | return false; | ||
381 | } | ||
382 | } func; | ||
383 | |||
384 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) | ||
385 | primbackup::getInstance()->export_state=EXPORT_STRUCTURE; | ||
386 | else | ||
387 | { | ||
388 | llwarns<<"Incorrect permission to export"<<llendl; | ||
389 | primbackup::getInstance()->export_state=EXPORT_DONE; | ||
390 | primbackup::getInstance()->close(); | ||
391 | gIdleCallbacks.deleteFunction(exportworker); | ||
392 | LLSelectMgr::getInstance()->getSelection()->unref(); | ||
393 | |||
394 | } | ||
395 | break; | ||
396 | } | ||
397 | |||
398 | break; | ||
399 | case EXPORT_STRUCTURE: | ||
400 | { | ||
401 | struct ff : public LLSelectedObjectFunctor | ||
402 | { | ||
403 | virtual bool apply(LLViewerObject* object) | ||
404 | { | ||
405 | object->boostTexturePriority(TRUE); | ||
406 | LLViewerObject::child_list_t children = object->getChildren(); | ||
407 | children.push_front(object); //push root onto list | ||
408 | LLSD prim_llsd=primbackup::getInstance()->prims_to_llsd(children); | ||
409 | LLSD stuff; | ||
410 | stuff["root_position"] = object->getPosition().getValue(); | ||
411 | stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation()); | ||
412 | stuff["group_body"] = prim_llsd; | ||
413 | primbackup::getInstance()->llsd["data"].append(stuff); | ||
414 | return true; | ||
415 | } | ||
416 | } func; | ||
417 | |||
418 | primbackup::getInstance()->export_state=EXPORT_LLSD; | ||
419 | LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func,false); | ||
420 | LLSelectMgr::getInstance()->getSelection()->unref(); | ||
421 | |||
422 | break; | ||
423 | } | ||
424 | case EXPORT_TEXTURES: | ||
425 | if(primbackup::getInstance()->m_nexttextureready==false) | ||
426 | return; | ||
427 | |||
428 | //Ok we got work to do | ||
429 | primbackup::getInstance()->m_nexttextureready=false; | ||
430 | |||
431 | if(primbackup::getInstance()->textures.empty()) | ||
432 | { | ||
433 | primbackup::getInstance()->export_state=EXPORT_DONE; | ||
434 | return; | ||
435 | } | ||
436 | |||
437 | primbackup::getInstance()->export_next_texture(); | ||
438 | break; | ||
439 | |||
440 | case EXPORT_LLSD: | ||
441 | { | ||
442 | // Create a file stream and write to it | ||
443 | llofstream export_file(primbackup::getInstance()->file_name); | ||
444 | LLSDSerialize::toPrettyXML(primbackup::getInstance()->llsd, export_file); | ||
445 | export_file.close(); | ||
446 | primbackup::getInstance()->m_nexttextureready=true; | ||
447 | primbackup::getInstance()->export_state=EXPORT_TEXTURES; | ||
448 | } | ||
449 | break; | ||
450 | case EXPORT_DONE: | ||
451 | llinfos<<"Backup complete"<<llendl | ||
452 | gIdleCallbacks.deleteFunction(exportworker); | ||
453 | primbackup::getInstance()->close(); | ||
454 | break; | ||
455 | } | ||
456 | } | ||
457 | |||
458 | LLSD primbackup::prims_to_llsd(LLViewerObject::child_list_t child_list) | ||
459 | { | ||
460 | |||
461 | LLViewerObject* object; | ||
462 | LLSD llsd; | ||
463 | |||
464 | char localid[16]; | ||
465 | |||
466 | for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i) | ||
467 | { | ||
468 | object=(*i); | ||
469 | LLUUID id = object->getID(); | ||
470 | |||
471 | llinfos << "Exporting prim " << object->getID().asString() << llendl; | ||
472 | |||
473 | // Create an LLSD object that represents this prim. It will be injected in to the overall LLSD | ||
474 | // tree structure | ||
475 | LLSD prim_llsd; | ||
476 | |||
477 | if (!object->isRoot()) | ||
478 | { | ||
479 | |||
480 | // Parent id | ||
481 | snprintf(localid, sizeof(localid), "%u", object->getSubParent()->getLocalID()); | ||
482 | prim_llsd["parent"] = localid; | ||
483 | } | ||
484 | |||
485 | // Transforms | ||
486 | prim_llsd["position"] = object->getPosition().getValue(); | ||
487 | prim_llsd["scale"] = object->getScale().getValue(); | ||
488 | prim_llsd["rotation"] = ll_sd_from_quaternion(object->getRotation()); | ||
489 | |||
490 | // Flags | ||
491 | prim_llsd["shadows"] = object->flagCastShadows(); | ||
492 | prim_llsd["phantom"] = object->flagPhantom(); | ||
493 | prim_llsd["physical"] = (BOOL)(object->mFlags & FLAGS_USE_PHYSICS); | ||
494 | |||
495 | // Volume params | ||
496 | LLVolumeParams params = object->getVolume()->getParams(); | ||
497 | prim_llsd["volume"] = params.asLLSD(); | ||
498 | |||
499 | // Extra paramsb6fab961-af18-77f8-cf08-f021377a7244 | ||
500 | if (object->isFlexible()) | ||
501 | { | ||
502 | // Flexible | ||
503 | LLFlexibleObjectData* flex = (LLFlexibleObjectData*)object->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); | ||
504 | prim_llsd["flexible"] = flex->asLLSD(); | ||
505 | } | ||
506 | if (object->getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT)) | ||
507 | { | ||
508 | // Light | ||
509 | LLLightParams* light = (LLLightParams*)object->getParameterEntry(LLNetworkData::PARAMS_LIGHT); | ||
510 | prim_llsd["light"] = light->asLLSD(); | ||
511 | } | ||
512 | if (object->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) | ||
513 | { | ||
514 | // Sculpt | ||
515 | LLSculptParams* sculpt = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT); | ||
516 | prim_llsd["sculpt"] = sculpt->asLLSD(); | ||
517 | |||
518 | LLUUID sculpt_texture=sculpt->getSculptTexture(); | ||
519 | bool alreadyseen=false; | ||
520 | std::list<LLUUID>::iterator iter; | ||
521 | for(iter = textures.begin(); iter != textures.end() ; iter++) | ||
522 | { | ||
523 | if( (*iter)==sculpt_texture) | ||
524 | alreadyseen=true; | ||
525 | } | ||
526 | if(alreadyseen==false) | ||
527 | { | ||
528 | llinfos << "Found a sculpt texture, adding to list "<<sculpt_texture<<llendl; | ||
529 | textures.push_back(sculpt_texture); | ||
530 | } | ||
531 | } | ||
532 | |||
533 | // Textures | ||
534 | LLSD te_llsd; | ||
535 | U8 te_count = object->getNumTEs(); | ||
536 | for (U8 i = 0; i < te_count; i++) | ||
537 | { | ||
538 | bool alreadyseen=false; | ||
539 | te_llsd.append(object->getTE(i)->asLLSD()); | ||
540 | std::list<LLUUID>::iterator iter; | ||
541 | for(iter = textures.begin(); iter != textures.end() ; iter++) | ||
542 | { | ||
543 | if( (*iter)==object->getTE(i)->getID()) | ||
544 | alreadyseen=true; | ||
545 | } | ||
546 | if(alreadyseen==false) | ||
547 | textures.push_back(object->getTE(i)->getID()); | ||
548 | } | ||
549 | prim_llsd["textures"] = te_llsd; | ||
550 | |||
551 | // The keys in the primitive maps do not have to be localids, they can be any | ||
552 | // string. We simply use localids because they are a unique identifier | ||
553 | snprintf(localid, sizeof(localid), "%u", object->getLocalID()); | ||
554 | llsd[(const char*)localid] = prim_llsd; | ||
555 | } | ||
556 | |||
557 | updateexportnumbers(); | ||
558 | |||
559 | return llsd; | ||
560 | } | ||
561 | |||
562 | |||
563 | void primbackup::export_next_texture() | ||
564 | { | ||
565 | if(textures.empty()) | ||
566 | { | ||
567 | llinfos << "Finished exporting textures "<<llendl; | ||
568 | return; | ||
569 | } | ||
570 | |||
571 | std::list<LLUUID>::iterator iter; | ||
572 | iter = textures.begin(); | ||
573 | |||
574 | LLUUID id; | ||
575 | |||
576 | while(1) | ||
577 | { | ||
578 | if(iter==textures.end()) | ||
579 | { | ||
580 | m_nexttextureready=true; | ||
581 | return; | ||
582 | } | ||
583 | |||
584 | id=(*iter); | ||
585 | |||
586 | LLViewerImage * imagep = gImageList.hasImage(id); | ||
587 | if(imagep!=NULL) | ||
588 | { | ||
589 | S32 cur_discard = imagep->getDiscardLevel(); | ||
590 | if(cur_discard>0) | ||
591 | { | ||
592 | if(imagep->getBoostLevel()!=LLViewerImage::BOOST_PREVIEW) | ||
593 | imagep->setBoostLevel(LLViewerImage::BOOST_PREVIEW); //we want to force discard 0 this one does this. | ||
594 | } | ||
595 | else | ||
596 | { | ||
597 | break; | ||
598 | } | ||
599 | } | ||
600 | else | ||
601 | { | ||
602 | llwarns<<" We *DONT* have the texture "<<llendl; | ||
603 | } | ||
604 | iter++; | ||
605 | } | ||
606 | |||
607 | textures.remove(id); | ||
608 | |||
609 | llinfos<<"Requesting texture "<<id<<llendl; | ||
610 | LLImageJ2C * mFormattedImage = new LLImageJ2C; | ||
611 | CacheReadResponder* responder = new CacheReadResponder(id, mFormattedImage); | ||
612 | LLAppViewer::getTextureCache()->readFromCache(id,LLWorkerThread::PRIORITY_HIGH,0,999999,responder); | ||
613 | } | ||
614 | |||
615 | |||
616 | |||
617 | void primbackup::import_object(bool upload) | ||
618 | { | ||
619 | textures.clear(); | ||
620 | assetmap.clear(); | ||
621 | current_asset=LLUUID::null; | ||
622 | |||
623 | this->m_retexture=upload; | ||
624 | |||
625 | // Open the file open dialog | ||
626 | LLFilePicker& file_picker = LLFilePicker::instance(); | ||
627 | if( !file_picker.getOpenFile( LLFilePicker::FFLOAD_XML ) ) | ||
628 | { | ||
629 | // User canceled save. | ||
630 | return; | ||
631 | } | ||
632 | std::string file_name = file_picker.getFirstFile().c_str(); | ||
633 | folder = gDirUtilp->getDirName(file_name); | ||
634 | |||
635 | llifstream import_file(file_name); | ||
636 | LLSDSerialize::fromXML(llsd, import_file); | ||
637 | import_file.close(); | ||
638 | |||
639 | show(); | ||
640 | |||
641 | //Get the texture map | ||
642 | |||
643 | LLSD::map_const_iterator prim_it; | ||
644 | LLSD::array_const_iterator prim_arr_it; | ||
645 | |||
646 | this->m_curobject=1; | ||
647 | this->m_curprim=1; | ||
648 | this->m_objects=llsd["data"].size(); | ||
649 | this->m_prims=0; | ||
650 | rezcount=0; | ||
651 | |||
652 | updateimportnumbers(); | ||
653 | |||
654 | for( prim_arr_it = llsd["data"].beginArray(); prim_arr_it != llsd["data"].endArray(); prim_arr_it++) | ||
655 | { | ||
656 | |||
657 | LLSD llsd2; | ||
658 | llsd2=(*prim_arr_it)["group_body"]; | ||
659 | |||
660 | for( prim_it = llsd2.beginMap(); prim_it != llsd2.endMap(); prim_it++) | ||
661 | { | ||
662 | LLSD prim_llsd; | ||
663 | prim_llsd=llsd2[prim_it->first]; | ||
664 | LLSD::array_iterator text_it; | ||
665 | std::list<LLUUID>::iterator iter; | ||
666 | |||
667 | if(prim_llsd.has("sculpt")) | ||
668 | { | ||
669 | LLSculptParams* sculpt=new LLSculptParams(); | ||
670 | sculpt->fromLLSD(prim_llsd["sculpt"]); | ||
671 | LLUUID orig=sculpt->getSculptTexture(); | ||
672 | bool alreadyseen=false; | ||
673 | for(iter = textures.begin(); iter != textures.end() ; iter++) | ||
674 | { | ||
675 | if( (*iter)==orig) | ||
676 | alreadyseen=true; | ||
677 | } | ||
678 | if(alreadyseen==false) | ||
679 | { | ||
680 | llinfos << "Found a new SCULPT texture to upload "<<orig<<llendl; | ||
681 | textures.push_back(orig); | ||
682 | } | ||
683 | } | ||
684 | |||
685 | |||
686 | LLSD te_llsd; | ||
687 | te_llsd=prim_llsd["textures"]; | ||
688 | |||
689 | |||
690 | for(text_it=te_llsd.beginArray(); text_it !=te_llsd.endArray(); text_it++) | ||
691 | { | ||
692 | LLSD the_te; | ||
693 | the_te=(*text_it); | ||
694 | LLTextureEntry te; | ||
695 | te.fromLLSD(the_te); | ||
696 | |||
697 | te.getID(); | ||
698 | bool alreadyseen=false; | ||
699 | |||
700 | for(iter = textures.begin(); iter != textures.end() ; iter++) | ||
701 | { | ||
702 | if( (*iter)==te.getID()) | ||
703 | alreadyseen=true; | ||
704 | } | ||
705 | if(alreadyseen==false) | ||
706 | { | ||
707 | llinfos << "Found a new texture to upload "<<te.getID()<<llendl; | ||
708 | textures.push_back(te.getID()); | ||
709 | } | ||
710 | } | ||
711 | |||
712 | } | ||
713 | } | ||
714 | |||
715 | if(m_retexture==TRUE) | ||
716 | upload_next_asset(); | ||
717 | else | ||
718 | import_object1a(); | ||
719 | } | ||
720 | |||
721 | LLVector3 primbackup::offset_agent(LLVector3 offset) | ||
722 | { | ||
723 | LLVector3 pos= gAgent.getPositionAgent(); | ||
724 | LLQuaternion agent_rot=LLQuaternion(gAgent.getAtAxis(),gAgent.getLeftAxis(),gAgent.getUpAxis()); | ||
725 | pos=(offset*agent_rot+pos); | ||
726 | return pos; | ||
727 | } | ||
728 | |||
729 | void primbackup::rez_agent_offset(LLVector3 offset) | ||
730 | { | ||
731 | // This will break for a sitting agent | ||
732 | LLToolPlacer* mPlacer = new LLToolPlacer(); | ||
733 | mPlacer->setObjectType(LL_PCODE_CUBE); | ||
734 | //LLVector3 pos=offset_agent(offset); | ||
735 | mPlacer->placeObject((S32)(offset.mV[0]), (S32)(offset.mV[1]), 0); | ||
736 | } | ||
737 | |||
738 | void primbackup::import_object1a() | ||
739 | { | ||
740 | running=true; | ||
741 | |||
742 | show(); | ||
743 | |||
744 | group_prim_import_iter=llsd["data"].beginArray(); | ||
745 | root_root_pos=(*group_prim_import_iter)["root_position"]; | ||
746 | |||
747 | this->m_objects=llsd["data"].size(); | ||
748 | this->m_curobject=1; | ||
749 | import_next_object(); | ||
750 | } | ||
751 | |||
752 | void primbackup::import_next_object() | ||
753 | { | ||
754 | toselect.clear(); | ||
755 | rezcount=0; | ||
756 | |||
757 | this_group=(*group_prim_import_iter)["group_body"]; | ||
758 | prim_import_iter=this_group.beginMap(); | ||
759 | |||
760 | m_curprim=0; | ||
761 | m_prims=this_group.size(); | ||
762 | updateimportnumbers(); | ||
763 | LLVector3 lgpos=(*group_prim_import_iter)["root_position"]; | ||
764 | |||
765 | group_offset=lgpos-root_root_pos; | ||
766 | root_pos=offset_agent(LLVector3(2.0,0,0)); | ||
767 | root_rot=ll_quaternion_from_sd((*group_prim_import_iter)["root_rotation"]); | ||
768 | |||
769 | rez_agent_offset(LLVector3(0.0,2.0,0.0)); | ||
770 | // Now we must wait for the callback when ViewerObjectList gets the new objects and we have the correct number selected | ||
771 | } | ||
772 | |||
773 | // This function takes a pointer to a viewerobject and applys the prim definition that prim_llsd has | ||
774 | void primbackup::xmltoprim(LLSD prim_llsd,LLViewerObject * object) | ||
775 | { | ||
776 | LLUUID id = object->getID(); | ||
777 | expecting_update = object->getID(); | ||
778 | LLSelectMgr::getInstance()->selectObjectAndFamily(object); | ||
779 | |||
780 | if(prim_llsd.has("parent")) | ||
781 | { | ||
782 | //we are not the root node. | ||
783 | LLVector3 pos=prim_llsd["position"]; | ||
784 | LLQuaternion rot=ll_quaternion_from_sd(prim_llsd["rotation"]); | ||
785 | object->setPositionRegion((pos*root_rot)+(root_pos+group_offset)); | ||
786 | object->setRotation(rot*root_rot); | ||
787 | } | ||
788 | else | ||
789 | { | ||
790 | object->setPositionRegion(root_pos+group_offset); | ||
791 | LLQuaternion rot=ll_quaternion_from_sd(prim_llsd["rotation"]); | ||
792 | object->setRotation(rot); | ||
793 | } | ||
794 | |||
795 | object->setScale(prim_llsd["scale"]); | ||
796 | |||
797 | if(prim_llsd.has("shadows")) | ||
798 | if(prim_llsd["shadows"].asInteger()==1) | ||
799 | object->setFlags(FLAGS_CAST_SHADOWS,true); | ||
800 | |||
801 | if(prim_llsd.has("phantom")) | ||
802 | if(prim_llsd["phantom"].asInteger()==1) | ||
803 | object->setFlags(FLAGS_PHANTOM,true); | ||
804 | |||
805 | if(prim_llsd.has("physical")) | ||
806 | if(prim_llsd["physical"].asInteger()==1) | ||
807 | object->setFlags(FLAGS_USE_PHYSICS,true); | ||
808 | |||
809 | // Volume params | ||
810 | LLVolumeParams volume_params = object->getVolume()->getParams(); | ||
811 | volume_params.fromLLSD(prim_llsd["volume"]) ; | ||
812 | object->updateVolume(volume_params); | ||
813 | |||
814 | if(prim_llsd.has("sculpt")) | ||
815 | { | ||
816 | LLSculptParams* sculpt=new LLSculptParams(); | ||
817 | sculpt->fromLLSD(prim_llsd["sculpt"]); | ||
818 | |||
819 | //TODO check if map is valid and only set texture is map is valid and changes | ||
820 | |||
821 | if(assetmap[sculpt->getSculptTexture()].notNull()) | ||
822 | { | ||
823 | LLUUID replacment=assetmap[sculpt->getSculptTexture()]; | ||
824 | sculpt->setSculptTexture(replacment); | ||
825 | } | ||
826 | |||
827 | object->setParameterEntry(LLNetworkData::PARAMS_SCULPT,(LLNetworkData&)(*sculpt),true); | ||
828 | } | ||
829 | |||
830 | if(prim_llsd.has("light")) | ||
831 | { | ||
832 | LLLightParams * light=new LLLightParams(); | ||
833 | light->fromLLSD(prim_llsd["light"]); | ||
834 | object->setParameterEntry(LLNetworkData::PARAMS_LIGHT,(LLNetworkData&)(*light),true); | ||
835 | } | ||
836 | |||
837 | if(prim_llsd.has("flexible")) | ||
838 | { | ||
839 | LLFlexibleObjectData* flex=new LLFlexibleObjectData(); | ||
840 | flex->fromLLSD(prim_llsd["flexible"]); | ||
841 | object->setParameterEntry(LLNetworkData::PARAMS_FLEXIBLE,(LLNetworkData&)(*flex),true); | ||
842 | } | ||
843 | |||
844 | |||
845 | // Textures | ||
846 | LLSD te_llsd; | ||
847 | llinfos << "Processing textures for prim" << llendl; | ||
848 | |||
849 | te_llsd=prim_llsd["textures"]; | ||
850 | |||
851 | LLSD::array_iterator text_it; | ||
852 | U8 i=0; | ||
853 | i=0; | ||
854 | |||
855 | for(text_it=te_llsd.beginArray(); text_it !=te_llsd.endArray(); text_it++) | ||
856 | { | ||
857 | LLSD the_te; | ||
858 | the_te=(*text_it); | ||
859 | LLTextureEntry te; | ||
860 | te.fromLLSD(the_te); | ||
861 | |||
862 | if(assetmap[te.getID()].notNull()) | ||
863 | { | ||
864 | LLUUID replacment=assetmap[te.getID()]; | ||
865 | te.setID(replacment); | ||
866 | } | ||
867 | |||
868 | object->setTE(i,te); // | ||
869 | i++; | ||
870 | } | ||
871 | |||
872 | llinfos << "Textures done!" << llendl; | ||
873 | |||
874 | //bump the iterator now so the callbacks hook together nicely | ||
875 | //if(prim_import_iter!=this_group.endMap()) | ||
876 | // prim_import_iter++; | ||
877 | |||
878 | object->sendRotationUpdate(); | ||
879 | object->sendTEUpdate(); | ||
880 | object->sendShapeUpdate(); | ||
881 | LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_SCALE |UPD_POSITION); | ||
882 | |||
883 | LLSelectMgr::getInstance()->deselectAll(); | ||
884 | } | ||
885 | |||
886 | //This is fired when the update packet is processed so we know the prim settings have stuck | ||
887 | void primbackup::prim_update(LLViewerObject* object) | ||
888 | { | ||
889 | if(!running) | ||
890 | return; | ||
891 | |||
892 | if(object!=NULL) | ||
893 | if(object->mID!=expecting_update) | ||
894 | return; | ||
895 | |||
896 | m_curprim++; | ||
897 | updateimportnumbers(); | ||
898 | |||
899 | prim_import_iter++; | ||
900 | |||
901 | LLUUID x; | ||
902 | expecting_update=x.null; | ||
903 | |||
904 | if(prim_import_iter==this_group.endMap()) | ||
905 | { | ||
906 | llinfos<<"Trying to link"<<llendl; | ||
907 | |||
908 | if(toselect.size()>1) | ||
909 | { | ||
910 | std::reverse(toselect.begin(),toselect.end()); | ||
911 | //Now link | ||
912 | LLSelectMgr::getInstance()->deselectAll(); | ||
913 | LLSelectMgr::getInstance()->selectObjectAndFamily(toselect,true); | ||
914 | LLSelectMgr::getInstance()->sendLink(); | ||
915 | LLViewerObject * root=toselect.back(); | ||
916 | root->setRotation(root_rot); | ||
917 | } | ||
918 | |||
919 | this->m_curobject++; | ||
920 | group_prim_import_iter++; | ||
921 | if(group_prim_import_iter!=llsd["data"].endArray()) | ||
922 | { | ||
923 | import_next_object(); | ||
924 | return; | ||
925 | } | ||
926 | |||
927 | running=false; | ||
928 | this->close(); | ||
929 | return; | ||
930 | } | ||
931 | |||
932 | LLSD prim_llsd; | ||
933 | prim_llsd=this_group[prim_import_iter->first]; | ||
934 | |||
935 | if(toselect.empty()) | ||
936 | { | ||
937 | llwarns << "error: ran out of objects to mod" << llendl; | ||
938 | return; | ||
939 | } | ||
940 | |||
941 | if(prim_import_iter!=this_group.endMap()) | ||
942 | { | ||
943 | //rez_agent_offset(LLVector3(1.0,0,0)); | ||
944 | LLSD prim_llsd=this_group[prim_import_iter->first]; | ||
945 | process_iter++; | ||
946 | xmltoprim(prim_llsd,(*process_iter)); | ||
947 | } | ||
948 | } | ||
949 | |||
950 | // Callback when we rez a new object when the importer is running. | ||
951 | bool primbackup::newprim(LLViewerObject * pobject) | ||
952 | { | ||
953 | if(running) | ||
954 | { | ||
955 | rezcount++; | ||
956 | toselect.push_back(pobject); | ||
957 | updateimportnumbers(); | ||
958 | prim_import_iter++; | ||
959 | |||
960 | if(prim_import_iter!=this_group.endMap()) | ||
961 | { | ||
962 | |||
963 | pobject->setPosition(this->offset_agent(LLVector3(0,1.0,0))); | ||
964 | LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); | ||
965 | |||
966 | rez_agent_offset(LLVector3(1.0,0,0)); | ||
967 | } | ||
968 | else | ||
969 | { | ||
970 | llinfos << "All prims rezed, moving to build stage" <<llendl; | ||
971 | prim_import_iter=this_group.beginMap(); | ||
972 | LLSD prim_llsd=this_group[prim_import_iter->first]; | ||
973 | process_iter=toselect.begin(); | ||
974 | xmltoprim(prim_llsd,(*process_iter)); | ||
975 | } | ||
976 | } | ||
977 | |||
978 | return true; | ||
979 | } | ||
980 | |||
981 | void primbackup::update_map(LLUUID uploaded_asset) | ||
982 | { | ||
983 | if(current_asset.isNull()) | ||
984 | return; | ||
985 | |||
986 | assetmap.insert(std::pair<LLUUID,LLUUID>(current_asset,uploaded_asset)); | ||
987 | llinfos << "Mapping "<<current_asset<<" to "<<uploaded_asset<<llendl; | ||
988 | |||
989 | } | ||
990 | |||
991 | |||
992 | void myupload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_type, | ||
993 | std::string name, | ||
994 | std::string desc, S32 compression_info, | ||
995 | LLAssetType::EType destination_folder_type, | ||
996 | LLInventoryType::EType inv_type, | ||
997 | U32 next_owner_perm, | ||
998 | const std::string& display_name, | ||
999 | LLAssetStorage::LLStoreAssetCallback callback, | ||
1000 | void *userdata) | ||
1001 | { | ||
1002 | if(gDisconnected) | ||
1003 | { | ||
1004 | return ; | ||
1005 | } | ||
1006 | |||
1007 | LLAssetID uuid = tid.makeAssetID(gAgent.getSecureSessionID()); | ||
1008 | |||
1009 | // At this point, we're ready for the upload. | ||
1010 | std::string upload_message = "Uploading...\n\n"; | ||
1011 | upload_message.append(display_name); | ||
1012 | LLUploadDialog::modalUploadDialog(upload_message); | ||
1013 | |||
1014 | std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory"); | ||
1015 | if (!url.empty()) | ||
1016 | { | ||
1017 | LLSD body; | ||
1018 | body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLAssetType::AT_NONE) ? asset_type : destination_folder_type); | ||
1019 | body["asset_type"] = LLAssetType::lookup(asset_type); | ||
1020 | body["inventory_type"] = LLInventoryType::lookup(inv_type); | ||
1021 | body["name"] = name; | ||
1022 | body["description"] = desc; | ||
1023 | |||
1024 | std::ostringstream llsdxml; | ||
1025 | LLSDSerialize::toXML(body, llsdxml); | ||
1026 | lldebugs << "posting body to capability: " << llsdxml.str() << llendl; | ||
1027 | //LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type)); | ||
1028 | LLHTTPClient::post(url, body, new importResponder(body, uuid, asset_type)); | ||
1029 | |||
1030 | } | ||
1031 | else | ||
1032 | { | ||
1033 | llinfos << "NewAgentInventory capability not found, FUCK!" << llendl; | ||
1034 | } | ||
1035 | } | ||
1036 | |||
1037 | |||
1038 | |||
1039 | void primbackup::upload_next_asset() | ||
1040 | { | ||
1041 | if(textures.empty()) | ||
1042 | { | ||
1043 | llinfos<<" Texture list is empty, moving to rez statge"<< llendl; | ||
1044 | current_asset=LLUUID::null; | ||
1045 | import_object1a(); | ||
1046 | return; | ||
1047 | } | ||
1048 | |||
1049 | this->updateimportnumbers(); | ||
1050 | |||
1051 | std::list<LLUUID>::iterator iter; | ||
1052 | iter=textures.begin(); | ||
1053 | LLUUID id=(*iter); | ||
1054 | textures.pop_front(); | ||
1055 | |||
1056 | llinfos<<"Got texture ID "<<id<< "trying to upload"<<llendl; | ||
1057 | |||
1058 | current_asset=id; | ||
1059 | std::string struid; | ||
1060 | id.toString(struid); | ||
1061 | std::string filename=folder+"//"+struid; | ||
1062 | |||
1063 | |||
1064 | LLAssetID uuid; | ||
1065 | LLTransactionID tid; | ||
1066 | |||
1067 | // gen a new transaction ID for this asset | ||
1068 | tid.generate(); | ||
1069 | uuid = tid.makeAssetID(gAgent.getSecureSessionID()); | ||
1070 | |||
1071 | S32 file_size; | ||
1072 | apr_file_t* fp = ll_apr_file_open(filename, LL_APR_RB, &file_size); | ||
1073 | if (fp) | ||
1074 | { | ||
1075 | const S32 buf_size = 65536; | ||
1076 | U8 copy_buf[buf_size]; | ||
1077 | LLVFile file(gVFS, uuid, LLAssetType::AT_TEXTURE, LLVFile::WRITE); | ||
1078 | file.setMaxSize(file_size); | ||
1079 | |||
1080 | while ((file_size = ll_apr_file_read(fp, copy_buf, buf_size))) | ||
1081 | { | ||
1082 | file.write(copy_buf, file_size); | ||
1083 | } | ||
1084 | apr_file_close(fp); | ||
1085 | } | ||
1086 | else | ||
1087 | { | ||
1088 | llwarns<<"Unable to access output file "<<filename<<llendl; | ||
1089 | upload_next_asset(); | ||
1090 | return; | ||
1091 | } | ||
1092 | |||
1093 | myupload_new_resource( | ||
1094 | tid, LLAssetType::AT_TEXTURE, struid, | ||
1095 | struid, 0, | ||
1096 | LLAssetType::AT_TEXTURE, | ||
1097 | LLInventoryType::defaultForAssetType(LLAssetType::AT_TEXTURE), | ||
1098 | 0x0, | ||
1099 | "Uploaded texture", | ||
1100 | NULL, | ||
1101 | NULL); | ||
1102 | |||
1103 | |||
1104 | } | ||
1105 | |||
diff --git a/linden/indra/newview/primbackup.h b/linden/indra/newview/primbackup.h new file mode 100644 index 0000000..fddc35f --- /dev/null +++ b/linden/indra/newview/primbackup.h | |||
@@ -0,0 +1,132 @@ | |||
1 | |||
2 | #include "llviewerinventory.h" | ||
3 | |||
4 | #define LL_GRID_PERMISSIONS 1 | ||
5 | |||
6 | enum export_states {EXPORT_INIT,EXPORT_STRUCTURE,EXPORT_TEXTURES,EXPORT_LLSD,EXPORT_DONE}; | ||
7 | |||
8 | class primbackup : public LLFloater | ||
9 | |||
10 | { | ||
11 | public: | ||
12 | //Export state machine | ||
13 | enum export_states export_state; | ||
14 | |||
15 | //Export idle callback | ||
16 | static void exportworker(void *userdata); | ||
17 | |||
18 | //Static accessor | ||
19 | static primbackup* getInstance(); | ||
20 | |||
21 | virtual ~primbackup(); | ||
22 | |||
23 | //Floater stuff | ||
24 | virtual void show(); | ||
25 | virtual void draw(); | ||
26 | virtual void onClose( bool app_quitting ); | ||
27 | |||
28 | //Import entry point | ||
29 | void import_object(bool upload=FALSE); | ||
30 | |||
31 | //Export entry point | ||
32 | void pre_export_object(); | ||
33 | |||
34 | //Update map from texture worker | ||
35 | void update_map(LLUUID uploaded_asset); | ||
36 | |||
37 | //Move to next texture upload | ||
38 | void upload_next_asset(); | ||
39 | |||
40 | // is ready for next texture? | ||
41 | bool m_nexttextureready; | ||
42 | |||
43 | //Folder public geter | ||
44 | std::string getfolder() {return folder;}; | ||
45 | |||
46 | //Prim updated callback | ||
47 | void prim_update(LLViewerObject* object); | ||
48 | |||
49 | //New prim call back | ||
50 | bool newprim(LLViewerObject * pobject); | ||
51 | |||
52 | private: | ||
53 | |||
54 | //Static singleton stuff | ||
55 | primbackup(); | ||
56 | static primbackup* sInstance; | ||
57 | |||
58 | // are we active flag | ||
59 | bool running; | ||
60 | |||
61 | //file and folder name control | ||
62 | std::string file_name; | ||
63 | std::string folder; | ||
64 | |||
65 | // True if we need to rebase the assets | ||
66 | bool m_retexture; | ||
67 | |||
68 | //Counts of import and export objects and textures and prims | ||
69 | int m_objects,m_curobject; | ||
70 | int m_prims,m_curprim; | ||
71 | int m_textures,m_curtexture; | ||
72 | |||
73 | // No prims rezed | ||
74 | int rezcount; | ||
75 | |||
76 | // Update the floater with status numbers | ||
77 | void updateimportnumbers(); | ||
78 | void updateexportnumbers(); | ||
79 | |||
80 | //Convert a selection list of objects to LLSD | ||
81 | LLSD prims_to_llsd(LLViewerObject::child_list_t child_list); | ||
82 | |||
83 | // Start the import process | ||
84 | void import_object1a(); | ||
85 | |||
86 | //Export the next texture in list | ||
87 | void export_next_texture(); | ||
88 | |||
89 | //apply LLSD to object | ||
90 | void xmltoprim(LLSD prim_llsd,LLViewerObject * pobject); | ||
91 | |||
92 | |||
93 | //rez a prim at a given position (note not agent offset X/Y screen for raycast) | ||
94 | void rez_agent_offset(LLVector3 offset); | ||
95 | |||
96 | //Move to the next import group | ||
97 | void import_next_object(); | ||
98 | |||
99 | //Get an offset from the agent based on rotation and current pos | ||
100 | LLVector3 offset_agent(LLVector3 offset); | ||
101 | |||
102 | // Rebase map | ||
103 | std::map<LLUUID,LLUUID> assetmap; | ||
104 | |||
105 | //Export texture list | ||
106 | std::list<LLUUID> textures; | ||
107 | |||
108 | //Import object tracking | ||
109 | std::vector<LLViewerObject *> toselect; | ||
110 | std::vector<LLViewerObject *>::iterator process_iter; | ||
111 | |||
112 | //Working LLSD holders | ||
113 | LLUUID current_asset; | ||
114 | LLSD llsd; | ||
115 | LLSD this_group; | ||
116 | LLUUID expecting_update; | ||
117 | |||
118 | //working llsd itterators for objects and linksets | ||
119 | LLSD::map_const_iterator prim_import_iter; | ||
120 | LLSD::array_const_iterator group_prim_import_iter; | ||
121 | |||
122 | // Root pos and central root pos for link set | ||
123 | LLVector3 root_pos; | ||
124 | LLVector3 root_root_pos; | ||
125 | LLVector3 group_offset; | ||
126 | |||
127 | //Agent inital pos and rot when starting import | ||
128 | LLQuaternion root_rot; | ||
129 | LLQuaternion agent_rot; | ||
130 | |||
131 | }; | ||
132 | |||
diff --git a/linden/indra/newview/rlvevent.h b/linden/indra/newview/rlvevent.h new file mode 100644 index 0000000..c3d9c45 --- /dev/null +++ b/linden/indra/newview/rlvevent.h | |||
@@ -0,0 +1,224 @@ | |||
1 | #ifndef RLV_EVENTEMITTER_H | ||
2 | #define RLV_EVENTEMITTER_H | ||
3 | |||
4 | #include <algorithm> | ||
5 | #include <typeinfo> | ||
6 | #include <list> | ||
7 | |||
8 | #include "lluuid.h" | ||
9 | |||
10 | #include "rlvhelper.h" | ||
11 | |||
12 | // ============================================================================ | ||
13 | /* | ||
14 | * RlvEvent | ||
15 | * ======== | ||
16 | * Passed to observer event handlers (contains the same paramaters as RlvHandler::processXXXCommand) | ||
17 | */ | ||
18 | |||
19 | class RlvEvent | ||
20 | { | ||
21 | public: | ||
22 | RlvEvent(const LLUUID& uuid, const RlvCommand& rlvCmd) : m_UUID(uuid), m_rlvCmd(rlvCmd) {} | ||
23 | virtual ~RlvEvent() {} | ||
24 | |||
25 | const LLUUID& getSenderID() const { return m_UUID; }; | ||
26 | const RlvCommand& getCommand() const { return m_rlvCmd; }; | ||
27 | |||
28 | protected: | ||
29 | LLUUID m_UUID; | ||
30 | RlvCommand m_rlvCmd; | ||
31 | }; | ||
32 | |||
33 | // ============================================================================ | ||
34 | /* | ||
35 | * RlvObserver | ||
36 | * =========== | ||
37 | * Provides a way to extend the existing command set without changing the main RlvHandler class | ||
38 | * | ||
39 | * Steps: | ||
40 | * - derive your class from RlvObserver | ||
41 | * - override any of the event functions you need | ||
42 | * - add it as an observer: gRlvHandler.addObserver(new RlbObserverDerivedClass()); | ||
43 | * - done | ||
44 | * | ||
45 | * Notes: | ||
46 | * - as long as you don't call gRlvHandler.remObserver() your class will be cleaned up from | ||
47 | * RlvEventEmitter destructor (see below) | ||
48 | * - event handlers are called only if RlvHandler didn't handle it so while you can | ||
49 | * add a new command @foobar=n, you won't get called for @detach=n | ||
50 | * - event handlers are called *after* the command is added so a call to | ||
51 | * RlvHandler::hasBehaviour("foobar") would return TRUE | ||
52 | * - return TRUE if you handled the command (won't get passed on to the next observer) | ||
53 | * return FALSE if you didn't handle the command (gets passed on to the next observer) | ||
54 | * | ||
55 | */ | ||
56 | |||
57 | class RlvObserver | ||
58 | { | ||
59 | public: | ||
60 | virtual ~RlvObserver() {} | ||
61 | |||
62 | typedef RlvEvent EventType; | ||
63 | |||
64 | virtual BOOL onAddCommand(const EventType& rlvEvent) { return FALSE; } | ||
65 | virtual BOOL onRemoveCommand(const EventType& rlvEvent) { return FALSE; } | ||
66 | virtual BOOL onReplyCommand(const EventType& rlvEvent) { return FALSE; } | ||
67 | virtual BOOL onForceCommand(const EventType& rlvEvent) { return FALSE; } | ||
68 | }; | ||
69 | |||
70 | // ============================================================================ | ||
71 | /* | ||
72 | * RlvEventEmitter | ||
73 | * =============== | ||
74 | * Essentially a slightly modified eventEmitter (see lleventemitter.h) | ||
75 | * | ||
76 | * Changes: | ||
77 | * - if an event handler returns TRUE then no further observers are notified | ||
78 | * - cleans up the (remaining) observers in the destructor | ||
79 | */ | ||
80 | |||
81 | template < class T > | ||
82 | class RlvEventEmitter | ||
83 | { | ||
84 | public: | ||
85 | typedef typename T::EventType EventType; | ||
86 | typedef std::list< T* > ObserverContainer; | ||
87 | typedef BOOL ( T::*observerMethod )( const EventType& ); | ||
88 | |||
89 | protected: | ||
90 | ObserverContainer observers; | ||
91 | |||
92 | public: | ||
93 | RlvEventEmitter() { }; | ||
94 | |||
95 | ~RlvEventEmitter() | ||
96 | { | ||
97 | clearObservers(); | ||
98 | } | ||
99 | |||
100 | BOOL addObserver ( T* observerIn ) | ||
101 | { | ||
102 | if ( ! observerIn ) | ||
103 | return FALSE; | ||
104 | |||
105 | // check if observer already exists | ||
106 | if ( std::find ( observers.begin (), observers.end (), observerIn ) != observers.end () ) | ||
107 | return FALSE; | ||
108 | |||
109 | // save it | ||
110 | observers.push_back ( observerIn ); | ||
111 | |||
112 | return true; | ||
113 | } | ||
114 | |||
115 | BOOL remObserver ( T* observerIn ) | ||
116 | { | ||
117 | if ( ! observerIn ) | ||
118 | return FALSE; | ||
119 | |||
120 | observers.remove ( observerIn ); | ||
121 | |||
122 | return TRUE; | ||
123 | } | ||
124 | |||
125 | void clearObservers() | ||
126 | { | ||
127 | typename std::list< T* >::iterator iter = observers.begin (); | ||
128 | |||
129 | while (iter != observers.end ()) | ||
130 | { | ||
131 | delete *iter; | ||
132 | ++iter; | ||
133 | }; | ||
134 | |||
135 | observers.clear(); | ||
136 | } | ||
137 | |||
138 | BOOL update ( observerMethod method, const EventType& msgIn ) | ||
139 | { | ||
140 | typename std::list< T* >::iterator iter = observers.begin (); | ||
141 | |||
142 | BOOL fContinue = TRUE; | ||
143 | while ( (iter != observers.end ()) && (fContinue) ) | ||
144 | { | ||
145 | fContinue = !( ( ( *iter )->*method ) ( msgIn ) ); | ||
146 | ++iter; | ||
147 | }; | ||
148 | |||
149 | return !fContinue; | ||
150 | } | ||
151 | }; | ||
152 | |||
153 | // ============================================================================ | ||
154 | |||
155 | class RlvBehaviourObserver | ||
156 | { | ||
157 | public: | ||
158 | virtual ~RlvBehaviourObserver() {} | ||
159 | virtual void changed(const RlvCommand& rlvCmd, bool fInternal) = 0; | ||
160 | }; | ||
161 | |||
162 | // ============================================================================ | ||
163 | |||
164 | class RlvBehaviourNotifyObserver : public RlvBehaviourObserver | ||
165 | { | ||
166 | public: | ||
167 | virtual ~RlvBehaviourNotifyObserver() { } | ||
168 | |||
169 | void changed(const RlvCommand& rlvCmd, bool fInternal) | ||
170 | { | ||
171 | if ( (fInternal) || ((RLV_TYPE_ADD != rlvCmd.getParamType()) && (RLV_TYPE_REMOVE != rlvCmd.getParamType())) ) | ||
172 | return; | ||
173 | |||
174 | std::string strCmd = rlvCmd.asString(); | ||
175 | std::string strNotify = llformat("/%s=%c", strCmd.c_str(), (RLV_TYPE_ADD == rlvCmd.getParamType()) ? 'n' : 'y'); | ||
176 | |||
177 | for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = m_Notifications.begin(); | ||
178 | itNotify != m_Notifications.end(); ++itNotify) | ||
179 | { | ||
180 | if ( (itNotify->second.strFilter.empty()) || (std::string::npos != strCmd.find(itNotify->second.strFilter)) ) | ||
181 | rlvSendChatReply(itNotify->second.nChannel, strNotify); | ||
182 | } | ||
183 | } | ||
184 | |||
185 | void addNotify(const LLUUID& idObj, S32 nChannel, const std::string& strFilter) | ||
186 | { | ||
187 | m_Notifications.insert(std::pair<LLUUID, notifyData>(idObj, notifyData(nChannel, strFilter))); | ||
188 | } | ||
189 | |||
190 | void clearNotify(const LLUUID& idObj) | ||
191 | { | ||
192 | m_Notifications.erase(idObj); | ||
193 | } | ||
194 | |||
195 | bool hasNotify() | ||
196 | { | ||
197 | return (m_Notifications.size() != 0); | ||
198 | } | ||
199 | |||
200 | void removeNotify(const LLUUID& idObj, S32 nChannel, const std::string& strFilter) | ||
201 | { | ||
202 | for (std::multimap<LLUUID, notifyData>::iterator itNotify = m_Notifications.lower_bound(idObj), | ||
203 | endNotify = m_Notifications.upper_bound(idObj); itNotify != endNotify; ++itNotify) | ||
204 | { | ||
205 | if ( (itNotify->second.nChannel == nChannel) && (itNotify->second.strFilter == strFilter) ) | ||
206 | { | ||
207 | m_Notifications.erase(itNotify); | ||
208 | break; | ||
209 | } | ||
210 | } | ||
211 | } | ||
212 | protected: | ||
213 | struct notifyData | ||
214 | { | ||
215 | S32 nChannel; | ||
216 | std::string strFilter; | ||
217 | notifyData(S32 channel, const std::string& filter) : nChannel(channel), strFilter(filter) {} | ||
218 | }; | ||
219 | std::multimap<LLUUID, notifyData> m_Notifications; | ||
220 | }; | ||
221 | |||
222 | // ============================================================================ | ||
223 | |||
224 | #endif // RLV_EVENTEMITTER_H | ||
diff --git a/linden/indra/newview/rlvextensions.cpp b/linden/indra/newview/rlvextensions.cpp new file mode 100644 index 0000000..6f79636 --- /dev/null +++ b/linden/indra/newview/rlvextensions.cpp | |||
@@ -0,0 +1,454 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | ||
2 | #include "llagent.h" | ||
3 | #include "llviewercontrol.h" | ||
4 | #include "llviewerwindow.h" | ||
5 | #include "llvoavatar.h" | ||
6 | #include "llwlparammanager.h" | ||
7 | |||
8 | #include "rlvextensions.h" | ||
9 | #include "rlvhandler.h" | ||
10 | |||
11 | // ============================================================================ | ||
12 | |||
13 | std::map<std::string, S16> RlvExtGetSet::m_DbgAllowed; | ||
14 | |||
15 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h | ||
16 | RlvExtGetSet::RlvExtGetSet() | ||
17 | { | ||
18 | if (!m_DbgAllowed.size()) // m_DbgAllowed is static and should only be initialized once | ||
19 | { | ||
20 | m_DbgAllowed.insert(std::pair<std::string, S16>("AvatarSex", DBG_READ | DBG_PSEUDO)); | ||
21 | m_DbgAllowed.insert(std::pair<std::string, S16>("RenderResolutionDivisor", DBG_READ | DBG_WRITE)); | ||
22 | #ifdef RLV_EXTENSION_CMD_GETSETDEBUG_EX | ||
23 | m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_FORBIDGIVETORLV, DBG_READ)); | ||
24 | m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_NOSETENV, DBG_READ)); | ||
25 | m_DbgAllowed.insert(std::pair<std::string, S16>("WindLightUseAtmosShaders", DBG_READ)); | ||
26 | #endif // RLV_EXTENSION_CMD_GETSETDEBUG_EX | ||
27 | |||
28 | // Cache persistance of every setting | ||
29 | LLControlVariable* pSetting; | ||
30 | for (std::map<std::string, S16>::iterator itDbg = m_DbgAllowed.begin(); itDbg != m_DbgAllowed.end(); ++itDbg) | ||
31 | { | ||
32 | if ( ((pSetting = gSavedSettings.getControl(itDbg->first)) != NULL) && (pSetting->isPersisted()) ) | ||
33 | itDbg->second |= DBG_PERSIST; | ||
34 | } | ||
35 | } | ||
36 | } | ||
37 | |||
38 | // Checked: 2009-05-17 (RLVa-0.2.0a) | ||
39 | BOOL RlvExtGetSet::onForceCommand(const RlvEvent& rlvEvent) | ||
40 | { | ||
41 | return processCommand(rlvEvent.getSenderID(), rlvEvent.getCommand()); | ||
42 | } | ||
43 | |||
44 | // Checked: 2009-05-17 (RLVa-0.2.0a) | ||
45 | BOOL RlvExtGetSet::onReplyCommand(const EventType& rlvEvent) | ||
46 | { | ||
47 | return processCommand(rlvEvent.getSenderID(), rlvEvent.getCommand()); | ||
48 | } | ||
49 | |||
50 | // Checked: 2009-06-18 (RLVa-0.2.1d) | Modified: RLVa-0.2.1d | ||
51 | BOOL RlvExtGetSet::processCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) | ||
52 | { | ||
53 | std::string strBehaviour = rlvCmd.getBehaviour(), strGetSet, strSetting; | ||
54 | int idxSetting = strBehaviour.find('_'); | ||
55 | if ( (strBehaviour.length() >= 6) && (-1 != idxSetting) && ((int)strBehaviour.length() > idxSetting + 1) ) | ||
56 | { | ||
57 | strSetting = strBehaviour.substr(idxSetting + 1); | ||
58 | strBehaviour.erase(idxSetting); // Get rid of "_<setting>" | ||
59 | |||
60 | strGetSet = strBehaviour.substr(0, 3); | ||
61 | strBehaviour.erase(0, 3); // Get rid of get/set | ||
62 | |||
63 | if ("debug" == strBehaviour) | ||
64 | { | ||
65 | if ( ("get" == strGetSet) && (RLV_TYPE_REPLY == rlvCmd.getParamType()) ) | ||
66 | { | ||
67 | rlvSendChatReply(rlvCmd.getParam(), onGetDebug(strSetting)); | ||
68 | return TRUE; | ||
69 | } | ||
70 | else if ( ("set" == strGetSet) && (RLV_TYPE_FORCE == rlvCmd.getParamType()) ) | ||
71 | { | ||
72 | if (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETDEBUG, idObj)) | ||
73 | onSetDebug(strSetting, rlvCmd.getOption()); | ||
74 | return TRUE; | ||
75 | } | ||
76 | } | ||
77 | else if ("env" == strBehaviour) | ||
78 | { | ||
79 | if ( ("get" == strGetSet) && (RLV_TYPE_REPLY == rlvCmd.getParamType()) ) | ||
80 | { | ||
81 | rlvSendChatReply(rlvCmd.getParam(), onGetEnv(strSetting)); | ||
82 | return TRUE; | ||
83 | } | ||
84 | else if ( ("set" == strGetSet) && (RLV_TYPE_FORCE == rlvCmd.getParamType()) ) | ||
85 | { | ||
86 | if (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_SETENV, idObj)) | ||
87 | onSetEnv(strSetting, rlvCmd.getOption()); | ||
88 | return TRUE; | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | else if ("setrot" == rlvCmd.getBehaviour()) | ||
93 | { | ||
94 | // NOTE: if <option> is invalid (or missing) altogether then RLV-1.17 will rotate to 0.0 (which is actually PI / 4) | ||
95 | F32 nAngle = 0.0f; | ||
96 | if (LLStringUtil::convertToF32(rlvCmd.getOption(), nAngle)) | ||
97 | { | ||
98 | nAngle += RLV_SETROT_OFFSET; | ||
99 | |||
100 | gAgent.startCameraAnimation(); | ||
101 | |||
102 | LLVector3 at(LLVector3::x_axis); | ||
103 | at.rotVec(nAngle, LLVector3::z_axis); | ||
104 | at.normalize(); | ||
105 | gAgent.resetAxes(at); | ||
106 | |||
107 | return TRUE; | ||
108 | } | ||
109 | } | ||
110 | return FALSE; | ||
111 | } | ||
112 | |||
113 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h | ||
114 | bool RlvExtGetSet::findDebugSetting(std::string& strSetting, S16& flags) | ||
115 | { | ||
116 | LLStringUtil::toLower(strSetting); // Convenience for non-RLV calls | ||
117 | |||
118 | std::string strTemp; | ||
119 | for (std::map<std::string, S16>::const_iterator itSetting = m_DbgAllowed.begin(); itSetting != m_DbgAllowed.end(); ++itSetting) | ||
120 | { | ||
121 | strTemp = itSetting->first; | ||
122 | LLStringUtil::toLower(strTemp); | ||
123 | |||
124 | if (strSetting == strTemp) | ||
125 | { | ||
126 | strSetting = itSetting->first; | ||
127 | flags = itSetting->second; | ||
128 | return true; | ||
129 | } | ||
130 | } | ||
131 | return false; | ||
132 | } | ||
133 | |||
134 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | ||
135 | S16 RlvExtGetSet::getDebugSettingFlags(const std::string& strSetting) | ||
136 | { | ||
137 | std::map<std::string, S16>::const_iterator itSetting = m_DbgAllowed.find(strSetting); | ||
138 | return (itSetting != m_DbgAllowed.end()) ? itSetting->second : 0; | ||
139 | } | ||
140 | |||
141 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h | ||
142 | std::string RlvExtGetSet::onGetDebug(std::string strSetting) | ||
143 | { | ||
144 | S16 dbgFlags; | ||
145 | if ( (findDebugSetting(strSetting, dbgFlags)) && ((dbgFlags & DBG_READ) == DBG_READ) ) | ||
146 | { | ||
147 | if ((dbgFlags & DBG_PSEUDO) == 0) | ||
148 | { | ||
149 | LLControlVariable* pSetting = gSavedSettings.getControl(strSetting); | ||
150 | if (pSetting) | ||
151 | { | ||
152 | switch (pSetting->type()) | ||
153 | { | ||
154 | case TYPE_U32: | ||
155 | return llformat("%u", gSavedSettings.getU32(strSetting)); | ||
156 | case TYPE_S32: | ||
157 | return llformat("%d", gSavedSettings.getS32(strSetting)); | ||
158 | case TYPE_BOOLEAN: | ||
159 | return llformat("%d", gSavedSettings.getBOOL(strSetting)); | ||
160 | default: | ||
161 | RLV_ERRS << "Unexpected debug setting type" << LL_ENDL; | ||
162 | break; | ||
163 | } | ||
164 | } | ||
165 | } | ||
166 | else | ||
167 | { | ||
168 | return onGetPseudoDebug(strSetting); | ||
169 | } | ||
170 | } | ||
171 | return std::string(); | ||
172 | } | ||
173 | |||
174 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | ||
175 | std::string RlvExtGetSet::onGetPseudoDebug(const std::string& strSetting) | ||
176 | { | ||
177 | // Skip sanity checking because it's all done in RlvExtGetSet::onGetDebug() already | ||
178 | if ("AvatarSex" == strSetting) | ||
179 | { | ||
180 | if (gAgent.getAvatarObject()) | ||
181 | return llformat("%d", (gAgent.getAvatarObject()->getSex() == SEX_MALE)); // [See LLFloaterCustomize::LLFloaterCustomize()] | ||
182 | } | ||
183 | return std::string(); | ||
184 | } | ||
185 | |||
186 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h | ||
187 | void RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& strValue) | ||
188 | { | ||
189 | S16 dbgFlags; | ||
190 | if ( (findDebugSetting(strSetting, dbgFlags)) && ((dbgFlags & DBG_WRITE) == DBG_WRITE) ) | ||
191 | { | ||
192 | if ((dbgFlags & DBG_PSEUDO) == 0) | ||
193 | { | ||
194 | LLControlVariable* pSetting = gSavedSettings.getControl(strSetting); | ||
195 | if (pSetting) | ||
196 | { | ||
197 | U32 u32Value; S32 s32Value; BOOL fValue; | ||
198 | switch (pSetting->type()) | ||
199 | { | ||
200 | case TYPE_U32: | ||
201 | if (LLStringUtil::convertToU32(strValue, u32Value)) | ||
202 | gSavedSettings.setU32(strSetting, u32Value); | ||
203 | break; | ||
204 | case TYPE_S32: | ||
205 | if (LLStringUtil::convertToS32(strValue, s32Value)) | ||
206 | gSavedSettings.setS32(strSetting, s32Value); | ||
207 | break; | ||
208 | case TYPE_BOOLEAN: | ||
209 | if (LLStringUtil::convertToBOOL(strValue, fValue)) | ||
210 | gSavedSettings.setBOOL(strSetting, fValue); | ||
211 | break; | ||
212 | default: | ||
213 | RLV_ERRS << "Unexpected debug setting type" << LL_ENDL; | ||
214 | break; | ||
215 | } | ||
216 | |||
217 | // Default settings should persist if they were marked that way, but non-default settings should never persist | ||
218 | pSetting->setPersist( (pSetting->isDefault()) ? ((dbgFlags & DBG_PERSIST) == DBG_PERSIST) : false ); | ||
219 | } | ||
220 | } | ||
221 | } | ||
222 | } | ||
223 | |||
224 | std::string RlvExtGetSet::onGetEnv(std::string strSetting) | ||
225 | { | ||
226 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | ||
227 | |||
228 | F32 nValue = 0.0f; | ||
229 | if ("daytime" == strSetting) | ||
230 | { | ||
231 | nValue = (pWLParams->mAnimator.mIsRunning && pWLParams->mAnimator.mUseLindenTime) ? -1.0f : pWLParams->mAnimator.getDayTime(); | ||
232 | } | ||
233 | else if ("preset" == strSetting) | ||
234 | { | ||
235 | return (pWLParams->mAnimator.mIsRunning && pWLParams->mAnimator.mUseLindenTime) ? std::string() : pWLParams->mCurParams.mName; | ||
236 | } | ||
237 | else if ("cloudcoverage" == strSetting) nValue = pWLParams->mCloudCoverage; | ||
238 | else if ("cloudscale" == strSetting) nValue = pWLParams->mCloudScale; | ||
239 | else if ("cloudscrollx" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollX() - 10.0f; | ||
240 | else if ("cloudscrolly" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollY() - 10.0f; | ||
241 | else if ("densitymultiplier" == strSetting) nValue = pWLParams->mDensityMult * 1000; | ||
242 | else if ("distancemultiplier" == strSetting) nValue = pWLParams->mDistanceMult; | ||
243 | else if ("eastangle" == strSetting) nValue = pWLParams->mCurParams.getEastAngle() / F_TWO_PI; | ||
244 | else if ("hazedensity" == strSetting) nValue = pWLParams->mHazeDensity.r; | ||
245 | else if ("hazehorizon" == strSetting) nValue = pWLParams->mHazeHorizon.r; | ||
246 | else if ("maxaltitude" == strSetting) nValue = pWLParams->mMaxAlt; | ||
247 | else if ("scenegamma" == strSetting) nValue = pWLParams->mWLGamma; | ||
248 | else if ("starbrightness" == strSetting) nValue = pWLParams->mCurParams.getStarBrightness(); | ||
249 | else if ("sunglowfocus" == strSetting) nValue = -pWLParams->mGlow.b / 5.0f; | ||
250 | else if ("sunglowsize" == strSetting) nValue = 2 - pWLParams->mGlow.r / 20.0f; | ||
251 | else if ("sunmoonposition" == strSetting) nValue = pWLParams->mCurParams.getSunAngle() / F_TWO_PI; | ||
252 | else | ||
253 | { | ||
254 | char ch = strSetting[strSetting.length() - 1]; | ||
255 | // HACK-RLVa: not entirely proper (creates new synonyms) | ||
256 | if ('x' == ch) ch = 'r'; | ||
257 | else if ('y' == ch) ch = 'g'; | ||
258 | else if ('d' == ch) ch = 'b'; | ||
259 | |||
260 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) | ||
261 | { | ||
262 | WLColorControl* pColour = NULL; | ||
263 | strSetting.erase(strSetting.length() - 2, 1); | ||
264 | |||
265 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; | ||
266 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; | ||
267 | else if ("bluehorizon" == strSetting) pColour = &pWLParams->mBlueHorizon; | ||
268 | else if ("sunmooncolor" == strSetting) pColour = &pWLParams->mSunlight; | ||
269 | else if ("cloudcolor" == strSetting) pColour = &pWLParams->mCloudColor; | ||
270 | else if ("cloud" == strSetting) pColour = &pWLParams->mCloudMain; | ||
271 | else if ("clouddetail" == strSetting) pColour = &pWLParams->mCloudDetail; | ||
272 | |||
273 | if (pColour) | ||
274 | { | ||
275 | if ('r' == ch) nValue = pColour->b; | ||
276 | else if ('g' == ch) nValue = pColour->b; | ||
277 | else if ('b' == ch) nValue = pColour->b; | ||
278 | else if (('i' == ch) && (pColour->hasSliderName)) nValue = pColour->i; | ||
279 | |||
280 | if (pColour->isBlueHorizonOrDensity) nValue /= 2.0f; | ||
281 | else if (pColour->isSunOrAmbientColor) nValue /= 3.0f; | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | |||
286 | return llformat("%f", nValue); | ||
287 | } | ||
288 | |||
289 | void RlvExtGetSet::onSetEnv(std::string strSetting, const std::string& strValue) | ||
290 | { | ||
291 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | ||
292 | WLFloatControl* pFloat = NULL; | ||
293 | WLColorControl* pColour = NULL; | ||
294 | |||
295 | F32 nValue = 0.0f; | ||
296 | // Sanity check - make sure strValue specifies a number for all settings except "preset" | ||
297 | if ( (rlv_handler_t::fNoSetEnv) || ( (!LLStringUtil::convertToF32(strValue, nValue)) && ("preset" != strSetting) )) | ||
298 | return; | ||
299 | |||
300 | // Not quite correct, but RLV-1.16.0 will halt the default daytime cycle on invalid commands so we need to as well | ||
301 | pWLParams->mAnimator.mIsRunning = false; | ||
302 | pWLParams->mAnimator.mUseLindenTime = false; | ||
303 | |||
304 | // See LLWorldEnvSettings::handleEvent() | ||
305 | if ("daytime" == strSetting) | ||
306 | { | ||
307 | if (0.0f <= nValue) | ||
308 | { | ||
309 | pWLParams->mAnimator.setDayTime(llmin(nValue, 1.0f)); | ||
310 | pWLParams->mAnimator.update(pWLParams->mCurParams); | ||
311 | } | ||
312 | else | ||
313 | { | ||
314 | pWLParams->mAnimator.mIsRunning = true; | ||
315 | pWLParams->mAnimator.mUseLindenTime = true; | ||
316 | } | ||
317 | return; | ||
318 | } | ||
319 | // See LLFloaterWindLight::onChangePresetName() | ||
320 | else if ("preset" == strSetting) | ||
321 | { | ||
322 | pWLParams->loadPreset(strValue, true); | ||
323 | return; | ||
324 | } | ||
325 | // See LLFloaterWindLight::onStarAlphaMoved | ||
326 | else if ("starbrightness" == strSetting) | ||
327 | { | ||
328 | pWLParams->mCurParams.setStarBrightness(nValue); | ||
329 | return; | ||
330 | } | ||
331 | // See LLFloaterWindLight::onGlowRMoved() / LLFloaterWindLight::onGlowBMoved() | ||
332 | else if ( ("sunglowfocus" == strSetting) || ("sunglowsize" == strSetting) ) | ||
333 | { | ||
334 | WLColorControl *pColour = &pWLParams->mGlow; | ||
335 | if ("sunglowfocus" == strSetting) | ||
336 | pColour->b = -nValue * 5; | ||
337 | else | ||
338 | pColour->r = (2 - nValue) * 20; | ||
339 | |||
340 | pColour->update(pWLParams->mCurParams); | ||
341 | pWLParams->propagateParameters(); | ||
342 | return; | ||
343 | } | ||
344 | // See LLFloaterWindLight::onSunMoved() | ||
345 | else if ( ("eastangle" == strSetting) || ("sunmoonposition" == strSetting) ) | ||
346 | { | ||
347 | if ("eastangle" == strSetting) | ||
348 | pWLParams->mCurParams.setEastAngle(F_TWO_PI * nValue); | ||
349 | else | ||
350 | pWLParams->mCurParams.setSunAngle(F_TWO_PI * nValue); | ||
351 | |||
352 | // TODO-RLVa: it looks like propagateParameters() will actually take care of this for us, making this redundant? | ||
353 | WLColorControl* pColour = &pWLParams->mLightnorm; | ||
354 | pColour->r = -sin(pWLParams->mCurParams.getEastAngle()) * cos(pWLParams->mCurParams.getSunAngle()); | ||
355 | pColour->g = sin(pWLParams->mCurParams.getSunAngle()); | ||
356 | pColour->b = cos(pWLParams->mCurParams.getEastAngle()) * cos(pWLParams->mCurParams.getSunAngle()); | ||
357 | pColour->i = 1.f; | ||
358 | |||
359 | pColour->update(pWLParams->mCurParams); | ||
360 | pWLParams->propagateParameters(); | ||
361 | return; | ||
362 | } | ||
363 | // See LLFloaterWindLight::onCloudScrollXMoved() / LLFloaterWindLight::onCloudScrollYMoved() | ||
364 | else if ("cloudscrollx" == strSetting) | ||
365 | { | ||
366 | pWLParams->mCurParams.setCloudScrollX(nValue + 10.0f); | ||
367 | return; | ||
368 | } | ||
369 | else if ("cloudscrolly" == strSetting) | ||
370 | { | ||
371 | pWLParams->mCurParams.setCloudScrollY(nValue + 10.0f); | ||
372 | return; | ||
373 | } | ||
374 | // See LLFloaterWindLight::onFloatControlMoved() | ||
375 | else if ("cloudcoverage" == strSetting) pFloat = &pWLParams->mCloudCoverage; | ||
376 | else if ("cloudscale" == strSetting) pFloat = &pWLParams->mCloudScale; | ||
377 | else if ("densitymultiplier" == strSetting) pFloat = &pWLParams->mDensityMult; | ||
378 | else if ("distancemultiplier" == strSetting) pFloat = &pWLParams->mDistanceMult; | ||
379 | else if ("maxaltitude" == strSetting) pFloat = &pWLParams->mMaxAlt; | ||
380 | else if ("scenegamma" == strSetting) pFloat = &pWLParams->mWLGamma; | ||
381 | // See LLFloaterWindLight::onColorControlRMoved() | ||
382 | else if ("hazedensity" == strSetting) pColour = &pWLParams->mHazeDensity; | ||
383 | else if ("hazehorizon" == strSetting) pColour = &pWLParams->mHazeHorizon; | ||
384 | |||
385 | if (pFloat) | ||
386 | { | ||
387 | pFloat->x = nValue / pFloat->mult; | ||
388 | pFloat->update(pWLParams->mCurParams); | ||
389 | pWLParams->propagateParameters(); | ||
390 | return; | ||
391 | } | ||
392 | else if (pColour) | ||
393 | { | ||
394 | pColour->r = nValue; | ||
395 | pColour->update(pWLParams->mCurParams); | ||
396 | pWLParams->propagateParameters(); | ||
397 | return; | ||
398 | } | ||
399 | |||
400 | // RGBI settings | ||
401 | char ch = strSetting[strSetting.length() - 1]; | ||
402 | if ('x' == ch) ch = 'r'; | ||
403 | else if ('y' == ch) ch = 'g'; | ||
404 | else if ('d' == ch) ch = 'b'; | ||
405 | |||
406 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) | ||
407 | { | ||
408 | strSetting.erase(strSetting.length() - 2, 1); | ||
409 | |||
410 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; | ||
411 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; | ||
412 | else if ("bluehorizon" == strSetting) pColour = &pWLParams->mBlueHorizon; | ||
413 | else if ("sunmooncolor" == strSetting) pColour = &pWLParams->mSunlight; | ||
414 | else if ("cloudcolor" == strSetting) pColour = &pWLParams->mCloudColor; | ||
415 | else if ("cloud" == strSetting) pColour = &pWLParams->mCloudMain; | ||
416 | else if ("clouddetail" == strSetting) pColour = &pWLParams->mCloudDetail; | ||
417 | |||
418 | if (pColour) | ||
419 | { | ||
420 | if (pColour->isBlueHorizonOrDensity) nValue *= 2.0f; | ||
421 | else if (pColour->isSunOrAmbientColor) nValue *= 3.0f; | ||
422 | |||
423 | if ('i' == ch) // (See: LLFloaterWindLight::onColorControlIMoved) | ||
424 | { | ||
425 | if (!pColour->hasSliderName) | ||
426 | return; | ||
427 | |||
428 | F32 curMax = llmax(pColour->r, pColour->g, pColour->b); | ||
429 | if ( (0.0f == nValue) || (0.0f == curMax) ) | ||
430 | pColour->r = pColour->g = pColour->b = pColour->i = nValue; | ||
431 | else | ||
432 | { | ||
433 | F32 nDelta = (nValue - curMax) / curMax; | ||
434 | pColour->r *= (1.0f + nDelta); | ||
435 | pColour->g *= (1.0f + nDelta); | ||
436 | pColour->b *= (1.0f + nDelta); | ||
437 | pColour->i = nValue; | ||
438 | } | ||
439 | } | ||
440 | else // (See: LLFloaterWindLight::onColorControlRMoved) | ||
441 | { | ||
442 | F32* pnValue = ('r' == ch) ? &pColour->r : ('g' == ch) ? &pColour->g : ('b' == ch) ? &pColour->b : NULL; | ||
443 | if (pnValue) | ||
444 | *pnValue = nValue; | ||
445 | pColour->i = llmax(pColour->r, pColour->g, pColour->b); | ||
446 | } | ||
447 | |||
448 | pColour->update(pWLParams->mCurParams); | ||
449 | pWLParams->propagateParameters(); | ||
450 | } | ||
451 | } | ||
452 | } | ||
453 | |||
454 | // ============================================================================ | ||
diff --git a/linden/indra/newview/rlvextensions.h b/linden/indra/newview/rlvextensions.h new file mode 100644 index 0000000..5c10c58 --- /dev/null +++ b/linden/indra/newview/rlvextensions.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef RLV_EXTENSIONS_H | ||
2 | #define RLV_EXTENSIONS_H | ||
3 | |||
4 | #include "rlvhelper.h" | ||
5 | #include "rlvevent.h" | ||
6 | |||
7 | // ============================================================================ | ||
8 | /* | ||
9 | * RlvExtGetSet | ||
10 | * ============ | ||
11 | * Implements @get_XXX:<option>=<channel> and @set_XXX:<option>=force | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | class RlvExtGetSet : public RlvObserver | ||
16 | { | ||
17 | public: | ||
18 | RlvExtGetSet(); | ||
19 | virtual ~RlvExtGetSet() {} | ||
20 | |||
21 | virtual BOOL onForceCommand(const RlvEvent& rlvEvent); | ||
22 | virtual BOOL onReplyCommand(const RlvEvent& rlvEvent); | ||
23 | protected: | ||
24 | std::string onGetDebug(std::string strSetting); | ||
25 | std::string onGetPseudoDebug(const std::string& strSetting); | ||
26 | void onSetDebug(std::string strSetting, const std::string& strValue); | ||
27 | |||
28 | std::string onGetEnv(std::string strSetting); | ||
29 | void onSetEnv(std::string strSetting, const std::string& strValue); | ||
30 | |||
31 | BOOL processCommand(const LLUUID& idObj, const RlvCommand& rlvCmd); | ||
32 | |||
33 | public: | ||
34 | enum { DBG_READ = 0x01, DBG_WRITE = 0x02, DBG_PERSIST = 0x04, DBG_PSEUDO = 0x08 }; | ||
35 | static std::map<std::string, S16> m_DbgAllowed; | ||
36 | |||
37 | static bool findDebugSetting(/*[in,out]*/ std::string& strSetting, /*[out]*/ S16& flags); | ||
38 | static S16 getDebugSettingFlags(const std::string& strSetting); | ||
39 | }; | ||
40 | |||
41 | // ============================================================================ | ||
42 | |||
43 | #endif // RLV_EXTENSIONS_H | ||
diff --git a/linden/indra/newview/rlvfloaterbehaviour.cpp b/linden/indra/newview/rlvfloaterbehaviour.cpp new file mode 100644 index 0000000..39fcf12 --- /dev/null +++ b/linden/indra/newview/rlvfloaterbehaviour.cpp | |||
@@ -0,0 +1,152 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | ||
2 | |||
3 | #include "llagent.h" | ||
4 | #include "llcachename.h" | ||
5 | #include "llscrolllistctrl.h" | ||
6 | #include "lluictrlfactory.h" | ||
7 | #include "llviewerinventory.h" | ||
8 | #include "llviewerobjectlist.h" | ||
9 | #include "llvoavatar.h" | ||
10 | |||
11 | #include "rlvfloaterbehaviour.h" | ||
12 | |||
13 | // ============================================================================ | ||
14 | |||
15 | RlvFloaterBehaviour::RlvFloaterBehaviour(const LLSD& key) | ||
16 | : LLFloater(std::string("rlvBehaviours")) | ||
17 | { | ||
18 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_behaviour.xml"); | ||
19 | } | ||
20 | |||
21 | |||
22 | void RlvFloaterBehaviour::show(void*) | ||
23 | { | ||
24 | RlvFloaterBehaviour::showInstance(); | ||
25 | } | ||
26 | |||
27 | void RlvFloaterBehaviour::refreshAll() | ||
28 | { | ||
29 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
30 | LLCtrlListInterface* pList = childGetListInterface("behaviour_list"); | ||
31 | const rlv_object_map_t* pRlvObjects = gRlvHandler.getObjectMap(); | ||
32 | if ( (!pAvatar) || (!pList) || (!pRlvObjects) ) | ||
33 | return; | ||
34 | |||
35 | pList->operateOnAll(LLCtrlListInterface::OP_DELETE); | ||
36 | |||
37 | for (rlv_object_map_t::const_iterator itObj = pRlvObjects->begin(), endObj = pRlvObjects->end(); itObj != endObj; ++itObj) | ||
38 | { | ||
39 | std::string strName = itObj->first.asString(); | ||
40 | |||
41 | LLViewerInventoryItem* pItem = NULL; | ||
42 | LLViewerObject* pObj = gObjectList.findObject(itObj->first); | ||
43 | if (pObj) | ||
44 | { | ||
45 | LLViewerJointAttachment* pAttachPt = | ||
46 | get_if_there(pAvatar->mAttachmentPoints, gRlvHandler.getAttachPointIndex(pObj), (LLViewerJointAttachment*)NULL); | ||
47 | if (pAttachPt) | ||
48 | { | ||
49 | pItem = gInventory.getItem(pAttachPt->getItemID()); | ||
50 | } | ||
51 | } | ||
52 | |||
53 | if (pItem) | ||
54 | strName = pItem->getName(); | ||
55 | |||
56 | const rlv_command_list_t* pCommands = itObj->second.getCommandList(); | ||
57 | for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd) | ||
58 | { | ||
59 | std::string strBhvr = itCmd->asString(); LLUUID uuid(itCmd->getOption()); | ||
60 | if (uuid.notNull()) | ||
61 | { | ||
62 | std::string strLookup; | ||
63 | if ( (gCacheName->getFullName(uuid, strLookup)) || (gCacheName->getGroupName(uuid, strLookup)) ) | ||
64 | { | ||
65 | if (strLookup.find("???") == std::string::npos) | ||
66 | strBhvr.assign(itCmd->getBehaviour()).append(":").append(strLookup); | ||
67 | } | ||
68 | else if (m_PendingLookup.end() == std::find(m_PendingLookup.begin(), m_PendingLookup.end(), uuid)) | ||
69 | { | ||
70 | gCacheName->get(uuid, FALSE, onAvatarNameLookup, this); | ||
71 | m_PendingLookup.push_back(uuid); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | LLSD element; | ||
76 | |||
77 | // Restriction column | ||
78 | element["columns"][0]["column"] = "behaviour"; | ||
79 | element["columns"][0]["value"] = strBhvr; | ||
80 | element["columns"][0]["font"] = "SANSSERIF"; | ||
81 | element["columns"][0]["font-style"] = "NORMAL"; | ||
82 | |||
83 | // Object Name column | ||
84 | element["columns"][1]["column"] = "name"; | ||
85 | element["columns"][1]["value"] = strName; | ||
86 | element["columns"][1]["font"] = "SANSSERIF"; | ||
87 | element["columns"][1]["font-style"] = "NORMAL"; | ||
88 | |||
89 | pList->addElement(element, ADD_BOTTOM); | ||
90 | } | ||
91 | } | ||
92 | } | ||
93 | |||
94 | // ============================================================================ | ||
95 | /* | ||
96 | * LLFloater overrides | ||
97 | */ | ||
98 | |||
99 | BOOL RlvFloaterBehaviour::canClose() | ||
100 | { | ||
101 | return !LLApp::isExiting(); | ||
102 | } | ||
103 | |||
104 | void RlvFloaterBehaviour::onOpen() | ||
105 | { | ||
106 | gRlvHandler.addBehaviourObserver(this); | ||
107 | |||
108 | refreshAll(); | ||
109 | } | ||
110 | |||
111 | void RlvFloaterBehaviour::onClose(bool fQuitting) | ||
112 | { | ||
113 | LLFloater::setVisible(FALSE); | ||
114 | |||
115 | gRlvHandler.removeBehaviourObserver(this); | ||
116 | |||
117 | for (std::list<LLUUID>::const_iterator itLookup = m_PendingLookup.begin(); itLookup != m_PendingLookup.end(); ++itLookup) | ||
118 | { | ||
119 | gCacheName->cancelCallback(*itLookup, onAvatarNameLookup, this); | ||
120 | } | ||
121 | m_PendingLookup.clear(); | ||
122 | } | ||
123 | |||
124 | BOOL RlvFloaterBehaviour::postBuild() | ||
125 | { | ||
126 | return TRUE; | ||
127 | } | ||
128 | |||
129 | // ============================================================================ | ||
130 | /* | ||
131 | * RlvBehaviourObserver overrides | ||
132 | */ | ||
133 | |||
134 | void RlvFloaterBehaviour::changed(const RlvCommand& /*rlvCmd*/, bool /*fInternal*/) | ||
135 | { | ||
136 | refreshAll(); | ||
137 | } | ||
138 | |||
139 | // ============================================================================ | ||
140 | |||
141 | void RlvFloaterBehaviour::onAvatarNameLookup(const LLUUID& uuid, const std::string& strFirst, const std::string& strLast, BOOL fGroup, void* pParam) | ||
142 | { | ||
143 | RlvFloaterBehaviour* pSelf = (RlvFloaterBehaviour*)pParam; | ||
144 | |||
145 | std::list<LLUUID>::iterator itLookup = std::find(pSelf->m_PendingLookup.begin(), pSelf->m_PendingLookup.end(), uuid); | ||
146 | if (itLookup != pSelf->m_PendingLookup.end()) | ||
147 | pSelf->m_PendingLookup.erase(itLookup); | ||
148 | |||
149 | pSelf->refreshAll(); | ||
150 | } | ||
151 | |||
152 | // ============================================================================ | ||
diff --git a/linden/indra/newview/rlvfloaterbehaviour.h b/linden/indra/newview/rlvfloaterbehaviour.h new file mode 100644 index 0000000..1410dd5 --- /dev/null +++ b/linden/indra/newview/rlvfloaterbehaviour.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #ifndef RLV_FLOATER_BEHAVIOUR | ||
2 | #define RLV_FLOATER_BEHAVIOUR | ||
3 | |||
4 | #include "llfloater.h" | ||
5 | #include "rlvevent.h" | ||
6 | |||
7 | // ============================================================================ | ||
8 | |||
9 | class RlvFloaterBehaviour : | ||
10 | public LLFloater, | ||
11 | public LLFloaterSingleton<RlvFloaterBehaviour>, | ||
12 | public RlvBehaviourObserver | ||
13 | { | ||
14 | friend class LLUISingleton<RlvFloaterBehaviour, VisibilityPolicy<LLFloater> >; | ||
15 | public: | ||
16 | virtual ~RlvFloaterBehaviour() {} | ||
17 | |||
18 | /* | ||
19 | * LLFloater overrides | ||
20 | */ | ||
21 | public: | ||
22 | /*virtual*/ BOOL canClose(); | ||
23 | /*virtual*/ void onOpen(); | ||
24 | /*virtual*/ void onClose(bool app_quitting); | ||
25 | /*virtual*/ BOOL postBuild(); | ||
26 | |||
27 | /* | ||
28 | * RlvBehaviourObserver overrides | ||
29 | */ | ||
30 | public: | ||
31 | /*virtual*/ void changed(const RlvCommand& rlvCmd, bool fInternal); | ||
32 | |||
33 | /* | ||
34 | * Member functions | ||
35 | */ | ||
36 | public: | ||
37 | static void show(void*); | ||
38 | static void onAvatarNameLookup(const LLUUID& uuid, const std::string& strFirst, const std::string& strLast, BOOL fGroup, void* pParam); | ||
39 | protected: | ||
40 | void refreshAll(); | ||
41 | private: | ||
42 | RlvFloaterBehaviour(const LLSD& key = LLSD()); | ||
43 | |||
44 | std::list<LLUUID> m_PendingLookup; | ||
45 | }; | ||
46 | |||
47 | // ============================================================================ | ||
48 | |||
49 | #endif // RLV_FLOATER_BEHAVIOUR | ||
diff --git a/linden/indra/newview/rlvhandler.cpp b/linden/indra/newview/rlvhandler.cpp new file mode 100644 index 0000000..2915002 --- /dev/null +++ b/linden/indra/newview/rlvhandler.cpp | |||
@@ -0,0 +1,2549 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | ||
2 | #include "llagent.h" | ||
3 | #include "lldrawpoolalpha.h" | ||
4 | #include "llfloaterbeacons.h" | ||
5 | #include "llfloaterchat.h" | ||
6 | #include "llfloaterdaycycle.h" | ||
7 | #include "llfloaterenvsettings.h" | ||
8 | #include "llfloatergodtools.h" | ||
9 | #include "llfloaterland.h" | ||
10 | #include "llfloatermap.h" | ||
11 | #include "llfloaterregioninfo.h" | ||
12 | #include "llfloatertools.h" | ||
13 | #include "llfloaterwater.h" | ||
14 | #include "llfloaterwindlight.h" | ||
15 | #include "llfloaterworldmap.h" | ||
16 | #include "llgesturemgr.h" | ||
17 | #include "llinventoryview.h" | ||
18 | #include "llstartup.h" | ||
19 | #include "llviewermenu.h" | ||
20 | #include "llviewermessage.h" | ||
21 | #include "llviewerparcelmgr.h" | ||
22 | #include "llviewerregion.h" | ||
23 | #include "llviewerwindow.h" | ||
24 | #include "llvoavatar.h" | ||
25 | #include "llworld.h" | ||
26 | #include "pipeline.h" | ||
27 | |||
28 | #include "rlvhelper.h" | ||
29 | #include "rlvevent.h" | ||
30 | #include "rlvextensions.h" | ||
31 | #include "rlvhandler.h" | ||
32 | |||
33 | // Only defined in llinventorybridge.cpp | ||
34 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
35 | #include "llinventorybridge.h" | ||
36 | void confirm_replace_attachment_rez(S32 option, void* user_data); | ||
37 | #endif | ||
38 | // Only defined in llinventorymodel.cpp | ||
39 | extern const char* NEW_CATEGORY_NAME; | ||
40 | |||
41 | // ============================================================================ | ||
42 | // Static variable initialization | ||
43 | // | ||
44 | |||
45 | BOOL RlvHandler::m_fEnabled = FALSE; | ||
46 | BOOL RlvHandler::fNoSetEnv = FALSE; | ||
47 | BOOL RlvHandler::fLegacyNaming = FALSE; | ||
48 | BOOL RlvHandler::m_fFetchStarted = FALSE; | ||
49 | BOOL RlvHandler::m_fFetchComplete = FALSE; | ||
50 | RlvMultiStringSearch RlvHandler::m_AttachLookup; | ||
51 | |||
52 | const std::string RlvHandler::cstrSharedRoot = RLV_ROOT_FOLDER; | ||
53 | |||
54 | // Keep these consistent with regular RLV | ||
55 | const std::string RlvHandler::cstrBlockedRecvIM = "*** IM blocked by your viewer"; | ||
56 | const std::string RlvHandler::cstrBlockedSendIM = "*** IM blocked by sender's viewer"; | ||
57 | const std::string RlvHandler::cstrHidden = "(Hidden)"; | ||
58 | const std::string RlvHandler::cstrHiddenParcel = "(Hidden parcel)"; | ||
59 | const std::string RlvHandler::cstrHiddenRegion = "(Hidden region)"; | ||
60 | const std::string RlvHandler::cstrMsgRecvIM = | ||
61 | "The Resident you messaged is prevented from reading your instant messages at the moment, please try again later."; | ||
62 | const std::string RlvHandler::cstrMsgTpLure = | ||
63 | "The Resident you invited is prevented from accepting teleport offers. Please try again later."; | ||
64 | |||
65 | const std::string RlvHandler::cstrAnonyms[] = | ||
66 | { | ||
67 | "A resident", "This resident", "That resident", "An individual", "This individual", "That individual", "A person", | ||
68 | "This person", "That person", "A stranger", "This stranger", "That stranger", "A human being", "This human being", | ||
69 | "That human being", "An agent", "This agent", "That agent", "A soul", "This soul", "That soul", "Somebody", | ||
70 | "Some people", "Someone", "Mysterious one", "An unknown being", "Unidentified one", "An unknown person" | ||
71 | }; | ||
72 | |||
73 | rlv_handler_t gRlvHandler; | ||
74 | |||
75 | // ============================================================================ | ||
76 | // Helper functions | ||
77 | // | ||
78 | |||
79 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Added: RLVa-0.2.0e | ||
80 | inline bool rlvIsWearingItem(const LLInventoryItem* pItem) | ||
81 | { | ||
82 | return | ||
83 | ((LLAssetType::AT_OBJECT == pItem->getType()) && (gAgent.getAvatarObject()->isWearingAttachment(pItem->getUUID()))) || | ||
84 | ((LLAssetType::AT_GESTURE == pItem->getType()) && (gGestureManager.isGestureActive(pItem->getUUID()))) || | ||
85 | (gAgent.isWearingItem(pItem->getUUID())); | ||
86 | } | ||
87 | |||
88 | // ============================================================================ | ||
89 | // Command specific helper functions | ||
90 | // | ||
91 | |||
92 | // Checked: 2009-08-04 (RLVa-1.0.1d) | Added: RLVa-1.0.1d | ||
93 | static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, std::string& strFilter) | ||
94 | { | ||
95 | boost_tokenizer tokens(strOption, boost::char_separator<char>(";", "", boost::keep_empty_tokens)); | ||
96 | boost_tokenizer::iterator itTok = tokens.begin(); | ||
97 | |||
98 | // Extract and sanity check the first token (required) which is the channel | ||
99 | if ( (itTok == tokens.end()) || (!LLStringUtil::convertToS32(*itTok, nChannel)) || (!rlvIsValidChannel(nChannel)) ) | ||
100 | return false; | ||
101 | |||
102 | // Second token (optional) is the filter | ||
103 | strFilter.clear(); | ||
104 | if (++itTok != tokens.end()) | ||
105 | { | ||
106 | strFilter = *itTok; | ||
107 | ++itTok; | ||
108 | } | ||
109 | |||
110 | return (itTok == tokens.end()); | ||
111 | } | ||
112 | |||
113 | // ============================================================================ | ||
114 | // Constructor/destructor | ||
115 | // | ||
116 | |||
117 | // Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
118 | RlvHandler::RlvHandler() | ||
119 | : m_fCanCancelTp(false), m_idCurObject(LLUUID::null), m_pCurCommand(NULL), m_pGCTimer(NULL), m_pWLSnapshot(NULL), m_pBhvrNotify(NULL) | ||
120 | { | ||
121 | // Array auto-initialization to 0 is non-standard? (Compiler warning in VC-8.0) | ||
122 | memset(m_LayersAdd, 0, sizeof(S16) * WT_COUNT); | ||
123 | memset(m_LayersRem, 0, sizeof(S16) * WT_COUNT); | ||
124 | memset(m_Behaviours, 0, sizeof(S16) * RLV_BHVR_COUNT); | ||
125 | } | ||
126 | |||
127 | // Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
128 | RlvHandler::~RlvHandler() | ||
129 | { | ||
130 | //delete m_pGCTimer; // <- deletes itself | ||
131 | delete m_pWLSnapshot; // <- delete on NULL is harmless | ||
132 | delete m_pBhvrNotify; | ||
133 | } | ||
134 | |||
135 | // ============================================================================ | ||
136 | // Attachment related functions | ||
137 | // | ||
138 | |||
139 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
140 | inline LLViewerJointAttachment* RlvHandler::getAttachPoint(const std::string& strText, bool fExact) const | ||
141 | { | ||
142 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
143 | return (pAvatar) ? get_if_there(pAvatar->mAttachmentPoints, getAttachPointIndex(strText, fExact), (LLViewerJointAttachment*)NULL) | ||
144 | : NULL; | ||
145 | } | ||
146 | |||
147 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Modified: RLVa-1.0.1b | ||
148 | LLViewerJointAttachment* RlvHandler::getAttachPoint(const LLInventoryCategory* pFolder, bool /*fStrict*/) const | ||
149 | { | ||
150 | if (!pFolder) | ||
151 | return NULL; | ||
152 | |||
153 | // RLVa-1.0.1 added support for legacy matching (See http://rlva.catznip.com/blog/2009/07/attachment-point-naming-convention/) | ||
154 | if (fLegacyNaming) | ||
155 | return getAttachPointLegacy(pFolder); | ||
156 | |||
157 | // Otherwise the only valid way to specify an attachment point in a folder name is: ^\.\(\s+attachpt\s+\) | ||
158 | std::string::size_type idxMatch; | ||
159 | std::string strAttachPt = rlvGetFirstParenthesisedText(pFolder->getName(), &idxMatch); | ||
160 | LLStringUtil::trim(strAttachPt); | ||
161 | |||
162 | return ( (1 == idxMatch) && (RLV_FOLDER_PREFIX_HIDDEN == pFolder->getName().at(0)) ) ? getAttachPoint(strAttachPt, true) : NULL; | ||
163 | } | ||
164 | |||
165 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Modified: RLVa-1.0.1b | ||
166 | LLViewerJointAttachment* RlvHandler::getAttachPoint(const LLInventoryItem* pItem, bool fStrict) const | ||
167 | { | ||
168 | // Sanity check - if it's not an object then it can't have an attachment point | ||
169 | if ( (!pItem) || (LLAssetType::AT_OBJECT != pItem->getType()) ) | ||
170 | return NULL; | ||
171 | |||
172 | // The attachment point should be placed at the end of the item's name, surrounded by parenthesis | ||
173 | // (if there is no such text then strAttachPt will be an empty string which is fine since it means we'll look at the item's parent) | ||
174 | std::string strAttachPt = rlvGetLastParenthesisedText(pItem->getName()); | ||
175 | LLStringUtil::trim(strAttachPt); | ||
176 | |||
177 | // If the item is modify : we look at the item's name first and only then at the containing folder | ||
178 | // If the item is no modify: we look at the containing folder's name first and only then at the item itself | ||
179 | LLViewerJointAttachment* pAttachPt; | ||
180 | if (pItem->getPermissions().allowModifyBy(gAgent.getID())) | ||
181 | { | ||
182 | pAttachPt = (!strAttachPt.empty()) ? getAttachPoint(strAttachPt, true) : NULL; | ||
183 | if (!pAttachPt) | ||
184 | pAttachPt = getAttachPoint(gInventory.getCategory(pItem->getParentUUID()), fStrict); | ||
185 | } | ||
186 | else | ||
187 | { | ||
188 | pAttachPt = getAttachPoint(gInventory.getCategory(pItem->getParentUUID()), fStrict); | ||
189 | if ( (!pAttachPt) && (!strAttachPt.empty()) ) | ||
190 | pAttachPt = getAttachPoint(strAttachPt, true); | ||
191 | } | ||
192 | return pAttachPt; | ||
193 | } | ||
194 | |||
195 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Added: RLVa-0.2.2a | ||
196 | S32 RlvHandler::getAttachPointIndex(const LLViewerJointAttachment* pAttachPt) const | ||
197 | { | ||
198 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
199 | if (pAvatar) | ||
200 | { | ||
201 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
202 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
203 | { | ||
204 | if (itAttach->second == pAttachPt) | ||
205 | return itAttach->first; | ||
206 | } | ||
207 | } | ||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Added: RLVa-1.0.1b | ||
212 | LLViewerJointAttachment* RlvHandler::getAttachPointLegacy(const LLInventoryCategory* pFolder) const | ||
213 | { | ||
214 | // Hopefully some day this can just be deprecated (see http://rlva.catznip.com/blog/2009/07/attachment-point-naming-convention/) | ||
215 | if ( (!pFolder) || (pFolder->getName().empty()) ) | ||
216 | return NULL; | ||
217 | |||
218 | // Check for a (...) block *somewhere* in the name | ||
219 | std::string::size_type idxMatch; | ||
220 | std::string strAttachPt = rlvGetFirstParenthesisedText(pFolder->getName(), &idxMatch); | ||
221 | if (!strAttachPt.empty()) | ||
222 | { | ||
223 | // Could be "(attachpt)", ".(attachpt)" or "Folder name (attachpt)" | ||
224 | if ( (0 != idxMatch) && ((1 != idxMatch) || (RLV_FOLDER_PREFIX_HIDDEN == pFolder->getName().at(0)) ) && // No '(' or '.(' start | ||
225 | (idxMatch + strAttachPt.length() + 1 != pFolder->getName().length()) ) // or there's extra text | ||
226 | { | ||
227 | // It's definitely not one of the first two so assume it's the last form (in which case we need the last paranthesised block) | ||
228 | strAttachPt = rlvGetLastParenthesisedText(pFolder->getName()); | ||
229 | } | ||
230 | } | ||
231 | else | ||
232 | { | ||
233 | // There's no paranthesised block, but it could still be "attachpt" or ".attachpt" (just strip away the '.' from the last one) | ||
234 | strAttachPt = pFolder->getName(); | ||
235 | if (RLV_FOLDER_PREFIX_HIDDEN == strAttachPt[0]) | ||
236 | strAttachPt.erase(0, 1); | ||
237 | } | ||
238 | return getAttachPoint(strAttachPt, true); | ||
239 | } | ||
240 | |||
241 | bool RlvHandler::hasLockedHUD() const | ||
242 | { | ||
243 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
244 | if (!pAvatar) | ||
245 | return false; | ||
246 | |||
247 | LLViewerJointAttachment* pAttachPt; | ||
248 | for (rlv_detach_map_t::const_iterator itAttachPt = m_Attachments.begin(); itAttachPt != m_Attachments.end(); ++itAttachPt) | ||
249 | { | ||
250 | pAttachPt = get_if_there(pAvatar->mAttachmentPoints, (S32)itAttachPt->first, (LLViewerJointAttachment*)NULL); | ||
251 | if ( (pAttachPt) && (pAttachPt->getIsHUDAttachment()) ) | ||
252 | return true; // At least one of our locked attachments is a HUD | ||
253 | } | ||
254 | return false; // None of our locked attachments is a HUD | ||
255 | } | ||
256 | |||
257 | bool RlvHandler::isDetachable(const LLInventoryItem* pItem) const | ||
258 | { | ||
259 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
260 | return ( (pItem) && (pAvatar) ) ? isDetachable(pAvatar->getWornAttachment(pItem->getUUID())) : true; | ||
261 | } | ||
262 | |||
263 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | ||
264 | bool RlvHandler::isDetachableExcept(S32 idxAttachPt, LLViewerObject *pObj) const | ||
265 | { | ||
266 | // Loop over every object that marked the specific attachment point undetachable (but ignore pObj and any of its children) | ||
267 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | ||
268 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
269 | { | ||
270 | LLViewerObject* pTempObj = gObjectList.findObject(itAttach->second); | ||
271 | if ( (!pTempObj) || (pTempObj->getRootEdit()->getID() != pObj->getID()) ) | ||
272 | return false; | ||
273 | } | ||
274 | return true; | ||
275 | } | ||
276 | |||
277 | // Checked: 2009-05-31 (RLVa-0.2.0e) | Modified: RLVa-0.2.0e | ||
278 | bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable) | ||
279 | { | ||
280 | // Sanity check - make sure it's an object we know about | ||
281 | rlv_object_map_t::const_iterator itObj = m_Objects.find(idRlvObj); | ||
282 | if ( (itObj == m_Objects.end()) || (!idxAttachPt) ) | ||
283 | return false; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) | ||
284 | |||
285 | if (!fDetachable) | ||
286 | { | ||
287 | // Sanity check - make sure it's not already marked undetachable by this object (NOTE: m_Attachments is a *multimap*, not a map) | ||
288 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | ||
289 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
290 | { | ||
291 | if (itObj->second.m_UUID == itAttach->second) | ||
292 | return false; | ||
293 | } | ||
294 | |||
295 | m_Attachments.insert(std::pair<S32, LLUUID>(idxAttachPt, itObj->second.m_UUID)); | ||
296 | return true; | ||
297 | } | ||
298 | else | ||
299 | { | ||
300 | // NOTE: m_Attachments is a *multimap*, not a map | ||
301 | for (rlv_detach_map_t::iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | ||
302 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
303 | { | ||
304 | if (itObj->second.m_UUID == itAttach->second) | ||
305 | { | ||
306 | m_Attachments.erase(itAttach); | ||
307 | return true; | ||
308 | } | ||
309 | } | ||
310 | } | ||
311 | return false; // Fall-through for (fDetachable == TRUE) - if the object wasn't undetachable then we consider it a failure | ||
312 | } | ||
313 | |||
314 | |||
315 | |||
316 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
317 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
318 | bool RlvHandler::isStrippable(const LLUUID& idItem) const | ||
319 | { | ||
320 | // An item is exempt from @detach or @remoutfit if: | ||
321 | // - its name contains "nostrip" (anywhere in the name) | ||
322 | // - its parent folder contains "nostrip" (anywhere in the name) | ||
323 | if (idItem.notNull()) | ||
324 | { | ||
325 | LLViewerInventoryItem* pItem = gInventory.getItem(idItem); | ||
326 | if (pItem) | ||
327 | { | ||
328 | if (-1 != pItem->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) | ||
329 | return false; | ||
330 | |||
331 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); | ||
332 | if ( (pFolder) && (-1 != pFolder->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) ) | ||
333 | return false; | ||
334 | } | ||
335 | } | ||
336 | return true; | ||
337 | } | ||
338 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
339 | |||
340 | // ============================================================================ | ||
341 | // Behaviour related functions | ||
342 | // | ||
343 | |||
344 | bool RlvHandler::hasBehaviourExcept(const std::string& strBehaviour, const LLUUID& idObj) const | ||
345 | { | ||
346 | for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
347 | if ( (idObj != itObj->second.m_UUID) && (itObj->second.hasBehaviour(strBehaviour)) ) | ||
348 | return true; | ||
349 | return false; | ||
350 | } | ||
351 | |||
352 | bool RlvHandler::hasBehaviourExcept(ERlvBehaviour eBehaviour, const std::string& strOption, const LLUUID& idObj) const | ||
353 | { | ||
354 | for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
355 | if ( (idObj != itObj->second.m_UUID) && (itObj->second.hasBehaviour(eBehaviour, strOption)) ) | ||
356 | return true; | ||
357 | return false; | ||
358 | } | ||
359 | |||
360 | bool RlvHandler::hasBehaviourExcept(const std::string& strBehaviour, const std::string& strOption, const LLUUID& idObj) const | ||
361 | { | ||
362 | for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
363 | if ( (idObj != itObj->second.m_UUID) && (itObj->second.hasBehaviour(strBehaviour, strOption)) ) | ||
364 | return true; | ||
365 | return false; | ||
366 | } | ||
367 | |||
368 | // ============================================================================ | ||
369 | // Command processing functions | ||
370 | // | ||
371 | |||
372 | // Checked: 2009-06-03 (RLVa-0.2.0h) | ||
373 | void RlvHandler::addBehaviourObserver(RlvBehaviourObserver* pBhvrObserver) | ||
374 | { | ||
375 | std::list<RlvBehaviourObserver*>::iterator itBhvrObserver = std::find(m_BhvrObservers.begin(), m_BhvrObservers.end(), pBhvrObserver); | ||
376 | if (itBhvrObserver == m_BhvrObservers.end()) | ||
377 | m_BhvrObservers.push_back(pBhvrObserver); | ||
378 | } | ||
379 | |||
380 | // Checked: 2009-06-03 (RLVa-0.2.0h) | ||
381 | void RlvHandler::removeBehaviourObserver(RlvBehaviourObserver* pBhvrObserver) | ||
382 | { | ||
383 | std::list<RlvBehaviourObserver*>::iterator itBhvrObserver = std::find(m_BhvrObservers.begin(), m_BhvrObservers.end(), pBhvrObserver); | ||
384 | if (itBhvrObserver != m_BhvrObservers.end()) | ||
385 | m_BhvrObservers.erase(itBhvrObserver); | ||
386 | } | ||
387 | |||
388 | // Checked: 2009-06-03 (RLVa-0.2.0h) | ||
389 | void RlvHandler::notifyBehaviourObservers(const RlvCommand& rlvCmd, bool fInternal) | ||
390 | { | ||
391 | for (std::list<RlvBehaviourObserver*>::const_iterator itBhvrObserver = m_BhvrObservers.begin(); | ||
392 | itBhvrObserver != m_BhvrObservers.end(); ++itBhvrObserver) | ||
393 | { | ||
394 | (*itBhvrObserver)->changed(rlvCmd, fInternal); | ||
395 | } | ||
396 | } | ||
397 | |||
398 | // Checked: | ||
399 | BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, bool fFromObj) | ||
400 | { | ||
401 | #ifdef RLV_DEBUG | ||
402 | RLV_INFOS << "[" << uuid << "]: " << strCmd << LL_ENDL; | ||
403 | #endif // RLV_DEBUG | ||
404 | |||
405 | RlvCommand rlvCmd(strCmd); | ||
406 | if (!rlvCmd.isValid()) | ||
407 | { | ||
408 | #ifdef RLV_DEBUG | ||
409 | RLV_INFOS << "\t-> invalid command: " << strCmd << LL_ENDL; | ||
410 | #endif // RLV_DEBUG | ||
411 | return FALSE; | ||
412 | } | ||
413 | m_pCurCommand = &rlvCmd; m_idCurObject = uuid; | ||
414 | |||
415 | BOOL fRet = FALSE; | ||
416 | switch (rlvCmd.getParamType()) | ||
417 | { | ||
418 | case RLV_TYPE_ADD: // Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h | ||
419 | { | ||
420 | if ( (m_Behaviours[rlvCmd.getBehaviourType()]) && | ||
421 | ( (RLV_BHVR_SETDEBUG == rlvCmd.getBehaviourType()) || (RLV_BHVR_SETENV == rlvCmd.getBehaviourType()) ) ) | ||
422 | { | ||
423 | // Some restrictions can only be held by one single object to avoid deadlocks | ||
424 | #ifdef RLV_DEBUG | ||
425 | RLV_INFOS << "\t- " << rlvCmd.getBehaviour() << " is already set by another object => discarding" << LL_ENDL; | ||
426 | #endif // RLV_DEBUG | ||
427 | break; | ||
428 | } | ||
429 | |||
430 | rlv_object_map_t::iterator itObj = m_Objects.find(uuid); | ||
431 | if (itObj != m_Objects.end()) | ||
432 | { | ||
433 | RlvObject& rlvObj = itObj->second; | ||
434 | fRet = rlvObj.addCommand(rlvCmd); | ||
435 | } | ||
436 | else | ||
437 | { | ||
438 | RlvObject rlvObj(uuid); | ||
439 | fRet = rlvObj.addCommand(rlvCmd); | ||
440 | m_Objects.insert(std::pair<LLUUID, RlvObject>(uuid, rlvObj)); | ||
441 | } | ||
442 | |||
443 | #ifdef RLV_DEBUG | ||
444 | RLV_INFOS << "\t- " << ( (fRet) ? "adding behaviour" : "skipping duplicate") << LL_ENDL; | ||
445 | #endif // RLV_DEBUG | ||
446 | |||
447 | if (fRet) { // If FALSE then this was a duplicate, there's no need to handle those | ||
448 | if (!m_pGCTimer) | ||
449 | m_pGCTimer = new RlvGCTimer(); | ||
450 | processAddCommand(uuid, rlvCmd); | ||
451 | notifyBehaviourObservers(rlvCmd, !fFromObj); | ||
452 | } | ||
453 | } | ||
454 | break; | ||
455 | case RLV_TYPE_REMOVE: // Checked: | ||
456 | { | ||
457 | rlv_object_map_t::iterator itObj = m_Objects.find(uuid); | ||
458 | if (itObj != m_Objects.end()) | ||
459 | fRet = itObj->second.removeCommand(rlvCmd); | ||
460 | |||
461 | #ifdef RLV_DEBUG | ||
462 | RLV_INFOS << "\t- " << ( (fRet) ? "removing behaviour" | ||
463 | : "skipping remove (unset behaviour or unknown object)") << LL_ENDL; | ||
464 | #endif // RLV_DEBUG | ||
465 | |||
466 | if (fRet) { // Don't handle non-sensical removes | ||
467 | processRemoveCommand(uuid, rlvCmd); | ||
468 | notifyBehaviourObservers(rlvCmd, !fFromObj); | ||
469 | |||
470 | if (0 == itObj->second.m_Commands.size()) | ||
471 | { | ||
472 | #ifdef RLV_DEBUG | ||
473 | RLV_INFOS << "\t- command list empty => removing " << uuid << LL_ENDL; | ||
474 | #endif // RLV_DEBUG | ||
475 | m_Objects.erase(itObj); | ||
476 | } | ||
477 | } | ||
478 | } | ||
479 | break; | ||
480 | case RLV_TYPE_FORCE: // Checked: | ||
481 | fRet = processForceCommand(uuid, rlvCmd); | ||
482 | break; | ||
483 | case RLV_TYPE_REPLY: // Checked: | ||
484 | fRet = processReplyCommand(uuid, rlvCmd); | ||
485 | break; | ||
486 | case RLV_TYPE_UNKNOWN: // Checked: | ||
487 | { | ||
488 | if ("clear" == rlvCmd.getBehaviour()) | ||
489 | { | ||
490 | const std::string& strFilter = rlvCmd.getParam(); std::string strCmdRem; | ||
491 | |||
492 | rlv_object_map_t::const_iterator itObj = m_Objects.find(uuid); | ||
493 | if (itObj != m_Objects.end()) // No sense in @clear'ing if we don't have any commands for this object | ||
494 | { | ||
495 | const RlvObject& rlvObj = itObj->second; bool fContinue = true; | ||
496 | for (rlv_command_list_t::const_iterator itCmd = rlvObj.m_Commands.begin(), itCurCmd; | ||
497 | ((fContinue) && (itCmd != rlvObj.m_Commands.end())); ) | ||
498 | { | ||
499 | itCurCmd = itCmd++; // Point itCmd ahead so it won't get invalidated if/when we erase a command | ||
500 | |||
501 | const RlvCommand& rlvCmdRem = *itCurCmd; | ||
502 | if ( (strFilter.empty()) || (-1 != rlvCmdRem.asString().find(strFilter)) ) | ||
503 | { | ||
504 | fContinue = (rlvObj.m_Commands.size() > 1); // rlvObj will become invalid once we remove the last command | ||
505 | strCmdRem = rlvCmdRem.getBehaviour() + ":" + rlvCmdRem.getOption() + "=y"; | ||
506 | processCommand(uuid, strCmdRem, false); | ||
507 | } | ||
508 | } | ||
509 | fRet = TRUE; | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | break; | ||
514 | #ifdef LL_GNUC | ||
515 | default: | ||
516 | break; | ||
517 | #endif // LL_GNUC | ||
518 | } | ||
519 | |||
520 | #ifdef RLV_DEBUG | ||
521 | RLV_INFOS << "\t--> command " << ((fRet) ? "succeeded" : "failed") << LL_ENDL; | ||
522 | #endif // RLV_DEBUG | ||
523 | |||
524 | m_pCurCommand = NULL; m_idCurObject.setNull(); | ||
525 | return fRet; | ||
526 | } | ||
527 | |||
528 | BOOL RlvHandler::processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) | ||
529 | { | ||
530 | // NOTE: - at this point the command has already been added to the corresponding RlvObject instance | ||
531 | // - the object's UUID may or may not exist in gObjectList (see handling of @detach=n) | ||
532 | |||
533 | ERlvBehaviour eBehaviour = rlvCmd.getBehaviourType(); | ||
534 | const std::string& strOption = rlvCmd.getOption(); | ||
535 | |||
536 | if ( (RLV_BHVR_UNKNOWN != eBehaviour) && (strOption.empty()) ) | ||
537 | m_Behaviours[eBehaviour]++; | ||
538 | |||
539 | switch (eBehaviour) | ||
540 | { | ||
541 | case RLV_BHVR_DETACH: // @detach[:<option>]=n - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
542 | { | ||
543 | LLViewerObject* pObj = NULL; S32 idxAttachPt = 0; | ||
544 | if (strOption.empty()) // @detach=n | ||
545 | { | ||
546 | // If the object rezzed before we received @detach=n from it then we can just do our thing here | ||
547 | // If the object hasn't rezzed yet then we need to wait until RlvHandler::onAttach() | ||
548 | // If @detach=n were possible for non-attachments another copy/paste would be needed in RlvHandler::onGC() | ||
549 | if ((pObj = gObjectList.findObject(uuid)) != NULL) | ||
550 | setDetachable(pObj, uuid, false); | ||
551 | } | ||
552 | else if ((idxAttachPt = getAttachPointIndex(strOption, true)) != 0) // @detach:<attachpt>=n | ||
553 | { | ||
554 | setDetachable(idxAttachPt, uuid, false); | ||
555 | |||
556 | // (See below) | ||
557 | LLViewerJointAttachment* pAttachPt = getAttachPoint(strOption, true); | ||
558 | if (pAttachPt) | ||
559 | pObj = pAttachPt->getObject(); | ||
560 | } | ||
561 | |||
562 | // When at least one HUD attachment is locked we want to make sure they're all visible (ie prevent hiding a blindfold HUD) | ||
563 | // However, since @detach:<attachpt>=n might lock a HUD attachment point that doesn't currently have an object we | ||
564 | // have to do this here *and* in RlvHandler::onAttach() | ||
565 | if ( (pObj) && (pObj->isHUDAttachment()) ) | ||
566 | LLPipeline::sShowHUDAttachments = TRUE; | ||
567 | } | ||
568 | break; | ||
569 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
570 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a | ||
571 | { | ||
572 | if (!strOption.empty()) | ||
573 | m_Behaviours[eBehaviour]++; // @redirchat and @rediremote don't have an optionless version so keep track of it here | ||
574 | else | ||
575 | m_Behaviours[eBehaviour]--; // @redirchat=n and @rediremote=n are undefined, don't keep track of them | ||
576 | } | ||
577 | break; | ||
578 | case RLV_BHVR_SHOWWORLDMAP: // @showworldmap=n - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
579 | { | ||
580 | // Simulate clicking the Map button [see LLToolBar::onClickMap()] | ||
581 | if (gFloaterWorldMap->getVisible()) | ||
582 | LLFloaterWorldMap::toggle(NULL); | ||
583 | } | ||
584 | break; | ||
585 | case RLV_BHVR_SHOWMINIMAP: // @showminimap=n - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
586 | { | ||
587 | // Simulate clicking the Minimap button [see LLToolBar::onClickRadar()] | ||
588 | if (LLFloaterMap::instanceVisible()) | ||
589 | LLFloaterMap::hideInstance(); | ||
590 | } | ||
591 | break; | ||
592 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
593 | case RLV_BHVR_TPLOC: // @tploc=n - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
594 | case RLV_BHVR_UNSIT: // @unsit=n - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
595 | { | ||
596 | if (strOption.empty()) | ||
597 | RlvSettings::updateLoginLastLocation(); | ||
598 | } | ||
599 | break; | ||
600 | #endif // RLV_EXTENSION_STARTLOCATION | ||
601 | case RLV_BHVR_EDIT: // @edit=n - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
602 | { | ||
603 | // Turn off "View / Highlight Transparent" | ||
604 | LLDrawPoolAlpha::sShowDebugAlpha = FALSE; | ||
605 | |||
606 | // Close the Beacons floater if it's open | ||
607 | if (LLFloaterBeacons::instanceVisible()) | ||
608 | LLFloaterBeacons::toggleInstance(); | ||
609 | |||
610 | // Get rid of the build floater if it's open [copy/paste from toggle_build_mode()] | ||
611 | if (gFloaterTools->getVisible()) | ||
612 | { | ||
613 | gAgent.resetView(FALSE); | ||
614 | gFloaterTools->close(); | ||
615 | gViewerWindow->showCursor(); | ||
616 | } | ||
617 | } | ||
618 | break; | ||
619 | case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
620 | case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
621 | { | ||
622 | S16* pLayers = (eBehaviour == RLV_BHVR_ADDOUTFIT) ? m_LayersAdd : m_LayersRem; | ||
623 | |||
624 | if (strOption.empty()) | ||
625 | { | ||
626 | for (int idx = 0; idx < WT_COUNT; idx++) | ||
627 | pLayers[idx]++; | ||
628 | } | ||
629 | else | ||
630 | { | ||
631 | EWearableType type = LLWearable::typeNameToType(strOption); | ||
632 | if (WT_INVALID != type) | ||
633 | { | ||
634 | pLayers[type]++; | ||
635 | m_Behaviours[eBehaviour]++; | ||
636 | } | ||
637 | } | ||
638 | } | ||
639 | break; | ||
640 | case RLV_BHVR_SHOWINV: // @showinv=n - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | ||
641 | { | ||
642 | // Close all open inventory windows | ||
643 | LLInventoryView::closeAll(); | ||
644 | } | ||
645 | break; | ||
646 | case RLV_BHVR_SHOWLOC: // @showloc=n - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
647 | { | ||
648 | // If we're the first @showloc=n restriction refresh all object text so we can filter it if necessary | ||
649 | if (1 == m_Behaviours[RLV_BHVR_SHOWLOC]) | ||
650 | LLHUDText::refreshAllObjectText(); | ||
651 | |||
652 | // Close the "About Land" floater if it's currently visible | ||
653 | if (LLFloaterLand::instanceVisible()) | ||
654 | LLFloaterLand::hideInstance(); | ||
655 | |||
656 | // Close the "Estate Tools" floater is it's currently visible | ||
657 | if (LLFloaterRegionInfo::instanceVisible()) | ||
658 | LLFloaterRegionInfo::hideInstance(); | ||
659 | |||
660 | // NOTE: we should close the "God Tools" floater as well, but since calling LLFloaterGodTools::instance() always | ||
661 | // creates a new instance of the floater and since it's very unlikely to be open it's just better not to | ||
662 | } | ||
663 | break; | ||
664 | case RLV_BHVR_SHOWNAMES: // @shownames=n - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
665 | { | ||
666 | // If we're the first @shownames=n restriction refresh all object text so we can filter it if necessary | ||
667 | if (1 == m_Behaviours[RLV_BHVR_SHOWNAMES]) | ||
668 | LLHUDText::refreshAllObjectText(); | ||
669 | |||
670 | // Close the "Active Speakers" panel if it's currently visible | ||
671 | LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false); | ||
672 | } | ||
673 | break; | ||
674 | case RLV_BHVR_FLY: // @fly=n - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
675 | { | ||
676 | // If currently flying, simulate clicking the Fly button [see LLToolBar::onClickFly()] | ||
677 | if (gAgent.getFlying()) | ||
678 | gAgent.toggleFlying(); | ||
679 | } | ||
680 | break; | ||
681 | case RLV_BHVR_SETENV: // @setenv=n - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0a | ||
682 | { | ||
683 | if (!fNoSetEnv) | ||
684 | { | ||
685 | // Only close the floaters if their instance exists and they're actually visible | ||
686 | if ( (LLFloaterEnvSettings::isOpen()) && (LLFloaterEnvSettings::instance()->getVisible()) ) | ||
687 | LLFloaterEnvSettings::instance()->close(); | ||
688 | if ( (LLFloaterWindLight::isOpen()) && (LLFloaterWindLight::instance()->getVisible()) ) | ||
689 | LLFloaterWindLight::instance()->close(); | ||
690 | if ( (LLFloaterWater::isOpen()) && (LLFloaterWater::instance()->getVisible()) ) | ||
691 | LLFloaterWater::instance()->close(); | ||
692 | if ( (LLFloaterDayCycle::isOpen()) && (LLFloaterDayCycle::instance()->getVisible()) ) | ||
693 | LLFloaterDayCycle::instance()->close(); | ||
694 | |||
695 | // Save the current WindLight params so we can restore them on @setenv=y | ||
696 | if (m_pWLSnapshot) | ||
697 | { | ||
698 | RLV_ERRS << "m_pWLSnapshot != NULL" << LL_ENDL; // Safety net in case we set @setenv=n for more than 1 object | ||
699 | delete m_pWLSnapshot; | ||
700 | } | ||
701 | m_pWLSnapshot = RlvWLSnapshot::takeSnapshot(); | ||
702 | } | ||
703 | } | ||
704 | break; | ||
705 | case RLV_BHVR_SHOWHOVERTEXTALL: // @showhovertextal=n - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
706 | case RLV_BHVR_SHOWHOVERTEXTWORLD: // @showhovertextworld=n - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
707 | case RLV_BHVR_SHOWHOVERTEXTHUD: // @showhovertexthud=n - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
708 | { | ||
709 | // Refresh all hover text (LLHUDText::setStringUTF8() will decide what needs clearing and what doesn't) | ||
710 | LLHUDText::refreshAllObjectText(); | ||
711 | } | ||
712 | break; | ||
713 | case RLV_BHVR_SHOWHOVERTEXT: // @showhovertext:<uuid>=n - Checked: 2009-07-09 (RLVa-0.2.2a) | Modified: RLVa-1.0.0f | ||
714 | { | ||
715 | LLUUID idException(strOption); | ||
716 | if (!idException.isNull()) // If there's an option it should be a valid UUID | ||
717 | { | ||
718 | addException(eBehaviour, LLUUID(strOption)); | ||
719 | |||
720 | // Clear the object's hover text | ||
721 | LLViewerObject* pObj = gObjectList.findObject(idException); | ||
722 | if ( (pObj) && (pObj->mText.notNull()) && (!pObj->mText->getObjectText().empty()) ) | ||
723 | pObj->mText->setStringUTF8(""); | ||
724 | } | ||
725 | } | ||
726 | break; | ||
727 | case RLV_BHVR_NOTIFY: // @notify:<option>=add - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
728 | { | ||
729 | S32 nChannel; std::string strFilter; | ||
730 | if ( (!strOption.empty()) && (rlvParseNotifyOption(strOption, nChannel, strFilter)) ) | ||
731 | { | ||
732 | if (!m_pBhvrNotify) | ||
733 | addBehaviourObserver(m_pBhvrNotify = new RlvBehaviourNotifyObserver()); | ||
734 | m_pBhvrNotify->addNotify(uuid, nChannel, strFilter); | ||
735 | } | ||
736 | } | ||
737 | break; | ||
738 | case RLV_BHVR_RECVCHAT: // @recvchat:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
739 | case RLV_BHVR_RECVEMOTE: // @recvemote:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
740 | case RLV_BHVR_RECVIM: // @recvim:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
741 | case RLV_BHVR_SENDIM: // @sendim:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
742 | case RLV_BHVR_TPLURE: // @tplure:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
743 | case RLV_BHVR_ACCEPTTP: // @accepttp:<uuid>=add - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
744 | { | ||
745 | addException(eBehaviour, LLUUID(strOption)); | ||
746 | } | ||
747 | break; | ||
748 | default: | ||
749 | { | ||
750 | // Give our observers a chance to handle any command we don't | ||
751 | RlvEvent rlvEvent(uuid, rlvCmd); | ||
752 | m_Emitter.update(&RlvObserver::onAddCommand, rlvEvent); | ||
753 | } | ||
754 | break; | ||
755 | } | ||
756 | return TRUE; // Add command success/failure is decided by RlvObject::addCommand() | ||
757 | } | ||
758 | |||
759 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.1e | ||
760 | void RlvHandler::processRetainedCommands() | ||
761 | { | ||
762 | for (rlv_retained_list_t::const_iterator itCmd = m_Retained.begin(); itCmd != m_Retained.end(); ++itCmd) | ||
763 | { | ||
764 | const RlvRetainedCommand& cmd = *itCmd; | ||
765 | processCommand(cmd.idObject, cmd.strCmd, true); | ||
766 | } | ||
767 | m_Retained.clear(); | ||
768 | } | ||
769 | |||
770 | BOOL RlvHandler::processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) | ||
771 | { | ||
772 | // NOTE: - the RlvObject instance still exists at this point, but the viewer might already have removed it from its object list | ||
773 | ERlvBehaviour eBehaviour = rlvCmd.getBehaviourType(); | ||
774 | const std::string& strOption = rlvCmd.getOption(); | ||
775 | |||
776 | if ( (RLV_BHVR_UNKNOWN != eBehaviour) && (strOption.empty()) ) | ||
777 | m_Behaviours[eBehaviour]--; | ||
778 | |||
779 | switch (eBehaviour) | ||
780 | { | ||
781 | case RLV_BHVR_DETACH: // @detach[:<option>]=y - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
782 | { | ||
783 | S32 idxAttachPt; | ||
784 | if (strOption.empty()) // @detach=y | ||
785 | { | ||
786 | // The object may or may not (if it got detached) still exist so clean up the hard way | ||
787 | if (m_Objects.find(uuid) != m_Objects.end()) | ||
788 | { | ||
789 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.begin(), endAttach = m_Attachments.end(); | ||
790 | itAttach != endAttach; ++itAttach) | ||
791 | { | ||
792 | if (itAttach->second == uuid) | ||
793 | { | ||
794 | setDetachable(itAttach->first, uuid, true); // <- invalidates our iterators on return | ||
795 | break; | ||
796 | } | ||
797 | } | ||
798 | } | ||
799 | } | ||
800 | else if ((idxAttachPt = getAttachPointIndex(strOption, true))) // @detach:<attachpt>=y | ||
801 | { | ||
802 | setDetachable(idxAttachPt, uuid, true); | ||
803 | } | ||
804 | } | ||
805 | break; | ||
806 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
807 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a | ||
808 | { | ||
809 | if (!strOption.empty()) | ||
810 | m_Behaviours[eBehaviour]--; // @redirchat and @rediremote don't have an optionless version so keep track of it here | ||
811 | else | ||
812 | m_Behaviours[eBehaviour]++; // @redirchat=n and @rediremote=n are undefined, don't keep track of them | ||
813 | } | ||
814 | break; | ||
815 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
816 | case RLV_BHVR_TPLOC: // @tploc=y - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
817 | case RLV_BHVR_UNSIT: // @unsit=y - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d | ||
818 | { | ||
819 | if (strOption.empty()) | ||
820 | RlvSettings::updateLoginLastLocation(); | ||
821 | } | ||
822 | break; | ||
823 | #endif // RLV_EXTENSION_STARTLOCATION | ||
824 | case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=y - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
825 | case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=y - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
826 | { | ||
827 | S16* pLayers = (eBehaviour == RLV_BHVR_ADDOUTFIT) ? m_LayersAdd : m_LayersRem; | ||
828 | |||
829 | if (strOption.empty()) | ||
830 | { | ||
831 | for (int idx = 0; idx < WT_COUNT; idx++) | ||
832 | pLayers[idx]--; | ||
833 | } | ||
834 | else | ||
835 | { | ||
836 | EWearableType type = LLWearable::typeNameToType(strOption); | ||
837 | if (WT_INVALID != type) | ||
838 | { | ||
839 | pLayers[type]--; | ||
840 | m_Behaviours[eBehaviour]--; | ||
841 | } | ||
842 | } | ||
843 | } | ||
844 | break; | ||
845 | case RLV_BHVR_SETENV: // @setenv=y - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0h | ||
846 | { | ||
847 | if (!fNoSetEnv) | ||
848 | { | ||
849 | // Restore WindLight parameters to what they were before @setenv=n was issued | ||
850 | RlvWLSnapshot::restoreSnapshot(m_pWLSnapshot); | ||
851 | delete m_pWLSnapshot; | ||
852 | m_pWLSnapshot = NULL; | ||
853 | } | ||
854 | } | ||
855 | break; | ||
856 | case RLV_BHVR_SHOWLOC: // @showloc=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
857 | case RLV_BHVR_SHOWNAMES: // @shownames=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
858 | case RLV_BHVR_SHOWHOVERTEXTALL: // @showhovertextal=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
859 | case RLV_BHVR_SHOWHOVERTEXTWORLD: // @showhovertextworld=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
860 | case RLV_BHVR_SHOWHOVERTEXTHUD: // @showhovertexthud=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f | ||
861 | { | ||
862 | // If this was the last of any of the five restrictions we should refresh all hover text in case anything needs restoring | ||
863 | if (!m_Behaviours[eBehaviour]) | ||
864 | LLHUDText::refreshAllObjectText(); | ||
865 | } | ||
866 | break; | ||
867 | case RLV_BHVR_SHOWHOVERTEXT: // @showhovertext:<uuid>=y - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
868 | { | ||
869 | LLUUID idException(strOption); | ||
870 | if (!idException.isNull()) // If there's an option it should be a valid UUID | ||
871 | { | ||
872 | removeException(eBehaviour, LLUUID(strOption)); | ||
873 | |||
874 | // Restore the object's hover text | ||
875 | LLViewerObject* pObj = gObjectList.findObject(idException); | ||
876 | if ( (pObj) && (pObj->mText.notNull()) && (!pObj->mText->getObjectText().empty()) ) | ||
877 | pObj->mText->setStringUTF8(pObj->mText->getObjectText()); | ||
878 | } | ||
879 | } | ||
880 | break; | ||
881 | case RLV_BHVR_NOTIFY: // @notify:<option>=rem - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | ||
882 | { | ||
883 | S32 nChannel; std::string strFilter; | ||
884 | if ( (m_pBhvrNotify) && (!strOption.empty()) && (rlvParseNotifyOption(strOption, nChannel, strFilter)) ) | ||
885 | { | ||
886 | m_pBhvrNotify->removeNotify(uuid, nChannel, strFilter); | ||
887 | |||
888 | if (!m_pBhvrNotify->hasNotify()) | ||
889 | { | ||
890 | removeBehaviourObserver(m_pBhvrNotify); | ||
891 | delete m_pBhvrNotify; | ||
892 | m_pBhvrNotify = NULL; | ||
893 | } | ||
894 | } | ||
895 | } | ||
896 | break; | ||
897 | case RLV_BHVR_RECVCHAT: // @recvchat:<uuid>=rem - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
898 | case RLV_BHVR_RECVEMOTE: // @recvemote:<uui>=red - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
899 | case RLV_BHVR_RECVIM: // @recvim:<uuid>=rem - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
900 | case RLV_BHVR_SENDIM: // @sendim:<uuid>=rem - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
901 | case RLV_BHVR_TPLURE: // @recvim:<uuid>=rem - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
902 | case RLV_BHVR_ACCEPTTP: // @accepttp:<uuid>=rem - Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
903 | { | ||
904 | removeException(eBehaviour, LLUUID(strOption)); | ||
905 | } | ||
906 | break; | ||
907 | default: | ||
908 | { | ||
909 | // Give our observers a chance to handle any command we don't | ||
910 | RlvEvent rlvEvent(uuid, rlvCmd); | ||
911 | m_Emitter.update(&RlvObserver::onRemoveCommand, rlvEvent); | ||
912 | } | ||
913 | break; | ||
914 | } | ||
915 | return TRUE; // Remove commands don't fail, doesn't matter what we return here | ||
916 | } | ||
917 | |||
918 | BOOL RlvHandler::processForceCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) const | ||
919 | { | ||
920 | const std::string& strOption = rlvCmd.getOption(); | ||
921 | BOOL fHandled = TRUE; | ||
922 | |||
923 | switch (rlvCmd.getBehaviourType()) | ||
924 | { | ||
925 | case RLV_BHVR_DETACH: // @detach[:<option>]=force - Checked: | ||
926 | onForceDetach(idObj, strOption); | ||
927 | break; | ||
928 | case RLV_BHVR_REMOUTFIT: // @remoutfit:<option>=force - Checked: | ||
929 | onForceRemOutfit(idObj, strOption); | ||
930 | break; | ||
931 | case RLV_BHVR_UNSIT: // @unsit=force - Checked: 2009-06-02 (RLVa-0.2.0g) | ||
932 | { | ||
933 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
934 | if ( (pAvatar) && (pAvatar->mIsSitting) && (!hasBehaviourExcept(RLV_BHVR_UNSIT, idObj)) ) | ||
935 | { | ||
936 | // See behaviour notes on why we have to force an agent update here | ||
937 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
938 | send_agent_update(TRUE, TRUE); | ||
939 | } | ||
940 | } | ||
941 | break; | ||
942 | case RLV_BHVR_TPTO: // @tpto:<option>=force - Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-1.0.0h | ||
943 | { | ||
944 | fHandled = FALSE; | ||
945 | if ( (!strOption.empty()) && (-1 == strOption.find_first_not_of("0123456789/.")) ) | ||
946 | { | ||
947 | LLVector3d posGlobal; | ||
948 | |||
949 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
950 | boost::char_separator<char> sep("/", "", boost::keep_empty_tokens); | ||
951 | tokenizer tokens(strOption, sep); int idx = 0; | ||
952 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
953 | { | ||
954 | if (idx < 3) | ||
955 | LLStringUtil::convertToF64(*itToken, posGlobal[idx++]); | ||
956 | } | ||
957 | |||
958 | if (idx == 3) | ||
959 | { | ||
960 | gAgent.teleportViaLocation(posGlobal); | ||
961 | fHandled = TRUE; | ||
962 | } | ||
963 | } | ||
964 | } | ||
965 | break; | ||
966 | case RLV_BHVR_SIT: // @sit:<option>=force - Checked: 2009-06-02 (RLVa-0.2.0g) | ||
967 | fHandled = onForceSit(idObj, rlvCmd.getOption()); | ||
968 | break; | ||
969 | case RLV_BHVR_ADDOUTFIT: // @addoutfit:<option>=force <- synonym of @attach:<option>=force | ||
970 | case RLV_BHVR_ATTACH: // @attach:<option>=force - Checked: | ||
971 | onForceWear(rlvCmd.getOption(), true, false); // Force attach single folder | ||
972 | break; | ||
973 | case RLV_BHVR_ATTACHALL: // @attachall:<option>=force - Checked: | ||
974 | onForceWear(rlvCmd.getOption(), true, true); // Force attach nested folders | ||
975 | break; | ||
976 | case RLV_BHVR_DETACHALL: // @detachall:<option>=force - Checked: | ||
977 | onForceWear(rlvCmd.getOption(), false, true); // Force detach nested folders | ||
978 | break; | ||
979 | case RLV_BHVR_ATTACHTHIS: | ||
980 | case RLV_BHVR_ATTACHALLTHIS: | ||
981 | case RLV_BHVR_DETACHTHIS: | ||
982 | case RLV_BHVR_DETACHALLTHIS: | ||
983 | { | ||
984 | ERlvBehaviour eBehaviour = rlvCmd.getBehaviourType(); | ||
985 | std::string strReply; | ||
986 | if (onGetPath(idObj, strOption, strReply)) | ||
987 | { | ||
988 | LLStringUtil::toLower(strReply); | ||
989 | onForceWear(strReply, | ||
990 | (RLV_BHVR_ATTACHTHIS == eBehaviour) || (RLV_BHVR_ATTACHALLTHIS == eBehaviour), | ||
991 | (RLV_BHVR_ATTACHALLTHIS == eBehaviour) || (RLV_BHVR_DETACHALLTHIS == eBehaviour)); | ||
992 | } | ||
993 | } | ||
994 | break; | ||
995 | case RLV_BHVR_DETACHME: // @detachme=force - Checked: 2009-06-07 (RLVa-0.2.1c) | ||
996 | { | ||
997 | // NOTE: @detachme=force could be seen as a @detach:<attachpt>=force but RLV implements it as a "detach by UUID" | ||
998 | LLViewerObject* pObj; LLVOAvatar* pAvatar; LLViewerJointAttachment* pAttachPt; | ||
999 | if ( ((pObj = gObjectList.findObject(idObj)) != NULL) && (pObj->isAttachment()) && | ||
1000 | ((pAvatar = gAgent.getAvatarObject()) != NULL) && | ||
1001 | ((pAttachPt = pAvatar->getTargetAttachmentPoint(pObj->getRootEdit())) != NULL) ) | ||
1002 | { | ||
1003 | handle_detach_from_avatar(pAttachPt); | ||
1004 | } | ||
1005 | } | ||
1006 | break; | ||
1007 | default: | ||
1008 | { | ||
1009 | // Give our observers a chance to handle any command we don't | ||
1010 | RlvEvent rlvEvent(idObj, rlvCmd); | ||
1011 | fHandled = m_Emitter.update(&RlvObserver::onForceCommand, rlvEvent); | ||
1012 | } | ||
1013 | break; | ||
1014 | } | ||
1015 | return fHandled; // If we handled it then it'll still be TRUE; if an observer doesn't handle it'll be FALSE | ||
1016 | } | ||
1017 | |||
1018 | // Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1019 | BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const | ||
1020 | { | ||
1021 | const std::string& strOption = rlvCmd.getOption(); | ||
1022 | const std::string& strChannel = rlvCmd.getParam(); | ||
1023 | std::string strReply; | ||
1024 | |||
1025 | BOOL fHandled = TRUE; | ||
1026 | switch (rlvCmd.getBehaviourType()) | ||
1027 | { | ||
1028 | case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1029 | strReply = getVersionString(); | ||
1030 | break; | ||
1031 | case RLV_BHVR_GETOUTFIT: // @getoufit[:<layer>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
1032 | { | ||
1033 | // (Quirk: RLV 1.16.1 will execute @getoutfit=<channel> if <layer> is invalid, so we need to as well) | ||
1034 | EWearableType layerType = LLWearable::typeNameToType(strOption); | ||
1035 | |||
1036 | const EWearableType layerTypes[] = | ||
1037 | { | ||
1038 | WT_GLOVES, WT_JACKET, WT_PANTS, WT_SHIRT, WT_SHOES, WT_SKIRT, WT_SOCKS, | ||
1039 | WT_UNDERPANTS, WT_UNDERSHIRT, WT_SKIN, WT_EYES, WT_HAIR, WT_SHAPE | ||
1040 | }; | ||
1041 | |||
1042 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_FOLDING | ||
1043 | for (int idx = 0, cnt = sizeof(layerTypes) / sizeof(EWearableType); idx < cnt; idx++) | ||
1044 | { | ||
1045 | if ( (WT_INVALID == layerType) || (layerTypes[idx] == layerType) ) | ||
1046 | { | ||
1047 | // TODO-RLVa: add support for 'fHideLockedLayers' | ||
1048 | bool fWorn = (gAgent.getWearable(layerTypes[idx])) && | ||
1049 | (!isHiddenCompositeItem(gAgent.getWearableItem(layerTypes[idx]), | ||
1050 | LLWearable::typeToTypeName(layerTypes[idx]))); | ||
1051 | strReply.push_back( (fWorn) ? '1' : '0' ); | ||
1052 | } | ||
1053 | } | ||
1054 | #else | ||
1055 | for (int idx = 0, cnt = sizeof(layerTypes) / sizeof(EWearableType); idx < cnt; idx++) | ||
1056 | if ( (WT_INVALID == layerType) || (layerTypes[idx] == layerType) ) | ||
1057 | { | ||
1058 | // We never hide body parts, even if they're "locked" and we're hiding locked layers | ||
1059 | // (nor do we hide a layer if the issuing object is the only one that has this layer locked) | ||
1060 | bool fWorn = (gAgent.getWearable(layerTypes[idx])) && | ||
1061 | ( (!RlvSettings::getHideLockedLayers()) || | ||
1062 | (LLAssetType::AT_BODYPART == LLWearable::typeToAssetType(layerTypes[idx])) || | ||
1063 | ( (isRemovableExcept(layerTypes[idx], uuid)) && | ||
1064 | (isStrippable(gAgent.getWearableItem(layerTypes[idx]))) ) ); | ||
1065 | strReply.push_back( (fWorn) ? '1' : '0' ); | ||
1066 | //strReply.push_back( (gAgent.getWearable(layerTypes[idx])) ? '1' : '0' ); | ||
1067 | } | ||
1068 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING | ||
1069 | } | ||
1070 | break; | ||
1071 | case RLV_BHVR_GETATTACH: // @getattach[:<layer>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
1072 | { | ||
1073 | // If we're fetching all worn attachments then the reply should start with 0 | ||
1074 | if (strOption.empty()) | ||
1075 | strReply.push_back('0'); | ||
1076 | |||
1077 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); std::string strAttachName; | ||
1078 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
1079 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
1080 | { | ||
1081 | LLViewerJointAttachment* pAttachment = itAttach->second; | ||
1082 | if (!pAttachment) | ||
1083 | continue; | ||
1084 | |||
1085 | strAttachName = pAttachment->getName(); // Capitalized (see avatar_lad.xml) | ||
1086 | LLStringUtil::toLower(strAttachName); | ||
1087 | |||
1088 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_FOLDING | ||
1089 | if ( (strOption.empty()) || (strOption == strAttachName) ) | ||
1090 | { | ||
1091 | // TODO-RLVa: add support for 'fHideLockedAttach' | ||
1092 | bool fWorn = (pAttachment->getItemID().notNull()) && | ||
1093 | (!isHiddenCompositeItem(pAttachment->getItemID(), strAttachName)); | ||
1094 | strReply.push_back( (fWorn) ? '1' : '0' ); | ||
1095 | } | ||
1096 | #else | ||
1097 | if ( (strOption.empty()) || (strOption == strAttachName) ) | ||
1098 | { | ||
1099 | bool fWorn = (pAttachment->getItemID().notNull()) && | ||
1100 | ( (!RlvSettings::getHideLockedAttach()) || | ||
1101 | ( (isDetachable(itAttach->first)) && (isStrippable(pAttachment->getItemID())) ) ); | ||
1102 | strReply.push_back( (fWorn) ? '1' : '0' ); | ||
1103 | //strReply.push_back( (pAttachment->getItemID().notNull()) ? '1' : '0' ); | ||
1104 | } | ||
1105 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING | ||
1106 | } | ||
1107 | } | ||
1108 | break; | ||
1109 | case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1110 | { | ||
1111 | // NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set | ||
1112 | rlv_object_map_t::const_iterator itObj = m_Objects.find(uuid); | ||
1113 | if (itObj != m_Objects.end()) | ||
1114 | { | ||
1115 | std::string strObjStatus = itObj->second.getStatusString(strOption); | ||
1116 | if (!strObjStatus.empty()) | ||
1117 | { | ||
1118 | strReply.push_back('/'); | ||
1119 | strReply += strObjStatus; | ||
1120 | } | ||
1121 | } | ||
1122 | } | ||
1123 | break; | ||
1124 | case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1125 | { | ||
1126 | // NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set | ||
1127 | std::string strObjStatus; | ||
1128 | for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
1129 | { | ||
1130 | strObjStatus = itObj->second.getStatusString(strOption); | ||
1131 | if (!strObjStatus.empty()) | ||
1132 | { | ||
1133 | strReply.push_back('/'); | ||
1134 | strReply += strObjStatus; | ||
1135 | } | ||
1136 | } | ||
1137 | } | ||
1138 | break; | ||
1139 | case RLV_BHVR_GETINV: // @getinv[:<path>]=<channel> - Checked: 2009-07-28 (RLVa-1.0.1b) | Modified: RLVa-1.0.1b | ||
1140 | { | ||
1141 | LLViewerInventoryCategory* pFolder = getSharedFolder(strOption); | ||
1142 | if (pFolder) | ||
1143 | { | ||
1144 | LLInventoryModel::cat_array_t* pFolders; | ||
1145 | LLInventoryModel::item_array_t* pItems; | ||
1146 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
1147 | |||
1148 | if (pFolders) | ||
1149 | { | ||
1150 | for (S32 idxFolder = 0, cntFolder = pFolders->count(); idxFolder < cntFolder; idxFolder++) | ||
1151 | { | ||
1152 | const std::string& strFolder = pFolders->get(idxFolder)->getName(); | ||
1153 | if ( (!strFolder.empty()) && (RLV_FOLDER_PREFIX_HIDDEN != strFolder[0]) && | ||
1154 | (!isFoldedFolder(pFolders->get(idxFolder).get(), true)) ) | ||
1155 | { | ||
1156 | if (!strReply.empty()) | ||
1157 | strReply.push_back(','); | ||
1158 | strReply += strFolder; | ||
1159 | } | ||
1160 | } | ||
1161 | } | ||
1162 | } | ||
1163 | } | ||
1164 | break; | ||
1165 | case RLV_BHVR_GETINVWORN: // @getinvworn[:path]=<channel> - Checked: | ||
1166 | onGetInvWorn(rlvCmd.getOption(), strReply); | ||
1167 | break; | ||
1168 | case RLV_BHVR_FINDFOLDER: // @findfolder:<criteria>=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1169 | { | ||
1170 | // COMPAT-RLV: RLV 1.16.1 returns the first random folder it finds (probably tries to match "" to a folder name?) | ||
1171 | // (just going to stick with what's there for now... no option => no folder) | ||
1172 | LLInventoryModel::cat_array_t folders; | ||
1173 | if ( (!strOption.empty()) && (findSharedFolders(strOption, folders)) ) | ||
1174 | { | ||
1175 | // We need to return an "in depth" result so whoever has the most '/' is our lucky winner | ||
1176 | int maxSlashes = 0, curSlashes; std::string strFolderName; | ||
1177 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) | ||
1178 | { | ||
1179 | strFolderName = getSharedPath(folders.get(idxFolder)); | ||
1180 | |||
1181 | curSlashes = std::count(strFolderName.begin(), strFolderName.end(), '/'); | ||
1182 | if (curSlashes > maxSlashes) | ||
1183 | { | ||
1184 | maxSlashes = curSlashes; | ||
1185 | strReply = strFolderName; | ||
1186 | } | ||
1187 | } | ||
1188 | } | ||
1189 | } | ||
1190 | break; | ||
1191 | #ifdef RLV_EXTENSION_CMD_FINDFOLDERS | ||
1192 | case RLV_BHVR_FINDFOLDERS: // @findfolders:<criteria>=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | Added: RLVa-0.2.0b | ||
1193 | { | ||
1194 | LLInventoryModel::cat_array_t folders; | ||
1195 | if ( (!strOption.empty()) && (findSharedFolders(strOption, folders)) ) | ||
1196 | { | ||
1197 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) | ||
1198 | { | ||
1199 | if (!strReply.empty()) | ||
1200 | strReply.push_back(','); | ||
1201 | strReply += getSharedPath(folders.get(idxFolder)); | ||
1202 | } | ||
1203 | } | ||
1204 | } | ||
1205 | break; | ||
1206 | #endif // RLV_EXTENSION_CMD_FINDFOLDERS | ||
1207 | case RLV_BHVR_GETPATH: // @getpath[:<option>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1208 | onGetPath(uuid, rlvCmd.getOption(), strReply); | ||
1209 | break; | ||
1210 | case RLV_BHVR_GETSITID: // @getsitid=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1211 | { | ||
1212 | // (Quirk: RLV 1.16.1 returns a NULL uuid if we're not sitting) | ||
1213 | LLVOAvatar* pAvatarObj = gAgent.getAvatarObject(); LLUUID uuid; | ||
1214 | if ( (pAvatarObj) && (pAvatarObj->mIsSitting) ) | ||
1215 | { | ||
1216 | // LLVOAvatar inherits from 2 classes so make sure we get the right vfptr | ||
1217 | LLViewerObject* pAvatar = dynamic_cast<LLViewerObject*>(pAvatarObj), *pParent; | ||
1218 | // (If there is a parent, we need to upcast it from LLXform to LLViewerObject to get its UUID) | ||
1219 | if ( (pAvatar) && ((pParent = static_cast<LLViewerObject*>(pAvatar->getRoot())) != pAvatar) ) | ||
1220 | uuid = pParent->getID(); | ||
1221 | } | ||
1222 | strReply = uuid.asString(); | ||
1223 | } | ||
1224 | break; | ||
1225 | default: | ||
1226 | { | ||
1227 | // Give our observers a chance to handle any command we don't | ||
1228 | RlvEvent rlvEvent(uuid, rlvCmd); | ||
1229 | return m_Emitter.update(&RlvObserver::onReplyCommand, rlvEvent); | ||
1230 | } | ||
1231 | break; | ||
1232 | } | ||
1233 | |||
1234 | if (fHandled) | ||
1235 | rlvSendChatReply(strChannel, strReply); | ||
1236 | return fHandled; | ||
1237 | } | ||
1238 | |||
1239 | // ============================================================================ | ||
1240 | // House keeping (see debug notes for test methodology, test script and last run) | ||
1241 | // | ||
1242 | |||
1243 | void RlvHandler::initLookupTables() | ||
1244 | { | ||
1245 | static bool fInitialized = false; | ||
1246 | if (!fInitialized) | ||
1247 | { | ||
1248 | // Initialize the attachment name lookup table | ||
1249 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
1250 | if (pAvatar) | ||
1251 | { | ||
1252 | std::string strAttachPtName; | ||
1253 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
1254 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
1255 | { | ||
1256 | LLViewerJointAttachment* pAttachPt = itAttach->second; | ||
1257 | if (pAttachPt) | ||
1258 | { | ||
1259 | strAttachPtName = pAttachPt->getName(); | ||
1260 | LLStringUtil::toLower(strAttachPtName); | ||
1261 | m_AttachLookup.addKeyword(strAttachPtName, itAttach->first); | ||
1262 | } | ||
1263 | } | ||
1264 | fInitialized = true; | ||
1265 | } | ||
1266 | } | ||
1267 | } | ||
1268 | |||
1269 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Modified: RLVa-1.0.1h | ||
1270 | void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | ||
1271 | { | ||
1272 | // Sanity check - LLVOAvatar::attachObject() should call us *after* calling LLViewerJointAttachment::addObject() | ||
1273 | LLViewerObject* pObj = pAttachPt->getObject(); | ||
1274 | S32 idxAttachPt = getAttachPointIndex(pObj); // getAttachPointIndex() has a NULL pointer check so this is safe | ||
1275 | if ( (!pObj) || (!idxAttachPt) ) | ||
1276 | { | ||
1277 | RLV_ERRS << "pAttachPt->getObject() == NULL" << LL_ENDL; | ||
1278 | return; | ||
1279 | } | ||
1280 | |||
1281 | // Check if this attachment point has a pending "reattach-on-detach" | ||
1282 | rlv_reattach_map_t::iterator itReattach = m_AttachPending.find(idxAttachPt); | ||
1283 | if (itReattach != m_AttachPending.end()) | ||
1284 | { | ||
1285 | if (itReattach->second == pAttachPt->getItemID()) | ||
1286 | { | ||
1287 | RLV_INFOS << "Reattached " << pAttachPt->getItemID().asString() << " to " << idxAttachPt << LL_ENDL; | ||
1288 | m_AttachPending.erase(itReattach); | ||
1289 | } | ||
1290 | } | ||
1291 | else if ( (fFullyLoaded) && (!isDetachableExcept(idxAttachPt, pObj)) ) | ||
1292 | { | ||
1293 | // We're fully loaded with no pending reattach on this attach point but it's "undetachable" -> force detach the new attachment | ||
1294 | |||
1295 | // Assertion: the only way the attachment point could be locked at this point is if some object locked it with @detach:attachpt=n | ||
1296 | // - previous attachments on this attachment point might have issued @detach=n but those were all cleaned up at detach | ||
1297 | // - the new attachment might have issued @detach=n but that won't actually lock down the attachment point until further down | ||
1298 | // NOTE 1: "some object" may no longer exist if it was not an attachment and the GC hasn't cleaned it up yet (informative) | ||
1299 | // NOTE 2: "some object" may refer to the new attachment - ie @detach:spine=n from object on spine (problematic, causes reattach) | ||
1300 | // -> solved by using isDetachableExcept(idxAttachPt, pObj) instead of isDetachable(idxAttachPt) | ||
1301 | |||
1302 | m_DetachPending.insert(std::pair<S32, LLUUID>(idxAttachPt, pObj->getID())); | ||
1303 | rlvForceDetach(pAttachPt); | ||
1304 | } | ||
1305 | |||
1306 | // Check if we already have an RlvObject instance for this object (rezzed prim attached from in-world, or an attachment that rezzed in) | ||
1307 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); | ||
1308 | if (itObj != m_Objects.end()) | ||
1309 | { | ||
1310 | // If it's an attachment we processed commands for but that only just rezzed in we need to mark it as existing in gObjectList | ||
1311 | if (!itObj->second.m_fLookup) | ||
1312 | itObj->second.m_fLookup = true; | ||
1313 | |||
1314 | // In both cases we should check for "@detach=n" and actually lock down the attachment point it got attached to | ||
1315 | if (itObj->second.hasBehaviour(RLV_BHVR_DETACH)) | ||
1316 | { | ||
1317 | // (Copy/paste from processAddCommand) | ||
1318 | setDetachable(pObj, pObj->getID(), false); | ||
1319 | |||
1320 | if (pObj->isHUDAttachment()) | ||
1321 | LLPipeline::sShowHUDAttachments = TRUE; // Prevents hiding of locked HUD attachments | ||
1322 | } | ||
1323 | } | ||
1324 | |||
1325 | // Fetch the inventory item if we don't currently have it since we might need it for reattach-on-detach | ||
1326 | const LLUUID& idItem = pAttachPt->getItemID(); | ||
1327 | LLViewerInventoryItem* pItem = ( (idItem.notNull()) && (gInventory.isInventoryUsable()) ) ? gInventory.getItem(idItem) : NULL; | ||
1328 | if ( (STATE_STARTED == LLStartUp::getStartupState()) && (pItem != NULL) ) | ||
1329 | { | ||
1330 | RlvCurrentlyWorn f; | ||
1331 | f.fetchItem(idItem); | ||
1332 | } | ||
1333 | |||
1334 | // If what we're wearing is located under the shared root then append the attachment point name (if needed) | ||
1335 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(); | ||
1336 | if ( (STATE_STARTED == LLStartUp::getStartupState()) && (pRlvRoot) && (pItem) && (pItem->isComplete()) && | ||
1337 | (gInventory.isObjectDescendentOf(idItem, pRlvRoot->getUUID())) ) | ||
1338 | { | ||
1339 | std::string strAttachPt = pAttachPt->getName(); | ||
1340 | LLStringUtil::toLower(strAttachPt); | ||
1341 | |||
1342 | // If we can modify the item then it should contain the attach point name itself, otherwise its parent should | ||
1343 | if (pItem->getPermissions().allowModifyBy(gAgent.getID())) | ||
1344 | { | ||
1345 | if (!getAttachPoint(pItem, true)) | ||
1346 | { | ||
1347 | // It doesn't specify an attach point and we can rename it [see LLItemBridge::renameItem()] | ||
1348 | std::string strName = pItem->getName(); | ||
1349 | LLStringUtil::truncate(strName, DB_INV_ITEM_NAME_STR_LEN - strAttachPt.length() - 3); | ||
1350 | |||
1351 | strName += " (" + strAttachPt + ")"; | ||
1352 | |||
1353 | pItem->rename(strName); | ||
1354 | pItem->updateServer(FALSE); | ||
1355 | gInventory.updateItem(pItem); | ||
1356 | //gInventory.notifyObservers(); <- done further down in LLVOAvatar::attachObject() | ||
1357 | } | ||
1358 | } | ||
1359 | else | ||
1360 | { | ||
1361 | // Folder can't be the shared root, or be its direct descendant (= nested at least 2 levels deep) | ||
1362 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); | ||
1363 | if ( (pFolder) && | ||
1364 | (pFolder->getUUID() != pRlvRoot->getUUID()) && (pFolder->getParentUUID() != pRlvRoot->getUUID()) && | ||
1365 | (!getAttachPoint(pFolder, true)) ) | ||
1366 | { | ||
1367 | // It's no mod and its parent folder doesn't contain an attach point | ||
1368 | LLInventoryModel::cat_array_t* pFolders; | ||
1369 | LLInventoryModel::item_array_t* pItems; | ||
1370 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
1371 | |||
1372 | if (pItems) | ||
1373 | { | ||
1374 | int cntObjects = 0; | ||
1375 | for (S32 idxItem = 0, cntItem = pItems->size(); idxItem < cntItem; idxItem++) | ||
1376 | { | ||
1377 | if (LLAssetType::AT_OBJECT == pItems->get(idxItem)->getType()) | ||
1378 | cntObjects++; | ||
1379 | } | ||
1380 | |||
1381 | // Only rename if there's exactly 1 object/attachment inside of it [see LLFolderBridge::renameItem()] | ||
1382 | if ( (1 == cntObjects) && (NEW_CATEGORY_NAME == pFolder->getName()) ) | ||
1383 | { | ||
1384 | std::string strName = ".(" + strAttachPt + ")"; | ||
1385 | |||
1386 | pFolder->rename(strName); | ||
1387 | pFolder->updateServer(FALSE); | ||
1388 | gInventory.updateCategory(pFolder); | ||
1389 | //gInventory.notifyObservers(); <- done further down in LLVOAvatar::attachObject() | ||
1390 | } | ||
1391 | } | ||
1392 | } | ||
1393 | } | ||
1394 | } | ||
1395 | } | ||
1396 | |||
1397 | // Checked: 2009-05-31 (RLVa-0.2.0e) | Modified: RLVa-0.2.0e | ||
1398 | void RlvHandler::onDetach(LLViewerJointAttachment* pAttachPt) | ||
1399 | { | ||
1400 | LLViewerObject* pObj = pAttachPt->getObject(); | ||
1401 | if (!pObj) | ||
1402 | { | ||
1403 | // LLVOAvatar::detachObject() should call us *before* calling LLViewerJointAttachment::removeObject() | ||
1404 | RLV_ERRS << "pAttachPt->getObject() == NULL" << LL_ENDL; | ||
1405 | return; | ||
1406 | } | ||
1407 | S32 idxAttachPt = getAttachPointIndex(pObj); | ||
1408 | if (0 == idxAttachPt) | ||
1409 | { | ||
1410 | // If we ended up here then the user "Drop"'ed this attachment (which we can't recover from) | ||
1411 | return; | ||
1412 | } | ||
1413 | |||
1414 | #ifdef RLV_DEBUG | ||
1415 | // TODO-RLV: when we're exiting (for whatever reason) app state won't always reflect it but | ||
1416 | // gAgent.getAvatarObject()->mAttachmentPoints will be NULL so anywhere we use | ||
1417 | // "get_if_there" will call through a NULL pointer. One case is "idling out" -> test the rest | ||
1418 | //LLViewerJointAttachment* pDbgAttachmentPt = | ||
1419 | // get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)idxAttachPt, (LLViewerJointAttachment*)NULL); | ||
1420 | //RLV_INFOS << "Clean up for '" << pDbgAttachmentPt->getName() << "'" << LL_ENDL; | ||
1421 | #endif // RLV_DEBUG | ||
1422 | |||
1423 | // If the attachment was locked then we should reattach it (unless we're already trying to reattach to this attachment point) | ||
1424 | // (unless we forcefully detached it else in which case we do not want to reattach it) | ||
1425 | rlv_reattach_map_t::iterator itDetach = m_DetachPending.find(idxAttachPt); | ||
1426 | if (itDetach != m_DetachPending.end()) | ||
1427 | { | ||
1428 | // RLVa-TODO: we should really be comparing item UUIDs but is it even possible to end up here and not have them match? | ||
1429 | m_DetachPending.erase(itDetach); | ||
1430 | } | ||
1431 | else if ( (!isDetachable(idxAttachPt)) && (m_AttachPending.find(idxAttachPt) == m_AttachPending.end()) ) | ||
1432 | { | ||
1433 | // In an ideal world we would simply set up an LLInventoryObserver but there's no specific "asset updated" changed flag *sighs* | ||
1434 | // NOTE: attachments *always* know their "inventory item UUID" so we don't have to worry about fetched vs unfetched inventory | ||
1435 | m_AttachPending.insert(std::pair<S32, LLUUID>(idxAttachPt, pAttachPt->getItemID())); | ||
1436 | } | ||
1437 | |||
1438 | // We can't - easily - clean up child prims that never issued @detach=n but the GC will get those eventually | ||
1439 | rlv_detach_map_t::iterator itAttach = m_Attachments.find(idxAttachPt); | ||
1440 | while ( (itAttach != m_Attachments.upper_bound(idxAttachPt)) && (itAttach != m_Attachments.end()) ) | ||
1441 | { | ||
1442 | LLViewerObject* pTempObj = gObjectList.findObject(itAttach->second); | ||
1443 | if ( (pTempObj) && (pTempObj->getRootEdit()->getID() == pObj->getID()) ) | ||
1444 | { | ||
1445 | // Iterator points to the object (or to a child prim) so issue a clear on behalf of the object (there's the | ||
1446 | // possibility of going into an eternal loop, but that's ok since it indicates a bug in @clear that needs fixing) | ||
1447 | processCommand(itAttach->second, "clear", true); | ||
1448 | |||
1449 | itAttach = m_Attachments.find(idxAttachPt); // @clear will invalidate all iterators so we have to start anew | ||
1450 | } | ||
1451 | else | ||
1452 | { | ||
1453 | itAttach++; | ||
1454 | } | ||
1455 | } | ||
1456 | |||
1457 | // Clean up in case there was never a @detach=n (only works for the root prim - see above) | ||
1458 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); | ||
1459 | if (itObj != m_Objects.end()) | ||
1460 | processCommand(itObj->second.m_UUID, "clear", true); | ||
1461 | } | ||
1462 | |||
1463 | // Checked: 2009-07-30 (RLVa-1.0.1c) | Modified: RLVa-1.0.1c | ||
1464 | bool RlvHandler::onGC() | ||
1465 | { | ||
1466 | // We can't issue @clear on an object while we're in the loop below since that would invalidate our iterator | ||
1467 | // (and starting over would mean that some objects might get their "lookup misses" counter updated more than once per GC run) | ||
1468 | std::list<LLUUID> ExpiredObjects; | ||
1469 | |||
1470 | for (rlv_object_map_t::iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
1471 | { | ||
1472 | LLViewerObject* pObj = gObjectList.findObject(itObj->second.m_UUID); | ||
1473 | if (!pObj) | ||
1474 | { | ||
1475 | // If the RlvObject once existed in the gObjectList and now doesn't then expire it right now | ||
1476 | // If the RlvObject never existed in the gObjectList and still doesn't then increase its "lookup misses" counter | ||
1477 | // but if that reaches 20 (we run every 30 seconds so that's about 10 minutes) then we'll expire it too | ||
1478 | if ( (itObj->second.m_fLookup) || (++itObj->second.m_nLookupMisses > 20) ) | ||
1479 | ExpiredObjects.push_back(itObj->first); | ||
1480 | } | ||
1481 | else | ||
1482 | { | ||
1483 | // Check if this is an RlvObject instance who's object never existed in gObjectList before (rezzed prim in-world) | ||
1484 | // (it could also be an attachment that only just rezzed in but RlvHandler::onAttach() should be handling those) | ||
1485 | if ( (!itObj->second.m_fLookup) && (!pObj->isAttachment()) ) | ||
1486 | itObj->second.m_fLookup = true; | ||
1487 | } | ||
1488 | } | ||
1489 | |||
1490 | for (std::list<LLUUID>::const_iterator itExpired = ExpiredObjects.begin(); itExpired != ExpiredObjects.end(); ++itExpired) | ||
1491 | { | ||
1492 | #ifdef RLV_DEBUG | ||
1493 | RLV_INFOS << "Garbage collecting " << *itExpired << LL_ENDL; | ||
1494 | #endif // RLV_DEBUG | ||
1495 | |||
1496 | processCommand(*itExpired, "clear", true); | ||
1497 | } | ||
1498 | |||
1499 | return (0 != m_Objects.size()); // GC will kill itself if it has nothing to do | ||
1500 | } | ||
1501 | |||
1502 | // Checked: 2009-08-08 (RLVa-1.0.1g) | Modified: RLVa-1.0.1g | ||
1503 | void RlvHandler::onSavedAssetIntoInventory(const LLUUID& idItem) | ||
1504 | { | ||
1505 | for (rlv_reattach_map_t::iterator itAttach = m_AttachPending.begin(); itAttach != m_AttachPending.end(); ++itAttach) | ||
1506 | { | ||
1507 | if (idItem == itAttach->second) | ||
1508 | { | ||
1509 | RLV_INFOS << "Reattaching " << idItem.asString() << " to " << itAttach->first << LL_ENDL; | ||
1510 | |||
1511 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
1512 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; | ||
1513 | rez_action->mItemID = itAttach->second; | ||
1514 | rez_action->mAttachPt = itAttach->first; | ||
1515 | |||
1516 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); // (Will call delete on rez_action) | ||
1517 | #else // Version: 1.23.4 | ||
1518 | LLSD payload; | ||
1519 | payload["item_id"] = itAttach->second; | ||
1520 | payload["attachment_point"] = itAttach->first; | ||
1521 | |||
1522 | LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | ||
1523 | #endif | ||
1524 | } | ||
1525 | } | ||
1526 | } | ||
1527 | |||
1528 | // ============================================================================ | ||
1529 | // String/chat censoring functions | ||
1530 | // | ||
1531 | |||
1532 | // LL must have included an strlen for UTF8 *somewhere* but I can't seem to find it so this one is home grown | ||
1533 | size_t utf8str_strlen(const std::string& utf8) | ||
1534 | { | ||
1535 | const char* pUTF8 = utf8.c_str(); size_t length = 0; | ||
1536 | for (int idx = 0, cnt = utf8.length(); idx < cnt ;idx++) | ||
1537 | { | ||
1538 | // We're looking for characters that don't start with 10 as their high bits | ||
1539 | if ((pUTF8[idx] & 0xC0) != 0x80) | ||
1540 | length++; | ||
1541 | } | ||
1542 | return length; | ||
1543 | } | ||
1544 | |||
1545 | // TODO-RLV: works, but more testing won't hurt | ||
1546 | std::string utf8str_chtruncate(const std::string& utf8, size_t length) | ||
1547 | { | ||
1548 | if (0 == length) | ||
1549 | return std::string(); | ||
1550 | if (utf8.length() <= length) | ||
1551 | return utf8; | ||
1552 | |||
1553 | const char* pUTF8 = utf8.c_str(); int idx = 0; | ||
1554 | while ( (pUTF8[idx]) && (length > 0) ) | ||
1555 | { | ||
1556 | // We're looking for characters that don't start with 10 as their high bits | ||
1557 | if ((pUTF8[idx] & 0xC0) != 0x80) | ||
1558 | length--; | ||
1559 | idx++; | ||
1560 | } | ||
1561 | |||
1562 | return utf8.substr(0, idx); | ||
1563 | } | ||
1564 | |||
1565 | // Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
1566 | void RlvHandler::filterChat(std::string& strUTF8Text, bool fFilterEmote) const | ||
1567 | { | ||
1568 | if (strUTF8Text.empty()) | ||
1569 | return; | ||
1570 | |||
1571 | if (rlvIsEmote(strUTF8Text)) // Check if it's an emote | ||
1572 | { | ||
1573 | if (fFilterEmote) // Emote filtering depends on fFilterEmote | ||
1574 | { | ||
1575 | if ( (strUTF8Text.find_first_of("\"()*=^_?~") != -1) || | ||
1576 | (strUTF8Text.find(" -") != -1) || (strUTF8Text.find("- ") != -1) || (strUTF8Text.find("''") != -1) ) | ||
1577 | { | ||
1578 | strUTF8Text = "..."; // Emote contains illegal character (or character sequence) | ||
1579 | } | ||
1580 | else if (!hasBehaviour("emote")) | ||
1581 | { | ||
1582 | int idx = strUTF8Text.find('.'); // Truncate at 20 characters or at the dot (whichever is shorter) | ||
1583 | strUTF8Text = utf8str_chtruncate(strUTF8Text, ( (idx > 0) && (idx < 20) ) ? idx + 1 : 20); | ||
1584 | } | ||
1585 | } | ||
1586 | } | ||
1587 | else if (strUTF8Text[0] == '/') // Not an emote, but starts with a '/' | ||
1588 | { | ||
1589 | if (utf8str_strlen(strUTF8Text) > 7) // Allow as long if it's 6 characters or less | ||
1590 | strUTF8Text = "..."; | ||
1591 | } | ||
1592 | else if ((strUTF8Text.length() < 4) || (strUTF8Text.compare(0, 2, "((")) || (strUTF8Text.compare(strUTF8Text.length() - 2, 2, "))"))) | ||
1593 | { | ||
1594 | strUTF8Text = "..."; // Regular chat (not OOC) | ||
1595 | } | ||
1596 | } | ||
1597 | |||
1598 | // Checked: 2009-07-04 (RLVa-1.0.0a) | Modified: RLVa-1.0.0a | ||
1599 | void RlvHandler::filterLocation(std::string& strUTF8Text) const | ||
1600 | { | ||
1601 | // TODO-RLVa: if either the region or parcel name is a simple word such as "a" or "the" then confusion will ensue? | ||
1602 | // -> not sure how you would go about preventing this though :|... | ||
1603 | |||
1604 | // Filter any mention of the surrounding region names | ||
1605 | LLWorld::region_list_t regions = LLWorld::getInstance()->getRegionList(); | ||
1606 | for (LLWorld::region_list_t::const_iterator itRegion = regions.begin(); itRegion != regions.end(); ++itRegion) | ||
1607 | rlvStringReplace(strUTF8Text, (*itRegion)->getName(), rlv_handler_t::cstrHiddenRegion); | ||
1608 | |||
1609 | // Filter any mention of the parcel name | ||
1610 | LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstance(); | ||
1611 | if (pParcelMgr) | ||
1612 | rlvStringReplace(strUTF8Text, pParcelMgr->getAgentParcelName(), rlv_handler_t::cstrHiddenParcel); | ||
1613 | } | ||
1614 | |||
1615 | void RlvHandler::filterNames(std::string& strUTF8Text) const | ||
1616 | { | ||
1617 | std::string strFirstName, strLastName, strName; | ||
1618 | |||
1619 | // TODO-RLV: make this a bit more efficient (ie people with a large draw distance will have a load of active regions) | ||
1620 | // -> the cost of multi string matching them all at once seems to be about the same as calling rlvStringReplace | ||
1621 | // twice so that would be a tremendous gain (and we'd get first name and word matching for free) | ||
1622 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
1623 | for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->getRegionList().begin(); | ||
1624 | itRegion != LLWorld::getInstance()->getRegionList().end(); ++itRegion) | ||
1625 | { | ||
1626 | LLViewerRegion* pRegion = *itRegion; | ||
1627 | |||
1628 | for (S32 idxAgent = 0, cntAgent = pRegion->mMapAvatars.count(); idxAgent < cntAgent; idxAgent++) | ||
1629 | { | ||
1630 | // LLCacheName::getName() will add the UUID to the lookup queue if we don't know it yet | ||
1631 | if (gCacheName->getName(pRegion->mMapAvatarIDs.get(idxAgent), strFirstName, strLastName)) | ||
1632 | { | ||
1633 | strName = strFirstName + " " + strLastName; | ||
1634 | |||
1635 | rlvStringReplace(strUTF8Text, strName, getAnonym(strName)); | ||
1636 | } | ||
1637 | } | ||
1638 | } | ||
1639 | #else // Version: trunk | ||
1640 | // TODO-RLV: should restrict this to a certain radius (probably 1-2 sim range?) | ||
1641 | std::vector<LLUUID> idAgents; | ||
1642 | LLWorld::getInstance()->getAvatars(&idAgents, NULL); | ||
1643 | |||
1644 | for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) | ||
1645 | { | ||
1646 | // LLCacheName::getName() will add the UUID to the lookup queue if we don't know it yet | ||
1647 | if (gCacheName->getName(idAgents[idxAgent], strFirstName, strLastName)) | ||
1648 | { | ||
1649 | strName = strFirstName + " " + strLastName; | ||
1650 | |||
1651 | rlvStringReplace(strUTF8Text, strName, getAnonym(strName)); | ||
1652 | } | ||
1653 | } | ||
1654 | #endif | ||
1655 | } | ||
1656 | |||
1657 | const std::string& RlvHandler::getAnonym(const std::string& strName) const | ||
1658 | { | ||
1659 | const char* pszName = strName.c_str(); | ||
1660 | U32 nHash = 0; | ||
1661 | |||
1662 | // Test with 11,264 SL names showed a 3.33% - 3.82% occurance for each so we *should* get a very even spread | ||
1663 | for (int idx = 0, cnt = strName.length(); idx < cnt; idx++) | ||
1664 | nHash += pszName[idx]; | ||
1665 | |||
1666 | return cstrAnonyms[nHash % 28]; | ||
1667 | } | ||
1668 | |||
1669 | // Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a | ||
1670 | bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const | ||
1671 | { | ||
1672 | // Sanity check - @redirchat only for chat and @rediremote only for emotes | ||
1673 | bool fIsEmote = rlvIsEmote(strUTF8Text); | ||
1674 | if ( ((!fIsEmote) && (!hasBehaviour(RLV_BHVR_REDIRCHAT))) || ((fIsEmote) && (!hasBehaviour(RLV_BHVR_REDIREMOTE))) ) | ||
1675 | return false; | ||
1676 | |||
1677 | if (!fIsEmote) | ||
1678 | { | ||
1679 | std::string strText = strUTF8Text; | ||
1680 | filterChat(strText, true); | ||
1681 | if (strText != "...") | ||
1682 | return false; // @sendchat wouldn't filter it so @redirchat won't redirect it either | ||
1683 | } | ||
1684 | |||
1685 | bool fSendChannel = hasBehaviour("sendchannel"); | ||
1686 | for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) | ||
1687 | { | ||
1688 | for (rlv_command_list_t::const_iterator itCmd = itObj->second.m_Commands.begin(), | ||
1689 | endCmd = itObj->second.m_Commands.end(); itCmd != endCmd; ++itCmd) | ||
1690 | { | ||
1691 | if ( ( ((!fIsEmote) && (RLV_BHVR_REDIRCHAT == itCmd->getBehaviourType())) || | ||
1692 | ((fIsEmote) && (RLV_BHVR_REDIREMOTE == itCmd->getBehaviourType())) ) && | ||
1693 | ( (!fSendChannel) || (hasBehaviour("sendchannel", itCmd->getOption())) ) ) | ||
1694 | { | ||
1695 | rlvSendChatReply(itCmd->getOption(), strUTF8Text); | ||
1696 | } | ||
1697 | } | ||
1698 | } | ||
1699 | return true; | ||
1700 | } | ||
1701 | |||
1702 | // ============================================================================ | ||
1703 | // Public service functions (called by the outside world or by extension handlers) | ||
1704 | // | ||
1705 | |||
1706 | BOOL RlvHandler::isAgentNearby(const LLUUID& uuid) const | ||
1707 | { | ||
1708 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
1709 | for (LLWorld::region_list_t::const_iterator itRegion = LLWorld::getInstance()->getRegionList().begin(); | ||
1710 | itRegion != LLWorld::getInstance()->getRegionList().end(); ++itRegion) | ||
1711 | { | ||
1712 | LLViewerRegion* pRegion = *itRegion; | ||
1713 | |||
1714 | for (S32 idxAgent = 0, cntAgent = pRegion->mMapAvatars.count(); idxAgent < cntAgent; idxAgent++) | ||
1715 | if (pRegion->mMapAvatarIDs.get(idxAgent) == uuid) | ||
1716 | return TRUE; | ||
1717 | } | ||
1718 | #else // Version: trunk | ||
1719 | // TODO-RLV: rewrite this to fit trunk, but still need the radius limited to a sane range | ||
1720 | std::vector<LLUUID> idAgents; | ||
1721 | LLWorld::getInstance()->getAvatars(&idAgents, NULL); | ||
1722 | |||
1723 | for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) | ||
1724 | { | ||
1725 | if (idAgents[idxAgent] == uuid) | ||
1726 | return TRUE; | ||
1727 | } | ||
1728 | #endif | ||
1729 | return FALSE; | ||
1730 | } | ||
1731 | |||
1732 | // ============================================================================ | ||
1733 | // General purpose inventory functions | ||
1734 | // | ||
1735 | |||
1736 | // Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1737 | class RlvSharedRootFetcher : public LLInventoryFetchDescendentsObserver | ||
1738 | { | ||
1739 | public: | ||
1740 | RlvSharedRootFetcher() {} | ||
1741 | |||
1742 | virtual void done() | ||
1743 | { | ||
1744 | RLV_INFOS << "Shared folders fetch completed" << LL_ENDL; | ||
1745 | RlvHandler::m_fFetchComplete = TRUE; | ||
1746 | |||
1747 | gInventory.removeObserver(this); | ||
1748 | delete this; | ||
1749 | } | ||
1750 | }; | ||
1751 | |||
1752 | // Checked: 2009-07-12 (RLVa-1.0.0h) | ||
1753 | void RlvHandler::fetchSharedInventory() | ||
1754 | { | ||
1755 | // Sanity check - don't fetch if we're already fetching, or if we don't have a shared root | ||
1756 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(); | ||
1757 | if ( (m_fFetchStarted) || (!pRlvRoot) ) | ||
1758 | return; | ||
1759 | |||
1760 | // Grab all the folders under the shared root | ||
1761 | LLInventoryModel::cat_array_t folders; | ||
1762 | LLInventoryModel::item_array_t items; | ||
1763 | gInventory.collectDescendents(pRlvRoot->getUUID(), folders, items, FALSE); | ||
1764 | |||
1765 | /* | ||
1766 | * Add them to the "to fetch" list | ||
1767 | */ | ||
1768 | LLInventoryFetchDescendentsObserver::folder_ref_t fetchFolders; | ||
1769 | |||
1770 | fetchFolders.push_back(pRlvRoot->getUUID()); | ||
1771 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) | ||
1772 | fetchFolders.push_back(folders.get(idxFolder)->getUUID()); | ||
1773 | |||
1774 | /* | ||
1775 | * Now fetch them all in one go | ||
1776 | */ | ||
1777 | RlvSharedRootFetcher* fetcher = new RlvSharedRootFetcher; | ||
1778 | |||
1779 | RLV_INFOS << "Starting fetch of " << fetchFolders.size() << " shared folders" << LL_ENDL; | ||
1780 | fetcher->fetchDescendents(fetchFolders); | ||
1781 | |||
1782 | if (fetcher->isEverythingComplete()) | ||
1783 | fetcher->done(); | ||
1784 | else | ||
1785 | gInventory.addObserver(fetcher); | ||
1786 | } | ||
1787 | |||
1788 | bool RlvHandler::findSharedFolders(const std::string& strCriteria, LLInventoryModel::cat_array_t& folders) const | ||
1789 | { | ||
1790 | // Sanity check - can't do anything without a shared root | ||
1791 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(); | ||
1792 | if (!pRlvRoot) | ||
1793 | return false; | ||
1794 | |||
1795 | folders.clear(); | ||
1796 | LLInventoryModel::item_array_t items; | ||
1797 | RlvCriteriaCategoryCollector functor(strCriteria); | ||
1798 | gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, FALSE, functor); | ||
1799 | |||
1800 | return (folders.count() != 0); | ||
1801 | } | ||
1802 | |||
1803 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0e | ||
1804 | LLViewerInventoryCategory* RlvHandler::getSharedRoot() | ||
1805 | { | ||
1806 | if (gInventory.isInventoryUsable()) | ||
1807 | { | ||
1808 | LLInventoryModel::cat_array_t* pFolders; | ||
1809 | LLInventoryModel::item_array_t* pItems; | ||
1810 | gInventory.getDirectDescendentsOf(gAgent.getInventoryRootID(), pFolders, pItems); | ||
1811 | if (pFolders) | ||
1812 | { | ||
1813 | // NOTE: we might have multiple #RLV folders so we'll just go with the first one we come across | ||
1814 | LLViewerInventoryCategory* pFolder; | ||
1815 | for (S32 idxFolder = 0, cntFolder = pFolders->count(); idxFolder < cntFolder; idxFolder++) | ||
1816 | { | ||
1817 | if ( ((pFolder = pFolders->get(idxFolder)) != NULL) && (RlvHandler::cstrSharedRoot == pFolder->getName()) ) | ||
1818 | return pFolder; | ||
1819 | } | ||
1820 | } | ||
1821 | } | ||
1822 | return NULL; | ||
1823 | } | ||
1824 | |||
1825 | // Checked: 2009-07-28 (RLVa-1.0.1a) | Modified: RLVa-1.0.1a | ||
1826 | LLViewerInventoryCategory* RlvHandler::getSharedFolder(const LLUUID& idParent, const std::string& strFolderName) const | ||
1827 | { | ||
1828 | LLInventoryModel::cat_array_t* pFolders; | ||
1829 | LLInventoryModel::item_array_t* pItems; | ||
1830 | gInventory.getDirectDescendentsOf(idParent, pFolders, pItems); | ||
1831 | if ( (!pFolders) || (strFolderName.empty()) ) | ||
1832 | return NULL; | ||
1833 | |||
1834 | // If we can't find an exact match then we'll settle for a "contains" match | ||
1835 | LLViewerInventoryCategory* pPartial = NULL; | ||
1836 | |||
1837 | //LLStringUtil::toLower(strFolderName); <- everything was already converted to lower case before | ||
1838 | |||
1839 | std::string strName; | ||
1840 | for (S32 idxFolder = 0, cntFolder = pFolders->count(); idxFolder < cntFolder; idxFolder++) | ||
1841 | { | ||
1842 | LLViewerInventoryCategory* pFolder = pFolders->get(idxFolder); | ||
1843 | |||
1844 | strName = pFolder->getName(); | ||
1845 | if (strName.empty()) | ||
1846 | continue; | ||
1847 | LLStringUtil::toLower(strName); | ||
1848 | |||
1849 | if (strFolderName == strName) | ||
1850 | return pFolder; // Found an exact match, no need to keep on going | ||
1851 | else if ( (!pPartial) && (RLV_FOLDER_PREFIX_HIDDEN != strName[0]) && (strName.find(strFolderName) != std::string::npos) ) | ||
1852 | pPartial = pFolder; // Found a partial (non-hidden) match, but we might still find an exact one (first partial match wins) | ||
1853 | } | ||
1854 | |||
1855 | return pPartial; | ||
1856 | } | ||
1857 | |||
1858 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0e | ||
1859 | LLViewerInventoryCategory* RlvHandler::getSharedFolder(const std::string& strPath) const | ||
1860 | { | ||
1861 | // Sanity check - no shared root => no shared folder | ||
1862 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(), *pFolder = pRlvRoot; | ||
1863 | if (!pRlvRoot) | ||
1864 | return NULL; | ||
1865 | |||
1866 | // Walk the path (starting at the root) | ||
1867 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
1868 | boost::char_separator<char> sep("/", "", boost::drop_empty_tokens); | ||
1869 | tokenizer tokens(strPath, sep); | ||
1870 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
1871 | { | ||
1872 | pFolder = getSharedFolder(pFolder->getUUID(), *itToken); | ||
1873 | if (!pFolder) | ||
1874 | return NULL; // No such folder | ||
1875 | } | ||
1876 | |||
1877 | return pFolder; // If strPath was empty or just a bunch of //// then: pFolder == pRlvRoot | ||
1878 | } | ||
1879 | |||
1880 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0g | ||
1881 | std::string RlvHandler::getSharedPath(const LLViewerInventoryCategory* pFolder) const | ||
1882 | { | ||
1883 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(); | ||
1884 | // Sanity check - no shared root or no folder => no path | ||
1885 | if ( (!pRlvRoot) || (!pFolder) || (pRlvRoot->getUUID() == pFolder->getUUID()) ) | ||
1886 | return std::string(); | ||
1887 | |||
1888 | const LLUUID& idRLV = pRlvRoot->getUUID(); | ||
1889 | const LLUUID& idRoot = gAgent.getInventoryRootID(); | ||
1890 | std::string strPath; | ||
1891 | |||
1892 | // Walk up the tree until we reach the top | ||
1893 | while (pFolder) | ||
1894 | { | ||
1895 | strPath = "/" + pFolder->getName() + strPath; | ||
1896 | |||
1897 | const LLUUID& idParent = pFolder->getParentUUID(); | ||
1898 | if (idRLV == idParent) // Reached the shared root, we're done | ||
1899 | break; | ||
1900 | else if (idRoot == idParent) // We reached the agent's inventory root (indicative of a logic error elsewhere) | ||
1901 | { | ||
1902 | RLV_ERRS << "Reached agent's inventory root while building path for shared folder" << LL_ENDL; | ||
1903 | return std::string(); | ||
1904 | } | ||
1905 | else | ||
1906 | pFolder = gInventory.getCategory(idParent); | ||
1907 | } | ||
1908 | |||
1909 | return strPath.erase(0, 1); | ||
1910 | } | ||
1911 | |||
1912 | // ============================================================================ | ||
1913 | // Composite folders | ||
1914 | // | ||
1915 | |||
1916 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
1917 | // Checked: | ||
1918 | bool RlvHandler::getCompositeInfo(const LLInventoryCategory* pFolder, std::string* pstrName) const | ||
1919 | { | ||
1920 | if (pFolder) | ||
1921 | { | ||
1922 | // Composite folder naming: ^\.?[Folder] | ||
1923 | const std::string& cstrFolder = pFolder->getName(); | ||
1924 | int idxStart = cstrFolder.find('['), idxEnd = cstrFolder.find(']', idxStart); | ||
1925 | if ( ((0 == idxStart) || (1 == idxStart)) && (idxEnd - idxStart > 1) ) | ||
1926 | { | ||
1927 | if (pstrName) | ||
1928 | pstrName->assign(cstrFolder.substr(idxStart + 1, idxEnd - idxStart - 1)); | ||
1929 | return true; | ||
1930 | } | ||
1931 | } | ||
1932 | return false; | ||
1933 | } | ||
1934 | |||
1935 | // Checked: | ||
1936 | bool RlvHandler::getCompositeInfo(const LLUUID& idItem, std::string* pstrName, LLViewerInventoryCategory** ppFolder) const | ||
1937 | { | ||
1938 | LLViewerInventoryCategory* pRlvRoot; LLViewerInventoryItem* pItem; | ||
1939 | |||
1940 | if ( (idItem.notNull()) && ((pRlvRoot = getSharedRoot()) != NULL) && | ||
1941 | (gInventory.isObjectDescendentOf(idItem, pRlvRoot->getUUID())) && ((pItem = gInventory.getItem(idItem)) != NULL) ) | ||
1942 | { | ||
1943 | // We know it's an item in a folder under the shared root... | ||
1944 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); | ||
1945 | if (getAttachPoint(pFolder, true)) | ||
1946 | { | ||
1947 | // ... but it could be named ".(attachpt)" in which case we need its parent | ||
1948 | pFolder = gInventory.getCategory(pFolder->getParentUUID()); | ||
1949 | } | ||
1950 | |||
1951 | if ( (pFolder) && (getCompositeInfo(pFolder, pstrName)) ) | ||
1952 | { | ||
1953 | if (ppFolder) | ||
1954 | *ppFolder = pFolder; | ||
1955 | return true; | ||
1956 | } | ||
1957 | } | ||
1958 | return false; | ||
1959 | } | ||
1960 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
1961 | |||
1962 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_FOLDING | ||
1963 | // Checked: | ||
1964 | inline bool RlvHandler::isHiddenCompositeItem(const LLUUID& idItem, const std::string& cstrItemType) const | ||
1965 | { | ||
1966 | // An item that's part of a composite folder will be hidden from @getoutfit and @getattach if: | ||
1967 | // (1) the composite name specifies either a wearable layer or an attachment point | ||
1968 | // (2) the specified wearable layer or attachment point is worn and resides in the folder | ||
1969 | // (3) cstrItemType isn't the specified wearable layer or attach point | ||
1970 | // | ||
1971 | // Example: #RLV/Separates/Shoes/ChiChi Pumps/.[shoes] with items: "Shoe Base", "Shoe (left foot)" and "Shoe (right foot)" | ||
1972 | // -> as long as "Shoe Base" is worn, @getattach should not reflect "left foot", nor "right foot" | ||
1973 | std::string strComposite; LLViewerInventoryCategory* pFolder; | ||
1974 | EWearableType type; S32 idxAttachPt; | ||
1975 | if ( (getCompositeInfo(idItem, &strComposite, &pFolder)) && (cstrItemType != strComposite) ) | ||
1976 | { | ||
1977 | LLUUID idCompositeItem; | ||
1978 | if ((type = LLWearable::typeNameToType(strComposite)) != WT_INVALID) | ||
1979 | { | ||
1980 | idCompositeItem = gAgent.getWearableItem(type); | ||
1981 | } | ||
1982 | else if ((idxAttachPt = getAttachPointIndex(strComposite, true)) != 0) | ||
1983 | { | ||
1984 | LLVOAvatar* pAvatar; LLViewerJointAttachment* pAttachmentPt; | ||
1985 | if ( ((pAvatar = gAgent.getAvatarObject()) != NULL) && | ||
1986 | ((pAttachmentPt = get_if_there(pAvatar->mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL)) != NULL) ) | ||
1987 | { | ||
1988 | idCompositeItem = pAttachmentPt->getItemID(); | ||
1989 | } | ||
1990 | } | ||
1991 | |||
1992 | if ( (idCompositeItem.notNull()) && (gInventory.isObjectDescendentOf(idCompositeItem, pFolder->getUUID())) ) | ||
1993 | return true; | ||
1994 | } | ||
1995 | return false; | ||
1996 | } | ||
1997 | #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDING | ||
1998 | |||
1999 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2000 | // Checked: | ||
2001 | bool RlvHandler::canTakeOffComposite(const LLInventoryCategory* pFolder) const | ||
2002 | { | ||
2003 | if (!pFolder) // If there's no folder then there is nothing to take off | ||
2004 | return false; | ||
2005 | |||
2006 | LLInventoryModel::cat_array_t folders; | ||
2007 | LLInventoryModel::item_array_t items; | ||
2008 | RlvWearableItemCollector functor(pFolder->getUUID(), true, false); | ||
2009 | |||
2010 | // Grab a list of all the items @detachthis would be detaching/unwearing | ||
2011 | gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); | ||
2012 | if (!items.count()) | ||
2013 | return false; // There are no wearable items in the folder so there is nothing to take off | ||
2014 | |||
2015 | LLViewerInventoryItem* pItem; | ||
2016 | for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) | ||
2017 | { | ||
2018 | pItem = items.get(idxItem); | ||
2019 | |||
2020 | switch (pItem->getType()) | ||
2021 | { | ||
2022 | case LLAssetType::AT_CLOTHING: | ||
2023 | { | ||
2024 | LLWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID()); | ||
2025 | if ( (pWearable) && (!isRemovable(pWearable->getType())) ) | ||
2026 | return false; // If one clothing layer in the composite folder is unremoveable then the entire folder is | ||
2027 | } | ||
2028 | break; | ||
2029 | case LLAssetType::AT_OBJECT: | ||
2030 | { | ||
2031 | LLVOAvatar* pAvatar; LLViewerObject* pObj; | ||
2032 | if ( ((pAvatar = gAgent.getAvatarObject()) != NULL) && | ||
2033 | ((pObj = pAvatar->getWornAttachment(pItem->getUUID())) != NULL) && (!isDetachable(pObj)) ) | ||
2034 | { | ||
2035 | return false; // If one attachment in the composite folder is undetachable then the entire folder is | ||
2036 | } | ||
2037 | } | ||
2038 | break; | ||
2039 | #ifdef LL_GNUC | ||
2040 | default: | ||
2041 | break; | ||
2042 | #endif // LL_GNUC | ||
2043 | } | ||
2044 | } | ||
2045 | return true; | ||
2046 | } | ||
2047 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2048 | |||
2049 | // ============================================================================ | ||
2050 | // Event handlers | ||
2051 | // | ||
2052 | |||
2053 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
2054 | void RlvHandler::onForceDetach(const LLUUID& idObj, const std::string& strOption) const | ||
2055 | { | ||
2056 | U16 nParam; | ||
2057 | if (strOption.empty()) | ||
2058 | { | ||
2059 | // Simulate right-click / Take Off > Detach All | ||
2060 | LLAgent::userRemoveAllAttachments(NULL); | ||
2061 | } | ||
2062 | else if (m_AttachLookup.getExactMatchParam(strOption, nParam)) | ||
2063 | { | ||
2064 | // Simulate right-click / Take Off > Detach > ... | ||
2065 | LLVOAvatar* pAvatar; LLViewerJointAttachment* pAttachmentPt; | ||
2066 | if ( ((pAvatar = gAgent.getAvatarObject()) != NULL) && // Make sure we're actually wearing something on the attachment point | ||
2067 | ((pAttachmentPt = get_if_there(pAvatar->mAttachmentPoints, (S32)nParam, (LLViewerJointAttachment*)NULL)) != NULL) && | ||
2068 | (isStrippable(pAttachmentPt->getItemID())) ) // ... and that it's not marked as "nostrip" | ||
2069 | { | ||
2070 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
2071 | // If we're stripping something that's part of a composite folder then we should @detachthis instead | ||
2072 | if (isCompositeDescendent(pAttachmentPt->getItemID())) | ||
2073 | { | ||
2074 | std::string strCmd = "detachthis:" + strOption + "=force"; | ||
2075 | #ifdef RLV_DEBUG | ||
2076 | RLV_INFOS << "\t- '" << strOption << "' belongs to composite folder: @" << strCmd << LL_ENDL; | ||
2077 | #endif // RLV_DEBUG | ||
2078 | processForceCommand(idObj, RlvCommand(strCmd)); | ||
2079 | } | ||
2080 | else | ||
2081 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
2082 | { | ||
2083 | handle_detach_from_avatar(pAttachmentPt); | ||
2084 | } | ||
2085 | } | ||
2086 | } | ||
2087 | else | ||
2088 | { | ||
2089 | // Force detach single folder | ||
2090 | onForceWear(strOption, false, false); | ||
2091 | } | ||
2092 | } | ||
2093 | |||
2094 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
2095 | void RlvHandler::onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const | ||
2096 | { | ||
2097 | EWearableType typeOption = LLWearable::typeNameToType(strOption), type; | ||
2098 | if ( (WT_INVALID == typeOption) && (!strOption.empty()) ) | ||
2099 | return; | ||
2100 | |||
2101 | // Before we had an option and optionless branch, but with the addition of composites and nostrip there's less duplication this way | ||
2102 | for (int idxType = 0; idxType < WT_COUNT; idxType++) | ||
2103 | { | ||
2104 | type = (EWearableType)idxType; | ||
2105 | |||
2106 | // Only strip clothing (that's currently worn and not marked "nostrip") | ||
2107 | if ( (LLAssetType::AT_CLOTHING != LLWearable::typeToAssetType(type)) || | ||
2108 | (!gAgent.getWearable(type)) || (!isStrippable(gAgent.getWearableItem(type))) ) | ||
2109 | { | ||
2110 | continue; | ||
2111 | } | ||
2112 | |||
2113 | if ( (typeOption == type) || (strOption.empty()) ) | ||
2114 | { | ||
2115 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
2116 | // If we're stripping something that's part of a composite folder then we should @detachthis instead | ||
2117 | if (isCompositeDescendent(gAgent.getWearableItem(type))) | ||
2118 | { | ||
2119 | std::string strCmd = "detachthis:" + LLWearable::typeToTypeName(type) + "=force"; | ||
2120 | #ifdef RLV_DEBUG | ||
2121 | RLV_INFOS << "\t- '" << LLWearable::typeToTypeName(type) << "' is composite descendent: @" << strCmd << LL_ENDL; | ||
2122 | #endif // RLV_DEBUG | ||
2123 | processForceCommand(idObj, RlvCommand(strCmd)); | ||
2124 | } | ||
2125 | else | ||
2126 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
2127 | { | ||
2128 | gAgent.removeWearable(type); | ||
2129 | } | ||
2130 | } | ||
2131 | } | ||
2132 | } | ||
2133 | |||
2134 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0g | ||
2135 | bool RlvHandler::onForceSit(const LLUUID& idObj, const std::string& strOption) const | ||
2136 | { | ||
2137 | LLViewerObject* pObject = NULL; LLUUID idTarget(strOption); | ||
2138 | // Sanity checking - we need to know about the object and it should identify a prim/linkset | ||
2139 | if ( (idTarget.isNull()) || ((pObject = gObjectList.findObject(idTarget)) == NULL) || (LL_PCODE_VOLUME != pObject->getPCode()) ) | ||
2140 | return false; | ||
2141 | |||
2142 | // Don't force sit if: | ||
2143 | // 1) currently sitting and prevented from standing up | ||
2144 | // 2) prevented from sitting | ||
2145 | // 3) @sittp=n restricted (except if @sittp=n was issued by the same prim that's currently force sitting the avie) | ||
2146 | if ( ( (hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) || | ||
2147 | ( (hasBehaviour(RLV_BHVR_SIT)) ) || | ||
2148 | ( (hasBehaviourExcept(RLV_BHVR_SITTP, idObj)) && | ||
2149 | (dist_vec_squared(gAgent.getPositionGlobal(), pObject->getPositionGlobal()) > 1.5f * 1.5f) )) | ||
2150 | { | ||
2151 | return false; | ||
2152 | } | ||
2153 | |||
2154 | // Copy/paste from handle_sit_or_stand() [see http://wiki.secondlife.com/wiki/AgentRequestSit] | ||
2155 | gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); | ||
2156 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
2157 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
2158 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
2159 | gMessageSystem->nextBlockFast(_PREHASH_TargetObject); | ||
2160 | gMessageSystem->addUUIDFast(_PREHASH_TargetID, pObject->mID); | ||
2161 | // Offset: "a rough position in local coordinates for the edge to sit on" | ||
2162 | // (we might not even be looking at the object so I don't think we can supply the offset to an edge) | ||
2163 | gMessageSystem->addVector3Fast(_PREHASH_Offset, LLVector3::zero); | ||
2164 | pObject->getRegion()->sendReliableMessage(); | ||
2165 | |||
2166 | return true; | ||
2167 | } | ||
2168 | |||
2169 | void RlvHandler::onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const | ||
2170 | { | ||
2171 | // See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items | ||
2172 | if (!gAgent.areWearablesLoaded()) | ||
2173 | return; | ||
2174 | |||
2175 | LLViewerInventoryCategory* pFolder = getSharedFolder(strPath); | ||
2176 | if (!pFolder) // Folder not found = nothing to attach | ||
2177 | return; | ||
2178 | |||
2179 | LLInventoryModel::cat_array_t folders; | ||
2180 | LLInventoryModel::item_array_t items; | ||
2181 | RlvWearableItemCollector functor(pFolder->getUUID(), fAttach, fMatchAll); | ||
2182 | |||
2183 | // Grab a list of all the items we'll be wearing/attaching | ||
2184 | gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); | ||
2185 | |||
2186 | LLViewerInventoryItem* pItem; | ||
2187 | for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) | ||
2188 | { | ||
2189 | pItem = items.get(idxItem); | ||
2190 | |||
2191 | switch (pItem->getType()) | ||
2192 | { | ||
2193 | case LLAssetType::AT_CLOTHING: | ||
2194 | case LLAssetType::AT_BODYPART: | ||
2195 | { | ||
2196 | LLWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID()); | ||
2197 | |||
2198 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2199 | // If we're already wearing something on this layer then we have to check if it isn't part of a composite | ||
2200 | // folder that has at least one unremovable item (in which case we can't wear or remove this item) | ||
2201 | LLViewerInventoryCategory* pCompositeFolder; | ||
2202 | if ( (!pWearable) || (!getCompositeInfo(pItem->getUUID(), NULL, &pCompositeFolder)) || | ||
2203 | (canTakeOffComposite(pFolder))) | ||
2204 | { | ||
2205 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2206 | if (fAttach) | ||
2207 | { | ||
2208 | // Simulate wearing a clothing item from inventory (right click / "Wear") | ||
2209 | // LLWearableBridge::performAction() => LLWearableBridge::wearOnAvatar() => wear_inventory_item_on_avatar() | ||
2210 | wear_inventory_item_on_avatar(pItem); | ||
2211 | } | ||
2212 | else | ||
2213 | { | ||
2214 | if ( (pWearable) && (LLAssetType::AT_CLOTHING == pItem->getType()) ) | ||
2215 | gAgent.removeWearable(pWearable->getType()); | ||
2216 | } | ||
2217 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2218 | } | ||
2219 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2220 | } | ||
2221 | break; | ||
2222 | case LLAssetType::AT_OBJECT: | ||
2223 | { | ||
2224 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
2225 | LLViewerObject* pObj; | ||
2226 | |||
2227 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2228 | // If we're already wearing something on this attach point then we have to check if it isn't part of a composite | ||
2229 | // folder that has at least one unremovable item (in which case we can't attach or detach this item) | ||
2230 | LLViewerInventoryCategory* pCompositeFolder; | ||
2231 | if ( (pAvatar) && | ||
2232 | ( ((pObj = pAvatar->getWornAttachment(pItem->getUUID())) == NULL) || | ||
2233 | (!getCompositeInfo(pItem->getUUID(), NULL, &pCompositeFolder)) || (canTakeOffComposite(pFolder)) ) ) | ||
2234 | { | ||
2235 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2236 | if (fAttach) | ||
2237 | { | ||
2238 | // Simulate wearing an object to a specific attachment point (copy/paste to suppress replacement dialog) | ||
2239 | // LLAttachObject::handleEvent() => rez_attachment() | ||
2240 | LLViewerJointAttachment* pAttachPt = getAttachPoint(pItem, true); | ||
2241 | if ( (pAttachPt) && (isDetachable(pAttachPt->getObject())) ) | ||
2242 | { | ||
2243 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
2244 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; | ||
2245 | rez_action->mItemID = pItem->getUUID(); | ||
2246 | rez_action->mAttachPt = getAttachPointIndex(pAttachPt->getName(), true); | ||
2247 | |||
2248 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); // (Will call delete on rez_action) | ||
2249 | #else // Version: 1.23.4 | ||
2250 | LLSD payload; | ||
2251 | payload["item_id"] = pItem->getUUID(); | ||
2252 | payload["attachment_point"] = getAttachPointIndex(pAttachPt->getName(), true); | ||
2253 | |||
2254 | LLNotifications::instance().forceResponse( | ||
2255 | LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | ||
2256 | #endif | ||
2257 | } | ||
2258 | } | ||
2259 | else | ||
2260 | { | ||
2261 | if ( (pAvatar) && ((pObj = pAvatar->getWornAttachment(pItem->getUUID())) != NULL) ) | ||
2262 | { | ||
2263 | LLViewerJointAttachment* pAttachment = pAvatar->getTargetAttachmentPoint(pObj); | ||
2264 | if (pAttachment) | ||
2265 | handle_detach_from_avatar(pAttachment); | ||
2266 | } | ||
2267 | } | ||
2268 | #ifdef RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2269 | } | ||
2270 | #endif // RLV_EXPERIMENTAL_COMPOSITE_LOCKING | ||
2271 | } | ||
2272 | break; | ||
2273 | #ifdef LL_GNUC | ||
2274 | default: | ||
2275 | break; | ||
2276 | #endif // LL_GNUC | ||
2277 | } | ||
2278 | } | ||
2279 | } | ||
2280 | |||
2281 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0g | ||
2282 | bool RlvHandler::onGetPath(const LLUUID &uuid, const std::string& strOption, std::string& strReply) const | ||
2283 | { | ||
2284 | // Sanity check - no need to go through all this trouble if we don't have a shared root | ||
2285 | LLViewerInventoryCategory* pRlvRoot = getSharedRoot(); | ||
2286 | if (!pRlvRoot) | ||
2287 | return false; | ||
2288 | |||
2289 | LLUUID idItem; | ||
2290 | |||
2291 | // <option> can be a clothing layer | ||
2292 | EWearableType layerType = LLWearable::typeNameToType(strOption); | ||
2293 | if (WT_INVALID != layerType) | ||
2294 | { | ||
2295 | idItem = gAgent.getWearableItem(layerType); | ||
2296 | } | ||
2297 | else | ||
2298 | { | ||
2299 | LLViewerJointAttachment* pAttachPt = NULL; | ||
2300 | |||
2301 | // ... or it can be empty | ||
2302 | if (strOption.empty()) | ||
2303 | { | ||
2304 | // (in which case we act on the object that issued the command) | ||
2305 | LLViewerObject* pObj = gObjectList.findObject(uuid); | ||
2306 | if ( (pObj) && (pObj->isAttachment()) && (gAgent.getAvatarObject()) ) | ||
2307 | pAttachPt = gAgent.getAvatarObject()->getTargetAttachmentPoint(pObj); | ||
2308 | } | ||
2309 | else | ||
2310 | { | ||
2311 | // ... or it can specify an attach point | ||
2312 | pAttachPt = getAttachPoint(strOption, true); | ||
2313 | } | ||
2314 | |||
2315 | // If we found something, get its inventory item UUID | ||
2316 | if (pAttachPt) | ||
2317 | idItem = pAttachPt->getItemID(); | ||
2318 | } | ||
2319 | |||
2320 | // If we found something and it's under the shared root, then get its path | ||
2321 | if ( (!idItem.isNull()) && (gInventory.isObjectDescendentOf(idItem, pRlvRoot->getUUID())) ) | ||
2322 | { | ||
2323 | LLInventoryItem* pItem = gInventory.getItem(idItem); | ||
2324 | if (pItem) | ||
2325 | { | ||
2326 | // ... unless the containing folder's name specifies an attach point (or nostrip) in which case we need its parent | ||
2327 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); | ||
2328 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
2329 | if ( (getAttachPoint(pFolder, true)) || (pFolder->getName() == ".("RLV_FOLDER_FLAG_NOSTRIP")") ) | ||
2330 | #else | ||
2331 | if (getAttachPoint(pFolder, true)) | ||
2332 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
2333 | strReply = getSharedPath(pFolder->getParentUUID()); | ||
2334 | else | ||
2335 | strReply = getSharedPath(pFolder); | ||
2336 | } | ||
2337 | } | ||
2338 | return !strReply.empty(); | ||
2339 | } | ||
2340 | |||
2341 | struct rlv_wear_info { U32 cntWorn, cntTotal, cntChildWorn, cntChildTotal; }; | ||
2342 | |||
2343 | // Checked: 2009-05-30 (RLVa-0.2.0e) | Modified: RLVa-0.2.0e | ||
2344 | void RlvHandler::onGetInvWorn(const std::string& strPath, std::string& strReply) const | ||
2345 | { | ||
2346 | // Sanity check - getAvatarObject() can't be NULL [see rlvIsWearingItem()] and the folder should exist and not be hidden | ||
2347 | LLViewerInventoryCategory* pFolder = getSharedFolder(strPath); | ||
2348 | if ((!gAgent.getAvatarObject()) || (!pFolder) || (pFolder->getName().empty()) || (RLV_FOLDER_PREFIX_HIDDEN == pFolder->getName()[0])) | ||
2349 | return; | ||
2350 | |||
2351 | // Collect everything @attachall would be attaching | ||
2352 | LLInventoryModel::cat_array_t folders; | ||
2353 | LLInventoryModel::item_array_t items; | ||
2354 | RlvWearableItemCollector functor(pFolder->getUUID(), true, true); | ||
2355 | gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); | ||
2356 | |||
2357 | rlv_wear_info wi = {0}; | ||
2358 | |||
2359 | // Add all the folders to a lookup map | ||
2360 | std::map<LLUUID, rlv_wear_info> mapFolders; | ||
2361 | mapFolders.insert(std::pair<LLUUID, rlv_wear_info>(pFolder->getUUID(), wi)); | ||
2362 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) | ||
2363 | mapFolders.insert(std::pair<LLUUID, rlv_wear_info>(folders.get(idxFolder)->getUUID(), wi)); | ||
2364 | |||
2365 | // Iterate over all the found items | ||
2366 | LLViewerInventoryItem* pItem; std::map<LLUUID, rlv_wear_info>::iterator itFolder; | ||
2367 | for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) | ||
2368 | { | ||
2369 | pItem = items.get(idxItem); | ||
2370 | |||
2371 | // The "folded parent" is the folder this item should be considered a direct descendent of (may or may not match actual parent) | ||
2372 | const LLUUID& idParent = functor.getFoldedParent(pItem->getParentUUID()); | ||
2373 | |||
2374 | // Walk up the tree: sooner or later one of the parents will be a folder in the map | ||
2375 | LLViewerInventoryCategory* pParent = gInventory.getCategory(idParent); | ||
2376 | while ( (itFolder = mapFolders.find(pParent->getUUID())) == mapFolders.end() ) | ||
2377 | pParent = gInventory.getCategory(pParent->getParentUUID()); | ||
2378 | |||
2379 | U32 &cntWorn = (idParent == pParent->getUUID()) ? itFolder->second.cntWorn : itFolder->second.cntChildWorn, | ||
2380 | &cntTotal = (idParent == pParent->getUUID()) ? itFolder->second.cntTotal : itFolder->second.cntChildTotal; | ||
2381 | |||
2382 | if (rlvIsWearingItem(pItem)) | ||
2383 | cntWorn++; | ||
2384 | cntTotal++; | ||
2385 | } | ||
2386 | |||
2387 | // Extract the result for the main folder | ||
2388 | itFolder = mapFolders.find(pFolder->getUUID()); | ||
2389 | wi.cntWorn = itFolder->second.cntWorn; | ||
2390 | wi.cntTotal = itFolder->second.cntTotal; | ||
2391 | mapFolders.erase(itFolder); | ||
2392 | |||
2393 | // Build the result for each child folder | ||
2394 | for (itFolder = mapFolders.begin(); itFolder != mapFolders.end(); ++itFolder) | ||
2395 | { | ||
2396 | rlv_wear_info& wiFolder = itFolder->second; | ||
2397 | |||
2398 | wi.cntChildWorn += wiFolder.cntWorn + wiFolder.cntChildWorn; | ||
2399 | wi.cntChildTotal += wiFolder.cntTotal + wiFolder.cntChildTotal; | ||
2400 | |||
2401 | strReply += llformat(",%s|%d%d", gInventory.getCategory(itFolder->first)->getName().c_str(), | ||
2402 | (0 == wiFolder.cntTotal) ? 0 : (0 == wiFolder.cntWorn) ? 1 : (wiFolder.cntWorn != wiFolder.cntTotal) ? 2 : 3, | ||
2403 | (0 == wiFolder.cntChildTotal) ? 0 : (0 == wiFolder.cntChildWorn) ? 1 : (wiFolder.cntChildWorn != wiFolder.cntChildTotal) ? 2 : 3 | ||
2404 | ); | ||
2405 | } | ||
2406 | |||
2407 | // Now just prepend the root and done | ||
2408 | strReply = llformat("|%d%d", (0 == wi.cntTotal) ? 0 : (0 == wi.cntWorn) ? 1 : (wi.cntWorn != wi.cntTotal) ? 2 : 3, | ||
2409 | (0 == wi.cntChildTotal) ? 0 : (0 == wi.cntChildWorn) ? 1 : (wi.cntChildWorn != wi.cntChildTotal) ? 2: 3) + strReply; | ||
2410 | } | ||
2411 | |||
2412 | // (In case anyone cares: this isn't used in public builds) | ||
2413 | bool RlvHandler::getWornInfo(const LLInventoryCategory* pFolder, U8& wiFolder, U8& wiChildren) const | ||
2414 | { | ||
2415 | // Sanity check - getAvatarObject() can't be NULL [see rlvIsWearingItem()] and the folder should exist and not be hidden | ||
2416 | if ((!gAgent.getAvatarObject()) || (!pFolder) || (pFolder->getName().empty()) || (RLV_FOLDER_PREFIX_HIDDEN == pFolder->getName()[0])) | ||
2417 | return false; | ||
2418 | |||
2419 | LLInventoryModel::cat_array_t folders; | ||
2420 | LLInventoryModel::item_array_t items; | ||
2421 | RlvWearableItemCollector functor(pFolder->getUUID(), true, true); | ||
2422 | gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); | ||
2423 | |||
2424 | LLViewerInventoryItem* pItem; | ||
2425 | U32 cntWorn = 0, cntTotal = 0, cntChildWorn = 0, cntChildTotal = 0; | ||
2426 | for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) | ||
2427 | { | ||
2428 | pItem = items.get(idxItem); | ||
2429 | |||
2430 | bool fDirectDescendent = (pFolder->getUUID() == functor.getFoldedParent(pItem->getParentUUID())); | ||
2431 | U32 &refWorn = (fDirectDescendent) ? cntWorn : cntChildWorn, &refTotal = (fDirectDescendent) ? cntTotal : cntChildTotal; | ||
2432 | |||
2433 | if (rlvIsWearingItem(pItem)) | ||
2434 | refWorn++; | ||
2435 | refTotal++; | ||
2436 | } | ||
2437 | |||
2438 | wiFolder = (0 == cntTotal + cntChildTotal) ? 0 : (0 == cntWorn + cntChildWorn) ? 1 : | ||
2439 | (cntWorn + cntChildWorn != cntTotal + cntChildTotal) ? 2 : 3; | ||
2440 | wiChildren = (0 == cntChildTotal) ? 0 : (0 == cntChildWorn) ? 1 : (cntChildWorn != cntChildTotal) ? 2 : 3; | ||
2441 | |||
2442 | return true; | ||
2443 | } | ||
2444 | |||
2445 | // ============================================================================ | ||
2446 | // Initialization helper functions | ||
2447 | // | ||
2448 | |||
2449 | BOOL RlvHandler::setEnabled(BOOL fEnable) | ||
2450 | { | ||
2451 | if (m_fEnabled == fEnable) | ||
2452 | return fEnable; | ||
2453 | |||
2454 | if (fEnable) | ||
2455 | { | ||
2456 | if (gSavedSettings.controlExists(RLV_SETTING_NOSETENV)) | ||
2457 | fNoSetEnv = gSavedSettings.getBOOL(RLV_SETTING_NOSETENV); | ||
2458 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) | ||
2459 | fLegacyNaming = gSavedSettings.getBOOL(RLV_SETTING_ENABLELEGACYNAMING); | ||
2460 | if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS)) | ||
2461 | RlvSettings::fShowNameTags = gSavedSettings.getBOOL(RLV_SETTING_SHOWNAMETAGS); | ||
2462 | |||
2463 | RlvCommand::initLookupTable(); | ||
2464 | gRlvHandler.addObserver(new RlvExtGetSet()); | ||
2465 | |||
2466 | if (LLStartUp::getStartupState() >= STATE_CLEANUP) | ||
2467 | fetchSharedInventory(); | ||
2468 | |||
2469 | m_fEnabled = TRUE; | ||
2470 | } | ||
2471 | else if (canDisable()) | ||
2472 | { | ||
2473 | #ifdef RLV_DEBUG | ||
2474 | RLV_INFOS << "Disabling RLV:" << LL_ENDL; | ||
2475 | #endif // RLV_DEBUG | ||
2476 | |||
2477 | gRlvHandler.clearState(); | ||
2478 | |||
2479 | #ifdef RLV_DEBUG | ||
2480 | RLV_INFOS << "\t--> RLV disabled" << LL_ENDL; | ||
2481 | #endif // RLV_DEBUG | ||
2482 | |||
2483 | m_fEnabled = FALSE; | ||
2484 | } | ||
2485 | |||
2486 | #ifdef RLV_ADVANCED_MENU | ||
2487 | // RELEASE-RLVa: LL defines CLIENT_MENU_NAME but we can't get to it from here so we need to keep those two in sync manually | ||
2488 | LLMenuGL* pClientMenu = NULL; | ||
2489 | if ( (gMenuBarView) && ((pClientMenu = gMenuBarView->getChildMenuByName("Advanced", FALSE)) != NULL) ) | ||
2490 | { | ||
2491 | pClientMenu->setItemVisible("RLVa", m_fEnabled); | ||
2492 | pClientMenu->setItemEnabled("RLVa", m_fEnabled); | ||
2493 | } | ||
2494 | #endif // RLV_ADVANCED_MENU | ||
2495 | |||
2496 | return m_fEnabled; // Return enabled/disabled state | ||
2497 | } | ||
2498 | |||
2499 | BOOL RlvHandler::canDisable() | ||
2500 | { | ||
2501 | return TRUE; | ||
2502 | } | ||
2503 | |||
2504 | void RlvHandler::clearState() | ||
2505 | { | ||
2506 | // TODO-RLVa: should restore all RLV controlled debug variables to their defaults | ||
2507 | |||
2508 | // Issue @clear on behalf of every object that has a currently active RLV restriction (even if it's just an exception) | ||
2509 | LLUUID idObj; LLViewerObject* pObj; bool fDetachable; | ||
2510 | while (m_Objects.size()) | ||
2511 | { | ||
2512 | idObj = m_Objects.begin()->first; // Need a copy since after @clear the data it points to will no longer exist | ||
2513 | fDetachable = ((pObj = gObjectList.findObject(idObj)) != NULL) ? isDetachable(pObj) : true; | ||
2514 | |||
2515 | processCommand(idObj, "clear", false); | ||
2516 | if (!fDetachable) | ||
2517 | processCommand(idObj, "detachme=force", false); | ||
2518 | } | ||
2519 | |||
2520 | // Sanity check - these should all be empty after we issue @clear on the last object | ||
2521 | if ( (!m_Objects.empty()) || !(m_Exceptions.empty()) || (!m_Attachments.empty()) ) | ||
2522 | { | ||
2523 | RLV_ERRS << "Object, exception or attachment map not empty after clearing state!" << LL_ENDL; | ||
2524 | m_Objects.clear(); | ||
2525 | m_Exceptions.clear(); | ||
2526 | m_Attachments.clear(); | ||
2527 | } | ||
2528 | |||
2529 | // These all need manual clearing | ||
2530 | memset(m_LayersAdd, 0, sizeof(S16) * WT_COUNT); | ||
2531 | memset(m_LayersRem, 0, sizeof(S16) * WT_COUNT); | ||
2532 | memset(m_Behaviours, 0, sizeof(S16) * RLV_BHVR_COUNT); | ||
2533 | m_AttachPending.clear(); | ||
2534 | m_Emitter.clearObservers(); // <- calls delete on all active observers | ||
2535 | |||
2536 | // Clear dynamically allocated memory | ||
2537 | if (m_pGCTimer) | ||
2538 | { | ||
2539 | delete m_pGCTimer; | ||
2540 | m_pGCTimer = NULL; | ||
2541 | } | ||
2542 | if (m_pWLSnapshot) | ||
2543 | { | ||
2544 | delete m_pWLSnapshot; | ||
2545 | m_pWLSnapshot = NULL; | ||
2546 | } | ||
2547 | } | ||
2548 | |||
2549 | // ============================================================================ | ||
diff --git a/linden/indra/newview/rlvhandler.h b/linden/indra/newview/rlvhandler.h new file mode 100644 index 0000000..df3ff9b --- /dev/null +++ b/linden/indra/newview/rlvhandler.h | |||
@@ -0,0 +1,462 @@ | |||
1 | #ifndef RLV_HANDLER_H | ||
2 | #define RLV_HANDLER_H | ||
3 | |||
4 | #include "llagentconstants.h" | ||
5 | #include "llappviewer.h" | ||
6 | #include "llformat.h" | ||
7 | #include "llversionviewer.h" | ||
8 | #include "llviewerjointattachment.h" | ||
9 | #include "llviewerobject.h" | ||
10 | #include "llwearable.h" | ||
11 | |||
12 | #include "rlvhelper.h" | ||
13 | #include "rlvevent.h" | ||
14 | #include "rlvmultistringsearch.h" | ||
15 | |||
16 | // ============================================================================ | ||
17 | /* | ||
18 | * RlvHandler | ||
19 | * ========== | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | typedef std::map<LLUUID, RlvObject> rlv_object_map_t; | ||
24 | typedef std::multimap<S32, LLUUID> rlv_detach_map_t; | ||
25 | typedef std::map<S32, LLUUID> rlv_reattach_map_t; | ||
26 | typedef std::multimap<LLUUID, ERlvBehaviour> rlv_exception_map_t; | ||
27 | typedef std::map<S32, RlvRedirInfo> rlv_redir_map_t; | ||
28 | |||
29 | class RlvHandler | ||
30 | { | ||
31 | public: | ||
32 | RlvHandler(); | ||
33 | ~RlvHandler(); | ||
34 | |||
35 | // -------------------------------- | ||
36 | |||
37 | /* | ||
38 | * Rule checking functions | ||
39 | */ | ||
40 | public: | ||
41 | // Returns a pointer to the attachment point for a supplied parameter | ||
42 | LLViewerJointAttachment* getAttachPoint(const std::string& strText, bool fExact) const; | ||
43 | LLViewerJointAttachment* getAttachPoint(const LLInventoryItem* pItem, bool fStrict) const; | ||
44 | LLViewerJointAttachment* getAttachPoint(const LLInventoryCategory* pFolder, bool fStrict) const; | ||
45 | LLViewerJointAttachment* getAttachPointLegacy(const LLInventoryCategory* pFolder) const; | ||
46 | S32 getAttachPointIndex(std::string strText, bool fExact) const; | ||
47 | S32 getAttachPointIndex(LLViewerObject* pObj) const; | ||
48 | S32 getAttachPointIndex(const LLViewerJointAttachment* pObj) const; | ||
49 | bool hasAttachPointName(const LLInventoryItem* pItem, bool fStrict) const; | ||
50 | |||
51 | // Returns TRUE is at least one object contains the specified behaviour (and optional parameter) | ||
52 | // NOTE: - to check @detach=n -> hasLockedAttachment() / hasLockedHUD() / isDetachable() | ||
53 | // - to check @addoutfit=n -> isWearable() | ||
54 | // - to check @remoutfit=n -> isRemovable() | ||
55 | // - to check exceptions -> isException() | ||
56 | // (You *can* use hasBehaviour(); the specialized ones just don't have to iterate over all the objects) | ||
57 | bool hasBehaviour(ERlvBehaviour eBehaviour) const { return (eBehaviour < RLV_BHVR_COUNT) ? (0 != m_Behaviours[eBehaviour]) : false; } | ||
58 | bool hasBehaviour(const std::string& strBehaviour) const; | ||
59 | bool hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const; | ||
60 | bool hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const; | ||
61 | |||
62 | // Returns TRUE if at least one object (except the specified one) contains the specified behaviour | ||
63 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUID& idObj) const; | ||
64 | bool hasBehaviourExcept(const std::string& strBehaviour, const LLUUID& uuid) const; | ||
65 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const std::string& strOption, const LLUUID& idObj) const; | ||
66 | bool hasBehaviourExcept(const std::string& strBehaviour, const std::string& strOption, const LLUUID& idObj) const; | ||
67 | |||
68 | // Returns TRUE if there is at least 1 undetachable attachment | ||
69 | bool hasLockedAttachment() const { return (0 != m_Attachments.size()); } | ||
70 | // Returns TRUE if there is at least 1 undetachable HUD attachment | ||
71 | bool hasLockedHUD() const; | ||
72 | |||
73 | // Returns TRUE if the specified attachment point is detachable | ||
74 | bool isDetachable(S32 idxAttachPt) const { return (idxAttachPt) && (m_Attachments.find(idxAttachPt) == m_Attachments.end()); } | ||
75 | bool isDetachable(const LLInventoryItem* pItem) const; | ||
76 | bool isDetachable(LLViewerObject* pObj) const; | ||
77 | // Returns TRUE if the specified attachment point is set undetachable by anything other than pObj (or one of its children) | ||
78 | bool isDetachableExcept(S32 idxAttachPt, LLViewerObject* pObj) const; | ||
79 | // Marks the specified attachment point as (un)detachable (return value indicates success ; used by unit tests) | ||
80 | bool setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable); | ||
81 | bool setDetachable(LLViewerObject* pObj, const LLUUID& idRlvObj, bool fDetachable); | ||
82 | |||
83 | // Adds or removes an exception for the specified restriction | ||
84 | void addException(ERlvBehaviour eBehaviour, const LLUUID& uuid); | ||
85 | void removeException(ERlvBehaviour eBehaviour, const LLUUID& uuid); | ||
86 | // Returns TRUE is the specified UUID is exempt from a restriction (tplure/sendim/recvim/etc) | ||
87 | bool isException(ERlvBehaviour eBehaviour, const LLUUID& uuid) const; | ||
88 | bool isException(const std::string& strBehaviour, const LLUUID& uuid) const; | ||
89 | |||
90 | // Returns TRUE if the specified layer is removable (use hasBehaviour(RLV_BHVR_REMOUTFIT) for the general case) | ||
91 | bool isRemovable(EWearableType type) const { return (type < WT_COUNT) ? (0 == m_LayersRem[type]) : true; } | ||
92 | // Returns TRUE if the specified layer is not remoutfit blocked by any object (except the one specified by UUID) | ||
93 | bool isRemovableExcept(EWearableType type, const LLUUID& idObj) const; | ||
94 | // Returns TRUE if the inventory item is strippable by @detach or @remoutfit | ||
95 | bool isStrippable(const LLUUID& idItem) const; | ||
96 | // Returns TRUE if the specified layer is wearable (use hasBehaviour(RLV_BHVR_ADDOUTFIT) for the general case) | ||
97 | bool isWearable(EWearableType type) const { return (type < WT_COUNT) ? (0 == m_LayersAdd[type]) : true; } | ||
98 | |||
99 | // Returns TRUE if the composite folder doesn't contain any "locked" items | ||
100 | bool canTakeOffComposite(const LLInventoryCategory* pFolder) const; | ||
101 | // Returns TRUE if the folder is a composite folder and optionally returns the name | ||
102 | bool getCompositeInfo(const LLInventoryCategory* pFolder, std::string* pstrName) const; | ||
103 | // Returns TRUE if the inventory item belongs to a composite folder and optionally returns the name and composite folder | ||
104 | bool getCompositeInfo(const LLUUID& idItem, std::string* pstrName, LLViewerInventoryCategory** ppFolder) const; | ||
105 | // Returns TRUE if the folder is a composite folder | ||
106 | bool isCompositeFolder(const LLInventoryCategory* pFolder) const; | ||
107 | // Returns TRUE if the inventory item belongs to a composite folder | ||
108 | bool isCompositeDescendent(const LLUUID& idItem) const; | ||
109 | // Returns TRUE if the inventory item is part of a folded composite folder and should be hidden from @getoufit or @getattach | ||
110 | bool isHiddenCompositeItem(const LLUUID& idItem, const std::string& strItemType) const; | ||
111 | |||
112 | // -------------------------------- | ||
113 | |||
114 | /* | ||
115 | * Helper functions | ||
116 | */ | ||
117 | public: | ||
118 | // Accessors | ||
119 | bool getCanCancelTp() const { return m_fCanCancelTp; } // @accepttp and @tpto | ||
120 | void setCanCancelTp(bool fAllow) { m_fCanCancelTp = fAllow; } // @accepttp and @tpto | ||
121 | |||
122 | // Command specific helper functions | ||
123 | bool canShowHoverText(LLViewerObject* pObj) const; // @showhovertext* command family | ||
124 | void filterChat(std::string& strUTF8Text, bool fFilterEmote) const; // @sendchat, @recvchat and @redirchat | ||
125 | void filterLocation(std::string& strUTF8Text) const; // @showloc | ||
126 | void filterNames(std::string& strUTF8Text) const; // @shownames | ||
127 | const std::string& getAnonym(const std::string& strName) const; // @shownames | ||
128 | std::string getVersionString() const; // @version | ||
129 | BOOL isAgentNearby(const LLUUID& uuid) const; // @shownames | ||
130 | bool redirectChatOrEmote(const std::string& strUTF8Test) const; // @redirchat and @rediremote | ||
131 | |||
132 | // Command processing helper functions | ||
133 | BOOL processCommand(const LLUUID& idObj, const std::string& strCommand, bool fFromObj); | ||
134 | void processRetainedCommands(); | ||
135 | void retainCommand(const std::string& strObj, const LLUUID& idObj, const std::string& strCmd); | ||
136 | |||
137 | // Returns a pointer to the currently executing command (do *not* save this pointer) | ||
138 | const RlvCommand* getCurrentCommand() const { return m_pCurCommand; } | ||
139 | // Returns the UUID of the object we're currently executing a command for | ||
140 | const LLUUID& getCurrentObject() const { return m_idCurObject; } | ||
141 | |||
142 | // Initialization | ||
143 | static BOOL canDisable(); | ||
144 | static BOOL isEnabled() { return m_fEnabled; } | ||
145 | static void initLookupTables(); | ||
146 | static BOOL setEnabled(BOOL fEnable); | ||
147 | protected: | ||
148 | void clearState(); | ||
149 | |||
150 | // -------------------------------- | ||
151 | |||
152 | /* | ||
153 | * Inventory related functions | ||
154 | */ | ||
155 | public: | ||
156 | // Starts a fetch of everything under the shared root (if there is one) | ||
157 | static void fetchSharedInventory(); | ||
158 | // Returns the path of the supplied folder (relative to the shared root) | ||
159 | std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const; | ||
160 | std::string getSharedPath(const LLUUID& idFolder) const; | ||
161 | // Returns a pointer to the shared root folder (if there is one) | ||
162 | static LLViewerInventoryCategory* getSharedRoot(); | ||
163 | // A "folded folder" is a folder whose items logically belong to the grandparent rather than the parent | ||
164 | bool isFoldedFolder(const LLInventoryCategory* pFolder, bool fAttach) const; | ||
165 | bool isFoldedFolderLegacy(const LLInventoryCategory* pFolder, bool fAttach) const; | ||
166 | protected: | ||
167 | // Find all folders that match a supplied criteria (clears the supplied array) | ||
168 | bool findSharedFolders(const std::string& strCriteria, LLInventoryModel::cat_array_t& folders) const; | ||
169 | |||
170 | // Returns a subfolder of idParent that starts with name (exact match > partial match) | ||
171 | LLViewerInventoryCategory* getSharedFolder(const LLUUID& idParent, const std::string& strName) const; | ||
172 | // Looks up a folder from a path (relative to the shared root) | ||
173 | LLViewerInventoryCategory* getSharedFolder(const std::string& strPath) const; | ||
174 | |||
175 | bool getWornInfo(const LLInventoryCategory* pFolder, U8& wiFolder, U8& wiChildren) const; | ||
176 | |||
177 | // -------------------------------- | ||
178 | |||
179 | /* | ||
180 | * Event handling (forwards to registered observers if we don't handle the command) | ||
181 | */ | ||
182 | public: | ||
183 | BOOL addObserver(RlvObserver* pObserver) { return m_Emitter.addObserver(pObserver); } | ||
184 | BOOL removeObserver(RlvObserver* pObserver) { return m_Emitter.remObserver(pObserver); } | ||
185 | void addBehaviourObserver(RlvBehaviourObserver* pBhvrObserver); | ||
186 | void removeBehaviourObserver(RlvBehaviourObserver* pBhvrObserver); | ||
187 | void notifyBehaviourObservers(const RlvCommand& rlvCmd, bool fInternal); | ||
188 | |||
189 | // Externally invoked event handlers | ||
190 | void onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded); // LLVOAvatar::attachObject() | ||
191 | void onDetach(LLViewerJointAttachment* pAttachPt); // LLVOAvatar::detachObject() | ||
192 | bool onGC(); // RlvGCTimer::tick() | ||
193 | void onSavedAssetIntoInventory(const LLUUID& idItem); // LLInventoryModel::processSaveAssetIntoInventory() | ||
194 | protected: | ||
195 | BOOL processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | ||
196 | BOOL processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | ||
197 | BOOL processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | ||
198 | BOOL processForceCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | ||
199 | |||
200 | // Command handlers (exist for no other reason than to keep the length of the processXXX functions down) | ||
201 | void onForceDetach(const LLUUID& idObj, const std::string& strOption) const; | ||
202 | void onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const; | ||
203 | bool onForceSit(const LLUUID& uuid, const std::string& strOption) const; | ||
204 | void onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const; | ||
205 | bool onGetPath(const LLUUID& uuid, const std::string& strOption, std::string& strReply) const; | ||
206 | void onGetInvWorn(const std::string& strPath, std::string &strReply) const; | ||
207 | |||
208 | // -------------------------------- | ||
209 | |||
210 | /* | ||
211 | * Member variables | ||
212 | */ | ||
213 | public: | ||
214 | static BOOL fNoSetEnv; | ||
215 | static BOOL fLegacyNaming; | ||
216 | |||
217 | static const std::string cstrSharedRoot; // Name of the shared root folder | ||
218 | static const std::string cstrBlockedRecvIM; // Stand-in text for incoming IM when recvim restricted | ||
219 | static const std::string cstrBlockedSendIM; // Stand-in text for outgoing IM when sendim restricted | ||
220 | static const std::string cstrHidden; // General purpose "this was censored" text | ||
221 | static const std::string cstrHiddenParcel; | ||
222 | static const std::string cstrHiddenRegion; | ||
223 | static const std::string cstrMsgRecvIM; // Message sent to IM sender when sendim restricted | ||
224 | static const std::string cstrMsgTpLure; // Message sent to tplure sender when tplure restricted | ||
225 | static const std::string cstrAnonyms[28]; | ||
226 | protected: | ||
227 | rlv_object_map_t m_Objects; // Map of objects that have active restrictions (by UUID) | ||
228 | rlv_exception_map_t m_Exceptions; // Map of UUIDs that are exempt from the associated ERlvBehaviour | ||
229 | rlv_detach_map_t m_Attachments; // Map of locked attachments (attachment point index -> object that issued @detach=n) | ||
230 | S16 m_LayersAdd[WT_COUNT]; // Array of locked layers (reference counted) | ||
231 | S16 m_LayersRem[WT_COUNT]; // Array of locked layers (reference counted) | ||
232 | S16 m_Behaviours[RLV_BHVR_COUNT]; | ||
233 | |||
234 | rlv_retained_list_t m_Retained; | ||
235 | rlv_reattach_map_t m_AttachPending; | ||
236 | rlv_reattach_map_t m_DetachPending; | ||
237 | rlv_redir_map_t m_Redirections; | ||
238 | RlvGCTimer* m_pGCTimer; | ||
239 | RlvWLSnapshot* m_pWLSnapshot; | ||
240 | |||
241 | RlvCommand* m_pCurCommand; // Convenience (see @tpto) | ||
242 | LLUUID m_idCurObject; // Convenience (see @tpto) | ||
243 | |||
244 | mutable RlvEventEmitter<RlvObserver> m_Emitter; | ||
245 | mutable std::list<RlvBehaviourObserver*> m_BhvrObservers; | ||
246 | RlvBehaviourNotifyObserver* m_pBhvrNotify; | ||
247 | |||
248 | static BOOL m_fEnabled; // Use setEnabled() to toggle this | ||
249 | static BOOL m_fFetchStarted; // TRUE if we fired off an inventory fetch | ||
250 | static BOOL m_fFetchComplete; // TRUE if everything was fetched | ||
251 | static RlvMultiStringSearch m_AttachLookup; // Lookup table for attachment names (lower case) | ||
252 | |||
253 | bool m_fCanCancelTp; | ||
254 | |||
255 | friend class RlvSharedRootFetcher; // Fetcher needs access to m_fFetchComplete | ||
256 | friend class RlvGCTimer; // Timer clear its own point at destruction | ||
257 | |||
258 | // -------------------------------- | ||
259 | |||
260 | /* | ||
261 | * Internal access functions used by unit tests | ||
262 | */ | ||
263 | public: | ||
264 | const rlv_object_map_t* getObjectMap() const { return &m_Objects; } | ||
265 | const rlv_exception_map_t* getExceptionMap() const { return &m_Exceptions; } | ||
266 | const rlv_detach_map_t* getDetachMap() const { return &m_Attachments; } | ||
267 | #ifdef RLV_DEBUG_TESTS | ||
268 | const S16* getAddLayers() const { return m_LayersAdd; } | ||
269 | const S16* getRemLayers() const { return m_LayersRem; } | ||
270 | const S16* getBehaviours() const { return m_Behaviours; } | ||
271 | const rlv_retained_list_t* getRetainedList() const { return &m_Retained; } | ||
272 | #endif // RLV_DEBUG_TESTS | ||
273 | }; | ||
274 | |||
275 | typedef RlvHandler rlv_handler_t; | ||
276 | extern rlv_handler_t gRlvHandler; | ||
277 | |||
278 | // ============================================================================ | ||
279 | // Inlined member functions | ||
280 | // | ||
281 | |||
282 | // Checked: 2009-07-09 (RLVa-1.0.0f) | ||
283 | inline void RlvHandler::addException(ERlvBehaviour eBehaviour, const LLUUID& uuid) | ||
284 | { | ||
285 | if (!uuid.isNull()) | ||
286 | m_Exceptions.insert(std::pair<LLUUID, ERlvBehaviour>(uuid, eBehaviour)); | ||
287 | } | ||
288 | |||
289 | // Checked: 2009-07-09 (RLVa-1.0.0f) | Modified: RLVa-1.0.0f | ||
290 | inline bool RlvHandler::canShowHoverText(LLViewerObject *pObj) const | ||
291 | { | ||
292 | return ( (!pObj) || (LL_PCODE_VOLUME != pObj->getPCode()) || | ||
293 | !( (hasBehaviour(RLV_BHVR_SHOWHOVERTEXTALL)) || | ||
294 | ( (hasBehaviour(RLV_BHVR_SHOWHOVERTEXTWORLD)) && (!pObj->isHUDAttachment()) ) || | ||
295 | ( (hasBehaviour(RLV_BHVR_SHOWHOVERTEXTHUD)) && (pObj->isHUDAttachment()) ) || | ||
296 | (isException(RLV_BHVR_SHOWHOVERTEXT, pObj->getID())) ) ); | ||
297 | } | ||
298 | |||
299 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
300 | inline S32 RlvHandler::getAttachPointIndex(std::string strText, bool fExact) const | ||
301 | { | ||
302 | U16 nParam; RlvMultiStringSearchMatch match; | ||
303 | LLStringUtil::toLower(strText); | ||
304 | return (fExact) ? ((m_AttachLookup.getExactMatchParam(strText, nParam)) ? nParam : 0) | ||
305 | : ((m_AttachLookup.findLast(strText, match)) ? match.nParam : 0); | ||
306 | } | ||
307 | |||
308 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
309 | inline S32 RlvHandler::getAttachPointIndex(LLViewerObject* pObj) const | ||
310 | { | ||
311 | return (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getState()) : 0; | ||
312 | } | ||
313 | |||
314 | // Checked: 2009-06-02 (RLVa-0.2.0g) | ||
315 | inline std::string RlvHandler::getSharedPath(const LLUUID& idFolder) const | ||
316 | { | ||
317 | return getSharedPath(gInventory.getCategory(idFolder)); // getSharedPath() has a NULL pointer check so this is safe | ||
318 | } | ||
319 | |||
320 | // Checked: 2009-06-07 (RLVa-0.2.1c) | ||
321 | inline std::string RlvHandler::getVersionString() const | ||
322 | { | ||
323 | return llformat("RestrainedLife viewer v%d.%d.%d (%s %d.%d.%d.%d - RLVa %d.%d.%d)", | ||
324 | RLV_VERSION_MAJOR, RLV_VERSION_MINOR, RLV_VERSION_PATCH, | ||
325 | LLAppViewer::instance()->getSecondLifeTitle().c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD, | ||
326 | RLVa_VERSION_MAJOR, RLVa_VERSION_MINOR, RLVa_VERSION_PATCH); | ||
327 | } | ||
328 | |||
329 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
330 | inline bool RlvHandler::hasAttachPointName(const LLInventoryItem *pItem, bool fStrict) const | ||
331 | { | ||
332 | return (getAttachPoint(pItem, fStrict) != NULL); // getAttachPoint() has a NULL pointer check so this is safe | ||
333 | } | ||
334 | |||
335 | // Checked: | ||
336 | inline bool RlvHandler::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const | ||
337 | { | ||
338 | return hasBehaviourExcept(eBehaviour, strOption, LLUUID::null); | ||
339 | } | ||
340 | |||
341 | // Checked: | ||
342 | inline bool RlvHandler::hasBehaviour(const std::string& strBehaviour) const | ||
343 | { | ||
344 | return hasBehaviourExcept(strBehaviour, LLUUID::null); | ||
345 | } | ||
346 | |||
347 | // Checked: | ||
348 | inline bool RlvHandler::hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const | ||
349 | { | ||
350 | return hasBehaviourExcept(strBehaviour, strOption, LLUUID::null); | ||
351 | } | ||
352 | |||
353 | // Checked: | ||
354 | inline bool RlvHandler::hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUID& idObj) const | ||
355 | { | ||
356 | return hasBehaviourExcept(eBehaviour, std::string(), idObj); | ||
357 | } | ||
358 | |||
359 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
360 | // Checked: | ||
361 | inline bool RlvHandler::isCompositeFolder(const LLInventoryCategory* pFolder) const | ||
362 | { | ||
363 | return getCompositeInfo(pFolder, NULL); | ||
364 | } | ||
365 | |||
366 | // Checked: | ||
367 | inline bool RlvHandler::isCompositeDescendent(const LLUUID& idItem) const | ||
368 | { | ||
369 | return getCompositeInfo(idItem, NULL, NULL); | ||
370 | } | ||
371 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
372 | |||
373 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
374 | inline bool RlvHandler::isDetachable(LLViewerObject* pObj) const | ||
375 | { | ||
376 | return (pObj == NULL) || (!pObj->isAttachment()) || (isDetachable(getAttachPointIndex(pObj))); | ||
377 | } | ||
378 | |||
379 | // Checked: | ||
380 | inline bool RlvHandler::isException(ERlvBehaviour eBehaviour, const LLUUID& uuid) const | ||
381 | { | ||
382 | for (rlv_exception_map_t::const_iterator itException = m_Exceptions.lower_bound(uuid), | ||
383 | endException = m_Exceptions.upper_bound(uuid); itException != endException; ++itException) | ||
384 | { | ||
385 | if (itException->second == eBehaviour) | ||
386 | return true; | ||
387 | } | ||
388 | return false; | ||
389 | } | ||
390 | |||
391 | // Checked: | ||
392 | inline bool RlvHandler::isException(const std::string& strBehaviour, const LLUUID& uuid) const | ||
393 | { | ||
394 | return hasBehaviour(strBehaviour, uuid.asString()); | ||
395 | } | ||
396 | |||
397 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Added: RLVa-1.0.1b | ||
398 | inline bool RlvHandler::isFoldedFolder(const LLInventoryCategory* pFolder, bool fAttach) const | ||
399 | { | ||
400 | return | ||
401 | ( | ||
402 | // .(<attachpt>) type folder (on detach we don't care about its children, but on attach there can only be 1 attachment) | ||
403 | ( (gRlvHandler.getAttachPoint(pFolder, true)) && | ||
404 | ( (!fAttach) || (1 == rlvGetDirectDescendentsCount(pFolder, LLAssetType::AT_OBJECT))) ) | ||
405 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
406 | // .(nostrip) folder | ||
407 | || ( (pFolder) && (".("RLV_FOLDER_FLAG_NOSTRIP")" == pFolder->getName()) ) | ||
408 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
409 | ); | ||
410 | } | ||
411 | |||
412 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Added: RLVa-0.2.0d | ||
413 | inline bool RlvHandler::isRemovableExcept(EWearableType type, const LLUUID& idObj) const | ||
414 | { | ||
415 | // NOTE: mind the bitwise OR rather than the logical OR!! | ||
416 | return (isRemovable(type)) || !( (hasBehaviourExcept(RLV_BHVR_REMOUTFIT, idObj)) | | ||
417 | (hasBehaviourExcept(RLV_BHVR_REMOUTFIT, LLWearable::typeToTypeName(type), idObj)) ); | ||
418 | } | ||
419 | |||
420 | #ifndef RLV_EXTENSION_FLAG_NOSTRIP | ||
421 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Added: RLVa-0.2.0d | ||
422 | bool RlvHandler::isStrippable(const LLUUID& idItem) const | ||
423 | { | ||
424 | return true; | ||
425 | } | ||
426 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
427 | |||
428 | // Checked: 2009-07-09 (RLVa-1.0.0f) | ||
429 | inline void RlvHandler::removeException(ERlvBehaviour eBehaviour, const LLUUID &uuid) | ||
430 | { | ||
431 | if (!uuid.isNull()) | ||
432 | { | ||
433 | for (rlv_exception_map_t::iterator itException = m_Exceptions.lower_bound(uuid), | ||
434 | endException = m_Exceptions.upper_bound(uuid); itException != endException; ++itException) | ||
435 | { | ||
436 | if (itException->second == eBehaviour) | ||
437 | { | ||
438 | m_Exceptions.erase(itException); | ||
439 | break; | ||
440 | } | ||
441 | } | ||
442 | } | ||
443 | } | ||
444 | |||
445 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
446 | inline void RlvHandler::retainCommand(const std::string& strObj, const LLUUID& idObj, const std::string& strCmd) | ||
447 | { | ||
448 | #ifdef RLV_DEBUG | ||
449 | RLV_INFOS << "[" << idObj << "]: " << strCmd << " (retaining)" << LL_ENDL; | ||
450 | #endif // RLV_DEBUG | ||
451 | m_Retained.push_back(RlvRetainedCommand(strObj, idObj, strCmd)); | ||
452 | } | ||
453 | |||
454 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
455 | inline bool RlvHandler::setDetachable(LLViewerObject* pObj, const LLUUID& idRlvObj, bool fDetachable) | ||
456 | { | ||
457 | return setDetachable(getAttachPointIndex(pObj), idRlvObj, fDetachable); // getAttachPointIndex() has a NULL pointer check | ||
458 | } | ||
459 | |||
460 | // ============================================================================ | ||
461 | |||
462 | #endif // RLV_HANDLER_H | ||
diff --git a/linden/indra/newview/rlvhelper.cpp b/linden/indra/newview/rlvhelper.cpp new file mode 100644 index 0000000..6b2a1a0 --- /dev/null +++ b/linden/indra/newview/rlvhelper.cpp | |||
@@ -0,0 +1,674 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | ||
2 | #include "llagent.h" | ||
3 | #include "llviewerobject.h" | ||
4 | #include "llviewerstats.h" | ||
5 | #include "llviewerwindow.h" | ||
6 | #include "llvoavatar.h" | ||
7 | #include "llwlparammanager.h" | ||
8 | |||
9 | #include "rlvhelper.h" | ||
10 | #include "rlvevent.h" | ||
11 | #include "rlvhandler.h" | ||
12 | |||
13 | // ============================================================================ | ||
14 | // Static variable initialization | ||
15 | // | ||
16 | |||
17 | RlvMultiStringSearch RlvCommand::m_BhvrLookup; | ||
18 | |||
19 | // ============================================================================ | ||
20 | |||
21 | // Checked: | ||
22 | RlvCommand::RlvCommand(const std::string& strCommand) | ||
23 | : m_eBehaviour(RLV_BHVR_UNKNOWN), m_eParamType(RLV_TYPE_UNKNOWN) | ||
24 | { | ||
25 | if ((m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam))) | ||
26 | { | ||
27 | if ( ("n" == m_strParam) || ("add" == m_strParam) ) | ||
28 | m_eParamType = RLV_TYPE_ADD; | ||
29 | else if ( ("y" == m_strParam) || ("rem" == m_strParam) ) | ||
30 | m_eParamType = RLV_TYPE_REMOVE; | ||
31 | else if ("force" == m_strParam) | ||
32 | m_eParamType = RLV_TYPE_FORCE; | ||
33 | else | ||
34 | { | ||
35 | m_eParamType = RLV_TYPE_REPLY; // Assume it's a reply command until we encounter a non-digit | ||
36 | |||
37 | if ( (m_strParam.empty()) || (-1 != m_strParam.find_first_not_of("0123456789")) ) | ||
38 | { | ||
39 | m_eParamType = RLV_TYPE_UNKNOWN; | ||
40 | m_fValid = ("clear" == m_strBehaviour); | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | if (!m_fValid) | ||
46 | { | ||
47 | m_strBehaviour = m_strOption = m_strParam = ""; | ||
48 | return; | ||
49 | } | ||
50 | |||
51 | U16 nBehaviour; | ||
52 | if (m_BhvrLookup.getExactMatchParam(m_strBehaviour, nBehaviour)) | ||
53 | { | ||
54 | m_eBehaviour = (ERlvBehaviour)nBehaviour; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | RlvCommand::RlvCommand(const RlvCommand& rlvCmd) | ||
59 | : m_fValid(rlvCmd.m_fValid), | ||
60 | m_strBehaviour(rlvCmd.m_strBehaviour), m_eBehaviour(rlvCmd.m_eBehaviour), | ||
61 | m_strOption(rlvCmd.m_strOption), | ||
62 | m_strParam(rlvCmd.m_strParam), m_eParamType(rlvCmd.m_eParamType) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | // ============================================================================ | ||
67 | |||
68 | /* | ||
69 | * ------------------------------ | ||
70 | * Command | RLV | RLVa | ||
71 | * ------------------------------ | ||
72 | * : | F | F (missing behaviour) | ||
73 | * :option | F | F (missing behaviour) | ||
74 | * := | T | F (missing behaviour) | ||
75 | * :option= | T | F (missing behaviour) | ||
76 | * :option=param | T | F (missing behaviour) | ||
77 | * = | T | F (missing behaviour) | ||
78 | * =param | T | F (missing behaviour) | ||
79 | * cmd | F | F (missing param) [T if <behaviour> == "clear"] | ||
80 | * cmd: | F | F (missing param) | ||
81 | * cmd:option | F | F (missing param) | ||
82 | * cmd:= | T | F (missing param) [1] | ||
83 | * cmd:option= | T | F (missing param) [1] | ||
84 | * cmd= | T | F (missing param) [1] | ||
85 | * cmd:option=param | T | T | ||
86 | * cmd=param | T | T | ||
87 | * cmd:=param | T | T | ||
88 | * | ||
89 | * [1] 'clear:=', 'clear:option=' and 'clear=' are "valid" variations of 'clear' | ||
90 | */ | ||
91 | |||
92 | BOOL RlvCommand::parseCommand(/*[in]*/ const std::string& strCommand, | ||
93 | /*[out]*/ std::string& strBehaviour, /*[out]*/ std::string& strOption, /*[out]*/ std::string& strParam) | ||
94 | { | ||
95 | // Format: <behaviour>[:<option>]=<param> | ||
96 | int idxParam = strCommand.find('='); | ||
97 | int idxOption = (idxParam > 0) ? strCommand.find(':') : -1; | ||
98 | if (idxOption > idxParam - 1) | ||
99 | idxOption = -1; | ||
100 | |||
101 | // If <behaviour> is missing it's always an improperly formatted command | ||
102 | if ( (0 == idxOption) || (0 == idxParam) ) | ||
103 | return FALSE; | ||
104 | |||
105 | strBehaviour = strCommand.substr(0, (-1 != idxOption) ? idxOption : idxParam); | ||
106 | strOption = strParam = ""; | ||
107 | |||
108 | // If <param> is missing it's an improperly formatted command | ||
109 | if ( (-1 == idxParam) || ((int)strCommand.length() - 1 == idxParam) ) | ||
110 | { | ||
111 | // Unless "<behaviour> == "clear" AND (idxOption == 0)" | ||
112 | // OR <behaviour> == "clear" AND (idxParam != 0) [see table above] | ||
113 | if ( ("clear" == strBehaviour) && ( (!idxOption) || (idxParam) ) ) | ||
114 | return TRUE; | ||
115 | return FALSE; | ||
116 | } | ||
117 | |||
118 | if ( (-1 != idxOption) && (idxOption + 1 != idxParam) ) | ||
119 | strOption = strCommand.substr(idxOption + 1, idxParam - idxOption - 1); | ||
120 | strParam = strCommand.substr(idxParam + 1); | ||
121 | |||
122 | return TRUE; | ||
123 | } | ||
124 | |||
125 | void RlvCommand::initLookupTable() | ||
126 | { | ||
127 | static bool fInitialized = false; | ||
128 | if (!fInitialized) | ||
129 | { | ||
130 | // NOTE: keep this match with the enumeration at all times | ||
131 | std::string arBehaviours[RLV_BHVR_COUNT] = | ||
132 | { | ||
133 | "version", "detach", "redirchat", "rediremote", "sendim", "recvchat", "recvemote", "recvim", "tploc", "tplure", | ||
134 | "sittp", "edit", "rez", "addoutfit", "remoutfit", "getoutfit", "getattach", "showinv", "unsit", "sit", | ||
135 | "getstatus", "getstatusall", "getinv", "getinvworn", "findfolder", "findfolders", "attach", "attachall", "detachall", | ||
136 | "getpath", "attachthis", "attachallthis", "detachthis", "detachallthis", "fartouch", "showworldmap", "showminimap", | ||
137 | "showloc", "tpto", "accepttp", "shownames", "fly", "getsitid", "setdebug", "setenv", "detachme", | ||
138 | "showhovertextall", "showhovertextworld", "showhovertexthud", "showhovertext", "notify" | ||
139 | }; | ||
140 | |||
141 | for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++) | ||
142 | m_BhvrLookup.addKeyword(arBehaviours[idxBvhr], idxBvhr); | ||
143 | |||
144 | fInitialized = true; | ||
145 | } | ||
146 | } | ||
147 | |||
148 | // Checked: 2009-06-07 (RLVa-0.2.1c) | ||
149 | std::string RlvCommand::asString() const | ||
150 | { | ||
151 | return (!m_strOption.empty()) ? (std::string(m_strBehaviour)).append(":").append(m_strOption) : (std::string(m_strBehaviour)); | ||
152 | } | ||
153 | |||
154 | // ========================================================================= | ||
155 | |||
156 | BOOL RlvObject::addCommand(const RlvCommand& rlvCmd) | ||
157 | { | ||
158 | // Sanity checking | ||
159 | if (RLV_TYPE_ADD != rlvCmd.getParamType()) | ||
160 | return FALSE; | ||
161 | |||
162 | // Don't add duplicate commands for this object (ie @detach=n followed by another @detach=n later on) | ||
163 | BOOL fDuplicate = | ||
164 | (RLV_BHVR_UNKNOWN != rlvCmd.getBehaviourType()) | ||
165 | ? hasBehaviour(rlvCmd.getBehaviourType(), rlvCmd.getOption()) | ||
166 | : hasBehaviour(rlvCmd.getBehaviour(), rlvCmd.getOption()); | ||
167 | if (fDuplicate) | ||
168 | return FALSE; | ||
169 | |||
170 | // Now that we know it's not a duplicate, add it to the end of the list | ||
171 | m_Commands.push_back(rlvCmd); | ||
172 | |||
173 | return TRUE; | ||
174 | } | ||
175 | |||
176 | BOOL RlvObject::removeCommand(const RlvCommand& rlvCmd) | ||
177 | { | ||
178 | // Sanity checking | ||
179 | if (RLV_TYPE_REMOVE != rlvCmd.getParamType()) | ||
180 | return FALSE; | ||
181 | |||
182 | for (rlv_command_list_t::iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
183 | { | ||
184 | //if (*itCmd == rlvCmd) <- commands will never be equal since one is an add and the other is a remove *rolls eyes* | ||
185 | if ( (itCmd->getBehaviour() == rlvCmd.getBehaviour()) && (itCmd->getOption() == rlvCmd.getOption()) ) | ||
186 | { | ||
187 | m_Commands.erase(itCmd); | ||
188 | return TRUE; | ||
189 | } | ||
190 | } | ||
191 | return FALSE; // Command was never added so nothing to remove now | ||
192 | } | ||
193 | |||
194 | BOOL RlvObject::hasBehaviour(ERlvBehaviour eBehaviour) const | ||
195 | { | ||
196 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
197 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption().empty()) ) | ||
198 | return TRUE; | ||
199 | return FALSE; | ||
200 | } | ||
201 | |||
202 | BOOL RlvObject::hasBehaviour(const std::string& strBehaviour) const | ||
203 | { | ||
204 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
205 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption().empty()) ) | ||
206 | return TRUE; | ||
207 | return FALSE; | ||
208 | } | ||
209 | |||
210 | BOOL RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const | ||
211 | { | ||
212 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
213 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption() == strOption) ) | ||
214 | return TRUE; | ||
215 | return FALSE; | ||
216 | } | ||
217 | |||
218 | BOOL RlvObject::hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const | ||
219 | { | ||
220 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
221 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption() == strOption) ) | ||
222 | return TRUE; | ||
223 | return FALSE; | ||
224 | } | ||
225 | |||
226 | // Checked: 2009-06-07 (RLVa-0.2.1c) | ||
227 | std::string RlvObject::getStatusString(const std::string& strMatch) const | ||
228 | { | ||
229 | std::string strStatus, strCmd; | ||
230 | |||
231 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | ||
232 | { | ||
233 | strCmd = itCmd->asString(); | ||
234 | if ( (strMatch.empty()) || (std::string::npos != strCmd.find(strMatch)) ) | ||
235 | { | ||
236 | if (!strStatus.empty()) | ||
237 | strStatus.push_back('/'); | ||
238 | strStatus += strCmd; | ||
239 | } | ||
240 | } | ||
241 | |||
242 | return strStatus; | ||
243 | } | ||
244 | |||
245 | // ========================================================================= | ||
246 | /* | ||
247 | * Various helper classes/timers/functors | ||
248 | * | ||
249 | */ | ||
250 | |||
251 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
252 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type) | ||
253 | { | ||
254 | S32 cntType = 0; | ||
255 | if (pFolder) | ||
256 | { | ||
257 | LLInventoryModel::cat_array_t* pFolders; | ||
258 | LLInventoryModel::item_array_t* pItems; | ||
259 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
260 | |||
261 | if (pItems) | ||
262 | { | ||
263 | for (S32 idxItem = 0, cntItem = pItems->count(); idxItem < cntItem; idxItem++) | ||
264 | if (pItems->get(idxItem)->getType() == type) | ||
265 | cntType++; | ||
266 | } | ||
267 | } | ||
268 | return cntType; | ||
269 | } | ||
270 | |||
271 | // Checked: 2009-05-30 (RLVa-0.2.0e) | Added: RLVa-0.2.0e | ||
272 | const LLUUID& RlvWearableItemCollector::getFoldedParent(const LLUUID& idFolder) const | ||
273 | { | ||
274 | std::map<LLUUID, LLUUID>::const_iterator itFolder = m_Folding.end(), itCur = m_Folding.find(idFolder); | ||
275 | while (itCur != m_Folding.end()) | ||
276 | { | ||
277 | itFolder = itCur; | ||
278 | itCur = m_Folding.find(itFolder->second); | ||
279 | } | ||
280 | return (m_Folding.end() == itFolder) ? idFolder : itFolder->second; | ||
281 | } | ||
282 | |||
283 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Modified: RLVa-1.0.1b | ||
284 | bool RlvWearableItemCollector::onCollectFolder(const LLInventoryCategory* pFolder) | ||
285 | { | ||
286 | const LLUUID& idParent = pFolder->getParentUUID(); | ||
287 | if (m_Wearable.end() == std::find(m_Wearable.begin(), m_Wearable.end(), idParent)) | ||
288 | return false; // Not the child of a wearable folder == skip | ||
289 | |||
290 | const std::string& strFolder = pFolder->getName(); | ||
291 | if (strFolder.empty()) // Shouldn't happen but does... naughty Lindens | ||
292 | return false; | ||
293 | |||
294 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
295 | if ( (!m_fAttach) && (-1 != strFolder.find(RLV_FOLDER_FLAG_NOSTRIP)) ) // Don't process "nostrip" folders on detach | ||
296 | return false; | ||
297 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
298 | |||
299 | if (gRlvHandler.isFoldedFolder(pFolder, m_fAttach)) // Check for folder that should get folded under its parent | ||
300 | { | ||
301 | m_Tentative.push_front(pFolder->getUUID()); | ||
302 | m_Folding.insert(std::pair<LLUUID, LLUUID>(pFolder->getUUID(), idParent)); | ||
303 | } | ||
304 | else if ( (RLV_FOLDER_PREFIX_HIDDEN != strFolder[0]) && (m_fMatchAll) ) // Collect from any non-hidden child folder for *all | ||
305 | { | ||
306 | m_Wearable.push_front(pFolder->getUUID()); | ||
307 | return (idParent == m_idFolder); // (Convenience for @getinvworn) | ||
308 | } | ||
309 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
310 | else if ( (RLV_FOLDER_PREFIX_HIDDEN == strFolder[0]) && // Hidden folder that's a... | ||
311 | (gRlvHandler.isCompositeFolder(pFolder)) && // ... composite folder which we... | ||
312 | ((m_fAttach) || (gRlvHandler.canTakeOffComposite(pFolder))) ) // ... attach or can detach (see composite locking) | ||
313 | { | ||
314 | m_Wearable.push_front(pFolder->getUUID()); | ||
315 | m_Folding.insert(std::pair<LLUUID, LLUUID>(pFolder->getUUID(), idParent)); | ||
316 | } | ||
317 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
318 | |||
319 | return false; | ||
320 | } | ||
321 | |||
322 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
323 | bool RlvWearableItemCollector::onCollectItem(const LLInventoryItem* pItem) | ||
324 | { | ||
325 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
326 | if ( (!m_fAttach) && (-1 != pItem->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) ) // Don't process "nostrip" items on detach | ||
327 | return false; | ||
328 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
329 | |||
330 | const LLUUID& idParent = pItem->getParentUUID(); bool fRet = false; | ||
331 | switch (pItem->getType()) | ||
332 | { | ||
333 | case LLAssetType::AT_BODYPART: | ||
334 | if (!m_fAttach) | ||
335 | break; // Don't process body parts on detach | ||
336 | case LLAssetType::AT_CLOTHING: | ||
337 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | ||
338 | fRet = ( (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)) || | ||
339 | ( (m_fAttach) && (m_Tentative.end() != std::find(m_Tentative.begin(), m_Tentative.end(), idParent)) && | ||
340 | (gInventory.getCategory(pItem->getParentUUID())->getName() == ".("RLV_FOLDER_FLAG_NOSTRIP")") ) ); | ||
341 | #else | ||
342 | fRet = (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)); | ||
343 | #endif // RLV_EXTENSION_FLAG_NOSTRIP | ||
344 | break; | ||
345 | case LLAssetType::AT_OBJECT: | ||
346 | fRet = ( (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)) || | ||
347 | (m_Tentative.end() != std::find(m_Tentative.begin(), m_Tentative.end(), idParent)) ) && | ||
348 | ( (!m_fAttach) || (gRlvHandler.hasAttachPointName(pItem, true)) ); // Only care about attach point on attach* | ||
349 | break; | ||
350 | #ifdef RLV_EXPERIMENTAL_FORCEWEAR_GESTURES | ||
351 | case LLAssetType::AT_GESTURE: | ||
352 | fRet = (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)); | ||
353 | break; | ||
354 | #endif // RLV_EXPERIMENTAL_FORCEWEAR_GESTURES | ||
355 | default: | ||
356 | break; | ||
357 | } | ||
358 | return fRet; | ||
359 | } | ||
360 | |||
361 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
362 | bool RlvWearableItemCollector::operator()(LLInventoryCategory* pFolder, LLInventoryItem* pItem) | ||
363 | { | ||
364 | // NOTE: this is used for more than was originally intended so only modify if you're sure it won't break something obscure | ||
365 | return (pFolder) ? onCollectFolder(pFolder) : ( (pItem) ? onCollectItem(pItem) : false ); | ||
366 | } | ||
367 | |||
368 | // Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0f | ||
369 | bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) | ||
370 | { | ||
371 | return (pNode->getObject()) ? !gRlvHandler.isDetachable(pNode->getObject()) : false; | ||
372 | } | ||
373 | |||
374 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f | ||
375 | bool RlvSelectIsOwnedByOrGroupOwned::apply(LLSelectNode* pNode) | ||
376 | { | ||
377 | return (pNode->mPermissions->isGroupOwned()) || (pNode->mPermissions->getOwner() == m_idAgent); | ||
378 | } | ||
379 | |||
380 | // Checked: 2009-05-31 (RLVa-0.2.0f) | Modified: RLVa-0.2.0f | ||
381 | bool RlvSelectIsSittingOn::apply(LLSelectNode* pNode) | ||
382 | { | ||
383 | return (pNode->getObject()) && (pNode->getObject()->getRootEdit() == m_pObject); | ||
384 | } | ||
385 | |||
386 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0g | ||
387 | bool rlvCanDeleteOrReturn() | ||
388 | { | ||
389 | bool fIsAllowed = true; | ||
390 | |||
391 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
392 | { | ||
393 | // We'll allow if none of the prims are owned by the avie or group owned | ||
394 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
395 | RlvSelectIsOwnedByOrGroupOwned func(gAgent.getID()); | ||
396 | if ( (handleSel.notNull()) && ((0 == handleSel->getRootObjectCount()) || (NULL != handleSel->getFirstRootNode(&func, FALSE))) ) | ||
397 | fIsAllowed = false; | ||
398 | } | ||
399 | |||
400 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) ) | ||
401 | { | ||
402 | // We'll allow if the avie isn't sitting on any of the selected objects | ||
403 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
404 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
405 | if ( (handleSel.notNull()) && (handleSel->getFirstRootNode(&func, TRUE)) ) | ||
406 | fIsAllowed = false; | ||
407 | } | ||
408 | |||
409 | return fIsAllowed; | ||
410 | } | ||
411 | |||
412 | // Checked: 2009-07-05 (RLVa-1.0.0c) | ||
413 | BOOL rlvAttachToEnabler(void* pParam) | ||
414 | { | ||
415 | // Enables/disables an option on the "Attach to (HUD)" submenu depending on whether it is (un)detachable | ||
416 | LLViewerJointAttachment* pAttachment = (LLViewerJointAttachment*)pParam; | ||
417 | return (!pAttachment) || (gRlvHandler.isDetachable(pAttachment->getObject())); | ||
418 | } | ||
419 | |||
420 | BOOL RlvGCTimer::tick() | ||
421 | { | ||
422 | bool fContinue = gRlvHandler.onGC(); | ||
423 | if (!fContinue) | ||
424 | gRlvHandler.m_pGCTimer = NULL; | ||
425 | return !fContinue; | ||
426 | } | ||
427 | |||
428 | void RlvCurrentlyWorn::fetchWorn() | ||
429 | { | ||
430 | LLInventoryFetchObserver::item_ref_t idItems; | ||
431 | |||
432 | // Fetch all currently worn clothing layers and body parts | ||
433 | for (int type = 0; type < (int)WT_COUNT; type++) | ||
434 | { | ||
435 | const LLUUID& idItem = gAgent.getWearableItem((EWearableType)type); | ||
436 | if (idItem.notNull()) | ||
437 | idItems.push_back(idItem); | ||
438 | } | ||
439 | |||
440 | // Fetch all currently worn attachments | ||
441 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
442 | if (pAvatar) | ||
443 | { | ||
444 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
445 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
446 | { | ||
447 | const LLUUID& idItem = itAttach->second->getItemID(); | ||
448 | if (idItem.notNull()) | ||
449 | idItems.push_back(idItem); | ||
450 | } | ||
451 | } | ||
452 | |||
453 | RlvCurrentlyWorn f; | ||
454 | f.fetchItems(idItems); | ||
455 | } | ||
456 | |||
457 | // ========================================================================= | ||
458 | |||
459 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | ||
460 | void RlvWLSnapshot::restoreSnapshot(const RlvWLSnapshot* pWLSnapshot) | ||
461 | { | ||
462 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | ||
463 | if ( (pWLSnapshot) && (pWLParams) ) | ||
464 | { | ||
465 | pWLParams->mAnimator.mIsRunning = pWLSnapshot->fIsRunning; | ||
466 | pWLParams->mAnimator.mUseLindenTime = pWLSnapshot->fUseLindenTime; | ||
467 | pWLParams->mCurParams = pWLSnapshot->WLParams; | ||
468 | pWLParams->propagateParameters(); | ||
469 | } | ||
470 | } | ||
471 | |||
472 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | ||
473 | RlvWLSnapshot* RlvWLSnapshot::takeSnapshot() | ||
474 | { | ||
475 | RlvWLSnapshot* pWLSnapshot = NULL; | ||
476 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | ||
477 | if (pWLParams) | ||
478 | { | ||
479 | pWLSnapshot = new RlvWLSnapshot(); | ||
480 | pWLSnapshot->fIsRunning = pWLParams->mAnimator.mIsRunning; | ||
481 | pWLSnapshot->fUseLindenTime = pWLParams->mAnimator.mUseLindenTime; | ||
482 | pWLSnapshot->WLParams = pWLParams->mCurParams; | ||
483 | } | ||
484 | return pWLSnapshot; | ||
485 | } | ||
486 | |||
487 | // ========================================================================= | ||
488 | |||
489 | BOOL RlvSettings::fShowNameTags = FALSE; | ||
490 | |||
491 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
492 | // Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1d | ||
493 | void RlvSettings::updateLoginLastLocation() | ||
494 | { | ||
495 | if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) | ||
496 | { | ||
497 | BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || | ||
498 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && | ||
499 | (gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting) ); | ||
500 | if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) | ||
501 | { | ||
502 | gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); | ||
503 | gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); | ||
504 | } | ||
505 | } | ||
506 | } | ||
507 | #endif // RLV_EXTENSION_STARTLOCATION | ||
508 | |||
509 | // ========================================================================= | ||
510 | |||
511 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | ||
512 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-1.0.0h | ||
513 | void rlvDbgToggleEnabled(void*) | ||
514 | { | ||
515 | gSavedSettings.setBOOL(RLV_SETTING_MAIN, !rlv_handler_t::isEnabled()); | ||
516 | |||
517 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
518 | LLStringUtil::format_map_t args; | ||
519 | args["[MESSAGE]"] = llformat("Restrained Life Support will be %s after you restart", | ||
520 | (rlv_handler_t::isEnabled()) ? "disabled" : "enabled" ); | ||
521 | gViewerWindow->alertXml("GenericAlert", args); | ||
522 | #else // Version: 1.23.4 | ||
523 | LLSD args; | ||
524 | args["MESSAGE"] = llformat("Restrained Life Support will be %s after you restart", | ||
525 | (rlv_handler_t::isEnabled()) ? "disabled" : "enabled" ); | ||
526 | LLNotifications::instance().add("GenericAlert", args); | ||
527 | #endif | ||
528 | } | ||
529 | // Checked: 2009-07-08 (RLVa-1.0.0e) | ||
530 | BOOL rlvDbgGetEnabled(void*) | ||
531 | { | ||
532 | return rlv_handler_t::isEnabled(); | ||
533 | } | ||
534 | #endif // RLV_ADVANCED_TOGGLE_RLVA | ||
535 | |||
536 | // ========================================================================= | ||
537 | // Message sending functions | ||
538 | // | ||
539 | |||
540 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | ||
541 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt) | ||
542 | { | ||
543 | // Copy/paste from handle_detach_from_avatar() | ||
544 | LLViewerObject* attached_object = pAttachPt->getObject(); | ||
545 | if (attached_object) | ||
546 | { | ||
547 | gMessageSystem->newMessage("ObjectDetach"); | ||
548 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
549 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | ||
550 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
551 | |||
552 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); | ||
553 | gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID()); | ||
554 | gMessageSystem->sendReliable( gAgent.getRegionHost() ); | ||
555 | } | ||
556 | } | ||
557 | |||
558 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession) | ||
559 | { | ||
560 | // (See process_improved_im) | ||
561 | std::string strFullName; | ||
562 | gAgent.buildFullname(strFullName); | ||
563 | |||
564 | pack_instant_message(gMessageSystem, gAgent.getID(), FALSE, gAgent.getSessionID(), idTo, strFullName, | ||
565 | strMsg, IM_ONLINE, IM_BUSY_AUTO_RESPONSE, idSession); | ||
566 | gAgent.sendReliableMessage(); | ||
567 | } | ||
568 | |||
569 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
570 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply) | ||
571 | { | ||
572 | if (!rlvIsValidChannel(nChannel)) | ||
573 | return false; | ||
574 | |||
575 | // Copy/paste from send_chat_from_viewer() | ||
576 | LLMessageSystem* msg = gMessageSystem; | ||
577 | msg->newMessageFast(_PREHASH_ChatFromViewer); | ||
578 | msg->nextBlockFast(_PREHASH_AgentData); | ||
579 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
580 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
581 | msg->nextBlockFast(_PREHASH_ChatData); | ||
582 | msg->addStringFast(_PREHASH_Message, strReply); | ||
583 | msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_SHOUT); | ||
584 | msg->addS32("Channel", nChannel); | ||
585 | gAgent.sendReliableMessage(); | ||
586 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); | ||
587 | |||
588 | return true; | ||
589 | } | ||
590 | |||
591 | // ========================================================================= | ||
592 | // String helper functions | ||
593 | // | ||
594 | |||
595 | // Checked: 2009-07-04 (RLVa-1.0.0a) | ||
596 | void rlvStringReplace(std::string& strText, std::string strFrom, const std::string& strTo) | ||
597 | { | ||
598 | if (strFrom.empty()) | ||
599 | return; | ||
600 | |||
601 | size_t lenFrom = strFrom.length(); | ||
602 | size_t lenTo = strTo.length(); | ||
603 | |||
604 | std::string strTemp(strText); | ||
605 | LLStringUtil::toLower(strTemp); | ||
606 | LLStringUtil::toLower(strFrom); | ||
607 | |||
608 | std::string::size_type idxCur, idxStart = 0, idxOffset = 0; | ||
609 | while ( (idxCur = strTemp.find(strFrom, idxStart)) != std::string::npos) | ||
610 | { | ||
611 | strText.replace(idxCur + idxOffset, lenFrom, strTo); | ||
612 | idxStart = idxCur + lenFrom; | ||
613 | idxOffset += lenTo - lenFrom; | ||
614 | } | ||
615 | } | ||
616 | |||
617 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Added: RLVa-1.0.1b | ||
618 | std::string rlvGetFirstParenthesisedText(const std::string& strText, std::string::size_type* pidxMatch /*=NULL*/) | ||
619 | { | ||
620 | if (pidxMatch) | ||
621 | *pidxMatch = std::string::npos; // Assume we won't find anything | ||
622 | |||
623 | std::string::size_type idxIt, idxStart; int cntLevel = 1; | ||
624 | if ((idxStart = strText.find_first_of('(')) == std::string::npos) | ||
625 | return std::string(); | ||
626 | |||
627 | const char* pstrText = strText.c_str(); idxIt = idxStart; | ||
628 | while ( (cntLevel > 0) && (idxIt < strText.length()) ) | ||
629 | { | ||
630 | if ('(' == pstrText[++idxIt]) | ||
631 | cntLevel++; | ||
632 | else if (')' == pstrText[idxIt]) | ||
633 | cntLevel--; | ||
634 | } | ||
635 | |||
636 | if (idxIt < strText.length()) | ||
637 | { | ||
638 | if (pidxMatch) | ||
639 | *pidxMatch = idxStart; // Return the character index of the starting '(' | ||
640 | return strText.substr(idxStart + 1, idxIt - idxStart - 1); | ||
641 | } | ||
642 | return std::string(); | ||
643 | } | ||
644 | |||
645 | // Checked: 2009-07-29 (RLVa-1.0.1b) | Added: RLVa-1.0.1b | ||
646 | std::string rlvGetLastParenthesisedText(const std::string& strText, std::string::size_type* pidxStart /*=NULL*/) | ||
647 | { | ||
648 | if (pidxStart) | ||
649 | *pidxStart = std::string::npos; // Assume we won't find anything | ||
650 | |||
651 | // Extracts the last - matched - parenthesised text from the input string | ||
652 | std::string::size_type idxIt, idxEnd; int cntLevel = 1; | ||
653 | if ((idxEnd = strText.find_last_of(')')) == std::string::npos) | ||
654 | return std::string(); | ||
655 | |||
656 | const char* pstrText = strText.c_str(); idxIt = idxEnd; | ||
657 | while ( (cntLevel > 0) && (idxIt >= 0) ) | ||
658 | { | ||
659 | if (')' == pstrText[--idxIt]) | ||
660 | cntLevel++; | ||
661 | else if ('(' == pstrText[idxIt]) | ||
662 | cntLevel--; | ||
663 | } | ||
664 | |||
665 | if ( (idxIt >= 0) && (idxIt < strText.length()) ) // NOTE: allow for std::string::size_type to be signed or unsigned | ||
666 | { | ||
667 | if (pidxStart) | ||
668 | *pidxStart = idxIt; // Return the character index of the starting '(' | ||
669 | return strText.substr(idxIt + 1, idxEnd - idxIt - 1); | ||
670 | } | ||
671 | return std::string(); | ||
672 | } | ||
673 | |||
674 | // ========================================================================= | ||
diff --git a/linden/indra/newview/rlvhelper.h b/linden/indra/newview/rlvhelper.h new file mode 100644 index 0000000..a0e040e --- /dev/null +++ b/linden/indra/newview/rlvhelper.h | |||
@@ -0,0 +1,579 @@ | |||
1 | #ifndef RLV_HELPER_H | ||
2 | #define RLV_HELPER_H | ||
3 | |||
4 | #include "llboost.h" | ||
5 | #include "llinventorymodel.h" | ||
6 | #include "llselectmgr.h" | ||
7 | #include "llviewercontrol.h" | ||
8 | #include "llviewerobjectlist.h" | ||
9 | #include "llwlparamset.h" | ||
10 | |||
11 | #include "rlvmultistringsearch.h" | ||
12 | |||
13 | // ============================================================================ | ||
14 | // Extensions | ||
15 | // | ||
16 | |||
17 | // Comment out if you don't want the Advanced / RLVa menu (may prevent enabling some extensions or experimental features - see below) | ||
18 | #define RLV_ADVANCED_MENU | ||
19 | // Comment out if you provide your own way to enable/disable RLVa | ||
20 | #define RLV_ADVANCED_TOGGLE_RLVA | ||
21 | |||
22 | // Provides access to "advanced" feature through the RLVa debug menu | ||
23 | #define RLV_EXTENSION_ENABLE_WEAR // "Enable Wear" | ||
24 | #define RLV_EXTENSION_HIDELOCKED // "Hide locked layers", "Hide locked attachments" and "Hide locked inventory" | ||
25 | #define RLV_EXTENSION_FLOATER_RESTRICTIONS // Enables the Advanced / RLVa / Restrictions... floater | ||
26 | |||
27 | // Extensions | ||
28 | #define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx | ||
29 | #define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders:<option>=<channel> - @findfolder with multiple results | ||
30 | #define RLV_EXTENSION_FLAG_NOSTRIP // Layers and attachments marked as "nostrip" are exempt from @detach/@remoutfit | ||
31 | #define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff | ||
32 | #define RLV_EXPERIMENTAL // Enables/disables experimental features en masse | ||
33 | |||
34 | // Experimental features | ||
35 | #ifdef RLV_EXPERIMENTAL | ||
36 | // Stable (will mature to RLV_EXTENSION_XXX in next release if no bugs are found) | ||
37 | #define RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK // Enables "cleaner" UI responses when fartouch blocks something | ||
38 | |||
39 | // Under testing (stable, but requires further testing - safe for public release but may be quirky) | ||
40 | |||
41 | // Under development (don't include in public release) | ||
42 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
43 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
44 | #endif // RLV_EXPERIMENTAL | ||
45 | |||
46 | // ============================================================================ | ||
47 | // Defines | ||
48 | // | ||
49 | |||
50 | // Version of the specifcation we support | ||
51 | const S32 RLV_VERSION_MAJOR = 1; | ||
52 | const S32 RLV_VERSION_MINOR = 20; | ||
53 | const S32 RLV_VERSION_PATCH = 0; | ||
54 | |||
55 | // Implementation version | ||
56 | const S32 RLVa_VERSION_MAJOR = 1; | ||
57 | const S32 RLVa_VERSION_MINOR = 0; | ||
58 | const S32 RLVa_VERSION_PATCH = 1; | ||
59 | const S32 RLVa_VERSION_BUILD = 7; | ||
60 | |||
61 | // The official viewer version we're patching against | ||
62 | #define RLV_MAKE_TARGET(x, y, z) ((x << 16) | (y << 8) | z) | ||
63 | #define RLV_TARGET RLV_MAKE_TARGET(1, 22, 11) | ||
64 | |||
65 | // Defining these makes it easier if we ever need to change our tag | ||
66 | #define RLV_WARNS LL_WARNS("RLV") | ||
67 | #define RLV_INFOS LL_INFOS("RLV") | ||
68 | #define RLV_DEBUGS LL_DEBUGS("RLV") | ||
69 | |||
70 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
71 | // Turn on extended debugging information | ||
72 | #define RLV_DEBUG | ||
73 | // Make sure we halt execution on errors | ||
74 | #define RLV_ERRS LL_ERRS("RLV") | ||
75 | // Uncomment to enable the Advanced / RLVa / Unit Tests menu (non-public) | ||
76 | //#define RLV_DEBUG_TESTS | ||
77 | #else | ||
78 | // Uncomment if you want extended debugging information on release builds | ||
79 | //#define RLV_DEBUG | ||
80 | // Don't halt execution on errors in release | ||
81 | #define RLV_ERRS LL_WARNS("RLV") | ||
82 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
83 | |||
84 | #define RLV_ROOT_FOLDER "#RLV" | ||
85 | #define RLV_CMD_PREFIX '@' | ||
86 | #define RLV_PUTINV_PREFIX "#RLV/~" | ||
87 | #define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL | ||
88 | |||
89 | #define RLV_FOLDER_FLAG_NOSTRIP "nostrip" | ||
90 | #define RLV_FOLDER_PREFIX_HIDDEN '.' | ||
91 | #define RLV_FOLDER_PREFIX_PUTINV '~' | ||
92 | |||
93 | // ============================================================================ | ||
94 | // Enumeration declarations | ||
95 | // | ||
96 | |||
97 | // NOTE: * any changes to this enumeration should be reflected in initLookupTable() | ||
98 | // * only uncomment the ones we actually use in a switch() to keep the size of the lookup table down | ||
99 | enum ERlvBehaviour { | ||
100 | RLV_BHVR_VERSION = 0, // "version" | ||
101 | RLV_BHVR_DETACH, // "detach" | ||
102 | // RLV_BHVR_SENDCHAT, // "sendchat" | ||
103 | // RLV_BHVR_EMOTE, // "emote" | ||
104 | // RLV_BHVR_CHATSHOUT, // "chatshout" | ||
105 | // RLV_BHVR_CHATNORMAL, // "chatnormal" | ||
106 | // RLV_BHVR_CHATWHISPER, // "chatwhisper" | ||
107 | RLV_BHVR_REDIRCHAT, // "redirchat" | ||
108 | RLV_BHVR_REDIREMOTE, // "rediremote" | ||
109 | RLV_BHVR_SENDIM, // "sendim" | ||
110 | RLV_BHVR_RECVCHAT, // "recvchat" | ||
111 | RLV_BHVR_RECVEMOTE, // "recvemote" | ||
112 | RLV_BHVR_RECVIM, // "recvim" | ||
113 | // RLV_BHVR_TPLM, // "tplm" | ||
114 | RLV_BHVR_TPLOC, // "tploc" | ||
115 | RLV_BHVR_TPLURE, // "tplure" | ||
116 | RLV_BHVR_SITTP, // "sittp" | ||
117 | // RLV_BHVR_CLEAR, // "clear" | ||
118 | RLV_BHVR_EDIT, // "edit" | ||
119 | RLV_BHVR_REZ, // "rez" | ||
120 | RLV_BHVR_ADDOUTFIT, // "addoutfit" | ||
121 | RLV_BHVR_REMOUTFIT, // "remoutfit" | ||
122 | RLV_BHVR_GETOUTFIT, // "getoutfit" | ||
123 | RLV_BHVR_GETATTACH, // "getattach" | ||
124 | RLV_BHVR_SHOWINV, // "showinv" | ||
125 | // RLV_BHVR_VIEWNOTE, // "viewnote" | ||
126 | RLV_BHVR_UNSIT, // "unsit" | ||
127 | RLV_BHVR_SIT, // "sit" | ||
128 | // RLV_BHVR_SENDCHANNEL, // "sendchannel" | ||
129 | RLV_BHVR_GETSTATUS, // "getstatus" | ||
130 | RLV_BHVR_GETSTATUSALL, // "getstatusall" | ||
131 | RLV_BHVR_GETINV, // "getinv" | ||
132 | RLV_BHVR_GETINVWORN, // "getinvworn" | ||
133 | RLV_BHVR_FINDFOLDER, // "findfolder" | ||
134 | RLV_BHVR_FINDFOLDERS, // "findfolders" | ||
135 | RLV_BHVR_ATTACH, // "attach" | ||
136 | RLV_BHVR_ATTACHALL, // "attachall" | ||
137 | RLV_BHVR_DETACHALL, // "detachall" | ||
138 | RLV_BHVR_GETPATH, // "getpath" | ||
139 | RLV_BHVR_ATTACHTHIS, // "attachthis" | ||
140 | RLV_BHVR_ATTACHALLTHIS, // "attachallthis" | ||
141 | RLV_BHVR_DETACHTHIS, // "detachthis" | ||
142 | RLV_BHVR_DETACHALLTHIS, // "detachallthis" | ||
143 | RLV_BHVR_FARTOUCH, // "fartouch" | ||
144 | RLV_BHVR_SHOWWORLDMAP, // "showworldmap" | ||
145 | RLV_BHVR_SHOWMINIMAP, // "showminimap" | ||
146 | RLV_BHVR_SHOWLOC, // "showloc" | ||
147 | RLV_BHVR_TPTO, // "tpto" | ||
148 | RLV_BHVR_ACCEPTTP, // "accepttp" | ||
149 | RLV_BHVR_SHOWNAMES, // "shownames" | ||
150 | RLV_BHVR_FLY, // "fly" | ||
151 | RLV_BHVR_GETSITID, // "getsitid" | ||
152 | RLV_BHVR_SETDEBUG, // "setdebug" | ||
153 | RLV_BHVR_SETENV, // "setenv" | ||
154 | RLV_BHVR_DETACHME, // "detachme" | ||
155 | RLV_BHVR_SHOWHOVERTEXTALL, // "showhovertextall" | ||
156 | RLV_BHVR_SHOWHOVERTEXTWORLD, // "showhovertextworld" | ||
157 | RLV_BHVR_SHOWHOVERTEXTHUD, // "showhovertexthud" | ||
158 | RLV_BHVR_SHOWHOVERTEXT, // "showhovertext" | ||
159 | RLV_BHVR_NOTIFY, // "notify" | ||
160 | |||
161 | RLV_BHVR_COUNT, | ||
162 | RLV_BHVR_UNKNOWN | ||
163 | }; | ||
164 | |||
165 | enum ERlvParamType { | ||
166 | RLV_TYPE_UNKNOWN, | ||
167 | RLV_TYPE_ADD, // <param> == "n"|"add" | ||
168 | RLV_TYPE_REMOVE, // <param> == "y"|"rem" | ||
169 | RLV_TYPE_FORCE, // <param> == "force" | ||
170 | RLV_TYPE_REPLY // <param> == <number> | ||
171 | }; | ||
172 | |||
173 | enum ERlvCmdRet { | ||
174 | RLV_RET_NOERROR, // Command executed succesfully | ||
175 | RLV_RET_RETAINED, // Command was retained | ||
176 | RLV_RET_FAILED, // Command failed (general failure) | ||
177 | RLV_RET_FAILED_SYNTAX, // Command failed (syntax error) | ||
178 | RLV_RET_FAILED_UNSET, // Command failed (unset restriction) | ||
179 | RLV_RET_FAILED_DUPLICATE, // Command failed (duplicate) | ||
180 | RLV_RET_FAILED_OPTION, // Command failed (invalid option) | ||
181 | RLV_RET_UNKNOWN // Command unkown | ||
182 | }; | ||
183 | |||
184 | // ============================================================================ | ||
185 | /* | ||
186 | * RlvCommand | ||
187 | * ========== | ||
188 | * Encapsulates an "RLV command" (duh :p) | ||
189 | * | ||
190 | */ | ||
191 | |||
192 | class RlvCommand | ||
193 | { | ||
194 | public: | ||
195 | /* | ||
196 | * Constructors | ||
197 | */ | ||
198 | explicit RlvCommand(const std::string& strCommand); | ||
199 | RlvCommand(const RlvCommand& rlvCmd); | ||
200 | |||
201 | /* | ||
202 | * Accessors | ||
203 | */ | ||
204 | BOOL isValid() const { return m_fValid; } | ||
205 | |||
206 | const std::string& getBehaviour() const { return m_strBehaviour; } | ||
207 | ERlvBehaviour getBehaviourType() const { return m_eBehaviour; } | ||
208 | const std::string& getOption() const { return m_strOption; } | ||
209 | const std::string& getParam() const { return m_strParam; } | ||
210 | ERlvParamType getParamType() const { return m_eParamType; } | ||
211 | |||
212 | std::string asString() const; | ||
213 | |||
214 | /* | ||
215 | * Operators | ||
216 | */ | ||
217 | bool operator ==(const RlvCommand&) const; | ||
218 | |||
219 | // Parses an RLV command into its "tokens" | ||
220 | static BOOL parseCommand(/*[in]*/ const std::string& strCommand, | ||
221 | /*[out]*/ std::string& strBehaviour, /*[out]*/ std::string& strOption, /*[out]*/ std::string& strParam); | ||
222 | static void initLookupTable(); | ||
223 | |||
224 | /* | ||
225 | * Member variables | ||
226 | */ | ||
227 | protected: | ||
228 | BOOL m_fValid; | ||
229 | std::string m_strBehaviour; | ||
230 | ERlvBehaviour m_eBehaviour; | ||
231 | std::string m_strOption; | ||
232 | std::string m_strParam; | ||
233 | ERlvParamType m_eParamType; | ||
234 | |||
235 | static RlvMultiStringSearch m_BhvrLookup; | ||
236 | friend class RlvHandler; | ||
237 | }; | ||
238 | |||
239 | // ============================================================================ | ||
240 | /* | ||
241 | * RlvObject | ||
242 | * ========= | ||
243 | * Encapsulates an "RLV Object" (= an object that has issued an RLV command) | ||
244 | * | ||
245 | */ | ||
246 | |||
247 | typedef std::list<RlvCommand> rlv_command_list_t; | ||
248 | |||
249 | class RlvObject | ||
250 | { | ||
251 | public: | ||
252 | RlvObject(const LLUUID& uuid) : m_UUID(uuid), m_nLookupMisses(0) { m_fLookup = (NULL != gObjectList.findObject(uuid)); } | ||
253 | |||
254 | BOOL addCommand(const RlvCommand& rlvCmd); | ||
255 | BOOL removeCommand(const RlvCommand& rlvCmd); | ||
256 | |||
257 | BOOL hasBehaviour(ERlvBehaviour eBehaviour) const; | ||
258 | BOOL hasBehaviour(const std::string& strBehaviour) const; | ||
259 | BOOL hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const; | ||
260 | BOOL hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const; | ||
261 | |||
262 | std::string getStatusString(const std::string& strMatch) const; | ||
263 | |||
264 | const rlv_command_list_t* getCommandList() const { return &m_Commands; } | ||
265 | protected: | ||
266 | LLUUID m_UUID; // The object's UUID | ||
267 | bool m_fLookup; // TRUE if the object existed in gObjectList at one point in time | ||
268 | S16 m_nLookupMisses; // Count of unsuccessful lookups in gObjectList by the GC | ||
269 | rlv_command_list_t m_Commands; // List of behaviours held by this object (in the order they were received) | ||
270 | |||
271 | friend class RlvHandler; | ||
272 | }; | ||
273 | |||
274 | // ============================================================================ | ||
275 | /* | ||
276 | * RlvCriteriaCategoryCollector | ||
277 | * ============================ | ||
278 | * Criteria based folder matching filter used by @findfolder and @findfolders | ||
279 | * | ||
280 | */ | ||
281 | |||
282 | class RlvCriteriaCategoryCollector : public LLInventoryCollectFunctor | ||
283 | { | ||
284 | public: | ||
285 | RlvCriteriaCategoryCollector(const std::string& strCriteria) | ||
286 | { | ||
287 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | ||
288 | boost::char_separator<char> sep("&&", "", boost::drop_empty_tokens); | ||
289 | tokenizer tokens(strCriteria, sep); | ||
290 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
291 | m_Criteria.push_back(*itToken); | ||
292 | } | ||
293 | virtual ~RlvCriteriaCategoryCollector() {} | ||
294 | |||
295 | virtual bool operator()(LLInventoryCategory* pFolder, LLInventoryItem* pItem) | ||
296 | { | ||
297 | if ( (!pFolder) || (m_Criteria.empty()) ) // We're only interested in matching folders, we don't care about items | ||
298 | return false; // (if there are no criteria then we don't want to return a match) | ||
299 | |||
300 | std::string strFolderName = pFolder->getName(); | ||
301 | LLStringUtil::toLower(strFolderName); | ||
302 | |||
303 | if ( (strFolderName.empty()) || (RLV_FOLDER_PREFIX_HIDDEN == strFolderName[0]) ) | ||
304 | return false; | ||
305 | |||
306 | for (std::list<std::string>::const_iterator itCrit = m_Criteria.begin(); itCrit != m_Criteria.end(); ++itCrit) | ||
307 | if (-1 == strFolderName.find(*itCrit)) // Return false on the first mismatch | ||
308 | return false; | ||
309 | return true; | ||
310 | } | ||
311 | |||
312 | protected: | ||
313 | std::list<std::string> m_Criteria; | ||
314 | }; | ||
315 | |||
316 | // ============================================================================ | ||
317 | /* | ||
318 | * RlvWearableItemCollector | ||
319 | * ======================== | ||
320 | * Inventory item filter used by attach/detach/attachall/detachall/getinvworn (also used by "Add/Replace Outfit" and "Take Off Items") | ||
321 | * | ||
322 | */ | ||
323 | |||
324 | class RlvWearableItemCollector : public LLInventoryCollectFunctor | ||
325 | { | ||
326 | public: | ||
327 | RlvWearableItemCollector(const LLUUID& idFolder, bool fAttach, bool fMatchAll) | ||
328 | : m_idFolder(idFolder), m_fAttach(fAttach), m_fMatchAll(fMatchAll) | ||
329 | { | ||
330 | m_Wearable.push_back(idFolder); | ||
331 | } | ||
332 | virtual ~RlvWearableItemCollector() {} | ||
333 | |||
334 | virtual bool operator()(LLInventoryCategory* pFolder, LLInventoryItem* pItem); | ||
335 | |||
336 | const LLUUID& getFoldedParent(const LLUUID& idFolder) const; | ||
337 | protected: | ||
338 | bool m_fAttach; | ||
339 | bool m_fMatchAll; | ||
340 | const LLUUID m_idFolder; | ||
341 | |||
342 | bool onCollectFolder(const LLInventoryCategory* pFolder); | ||
343 | bool onCollectItem(const LLInventoryItem* pItem); | ||
344 | |||
345 | std::list<LLUUID> m_Tentative; | ||
346 | std::list<LLUUID> m_Wearable; | ||
347 | |||
348 | std::map<LLUUID, LLUUID> m_Folding; | ||
349 | }; | ||
350 | |||
351 | // ============================================================================ | ||
352 | /* | ||
353 | * RlvRetainedCommand | ||
354 | * ================== | ||
355 | * | ||
356 | */ | ||
357 | |||
358 | struct RlvRetainedCommand | ||
359 | { | ||
360 | public: | ||
361 | std::string strObject; | ||
362 | LLUUID idObject; | ||
363 | std::string strCmd; | ||
364 | |||
365 | RlvRetainedCommand(const std::string obj, const LLUUID& uuid, const std::string& cmd) : strObject(obj), idObject(uuid), strCmd(cmd) {} | ||
366 | private: | ||
367 | RlvRetainedCommand(); | ||
368 | }; | ||
369 | typedef std::list<RlvRetainedCommand> rlv_retained_list_t; | ||
370 | |||
371 | // ============================================================================ | ||
372 | /* | ||
373 | * RlvWLSnapshot | ||
374 | * ============= | ||
375 | * | ||
376 | */ | ||
377 | |||
378 | struct RlvWLSnapshot | ||
379 | { | ||
380 | public: | ||
381 | static void restoreSnapshot(const RlvWLSnapshot* pWLSnapshot); | ||
382 | static RlvWLSnapshot* takeSnapshot(); | ||
383 | private: | ||
384 | RlvWLSnapshot() {} | ||
385 | |||
386 | bool fIsRunning; | ||
387 | bool fUseLindenTime; | ||
388 | LLWLParamSet WLParams; | ||
389 | }; | ||
390 | |||
391 | // ============================================================================ | ||
392 | /* | ||
393 | * RlvSettings | ||
394 | * =========== | ||
395 | * | ||
396 | */ | ||
397 | |||
398 | #define RLV_SETTING_MAIN "RestrainedLife" | ||
399 | #define RLV_SETTING_DEBUG "RestrainedLifeDebug" | ||
400 | #define RLV_SETTING_NOSETENV "RestrainedLifeNoSetEnv" | ||
401 | #define RLV_SETTING_FORBIDGIVETORLV "RestrainedLifeForbidGiveToRLV" | ||
402 | |||
403 | #define RLV_SETTING_ENABLEWEAR "RLVaEnableWear" | ||
404 | #define RLV_SETTING_ENABLELEGACYNAMING "RLVaEnableLegacyNaming" | ||
405 | #define RLV_SETTING_HIDELOCKEDLAYER "RLVaHideLockedLayers" | ||
406 | #define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments" | ||
407 | #define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory" | ||
408 | #define RLV_SETTING_LOGINLASTLOCATION "RLVaLoginLastLocation" | ||
409 | #define RLV_SETTING_SHOWNAMETAGS "RLVaShowNameTags" | ||
410 | |||
411 | inline BOOL rlvGetSettingBOOL(const std::string& strSetting, BOOL fDefault) | ||
412 | { | ||
413 | return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.getBOOL(strSetting) : fDefault; | ||
414 | } | ||
415 | inline BOOL rlvGetPerUserSettingsBOOL(const std::string& strSetting, BOOL fDefault) | ||
416 | { | ||
417 | return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.getBOOL(strSetting) : fDefault; | ||
418 | } | ||
419 | |||
420 | class RlvSettings | ||
421 | { | ||
422 | public: | ||
423 | static BOOL getDebug() { return rlvGetSettingBOOL(RLV_SETTING_DEBUG, FALSE); } | ||
424 | static BOOL getForbidGiveToRLV() { return rlvGetSettingBOOL(RLV_SETTING_FORBIDGIVETORLV, TRUE); } | ||
425 | |||
426 | static BOOL getEnableWear() { return rlvGetSettingBOOL(RLV_SETTING_ENABLEWEAR, FALSE); } | ||
427 | static BOOL getHideLockedLayers() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDLAYER, FALSE); } | ||
428 | static BOOL getHideLockedAttach() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDATTACH, FALSE); } | ||
429 | static BOOL getHideLockedInventory() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDINVENTORY, FALSE); } | ||
430 | |||
431 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
432 | static BOOL getLoginLastLocation() { return rlvGetPerUserSettingsBOOL(RLV_SETTING_LOGINLASTLOCATION, TRUE); } | ||
433 | static void updateLoginLastLocation(); | ||
434 | #endif // RLV_EXTENSION_STARTLOCATION | ||
435 | |||
436 | static BOOL fShowNameTags; | ||
437 | }; | ||
438 | |||
439 | // ============================================================================ | ||
440 | /* | ||
441 | * State keeping classes/structure | ||
442 | * | ||
443 | */ | ||
444 | |||
445 | struct RlvRedirInfo | ||
446 | { | ||
447 | S16 nRedirChat; | ||
448 | S16 nRedirEmote; | ||
449 | |||
450 | RlvRedirInfo() : nRedirChat(0), nRedirEmote(0) {} | ||
451 | bool isActive() { return (nRedirChat + nRedirEmote) != 0; } | ||
452 | }; | ||
453 | |||
454 | struct RlvReattachInfo | ||
455 | { | ||
456 | LLUUID idItem; | ||
457 | bool fInInventory; | ||
458 | bool fAssetSaved; | ||
459 | |||
460 | RlvReattachInfo() : idItem(), fInInventory(false), fAssetSaved(false) {} | ||
461 | }; | ||
462 | |||
463 | // ============================================================================ | ||
464 | /* | ||
465 | * Various helper classes/timers/functors | ||
466 | * | ||
467 | */ | ||
468 | |||
469 | class RlvGCTimer : public LLEventTimer | ||
470 | { | ||
471 | public: | ||
472 | RlvGCTimer() : LLEventTimer(30.0) {} | ||
473 | virtual BOOL tick(); | ||
474 | }; | ||
475 | |||
476 | class RlvCurrentlyWorn : public LLInventoryFetchObserver | ||
477 | { | ||
478 | public: | ||
479 | RlvCurrentlyWorn() {} | ||
480 | ~RlvCurrentlyWorn() {} | ||
481 | virtual void done() {} | ||
482 | |||
483 | static void fetchWorn(); | ||
484 | void fetchItem(const LLUUID& idItem); | ||
485 | }; | ||
486 | |||
487 | struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor | ||
488 | { | ||
489 | virtual bool apply(LLSelectNode* pNode); | ||
490 | }; | ||
491 | |||
492 | struct RlvSelectIsOwnedByOrGroupOwned : public LLSelectedNodeFunctor | ||
493 | { | ||
494 | RlvSelectIsOwnedByOrGroupOwned(const LLUUID& uuid) : m_idAgent(uuid) {} | ||
495 | virtual bool apply(LLSelectNode* pNode); | ||
496 | LLUUID m_idAgent; | ||
497 | }; | ||
498 | |||
499 | struct RlvSelectIsSittingOn : public LLSelectedNodeFunctor | ||
500 | { | ||
501 | RlvSelectIsSittingOn(LLXform* pObject) : m_pObject(pObject) {} | ||
502 | virtual bool apply(LLSelectNode* pNode); | ||
503 | LLXform* m_pObject; | ||
504 | }; | ||
505 | |||
506 | // ============================================================================ | ||
507 | /* | ||
508 | * Various helper functions | ||
509 | * | ||
510 | */ | ||
511 | |||
512 | BOOL rlvAttachToEnabler(void* pParam); | ||
513 | bool rlvCanDeleteOrReturn(); | ||
514 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type); | ||
515 | bool rlvIsEmote(const std::string& strUTF8Text); | ||
516 | bool rlvIsValidChannel(S32 nChannel); | ||
517 | bool rlvIsWearingItem(const LLInventoryItem* pItem); | ||
518 | |||
519 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt); | ||
520 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null); | ||
521 | bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply); | ||
522 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply); | ||
523 | |||
524 | void rlvStringReplace(std::string& strText, std::string strFrom, const std::string& strTo); | ||
525 | std::string rlvGetFirstParenthesisedText(const std::string& strText, std::string::size_type* pidxMatch = NULL); | ||
526 | std::string rlvGetLastParenthesisedText(const std::string& strText, std::string::size_type* pidxStart = NULL); | ||
527 | |||
528 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | ||
529 | // "Advanced / RLVa / Enable RLV" menu option | ||
530 | void rlvDbgToggleEnabled(void*); | ||
531 | BOOL rlvDbgGetEnabled(void*); | ||
532 | #endif // RLV_ADVANCED_TOGGLE_RLVA | ||
533 | |||
534 | // ============================================================================ | ||
535 | // Inlined class member functions | ||
536 | // | ||
537 | |||
538 | inline bool RlvCommand::operator ==(const RlvCommand& rhs) const | ||
539 | { | ||
540 | // The specification notes that "@detach=n" is semantically identical to "@detach=add" (same for "y" and "rem" | ||
541 | return (m_strBehaviour == rhs.m_strBehaviour) && (m_strOption == rhs.m_strOption) && | ||
542 | ( (RLV_TYPE_UNKNOWN != m_eParamType) ? (m_eParamType == rhs.m_eParamType) : (m_strParam == rhs.m_strParam) ); | ||
543 | } | ||
544 | |||
545 | inline void RlvCurrentlyWorn::fetchItem(const LLUUID& idItem) | ||
546 | { | ||
547 | if (idItem.notNull()) | ||
548 | { | ||
549 | LLInventoryFetchObserver::item_ref_t idItems; | ||
550 | idItems.push_back(idItem); | ||
551 | fetchItems(idItems); | ||
552 | } | ||
553 | } | ||
554 | |||
555 | // ============================================================================ | ||
556 | // Inlined helper functions | ||
557 | // | ||
558 | |||
559 | inline bool rlvIsEmote(const std::string& strUTF8Text) | ||
560 | { | ||
561 | return (strUTF8Text.length() > 4) && ( (strUTF8Text.compare(0, 4, "/me ") == 0) || (strUTF8Text.compare(0, 4, "/me'") == 0) ); | ||
562 | } | ||
563 | |||
564 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e | ||
565 | inline bool rlvIsValidChannel(S32 nChannel) | ||
566 | { | ||
567 | return (nChannel >= 0) && (CHAT_CHANNEL_DEBUG != nChannel); | ||
568 | } | ||
569 | |||
570 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e | ||
571 | inline bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply) | ||
572 | { | ||
573 | S32 nChannel; | ||
574 | return (LLStringUtil::convertToS32(strChannel, nChannel)) ? rlvSendChatReply(nChannel, strReply) : false; | ||
575 | } | ||
576 | |||
577 | // ============================================================================ | ||
578 | |||
579 | #endif // RLV_HELPER_H | ||
diff --git a/linden/indra/newview/rlvmultistringsearch.cpp b/linden/indra/newview/rlvmultistringsearch.cpp new file mode 100644 index 0000000..0aa9889 --- /dev/null +++ b/linden/indra/newview/rlvmultistringsearch.cpp | |||
@@ -0,0 +1,196 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | ||
2 | |||
3 | #include "rlvmultistringsearch.h" | ||
4 | |||
5 | // ==================================================================================== | ||
6 | |||
7 | #ifndef RLV_LOWORD | ||
8 | #define RLV_LOWORD(x) ( (U16)( ((U32)x) & 0xFFFF) ) | ||
9 | #endif // RLV_LOWORD | ||
10 | |||
11 | #ifndef RLV_HIWORD | ||
12 | #define RLV_HIWORD(x) ( (U16)( (((U32)x) >> 16) & 0xFFFF) ) | ||
13 | #endif // RLV_HIWORD | ||
14 | |||
15 | // ==================================================================================== | ||
16 | |||
17 | // (TODO-RLV: oops, forgot I was experimenting with word matching, get rid of that again?) | ||
18 | #define isLetter(ch) \ | ||
19 | ( ( (ch >= 'a') && (ch <= 'z') ) || ( (ch >= 'A') && (ch <= 'Z') ) ) | ||
20 | |||
21 | RlvMultiStringSearch::RlvMultiStringSearch() | ||
22 | : m_FSM(256), // Start our FSM with room for 256 states (enough for all attachment point names) | ||
23 | m_cntState(0) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | void RlvMultiStringSearch::addKeyword(const std::string& strKeyword, U16 nParam) { | ||
28 | U16 nCurState = 0; // Always start the loop at state 0 | ||
29 | |||
30 | // | ||
31 | // Make sure there are enough unused rows to accomodate the worst case (== strKeyword.length() new states) | ||
32 | // | ||
33 | size_t nMaxState = m_FSM.getSize(); | ||
34 | if (m_cntState + strKeyword.length() > nMaxState) | ||
35 | // Allocate enough new rows (in batches of 256 rows) | ||
36 | m_FSM.resize(nMaxState + ((strKeyword.length() / 256) + 1) * 256); | ||
37 | |||
38 | // | ||
39 | // Walk the string character by character | ||
40 | // | ||
41 | for (int idxCh = 0, cntCh = strKeyword.length(); idxCh < cntCh; idxCh++) { | ||
42 | // Look up the next state for current character | ||
43 | unsigned char ch = strKeyword[idxCh]; | ||
44 | U16 nState = RLV_LOWORD(m_FSM[nCurState][ch]); | ||
45 | |||
46 | // If we're at the last character in the keyword then set the termination bit | ||
47 | if (cntCh - 1 == idxCh) | ||
48 | { | ||
49 | // (Only set the termination bit for the state because this keyword might be a substring of another keyword) | ||
50 | m_FSM[nCurState][ch] = (nParam << 16) | (nState | 0x8000); | ||
51 | } | ||
52 | else if ( (nState & 0x7FFF) == 0 ) // If the new state is 0 then we're creating a new path | ||
53 | { | ||
54 | // (Preserve the termination bit because another keyword might be a substring of this one) | ||
55 | nState = ++m_cntState | (nState & 0x8000); | ||
56 | |||
57 | // Store the new path in the FSM | ||
58 | //m_FSM[nCurState][ch] = (nParam << 16) | nState; | ||
59 | m_FSM[nCurState][ch] |= nState; | ||
60 | } | ||
61 | |||
62 | nCurState = nState & 0x7FFF; // Mask out the termination bit since we never need it for the current state | ||
63 | } | ||
64 | } | ||
65 | |||
66 | // (Iterating over a "const char*" is *significantly* faster than "std::string") | ||
67 | bool RlvMultiStringSearch::findNext(const char* pstrText, int idxCh, int cntCh, RlvMultiStringSearchMatch& match, bool fWordMatch) const | ||
68 | { | ||
69 | U16 nCurState = 0; // Always start the loop at state 0 | ||
70 | U32 nLastMatch = 0; // Holds the state of the last (possibly partial) keyword match | ||
71 | |||
72 | // | ||
73 | // Walk the string character by character | ||
74 | // | ||
75 | for (; idxCh < cntCh; idxCh++) | ||
76 | { | ||
77 | // Keep track of the current state in case we need to backtrack | ||
78 | U16 nPrevState = nCurState; | ||
79 | |||
80 | // If we're currently in state 0, save the current character index (for backtracking or as keyword index match) | ||
81 | if (nCurState == 0) | ||
82 | match.idxMatch = idxCh; | ||
83 | |||
84 | // Look up the current character in the FSM | ||
85 | unsigned char ch = (unsigned char)pstrText[idxCh]; | ||
86 | U32 nCell = m_FSM[nCurState & 0x7FFF][ch]; | ||
87 | |||
88 | // If the termination bit is set then we found a keyword substring match | ||
89 | // If the next state is non-zero then we can't stop yet because the matched keyword might be a substring of another keyword | ||
90 | if (nCell & 0x8000) | ||
91 | { | ||
92 | if ( 0 == (nCell & 0x7FFF) ) | ||
93 | { | ||
94 | // Termination bit with 'next state' equal to 0: matched keyword which isn't also a substring of any other keyword | ||
95 | match.lenMatch = idxCh - match.idxMatch + 1; | ||
96 | match.nParam = RLV_HIWORD(nCell); | ||
97 | |||
98 | // Rudimentary word matching: check if the match is a 'word' | ||
99 | if | ||
100 | ( | ||
101 | (!fWordMatch) || | ||
102 | ( | ||
103 | ( (0 == match.idxMatch) || (!isLetter(pstrText[match.idxMatch - 1])) ) && // Start of string OR non-letter | ||
104 | ( (!isLetter(pstrText[match.idxMatch + match.lenMatch])) ) | ||
105 | ) | ||
106 | ) | ||
107 | { | ||
108 | return true; | ||
109 | } | ||
110 | |||
111 | // Not a word, but there's no need to backtrack: we can move on from the character after the current one | ||
112 | nCell = 0; // Will set nCurState == 0 further down | ||
113 | match.idxMatch = idxCh; // Makes sure we move on to the next character instead of backtracking | ||
114 | } | ||
115 | else | ||
116 | { | ||
117 | nLastMatch = nCell; | ||
118 | |||
119 | // In case it turns out that we need to backtrack and return this match, save the length of this match | ||
120 | match.lenMatch = idxCh - match.idxMatch + 1; | ||
121 | } | ||
122 | } | ||
123 | |||
124 | nCurState = RLV_LOWORD(nCell); | ||
125 | |||
126 | // If our new state is 0, but our previous state wasn't, then we followed a false lead and need to backtrack | ||
127 | if ( (nPrevState != 0) && (nCurState == 0) ) | ||
128 | { | ||
129 | // * if nLastMatch == 0 then we need to backtrack and keep going | ||
130 | // * if nLastMatch != 0 then we previously encountered a keyword match so return that one | ||
131 | if (nLastMatch) { | ||
132 | // Rudimentary word matching: check if the match is a 'word' | ||
133 | if | ||
134 | ( | ||
135 | (!fWordMatch) || | ||
136 | ( | ||
137 | ( (0 == match.idxMatch) || (!isLetter(pstrText[match.idxMatch - 1])) ) && // Start of string OR non-letter | ||
138 | ( (!isLetter(pstrText[match.idxMatch + match.lenMatch])) ) | ||
139 | ) | ||
140 | ) | ||
141 | { | ||
142 | match.nParam = RLV_HIWORD(nLastMatch); | ||
143 | return true; | ||
144 | } else | ||
145 | // Not a word match, so throw away this partial match and backtrack | ||
146 | nLastMatch = 0; | ||
147 | } | ||
148 | |||
149 | idxCh = match.idxMatch; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | // We encountered a match, but while investigating whether it was a substring of another keyword we ran out of characters | ||
154 | if (nLastMatch) | ||
155 | { | ||
156 | // Rudimentary word matching: check if we started at the beginning of a word (we know the one behind us is '\0') | ||
157 | if ( (!fWordMatch) || ( (0 == match.idxMatch) || (!isLetter(pstrText[match.idxMatch - 1])) ) ) | ||
158 | { | ||
159 | match.nParam = RLV_HIWORD(nLastMatch); | ||
160 | return true; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | // None of the keywords is contained in the string: return failure | ||
165 | match.idxMatch = -1; | ||
166 | return false; | ||
167 | } | ||
168 | |||
169 | bool RlvMultiStringSearch::findLast(const std::string& strText, RlvMultiStringSearchMatch& match) const { | ||
170 | RlvMultiStringSearchMatch matchTemp; | ||
171 | match.idxMatch = -1; // (Needed to make the return work in case we don't find anything) | ||
172 | matchTemp.lenMatch = 0; // (Needed to make the first loop iteration start at 0) | ||
173 | |||
174 | // Iterating over a "const char*" is *significantly* faster than "std::string" | ||
175 | const char* pstrText = strText.c_str(); | ||
176 | int lenText = strText.length(); | ||
177 | |||
178 | while (findNext(pstrText, matchTemp.idxMatch + matchTemp.lenMatch + 1, lenText, matchTemp)) | ||
179 | match = matchTemp; | ||
180 | |||
181 | return (match.idxMatch != -1); | ||
182 | } | ||
183 | |||
184 | std::vector<RlvMultiStringSearchMatch> RlvMultiStringSearch::findAll(const std::string& strText) { | ||
185 | std::vector<RlvMultiStringSearchMatch> arMatch; | ||
186 | |||
187 | RlvMultiStringSearchMatch match; | ||
188 | match.lenMatch = 0; // (Needed to make the first loop iteration start at 0) | ||
189 | |||
190 | while (findNext(strText, match.idxMatch + match.lenMatch + 1, match)) | ||
191 | arMatch.push_back(match); | ||
192 | |||
193 | return arMatch; | ||
194 | } | ||
195 | |||
196 | // ==================================================================================== | ||
diff --git a/linden/indra/newview/rlvmultistringsearch.h b/linden/indra/newview/rlvmultistringsearch.h new file mode 100644 index 0000000..43b0172 --- /dev/null +++ b/linden/indra/newview/rlvmultistringsearch.h | |||
@@ -0,0 +1,191 @@ | |||
1 | #ifndef RLV_MULTISTRINGSEARCH_H | ||
2 | #define RLV_MULTISTRINGSEARCH_H | ||
3 | |||
4 | // ============================================================================ | ||
5 | // Template classes for our state machine (2 dimensional array of type T) | ||
6 | |||
7 | // STL vector | ||
8 | template<typename T> class RlvMultiStringSearchFSM_STL | ||
9 | { | ||
10 | public: | ||
11 | /* | ||
12 | * Constructor/destructor | ||
13 | */ | ||
14 | |||
15 | // Initialize the FSM with an initial capacity of 'nCapacity' states | ||
16 | RlvMultiStringSearchFSM_STL(size_t nCapacity) | ||
17 | { | ||
18 | m_arFSM.reserve(nCapacity); | ||
19 | |||
20 | T* pT; | ||
21 | for (size_t idx = 0; idx < nCapacity; idx++) | ||
22 | { | ||
23 | // The width of each row is determined by the alphabet we're using (in this case UTF-8 | ||
24 | // so while every character might consist of multiple bytes there are | ||
25 | // still only 256 'columns' in the state machine) | ||
26 | pT = new T[256](); | ||
27 | |||
28 | // The above *should* initialize to 0 but since we can't account for every compiler doing it :( | ||
29 | memset(pT, 0, sizeof(T) * 256); | ||
30 | |||
31 | m_arFSM.push_back(pT); | ||
32 | } | ||
33 | }; | ||
34 | |||
35 | ~RlvMultiStringSearchFSM_STL() | ||
36 | { | ||
37 | // Free any memory we previously allocated | ||
38 | for (int idx = 0, cnt = m_arFSM.size(); idx < cnt; idx++) | ||
39 | delete[] m_arFSM[idx]; | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * Operators | ||
44 | */ | ||
45 | // ASSERTION: nState < m_arFSM.size() at all times | ||
46 | // In other words: do *NOT* go out of bounds on the array (no memory will have allocated for that non-existing state) | ||
47 | // (There probably should be a check for that even in release but it seems wasteful, just don't do it :p) | ||
48 | inline T* operator[](size_t nState) | ||
49 | { | ||
50 | //#ifdef _DEBUG | ||
51 | // assert( nState < m_arFSM.size() ); | ||
52 | //#endif // _DEBUG | ||
53 | |||
54 | return m_arFSM[nState]; | ||
55 | } | ||
56 | inline const T* operator[](size_t nState) const | ||
57 | { | ||
58 | //#ifdef _DEBUG | ||
59 | // assert( nState < m_arFSM.size() ); | ||
60 | //#endif // _DEBUG | ||
61 | |||
62 | return m_arFSM[nState]; | ||
63 | } | ||
64 | |||
65 | /* | ||
66 | * Public member functions | ||
67 | */ | ||
68 | |||
69 | size_t getSize() const { return m_arFSM.size(); } | ||
70 | |||
71 | void resize(size_t nNewCapacity) | ||
72 | { | ||
73 | // Get our current capacity (only rows > capacity need memory allocated) | ||
74 | size_t nCurCapacity = m_arFSM.capacity(); | ||
75 | |||
76 | // Only expand, never shrink | ||
77 | if (nNewCapacity <= nCurCapacity) | ||
78 | { | ||
79 | //#ifdef _DEBUG | ||
80 | // assert(false); | ||
81 | //#endif //_DEBUG | ||
82 | |||
83 | return; | ||
84 | } | ||
85 | m_arFSM.resize(nNewCapacity); | ||
86 | |||
87 | // For each new state we added, allocate memory for the columns | ||
88 | for(size_t idx = nCurCapacity; idx < nNewCapacity; idx++) | ||
89 | // The memset is redundant (or rather *should* be) but since we can't account for every compiler doing it :( | ||
90 | m_arFSM[idx] = (T*)memset(new T[256](), 0, sizeof(T) * 256); | ||
91 | } | ||
92 | |||
93 | protected: | ||
94 | /* | ||
95 | * Member variables | ||
96 | */ | ||
97 | std::vector<T*> m_arFSM; | ||
98 | }; | ||
99 | |||
100 | // ============================================================================ | ||
101 | |||
102 | struct RlvMultiStringSearchMatch | ||
103 | { | ||
104 | int idxMatch; // Starting character index into the string of the matched keyword (-1 if no match) | ||
105 | int lenMatch; // Length of the matched keyword (undefined if no match) | ||
106 | U16 nParam; // User supplied parameter for the matched keyword (undefined if no match) | ||
107 | |||
108 | RlvMultiStringSearchMatch() : idxMatch(-1) {} | ||
109 | }; | ||
110 | |||
111 | // ============================================================================ | ||
112 | // The actual search class | ||
113 | |||
114 | class RlvMultiStringSearch | ||
115 | { | ||
116 | public: | ||
117 | /* | ||
118 | * Constructor/destructor | ||
119 | */ | ||
120 | RlvMultiStringSearch(); | ||
121 | //~RlvMultiStringSearch(); | ||
122 | |||
123 | /* | ||
124 | * Public member functions | ||
125 | */ | ||
126 | |||
127 | // Add a keyword to the state machine (if it already exists then it will simply overwrite the existing parameter) | ||
128 | void addKeyword(const std::string& strKeyword, U16 nParam); | ||
129 | |||
130 | BOOL getExactMatchParam(const std::string& strText, U16& nParam) const | ||
131 | { | ||
132 | RlvMultiStringSearchMatch match; | ||
133 | if (findFirst(strText, match)) | ||
134 | { | ||
135 | // We have an exact match if the starting index is 0 | ||
136 | // and the length of the match matches the length of the string | ||
137 | if ( (0 == match.idxMatch) && (match.lenMatch == (int)strText.length()) ) | ||
138 | { | ||
139 | nParam = match.nParam; | ||
140 | return TRUE; | ||
141 | } | ||
142 | } | ||
143 | |||
144 | return FALSE; // Fall-through: no (exact) match | ||
145 | } | ||
146 | |||
147 | // Finds the first occurance of any keyword in the supplied string | ||
148 | bool findFirst(const std::string& strText, RlvMultiStringSearchMatch& match) const; | ||
149 | // Finds the next occurance of any keyword in the supplied string | ||
150 | bool findNext(const std::string& strText, int idxCh, RlvMultiStringSearchMatch& match) const; | ||
151 | // Finds all occurances of any keyword in the supplied string | ||
152 | std::vector<RlvMultiStringSearchMatch> findAll(const std::string& strText); | ||
153 | // Finds the last occurance of any keyword in the supplied string (non-optimized) | ||
154 | bool findLast(const std::string& strText, RlvMultiStringSearchMatch& match) const; | ||
155 | |||
156 | protected: | ||
157 | // Finds the next occurance of any keyword in the supplied string | ||
158 | bool findNext(const char* pstrText, int idxCh, int cntCh, RlvMultiStringSearchMatch& match, bool fWordMatch = true) const; | ||
159 | |||
160 | /* | ||
161 | * Member variables | ||
162 | */ | ||
163 | RlvMultiStringSearchFSM_STL<U32> m_FSM; // Our finite state machine (4 bytes * 256 = 1Kb of memory/state) | ||
164 | // HIWORD(U32) = 16-bits of user data | ||
165 | // LOWORD(U32) = ABBBBBBBBBBBBBBB | ||
166 | // A = termination bit | ||
167 | // If (set) and (B == 0): match | ||
168 | // If (set) and (B != 0): match, but might only be a substring of another keyword | ||
169 | // B = next state (0..32767) | ||
170 | // If (B == 0): false lead -> backtrack | ||
171 | // If (B != 0): partial keyword match, next state | ||
172 | size_t m_cntState; // The number of states in the FSM (= the number of *used* rows in the array) | ||
173 | }; | ||
174 | |||
175 | // ============================================================================ | ||
176 | // Inlined member functions | ||
177 | // | ||
178 | |||
179 | inline bool RlvMultiStringSearch::findFirst(const std::string& strText, RlvMultiStringSearchMatch& match) const | ||
180 | { | ||
181 | return findNext(strText.c_str(), 0, strText.length(), match); | ||
182 | } | ||
183 | |||
184 | inline bool RlvMultiStringSearch::findNext(const std::string& strText, int idxCh, RlvMultiStringSearchMatch& match) const | ||
185 | { | ||
186 | return findNext(strText.c_str(), idxCh, strText.length(), match); | ||
187 | } | ||
188 | |||
189 | // ============================================================================ | ||
190 | |||
191 | #endif // RLV_MULTISTRINGSEARCH_H | ||
diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 38499d3..9ad1787 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml | |||
@@ -69,7 +69,9 @@ | |||
69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> | 69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> |
70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> | 70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> |
71 | <ScriptBgReadOnlyColor value="100, 100, 100, 255" /> <!-- Not used --> | 71 | <ScriptBgReadOnlyColor value="100, 100, 100, 255" /> <!-- Not used --> |
72 | 72 | <TextLinkColor value="144, 165, 208, 255"/> | |
73 | <TextLinkHoverColor value="255, 255, 255, 255"/> | ||
74 | |||
73 | <!-- LISTBOXES --> | 75 | <!-- LISTBOXES --> |
74 | <ScrollBgReadOnlyColor value="200, 209, 204, 255" /> <!-- Background of read only lists --> | 76 | <ScrollBgReadOnlyColor value="200, 209, 204, 255" /> <!-- Background of read only lists --> |
75 | <ScrollBgWriteableColor value="200, 209, 204, 255" /> <!-- Background of editable lists, e.g. groups--> | 77 | <ScrollBgWriteableColor value="200, 209, 204, 255" /> <!-- Background of editable lists, e.g. groups--> |
diff --git a/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png b/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png new file mode 100644 index 0000000..f9ea7a2 --- /dev/null +++ b/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png | |||
Binary files differ | |||
diff --git a/linden/indra/newview/skins/default/html/en-us/loading/loading.html b/linden/indra/newview/skins/default/html/en-us/loading/loading.html index 1c62d2f..97174b0 100644 --- a/linden/indra/newview/skins/default/html/en-us/loading/loading.html +++ b/linden/indra/newview/skins/default/html/en-us/loading/loading.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <table width="100%" height="100%" border="0"> | 2 | <table width="100%" height="100%" border="0"> |
3 | <tr> | 3 | <tr> |
4 | <td align="center" valign="middle" style="font-size:0.8em;"> | 4 | <td align="center" valign="middle" style="font-size:0.8em;"> |
5 | <img src="sl_logo_rotate_black.gif" align="absmiddle"><br/> loading... | 5 | <img src="imprudence_loading.png" align="absmiddle"><br/> loading... |
6 | </td> | 6 | </td> |
7 | </tr> | 7 | </tr> |
8 | </table> | 8 | </table> |
diff --git a/linden/indra/newview/skins/default/textures/arrow_left.tga b/linden/indra/newview/skins/default/textures/arrow_left.tga new file mode 100644 index 0000000..68e6280 --- /dev/null +++ b/linden/indra/newview/skins/default/textures/arrow_left.tga | |||
Binary files differ | |||
diff --git a/linden/indra/newview/skins/default/textures/arrow_right.tga b/linden/indra/newview/skins/default/textures/arrow_right.tga new file mode 100644 index 0000000..7a5a30e --- /dev/null +++ b/linden/indra/newview/skins/default/textures/arrow_right.tga | |||
Binary files differ | |||
diff --git a/linden/indra/newview/skins/default/textures/textures.xml b/linden/indra/newview/skins/default/textures/textures.xml index 9e1d9b5..4800048 100644 --- a/linden/indra/newview/skins/default/textures/textures.xml +++ b/linden/indra/newview/skins/default/textures/textures.xml | |||
@@ -365,6 +365,9 @@ | |||
365 | <texture name="icn_label_music.tga"/> | 365 | <texture name="icn_label_music.tga"/> |
366 | <texture name="icn_label_media.tga"/> | 366 | <texture name="icn_label_media.tga"/> |
367 | <texture name="arrow_down.tga"/> | 367 | <texture name="arrow_down.tga"/> |
368 | <texture name="arrow_up.tga"/> | ||
369 | <texture name="arrow_left.tga"/> | ||
370 | <texture name="arrow_right.tga"/> | ||
368 | <texture name="cloud-particle.j2c" use_mips="true"/> | 371 | <texture name="cloud-particle.j2c" use_mips="true"/> |
369 | 372 | ||
370 | <texture name="skin_thumbnail_default.png" preload="true" /> | 373 | <texture name="skin_thumbnail_default.png" preload="true" /> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml b/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml new file mode 100644 index 0000000..be7de86 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml | |||
@@ -0,0 +1,74 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
2 | <floater | ||
3 | name="animation list" | ||
4 | title="Animation List" | ||
5 | can_resize="true" | ||
6 | can_minimize="true" | ||
7 | can_close="true" | ||
8 | can_drag_on_left="false" | ||
9 | rect_control="FloaterAnimationListRect" | ||
10 | min_width="1000" | ||
11 | min_height="275" | ||
12 | > | ||
13 | <scroll_list | ||
14 | name="animation_list" | ||
15 | left="10" | ||
16 | right="-10" | ||
17 | top="-20" | ||
18 | bottom="100" | ||
19 | column_padding="0" | ||
20 | can_resize="true" | ||
21 | follows="left|top|bottom|right" | ||
22 | draw_heading="true" | ||
23 | multi_select="true" | ||
24 | search_column="1" | ||
25 | tool_tip="Hold shift or control while clicking to select multiple thingers" | ||
26 | > | ||
27 | <!-- Icons relating to the avatar, currently: tracking, and marked --> | ||
28 | <column name="Anim Name" label="Anim Name" width="250"/> | ||
29 | <column name="Animation UUID" label="Animation UUID" width="250"/> | ||
30 | <!--<column name="object_name" label="Distance" dynamicwidth="true"/>--> | ||
31 | <column name="Source Object UUID" label="Source Object UUID" width="250"/> | ||
32 | <column name="Source Owner" label="Source Owner" width="250"/> | ||
33 | <!-- What the avatar is doing: producing sounds, rezzing, particles, etc --> | ||
34 | </scroll_list> | ||
35 | <panel | ||
36 | name="options" | ||
37 | left="10" | ||
38 | right="-10" | ||
39 | top="90" | ||
40 | bottom="10" | ||
41 | border="true" | ||
42 | mouse_opaque="true" | ||
43 | bevel_style="in" | ||
44 | background_visible="true" | ||
45 | background_opaque="true" | ||
46 | follows="left|right|bottom" | ||
47 | bg_opaque_color="0,0,0,0.3" | ||
48 | bg_alpha_color="blue" | ||
49 | can_resize="false" | ||
50 | > | ||
51 | </panel> | ||
52 | |||
53 | <button bottom="55" follows="left|bottom" font="SansSerifSmall" halign="center" | ||
54 | height="20" label="Stop Selected" left_delta="5" | ||
55 | mouse_opaque="true" name="Stop Selected" | ||
56 | tool_tip="Stop selected animations" width="150" /> | ||
57 | <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center" | ||
58 | height="20" label="Revoke Selected" left_delta="155" | ||
59 | mouse_opaque="true" name="Revoke Selected" | ||
60 | tool_tip="Revokes animation permissions for object associated with the selections" width="150" /> | ||
61 | <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center" | ||
62 | height="20" label="Stop+Revoke Selected" left_delta="155" | ||
63 | mouse_opaque="true" name="Stop+Revoke Selected" | ||
64 | tool_tip="Revokes animation permissions for object(s) associated with the selections, as well as stopping the anim" width="150" /> | ||
65 | <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center" | ||
66 | height="20" label="Open Owner Profile" left_delta="155" | ||
67 | mouse_opaque="true" name="Open Owner Profile" | ||
68 | tool_tip="Opens profile of the owner(s) of object(s) associated with the selections" width="150" /> | ||
69 | <button bottom_delta="-25" enabled="false" follows="left|bottom" font="SansSerifSmall" halign="center" | ||
70 | height="20" label="Return Object" left_delta="-465" | ||
71 | mouse_opaque="true" name="Return Object" | ||
72 | tool_tip="Returns object(s) selected, if you have land powers" width="150" /> | ||
73 | |||
74 | </floater> \ No newline at end of file | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml b/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml new file mode 100644 index 0000000..13c6b6c --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml | |||
@@ -0,0 +1,29 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="true" | ||
4 | can_resize="true" enabled="true" follows="left|bottom" height="620" | ||
5 | hidden="false" left="300" min_height="420" min_width="630" | ||
6 | mouse_opaque="true" name="asset browser" title="Asset Browser" width="720"> | ||
7 | |||
8 | <inventory_panel allow_multi_select="false" border="true" bottom="-299" enabled="true" | ||
9 | follows="left|top" height="280" hidden="false" left="10" | ||
10 | mouse_opaque="true" name="inventory panel" | ||
11 | sort_order="TexturePickerSortOrder" width="231"/> | ||
12 | |||
13 | <button bottom="-350" follows="left|top" font="SansSerifSmall" | ||
14 | halign="center" height="20" hidden="false" label="Next >>" | ||
15 | left="160" mouse_opaque="true" name="button next" scale_image="TRUE" | ||
16 | width="80"/> | ||
17 | |||
18 | <button bottom_delta="-30" follows="left|top" font="SansSerifSmall" | ||
19 | halign="center" height="20" hidden="false" label="<< Previous" | ||
20 | left_delta="0" mouse_opaque="true" name="button previous" scale_image="TRUE" | ||
21 | width="80"/> | ||
22 | |||
23 | <button bottom_delta="-30" follows="left|top" font="SansSerifSmall" | ||
24 | halign="center" height="20" hidden="false" label="Refresh" | ||
25 | left_delta="0" mouse_opaque="true" name="button refresh" scale_image="TRUE" | ||
26 | width="80"/> | ||
27 | |||
28 | </floater> | ||
29 | |||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml index d32832c..dd66a83 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater bottom="27" can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater bottom="27" can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="true" can_tear_off="true" enabled="true" height="270" left="15" | 3 | can_resize="true" can_tear_off="true" enabled="true" height="270" left="15" |
4 | min_height="150" min_width="425" mouse_opaque="true" name="chat floater" | 4 | min_height="150" min_width="425" mouse_opaque="true" name="chat floater" |
5 | rect_control="FloaterChatRect" title="Local Chat" width="435"> | 5 | rect_control="FloaterChatRect" title="Local Chat" width="435"> |
@@ -59,10 +59,14 @@ | |||
59 | <panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5" | 59 | <panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5" |
60 | tab_group="1" top="25"> | 60 | tab_group="1" top="25"> |
61 | <string name="gesture_label">Gestures</string> | 61 | <string name="gesture_label">Gestures</string> |
62 | <spinner bottom="-22" decimal_digits="0" follows="left|bottom" height="20" | ||
63 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="0" | ||
64 | max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control" | ||
65 | width="100" tool_tip="Set the default channel for inworld chat"/> | ||
62 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" | 66 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" |
63 | enabled="true" follows="left|right|bottom" font="SansSerif" | 67 | enabled="true" follows="left|right|bottom" font="SansSerif" |
64 | handle_edit_keys_directly="false" height="20" label="Click here to chat." | 68 | handle_edit_keys_directly="false" height="20" label="Click here to chat." |
65 | left="0" max_length="254" mouse_opaque="true" name="Chat Editor" | 69 | left="105" max_length="254" mouse_opaque="true" name="Chat Editor" |
66 | right="-70" select_all_on_focus_received="false" select_on_focus="false" | 70 | right="-70" select_all_on_focus_received="false" select_on_focus="false" |
67 | tab_group="1" /> | 71 | tab_group="1" /> |
68 | <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65" | 72 | <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml index 3d1c569..f0c97f2 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml | |||
@@ -205,5 +205,23 @@ | |||
205 | <on_click filter="" function="Inventory.SetSortBy" userdata="systemfolderstotop" /> | 205 | <on_click filter="" function="Inventory.SetSortBy" userdata="systemfolderstotop" /> |
206 | </menu_item_check> | 206 | </menu_item_check> |
207 | </menu> | 207 | </menu> |
208 | <menu bottom_delta="64" drop_shadow="true" height="49" | ||
209 | label="Search" left="0" mouse_opaque="false" name="Sort" opaque="true" | ||
210 | tear_off="true" width="118"> | ||
211 | <menu_item_check bottom_delta="-18" control_name="Inventory.SearchByName" height="18" | ||
212 | label="By Name" left="0" mouse_opaque="true" name="By Name" width="118"> | ||
213 | <on_click filter="" function="Inventory.SetSearchBy" userdata="name" /> | ||
214 | </menu_item_check> | ||
215 | <menu_item_check bottom_delta="-18" control_name="Inventory.SearchByCreator" height="18" | ||
216 | label="By Creator" left="0" mouse_opaque="true" name="By Creator" width="118"> | ||
217 | <on_click filter="" function="Inventory.SetSearchBy" userdata="creator" /> | ||
218 | </menu_item_check> | ||
219 | <menu_item_separator bottom_delta="-8" height="8" left="0" mouse_opaque="true" name="separator" | ||
220 | width="118" /> | ||
221 | <menu_item_check bottom_delta="-18" control_name="Inventory.SearchByAll" height="18" | ||
222 | label="By All" left="0" mouse_opaque="true" name="By All" width="118"> | ||
223 | <on_click filter="" function="Inventory.SetSearchBy" userdata="all" /> | ||
224 | </menu_item_check> | ||
225 | </menu> | ||
208 | </menu_bar> | 226 | </menu_bar> |
209 | </floater> | 227 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml b/linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml index 318f46a..7beb7e4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" |
3 | height="440" min_height="140" min_width="467" name="floater_about" | 3 | height="440" min_height="140" min_width="467" name="floater_about" |
4 | rect_control="FloaterMediaRect" title="Media Browser" width="560"> | 4 | rect_control="FloaterMediaRect" title="Web Browser" width="560"> |
5 | <layout_stack name="stack1" bottom="0" follows="left|right|top|bottom" left="10" top="-20" width="540"> | 5 | <layout_stack name="stack1" bottom="0" follows="left|right|top|bottom" left="10" top="-20" width="540"> |
6 | <layout_panel auto_resize="false" bottom="0" height="20" left="0" name="nav_controls" user_resize="false" | 6 | <layout_panel auto_resize="false" bottom="0" height="20" left="0" name="nav_controls" user_resize="false" |
7 | width="540"> | 7 | width="540"> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml index 3408c76..3425c65 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" can_resize="true" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" can_resize="true" |
3 | can_tear_off="false" follows="top|right" height="420" min_height="64" min_width="64" | 3 | can_tear_off="false" follows="top|right" height="455" min_height="64" min_width="64" |
4 | name="minimap" rect_control="FloaterMiniMapRect" width="200"> | 4 | name="minimap" rect_control="FloaterMiniMapRect" width="200"> |
5 | 5 | ||
6 | <panel label="Mini Map" name="mini_mapview" | 6 | <panel label="Mini Map" name="mini_mapview" |
@@ -28,7 +28,7 @@ | |||
28 | </text> | 28 | </text> |
29 | <slider bottom_delta="0" left_delta="55" follows="left|top" width="110" height="15" | 29 | <slider bottom_delta="0" left_delta="55" follows="left|top" width="110" height="15" |
30 | name="near_me_range" label="" control_name="NearMeRange" | 30 | name="near_me_range" label="" control_name="NearMeRange" |
31 | min_val="5" max_val="256" increment="1" initial_val="96" decimal_digits="0" /> | 31 | min_val="5" max_val="512" increment="1" initial_val="96" decimal_digits="0" /> |
32 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 32 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
33 | bottom_delta="0" left="190" drop_shadow_visible="true" follows="left|top" | 33 | bottom_delta="0" left="190" drop_shadow_visible="true" follows="left|top" |
34 | font="SansSerifSmall" h_pad="0" halign="left" height="15" | 34 | font="SansSerifSmall" h_pad="0" halign="left" height="15" |
@@ -36,33 +36,63 @@ | |||
36 | width="40"> | 36 | width="40"> |
37 | Meters | 37 | Meters |
38 | </text> | 38 | </text> |
39 | <scroll_list bottom_delta="-166" width="96" height="160" left="10" | 39 | <tab_container border="false" bottom_delta="-179" height="174" left="0" mouse_opaque="false" |
40 | follows="left|top|bottom|right" draw_border="false" draw_heading="true" | 40 | name="button_container" tab_position="top" follows="left|right|bottom" width="198"> |
41 | <panel border="true" bottom="-180" follows="left|top|right|bottom" height="160" | ||
42 | label="Avatars" left="1" mouse_opaque="true" name="avatar_tab" width="198"> | ||
43 | <button bottom="-25" follows="top|right" height="22" label="IM/Call" | ||
44 | left="-85" name="im_btn" tool_tip="Open Instant Message session" | ||
45 | width="80" /> | ||
46 | <button bottom_delta="-25" follows="top|right" height="22" label="Profile" | ||
47 | left_delta="0" name="profile_btn" | ||
48 | tool_tip="Show picture, groups, and other information" width="80" /> | ||
49 | <button bottom_delta="-25" follows="top|right" height="22" label="Teleport..." | ||
50 | left_delta="0" name="offer_teleport_btn" | ||
51 | tool_tip="Offer this friend a teleport to your current location" width="80" /> | ||
52 | <button bottom_delta="-25" follows="top|right" height="22" label="Track" | ||
53 | left_delta="0" name="track_btn" | ||
54 | tool_tip="Create a beacon to track this avatar" width="80" /> | ||
55 | <button bottom_delta="-25" follows="top|right" height="22" label="Invite..." | ||
56 | left_delta="0" name="invite_btn" | ||
57 | tool_tip="Remove this person from your friends list" width="80" /> | ||
58 | <button bottom_delta="-25" follows="top|right" height="22" label="Add..." | ||
59 | left_delta="0" name="add_btn" tool_tip="Offer friendship to a resident" | ||
60 | width="80" /> | ||
61 | </panel> | ||
62 | <panel border="true" bottom="-160" follows="left|top|right|bottom" height="160" | ||
63 | label="Estate" left="1" mouse_opaque="true" name="estate_tab" width="198"> | ||
64 | <button bottom="-25" follows="top|right" height="22" label="Freeze..." | ||
65 | left="-85" name="freeze_btn" tool_tip="" | ||
66 | width="80" /> | ||
67 | <button bottom_delta="-25" follows="top|right" height="22" label="Eject..." | ||
68 | left_delta="0" name="eject_btn" | ||
69 | tool_tip="" width="80" /> | ||
70 | <button bottom_delta="-25" follows="top|right" height="22" label="Mute..." | ||
71 | left_delta="0" name="mute_btn" | ||
72 | tool_tip="" width="80" /> | ||
73 | <button bottom_delta="-25" follows="top|right" height="22" label="Unmute..." | ||
74 | left_delta="0" name="unmute_btn" | ||
75 | tool_tip="" width="80" /> | ||
76 | <button bottom_delta="-25" follows="top|right" height="22" label="Report..." | ||
77 | left_delta="0" name="ar_btn" | ||
78 | tool_tip="" width="80" /> | ||
79 | <button bottom_delta="-25" follows="top|right" height="22" label="Estate..." | ||
80 | left_delta="0" name="estate_eject_btn" tool_tip="" | ||
81 | width="80" /> | ||
82 | </panel> | ||
83 | </tab_container> | ||
84 | <scroll_list bottom="-187" width="96" height="140" left="10" | ||
85 | follows="left|bottom|right" draw_border="false" draw_heading="true" | ||
41 | draw_stripes="true" column_padding="5" sort_column="1" mouse_opaque="true" | 86 | draw_stripes="true" column_padding="5" sort_column="1" mouse_opaque="true" |
42 | background_visible="true" multi_select="false" name="RadarList"> | 87 | background_visible="true" multi_select="false" name="RadarList"> |
43 | <column name="avatar_name" label="Name" dynamicwidth="true" /> | 88 | <column name="avatar_name" label="Name" dynamicwidth="true" /> |
44 | <column name="avatar_distance" label="Dist." width="55" /> | 89 | <column name="avatar_distance" label="Dist." width="55" /> |
45 | </scroll_list> | 90 | </scroll_list> |
46 | <button bottom="-45" follows="top|right" height="22" label="IM/Call" | ||
47 | left="-85" name="im_btn" tool_tip="Open Instant Message session" | ||
48 | width="80" /> | ||
49 | <button bottom_delta="-25" follows="top|right" height="22" label="Profile" | ||
50 | left_delta="0" name="profile_btn" | ||
51 | tool_tip="Show picture, groups, and other information" width="80" /> | ||
52 | <button bottom_delta="-25" follows="top|right" height="22" label="Teleport..." | ||
53 | left_delta="0" name="offer_teleport_btn" | ||
54 | tool_tip="Offer this friend a teleport to your current location" width="80" /> | ||
55 | <button bottom_delta="-25" follows="top|right" height="22" label="Track" | ||
56 | left_delta="0" name="track_btn" | ||
57 | tool_tip="Create a beacon to track this avatar" width="80" /> | ||
58 | <button bottom_delta="-30" follows="top|right" height="22" label="Invite..." | ||
59 | left_delta="0" name="invite_btn" | ||
60 | tool_tip="Remove this person from your friends list" width="80" /> | ||
61 | <button bottom_delta="-30" follows="top|right" height="22" label="Add..." | ||
62 | left_delta="0" name="add_btn" tool_tip="Offer friendship to a resident" | ||
63 | width="80" /> | ||
64 | <string name="no_one_near"> | ||
65 | No avatars within range | ||
66 | </string> | ||
67 | </panel> | 91 | </panel> |
92 | <string name="no_one_near"> | ||
93 | No avatars within range | ||
94 | </string> | ||
95 | <string name="muted"> | ||
96 | (muted) | ||
97 | </string> | ||
68 | </floater> | 98 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml b/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml new file mode 100644 index 0000000..615b7d1 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml | |||
@@ -0,0 +1,54 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <floater bottom="0" can_close="true" can_drag_on_left="false" can_minimize="true" | ||
3 | can_resize="false" can_tear_off="true" enabled="true" height="140" left="0" | ||
4 | mouse_opaque="true" name="object im info" width="300" | ||
5 | rect_control="FloaterObjectIMInfo" short_title="Object Info" title="Object Information" > | ||
6 | |||
7 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
8 | bottom="-35" drop_shadow_visible="true" follows="left|top" | ||
9 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
10 | mouse_opaque="true" name="LabelItemNameTitle" v_pad="0" width="78"> | ||
11 | Object: | ||
12 | </text> | ||
13 | <text bevel_style="none" border_style="line" border_visible="false" | ||
14 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
15 | font="SansSerif" height="20" is_unicode="false" left="70" | ||
16 | max_length="254" mouse_opaque="false" name="ObjectName" | ||
17 | width="200" /> | ||
18 | |||
19 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
20 | bottom="-60" drop_shadow_visible="true" follows="left|top" | ||
21 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
22 | mouse_opaque="true" name="LabelSlurlTitle" v_pad="0" width="78"> | ||
23 | Location: | ||
24 | </text> | ||
25 | <text bevel_style="none" border_style="line" border_visible="false" | ||
26 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
27 | font="SansSerif" height="20" is_unicode="false" left="70" hover="true" | ||
28 | max_length="254" mouse_opaque="true" name="Slurl" font-style="UNDERLINE" | ||
29 | width="200" hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/> | ||
30 | |||
31 | <!-- A new viewer talking to an old sim will not have a slurl available and will show this. --> | ||
32 | <text bevel_style="none" border_style="line" border_visible="false" | ||
33 | border_thickness="0" bottom_delta="0" enabled="true" follows="left|top" | ||
34 | font="SansSerif" height="20" is_unicode="false" left_delta="0" hover="false" | ||
35 | max_length="254" mouse_opaque="false" name="Unknown_Slurl" width="200"> | ||
36 | (Location Info Not Available) | ||
37 | </text> | ||
38 | |||
39 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
40 | bottom="-85" drop_shadow_visible="true" follows="left|top" | ||
41 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
42 | mouse_opaque="true" name="LabelOwnerNameTitle" v_pad="0" width="78"> | ||
43 | Owner: | ||
44 | </text> | ||
45 | <text bevel_style="none" border_style="line" border_visible="false" | ||
46 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
47 | font="SansSerif" height="20" is_unicode="false" left="70" hover="true" | ||
48 | max_length="254" mouse_opaque="true" name="OwnerName" font-style="UNDERLINE" | ||
49 | width="200" hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/> | ||
50 | |||
51 | <button bottom_delta="-30" font="SansSerif" halign="center" height="20" label="Mute Owner" | ||
52 | label_selected="Mute Owner" left="70" mouse_opaque="true" name="Mute" | ||
53 | width="160" /> | ||
54 | </floater> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_prim_import.xml b/linden/indra/newview/skins/default/xui/en-us/floater_prim_import.xml new file mode 100644 index 0000000..191b31e --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_prim_import.xml | |||
@@ -0,0 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <floater can_close="true" can_drag_on_left="true" can_minimize="false" | ||
3 | can_resize="false" height="80" name="Import" title="Import progress" width="200" mouse_opaque="true"> | ||
4 | <text height="15" left="10" name="name_label" top="-10"> Progress </text> | ||
5 | </floater> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml b/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml index daf45cf..c67443f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_profile.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="false" height="520" min_height="0" min_width="0" | 3 | can_resize="false" height="545" min_height="0" min_width="0" |
4 | name="avatarinfo" title="Profile" width="420"> | 4 | name="avatarinfo" title="Profile" width="420"> |
5 | <panel bottom="-520" height="486" left="0" name="Panel Avatar" width="430" /> | 5 | <panel bottom="-545" height="511" left="0" name="Panel Avatar" width="430" /> |
6 | </floater> | 6 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_rlv_behaviour.xml b/linden/indra/newview/skins/default/xui/en-us/floater_rlv_behaviour.xml new file mode 100644 index 0000000..d9e70e6 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_rlv_behaviour.xml | |||
@@ -0,0 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | ||
3 | height="425" min_height="200" min_width="375" name="rlvBehaviours" | ||
4 | title="Active RLV Restrictions" width="350"> | ||
5 | <scroll_list bottom="-400" draw_border="true" draw_heading="true" | ||
6 | follows="top|left|bottom|right" height="365" left="15" multi_select="false" | ||
7 | name="behaviour_list" right="-15"> | ||
8 | <column label="Restriction" name="behaviour" width="170" /> | ||
9 | <column label="Object Name" name="name" width="170" /> | ||
10 | </scroll_list> | ||
11 | </floater> \ No newline at end of file | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml index a9ac7fa..9333153 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="false" follows="left|top" height="526" name="Snapshot" | 3 | can_resize="false" follows="left|top" height="526" name="Snapshot" |
4 | rect_control="FloaterSnapshotRect" title="Snapshot Preview" width="215"> | 4 | rect_control="FloaterSnapshotRect" title="Snapshot Preview" width="215"> |
5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="type_label" | 5 | <text bottom_delta="-40" follows="top|left" height="15" left="10" name="type_label" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 18d56b4..bc18f44 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater bottom="-359" can_close="true" can_drag_on_left="false" can_minimize="true" | 2 | <floater bottom="-374" can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="false" follows="left|top" height="550" | 3 | can_resize="false" follows="left|top" height="565" |
4 | left="308" min_height="100" min_width="100" mouse_opaque="true" | 4 | left="308" min_height="100" min_width="100" mouse_opaque="true" |
5 | name="toolbox floater" rect_control="ToolboxRect" sound_flags="0" title="" | 5 | name="toolbox floater" rect_control="ToolboxRect" sound_flags="0" title="" |
6 | short_title="Build" width="272"> | 6 | short_title="Build" width="272"> |
@@ -79,20 +79,24 @@ | |||
79 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" | 79 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" |
80 | initial_value="false" label="Select Faces to Texture" left="4" mouse_opaque="true" | 80 | initial_value="false" label="Select Faces to Texture" left="4" mouse_opaque="true" |
81 | name="radio select face" radio_style="true" width="114" /> | 81 | name="radio select face" radio_style="true" width="114" /> |
82 | <check_box bottom_delta="-22" control_name="SnapEnabled" follows="left|top" | 82 | <check_box bottom_delta="-19" control_name="EditLinkedParts" follows="left|top" |
83 | font="SansSerifSmall" height="16" initial_value="true" label="Use Grid" | 83 | font="SansSerifSmall" height="16" initial_value="false" |
84 | left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" /> | 84 | label="Edit linked parts" left="4" mouse_opaque="true" |
85 | <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" | 85 | name="checkbox edit linked parts" width="114" /> |
86 | height="16" label="Options..." label_selected="Options..." left_delta="75" | 86 | <button bottom_delta="-19" follows="left|top" font="SansSerifSmall" |
87 | mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" /> | 87 | halign="center" height="18" label="Link" label_selected="Link" |
88 | left="10" mouse_opaque="true" name="link_btn" width="68" /> | ||
89 | <button bottom_delta="0" follows="left|top" font="SansSerifSmall" | ||
90 | halign="center" height="18" label="Unlink" label_selected="Unlink" | ||
91 | left_delta="75" mouse_opaque="true" name="unlink_btn" width="68" /> | ||
88 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 92 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
89 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | 93 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" |
90 | font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6" | 94 | font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6" |
91 | mouse_opaque="true" name="text ruler mode" v_pad="0" width="68"> | 95 | mouse_opaque="true" name="text ruler mode" v_pad="0" width="68"> |
92 | Ruler mode: | 96 | Ruler: |
93 | </text> | 97 | </text> |
94 | <combo_box allow_text_entry="false" bottom_delta="-4" follows="left|top" height="20" | 98 | <combo_box allow_text_entry="false" bottom_delta="-4" follows="left|top" height="20" |
95 | left_delta="74" max_chars="20" mouse_opaque="true" | 99 | left_delta="40" max_chars="20" mouse_opaque="true" |
96 | name="combobox grid mode" width="86"> | 100 | name="combobox grid mode" width="86"> |
97 | <combo_item name="World" value="World"> | 101 | <combo_item name="World" value="World"> |
98 | World | 102 | World |
@@ -112,16 +116,13 @@ | |||
112 | font="SansSerifSmall" height="16" initial_value="true" | 116 | font="SansSerifSmall" height="16" initial_value="true" |
113 | label="Stretch Textures" left_delta="0" mouse_opaque="true" | 117 | label="Stretch Textures" left_delta="0" mouse_opaque="true" |
114 | name="checkbox stretch textures" width="134" /> | 118 | name="checkbox stretch textures" width="134" /> |
115 | <check_box bottom_delta="-15" control_name="EditLinkedParts" follows="left|top" | 119 | <check_box bottom_delta="-19" control_name="SnapEnabled" follows="left|top" |
116 | font="SansSerifSmall" height="16" initial_value="false" | 120 | font="SansSerifSmall" height="16" initial_value="true" label="Use Grid" |
117 | label="Edit linked parts" left="143" mouse_opaque="true" | 121 | left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" /> |
118 | name="checkbox edit linked parts" width="114" /> | 122 | <button bottom_delta="-19" follows="left|top" font="SansSerifSmall" |
119 | <button bottom_delta="-18" follows="left|top" font="SansSerifSmall" | 123 | halign="center" valign="center" |
120 | halign="center" height="18" label="Link" label_selected="Link" | 124 | height="20" label="Options..." label_selected="Options..." left_delta="20" |
121 | right="-5" mouse_opaque="true" name="link_btn" width="78" /> | 125 | mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" /> |
122 | <button bottom_delta="-20" follows="left|top" font="SansSerifSmall" | ||
123 | halign="center" height="18" label="Unlink" label_selected="Unlink" | ||
124 | right="-5" mouse_opaque="true" name="unlink_btn" width="78" /> | ||
125 | 126 | ||
126 | <!-- Help text --> | 127 | <!-- Help text --> |
127 | 128 | ||
@@ -289,18 +290,18 @@ | |||
289 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" | 290 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" |
290 | border_visible="false" bottom_delta="-16" drop_shadow_visible="true" enabled="true" | 291 | border_visible="false" bottom_delta="-16" drop_shadow_visible="true" enabled="true" |
291 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="118" | 292 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="118" |
292 | hidden="false" mouse_opaque="true" name="Brush:" v_pad="0" width="100"> | 293 | hidden="false" mouse_opaque="true" name="Bulldozer:" v_pad="0" width="100"> |
293 | Brush: | 294 | Bulldozer: |
294 | </text> | 295 | </text> |
295 | 296 | ||
296 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" | 297 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" |
297 | border_visible="false" bottom_delta="-18" drop_shadow_visible="true" enabled="true" | 298 | border_visible="false" bottom_delta="-18" drop_shadow_visible="true" enabled="true" |
298 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="132" | 299 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="132" |
299 | hidden="false" mouse_opaque="true" name="Brush Size:" v_pad="0" width="100"> | 300 | hidden="false" mouse_opaque="true" name="Dozer Size:" v_pad="0" width="100"> |
300 | Size | 301 | Size |
301 | </text> | 302 | </text> |
302 | <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" | 303 | <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" |
303 | increment="1.0" initial_val="0.0" left="178" max_val="2.0" min_val="0.0" | 304 | increment="0.1" initial_val="2.0" left="178" max_val="11.0" min_val="1.0" |
304 | mouse_opaque="true" name="slider brush size" width="80" /> | 305 | mouse_opaque="true" name="slider brush size" width="80" /> |
305 | 306 | ||
306 | 307 | ||
@@ -312,21 +313,23 @@ | |||
312 | </text> | 313 | </text> |
313 | <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" | 314 | <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" |
314 | increment="0.1" initial_val="0.00" left="178" max_val="2.0" min_val="-1.0" | 315 | increment="0.1" initial_val="0.00" left="178" max_val="2.0" min_val="-1.0" |
315 | mouse_opaque="true" name="slider force" width="80" /> | 316 | mouse_opaque="true" name="slider force" width="80" /> |
316 | 317 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | |
317 | 318 | bottom="-168" left="118" drop_shadow_visible="true" follows="left|top" | |
318 | <button bottom="-163" follows="left|top" font="SansSerifSmall" halign="center" | 319 | font="SansSerifSmall" h_pad="0" halign="right" height="16" |
319 | height="20" label="More >>" left="186" mouse_opaque="true" | 320 | mouse_opaque="true" name="obj_count" v_pad="0" width="143"> |
320 | name="button more" scale_image="TRUE" tool_tip="Advanced Options" | 321 | Selected objects: [COUNT] |
321 | width="80" /> | 322 | </text> |
322 | <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" | 323 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
323 | height="20" label="<< Less" left_delta="0" mouse_opaque="true" | 324 | bottom="-181" left="118" drop_shadow_visible="true" follows="left|top" |
324 | name="button less" scale_image="TRUE" tool_tip="Advanced Options" | 325 | font="SansSerifSmall" h_pad="0" halign="right" height="16" |
325 | width="80" /> | 326 | mouse_opaque="true" name="prim_count" v_pad="0" width="143"> |
327 | primitives: [COUNT] | ||
328 | </text> | ||
326 | 329 | ||
327 | <!-- Sub-tabs --> | 330 | <!-- Sub-tabs --> |
328 | 331 | ||
329 | <tab_container bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="false" | 332 | <tab_container bottom="-565" follows="left|top" height="384" left="0" mouse_opaque="false" |
330 | name="Object Info Tabs" tab_max_width="52" tab_min_width="40" | 333 | name="Object Info Tabs" tab_max_width="52" tab_min_width="40" |
331 | tab_position="top" width="272"> | 334 | tab_position="top" width="272"> |
332 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" | 335 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" |
@@ -364,7 +367,7 @@ | |||
364 | Thrax Linden | 367 | Thrax Linden |
365 | </text> | 368 | </text> |
366 | <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center" | 369 | <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center" |
367 | height="16" label="Profile..." label_selected="Profile..." left_delta="94" | 370 | height="20" label="Profile..." label_selected="Profile..." left_delta="94" |
368 | mouse_opaque="true" name="button creator profile" scale_image="TRUE" | 371 | mouse_opaque="true" name="button creator profile" scale_image="TRUE" |
369 | width="78" /> | 372 | width="78" /> |
370 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 373 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
@@ -380,32 +383,42 @@ | |||
380 | Thrax Linden | 383 | Thrax Linden |
381 | </text> | 384 | </text> |
382 | <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center" | 385 | <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center" |
383 | height="16" label="Profile..." label_selected="Profile..." left_delta="94" | 386 | height="20" label="Profile..." label_selected="Profile..." left_delta="94" |
384 | mouse_opaque="true" name="button owner profile" scale_image="TRUE" | 387 | mouse_opaque="true" name="button owner profile" scale_image="TRUE" |
385 | width="78" /> | 388 | width="78" /> |
389 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
390 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | ||
391 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" | ||
392 | mouse_opaque="true" name="LastOwner:" v_pad="0" width="78"> | ||
393 | Last Owner: | ||
394 | </text> | ||
395 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
396 | bottom_delta="0" drop_shadow_visible="true" follows="left|top" | ||
397 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78" | ||
398 | mouse_opaque="true" name="Last Owner Name" v_pad="0" width="88"> | ||
399 | Thrax Linden | ||
400 | </text> | ||
401 | <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center" | ||
402 | height="20" label="Profile..." label_selected="Profile..." left_delta="94" | ||
403 | mouse_opaque="true" name="button last owner profile" scale_image="TRUE" | ||
404 | width="78" /> | ||
386 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 405 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
387 | bottom="-106" drop_shadow_visible="true" follows="left|top" | 406 | bottom="-126" drop_shadow_visible="true" follows="left|top" |
388 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" | 407 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" |
389 | mouse_opaque="true" name="Group:" v_pad="0" width="78"> | 408 | mouse_opaque="true" name="Group:" v_pad="0" width="78"> |
390 | Group: | 409 | Group: |
391 | </text> | 410 | </text> |
392 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 411 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
393 | bottom="-106" drop_shadow_visible="true" follows="left|top" | 412 | bottom="-126" drop_shadow_visible="true" follows="left|top" |
394 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78" | 413 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78" |
395 | mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false" | 414 | mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false" |
396 | width="88"> | 415 | width="88"> |
397 | The Lindens | 416 | The Lindens |
398 | </text> | 417 | </text> |
399 | <button bottom="-106" follows="top|right" font="SansSerifSmall" halign="center" | 418 | <button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center" |
400 | height="16" label="Set..." label_selected="Set..." left_delta="94" | 419 | height="20" label="Set..." label_selected="Set..." left_delta="94" |
401 | mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" /> | 420 | mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" /> |
402 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 421 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
403 | bottom="-126" drop_shadow_visible="true" follows="left|top" | ||
404 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" | ||
405 | mouse_opaque="true" name="prim info" v_pad="0" width="166"> | ||
406 | 1 Object, 1 Primitive | ||
407 | </text> | ||
408 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
409 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | 422 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" |
410 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" | 423 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" |
411 | mouse_opaque="true" name="Permissions:" v_pad="0" width="85"> | 424 | mouse_opaque="true" name="Permissions:" v_pad="0" width="85"> |
@@ -420,7 +433,7 @@ | |||
420 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 433 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
421 | initial_value="false" label="Share with group" left="10" | 434 | initial_value="false" label="Share with group" left="10" |
422 | mouse_opaque="true" name="checkbox share with group" | 435 | mouse_opaque="true" name="checkbox share with group" |
423 | tool_tip="Allow group members to move, modify, copy and delete." | 436 | tool_tip="Allow all members of the set group to share and use your permissions for this object. You must Deed to enable role restrictions." |
424 | width="166" /> | 437 | width="166" /> |
425 | <string name="text deed continued"> | 438 | <string name="text deed continued"> |
426 | Deed... | 439 | Deed... |
@@ -428,8 +441,8 @@ | |||
428 | <string name="text deed"> | 441 | <string name="text deed"> |
429 | Deed | 442 | Deed |
430 | </string> | 443 | </string> |
431 | <button bottom="-186" follows="top|right" font="SansSerifSmall" halign="center" | 444 | <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center" |
432 | height="16" label="Deed..." label_selected="Deed..." left_delta="172" | 445 | height="20" label="Deed..." label_selected="Deed..." left_delta="172" |
433 | mouse_opaque="true" name="button deed" scale_image="TRUE" | 446 | mouse_opaque="true" name="button deed" scale_image="TRUE" |
434 | tool_tip="Group shared objects can be deeded by a group officer." | 447 | tool_tip="Group shared objects can be deeded by a group officer." |
435 | width="78" /> | 448 | width="78" /> |
@@ -517,37 +530,37 @@ | |||
517 | </combo_item> | 530 | </combo_item> |
518 | </combo_box> | 531 | </combo_box> |
519 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 532 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
520 | bottom="-135" drop_shadow_visible="true" follows="left|top" | 533 | bottom="-115" drop_shadow_visible="true" follows="left|top" |
521 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" | 534 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" |
522 | mouse_opaque="true" name="B:" v_pad="0" width="174"> | 535 | mouse_opaque="true" name="B:" v_pad="0" width="174"> |
523 | B: | 536 | B: |
524 | </text> | 537 | </text> |
525 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 538 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
526 | bottom="-135" drop_shadow_visible="true" follows="left|top" | 539 | bottom="-115" drop_shadow_visible="true" follows="left|top" |
527 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" | 540 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" |
528 | mouse_opaque="true" name="O:" v_pad="0" width="124"> | 541 | mouse_opaque="true" name="O:" v_pad="0" width="124"> |
529 | O; | 542 | O; |
530 | </text> | 543 | </text> |
531 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 544 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
532 | bottom="-135" drop_shadow_visible="true" follows="left|top" | 545 | bottom="-115" drop_shadow_visible="true" follows="left|top" |
533 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" | 546 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" |
534 | mouse_opaque="true" name="G:" v_pad="0" width="74"> | 547 | mouse_opaque="true" name="G:" v_pad="0" width="74"> |
535 | G: | 548 | G: |
536 | </text> | 549 | </text> |
537 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 550 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
538 | bottom="-147" drop_shadow_visible="true" follows="left|top" | 551 | bottom="-127" drop_shadow_visible="true" follows="left|top" |
539 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" | 552 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" |
540 | mouse_opaque="true" name="E:" v_pad="0" width="174"> | 553 | mouse_opaque="true" name="E:" v_pad="0" width="174"> |
541 | E: | 554 | E: |
542 | </text> | 555 | </text> |
543 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 556 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
544 | bottom="-147" drop_shadow_visible="true" follows="left|top" | 557 | bottom="-127" drop_shadow_visible="true" follows="left|top" |
545 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" | 558 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" |
546 | mouse_opaque="true" name="N:" v_pad="0" width="124"> | 559 | mouse_opaque="true" name="N:" v_pad="0" width="124"> |
547 | N: | 560 | N: |
548 | </text> | 561 | </text> |
549 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 562 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
550 | bottom="-147" drop_shadow_visible="true" follows="left|top" | 563 | bottom="-127" drop_shadow_visible="true" follows="left|top" |
551 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" | 564 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" |
552 | mouse_opaque="true" name="F:" v_pad="0" width="74"> | 565 | mouse_opaque="true" name="F:" v_pad="0" width="74"> |
553 | F: | 566 | F: |
@@ -764,12 +777,12 @@ | |||
764 | Skew | 777 | Skew |
765 | </text> | 778 | </text> |
766 | <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16" | 779 | <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16" |
767 | increment="5" initial_val="0" left="121" max_val="95" min_val="0" | 780 | increment="5" initial_val="0" left="121" max_val="95" min_val="0" |
768 | mouse_opaque="true" name="Scale 1" width="68" label=" " label_width="10"/> | 781 | mouse_opaque="true" name="Scale 1" width="68" /> |
769 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" | 782 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" |
770 | increment="0.05" initial_val="0" left_delta="73" max_val="0.95" label_width="10" | 783 | increment="0.05" initial_val="0" left_delta="73" max_val="0.95" |
771 | min_val="-0.95" mouse_opaque="true" name="Skew" width="68" label=" " /> | 784 | min_val="-0.95" mouse_opaque="true" name="Skew" width="68" /> |
772 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 785 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
773 | bottom_delta="-15" drop_shadow_visible="true" follows="left|top" | 786 | bottom_delta="-15" drop_shadow_visible="true" follows="left|top" |
774 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" | 787 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" |
775 | mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> | 788 | mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> |
@@ -888,10 +901,10 @@ | |||
888 | </text> | 901 | </text> |
889 | <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" | 902 | <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" |
890 | increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1" | 903 | increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1" |
891 | mouse_opaque="true" name="Radius Offset" width="68" label=" " label_width="10" /> | 904 | mouse_opaque="true" name="Radius Offset" width="68" /> |
892 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" | 905 | <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" |
893 | increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1" | 906 | increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1" |
894 | mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" /> | 907 | mouse_opaque="true" name="Revolutions" width="68" /> |
895 | <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" | 908 | <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" |
896 | default_image_name="Default" follows="left|top" height="141" | 909 | default_image_name="Default" follows="left|top" height="141" |
897 | label="Sculpt Texture" left="121" mouse_opaque="true" | 910 | label="Sculpt Texture" left="121" mouse_opaque="true" |
@@ -1192,7 +1205,7 @@ | |||
1192 | initial_val="1" left="112" max_val="10" min_val="0.1" mouse_opaque="true" | 1205 | initial_val="1" left="112" max_val="10" min_val="0.1" mouse_opaque="true" |
1193 | name="rptctrl" width="68" /> | 1206 | name="rptctrl" width="68" /> |
1194 | <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center" | 1207 | <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center" |
1195 | height="16" label="Apply" label_selected="Apply" left_delta="78" | 1208 | height="20" label="Apply" label_selected="Apply" left_delta="78" |
1196 | mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" /> | 1209 | mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" /> |
1197 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1210 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1198 | bottom="-288" drop_shadow_visible="true" follows="left|top" | 1211 | bottom="-288" drop_shadow_visible="true" follows="left|top" |
@@ -1223,10 +1236,13 @@ | |||
1223 | </panel> | 1236 | </panel> |
1224 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" | 1237 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" |
1225 | label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> | 1238 | label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> |
1226 | <button bottom="-30" follows="left|top" font="SansSerif" halign="center" height="20" | 1239 | <button bottom="-30" follows="left|top" font="SansSerif" halign="center" height="20" |
1227 | label="New Script..." label_selected="New Script..." | 1240 | label="New Script" label_selected="New Script..." |
1228 | left="10" mouse_opaque="true" name="button new script" scale_image="TRUE" | 1241 | left="10" mouse_opaque="true" name="button new script" scale_image="TRUE" |
1229 | width="130" /> | 1242 | width="100" /> |
1243 | <!--<button bottom_delta="0" left_delta="110" width="100" height="20" follows="left|top" | ||
1244 | label="Permissions..." name="button permissions" font="SansSerif" halign="center" | ||
1245 | mouse_opaque="true" scale_image="TRUE" />--> | ||
1230 | <panel bottom_delta="-330" follows="left|top" height="325" left="10" | 1246 | <panel bottom_delta="-330" follows="left|top" height="325" left="10" |
1231 | mouse_opaque="true" name="ContentsInventory" width="252" /> | 1247 | mouse_opaque="true" name="ContentsInventory" width="252" /> |
1232 | </panel> | 1248 | </panel> |
@@ -1236,22 +1252,10 @@ | |||
1236 | 1252 | ||
1237 | <panel bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="true" | 1253 | <panel bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="true" |
1238 | name="land info panel" width="272"> | 1254 | name="land info panel" width="272"> |
1255 | <!-- Parcel Information --> | ||
1239 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1256 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1240 | bottom="-40" drop_shadow_visible="true" follows="left|top" | 1257 | bottom="-40" drop_shadow_visible="true" follows="left|top" |
1241 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" | 1258 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" |
1242 | mouse_opaque="true" name="label_parcel_modify" v_pad="0" width="150"> | ||
1243 | Modify Parcel | ||
1244 | </text> | ||
1245 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
1246 | height="20" label="Subdivide..." label_selected="Subdivide..." left="48" | ||
1247 | mouse_opaque="true" name="button subdivide land" scale_image="TRUE" | ||
1248 | width="112" /> | ||
1249 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
1250 | height="20" label="Join..." label_selected="Join..." left="48" | ||
1251 | mouse_opaque="true" name="button join land" scale_image="TRUE" width="112" /> | ||
1252 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1253 | bottom_delta="-56" drop_shadow_visible="true" follows="left|top" | ||
1254 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" | ||
1255 | mouse_opaque="true" name="label_parcel_info" v_pad="0" width="150"> | 1259 | mouse_opaque="true" name="label_parcel_info" v_pad="0" width="150"> |
1256 | Parcel Information | 1260 | Parcel Information |
1257 | </text> | 1261 | </text> |
@@ -1271,12 +1275,27 @@ | |||
1271 | height="20" label="About Land..." label_selected="About Land..." left="48" | 1275 | height="20" label="About Land..." label_selected="About Land..." left="48" |
1272 | mouse_opaque="true" name="button about land" scale_image="TRUE" width="112" /> | 1276 | mouse_opaque="true" name="button about land" scale_image="TRUE" width="112" /> |
1273 | <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top" | 1277 | <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top" |
1274 | tool_tip="Colour parcels according to their status" font="SansSerifSmall" | 1278 | tool_tip="Colour parcels according to their ownership" font="SansSerifSmall" |
1275 | height="16" initial_value="false" label="Show Status" left="48" | 1279 | height="16" initial_value="false" label="Show owners" left="48" |
1276 | mouse_opaque="true" name="checkbox show owners" width="100" /> | 1280 | mouse_opaque="true" name="checkbox show owners" width="100" /> |
1277 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" | 1281 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" |
1278 | height="18" label="?" label_selected="?" left_delta="94" | 1282 | height="18" label="?" label_selected="?" left_delta="94" |
1279 | mouse_opaque="true" name="button show owners help" width="18" /> | 1283 | mouse_opaque="true" name="button show owners help" width="18" /> |
1284 | <!-- Modify Parcel --> | ||
1285 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1286 | bottom_delta="-56" drop_shadow_visible="true" follows="left|top" | ||
1287 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" | ||
1288 | mouse_opaque="true" name="label_parcel_modify" v_pad="0" width="150"> | ||
1289 | Modify Parcel | ||
1290 | </text> | ||
1291 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
1292 | height="20" label="Subdivide..." label_selected="Subdivide..." left="48" | ||
1293 | mouse_opaque="true" name="button subdivide land" scale_image="TRUE" | ||
1294 | width="112" /> | ||
1295 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
1296 | height="20" label="Join..." label_selected="Join..." left="48" | ||
1297 | mouse_opaque="true" name="button join land" scale_image="TRUE" width="112" /> | ||
1298 | <!-- Land Transactions --> | ||
1280 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1299 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1281 | bottom_delta="-56" drop_shadow_visible="true" follows="left|top" | 1300 | bottom_delta="-56" drop_shadow_visible="true" follows="left|top" |
1282 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" | 1301 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" |
@@ -1307,10 +1326,10 @@ | |||
1307 | Click and drag to change view | 1326 | Click and drag to change view |
1308 | </string> | 1327 | </string> |
1309 | <string name="status_grab"> | 1328 | <string name="status_grab"> |
1310 | Drag to move objects, Ctrl to lift, Ctrl-Shift to spin | 1329 | Drag to move, Ctrl to lift, Ctrl-Shift to rotate |
1311 | </string> | 1330 | </string> |
1312 | <string name="status_place"> | 1331 | <string name="status_place"> |
1313 | Click in the world to create, shift-click to select | 1332 | Click inworld to build |
1314 | </string> | 1333 | </string> |
1315 | <string name="status_selectland"> | 1334 | <string name="status_selectland"> |
1316 | Click and drag to select land | 1335 | Click and drag to select land |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml index 906e7de..471b3e5 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml | |||
@@ -4,29 +4,35 @@ | |||
4 | min_width="400" mouse_opaque="true" name="WindLight floater" | 4 | min_width="400" mouse_opaque="true" name="WindLight floater" |
5 | rect_control="FloaterAdvancedSkyRect" title="Advanced Sky Editor" | 5 | rect_control="FloaterAdvancedSkyRect" title="Advanced Sky Editor" |
6 | width="700"> | 6 | width="700"> |
7 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 7 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
8 | bottom="-50" drop_shadow_visible="true" follows="left|top|right" | 8 | bottom="-50" drop_shadow_visible="true" follows="left|top|right" |
9 | font="SansSerif" h_pad="0" halign="left" height="16" | 9 | font="SansSerif" h_pad="0" halign="left" height="16" |
10 | left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0" | 10 | left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0" |
11 | width="110"> | 11 | width="110"> |
12 | Sky Presets: | 12 | Sky Presets: |
13 | </text> | 13 | </text> |
14 | <combo_box allow_text_entry="false" bottom="-50" follows="left|top" height="18" | 14 | <combo_box allow_text_entry="false" bottom="-52" follows="left|top" height="18" |
15 | left_delta="110" max_chars="20" mouse_opaque="true" name="WLPresetsCombo" | 15 | left_delta="110" max_chars="20" mouse_opaque="true" name="WLPresetsCombo" |
16 | width="150" /> | 16 | width="150" /> |
17 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | ||
18 | label="" label_selected="" left_delta="-25" image_overlay="arrow_left.tga" | ||
19 | mouse_opaque="true" name="prev" scale_image="true" width="20" /> | ||
20 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | ||
21 | label="" label_selected="" left_delta="180" image_overlay="arrow_right.tga" | ||
22 | mouse_opaque="true" name="next" scale_image="true" width="20" /> | ||
17 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | 23 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" |
18 | label="New" label_selected="New" left_delta="170" | 24 | label="New" label_selected="New" left_delta="40" |
19 | mouse_opaque="true" name="WLNewPreset" scale_image="true" width="70" /> | 25 | mouse_opaque="true" name="WLNewPreset" scale_image="true" width="70" /> |
20 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 26 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
21 | label="Save" label_selected="Save" left_delta="80" | 27 | label="Save" label_selected="Save" left_delta="70" |
22 | mouse_opaque="true" name="WLSavePreset" scale_image="true" width="70" /> | 28 | mouse_opaque="true" name="WLSavePreset" scale_image="true" width="70" /> |
23 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 29 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
24 | label="Delete" label_selected="Delete" left_delta="80" | 30 | label="Delete" label_selected="Delete" left_delta="70" |
25 | mouse_opaque="true" name="WLDeletePreset" scale_image="true" width="70" /> | 31 | mouse_opaque="true" name="WLDeletePreset" scale_image="true" width="70" /> |
26 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 32 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
27 | label="Day Cycle Editor" label_selected="Day Cycle Editor" | 33 | label="Day Cycle Editor" label_selected="Day Cycle Editor" |
28 | left_delta="120" mouse_opaque="true" name="WLDayCycleMenuButton" | 34 | left_delta="100" mouse_opaque="true" name="WLDayCycleMenuButton" |
29 | scale_image="true" width="120" /> | 35 | scale_image="true" width="125" /> |
30 | <tab_container bottom="-220" follows="left|top" height="160" left="0" | 36 | <tab_container bottom="-220" follows="left|top" height="160" left="0" |
31 | mouse_opaque="false" name="WindLight Tabs" tab_position="top" width="700"> | 37 | mouse_opaque="false" name="WindLight Tabs" tab_position="top" width="700"> |
32 | <panel border="true" bottom="-220" follows="left|top|right|bottom" height="160" | 38 | <panel border="true" bottom="-220" follows="left|top|right|bottom" height="160" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml index 8d059c1..15cdc9e 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml | |||
@@ -44,7 +44,11 @@ | |||
44 | <on_enable function="Object.EnableReturn" /> | 44 | <on_enable function="Object.EnableReturn" /> |
45 | </menu_item_call> | 45 | </menu_item_call> |
46 | <pie_menu label="More >" name="Rate Menu"> | 46 | <pie_menu label="More >" name="Rate Menu"> |
47 | <menu_item_separator /> | 47 | <menu_item_call label="Backup" enabled="false" hidden="false" |
48 | mouse_opaqu="true" name="Export"> | ||
49 | <on_click function="Object.Export" /> | ||
50 | <on_enable function="Object.EnableExport" /> | ||
51 | </menu_item_call> | ||
48 | <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute"> | 52 | <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute"> |
49 | <on_click function="Object.Mute" /> | 53 | <on_click function="Object.Mute" /> |
50 | <on_enable function="Object.EnableMute" /> | 54 | <on_enable function="Object.EnableMute" /> |
@@ -54,7 +58,9 @@ | |||
54 | <on_click function="Object.ReportAbuse" /> | 58 | <on_click function="Object.ReportAbuse" /> |
55 | <on_enable function="Object.EnableReportAbuse" /> | 59 | <on_enable function="Object.EnableReportAbuse" /> |
56 | </menu_item_call> | 60 | </menu_item_call> |
57 | <menu_item_separator /> | 61 | <menu_item_call enabled="false" label="Go Here" mouse_opaque="true" name="Go Here"> |
62 | <on_click function="GoToObject" /> | ||
63 | </menu_item_call> | ||
58 | <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> | 64 | <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> |
59 | <on_click function="Object.Inspect" /> | 65 | <on_click function="Object.Inspect" /> |
60 | <on_enable function="Object.EnableInspect" /> | 66 | <on_enable function="Object.EnableInspect" /> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index f837029..81c49e7 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | |||
@@ -8,6 +8,14 @@ | |||
8 | 8 | ||
9 | <menu name="File" create_jump_keys="true" label="File" | 9 | <menu name="File" create_jump_keys="true" label="File" |
10 | opaque="true" tear_off="true"> | 10 | opaque="true" tear_off="true"> |
11 | <menu_item_call enabled="false" hidden="false" label="Import" mouse_opaque="true" name="Import"> | ||
12 | <on_click function="Object.Import" /> | ||
13 | <on_enable function="Object.EnableImport" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call enabled="false" hidden="false" label="Upload + Import" mouse_opaque="true" name="Import"> | ||
16 | <on_click function="Object.ImportUpload" /> | ||
17 | <on_enable function="Object.EnableImport" /> | ||
18 | </menu_item_call> | ||
11 | <menu_item_call name="Upload Image" | 19 | <menu_item_call name="Upload Image" |
12 | label="Upload Image (L$[COST])..." | 20 | label="Upload Image (L$[COST])..." |
13 | shortcut="control|U"> | 21 | shortcut="control|U"> |
@@ -884,6 +892,25 @@ | |||
884 | userdata="QuietSnapshotsToDisk" /> | 892 | userdata="QuietSnapshotsToDisk" /> |
885 | <on_check control="QuietSnapshotsToDisk" /> | 893 | <on_check control="QuietSnapshotsToDisk" /> |
886 | </menu_item_check> | 894 | </menu_item_check> |
895 | <menu_item_call label="Ground Sit" name="Ground Sit" | ||
896 | shortcut="control|alt|s"> | ||
897 | <on_click function="Advanced.ToggleSit" userdata="" /> | ||
898 | <on_Check function="Advanced.CheckSit" userdata="" /> | ||
899 | </menu_item_call> | ||
900 | <menu_item_check label="Phantom Avatar" name="Phantom" | ||
901 | shortcut="control|alt|p"> | ||
902 | <on_click function="Advanced.TogglePhantom" userdata="" /> | ||
903 | <on_check function="Advanced.CheckPhantom" userdata="" /> | ||
904 | </menu_item_check> | ||
905 | <menu_item_check label="Animation List" name="Animation List"> | ||
906 | <on_click function="ShowFloater" userdata="animation list" /> | ||
907 | <on_check function="FloaterVisible" userdata="animation list" /> | ||
908 | </menu_item_check> | ||
909 | <menu_item_check label="Asset Browser" name="asset browser" | ||
910 | shortcut="alt|shift|a"> | ||
911 | <on_click function="Advanced.ToggleAssetBrowser" userdata="" /> | ||
912 | <on_check function="Advanced.CheckAssetBrowser" userdata="" /> | ||
913 | </menu_item_check> | ||
887 | <menu_item_check name="Show Mouselook Crosshairs" | 914 | <menu_item_check name="Show Mouselook Crosshairs" |
888 | label="Show Mouselook Crosshairs"> | 915 | label="Show Mouselook Crosshairs"> |
889 | <on_click function="ToggleControl" | 916 | <on_click function="ToggleControl" |
@@ -1367,6 +1394,42 @@ | |||
1367 | </menu> | 1394 | </menu> |
1368 | 1395 | ||
1369 | 1396 | ||
1397 | <!-- RLVa --> | ||
1398 | |||
1399 | <menu name="RLVa" drop_shadow="true" opaque="true" tear_off="true"> | ||
1400 | |||
1401 | <menu_item_check name="Enable Wear" label="Enable Wear"> | ||
1402 | <on_click function="ToggleControl" userdata="RLVaEnableWear" /> | ||
1403 | <on_check control="RLVaEnableWear" /> | ||
1404 | </menu_item_check> | ||
1405 | |||
1406 | <menu_item_check name="Hide locked layers" label="Hide locked layers"> | ||
1407 | <on_click function="ToggleControl" userdata="RLVaHideLockedLayers" /> | ||
1408 | <on_check control="RLVaHideLockedLayers" /> | ||
1409 | </menu_item_check> | ||
1410 | |||
1411 | <menu_item_check name="Hide locked attachments" | ||
1412 | label="Hide locked attachments"> | ||
1413 | <on_click function="ToggleControl" | ||
1414 | userdata="RLVaHideLockedAttachments" /> | ||
1415 | <on_check control="RLVaHideLockedAttachments" /> | ||
1416 | </menu_item_check> | ||
1417 | |||
1418 | <!-- | ||
1419 | <menu_item_check name="Hide locked inventory" | ||
1420 | label="Hide locked inventory"> | ||
1421 | <on_click function="ToggleControl" | ||
1422 | userdata="RLVaHideLockedInventory" /> | ||
1423 | <on_check control="RLVaHideLockedInventory" /> | ||
1424 | </menu_item_check> | ||
1425 | --> | ||
1426 | |||
1427 | <menu_item_call name="Restrictions..." label="Restrictions..."> | ||
1428 | <on_click function="RLVa.Behaviors.Show" userdata="" /> | ||
1429 | </menu_item_call> | ||
1430 | |||
1431 | </menu> | ||
1432 | |||
1370 | 1433 | ||
1371 | <!-- UI --> | 1434 | <!-- UI --> |
1372 | 1435 | ||
@@ -1886,6 +1949,13 @@ | |||
1886 | userdata="ShowConsoleWindow" /> | 1949 | userdata="ShowConsoleWindow" /> |
1887 | <on_check control="ShowConsoleWindow" /> | 1950 | <on_check control="ShowConsoleWindow" /> |
1888 | </menu_item_check> | 1951 | </menu_item_check> |
1952 | |||
1953 | <menu_item_check name="Restrained Life Active" | ||
1954 | label="Restrained Life Active"> | ||
1955 | <on_click function="RLVa.Main.Toggle" /> | ||
1956 | <on_check function="RLVa.Main.Enabled" /> | ||
1957 | </menu_item_check> | ||
1958 | |||
1889 | <menu_item_check name="Output Debug Minidump" | 1959 | <menu_item_check name="Output Debug Minidump" |
1890 | label="Output Debug Minidump"> | 1960 | label="Output Debug Minidump"> |
1891 | <on_click function="ToggleControl" | 1961 | <on_click function="ToggleControl" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml index a3a4b1a..2ea8890 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml | |||
@@ -1,430 +1,414 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <panel bottom="-550" height="486" left="350" name="Panel Avatar" width="430"> | 2 | <panel bottom="-575" height="511" left="350" name="Panel Avatar" width="430"> |
3 | <tab_container bottom="-486" height="486" left="0" mouse_opaque="false" name="tab" | 3 | <tab_container bottom="-511" height="511" left="0" mouse_opaque="false" name="tab" |
4 | tab_min_width="50" tab_position="top" width="419"> | 4 | tab_min_width="50" tab_position="top" width="419"> |
5 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | 5 | <panel border="true" bottom="-507" follows="left|top|right|bottom" height="491" |
6 | label="2nd Life" left="1" mouse_opaque="true" name="2nd Life" width="418"> | 6 | label="2nd Life" left="1" mouse_opaque="true" name="2nd Life" width="418"> |
7 | <string name="CaptionTextAcctInfo"> | 7 | <string name="CaptionTextAcctInfo"> |
8 | [ACCTTYPE] | 8 | [ACCTTYPE] |
9 | [PAYMENTINFO] | 9 | [PAYMENTINFO] |
10 | [AGEVERIFICATION] | 10 | [AGEVERIFICATION] |
11 | </string> | 11 | </string> |
12 | <string name="AcctTypeResident"> | 12 | <string name="AcctTypeResident"> |
13 | Resident | 13 | Resident |
14 | </string> | 14 | </string> |
15 | <string name="AcctTypeTrial"> | 15 | <string name="AcctTypeTrial"> |
16 | Trial | 16 | Trial |
17 | </string> | 17 | </string> |
18 | <string name="AcctTypeCharterMember"> | 18 | <string name="AcctTypeCharterMember"> |
19 | Charter Member | 19 | Charter Member |
20 | </string> | 20 | </string> |
21 | <string name="AcctTypeEmployee"> | 21 | <string name="AcctTypeEmployee"> |
22 | Linden Lab Employee | 22 | Linden Lab Employee |
23 | </string> | 23 | </string> |
24 | <string name="PaymentInfoUsed"> | 24 | <string name="PaymentInfoUsed"> |
25 | Payment Info Used | 25 | Payment Info Used |
26 | </string> | 26 | </string> |
27 | <string name="PaymentInfoOnFile"> | 27 | <string name="PaymentInfoOnFile"> |
28 | Payment Info On File | 28 | Payment Info On File |
29 | </string> | 29 | </string> |
30 | <string name="NoPaymentInfoOnFile"> | 30 | <string name="NoPaymentInfoOnFile"> |
31 | No Payment Info On File | 31 | No Payment Info On File |
32 | </string> | 32 | </string> |
33 | <string name="AgeVerified"> | 33 | <string name="AgeVerified"> |
34 | Age-verified | 34 | Age-verified |
35 | </string> | 35 | </string> |
36 | <string name="NotAgeVerified"> | 36 | <string name="NotAgeVerified"> |
37 | Not Age-verified | 37 | Not Age-verified |
38 | </string> | 38 | </string> |
39 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 39 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
40 | bottom="-24" drop_shadow_visible="true" follows="left|top" | 40 | bottom="-23" drop_shadow_visible="true" follows="left|top" |
41 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 41 | font="SansSerifsmall" h_pad="0" halign="left" height="16" right="-15" |
42 | mouse_opaque="true" name="Name:" v_pad="0" width="70"> | 42 | mouse_opaque="true" name="online_yes" v_pad="0" width="130"> |
43 | Name: | 43 | Currently: Online |
44 | </text> | 44 | </text> |
45 | <name_editor bevel_style="in" border_style="line" | 45 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
46 | border_thickness="1" bottom="-24" enabled="false" follows="left|top" | 46 | bottom_delta="0" drop_shadow_visible="true" follows="left|top" |
47 | font="SansSerifSmall" height="16" is_unicode="false" left_delta="75" | 47 | font="SansSerifsmall" h_pad="0" halign="left" height="16" left_delta="0" |
48 | max_length="254" mouse_opaque="false" name="name" | 48 | mouse_opaque="true" name="online_no" v_pad="0" width="130"> |
49 | width="180" /> | 49 | Currently: Offline |
50 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 50 | </text> |
51 | bottom="-24" drop_shadow_visible="true" follows="left|top" | 51 | <button bottom_delta="-19" font="SansSerif" halign="center" height="20" |
52 | font="SansSerifsmall" h_pad="0" halign="left" height="16" left="279" | 52 | label="Instant Message..." label_selected="Instant Message..." |
53 | mouse_opaque="true" name="online_yes" v_pad="0" width="121"> | 53 | right="-15" mouse_opaque="true" name="Instant Message..." |
54 | Currently Online | 54 | tool_tip="Instant Message (IM)" width="130" /> |
55 | </text> | 55 | <button bottom_delta="-23" font="SansSerif" halign="center" height="20" |
56 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 56 | label="Offer Teleport..." label_selected="Offer Teleport..." |
57 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | 57 | left_delta="0" mouse_opaque="true" name="Offer Teleport..." width="130" /> |
58 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | 58 | <button bottom_delta="-34" font="SansSerif" halign="center" height="20" |
59 | mouse_opaque="true" name="label" v_pad="0" width="121"> | 59 | label="Add to Friends..." label_selected="Add to Friends..." left_delta="0" |
60 | Born: | 60 | mouse_opaque="true" name="Add Friend..." width="130" /> |
61 | </text> | 61 | <button bottom_delta="-23" font="SansSerif" halign="center" height="20" |
62 | <line_editor bevel_style="in" border_style="line" | 62 | label="Invite to Group..." label_selected="Invite to Group..." left_delta="0" |
63 | mouse_opaque="true" name="Invite to Group..." width="130" /> | ||
64 | <button bottom_delta="-23" font="SansSerif" halign="center" height="20" label="Find on Map" | ||
65 | label_selected="Find on Map" left_delta="0" mouse_opaque="true" | ||
66 | name="Find on Map" width="130" /> | ||
67 | <button bottom_delta="-34" font="SansSerif" halign="center" height="20" label="Pay..." | ||
68 | label_selected="Pay..." left_delta="0" mouse_opaque="true" name="Pay..." | ||
69 | width="130" /> | ||
70 | <button bottom_delta="-23" font="SansSerif" halign="center" height="20" label="Mute" | ||
71 | label_selected="Mute" left_delta="0" mouse_opaque="true" name="Mute" | ||
72 | width="130" /> | ||
73 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
74 | bottom_delta="-29" drop_shadow_visible="true" follows="left|top" | ||
75 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-15" | ||
76 | mouse_opaque="true" name="label" v_pad="0" width="130"> | ||
77 | Born: | ||
78 | </text> | ||
79 | <line_editor bevel_style="in" border_style="line" | ||
63 | border_thickness="1" bottom_delta="-16" enabled="true" follows="left|top" | 80 | border_thickness="1" bottom_delta="-16" enabled="true" follows="left|top" |
64 | font="SansSerifSmall" height="16" is_unicode="false" left="279" | 81 | font="SansSerifSmall" height="18" is_unicode="false" right="-15" |
65 | max_length="254" mouse_opaque="false" name="born" | 82 | max_length="254" mouse_opaque="false" name="born" |
66 | width="121" /> | 83 | width="130" /> |
67 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 84 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
68 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | 85 | bottom_delta="-24" drop_shadow_visible="true" follows="left|top" |
69 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | 86 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-15" |
70 | mouse_opaque="true" name="label2" v_pad="0" width="121"> | 87 | mouse_opaque="true" name="label2" v_pad="0" width="130"> |
71 | Account: | 88 | Account: |
72 | </text> | 89 | </text> |
73 | <view_border bevel_style="in" bottom_delta="-48" follows="left|top" height="48" left="279" | 90 | <view_border bevel_style="in" bottom_delta="-48" follows="left|top" height="50" right="-15" |
74 | mouse_opaque="false" name="acct_border" width="121" /> | 91 | mouse_opaque="false" name="acct_border" width="130" /> |
75 | <text bg_visible="false" border_drop_shadow_visible="false" | 92 | <text bg_visible="false" border_drop_shadow_visible="false" |
76 | border_visible="true" bottom_delta="0" drop_shadow_visible="true" | 93 | border_visible="true" bottom_delta="0" drop_shadow_visible="true" |
77 | follows="left|top" font="SansSerifSmall" height="48" left="279" | 94 | follows="left|top" font="SansSerifSmall" height="48" left="279" |
78 | mouse_opaque="false" name="acct" width="121" /> | 95 | mouse_opaque="false" name="acct" width="121" /> |
79 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 96 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
80 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | 97 | bottom_delta="-24" drop_shadow_visible="true" follows="left|top" |
81 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | 98 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-15" |
82 | mouse_opaque="true" name="partner_label" | 99 | mouse_opaque="true" name="partner_label" |
83 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" | 100 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" |
84 | v_pad="0" width="130"> | 101 | v_pad="0" width="130"> |
85 | Partner: | 102 | Partner: |
86 | </text> | 103 | </text> |
87 | <button bottom_delta="2" follows="left|top" font="SansSerif" halign="center" | 104 | <button bottom_delta="1" follows="left|top" font="SansSerif" halign="center" |
88 | height="18" label="i" label_selected="i" left_delta="44" | 105 | height="18" label="i" label_selected="i" left_delta="44" |
89 | mouse_opaque="true" name="partner_info" | 106 | mouse_opaque="true" name="partner_info" |
90 | tool_tip="Click to open partner's profile" width="18" /> | 107 | tool_tip="Click to open partner's profile" width="20" /> |
91 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" | 108 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" |
92 | height="18" label="?" label_selected="?" left_delta="24" | 109 | height="18" label="?" label_selected="?" left_delta="24" |
93 | mouse_opaque="true" name="partner_help" width="18" /> | 110 | mouse_opaque="true" name="partner_help" width="20" /> |
94 | <line_editor bevel_style="in" border_style="line" | 111 | <line_editor bevel_style="in" border_style="line" |
95 | border_thickness="1" bottom_delta="-16" enabled="true" follows="left|top" | 112 | border_thickness="1" bottom_delta="-19" enabled="true" follows="left|top" |
96 | font="SansSerifSmall" height="16" is_unicode="false" left="279" | 113 | font="SansSerifSmall" height="18" is_unicode="false" right="-15" |
97 | max_length="254" mouse_opaque="false" name="partner_edit" | 114 | max_length="254" mouse_opaque="false" name="partner_edit" |
98 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" | 115 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" |
99 | width="121"> | 116 | width="130"> |
100 | [FIRST] [LAST] | 117 | [FIRST] [LAST] |
101 | </line_editor> | 118 | </line_editor> |
102 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 119 | <texture_picker allow_no_texture="true" bottom="289" can_apply_immediately="false" |
103 | bottom="-44" drop_shadow_visible="true" follows="left|top" | 120 | default_image_name="None" follows="left|top" height="192" label="" |
104 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 121 | left="20" mouse_opaque="true" name="img" scale_image="false" auto-resize="false" |
105 | mouse_opaque="true" name="Photo:" v_pad="0" width="70"> | 122 | tool_tip="Click to choose a picture" width="235" /> |
106 | Photo: | 123 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
107 | </text> | 124 | bottom_delta="-6" drop_shadow_visible="true" follows="left|top" |
108 | <texture_picker allow_no_texture="true" bottom="-179" can_apply_immediately="false" | 125 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0" |
109 | default_image_name="None" follows="left|top" height="151" label="" | 126 | mouse_opaque="true" name="About:" v_pad="0" width="170"> |
110 | left="79" mouse_opaque="true" name="img" | 127 | About (500 chars): |
111 | tool_tip="Click to choose a picture" width="180" /> | 128 | </text> |
112 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 129 | <text_editor bottom_delta="-155" embedded_items="false" |
113 | bottom="-183" drop_shadow_visible="true" follows="left|top" | 130 | enabled="true" follows="left|top" font="SansSerifSmall" height="155" |
114 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 131 | is_unicode="false" left_delta="0" max_length="511" mouse_opaque="true" |
115 | mouse_opaque="true" name="Groups:" v_pad="0" width="70"> | 132 | name="about" width="235" word_wrap="true" /> |
116 | Groups: | 133 | |
117 | </text> | 134 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
118 | <scroll_list background_visible="true" bottom="-258" column_padding="5" draw_border="true" | 135 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" |
119 | follows="left|top" height="90" left="79" mouse_opaque="false" | 136 | font="SansSerifSmall" halign="left" height="16" left="20" |
120 | multi_select="false" name="groups" width="321" /> | 137 | mouse_opaque="true" name="Groups:" width="70"> |
121 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 138 | Groups: |
122 | bottom="-280" drop_shadow_visible="true" follows="left|top" | 139 | </text> |
123 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 140 | <scroll_list background_visible="true" bottom_delta="-80" column_padding="5" draw_border="true" |
124 | mouse_opaque="true" name="About:" v_pad="0" width="70"> | 141 | follows="left|top" height="80" left_delta="0" mouse_opaque="false" |
125 | About: | 142 | multi_select="false" name="groups" width="235" /> |
126 | </text> | 143 | <view_border blevel_style="in" bottom_delta="0" follows="left|top" height="80" right="-15" |
127 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 144 | mouse_opaque="false" name="drop_target_rect_vis" width="130" /> |
128 | bottom_delta="-16" drop_shadow_visible="true" follows="left|top" | 145 | <view_border blevel_style="in" border_thickness="0" bottom_delta="0" follows="left|top" |
129 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | 146 | height="80" left_delta="0" mouse_opaque="false" name="drop_target_rect" |
130 | mouse_opaque="true" name="(500 chars)" v_pad="0" width="70"> | 147 | width="130" /> |
131 | (500 chars) | 148 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
132 | </text> | 149 | bottom_delta="40" drop_shadow_visible="true" follows="left|top" |
133 | <text_editor bottom="-375" embedded_items="false" | 150 | font="SansSerifSmall" h_pad="0" halign="center" height="16" right="-22" |
134 | enabled="true" follows="left|top" font="SansSerifSmall" height="110" | ||
135 | is_unicode="false" left="79" max_length="511" mouse_opaque="true" | ||
136 | name="about" width="321" word_wrap="true" /> | ||
137 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
138 | bottom="-403" drop_shadow_visible="true" follows="left|top" | ||
139 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | ||
140 | mouse_opaque="true" name="Give item:" v_pad="0" width="75"> | ||
141 | Give item: | ||
142 | </text> | ||
143 | <view_border blevel_style="in" border_thickness="0" bottom="-466" follows="left|top" | ||
144 | height="466" left_delta="4" mouse_opaque="false" name="drop_target_rect" | ||
145 | width="409" /> | ||
146 | <view_border blevel_style="in" bottom="-403" follows="left|top" height="16" left_delta="75" | ||
147 | mouse_opaque="false" name="drop_target_rect_vis" width="321" /> | ||
148 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
149 | bottom_delta="0" drop_shadow_visible="true" follows="left|top" | ||
150 | font="SansSerifSmall" h_pad="0" halign="center" height="16" left_delta="0" | ||
151 | mouse_opaque="true" name="Give inventory" | 151 | mouse_opaque="true" name="Give inventory" |
152 | tool_tip="Drop inventory items here to give them to this person." v_pad="2" | 152 | tool_tip="Drop inventory items here to give them to this resident." v_pad="2" |
153 | width="321"> | 153 | width="115"> |
154 | Drop inventory item here. | 154 | Drop inventory here |
155 | </text> | 155 | </text> |
156 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 156 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
157 | initial_value="false" label="Show in search" left="75" mouse_opaque="true" | 157 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" |
158 | font="SansSerifSmall" h_pad="0" halign="center" height="16" left_delta="0" | ||
159 | mouse_opaque="true" name="Give inventory 2" width="115" | ||
160 | tool_tip="Drop inventory items here to give them to this resident."> | ||
161 | to give to resident | ||
162 | </text> | ||
163 | <name_editor bevel_style="in" border_style="line" | ||
164 | border_thickness="0" bottom="0" enabled="false" follows="left|top" | ||
165 | font="SansSerifSmall" height="0" is_unicode="false" left="1" | ||
166 | max_length="254" mouse_opaque="false" name="name" | ||
167 | width="0" /> | ||
168 | <check_box bottom="1" follows="left|top" font="SansSerifSmall" height="16" | ||
169 | initial_value="false" label="Show profile in search" left="18" mouse_opaque="true" | ||
158 | name="allow_publish" | 170 | name="allow_publish" |
159 | tool_tip="Publish extra profile information such as description and image in Search." | 171 | tool_tip="Publish extra profile information such as description and image in Search." |
160 | width="130" /> | 172 | width="130" /> |
161 | <button bottom="-425" follows="left|top" font="SansSerif" halign="center" height="20" | 173 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" height="18" |
162 | label="?" label_selected="?" left_delta="145" mouse_opaque="true" name="?" | 174 | label="?" label_selected="?" left_delta="150" mouse_opaque="true" name="?" |
163 | width="20" /> | 175 | width="20" /> |
164 | <button bottom="-428" font="SansSerif" halign="center" height="20" label="Find on Map" | 176 | </panel> |
165 | label_selected="Find on Map" left="24" mouse_opaque="true" | 177 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
166 | name="Find on Map" width="100" /> | 178 | label="Web" left="1" mouse_opaque="true" name="WebProfile" width="418"> |
167 | <button bottom="-428" font="SansSerif" halign="center" height="20" | 179 | <line_editor bevel_style="in" border_style="line" |
168 | label="Offer Teleport..." label_selected="Offer Teleport..." | ||
169 | left_delta="102" mouse_opaque="true" name="Offer Teleport..." width="140" /> | ||
170 | <button bottom="-428" font="SansSerif" halign="center" height="20" | ||
171 | label="Add Friend..." label_selected="Add Friend..." left_delta="142" | ||
172 | mouse_opaque="true" name="Add Friend..." width="130" /> | ||
173 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="Pay..." | ||
174 | label_selected="Pay..." left="24" mouse_opaque="true" name="Pay..." | ||
175 | width="100" /> | ||
176 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" | ||
177 | label="Instant Message..." label_selected="Instant Message..." | ||
178 | left_delta="102" mouse_opaque="true" name="Instant Message..." | ||
179 | tool_tip="Instant Message (IM)" width="140" /> | ||
180 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Mute" | ||
181 | label_selected="Mute" left_delta="142" mouse_opaque="true" name="Mute" | ||
182 | width="130" /> | ||
183 | </panel> | ||
184 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
185 | label="Web" left="1" mouse_opaque="true" name="WebProfile" width="418"> | ||
186 | <line_editor bevel_style="in" border_style="line" | ||
187 | border_thickness="1" bottom_delta="-18" enabled="false" follows="left|top" | 180 | border_thickness="1" bottom_delta="-18" enabled="false" follows="left|top" |
188 | font="SansSerifSmall" height="16" is_unicode="false" left="10" | 181 | font="SansSerifSmall" height="16" is_unicode="false" left="10" |
189 | max_length="254" mouse_opaque="true" name="url_edit" | 182 | max_length="254" mouse_opaque="true" name="url_edit" |
190 | width="400" /> | 183 | width="400" /> |
191 | <flyout_button bottom_delta="-22" follows="left|top" font="SansSerifSmall" halign="center" | 184 | <flyout_button bottom_delta="-22" follows="left|top" font="SansSerifSmall" halign="center" |
192 | height="18" label="Load" label_selected="Load" left="10" | 185 | height="18" label="Load" label_selected="Load" left="10" |
193 | mouse_opaque="true" name="load" enabled="false" | 186 | mouse_opaque="true" name="load" enabled="false" |
194 | tool_tip="Load this profile page with embedded web browser." width="80" > | 187 | tool_tip="Load this profile page with embedded web browser." width="80" > |
195 | <flyout_button_item value="open" name="open_item">In external browser</flyout_button_item> | 188 | <flyout_button_item value="open" name="open_item">In external browser</flyout_button_item> |
196 | <flyout_button_item value="home" name="home_item">Home URL</flyout_button_item> | 189 | <flyout_button_item value="home" name="home_item">Home URL</flyout_button_item> |
197 | </flyout_button> | 190 | </flyout_button> |
198 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" | 191 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" |
199 | height="18" label="?" label_selected="?" left_delta="85" | 192 | height="18" label="?" label_selected="?" left_delta="85" |
200 | mouse_opaque="true" name="web_profile_help" width="18" /> | 193 | mouse_opaque="true" name="web_profile_help" width="18" /> |
201 | <check_box bottom_delta="0" follows="right|top" font="SansSerifSmall" height="16" | 194 | <check_box bottom_delta="0" follows="right|top" font="SansSerifSmall" height="16" |
202 | initial_value="false" label="Automatically load web profiles" | 195 | initial_value="false" label="Automatically load web profiles" |
203 | left_delta="30" mouse_opaque="true" name="auto_load" | 196 | left_delta="30" mouse_opaque="true" name="auto_load" |
204 | tool_tip="Automatically load ALL profile webpages without asking first." | 197 | tool_tip="Automatically load ALL profile webpages without asking first." |
205 | width="127" /> | 198 | width="127" /> |
206 | <web_browser border_visible="false" bottom="-444" follows="top|left|right" height="400" | 199 | <web_browser border_visible="false" bottom="-444" follows="top|left|right" height="400" |
207 | ignore_ui_scale="false" left="10" name="profile_html" start_url="" | 200 | ignore_ui_scale="false" left="10" name="profile_html" start_url="" |
208 | width="400" /> | 201 | width="400" /> |
209 | <text bottom="5" follows="bottom|left|right" left="15" name="status_text" right="-70" | 202 | <text bottom="5" follows="bottom|left|right" left="15" name="status_text" right="-70" |
210 | top="25" /> | 203 | top="25" /> |
211 | </panel> | 204 | </panel> |
212 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | 205 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
213 | label="Interests" left="1" mouse_opaque="true" name="Interests" width="418"> | 206 | label="Interests" left="1" mouse_opaque="true" name="Interests" width="418"> |
214 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 207 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
215 | bottom="-36" drop_shadow_visible="true" follows="left|top" | 208 | bottom="-36" drop_shadow_visible="true" follows="left|top" |
216 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 209 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" |
217 | mouse_opaque="true" name="I Want To:" v_pad="0" width="70"> | 210 | mouse_opaque="true" name="I Want To:" v_pad="0" width="70"> |
218 | I Want To: | 211 | I Want To: |
219 | </text> | 212 | </text> |
220 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 213 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
221 | initial_value="false" label="Build" left_delta="70" mouse_opaque="true" | 214 | initial_value="false" label="Build" left_delta="70" mouse_opaque="true" |
222 | name="chk0" width="90" /> | 215 | name="chk0" width="90" /> |
223 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 216 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
224 | initial_value="false" label="Explore" left_delta="170" mouse_opaque="true" | 217 | initial_value="false" label="Explore" left_delta="170" mouse_opaque="true" |
225 | name="chk1" width="90" /> | 218 | name="chk1" width="90" /> |
226 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 219 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
227 | initial_value="false" label="Meet" left_delta="-170" mouse_opaque="true" | 220 | initial_value="false" label="Meet" left_delta="-170" mouse_opaque="true" |
228 | name="chk2" width="57" /> | 221 | name="chk2" width="57" /> |
229 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 222 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
230 | initial_value="false" label="Be Hired" left_delta="170" mouse_opaque="true" | 223 | initial_value="false" label="Be Hired" left_delta="170" mouse_opaque="true" |
231 | name="chk6" width="92" /> | 224 | name="chk6" width="92" /> |
232 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 225 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
233 | initial_value="false" label="Group" left_delta="-170" mouse_opaque="true" | 226 | initial_value="false" label="Group" left_delta="-170" mouse_opaque="true" |
234 | name="chk3" width="90" /> | 227 | name="chk3" width="90" /> |
235 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 228 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
236 | initial_value="false" label="Buy" left_delta="170" mouse_opaque="true" | 229 | initial_value="false" label="Buy" left_delta="170" mouse_opaque="true" |
237 | name="chk4" width="90" /> | 230 | name="chk4" width="90" /> |
238 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 231 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
239 | initial_value="false" label="Sell" left_delta="-170" mouse_opaque="true" | 232 | initial_value="false" label="Sell" left_delta="-170" mouse_opaque="true" |
240 | name="chk5" width="50" /> | 233 | name="chk5" width="50" /> |
241 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 234 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
242 | initial_value="false" label="Hire" left_delta="170" mouse_opaque="true" | 235 | initial_value="false" label="Hire" left_delta="170" mouse_opaque="true" |
243 | name="chk7" width="92" /> | 236 | name="chk7" width="92" /> |
244 | <line_editor bevel_style="in" border_style="line" | 237 | <line_editor bevel_style="in" border_style="line" |
245 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" | 238 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" |
246 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | 239 | font="SansSerifSmall" height="16" is_unicode="false" left="74" |
247 | max_length="254" mouse_opaque="true" name="want_to_edit" | 240 | max_length="254" mouse_opaque="true" name="want_to_edit" |
248 | width="330" /> | 241 | width="330" /> |
249 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 242 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
250 | bottom_delta="-26" drop_shadow_visible="true" follows="left|top" | 243 | bottom_delta="-26" drop_shadow_visible="true" follows="left|top" |
251 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 244 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" |
252 | mouse_opaque="true" name="Skills:" v_pad="0" width="70"> | 245 | mouse_opaque="true" name="Skills:" v_pad="0" width="70"> |
253 | Skills: | 246 | Skills: |
254 | </text> | 247 | </text> |
255 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 248 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
256 | initial_value="false" label="Textures" left_delta="70" mouse_opaque="true" | 249 | initial_value="false" label="Textures" left_delta="70" mouse_opaque="true" |
257 | name="schk0" width="90" /> | 250 | name="schk0" width="90" /> |
258 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 251 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
259 | initial_value="false" label="Architecture" left_delta="170" | 252 | initial_value="false" label="Architecture" left_delta="170" |
260 | mouse_opaque="true" name="schk1" width="93" /> | 253 | mouse_opaque="true" name="schk1" width="93" /> |
261 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 254 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
262 | initial_value="false" label="Event Planning" left_delta="0" | 255 | initial_value="false" label="Event Planning" left_delta="0" |
263 | mouse_opaque="true" name="schk2" width="105" /> | 256 | mouse_opaque="true" name="schk2" width="105" /> |
264 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 257 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
265 | initial_value="false" label="Modeling" left_delta="-170" | 258 | initial_value="false" label="Modeling" left_delta="-170" |
266 | mouse_opaque="true" name="schk3" width="90" /> | 259 | mouse_opaque="true" name="schk3" width="90" /> |
267 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | 260 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" |
268 | initial_value="false" label="Scripting" left_delta="0" mouse_opaque="true" | 261 | initial_value="false" label="Scripting" left_delta="0" mouse_opaque="true" |
269 | name="schk4" width="90" /> | 262 | name="schk4" width="90" /> |
270 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | 263 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" |
271 | initial_value="false" label="Custom Characters" left_delta="170" | 264 | initial_value="false" label="Custom Characters" left_delta="170" |
272 | mouse_opaque="true" name="schk5" width="127" /> | 265 | mouse_opaque="true" name="schk5" width="127" /> |
273 | <line_editor bevel_style="in" border_style="line" | 266 | <line_editor bevel_style="in" border_style="line" |
274 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" | 267 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" |
275 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | 268 | font="SansSerifSmall" height="16" is_unicode="false" left="74" |
276 | max_length="254" mouse_opaque="true" name="skills_edit" | 269 | max_length="254" mouse_opaque="true" name="skills_edit" |
277 | width="330" /> | 270 | width="330" /> |
278 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 271 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
279 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" | 272 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" |
280 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 273 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" |
281 | mouse_opaque="true" name="Languages:" v_pad="0" width="70"> | 274 | mouse_opaque="true" name="Languages:" v_pad="0" width="70"> |
282 | Languages: | 275 | Languages: |
283 | </text> | 276 | </text> |
284 | <line_editor bevel_style="in" border_style="line" | 277 | <line_editor bevel_style="in" border_style="line" |
285 | border_thickness="1" bottom_delta="0" enabled="true" follows="left|top" | 278 | border_thickness="1" bottom_delta="0" enabled="true" follows="left|top" |
286 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | 279 | font="SansSerifSmall" height="16" is_unicode="false" left="74" |
287 | max_length="254" mouse_opaque="true" name="languages_edit" | 280 | max_length="254" mouse_opaque="true" name="languages_edit" |
288 | width="330" /> | 281 | width="330" /> |
289 | </panel> | 282 | </panel> |
290 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | 283 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
291 | label="Picks" left="1" mouse_opaque="true" name="Picks" width="418"> | 284 | label="Picks" left="1" mouse_opaque="true" name="Picks" width="418"> |
292 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 285 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
293 | bottom="-20" drop_shadow_visible="true" follows="left|top" | 286 | bottom="-20" drop_shadow_visible="true" follows="left|top" |
294 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" | 287 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" |
295 | mouse_opaque="true" | 288 | mouse_opaque="true" |
296 | name="Tell everyone about your favorite places in Second Life." v_pad="0" | 289 | name="Tell everyone about your favorite places in Second Life." v_pad="0" |
297 | width="302"> | 290 | width="302"> |
298 | Tell everyone about your favorite places in Second Life. | 291 | Tell everyone about your favorite places in Second Life. |
299 | </text> | 292 | </text> |
300 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | 293 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" |
301 | height="20" label="New..." label_selected="New..." left="114" | 294 | height="20" label="New..." label_selected="New..." left="114" |
302 | mouse_opaque="true" name="New..." width="75" /> | 295 | mouse_opaque="true" name="New..." width="75" /> |
303 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" | 296 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" |
304 | label="Delete..." label_selected="Delete..." left_delta="79" | 297 | label="Delete..." label_selected="Delete..." left_delta="79" |
305 | mouse_opaque="true" name="Delete..." width="75" /> | 298 | mouse_opaque="true" name="Delete..." width="75" /> |
306 | <tab_container bottom="-411" follows="left|top" height="363" left="4" mouse_opaque="false" | 299 | <tab_container bottom="-411" follows="left|top" height="363" left="4" mouse_opaque="false" |
307 | name="picks tab" tab_position="left" width="412" /> | 300 | name="picks tab" tab_position="left" width="412" /> |
308 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 301 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
309 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" | 302 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" |
310 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" | 303 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" |
311 | name="loading_text" v_pad="0" width="302"> | 304 | name="loading_text" v_pad="0" width="302"> |
312 | Loading... | 305 | Loading... |
313 | </text> | 306 | </text> |
314 | </panel> | 307 | </panel> |
315 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | 308 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
316 | label="Classified" left="1" mouse_opaque="true" name="Classified" | 309 | label="Classified" left="1" mouse_opaque="true" name="Classified" |
317 | width="418"> | 310 | width="418"> |
318 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 311 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
319 | bottom="-20" drop_shadow_visible="true" follows="left|top" | 312 | bottom="-20" drop_shadow_visible="true" follows="left|top" |
320 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" | 313 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" |
321 | mouse_opaque="true" | 314 | mouse_opaque="true" |
322 | name="Place an ad in Second Life's classified listings." v_pad="0" | 315 | name="Place an ad in Second Life's classified listings." v_pad="0" |
323 | width="302"> | 316 | width="302"> |
324 | Place an ad in Second Life's classified listings. | 317 | Place an ad in Second Life's classified listings. |
325 | </text> | 318 | </text> |
326 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | 319 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" |
327 | height="20" label="New..." label_selected="New..." left="114" | 320 | height="20" label="New..." label_selected="New..." left="114" |
328 | mouse_opaque="true" name="New..." width="75" /> | 321 | mouse_opaque="true" name="New..." width="75" /> |
329 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" | 322 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" |
330 | label="Delete..." label_selected="Delete..." left_delta="79" | 323 | label="Delete..." label_selected="Delete..." left_delta="79" |
331 | mouse_opaque="true" name="Delete..." width="75" /> | 324 | mouse_opaque="true" name="Delete..." width="75" /> |
332 | <tab_container bottom="-443" follows="left|top" height="395" left="4" mouse_opaque="false" | 325 | <tab_container bottom="-443" follows="left|top" height="395" left="4" mouse_opaque="false" |
333 | name="classified tab" tab_position="left" width="412" /> | 326 | name="classified tab" tab_position="left" width="412" /> |
334 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 327 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
335 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" | 328 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" |
336 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" | 329 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" |
337 | name="loading_text" v_pad="0" width="302"> | 330 | name="loading_text" v_pad="0" width="302"> |
338 | Loading... | 331 | Loading... |
339 | </text> | 332 | </text> |
340 | </panel> | 333 | </panel> |
341 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | 334 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
342 | label="1st Life" left="1" mouse_opaque="true" name="1st Life" width="418"> | 335 | label="1st Life" left="1" mouse_opaque="true" name="1st Life" width="418"> |
343 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 336 | <texture_picker allow_no_texture="true" bottom="220" can_apply_immediately="false" |
344 | bottom="-36" drop_shadow_visible="true" follows="left|top" | 337 | default_image_name="None" follows="left|top" height="235" label="" |
345 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 338 | left="20" mouse_opaque="true" name="img" |
346 | mouse_opaque="true" name="Photo:" v_pad="0" width="61"> | 339 | tool_tip="Click to choose a picture" width="235" /> |
347 | Photo: | 340 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
348 | </text> | 341 | bottom_delta="-8" drop_shadow_visible="true" follows="left|top" |
349 | <texture_picker allow_no_texture="true" bottom="-171" can_apply_immediately="false" | 342 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="20" |
350 | default_image_name="None" follows="left|top" height="151" label="" | 343 | mouse_opaque="true" name="Info:" v_pad="0" width="161"> |
351 | left="70" mouse_opaque="true" name="img" | 344 | Info (250 chars): |
352 | tool_tip="Click to choose a picture" width="135" /> | 345 | </text> |
353 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 346 | <text_editor bottom_delta="-179" embedded_items="false" |
354 | bottom="-203" drop_shadow_visible="true" follows="left|top" | 347 | enabled="true" follows="left|top" font="SansSerifSmall" height="178" |
355 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | 348 | is_unicode="false" left="20" max_length="254" mouse_opaque="false" |
356 | mouse_opaque="true" name="Info:" v_pad="0" width="61"> | 349 | name="about" width="378" word_wrap="true" /> |
357 | Info: | 350 | </panel> |
358 | </text> | 351 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" |
359 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
360 | bottom_delta="-16" drop_shadow_visible="true" follows="left|top" | ||
361 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | ||
362 | mouse_opaque="true" name="(250 chars)" v_pad="0" width="65"> | ||
363 | (250 chars) | ||
364 | </text> | ||
365 | <text_editor bottom="-347" embedded_items="false" | ||
366 | enabled="true" follows="left|top" font="SansSerifSmall" height="160" | ||
367 | is_unicode="false" left="70" max_length="254" mouse_opaque="false" | ||
368 | name="about" width="330" word_wrap="true" /> | ||
369 | </panel> | ||
370 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
371 | label="My Notes" left="1" mouse_opaque="true" name="My Notes" width="418"> | 352 | label="My Notes" left="1" mouse_opaque="true" name="My Notes" width="418"> |
372 | <string name="Loading"> | 353 | <string name="Loading"> |
373 | Loading... | 354 | Loading... |
374 | </string> | 355 | </string> |
375 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 356 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
376 | bottom="-52" drop_shadow_visible="true" follows="left|top" | 357 | bottom="-52" drop_shadow_visible="true" follows="left|top" |
377 | font="SansSerifSmall" h_pad="0" halign="left" height="48" left="10" | 358 | font="SansSerifSmall" h_pad="0" halign="left" height="48" left="10" |
378 | mouse_opaque="true" name="label" v_pad="0" width="412"> | 359 | mouse_opaque="true" name="label" v_pad="0" width="412"> |
379 | Use this space to record your notes about this person. Keep track | 360 | Use this space to record your notes about this person. Keep track |
380 | of trades in progress, joint projects, etc. Only you can see these | 361 | of trades in progress, joint projects, etc. Only you can see these |
381 | notes. This person cannot see them, nor can other people. | 362 | notes. This person cannot see them, nor can other people. |
382 | </text> | 363 | </text> |
383 | <text_editor bottom_delta="-260" embedded_items="false" enabled="true" follows="left|top" | 364 | <text_editor bottom_delta="-260" embedded_items="false" enabled="true" follows="left|top" |
384 | font="SansSerif" height="256" is_unicode="false" left="10" | 365 | font="SansSerif" height="256" is_unicode="false" left="10" |
385 | max_length="1023" mouse_opaque="true" name="notes edit" width="400" | 366 | max_length="1023" mouse_opaque="true" name="notes edit" width="400" |
386 | word_wrap="false" /> | 367 | word_wrap="false" /> |
387 | </panel> | 368 | </panel> |
388 | </tab_container> | 369 | </tab_container> |
389 | <button bottom="-483" font="SansSerif" halign="center" height="20" label="OK" | 370 | <button bottom="-508" font="SansSerif" halign="center" height="20" label="OK" |
390 | label_selected="OK" left="208" mouse_opaque="true" name="OK" width="100" /> | 371 | label_selected="OK" left="208" mouse_opaque="true" name="OK" width="100" /> |
391 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Cancel" | 372 | <button bottom="-508" font="SansSerif" halign="center" height="20" label="Cancel" |
392 | label_selected="Cancel" left_delta="105" mouse_opaque="true" name="Cancel" | 373 | label_selected="Cancel" left_delta="105" mouse_opaque="true" name="Cancel" |
393 | width="100" /> | 374 | width="100" /> |
394 | <button bottom_delta="132" font="SansSerif" halign="center" height="20" label="Kick" | 375 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Kick" |
395 | label_selected="Kick" left="4" mouse_opaque="true" name="Kick" width="72" /> | 376 | label_selected="Kick" left="4" mouse_opaque="true" name="Kick" width="72" /> |
396 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="Freeze" | 377 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Freeze" |
397 | label_selected="Freeze" left="4" mouse_opaque="true" name="Freeze" | 378 | label_selected="Freeze" left_delta="76" mouse_opaque="true" name="Freeze" |
398 | tool_tip="Stop this resident's movement and chat." width="72" /> | 379 | tool_tip="Stop this resident's movement and chat." width="72" /> |
399 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" | 380 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" |
400 | label="Unfreeze" label_selected="Unfreeze" left="4" mouse_opaque="true" | 381 | label="Unfreeze" label_selected="Unfreeze" left_delta="76" mouse_opaque="true" |
401 | name="Unfreeze" tool_tip="Thaw resident" width="72" /> | 382 | name="Unfreeze" tool_tip="Thaw resident" width="72" /> |
402 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="CSR" | 383 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="CSR" |
403 | label_selected="CSR" left="4" mouse_opaque="true" name="csr_btn" | 384 | label_selected="CSR" left_delta="76" mouse_opaque="true" name="csr_btn" |
404 | tool_tip="Open customer service tool for this resident" width="72" /> | 385 | tool_tip="Open customer service tool for this resident" width="72" /> |
405 | <string name="ShowOnMapNonFriend"> | 386 | <string name="ShowOnMapNonFriend"> |
406 | Show location on the map. | 387 | Show location on the map. |
407 | Disabled because you have not | 388 | Disabled because you have not |
408 | formed a friendship with them. | 389 | formed a friendship with them. |
409 | </string> | 390 | </string> |
410 | <string name="ShowOnMapFriendOffline"> | 391 | <string name="ShowOnMapFriendOffline"> |
411 | Show location on the map. | 392 | Show location on the map. |
412 | Disabled because they are not online. | 393 | Disabled because they are not online. |
413 | </string> | 394 | </string> |
414 | <string name="ShowOnMapFriendOnline"> | 395 | <string name="ShowOnMapFriendOnline"> |
415 | Show location on the map. | 396 | Show location on the map. |
416 | </string> | 397 | </string> |
417 | <string name="TeleportGod"> | 398 | <string name="TeleportGod"> |
418 | Force a teleport to your location. | 399 | Force a teleport to your location. |
419 | </string> | 400 | </string> |
420 | <string name="TeleportPrelude"> | 401 | <string name="TeleportPrelude"> |
421 | Offer a teleport to your location. | 402 | Offer a teleport to your location. |
422 | Disabled until you leave Orientation Island. | 403 | Disabled until you leave Orientation Island. |
423 | </string> | 404 | </string> |
424 | <string name="TeleportNormal"> | 405 | <string name="TeleportNormal"> |
425 | Offer a teleport to your location. | 406 | Offer a teleport to your location. |
426 | </string> | 407 | </string> |
427 | <string name="Loading"> | 408 | <string name="Loading"> |
428 | Loading... | 409 | Loading... |
429 | </string> | 410 | </string> |
411 | <string name="HiddenLabel"> | ||
412 | (hidden) | ||
413 | </string> | ||
430 | </panel> | 414 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml index 464ecac..ac3a74a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml | |||
@@ -8,13 +8,17 @@ | |||
8 | <button bottom="-23" follows="left|bottom" font="SansSerif" halign="center" height="20" | 8 | <button bottom="-23" follows="left|bottom" font="SansSerif" halign="center" height="20" |
9 | label="Local Chat" left="7" name="History" | 9 | label="Local Chat" left="7" name="History" |
10 | tool_tip="Click here to see what has been said" width="93" /> | 10 | tool_tip="Click here to see what has been said" width="93" /> |
11 | <spinner bottom="-24" decimal_digits="0" follows="left|bottom" height="20" | ||
12 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="107" | ||
13 | max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control" | ||
14 | width="100" tool_tip="Set the default channel for inworld chat"/> | ||
11 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23" | 15 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23" |
12 | follows="left|right|bottom" font="SansSerif" | 16 | follows="left|right|bottom" font="SansSerif" |
13 | handle_edit_keys_directly="false" height="20" label="Click here to chat." | 17 | handle_edit_keys_directly="false" height="20" label="Click here to chat." |
14 | left="107" max_length="254" name="Chat Editor" | 18 | left="212" max_length="254" name="Chat Editor" |
15 | select_all_on_focus_received="false" select_on_focus="false" tab_group="1" | 19 | select_all_on_focus_received="false" select_on_focus="false" tab_group="1" |
16 | tool_tip="Press Enter to say, Ctrl-Enter to shout." width="105" /> | 20 | tool_tip="Press Enter to say, Ctrl-Enter to shout." width="5" /> |
17 | <flyout_button bottom="-23" follows="right|bottom" height="20" label="Say" left_delta="109" | 21 | <flyout_button bottom="-23" follows="right|bottom" height="20" label="Say" left_delta="4" |
18 | list_position="above" mouse_opaque="true" name="Say" tool_tip="(Enter)" | 22 | list_position="above" mouse_opaque="true" name="Say" tool_tip="(Enter)" |
19 | width="80"> | 23 | width="80"> |
20 | <flyout_button_item value="shout" name="shout_item"> | 24 | <flyout_button_item value="shout" name="shout_item"> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml index e785909..21a7664 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml | |||
@@ -45,16 +45,21 @@ | |||
45 | use_bounding_rect="true" width="395" /> | 45 | use_bounding_rect="true" width="395" /> |
46 | </layout_stack> | 46 | </layout_stack> |
47 | </layout_panel> | 47 | </layout_panel> |
48 | <layout_panel auto_resize="false" bottom="0" left="0" min_width="220" mouse_opaque="false" | 48 | <layout_panel auto_resize="false" bottom="0" left="0" min_width="202" mouse_opaque="false" |
49 | name="windlight_remote_container" use_bounding_rect="true" user_resize="false" | ||
50 | width="200"> | ||
51 | <panel background_visible="false" border="false" bottom="0" name="windlight_remote" /> | ||
52 | </layout_panel> | ||
53 | <layout_panel auto_resize="false" bottom="0" left="0" min_width="220" mouse_opaque="false" | ||
49 | name="media_remote_container" use_bounding_rect="true" user_resize="false" | 54 | name="media_remote_container" use_bounding_rect="true" user_resize="false" |
50 | width="220"> | 55 | width="220"> |
51 | <panel background_visible="false" border="false" bottom="0" name="media_remote" /> | 56 | <panel background_visible="false" border="false" bottom="0" name="media_remote" /> |
52 | </layout_panel> | 57 | </layout_panel> |
53 | <layout_panel auto_resize="false" bottom="0" left="0" min_width="130" mouse_opaque="false" | 58 | <layout_panel auto_resize="false" bottom="0" left="0" min_width="130" mouse_opaque="false" |
54 | name="voice_remote_container" use_bounding_rect="true" user_resize="false" | 59 | name="voice_remote_container" use_bounding_rect="true" user_resize="false" |
55 | width="128"> | 60 | width="128"> |
56 | <panel background_visible="false" border="false" bottom="0" name="voice_remote" /> | 61 | <panel background_visible="false" border="false" bottom="0" name="voice_remote" /> |
57 | </layout_panel> | 62 | </layout_panel> |
58 | </layout_stack> | 63 | </layout_stack> |
59 | <string name="unread_count_string_plural"> | 64 | <string name="unread_count_string_plural"> |
60 | New IMs | 65 | New IMs |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index 24753d1..b0384cf 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml | |||
@@ -131,30 +131,34 @@ | |||
131 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 131 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
132 | label="Close chat bar after hitting return" left="148" mouse_opaque="true" | 132 | label="Close chat bar after hitting return" left="148" mouse_opaque="true" |
133 | name="close_chat_on_return_check" radio_style="false" width="237" /> | 133 | name="close_chat_on_return_check" radio_style="false" width="237" /> |
134 | <check_box bottom_delta="-20" enabled="true" | 134 | <check_box bottom_delta="-18" enabled="true" |
135 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 135 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
136 | label="Arrow keys always move avatar when chatting" left="148" | 136 | label="Arrow keys always move avatar when chatting" left="148" |
137 | mouse_opaque="true" name="arrow_keys_move_avatar_check" radio_style="false" | 137 | mouse_opaque="true" name="arrow_keys_move_avatar_check" radio_style="false" |
138 | width="237" /> | 138 | width="237" /> |
139 | <check_box bottom_delta="-20" enabled="true" | 139 | <check_box bottom_delta="-18" enabled="true" |
140 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 140 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
141 | label="Show timestamps in Local Chat" left="148" mouse_opaque="true" | 141 | label="Show timestamps in Local Chat" left="148" mouse_opaque="true" |
142 | name="show_timestamps_check" radio_style="false" width="237" /> | 142 | name="show_timestamps_check" radio_style="false" width="237" /> |
143 | <check_box bottom_delta="-20" enabled="true" | 143 | <check_box bottom_delta="-18" enabled="true" |
144 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" | 144 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" |
145 | label="Play typing animation when chatting" left="148" mouse_opaque="true" | 145 | label="Play typing animation when chatting" left="148" mouse_opaque="true" |
146 | name="play_typing_animation" radio_style="false" width="237" /> | 146 | name="play_typing_animation" radio_style="false" width="237" /> |
147 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | ||
148 | font="SansSerifSmall" height="16" initial_value="false" | ||
149 | label="Show custom chat channel" left="148" mouse_opaque="true" | ||
150 | name="toggle_channel_control" radio_style="false" width="237" /> | ||
147 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 151 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
148 | bottom="-369" drop_shadow_visible="true" enabled="true" follows="left|top" | 152 | bottom="-379" drop_shadow_visible="true" enabled="true" follows="left|top" |
149 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" | 153 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" |
150 | mouse_opaque="false" name="text_box7" v_pad="0" width="128"> | 154 | mouse_opaque="false" name="text_box7" v_pad="0" width="128"> |
151 | Bubble Chat: | 155 | Bubble Chat: |
152 | </text> | 156 | </text> |
153 | <check_box bottom="-376" control_name="UseChatBubbles" enabled="true" follows="left|top" | 157 | <check_box bottom="-386" control_name="UseChatBubbles" enabled="true" follows="left|top" |
154 | font="SansSerifSmall" height="16" initial_value="false" | 158 | font="SansSerifSmall" height="16" initial_value="false" |
155 | label="Show chat bubbles" left="148" mouse_opaque="true" | 159 | label="Show chat bubbles" left="148" mouse_opaque="true" |
156 | name="bubble_text_chat" radio_style="false" width="237" /> | 160 | name="bubble_text_chat" radio_style="false" width="237" /> |
157 | <slider bottom="-392" can_edit_text="false" control_name="ChatBubbleOpacity" | 161 | <slider bottom="-402" can_edit_text="false" control_name="ChatBubbleOpacity" |
158 | decimal_digits="3" enabled="true" follows="left|top" height="12" | 162 | decimal_digits="3" enabled="true" follows="left|top" height="12" |
159 | increment="0.05" initial_val="1" label="Opacity" left="148" max_val="1" | 163 | increment="0.05" initial_val="1" label="Opacity" left="148" max_val="1" |
160 | min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true" | 164 | min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 527309e..d5d43b1 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml | |||
@@ -8,6 +8,10 @@ | |||
8 | height="16" initial_value="false" | 8 | height="16" initial_value="false" |
9 | label="Run Second Life in a window" left="10" mouse_opaque="true" | 9 | label="Run Second Life in a window" left="10" mouse_opaque="true" |
10 | name="windowed mode" radio_style="false" width="100" /> | 10 | name="windowed mode" radio_style="false" width="100" /> |
11 | <check_box bottom_delta="0" enabled="true" follows="left|top" | ||
12 | font="SansSerifSmall" height="16" initial_value="false" | ||
13 | label="Show environment control in toolbar" left="248" mouse_opaque="true" | ||
14 | name="toggle_windlight_control" radio_style="false" width="237" /> | ||
11 | <text_editor type="string" length="1" allow_html="false" bg_readonly_color="0 0 0 0" bottom="-43" | 15 | <text_editor type="string" length="1" allow_html="false" bg_readonly_color="0 0 0 0" bottom="-43" |
12 | embedded_items="false" enabled="false" follows="left|top" | 16 | embedded_items="false" enabled="false" follows="left|top" |
13 | font="SansSerifSmall" height="20" hide_border="true" | 17 | font="SansSerifSmall" height="20" hide_border="true" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml index 48da432..d4ec307 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | |||
@@ -10,8 +10,8 @@ | |||
10 | </text> | 10 | </text> |
11 | <slider bottom_delta="-25" can_edit_text="true" | 11 | <slider bottom_delta="-25" can_edit_text="true" |
12 | decimal_digits="0" enabled="true" follows="left|top" height="15" | 12 | decimal_digits="0" enabled="true" follows="left|top" height="15" |
13 | increment="10" initial_val="50" left_delta="0" max_val="1500" min_val="50" | 13 | increment="10" initial_val="1000" left_delta="0" max_val="5000" min_val="50" |
14 | mouse_opaque="true" name="max_bandwidth" show_text="true" value="500" | 14 | mouse_opaque="true" name="max_bandwidth" show_text="true" value="1000" |
15 | width="180" /> | 15 | width="180" /> |
16 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 16 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
17 | bottom_delta="4" drop_shadow_visible="true" enabled="true" | 17 | bottom_delta="4" drop_shadow_visible="true" enabled="true" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_controls.xml b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_controls.xml new file mode 100644 index 0000000..e282c3c --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_controls.xml | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <panel bg_visible="false" border="false" border_visible="false" bottom="1" | ||
3 | enabled="true" follows="right|bottom" height="20" left="0" | ||
4 | name="windlight_controls" width="200"> | ||
5 | <button bottom="-21" follows="left|bottom" font="SansSerif" halign="center" height="20" | ||
6 | label="Editor" left="4" name="Environment" | ||
7 | tool_tip="Click here to adjust world environment" width="80" /> | ||
8 | <flyout_button bottom="-21" follows="left|bottom" height="20" label="Presets" left_delta="82" width="86" | ||
9 | list_position="above" mouse_opaque="true" name="Presets" tool_tip="Windlight presets"> | ||
10 | </flyout_button> | ||
11 | <button bottom="-22" follows="left|bottom" font="SansSerif" halign="center" height="22" toggle="true" | ||
12 | label="" left_delta="88" name="Popup" scale_image="true" control_name="ShowWindlightSettingsPopup" | ||
13 | tool_tip="Click here to adjust world environment" width="22" /> | ||
14 | </panel> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml new file mode 100644 index 0000000..89ae7ce --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml | |||
@@ -0,0 +1,22 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <panel bg_visible="false" border="false" border_visible="false" bottom="0" | ||
3 | enabled="true" follows="right|bottom" height="20" left="0" mouse_opaque="true" | ||
4 | name="windlight_remote" use_bounding_rect="true" width="200"> | ||
5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="22" left="0" width="200" /> | ||
6 | <panel bottom="3" filename="panel_windlight_controls.xml" name="panel_windlight_controls" height="20" left="0" width="200" /> | ||
7 | <string name="sunrise"> | ||
8 | Sunrise | ||
9 | </string> | ||
10 | <string name="sunset"> | ||
11 | Midday | ||
12 | </string> | ||
13 | <string name="noon"> | ||
14 | Noon | ||
15 | </string> | ||
16 | <string name="midnight"> | ||
17 | Midnight | ||
18 | </string> | ||
19 | <string name="revert_region"> | ||
20 | Revert to Region Default | ||
21 | </string> | ||
22 | </panel> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml new file mode 100644 index 0000000..dd4fbe8 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <panel bg_visible="false" border="false" border_visible="false" bottom="0" | ||
3 | follows="right|bottom" height="47" left="0" mouse_opaque="true" | ||
4 | name="windlight_remote" use_bounding_rect="true" width="200"> | ||
5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="47" left="0" width="200" /> | ||
6 | <slider bottom="-20" can_edit_text="false" control_name="RenderFarClip" | ||
7 | decimal_digits="0" enabled="true" height="18" | ||
8 | increment="8" initial_val="160" label="Draw Distance:" | ||
9 | label_width="80" left="6" max_val="512" min_val="64" mouse_opaque="true" | ||
10 | name="DrawDistance" show_text="true" width="188" /> | ||
11 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
12 | bottom="-14" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
13 | font="SansSerifSmall" h_pad="0" halign="left" height="12" | ||
14 | left="188" mouse_opaque="true" name="DrawDistanceMeterText2" v_pad="0" | ||
15 | width="8"> | ||
16 | m | ||
17 | </text> | ||
18 | <panel bottom="13" filename="panel_windlight_controls.xml" left="0" width="200" /> | ||
19 | <string name="sunrise"> | ||
20 | Sunrise | ||
21 | </string> | ||
22 | <string name="sunset"> | ||
23 | Midday | ||
24 | </string> | ||
25 | <string name="noon"> | ||
26 | Noon | ||
27 | </string> | ||
28 | <string name="midnight"> | ||
29 | Midnight | ||
30 | </string> | ||
31 | <string name="revert_region"> | ||
32 | Revert to Region Default | ||
33 | </string> | ||
34 | </panel> | ||
diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index a69f43f..abe61bf 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml | |||
@@ -69,6 +69,8 @@ | |||
69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> | 69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> |
70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> | 70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> |
71 | <ScriptBgReadOnlyColor value="180, 180, 180, 255" /> <!-- Not used --> | 71 | <ScriptBgReadOnlyColor value="180, 180, 180, 255" /> <!-- Not used --> |
72 | <TextLinkColor value="0, 20, 255, 255"/> | ||
73 | <TextLinkHoverColor value="0, 50, 255, 255"/> | ||
72 | 74 | ||
73 | <!-- LISTBOXES --> | 75 | <!-- LISTBOXES --> |
74 | <ScrollBgReadOnlyColor value="255, 255, 255, 140" /> <!-- Background of read only lists --> | 76 | <ScrollBgReadOnlyColor value="255, 255, 255, 140" /> <!-- Background of read only lists --> |
diff --git a/linden/indra/newview/skins/silver/textures/arrow_left.tga b/linden/indra/newview/skins/silver/textures/arrow_left.tga new file mode 100644 index 0000000..43fbf12 --- /dev/null +++ b/linden/indra/newview/skins/silver/textures/arrow_left.tga | |||
Binary files differ | |||
diff --git a/linden/indra/newview/skins/silver/textures/arrow_right.tga b/linden/indra/newview/skins/silver/textures/arrow_right.tga new file mode 100644 index 0000000..a92ac9c --- /dev/null +++ b/linden/indra/newview/skins/silver/textures/arrow_right.tga | |||
Binary files differ | |||
diff --git a/linden/indra/newview/skins/silver/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/silver/xui/en-us/panel_avatar.xml deleted file mode 100644 index 62738dc..0000000 --- a/linden/indra/newview/skins/silver/xui/en-us/panel_avatar.xml +++ /dev/null | |||
@@ -1,430 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <panel bottom="-550" height="486" left="350" name="Panel Avatar" width="430"> | ||
3 | <tab_container bottom="-486" height="486" left="0" mouse_opaque="false" name="tab" | ||
4 | tab_min_width="50" tab_position="top" width="419"> | ||
5 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
6 | label="2nd Life" left="1" mouse_opaque="true" name="2nd Life" width="418"> | ||
7 | <string name="CaptionTextAcctInfo"> | ||
8 | [ACCTTYPE] | ||
9 | [PAYMENTINFO] | ||
10 | [AGEVERIFICATION] | ||
11 | </string> | ||
12 | <string name="AcctTypeResident"> | ||
13 | Resident | ||
14 | </string> | ||
15 | <string name="AcctTypeTrial"> | ||
16 | Trial | ||
17 | </string> | ||
18 | <string name="AcctTypeCharterMember"> | ||
19 | Charter Member | ||
20 | </string> | ||
21 | <string name="AcctTypeEmployee"> | ||
22 | Linden Lab Employee | ||
23 | </string> | ||
24 | <string name="PaymentInfoUsed"> | ||
25 | Payment Info Used | ||
26 | </string> | ||
27 | <string name="PaymentInfoOnFile"> | ||
28 | Payment Info On File | ||
29 | </string> | ||
30 | <string name="NoPaymentInfoOnFile"> | ||
31 | No Payment Info On File | ||
32 | </string> | ||
33 | <string name="AgeVerified"> | ||
34 | Age-verified | ||
35 | </string> | ||
36 | <string name="NotAgeVerified"> | ||
37 | Not Age-verified | ||
38 | </string> | ||
39 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
40 | bottom="-24" drop_shadow_visible="true" follows="left|top" | ||
41 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
42 | mouse_opaque="true" name="Name:" v_pad="0" width="70"> | ||
43 | Name: | ||
44 | </text> | ||
45 | <name_editor bevel_style="in" border_style="line" | ||
46 | border_thickness="1" bottom="-24" enabled="false" follows="left|top" | ||
47 | font="SansSerifSmall" height="16" is_unicode="false" left_delta="75" | ||
48 | max_length="254" mouse_opaque="false" name="name" | ||
49 | width="180" /> | ||
50 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
51 | bottom="-24" drop_shadow_visible="true" follows="left|top" | ||
52 | font="SansSerifsmall" h_pad="0" halign="left" height="16" left="279" | ||
53 | mouse_opaque="true" name="online_yes" v_pad="0" width="121"> | ||
54 | Currently Online | ||
55 | </text> | ||
56 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
57 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | ||
58 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | ||
59 | mouse_opaque="true" name="label" v_pad="0" width="121"> | ||
60 | Born: | ||
61 | </text> | ||
62 | <line_editor bevel_style="in" border_style="line" | ||
63 | border_thickness="1" bottom_delta="-16" enabled="true" follows="left|top" | ||
64 | font="SansSerifSmall" height="16" is_unicode="false" left="279" | ||
65 | max_length="254" mouse_opaque="false" name="born" | ||
66 | width="121" /> | ||
67 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
68 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | ||
69 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | ||
70 | mouse_opaque="true" name="label2" v_pad="0" width="121"> | ||
71 | Account: | ||
72 | </text> | ||
73 | <view_border bevel_style="in" bottom_delta="-48" follows="left|top" height="48" left="279" | ||
74 | mouse_opaque="false" name="acct_border" width="121" /> | ||
75 | <text bg_visible="false" border_drop_shadow_visible="false" | ||
76 | border_visible="true" bottom_delta="0" drop_shadow_visible="true" | ||
77 | follows="left|top" font="SansSerifSmall" height="48" left="279" | ||
78 | mouse_opaque="false" name="acct" width="121" /> | ||
79 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
80 | bottom_delta="-20" drop_shadow_visible="true" follows="left|top" | ||
81 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="279" | ||
82 | mouse_opaque="true" name="partner_label" | ||
83 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" | ||
84 | v_pad="0" width="130"> | ||
85 | Partner: | ||
86 | </text> | ||
87 | <button bottom_delta="2" follows="left|top" font="SansSerif" halign="center" | ||
88 | height="16" label="i" label_selected="i" left_delta="44" | ||
89 | mouse_opaque="true" name="partner_info" | ||
90 | tool_tip="Click to open partner's profile" width="18" /> | ||
91 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" | ||
92 | height="16" label="?" label_selected="?" left_delta="24" | ||
93 | mouse_opaque="true" name="partner_help" width="18" /> | ||
94 | <line_editor bevel_style="in" border_style="line" | ||
95 | border_thickness="1" bottom_delta="-16" enabled="true" follows="left|top" | ||
96 | font="SansSerifSmall" height="16" is_unicode="false" left="279" | ||
97 | max_length="254" mouse_opaque="false" name="partner_edit" | ||
98 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" | ||
99 | width="121"> | ||
100 | [FIRST] [LAST] | ||
101 | </line_editor> | ||
102 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
103 | bottom="-44" drop_shadow_visible="true" follows="left|top" | ||
104 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
105 | mouse_opaque="true" name="Photo:" v_pad="0" width="70"> | ||
106 | Photo: | ||
107 | </text> | ||
108 | <texture_picker allow_no_texture="true" bottom="-179" can_apply_immediately="false" | ||
109 | default_image_name="None" follows="left|top" height="151" label="" | ||
110 | left="79" mouse_opaque="true" name="img" | ||
111 | tool_tip="Click to choose a picture" width="180" /> | ||
112 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
113 | bottom="-183" drop_shadow_visible="true" follows="left|top" | ||
114 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
115 | mouse_opaque="true" name="Groups:" v_pad="0" width="70"> | ||
116 | Groups: | ||
117 | </text> | ||
118 | <scroll_list background_visible="true" bottom="-258" column_padding="5" draw_border="true" | ||
119 | follows="left|top" height="90" left="79" mouse_opaque="false" | ||
120 | multi_select="false" name="groups" width="321" /> | ||
121 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
122 | bottom="-280" drop_shadow_visible="true" follows="left|top" | ||
123 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
124 | mouse_opaque="true" name="About:" v_pad="0" width="70"> | ||
125 | About: | ||
126 | </text> | ||
127 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
128 | bottom_delta="-16" drop_shadow_visible="true" follows="left|top" | ||
129 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | ||
130 | mouse_opaque="true" name="(500 chars)" v_pad="0" width="70"> | ||
131 | (500 chars) | ||
132 | </text> | ||
133 | <text_editor bottom="-375" embedded_items="false" | ||
134 | enabled="true" follows="left|top" font="SansSerifSmall" height="110" | ||
135 | is_unicode="false" left="79" max_length="511" mouse_opaque="true" | ||
136 | name="about" width="321" word_wrap="true" /> | ||
137 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
138 | bottom="-403" drop_shadow_visible="true" follows="left|top" | ||
139 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | ||
140 | mouse_opaque="true" name="Give item:" v_pad="0" width="75"> | ||
141 | Give item: | ||
142 | </text> | ||
143 | <view_border blevel_style="in" border_thickness="0" bottom="-466" follows="left|top" | ||
144 | height="466" left_delta="4" mouse_opaque="false" name="drop_target_rect" | ||
145 | width="409" /> | ||
146 | <view_border blevel_style="in" bottom="-403" follows="left|top" height="16" left_delta="75" | ||
147 | mouse_opaque="false" name="drop_target_rect_vis" width="321" /> | ||
148 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
149 | bottom_delta="0" drop_shadow_visible="true" follows="left|top" | ||
150 | font="SansSerifSmall" h_pad="0" halign="center" height="16" left_delta="0" | ||
151 | mouse_opaque="true" name="Give inventory" | ||
152 | tool_tip="Drop inventory items here to give them to this person." v_pad="2" | ||
153 | width="321"> | ||
154 | Drop inventory item here. | ||
155 | </text> | ||
156 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
157 | initial_value="false" label="Show in search" left="75" mouse_opaque="true" | ||
158 | name="allow_publish" | ||
159 | tool_tip="Publish extra profile information such as description and image in Search." | ||
160 | width="130" /> | ||
161 | <button bottom="-423" follows="left|top" font="SansSerif" halign="center" height="16" | ||
162 | label="?" label_selected="?" left_delta="145" mouse_opaque="true" name="?" | ||
163 | width="20" /> | ||
164 | <button bottom="-428" font="SansSerif" halign="center" height="20" label="Find on Map" | ||
165 | label_selected="Find on Map" left="24" mouse_opaque="true" | ||
166 | name="Find on Map" width="100" /> | ||
167 | <button bottom="-428" font="SansSerif" halign="center" height="20" | ||
168 | label="Offer Teleport..." label_selected="Offer Teleport..." | ||
169 | left_delta="102" mouse_opaque="true" name="Offer Teleport..." width="140" /> | ||
170 | <button bottom="-428" font="SansSerif" halign="center" height="20" | ||
171 | label="Add Friend..." label_selected="Add Friend..." left_delta="142" | ||
172 | mouse_opaque="true" name="Add Friend..." width="130" /> | ||
173 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="Pay..." | ||
174 | label_selected="Pay..." left="24" mouse_opaque="true" name="Pay..." | ||
175 | width="100" /> | ||
176 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" | ||
177 | label="Instant Message..." label_selected="Instant Message..." | ||
178 | left_delta="102" mouse_opaque="true" name="Instant Message..." | ||
179 | tool_tip="Instant Message (IM)" width="140" /> | ||
180 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Mute" | ||
181 | label_selected="Mute" left_delta="142" mouse_opaque="true" name="Mute" | ||
182 | width="130" /> | ||
183 | </panel> | ||
184 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
185 | label="Web" left="1" mouse_opaque="true" name="WebProfile" width="418"> | ||
186 | <line_editor bevel_style="in" border_style="line" | ||
187 | border_thickness="1" bottom_delta="-18" enabled="false" follows="left|top" | ||
188 | font="SansSerifSmall" height="16" is_unicode="false" left="10" | ||
189 | max_length="254" mouse_opaque="true" name="url_edit" | ||
190 | width="400" /> | ||
191 | <flyout_button bottom_delta="-22" follows="left|top" font="SansSerifSmall" halign="center" | ||
192 | height="18" label="Load" label_selected="Load" left="10" | ||
193 | mouse_opaque="true" name="load" enabled="false" | ||
194 | tool_tip="Load this profile page with embedded web browser." width="80" > | ||
195 | <flyout_button_item value="open" name="open_item">In external browser</flyout_button_item> | ||
196 | <flyout_button_item value="home" name="home_item">Home URL</flyout_button_item> | ||
197 | </flyout_button> | ||
198 | <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" | ||
199 | height="18" label="?" label_selected="?" left_delta="85" | ||
200 | mouse_opaque="true" name="web_profile_help" width="18" /> | ||
201 | <check_box bottom_delta="0" follows="right|top" font="SansSerifSmall" height="16" | ||
202 | initial_value="false" label="Automatically load web profiles" | ||
203 | left_delta="30" mouse_opaque="true" name="auto_load" | ||
204 | tool_tip="Automatically load ALL profile webpages without asking first." | ||
205 | width="127" /> | ||
206 | <web_browser border_visible="false" bottom="-444" follows="top|left|right" height="400" | ||
207 | ignore_ui_scale="false" left="10" name="profile_html" start_url="" | ||
208 | width="400" /> | ||
209 | <text bottom="5" follows="bottom|left|right" left="15" name="status_text" right="-70" | ||
210 | top="25" /> | ||
211 | </panel> | ||
212 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
213 | label="Interests" left="1" mouse_opaque="true" name="Interests" width="418"> | ||
214 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
215 | bottom="-36" drop_shadow_visible="true" follows="left|top" | ||
216 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
217 | mouse_opaque="true" name="I Want To:" v_pad="0" width="70"> | ||
218 | I Want To: | ||
219 | </text> | ||
220 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
221 | initial_value="false" label="Build" left_delta="70" mouse_opaque="true" | ||
222 | name="chk0" width="90" /> | ||
223 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
224 | initial_value="false" label="Explore" left_delta="170" mouse_opaque="true" | ||
225 | name="chk1" width="90" /> | ||
226 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
227 | initial_value="false" label="Meet" left_delta="-170" mouse_opaque="true" | ||
228 | name="chk2" width="57" /> | ||
229 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
230 | initial_value="false" label="Be Hired" left_delta="170" mouse_opaque="true" | ||
231 | name="chk6" width="92" /> | ||
232 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
233 | initial_value="false" label="Group" left_delta="-170" mouse_opaque="true" | ||
234 | name="chk3" width="90" /> | ||
235 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
236 | initial_value="false" label="Buy" left_delta="170" mouse_opaque="true" | ||
237 | name="chk4" width="90" /> | ||
238 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
239 | initial_value="false" label="Sell" left_delta="-170" mouse_opaque="true" | ||
240 | name="chk5" width="50" /> | ||
241 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
242 | initial_value="false" label="Hire" left_delta="170" mouse_opaque="true" | ||
243 | name="chk7" width="92" /> | ||
244 | <line_editor bevel_style="in" border_style="line" | ||
245 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" | ||
246 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | ||
247 | max_length="254" mouse_opaque="true" name="want_to_edit" | ||
248 | width="330" /> | ||
249 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
250 | bottom_delta="-26" drop_shadow_visible="true" follows="left|top" | ||
251 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
252 | mouse_opaque="true" name="Skills:" v_pad="0" width="70"> | ||
253 | Skills: | ||
254 | </text> | ||
255 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
256 | initial_value="false" label="Textures" left_delta="70" mouse_opaque="true" | ||
257 | name="schk0" width="90" /> | ||
258 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
259 | initial_value="false" label="Architecture" left_delta="170" | ||
260 | mouse_opaque="true" name="schk1" width="93" /> | ||
261 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
262 | initial_value="false" label="Event Planning" left_delta="0" | ||
263 | mouse_opaque="true" name="schk2" width="105" /> | ||
264 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
265 | initial_value="false" label="Modeling" left_delta="-170" | ||
266 | mouse_opaque="true" name="schk3" width="90" /> | ||
267 | <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" | ||
268 | initial_value="false" label="Scripting" left_delta="0" mouse_opaque="true" | ||
269 | name="schk4" width="90" /> | ||
270 | <check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" | ||
271 | initial_value="false" label="Custom Characters" left_delta="170" | ||
272 | mouse_opaque="true" name="schk5" width="127" /> | ||
273 | <line_editor bevel_style="in" border_style="line" | ||
274 | border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top" | ||
275 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | ||
276 | max_length="254" mouse_opaque="true" name="skills_edit" | ||
277 | width="330" /> | ||
278 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
279 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" | ||
280 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
281 | mouse_opaque="true" name="Languages:" v_pad="0" width="70"> | ||
282 | Languages: | ||
283 | </text> | ||
284 | <line_editor bevel_style="in" border_style="line" | ||
285 | border_thickness="1" bottom_delta="0" enabled="true" follows="left|top" | ||
286 | font="SansSerifSmall" height="16" is_unicode="false" left="74" | ||
287 | max_length="254" mouse_opaque="true" name="languages_edit" | ||
288 | width="330" /> | ||
289 | </panel> | ||
290 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
291 | label="Picks" left="1" mouse_opaque="true" name="Picks" width="418"> | ||
292 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
293 | bottom="-20" drop_shadow_visible="true" follows="left|top" | ||
294 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" | ||
295 | mouse_opaque="true" | ||
296 | name="Tell everyone about your favorite places in Second Life." v_pad="0" | ||
297 | width="302"> | ||
298 | Tell everyone about your favorite places in Second Life. | ||
299 | </text> | ||
300 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
301 | height="20" label="New..." label_selected="New..." left="114" | ||
302 | mouse_opaque="true" name="New..." width="75" /> | ||
303 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" | ||
304 | label="Delete..." label_selected="Delete..." left_delta="79" | ||
305 | mouse_opaque="true" name="Delete..." width="75" /> | ||
306 | <tab_container bottom="-411" follows="left|top" height="363" left="4" mouse_opaque="false" | ||
307 | name="picks tab" tab_position="left" width="412" /> | ||
308 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
309 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" | ||
310 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" | ||
311 | name="loading_text" v_pad="0" width="302"> | ||
312 | Loading... | ||
313 | </text> | ||
314 | </panel> | ||
315 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
316 | label="Classified" left="1" mouse_opaque="true" name="Classified" | ||
317 | width="418"> | ||
318 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
319 | bottom="-20" drop_shadow_visible="true" follows="left|top" | ||
320 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="114" | ||
321 | mouse_opaque="true" | ||
322 | name="Place an ad in Second Life's classified listings." v_pad="0" | ||
323 | width="302"> | ||
324 | Place an ad in Second Life's classified listings. | ||
325 | </text> | ||
326 | <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center" | ||
327 | height="20" label="New..." label_selected="New..." left="114" | ||
328 | mouse_opaque="true" name="New..." width="75" /> | ||
329 | <button bottom="-44" follows="left|top" font="SansSerif" halign="center" height="20" | ||
330 | label="Delete..." label_selected="Delete..." left_delta="79" | ||
331 | mouse_opaque="true" name="Delete..." width="75" /> | ||
332 | <tab_container bottom="-443" follows="left|top" height="395" left="4" mouse_opaque="false" | ||
333 | name="classified tab" tab_position="left" width="412" /> | ||
334 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
335 | bottom="-70" drop_shadow_visible="true" follows="left|top" font="SansSerif" | ||
336 | h_pad="0" halign="left" height="20" left="114" mouse_opaque="false" | ||
337 | name="loading_text" v_pad="0" width="302"> | ||
338 | Loading... | ||
339 | </text> | ||
340 | </panel> | ||
341 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
342 | label="1st Life" left="1" mouse_opaque="true" name="1st Life" width="418"> | ||
343 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
344 | bottom="-36" drop_shadow_visible="true" follows="left|top" | ||
345 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
346 | mouse_opaque="true" name="Photo:" v_pad="0" width="61"> | ||
347 | Photo: | ||
348 | </text> | ||
349 | <texture_picker allow_no_texture="true" bottom="-171" can_apply_immediately="false" | ||
350 | default_image_name="None" follows="left|top" height="151" label="" | ||
351 | left="70" mouse_opaque="true" name="img" | ||
352 | tool_tip="Click to choose a picture" width="135" /> | ||
353 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
354 | bottom="-203" drop_shadow_visible="true" follows="left|top" | ||
355 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="4" | ||
356 | mouse_opaque="true" name="Info:" v_pad="0" width="61"> | ||
357 | Info: | ||
358 | </text> | ||
359 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
360 | bottom_delta="-16" drop_shadow_visible="true" follows="left|top" | ||
361 | font="SansSerifSmall" h_pad="0" halign="right" height="16" left="0" | ||
362 | mouse_opaque="true" name="(250 chars)" v_pad="0" width="65"> | ||
363 | (250 chars) | ||
364 | </text> | ||
365 | <text_editor bottom="-347" embedded_items="false" | ||
366 | enabled="true" follows="left|top" font="SansSerifSmall" height="160" | ||
367 | is_unicode="false" left="70" max_length="254" mouse_opaque="false" | ||
368 | name="about" width="330" word_wrap="true" /> | ||
369 | </panel> | ||
370 | <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" | ||
371 | label="My Notes" left="1" mouse_opaque="true" name="My Notes" width="418"> | ||
372 | <string name="Loading"> | ||
373 | Loading... | ||
374 | </string> | ||
375 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
376 | bottom="-52" drop_shadow_visible="true" follows="left|top" | ||
377 | font="SansSerifSmall" h_pad="0" halign="left" height="48" left="10" | ||
378 | mouse_opaque="true" name="label" v_pad="0" width="412"> | ||
379 | Use this space to record your notes about this person. Keep track | ||
380 | of trades in progress, joint projects, etc. Only you can see these | ||
381 | notes. This person cannot see them, nor can other people. | ||
382 | </text> | ||
383 | <text_editor bottom_delta="-260" embedded_items="false" enabled="true" follows="left|top" | ||
384 | font="SansSerif" height="256" is_unicode="false" left="10" | ||
385 | max_length="1023" mouse_opaque="true" name="notes edit" width="400" | ||
386 | word_wrap="false" /> | ||
387 | </panel> | ||
388 | </tab_container> | ||
389 | <button bottom="-483" font="SansSerif" halign="center" height="20" label="OK" | ||
390 | label_selected="OK" left="208" mouse_opaque="true" name="OK" width="100" /> | ||
391 | <button bottom_delta="0" font="SansSerif" halign="center" height="20" label="Cancel" | ||
392 | label_selected="Cancel" left_delta="105" mouse_opaque="true" name="Cancel" | ||
393 | width="100" /> | ||
394 | <button bottom_delta="132" font="SansSerif" halign="center" height="20" label="Kick" | ||
395 | label_selected="Kick" left="4" mouse_opaque="true" name="Kick" width="72" /> | ||
396 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="Freeze" | ||
397 | label_selected="Freeze" left="4" mouse_opaque="true" name="Freeze" | ||
398 | tool_tip="Stop this resident's movement and chat." width="72" /> | ||
399 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" | ||
400 | label="Unfreeze" label_selected="Unfreeze" left="4" mouse_opaque="true" | ||
401 | name="Unfreeze" tool_tip="Thaw resident" width="72" /> | ||
402 | <button bottom_delta="-24" font="SansSerif" halign="center" height="20" label="CSR" | ||
403 | label_selected="CSR" left="4" mouse_opaque="true" name="csr_btn" | ||
404 | tool_tip="Open customer service tool for this resident" width="72" /> | ||
405 | <string name="ShowOnMapNonFriend"> | ||
406 | Show location on the map. | ||
407 | Disabled because you have not | ||
408 | formed a friendship with them. | ||
409 | </string> | ||
410 | <string name="ShowOnMapFriendOffline"> | ||
411 | Show location on the map. | ||
412 | Disabled because they are not online. | ||
413 | </string> | ||
414 | <string name="ShowOnMapFriendOnline"> | ||
415 | Show location on the map. | ||
416 | </string> | ||
417 | <string name="TeleportGod"> | ||
418 | Force a teleport to your location. | ||
419 | </string> | ||
420 | <string name="TeleportPrelude"> | ||
421 | Offer a teleport to your location. | ||
422 | Disabled until you leave Orientation Island. | ||
423 | </string> | ||
424 | <string name="TeleportNormal"> | ||
425 | Offer a teleport to your location. | ||
426 | </string> | ||
427 | <string name="Loading"> | ||
428 | Loading... | ||
429 | </string> | ||
430 | </panel> | ||