aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/CMakeLists.txt29
-rw-r--r--linden/indra/newview/app_settings/grass.xml14
-rw-r--r--linden/indra/newview/app_settings/settings.xml328
-rw-r--r--linden/indra/newview/app_settings/settings_per_account.xml13
-rw-r--r--linden/indra/newview/app_settings/trees.xml32
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%201.xml141
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%202.xml141
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%203.xml141
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%204.xml141
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%205.xml141
-rw-r--r--linden/indra/newview/app_settings/windlight/skies/Rouge%206.xml141
-rw-r--r--linden/indra/newview/jcfloater_animation_list.cpp462
-rw-r--r--linden/indra/newview/jcfloater_animation_list.h88
-rw-r--r--linden/indra/newview/llagent.cpp216
-rw-r--r--linden/indra/newview/llagent.h11
-rw-r--r--linden/indra/newview/llappviewer.cpp28
-rw-r--r--linden/indra/newview/llappviewer.h1
-rw-r--r--linden/indra/newview/llcallingcard.cpp39
-rw-r--r--linden/indra/newview/llchatbar.cpp119
-rw-r--r--linden/indra/newview/llchatbar.h5
-rw-r--r--linden/indra/newview/llfilepicker.cpp6
-rw-r--r--linden/indra/newview/llfirstuse.cpp11
-rw-r--r--linden/indra/newview/llfirstuse.h1
-rw-r--r--linden/indra/newview/llfloaterabout.cpp14
-rw-r--r--linden/indra/newview/llfloateractivespeakers.cpp19
-rw-r--r--linden/indra/newview/llfloaterassetbrowser.cpp466
-rw-r--r--linden/indra/newview/llfloaterassetbrowser.h84
-rw-r--r--linden/indra/newview/llfloaterbeacons.cpp10
-rw-r--r--linden/indra/newview/llfloaterchat.cpp106
-rw-r--r--linden/indra/newview/llfloaterchat.h2
-rw-r--r--linden/indra/newview/llfloaterchatterbox.h9
-rw-r--r--linden/indra/newview/llfloaterinspect.cpp24
-rw-r--r--linden/indra/newview/llfloaterland.cpp44
-rw-r--r--linden/indra/newview/llfloaterland.h4
-rw-r--r--linden/indra/newview/llfloatermap.cpp646
-rw-r--r--linden/indra/newview/llfloatermap.h49
-rw-r--r--linden/indra/newview/llfloaterobjectiminfo.cpp204
-rw-r--r--linden/indra/newview/llfloaterobjectiminfo.h45
-rw-r--r--linden/indra/newview/llfloateropenobject.cpp13
-rw-r--r--linden/indra/newview/llfloaterproperties.cpp16
-rw-r--r--linden/indra/newview/llfloaterregioninfo.cpp19
-rw-r--r--linden/indra/newview/llfloaterregioninfo.h3
-rw-r--r--linden/indra/newview/llfloaterreporter.cpp36
-rw-r--r--linden/indra/newview/llfloatersettingsdebug.cpp31
-rw-r--r--linden/indra/newview/llfloatertelehub.cpp1
-rw-r--r--linden/indra/newview/llfloatertools.cpp267
-rw-r--r--linden/indra/newview/llfloatertools.h13
-rw-r--r--linden/indra/newview/llfloaterwindlight.cpp62
-rw-r--r--linden/indra/newview/llfloaterwindlight.h3
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp28
-rw-r--r--linden/indra/newview/llfolderview.cpp45
-rw-r--r--linden/indra/newview/llfolderview.h5
-rw-r--r--linden/indra/newview/llglsandbox.cpp28
-rw-r--r--linden/indra/newview/llgroupnotify.cpp4
-rw-r--r--linden/indra/newview/llhoverview.cpp38
-rw-r--r--linden/indra/newview/llhudtext.cpp39
-rw-r--r--linden/indra/newview/llhudtext.h8
-rw-r--r--linden/indra/newview/llimpanel.cpp40
-rw-r--r--linden/indra/newview/llimview.cpp13
-rw-r--r--linden/indra/newview/llinventoryactions.cpp45
-rw-r--r--linden/indra/newview/llinventorybridge.cpp330
-rw-r--r--linden/indra/newview/llinventorymodel.cpp27
-rw-r--r--linden/indra/newview/llinventoryview.cpp28
-rw-r--r--linden/indra/newview/llinventoryview.h28
-rw-r--r--linden/indra/newview/llmanipscale.cpp26
-rw-r--r--linden/indra/newview/llmanipscale.h3
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp11
-rw-r--r--linden/indra/newview/llnetmap.cpp263
-rw-r--r--linden/indra/newview/llnetmap.h57
-rw-r--r--linden/indra/newview/llnotify.cpp11
-rw-r--r--linden/indra/newview/lloverlaybar.cpp74
-rw-r--r--linden/indra/newview/lloverlaybar.h8
-rw-r--r--linden/indra/newview/llpanelavatar.cpp115
-rw-r--r--linden/indra/newview/llpanelavatar.h1
-rw-r--r--linden/indra/newview/llpanelclassified.cpp11
-rw-r--r--linden/indra/newview/llpanelcontents.cpp38
-rw-r--r--linden/indra/newview/llpaneldisplay.cpp21
-rw-r--r--linden/indra/newview/llpaneldisplay.h2
-rw-r--r--linden/indra/newview/llpanelgeneral.cpp2
-rw-r--r--linden/indra/newview/llpanelinventory.cpp86
-rw-r--r--linden/indra/newview/llpanelland.cpp6
-rw-r--r--linden/indra/newview/llpanellogin.cpp16
-rw-r--r--linden/indra/newview/llpanelobject.cpp17
-rw-r--r--linden/indra/newview/llpanelpermissions.cpp92
-rw-r--r--linden/indra/newview/llpanelpermissions.h1
-rw-r--r--linden/indra/newview/llpanelpick.cpp16
-rw-r--r--linden/indra/newview/llprefschat.cpp20
-rw-r--r--linden/indra/newview/llprefsim.cpp12
-rw-r--r--linden/indra/newview/llpreviewscript.cpp20
-rw-r--r--linden/indra/newview/llselectmgr.cpp20
-rw-r--r--linden/indra/newview/llselectmgr.h1
-rw-r--r--linden/indra/newview/llspatialpartition.cpp2
-rw-r--r--linden/indra/newview/llstartup.cpp27
-rw-r--r--linden/indra/newview/llstatusbar.cpp15
-rw-r--r--linden/indra/newview/llstylemap.cpp37
-rw-r--r--linden/indra/newview/llstylemap.h3
-rw-r--r--linden/indra/newview/lltexturecache.cpp20
-rw-r--r--linden/indra/newview/lltexturectrl.cpp7
-rw-r--r--linden/indra/newview/lltool.cpp15
-rw-r--r--linden/indra/newview/lltool.h3
-rw-r--r--linden/indra/newview/lltoolbar.cpp22
-rw-r--r--linden/indra/newview/lltoolbrush.cpp45
-rw-r--r--linden/indra/newview/lltoolbrush.h5
-rw-r--r--linden/indra/newview/lltooldraganddrop.cpp85
-rw-r--r--linden/indra/newview/lltoolface.cpp10
-rw-r--r--linden/indra/newview/lltoolgrab.cpp24
-rw-r--r--linden/indra/newview/lltoolpie.cpp72
-rw-r--r--linden/indra/newview/lltoolplacer.cpp38
-rw-r--r--linden/indra/newview/lltoolselect.cpp49
-rw-r--r--linden/indra/newview/lltracker.cpp24
-rw-r--r--linden/indra/newview/llviewercontrol.cpp21
-rw-r--r--linden/indra/newview/llviewerdisplay.cpp12
-rw-r--r--linden/indra/newview/llviewermenu.cpp1019
-rw-r--r--linden/indra/newview/llviewermessage.cpp472
-rw-r--r--linden/indra/newview/llviewerobject.cpp17
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp30
-rw-r--r--linden/indra/newview/llviewertexteditor.cpp86
-rw-r--r--linden/indra/newview/llviewertexteditor.h2
-rw-r--r--linden/indra/newview/llviewerthrottle.cpp2
-rw-r--r--linden/indra/newview/llviewerwindow.cpp497
-rw-r--r--linden/indra/newview/llviewerwindow.h9
-rw-r--r--linden/indra/newview/llvlcomposition.cpp9
-rw-r--r--linden/indra/newview/llvoavatar.cpp119
-rw-r--r--linden/indra/newview/llvograss.cpp11
-rw-r--r--linden/indra/newview/llvograss.h3
-rw-r--r--linden/indra/newview/llvotree.cpp14
-rw-r--r--linden/indra/newview/llvotree.h3
-rw-r--r--linden/indra/newview/llvovolume.cpp16
-rw-r--r--linden/indra/newview/llwindlightremotectrl.cpp267
-rw-r--r--linden/indra/newview/llwindlightremotectrl.h60
-rw-r--r--linden/indra/newview/llwlparammanager.cpp40
-rw-r--r--linden/indra/newview/llwlparammanager.h17
-rw-r--r--linden/indra/newview/llworldmapview.cpp93
-rw-r--r--linden/indra/newview/llworldmapview.h2
-rw-r--r--linden/indra/newview/pipeline.cpp9
-rw-r--r--linden/indra/newview/primbackup.cpp1105
-rw-r--r--linden/indra/newview/primbackup.h132
-rw-r--r--linden/indra/newview/rlvevent.h224
-rw-r--r--linden/indra/newview/rlvextensions.cpp454
-rw-r--r--linden/indra/newview/rlvextensions.h43
-rw-r--r--linden/indra/newview/rlvfloaterbehaviour.cpp152
-rw-r--r--linden/indra/newview/rlvfloaterbehaviour.h49
-rw-r--r--linden/indra/newview/rlvhandler.cpp2549
-rw-r--r--linden/indra/newview/rlvhandler.h462
-rw-r--r--linden/indra/newview/rlvhelper.cpp674
-rw-r--r--linden/indra/newview/rlvhelper.h579
-rw-r--r--linden/indra/newview/rlvmultistringsearch.cpp196
-rw-r--r--linden/indra/newview/rlvmultistringsearch.h191
-rw-r--r--linden/indra/newview/skins/default/colors_base.xml6
-rw-r--r--linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.pngbin0 -> 10714 bytes
-rw-r--r--linden/indra/newview/skins/default/html/en-us/loading/loading.html2
-rw-r--r--linden/indra/newview/skins/default/textures/arrow_left.tgabin0 -> 510 bytes
-rw-r--r--linden/indra/newview/skins/default/textures/arrow_right.tgabin0 -> 510 bytes
-rw-r--r--linden/indra/newview/skins/default/textures/textures.xml3
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml74
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml29
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml18
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_media_browser.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml98
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml54
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_prim_import.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_profile.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_rlv_behaviour.xml11
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml216
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml24
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml42
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml20
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml206
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notify.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml568
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_mini_map.xml62
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml17
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml6
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml16
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml82
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_windlight_controls.xml14
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml22
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml34
-rw-r--r--linden/indra/newview/skins/silver/colors_base.xml3
-rw-r--r--linden/indra/newview/skins/silver/textures/arrow_left.tgabin0 -> 424 bytes
-rw-r--r--linden/indra/newview/skins/silver/textures/arrow_right.tgabin0 -> 424 bytes
-rw-r--r--linden/indra/newview/skins/silver/xui/en-us/panel_avatar.xml430
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py2
189 files changed, 16438 insertions, 1911 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
63set(viewer_SOURCE_FILES 63set(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
436set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING 446set(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
839source_group("CMake Rules" FILES ViewerInstall.cmake) 860source_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)
1385endif (WINDOWS) 1412endif (WINDOWS)
1386 1413
1387target_link_libraries(${VIEWER_BINARY_NAME} 1414target_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/grass.xml b/linden/indra/newview/app_settings/grass.xml
index 4fc3b79..bdfa603 100644
--- a/linden/indra/newview/app_settings/grass.xml
+++ b/linden/indra/newview/app_settings/grass.xml
@@ -1,47 +1,47 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?> 1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<grass_defs> 2<grass_defs>
3
3 <grass 4 <grass
4 name="Grass 0" 5 name="Grass - Medium"
5 species_id="0" 6 species_id="0"
6 texture_id="6c4727b8-ac79-ba44-3b81-f9aa887b47eb" 7 texture_id="6c4727b8-ac79-ba44-3b81-f9aa887b47eb"
7 blade_size_x="1.35" 8 blade_size_x="1.35"
8 blade_size_y="1.35" 9 blade_size_y="1.35"
9 /> 10 />
10 <grass 11 <grass
11 name="Grass 1" 12 name="Grass - Short 2"
12 species_id="1" 13 species_id="1"
13 texture_id="79504bf5-c3ec-0763-6563-d843de66d0a1" 14 texture_id="79504bf5-c3ec-0763-6563-d843de66d0a1"
14 blade_size_x="1.0" 15 blade_size_x="1.0"
15 blade_size_y="0.66" 16 blade_size_y="0.66"
16 /> 17 />
17 <grass 18 <grass
18 name="Grass 2" 19 name="Grass - Tall Green"
19 species_id="2" 20 species_id="2"
20 texture_id="6c4727b8-ac79-ba44-3b81-f9aa887b47eb" 21 texture_id="6c4727b8-ac79-ba44-3b81-f9aa887b47eb"
21 blade_size_x="1.8" 22 blade_size_x="1.8"
22 blade_size_y="1.8" 23 blade_size_y="1.8"
23 /> 24 />
24 <grass 25 <grass
25 name="Grass 3" 26 name="Grass - Short 1"
26 species_id="3" 27 species_id="3"
27 texture_id="99bd60a2-3250-efc9-2e39-2fbcadefbecc" 28 texture_id="99bd60a2-3250-efc9-2e39-2fbcadefbecc"
28 blade_size_x="1.0" 29 blade_size_x="1.0"
29 blade_size_y="1.0" 30 blade_size_y="1.0"
30 /> 31 />
31 <grass 32 <grass
32 name="Grass 4" 33 name="Grass - Tall Brown"
33 species_id="4" 34 species_id="4"
34 texture_id="7a2b3a4a-53c2-53ac-5716-aac7d743c020" 35 texture_id="7a2b3a4a-53c2-53ac-5716-aac7d743c020"
35 blade_size_x="2.25" 36 blade_size_x="2.25"
36 blade_size_y="2.25" 37 blade_size_y="2.25"
37 /> 38 />
38 <grass 39 <grass
39 name="undergrowth_1" 40 name="Leafy Ground Cover"
40 species_id="5" 41 species_id="5"
41 texture_id="8f458549-173b-23ff-d4ff-bfaa5ea2371b" 42 texture_id="8f458549-173b-23ff-d4ff-bfaa5ea2371b"
42 blade_size_x="2.0" 43 blade_size_x="2.0"
43 blade_size_y="2.0" 44 blade_size_y="2.0"
44 /> 45 />
45 46
46
47</grass_defs> \ No newline at end of file 47</grass_defs> \ No newline at end of file
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 2d64f03..194e95e 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>
@@ -3911,6 +4087,17 @@
3911 <real>1.0</real> 4087 <real>1.0</real>
3912 </array> 4088 </array>
3913 </map> 4089 </map>
4090 <key>IMInChatConsole</key>
4091 <map>
4092 <key>Comment</key>
4093 <string>Show IMs in main chat</string>
4094 <key>Persist</key>
4095 <integer>1</integer>
4096 <key>Type</key>
4097 <string>Boolean</string>
4098 <key>Value</key>
4099 <integer>0</integer>
4100 </map>
3914 <key>IMInChatHistory</key> 4101 <key>IMInChatHistory</key>
3915 <map> 4102 <map>
3916 <key>Comment</key> 4103 <key>Comment</key>
@@ -3988,6 +4175,17 @@
3988 <key>Value</key> 4175 <key>Value</key>
3989 <real>1.0</real> 4176 <real>1.0</real>
3990 </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>
3991 <key>InventorySortOrder</key> 4189 <key>InventorySortOrder</key>
3992 <map> 4190 <map>
3993 <key>Comment</key> 4191 <key>Comment</key>
@@ -4236,16 +4434,38 @@
4236 <string>default</string> 4434 <string>default</string>
4237 </map> 4435 </map>
4238 <key>LanguageIsPublic</key> 4436 <key>LanguageIsPublic</key>
4239 <map> 4437 <map>
4240 <key>Comment</key> 4438 <key>Comment</key>
4241 <string>Let other residents see our language information</string> 4439 <string>Let other residents see our language information</string>
4242 <key>Persist</key> 4440 <key>Persist</key>
4243 <integer>1</integer> 4441 <integer>1</integer>
4244 <key>Type</key> 4442 <key>Type</key>
4245 <string>Boolean</string> 4443 <string>Boolean</string>
4246 <key>Value</key> 4444 <key>Value</key>
4247 <integer>1</integer> 4445 <integer>1</integer>
4248 </map> 4446 </map>
4447 <key>LastGrass</key>
4448 <map>
4449 <key>Comment</key>
4450 <string>The last grass selected in the create dialog</string>
4451 <key>Persist</key>
4452 <integer>1</integer>
4453 <key>Type</key>
4454 <string>String</string>
4455 <key>Value</key>
4456 <integer>Random</integer>
4457 </map>
4458 <key>LastTree</key>
4459 <map>
4460 <key>Comment</key>
4461 <string>The last tree selected in the create dialog</string>
4462 <key>Persist</key>
4463 <integer>1</integer>
4464 <key>Type</key>
4465 <string>String</string>
4466 <key>Value</key>
4467 <integer>Random</integer>
4468 </map>
4249 <key>LastFeatureVersion</key> 4469 <key>LastFeatureVersion</key>
4250 <map> 4470 <map>
4251 <key>Comment</key> 4471 <key>Comment</key>
@@ -4500,6 +4720,17 @@
4500 <key>Value</key> 4720 <key>Value</key>
4501 <integer>0</integer> 4721 <integer>0</integer>
4502 </map> 4722 </map>
4723 <key>LoggedIntoOpenSim</key>
4724 <map>
4725 <key>Comment</key>
4726 <string>Check whether or not we're in an OpenSimulator (default 0)</string>
4727 <key>Persist</key>
4728 <integer>1</integer>
4729 <key>Type</key>
4730 <string>Boolean</string>
4731 <key>Value</key>
4732 <integer>0</integer>
4733 </map>
4503 <key>LoginAsGod</key> 4734 <key>LoginAsGod</key>
4504 <map> 4735 <map>
4505 <key>Comment</key> 4736 <key>Comment</key>
@@ -4577,6 +4808,17 @@
4577 <key>Value</key> 4808 <key>Value</key>
4578 <real>128.0</real> 4809 <real>128.0</real>
4579 </map> 4810 </map>
4811 <key>MapShowAgentCount</key>
4812 <map>
4813 <key>Comment</key>
4814 <string>Show number of agents next to region names on world map</string>
4815 <key>Persist</key>
4816 <integer>1</integer>
4817 <key>Type</key>
4818 <string>Boolean</string>
4819 <key>Value</key>
4820 <integer>1</integer>
4821 </map>
4580 <key>MapShowEvents</key> 4822 <key>MapShowEvents</key>
4581 <map> 4823 <map>
4582 <key>Comment</key> 4824 <key>Comment</key>
@@ -4775,6 +5017,28 @@
4775 <key>Value</key> 5017 <key>Value</key>
4776 <integer>410</integer> 5018 <integer>410</integer>
4777 </map> 5019 </map>
5020 <key>MiniMapCenter</key>
5021 <map>
5022 <key>Comment</key>
5023 <string>Sets the focal point of the minimap. (0=None, 1=Camera)</string>
5024 <key>Persist</key>
5025 <integer>1</integer>
5026 <key>Type</key>
5027 <string>S32</string>
5028 <key>Value</key>
5029 <integer>1</integer>
5030 </map>
5031 <key>MiniMapPrimMaxRadius</key>
5032 <map>
5033 <key>Comment</key>
5034 <string>Radius of the largest prim to show on the MiniMap. Increasing beyond 256 may cause client lag.</string>
5035 <key>Persist</key>
5036 <integer>1</integer>
5037 <key>Type</key>
5038 <string>F32</string>
5039 <key>Value</key>
5040 <real>256.0</real>
5041 </map>
4778 <key>MiniMapRotate</key> 5042 <key>MiniMapRotate</key>
4779 <map> 5043 <map>
4780 <key>Comment</key> 5044 <key>Comment</key>
@@ -4992,7 +5256,7 @@
4992 <key>Type</key> 5256 <key>Type</key>
4993 <string>F32</string> 5257 <string>F32</string>
4994 <key>Value</key> 5258 <key>Value</key>
4995 <integer>20</integer> 5259 <integer>96</integer>
4996 </map> 5260 </map>
4997 <key>NewCacheLocation</key> 5261 <key>NewCacheLocation</key>
4998 <map> 5262 <map>
@@ -5725,7 +5989,7 @@
5725 <key>Persist</key> 5989 <key>Persist</key>
5726 <integer>1</integer> 5990 <integer>1</integer>
5727 <key>Type</key> 5991 <key>Type</key>
5728 <string>S32</string> 5992 <string>F32</string>
5729 <key>Value</key> 5993 <key>Value</key>
5730 <integer>0</integer> 5994 <integer>0</integer>
5731 </map> 5995 </map>
@@ -6188,6 +6452,17 @@
6188 <key>Value</key> 6452 <key>Value</key>
6189 <integer>0</integer> 6453 <integer>0</integer>
6190 </map> 6454 </map>
6455 <key>RenderHighlightSelections</key>
6456 <map>
6457 <key>Comment</key>
6458 <string>Show selection outlines on objects</string>
6459 <key>Persist</key>
6460 <integer>1</integer>
6461 <key>Type</key>
6462 <string>Boolean</string>
6463 <key>Value</key>
6464 <integer>1</integer>
6465 </map>
6191 <key>RenderHiddenSelections</key> 6466 <key>RenderHiddenSelections</key>
6192 <map> 6467 <map>
6193 <key>Comment</key> 6468 <key>Comment</key>
@@ -7271,6 +7546,17 @@
7271 <key>Value</key> 7546 <key>Value</key>
7272 <integer>0</integer> 7547 <integer>0</integer>
7273 </map> 7548 </map>
7549 <key>ShowStreamTitle</key>
7550 <map>
7551 <key>Comment</key>
7552 <string>Show the title of the song playing on the parcel's stream</string>
7553 <key>Persist</key>
7554 <integer>1</integer>
7555 <key>Type</key>
7556 <string>Boolean</string>
7557 <key>Value</key>
7558 <integer>1</integer>
7559 </map>
7274 <key>ShowTangentBasis</key> 7560 <key>ShowTangentBasis</key>
7275 <map> 7561 <map>
7276 <key>Comment</key> 7562 <key>Comment</key>
@@ -7337,6 +7623,17 @@
7337 <key>Value</key> 7623 <key>Value</key>
7338 <integer>0</integer> 7624 <integer>0</integer>
7339 </map> 7625 </map>
7626 <key>ShowWindlightSettingsPopup</key>
7627 <map>
7628 <key>Comment</key>
7629 <string>Show environment settings popup</string>
7630 <key>Persist</key>
7631 <integer>1</integer>
7632 <key>Type</key>
7633 <string>Boolean</string>
7634 <key>Value</key>
7635 <integer>0</integer>
7636 </map>
7340 <key>ShowWorldMap</key> 7637 <key>ShowWorldMap</key>
7341 <map> 7638 <map>
7342 <key>Comment</key> 7639 <key>Comment</key>
@@ -7841,7 +8138,7 @@
7841 <key>Type</key> 8138 <key>Type</key>
7842 <string>F32</string> 8139 <string>F32</string>
7843 <key>Value</key> 8140 <key>Value</key>
7844 <real>500.0</real> 8141 <real>1000.0</real>
7845 </map> 8142 </map>
7846 <key>ToolHelpRect</key> 8143 <key>ToolHelpRect</key>
7847 <map> 8144 <map>
@@ -10053,6 +10350,17 @@
10053 <key>Value</key> 10350 <key>Value</key>
10054 <integer>1</integer> 10351 <integer>1</integer>
10055 </map> 10352 </map>
10353 <key>WarnFirstMiniMap</key>
10354 <map>
10355 <key>Comment</key>
10356 <string>Enables FirstMiniMap warning dialog</string>
10357 <key>Persist</key>
10358 <integer>1</integer>
10359 <key>Type</key>
10360 <string>Boolean</string>
10361 <key>Value</key>
10362 <integer>1</integer>
10363 </map>
10056 <key>WarnFirstOverrideKeys</key> 10364 <key>WarnFirstOverrideKeys</key>
10057 <map> 10365 <map>
10058 <key>Comment</key> 10366 <key>Comment</key>
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/trees.xml b/linden/indra/newview/app_settings/trees.xml
index 213ee85..36ffa62 100644
--- a/linden/indra/newview/app_settings/trees.xml
+++ b/linden/indra/newview/app_settings/trees.xml
@@ -1,24 +1,24 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?> 1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<tree_defs> 2<tree_defs>
3 <tree name="Pine 1" species_id="0" texture_id="0187babf-6c0d-5891-ebed-4ecab1426683" droop="60.0" twist="5.0" branches="5.0" depth="1" scale_step="0.7" trunk_depth="6" branch_length="8.0" trunk_length="11.5" leaf_scale="22.0" billboard_scale="39.5" billboard_ratio="1.1" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="20.0" noise_mag="0.5" noise_scale="2.5" taper="0.8" repeat_z="3" /> 3 <tree name="Pine Tree - Ponderosa" species_id="0" texture_id="0187babf-6c0d-5891-ebed-4ecab1426683" droop="60.0" twist="5.0" branches="5.0" depth="1" scale_step="0.7" trunk_depth="6" branch_length="8.0" trunk_length="11.5" leaf_scale="22.0" billboard_scale="39.5" billboard_ratio="1.1" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="20.0" noise_mag="0.5" noise_scale="2.5" taper="0.8" repeat_z="3" />
4 <tree name="Oak" species_id="1" texture_id="8a515889-eac9-fb55-8eba-d2dc09eb32c8" droop="35.0" twist="3.0" branches="4.0" depth="3" scale_step="0.7" trunk_depth="0" branch_length="3.0" trunk_length="3.8" leaf_scale="7.0" billboard_scale="10.25" billboard_ratio="1.0" trunk_aspect="0.15" branch_aspect="0.07" leaf_rotate="0.0" noise_mag="1.2" noise_scale="4.0" taper="0.3" repeat_z="4" /> 4 <tree name="Oak" species_id="1" texture_id="8a515889-eac9-fb55-8eba-d2dc09eb32c8" droop="35.0" twist="3.0" branches="4.0" depth="3" scale_step="0.7" trunk_depth="0" branch_length="3.0" trunk_length="3.8" leaf_scale="7.0" billboard_scale="10.25" billboard_ratio="1.0" trunk_aspect="0.15" branch_aspect="0.07" leaf_rotate="0.0" noise_mag="1.2" noise_scale="4.0" taper="0.3" repeat_z="4" />
5 <tree name="Tropical Bush 1" species_id="2" texture_id="5bc11cd6-2f40-071e-a8da-0903394204f9" droop="10.0" twist="0.0" branches="6.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="7.5" billboard_scale="5.0" billboard_ratio="1.25" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" /> 5 <tree name="Tropical Plant 1" species_id="2" texture_id="5bc11cd6-2f40-071e-a8da-0903394204f9" droop="10.0" twist="0.0" branches="6.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="7.5" billboard_scale="5.0" billboard_ratio="1.25" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" />
6 <tree name="Palm 1" species_id="3" texture_id="ca4e8c27-473c-eb1c-2f5d-50ee3f07d85c" droop="0.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="0" branch_length="0.7" trunk_length="9.0" leaf_scale="10.0" billboard_scale="13.25" billboard_ratio="1.0" trunk_aspect="0.035" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="0.2" noise_scale="6.0" taper="0.7" repeat_z="10" /> 6 <tree name="Palm Tree 1" species_id="3" texture_id="ca4e8c27-473c-eb1c-2f5d-50ee3f07d85c" droop="0.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="0" branch_length="0.7" trunk_length="9.0" leaf_scale="10.0" billboard_scale="13.25" billboard_ratio="1.0" trunk_aspect="0.035" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="0.2" noise_scale="6.0" taper="0.7" repeat_z="10" />
7 <tree name="Dogwood" species_id="4" texture_id="64367bd1-697e-b3e6-0b65-3f862a577366" droop="30.0" twist="0.0" branches="3.0" depth="2" scale_step="0.7" trunk_depth="1" branch_length="2.75" trunk_length="4.0" leaf_scale="5.5" billboard_scale="10.0" billboard_ratio="1.0" trunk_aspect="0.06" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.5" noise_scale="2.0" taper="0.8" repeat_z="3" /> 7 <tree name="Dogwood Tree" species_id="4" texture_id="64367bd1-697e-b3e6-0b65-3f862a577366" droop="30.0" twist="0.0" branches="3.0" depth="2" scale_step="0.7" trunk_depth="1" branch_length="2.75" trunk_length="4.0" leaf_scale="5.5" billboard_scale="10.0" billboard_ratio="1.0" trunk_aspect="0.06" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.5" noise_scale="2.0" taper="0.8" repeat_z="3" />
8 <tree name="Tropical Bush 2" species_id="5" texture_id="cdd9a9fc-6d0b-f90d-8416-c72b6019bca8" droop="10.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="6.0" billboard_scale="4.5" billboard_ratio="0.9" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" /> 8 <tree name="Tropical Plant 2" species_id="5" texture_id="cdd9a9fc-6d0b-f90d-8416-c72b6019bca8" droop="10.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="6.0" billboard_scale="4.5" billboard_ratio="0.9" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" />
9 <tree name="Palm 2" species_id="6" texture_id="2d784476-d0db-9979-0cff-9408745a7cf3" droop="0.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="0" branch_length="0.7" trunk_length="10.0" leaf_scale="7.5" billboard_scale="13.5" billboard_ratio="1.0" trunk_aspect="0.035" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="0.2" noise_scale="6.0" taper="0.6" repeat_z="12" /> 9 <tree name="Palm Tree 2" species_id="6" texture_id="2d784476-d0db-9979-0cff-9408745a7cf3" droop="0.0" twist="0.0" branches="3.0" depth="1" scale_step="0.5" trunk_depth="0" branch_length="0.7" trunk_length="10.0" leaf_scale="7.5" billboard_scale="13.5" billboard_ratio="1.0" trunk_aspect="0.035" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="0.2" noise_scale="6.0" taper="0.6" repeat_z="12" />
10 <tree name="Cypress 1" species_id="7" texture_id="fb2ae204-3fd1-df33-594f-c9f882830e66" droop="30.0" twist="0.0" branches="3.0" depth="4" scale_step="0.5" trunk_depth="0" branch_length="10.0" trunk_length="10.0" leaf_scale="70.0" billboard_scale="22.5" billboard_ratio="1.0" trunk_aspect="0.05" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="1.2" noise_scale="1.0" taper="0.5" repeat_z="6" /> 10 <tree name="Cypress Tree 1" species_id="7" texture_id="fb2ae204-3fd1-df33-594f-c9f882830e66" droop="30.0" twist="0.0" branches="3.0" depth="4" scale_step="0.5" trunk_depth="0" branch_length="10.0" trunk_length="10.0" leaf_scale="70.0" billboard_scale="22.5" billboard_ratio="1.0" trunk_aspect="0.05" branch_aspect="0.03" leaf_rotate="0.0" noise_mag="1.2" noise_scale="1.0" taper="0.5" repeat_z="6" />
11 <tree name="Cypress 2" species_id="8" texture_id="30047cec-269d-408e-0c30-b2603b887268" droop="30.0" twist="0.0" branches="3.0" depth="4" scale_step="0.6" trunk_depth="3.0" branch_length="7.5" trunk_length="10.0" leaf_scale="35.0" billboard_scale="25.0" billboard_ratio="0.8" trunk_aspect="0.05" branch_aspect="0.04" leaf_rotate="0.0" noise_mag="1.2" noise_scale="1.0" taper="0.5" repeat_z="5" /> 11 <tree name="Cypress Tree 2" species_id="8" texture_id="30047cec-269d-408e-0c30-b2603b887268" droop="30.0" twist="0.0" branches="3.0" depth="4" scale_step="0.6" trunk_depth="3.0" branch_length="7.5" trunk_length="10.0" leaf_scale="35.0" billboard_scale="25.0" billboard_ratio="0.8" trunk_aspect="0.05" branch_aspect="0.04" leaf_rotate="0.0" noise_mag="1.2" noise_scale="1.0" taper="0.5" repeat_z="5" />
12 <tree name="Pine 2" species_id="9" texture_id="d691a01c-13b7-578d-57c0-5caef0b4e7e1" droop="50.0" twist="7.5" branches="4.0" depth="2" scale_step="0.7" trunk_depth="6.0" branch_length="6.0" trunk_length="10.0" leaf_scale="15.5" billboard_scale="33.0" billboard_ratio="1.35" trunk_aspect="0.1" branch_aspect="0.08" leaf_rotate="5.0" noise_mag="0.5" noise_scale="2.5" taper="0.7" repeat_z="3" /> 12 <tree name="Pine Tree - Evergreen" species_id="9" texture_id="d691a01c-13b7-578d-57c0-5caef0b4e7e1" droop="50.0" twist="7.5" branches="4.0" depth="2" scale_step="0.7" trunk_depth="6.0" branch_length="6.0" trunk_length="10.0" leaf_scale="15.5" billboard_scale="33.0" billboard_ratio="1.35" trunk_aspect="0.1" branch_aspect="0.08" leaf_rotate="5.0" noise_mag="0.5" noise_scale="2.5" taper="0.7" repeat_z="3" />
13 <tree name="Plumeria" species_id="10" texture_id="6de37e4e-7029-61f5-54b8-f5e63f983f58" droop="8.0" twist="7.0" branches="3.0" depth="2" scale_step="0.6" trunk_depth="0" branch_length="3.0" trunk_length="0.1" leaf_scale="20" billboard_scale="10.0" billboard_ratio="1.35" trunk_aspect="0.10" branch_aspect="0.075" leaf_rotate="0.0" noise_mag="0" noise_scale="0" taper="0.85" repeat_z="2" /> 13 <tree name="Plumeria" species_id="10" texture_id="6de37e4e-7029-61f5-54b8-f5e63f983f58" droop="8.0" twist="7.0" branches="3.0" depth="2" scale_step="0.6" trunk_depth="0" branch_length="3.0" trunk_length="0.1" leaf_scale="20" billboard_scale="10.0" billboard_ratio="1.35" trunk_aspect="0.10" branch_aspect="0.075" leaf_rotate="0.0" noise_mag="0" noise_scale="0" taper="0.85" repeat_z="2" />
14 <tree name="Winter Pine 1" species_id="11" texture_id="10d2a01a-0818-84b9-4b96-c2eb63256519" droop="90.0" twist="2.5" branches="6.0" depth="1" scale_step="0.66" trunk_depth="8" branch_length="0.0" trunk_length="4" leaf_scale="6.75" billboard_scale="12.5" billboard_ratio="0.6" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.0" noise_scale="2.5" taper="0.85" repeat_z="2" /> 14 <tree name="Winter Pine Tree 1" species_id="11" texture_id="10d2a01a-0818-84b9-4b96-c2eb63256519" droop="90.0" twist="2.5" branches="6.0" depth="1" scale_step="0.66" trunk_depth="8" branch_length="0.0" trunk_length="4" leaf_scale="6.75" billboard_scale="12.5" billboard_ratio="0.6" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.0" noise_scale="2.5" taper="0.85" repeat_z="2" />
15 <tree name="Winter Aspen" species_id="12" texture_id="7c0cf89b-44b1-1ce2-dd74-07102a98ac2a" droop="85.0" twist="3.0" branches="5" depth="1" scale_step="0.6" trunk_depth="8" branch_length="3.0" trunk_length="4.5" leaf_scale="8" billboard_scale="12" billboard_ratio=".675" trunk_aspect="0.06" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.75" noise_scale="2.5" taper="0.8" repeat_z="2" /> 15 <tree name="Winter Aspen Tree" species_id="12" texture_id="7c0cf89b-44b1-1ce2-dd74-07102a98ac2a" droop="85.0" twist="3.0" branches="5" depth="1" scale_step="0.6" trunk_depth="8" branch_length="3.0" trunk_length="4.5" leaf_scale="8" billboard_scale="12" billboard_ratio=".675" trunk_aspect="0.06" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.75" noise_scale="2.5" taper="0.8" repeat_z="2" />
16 <tree name="Winter Pine 2" species_id="13" texture_id="67931331-0c02-4876-1255-28770896c6a2" droop="140.0" twist="5.0" branches="6.0" depth="1" scale_step="0.6" trunk_depth="7" branch_length="0.0" trunk_length="3" leaf_scale="5.0" billboard_scale="7.5" billboard_ratio="0.5" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.750" noise_scale="2.5" taper="0.5" repeat_z="2" /> 16 <tree name="Winter Pine Tree 2" species_id="13" texture_id="67931331-0c02-4876-1255-28770896c6a2" droop="140.0" twist="5.0" branches="6.0" depth="1" scale_step="0.6" trunk_depth="7" branch_length="0.0" trunk_length="3" leaf_scale="5.0" billboard_scale="7.5" billboard_ratio="0.5" trunk_aspect="0.1" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="0.750" noise_scale="2.5" taper="0.5" repeat_z="2" />
17 <tree name="Eucalyptus" species_id="14" texture_id="a6162133-724b-54df-a12f-51cd070ad6f3" droop="20.0" twist="5.0" branches="3.6" depth="4" scale_step="0.6" trunk_depth="0" branch_length="12.0" trunk_length="8.0" leaf_scale="33.0" billboard_scale="24" billboard_ratio="1.3" trunk_aspect="0.15" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="0" noise_scale="0" taper="0.675" repeat_z="3" /> 17 <tree name="Eucalyptus Tree" species_id="14" texture_id="a6162133-724b-54df-a12f-51cd070ad6f3" droop="20.0" twist="5.0" branches="3.6" depth="4" scale_step="0.6" trunk_depth="0" branch_length="12.0" trunk_length="8.0" leaf_scale="33.0" billboard_scale="24" billboard_ratio="1.3" trunk_aspect="0.15" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="0" noise_scale="0" taper="0.675" repeat_z="3" />
18 <tree name="Fern" species_id="15" texture_id="8872f2b8-31db-42d8-580a-b3e4a91262de" droop="12.0" twist="0.0" branches="7.0" depth="1" scale_step="0.5" trunk_depth="0.1" branch_length="0.01" trunk_length="0.0" leaf_scale="4" billboard_scale="3.5" billboard_ratio="0.85" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" /> 18 <tree name="Fern" species_id="15" texture_id="8872f2b8-31db-42d8-580a-b3e4a91262de" droop="12.0" twist="0.0" branches="7.0" depth="1" scale_step="0.5" trunk_depth="0.1" branch_length="0.01" trunk_length="0.0" leaf_scale="4" billboard_scale="3.5" billboard_ratio="0.85" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" />
19 <tree name="Eelgrass" species_id="16" texture_id="96b4de31-f4fa-337d-ec78-451e3609769e" droop="0.0" twist="0.0" branches="5.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="5.0" billboard_scale="3.0" billboard_ratio="1.0" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" /> 19 <tree name="Eelgrass" species_id="16" texture_id="96b4de31-f4fa-337d-ec78-451e3609769e" droop="0.0" twist="0.0" branches="5.0" depth="1" scale_step="0.5" trunk_depth="1" branch_length="0.5" trunk_length="0.15" leaf_scale="5.0" billboard_scale="3.0" billboard_ratio="1.0" trunk_aspect="1.0" branch_aspect="0.08" leaf_rotate="0.0" noise_mag="1.0" noise_scale="1.0" taper="0.2" repeat_z="1" />
20 <tree name="Sea Sword" species_id="17" texture_id="5894e2e7-ab8d-edfa-e61c-18cf16854ba3" droop="0.0" twist="0.0" branches="6.0" depth="1" scale_step="0.7" trunk_depth="1" branch_length="0.0" trunk_length="0.0" leaf_scale="2.0" billboard_scale="2.0" billboard_ratio="1.0" trunk_aspect="1.0" branch_aspect="1.0" leaf_rotate="0.0" noise_mag="0.5" noise_scale="0.0" taper="0.0" repeat_z="1" /> 20 <tree name="Sea Sword" species_id="17" texture_id="5894e2e7-ab8d-edfa-e61c-18cf16854ba3" droop="0.0" twist="0.0" branches="6.0" depth="1" scale_step="0.7" trunk_depth="1" branch_length="0.0" trunk_length="0.0" leaf_scale="2.0" billboard_scale="2.0" billboard_ratio="1.0" trunk_aspect="1.0" branch_aspect="1.0" leaf_rotate="0.0" noise_mag="0.5" noise_scale="0.0" taper="0.0" repeat_z="1" />
21 <tree name="Kelp 1" species_id="18" texture_id="2caf1179-7861-6ff3-4b7d-46e17780bdfa" droop="-15.0" twist="0.0" branches="1.0" depth="1" scale_step="1.0" trunk_depth="3" branch_length="2.5" trunk_length="0.75" leaf_scale="1.85" billboard_scale="4.9" billboard_ratio="1.0" trunk_aspect="0.04" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.0" noise_scale="2.0" taper="0.8" repeat_z="2" /> 21 <tree name="Kelp (brown)" species_id="18" texture_id="2caf1179-7861-6ff3-4b7d-46e17780bdfa" droop="-15.0" twist="0.0" branches="1.0" depth="1" scale_step="1.0" trunk_depth="3" branch_length="2.5" trunk_length="0.75" leaf_scale="1.85" billboard_scale="4.9" billboard_ratio="1.0" trunk_aspect="0.04" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.0" noise_scale="2.0" taper="0.8" repeat_z="2" />
22 <tree name="Beach Grass 1" species_id="19" texture_id="18fb888b-e8f1-dce7-7da7-321d651ea6b0" droop="0.0" twist="0.0" branches="4.0" depth="1" scale_step="0.7" trunk_depth="1" branch_length="0.0" trunk_length="0.0" leaf_scale="4.0" billboard_scale="2.5" billboard_ratio="1.2" trunk_aspect="1.0" branch_aspect="1.0" leaf_rotate="0.0" noise_mag="0.5" noise_scale="0.0" taper="0.0" repeat_z="1" /> 22 <tree name="Beach Grass" species_id="19" texture_id="18fb888b-e8f1-dce7-7da7-321d651ea6b0" droop="0.0" twist="0.0" branches="4.0" depth="1" scale_step="0.7" trunk_depth="1" branch_length="0.0" trunk_length="0.0" leaf_scale="4.0" billboard_scale="2.5" billboard_ratio="1.2" trunk_aspect="1.0" branch_aspect="1.0" leaf_rotate="0.0" noise_mag="0.5" noise_scale="0.0" taper="0.0" repeat_z="1" />
23 <tree name="Kelp 2" species_id="20" texture_id="2a4880b6-b7a3-690a-2049-bfbe38eafb9f" droop="-15.0" twist="0.0" branches="1.0" depth="1" scale_step="1.0" trunk_depth="3" branch_length="2.5" trunk_length="1.35" leaf_scale="2.0" billboard_scale="4.9" billboard_ratio="1.0" trunk_aspect="0.025" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.0" noise_scale="2.0" taper="0.8" repeat_z="2" /> 23 <tree name="Kelp (green)" species_id="20" texture_id="2a4880b6-b7a3-690a-2049-bfbe38eafb9f" droop="-15.0" twist="0.0" branches="1.0" depth="1" scale_step="1.0" trunk_depth="3" branch_length="2.5" trunk_length="1.35" leaf_scale="2.0" billboard_scale="4.9" billboard_ratio="1.0" trunk_aspect="0.025" branch_aspect="0.05" leaf_rotate="0.0" noise_mag="1.0" noise_scale="2.0" taper="0.8" repeat_z="2" />
24</tree_defs> 24</tree_defs>
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
62JCFloaterAnimList::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
70JCFloaterAnimList::~JCFloaterAnimList()
71{
72}
73
74//static
75bool JCFloaterAnimList::visible(LLFloater* instance, const LLSD& key)
76{
77 return VisibilityPolicy<LLFloater>::visible(instance, key);
78}
79
80//static
81void JCFloaterAnimList::show(LLFloater* instance, const LLSD& key)
82{
83 VisibilityPolicy<LLFloater>::show(instance, key);
84}
85
86//static
87void JCFloaterAnimList::hide(LLFloater* instance, const LLSD& key)
88{
89 VisibilityPolicy<LLFloater>::hide(instance, key);
90}
91
92void JCFloaterAnimList::onVisibilityChange(BOOL new_visibility)
93{
94 if(!new_visibility) {
95 // *HACK: clean up memory on hiding
96 mObjectOwners.clear();
97 }
98}
99
100BOOL 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
115void 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
132void 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
164void JCFloaterAnimList::StopRevokeSelected(void *userdata )
165{
166 StopSelected(userdata);
167 RevokeSelected(userdata);
168}
169
170void 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
201void JCFloaterAnimList::draw()
202{
203 refresh();
204 LLFloater::draw();
205}
206//LLScrollListCtrl::getSelectedIDs();
207void 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
333void 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
344void 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
389const 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
441void 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
452void 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
36struct AObjectData
37{
38 std::string owner_name;
39 LLUUID owner_id;
40 LLUUID root_id;
41 bool in_object_list;
42};
43
44class JCFloaterAnimList : public LLFloater, public LLUISingleton<JCFloaterAnimList, JCFloaterAnimList>
45{
46public:
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
67private:
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//
234BOOL LLAgent::sDebugDisplayTarget = FALSE; 234BOOL LLAgent::sDebugDisplayTarget = FALSE;
235BOOL LLAgent::sPhantom = FALSE;
235 236
236const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; 237const 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?
758BOOL LLAgent::canFly() 759BOOL 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//-----------------------------------------------------------------------------
851void LLAgent::togglePhantom()
852{
853 BOOL phan = !(sPhantom);
854
855 setPhantom( phan );
856}
857
858
859//-----------------------------------------------------------------------------
860// setPhantom() lgg
861//-----------------------------------------------------------------------------
862void LLAgent::setPhantom(BOOL phantom)
863{
864 sPhantom = phantom;
865}
866
867
868//-----------------------------------------------------------------------------
869// getPhantom() lgg
870//-----------------------------------------------------------------------------
871BOOL LLAgent::getPhantom()
872{
873 return sPhantom;
874}
875
876
877//-----------------------------------------------------------------------------
838// setRegion() 878// setRegion()
839//----------------------------------------------------------------------------- 879//-----------------------------------------------------------------------------
840void LLAgent::setRegion(LLViewerRegion *regionp) 880void 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
5008void LLAgent::buildLocationString(std::string& str) 5055void 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
5890void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) 5945void 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
5954void LLAgent::teleportViaLocation(const LLVector3d& pos_global) 6018void 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
6032void LLAgent::stopCurrentAnimations() 6114void 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
7615void LLAgent::observeFriends() 7801void 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
70const U8 AGENT_STATE_TYPING = 0x04; // Typing indication 74const U8 AGENT_STATE_TYPING = 0x04; // Typing indication
71const U8 AGENT_STATE_EDITING = 0x10; // Set when agent has objects selected 75const 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 4ab5d8d..ab4d8a9 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -248,7 +248,6 @@ BOOL gDisconnected = FALSE;
248 248
249// Map scale in pixels per region 249// Map scale in pixels per region
250F32 gMapScale = 128.f; 250F32 gMapScale = 128.f;
251F32 gMiniMapScale = 128.f;
252 251
253// used to restore texture state after a mode switch 252// used to restore texture state after a mode switch
254LLFrameTimer gRestoreGLTimer; 253LLFrameTimer gRestoreGLTimer;
@@ -392,6 +391,7 @@ static void settings_to_globals()
392 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); 391 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay"));
393 LLToolBar::sInventoryAutoOpenTime = gSavedSettings.getF32("InventoryAutoOpenDelay"); 392 LLToolBar::sInventoryAutoOpenTime = gSavedSettings.getF32("InventoryAutoOpenDelay");
394 LLSelectMgr::sRectSelectInclusive = gSavedSettings.getBOOL("RectangleSelectInclusive"); 393 LLSelectMgr::sRectSelectInclusive = gSavedSettings.getBOOL("RectangleSelectInclusive");
394 LLSelectMgr::sRenderSelectionHighlights = gSavedSettings.getBOOL("RenderHighlightSelections");
395 LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections"); 395 LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections");
396 LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); 396 LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
397 397
@@ -405,7 +405,6 @@ static void settings_to_globals()
405 gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun"); 405 gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun");
406 gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); 406 gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
407 gMapScale = gSavedSettings.getF32("MapScale"); 407 gMapScale = gSavedSettings.getF32("MapScale");
408 gMiniMapScale = gSavedSettings.getF32("MiniMapScale");
409 LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); 408 LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips");
410 409
411 LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); 410 LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
@@ -2180,7 +2179,6 @@ void LLAppViewer::cleanupSavedSettings()
2180 } 2179 }
2181 2180
2182 gSavedSettings.setF32("MapScale", gMapScale ); 2181 gSavedSettings.setF32("MapScale", gMapScale );
2183 gSavedSettings.setF32("MiniMapScale", gMiniMapScale );
2184 gSavedSettings.setBOOL("ShowHoverTips", LLHoverView::sShowHoverTips); 2182 gSavedSettings.setBOOL("ShowHoverTips", LLHoverView::sShowHoverTips);
2185 2183
2186 // Some things are cached in LLAgent. 2184 // Some things are cached in LLAgent.
@@ -3128,7 +3126,12 @@ void LLAppViewer::idle()
3128 { 3126 {
3129 // Send avatar and camera info 3127 // Send avatar and camera info
3130 last_control_flags = gAgent.getControlFlags(); 3128 last_control_flags = gAgent.getControlFlags();
3131 send_agent_update(TRUE); 3129
3130 if(!gAgent.getPhantom())
3131 {
3132 send_agent_update(TRUE);
3133 }
3134
3132 agent_update_timer.reset(); 3135 agent_update_timer.reset();
3133 } 3136 }
3134 } 3137 }
@@ -3831,4 +3834,21 @@ void LLAppViewer::handleLoginComplete()
3831 gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState(); 3834 gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState();
3832 } 3835 }
3833 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]
3834} 3854}
diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h
index 9583982..3be5de7 100644
--- a/linden/indra/newview/llappviewer.h
+++ b/linden/indra/newview/llappviewer.h
@@ -294,7 +294,6 @@ extern BOOL gDisconnected;
294 294
295// Map scale in pixels per region 295// Map scale in pixels per region
296extern F32 gMapScale; 296extern F32 gMapScale;
297extern F32 gMiniMapScale;
298 297
299extern LLFrameTimer gRestoreGLTimer; 298extern LLFrameTimer gRestoreGLTimer;
300extern BOOL gRestoreGL; 299extern BOOL gRestoreGL;
diff --git a/linden/indra/newview/llcallingcard.cpp b/linden/indra/newview/llcallingcard.cpp
index b7fd3b0..1d353fa 100644
--- a/linden/indra/newview/llcallingcard.cpp
+++ b/linden/indra/newview/llcallingcard.cpp
@@ -625,7 +625,7 @@ void LLAvatarTracker::processChangeUserRights(LLMessageSystem* msg, void**)
625void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) 625void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
626{ 626{
627 S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock); 627 S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock);
628 BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification"); 628 BOOL notify = gSavedSettings.getBOOL("ChatOnlineNotification");
629 629
630 lldebugs << "Received " << count << " online notifications **** " << llendl; 630 lldebugs << "Received " << count << " online notifications **** " << llendl;
631 if(count > 0) 631 if(count > 0)
@@ -637,7 +637,6 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
637 { 637 {
638 tracking_id = mTrackingData->mAvatarID; 638 tracking_id = mTrackingData->mAvatarID;
639 } 639 }
640 BOOL notify = FALSE;
641 LLStringUtil::format_map_t args; 640 LLStringUtil::format_map_t args;
642 for(S32 i = 0; i < count; ++i) 641 for(S32 i = 0; i < count; ++i)
643 { 642 {
@@ -646,14 +645,16 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
646 if(info) 645 if(info)
647 { 646 {
648 setBuddyOnline(agent_id,online); 647 setBuddyOnline(agent_id,online);
649 if(chat_notify) 648
649 std::string first, last;
650 if(gCacheName->getName(agent_id, first, last))
650 { 651 {
651 std::string first, last; 652 args["[FIRST]"] = first;
652 if(gCacheName->getName(agent_id, first, last)) 653 args["[LAST]"] = last;
654 if(notify)
653 { 655 {
654 notify = TRUE; 656 // Popup a notify box with online status of this agent
655 args["[FIRST]"] = first; 657 LLNotifyBox::showXml(online ? "FriendOnline" : "FriendOffline", args);
656 args["[LAST]"] = last;
657 } 658 }
658 } 659 }
659 } 660 }
@@ -671,20 +672,16 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
671 // *TODO: get actual inventory id 672 // *TODO: get actual inventory id
672 gInventory.addChangedMask(LLInventoryObserver::CALLING_CARD, LLUUID::null); 673 gInventory.addChangedMask(LLInventoryObserver::CALLING_CARD, LLUUID::null);
673 } 674 }
674 if(notify)
675 {
676 // Popup a notify box with online status of this agent
677 LLNotifyBox::showXml(online ? "FriendOnline" : "FriendOffline", args);
678 675
679 // If there's an open IM session with this agent, send a notification there too. 676 // If there's an open IM session with this agent, send a notification there too
680 LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); 677 // even if ChatOnlineNotification is false.
681 LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id); 678 LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);
682 if (floater) 679 LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id);
683 { 680 if (floater)
684 LLUIString notifyMsg = LLNotifyBox::getTemplateMessage((online ? "FriendOnline" : "FriendOffline"),args); 681 {
685 if (!notifyMsg.empty()) 682 LLUIString notifyMsg = LLNotifyBox::getTemplateMessage((online ? "FriendOnline" : "FriendOffline"),args);
686 floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor")); 683 if (!notifyMsg.empty())
687 } 684 floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor"));
688 } 685 }
689 686
690 mModifyMask |= LLFriendObserver::ONLINE; 687 mModifyMask |= LLFriendObserver::ONLINE;
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
80void toggleChatHistory(void* user_data); 81void toggleChatHistory(void* user_data);
81void 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
84void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
85// [/RLVa:KB]
82 86
83 87
84class LLChatBarGestureObserver : public LLGestureManagerObserver 88class LLChatBarGestureObserver : public LLGestureManagerObserver
@@ -98,6 +102,7 @@ private:
98 102
99LLChatBar::LLChatBar() 103LLChatBar::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
440void 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,
575void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) 615void 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
624void 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
682void 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
96protected: 98protected:
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
115private:
116 BOOL mChannelControl;
112}; 117};
113 118
114extern LLChatBar *gChatBar; 119extern LLChatBar *gChatBar;
diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp
index caf79eb..954a274 100644
--- a/linden/indra/newview/llfilepicker.cpp
+++ b/linden/indra/newview/llfilepicker.cpp
@@ -998,6 +998,12 @@ GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder, std::stri
998 (GTK_FILE_CHOOSER(win), 998 (GTK_FILE_CHOOSER(win),
999 this_path->second.c_str()); 999 this_path->second.c_str());
1000 } 1000 }
1001 else if (getenv("HOME"))
1002 {
1003 gtk_file_chooser_set_current_folder
1004 (GTK_FILE_CHOOSER(win),
1005 getenv("HOME"));
1006 }
1001 1007
1002# if LL_X11 1008# if LL_X11
1003 // Make GTK tell the window manager to associate this 1009 // Make GTK tell the window manager to associate this
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp
index ee7053d..b807b17 100644
--- a/linden/indra/newview/llfirstuse.cpp
+++ b/linden/indra/newview/llfirstuse.cpp
@@ -131,6 +131,17 @@ void LLFirstUse::useMap()
131} 131}
132 132
133// static 133// static
134void LLFirstUse::useMiniMap()
135{
136 if (gSavedSettings.getWarning("FirstMiniMap"))
137 {
138 gSavedSettings.setWarning("FirstMiniMap", FALSE);
139
140 LLNotifyBox::showXml("FirstMiniMap");
141 }
142}
143
144// static
134void LLFirstUse::useGoTo() 145void LLFirstUse::useGoTo()
135{ 146{
136 // nothing for now JC 147 // nothing for now JC
diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h
index eef0537..cbb31ab 100644
--- a/linden/indra/newview/llfirstuse.h
+++ b/linden/indra/newview/llfirstuse.h
@@ -92,6 +92,7 @@ public:
92 static void useBalanceDecrease(S32 delta); 92 static void useBalanceDecrease(S32 delta);
93 static void useSit(); 93 static void useSit();
94 static void useMap(); 94 static void useMap();
95 static void useMiniMap();
95 static void useGoTo(); 96 static void useGoTo();
96 static void useBuild(); 97 static void useBuild();
97 static void useLeftClickNoHit(); 98 static void useLeftClickNoHit();
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
711void LLPanelActiveSpeakers::onClickProfile(void* user_data) 716void 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
720void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data) 732void 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
22extern LLInventoryModel gInventory;
23
24// Statics
25LLFloaterAssetBrowser* LLFloaterAssetBrowser::sInstance = NULL;
26
27LLFloaterAssetBrowser::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
51void LLFloaterAssetBrowser::show(void*)
52{
53 if (!sInstance)
54 sInstance = new LLFloaterAssetBrowser();
55
56 sInstance->open();
57}
58
59// virtual
60LLFloaterAssetBrowser::~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
74void 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
104void 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
161BOOL 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
220BOOL 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
241BOOL 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
252BOOL 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
269void 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
415void 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
426void LLFloaterAssetBrowser::clearNoAssetsText()
427{
428 if(mTextureAssets.size() > 0)
429 {
430 delete mNoAssetsLabel;
431 mNoAssetsLabel = NULL;
432 }
433}
434
435// static
436void 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
445void 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
454void 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
15class LLInventoryPanel;
16
17struct 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
30class LLFloaterAssetBrowser : public LLFloater
31{
32public:
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
47private:
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
59protected:
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
79static const S32 HPAD = 4;
80static const S32 BORDER_PAD = HPAD;
81static const U32 ITEMS_PER_PAGE = 16;
82static 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
41LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) 44LLFloaterBeacons::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.
73void LLFloaterBeacons::open() 76void 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 8e9d489..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
191void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LLColor4& color) 192void 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
238void 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
227void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) 265void 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)
@@ -386,7 +472,7 @@ void LLFloaterChat::addChat(const LLChat& chat,
386 size = INSTANT_MSG_SIZE; 472 size = INSTANT_MSG_SIZE;
387 } 473 }
388 // We display anything if it's not an IM. If it's an IM, check pref... 474 // We display anything if it's not an IM. If it's an IM, check pref...
389 if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatHistory") ) 475 if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") )
390 { 476 {
391 gConsole->addLine(chat.mText, size, text_color); 477 gConsole->addLine(chat.mText, size, text_color);
392 } 478 }
@@ -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
45LLFloaterInspect* LLFloaterInspect::sInstance = NULL; 49LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
46 50
47LLFloaterInspect::LLFloaterInspect(void) : 51LLFloaterInspect::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(&timestamp), MAX_STRING); 236 LLStringUtil::copy(time, ctime(&timestamp), 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
814void LLPanelLandGeneral::onClickBuyLand(void* data) 814void 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)
2790void 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
85protected: 89protected:
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 6115404..3be891e 100644
--- a/linden/indra/newview/llfloatermap.cpp
+++ b/linden/indra/newview/llfloatermap.cpp
@@ -42,14 +42,40 @@
42#include "llresizebar.h" 42#include "llresizebar.h"
43#include "lluictrlfactory.h" 43#include "lluictrlfactory.h"
44 44
45// radar
46#include "llfirstuse.h"
47#include "llfloateravatarinfo.h"
48#include "llfloaterfriends.h"
49#include "llfloatergroupinvite.h"
50#include "llfloatergroups.h"
51#include "llfloaterreporter.h"
52#include "llimview.h"
53#include "llmutelist.h"
54#include "llparcel.h"
55#include "llregionposition.h"
56#include "roles_constants.h"
57#include "llscrolllistctrl.h"
58#include "lltracker.h"
59#include "llviewerobjectlist.h"
60#include "llviewermenu.h"
61#include "llviewermessage.h"
62#include "llviewerparcelmgr.h"
63#include "llviewerregion.h"
64#include "llviewerwindow.h"
65#include "llvoavatar.h"
66#include "llworld.h"
67
45LLFloaterMap::LLFloaterMap(const LLSD& key) 68LLFloaterMap::LLFloaterMap(const LLSD& key)
46 : 69 :
47 LLFloater(std::string("minimap")), 70 LLFloater(std::string("minimap")),
48 mPanelMap(NULL) 71 mPanelMap(NULL),
72 mUpdate(TRUE)
49{ 73{
50 LLCallbackMap::map_t factory_map; 74 LLCallbackMap::map_t factory_map;
51 factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); 75 factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this);
52 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); 76 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE);
77
78 mSelectedAvatar.setNull();
53} 79}
54 80
55 81
@@ -67,6 +93,30 @@ BOOL LLFloaterMap::postBuild()
67 sendChildToBack(getDragHandle()); 93 sendChildToBack(getDragHandle());
68 sendChildToFront(getChild<LLButton>("llfloater_close_btn")); 94 sendChildToFront(getChild<LLButton>("llfloater_close_btn"));
69 setIsChrome(TRUE); 95 setIsChrome(TRUE);
96
97 mRadarList = getChild<LLScrollListCtrl>("RadarList");
98 childSetCommitCallback("RadarList", onList, this);
99 mRadarList->setDoubleClickCallback(onClickIM);
100
101 childSetFocusChangedCallback("near_me_range", onRangeChange, this);
102
103 childSetAction("im_btn", onClickIM, this);
104 childSetAction("profile_btn", onClickProfile, this);
105 childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
106 childSetAction("track_btn", onClickTrack, this);
107 childSetAction("invite_btn", onClickInvite, this);
108 childSetAction("add_btn", onClickAddFriend, this);
109 childSetAction("freeze_btn", onClickFreeze, this);
110 childSetAction("eject_btn", onClickEject, this);
111 childSetAction("mute_btn", onClickMute, this);
112 childSetAction("unmute_btn", onClickUnmute, this);
113 childSetAction("ar_btn", onClickAR, this);
114 childSetAction("estate_eject_btn", onClickEjectFromEstate, this);
115
116 setDefaultBtn("im_btn");
117
118 populateRadar();
119
70 return TRUE; 120 return TRUE;
71} 121}
72 122
@@ -122,3 +172,597 @@ void LLFloaterMap::draw()
122 } 172 }
123} 173}
124 174
175// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c)
176void LLFloaterMap::open()
177{
178 if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP))
179 {
180 LLFloater::open();
181 LLFirstUse::useMiniMap();
182 }
183}
184// [/RLVa:KB]
185
186// TODO: make this detachable
187// TODO: make this expand/collapse
188
189/*
190* Imprudence Radar
191* @brief inworld radar integrated with the minimap
192* by McCabe Maxsted
193* Estate tab portion by Dale Glass
194*/
195
196//static
197void LLFloaterMap::updateRadar()
198{
199 LLFloaterMap::getInstance()->populateRadar();
200}
201
202void LLFloaterMap::populateRadar()
203{
204 if (!mUpdate || !LLFloaterMap::getInstance()->getVisible())
205 {
206 return;
207 }
208
209 if (visibleItemsSelected())
210 {
211 mSelectedAvatar = mRadarList->getFirstSelected()->getUUID();
212 }
213 else
214 {
215 mSelectedAvatar.setNull();
216 }
217
218 S32 scroll_pos = mRadarList->getScrollPos();
219
220 LLVector3d current_pos = gAgent.getPositionGlobal();
221
222 // find what avatars you can see
223 std::vector<LLUUID> avatar_ids;
224 std::vector<LLVector3d> positions;
225 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, current_pos, gSavedSettings.getF32("NearMeRange"));
226
227 LLSD element;
228
229 mRadarList->deleteAllItems();
230
231 for (U32 i=0; i<avatar_ids.size(); i++)
232 {
233 if (avatar_ids[i] == gAgent.getID() ||
234 avatar_ids[i].isNull())
235 {
236 continue;
237 }
238
239 // Add to list only if we get their name
240 std::string fullname = getSelectedName(avatar_ids[i]);
241 if (!fullname.empty())
242 {
243 std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : "";
244 element["id"] = avatar_ids[i];
245 element["columns"][0]["column"] = "avatar_name";
246 element["columns"][0]["type"] = "text";
247 element["columns"][0]["value"] = fullname + " " + mute_text;
248 element["columns"][1]["column"] = "avatar_distance";
249 element["columns"][1]["type"] = "text";
250
251 LLVector3d temp = positions[i] - current_pos;
252 F32 distance = (F32)temp.magVec();
253 char dist[32];
254 snprintf(dist, sizeof(dist), "%.1f", distance);
255 element["columns"][1]["value"] = strcat(dist,"m");
256
257 mRadarList->addElement(element, ADD_BOTTOM);
258 }
259 }
260
261 mRadarList->sortItems();
262 mRadarList->setScrollPos(scroll_pos);
263 if (mSelectedAvatar.notNull())
264 {
265 mRadarList->selectByID(mSelectedAvatar);
266 }
267
268 // set count
269 std::stringstream avatar_count;
270 avatar_count.str("");
271 if (avatar_ids.empty())
272 {
273 mRadarList->addCommentText(getString("no_one_near"), ADD_TOP);
274 avatar_count << "0";
275 }
276 else
277 {
278 avatar_count << (int)avatar_ids.size();
279 }
280 childSetText("lblAvatarCount", avatar_count.str());
281
282 toggleButtons();
283
284 //llinfos << "mSelectedAvatar: " << mSelectedAvatar.asString() << llendl;
285}
286
287void LLFloaterMap::toggleButtons()
288{
289 BOOL enable = FALSE;
290 BOOL enable_unmute = FALSE;
291 BOOL enable_track = FALSE;
292 BOOL enable_estate = FALSE;
293 if (childHasFocus("RadarPanel"))
294 {
295 enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE;
296 enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE;
297 enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar);
298 enable_estate = getKickable(mSelectedAvatar);
299 }
300 else
301 {
302 mRadarList->deselect();
303 }
304
305 childSetEnabled("im_btn", enable);
306 childSetEnabled("profile_btn", enable);
307 childSetEnabled("offer_teleport_btn", enable);
308 childSetEnabled("track_btn", enable_track);
309 childSetEnabled("invite_btn", enable);
310 childSetEnabled("add_btn", enable);
311 childSetEnabled("freeze_btn", enable_estate);
312 childSetEnabled("eject_btn", enable_estate);
313 childSetEnabled("mute_btn", enable);
314 childSetEnabled("unmute_btn", enable_unmute);
315 childSetEnabled("ar_btn", enable);
316 childSetEnabled("estate_eject_btn", enable_estate);
317}
318
319BOOL LLFloaterMap::getKickable(const LLUUID &agent_id)
320{
321 if (agent_id.notNull())
322 {
323 LLViewerObject* av_obj = gObjectList.findObject(agent_id);
324 if (av_obj != NULL && av_obj->isAvatar())
325 {
326 LLVOAvatar* avatar = (LLVOAvatar*)av_obj;
327 LLViewerRegion* region = avatar->getRegion();
328 if (region)
329 {
330 const LLVector3& pos = avatar->getPositionRegion();
331 const LLVector3d& pos_global = avatar->getPositionGlobal();
332 if (LLWorld::getInstance()->positionRegionValidGlobal(pos_global))
333 {
334 LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel();
335
336 BOOL new_value = (region != NULL);
337
338 if (new_value)
339 {
340 new_value = region->isOwnedSelf(pos);
341 if (!new_value || region->isOwnedGroup(pos))
342 {
343 new_value = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN);
344 }
345 }
346 return new_value;
347 }
348 }
349 }
350 }
351 return FALSE;
352}
353
354// static
355void LLFloaterMap::onList(LLUICtrl* ctrl, void* user_data)
356{
357 LLFloaterMap* self = (LLFloaterMap*)user_data;
358 if (self)
359 {
360 self->toggleButtons();
361 }
362}
363
364BOOL LLFloaterMap::visibleItemsSelected() const
365{
366 if (mRadarList->getFirstSelectedIndex() >= 0)
367 {
368 return TRUE;
369 }
370 return FALSE;
371}
372
373// static
374void LLFloaterMap::onRangeChange(LLFocusableElement* focus, void* user_data)
375{
376 LLFloaterMap* self = (LLFloaterMap*)user_data;
377 if (self)
378 {
379 self->mUpdate = !(self->childHasFocus("near_me_range"));
380 }
381}
382
383// static
384LLUUID LLFloaterMap::getSelected()
385{
386 return LLFloaterMap::getInstance()->mSelectedAvatar;
387}
388
389//
390// Avatar tab
391//
392
393// static
394void LLFloaterMap::onClickIM(void* user_data)
395{
396 LLFloaterMap* self = (LLFloaterMap*) user_data;
397 LLScrollListItem *item = self->mRadarList->getFirstSelected();
398 if (item != NULL)
399 {
400 LLUUID agent_id = item->getUUID();
401 gIMMgr->setFloaterOpen(TRUE);
402 gIMMgr->addSession(getSelectedName(agent_id), IM_NOTHING_SPECIAL, agent_id);
403 }
404}
405
406// static
407void LLFloaterMap::onClickProfile(void* user_data)
408{
409 LLFloaterMap* self = (LLFloaterMap*) user_data;
410 LLScrollListItem *item = self->mRadarList->getFirstSelected();
411 if (item != NULL)
412 {
413 LLUUID agent_id = item->getUUID();
414 LLFloaterAvatarInfo::show(agent_id);
415 }
416}
417
418// static
419void LLFloaterMap::onClickOfferTeleport(void* user_data)
420{
421 LLFloaterMap* self = (LLFloaterMap*) user_data;
422 LLScrollListItem *item = self->mRadarList->getFirstSelected();
423 if (item != NULL)
424 {
425 LLUUID agent_id = item->getUUID();
426 handle_lure(agent_id);
427 }
428}
429
430// static
431void LLFloaterMap::onClickTrack(void* user_data)
432{
433 LLFloaterMap* self = (LLFloaterMap*) user_data;
434 LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
435
436 if (LLTracker::TRACKING_AVATAR == tracking_status)
437 {
438 LLTracker::stopTracking(NULL);
439 }
440 else
441 {
442 LLScrollListItem *item = self->mRadarList->getFirstSelected();
443 if (item != NULL)
444 {
445 LLUUID agent_id = item->getUUID();
446 LLTracker::trackAvatar(agent_id, getSelectedName(agent_id));
447 }
448 }
449}
450
451// static
452void LLFloaterMap::onClickInvite(void* user_data)
453{
454 LLFloaterMap* self = (LLFloaterMap*) user_data;
455 LLScrollListItem *item = self->mRadarList->getFirstSelected();
456 if (item != NULL)
457 {
458 LLUUID agent_id = item->getUUID();
459 LLFloaterGroupPicker* widget;
460 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
461 if (widget)
462 {
463 widget->center();
464 widget->setPowersMask(GP_MEMBER_INVITE);
465 widget->setSelectCallback(callback_invite_to_group, (void *)&agent_id);
466 }
467 }
468}
469
470// static
471void LLFloaterMap::callback_invite_to_group(LLUUID group_id, void *user_data)
472{
473 std::vector<LLUUID> agent_ids;
474 agent_ids.push_back(*(LLUUID *)user_data);
475
476 LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
477}
478
479// static
480void LLFloaterMap::onClickAddFriend(void* user_data)
481{
482 LLFloaterMap* self = (LLFloaterMap*) user_data;
483 LLScrollListItem *item = self->mRadarList->getFirstSelected();
484 if (item != NULL)
485 {
486 LLUUID agent_id = item->getUUID();
487 LLPanelFriends::requestFriendshipDialog(agent_id, getSelectedName(agent_id));
488 }
489}
490
491//
492// Estate tab
493//
494
495//static
496std::string LLFloaterMap::getSelectedName(const LLUUID &agent_id)
497{
498 std::string agent_name;
499 if(gCacheName->getFullName(agent_id, agent_name) && agent_name != " ")
500 {
501 return agent_name;
502 }
503 return LLStringUtil::null;
504}
505
506//static
507void LLFloaterMap::callbackFreeze(S32 option, void *user_data)
508{
509 LLFloaterMap *self = (LLFloaterMap*)user_data;
510
511 if ( option == 0 )
512 {
513 sendFreeze(self->mSelectedAvatar, true);
514 }
515 else if ( option == 1 )
516 {
517 sendFreeze(self->mSelectedAvatar, false);
518 }
519}
520
521//static
522void LLFloaterMap::callbackEject(S32 option, void *user_data)
523{
524 LLFloaterMap *self = (LLFloaterMap*)user_data;
525
526 if ( option == 0 )
527 {
528 sendEject(self->mSelectedAvatar, false);
529 }
530 else if ( option == 1 )
531 {
532 sendEject(self->mSelectedAvatar, true);
533 }
534}
535
536//static
537void LLFloaterMap::callbackEjectFromEstate(S32 option, void *user_data)
538{
539 LLFloaterMap *self = (LLFloaterMap*)user_data;
540
541 if ( option == 0 )
542 {
543 cmdEstateEject(self->mSelectedAvatar);
544 }
545 else if ( option == 1 )
546 {
547 cmdEstateBan(self->mSelectedAvatar);
548 }
549}
550
551void LLFloaterMap::onClickFreeze(void *user_data)
552{
553 LLFloaterMap *self = (LLFloaterMap*)user_data;
554 LLStringUtil::format_map_t args;
555 LLSD payload;
556 args["[AVATAR_NAME]"] = getSelectedName(self->mSelectedAvatar);
557 gViewerWindow->alertXml("FreezeAvatarFullname", args, callbackFreeze, user_data);
558}
559
560//static
561void LLFloaterMap::onClickEject(void *user_data)
562{
563 LLFloaterMap *self = (LLFloaterMap*)user_data;
564 LLStringUtil::format_map_t args;
565 LLSD payload;
566 args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar);
567 gViewerWindow->alertXml("EjectAvatarFullName", args, callbackEject, user_data);
568}
569
570//static
571void LLFloaterMap::onClickMute(void *user_data)
572{
573 LLFloaterMap *self = (LLFloaterMap*)user_data;
574 LLScrollListItem *item = self->mRadarList->getFirstSelected();
575 if (item != NULL)
576 {
577 LLUUID agent_id = item->getUUID();
578 std::string agent_name = getSelectedName(agent_id);
579 if (LLMuteList::getInstance()->isMuted(agent_id))
580 {
581 //LLMute mute(agent_id, agent_name, LLMute::AGENT);
582 //LLMuteList::getInstance()->remove(mute);
583 //LLFloaterMute::getInstance()->selectMute(agent_id);
584 }
585 else
586 {
587 LLMute mute(agent_id, agent_name, LLMute::AGENT);
588 LLMuteList::getInstance()->add(mute);
589 }
590 }
591}
592
593//static
594void LLFloaterMap::onClickUnmute(void *user_data)
595{
596 LLFloaterMap *self = (LLFloaterMap*)user_data;
597 LLScrollListItem *item = self->mRadarList->getFirstSelected();
598 if (item != NULL)
599 {
600 LLUUID agent_id = item->getUUID();
601 std::string agent_name = getSelectedName(agent_id);
602 if (LLMuteList::getInstance()->isMuted(agent_id))
603 {
604 LLMute mute(agent_id, agent_name, LLMute::AGENT);
605 LLMuteList::getInstance()->remove(mute);
606 //LLFloaterMute::getInstance()->selectMute(agent_id);
607 }
608 else
609 {
610 //LLMute mute(agent_id, agent_name, LLMute::AGENT);
611 //LLMuteList::getInstance()->add(mute);
612 }
613 }
614}
615
616//static
617void LLFloaterMap::onClickEjectFromEstate(void *user_data)
618{
619 LLFloaterMap *self = (LLFloaterMap*)user_data;
620 LLStringUtil::format_map_t args;
621 LLSD payload;
622 args["EVIL_USER"] = getSelectedName(self->mSelectedAvatar);
623 gViewerWindow->alertXml("EstateKickUser", args, callbackEjectFromEstate, user_data);
624}
625
626//static
627void LLFloaterMap::onClickAR(void *user_data)
628{
629 LLFloaterMap *self = (LLFloaterMap*)user_data;
630 LLUUID agent_id = self->mSelectedAvatar;
631
632 if (agent_id.notNull())
633 {
634 LLFloaterReporter::showFromObject(agent_id);
635 }
636}
637
638// static
639void LLFloaterMap::cmdEstateEject(const LLUUID &avatar)
640{
641 sendEstateMessage("teleporthomeuser", avatar);
642}
643
644// static
645void LLFloaterMap::cmdEstateBan(const LLUUID &avatar)
646{
647 sendEstateMessage("teleporthomeuser", avatar); // Kick first, just to be sure
648 sendEstateBan(avatar);
649}
650
651// static
652void LLFloaterMap::sendFreeze(const LLUUID& avatar_id, bool freeze)
653{
654 U32 flags = 0x0;
655 if (!freeze)
656 {
657 // unfreeze
658 flags |= 0x1;
659 }
660
661 LLMessageSystem* msg = gMessageSystem;
662 LLViewerObject* avatar = gObjectList.findObject(avatar_id);
663
664 if (avatar)
665 {
666 msg->newMessage("FreezeUser");
667 msg->nextBlock("AgentData");
668 msg->addUUID("AgentID", gAgent.getID());
669 msg->addUUID("SessionID", gAgent.getSessionID());
670 msg->nextBlock("Data");
671 msg->addUUID("TargetID", avatar_id );
672 msg->addU32("Flags", flags );
673 msg->sendReliable( avatar->getRegion()->getHost() );
674 }
675}
676
677// static
678void LLFloaterMap::sendEject(const LLUUID& avatar_id, bool ban)
679{
680 LLMessageSystem* msg = gMessageSystem;
681 LLViewerObject* avatar = gObjectList.findObject(avatar_id);
682
683 if (avatar)
684 {
685 U32 flags = 0x0;
686 if ( ban )
687 {
688 // eject and add to ban list
689 flags |= 0x1;
690 }
691
692 msg->newMessage("EjectUser");
693 msg->nextBlock("AgentData");
694 msg->addUUID("AgentID", gAgent.getID() );
695 msg->addUUID("SessionID", gAgent.getSessionID() );
696 msg->nextBlock("Data");
697 msg->addUUID("TargetID", avatar_id );
698 msg->addU32("Flags", flags );
699 msg->sendReliable( avatar->getRegion()->getHost() );
700 }
701}
702
703// static
704void LLFloaterMap::sendEstateMessage(const char* request, const LLUUID &target)
705{
706
707 LLMessageSystem* msg = gMessageSystem;
708 LLUUID invoice;
709
710 // This seems to provide an ID so that the sim can say which request it's
711 // replying to. I think this can be ignored for now.
712 invoice.generate();
713
714 llinfos << "Sending estate request '" << request << "'" << llendl;
715 msg->newMessage("EstateOwnerMessage");
716 msg->nextBlockFast(_PREHASH_AgentData);
717 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
718 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
719 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
720 msg->nextBlock("MethodData");
721 msg->addString("Method", request);
722 msg->addUUID("Invoice", invoice);
723
724 // Agent id
725 msg->nextBlock("ParamList");
726 msg->addString("Parameter", gAgent.getID().asString().c_str());
727
728 // Target
729 msg->nextBlock("ParamList");
730 msg->addString("Parameter", target.asString().c_str());
731
732 msg->sendReliable(gAgent.getRegion()->getHost());
733}
734
735// static
736void LLFloaterMap::sendEstateBan(const LLUUID& agent)
737{
738 LLUUID invoice;
739 U32 flags = ESTATE_ACCESS_BANNED_AGENT_ADD;
740
741 invoice.generate();
742
743 LLMessageSystem* msg = gMessageSystem;
744 msg->newMessage("EstateOwnerMessage");
745 msg->nextBlockFast(_PREHASH_AgentData);
746 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
747 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
748 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
749
750 msg->nextBlock("MethodData");
751 msg->addString("Method", "estateaccessdelta");
752 msg->addUUID("Invoice", invoice);
753
754 char buf[MAX_STRING]; /* Flawfinder: ignore*/
755 gAgent.getID().toString(buf);
756 msg->nextBlock("ParamList");
757 msg->addString("Parameter", buf);
758
759 snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore */
760 msg->nextBlock("ParamList");
761 msg->addString("Parameter", buf);
762
763 agent.toString(buf);
764 msg->nextBlock("ParamList");
765 msg->addString("Parameter", buf);
766
767 gAgent.sendReliableMessage();
768}
diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h
index dd1cba8..81e4159 100644
--- a/linden/indra/newview/llfloatermap.h
+++ b/linden/indra/newview/llfloatermap.h
@@ -33,6 +33,7 @@
33#define LL_LLFLOATERMAP_H 33#define LL_LLFLOATERMAP_H
34 34
35#include "llfloater.h" 35#include "llfloater.h"
36#include "llscrolllistctrl.h"
36 37
37class LLNetMap; 38class LLNetMap;
38 39
@@ -46,16 +47,62 @@ public:
46 47
47 static void* createPanelMiniMap(void* data); 48 static void* createPanelMiniMap(void* data);
48 49
50 static void updateRadar();
51 static LLUUID getSelected();
52
49 BOOL postBuild(); 53 BOOL postBuild();
50 54
51 /*virtual*/ void draw(); 55 /*virtual*/ void draw();
52 /*virtual*/ void onOpen(); 56 /*virtual*/ void onOpen();
53 /*virtual*/ void onClose(bool app_quitting); 57 /*virtual*/ void onClose(bool app_quitting);
54 /*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
55 63
56private: 64private:
57 LLFloaterMap(const LLSD& key = LLSD()); 65 LLFloaterMap(const LLSD& key = LLSD());
58 LLNetMap* mPanelMap; 66
67 LLNetMap* mPanelMap;
68 LLScrollListCtrl* mRadarList;
69 LLUUID mSelectedAvatar;
70 bool mUpdate;
71
72 static void onList(LLUICtrl* ctrl, void* user_data);
73 static void onRangeChange(LLFocusableElement* focus, void* user_data);
74 BOOL visibleItemsSelected() const;
75 BOOL getKickable(const LLUUID &agent_id);
76 void toggleButtons();
77 void populateRadar();
78
79 static void onClickProfile(void* user_data);
80 static void onClickIM(void* user_data);
81 static void onClickAddFriend(void* user_data);
82 static void onClickOfferTeleport(void* user_data);
83 static void onClickTrack(void* user_data);
84 static void onClickInvite(void* user_data);
85 static void callback_invite_to_group(LLUUID group_id, void *user_data);
86
87 static std::string getSelectedName(const LLUUID &agent_id);
88 static void onClickFreeze(void *user_data);
89 static void onClickEject(void *user_data);
90 static void onClickMute(void *user_data);
91 static void onClickUnmute(void *user_data);
92 static void onClickAR(void *user_data);
93 static void onClickEjectFromEstate(void *user_data);
94
95 static void callbackFreeze(S32 option, void *user_data);
96 static void callbackEject(S32 option, void *user_data);
97 static void callbackAR(void *user_data);
98 static void callbackEjectFromEstate(S32 option, void *user_data);
99
100 static void sendFreeze(const LLUUID &avatar, bool);
101 static void sendEject(const LLUUID &avatar, bool);
102 static void cmdEstateEject(const LLUUID &avatar);
103 static void cmdEstateBan(const LLUUID &avatar);
104 static void sendEstateBan(const LLUUID& agent);
105 static void sendEstateMessage(const char* request, const LLUUID &target);
59}; 106};
60 107
61#endif // LL_LLFLOATERMAP_H 108#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
51class LLFloaterObjectIMInfo : public LLFloater, public LLFloaterSingleton<LLFloaterObjectIMInfo>
52{
53public:
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
68private:
69 LLUUID mObjectID;
70 std::string mObjectName;
71 std::string mSlurl;
72 LLUUID mOwnerID;
73 std::string mOwnerName;
74 bool mOwnerIsGroup;
75};
76
77LLFloaterObjectIMInfo::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
89BOOL 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
98void 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
123void 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
133void 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
147void 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
159void 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
173void 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
181class LLObjectIMInfoHandler : public LLCommandHandler
182{
183public:
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.
190LLObjectIMInfoHandler 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
193bool 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
35namespace 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)
207void LLFloaterOpenObject::onClickMoveAndWear(void* data) 207void 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)
3197void 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 7e9632d..0d3b101 100644
--- a/linden/indra/newview/llfloaterreporter.cpp
+++ b/linden/indra/newview/llfloaterreporter.cpp
@@ -64,7 +64,6 @@
64#include "llviewerregion.h" 64#include "llviewerregion.h"
65#include "llcombobox.h" 65#include "llcombobox.h"
66#include "lltooldraganddrop.h" 66#include "lltooldraganddrop.h"
67#include "llfloatermap.h"
68#include "lluiconstants.h" 67#include "lluiconstants.h"
69#include "lluploaddialog.h" 68#include "lluploaddialog.h"
70#include "llcallingcard.h" 69#include "llcallingcard.h"
@@ -133,6 +132,23 @@ LLFloaterReporter::LLFloaterReporter(
133 132
134 childSetText("abuse_location_edit", gAgent.getSLURL() ); 133 childSetText("abuse_location_edit", gAgent.getSLURL() );
135 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
136 LLButton* pick_btn = getChild<LLButton>("pick_btn"); 152 LLButton* pick_btn = getChild<LLButton>("pick_btn");
137 if (pick_btn) 153 if (pick_btn)
138 { 154 {
@@ -300,6 +316,12 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
300 if (regionp) 316 if (regionp)
301 { 317 {
302 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]
303 LLVector3d global_pos; 325 LLVector3d global_pos;
304 global_pos.setVec(objectp->getPositionRegion()); 326 global_pos.setVec(objectp->getPositionRegion());
305 setPosBox(global_pos); 327 setPosBox(global_pos);
@@ -323,6 +345,12 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
323 object_owner.append("Unknown"); 345 object_owner.append("Unknown");
324 } 346 }
325 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]
326 childSetText("owner_name", object_owner); 354 childSetText("owner_name", object_owner);
327 childSetText("abuser_name_edit", object_owner); 355 childSetText("abuser_name_edit", object_owner);
328 mAbuserID = object_id; 356 mAbuserID = object_id;
@@ -595,6 +623,12 @@ LLFloaterReporter* LLFloaterReporter::createNewBugReporter()
595void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id) 623void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
596{ 624{
597 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]
598 childSetText("owner_name", owner_name); 632 childSetText("owner_name", owner_name);
599 childSetText("abuser_name_edit", owner_name); 633 childSetText("abuser_name_edit", owner_name);
600 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
42LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; 47LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL;
43 48
44LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) 49LLFloaterSettingsDebug::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 e723ba1..d2a8040 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -46,6 +46,7 @@
46#include "llfloateropenobject.h" 46#include "llfloateropenobject.h"
47#include "llfocusmgr.h" 47#include "llfocusmgr.h"
48#include "llmenugl.h" 48#include "llmenugl.h"
49#include "llnotify.h"
49#include "llpanelcontents.h" 50#include "llpanelcontents.h"
50#include "llpanelface.h" 51#include "llpanelface.h"
51#include "llpanelland.h" 52#include "llpanelland.h"
@@ -53,6 +54,7 @@
53#include "llpanelobject.h" 54#include "llpanelobject.h"
54#include "llpanelvolume.h" 55#include "llpanelvolume.h"
55#include "llpanelpermissions.h" 56#include "llpanelpermissions.h"
57#include "llresmgr.h"
56#include "llselectmgr.h" 58#include "llselectmgr.h"
57#include "llslider.h" 59#include "llslider.h"
58#include "llstatusbar.h" 60#include "llstatusbar.h"
@@ -77,6 +79,8 @@
77#include "llviewerwindow.h" 79#include "llviewerwindow.h"
78#include "llviewercontrol.h" 80#include "llviewercontrol.h"
79#include "llviewerjoystick.h" 81#include "llviewerjoystick.h"
82#include "llvograss.h"
83#include "llvotree.h"
80#include "lluictrlfactory.h" 84#include "lluictrlfactory.h"
81 85
82// Globals 86// Globals
@@ -233,6 +237,11 @@ BOOL LLFloaterTools::postBuild()
233 mTextGridMode = getChild<LLTextBox>("text ruler mode"); 237 mTextGridMode = getChild<LLTextBox>("text ruler mode");
234 mComboGridMode = getChild<LLComboBox>("combobox grid mode"); 238 mComboGridMode = getChild<LLComboBox>("combobox grid mode");
235 childSetCommitCallback("combobox grid mode",commit_grid_mode, this); 239 childSetCommitCallback("combobox grid mode",commit_grid_mode, this);
240 mBtnLink = getChild<LLButton>("link_btn");
241 childSetAction("link_btn",onClickLink, this);
242 mBtnUnlink = getChild<LLButton>("unlink_btn");
243 childSetAction("unlink_btn",onClickUnlink, this);
244
236 // 245 //
237 // Create Buttons 246 // Create Buttons
238 // 247 //
@@ -276,10 +285,14 @@ BOOL LLFloaterTools::postBuild()
276 { 285 {
277 found->setClickedCallback(setObjectType,toolData[t]); 286 found->setClickedCallback(setObjectType,toolData[t]);
278 mButtons.push_back( found ); 287 mButtons.push_back( found );
279 }else{ 288 }
289 else
290 {
280 llwarns << "Tool button not found! DOA Pending." << llendl; 291 llwarns << "Tool button not found! DOA Pending." << llendl;
281 } 292 }
282 } 293 }
294 mComboTreesGrass = getChild<LLComboBox>("trees_grass");
295 childSetCommitCallback("trees_grass", onSelectTreesGrass, (void*)0);
283 mCheckCopySelection = getChild<LLCheckBoxCtrl>("checkbox copy selection"); 296 mCheckCopySelection = getChild<LLCheckBoxCtrl>("checkbox copy selection");
284 childSetValue("checkbox copy selection",(BOOL)gSavedSettings.getBOOL("CreateToolCopySelection")); 297 childSetValue("checkbox copy selection",(BOOL)gSavedSettings.getBOOL("CreateToolCopySelection"));
285 mCheckSticky = getChild<LLCheckBoxCtrl>("checkbox sticky"); 298 mCheckSticky = getChild<LLCheckBoxCtrl>("checkbox sticky");
@@ -309,7 +322,7 @@ BOOL LLFloaterTools::postBuild()
309 322
310 mSliderDozerSize = getChild<LLSlider>("slider brush size"); 323 mSliderDozerSize = getChild<LLSlider>("slider brush size");
311 childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); 324 childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0);
312 childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize")); 325 childSetValue( "slider brush size", gSavedSettings.getF32("LandBrushSize"));
313 326
314 327
315 mSliderDozerForce = getChild<LLSlider>("slider force"); 328 mSliderDozerForce = getChild<LLSlider>("slider force");
@@ -317,14 +330,10 @@ BOOL LLFloaterTools::postBuild()
317 // 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
318 childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce"))); 331 childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce")));
319 332
320 childSetAction("button more", click_show_more, this);
321 childSetAction("button less", click_show_more, this);
322 mTab = getChild<LLTabContainer>("Object Info Tabs"); 333 mTab = getChild<LLTabContainer>("Object Info Tabs");
323 if(mTab) 334 if(mTab)
324 { 335 {
325 mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") );
326 mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); 336 mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
327 mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") );
328 mTab->setBorderVisible(FALSE); 337 mTab->setBorderVisible(FALSE);
329 mTab->selectFirstTab(); 338 mTab->selectFirstTab();
330 } 339 }
@@ -381,6 +390,10 @@ LLFloaterTools::LLFloaterTools()
381 mBtnDuplicate(NULL), 390 mBtnDuplicate(NULL),
382 mBtnDuplicateInPlace(NULL), 391 mBtnDuplicateInPlace(NULL),
383 392
393 mBtnLink(NULL),
394 mBtnUnlink(NULL),
395
396 mComboTreesGrass(NULL),
384 mCheckSticky(NULL), 397 mCheckSticky(NULL),
385 mCheckCopySelection(NULL), 398 mCheckCopySelection(NULL),
386 mCheckCopyCenters(NULL), 399 mCheckCopyCenters(NULL),
@@ -420,19 +433,6 @@ LLFloaterTools::LLFloaterTools()
420 factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo 433 factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo
421 434
422 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE); 435 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE);
423
424 mLargeHeight = getRect().getHeight();
425 mSmallHeight = mLargeHeight;
426 if (mTab) mSmallHeight -= mTab->getRect().getHeight();
427
428 // force a toggle initially. seems to be needed to correctly initialize
429 // both "more" and "less" cases. it also seems to be important to begin
430 // with the user's preference first so that it's initial position will
431 // be correct (SL-51192) -MG
432 BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
433 gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
434 showMore( !show_more ); // does the toggle
435 showMore( show_more ); // reset the real user's preference
436} 436}
437 437
438LLFloaterTools::~LLFloaterTools() 438LLFloaterTools::~LLFloaterTools()
@@ -476,6 +476,16 @@ void LLFloaterTools::refresh()
476 mTab->enableTabButton(idx_face, all_volume); 476 mTab->enableTabButton(idx_face, all_volume);
477 mTab->enableTabButton(idx_contents, all_volume); 477 mTab->enableTabButton(idx_contents, all_volume);
478 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
479 mPanelPermissions->refresh(); 489 mPanelPermissions->refresh();
480 mPanelObject->refresh(); 490 mPanelObject->refresh();
481 mPanelVolume->refresh(); 491 mPanelVolume->refresh();
@@ -654,11 +664,52 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
654 if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible ); 664 if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible );
655 if (mCheckStretchTexture) mCheckStretchTexture->setVisible( edit_visible ); 665 if (mCheckStretchTexture) mCheckStretchTexture->setVisible( edit_visible );
656 666
667 if (mBtnLink) mBtnLink->setVisible( edit_visible );
668 if (mBtnUnlink) mBtnUnlink->setVisible( edit_visible );
669
670 // Check to see if we can link things
671 bool can_link = false;
672 if (!gSavedSettings.getBOOL("EditLinkedParts"))
673 {
674 if(LLSelectMgr::getInstance()->selectGetAllRootsValid() && LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() >= 2)
675 {
676 struct f : public LLSelectedObjectFunctor
677 {
678 virtual bool apply(LLViewerObject* object)
679 {
680 return object->permModify();
681 }
682 }
683 func;
684 const bool firstonly = true;
685 can_link = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
686 }
687 }
688 mBtnLink->setEnabled(can_link);
689
690 // Check to see if we can unlink things
691 bool can_unlink = false;
692 if (LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
693 LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() &&
694 !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment())
695 {
696 if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0 &&
697 LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() !=
698 LLSelectMgr::getInstance()->getSelection()->getObjectCount())
699 {
700 can_unlink = true;
701 }
702 }
703 mBtnUnlink->setEnabled(can_unlink);
704
705
657 // Create buttons 706 // Create buttons
658 BOOL create_visible = (tool == LLToolCompCreate::getInstance()); 707 BOOL create_visible = (tool == LLToolCompCreate::getInstance());
659 708
660 mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() ); 709 mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() );
661 710
711 updateTreeGrassCombo(create_visible);
712
662 if (mCheckCopySelection 713 if (mCheckCopySelection
663 && mCheckCopySelection->get()) 714 && mCheckCopySelection->get())
664 { 715 {
@@ -743,8 +794,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
743 if (mSliderDozerSize) 794 if (mSliderDozerSize)
744 { 795 {
745 mSliderDozerSize ->setVisible( land_visible ); 796 mSliderDozerSize ->setVisible( land_visible );
746 childSetVisible("Brush:", land_visible); 797 childSetVisible("Bulldozer:", land_visible);
747 childSetVisible("Brush Size:", land_visible); 798 childSetVisible("Dozer Size:", land_visible);
748 } 799 }
749 if (mCheckShowOwners) 800 if (mCheckShowOwners)
750 { 801 {
@@ -756,13 +807,10 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
756 childSetVisible("Strength:", land_visible); 807 childSetVisible("Strength:", land_visible);
757 } 808 }
758 809
759 // 810 childSetVisible("obj_count", !land_visible);
760 // More panel visibility 811 childSetVisible("prim_count", !land_visible);
761 // 812 mTab->setVisible(!land_visible);
762 BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); 813 mPanelLandInfo->setVisible(land_visible);
763
764 mTab->setVisible(show_more && tool != LLToolBrushLand::getInstance() && tool != LLToolSelectLand::getInstance());
765 mPanelLandInfo->setVisible(show_more && (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance()));
766} 814}
767 815
768 816
@@ -817,46 +865,12 @@ void LLFloaterTools::onClose(bool app_quitting)
817 // gMenuBarView->arrange(); 865 // gMenuBarView->arrange();
818} 866}
819 867
820void LLFloaterTools::showMore(BOOL show_more)
821{
822 BOOL showing_more = gSavedSettings.getBOOL("ToolboxShowMore");
823 if (show_more == showing_more)
824 {
825 return;
826 }
827
828 gSavedSettings.setBOOL("ToolboxShowMore", show_more);
829
830 // Visibility updated next frame - JC
831 // mTab->setVisible(show_more);
832
833 if (show_more)
834 {
835 reshape( getRect().getWidth(), mLargeHeight, TRUE);
836 translate( 0, mSmallHeight - mLargeHeight );
837 }
838 else
839 {
840 reshape( getRect().getWidth(), mSmallHeight, TRUE);
841 translate( 0, mLargeHeight - mSmallHeight );
842 }
843 childSetVisible("button less", show_more);
844 childSetVisible("button more", !show_more);
845}
846
847void LLFloaterTools::showPanel(EInfoPanel panel) 868void LLFloaterTools::showPanel(EInfoPanel panel)
848{ 869{
849 llassert(panel >= 0 && panel < PANEL_COUNT); 870 llassert(panel >= 0 && panel < PANEL_COUNT);
850 mTab->selectTabByName(PANEL_NAMES[panel]); 871 mTab->selectTabByName(PANEL_NAMES[panel]);
851} 872}
852 873
853void click_show_more(void *userdata)
854{
855 LLFloaterTools *f = (LLFloaterTools *)userdata;
856 BOOL show_more = !gSavedSettings.getBOOL("ToolboxShowMore");
857 f->showMore( show_more );
858}
859
860void click_popup_info(void*) 874void click_popup_info(void*)
861{ 875{
862// gBuildView->setPropertiesPanelOpen(TRUE); 876// gBuildView->setPropertiesPanelOpen(TRUE);
@@ -941,8 +955,8 @@ void click_popup_dozer_mode(LLUICtrl *, void *user)
941 955
942void commit_slider_dozer_size(LLUICtrl *ctrl, void*) 956void commit_slider_dozer_size(LLUICtrl *ctrl, void*)
943{ 957{
944 S32 size = (S32)ctrl->getValue().asInteger(); 958 F32 size = (F32)ctrl->getValue().asReal();
945 gSavedSettings.setS32("LandBrushSize", size); 959 gSavedSettings.setF32("LandBrushSize", size);
946} 960}
947 961
948void commit_slider_dozer_force(LLUICtrl *ctrl, void*) 962void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
@@ -1004,6 +1018,7 @@ void LLFloaterTools::setObjectType( void* data )
1004 LLPCode pcode = *(LLPCode*) data; 1018 LLPCode pcode = *(LLPCode*) data;
1005 LLToolPlacer::setObjectType( pcode ); 1019 LLToolPlacer::setObjectType( pcode );
1006 gSavedSettings.setBOOL("CreateToolCopySelection", FALSE); 1020 gSavedSettings.setBOOL("CreateToolCopySelection", FALSE);
1021 gFloaterTools->updateTreeGrassCombo(true);
1007 gFocusMgr.setMouseCapture(NULL); 1022 gFocusMgr.setMouseCapture(NULL);
1008} 1023}
1009 1024
@@ -1026,3 +1041,127 @@ void LLFloaterTools::onFocusReceived()
1026 LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); 1041 LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
1027 LLFloater::onFocusReceived(); 1042 LLFloater::onFocusReceived();
1028} 1043}
1044
1045void LLFloaterTools::updateTreeGrassCombo(bool visible)
1046{
1047 LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label");
1048 if (visible)
1049 {
1050 LLPCode pcode = LLToolPlacer::getObjectType();
1051 std::map<std::string, S32>::iterator it, end;
1052 std::string selected;
1053 if (pcode == LLToolPlacerPanel::sTree)
1054 {
1055 tree_grass_label->setVisible(visible);
1056 LLButton* button = getChild<LLButton>("ToolTree");
1057 tree_grass_label->setText(button->getToolTip());
1058
1059 selected = gSavedSettings.getString("LastTree");
1060 it = LLVOTree::sSpeciesNames.begin();
1061 end = LLVOTree::sSpeciesNames.end();
1062 }
1063 else if (pcode == LLToolPlacerPanel::sGrass)
1064 {
1065 tree_grass_label->setVisible(visible);
1066 LLButton* button = getChild<LLButton>("ToolGrass");
1067 tree_grass_label->setText(button->getToolTip());
1068
1069 selected = gSavedSettings.getString("LastGrass");
1070 it = LLVOGrass::sSpeciesNames.begin();
1071 end = LLVOGrass::sSpeciesNames.end();
1072 }
1073 else
1074 {
1075 mComboTreesGrass->removeall();
1076 mComboTreesGrass->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label
1077 mComboTreesGrass->setEnabled(false);
1078 mComboTreesGrass->setVisible(false);
1079 tree_grass_label->setVisible(false);
1080 return;
1081 }
1082
1083 mComboTreesGrass->removeall();
1084 mComboTreesGrass->add("Random");
1085
1086 int select = 0, i = 0;
1087
1088 while (it != end)
1089 {
1090 const std::string &species = it->first;
1091 mComboTreesGrass->add(species); ++i;
1092 if (species == selected) select = i;
1093 ++it;
1094 }
1095 // if saved species not found, default to "Random"
1096 mComboTreesGrass->selectNthItem(select);
1097 mComboTreesGrass->setEnabled(true);
1098 }
1099
1100 mComboTreesGrass->setVisible(visible);
1101 tree_grass_label->setVisible(visible);
1102}
1103
1104// static
1105void LLFloaterTools::onSelectTreesGrass(LLUICtrl*, void*)
1106{
1107 const std::string &selected = gFloaterTools->mComboTreesGrass->getValue();
1108 LLPCode pcode = LLToolPlacer::getObjectType();
1109 if (pcode == LLToolPlacerPanel::sTree)
1110 {
1111 gSavedSettings.setString("LastTree", selected);
1112 }
1113 else if (pcode == LLToolPlacerPanel::sGrass)
1114 {
1115 gSavedSettings.setString("LastGrass", selected);
1116 }
1117}
1118
1119// static
1120void LLFloaterTools::onClickLink(void* data)
1121{
1122 if(!LLSelectMgr::getInstance()->selectGetAllRootsValid())
1123 {
1124 LLNotifyBox::showXml("UnableToLinkWhileDownloading");
1125 return;
1126 }
1127
1128 S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
1129 if (object_count > MAX_CHILDREN_PER_TASK + 1)
1130 {
1131 LLStringUtil::format_map_t args;
1132 args["[COUNT]"] = llformat("%d", object_count);
1133 int max = MAX_CHILDREN_PER_TASK+1;
1134 args["[MAX]"] = llformat("%d", max);
1135 gViewerWindow->alertXml("UnableToLinkObjects", args);
1136 return;
1137 }
1138
1139 if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2)
1140 {
1141 gViewerWindow->alertXml("CannotLinkIncompleteSet");
1142 return;
1143 }
1144 if(!LLSelectMgr::getInstance()->selectGetRootsModify())
1145 {
1146 gViewerWindow->alertXml("CannotLinkModify");
1147 return;
1148 }
1149 LLUUID owner_id;
1150 std::string owner_name;
1151 if(!LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name))
1152 {
1153 // we don't actually care if you're the owner, but novices are
1154 // the most likely to be stumped by this one, so offer the
1155 // easiest and most likely solution.
1156 gViewerWindow->alertXml("CannotLinkDifferentOwners");
1157 return;
1158 }
1159 LLSelectMgr::getInstance()->sendLink();
1160 return;
1161}
1162
1163// static
1164void LLFloaterTools::onClickUnlink(void* data)
1165{
1166 LLSelectMgr::getInstance()->sendDelink();
1167}
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h
index 9d555d1..1b13b9f 100644
--- a/linden/indra/newview/llfloatertools.h
+++ b/linden/indra/newview/llfloatertools.h
@@ -95,7 +95,6 @@ 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);
@@ -109,6 +108,9 @@ private:
109 108
110 static void onClickGridOptions(void* data); 109 static void onClickGridOptions(void* data);
111 110
111 static void onClickLink(void* data);
112 static void onClickUnlink(void* data);
113
112public: 114public:
113 115
114 LLButton *mBtnFocus; 116 LLButton *mBtnFocus;
@@ -152,7 +154,11 @@ public:
152 LLButton *mBtnDuplicate; 154 LLButton *mBtnDuplicate;
153 LLButton *mBtnDuplicateInPlace; 155 LLButton *mBtnDuplicateInPlace;
154 156
157 LLButton *mBtnLink;
158 LLButton *mBtnUnlink;
159
155 // Create buttons 160 // Create buttons
161 LLComboBox *mComboTreesGrass;
156 LLCheckBoxCtrl *mCheckSticky; 162 LLCheckBoxCtrl *mCheckSticky;
157 LLCheckBoxCtrl *mCheckCopySelection; 163 LLCheckBoxCtrl *mCheckCopySelection;
158 LLCheckBoxCtrl *mCheckCopyCenters; 164 LLCheckBoxCtrl *mCheckCopyCenters;
@@ -190,10 +196,11 @@ public:
190 196
191private: 197private:
192 BOOL mDirty; 198 BOOL mDirty;
193 S32 mSmallHeight;
194 S32 mLargeHeight;
195 199
196 std::map<std::string, std::string> mStatusText; 200 std::map<std::string, std::string> mStatusText;
201
202 void updateTreeGrassCombo(bool visible);
203 static void onSelectTreesGrass(LLUICtrl*, void*);
197}; 204};
198 205
199extern LLFloaterTools *gFloaterTools; 206extern LLFloaterTools *gFloaterTools;
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
63LLFloaterWindLight* LLFloaterWindLight::sWindLight = NULL; 64LLFloaterWindLight* LLFloaterWindLight::sWindLight = NULL;
64 65
65std::set<std::string> LLFloaterWindLight::sDefaultPresets; 66std::set<std::string> LLFloaterWindLight::sDefaultPresets;
@@ -227,6 +228,10 @@ void LLFloaterWindLight::initCallbacks(void) {
227 // Dome 228 // Dome
228 childSetCommitCallback("WLGamma", onFloatControlMoved, &param_mgr->mWLGamma); 229 childSetCommitCallback("WLGamma", onFloatControlMoved, &param_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
232void LLFloaterWindLight::onClickHelp(void* data) 237void 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
1010void 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
1034void 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
281void LLFloaterWorldMap::show(void*, BOOL center_on_target) 281void 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
589const std::string& LLFolderViewItem::getSearchableLabel() const 624const 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
594const std::string& LLFolderViewItem::getName( void ) const 635const 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
167void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) 167void 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
566void LLHUDText::setStringUTF8(const std::string &wtext) 566void 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
1176void 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]
133protected: 138protected:
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
89void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove);
90
88const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) 91const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not)
89const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) 92const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not)
90const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) 93const 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
477class 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
467class LLSetSortBy : public inventory_listener_t 510class 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
716void init_inventory_panel_actions(LLInventoryPanel *panel) 761void init_inventory_panel_actions(LLInventoryPanel *panel)
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index 697b30b..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);
111void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata); 111void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata);
112void move_task_inventory_callback(S32 option, void* user_data); 112void move_task_inventory_callback(S32 option, void* user_data);
113void confirm_replace_attachment_rez(S32 option, void* user_data); 113void confirm_replace_attachment_rez(S32 option, void* user_data);
114void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove);
115void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOOL remove);
114 116
115std::string ICON_NAME[ICON_NAME_COUNT] = 117std::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);
@@ -3304,10 +3335,19 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
3304 3335
3305void LLObjectBridge::openItem() 3336void LLObjectBridge::openItem()
3306{ 3337{
3307 /* Disabled -- this preview isn't useful. JC */ 3338 LLVOAvatar* avatar = gAgent.getAvatarObject();
3308 // CP: actually, this code is required - made changes to match LLAnimationBridge::openItem() idiom 3339 if (!avatar)
3309 // The properties preview is useful, converting to show object properties. - DaveP 3340 {
3310 LLShowProps::showProperties(mUUID); 3341 return;
3342 }
3343 if (avatar->isWearingAttachment(mUUID))
3344 {
3345 performAction(NULL, NULL, "detach");
3346 }
3347 else
3348 {
3349 performAction(NULL, NULL, "attach");
3350 }
3311} 3351}
3312 3352
3313LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const 3353LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
@@ -3358,11 +3398,24 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
3358 rez_action->mAttachPt = attach_pt; 3398 rez_action->mAttachPt = attach_pt;
3359 if (attachment && attachment->getObject()) 3399 if (attachment && attachment->getObject())
3360 { 3400 {
3361 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);
3362 } 3408 }
3363 else 3409 else
3364 { 3410 {
3365 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);
3366 } 3419 }
3367} 3420}
3368 3421
@@ -3431,6 +3484,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3431 if( avatarp->isWearingAttachment( mUUID ) ) 3484 if( avatarp->isWearingAttachment( mUUID ) )
3432 { 3485 {
3433 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]
3434 } 3492 }
3435 else 3493 else
3436 if( !isInTrash() ) 3494 if( !isInTrash() )
@@ -3442,6 +3500,16 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3442 items.push_back(std::string("RestoreToWorld Separator")); 3500 items.push_back(std::string("RestoreToWorld Separator"));
3443 items.push_back(std::string("Restore to Last Position")); 3501 items.push_back(std::string("Restore to Last Position"));
3444 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
3445 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); 3513 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
3446 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE); 3514 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE);
3447 LLVOAvatar *avatarp = gAgent.getAvatarObject(); 3515 LLVOAvatar *avatarp = gAgent.getAvatarObject();
@@ -3457,15 +3525,27 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3457 LLMenuItemCallGL *new_item; 3525 LLMenuItemCallGL *new_item;
3458 if (attachment->getIsHUDAttachment()) 3526 if (attachment->getIsHUDAttachment())
3459 { 3527 {
3528// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
3460 attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), 3529 attach_hud_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(),
3461 NULL, //&LLObjectBridge::attachToAvatar, 3530 NULL, //&LLObjectBridge::attachToAvatar,
3462 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));
3463 } 3537 }
3464 else 3538 else
3465 { 3539 {
3540// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
3466 attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(), 3541 attach_menu->append(new_item = new LLMenuItemCallGL(attachment->getName(),
3467 NULL, //&LLObjectBridge::attachToAvatar, 3542 NULL, //&LLObjectBridge::attachToAvatar,
3468 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));
3469 } 3549 }
3470 3550
3471 LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject"); 3551 LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject");
@@ -3662,6 +3742,31 @@ private:
3662 bool mAppend; 3742 bool mAppend;
3663}; 3743};
3664 3744
3745class LLWearAttachmentsCallback : public LLInventoryCallback
3746{
3747public:
3748 LLWearAttachmentsCallback(bool append) : mAppend(append) {}
3749 void fire(const LLUUID& item_id)
3750 {
3751 mItemIDs.insert(item_id);
3752 }
3753protected:
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 }
3765private:
3766 std::set<LLUUID> mItemIDs;
3767 bool mAppend;
3768};
3769
3665void LLOutfitObserver::done() 3770void LLOutfitObserver::done()
3666{ 3771{
3667 // 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
@@ -3945,6 +4050,20 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
3945 is_gesture); 4050 is_gesture);
3946 S32 gest_count = gest_item_array.count(); 4051 S32 gest_count = gest_item_array.count();
3947 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
3948 if( !wearable_count && !obj_count && !gest_count) 4067 if( !wearable_count && !obj_count && !gest_count)
3949 { 4068 {
3950 gViewerWindow->alertXml("CouldNotPutOnOutfit"); 4069 gViewerWindow->alertXml("CouldNotPutOnOutfit");
@@ -4017,57 +4136,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
4017 if( obj_count > 0 ) 4136 if( obj_count > 0 )
4018 { 4137 {
4019 // We've found some attachements. Add these. 4138 // We've found some attachements. Add these.
4020 4139 wear_attachments_on_avatar(obj_item_array, !wear_info->mAppend);
4021 LLVOAvatar* avatar = gAgent.getAvatarObject();
4022 if( avatar )
4023 {
4024 // Build a compound message to send all the objects that need to be rezzed.
4025
4026 // Limit number of packets to send
4027 const S32 MAX_PACKETS_TO_SEND = 10;
4028 const S32 OBJECTS_PER_PACKET = 4;
4029 const S32 MAX_OBJECTS_TO_SEND = MAX_PACKETS_TO_SEND * OBJECTS_PER_PACKET;
4030 if( obj_count > MAX_OBJECTS_TO_SEND )
4031 {
4032 obj_count = MAX_OBJECTS_TO_SEND;
4033 }
4034
4035 // Create an id to keep the parts of the compound message together
4036 LLUUID compound_msg_id;
4037 compound_msg_id.generate();
4038 LLMessageSystem* msg = gMessageSystem;
4039
4040 for(i = 0; i < obj_count; ++i)
4041 {
4042 if( 0 == (i % OBJECTS_PER_PACKET) )
4043 {
4044 // Start a new message chunk
4045 msg->newMessageFast(_PREHASH_RezMultipleAttachmentsFromInv);
4046 msg->nextBlockFast(_PREHASH_AgentData);
4047 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
4048 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
4049 msg->nextBlockFast(_PREHASH_HeaderData);
4050 msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id );
4051 msg->addU8Fast(_PREHASH_TotalObjects, obj_count );
4052 msg->addBOOLFast(_PREHASH_FirstDetachAll, !wear_info->mAppend );
4053 }
4054
4055 LLInventoryItem* item = obj_item_array.get(i);
4056 msg->nextBlockFast(_PREHASH_ObjectData );
4057 msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() );
4058 msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
4059 msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
4060 pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
4061 msg->addStringFast(_PREHASH_Name, item->getName());
4062 msg->addStringFast(_PREHASH_Description, item->getDescription());
4063
4064 if( (i+1 == obj_count) || ((OBJECTS_PER_PACKET-1) == (i % OBJECTS_PER_PACKET)) )
4065 {
4066 // End of message chunk
4067 msg->sendReliable( gAgent.getRegion()->getHost() );
4068 }
4069 }
4070 }
4071 } 4140 }
4072 } 4141 }
4073 delete wear_info; 4142 delete wear_info;
@@ -4132,6 +4201,13 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B
4132// item->setAssetUUID(wearable->getID()); 4201// item->setAssetUUID(wearable->getID());
4133// item->updateAssetOnServer(); 4202// item->updateAssetOnServer();
4134// } 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]
4135 items.put(item); 4211 items.put(item);
4136 wearables.put(wearable); 4212 wearables.put(wearable);
4137 } 4213 }
@@ -4151,6 +4227,109 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B
4151 dec_busy_count(); 4227 dec_busy_count();
4152} 4228}
4153 4229
4230void 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
4258void 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
4154void remove_inventory_category_from_avatar( LLInventoryCategory* category ) 4333void remove_inventory_category_from_avatar( LLInventoryCategory* category )
4155{ 4334{
4156 if(!category) return; 4335 if(!category) return;
@@ -4220,7 +4399,11 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
4220 { 4399 {
4221 for(i = 0; i < wearable_count; ++i) 4400 for(i = 0; i < wearable_count; ++i)
4222 { 4401 {
4223 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]
4224 { 4407 {
4225 gWearableList.getAsset(item_array.get(i)->getAssetUUID(), 4408 gWearableList.getAsset(item_array.get(i)->getAssetUUID(),
4226 item_array.get(i)->getName(), 4409 item_array.get(i)->getName(),
@@ -4237,6 +4420,18 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
4237 { 4420 {
4238 for(i = 0; i < obj_count; ++i) 4421 for(i = 0; i < obj_count; ++i)
4239 { 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]
4240 gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); 4435 gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
4241 gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); 4436 gMessageSystem->nextBlockFast(_PREHASH_ObjectData );
4242 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); 4437 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
@@ -4358,9 +4553,13 @@ void LLWearableBridge::openItem()
4358 } 4553 }
4359 else if(isAgentInventory()) 4554 else if(isAgentInventory())
4360 { 4555 {
4361 if( !gAgent.isWearingItem( mUUID ) ) 4556 if (gAgent.isWearingItem(mUUID))
4362 { 4557 {
4363 wearOnAvatar(); 4558 performAction(NULL, NULL, "take_off");
4559 }
4560 else
4561 {
4562 performAction(NULL, NULL, "wear");
4364 } 4563 }
4365 } 4564 }
4366 else 4565 else
@@ -4625,8 +4824,11 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
4625 { 4824 {
4626 EWearableType type = wearable->getType(); 4825 EWearableType type = wearable->getType();
4627 4826
4628 if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& 4827 //if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&&
4629 //!((!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]
4630 { 4832 {
4631 gAgent.removeWearable( type ); 4833 gAgent.removeWearable( type );
4632 } 4834 }
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp
index 1029a3c..324e36a 100644
--- a/linden/indra/newview/llinventorymodel.cpp
+++ b/linden/indra/newview/llinventorymodel.cpp
@@ -1499,6 +1499,8 @@ void LLInventoryModel::stopBackgroundFetch()
1499//static 1499//static
1500void LLInventoryModel::backgroundFetch(void*) 1500void LLInventoryModel::backgroundFetch(void*)
1501{ 1501{
1502 if (gDisconnected)
1503 return;
1502 if (sBackgroundFetchActive && gAgent.getRegion()) 1504 if (sBackgroundFetchActive && gAgent.getRegion())
1503 { 1505 {
1504 //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. 1506 //If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
@@ -2876,6 +2878,14 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
2876 llinfos << "LLInventoryModel::processSaveAssetIntoInventory item" 2878 llinfos << "LLInventoryModel::processSaveAssetIntoInventory item"
2877 " not found: " << item_id << llendl; 2879 " not found: " << item_id << llendl;
2878 } 2880 }
2881
2882// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0e
2883 if (rlv_handler_t::isEnabled())
2884 {
2885 gRlvHandler.onSavedAssetIntoInventory(item_id);
2886 }
2887// [/RLVa:KB]
2888
2879 if(gViewerWindow) 2889 if(gViewerWindow)
2880 { 2890 {
2881 gViewerWindow->getWindow()->decBusyCount(); 2891 gViewerWindow->getWindow()->decBusyCount();
@@ -2918,6 +2928,23 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
2918 // << llendl; 2928 // << llendl;
2919 if(tfolder->getUUID().notNull()) 2929 if(tfolder->getUUID().notNull())
2920 { 2930 {
2931// [RLVa:KB] - Checked: 2009-08-07 (RLVa-1.0.1f) | Added: RLVa-1.0.0f
2932 // TODO-RLVa: this really shouldn't go here, but if the inventory offer spans multiple BulkUpdateInventory messages
2933 // then the second message will cause the viewer to show the folder under its original name even though
2934 // it is renamed properly on the inventory server
2935 if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) )
2936 {
2937 LLViewerInventoryCategory* pRlvRoot = gRlvHandler.getSharedRoot();
2938 std::string strName = tfolder->getName();
2939 if ((pRlvRoot) && (pRlvRoot->getUUID() == tfolder->getParentUUID() ) && (strName.find(RLV_PUTINV_PREFIX) == 0))
2940 {
2941 strName.erase(0, strName.find(RLV_FOLDER_PREFIX_PUTINV)); // Strips the prefix while retaining while the '~'
2942 tfolder->rename(strName);
2943 tfolder->updateServer(FALSE);
2944 }
2945 }
2946// [/RLVa:KB]
2947
2921 folders.push_back(tfolder); 2948 folders.push_back(tfolder);
2922 LLViewerInventoryCategory* folderp = gInventory.getCategory(tfolder->getUUID()); 2949 LLViewerInventoryCategory* folderp = gInventory.getCategory(tfolder->getUUID());
2923 if(folderp) 2950 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.
766void LLInventoryView::onClose(bool app_quitting) 775void 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/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp
index 10cb0c3..5a67937 100644
--- a/linden/indra/newview/llmanipscale.cpp
+++ b/linden/indra/newview/llmanipscale.cpp
@@ -69,6 +69,8 @@ const F32 SNAP_GUIDE_SCREEN_LENGTH = 0.7f;
69const F32 SELECTED_MANIPULATOR_SCALE = 1.2f; 69const F32 SELECTED_MANIPULATOR_SCALE = 1.2f;
70const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f; 70const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f;
71const S32 NUM_MANIPULATORS = 14; 71const S32 NUM_MANIPULATORS = 14;
72const F32 DEFAULT_LL_MAX_PRIM_SCALE = 10.f;
73const F32 DEFAULT_OPENSIM_MAX_PRIM_SCALE = 128.f;
72 74
73const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = 75const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] =
74{ 76{
@@ -173,6 +175,7 @@ LLManipScale::LLManipScale( LLToolComposite* composite )
173 mScaledBoxHandleSize( 1.f ), 175 mScaledBoxHandleSize( 1.f ),
174 mLastMouseX( -1 ), 176 mLastMouseX( -1 ),
175 mLastMouseY( -1 ), 177 mLastMouseY( -1 ),
178 mMaxPrimSize(0.f),
176 mSendUpdateOnMouseUp( FALSE ), 179 mSendUpdateOnMouseUp( FALSE ),
177 mLastUpdateFlags( 0 ), 180 mLastUpdateFlags( 0 ),
178 mScaleSnapUnit1(1.f), 181 mScaleSnapUnit1(1.f),
@@ -201,6 +204,7 @@ void LLManipScale::render()
201 LLGLDepthTest gls_depth(GL_TRUE); 204 LLGLDepthTest gls_depth(GL_TRUE);
202 LLGLEnable gl_blend(GL_BLEND); 205 LLGLEnable gl_blend(GL_BLEND);
203 LLGLEnable gls_alpha_test(GL_ALPHA_TEST); 206 LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
207 mMaxPrimSize = gSavedSettings.getBOOL("LoggedIntoOpenSim") ? DEFAULT_OPENSIM_MAX_PRIM_SCALE : DEFAULT_LL_MAX_PRIM_SCALE;
204 208
205 if( canAffectSelection() ) 209 if( canAffectSelection() )
206 { 210 {
@@ -952,8 +956,8 @@ void LLManipScale::dragCorner( S32 x, S32 y )
952 mInSnapRegime = FALSE; 956 mInSnapRegime = FALSE;
953 } 957 }
954 958
955 F32 max_scale_factor = DEFAULT_MAX_PRIM_SCALE / MIN_PRIM_SCALE; 959 F32 max_scale_factor = mMaxPrimSize / MIN_PRIM_SCALE;
956 F32 min_scale_factor = MIN_PRIM_SCALE / DEFAULT_MAX_PRIM_SCALE; 960 F32 min_scale_factor = MIN_PRIM_SCALE / mMaxPrimSize;
957 961
958 // find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale 962 // find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale
959 for (LLObjectSelection::iterator iter = mObjectSelection->begin(); 963 for (LLObjectSelection::iterator iter = mObjectSelection->begin();
@@ -965,7 +969,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
965 { 969 {
966 const LLVector3& scale = selectNode->mSavedScale; 970 const LLVector3& scale = selectNode->mSavedScale;
967 971
968 F32 cur_max_scale_factor = llmin( DEFAULT_MAX_PRIM_SCALE / scale.mV[VX], DEFAULT_MAX_PRIM_SCALE / scale.mV[VY], DEFAULT_MAX_PRIM_SCALE / scale.mV[VZ] ); 972 F32 cur_max_scale_factor = llmin( mMaxPrimSize / scale.mV[VX], mMaxPrimSize / scale.mV[VY], mMaxPrimSize / scale.mV[VZ] );
969 max_scale_factor = llmin( max_scale_factor, cur_max_scale_factor ); 973 max_scale_factor = llmin( max_scale_factor, cur_max_scale_factor );
970 974
971 F32 cur_min_scale_factor = llmax( MIN_PRIM_SCALE / scale.mV[VX], MIN_PRIM_SCALE / scale.mV[VY], MIN_PRIM_SCALE / scale.mV[VZ] ); 975 F32 cur_min_scale_factor = llmax( MIN_PRIM_SCALE / scale.mV[VX], MIN_PRIM_SCALE / scale.mV[VY], MIN_PRIM_SCALE / scale.mV[VZ] );
@@ -1262,7 +1266,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
1262 1266
1263 F32 denom = axis * dir_local; 1267 F32 denom = axis * dir_local;
1264 F32 desired_delta_size = is_approx_zero(denom) ? 0.f : (delta_local_mag / denom); // in meters 1268 F32 desired_delta_size = is_approx_zero(denom) ? 0.f : (delta_local_mag / denom); // in meters
1265 F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, DEFAULT_MAX_PRIM_SCALE); 1269 F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, mMaxPrimSize);
1266 // propagate scale constraint back to position offset 1270 // propagate scale constraint back to position offset
1267 desired_delta_size = desired_scale - selectNode->mSavedScale.mV[axis_index]; // propagate constraint back to position 1271 desired_delta_size = desired_scale - selectNode->mSavedScale.mV[axis_index]; // propagate constraint back to position
1268 1272
@@ -1962,7 +1966,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const
1962 max_extent = bbox_extents.mV[i]; 1966 max_extent = bbox_extents.mV[i];
1963 } 1967 }
1964 } 1968 }
1965 max_scale_factor = bbox_extents.magVec() * DEFAULT_MAX_PRIM_SCALE / max_extent; 1969 max_scale_factor = bbox_extents.magVec() * mMaxPrimSize / max_extent;
1966 1970
1967 if (getUniform()) 1971 if (getUniform())
1968 { 1972 {
@@ -1977,7 +1981,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const
1977{ 1981{
1978 LLVector3 bbox_extents = unitVectorToLocalBBoxExtent( partToUnitVector( part ), bbox ); 1982 LLVector3 bbox_extents = unitVectorToLocalBBoxExtent( partToUnitVector( part ), bbox );
1979 bbox_extents.abs(); 1983 bbox_extents.abs();
1980 F32 min_extent = DEFAULT_MAX_PRIM_SCALE; 1984 F32 min_extent = mMaxPrimSize;
1981 for (U32 i = VX; i <= VZ; i++) 1985 for (U32 i = VX; i <= VZ; i++)
1982 { 1986 {
1983 if (bbox_extents.mV[i] > 0.f && bbox_extents.mV[i] < min_extent) 1987 if (bbox_extents.mV[i] > 0.f && bbox_extents.mV[i] < min_extent)
@@ -2052,3 +2056,13 @@ BOOL LLManipScale::canAffectSelection()
2052 } 2056 }
2053 return can_scale; 2057 return can_scale;
2054} 2058}
2059
2060//static
2061F32 LLManipScale::getMaxPrimSize()
2062{
2063 if (gSavedSettings.getBOOL("LoggedIntoOpenSim"))
2064 {
2065 return DEFAULT_OPENSIM_MAX_PRIM_SCALE;
2066 }
2067 return DEFAULT_LL_MAX_PRIM_SCALE;
2068}
diff --git a/linden/indra/newview/llmanipscale.h b/linden/indra/newview/llmanipscale.h
index 98d8c63..c60cb69 100644
--- a/linden/indra/newview/llmanipscale.h
+++ b/linden/indra/newview/llmanipscale.h
@@ -88,6 +88,8 @@ public:
88 static void setShowAxes( BOOL b ); 88 static void setShowAxes( BOOL b );
89 static BOOL getShowAxes(); 89 static BOOL getShowAxes();
90 90
91 static F32 getMaxPrimSize();
92
91private: 93private:
92 void renderCorners( const LLBBox& local_bbox ); 94 void renderCorners( const LLBBox& local_bbox );
93 void renderFaces( const LLBBox& local_bbox ); 95 void renderFaces( const LLBBox& local_bbox );
@@ -165,6 +167,7 @@ private:
165 F32 mScaleSnapValue; 167 F32 mScaleSnapValue;
166 BOOL mInSnapRegime; 168 BOOL mInSnapRegime;
167 F32* mManipulatorScales; 169 F32* mManipulatorScales;
170 F32 mMaxPrimSize;
168}; 171};
169 172
170#endif // LL_MANIPSCALE_H 173#endif // LL_MANIPSCALE_H
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 5a54068..b8bf0cb 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -45,8 +45,10 @@
45#include "llcolorscheme.h" 45#include "llcolorscheme.h"
46#include "llviewercontrol.h" 46#include "llviewercontrol.h"
47#include "llfloateravatarinfo.h" 47#include "llfloateravatarinfo.h"
48#include "llfloatermap.h"
48#include "llfloaterworldmap.h" 49#include "llfloaterworldmap.h"
49#include "llframetimer.h" 50#include "llframetimer.h"
51#include "llmutelist.h"
50#include "lltracker.h" 52#include "lltracker.h"
51#include "llmenugl.h" 53#include "llmenugl.h"
52#include "llsurface.h" 54#include "llsurface.h"
@@ -76,6 +78,8 @@ const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f;
76const F32 MIN_DOT_RADIUS = 3.5f; 78const F32 MIN_DOT_RADIUS = 3.5f;
77const F32 DOT_SCALE = 0.75f; 79const F32 DOT_SCALE = 0.75f;
78const F32 MIN_PICK_SCALE = 2.f; 80const F32 MIN_PICK_SCALE = 2.f;
81const S32 SLOP = 2;
82const S32 TRACKING_RADIUS = 3;
79 83
80LLNetMap::LLNetMap(const std::string& name) : 84LLNetMap::LLNetMap(const std::string& name) :
81 LLPanel(name), 85 LLPanel(name),
@@ -96,6 +100,11 @@ LLNetMap::LLNetMap(const std::string& name) :
96 100
97 // Register event listeners for popup menu 101 // Register event listeners for popup menu
98 (new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel"); 102 (new LLScaleMap())->registerListener(this, "MiniMap.ZoomLevel");
103 (new LLCenterMap())->registerListener(this, "MiniMap.Center");
104 (new LLCheckCenterMap())->registerListener(this, "MiniMap.CheckCenter");
105 (new LLRotateMap())->registerListener(this, "MiniMap.Rotate");
106 (new LLCheckRotateMap())->registerListener(this, "MiniMap.CheckRotate");
107 (new LLShowWorldMap())->registerListener(this, "MiniMap.ShowWorldMap");
99 (new LLStopTracking())->registerListener(this, "MiniMap.StopTracking"); 108 (new LLStopTracking())->registerListener(this, "MiniMap.StopTracking");
100 (new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking"); 109 (new LLEnableTracking())->registerListener(this, "MiniMap.EnableTracking");
101 (new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile"); 110 (new LLShowAgentProfile())->registerListener(this, "MiniMap.ShowProfile");
@@ -114,6 +123,11 @@ LLNetMap::LLNetMap(const std::string& name) :
114 mPopupMenuHandle = menu->getHandle(); 123 mPopupMenuHandle = menu->getHandle();
115} 124}
116 125
126BOOL LLNetMap::postBuild()
127{
128 return TRUE;
129}
130
117LLNetMap::~LLNetMap() 131LLNetMap::~LLNetMap()
118{ 132{
119} 133}
@@ -163,8 +177,11 @@ void LLNetMap::draw()
163 createObjectImage(); 177 createObjectImage();
164 } 178 }
165 179
166 mCurPanX = lerp(mCurPanX, mTargetPanX, LLCriticalDamp::getInterpolant(0.1f)); 180 if (gSavedSettings.getS32( "MiniMapCenter" ) != MAP_CENTER_NONE)
167 mCurPanY = lerp(mCurPanY, mTargetPanY, LLCriticalDamp::getInterpolant(0.1f)); 181 {
182 mCurPanX = lerp(mCurPanX, mTargetPanX, LLCriticalDamp::getInterpolant(0.1f));
183 mCurPanY = lerp(mCurPanY, mTargetPanY, LLCriticalDamp::getInterpolant(0.1f));
184 }
168 185
169 F32 rotation = 0; 186 F32 rotation = 0;
170 187
@@ -264,26 +281,24 @@ void LLNetMap::draw()
264 } 281 }
265 gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); 282 gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
266 } 283 }
267
268
269 LLVector3d old_center = mObjectImageCenterGlobal;
270 LLVector3d new_center = gAgent.getCameraPositionGlobal();
271
272 new_center.mdV[0] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[0]);
273 new_center.mdV[1] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[1]);
274 new_center.mdV[2] = 0.f;
275 284
285 // Redraw object layer periodically
276 if (mUpdateNow || (map_timer.getElapsedTimeF32() > 0.5f)) 286 if (mUpdateNow || (map_timer.getElapsedTimeF32() > 0.5f))
277 { 287 {
278 mUpdateNow = FALSE; 288 mUpdateNow = FALSE;
279 mObjectImageCenterGlobal = new_center;
280 289
281 // Center moved enough. 290 // Locate the centre of the object layer, accounting for panning
291 LLVector3 new_center = globalPosToView(gAgent.getCameraPositionGlobal(), rotate_map);
292 new_center.mV[0] -= mCurPanX;
293 new_center.mV[1] -= mCurPanY;
294 new_center.mV[2] = 0.f;
295 mObjectImageCenterGlobal = viewPosToGlobal(llround(new_center.mV[0]), llround(new_center.mV[1]), rotate_map);
296
282 // Create the base texture. 297 // Create the base texture.
283 U8 *default_texture = mObjectRawImagep->getData(); 298 U8 *default_texture = mObjectRawImagep->getData();
284 memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() ); 299 memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() );
285 300
286 // Draw buildings 301 // Draw objects
287 gObjectList.renderObjectsForMap(*this); 302 gObjectList.renderObjectsForMap(*this);
288 303
289 mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight()); 304 mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight());
@@ -327,6 +342,10 @@ void LLNetMap::draw()
327 // Draw avatars 342 // Draw avatars
328 LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); 343 LLColor4 avatar_color = gColors.getColor( "MapAvatar" );
329 LLColor4 friend_color = gColors.getColor( "MapFriend" ); 344 LLColor4 friend_color = gColors.getColor( "MapFriend" );
345 LLColor4 muted_color = gColors.getColor( "MapMuted" );
346 LLColor4 selected_color = gColors.getColor( "MapSelected" );
347 LLColor4 glyph_color;
348
330 std::vector<LLUUID> avatar_ids; 349 std::vector<LLUUID> avatar_ids;
331 std::vector<LLVector3d> positions; 350 std::vector<LLVector3d> positions;
332 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); 351 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
@@ -335,10 +354,37 @@ void LLNetMap::draw()
335 // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest. 354 // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
336 // just be careful to sort the avatar IDs along with the positions. -MG 355 // just be careful to sort the avatar IDs along with the positions. -MG
337 pos_map = globalPosToView(positions[i], rotate_map); 356 pos_map = globalPosToView(positions[i], rotate_map);
357
358 if (LLFloaterMap::getSelected() == avatar_ids[i])
359 {
360 glyph_color = selected_color;
361 }
362 // Show them muted even if they're friends
363 else if (LLMuteList::getInstance()->isMuted(avatar_ids[i]))
364 {
365 glyph_color = muted_color;
366 }
367 else if (is_agent_friend(avatar_ids[i]))
368 {
369 glyph_color = friend_color;
370 }
371 else
372 {
373 glyph_color = avatar_color;
374 }
375
376// [RLVa:KB]
377 if ( rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) )
378 {
379 // User is not allowed to see who it is, or even if it's a friend,
380 // due to RLV settings.
381 glyph_color = avatar_color;
382 }
383// [/RLVa:KB]
338 384
339 LLWorldMapView::drawAvatar( 385 LLWorldMapView::drawAvatar(
340 pos_map.mV[VX], pos_map.mV[VY], 386 pos_map.mV[VX], pos_map.mV[VY],
341 is_agent_friend(avatar_ids[i]) ? friend_color : avatar_color, 387 glyph_color,
342 pos_map.mV[VZ], 388 pos_map.mV[VZ],
343 mDotRadius); 389 mDotRadius);
344 390
@@ -435,6 +481,8 @@ void LLNetMap::draw()
435 setDirectionPos( getChild<LLTextBox>("se_label"), rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2); 481 setDirectionPos( getChild<LLTextBox>("se_label"), rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2);
436 482
437 LLView::draw(); 483 LLView::draw();
484
485 LLFloaterMap::updateRadar();
438} 486}
439 487
440void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) 488void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -540,11 +588,39 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
540 std::string fullname; 588 std::string fullname;
541 if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname)) 589 if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
542 { 590 {
543 msg.append(fullname); 591// [RLVa:KB]
544 msg.append("\n"); 592 if ( rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) )
593 {
594 // User is not allowed to see who it is, due to RLV settings.
595 msg.append(rlv_handler_t::cstrHidden);
596 }
597 else
598 {
599 msg.append(fullname);
600 msg.append("\n");
601 }
602// [/RLVa:KB]
603 }
604
605// [RLVa:KB]
606 if (rlv_handler_t::isEnabled() && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
607 {
608 // User is not allowed to see where they are, due to RLV settings.
609 msg.append( rlv_handler_t::cstrHidden );
610 }
611 else
612 {
613 msg.append( region->getName() );
545 } 614 }
546 msg.append( region->getName() ); 615// [/RLVa:KB]
547 616
617
618 msg.append("\n");
619 gSavedSettings.getBOOL( "MiniMapTeleport" ) ?
620 msg.append(getString("tooltip_tp")) : msg.append(getString("tooltip_map"));
621 msg.append("\n");
622 msg.append(getString("tooltip_pan"));
623
548#ifndef LL_RELEASE_FOR_DOWNLOAD 624#ifndef LL_RELEASE_FOR_DOWNLOAD
549 std::string buffer; 625 std::string buffer;
550 msg.append("\n"); 626 msg.append("\n");
@@ -554,13 +630,6 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
554 buffer = region->getHost().getString(); 630 buffer = region->getHost().getString();
555 msg.append(buffer); 631 msg.append(buffer);
556#endif 632#endif
557 // *TODO:
558 // - put this under the control of XUI so it can be translated.
559
560 if ( gSavedSettings.getBOOL( "MiniMapTeleport" ))
561 msg.append("\n(Double-click to teleport)");
562 else
563 msg.append("\n(Double-click to open Map)");
564 633
565 S32 SLOP = 4; 634 S32 SLOP = 4;
566 localPointToScreen( 635 localPointToScreen(
@@ -616,11 +685,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &
616 LLVector3 local_pos; 685 LLVector3 local_pos;
617 local_pos.setVec( pos - mObjectImageCenterGlobal ); 686 local_pos.setVec( pos - mObjectImageCenterGlobal );
618 687
619 // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.) 688 S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM);
620 const F32 MAX_RADIUS = 256.0f;
621 F32 radius_clamped = llmin(radius_meters, MAX_RADIUS);
622
623 S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM);
624 renderPoint( local_pos, color, diameter_pixels ); 689 renderPoint( local_pos, color, diameter_pixels );
625} 690}
626 691
@@ -740,6 +805,98 @@ void LLNetMap::createObjectImage()
740 mUpdateNow = TRUE; 805 mUpdateNow = TRUE;
741} 806}
742 807
808BOOL LLNetMap::handleMouseDown( S32 x, S32 y, MASK mask )
809{
810 if (!(mask & MASK_SHIFT)) return FALSE;
811
812 // Start panning
813 gFocusMgr.setMouseCapture( this );
814
815 mMouseDownPanX = llround(mCurPanX);
816 mMouseDownPanY = llround(mCurPanY);
817 mMouseDownX = x;
818 mMouseDownY = y;
819 return TRUE;
820}
821
822BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask )
823{
824 if (hasMouseCapture())
825 {
826 if (mPanning)
827 {
828 // restore mouse cursor
829 S32 local_x, local_y;
830 local_x = mMouseDownX + llfloor(mCurPanX - mMouseDownPanX);
831 local_y = mMouseDownY + llfloor(mCurPanY - mMouseDownPanY);
832 LLRect clip_rect = getRect();
833 clip_rect.stretch(-8);
834 clip_rect.clipPointToRect(mMouseDownX, mMouseDownY, local_x, local_y);
835 LLUI::setCursorPositionLocal(this, local_x, local_y);
836
837 // finish the pan
838 mPanning = FALSE;
839
840 mMouseDownX = 0;
841 mMouseDownY = 0;
842
843 // auto centre
844 mTargetPanX = 0;
845 mTargetPanY = 0;
846 }
847 gViewerWindow->showCursor();
848 gFocusMgr.setMouseCapture( NULL );
849 return TRUE;
850 }
851 return FALSE;
852}
853
854// static
855BOOL LLNetMap::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y)
856{
857 S32 dx = x - start_x;
858 S32 dy = y - start_y;
859
860 return (dx <= -SLOP || SLOP <= dx || dy <= -SLOP || SLOP <= dy);
861}
862
863BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
864{
865 if (hasMouseCapture())
866 {
867 if (mPanning || outsideSlop(x, y, mMouseDownX, mMouseDownY))
868 {
869 // just started panning, so hide cursor
870 if (!mPanning)
871 {
872 mPanning = TRUE;
873 gViewerWindow->hideCursor();
874 }
875
876 F32 delta_x = (F32)(gViewerWindow->getCurrentMouseDX());
877 F32 delta_y = (F32)(gViewerWindow->getCurrentMouseDY());
878
879 // Set pan to value at start of drag + offset
880 mCurPanX += delta_x;
881 mCurPanY += delta_y;
882 mTargetPanX = mCurPanX;
883 mTargetPanY = mCurPanY;
884
885 gViewerWindow->moveCursorToCenter();
886 }
887
888 // Doesn't matter, cursor should be hidden
889 gViewerWindow->setCursor( UI_CURSOR_CROSS );
890 return TRUE;
891 }
892 else
893 {
894 gViewerWindow->setCursor( UI_CURSOR_CROSS );
895 lldebugst(LLERR_USER_INPUT) << "hover handled by LLNetMap" << llendl;
896 return TRUE;
897 }
898}
899
743BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask ) 900BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
744{ 901{
745 if (gSavedSettings.getBOOL( "MiniMapTeleport" )) 902 if (gSavedSettings.getBOOL( "MiniMapTeleport" ))
@@ -792,6 +949,54 @@ bool LLNetMap::LLScaleMap::handleEvent(LLPointer<LLEvent> event, const LLSD& use
792 return true; 949 return true;
793} 950}
794 951
952bool LLNetMap::LLRotateMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
953{
954 BOOL rotate = gSavedSettings.getBOOL("MiniMapRotate");
955 gSavedSettings.setBOOL("MiniMapRotate", !rotate);
956
957 return true;
958}
959
960bool LLNetMap::LLCheckRotateMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
961{
962 LLNetMap *self = mPtr;
963 BOOL enabled = gSavedSettings.getBOOL("MiniMapRotate");
964 self->findControl(userdata["control"].asString())->setValue(enabled);
965 return true;
966}
967
968bool LLNetMap::LLCenterMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
969{
970 S32 center = userdata.asInteger();
971
972 if (gSavedSettings.getS32("MiniMapCenter") == center)
973 {
974 gSavedSettings.setS32("MiniMapCenter", MAP_CENTER_NONE);
975 }
976 else
977 {
978 gSavedSettings.setS32("MiniMapCenter", userdata.asInteger());
979 }
980
981 return true;
982}
983
984bool LLNetMap::LLCheckCenterMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
985{
986 LLNetMap *self = mPtr;
987 EMiniMapCenter center = (EMiniMapCenter)userdata["data"].asInteger();
988 BOOL enabled = (gSavedSettings.getS32("MiniMapCenter") == center);
989
990 self->findControl(userdata["control"].asString())->setValue(enabled);
991 return true;
992}
993
994bool LLNetMap::LLShowWorldMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
995{
996 LLFloaterWorldMap::show(NULL, FALSE);
997 return true;
998}
999
795bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 1000bool LLNetMap::LLStopTracking::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
796{ 1001{
797 LLTracker::stopTracking(NULL); 1002 LLTracker::stopTracking(NULL);
diff --git a/linden/indra/newview/llnetmap.h b/linden/indra/newview/llnetmap.h
index 6a112ad..800b825 100644
--- a/linden/indra/newview/llnetmap.h
+++ b/linden/indra/newview/llnetmap.h
@@ -40,17 +40,27 @@
40#include "llimage.h" 40#include "llimage.h"
41#include "llimagegl.h" 41#include "llimagegl.h"
42 42
43
44class LLTextBox; 43class LLTextBox;
45 44
45typedef enum e_minimap_center
46{
47 MAP_CENTER_NONE = 0,
48 MAP_CENTER_CAMERA = 1
49} EMiniMapCenter;
50
46class LLNetMap : public LLPanel 51class LLNetMap : public LLPanel
47{ 52{
48public: 53public:
49 LLNetMap(const std::string& name); 54 LLNetMap(const std::string& name);
55
56 virtual BOOL postBuild();
50 virtual ~LLNetMap(); 57 virtual ~LLNetMap();
51 58
52 virtual void draw(); 59 virtual void draw();
53 virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); 60 virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
61 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
62 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
63 virtual BOOL handleHover( S32 x, S32 y, MASK mask );
54 virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); 64 virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
55 virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); 65 virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
56 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 66 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
@@ -62,7 +72,7 @@ private:
62 72
63 void setScale( F32 scale ); 73 void setScale( F32 scale );
64 74
65 // *TODO: Enable panning of the mini-map 75 // Not used at present
66 void translatePan( F32 delta_x, F32 delta_y ); 76 void translatePan( F32 delta_x, F32 delta_y );
67 void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; } 77 void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; }
68 78
@@ -91,18 +101,27 @@ private:
91 F32 mTargetPanY; 101 F32 mTargetPanY;
92 F32 mCurPanX; 102 F32 mCurPanX;
93 F32 mCurPanY; 103 F32 mCurPanY;
104
105 BOOL mPanning; // map has been dragged
106 S32 mMouseDownPanX; // value at start of drag
107 S32 mMouseDownPanY; // value at start of drag
108 S32 mMouseDownX;
109 S32 mMouseDownY;
110
94 BOOL mUpdateNow; 111 BOOL mUpdateNow;
95 LLVector3d mObjectImageCenterGlobal; 112 LLVector3d mObjectImageCenterGlobal;
96 LLPointer<LLImageRaw> mObjectRawImagep; 113 LLPointer<LLImageRaw> mObjectRawImagep;
97 LLPointer<LLImageGL> mObjectImagep; 114 LLPointer<LLImageGL> mObjectImagep;
98 115
99private: 116private:
100 LLUUID mClosestAgentToCursor; 117 LLUUID mClosestAgentToCursor;
101 LLUUID mClosestAgentAtLastRightClick; 118 LLUUID mClosestAgentAtLastRightClick;
102 119
103 static BOOL sRotateMap; 120 static BOOL sRotateMap;
104 static LLNetMap* sInstance; 121 static LLNetMap* sInstance;
105 static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); } 122 static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); }
123 static BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y);
124
106 static void showAgentProfile(void*); 125 static void showAgentProfile(void*);
107 BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); } 126 BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); }
108 127
@@ -112,6 +131,36 @@ private:
112 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); 131 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
113 }; 132 };
114 133
134 class LLCenterMap : public LLMemberListener<LLNetMap>
135 {
136 public:
137 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
138 };
139
140 class LLCheckCenterMap : public LLMemberListener<LLNetMap>
141 {
142 public:
143 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
144 };
145
146 class LLRotateMap : public LLMemberListener<LLNetMap>
147 {
148 public:
149 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
150 };
151
152 class LLCheckRotateMap : public LLMemberListener<LLNetMap>
153 {
154 public:
155 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
156 };
157
158 class LLShowWorldMap : public LLMemberListener<LLNetMap>
159 {
160 public:
161 /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
162 };
163
115 class LLStopTracking : public LLMemberListener<LLNetMap> 164 class LLStopTracking : public LLMemberListener<LLNetMap>
116 { 165 {
117 public: 166 public:
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
58LLNotifyBoxView* gNotifyBoxView = NULL; 62LLNotifyBoxView* 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..c1a2354 100644
--- a/linden/indra/newview/lloverlaybar.cpp
+++ b/linden/indra/newview/lloverlaybar.cpp
@@ -41,6 +41,7 @@
41#include "llagent.h" 41#include "llagent.h"
42#include "llbutton.h" 42#include "llbutton.h"
43#include "llchatbar.h" 43#include "llchatbar.h"
44#include "llfloaterchat.h"
44#include "llfocusmgr.h" 45#include "llfocusmgr.h"
45#include "llimview.h" 46#include "llimview.h"
46#include "llmediaremotectrl.h" 47#include "llmediaremotectrl.h"
@@ -62,6 +63,7 @@
62#include "llvoavatar.h" 63#include "llvoavatar.h"
63#include "llvoiceremotectrl.h" 64#include "llvoiceremotectrl.h"
64#include "llwebbrowserctrl.h" 65#include "llwebbrowserctrl.h"
66#include "llwindlightremotectrl.h"
65#include "llselectmgr.h" 67#include "llselectmgr.h"
66 68
67// 69//
@@ -72,6 +74,53 @@ LLOverlayBar *gOverlayBar = NULL;
72 74
73extern S32 MENU_BAR_HEIGHT; 75extern S32 MENU_BAR_HEIGHT;
74 76
77
78class LLTitleObserver
79 : public LLMediaObserver
80{
81public:
82 void init(std::string url);
83 /*virtual*/ void onMediaTitleChange(const EventType& event_in);
84private:
85 LLMediaBase* mMediaSource;
86};
87
88static LLTitleObserver sTitleObserver;
89
90static LLRegisterWidget<LLMediaRemoteCtrl> r("media_remote");
91
92void LLTitleObserver::init(std::string url)
93{
94
95 if (!gAudiop)
96 {
97 return;
98 }
99
100 mMediaSource = gAudiop->getStreamMedia(); // LLViewerMedia::getSource();
101
102 if ( mMediaSource )
103 {
104 mMediaSource->addObserver(this);
105 }
106}
107
108//virtual
109void LLTitleObserver::onMediaTitleChange(const EventType& event_in)
110{
111 if ( !gSavedSettings.getBOOL("ShowStreamTitle") )
112 {
113 return;
114 }
115
116 LLChat chat;
117 //TODO: set this in XUI
118 std::string playing_msg = "Playing: " + event_in.getStringValue();
119 chat.mText = playing_msg;
120 LLFloaterChat::addChat(chat, FALSE, FALSE);
121}
122
123
75// 124//
76// Functions 125// Functions
77// 126//
@@ -92,6 +141,13 @@ void* LLOverlayBar::createVoiceRemote(void* userdata)
92 return self->mVoiceRemote; 141 return self->mVoiceRemote;
93} 142}
94 143
144void* LLOverlayBar::createWindlightRemote(void* userdata)
145{
146 LLOverlayBar *self = (LLOverlayBar*)userdata;
147 self->mWindlightRemote = new LLWindlightRemoteCtrl();
148 return self->mWindlightRemote;
149}
150
95void* LLOverlayBar::createChatBar(void* userdata) 151void* LLOverlayBar::createChatBar(void* userdata)
96{ 152{
97 gChatBar = new LLChatBar(); 153 gChatBar = new LLChatBar();
@@ -102,6 +158,7 @@ LLOverlayBar::LLOverlayBar()
102 : LLPanel(), 158 : LLPanel(),
103 mMediaRemote(NULL), 159 mMediaRemote(NULL),
104 mVoiceRemote(NULL), 160 mVoiceRemote(NULL),
161 mWindlightRemote(NULL),
105 mMusicState(STOPPED), 162 mMusicState(STOPPED),
106 mOriginalIMLabel("") 163 mOriginalIMLabel("")
107{ 164{
@@ -113,6 +170,7 @@ LLOverlayBar::LLOverlayBar()
113 LLCallbackMap::map_t factory_map; 170 LLCallbackMap::map_t factory_map;
114 factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); 171 factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
115 factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); 172 factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
173 factory_map["windlight_remote"] = LLCallbackMap(LLOverlayBar::createWindlightRemote, this);
116 factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); 174 factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this);
117 175
118 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); 176 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map);
@@ -256,7 +314,10 @@ void LLOverlayBar::refresh()
256 BOOL sitting = FALSE; 314 BOOL sitting = FALSE;
257 if (gAgent.getAvatarObject()) 315 if (gAgent.getAvatarObject())
258 { 316 {
259 sitting = gAgent.getAvatarObject()->mIsSitting; 317// sitting = gAgent.getAvatarObject()->mIsSitting;
318// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
319 sitting = gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
320// [/RLVa:KB]
260 } 321 }
261 button = getChild<LLButton>("Stand Up"); 322 button = getChild<LLButton>("Stand Up");
262 323
@@ -269,6 +330,7 @@ void LLOverlayBar::refresh()
269 } 330 }
270 331
271 332
333 moveChildToBackOfTabGroup(mWindlightRemote);
272 moveChildToBackOfTabGroup(mMediaRemote); 334 moveChildToBackOfTabGroup(mMediaRemote);
273 moveChildToBackOfTabGroup(mVoiceRemote); 335 moveChildToBackOfTabGroup(mVoiceRemote);
274 336
@@ -277,6 +339,7 @@ void LLOverlayBar::refresh()
277 { 339 {
278 childSetVisible("media_remote_container", FALSE); 340 childSetVisible("media_remote_container", FALSE);
279 childSetVisible("voice_remote_container", FALSE); 341 childSetVisible("voice_remote_container", FALSE);
342 childSetVisible("windlight_remote_container", FALSE);
280 childSetVisible("state_buttons", FALSE); 343 childSetVisible("state_buttons", FALSE);
281 } 344 }
282 else 345 else
@@ -284,6 +347,7 @@ void LLOverlayBar::refresh()
284 // update "remotes" 347 // update "remotes"
285 childSetVisible("media_remote_container", TRUE); 348 childSetVisible("media_remote_container", TRUE);
286 childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); 349 childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
350 childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote"));
287 childSetVisible("state_buttons", TRUE); 351 childSetVisible("state_buttons", TRUE);
288 } 352 }
289 353
@@ -336,6 +400,13 @@ void LLOverlayBar::onClickMouselook(void*)
336//static 400//static
337void LLOverlayBar::onClickStandUp(void*) 401void LLOverlayBar::onClickStandUp(void*)
338{ 402{
403// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
404 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) )
405 {
406 return;
407 }
408// [/RLVa:KB]
409
339 LLSelectMgr::getInstance()->deselectAllForStandingUp(); 410 LLSelectMgr::getInstance()->deselectAllForStandingUp();
340 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); 411 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
341} 412}
@@ -406,6 +477,7 @@ void LLOverlayBar::toggleMusicPlay(void*)
406 // if ( gAudiop->isInternetStreamPlaying() == 0 ) 477 // if ( gAudiop->isInternetStreamPlaying() == 0 )
407 { 478 {
408 gAudiop->startInternetStream(parcel->getMusicURL()); 479 gAudiop->startInternetStream(parcel->getMusicURL());
480 sTitleObserver.init(parcel->getMusicURL());
409 } 481 }
410 } 482 }
411 } 483 }
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;
40class LLButton; 40class LLButton;
41class LLLineEditor; 41class LLLineEditor;
42class LLMediaRemoteCtrl; 42class LLMediaRemoteCtrl;
43
43class LLMessageSystem; 44class LLMessageSystem;
44class LLTextBox; 45class LLTextBox;
45class LLTextEditor; 46class LLTextEditor;
@@ -49,6 +50,7 @@ class LLFrameTimer;
49class LLStatGraph; 50class LLStatGraph;
50class LLSlider; 51class LLSlider;
51class LLVoiceRemoteCtrl; 52class LLVoiceRemoteCtrl;
53class LLWindlightRemoteCtrl;
52 54
53class LLOverlayBar 55class LLOverlayBar
54: public LLPanel 56: public LLPanel
@@ -88,13 +90,15 @@ public:
88protected: 90protected:
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
95protected: 98protected:
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 @@
86std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels; 87std::list<LLPanelAvatar*> LLPanelAvatar::sAllPanels;
87BOOL LLPanelAvatar::sAllowFirstLife = FALSE; 88BOOL LLPanelAvatar::sAllowFirstLife = FALSE;
88 89
90extern void callback_invite_to_group(LLUUID group_id, void *user_data);
89extern void handle_lure(const LLUUID& invitee); 91extern void handle_lure(const LLUUID& invitee);
90extern void handle_pay_by_id(const LLUUID& payee); 92extern 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
925void LLPanelAvatarClassified::onClickNew(void* data) 931void 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
1099void LLPanelAvatarPicks::onClickNew(void* data) 1114void 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
1590void 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
965void LLPanelClassified::onClickSet(void* data) 968void 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
695void LLPanelDisplay::apply() 710void 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
706void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data) 723void 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/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp
index f370116..490e40d 100644
--- a/linden/indra/newview/llpanelgeneral.cpp
+++ b/linden/indra/newview/llpanelgeneral.cpp
@@ -60,7 +60,6 @@ BOOL LLPanelGeneral::postBuild()
60 childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); 60 childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames"));
61 childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); 61 childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle"));
62 childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); 62 childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout"));
63 childSetValue("rotate_mini_map_checkbox", gSavedSettings.getBOOL("MiniMapRotate"));
64 childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); 63 childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange"));
65 childSetValue("use_system_color_picker_checkbox", gSavedSettings.getBOOL("UseDefaultColorPicker")); 64 childSetValue("use_system_color_picker_checkbox", gSavedSettings.getBOOL("UseDefaultColorPicker"));
66 childSetValue("show_search_panel", gSavedSettings.getBOOL("ShowSearchBar")); 65 childSetValue("show_search_panel", gSavedSettings.getBOOL("ShowSearchBar"));
@@ -96,7 +95,6 @@ void LLPanelGeneral::apply()
96 gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); 95 gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox"));
97 gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); 96 gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox"));
98 gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); 97 gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal());
99 gSavedSettings.setBOOL("MiniMapRotate", childGetValue("rotate_mini_map_checkbox"));
100 gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); 98 gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox"));
101 gSavedSettings.setBOOL("UseDefaultColorPicker", childGetValue("use_system_color_picker_checkbox")); 99 gSavedSettings.setBOOL("UseDefaultColorPicker", childGetValue("use_system_color_picker_checkbox"));
102 gSavedSettings.setBOOL("ShowSearchBar", childGetValue("show_search_panel")); 100 gSavedSettings.setBOOL("ShowSearchBar", childGetValue("show_search_panel"));
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
365BOOL LLTaskInvFVBridge::isItemRenameable() const 369BOOL 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
382BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) 394BOOL 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
414BOOL LLTaskInvFVBridge::isItemRemovable() 451BOOL 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
1181void LLTaskLSLBridge::openItem() 1249void 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
231void LLPanelLandInfo::onClickClaim(void*) 231void 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
79std::string load_password_from_disk(void); 83std::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..9dcf410 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 {
@@ -618,6 +631,10 @@ void LLPanelObject::getState( )
618 } 631 }
619 else 632 else
620 { 633 {
634 mCtrlScaleX->setMaxValue(LLManipScale::getMaxPrimSize());
635 mCtrlScaleY->setMaxValue(LLManipScale::getMaxPrimSize());
636 mCtrlScaleZ->setMaxValue(LLManipScale::getMaxPrimSize());
637
621 // Only allowed to change these parameters for objects 638 // Only allowed to change these parameters for objects
622 // that you have permissions on AND are not attachments. 639 // that you have permissions on AND are not attachments.
623 enabled = root_objectp->permModify(); 640 enabled = root_objectp->permModify();
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
882void 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
456void LLPanelPick::onClickSet(void* data) 462void 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
77LLPrefsChatImpl::LLPrefsChatImpl() 79LLPrefsChatImpl::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
188LLPrefsChat::LLPrefsChat() 206LLPrefsChat::LLPrefsChat()
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp
index 1af6e86..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
@@ -96,6 +96,7 @@ BOOL LLPrefsIMImpl::postBuild()
96 childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); 96 childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change"));
97 97
98 // Don't enable this until we get personal data 98 // Don't enable this until we get personal data
99 childDisable("include_im_in_chat_console");
99 childDisable("include_im_in_chat_history"); 100 childDisable("include_im_in_chat_history");
100 childDisable("show_timestamps_check"); 101 childDisable("show_timestamps_check");
101 childDisable("friends_online_notify_checkbox"); 102 childDisable("friends_online_notify_checkbox");
@@ -114,6 +115,7 @@ BOOL LLPrefsIMImpl::postBuild()
114 115
115 childSetText("busy_response", getString("log_in_to_change")); 116 childSetText("busy_response", getString("log_in_to_change"));
116 117
118 childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole"));
117 childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); 119 childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory"));
118 childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); 120 childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps"));
119 childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); 121 childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification"));
@@ -163,6 +165,7 @@ void LLPrefsIMImpl::apply()
163 165
164 gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response))); 166 gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response)));
165 167
168 gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean());
166 gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); 169 gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean());
167 gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean()); 170 gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean());
168 gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); 171 gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean());
@@ -234,6 +237,7 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e
234 mOriginalHideOnlineStatus = true; 237 mOriginalHideOnlineStatus = true;
235 } 238 }
236 239
240 childEnable("include_im_in_chat_console");
237 childEnable("include_im_in_chat_history"); 241 childEnable("include_im_in_chat_history");
238 childEnable("show_timestamps_check"); 242 childEnable("show_timestamps_check");
239 childEnable("friends_online_notify_checkbox"); 243 childEnable("friends_online_notify_checkbox");
@@ -255,6 +259,12 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e
255 LLWStringUtil::replaceChar(busy_response, '^', '\n'); 259 LLWStringUtil::replaceChar(busy_response, '^', '\n');
256 LLWStringUtil::replaceChar(busy_response, '%', ' '); 260 LLWStringUtil::replaceChar(busy_response, '%', ' ');
257 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]
258 268
259 enableHistory(); 269 enableHistory();
260 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)
2371void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) 2383void 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 7afe073..af97e2e 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -106,6 +106,7 @@ BOOL gHideSelectedObjects = FALSE;
106BOOL gAllowSelectAvatar = FALSE; 106BOOL gAllowSelectAvatar = FALSE;
107 107
108BOOL LLSelectMgr::sRectSelectInclusive = TRUE; 108BOOL LLSelectMgr::sRectSelectInclusive = TRUE;
109BOOL LLSelectMgr::sRenderSelectionHighlights = TRUE;
109BOOL LLSelectMgr::sRenderHiddenSelections = TRUE; 110BOOL LLSelectMgr::sRenderHiddenSelections = TRUE;
110BOOL LLSelectMgr::sRenderLightRadius = FALSE; 111BOOL LLSelectMgr::sRenderLightRadius = FALSE;
111F32 LLSelectMgr::sHighlightThickness = 0.f; 112F32 LLSelectMgr::sHighlightThickness = 0.f;
@@ -3450,12 +3451,20 @@ void LLSelectMgr::deselectAllIfTooFar()
3450 } 3451 }
3451 3452
3452 LLVector3d selectionCenter = getSelectionCenterGlobal(); 3453 LLVector3d selectionCenter = getSelectionCenterGlobal();
3453 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]
3454 && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) 3460 && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar())
3455 && !mSelectedObjects->isAttachment() 3461 && !mSelectedObjects->isAttachment()
3456 && !selectionCenter.isExactlyZero()) 3462 && !selectionCenter.isExactlyZero())
3457 { 3463 {
3458 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]
3459 F32 deselect_dist_sq = deselect_dist * deselect_dist; 3468 F32 deselect_dist_sq = deselect_dist * deselect_dist;
3460 3469
3461 LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter; 3470 LLVector3d select_delta = gAgent.getPositionGlobal() - selectionCenter;
@@ -4551,6 +4560,11 @@ extern LLGLdouble gGLModelView[16];
4551 4560
4552void LLSelectMgr::updateSilhouettes() 4561void LLSelectMgr::updateSilhouettes()
4553{ 4562{
4563 if (!mRenderSilhouettes || !LLSelectMgr::sRenderSelectionHighlights)
4564 {
4565 return;
4566 }
4567
4554 S32 num_sils_genned = 0; 4568 S32 num_sils_genned = 0;
4555 4569
4556 LLVector3d cameraPos = gAgent.getCameraPositionGlobal(); 4570 LLVector3d cameraPos = gAgent.getCameraPositionGlobal();
@@ -4823,7 +4837,7 @@ void LLSelectMgr::updateSilhouettes()
4823 4837
4824void LLSelectMgr::renderSilhouettes(BOOL for_hud) 4838void LLSelectMgr::renderSilhouettes(BOOL for_hud)
4825{ 4839{
4826 if (!mRenderSilhouettes) 4840 if (!mRenderSilhouettes || !LLSelectMgr::sRenderSelectionHighlights)
4827 { 4841 {
4828 return; 4842 return;
4829 } 4843 }
diff --git a/linden/indra/newview/llselectmgr.h b/linden/indra/newview/llselectmgr.h
index a332053..3f32373 100644
--- a/linden/indra/newview/llselectmgr.h
+++ b/linden/indra/newview/llselectmgr.h
@@ -337,6 +337,7 @@ class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr>
337{ 337{
338public: 338public:
339 static BOOL sRectSelectInclusive; // do we need to surround an object to pick it? 339 static BOOL sRectSelectInclusive; // do we need to surround an object to pick it?
340 static BOOL sRenderSelectionHighlights; // do we show selection silhouettes?
340 static BOOL sRenderHiddenSelections; // do we show selection silhouettes that are occluded? 341 static BOOL sRenderHiddenSelections; // do we show selection silhouettes that are occluded?
341 static BOOL sRenderLightRadius; // do we show the radius of selected lights? 342 static BOOL sRenderLightRadius; // do we show the radius of selected lights?
342 static F32 sHighlightThickness; 343 static F32 sHighlightThickness;
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp
index 127fca2..cdca5d5 100644
--- a/linden/indra/newview/llspatialpartition.cpp
+++ b/linden/indra/newview/llspatialpartition.cpp
@@ -563,7 +563,7 @@ void LLSpatialGroup::rebuildGeom()
563 563
564void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) 564void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
565{ 565{
566 if (group->changeLOD()) 566 if (!LLPipeline::sSkipUpdate && group->changeLOD())
567 { 567 {
568 group->mLastUpdateDistance = group->mDistance; 568 group->mLastUpdateDistance = group->mDistance;
569 group->mLastUpdateViewAngle = group->mViewAngle; 569 group->mLastUpdateViewAngle = group->mViewAngle;
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index aca3cac..ea08298 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
@@ -1003,6 +1025,7 @@ bool idle_startup()
1003 requested_options.push_back("event_categories"); 1025 requested_options.push_back("event_categories");
1004 requested_options.push_back("event_notifications"); 1026 requested_options.push_back("event_notifications");
1005 requested_options.push_back("classified_categories"); 1027 requested_options.push_back("classified_categories");
1028 requested_options.push_back("adult_compliant");
1006 //requested_options.push_back("inventory-targets"); 1029 //requested_options.push_back("inventory-targets");
1007 requested_options.push_back("buddy-list"); 1030 requested_options.push_back("buddy-list");
1008 requested_options.push_back("ui-config"); 1031 requested_options.push_back("ui-config");
@@ -2462,6 +2485,10 @@ bool idle_startup()
2462 2485
2463 // Have the agent start watching the friends list so we can update proxies 2486 // Have the agent start watching the friends list so we can update proxies
2464 gAgent.observeFriends(); 2487 gAgent.observeFriends();
2488
2489 // Start loading inventory
2490 gInventory.startBackgroundFetch();
2491
2465 if (gSavedSettings.getBOOL("LoginAsGod")) 2492 if (gSavedSettings.getBOOL("LoginAsGod"))
2466 { 2493 {
2467 gAgent.requestEnterGodMode(); 2494 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
815static void onClickBuyLand(void*) 824static 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
48LLStyleMap &LLStyleMap::instance() 48LLStyleMap &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.
56const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) 56const 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.
81const 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
80void LLStyleMap::update() 111void 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/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp
index ec5cf78..94a5372 100644
--- a/linden/indra/newview/lltexturecache.cpp
+++ b/linden/indra/newview/lltexturecache.cpp
@@ -1527,19 +1527,13 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio
1527 purgeTextureFilesTimeSliced(); // purge textures from cache in a non-hiccup-way 1527 purgeTextureFilesTimeSliced(); // purge textures from cache in a non-hiccup-way
1528 1528
1529 1529
1530 if (datasize >= TEXTURE_CACHE_ENTRY_SIZE) 1530 LLMutexLock lock(&mWorkersMutex);
1531 { 1531 LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id,
1532 LLMutexLock lock(&mWorkersMutex); 1532 data, datasize, 0,
1533 llassert_always(imagesize > 0); 1533 imagesize, responder);
1534 LLTextureCacheWorker* worker = new LLTextureCacheRemoteWorker(this, priority, id, 1534 handle_t handle = worker->write();
1535 data, datasize, 0, 1535 mWriters[handle] = worker;
1536 imagesize, responder); 1536 return handle;
1537 handle_t handle = worker->write();
1538 mWriters[handle] = worker;
1539 return handle;
1540 }
1541 delete responder;
1542 return LLWorkerThread::nullHandle();
1543} 1537}
1544 1538
1545bool LLTextureCache::writeComplete(handle_t handle, bool abort) 1539bool LLTextureCache::writeComplete(handle_t handle, bool abort)
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
68BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) 67BOOL 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
127BOOL 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
134BOOL 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
128BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) 141BOOL 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
103U8 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
102void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, 119void 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
104private:
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(
2013EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( 2051EAcceptance 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(
2076EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( 2121EAcceptance 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(
2645EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( 2712EAcceptance 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(
2666EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( 2741EAcceptance 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 dda21dd..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)
@@ -156,6 +164,20 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
156} 164}
157 165
158 166
167static S32 getTreeGrassSpecies(std::map<std::string, S32> &table, const char *control, S32 max)
168{
169 const std::string &species = gSavedSettings.getString(control);
170 std::map<std::string, S32>::iterator it;
171 it = table.find(species);
172 if (it != table.end()) {
173 return it->second;
174 } else {
175 // if saved species not found, default to "Random"
176 return (rand() % max);
177 }
178}
179
180
159BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) 181BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
160{ 182{
161 LLVector3 ray_start_region; 183 LLVector3 ray_start_region;
@@ -200,13 +222,13 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
200 case LL_PCODE_LEGACY_GRASS: 222 case LL_PCODE_LEGACY_GRASS:
201 // Randomize size of grass patch 223 // Randomize size of grass patch
202 scale.setVec(10.f + ll_frand(20.f), 10.f + ll_frand(20.f), 1.f + ll_frand(2.f)); 224 scale.setVec(10.f + ll_frand(20.f), 10.f + ll_frand(20.f), 1.f + ll_frand(2.f));
203 state = rand() % LLVOGrass::sMaxGrassSpecies; 225 state = getTreeGrassSpecies(LLVOGrass::sSpeciesNames, "LastGrass", LLVOGrass::sMaxGrassSpecies);
204 break; 226 break;
205 227
206 228
207 case LL_PCODE_LEGACY_TREE: 229 case LL_PCODE_LEGACY_TREE:
208 case LL_PCODE_TREE_NEW: 230 case LL_PCODE_TREE_NEW:
209 state = rand() % LLVOTree::sMaxTreeSpecies; 231 state = getTreeGrassSpecies(LLVOTree::sSpeciesNames, "LastTree", LLVOTree::sMaxTreeSpecies);
210 break; 232 break;
211 233
212 case LL_PCODE_SPHERE: 234 case LL_PCODE_SPHERE:
@@ -241,7 +263,10 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
241 { 263 {
242 flags |= FLAGS_USE_PHYSICS; 264 flags |= FLAGS_USE_PHYSICS;
243 } 265 }
244 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]
245 { 270 {
246 flags |= FLAGS_CREATE_SELECTED; 271 flags |= FLAGS_CREATE_SELECTED;
247 } 272 }
@@ -499,6 +524,13 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
499{ 524{
500 BOOL added = TRUE; 525 BOOL added = TRUE;
501 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
502 if (gSavedSettings.getBOOL("CreateToolCopySelection")) 534 if (gSavedSettings.getBOOL("CreateToolCopySelection"))
503 { 535 {
504 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
54extern BOOL gAllowSelectAvatar; 58extern 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
427bool rlvHandleEnableLegacyNamingChanged(const LLSD& newvalue)
428{
429 rlv_handler_t::fLegacyNaming = newvalue.asBoolean();
430 return true;
431}
432
433bool rlvHandleShowNameTagsChanged(const LLSD& newvalue)
434{
435 RlvSettings::fShowNameTags = newvalue.asBoolean();
436 return true;
437}
438// [/RLVa:KB]
439
426bool handleMediaDebugLevelChanged(const LLSD& newvalue) 440bool 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
571template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) 592template <> 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 847336d..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
213void init_client_menu(LLMenuGL* menu); 217void init_client_menu(LLMenuGL* menu);
214void init_server_menu(LLMenuGL* menu); 218void init_server_menu(LLMenuGL* menu);
@@ -219,6 +223,13 @@ void init_debug_ui_menu(LLMenuGL* menu);
219void init_debug_xui_menu(LLMenuGL* menu); 223void init_debug_xui_menu(LLMenuGL* menu);
220void init_debug_avatar_menu(LLMenuGL* menu); 224void init_debug_avatar_menu(LLMenuGL* menu);
221void init_debug_baked_texture_menu(LLMenuGL* menu); 225void 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"
231void init_debug_rlva_menu(LLMenuGL* menu);
232// [/RLVa:KB]
222 233
223BOOL enable_land_build(void*); 234BOOL enable_land_build(void*);
224BOOL enable_object_build(void*); 235BOOL 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
1401void 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
1369void init_server_menu(LLMenuGL* menu) 1447void 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
2268class 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
2280class 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
2301class 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
2359class 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
2378class 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
2387class 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
2396class 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
2107bool handle_go_to() 2405bool 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);
2436
2437 LLViewerParcelMgr::getInstance()->deselectLand();
2132 2438
2133 // Could be first use 2439 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2134 LLFirstUse::useGoTo(); 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 {
@@ -4188,9 +4613,33 @@ class LLToolsEnableUnlink : public view_listener_t
4188{ 4613{
4189 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4614 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4190 { 4615 {
4191 bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && 4616 bool new_value = false;
4617 if (LLSelectMgr::getInstance()->selectGetAllRootsValid() &&
4192 LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && 4618 LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() &&
4193 !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment(); 4619 !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment())
4620 {
4621 if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 0 &&
4622 LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() !=
4623 LLSelectMgr::getInstance()->getSelection()->getObjectCount())
4624 {
4625 new_value = true;
4626 }
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
4194 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 4643 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
4195 return true; 4644 return true;
4196 } 4645 }
@@ -4200,6 +4649,19 @@ class LLToolsUnlink : public view_listener_t
4200{ 4649{
4201 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4650 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4202 { 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
4203 LLSelectMgr::getInstance()->sendDelink(); 4665 LLSelectMgr::getInstance()->sendDelink();
4204 return true; 4666 return true;
4205 } 4667 }
@@ -4219,6 +4681,13 @@ class LLToolsReleaseKeys : public view_listener_t
4219{ 4681{
4220 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4682 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4221 { 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
4222 gAgent.forceReleaseControls(); 4691 gAgent.forceReleaseControls();
4223 4692
4224 return true; 4693 return true;
@@ -4229,7 +4698,11 @@ class LLToolsEnableReleaseKeys : public view_listener_t
4229{ 4698{
4230 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4699 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4231 { 4700 {
4232 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() );
4233 return true; 4706 return true;
4234 } 4707 }
4235}; 4708};
@@ -4337,6 +4810,15 @@ class LLEditEnableDelete : public view_listener_t
4337 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4810 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4338 { 4811 {
4339 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
4340 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 4822 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
4341 return true; 4823 return true;
4342 } 4824 }
@@ -4346,6 +4828,15 @@ class LLEditDelete : public view_listener_t
4346{ 4828{
4347 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4829 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4348 { 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
4349 // 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
4350 // an object in the world. 4841 // an object in the world.
4351 if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete()) 4842 if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete())
@@ -4377,6 +4868,12 @@ class LLObjectEnableDelete : public view_listener_t
4377# endif 4868# endif
4378 LLSelectMgr::getInstance()->canDoDelete(); 4869 LLSelectMgr::getInstance()->canDoDelete();
4379#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]
4380 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 4877 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
4381 return true; 4878 return true;
4382 } 4879 }
@@ -4395,6 +4892,13 @@ class LLObjectDelete : public view_listener_t
4395{ 4892{
4396 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4893 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4397 { 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
4398 if (LLSelectMgr::getInstance()) 4902 if (LLSelectMgr::getInstance())
4399 { 4903 {
4400 LLSelectMgr::getInstance()->doDelete(); 4904 LLSelectMgr::getInstance()->doDelete();
@@ -4542,6 +5046,25 @@ void print_agent_nvpairs(void*)
4542 llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; 5046 llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl;
4543} 5047}
4544 5048
5049class LLViewToggleAdvanced : public view_listener_t
5050{
5051 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5052 {
5053 toggle_debug_menus(NULL);
5054 return true;
5055 }
5056};
5057
5058class LLViewCheckAdvanced : public view_listener_t
5059{
5060 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5061 {
5062 BOOL new_value = gSavedSettings.getBOOL("UseDebugMenus");
5063 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
5064 return true;
5065 }
5066};
5067
4545void show_debug_menus() 5068void show_debug_menus()
4546{ 5069{
4547 // this can get called at login screen where there is no menu so only toggle it if one exists 5070 // this can get called at login screen where there is no menu so only toggle it if one exists
@@ -4725,6 +5248,12 @@ class LLWorldCreateLandmark : public view_listener_t
4725{ 5248{
4726 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5249 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4727 { 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]
4728 LLViewerRegion* agent_region = gAgent.getRegion(); 5257 LLViewerRegion* agent_region = gAgent.getRegion();
4729 if(!agent_region) 5258 if(!agent_region)
4730 { 5259 {
@@ -4832,6 +5361,13 @@ class LLAvatarInviteToGroup : public view_listener_t
4832{ 5361{
4833 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5362 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4834 { 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
4835 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); 5371 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
4836 if(avatar) 5372 if(avatar)
4837 { 5373 {
@@ -4845,6 +5381,13 @@ class LLAvatarAddFriend : public view_listener_t
4845{ 5381{
4846 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5382 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4847 { 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
4848 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); 5391 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
4849 if(avatar && !is_agent_friend(avatar->getID())) 5392 if(avatar && !is_agent_friend(avatar->getID()))
4850 { 5393 {
@@ -4932,6 +5475,12 @@ class LLEnablePayObject : public view_listener_t
4932 } 5475 }
4933 } 5476 }
4934 } 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
4935 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 5484 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
4936 return true; 5485 return true;
4937 } 5486 }
@@ -5120,6 +5669,12 @@ class LLShowFloater : public view_listener_t
5120 } 5669 }
5121 else if (floater_name == "buy land") 5670 else if (floater_name == "buy land")
5122 { 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]
5123 if (LLViewerParcelMgr::getInstance()->selectionEmpty()) 5678 if (LLViewerParcelMgr::getInstance()->selectionEmpty())
5124 { 5679 {
5125 LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); 5680 LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal());
@@ -5182,6 +5737,10 @@ class LLShowFloater : public view_listener_t
5182 { 5737 {
5183 LLFloaterActiveSpeakers::toggleInstance(LLSD()); 5738 LLFloaterActiveSpeakers::toggleInstance(LLSD());
5184 } 5739 }
5740 else if (floater_name == "animation list")
5741 {
5742 JCFloaterAnimList::toggleInstance(LLSD());
5743 }
5185 else if (floater_name == "inworld browser") 5744 else if (floater_name == "inworld browser")
5186 { 5745 {
5187 LLFloaterMediaBrowser::toggle(); 5746 LLFloaterMediaBrowser::toggle();
@@ -5297,6 +5856,13 @@ class LLShowAgentProfile : public view_listener_t
5297 } 5856 }
5298 else if (userdata.asString() == "hit object") 5857 else if (userdata.asString() == "hit object")
5299 { 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
5300 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); 5866 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
5301 if (objectp) 5867 if (objectp)
5302 { 5868 {
@@ -5356,6 +5922,13 @@ class LLLandEdit : public view_listener_t
5356{ 5922{
5357 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5923 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5358 { 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
5359 if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) 5932 if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") )
5360 { 5933 {
5361 // zoom in if we're looking at the avatar 5934 // zoom in if we're looking at the avatar
@@ -5374,7 +5947,6 @@ class LLLandEdit : public view_listener_t
5374 5947
5375 LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); 5948 LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal );
5376 5949
5377 gFloaterTools->showMore(TRUE);
5378 gFloaterView->bringToFront( gFloaterTools ); 5950 gFloaterView->bringToFront( gFloaterTools );
5379 5951
5380 // Switch to land edit toolset 5952 // Switch to land edit toolset
@@ -5441,6 +6013,18 @@ private:
5441 LLViewerJointAttachment* attachment_point = NULL; 6013 LLViewerJointAttachment* attachment_point = NULL;
5442 if (index > 0) 6014 if (index > 0)
5443 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
5444 confirm_replace_attachment(0, attachment_point); 6028 confirm_replace_attachment(0, attachment_point);
5445 } 6029 }
5446 return true; 6030 return true;
@@ -5548,6 +6132,24 @@ class LLAttachmentDrop : public view_listener_t
5548 return true; 6132 return true;
5549 } 6133 }
5550 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
5551 // The sendDropAttachment() method works on the list of selected 6153 // The sendDropAttachment() method works on the list of selected
5552 // 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
5553 // contains the object the user clicked, send the message, 6155 // contains the object the user clicked, send the message,
@@ -5566,6 +6168,13 @@ void handle_detach_from_avatar(void* user_data)
5566 6168
5567 if (attached_object) 6169 if (attached_object)
5568 { 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
5569 gMessageSystem->newMessage("ObjectDetach"); 6178 gMessageSystem->newMessage("ObjectDetach");
5570 gMessageSystem->nextBlockFast(_PREHASH_AgentData); 6179 gMessageSystem->nextBlockFast(_PREHASH_AgentData);
5571 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); 6180 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
@@ -5648,6 +6257,17 @@ class LLAttachmentDetach : public view_listener_t
5648 return true; 6257 return true;
5649 } 6258 }
5650 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
5651 // The sendDetach() method works on the list of selected 6271 // The sendDetach() method works on the list of selected
5652 // 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
5653 // contains the object the user clicked, send the message, 6273 // contains the object the user clicked, send the message,
@@ -5731,7 +6351,10 @@ class LLAttachmentEnableDrop : public view_listener_t
5731 } 6351 }
5732 6352
5733 //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
5734 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]
5735 6358
5736 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 6359 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
5737 return true; 6360 return true;
@@ -5751,6 +6374,20 @@ BOOL enable_detach(void*)
5751 // ...if it's you, good to detach 6374 // ...if it's you, good to detach
5752 if (avatar->getID() == gAgent.getID()) 6375 if (avatar->getID() == gAgent.getID())
5753 { 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]
5754 return TRUE; 6391 return TRUE;
5755 } 6392 }
5756 6393
@@ -5773,6 +6410,25 @@ class LLAttachmentEnableDetach : public view_listener_t
5773// 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.
5774BOOL object_selected_and_point_valid(void *user_data) 6411BOOL object_selected_and_point_valid(void *user_data)
5775{ 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
5776 //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; 6432 //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
5777 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); 6433 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
5778 for (LLObjectSelection::root_iterator iter = selection->root_begin(); 6434 for (LLObjectSelection::root_iterator iter = selection->root_begin();
@@ -5840,7 +6496,13 @@ BOOL object_attached(void *user_data)
5840{ 6496{
5841 LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; 6497 LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
5842 6498
5843 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;
5844} 6506}
5845 6507
5846class LLAvatarSendIM : public view_listener_t 6508class LLAvatarSendIM : public view_listener_t
@@ -5848,6 +6510,12 @@ class LLAvatarSendIM : public view_listener_t
5848 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 6510 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5849 { 6511 {
5850 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]
5851 if(avatar) 6519 if(avatar)
5852 { 6520 {
5853 std::string name("IM"); 6521 std::string name("IM");
@@ -5983,6 +6651,16 @@ class LLToolsSelectedScriptAction : public view_listener_t
5983{ 6651{
5984 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 6652 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5985 { 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
5986 std::string action = userdata.asString(); 6664 std::string action = userdata.asString();
5987 if (action == "compile mono") 6665 if (action == "compile mono")
5988 { 6666 {
@@ -6043,7 +6721,10 @@ void handle_selected_texture_info(void*)
6043 S32 height = img->getHeight(); 6721 S32 height = img->getHeight();
6044 S32 width = img->getWidth(); 6722 S32 width = img->getWidth();
6045 S32 components = img->getComponents(); 6723 S32 components = img->getComponents();
6046 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(),
6047 width, 6728 width,
6048 height, 6729 height,
6049 (components == 4 ? "alpha" : "opaque")); 6730 (components == 4 ? "alpha" : "opaque"));
@@ -6064,12 +6745,30 @@ void handle_dump_image_list(void*)
6064 6745
6065void handle_test_male(void*) 6746void handle_test_male(void*)
6066{ 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
6067 wear_outfit_by_name("Male Shape & Outfit"); 6757 wear_outfit_by_name("Male Shape & Outfit");
6068 //gGestureList.requestResetFromServer( TRUE ); 6758 //gGestureList.requestResetFromServer( TRUE );
6069} 6759}
6070 6760
6071void handle_test_female(void*) 6761void handle_test_female(void*)
6072{ 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
6073 wear_outfit_by_name("Female Shape & Outfit"); 6772 wear_outfit_by_name("Female Shape & Outfit");
6074 //gGestureList.requestResetFromServer( FALSE ); 6773 //gGestureList.requestResetFromServer( FALSE );
6075} 6774}
@@ -6212,6 +6911,22 @@ BOOL enable_more_than_one_selected(void* )
6212 6911
6213static bool is_editable_selected() 6912static bool is_editable_selected()
6214{ 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
6215 return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); 6930 return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL);
6216} 6931}
6217 6932
@@ -6258,7 +6973,12 @@ class LLToolsEnableTakeCopy : public view_listener_t
6258 { 6973 {
6259 virtual bool apply(LLViewerObject* obj) 6974 virtual bool apply(LLViewerObject* obj)
6260 { 6975 {
6261 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]
6262 } 6982 }
6263 } func; 6983 } func;
6264 const bool firstonly = true; 6984 const bool firstonly = true;
@@ -6461,6 +7181,9 @@ class LLWorldEnableCreateLandmark : public view_listener_t
6461 { 7181 {
6462 bool new_value = gAgent.isGodlike() || 7182 bool new_value = gAgent.isGodlike() ||
6463 (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]
6464 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 7187 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
6465 return true; 7188 return true;
6466 } 7189 }
@@ -6513,7 +7236,11 @@ BOOL enable_god_customer_service(void*)
6513 7236
6514BOOL enable_god_basic(void*) 7237BOOL enable_god_basic(void*)
6515{ 7238{
6516 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;
6517} 7244}
6518 7245
6519#if 0 // 1.9.2 7246#if 0 // 1.9.2
@@ -6598,6 +7325,17 @@ class LLToolsSelectBySurrounding : public view_listener_t
6598 } 7325 }
6599}; 7326};
6600 7327
7328class LLToolsShowSelectionHighlights : public view_listener_t
7329{
7330 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7331 {
7332 LLSelectMgr::sRenderSelectionHighlights = !LLSelectMgr::sRenderSelectionHighlights;
7333
7334 gSavedSettings.setBOOL("RenderHighlightSelections", LLSelectMgr::sRenderSelectionHighlights);
7335 return true;
7336 }
7337};
7338
6601class LLToolsShowHiddenSelection : public view_listener_t 7339class LLToolsShowHiddenSelection : public view_listener_t
6602{ 7340{
6603 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7341 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -7013,6 +7751,13 @@ class LLViewHighlightTransparent : public view_listener_t
7013{ 7751{
7014 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7752 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7015 { 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
7016 LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; 7761 LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha;
7017 return true; 7762 return true;
7018 } 7763 }
@@ -7060,6 +7805,13 @@ class LLViewShowHUDAttachments : public view_listener_t
7060{ 7805{
7061 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7806 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7062 { 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
7063 LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; 7815 LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments;
7064 return true; 7816 return true;
7065 } 7817 }
@@ -7118,6 +7870,15 @@ class LLEditEnableTakeOff : public view_listener_t
7118 { 7870 {
7119 new_value = LLAgent::selfHasWearable((void *)WT_SKIRT); 7871 new_value = LLAgent::selfHasWearable((void *)WT_SKIRT);
7120 } 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
7121 gMenuHolder->findControl(control_name)->setValue(new_value); 7882 gMenuHolder->findControl(control_name)->setValue(new_value);
7122 return true; 7883 return true;
7123 } 7884 }
@@ -7215,6 +7976,13 @@ class LLWorldEnvSettings : public view_listener_t
7215{ 7976{
7216 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7977 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7217 { 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
7218 std::string tod = userdata.asString(); 7986 std::string tod = userdata.asString();
7219 LLVector3 sun_direction; 7987 LLVector3 sun_direction;
7220 7988
@@ -7292,6 +8060,13 @@ class LLWorldWaterSettings : public view_listener_t
7292{ 8060{
7293 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 8061 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7294 { 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
7295 // if not there or is hidden, show it 8070 // if not there or is hidden, show it
7296 if( !LLFloaterWater::isOpen() || 8071 if( !LLFloaterWater::isOpen() ||
7297 !LLFloaterWater::instance()->getVisible()) { 8072 !LLFloaterWater::instance()->getVisible()) {
@@ -7322,6 +8097,13 @@ class LLWorldDayCycle : public view_listener_t
7322{ 8097{
7323 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 8098 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7324 { 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
7325 LLFloaterDayCycle::show(); 8107 LLFloaterDayCycle::show();
7326 return true; 8108 return true;
7327 } 8109 }
@@ -7509,6 +8291,113 @@ class LLAdvancedCheckHUDInfo : public view_listener_t
7509}; 8291};
7510 8292
7511 8293
8294//////////////////////
8295// FORCE GROUND SIT //
8296//////////////////////
8297
8298class 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
8320class 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
8341class 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
8357class 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
8371class 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
8387class 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
7512 8401
7513/////////////////////// 8402///////////////////////
7514// CLEAR GROUP CACHE // 8403// CLEAR GROUP CACHE //
@@ -9449,6 +10338,49 @@ class LLAvatarReportAbuse : public view_listener_t
9449 10338
9450 10339
9451 10340
10341///////////////
10342// RLVa Main //
10343///////////////
10344
10345
10346class 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
10355class 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
10373class 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
9452static void addMenu(view_listener_t *menu, const char *name) 10384static void addMenu(view_listener_t *menu, const char *name)
9453{ 10385{
9454 sMenus.push_back(menu); 10386 sMenus.push_back(menu);
@@ -9490,6 +10422,7 @@ void initialize_menus()
9490 addMenu(new LLViewMouselook(), "View.Mouselook"); 10422 addMenu(new LLViewMouselook(), "View.Mouselook");
9491 addMenu(new LLViewBuildMode(), "View.BuildMode"); 10423 addMenu(new LLViewBuildMode(), "View.BuildMode");
9492 addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam"); 10424 addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
10425 addMenu(new LLViewCommunicate(), "View.Communicate");
9493 addMenu(new LLViewResetView(), "View.ResetView"); 10426 addMenu(new LLViewResetView(), "View.ResetView");
9494 addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); 10427 addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
9495 addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); 10428 addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
@@ -9500,6 +10433,8 @@ void initialize_menus()
9500 addMenu(new LLViewZoomIn(), "View.ZoomIn"); 10433 addMenu(new LLViewZoomIn(), "View.ZoomIn");
9501 addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); 10434 addMenu(new LLViewZoomDefault(), "View.ZoomDefault");
9502 addMenu(new LLViewFullscreen(), "View.Fullscreen"); 10435 addMenu(new LLViewFullscreen(), "View.Fullscreen");
10436 addMenu(new LLViewToggleAdvanced(), "View.ToggleAdvanced");
10437
9503 10438
9504 addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); 10439 addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
9505 addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); 10440 addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
@@ -9510,6 +10445,7 @@ void initialize_menus()
9510 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); 10445 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
9511 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); 10446 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
9512 addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); 10447 addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
10448 addMenu(new LLViewCheckAdvanced(), "View.CheckAdvanced");
9513 10449
9514 // World menu 10450 // World menu
9515 addMenu(new LLWorldChat(), "World.Chat"); 10451 addMenu(new LLWorldChat(), "World.Chat");
@@ -9540,6 +10476,7 @@ void initialize_menus()
9540 addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects"); 10476 addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects");
9541 addMenu(new LLToolsSelectOnlyCopyableObjects(), "Tools.SelectOnlyCopyableObjects"); 10477 addMenu(new LLToolsSelectOnlyCopyableObjects(), "Tools.SelectOnlyCopyableObjects");
9542 addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); 10478 addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding");
10479 addMenu(new LLToolsShowSelectionHighlights(), "Tools.ShowSelectionHighlights");
9543 addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); 10480 addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");
9544 addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); 10481 addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");
9545 addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); 10482 addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts");
@@ -9609,6 +10546,10 @@ void initialize_menus()
9609 addMenu(new LLObjectBuy(), "Object.Buy"); 10546 addMenu(new LLObjectBuy(), "Object.Buy");
9610 addMenu(new LLObjectEdit(), "Object.Edit"); 10547 addMenu(new LLObjectEdit(), "Object.Edit");
9611 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");
9612 10553
9613 addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); 10554 addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
9614 addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); 10555 addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
@@ -9619,6 +10560,9 @@ void initialize_menus()
9619 addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); 10560 addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
9620 addMenu(new LLObjectEnableMute(), "Object.EnableMute"); 10561 addMenu(new LLObjectEnableMute(), "Object.EnableMute");
9621 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");
9622 10566
9623 /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); 10567 /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch");
9624 addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); 10568 addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch");
@@ -9668,6 +10612,12 @@ void initialize_menus()
9668 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); 10612 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole");
9669 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); 10613 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole");
9670 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");
9671 10621
9672 // Advanced > HUD Info 10622 // Advanced > HUD Info
9673 addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); 10623 addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo");
@@ -9813,4 +10763,11 @@ void initialize_menus()
9813 addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); 10763 addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions");
9814 addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); 10764 addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus");
9815 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
9816} 10773}
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 9aa44fc..d5d9324 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -80,7 +80,6 @@
80#include "llfloaterland.h" 80#include "llfloaterland.h"
81#include "llfloaterregioninfo.h" 81#include "llfloaterregioninfo.h"
82#include "llfloaterlandholdings.h" 82#include "llfloaterlandholdings.h"
83#include "llfloatermap.h"
84#include "llurldispatcher.h" 83#include "llurldispatcher.h"
85#include "llfloatermute.h" 84#include "llfloatermute.h"
86#include "llfloaterpostcard.h" 85#include "llfloaterpostcard.h"
@@ -95,7 +94,6 @@
95#include "llinventoryview.h" 94#include "llinventoryview.h"
96#include "llmenugl.h" 95#include "llmenugl.h"
97#include "llmutelist.h" 96#include "llmutelist.h"
98#include "llnetmap.h"
99#include "llnotify.h" 97#include "llnotify.h"
100#include "llpanelgrouplandmoney.h" 98#include "llpanelgrouplandmoney.h"
101#include "llselectmgr.h" 99#include "llselectmgr.h"
@@ -142,6 +140,11 @@
142#include "llwindebug.h" // For the invalid message handler 140#include "llwindebug.h" // For the invalid message handler
143#endif 141#endif
144 142
143// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
144#include "llfloateravatarinfo.h"
145extern LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances; // Only defined in llfloateravatarinfo.cpp
146// [/RLVa:KB]
147
145// 148//
146// Constants 149// Constants
147// 150//
@@ -1009,8 +1012,17 @@ void inventory_offer_callback(S32 button, void* user_data)
1009 std::string first_name, last_name; 1012 std::string first_name, last_name;
1010 if (gCacheName->getName(info->mFromID, first_name, last_name)) 1013 if (gCacheName->getName(info->mFromID, first_name, last_name))
1011 { 1014 {
1012 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)
1013 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;
1014 } 1026 }
1015 else 1027 else
1016 { 1028 {
@@ -1029,6 +1041,21 @@ void inventory_offer_callback(S32 button, void* user_data)
1029 switch(button) 1041 switch(button)
1030 { 1042 {
1031 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]
1032 // ACCEPT. The math for the dialog works, because the accept 1059 // ACCEPT. The math for the dialog works, because the accept
1033 // for inventory_offered, task_inventory_offer or 1060 // for inventory_offered, task_inventory_offer or
1034 // group_notice_inventory is 1 greater than the offer integer value. 1061 // group_notice_inventory is 1 greater than the offer integer value.
@@ -1191,6 +1218,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1191 if(indx >= 0) 1218 if(indx >= 0)
1192 { 1219 {
1193 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]
1194 } 1228 }
1195 1229
1196 LLStringUtil::format_map_t args; 1230 LLStringUtil::format_map_t args;
@@ -1231,6 +1265,13 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1231 std::string first_name, last_name; 1265 std::string first_name, last_name;
1232 if (gCacheName->getName(info->mFromID, first_name, last_name)) 1266 if (gCacheName->getName(info->mFromID, first_name, last_name))
1233 { 1267 {
1268// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1269 if ( (rlv_handler_t::isEnabled()) && (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]
1234 args["[FIRST]"] = first_name; 1275 args["[FIRST]"] = first_name;
1235 args["[LAST]"] = last_name; 1276 args["[LAST]"] = last_name;
1236 name_found = TRUE; 1277 name_found = TRUE;
@@ -1245,7 +1286,16 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
1245 else 1286 else
1246 { 1287 {
1247 // *TODO:translate -> [FIRST] [LAST] 1288 // *TODO:translate -> [FIRST] [LAST]
1248 args["[NAME]"] = info->mFromName; 1289// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1290 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(info->mFromID)) )
1291 {
1292 args["[NAME]"] = gRlvHandler.getAnonym(info->mFromName);
1293 }
1294// [/RLVa:KB]
1295 else
1296 {
1297 args["[NAME]"] = info->mFromName;
1298 }
1249 LLNotifyBox::showXml("UserGiveItem", args, 1299 LLNotifyBox::showXml("UserGiveItem", args,
1250 &inventory_offer_callback, (void*)info); 1300 &inventory_offer_callback, (void*)info);
1251 } 1301 }
@@ -1413,7 +1463,20 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1413 // do nothing -- don't distract newbies in 1463 // do nothing -- don't distract newbies in
1414 // Prelude with global IMs 1464 // Prelude with global IMs
1415 } 1465 }
1416 else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) 1466// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
1467 else if ( (rlv_handler_t::isEnabled()) && (offline == IM_ONLINE) && ("@version" == message) )
1468 {
1469 rlvSendBusyMessage(from_id, gRlvHandler.getVersionString(), session_id);
1470 // We won't receive a typing stop message, so do that manually (see comment at the end of LLFloaterIMPanel::sendMsg)
1471 LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
1472 gIMMgr->processIMTypingStop(im_info);
1473 }
1474// [/RLVa:KB]
1475// else if (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM)
1476// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
1477 else if ( (offline == IM_ONLINE && !is_linden && is_busy && name != SYSTEM_FROM) &&
1478 ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, from_id))) )
1479// [/RLVa:KB]
1417 { 1480 {
1418 // return a standard "busy" message, but only do it to online IM 1481 // return a standard "busy" message, but only do it to online IM
1419 // (i.e. not other auto responses and not store-and-forward IM) 1482 // (i.e. not other auto responses and not store-and-forward IM)
@@ -1470,6 +1533,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1470 } 1533 }
1471 else if (to_id.isNull()) 1534 else if (to_id.isNull())
1472 { 1535 {
1536// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1537 // Filter region messages that weren't sent by a Linden
1538 if ( (rlv_handler_t::isEnabled()) && (LLMuteList::getInstance()) &&
1539 (!LLMuteList::getInstance()->isLinden(name)) && (from_id != gAgent.getID()) )
1540 {
1541 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
1542 gRlvHandler.filterLocation(message);
1543 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
1544 {
1545 name = gRlvHandler.getAnonym(name);
1546 gRlvHandler.filterNames(message);
1547 }
1548 }
1549// [/RLVa:KB]
1550
1473 // Message to everyone from GOD 1551 // Message to everyone from GOD
1474 args["[NAME]"] = name; 1552 args["[NAME]"] = name;
1475 args["[MESSAGE]"] = message; 1553 args["[MESSAGE]"] = message;
@@ -1485,6 +1563,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1485 else 1563 else
1486 { 1564 {
1487 // standard message, not from system 1565 // standard message, not from system
1566// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
1567 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) )
1568 {
1569 rlvSendBusyMessage(from_id, rlv_handler_t::cstrMsgRecvIM, session_id);
1570
1571 message = message.substr(0, message_offset) + rlv_handler_t::cstrBlockedRecvIM;
1572 }
1573// [/RLVa:KB]
1574
1488 std::string saved; 1575 std::string saved;
1489 if(offline == IM_OFFLINE) 1576 if(offline == IM_OFFLINE)
1490 { 1577 {
@@ -1690,6 +1777,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1690 bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; 1777 bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
1691 info->mType = (LLAssetType::EType) bucketp->asset_type; 1778 info->mType = (LLAssetType::EType) bucketp->asset_type;
1692 info->mObjectID = bucketp->object_id; 1779 info->mObjectID = bucketp->object_id;
1780
1781// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
1782 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (gRlvHandler.isAgentNearby(from_id)) )
1783 {
1784 name = gRlvHandler.getAnonym(name);
1785 }
1786// [/RLVa:KB]
1693 } 1787 }
1694 else 1788 else
1695 { 1789 {
@@ -1734,13 +1828,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1734 1828
1735 case IM_INVENTORY_ACCEPTED: 1829 case IM_INVENTORY_ACCEPTED:
1736 { 1830 {
1737 args["[NAME]"] = name; 1831// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
1832 bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
1833 (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id));
1834 args["[NAME]"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name);
1835// [/RLVa:KB]
1836// args["[NAME]"] = name;
1738 LLNotifyBox::showXml("InventoryAccepted", args); 1837 LLNotifyBox::showXml("InventoryAccepted", args);
1739 break; 1838 break;
1740 } 1839 }
1741 case IM_INVENTORY_DECLINED: 1840 case IM_INVENTORY_DECLINED:
1742 { 1841 {
1743 args["[NAME]"] = name; 1842// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
1843 bool fRlvObfuscate = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
1844 (gRlvHandler.isAgentNearby(from_id)) && (!gAvatarInfoInstances.checkData(from_id));
1845 args["[NAME]"] = (!fRlvObfuscate) ? name : gRlvHandler.getAnonym(name);
1846// [/RLVa:KB]
1847// args["[NAME]"] = name;
1744 LLNotifyBox::showXml("InventoryDeclined", args); 1848 LLNotifyBox::showXml("InventoryDeclined", args);
1745 break; 1849 break;
1746 } 1850 }
@@ -1774,6 +1878,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1774 return; 1878 return;
1775 } 1879 }
1776 1880
1881// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
1882 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) )
1883 {
1884 if (gAgent.isInGroup(session_id))
1885 {
1886 if (!gRlvHandler.isException(RLV_BHVR_RECVIM, session_id))
1887 return;
1888 }
1889 else
1890 {
1891 if ( (from_id != gAgent.getID()) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) )
1892 message = message.substr(0, message_offset) + rlv_handler_t::cstrBlockedRecvIM;
1893 }
1894 }
1895// [/RLVa:KB]
1896
1777 // standard message, not from system 1897 // standard message, not from system
1778 std::string saved; 1898 std::string saved;
1779 if(offline == IM_OFFLINE) 1899 if(offline == IM_OFFLINE)
@@ -1804,15 +1924,51 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1804 break; 1924 break;
1805 1925
1806 case IM_FROM_TASK: 1926 case IM_FROM_TASK:
1807 if (is_busy && !is_owned_by_me)
1808 { 1927 {
1809 return; 1928 if (is_busy && !is_owned_by_me)
1929 {
1930 return;
1931 }
1932 chat.mText = name + separator_string + message.substr(message_offset);
1933 chat.mFromName = name;
1934
1935 // Build a link to open the object IM info window.
1936 std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size);
1937
1938 LLSD query_string;
1939 query_string["owner"] = from_id;
1940 query_string["slurl"] = location.c_str();
1941 query_string["name"] = name;
1942 if (from_group)
1943 {
1944 query_string["groupowned"] = "true";
1945 }
1946
1947 if (session_id.notNull())
1948 {
1949 chat.mFromID = session_id;
1950 }
1951 else
1952 {
1953 // This message originated on a region without the updated code for task id and slurl information.
1954 // We just need a unique ID for this object that isn't the owner ID.
1955 // If it is the owner ID it will overwrite the style that contains the link to that owner's profile.
1956 // This isn't ideal - it will make 1 style for all objects owned by the the same person/group.
1957 // This works because the only thing we can really do in this case is show the owner name and link to their profile.
1958 chat.mFromID = from_id ^ gAgent.getSessionID();
1959 }
1960
1961 std::ostringstream link;
1962 link << "secondlife:///app/objectim/" << session_id
1963 << LLURI::mapToQueryString(query_string);
1964
1965 chat.mURL = link.str();
1966
1967 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1968 // IMs from objcts don't open IM sessions.
1969 chat.mSourceType = CHAT_SOURCE_OBJECT;
1970 LLFloaterChat::addChat(chat, FALSE, FALSE);
1810 } 1971 }
1811 chat.mText = name + separator_string + message.substr(message_offset);
1812 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1813 // IMs from objcts don't open IM sessions.
1814 chat.mSourceType = CHAT_SOURCE_OBJECT;
1815 LLFloaterChat::addChat(chat, FALSE, FALSE);
1816 break; 1972 break;
1817 case IM_FROM_TASK_AS_ALERT: 1973 case IM_FROM_TASK_AS_ALERT:
1818 if (is_busy && !is_owned_by_me) 1974 if (is_busy && !is_owned_by_me)
@@ -1820,6 +1976,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1820 return; 1976 return;
1821 } 1977 }
1822 { 1978 {
1979// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
1980 // TODO-RLVa: what actually generates this?
1981 if (rlv_handler_t::isEnabled())
1982 {
1983 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
1984 gRlvHandler.filterLocation(message);
1985 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
1986 gRlvHandler.filterNames(message);
1987 }
1988// [/RLVa:KB]
1989
1823 // Construct a viewer alert for this message. 1990 // Construct a viewer alert for this message.
1824 args["[NAME]"] = name; 1991 args["[NAME]"] = name;
1825 args["[MESSAGE]"] = message; 1992 args["[MESSAGE]"] = message;
@@ -1852,12 +2019,48 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1852 } 2019 }
1853 else 2020 else
1854 { 2021 {
1855 // *TODO:translate -> [FIRST] [LAST] (maybe) 2022// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d)
1856 LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE); 2023 if (rlv_handler_t::isEnabled())
1857 args["[NAME]"] = name; 2024 {
1858 args["[MESSAGE]"] = message; 2025 // Disallow if: 1) @tplure=n restricted (sender isn't an exception), or 2) @unsit=n restricted and currently sitting
1859 LLNotifyBox::showXml("OfferTeleport", args, 2026 LLVOAvatar* pAvatar = gAgent.getAvatarObject();
1860 lure_callback, (void*)info); 2027 if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) && (!gRlvHandler.isException(RLV_BHVR_TPLURE, from_id)) ) ||
2028 ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (pAvatar) && (pAvatar->mIsSitting) ) )
2029 {
2030 rlvSendBusyMessage(from_id, rlv_handler_t::cstrMsgTpLure);
2031 return;
2032 }
2033
2034 // Censor teleport message if: 1) @revcim=n restricted (sender isn't an exception), or 2) @showloc=n restricted
2035 if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) && (!gRlvHandler.isException(RLV_BHVR_RECVIM, from_id)) ) ||
2036 (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
2037 {
2038 message = rlv_handler_t::cstrHidden;
2039 }
2040 }
2041// [/RLVa:KB]
2042
2043// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b
2044 if ( (rlv_handler_t::isEnabled()) &&
2045 ((gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)) || (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, from_id))) )
2046 {
2047 gRlvHandler.setCanCancelTp(false);
2048 // (see IM_GODLIKE_LURE_USER below)
2049 LLLureInfo* info = new LLLureInfo(from_id, session_id, TRUE);
2050 lure_callback(0, (void*)info);
2051 }
2052 else
2053 {
2054// [/RLVa:KB]
2055 // *TODO:translate -> [FIRST] [LAST] (maybe)
2056 LLLureInfo* info = new LLLureInfo(from_id, session_id, FALSE);
2057 args["[NAME]"] = name;
2058 args["[MESSAGE]"] = message;
2059 LLNotifyBox::showXml("OfferTeleport", args,
2060 lure_callback, (void*)info);
2061// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.0b
2062 }
2063// [/RLVa:KB]
1861 } 2064 }
1862 } 2065 }
1863 break; 2066 break;
@@ -2202,8 +2405,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2202 chat.mPosAgent = chatter->getPositionAgent(); 2405 chat.mPosAgent = chatter->getPositionAgent();
2203 2406
2204 // Make swirly things only for talking objects. (not script debug messages, though) 2407 // Make swirly things only for talking objects. (not script debug messages, though)
2205 if (chat.mSourceType == CHAT_SOURCE_OBJECT 2408// if (chat.mSourceType == CHAT_SOURCE_OBJECT
2206 && chat.mChatType != CHAT_TYPE_DEBUG_MSG) 2409// && chat.mChatType != CHAT_TYPE_DEBUG_MSG)
2410// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
2411 // Don't show swirly things for llOwnerSay() chat here because we handle those further down
2412 if ( (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
2413 ((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) )
2414// [/RLVa:KB]
2207 { 2415 {
2208 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent()); 2416 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
2209 psc->setSourceObject(chatter); 2417 psc->setSourceObject(chatter);
@@ -2236,6 +2444,50 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2236 color.setVec(1.f,1.f,1.f,1.f); 2444 color.setVec(1.f,1.f,1.f,1.f);
2237 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg); 2445 msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
2238 2446
2447// [RLVa:KB] - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d
2448 if ( (rlv_handler_t::isEnabled()) &&
2449 (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) && (CHAT_TYPE_OWNER != chat.mChatType) )
2450 {
2451 // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment)
2452 BOOL is_attachment = (chatter) ? chatter->isAttachment() : FALSE;
2453
2454 // Filtering "rules":
2455 // avatar => filter all avie text (unless it's this avie or they're an exemption)
2456 // objects => filter everything except attachments this avie owns
2457 if ( ((CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID())) || (!is_owned_by_me) || (!is_attachment) )
2458 {
2459 if (!rlvIsEmote(mesg))
2460 {
2461 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVCHAT)) && (!gRlvHandler.isException(RLV_BHVR_RECVCHAT, from_id)) )
2462 gRlvHandler.filterChat(mesg, false);
2463 }
2464 else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_RECVEMOTE)) && (!gRlvHandler.isException(RLV_BHVR_RECVEMOTE, from_id)) )
2465 {
2466 mesg = "/me ...";
2467 }
2468 }
2469
2470 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
2471 {
2472 // Filtering "rules":
2473 // avatar => filter only their name (unless it's this avie)
2474 // other => filter everything except attachments this avie owns but then we still do filter their text
2475 if (CHAT_SOURCE_AGENT == chat.mSourceType)
2476 {
2477 if (chat.mFromID != gAgent.getID())
2478 from_name = gRlvHandler.getAnonym(from_name);
2479 }
2480 else
2481 {
2482 if ( (!is_owned_by_me) || (!is_attachment) )
2483 gRlvHandler.filterNames(from_name);
2484 gRlvHandler.filterNames(mesg);
2485 }
2486 chat.mRlvNamesFiltered = true;
2487 }
2488 }
2489// [/RLVa:KB]
2490
2239 BOOL ircstyle = FALSE; 2491 BOOL ircstyle = FALSE;
2240 2492
2241 // Look for IRC-style emotes here so chatbubbles work 2493 // Look for IRC-style emotes here so chatbubbles work
@@ -2300,8 +2552,76 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2300 case CHAT_TYPE_WHISPER: 2552 case CHAT_TYPE_WHISPER:
2301 verb = " " + LLTrans::getString("whisper") + " "; 2553 verb = " " + LLTrans::getString("whisper") + " ";
2302 break; 2554 break;
2303 case CHAT_TYPE_DEBUG_MSG:
2304 case CHAT_TYPE_OWNER: 2555 case CHAT_TYPE_OWNER:
2556// [RLVa:KB] - Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e
2557 if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) )
2558 {
2559 mesg.erase(0, 1);
2560 LLStringUtil::toLower(mesg);
2561
2562 std::string strExecuted, strFailed, strRetained, *pstr;
2563
2564 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
2565 boost::char_separator<char> sep(",", "", boost::drop_empty_tokens);
2566 tokenizer tokens(mesg, sep);
2567 for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken)
2568 {
2569 if (LLStartUp::getStartupState() == STATE_STARTED)
2570 {
2571 if (gRlvHandler.processCommand(from_id, *itToken, true))
2572 pstr = &strExecuted;
2573 else
2574 pstr = &strFailed;
2575 }
2576 else
2577 {
2578 gRlvHandler.retainCommand(from_name, from_id, *itToken);
2579 pstr = &strRetained;
2580 }
2581
2582 if (!pstr->empty())
2583 pstr->push_back(',');
2584 pstr->append(*itToken);
2585 }
2586
2587 if (!RlvSettings::getDebug())
2588 return;
2589
2590 // Silly people want comprehensive debug messages, blah :p
2591 if ( (!strExecuted.empty()) && (strFailed.empty()) && (strRetained.empty()) )
2592 verb = " executes: @";
2593 else if ( (strExecuted.empty()) && (!strFailed.empty()) && (strRetained.empty()) )
2594 verb = " failed: @";
2595 else if ( (strExecuted.empty()) && (strFailed.empty()) && (!strRetained.empty()) )
2596 verb = " retained: @";
2597 else
2598 {
2599 verb = ": @";
2600 if (!strExecuted.empty())
2601 mesg += "\n - executed: @" + strExecuted;
2602 if (!strFailed.empty())
2603 mesg += "\n - failed: @" + strFailed;
2604 if (!strRetained.empty())
2605 mesg += "\n - retained: @" + strRetained;
2606 }
2607
2608 break;
2609 }
2610// [/RLVa:KB]
2611// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
2612 // Copy/paste from above
2613 if ( (chatter) && (chat.mChatType != CHAT_TYPE_DEBUG_MSG) )
2614 {
2615 LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
2616 psc->setSourceObject(chatter);
2617 psc->setColor(color);
2618 //We set the particles to be owned by the object's owner,
2619 //just in case they should be muted by the mute list
2620 psc->setOwnerUUID(owner_id);
2621 LLViewerPartSim::getInstance()->addPartSource(psc);
2622 }
2623// [/RLVa:KB]
2624 case CHAT_TYPE_DEBUG_MSG:
2305 case CHAT_TYPE_NORMAL: 2625 case CHAT_TYPE_NORMAL:
2306 verb = ": "; 2626 verb = ": ";
2307 break; 2627 break;
@@ -2370,7 +2690,10 @@ void process_teleport_start(LLMessageSystem *msg, void**)
2370 U32 teleport_flags = 0x0; 2690 U32 teleport_flags = 0x0;
2371 msg->getU32("Info", "TeleportFlags", teleport_flags); 2691 msg->getU32("Info", "TeleportFlags", teleport_flags);
2372 2692
2373 if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) 2693 //if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
2694// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
2695 if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
2696// [/RLVa:KB]
2374 { 2697 {
2375 gViewerWindow->setProgressCancelButtonVisible(FALSE); 2698 gViewerWindow->setProgressCancelButtonVisible(FALSE);
2376 } 2699 }
@@ -2405,7 +2728,10 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
2405 } 2728 }
2406 U32 teleport_flags = 0x0; 2729 U32 teleport_flags = 0x0;
2407 msg->getU32("Info", "TeleportFlags", teleport_flags); 2730 msg->getU32("Info", "TeleportFlags", teleport_flags);
2408 if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) 2731 //if (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL)
2732// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
2733 if ( (teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) || (!gRlvHandler.getCanCancelTp()) )
2734// [/RLVa:KB]
2409 { 2735 {
2410 gViewerWindow->setProgressCancelButtonVisible(FALSE); 2736 gViewerWindow->setProgressCancelButtonVisible(FALSE);
2411 } 2737 }
@@ -2720,6 +3046,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2720 // appropriate. 3046 // appropriate.
2721 LLVector3 shift_vector = regionp->getPosRegionFromGlobal( 3047 LLVector3 shift_vector = regionp->getPosRegionFromGlobal(
2722 gAgent.getRegion()->getOriginGlobal()); 3048 gAgent.getRegion()->getOriginGlobal());
3049 // don't shift objects, if teleporting more than about 1000 sims, as
3050 // for long teleports shifting objects garbles the view at the target region
3051 if (shift_vector.lengthSquared() > 6.5e10f)
3052 shift_vector = LLVector3::zero;
2723 gAgent.setRegion(regionp); 3053 gAgent.setRegion(regionp);
2724 gObjectList.shiftObjects(shift_vector); 3054 gObjectList.shiftObjects(shift_vector);
2725 gAssetStorage->setUpstream(msg->getSender()); 3055 gAssetStorage->setUpstream(msg->getSender());
@@ -2742,7 +3072,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2742 // know what you look like. 3072 // know what you look like.
2743 gAgent.sendAgentSetAppearance(); 3073 gAgent.sendAgentSetAppearance();
2744 3074
2745 if (avatarp) 3075// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
3076 if ( (avatarp) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
3077// [/RLVa:KB]
3078// if (avatarp)
2746 { 3079 {
2747 // Chat the "back" SLURL. (DEV-4907) 3080 // Chat the "back" SLURL. (DEV-4907)
2748 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); 3081 LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
@@ -2822,6 +3155,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2822 3155
2823 // If the server version has changed, display an info box and offer 3156 // If the server version has changed, display an info box and offer
2824 // to display the release notes, unless this is the initial log in. 3157 // to display the release notes, unless this is the initial log in.
3158 // Also verify we're on an OpenSimulator here.
2825 if (gLastVersionChannel == version_channel) 3159 if (gLastVersionChannel == version_channel)
2826 { 3160 {
2827 return; 3161 return;
@@ -2833,6 +3167,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2833 "ServerVersionChanged", display_release_notes, NULL); 3167 "ServerVersionChanged", display_release_notes, NULL);
2834 } 3168 }
2835 3169
3170 if (version_channel.find("OpenSim") != std::string::npos)
3171 {
3172 gSavedSettings.setBOOL("LoggedIntoOpenSim", TRUE);
3173 }
3174 else
3175 {
3176 gSavedSettings.setBOOL("LoggedIntoOpenSim", FALSE);
3177 }
3178
2836 gLastVersionChannel = version_channel; 3179 gLastVersionChannel = version_channel;
2837} 3180}
2838 3181
@@ -4322,7 +4665,13 @@ void notify_cautioned_script_question(LLScriptQuestionCBData* cbdata, S32 orig_q
4322 if (viewregion) 4665 if (viewregion)
4323 { 4666 {
4324 // got the region, so include the region and 3d coordinates of the object 4667 // got the region, so include the region and 3d coordinates of the object
4325 notice.setArg("[REGIONNAME]", viewregion->getName()); 4668 notice.setArg("[REGIONNAME]", viewregion->getName());
4669// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
4670 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
4671 {
4672 notice.setArg("[REGIONNAME]", rlv_handler_t::cstrHiddenRegion);
4673 }
4674// [/RLVa:KB]
4326 std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); 4675 std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]);
4327 notice.setArg("[REGIONPOS]", formatpos); 4676 notice.setArg("[REGIONPOS]", formatpos);
4328 4677
@@ -4527,8 +4876,31 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
4527 4876
4528 LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions, object_name, owner_name); 4877 LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions, object_name, owner_name);
4529 4878
4879// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0e
4880 S32 rlvQuestionsOther = questions;
4881
4882 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour("acceptpermission")) )
4883 {
4884 LLViewerObject* pObj = gObjectList.findObject(taskid);
4885 if (pObj)
4886 {
4887 if (pObj->permYouOwner())
4888 {
4889 // PERMISSION_TAKE_CONTROLS and PERMISSION_ATTACH are only auto-granted to objects this avie owns
4890 rlvQuestionsOther &= ~(LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TAKE_CONTROLS] |
4891 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_ATTACH]);
4892 }
4893 }
4894 }
4895
4896 if ( (!caution) && (!rlvQuestionsOther) )
4897 {
4898 script_question_cb(0, cbdata);
4899 }
4900 else if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
4901// [/RLVa:KB]
4530 // check whether cautions are even enabled or not 4902 // check whether cautions are even enabled or not
4531 if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) 4903 //if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
4532 { 4904 {
4533 if (caution) 4905 if (caution)
4534 { 4906 {
@@ -4820,6 +5192,21 @@ void handle_lure_callback(S32 option, const std::string& text, void* userdata)
4820 5192
4821 if(0 == option) 5193 if(0 == option)
4822 { 5194 {
5195// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0b
5196 bool fRlvCensorMessage = false;
5197 if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM))
5198 {
5199 for (LLDynamicArray<LLUUID>::iterator it = invitees->begin(); it != invitees->end(); ++it)
5200 {
5201 if (!gRlvHandler.isException(RLV_BHVR_SENDIM, *it))
5202 {
5203 fRlvCensorMessage = true;
5204 break;
5205 }
5206 }
5207 }
5208// [/RLVa:KB]
5209
4823 LLMessageSystem* msg = gMessageSystem; 5210 LLMessageSystem* msg = gMessageSystem;
4824 msg->newMessageFast(_PREHASH_StartLure); 5211 msg->newMessageFast(_PREHASH_StartLure);
4825 msg->nextBlockFast(_PREHASH_AgentData); 5212 msg->nextBlockFast(_PREHASH_AgentData);
@@ -4827,7 +5214,10 @@ void handle_lure_callback(S32 option, const std::string& text, void* userdata)
4827 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 5214 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
4828 msg->nextBlockFast(_PREHASH_Info); 5215 msg->nextBlockFast(_PREHASH_Info);
4829 msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in. 5216 msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in.
4830 msg->addStringFast(_PREHASH_Message, text); 5217// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0b
5218 msg->addStringFast(_PREHASH_Message, (!fRlvCensorMessage) ? text : rlv_handler_t::cstrHidden);
5219// [/RLVa:KB]
5220 //msg->addStringFast(_PREHASH_Message, text);
4831 for(LLDynamicArray<LLUUID>::iterator itr = invitees->begin(); itr != invitees->end(); ++itr) 5221 for(LLDynamicArray<LLUUID>::iterator itr = invitees->begin(); itr != invitees->end(); ++itr)
4832 { 5222 {
4833 msg->nextBlockFast(_PREHASH_TargetData); 5223 msg->nextBlockFast(_PREHASH_TargetData);
@@ -4857,8 +5247,28 @@ void handle_lure(LLDynamicArray<LLUUID>& ids)
4857{ 5247{
4858 LLDynamicArray<LLUUID>* userdata = new LLDynamicArray<LLUUID>(ids); 5248 LLDynamicArray<LLUUID>* userdata = new LLDynamicArray<LLUUID>(ids);
4859 5249
5250// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-1.0.0a
5251 // Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n
5252 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
5253 {
5254 for (LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); ++it)
5255 {
5256 const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it);
5257 if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it)) &&
5258 ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) )
5259 {
5260 delete userdata;
5261 return;
5262 }
5263 }
5264 }
5265// [/RLVa:KB]
5266
4860 LLStringUtil::format_map_t edit_args; 5267 LLStringUtil::format_map_t edit_args;
4861 edit_args["[REGION]"] = gAgent.getRegion()->getName(); 5268// [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-1.0.0a
5269 edit_args["[REGION]"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : rlv_handler_t::cstrHidden;
5270// [/RLVa:KB]
5271 //edit_args["[REGION]"] = gAgent.getRegion()->getName();
4862 if (gAgent.isGodlike()) 5272 if (gAgent.isGodlike())
4863 { 5273 {
4864 gViewerWindow->alertXmlEditText("OfferTeleportFromGod", edit_args, 5274 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
4796BOOL LLViewerObject::allowOpen() const 4808BOOL 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
4801LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo() 4816LLViewerObject::LLInventoryCallbackInfo::~LLInventoryCallbackInfo()
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 78398bb..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
77extern F32 gMinObjectDistance; 79extern F32 gMinObjectDistance;
78extern BOOL gAnimateTextures; 80extern BOOL gAnimateTextures;
79 81
@@ -163,7 +165,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
163 165
164BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) 166BOOL 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
182void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, 183void 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
842BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) 844BOOL 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
@@ -1030,6 +1032,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
1030 LLColor4 group_own_below_water_color = 1032 LLColor4 group_own_below_water_color =
1031 gColors.getColor( "NetMapGroupOwnBelowWater" ); 1033 gColors.getColor( "NetMapGroupOwnBelowWater" );
1032 1034
1035 F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
1033 1036
1034 for (S32 i = 0; i < mMapObjects.count(); i++) 1037 for (S32 i = 0; i < mMapObjects.count(); i++)
1035 { 1038 {
@@ -1045,6 +1048,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
1045 1048
1046 F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge 1049 F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge
1047 1050
1051 // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.)
1052 approx_radius = llmin(approx_radius, max_radius);
1053
1048 LLColor4U color = above_water_color; 1054 LLColor4U color = above_water_color;
1049 if( objectp->permYouOwner() ) 1055 if( objectp->permYouOwner() )
1050 { 1056 {
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
894BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) 901BOOL 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
974BOOL 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
985BOOL LLViewerTextEditor::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
986{
987 BOOL handled = childrenHandleMiddleMouseUp(x, y, mask) != NULL;
988
989 return handled;
990}
991
1002BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) 992BOOL 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;
49const F32 MIN_FRACTIONAL = 0.2f; 49const F32 MIN_FRACTIONAL = 0.2f;
50 50
51const F32 MIN_BANDWIDTH = 50.f; 51const F32 MIN_BANDWIDTH = 50.f;
52const F32 MAX_BANDWIDTH = 1500.f; 52const F32 MAX_BANDWIDTH = 5000.f;
53const F32 STEP_FRACTIONAL = 0.1f; 53const F32 STEP_FRACTIONAL = 0.1f;
54const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s 54const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s
55const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s 55const 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 9b2c566..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
550BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) 550BOOL 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 } 666 }
641 667 if (down)
642 if(LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask ) )
643 { 668 {
644 // This is necessary to force clicks in the world to cause edit 669 if (gDisconnected)
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
654BOOL 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 }
667
668 mLeftMouseDown = TRUE;
669
670 // Hide tooltips
671 if( mToolTip )
672 {
673 mToolTip->setVisible( FALSE );
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 ) ) 708BOOL 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 714BOOL 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
734BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 723BOOL 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
932BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 756BOOL 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
1022BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) 762BOOL 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
1030BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 772BOOL 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),
@@ -2357,14 +2102,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
2357 } 2102 }
2358 2103
2359 // Explicit hack for debug menu. 2104 // Explicit hack for debug menu.
2360 if ((MASK_ALT & mask) &&
2361 (MASK_CONTROL & mask) &&
2362 ('D' == key || 'd' == key))
2363 {
2364 toggle_debug_menus(NULL);
2365 }
2366
2367 // Explicit hack for debug menu.
2368 if ((mask == (MASK_SHIFT | MASK_CONTROL)) && 2105 if ((mask == (MASK_SHIFT | MASK_CONTROL)) &&
2369 ('G' == key || 'g' == key)) 2106 ('G' == key || 'g' == key))
2370 { 2107 {
@@ -3256,6 +2993,16 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
3256 { 2993 {
3257 moveable_object_selected = TRUE; 2994 moveable_object_selected = TRUE;
3258 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]
3259 } 3006 }
3260 all_selected_objects_move = all_selected_objects_move && this_object_movable; 3007 all_selected_objects_move = all_selected_objects_move && this_object_movable;
3261 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
51class LLView; 52class LLView;
52class LLViewerObject; 53class LLViewerObject;
@@ -57,7 +58,6 @@ class LLVelocityBar;
57class LLTextBox; 58class LLTextBox;
58class LLImageRaw; 59class LLImageRaw;
59class LLHUDIcon; 60class LLHUDIcon;
60class 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..24272d8 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
128LLXmlTree LLVOAvatar::sXMLTree; 132LLXmlTree LLVOAvatar::sXMLTree;
129LLXmlTree LLVOAvatar::sSkeletonXMLTree; 133LLXmlTree LLVOAvatar::sSkeletonXMLTree;
130LLVOAvatarSkeletonInfo* LLVOAvatar::sSkeletonInfo = NULL; 134LLVOAvatarSkeletonInfo* 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,10 +3257,11 @@ 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();
3224 LLStringFn::replace_nonprintable(line,LL_UNKNOWN_CHAR); 3264 //LLStringFn::replace_nonprintable(line,LL_UNKNOWN_CHAR); IMP-136 -- MC
3225 line += "\n"; 3265 line += "\n";
3226 line += firstname->getString(); 3266 line += firstname->getString();
3227 } 3267 }
@@ -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)
@@ -3272,7 +3321,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
3272 mNameMute = is_muted; 3321 mNameMute = is_muted;
3273 mNameAppearance = is_appearance; 3322 mNameAppearance = is_appearance;
3274 mTitle = title ? title->getString() : ""; 3323 mTitle = title ? title->getString() : "";
3275 LLStringFn::replace_nonprintable(mTitle,LL_UNKNOWN_CHAR); 3324 //LLStringFn::replace_nonprintable(mTitle,LL_UNKNOWN_CHAR); IMP-136 -- MC
3276 mNameString = utf8str_to_wstring(line); 3325 mNameString = utf8str_to_wstring(line);
3277 new_name = TRUE; 3326 new_name = TRUE;
3278 } 3327 }
@@ -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/llvograss.cpp b/linden/indra/newview/llvograss.cpp
index 4e7816c..79addbb 100644
--- a/linden/indra/newview/llvograss.cpp
+++ b/linden/indra/newview/llvograss.cpp
@@ -71,6 +71,8 @@ F32 w_mod[GRASS_MAX_BLADES]; // Factor to modulate wind movement by to rand
71LLVOGrass::SpeciesMap LLVOGrass::sSpeciesTable; 71LLVOGrass::SpeciesMap LLVOGrass::sSpeciesTable;
72S32 LLVOGrass::sMaxGrassSpecies = 0; 72S32 LLVOGrass::sMaxGrassSpecies = 0;
73 73
74LLVOGrass::SpeciesNames LLVOGrass::sSpeciesNames;
75
74 76
75LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) 77LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
76: LLAlphaObject(id, pcode, regionp) 78: LLAlphaObject(id, pcode, regionp)
@@ -201,11 +203,16 @@ void LLVOGrass::initClass()
201 203
202 if (species >= sMaxGrassSpecies) sMaxGrassSpecies = species + 1; 204 if (species >= sMaxGrassSpecies) sMaxGrassSpecies = species + 1;
203 205
206 std::string name;
207 static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
208 success &= grass_def->getFastAttributeString(name_string, name);
209 sSpeciesNames[name] = species;
210
204 if (!success) 211 if (!success)
205 { 212 {
206 std::string name; 213 /*std::string name;
207 static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); 214 static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
208 grass_def->getFastAttributeString(name_string, name); 215 grass_def->getFastAttributeString(name_string, name);*/
209 llwarns << "Incomplete definition of grass " << name << llendl; 216 llwarns << "Incomplete definition of grass " << name << llendl;
210 } 217 }
211 } 218 }
diff --git a/linden/indra/newview/llvograss.h b/linden/indra/newview/llvograss.h
index 95197a5..de700bd 100644
--- a/linden/indra/newview/llvograss.h
+++ b/linden/indra/newview/llvograss.h
@@ -116,6 +116,9 @@ public:
116 F32 mBladeWindAngle; 116 F32 mBladeWindAngle;
117 F32 mBWAOverlap; 117 F32 mBWAOverlap;
118 118
119 typedef std::map<std::string, S32> SpeciesNames;
120 static SpeciesNames sSpeciesNames;
121
119protected: 122protected:
120 ~LLVOGrass(); 123 ~LLVOGrass();
121 124
diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp
index 23c92ea..e1c3542 100644
--- a/linden/indra/newview/llvotree.cpp
+++ b/linden/indra/newview/llvotree.cpp
@@ -77,6 +77,9 @@ F32 LLVOTree::sTreeFactor = 1.f;
77LLVOTree::SpeciesMap LLVOTree::sSpeciesTable; 77LLVOTree::SpeciesMap LLVOTree::sSpeciesTable;
78S32 LLVOTree::sMaxTreeSpecies = 0; 78S32 LLVOTree::sMaxTreeSpecies = 0;
79 79
80LLVOTree::SpeciesNames LLVOTree::sSpeciesNames;
81
82
80// Tree variables and functions 83// Tree variables and functions
81 84
82LLVOTree::LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp): 85LLVOTree::LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp):
@@ -230,11 +233,16 @@ void LLVOTree::initClass()
230 233
231 if (species >= sMaxTreeSpecies) sMaxTreeSpecies = species + 1; 234 if (species >= sMaxTreeSpecies) sMaxTreeSpecies = species + 1;
232 235
236 std::string name;
237 static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
238 success &= tree_def->getFastAttributeString(name_string, name);
239 sSpeciesNames[name] = species;
240
233 if (!success) 241 if (!success)
234 { 242 {
235 std::string name; 243 //std::string name;
236 static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); 244 //static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
237 tree_def->getFastAttributeString(name_string, name); 245 //tree_def->getFastAttributeString(name_string, name);
238 llwarns << "Incomplete definition of tree " << name << llendl; 246 llwarns << "Incomplete definition of tree " << name << llendl;
239 } 247 }
240 } 248 }
diff --git a/linden/indra/newview/llvotree.h b/linden/indra/newview/llvotree.h
index f34371e..055cfa3 100644
--- a/linden/indra/newview/llvotree.h
+++ b/linden/indra/newview/llvotree.h
@@ -120,6 +120,9 @@ public:
120 120
121 static F32 sTreeFactor; // Tree level of detail factor 121 static F32 sTreeFactor; // Tree level of detail factor
122 122
123 typedef std::map<std::string, S32> SpeciesNames;
124 static SpeciesNames sSpeciesNames;
125
123 friend class LLDrawPoolTree; 126 friend class LLDrawPoolTree;
124protected: 127protected:
125 LLVector3 mTrunkBend; // Accumulated wind (used for blowing trees) 128 LLVector3 mTrunkBend; // Accumulated wind (used for blowing trees)
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
45class LLWindlightRemoteObserver : public LLWLPresetsObserver
46{
47public:
48 LLWindlightRemoteObserver(LLWindlightRemoteCtrl* wind_rem) : mWindlightRemote(wind_rem){}
49 virtual ~LLWindlightRemoteObserver() {}
50 virtual void changed() { mWindlightRemote->refreshPresets(); }
51private:
52 LLWindlightRemoteCtrl* mWindlightRemote;
53};
54
55
56LLWindlightRemoteCtrl::LLWindlightRemoteCtrl()
57{
58 mPresetsCombo = NULL;
59 mObserver = NULL;
60 setIsChrome(TRUE);
61
62 build();
63
64 setFocusRoot(TRUE);
65}
66
67LLWindlightRemoteCtrl::~LLWindlightRemoteCtrl()
68{
69 delete mObserver;
70 mObserver = NULL;
71}
72
73void 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
91void 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
103BOOL 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
126void 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
165void 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
243void 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
260void 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
36class LLComboBox;
37class LLWLPresetsObserver;
38
39class LLWindlightRemoteCtrl : public LLPanel
40{
41public:
42 LLWindlightRemoteCtrl();
43 virtual ~LLWindlightRemoteCtrl();
44 /*virtual*/ BOOL postBuild();
45 /*virtual*/ void draw();
46
47 void refreshPresets();
48
49private:
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
64LLWLParamManager * LLWLParamManager::sInstance = NULL; 64LLWLParamManager * LLWLParamManager::sInstance = NULL;
65std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers;
65 66
66LLWLParamManager::LLWLParamManager() : 67LLWLParamManager::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
243void LLWLParamManager::savePreset(const std::string & name) 246void 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
269void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader) 273void 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
577void LLWLParamManager::addObserver(LLWLPresetsObserver* observer)
578{
579 sObservers.push_back(observer);
580}
581
582// static
583void 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
596void 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
42class LLGLSLShader; 42class LLGLSLShader;
43
44class LLWLPresetsObserver
45{
46public:
47 virtual ~LLWLPresetsObserver() { };
48 virtual void changed() = 0;
49};
43 50
44// color control 51// color control
45struct WLColorControl { 52struct 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
198public: 210public:
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
255private: 266private:
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 2ded35a..947bdfd 100644
--- a/linden/indra/newview/llworldmapview.cpp
+++ b/linden/indra/newview/llworldmapview.cpp
@@ -49,6 +49,7 @@
49#include "llfloatermap.h" 49#include "llfloatermap.h"
50#include "llfloaterworldmap.h" 50#include "llfloaterworldmap.h"
51#include "llfocusmgr.h" 51#include "llfocusmgr.h"
52//#include "llmutelist.h" info not being sent
52#include "lltextbox.h" 53#include "lltextbox.h"
53#include "lltextureview.h" 54#include "lltextureview.h"
54#include "lltracker.h" 55#include "lltracker.h"
@@ -608,7 +609,11 @@ void LLWorldMapView::draw()
608 gGL.end(); 609 gGL.end();
609 } 610 }
610 611
611 // If this is mature, and you are not, draw a line across it 612 // As part of the AO project, we no longer want to draw access indicators;
613 // it's too complicated to get all the rules straight and will only
614 // cause confusion.
615 /**********************
616 // If this is mature, and you are not, draw a line across it
612 if (info->mAccess != SIM_ACCESS_DOWN 617 if (info->mAccess != SIM_ACCESS_DOWN
613 && info->mAccess > SIM_ACCESS_PG 618 && info->mAccess > SIM_ACCESS_PG
614 && gAgent.isTeen()) 619 && gAgent.isTeen())
@@ -624,6 +629,7 @@ void LLWorldMapView::draw()
624 gGL.vertex2f(right, top); 629 gGL.vertex2f(right, top);
625 gGL.end(); 630 gGL.end();
626 } 631 }
632 **********************/
627 633
628 // Draw the region name in the lower left corner 634 // Draw the region name in the lower left corner
629 LLFontGL* font = LLFontGL::sSansSerifSmall; 635 LLFontGL* font = LLFontGL::sSansSerifSmall;
@@ -642,10 +648,44 @@ void LLWorldMapView::draw()
642 // info->mAgents, 648 // info->mAgents,
643 // info->mName.c_str(), 649 // info->mName.c_str(),
644 // LLViewerRegion::accessToShortString(info->mAccess).c_str() ); 650 // LLViewerRegion::accessToShortString(info->mAccess).c_str() );
645 if (info->mAccess == SIM_ACCESS_DOWN) 651// [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a)
652 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
653 {
654 mesg = rlv_handler_t::cstrHidden;
655 }
656 else if (info->mAccess == SIM_ACCESS_DOWN)
657// [/RLVa:KB]
658// if (info->mAccess == SIM_ACCESS_DOWN)
646 { 659 {
647 mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str()); 660 mesg = llformat( "%s (%s)", info->mName.c_str(), sStringsMap["offline"].c_str());
648 } 661 }
662 else if (gSavedSettings.getBOOL("MapShowAgentCount") && gSavedSettings.getBOOL("MapShowPeople"))
663 {
664 // Display the agent count after the region name
665 S32 agent_count = LLWorldMap::getInstance()->mNumAgents[handle];
666 LLViewerRegion *region = gAgent.getRegion();
667
668 if (region && region->getHandle() == info->mHandle)
669 {
670 ++agent_count; // Bump by 1 if we're in this region
671 }
672
673 if (agent_count > 0)
674 {
675 //TODO: move this and the tooltip strings into XML
676 std::string count = llformat("%d %s", agent_count, agent_count > 1 ? "avatars" : "avatar");
677 font->renderUTF8(
678 count, 0,
679 llfloor(left + 3),
680 llfloor(bottom + 20),
681 LLColor4::white,
682 LLFontGL::LEFT,
683 LLFontGL::BASELINE,
684 LLFontGL::DROP_SHADOW);
685
686 mesg = info->mName;
687 }
688 }
649 else 689 else
650 { 690 {
651 mesg = info->mName; 691 mesg = info->mName;
@@ -869,7 +909,9 @@ void LLWorldMapView::drawAgents()
869 F32 agents_scale = (gMapScale * 0.9f) / 256.f; 909 F32 agents_scale = (gMapScale * 0.9f) / 256.f;
870 910
871 LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); 911 LLColor4 avatar_color = gColors.getColor( "MapAvatar" );
872 LLColor4 friend_color = gColors.getColor( "MapFriend" ); 912 /*LLColor4 friend_color = gColors.getColor( "MapFriend" );
913 LLColor4 muted_color = gColors.getColor( "MapMuted" );
914 LLColor4 glyph_color;*/
873 915
874 for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) 916 for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter)
875 { 917 {
@@ -892,7 +934,18 @@ void LLWorldMapView::drawAgents()
892 S32 agent_count = info.mExtra; 934 S32 agent_count = info.mExtra;
893 sim_agent_count += info.mExtra; 935 sim_agent_count += info.mExtra;
894 // Here's how we'd choose the color if info.mID were available but it's not being sent: 936 // Here's how we'd choose the color if info.mID were available but it's not being sent:
895 //LLColor4 color = (agent_count == 1 && is_agent_friend(info.mID)) ? friend_color : avatar_color; 937 /*if (agent_count == 1 && LLMuteList::getInstance()->isMuted(info.mID))
938 {
939 glyph_color = muted_color;
940 }
941 else if (agent_count == 1 && is_agent_friend(info.mID))
942 {
943 glyph_color = friend_color;
944 }
945 else
946 {
947 glyph_color = avatar_color;
948 }*/
896 drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, avatar_color); 949 drawImageStack(info.mPosGlobal, sAvatarSmallImage, agent_count, 3.f, avatar_color);
897 } 950 }
898 LLWorldMap::getInstance()->mNumAgents[handle] = sim_agent_count; // override mNumAgents for this sim 951 LLWorldMap::getInstance()->mNumAgents[handle] = sim_agent_count; // override mNumAgents for this sim
@@ -908,7 +961,7 @@ void LLWorldMapView::drawAgents()
908 region_center[VY] += REGION_WIDTH_METERS / 2; 961 region_center[VY] += REGION_WIDTH_METERS / 2;
909 // Reduce the stack size as you zoom out - always display at lease one agent where there is one or more 962 // Reduce the stack size as you zoom out - always display at lease one agent where there is one or more
910 S32 agent_count = (S32)(((num_agents-1) * agents_scale + (num_agents-1) * 0.1f)+.1f) + 1; 963 S32 agent_count = (S32)(((num_agents-1) * agents_scale + (num_agents-1) * 0.1f)+.1f) + 1;
911 drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, glyph_color_avatar); 964 drawImageStack(region_center, sAvatarSmallImage, agent_count, 3.f, avatar_color);
912 } 965 }
913 } 966 }
914 } 967 }
@@ -1058,7 +1111,10 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
1058 text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); 1111 text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING);
1059 text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); 1112 text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset);
1060 1113
1061 if (label != "") 1114 //if (label != "")
1115// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | Added: RLVa-1.0.0a
1116 if ( (label != "") && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
1117// [/RLVa:KB]
1062 { 1118 {
1063 font->renderUTF8( 1119 font->renderUTF8(
1064 label, 0, 1120 label, 0,
@@ -1118,7 +1174,10 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
1118 1174
1119 std::string message = 1175 std::string message =
1120 llformat("%s (%s)", 1176 llformat("%s (%s)",
1121 info->mName.c_str(), 1177 //info->mName.c_str(),
1178// [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a)
1179 (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? info->mName.c_str() : rlv_handler_t::cstrHidden.c_str(),
1180// [/RLVa:KB]
1122 LLViewerRegion::accessToString(info->mAccess).c_str()); 1181 LLViewerRegion::accessToString(info->mAccess).c_str());
1123 1182
1124 if (info->mAccess != SIM_ACCESS_DOWN) 1183 if (info->mAccess != SIM_ACCESS_DOWN)
@@ -1137,11 +1196,11 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
1137 1196
1138 if (agent_count == 1) 1197 if (agent_count == 1)
1139 { 1198 {
1140 message += "person"; 1199 message += "avatar";
1141 } 1200 }
1142 else 1201 else
1143 { 1202 {
1144 message += "people"; 1203 message += "avatars";
1145 } 1204 }
1146 } 1205 }
1147 } 1206 }
@@ -1184,6 +1243,9 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
1184 } 1243 }
1185 else 1244 else
1186 { 1245 {
1246 // Draw V indicator for above or below
1247 // *TODO: Replace this vector drawing with icons
1248
1187 F32 left = x_pixels - dot_radius; 1249 F32 left = x_pixels - dot_radius;
1188 F32 right = x_pixels + dot_radius; 1250 F32 right = x_pixels + dot_radius;
1189 F32 center = (left + right) * 0.5f; 1251 F32 center = (left + right) * 0.5f;
@@ -1192,13 +1254,14 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
1192 1254
1193 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); 1255 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
1194 gGL.color4fv( color.mV ); 1256 gGL.color4fv( color.mV );
1195 LLUI::setLineWidth(1.5f); 1257 LLUI::setLineWidth(3.0f);
1196 F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y 1258 F32 point = relative_z > HEIGHT_THRESHOLD ? top : bottom; // Y pos of the point of the V
1259 F32 back = relative_z > HEIGHT_THRESHOLD ? bottom : top; // Y pos of the ends of the V
1197 gGL.begin( LLRender::LINES ); 1260 gGL.begin( LLRender::LINES );
1198 gGL.vertex2f(center, top); 1261 gGL.vertex2f(left, back);
1199 gGL.vertex2f(left, h_bar); 1262 gGL.vertex2f(center, point);
1200 gGL.vertex2f(right, h_bar); 1263 gGL.vertex2f(center, point);
1201 gGL.vertex2f(right, bottom); 1264 gGL.vertex2f(right, back);
1202 gGL.end(); 1265 gGL.end();
1203 LLUI::setLineWidth(1.0f); 1266 LLUI::setLineWidth(1.0f);
1204 } 1267 }
diff --git a/linden/indra/newview/llworldmapview.h b/linden/indra/newview/llworldmapview.h
index 6dbaa8d..b6ab855 100644
--- a/linden/indra/newview/llworldmapview.h
+++ b/linden/indra/newview/llworldmapview.h
@@ -105,7 +105,7 @@ public:
105 F32 y_pixels, 105 F32 y_pixels,
106 const LLColor4& color, 106 const LLColor4& color,
107 F32 relative_z = 0.f, 107 F32 relative_z = 0.f,
108 F32 dot_radius = 3.f); 108 F32 dot_radius = 5.f);
109 109
110 static void drawTrackingCircle( const LLRect& rect, S32 x, S32 y, 110 static void drawTrackingCircle( const LLRect& rect, S32 x, S32 y,
111 const LLColor4& color, 111 const LLColor4& color,
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
68primbackup* primbackup::sInstance = 0;
69
70class 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
159class 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
226primbackup::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//
247primbackup* primbackup::getInstance()
248{
249 if ( ! sInstance )
250 sInstance = new primbackup();
251
252 return sInstance;
253}
254
255primbackup::~primbackup()
256{
257 // save position of floater
258 gSavedSettings.setRect( "FloaterPrimImport", getRect() );
259 sInstance = 0;
260}
261
262void primbackup::draw()
263{
264 LLFloater::draw();
265}
266
267void 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
284void primbackup::onClose( bool app_quitting )
285{
286 setVisible( false );
287 // HACK for fast XML iteration replace with:
288 // destroy();
289}
290
291void 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
305void 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
332void 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
353void 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
458LLSD 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
563void 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
617void 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
721LLVector3 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
729void 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
738void 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
752void 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
774void 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
887void 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.
951bool 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
981void 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
992void 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
1039void 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
6enum export_states {EXPORT_INIT,EXPORT_STRUCTURE,EXPORT_TEXTURES,EXPORT_LLSD,EXPORT_DONE};
7
8class 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
52private:
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
19class RlvEvent
20{
21public:
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
28protected:
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
57class RlvObserver
58{
59public:
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
81template < class T >
82class 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
155class RlvBehaviourObserver
156{
157public:
158 virtual ~RlvBehaviourObserver() {}
159 virtual void changed(const RlvCommand& rlvCmd, bool fInternal) = 0;
160};
161
162// ============================================================================
163
164class RlvBehaviourNotifyObserver : public RlvBehaviourObserver
165{
166public:
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 }
212protected:
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
13std::map<std::string, S16> RlvExtGetSet::m_DbgAllowed;
14
15// Checked: 2009-06-03 (RLVa-0.2.0h) | Modified: RLVa-0.2.0h
16RlvExtGetSet::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)
39BOOL RlvExtGetSet::onForceCommand(const RlvEvent& rlvEvent)
40{
41 return processCommand(rlvEvent.getSenderID(), rlvEvent.getCommand());
42}
43
44// Checked: 2009-05-17 (RLVa-0.2.0a)
45BOOL 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
51BOOL 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
114bool 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
135S16 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
142std::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
175std::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
187void 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
224std::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
289void 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
15class RlvExtGetSet : public RlvObserver
16{
17public:
18 RlvExtGetSet();
19 virtual ~RlvExtGetSet() {}
20
21 virtual BOOL onForceCommand(const RlvEvent& rlvEvent);
22 virtual BOOL onReplyCommand(const RlvEvent& rlvEvent);
23protected:
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
33public:
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
15RlvFloaterBehaviour::RlvFloaterBehaviour(const LLSD& key)
16 : LLFloater(std::string("rlvBehaviours"))
17{
18 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_behaviour.xml");
19}
20
21
22void RlvFloaterBehaviour::show(void*)
23{
24 RlvFloaterBehaviour::showInstance();
25}
26
27void 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
99BOOL RlvFloaterBehaviour::canClose()
100{
101 return !LLApp::isExiting();
102}
103
104void RlvFloaterBehaviour::onOpen()
105{
106 gRlvHandler.addBehaviourObserver(this);
107
108 refreshAll();
109}
110
111void 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
124BOOL RlvFloaterBehaviour::postBuild()
125{
126 return TRUE;
127}
128
129// ============================================================================
130/*
131 * RlvBehaviourObserver overrides
132 */
133
134void RlvFloaterBehaviour::changed(const RlvCommand& /*rlvCmd*/, bool /*fInternal*/)
135{
136 refreshAll();
137}
138
139// ============================================================================
140
141void 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
9class RlvFloaterBehaviour :
10 public LLFloater,
11 public LLFloaterSingleton<RlvFloaterBehaviour>,
12 public RlvBehaviourObserver
13{
14 friend class LLUISingleton<RlvFloaterBehaviour, VisibilityPolicy<LLFloater> >;
15public:
16 virtual ~RlvFloaterBehaviour() {}
17
18 /*
19 * LLFloater overrides
20 */
21public:
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 */
30public:
31 /*virtual*/ void changed(const RlvCommand& rlvCmd, bool fInternal);
32
33 /*
34 * Member functions
35 */
36public:
37 static void show(void*);
38 static void onAvatarNameLookup(const LLUUID& uuid, const std::string& strFirst, const std::string& strLast, BOOL fGroup, void* pParam);
39protected:
40 void refreshAll();
41private:
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
39extern const char* NEW_CATEGORY_NAME;
40
41// ============================================================================
42// Static variable initialization
43//
44
45BOOL RlvHandler::m_fEnabled = FALSE;
46BOOL RlvHandler::fNoSetEnv = FALSE;
47BOOL RlvHandler::fLegacyNaming = FALSE;
48BOOL RlvHandler::m_fFetchStarted = FALSE;
49BOOL RlvHandler::m_fFetchComplete = FALSE;
50RlvMultiStringSearch RlvHandler::m_AttachLookup;
51
52const std::string RlvHandler::cstrSharedRoot = RLV_ROOT_FOLDER;
53
54// Keep these consistent with regular RLV
55const std::string RlvHandler::cstrBlockedRecvIM = "*** IM blocked by your viewer";
56const std::string RlvHandler::cstrBlockedSendIM = "*** IM blocked by sender's viewer";
57const std::string RlvHandler::cstrHidden = "(Hidden)";
58const std::string RlvHandler::cstrHiddenParcel = "(Hidden parcel)";
59const std::string RlvHandler::cstrHiddenRegion = "(Hidden region)";
60const std::string RlvHandler::cstrMsgRecvIM =
61 "The Resident you messaged is prevented from reading your instant messages at the moment, please try again later.";
62const std::string RlvHandler::cstrMsgTpLure =
63 "The Resident you invited is prevented from accepting teleport offers. Please try again later.";
64
65const 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
73rlv_handler_t gRlvHandler;
74
75// ============================================================================
76// Helper functions
77//
78
79// Checked: 2009-07-12 (RLVa-1.0.0h) | Added: RLVa-0.2.0e
80inline 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
93static 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
118RlvHandler::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
128RlvHandler::~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
140inline 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
148LLViewerJointAttachment* 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
166LLViewerJointAttachment* 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
196S32 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
212LLViewerJointAttachment* 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
241bool 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
257bool 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
264bool 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
278bool 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
344bool 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
352bool 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
360bool 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)
373void 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)
381void 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)
389void 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:
399BOOL 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
528BOOL 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
760void 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
770BOOL 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
918BOOL 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)
1019BOOL 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
1243void 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
1270void 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
1398void 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
1464bool 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
1503void 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
1533size_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
1546std::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
1566void 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
1599void 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
1615void 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
1657const 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
1670bool 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
1706BOOL 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)
1737class RlvSharedRootFetcher : public LLInventoryFetchDescendentsObserver
1738{
1739public:
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)
1753void 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
1788bool 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
1804LLViewerInventoryCategory* 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
1826LLViewerInventoryCategory* 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
1859LLViewerInventoryCategory* 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
1881std::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
2054void 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
2095void 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
2135bool 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
2169void 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
2282bool 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
2341struct rlv_wear_info { U32 cntWorn, cntTotal, cntChildWorn, cntChildTotal; };
2342
2343// Checked: 2009-05-30 (RLVa-0.2.0e) | Modified: RLVa-0.2.0e
2344void 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)
2413bool 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
2449BOOL 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
2499BOOL RlvHandler::canDisable()
2500{
2501 return TRUE;
2502}
2503
2504void 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
23typedef std::map<LLUUID, RlvObject> rlv_object_map_t;
24typedef std::multimap<S32, LLUUID> rlv_detach_map_t;
25typedef std::map<S32, LLUUID> rlv_reattach_map_t;
26typedef std::multimap<LLUUID, ERlvBehaviour> rlv_exception_map_t;
27typedef std::map<S32, RlvRedirInfo> rlv_redir_map_t;
28
29class RlvHandler
30{
31public:
32 RlvHandler();
33 ~RlvHandler();
34
35 // --------------------------------
36
37 /*
38 * Rule checking functions
39 */
40public:
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 */
117public:
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);
147protected:
148 void clearState();
149
150 // --------------------------------
151
152 /*
153 * Inventory related functions
154 */
155public:
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;
166protected:
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 */
182public:
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()
194protected:
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 */
213public:
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];
226protected:
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 */
263public:
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
275typedef RlvHandler rlv_handler_t;
276extern rlv_handler_t gRlvHandler;
277
278// ============================================================================
279// Inlined member functions
280//
281
282// Checked: 2009-07-09 (RLVa-1.0.0f)
283inline 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
290inline 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
300inline 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
309inline 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)
315inline 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)
321inline 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
330inline 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:
336inline bool RlvHandler::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const
337{
338 return hasBehaviourExcept(eBehaviour, strOption, LLUUID::null);
339}
340
341// Checked:
342inline bool RlvHandler::hasBehaviour(const std::string& strBehaviour) const
343{
344 return hasBehaviourExcept(strBehaviour, LLUUID::null);
345}
346
347// Checked:
348inline bool RlvHandler::hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const
349{
350 return hasBehaviourExcept(strBehaviour, strOption, LLUUID::null);
351}
352
353// Checked:
354inline 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
374inline bool RlvHandler::isDetachable(LLViewerObject* pObj) const
375{
376 return (pObj == NULL) || (!pObj->isAttachment()) || (isDetachable(getAttachPointIndex(pObj)));
377}
378
379// Checked:
380inline 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:
392inline 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
398inline 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
413inline 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)
429inline 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
446inline 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
455inline 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
17RlvMultiStringSearch RlvCommand::m_BhvrLookup;
18
19// ============================================================================
20
21// Checked:
22RlvCommand::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
58RlvCommand::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
92BOOL 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
125void 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)
149std::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
156BOOL 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
176BOOL 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
194BOOL 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
202BOOL 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
210BOOL 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
218BOOL 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)
227std::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
252S32 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
272const 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
284bool 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
323bool 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
362bool 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
369bool 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
375bool 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
381bool 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
387bool 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)
413BOOL 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
420BOOL RlvGCTimer::tick()
421{
422 bool fContinue = gRlvHandler.onGC();
423 if (!fContinue)
424 gRlvHandler.m_pGCTimer = NULL;
425 return !fContinue;
426}
427
428void 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
460void 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
473RlvWLSnapshot* 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
489BOOL 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
541void 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
558void 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
570bool 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)
596void 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
618std::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
646std::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
51const S32 RLV_VERSION_MAJOR = 1;
52const S32 RLV_VERSION_MINOR = 20;
53const S32 RLV_VERSION_PATCH = 0;
54
55// Implementation version
56const S32 RLVa_VERSION_MAJOR = 1;
57const S32 RLVa_VERSION_MINOR = 0;
58const S32 RLVa_VERSION_PATCH = 1;
59const 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
99enum 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
165enum 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
173enum 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
192class RlvCommand
193{
194public:
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 */
227protected:
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
247typedef std::list<RlvCommand> rlv_command_list_t;
248
249class RlvObject
250{
251public:
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; }
265protected:
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
282class RlvCriteriaCategoryCollector : public LLInventoryCollectFunctor
283{
284public:
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
312protected:
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
324class RlvWearableItemCollector : public LLInventoryCollectFunctor
325{
326public:
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;
337protected:
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
358struct RlvRetainedCommand
359{
360public:
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) {}
366private:
367 RlvRetainedCommand();
368};
369typedef std::list<RlvRetainedCommand> rlv_retained_list_t;
370
371// ============================================================================
372/*
373 * RlvWLSnapshot
374 * =============
375 *
376 */
377
378struct RlvWLSnapshot
379{
380public:
381 static void restoreSnapshot(const RlvWLSnapshot* pWLSnapshot);
382 static RlvWLSnapshot* takeSnapshot();
383private:
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
411inline BOOL rlvGetSettingBOOL(const std::string& strSetting, BOOL fDefault)
412{
413 return (gSavedSettings.controlExists(strSetting)) ? gSavedSettings.getBOOL(strSetting) : fDefault;
414}
415inline BOOL rlvGetPerUserSettingsBOOL(const std::string& strSetting, BOOL fDefault)
416{
417 return (gSavedPerAccountSettings.controlExists(strSetting)) ? gSavedPerAccountSettings.getBOOL(strSetting) : fDefault;
418}
419
420class RlvSettings
421{
422public:
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
445struct RlvRedirInfo
446{
447 S16 nRedirChat;
448 S16 nRedirEmote;
449
450 RlvRedirInfo() : nRedirChat(0), nRedirEmote(0) {}
451 bool isActive() { return (nRedirChat + nRedirEmote) != 0; }
452};
453
454struct 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
469class RlvGCTimer : public LLEventTimer
470{
471public:
472 RlvGCTimer() : LLEventTimer(30.0) {}
473 virtual BOOL tick();
474};
475
476class RlvCurrentlyWorn : public LLInventoryFetchObserver
477{
478public:
479 RlvCurrentlyWorn() {}
480 ~RlvCurrentlyWorn() {}
481 virtual void done() {}
482
483 static void fetchWorn();
484 void fetchItem(const LLUUID& idItem);
485};
486
487struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor
488{
489 virtual bool apply(LLSelectNode* pNode);
490};
491
492struct RlvSelectIsOwnedByOrGroupOwned : public LLSelectedNodeFunctor
493{
494 RlvSelectIsOwnedByOrGroupOwned(const LLUUID& uuid) : m_idAgent(uuid) {}
495 virtual bool apply(LLSelectNode* pNode);
496 LLUUID m_idAgent;
497};
498
499struct 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
512BOOL rlvAttachToEnabler(void* pParam);
513bool rlvCanDeleteOrReturn();
514S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type);
515bool rlvIsEmote(const std::string& strUTF8Text);
516bool rlvIsValidChannel(S32 nChannel);
517bool rlvIsWearingItem(const LLInventoryItem* pItem);
518
519void rlvForceDetach(LLViewerJointAttachment* pAttachPt);
520void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null);
521bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply);
522bool rlvSendChatReply(S32 nChannel, const std::string& strReply);
523
524void rlvStringReplace(std::string& strText, std::string strFrom, const std::string& strTo);
525std::string rlvGetFirstParenthesisedText(const std::string& strText, std::string::size_type* pidxMatch = NULL);
526std::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
538inline 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
545inline 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
559inline 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
565inline 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
571inline 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
21RlvMultiStringSearch::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
27void 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")
67bool 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
169bool 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
184std::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
8template<typename T> class RlvMultiStringSearchFSM_STL
9{
10public:
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
93protected:
94 /*
95 * Member variables
96 */
97 std::vector<T*> m_arFSM;
98};
99
100// ============================================================================
101
102struct 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
114class RlvMultiStringSearch
115{
116public:
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
156protected:
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
179inline bool RlvMultiStringSearch::findFirst(const std::string& strText, RlvMultiStringSearchMatch& match) const
180{
181 return findNext(strText.c_str(), 0, strText.length(), match);
182}
183
184inline 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 1f97a2e..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-->
@@ -159,6 +161,8 @@
159<!-- MAP --> 161<!-- MAP -->
160<MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> 162<MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color -->
161<MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> 163<MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color -->
164<MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color -->
165<MapSelected value="255, 0, 0, 255" /> <!-- Selected avatars' glyph color -->
162 166
163 <!-- MINI-MAP --> 167 <!-- MINI-MAP -->
164<NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> 168<NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background -->
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/>&nbsp;&nbsp;&nbsp;loading... 5 <img src="imprudence_loading.png" align="absmiddle"><br/>&nbsp;&nbsp;&nbsp;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 89399ef..9b0e4c7 100644
--- a/linden/indra/newview/skins/default/textures/textures.xml
+++ b/linden/indra/newview/skins/default/textures/textures.xml
@@ -364,6 +364,9 @@
364 <texture name="icn_label_music.tga"/> 364 <texture name="icn_label_music.tga"/>
365 <texture name="icn_label_media.tga"/> 365 <texture name="icn_label_media.tga"/>
366 <texture name="arrow_down.tga"/> 366 <texture name="arrow_down.tga"/>
367 <texture name="arrow_up.tga"/>
368 <texture name="arrow_left.tga"/>
369 <texture name="arrow_right.tga"/>
367 <texture name="cloud-particle.j2c" use_mips="true"/> 370 <texture name="cloud-particle.j2c" use_mips="true"/>
368 371
369 <texture name="skin_thumbnail_default.png" preload="true" /> 372 <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 &gt;&gt;"
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="&lt;&lt; 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
new file mode 100644
index 0000000..3485812
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml
@@ -0,0 +1,98 @@
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"
3 can_tear_off="false" follows="top|right" height="455" min_height="400" min_width="240"
4 name="minimap" rect_control="FloaterMiniMapRect" width="200">
5
6 <panel label="Mini Map" name="mini_mapview"
7 top="-2" left="2" bottom="196" right="196"
8 follows="left|top|right|bottom" mouse_opaque="false" />
9
10 <panel name="RadarPanel" label="Radar"
11 background_visible="true" bg_alpha_color="NetMapBackgroundColor"
12 left="2" top="196" right="196" height="120"
13 follows="left|right|bottom" border="false" mouse_opaque="true">
14
15 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
16 bottom="-20" drop_shadow_visible="true" follows="left|top"
17 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
18 mouse_opaque="true" name="lblAvatarCount" v_pad="0"
19 width="220">
20 0
21 </text>
22 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
23 bottom="-20" drop_shadow_visible="true" follows="left|top"
24 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="27"
25 mouse_opaque="true" name="avatars_in" v_pad="0"
26 width="220">
27 Avatars in
28 </text>
29 <slider bottom_delta="0" left_delta="55" follows="left|top" width="110" height="15"
30 name="near_me_range" label="" control_name="NearMeRange"
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"
33 bottom_delta="0" left="190" drop_shadow_visible="true" follows="left|top"
34 font="SansSerifSmall" h_pad="0" halign="left" height="15"
35 mouse_opaque="true" name="meters" v_pad="0"
36 width="40">
37 Meters
38 </text>
39 <tab_container border="false" bottom_delta="-176" height="172" left="0" mouse_opaque="false"
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="Kick..."
80 left_delta="0" name="estate_eject_btn" tool_tip=""
81 width="80" />
82 </panel>
83 </tab_container>
84 <scroll_list bottom="-190" width="104" height="143" left="4"
85 follows="left|bottom|right" draw_border="false" draw_heading="true"
86 draw_stripes="true" column_padding="5" sort_column="1" mouse_opaque="true"
87 background_visible="true" multi_select="false" name="RadarList">
88 <column name="avatar_name" label="Name" dynamicwidth="true" />
89 <column name="avatar_distance" label="Dist." width="48" />
90 </scroll_list>
91 </panel>
92 <string name="no_one_near">
93 No avatars within range
94 </string>
95 <string name="muted">
96 (muted)
97 </string>
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 eb9b1c6..a57c568 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">
@@ -83,38 +83,45 @@
83 font="SansSerifSmall" height="16" initial_value="false" 83 font="SansSerifSmall" height="16" initial_value="false"
84 label="Edit linked parts" left="4" mouse_opaque="true" 84 label="Edit linked parts" left="4" mouse_opaque="true"
85 name="checkbox edit linked parts" width="114" /> 85 name="checkbox edit linked parts" width="114" />
86 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 86 <button bottom_delta="-19" follows="left|top" font="SansSerifSmall"
87 bottom_delta="-20" drop_shadow_visible="true" follows="left|top" 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" />
92 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
93 bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
88 font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6" 94 font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6"
89 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">
90 Ruler mode: 96 Ruler:
91 </text> 97 </text>
92 <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"
93 left_delta="74" max_chars="20" mouse_opaque="true" 99 left_delta="40" max_chars="20" mouse_opaque="true"
94 name="combobox grid mode" width="86"> 100 name="combobox grid mode" width="86">
95 <combo_item name="World" value="World"> 101 <combo_item name="World" value="World">
96 World 102 World
97 </combo_item> 103 </combo_item>
98 <combo_item name="Local" value="Local"> 104 <combo_item name="Local" value="Local">
99 Local 105 Local
100 </combo_item> 106 </combo_item>
101 <combo_item name="Reference" value="Reference"> 107 <combo_item name="Reference" value="Reference">
102 Reference 108 Reference
103 </combo_item> 109 </combo_item>
104 </combo_box> 110 </combo_box>
105 <check_box bottom="-70" control_name="ScaleUniform" follows="left|top" 111 <check_box bottom="-70" control_name="ScaleUniform" follows="left|top"
106 font="SansSerifSmall" height="16" initial_value="false" 112 font="SansSerifSmall" height="16" initial_value="false"
107 label="Stretch Both Sides" left="143" mouse_opaque="true" 113 label="Stretch Both Sides" left="143" mouse_opaque="true"
108 name="checkbox uniform" width="134" /> 114 name="checkbox uniform" width="134" />
109 <check_box bottom_delta="-15" control_name="ScaleStretchTextures" follows="left|top" 115 <check_box bottom_delta="-15" control_name="ScaleStretchTextures" follows="left|top"
110 font="SansSerifSmall" height="16" initial_value="true" 116 font="SansSerifSmall" height="16" initial_value="true"
111 label="Stretch Textures" left_delta="0" mouse_opaque="true" 117 label="Stretch Textures" left_delta="0" mouse_opaque="true"
112 name="checkbox stretch textures" width="134" /> 118 name="checkbox stretch textures" width="134" />
113 <check_box bottom_delta="-19" control_name="SnapEnabled" follows="left|top" 119 <check_box bottom_delta="-19" control_name="SnapEnabled" follows="left|top"
114 font="SansSerifSmall" height="16" initial_value="true" label="Use Grid" 120 font="SansSerifSmall" height="16" initial_value="true" label="Use Grid"
115 left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" /> 121 left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" />
116 <button bottom_delta="-14" follows="left|top" font="SansSerifSmall" halign="center" 122 <button bottom_delta="-19" follows="left|top" font="SansSerifSmall"
117 height="16" label="Options..." label_selected="Options..." left_delta="20" 123 halign="center" valign="center"
124 height="20" label="Options..." label_selected="Options..." left_delta="20"
118 mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" /> 125 mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" />
119 126
120<!-- Help text --> 127<!-- Help text -->
@@ -227,6 +234,13 @@
227 image_unselected="object_grass.tga" label="" label_selected="" 234 image_unselected="object_grass.tga" label="" label_selected=""
228 left_delta="23" mouse_opaque="true" name="ToolGrass" scale_image="TRUE" 235 left_delta="23" mouse_opaque="true" name="ToolGrass" scale_image="TRUE"
229 tool_tip="Grass" width="24" /> 236 tool_tip="Grass" width="24" />
237 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
238 bottom="-104" drop_shadow_visible="true" follows="left|top"
239 font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-5"
240 mouse_opaque="true" name="tree_grass_label" v_pad="0" width="135" />
241 <combo_box max_chars="20" enabled="false" allow_text_entry="false" name="trees_grass"
242 height="18" width="135" right="-5" bottom="-122"
243 follows="left|top" mouse_opaque="true" />
230 <check_box bottom="-117" control_name="CreateToolKeepSelected" follows="left|top" 244 <check_box bottom="-117" control_name="CreateToolKeepSelected" follows="left|top"
231 font="SansSerifSmall" height="16" initial_value="false" 245 font="SansSerifSmall" height="16" initial_value="false"
232 label="Keep Tool Selected" left="4" mouse_opaque="true" 246 label="Keep Tool Selected" left="4" mouse_opaque="true"
@@ -276,18 +290,18 @@
276 <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"
277 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"
278 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"
279 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">
280 Brush: 294 Bulldozer:
281 </text> 295 </text>
282 296
283 <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"
284 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"
285 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"
286 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">
287 Size 301 Size
288 </text> 302 </text>
289 <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"
290 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"
291 mouse_opaque="true" name="slider brush size" width="80" /> 305 mouse_opaque="true" name="slider brush size" width="80" />
292 306
293 307
@@ -299,21 +313,23 @@
299 </text> 313 </text>
300 <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"
301 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"
302 mouse_opaque="true" name="slider force" width="80" /> 316 mouse_opaque="true" name="slider force" width="80" />
303 317 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
304 318 bottom="-168" left="118" drop_shadow_visible="true" follows="left|top"
305 <button bottom="-163" follows="left|top" font="SansSerifSmall" halign="center" 319 font="SansSerifSmall" h_pad="0" halign="right" height="16"
306 height="20" label="More &gt;&gt;" left="186" mouse_opaque="true" 320 mouse_opaque="true" name="obj_count" v_pad="0" width="143">
307 name="button more" scale_image="TRUE" tool_tip="Advanced Options" 321 Selected objects: [COUNT]
308 width="80" /> 322 </text>
309 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" 323 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
310 height="20" label="&lt;&lt; Less" left_delta="0" mouse_opaque="true" 324 bottom="-181" left="118" drop_shadow_visible="true" follows="left|top"
311 name="button less" scale_image="TRUE" tool_tip="Advanced Options" 325 font="SansSerifSmall" h_pad="0" halign="right" height="16"
312 width="80" /> 326 mouse_opaque="true" name="prim_count" v_pad="0" width="143">
327 primitives: [COUNT]
328 </text>
313 329
314<!-- Sub-tabs --> 330<!-- Sub-tabs -->
315 331
316 <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"
317 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"
318 tab_position="top" width="272"> 334 tab_position="top" width="272">
319 <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"
@@ -351,7 +367,7 @@
351 Thrax Linden 367 Thrax Linden
352 </text> 368 </text>
353 <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center" 369 <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center"
354 height="16" label="Profile..." label_selected="Profile..." left_delta="94" 370 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
355 mouse_opaque="true" name="button creator profile" scale_image="TRUE" 371 mouse_opaque="true" name="button creator profile" scale_image="TRUE"
356 width="78" /> 372 width="78" />
357 <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"
@@ -367,32 +383,42 @@
367 Thrax Linden 383 Thrax Linden
368 </text> 384 </text>
369 <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center" 385 <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center"
370 height="16" label="Profile..." label_selected="Profile..." left_delta="94" 386 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
371 mouse_opaque="true" name="button owner profile" scale_image="TRUE" 387 mouse_opaque="true" name="button owner profile" scale_image="TRUE"
372 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" />
373 <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"
374 bottom="-106" drop_shadow_visible="true" follows="left|top" 406 bottom="-126" drop_shadow_visible="true" follows="left|top"
375 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" 407 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
376 mouse_opaque="true" name="Group:" v_pad="0" width="78"> 408 mouse_opaque="true" name="Group:" v_pad="0" width="78">
377 Group: 409 Group:
378 </text> 410 </text>
379 <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"
380 bottom="-106" drop_shadow_visible="true" follows="left|top" 412 bottom="-126" drop_shadow_visible="true" follows="left|top"
381 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"
382 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"
383 width="88"> 415 width="88">
384 The Lindens 416 The Lindens
385 </text> 417 </text>
386 <button bottom="-106" follows="top|right" font="SansSerifSmall" halign="center" 418 <button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
387 height="16" label="Set..." label_selected="Set..." left_delta="94" 419 height="20" label="Set..." label_selected="Set..." left_delta="94"
388 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" />
389 <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"
390 bottom="-126" drop_shadow_visible="true" follows="left|top"
391 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
392 mouse_opaque="true" name="prim info" v_pad="0" width="166">
393 1 Object, 1 Primitive
394 </text>
395 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
396 bottom_delta="-20" drop_shadow_visible="true" follows="left|top" 422 bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
397 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" 423 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
398 mouse_opaque="true" name="Permissions:" v_pad="0" width="85"> 424 mouse_opaque="true" name="Permissions:" v_pad="0" width="85">
@@ -407,7 +433,7 @@
407 <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"
408 initial_value="false" label="Share with group" left="10" 434 initial_value="false" label="Share with group" left="10"
409 mouse_opaque="true" name="checkbox share with group" 435 mouse_opaque="true" name="checkbox share with group"
410 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."
411 width="166" /> 437 width="166" />
412 <string name="text deed continued"> 438 <string name="text deed continued">
413 Deed... 439 Deed...
@@ -415,8 +441,8 @@
415 <string name="text deed"> 441 <string name="text deed">
416 Deed 442 Deed
417 </string> 443 </string>
418 <button bottom="-186" follows="top|right" font="SansSerifSmall" halign="center" 444 <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
419 height="16" label="Deed..." label_selected="Deed..." left_delta="172" 445 height="20" label="Deed..." label_selected="Deed..." left_delta="172"
420 mouse_opaque="true" name="button deed" scale_image="TRUE" 446 mouse_opaque="true" name="button deed" scale_image="TRUE"
421 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."
422 width="78" /> 448 width="78" />
@@ -504,37 +530,37 @@
504 </combo_item> 530 </combo_item>
505 </combo_box> 531 </combo_box>
506 <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"
507 bottom="-135" drop_shadow_visible="true" follows="left|top" 533 bottom="-115" drop_shadow_visible="true" follows="left|top"
508 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" 534 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88"
509 mouse_opaque="true" name="B:" v_pad="0" width="174"> 535 mouse_opaque="true" name="B:" v_pad="0" width="174">
510 B: 536 B:
511 </text> 537 </text>
512 <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"
513 bottom="-135" drop_shadow_visible="true" follows="left|top" 539 bottom="-115" drop_shadow_visible="true" follows="left|top"
514 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"
515 mouse_opaque="true" name="O:" v_pad="0" width="124"> 541 mouse_opaque="true" name="O:" v_pad="0" width="124">
516 O; 542 O;
517 </text> 543 </text>
518 <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"
519 bottom="-135" drop_shadow_visible="true" follows="left|top" 545 bottom="-115" drop_shadow_visible="true" follows="left|top"
520 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"
521 mouse_opaque="true" name="G:" v_pad="0" width="74"> 547 mouse_opaque="true" name="G:" v_pad="0" width="74">
522 G: 548 G:
523 </text> 549 </text>
524 <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"
525 bottom="-147" drop_shadow_visible="true" follows="left|top" 551 bottom="-127" drop_shadow_visible="true" follows="left|top"
526 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" 552 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88"
527 mouse_opaque="true" name="E:" v_pad="0" width="174"> 553 mouse_opaque="true" name="E:" v_pad="0" width="174">
528 E: 554 E:
529 </text> 555 </text>
530 <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"
531 bottom="-147" drop_shadow_visible="true" follows="left|top" 557 bottom="-127" drop_shadow_visible="true" follows="left|top"
532 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"
533 mouse_opaque="true" name="N:" v_pad="0" width="124"> 559 mouse_opaque="true" name="N:" v_pad="0" width="124">
534 N: 560 N:
535 </text> 561 </text>
536 <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"
537 bottom="-147" drop_shadow_visible="true" follows="left|top" 563 bottom="-127" drop_shadow_visible="true" follows="left|top"
538 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"
539 mouse_opaque="true" name="F:" v_pad="0" width="74"> 565 mouse_opaque="true" name="F:" v_pad="0" width="74">
540 F: 566 F:
@@ -634,15 +660,15 @@
634 </text> 660 </text>
635 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16" 661 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16"
636 increment="0.01" initial_val="0" label="X" label_width="10" left="10" 662 increment="0.01" initial_val="0" label="X" label_width="10" left="10"
637 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale X" 663 min_val="0.01" mouse_opaque="true" name="Scale X"
638 text_enabled_color="1, 1, 1, 1" width="96" /> 664 text_enabled_color="1, 1, 1, 1" width="96" />
639 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 665 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
640 increment="0.01" initial_val="0" label="Y" label_width="10" left="10" 666 increment="0.01" initial_val="0" label="Y" label_width="10" left="10"
641 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Y" 667 min_val="0.01" mouse_opaque="true" name="Scale Y"
642 text_enabled_color="1, 1, 1, 1" width="96" /> 668 text_enabled_color="1, 1, 1, 1" width="96" />
643 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 669 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
644 increment="0.01" initial_val="0" label="Z" label_width="10" left="10" 670 increment="0.01" initial_val="0" label="Z" label_width="10" left="10"
645 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Z" 671 min_val="0.01" mouse_opaque="true" name="Scale Z"
646 text_enabled_color="1, 1, 1, 1" width="96" /> 672 text_enabled_color="1, 1, 1, 1" width="96" />
647 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 673 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
648 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 674 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
@@ -751,12 +777,12 @@
751 Skew 777 Skew
752 </text> 778 </text>
753 <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"
754 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"
755 mouse_opaque="true" name="Scale 1" width="68" label=" " label_width="10"/> 781 mouse_opaque="true" name="Scale 1" width="68" />
756 <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"
757 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"
758 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" label=" " /> 784 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" />
759 <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"
760 bottom_delta="-15" drop_shadow_visible="true" follows="left|top" 786 bottom_delta="-15" drop_shadow_visible="true" follows="left|top"
761 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" 787 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121"
762 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> 788 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141">
@@ -875,10 +901,10 @@
875 </text> 901 </text>
876 <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"
877 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"
878 mouse_opaque="true" name="Radius Offset" width="68" label=" " label_width="10" /> 904 mouse_opaque="true" name="Radius Offset" width="68" />
879 <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"
880 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"
881 mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" /> 907 mouse_opaque="true" name="Revolutions" width="68" />
882 <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"
883 default_image_name="Default" follows="left|top" height="141" 909 default_image_name="Default" follows="left|top" height="141"
884 label="Sculpt Texture" left="121" mouse_opaque="true" 910 label="Sculpt Texture" left="121" mouse_opaque="true"
@@ -1179,7 +1205,7 @@
1179 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"
1180 name="rptctrl" width="68" /> 1206 name="rptctrl" width="68" />
1181 <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center" 1207 <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center"
1182 height="16" label="Apply" label_selected="Apply" left_delta="78" 1208 height="20" label="Apply" label_selected="Apply" left_delta="78"
1183 mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" /> 1209 mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" />
1184 <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"
1185 bottom="-288" drop_shadow_visible="true" follows="left|top" 1211 bottom="-288" drop_shadow_visible="true" follows="left|top"
@@ -1210,10 +1236,13 @@
1210 </panel> 1236 </panel>
1211 <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"
1212 label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> 1238 label="Content" left="1" mouse_opaque="false" name="Contents" width="270">
1213 <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"
1214 label="New Script..." label_selected="New Script..." 1240 label="New Script" label_selected="New Script..."
1215 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"
1216 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" />-->
1217 <panel bottom_delta="-330" follows="left|top" height="325" left="10" 1246 <panel bottom_delta="-330" follows="left|top" height="325" left="10"
1218 mouse_opaque="true" name="ContentsInventory" width="252" /> 1247 mouse_opaque="true" name="ContentsInventory" width="252" />
1219 </panel> 1248 </panel>
@@ -1223,22 +1252,10 @@
1223 1252
1224 <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"
1225 name="land info panel" width="272"> 1254 name="land info panel" width="272">
1255 <!-- Parcel Information -->
1226 <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"
1227 bottom="-40" drop_shadow_visible="true" follows="left|top" 1257 bottom="-40" drop_shadow_visible="true" follows="left|top"
1228 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" 1258 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
1229 mouse_opaque="true" name="label_parcel_modify" v_pad="0" width="150">
1230 Modify Parcel
1231 </text>
1232 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1233 height="20" label="Subdivide..." label_selected="Subdivide..." left="48"
1234 mouse_opaque="true" name="button subdivide land" scale_image="TRUE"
1235 width="112" />
1236 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1237 height="20" label="Join..." label_selected="Join..." left="48"
1238 mouse_opaque="true" name="button join land" scale_image="TRUE" width="112" />
1239 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1240 bottom_delta="-56" drop_shadow_visible="true" follows="left|top"
1241 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
1242 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">
1243 Parcel Information 1260 Parcel Information
1244 </text> 1261 </text>
@@ -1258,12 +1275,27 @@
1258 height="20" label="About Land..." label_selected="About Land..." left="48" 1275 height="20" label="About Land..." label_selected="About Land..." left="48"
1259 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" />
1260 <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top" 1277 <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top"
1261 tool_tip="Colour parcels according to their status" font="SansSerifSmall" 1278 tool_tip="Colour parcels according to their ownership" font="SansSerifSmall"
1262 height="16" initial_value="false" label="Show Status" left="48" 1279 height="16" initial_value="false" label="Show owners" left="48"
1263 mouse_opaque="true" name="checkbox show owners" width="100" /> 1280 mouse_opaque="true" name="checkbox show owners" width="100" />
1264 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 1281 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
1265 height="18" label="?" label_selected="?" left_delta="94" 1282 height="18" label="?" label_selected="?" left_delta="94"
1266 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 -->
1267 <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"
1268 bottom_delta="-56" drop_shadow_visible="true" follows="left|top" 1300 bottom_delta="-56" drop_shadow_visible="true" follows="left|top"
1269 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" 1301 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
@@ -1294,10 +1326,10 @@
1294 Click and drag to change view 1326 Click and drag to change view
1295 </string> 1327 </string>
1296 <string name="status_grab"> 1328 <string name="status_grab">
1297 Drag to move objects, Ctrl to lift, Ctrl-Shift to spin 1329 Drag to move, Ctrl to lift, Ctrl-Shift to rotate
1298 </string> 1330 </string>
1299 <string name="status_place"> 1331 <string name="status_place">
1300 Click in the world to create, shift-click to select 1332 Click inworld to build
1301 </string> 1333 </string>
1302 <string name="status_selectland"> 1334 <string name="status_selectland">
1303 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_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml
new file mode 100644
index 0000000..0172b41
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_mini_map.xml
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<menu bottom="100" color="MenuDefaultBgColor" drop_shadow="true" height="101" left="100"
3 mouse_opaque="false" name="popup" opaque="true" width="128">
4 <menu_item_call bottom_delta="-18" height="18" label="Zoom Close" left="0"
5 mouse_opaque="true" name="Zoom Close" width="128">
6 <on_click function="MiniMap.ZoomLevel" userdata="2" />
7 </menu_item_call>
8 <menu_item_call bottom_delta="-18" height="18" label="Zoom Medium" left="0"
9 mouse_opaque="true" name="Zoom Medium" width="128">
10 <on_click function="MiniMap.ZoomLevel" userdata="1" />
11 </menu_item_call>
12 <menu_item_call bottom_delta="-18" height="18" label="Zoom Far" left="0"
13 mouse_opaque="true" name="Zoom Far" width="128">
14 <on_click function="MiniMap.ZoomLevel" userdata="0" />
15 </menu_item_call>
16 <menu_item_separator />
17 <menu_item_check bottom_delta="-18" enabled="true" height="18" label="Center on Camera"
18 left="0" mouse_opaque="true" name="Center on Camera" width="128">
19 <on_click function="MiniMap.Center" userdata="1" />
20 <on_check function="MiniMap.CheckCenter" userdata="1" />
21 </menu_item_check>
22 <menu_item_check bottom_delta="-18" enabled="true" height="18" label="Rotate Mini-Map"
23 left="0" mouse_opaque="true" name="Rotate Mini-Map" width="128">
24 <on_click function="MiniMap.Rotate" userdata="" />
25 <on_check function="MiniMap.CheckRotate" userdata="" />
26 </menu_item_check>
27 <menu_item_separator />
28 <menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Show Map"
29 left="0" mouse_opaque="true" name="Show Map" width="128">
30 <on_click function="MiniMap.ShowWorldMap" userdata="" />
31 </menu_item_call>
32 <menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Stop Tracking"
33 left="0" mouse_opaque="true" name="Stop Tracking" width="128">
34 <on_click function="MiniMap.StopTracking" />
35 <on_enable function="MiniMap.EnableTracking" />
36 </menu_item_call>
37 <menu_item_call bottom_delta="-18" enabled = "false" height="18" label="Profile..."
38 left="0" mouse_opaque="true" name="Profile" width="128">
39 <on_click function="MiniMap.ShowProfile" />
40 <on_enable function="MiniMap.EnableProfile" />
41 </menu_item_call>
42</menu>
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 7ef84c4..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 &gt;" name="Rate Menu"> 46 <pie_menu label="More &gt;" 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,14 +58,22 @@
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" />
61 </menu_item_call> 67 </menu_item_call>
68 <menu_item_call name="Link" enabled="false" label="Link">
69 <on_click function="Tools.Link" userdata="" />
70 <on_enable function="Tools.EnableLink" />
71 </menu_item_call>
62 <menu_item_separator /> 72 <menu_item_separator />
63 <menu_item_separator /> 73 <menu_item_call name="Unlink" enabled="false" label="Unlink">
64 <menu_item_separator /> 74 <on_click function="Tools.Unlink" userdata="" />
75 <on_enable function="Tools.EnableUnlink" />
76 </menu_item_call>
65 </pie_menu> 77 </pie_menu>
66 <menu_item_call enabled="false" label="Buy..." mouse_opaque="true" name="Buy..."> 78 <menu_item_call enabled="false" label="Buy..." mouse_opaque="true" name="Buy...">
67 <on_click function="Object.Buy" /> 79 <on_click function="Object.Buy" />
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 72b828d..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">
@@ -126,12 +134,6 @@
126 <on_enable function="Edit.EnableDeselect" /> 134 <on_enable function="Edit.EnableDeselect" />
127 </menu_item_call> 135 </menu_item_call>
128 <menu_item_separator /> 136 <menu_item_separator />
129 <menu_item_call name="Duplicate" enabled="false"
130 label="Duplicate" shortcut="control|D">
131 <on_click function="Edit.Duplicate" userdata="" />
132 <on_enable function="Edit.EnableDuplicate" />
133 </menu_item_call>
134 <menu_item_separator />
135 137
136 <menu name="Attach Object" create_jump_keys="true" 138 <menu name="Attach Object" create_jump_keys="true"
137 label="Attach Object" opaque="true" tear_off="true" /> 139 label="Attach Object" opaque="true" tear_off="true" />
@@ -397,11 +399,17 @@
397 <on_click function="View.ZoomOut" userdata="" /> 399 <on_click function="View.ZoomOut" userdata="" />
398 </menu_item_call> 400 </menu_item_call>
399 </menu> 401 </menu>
400 <menu_item_separator />
401 <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen" 402 <menu_item_call name="Toggle Fullscreen" label="Toggle Fullscreen"
402 shortcut="alt|Enter"> 403 shortcut="alt|Enter">
403 <on_click function="View.Fullscreen" userdata="" /> 404 <on_click function="View.Fullscreen" userdata="" />
404 </menu_item_call> 405 </menu_item_call>
406 <menu_item_separator />
407 <menu_item_check name="Toggle Advanced Menu"
408 label="Advanced Menu"
409 shortcut="control|alt|D">
410 <on_click function="View.ToggleAdvanced" userdata="" />
411 <on_check function="View.CheckAdvanced" />
412 </menu_item_check>
405 </menu> 413 </menu>
406 414
407 415
@@ -516,7 +524,7 @@
516 524
517 <menu name="Tools" create_jump_keys="true" label="Tools" 525 <menu name="Tools" create_jump_keys="true" label="Tools"
518 opaque="true" tear_off="true" visible="false"> 526 opaque="true" tear_off="true" visible="false">
519 <menu name="Select Tool" create_jump_keys="true" label="Select Tool" 527 <menu name="Select Tool" create_jump_keys="true" label="Choose Tool"
520 opaque="true" tear_off="true"> 528 opaque="true" tear_off="true">
521 <menu_item_call name="Focus" label="Focus" shortcut="control|1"> 529 <menu_item_call name="Focus" label="Focus" shortcut="control|1">
522 <on_click function="Tools.SelectTool" userdata="focus" /> 530 <on_click function="Tools.SelectTool" userdata="focus" />
@@ -535,48 +543,67 @@
535 </menu_item_call> 543 </menu_item_call>
536 </menu> 544 </menu>
537 <menu_item_separator /> 545 <menu_item_separator />
538 <menu_item_check name="Select Only My Objects" 546 <menu_item_call name="Focus on Selection" enabled="false"
539 label="Select Only My Objects"> 547 label="Focus on Selection" shortcut="H">
540 <on_click function="Tools.SelectOnlyMyObjects" 548 <on_click function="Tools.LookAtSelection" userdata="focus" />
541 userdata="agents" /> 549 <on_enable function="Tools.SomethingSelectedNoHUD" />
542 <on_check control="SelectOwnedOnly" /> 550 </menu_item_call>
543 </menu_item_check> 551 <menu_item_call name="Zoom to Selection" enabled="false"
544 <menu_item_check name="Select Only Movable Objects" 552 label="Zoom to Selection" shortcut="shift|H">
545 label="Select Only Movable Objects"> 553 <on_click function="Tools.LookAtSelection" userdata="zoom" />
546 <on_click function="Tools.SelectOnlyMovableObjects" 554 <on_enable function="Tools.SomethingSelectedNoHUD" />
547 userdata="movable" /> 555 </menu_item_call>
548 <on_check control="SelectMovableOnly" /> 556 <menu name="Selection Options" label="Selection Options"
549 </menu_item_check> 557 create_jump_keys="true" opaque="true" tear_off="true">
550 <menu_item_check name="Select Only Copyable Objects" 558 <menu_item_check name="Select Only My Objects"
551 label="Select Only Copyable Objects"> 559 label="Select Only My Objects">
552 <on_click function="Tools.SelectOnlyCopyableObjects" 560 <on_click function="Tools.SelectOnlyMyObjects"
553 userdata="copyable" /> 561 userdata="agents" />
554 <on_check control="SelectCopyableOnly" /> 562 <on_check control="SelectOwnedOnly" />
555 </menu_item_check> 563 </menu_item_check>
556 <menu_item_check name="Select By Surrounding" 564 <menu_item_check name="Select Only Movable Objects"
557 label="Select By Surrounding"> 565 label="Select Only Movable Objects">
558 <on_click function="Tools.SelectBySurrounding" 566 <on_click function="Tools.SelectOnlyMovableObjects"
559 userdata="" /> 567 userdata="movable" />
560 <on_check control="RectangleSelectInclusive" /> 568 <on_check control="SelectMovableOnly" />
561 </menu_item_check> 569 </menu_item_check>
562 <menu_item_check name="Show Hidden Selection" 570 <menu_item_check name="Select Only Copyable Objects"
563 label="Show Hidden Selection"> 571 label="Select Only Copyable Objects">
564 <on_click function="Tools.ShowHiddenSelection" 572 <on_click function="Tools.SelectOnlyCopyableObjects"
565 userdata="" /> 573 userdata="copyable" />
566 <on_check control="RenderHiddenSelections" /> 574 <on_check control="SelectCopyableOnly" />
567 </menu_item_check> 575 </menu_item_check>
568 <menu_item_check name="Show Light Radius for Selection" 576 <menu_item_check name="Select By Surrounding"
569 label="Show Light Radius for Selection"> 577 label="Select By Surrounding">
570 <on_click function="Tools.ShowSelectionLightRadius" 578 <on_click function="Tools.SelectBySurrounding"
571 userdata="" /> 579 userdata="" />
572 <on_check control="RenderLightRadius" /> 580 <on_check control="RectangleSelectInclusive" />
573 </menu_item_check> 581 </menu_item_check>
574 <menu_item_check name="Show Selection Beam" 582 <menu_item_separator />
575 label="Show Selection Beam"> 583 <menu_item_check name="Show Hidden Selection"
576 <on_click function="ToggleControl" 584 label="Show Hidden Selection">
577 userdata="ShowSelectionBeam" /> 585 <on_click function="Tools.ShowHiddenSelection"
578 <on_check control="ShowSelectionBeam" /> 586 userdata="" />
579 </menu_item_check> 587 <on_check control="RenderHiddenSelections" />
588 </menu_item_check>
589 <menu_item_check name="Show Light Radius for Selection"
590 label="Show Light Radius for Selection">
591 <on_click function="Tools.ShowSelectionLightRadius"
592 userdata="" />
593 <on_check control="RenderLightRadius" />
594 </menu_item_check>
595 <menu_item_check label="Show Selection Outlines"
596 name="Show Selection Outlines">
597 <on_click function="Tools.ShowSelectionHighlights" userdata="" />
598 <on_check control="RenderHighlightSelections" />
599 </menu_item_check>
600 <menu_item_check name="Show Selection Beam"
601 label="Show Selection Beam">
602 <on_click function="ToggleControl"
603 userdata="ShowSelectionBeam" />
604 <on_check control="ShowSelectionBeam" />
605 </menu_item_check>
606 </menu>
580 <menu_item_separator /> 607 <menu_item_separator />
581 <menu_item_check name="Snap to Grid" enabled="false" 608 <menu_item_check name="Snap to Grid" enabled="false"
582 label="Snap to Grid" shortcut="G"> 609 label="Snap to Grid" shortcut="G">
@@ -619,15 +646,10 @@
619 <on_enable function="Tools.EnableUnlink" /> 646 <on_enable function="Tools.EnableUnlink" />
620 </menu_item_call> 647 </menu_item_call>
621 <menu_item_separator /> 648 <menu_item_separator />
622 <menu_item_call name="Focus on Selection" enabled="false" 649 <menu_item_call name="Duplicate" enabled="false"
623 label="Focus on Selection" shortcut="H"> 650 label="Duplicate" shortcut="control|D">
624 <on_click function="Tools.LookAtSelection" userdata="focus" /> 651 <on_click function="Edit.Duplicate" userdata="" />
625 <on_enable function="Tools.SomethingSelectedNoHUD" /> 652 <on_enable function="Edit.EnableDuplicate" />
626 </menu_item_call>
627 <menu_item_call name="Zoom to Selection" enabled="false"
628 label="Zoom to Selection" shortcut="shift|H">
629 <on_click function="Tools.LookAtSelection" userdata="zoom" />
630 <on_enable function="Tools.SomethingSelectedNoHUD" />
631 </menu_item_call> 653 </menu_item_call>
632 <menu_item_call name="Menu Object Take" enabled="false" 654 <menu_item_call name="Menu Object Take" enabled="false"
633 label="Take" visible="false"> 655 label="Take" visible="false">
@@ -639,6 +661,7 @@
639 <on_click function="Tools.TakeCopy" userdata="" /> 661 <on_click function="Tools.TakeCopy" userdata="" />
640 <on_enable function="Tools.EnableTakeCopy" /> 662 <on_enable function="Tools.EnableTakeCopy" />
641 </menu_item_call> 663 </menu_item_call>
664 <menu_item_separator />
642 <menu_item_call name="Return..." enabled="false" 665 <menu_item_call name="Return..." enabled="false"
643 label="Return Object"> 666 label="Return Object">
644 <on_click function="Object.Return" /> 667 <on_click function="Object.Return" />
@@ -695,9 +718,10 @@
695 userdata="stop" /> 718 userdata="stop" />
696 <on_enable function="EditableSelected" /> 719 <on_enable function="EditableSelected" />
697 </menu_item_call> 720 </menu_item_call>
721 <menu_item_separator />
698 <menu_item_call name="Set permissions on selected task inventory" 722 <menu_item_call name="Set permissions on selected task inventory"
699 enabled="false" 723 enabled="false"
700 label="Set permissions on selected task inventory"> 724 label="Bulk Set Permissions">
701 <on_click function="Tools.SetBulkPerms" userdata="" /> 725 <on_click function="Tools.SetBulkPerms" userdata="" />
702 <on_enable function="EditableSelected" /> 726 <on_enable function="EditableSelected" />
703 </menu_item_call> 727 </menu_item_call>
@@ -868,6 +892,25 @@
868 userdata="QuietSnapshotsToDisk" /> 892 userdata="QuietSnapshotsToDisk" />
869 <on_check control="QuietSnapshotsToDisk" /> 893 <on_check control="QuietSnapshotsToDisk" />
870 </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>
871 <menu_item_check name="Show Mouselook Crosshairs" 914 <menu_item_check name="Show Mouselook Crosshairs"
872 label="Show Mouselook Crosshairs"> 915 label="Show Mouselook Crosshairs">
873 <on_click function="ToggleControl" 916 <on_click function="ToggleControl"
@@ -1351,6 +1394,42 @@
1351 </menu> 1394 </menu>
1352 1395
1353 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
1354 1433
1355 <!-- UI --> 1434 <!-- UI -->
1356 1435
@@ -1870,6 +1949,13 @@
1870 userdata="ShowConsoleWindow" /> 1949 userdata="ShowConsoleWindow" />
1871 <on_check control="ShowConsoleWindow" /> 1950 <on_check control="ShowConsoleWindow" />
1872 </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
1873 <menu_item_check name="Output Debug Minidump" 1959 <menu_item_check name="Output Debug Minidump"
1874 label="Output Debug Minidump"> 1960 label="Output Debug Minidump">
1875 <on_click function="ToggleControl" 1961 <on_click function="ToggleControl"
diff --git a/linden/indra/newview/skins/default/xui/en-us/notify.xml b/linden/indra/newview/skins/default/xui/en-us/notify.xml
index 99fe75a..01e2546 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notify.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notify.xml
@@ -835,6 +835,11 @@ Use the controls on the right to find things
835and display different backgrounds. 835and display different backgrounds.
836 </message> 836 </message>
837 </notify> 837 </notify>
838 <notify name="FirstMiniMap" tip="false">
839 <message name="message">
840 Right-click the Mini-Map for more options.
841 </message>
842 </notify>
838 <notify name="FirstBuild" tip="false"> 843 <notify name="FirstBuild" tip="false">
839 <message name="message"> 844 <message name="message">
840 You can build new objects in some areas of [SECOND_LIFE]. 845 You can build new objects in some areas of [SECOND_LIFE].
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&apos;s profile" width="18" /> 107 tool_tip="Click to open partner&apos;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&apos;s classified listings." v_pad="0" 315 name="Place an ad in Second Life&apos;s classified listings." v_pad="0"
323 width="302"> 316 width="302">
324 Place an ad in Second Life&apos;s classified listings. 317 Place an ad in Second Life&apos;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
380of trades in progress, joint projects, etc. Only you can see these 361 of trades in progress, joint projects, etc. Only you can see these
381notes. 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&apos;s movement and chat." width="72" /> 379 tool_tip="Stop this resident&apos;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.
407Disabled because you have not 388 Disabled because you have not
408formed 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.
422Disabled 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_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/panel_mini_map.xml
new file mode 100644
index 0000000..19faa62
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_mini_map.xml
@@ -0,0 +1,62 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel background_opaque="false" background_visible="true" bg_alpha_color="NetMapBackgroundColor"
3 border="false" follows="left|top|right|bottom" height="716" label="Mini Map"
4 mouse_opaque="false" name="mini_mapview" width="196">
5 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
6 bottom="-40" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
7 halign="left" height="10" left="80" mouse_opaque="false" name="n_label"
8 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="10">
9 N
10 </text>
11 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
12 bottom="-80" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
13 halign="left" height="10" left="120" mouse_opaque="false" name="e_label"
14 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="10">
15 E
16 </text>
17 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
18 bottom="-120" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
19 halign="left" height="10" left="80" mouse_opaque="false" name="s_label"
20 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="10">
21 S
22 </text>
23 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
24 bottom="-80" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
25 halign="left" height="10" left="40" mouse_opaque="false" name="w_label"
26 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="11">
27 W
28 </text>
29 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
30 bottom="-60" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
31 halign="left" height="10" left="100" mouse_opaque="false" name="ne_label"
32 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="20">
33 NE
34 </text>
35 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
36 bottom="-100" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
37 halign="left" height="10" left="100" mouse_opaque="false" name="se_label"
38 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="20">
39 SE
40 </text>
41 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
42 bottom="-100" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
43 halign="left" height="10" left="60" mouse_opaque="false" name="sw_label"
44 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="21">
45 SW
46 </text>
47 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
48 bottom="-60" drop_shadow_visible="false" font="SansSerifSmall" h_pad="0"
49 halign="left" height="1-" left="60" mouse_opaque="false" name="nw_label"
50 text_enabled_color="1, 1, 1, 0.7" v_pad="0" width="21">
51 NW
52 </text>
53 <string name="tooltip_tp">
54 Double-Click teleports
55 </string>
56 <string name="tooltip_pan">
57 Shift-Drag pans
58 </string>
59 <string name="tooltip_map">
60 Double-Click opens Map
61 </string>
62</panel>
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..8ad4fff 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="184" mouse_opaque="false"
49 name="windlight_remote_container" use_bounding_rect="true" user_resize="false"
50 width="186">
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_audio.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
index 92978ab..c960d36 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
@@ -15,7 +15,7 @@
15 Streaming Preferences: 15 Streaming Preferences:
16 </text> 16 </text>
17 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 17 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
18 bottom="-280" drop_shadow_visible="true" enabled="true" follows="left|top" 18 bottom="-300" drop_shadow_visible="true" enabled="true" follows="left|top"
19 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 19 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128"> 20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128">
21 Audio Preferences: 21 Audio Preferences:
@@ -28,6 +28,10 @@
28 label="Play Streaming Music When Available (uses more bandwidth)" 28 label="Play Streaming Music When Available (uses more bandwidth)"
29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false" 29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false"
30 width="339" /> 30 width="339" />
31 <check_box bottom_delta="-20" control_name="ShowStreamTitle" enabled="true"
32 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
33 label="Show stream info in chat" left="162" mouse_opaque="true"
34 name="show_stream_title" radio_style="false" width="338" />
31 <check_box bottom_delta="-20" control_name="AudioStreamingVideo" enabled="true" 35 <check_box bottom_delta="-20" control_name="AudioStreamingVideo" enabled="true"
32 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" 36 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
33 label="Play Streaming Media When Available (uses more bandwidth)" 37 label="Play Streaming Media When Available (uses more bandwidth)"
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_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
index 6c8ffdb..e8a2625 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
@@ -73,14 +73,6 @@
73 follows="left|top" height="16" increment="1" initial_val="300" 73 follows="left|top" height="16" increment="1" initial_val="300"
74 label="Away Timeout:" label_width="141" left="10" max_val="600" 74 label="Away Timeout:" label_width="141" left="10" max_val="600"
75 min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" /> 75 min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" />
76 <check_box bottom="-286" enabled="true" follows="left|top"
77 font="SansSerifSmall" height="16" initial_value="false"
78 label="Rotate Mini-Map" left="151" mouse_opaque="true"
79 name="rotate_mini_map_checkbox" radio_style="false" width="256" />
80 <check_box bottom="-286" control_name="MiniMapTeleport" enabled="true" follows="left|top"
81 font="SansSerifSmall" height="16" initial_value="false"
82 label="Doubleclick Mini-Map Teleports" left="280" mouse_opaque="true"
83 name="teleport_mini_map_checkbox" radio_style="false" width="256" />
84 <check_box bottom="-304" enabled="true" 76 <check_box bottom="-304" enabled="true"
85 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 77 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
86 label="Notify when Linden dollars (L$) spent or received" left="151" 78 label="Notify when Linden dollars (L$) spent or received" left="151"
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_im.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
index f0f79e4..ee00455 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
@@ -2,92 +2,102 @@
2<panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom" 2<panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom"
3 height="408" label="Communication" left="102" mouse_opaque="true" name="im" 3 height="408" label="Communication" left="102" mouse_opaque="true" name="im"
4 width="517"> 4 width="517">
5 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 5 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
6 bottom="-20" drop_shadow_visible="true" enabled="true" follows="left|top" 6 bottom="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
7 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 7 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
8 mouse_opaque="false" name="text_box" v_pad="0" width="128"> 8 mouse_opaque="false" name="text_box" v_pad="0" width="128">
9 My Online Status: 9 My Online Status:
10 </text> 10 </text>
11 <check_box bottom="-25" enabled="true" follows="left|top" font="SansSerifSmall" 11 <check_box bottom="-25" enabled="true" follows="left|top" font="SansSerifSmall"
12 height="16" initial_value="false" 12 height="16" initial_value="false"
13 label="Only my Friends and Groups can see when I am online" 13 label="Only my Friends and Groups can see when I am online"
14 left="148" mouse_opaque="true" name="online_visibility" radio_style="false" 14 left="148" mouse_opaque="true" name="online_visibility" radio_style="false"
15 width="350" /> 15 width="350" />
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="-40" drop_shadow_visible="true" enabled="true" follows="left|top" 17 bottom="-40" drop_shadow_visible="true" enabled="true" follows="left|top"
18 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 18 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
19 mouse_opaque="false" name="text_box2" v_pad="0" width="128"> 19 mouse_opaque="false" name="text_box2" v_pad="0" width="128">
20 IM Options: 20 IM Options:
21 </text> 21 </text>
22 <string name="log_in_to_change"> 22 <string name="log_in_to_change">
23 log in to change 23 log in to change
24 </string> 24 </string>
25 <check_box bottom="-45" enabled="true" follows="left|top" font="SansSerifSmall" 25 <check_box bottom="-45" enabled="true" follows="left|top" font="SansSerifSmall"
26 height="16" initial_value="false" label="Send IM to Email ([EMAIL])" 26 height="16" initial_value="false" label="Send IM to Email ([EMAIL])"
27 left="148" mouse_opaque="true" name="send_im_to_email" radio_style="false" 27 left="148" mouse_opaque="true" name="send_im_to_email" radio_style="false"
28 width="350" /> 28 width="350" />
29 <check_box bottom="-65" enabled="true" follows="left|top" 29 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
30 bottom="-59" drop_shadow_visible="true" enabled="true" follows="left|top"
31 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="148"
32 mouse_opaque="false" name="show_ims_label" v_pad="0" width="100">
33 Show IMs in:
34 </text>
35 <check_box bottom="-65" enabled="true" follows="left|top"
30 font="SansSerifSmall" height="16" initial_value="false" 36 font="SansSerifSmall" height="16" initial_value="false"
31 label="Show IMs with Chat" left="148" mouse_opaque="true" 37 label="Main Chat" left="248" mouse_opaque="true"
32 name="include_im_in_chat_history" radio_style="false" width="237" /> 38 name="include_im_in_chat_console" radio_style="false" width="100" />
33 <check_box bottom="-85" enabled="true" follows="left|top" 39 <check_box bottom="-65" enabled="true" follows="left|top"
40 font="SansSerifSmall" height="16" initial_value="false"
41 label="Local Chat" left="348" mouse_opaque="true"
42 name="include_im_in_chat_history" radio_style="false" width="100" />
43 <check_box bottom="-85" enabled="true" follows="left|top"
34 font="SansSerifSmall" height="16" initial_value="false" 44 font="SansSerifSmall" height="16" initial_value="false"
35 label="Show timestamps in IM" left="148" mouse_opaque="true" 45 label="Show timestamps in IM" left="148" mouse_opaque="true"
36 name="show_timestamps_check" radio_style="false" width="237" /> 46 name="show_timestamps_check" radio_style="false" width="237" />
37 <check_box bottom="-105" enabled="true" 47 <check_box bottom="-105" enabled="true"
38 follows="left|top" font="SansSerifSmall" height="16" 48 follows="left|top" font="SansSerifSmall" height="16"
39 initial_value="false" label="Show online Friend notifications" left="148" 49 initial_value="false" label="Show online Friend notifications" left="148"
40 mouse_opaque="true" name="friends_online_notify_checkbox" 50 mouse_opaque="true" name="friends_online_notify_checkbox"
41 radio_style="false" width="256" /> 51 radio_style="false" width="256" />
42 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 52 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
43 bottom="-125" drop_shadow_visible="true" enabled="true" follows="left|top" 53 bottom="-125" drop_shadow_visible="true" enabled="true" follows="left|top"
44 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 54 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
45 mouse_opaque="false" name="text_box3" v_pad="0" width="128"> 55 mouse_opaque="false" name="text_box3" v_pad="0" width="128">
46 Busy Mode Response: 56 Busy Mode Response:
47 </text> 57 </text>
48 <text_editor type="string" length="1" bottom="-185" embedded_items="false" enabled="true" follows="left|top" 58 <text_editor type="string" length="1" bottom="-185" embedded_items="false" enabled="true" follows="left|top"
49 font="SansSerifSmall" height="70" left="148" max_length="255" 59 font="SansSerifSmall" height="70" left="148" max_length="255"
50 mouse_opaque="true" name="busy_response" width="330" word_wrap="true" /> 60 mouse_opaque="true" name="busy_response" width="330" word_wrap="true" />
51 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 61 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
52 bottom="-218" drop_shadow_visible="true" enabled="true" follows="left|top" 62 bottom="-218" drop_shadow_visible="true" enabled="true" follows="left|top"
53 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 63 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
54 mouse_opaque="false" name="text_box4" v_pad="0" width="128"> 64 mouse_opaque="false" name="text_box4" v_pad="0" width="128">
55 Logging Options: 65 Logging Options:
56 </text> 66 </text>
57 <check_box bottom="-225" enabled="true" 67 <check_box bottom="-225" enabled="true"
58 follows="left|top" font="SansSerifSmall" height="16" 68 follows="left|top" font="SansSerifSmall" height="16"
59 initial_value="false" label="Save a log of IM on my computer" left="148" 69 initial_value="false" label="Save a log of IM on my computer" left="148"
60 mouse_opaque="true" name="log_instant_messages" radio_style="false" 70 mouse_opaque="true" name="log_instant_messages" radio_style="false"
61 width="237" /> 71 width="237" />
62 <check_box bottom="-245" enabled="true" 72 <check_box bottom="-245" enabled="true"
63 follows="left|top" font="SansSerifSmall" height="16" 73 follows="left|top" font="SansSerifSmall" height="16"
64 initial_value="false" label="Show timestamps in IM log" left="168" 74 initial_value="false" label="Show timestamps in IM log" left="168"
65 mouse_opaque="true" name="log_instant_messages_timestamp" radio_style="false" 75 mouse_opaque="true" name="log_instant_messages_timestamp" radio_style="false"
66 width="217" /> 76 width="217" />
67 <check_box bottom="-265" enabled="true" follows="left|top" 77 <check_box bottom="-265" enabled="true" follows="left|top"
68 font="SansSerifSmall" height="16" initial_value="false" 78 font="SansSerifSmall" height="16" initial_value="false"
69 label="Show the end of last IM conversation" left="168" mouse_opaque="true" 79 label="Show the end of last IM conversation" left="168" mouse_opaque="true"
70 name="log_show_history" radio_style="false" width="217" /> 80 name="log_show_history" radio_style="false" width="217" />
71 <check_box bottom="-285" enabled="true" follows="left|top" 81 <check_box bottom="-285" enabled="true" follows="left|top"
72 font="SansSerifSmall" height="16" initial_value="false" label="Save a log of Local Chat on my computer" 82 font="SansSerifSmall" height="16" initial_value="false" label="Save a log of Local Chat on my computer"
73 left="148" mouse_opaque="true" name="log_chat" radio_style="false" 83 left="148" mouse_opaque="true" name="log_chat" radio_style="false"
74 width="237" /> 84 width="237" />
75 <check_box bottom="-305" enabled="true" follows="left|top" 85 <check_box bottom="-305" enabled="true" follows="left|top"
76 font="SansSerifSmall" height="16" initial_value="false" 86 font="SansSerifSmall" height="16" initial_value="false"
77 label="Show timestamps in Local Chat log" left="168" mouse_opaque="true" 87 label="Show timestamps in Local Chat log" left="168" mouse_opaque="true"
78 name="log_chat_timestamp" radio_style="false" width="217" /> 88 name="log_chat_timestamp" radio_style="false" width="217" />
79 <check_box bottom="-325" enabled="true" follows="left|top" 89 <check_box bottom="-325" enabled="true" follows="left|top"
80 font="SansSerifSmall" height="16" initial_value="false" 90 font="SansSerifSmall" height="16" initial_value="false"
81 label="Show incoming IM in Local Chat log" left="168" mouse_opaque="true" 91 label="Show incoming IM in Local Chat log" left="168" mouse_opaque="true"
82 name="log_chat_IM" radio_style="false" width="217" /> 92 name="log_chat_IM" radio_style="false" width="217" />
83 <check_box bottom="-345" enabled="true" follows="left|top" 93 <check_box bottom="-345" enabled="true" follows="left|top"
84 font="SansSerifSmall" height="16" initial_value="false" 94 font="SansSerifSmall" height="16" initial_value="false"
85 label="Include date with timestamps" left="148" mouse_opaque="true" 95 label="Include date with timestamps" left="148" mouse_opaque="true"
86 name="log_date_timestamp" radio_style="false" width="237" /> 96 name="log_date_timestamp" radio_style="false" width="237" />
87 <button bottom="-367" follows="right|bottom" font="SansSerif" halign="center" 97 <button bottom="-367" follows="right|bottom" font="SansSerif" halign="center"
88 height="20" label="Change Path" label_selected="Change Path" left="170" 98 height="20" label="Change Path" label_selected="Change Path" left="170"
89 mouse_opaque="true" name="log_path_button" width="90" /> 99 mouse_opaque="true" name="log_path_button" width="90" />
90 <line_editor border_drop_shadow_visible="false" border_visible="false" bottom="-366" 100 <line_editor border_drop_shadow_visible="false" border_visible="false" bottom="-366"
91 drop_shadow_visible="true" enabled="false" follows="top|left|right" 101 drop_shadow_visible="true" enabled="false" follows="top|left|right"
92 font="SansSerifSmall" halign="right" height="19" left="248" 102 font="SansSerifSmall" halign="right" height="19" left="248"
93 max_length="254" mouse_opaque="false" name="log_path_string" right="-20" /> 103 max_length="254" mouse_opaque="false" name="log_path_string" right="-20" />
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..b9c6fc3
--- /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="182">
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="Sky" left_delta="82" width="71"
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="72" name="Popup" scale_image="true" control_name="ShowWindlightSettingsPopup"
13 tool_tip="Click here to adjust draw distance" 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..ead9ad7
--- /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="182">
5 <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="22" left="0" width="182" />
6 <panel bottom="3" filename="panel_windlight_controls.xml" name="panel_windlight_controls" height="20" left="0" width="182" />
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..2fd9be5
--- /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="182">
5 <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="47" left="0" width="182" />
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="78" left="6" max_val="512" min_val="64" mouse_opaque="true"
10 name="DrawDistance" show_text="true" width="170" />
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="170" 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="182" />
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 9ec721c..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 -->
@@ -159,6 +161,7 @@
159<!-- MAP --> 161<!-- MAP -->
160<MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> 162<MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color -->
161<MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> 163<MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color -->
164<MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color -->
162 165
163<!-- MINI-MAP --> 166<!-- MINI-MAP -->
164<NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> 167<NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background -->
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&apos;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&apos;s classified listings." v_pad="0"
323 width="302">
324 Place an ad in Second Life&apos;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
380of trades in progress, joint projects, etc. Only you can see these
381notes. 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&apos;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.
407Disabled because you have not
408formed 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.
422Disabled 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>
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index 0abdc60..5da0256 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -794,7 +794,7 @@ class Linux_i686Manifest(LinuxManifest):
794 self.path("libuuid.so", "libuuid.so.1") 794 self.path("libuuid.so", "libuuid.so.1")
795 self.path("libSDL-1.2.so.0") 795 self.path("libSDL-1.2.so.0")
796 self.path("libELFIO.so") 796 self.path("libELFIO.so")
797 self.path("libopenjpeg.so.2") 797 self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
798 798
799 self.path("libopenal.so") # symlink 799 self.path("libopenal.so") # symlink
800 self.path("libopenal.so.1") 800 self.path("libopenal.so.1")